import{d as _,ey as w,ex as g,F as D,b as n,c as b,bu as u,u as c,eu as p,bw as k,t as P}from"./registerWidgets.92d2f644.js";import{D as I,m as x}from"./DashPlayer.766f9779.js";import{L as B}from"./CircularLoading.e3659467.js";import{r as R}from"./index.75f517f3.js";import{B as q}from"./BackButton.1708a07b.js";import{a as l}from"./asyncComputed.969e5e52.js";import{D as C}from"./dashes.d1b5d69d.js";import{W as F}from"./workspaces.c2950343.js";import"./executeJs.3da04476.js";import"./PlayerNavbar.e2f19917.js";import"./icons.f7e2c66d.js";import"./Steps.b001c6e8.js";import"./Modal.2ef1e90a.js";import"./passwordlessManager.d1484834.js";import"./pubsub.cabffe13.js";import"./storage.63ab52ef.js";import"./Passwordless.493e6d57.js";import"./WidgetsFrame.c49cae71.js";import"./lottie.8475a642.js";import"./activeRecord.1a640186.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]="1dd6f193-b15e-4cc8-8718-9ff5aa32db5f",t._sentryDebugIdIdentifier="sentry-dbid-1dd6f193-b15e-4cc8-8718-9ff5aa32db5f")}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()),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(),b(k,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(E,[["__scopeId","data-v-1172cf43"]]);export{Z as default};
//# sourceMappingURL=DashPreview.d490d201.js.map
