import{r as b,m as S}from"./index.00103e26.js";import{u as k}from"./uuid.d605f964.js";import{F as B,R as K}from"./broker.edfeca40.js";import{d as E,eA as N,ez as F,H as L,K as m,J as y,u,b as s,et as n,f as A,c as w,eD as C,eE as T,e as i,x as V}from"./outputWidgets.c072fe4e.js";import{D as z,m as H}from"./DashPlayer.74f2acef.js";import{a as J}from"./asyncComputed.376cdc00.js";import{L as O}from"./CircularLoading.1db5d4d0.js";import"./index.ad809a50.js";import"./pubsub.98ad9fe0.js";import"./executeJs.9d1a076f.js";import"./icons.158b4825.js";import"./PlayerNavbar.26f9089b.js";import"./Steps.1df0e634.js";import"./Modal.dfafcf8c.js";import"./WidgetsFrame.6a9a3802.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.abbded52.js";import"./geometryUtils.c951785a.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[a]="a31c3868-2737-48bc-8cfa-c87193026606",o._sentryDebugIdIdentifier="sentry-dbid-a31c3868-2737-48bc-8cfa-c87193026606")}catch{}})();const d=o=>(C("data-v-b3aa3ca3"),o=o(),T(),o),j={key:0,class:"loading"},G={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,$],ae=E({__name:"Player",setup(o){const a=N(),c=F(),p=L({playerKey:k()});m(a,()=>R());function I(e,t){b("player",c,e,t)}const _=({path:e})=>{c.push({name:"player",query:a.query,params:{path:e.split("/")}})},f=async()=>{p.playerKey=k()};m([()=>a.path,()=>a.query],()=>f());const{loading:P,result:r,error:D,refetch:R}=J(()=>{var e;return S((e=a.path.slice(1))!=null?e:"")}),h=y(()=>l.value?K.create({formPath:l.value.path}):null),l=y(()=>{var e,t;return(t=(e=r.value)==null?void 0:e.form)!=null?t:null}),v=y(()=>{var t,g;if(!((t=r.value)!=null&&t.dash))return null;const e=H((g=r.value)==null?void 0:g.dash);return e.onRedirect(({url:q,queryParams:x})=>b("player",c,q,x)),e});return m(r,()=>{var e;!r.value||(r.value.form?document.title=(e=r.value.form.welcomeTitle)!=null?e:r.value.form.title:r.value.dash&&(document.title=r.value.dash.title))}),(e,t)=>u(P)?(s(),n("div",j,[A(O)])):u(D)?(s(),n("div",G,U)):l.value&&h.value?(s(),n("div",W,[(s(),w(B,{key:p.playerKey,class:"player",form:l.value,"is-preview":!1,params:u(a).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(),w(z,{key:p.playerKey,class:"player","is-preview":!1,params:u(a).query,"dash-player-service":v.value,onNavigate:_},null,8,["params","dash-player-service"]))])):(s(),n("div",Y,ee))}});const ge=V(ae,[["__scopeId","data-v-b3aa3ca3"]]);export{ge as default};
//# sourceMappingURL=Player.7f0402cf.js.map
