import{F as I,r as R,g as P,R as q}from"./FormRunner.b3d2b489.js";import{d as x,eA as B,ez as D,F as E,H as i,G as y,u as p,b as s,eu as u,f as F,c as S,eD as K,eE as L,e as c,t as N}from"./outputWidgets.723dbd35.js";import{u as h}from"./uuid.0c37592d.js";import{a as A}from"./asyncComputed.6087fd05.js";import{L as C}from"./CircularLoading.21635bcf.js";import"./url.c8598ea1.js";import"./index.5a48ff75.js";import"./pubsub.97441533.js";import"./icons.d199659e.js";import"./PlayerNavbar.a21a0d16.js";import"./ActionButton.vue_vue_type_script_setup_true_lang.b7e285dc.js";import"./WidgetsFrame.17930203.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]="e4900da9-30d5-4773-8283-859ad901ae96",o._sentryDebugIdIdentifier="sentry-dbid-e4900da9-30d5-4773-8283-859ad901ae96")}catch{}})();const d=o=>(K("data-v-1e2a2c24"),o=o(),L(),o),T={key:0,class:"loading"},V={key:1,class:"error"},z=d(()=>c("h1",null,"Oops! Something went wrong",-1)),G=d(()=>c("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),H=[z,G],O={key:2,class:"form"},j={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=x({__name:"Player",setup(o){const t=B(),l=D(),_=E({playerKey:h()});i(t,()=>w());function v(e,a){R("player",l,e,a)}const g=({path:e})=>{l.push({name:"player",query:t.query,params:{path:e.split("/")}})},m=async()=>{_.playerKey=h()};i([()=>t.path,()=>t.query],()=>m());const{loading:k,result:r,error:b,refetch:w}=A(()=>{var e;return P((e=t.path.slice(1))!=null?e:"")}),f=y(()=>n.value?q.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(k)?(s(),u("div",T,[F(C)])):p(b)?(s(),u("div",V,H)):n.value&&f.value?(s(),u("div",O,[(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(),u("div",j,Q))}});const ue=N(U,[["__scopeId","data-v-1e2a2c24"]]);export{ue as default};
//# sourceMappingURL=Player.9184d7f9.js.map
