import{d as _,ey as w,ex as g,F as D,b as n,c as k,bu as u,u as d,eu as l,bw as b,t as P}from"./registerWidgets.f16d9611.js";import{D as I,m as x}from"./DashPlayer.39d6bf55.js";import{L as B}from"./CircularLoading.955865b1.js";import{r as R}from"./index.6ce32df2.js";import{B as q}from"./BackButton.fd5f2ab5.js";import{a as m}from"./asyncComputed.5a3fb141.js";import{D as C}from"./dashes.cc149b09.js";import{W as F}from"./workspaces.03168f53.js";import"./executeJs.68b2615a.js";import"./PlayerNavbar.eb774f8e.js";import"./icons.3c1b43b5.js";import"./Steps.327dc602.js";import"./Modal.4a31ff16.js";import"./passwordlessManager.7fb318b8.js";import"./pubsub.1eec455f.js";import"./storage.9f674036.js";import"./Passwordless.8c0e4f21.js";import"./WidgetsFrame.0dd3b757.js";import"./lottie.eab5e6f1.js";import"./activeRecord.5c8dc9b3.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="7e78ee62-d23f-4a19-979d-1059787a55b8",t._sentryDebugIdIdentifier="sentry-dbid-7e78ee62-d23f-4a19-979d-1059787a55b8")}catch{}})();const E=_({__name:"DashPreview",setup(t){const r=w(),s=g(),c=({id:e,type:o})=>{o==="dash"?(s.push({name:"dashPreview",params:{dashId:e},query:r.query}),y()):s.push({name:"formPreview",params:{formId:e},query:r.query})},f=()=>{var e;!((e=a.value)!=null&&e.path)||s.push(`/_editor/dash/${encodeURIComponent(a.value.path)}`)},{loading:v,result:a,refetch:y}=m(()=>C.get(r.params.dashPath)),{result:i}=m(()=>F.get()),p=D(()=>{if(!a.value||!i.value||!a.value.makeRunnerData(i.value))return null;const e=x(a.value.makeRunnerData(i.value));return e.onRedirect(({url:o,queryParams:h})=>R("preview",s,o,h)),e});return(e,o)=>(n(),k(b,null,[u(v)||!u(a)?(n(),d(B,{key:0,class:"loading",justify:"center"})):l("",!0),p.value?(n(),d(I,{key:1,class:"player",dash:p.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":p.value,onNavigate:c},null,8,["dash","params","dash-player-service"])):l("",!0),u(a)?(n(),d(q,{key:2,onExitFullscreenPreview:f})):l("",!0)],64))}});const Z=P(E,[["__scopeId","data-v-1172cf43"]]);export{Z as default};
//# sourceMappingURL=DashPreview.aede6f1b.js.map
