import{d as _,ey as b,ex as w,H as g,b as n,er as D,u,c,eu as d,bu as k,v as P}from"./registerWidgets.faf49e08.js";import{D as I,m as x}from"./DashPlayer.60656470.js";import{L as B}from"./CircularLoading.fde4d593.js";import{r as R}from"./index.b0babef5.js";import{B as q}from"./BackButton.d6e25daf.js";import{a as l}from"./asyncComputed.70c50dd2.js";import{D as C}from"./dashes.e9024cfc.js";import{W as E}from"./workspaces.5a397dd7.js";import"./executeJs.2025b567.js";import"./PlayerNavbar.f8fbf721.js";import"./icons.18b78fe3.js";import"./Steps.7eab3176.js";import"./Modal.f708ef7e.js";import"./geometryUtils.5318a959.js";import"./passwordlessManager.c54f57c4.js";import"./pubsub.04fb37b2.js";import"./storage.0aff2700.js";import"./Passwordless.3ff1aad5.js";import"./WidgetsFrame.b61f747c.js";import"./activeRecord.a639288f.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]="5727d02b-f11a-4b73-82bb-f361053c600f",t._sentryDebugIdIdentifier="sentry-dbid-5727d02b-f11a-4b73-82bb-f361053c600f")}catch{}})();const F=_({__name:"DashPreview",setup(t){const r=b(),s=w(),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()),p=g(()=>{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(),D(k,null,[u(v)||!u(a)?(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(r).query,"dash-player-service":p.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):d("",!0),u(a)?(n(),c(q,{key:2,onExitFullscreenPreview:f})):d("",!0)],64))}});const Z=P(F,[["__scopeId","data-v-1172cf43"]]);export{Z as default};
//# sourceMappingURL=DashPreview.335d3b1f.js.map
