import{d as _,K as g,b as i,c as w,z as t,t as d,D as p,F as D,J as k,H as I,q as P}from"./registerWidgets.36cee80e.js";import{D as b,m as q}from"./DashPlayer.4897b84a.js";import{L as x}from"./CircularLoading.4d896bc6.js";import{r as B}from"./index.55bb3732.js";import{B as R}from"./BackButton.00ae3eae.js";import{a as m}from"./asyncComputed.db02d47d.js";import{D as C}from"./dashes.3894792c.js";import{W as F}from"./workspaces.f9e88f87.js";import"./runnerData.5e542713.js";import"./executeJs.47b7eb0e.js";import"./PlayerNavbar.dd1f0506.js";import"./icons.ec70ef26.js";import"./WidgetsFrame.4297a714.js";import"./colors.b5cdee47.js";import"./Modal.47c65320.js";import"./passwordlessManager.3acb888f.js";import"./pubsub.53791b0c.js";import"./Passwordless.00a2f414.js";import"./lottie.860c5500.js";import"./activeRecord.650b5598.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]="c9cf14f0-21d3-42d4-97c7-d315c0071c66",s._sentryDebugIdIdentifier="sentry-dbid-c9cf14f0-21d3-42d4-97c7-d315c0071c66")}catch{}})();const E=_({__name:"DashPreview",setup(s){const r=k(),o=I(),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:c}=m(()=>F.get()),u=g(()=>{if(!a.value||!c.value||!a.value.makeRunnerData(c.value))return null;const e=q(a.value.makeRunnerData(c.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(),d(x,{key:0,class:"loading",justify:"center"})):p("",!0),t(u)?(i(),d(b,{key:1,class:"player",dash:t(u).runnerData,"widgets-with-errors":[],"is-preview":!0,params:t(r).query,"dash-player-service":t(u),onNavigate:l},null,8,["dash","params","dash-player-service"])):p("",!0),t(a)?(i(),d(R,{key:2,onExitFullscreenPreview:f})):p("",!0)],64))}});const Z=P(E,[["__scopeId","data-v-7fc555dd"]]);export{Z as default};
//# sourceMappingURL=DashPreview.99a785e0.js.map
