import{r as g,m as B}from"./index.ba76e763.js";import{u as k}from"./uuid.5562c163.js";import{F as S,R as E}from"./broker.b05c3be4.js";import{d as F,ey as K,ex as N,E as C,G as m,F as y,bu as u,b as s,c as n,e as L,u as w,eB as T,eC as V,er as i,t as A}from"./registerWidgets.d68712f0.js";import{D as G,m as O}from"./DashPlayer.49110b1f.js";import{a as j}from"./asyncComputed.f9ea598c.js";import{L as z}from"./CircularLoading.3dc537f5.js";import"./passwordlessManager.36ac2e38.js";import"./pubsub.5d7eaeae.js";import"./Passwordless.4c10fad4.js";import"./icons.24d45fbf.js";import"./executeJs.d912d6e8.js";import"./PlayerNavbar.b92fdfe8.js";import"./Steps.c8a993da.js";import"./Modal.b6d9a624.js";import"./WidgetsFrame.0ac81da1.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.2d629984.js";import"./lottie.2b6a117e.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]="38414ca7-1758-434a-b873-46bdc793a259",o._sentryDebugIdIdentifier="sentry-dbid-38414ca7-1758-434a-b873-46bdc793a259")}catch{}})();const d=o=>(T("data-v-b3aa3ca3"),o=o(),V(),o),H={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,$],ae=F({__name:"Player",setup(o){const a=K(),l=N(),p=C({playerKey:k()});m(a,()=>D());function I(e,t){g("player",l,e,t)}const _=({path:e})=>{l.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:R,refetch:D}=j(()=>{var e;return B((e=a.path.slice(1))!=null?e:"")}),h=y(()=>c.value?E.create({formPath:c.value.path}):null),c=y(()=>{var e,t;return(t=(e=r.value)==null?void 0:e.form)!=null?t:null}),v=y(()=>{var t,b;if(!((t=r.value)!=null&&t.dash))return null;const e=O((b=r.value)==null?void 0:b.dash);return e.onRedirect(({url:q,queryParams:x})=>g("player",l,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",H,[L(z)])):u(R)?(s(),n("div",J,U)):c.value&&h.value?(s(),n("div",W,[(s(),w(S,{key:p.playerKey,class:"player",form:c.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(G,{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=A(ae,[["__scopeId","data-v-b3aa3ca3"]]);export{ge as default};
//# sourceMappingURL=Player.4772a3c1.js.map
