import{F as I,r as R,g as B,R as P}from"./FormRunner.3fc094b1.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 a,ev as u,f as E,c as S,eE as K,eF as L,e as c,v as N}from"./outputWidgets.3c34606b.js";import{u as h}from"./uuid.b42ed8a7.js";import{a as A}from"./asyncComputed.8707f293.js";import{L as C}from"./CircularLoading.792dec2b.js";import"./url.425cd9cb.js";import"./index.8371fc8b.js";import"./pubsub.28c1e0e3.js";import"./icons.e6ec075a.js";import"./PlayerNavbar.693b2c9f.js";import"./ActionButton.824a913a.js";import"./WidgetsFrame.d41b3dad.js";import"./index.27ec4e95.js";import"./Card.b797d31c.js";import"./TabPane.71fe903b.js";import"./hasIn.01f4de81.js";import"./index.b57ed653.js";import"./Text.aa4a1cf1.js";import"./Link.84770fdd.js";import"./Title.f4855332.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]="6dc4bb65-462c-4e1e-9926-64ef2de9a3d0",o._sentryDebugIdIdentifier="sentry-dbid-6dc4bb65-462c-4e1e-9926-64ef2de9a3d0")}catch{}})();const i=o=>(K("data-v-485e3719"),o=o(),L(),o),T={key:0,class:"loading"},V={key:1,class:"error"},G=i(()=>c("h1",null,"Oops! Something went wrong",-1)),H=i(()=>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",style:{height:"100vh"}},J=i(()=>c("h1",null,"Page not found",-1)),M=i(()=>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(),m=D({playerKey:h()});d(t,()=>w());function v(e,s){R("player",l,e,s)}const g=({path:e})=>{l.push({name:"player",query:t.query,params:{path:e.split("/")}})},_=async()=>{m.playerKey=h()};d([()=>t.path,()=>t.query],()=>_());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,s;return(s=(e=r.value)==null?void 0:e.form)!=null?s: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,s)=>p(b)?(a(),u("div",T,[E(C)])):p(k)?(a(),u("div",V,O)):n.value&&f.value?(a(),u("div",j,[(a(),S(I,{key:m.playerKey,class:"player",form:n.value,"is-preview":!1,params:p(t).query,broker:f.value,"enable-auto-focus":!0,onNavigate:g,onLogout:_,onRedirect:v},null,8,["form","params","broker"]))])):(a(),u("div",z,Q))}});const fe=N(U,[["__scopeId","data-v-485e3719"]]);export{fe as default};
//# sourceMappingURL=Player.11313923.js.map
