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 p,bw as P,t as b}from"./registerWidgets.d68712f0.js";import{D as I,m as x}from"./DashPlayer.49110b1f.js";import{L as B}from"./CircularLoading.3dc537f5.js";import{r as R}from"./index.ba76e763.js";import{B as q}from"./BackButton.2f4b66ab.js";import{a as l}from"./asyncComputed.f9ea598c.js";import{D as C}from"./dashes.05767366.js";import{W as F}from"./workspaces.8b868ba2.js";import"./executeJs.d912d6e8.js";import"./PlayerNavbar.b92fdfe8.js";import"./icons.24d45fbf.js";import"./Steps.c8a993da.js";import"./Modal.b6d9a624.js";import"./passwordlessManager.36ac2e38.js";import"./pubsub.5d7eaeae.js";import"./Passwordless.4c10fad4.js";import"./WidgetsFrame.0ac81da1.js";import"./lottie.2b6a117e.js";import"./activeRecord.b8754928.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]="8d7849c5-7fe3-410f-884f-ccfa2a8dfdf2",t._sentryDebugIdIdentifier="sentry-dbid-8d7849c5-7fe3-410f-884f-ccfa2a8dfdf2")}catch{}})();const E=_({__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(()=>F.get()),c=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(P,null,[u(v)||!u(a)?(n(),d(B,{key:0,class:"loading",justify:"center"})):p("",!0),c.value?(n(),d(I,{key:1,class:"player",dash:c.value.runnerData,"widgets-with-errors":[],"is-preview":!0,params:u(r).query,"dash-player-service":c.value,onNavigate:m},null,8,["dash","params","dash-player-service"])):p("",!0),u(a)?(n(),d(q,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const Y=b(E,[["__scopeId","data-v-1172cf43"]]);export{Y as default};
//# sourceMappingURL=DashPreview.54c7db23.js.map
