import{r as b,m as x}from"./index.afe47008.js";import{u as k}from"./uuid.9b12df3f.js";import{F as B,R as K}from"./broker.8b121cd9.js";import{d as L,K as N,J as E,w as F,a1 as m,L as y,A as c,b as s,c as n,e as A,u as w,Q as C,R as T,y as i,t as V}from"./registerWidgets.2f354556.js";import{D as J,m as O}from"./DashPlayer.813c0f29.js";import{a as Q}from"./asyncComputed.7c1b85ba.js";import{L as j}from"./CircularLoading.f70f248e.js";import"./passwordlessManager.96ab3f5a.js";import"./pubsub.cb65003c.js";import"./Passwordless.1cb3171a.js";import"./icons.1cdfa11b.js";import"./executeJs.27fe2afb.js";import"./PlayerNavbar.bedaf2b3.js";import"./Steps.74e2104a.js";import"./Modal.55b06151.js";import"./WidgetsFrame.ade6550a.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.ab6c6d5f.js";import"./lottie.61602e49.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]="e08da542-e6d8-4eaa-a10c-1da179f3b995",o._sentryDebugIdIdentifier="sentry-dbid-e08da542-e6d8-4eaa-a10c-1da179f3b995")}catch{}})();const d=o=>(C("data-v-b3aa3ca3"),o=o(),T(),o),z={key:0,class:"loading"},G={key:1,class:"error"},H=d(()=>i("h1",null,"Oops! Something went wrong",-1)),M=d(()=>i("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),U=[H,M],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=L({__name:"Player",setup(o){const a=N(),l=E(),p=F({playerKey:k()});m(a,()=>D());function I(e,t){b("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}=Q(()=>{var e;return x((e=a.path.slice(1))!=null?e:"")}),h=y(()=>u.value?K.create({formPath:u.value.path}):null),u=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=O((g=r.value)==null?void 0:g.dash);return e.onRedirect(({url:q,queryParams:S})=>b("player",l,q,S)),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)=>c(P)?(s(),n("div",z,[A(j)])):c(R)?(s(),n("div",G,U)):u.value&&h.value?(s(),n("div",W,[(s(),w(B,{key:p.playerKey,class:"player",form:u.value,"is-preview":!1,params:c(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(J,{key:p.playerKey,class:"player","is-preview":!1,params:c(a).query,"dash-player-service":v.value,onNavigate:_},null,8,["params","dash-player-service"]))])):(s(),n("div",Y,ee))}});const be=V(ae,[["__scopeId","data-v-b3aa3ca3"]]);export{be as default};
//# sourceMappingURL=Player.f37427c3.js.map
