import{d as _,K as g,b as i,c as w,z as t,t as c,D as p,F as D,J as b,H as k,q as I}from"./registerWidgets.60bba559.js";import{D as P,m as q}from"./DashPlayer.f85774c5.js";import{L as x}from"./CircularLoading.0edb8bc0.js";import{r as B}from"./index.7e7f8bb2.js";import{B as R}from"./BackButton.dc0ff5f7.js";import{a as m}from"./asyncComputed.d00a688c.js";import{D as C}from"./dashes.779de008.js";import{W as F}from"./workspaces.46f8580e.js";import"./runnerData.178be36e.js";import"./executeJs.263d8eb0.js";import"./PlayerNavbar.d70763bf.js";import"./icons.86798a2e.js";import"./WidgetsFrame.c566de3c.js";import"./colors.472988d2.js";import"./Modal.8fbea10f.js";import"./passwordlessManager.e1b568b1.js";import"./pubsub.6df2423b.js";import"./Passwordless.4a584300.js";import"./lottie.fd5d7b21.js";import"./activeRecord.5794d4d2.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="55d25be5-355c-400e-9765-65b6d1d3bf2c",s._sentryDebugIdIdentifier="sentry-dbid-55d25be5-355c-400e-9765-65b6d1d3bf2c")}catch{}})();const E=_({__name:"DashPreview",setup(s){const r=b(),o=k(),l=({id:e,type:n})=>{n==="dash"?(o.push({name:"dashPreview",params:{dashId:e},query:r.query}),y()):o.push({name:"form-preview",params:{formId:e},query:r.query})},f=()=>{var e;!((e=a.value)!=null&&e.path)||o.push(`/_editor/dash/${encodeURIComponent(a.value.path)}`)},{loading:h,result:a,refetch:y}=m(()=>C.get(r.params.dashPath)),{result:u}=m(()=>F.get()),d=g(()=>{if(!a.value||!u.value||!a.value.makeRunnerData(u.value))return null;const e=q(a.value.makeRunnerData(u.value));return e.onRedirect(({url:n,queryParams:v})=>B(o,n,v)),e});return(e,n)=>(i(),w(D,null,[t(h)||!t(a)?(i(),c(x,{key:0,class:"loading",justify:"center"})):p("",!0),t(d)?(i(),c(P,{key:1,class:"player",dash:t(d).runnerData,"widgets-with-errors":[],"is-preview":!0,params:t(r).query,"dash-player-service":t(d),onNavigate:l},null,8,["dash","params","dash-player-service"])):p("",!0),t(a)?(i(),c(R,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-7fc555dd"]]);export{Z as default};
//# sourceMappingURL=DashPreview.3c1e851e.js.map
