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.59747b32.js";import{D as I,m as x}from"./DashPlayer.7acd2b33.js";import{L as B}from"./CircularLoading.eebf6e84.js";import{r as R}from"./index.135ae79e.js";import{B as q}from"./BackButton.33e2a4bf.js";import{a as l}from"./asyncComputed.1d4b957f.js";import{D as C}from"./dashes.5263a49a.js";import{W as F}from"./workspaces.69ae4514.js";import"./executeJs.977da00c.js";import"./PlayerNavbar.6a6dc5eb.js";import"./icons.8e518be5.js";import"./Steps.60776a12.js";import"./Modal.9da25f39.js";import"./passwordlessManager.794d3db6.js";import"./pubsub.cfb8c19f.js";import"./storage.e0256989.js";import"./Passwordless.af9fa329.js";import"./WidgetsFrame.2536274d.js";import"./lottie.15d20c75.js";import"./activeRecord.e2c0e940.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]="0f86437b-e581-4b60-955f-a9c6fbb8f99d",t._sentryDebugIdIdentifier="sentry-dbid-0f86437b-e581-4b60-955f-a9c6fbb8f99d")}catch{}})();const E=_({__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(()=>F.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(E,[["__scopeId","data-v-1172cf43"]]);export{Z as default};
//# sourceMappingURL=DashPreview.cbb5e518.js.map
