import{F as I,r as P,g as R,R as B}from"./FormRunner.d218574f.js";import{d as q,eB as x,eA as F,F as D,H as d,G as y,u as p,b as s,eu as c,f as E,c as S,eE as K,eF as L,e as u,t as N}from"./outputWidgets.0ed3a637.js";import{u as h}from"./uuid.7efcaa1f.js";import{a as A}from"./asyncComputed.054ae312.js";import{L as C}from"./CircularLoading.f2d3d654.js";import"./url.4f7be002.js";import"./index.7da893da.js";import"./pubsub.5dd4605f.js";import"./icons.8d5441dc.js";import"./PlayerNavbar.ab1b958b.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.462b1e98.js";import"./WidgetsFrame.9a5a2429.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="a3e5c2b7-41c6-4490-9d17-c4df8f8c525e",o._sentryDebugIdIdentifier="sentry-dbid-a3e5c2b7-41c6-4490-9d17-c4df8f8c525e")}catch{}})();const l=o=>(K("data-v-17cbf78c"),o=o(),L(),o),T={key:0,class:"loading"},V={key:1,class:"error"},G=l(()=>u("h1",null,"Oops! Something went wrong",-1)),H=l(()=>u("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),O=[G,H],j={key:2,class:"form"},z={key:3,class:"error not-found"},J=l(()=>u("h1",null,"Page not found",-1)),M=l(()=>u("p",null,"The page you requested could not be found.",-1)),Q=[J,M],U=q({__name:"Player",setup(o){const t=x(),i=F(),f=D({playerKey:h()});d(t,()=>w());function v(e,a){P("player",i,e,a)}const g=({path:e})=>{i.push({name:"player",query:t.query,params:{path:e.split("/")}})},_=async()=>{f.playerKey=h()};d([()=>t.path,()=>t.query],()=>_());const{loading:b,result:r,error:k,refetch:w}=A(()=>{var e;return R((e=t.path.slice(1))!=null?e:"")}),m=y(()=>n.value?B.create({formPath:n.value.path}):null),n=y(()=>{var e,a;return(a=(e=r.value)==null?void 0:e.form)!=null?a:null});return d(r,()=>{var e;!r.value||r.value.form&&(document.title=(e=r.value.form.welcomeTitle)!=null?e:r.value.form.title)}),(e,a)=>p(b)?(s(),c("div",T,[E(C)])):p(k)?(s(),c("div",V,O)):n.value&&m.value?(s(),c("div",j,[(s(),S(I,{key:f.playerKey,class:"player",form:n.value,"is-preview":!1,params:p(t).query,broker:m.value,"enable-auto-focus":!0,onNavigate:g,onLogout:_,onRedirect:v},null,8,["form","params","broker"]))])):(s(),c("div",z,Q))}});const ce=N(U,[["__scopeId","data-v-17cbf78c"]]);export{ce as default};
//# sourceMappingURL=Player.4e6ca85e.js.map
