import{d as _,ey as b,ex as w,F as g,b as n,c as D,bu as u,u as c,eu as d,bw as k,t as P}from"./registerWidgets.a7f9f083.js";import{D as I,m as x}from"./DashPlayer.08a86f5b.js";import{L as B}from"./CircularLoading.f04a39f3.js";import{r as R}from"./index.3cb779ee.js";import{B as q}from"./BackButton.547357d3.js";import{a as l}from"./asyncComputed.b85a7eae.js";import{D as C}from"./dashes.c3c8de0a.js";import{W as F}from"./workspaces.cd7ce6b5.js";import"./executeJs.f647ea9a.js";import"./PlayerNavbar.ea2c3e5c.js";import"./icons.71d8e4fb.js";import"./Steps.2d54b29e.js";import"./Modal.9197d569.js";import"./passwordlessManager.c97a120a.js";import"./pubsub.e3e6423a.js";import"./Passwordless.60541298.js";import"./WidgetsFrame.afc734a7.js";import"./lottie.0b007633.js";import"./activeRecord.8c74a961.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="28a5bbaf-80aa-4fb6-8f0a-db3e36c0bb80",t._sentryDebugIdIdentifier="sentry-dbid-28a5bbaf-80aa-4fb6-8f0a-db3e36c0bb80")}catch{}})();const E=_({__name:"DashPreview",setup(t){const a=b(),s=w(),m=({id:e,type:o})=>{o==="dash"?(s.push({name:"dashPreview",params:{dashId:e},query:a.query}),y()):s.push({name:"formPreview",params:{formId:e},query:a.query})},f=()=>{var e;!((e=r.value)!=null&&e.path)||s.push(`/_editor/dash/${encodeURIComponent(r.value.path)}`)},{loading:v,result:r,refetch:y}=l(()=>C.get(a.params.dashPath)),{result:i}=l(()=>F.get()),p=g(()=>{if(!r.value||!i.value||!r.value.makeRunnerData(i.value))return null;const e=x(r.value.makeRunnerData(i.value));return e.onRedirect(({url:o,queryParams:h})=>R("preview",s,o,h)),e});return(e,o)=>(n(),D(k,null,[u(v)||!u(r)?(n(),c(B,{key:0,class:"loading",justify:"center"})):d("",!0),p.value?(n(),c(I,{key:1,class:"player",dash:p.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(a).query,"dash-player-service":p.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):d("",!0),u(r)?(n(),c(q,{key:2,onExitFullscreenPreview:f})):d("",!0)],64))}});const Y=P(E,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.061fe78c.js.map
