import{d as x,ez as B,ey as K,G as N,J as m,H as y,u,b as s,et as n,f as C,c as g,eC as E,eD as F,e as i,v as L}from"./outputWidgets.1739e6b5.js";import"./index.92715e30.js";import{r as k,g as T}from"./executeJs.3af85407.js";import{u as w}from"./uuid.5051bed8.js";import{F as V,R as z}from"./FormRunner.c57e1a19.js";import{D as A,m as G}from"./index.341bb3d6.js";import{a as H}from"./asyncComputed.b4d87a94.js";import{L as J}from"./CircularLoading.67a69d9a.js";import"./runnerData.f7d9251a.js";import"./url.8bddfe76.js";import"./icons.1c3e2bde.js";import"./index.3da0fea7.js";import"./pubsub.e4395938.js";import"./PlayerNavbar.9236d56f.js";import"./Steps.bfd262de.js";import"./WidgetsFrame.88941503.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.56b61238.js";import"./geometryUtils.aedc4dba.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[r]="98c99d96-0069-436b-b98b-331eebc2d18e",o._sentryDebugIdIdentifier="sentry-dbid-98c99d96-0069-436b-b98b-331eebc2d18e")}catch{}})();const d=o=>(E("data-v-b3aa3ca3"),o=o(),F(),o),O={key:0,class:"loading"},j={key:1,class:"error"},M=d(()=>i("h1",null,"Oops! Something went wrong",-1)),Q=d(()=>i("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),U=[M,Q],W={key:2,class:"form"},X={key:3,class:"dash-wrapper"},Y={key:4,class:"error not-found"},Z=d(()=>i("h1",null,"Page not found",-1)),$=d(()=>i("p",null,"The page you requested could not be found.",-1)),ee=[Z,$],re=x({__name:"Player",setup(o){const r=B(),l=K(),p=N({playerKey:w()});m(r,()=>R());function I(e,t){k("player",l,e,t)}const _=({path:e})=>{l.push({name:"player",query:r.query,params:{path:e.split("/")}})},f=async()=>{p.playerKey=w()};m([()=>r.path,()=>r.query],()=>f());const{loading:P,result:a,error:D,refetch:R}=H(()=>{var e;return T((e=r.path.slice(1))!=null?e:"")}),h=y(()=>c.value?z.create({formPath:c.value.path}):null),c=y(()=>{var e,t;return(t=(e=a.value)==null?void 0:e.form)!=null?t:null}),v=y(()=>{var t,b;if(!((t=a.value)!=null&&t.dash))return null;const e=G((b=a.value)==null?void 0:b.dash);return e.onRedirect(({url:q,queryParams:S})=>k("player",l,q,S)),e});return m(a,()=>{var e;!a.value||(a.value.form?document.title=(e=a.value.form.welcomeTitle)!=null?e:a.value.form.title:a.value.dash&&(document.title=a.value.dash.title))}),(e,t)=>u(P)?(s(),n("div",O,[C(J)])):u(D)?(s(),n("div",j,U)):c.value&&h.value?(s(),n("div",W,[(s(),g(V,{key:p.playerKey,class:"player",form:c.value,"is-preview":!1,params:u(r).query,broker:h.value,"enable-auto-focus":!0,onNavigate:_,onLogout:f,onRedirect:I},null,8,["form","params","broker"]))])):v.value?(s(),n("div",X,[(s(),g(A,{key:p.playerKey,class:"player","is-preview":!1,params:u(r).query,"dash-player-service":v.value,onNavigate:_},null,8,["params","dash-player-service"]))])):(s(),n("div",Y,ee))}});const ge=L(re,[["__scopeId","data-v-b3aa3ca3"]]);export{ge as default};
//# sourceMappingURL=Player.6967362f.js.map
