import{F as I,r as R,R as B}from"./FormRunner.7673ea58.js";import{d as P,eB as q,eA as x,G as D,J as p,H as y,u as d,b as s,ev as c,f as E,c as F,eE as S,eF as K,e as i,v as L}from"./outputWidgets.84fe9cdf.js";import{u as h}from"./uuid.62cb32cd.js";import{a as N}from"./asyncComputed.6b982433.js";import{g as A}from"./api.0b487b10.js";import{L as C}from"./CircularLoading.da6d195c.js";import"./url.8de5cd7a.js";import"./Passwordless.94310c84.js";import"./index.72d3c468.js";import"./pubsub.e099f5f1.js";import"./icons.fb80f0dd.js";import"./PlayerNavbar.bb0f21f0.js";import"./ActionButton.e689c3e2.js";import"./WidgetsFrame.bef91c2b.js";import"./index.69c8862c.js";import"./Base.3448c1ef.js";import"./Link.10affec7.js";import"./Paragraph.7a7aafbc.js";import"./Text.6c3b9f60.js";import"./Title.59475fea.js";import"./Card.b3863c0d.js";import"./TabPane.dfbe23a9.js";import"./hasIn.892e96d0.js";import"./runnerData.17301334.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]="6511cd86-0ae3-42b7-8759-f0c6ca1cb901",o._sentryDebugIdIdentifier="sentry-dbid-6511cd86-0ae3-42b7-8759-f0c6ca1cb901")}catch{}})();const u=o=>(S("data-v-485e3719"),o=o(),K(),o),T={key:0,class:"loading"},V={key:1,class:"error"},G=u(()=>i("h1",null,"Oops! Something went wrong",-1)),H=u(()=>i("p",null,"An unknown error ocurred. Please try again or contact support.",-1)),J=[G,H],O={key:2,class:"form"},j={key:3,class:"error not-found",style:{height:"100vh"}},z=u(()=>i("h1",null,"Page not found",-1)),M=u(()=>i("p",null,"The page you requested could not be found.",-1)),Q=[z,M],U=P({__name:"Player",setup(o){const t=q(),l=x(),m=D({playerKey:h()});p(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("/")}})},_=async()=>{m.playerKey=h()};p([()=>t.path,()=>t.query],()=>_());const{loading:b,result:r,error:k,refetch:w}=N(()=>{var e;return A((e=t.path.slice(1))!=null?e:"")}),f=y(()=>n.value?B.create(n.value.id):null),n=y(()=>{var e,a;return(a=(e=r.value)==null?void 0:e.form)!=null?a:null});return p(r,()=>{var e;!r.value||r.value.form&&(document.title=(e=r.value.form.welcomeTitle)!=null?e:r.value.form.title)}),(e,a)=>d(b)?(s(),c("div",T,[E(C)])):d(k)?(s(),c("div",V,J)):n.value&&f.value?(s(),c("div",O,[(s(),F(I,{key:m.playerKey,class:"player",form:n.value,"is-preview":!1,params:d(t).query,broker:f.value,"enable-auto-focus":!0,onNavigate:g,onLogout:_,onRedirect:v},null,8,["form","params","broker"]))])):(s(),c("div",j,Q))}});const ge=L(U,[["__scopeId","data-v-485e3719"]]);export{ge as default};
//# sourceMappingURL=Player.4bf426f2.js.map
