import{d as _,ey as w,ex as g,H as D,b as n,er as k,u,c,eu as p,bu as b,v as P}from"./registerWidgets.4340e287.js";import{D as I,m as x}from"./DashPlayer.e7cd0390.js";import{L as B}from"./CircularLoading.1cc5445b.js";import{r as R}from"./index.bdeb3c9e.js";import{B as q}from"./BackButton.fbd499db.js";import{a as l}from"./asyncComputed.a4cc4ebe.js";import{D as C}from"./dashes.8416a46d.js";import{W as E}from"./workspaces.ff4ec9b2.js";import"./executeJs.cdd93f83.js";import"./PlayerNavbar.c59d454a.js";import"./icons.da02f7f7.js";import"./Steps.36594e67.js";import"./Modal.51841735.js";import"./geometryUtils.7de327f5.js";import"./passwordlessManager.8c70219b.js";import"./pubsub.3290d859.js";import"./storage.dfe55847.js";import"./Passwordless.81090626.js";import"./WidgetsFrame.0a348048.js";import"./activeRecord.c40ac301.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]="5d0a3533-7032-4d6c-993d-a5f077acdabe",t._sentryDebugIdIdentifier="sentry-dbid-5d0a3533-7032-4d6c-993d-a5f077acdabe")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=w(),s=g(),m=({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}=l(()=>C.get(r.params.dashPath)),{result:i}=l(()=>E.get()),d=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(),c(B,{key:0,class:"loading",justify:"center"})):p("",!0),d.value?(n(),c(I,{key:1,class:"player",dash:d.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":d.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):p("",!0),u(a)?(n(),c(q,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const Z=P(F,[["__scopeId","data-v-1172cf43"]]);export{Z as default};
//# sourceMappingURL=DashPreview.b58f1dc0.js.map
