import{F as I,r as R,g as B,R as P}from"./FormRunner.09b692ed.js";import{d as q,eB as x,eA as F,F as D,H as i,G as y,u as p,b as s,ev as u,f as E,c as S,eE as K,eF as L,e as c,v as N}from"./outputWidgets.31ce2d5c.js";import{u as v}from"./uuid.33b66bf0.js";import{a as A}from"./asyncComputed.7e3e21f4.js";import{L as C}from"./CircularLoading.edae9c88.js";import"./url.94a5ee71.js";import"./index.dcfaf8a5.js";import"./pubsub.2d9ab3f4.js";import"./icons.266b547d.js";import"./PlayerNavbar.44712d86.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.44699949.js";import"./WidgetsFrame.6ae6a4f6.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]="d1d032ab-3a23-47d7-8365-6f39be98d688",o._sentryDebugIdIdentifier="sentry-dbid-d1d032ab-3a23-47d7-8365-6f39be98d688")}catch{}})();const d=o=>(K("data-v-1e2a2c24"),o=o(),L(),o),T={key:0,class:"loading"},V={key:1,class:"error"},G=d(()=>c("h1",null,"Oops! Something went wrong",-1)),H=d(()=>c("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=d(()=>c("h1",null,"Page not found",-1)),M=d(()=>c("p",null,"The page you requested could not be found.",-1)),Q=[J,M],U=q({__name:"Player",setup(o){const t=x(),l=F(),_=D({playerKey:v()});i(t,()=>w());function h(e,a){R("player",l,e,a)}const g=({path:e})=>{l.push({name:"player",query:t.query,params:{path:e.split("/")}})},f=async()=>{_.playerKey=v()};i([()=>t.path,()=>t.query],()=>f());const{loading:b,result:r,error:k,refetch:w}=A(()=>{var e;return B((e=t.path.slice(1))!=null?e:"")}),m=y(()=>n.value?P.create(n.value.id):null),n=y(()=>{var e,a;return(a=(e=r.value)==null?void 0:e.form)!=null?a:null});return i(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(),u("div",T,[E(C)])):p(k)?(s(),u("div",V,O)):n.value&&m.value?(s(),u("div",j,[(s(),S(I,{key:_.playerKey,class:"player",form:n.value,"is-preview":!1,params:p(t).query,broker:m.value,"enable-auto-focus":!0,onNavigate:g,onLogout:f,onRedirect:h},null,8,["form","params","broker"]))])):(s(),u("div",z,Q))}});const ue=N(U,[["__scopeId","data-v-1e2a2c24"]]);export{ue as default};
//# sourceMappingURL=Player.de6f916e.js.map
