import{F as I,r as R,g as B,R as P}from"./FormRunner.a4e7a114.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.e60ab380.js";import{u as h}from"./uuid.7f431524.js";import{a as A}from"./asyncComputed.7ba647bd.js";import{L as C}from"./CircularLoading.66402ee5.js";import"./url.7bd60adc.js";import"./index.53f53d9a.js";import"./pubsub.e6733ea4.js";import"./icons.6c1915db.js";import"./PlayerNavbar.e70c8590.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.4c33d962.js";import"./WidgetsFrame.e51c5602.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]="d5bb0132-4e67-4365-adce-2950b3c8e535",o._sentryDebugIdIdentifier="sentry-dbid-d5bb0132-4e67-4365-adce-2950b3c8e535")}catch{}})();const l=o=>(K("data-v-1e2a2c24"),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(),_=D({playerKey:h()});d(t,()=>w());function v(e,a){R("player",i,e,a)}const g=({path:e})=>{i.push({name:"player",query:t.query,params:{path:e.split("/")}})},m=async()=>{_.playerKey=h()};d([()=>t.path,()=>t.query],()=>m());const{loading:b,result:r,error:k,refetch:w}=A(()=>{var e;return B((e=t.path.slice(1))!=null?e:"")}),f=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 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&&f.value?(s(),c("div",j,[(s(),S(I,{key:_.playerKey,class:"player",form:n.value,"is-preview":!1,params:p(t).query,broker:f.value,"enable-auto-focus":!0,onNavigate:g,onLogout:m,onRedirect:v},null,8,["form","params","broker"]))])):(s(),c("div",z,Q))}});const ce=N(U,[["__scopeId","data-v-1e2a2c24"]]);export{ce as default};
//# sourceMappingURL=Player.84865214.js.map
