PageSourceSearch

https://axethrowing.org/assets/siteTournamentView-P0y1_Dkv.js

js axethrowing.org collected 2026-09-24 11:39:11 UTC 12,589 bytes, 1 lines download raw bytes

1import{_ as e,a6 as a,u as t,Y as n,j as l,k as o,aj as s,a3 as u,c as r,d as i,M as c,N as d,w as v,b as p,ah as m,o as y,a as g,e as f,t as h,m as k,q as w,f as b,z as _,a4 as j,n as I,r as S,a8 as x,x as P,F as q,a5 as C,ao as D,h as O,Q as R,R as M,S as U,G as V,ad as E,an as T,ai as A,W as B,U as N,T as L,a2 as Y,g as K}from"./index-Ce7SucYs.js";import{e as z}from"./eventView-DVkLufTt.js";import{C as G}from"./customInputNew-DM09SYs4.js";import{c as F}from"./chatModal-IaQCAYCg.js";import H from"./eventLeaderboard-BFyPyodx.js";import"./matchups-CDBubqWl.js";import"./customBottomSheet-BzflKq5Q.js";import"./setVenueTvLanes-uZOUXGfW.js";import"./weekGames-B8cMz4QO.js";import"./leaderboard-c2AgqqnP.js";/* empty css                                                                    */import"./playoffsNew-B5qyCTOF.js";import"./playoffScheduling-DsOlMh5P.js";import"./playoffDualsScheduling-BT5t4jji.js";import"./tw-BqCbVyhq.js";import"./fakePlayerStats-Q6QnCMKK.js";import"./newroundrobin-BHDkF8ZS.js";import"./chat-BmFKllQV.js";import"./online-BNjGkuKj.js";import"./customSearch-DBtjzLw0.js";import"./onlinePlayers-BJg_aUR-.js";import"./rating-wecbD98B.js";const J={class:"newContainer my-5"},W={key:0,class:"tournamentButton"},Q={key:1},X={key:2},Z={key:3},$={key:1,class:"tournamentButton"},ee={key:1},ae={key:2},te={key:3},ne={key:0},le={key:1},oe={class:"successIcon"},se=e({__name:"siteTournamentView",props:{leagueID:String,locationSlug:String},setup(e){const se=D("postHog"),{notify:ue}=T();let re=a(!1),ie=a(!1);const ce=t(),de=n(),ve=l();o();const pe=s(),me=i(),ye=p(),ge=e;let fe=u(""),he=u(!1),ke=r(()=>ce.tournamentsAll),we=u(de.selectedEvent.players),be=a(!1),_e=u(null);const je=r(()=>{var e;return"duals-league"===(null==(e=Se.value)?void 0:e.leagueType)}),Ie=r(()=>{var e,a;return(null==(e=Se.value)?void 0:e.chatId)&&(null==(a=Se.value)?void 0:a.chatIsAvailable)&&pe.userIsChatMember});let Se=r(()=>{if("explore"===me.currentRoute.value.query.tournamentStatus){const e=c("/venues/"+me.currentRoute.value.query.tournamentVenue+"/event-list/tournament/"+me.currentRoute.value.query.tournamentId);return d(e,e=>{e.exists()&&(_e.value={...e.val(),venue:me.currentRoute.value.query.tournamentVenue})},{onlyOnce:!0}),_e.value}return Object.keys(de.selectedEvent).length?de.selectedEvent:ke.value.find(e=>e.slug===ge.leagueID)?ke.value.find(e=>e.slug===ge.leagueID):null});const xe=r(()=>{var e,a;return je.value?!(null==(e=[...we.value||[]].find(e=>Object.keys(e.player||{}).includes(ve.user.code)))?void 0:e.gp):!(null==(a=[...we.value||[]].find(e=>e.code===ve.user.code))?void 0:a.gp)}),Pe=r(()=>xe.value&&!de.selectedEventWeeks.some(e=>e.completed)),qe=r(()=>{if(je.value){let e=[];return[...we.value||[]].forEach(a=>e=[...e,...Object.keys(a.player)]),e.includes(ve.user[".key"])}return[...we.value||[]].some(e=>e.code===ve.user.code)}),Ce=r(()=>je.value?Object.values(de.pendingParticipants||{}).find(e=>e.player1Key===ve.user[".key"]||e.player2Key===ve.user[".key"]):de.pendingParticipants.hasOwnProperty(ve.user[".key"]));function De(){var e;O(Oe,"Are you sure you want to leave '".concat((null==(e=Se.value)?void 0:e.title)||"event","'?"),"info","Leave",!0)}function Oe(){var e;const a=ce.venue[".key"],t=Se.value.slug,n=Se.value.currentSeason;let l=ve.user[".key"];const o=ve.user[".key"],s=[];je.value&&(l=null==(e=[...we.value||[]].find(e=>Object.keys(e.player||{}).includes(o)))?void 0:e[".key"],s.push(N(L("/venues/".concat(a,"/league/").concat(t,"/").concat(n,"/teams/").concat(l))))),s.push(N(L("/venues/".concat(a,"/league/").concat(t,"/").concat(n,"/standings/").concat(l)))),s.push(N(V("/".concat(Se.value.rules,"/players-career/").concat(l,"/").concat(Se.value.type.toLowerCase(),"/").concat(t,"-").concat(n)))),Promise.all(s).then(()=>{we.value=we.value.filter(e=>e[".key"]!==l),ve.getPlayerCareer(o)}).catch(e=>{console.error("Error leaving event: ",e),ue({group:"notifyMessages",type:"error",title:"Error leaving event",text:"There was a problem leaving the event. Please try again.",duration:4e3})})}function Re(){d(R(V("/teams"),U("code"),M(fe.value.toUpperCase())),e=>{if(e.exists()){const a=e.val(),t=Object.keys(a)[0],{player1Key:n,player2Key:l,name:o,code:s}=a[t];if(![n,l].includes(ve.user[".key"]))return ue({group:"notifyMessages",type:"error",title:"You aren't a member of '".concat(o,"(").concat(s,")' team"),text:"Please choose another team code which you belong to",duration:4e3}),void(fe.value="");Le.value?Ve(t):Ue(t,a[t],!0),ie.value=!1}else ue({group:"notifyMessages",type:"error",title:"Team with code '".concat(fe.value,"' not found"),text:"Please write correct team code or choose another one",duration:4e3})})}function Me(){localStorage.setItem("redirect_path",JSON.stringify({path:ye.fullPath,expire:Date.now()+36e5})),me.push({path:"/login"})}function Ue(e,a={},t=!1){Se.value.registerApproval?O(()=>function(e,a,t=!1){let n=t?{pic:a.logo,...a,email:ve.user.email}:{division:a.division||"amateur",pic:a.pic,first:a.first,last:a.last,alias:a.alias,email:a.email};Y(L("/venues/".concat(ce.venue[".key"],"/league/").concat(Se.value.slug,"/").concat(Se.value.currentSeason,"/pendingParticipants/").concat(e)),{code:a.code,key:e,...n})}(e,a,t),"Registration for '".concat(Se.value.title,"' is required admin approval. Once admin a
1pprove you you will be added to the event"),"info","Procced"):(he.value=!0,A(e,ve.user.email,ge.locationSlug,ge.leagueID,"tournament").then(()=>{O(()=>window.location.reload(),"You’ve successfully registered for the event!","info","Ok",!0)}).catch(e=>{ue({group:"notifyMessages",type:"error",title:"Something went wrong",text:e.response.data.message,duration:4e3})}).finally(()=>{he.value=!1}))}function Ve(e){he.value=!0;const{title:a,slug:t,price:n=100,tax:l=0}=Se.value,{stripeConnectedAccountId:o}=ce.venue;E.post("".concat("https://us-central1-forged-7adb7.cloudfunctions.net","/stripeConnect/createCheckoutSession"),{returnUrl:ye.fullPath,price:+n,tax:+l,accountId:o,playerId:e,playerEmail:ve.user.email,eventData:{name:a,slug:t,venue:ge.locationSlug}}).then(e=>{window.location.replace(e.data.url)}).catch(e=>{ue({group:"notifyMessages",type:"error",title:"Something went wrong",text:e.response.data.message,duration:4e3})}).finally(()=>{he.value=!1})}async function Ee(e=!1){var a;let t=e?"tournament_sign_up":"tournament_register";if(se.capture(t,{tournament:Se.value.title}),g.currentUser)if(je.value)ie.value=!0;else if(ve.user[".key"])e?Ve(ve.user[".key"]):Ue(ve.user[".key"],ve.user);else{const a=await async function(e){const a=R(V("/watl/players"),U("email"),M(e));return await B(a).then(e=>Object.keys(e.val())[0])}(g.currentUser.email);e?Ve(a):Ue(a,ve.user)}else O(Me,"Please sign up or log in to register for '".concat((null==(a=Se.value)?void 0:a.title)||"","' tournament."),"info","Login")}function Te(){re.value=!1,Ae()}function Ae(){const e={...ye.query};delete e.session,me.push({path:ye.path,query:e})}v(()=>de.selectedEvent,(e,a)=>{Object.keys(e).length&&(null==e?void 0:e.slug)!==(null==a?void 0:a.slug)&&de.setSelectedEventPendingParticipants({venue:ge.locationSlug,league:e})},{immediate:!0}),v(()=>qe.value,e=>{var a;e&&(be.value=!1,window.localStorage.removeItem("tournament_".concat(null==(a=Se.value)?void 0:a.slug,"_signUpProcessing_").concat(g.currentUser.uid)))},{immediate:!0});const Be=r(()=>he.value||qe.value||["tournamentsRecent","tournamentsArchived"].includes(ye.query.tournamentStatus)||be.value),Ne=r(()=>{const e=Se.value.startRegistrationDate&&Se.value.endRegistrationDate,a=e&&m().isAfter(m(Se.value.startRegistrationDate))&&m().isBefore(m(Se.value.endRegistrationDate));return he.value||qe.value||Ce.value||e&&!a}),Le=r(()=>Se.value.signup&&"free"!==Se.value.signup),Ye=r(()=>!Le.value&&Se.value.selfRegisterAllowed);return v(()=>Se.value,e=>{(null==e?void 0:e.chatId)&&pe.loadChat(e.chatId),Object.keys(e||{}).length&&async function(e,a){let t=me.currentRoute.value.query.tournamentVenue?me.currentRoute.value.query.tournamentVenue:ce.venue[".key"];d(L("/venues/".concat(t,"/league/").concat(e,"/").concat(a,"/standings")),e=>{if(!e.exists())return;let a=Object.entries(e.val()).map(([e,a])=>({...a,".key":e}));a.sort((e,a)=>a.win-e.win),we.value=a})}(Se.value.slug,Se.value.currentSeason)},{immediate:!0}),y(async()=>{var e;ye.query.session&&"succeeded"===ye.query.session?(re.value=!0,function(){var e;be.value=!0,window.localStorage.setItem("tournament_".concat(null==(e=Se.value)?void 0:e.slug,"_signUpProcessing_").concat(g.currentUser.uid),"true")}()):ye.query.session&&"canceled"===ye.query.session&&Ae(),!qe.value&&window.localStorage.getItem("tournament_".concat(null==(e=Se.value)?void 0:e.slug,"_signUpProcessing_").concat(g.currentUser.uid))&&(be.value=!0)}),(e,a)=>{var t,n;const l=S("v-progress-circular"),o=S("v-icon"),s=S("v-card-text"),u=S("v-card-actions"),r=S("v-card"),i=S("v-dialog");return K(),f("div",J,[h("p",{class:"back",onClick:a[0]||(a[0]=e=>{me.push({path:"/"+ce.venue[".key"]+"/tournament",query:me.currentRoute.value.query})})},_("< Back to list of tournaments")),j(Se)?(K(),k(z,{key:0,event:j(Se),players:j(we)},{actions:I(()=>[Le.value?(K(),f("div",W,[b(x,{type:"submit",variant:"flat","min-width":"165px",onClick:a[1]||(a[1]=e=>Ee(!0)),disabled:Be.value},{default:I(()=>[j(he)?(K(),k(l,{key:0,color:"white",indeterminate:""})):qe.value?(K(),f("span",Q,"You have already signed up")):j(be)?(K(),f("span",X,"Processing")):(K(),f("span",Z,"sign up"))]),_:1},8,["disabled"])])):w("",!0),Ye.value?(K(),f("div",$,[qe.value&&Pe.value?(K(),k(x,{key:0,onClick:De,class:"joinButton ma-0 mb-2"},{default:I(()=>[...a[8]||(a[8]=[P("leave event",-1)])]),_:1})):(K(),f(q,{key:1},[b(x,{type:"submit",variant:"flat","min-width":"165px",onClick:a[2]||(a[2]=e=>Ee(!1)),disabled:Ne.value,class:"ma-0 mb-2"},{default:I(()=>[j(he)?(K(),k(l,{key:0,color:"white",indeterminate:""})):qe.value?(K(),f("span",ee,"You have already signed up")):j(be)?(K(),f("span",ae,"Processing")):(K(),f("span",te,"register"))]),_:1},8,["disabled"]),j(Se).startRegistrationDate&&j(Se).endRegistrationDate&&!Ce.value?(K(),f("p",ne," Registration open: "+_(j(m)(j(Se).startRegistrationDate).format("MMMM D"))+" - "+_(j(m)(j(Se).endRegistrationDate).format("MMMM D")),1
1)):w("",!0),Ce.value?(K(),f("p",le," Your registration request requires admin approval. Once approved, you will be added to the event. ")):w("",!0)],64))])):w("",!0)]),_:1},8,["event","players"])):w("",!0),b(F,{showChatButton:Ie.value,chatId:null==(t=j(Se))?void 0:t.chatId,currentUserId:null==(n=j(ve).user)?void 0:n[".key"],members:j(we)},null,8,["showChatButton","chatId","currentUserId","members"]),j(Se)?(K(),k(H,{key:1,leagueID:j(Se).slug,locationSlug:j(Se).venue||ge.locationSlug,source:"tournament"},null,8,["leagueID","locationSlug"])):w("",!0),b(i,{modelValue:j(re),"onUpdate:modelValue":a[4]||(a[4]=e=>C(re)?re.value=e:re=e),"max-width":"500"},{default:I(()=>[b(r,{tile:"",class:"paymentNotification d-flex flex-column align-center justify-center pa-5"},{default:I(()=>[h("button",{class:"closeIcon",onClick:a[3]||(a[3]=e=>C(re)?re.value=!1:re=!1)},[b(o,{size:"24"},{default:I(()=>[...a[9]||(a[9]=[P("mdi-close",-1)])]),_:1})]),h("div",oe,[b(o,{color:"white",class:"checkIcon"},{default:I(()=>[...a[10]||(a[10]=[P("mdi-check",-1)])]),_:1})]),b(s,null,{default:I(()=>[...a[11]||(a[11]=[h("p",{class:"notificationText"}
1," Thank you for your payment! Once it's processed, you'll be added to the tournament and receive an email notification. ",-1)])]),_:1}),b(u,{class:"buttons"},{default:I(()=>[b(x,{variant:"outlined",onClick:Te,class:"w-100"},{default:I(()=>[...a[12]||(a[12]=[P("Ok",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]),b(i,{modelValue:j(ie),"onUpdate:modelValue":a[7]||(a[7]=e=>C(ie)?ie.value=e:ie=e),"max-width":"500"},{default:I(()=>[b(r,{tile:"",class:"paymentNotification d-flex flex-column align-center justify-center pa-5"},{default:I(()=>[h("button",{class:"closeIcon",onClick:a[5]||(a[5]=e=>C(ie)?ie.value=!1:ie=!1)},[b(o,{size:"24"},{default:I(()=>[...a[13]||(a[13]=[P("mdi-close",-1)])]),_:1})]),b(s,null,{default:I(()=>[a[14]||(a[14]=h("p",{class:"notificationText mb-4"}," Please enter a team code which will be added to tournament ",-1)),b(G,{modelValue:j(fe),"onUpdate:modelValue":a[6]||(a[6]=e=>C(fe)?fe.value=e:fe=e),modelModifiers:{trim:!0},placeholder:"ex. T11AB"},null,8,["modelValue"])]),_:1}),b(u,{class:"buttons"},{default:I(()=>[b(x,{variant:"outlined",onClick:Re,class:"w-100"},{default:I(()=>[...a[15]||(a[15]=[P("Ok",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-4f5b4fd1"]]);export{se as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.