PageSourceSearch

https://axethrowing.org/assets/siteVirtualEvent-CTjlguD9.js

js axethrowing.org collected 2026-10-01 15:01:14 UTC 12,780 bytes, 1 lines download raw bytes

1import{_ as e,a7 as t,u as a,m as n,Y as o,ak as l,k as u,Z as s,a4 as r,c,b as i,d as v,N as d,O as p,w as m,o as g,h as y,X as h,R as f,S as w,T as b,a as k,e as _,t as S,n as j,f as I,a5 as x,B as C,q,r as P,a9 as U,y as V,v as B,a6 as D,H as O,V as E,U as L,ap as M,g as T,aj as R,af as A,ag as F,bo as N,bp as Y,bq as J,ao as G,br as H,G as K,ai as W}from"./index-M5qy_4Wm.js";import{c as z}from"./chatModal-DvERl9al.js";import{C as Z}from"./customInputNew-BA6e7JlB.js";import X from"./eventLeaderboard-BnVczQCJ.js";import{e as Q}from"./eventView-CosjKi0m.js";import{a as $}from"./addParticipantToEvent-CyNk3lPn.js";import"./matchups-BkvTHpmK.js";import"./customBottomSheet-C2KbP7iQ.js";import"./setVenueTvLanes-D7ccZfAY.js";import"./weekGames-BmMPzrMO.js";import"./leaderboard-D3RLSy-d.js";/* empty css                                                                    */import"./playoffsNew-bt8aho6j.js";import"./playoffScheduling-DTKuKqYe.js";import"./playoffDualsScheduling-B4sNXpEm.js";import"./tw-BqCbVyhq.js";import"./fakePlayerStats-GKur_n2A.js";import"./newroundrobin-BxKMGNd8.js";import"./chat-BKlFAIoT.js";import"./online-CG08BUj0.js";import"./customSearch-sElyVGsZ.js";import"./onlinePlayers-SB-YkU-4.js";import"./rating-wecbD98B.js";const ee={class:"newContainer my-5",pageWrapper:""},te={key:0,class:"tournamentButtons"},ae={key:1},ne={key:2},oe={key:1,class:"tournamentButtons"},le=e({__name:"siteVirtualEvent",props:{leagueID:String,locationSlug:String},setup(e){const le=M("postHog"),{notify:ue}=G();let se=t(!1);const re=a(),ce=n(),ie=o(),ve=l(),de=v(),pe=i(),me=e,ge=u(),ye=s();let he=r(""),fe=r(!1),we=c(()=>re.tournamentsAll),be=r(ye.selectedEvent.players),ke=t(!1),_e=r(null);const Se=t(!1),je=t(!1);let Ie=c(()=>{var e,t,a;if(!(null==(e=null==xe?void 0:xe.value)?void 0:e.date)||!(null==(t=null==xe?void 0:xe.value)?void 0:t.time))return!1;const n=new Date((new Date).toLocaleString("en-US",{timeZone:"America/New_York"})),[o,l,u]=xe.value.date.split("-"),[s,r]="00:00".split(":");return new Date(o,l-1,u,parseInt(s),parseInt(r)).getTime(),n.getTime(),pe.query.openForUser&&(pe.query.openForUser.toLowerCase(),null==(a=ge.user.code)||a.toLowerCase()),xe.value.seasonName===ie.currentSeason}),xe=c(()=>{if("explore"===de.currentRoute.value.query.tournamentStatus){const e=d("/venues/"+de.currentRoute.value.query.tournamentVenue+"/event-list/tournament/"+de.currentRoute.value.query.tournamentId);return p(e,e=>{e.exists()&&(_e.value={...e.val(),venue:de.currentRoute.value.query.tournamentVenue})},{onlyOnce:!0}),_e.value}return Object.keys(ye.selectedEvent).length?ye.selectedEvent:we.value.find(e=>e.slug===me.leagueID)?we.value.find(e=>e.slug===me.leagueID):null});const Ce=c(()=>![...be.value||[]].find(e=>e.code===ge.user.code).gp),qe=c(()=>Ce.value&&!ye.selectedEventWeeks.some(e=>e.completed)),Pe=c(()=>ge.user[".key"]),Ue=c(()=>{var e;if("duals-league"===(null==(e=xe.value)?void 0:e.leagueType)){let e=[];return[...be.value||[]].forEach(t=>e=[...e,...Object.keys(t.player)]),e.includes(Pe.value)}return[...be.value||[]].some(e=>e.code===ge.user.code)});m(()=>Ue.value,e=>{var t,a;e&&(ke.value=!1,window.localStorage.removeItem("tournament_".concat(null==(t=xe.value)?void 0:t.slug,"_signUpProcessing_").concat(null==(a=k.currentUser)?void 0:a.uid)))},{immediate:!0});const Ve=c(()=>{var e,t;return(null==(e=xe.value)?void 0:e.chatId)&&(null==(t=xe.value)?void 0:t.chatIsAvailable)&&(ve.userIsChatMember||["master","commissioner"].includes(ge.siteAccess))});function Be(e){let t="issue"===e?"https://form.jotform.com/250915976356166":"https://form.jotform.com/250914713047151";window.open(t,"_blank")}function De(){p(f(O("/teams"),b("code"),w(he.value.toUpperCase())),e=>{if(e.exists()){const t=e.val(),a=Object.keys(t)[0],{player1Key:n,player2Key:o,name:l,code:u}=t[a];if(![n,o].includes(Pe.value))return ue({group:"notifyMessages",type:"error",title:"You aren't a member of '".concat(l,"(").concat(u,")' team"),text:"Please choose another team code which you belong to",duration:4e3}),void(he.value="");Ee(),se.value=!1}else ue({group:"notifyMessages",type:"error",title:"Team with code '".concat(he.value,"' not found"),text:"Please write correct team code or choose another one",duration:4e3})})}function Oe(){localStorage.setItem("redirect_path",JSON.stringify({path:pe.fullPath,expire:Date.now()+36e5})),de.push({path:"/login"})}async function Ee(){fe.value=!0;const e=Pe.value?Pe.value:await async function(e){const t=f(O("/watl/players"),b("email"),w(e));return await h(t).then(e=>Object.keys(e.val())[0])}(k.currentUser.email),t=await Y("player_subscription");let a=+t[0].metadata.trial&&!Se.value?+t[0].metadata.trial:null;
1a&&ce.champsForFlex.includes(ge.user.code)&&(a=90);const n=t[0].priceData.priceId;J(n,e,"https://axethrowing.org"+pe.fullPath,ge.user.customer,re.venue.locationSlug,xe.value.slug,a).then(e=>{window.location.replace(e.data.url)}).catch(e=>{ue({group:"notifyMessages",type:"error",title:"Error",text:e.response.data,duration:4e3})}).finally(()=>fe.value=!1)}function Le(){var e,t;if(le.capture("virtual_sign_up",{tournament:xe.value.title}),!k.currentUser)return void y(Oe,"Please sign up or log in to register for '".concat((null==(e=xe.value)?void 0:e.title)||"","' event."),"info","Login");if("duals-league"===(null==(t=xe.value)?void 0:t.leagueType))se.value=!0;else if(ge.user.subscription&&ge.user.customer)R(Pe.value,ge.user.email,re.venue.locationSlug,xe.value.slug,xe.value.type.toLowerCase()).then(()=>{const e={title:xe.value.title,date:F(xe.value.date),time:A(xe.value.time||xe.value.timeStart),venue:xe.value.venue||"watl",type:xe.value.type,link:"".concat("https://axethrowing.org","/").concat(xe.value.virtual?"".concat(xe.value.venue||"watl","/virtual/view/").concat(xe.value.slug):"".concat(xe.value.venue||"watl","/league/").concat(xe.value.slug))};N(ge.user.email,ge.user.first,e);y(()=>{window.location.reload()},'<h3 style="margin-bottom: 15px;">Congrats!</h3>\n      <p> You\'ve Joined the Flex League! Play with the bot now or wait to play against real opponents.</p>',"info","Ok",!0)});else{const e="".concat("https://axethrowing.org","/documents/termsOfService"),t='<h3 style="margin-bottom: 15px;">This event requires active player subscription.</h3>\n    <p style="font-size: 14px;"> By continuing, you confirm that you have read and understood the <a href="'.concat(e,'" target="_blank">terms of service</a>. </p>');y(Ee,t,"info","Proceed")}}function Me(){const e={...pe.query};delete e.subscriptionSession,de.push({path:pe.path,query:e})}function Te(){var e;y(Re,"Are you sure you want to leave '".concat((null==(e=xe.value)?void 0:e.title)||"event","'?"),"info","Leave",!0)}function Re(){const e=re.venue[".key"],t=xe.value.slug,a=xe.value.currentSeason,n=Pe.value;E(L("/venues/".concat(e,"/league/").concat(t,"/").concat(a,"/standings/").concat(n))).then(()=>{be.value=be.value.filter(e=>e.code!==ge.user.code)}),E(O("/".concat(xe.value.rules,"/players-career/").concat(n,"/").concat(xe.value.type.toLowerCase(),"/").concat(t,"-").concat(a))),xe.value.chatId&&ve.removeChatMember(xe.value.chatId,n)}const Ae=c(()=>fe.value||Ue.value||ke.value||!Ie.value),Fe=c(()=>(be.value?be.value:[]).filter(e=>"axe_bot"!==e[".key"])),Ne=c(()=>xe.value.virtual&&!Ue.value);function Ye(e){const t="/venues/".concat(re.venue.locationSlug,"/league/").concat(xe.value.slug,"/").concat(xe.value.currentSeason,"/").concat(xe.value.currentWeek.name);$(e,t).then(()=>{je.value=!0,function(e){var t;if(null==(t=xe.value)?void 0:t.chatId){const t=W().format("MMM D, h:mm"),a={text:"The schedule has been updated. ".concat(e.first," ").concat(e.last," joined this Flex League on ").concat(t," — check your schedule to see new games"),type:"text",senderId:"chat_bot"};ve.sendMessage(xe.value.chatId,a)}}(e)}),K(L("/venues/".concat(re.venue.locationSlug,"/league/").concat(xe.value.slug,"/").concat(xe.value.currentSeason,"/standings/").concat(e[".key"])),{autoCheckIn:null})}return m(()=>xe.value,async e=>{var t;ve.loadChat(null==(t=xe.value)?void 0:t.chatId),!e||e.players&&3!==e.players.length||(be.value=await async function(e,t){let a=de.currentRoute.value.query.tournamentVenue?de.currentRoute.value.query.tournamentVenue:re.venue[".key"];return await h(f(L("/venues/".concat(a,"/league/").concat(e,"/").concat(t,"/standings")))).then(e=>{if(!e.exists())return;let t=Object.entries(e.val()).map(([e,t])=>({...t,".key":e}));return t.sort((e,t)=>t.win-e.win),t})}(xe.value.slug,xe.value.currentSeason))},{immediate:!0}),m(()=>be.value,e=>{e&&e.some(e=>e.autoCheckIn)&&e.forEach(e=>{e.autoCheckIn&&Ye(e)})},{immediate:!0}),m(()=>ge.user.customer,()=>{ge.user.customer&&!Ue.value&&H(ge.user.customer).then(e=>{const t=e=>e.trial_end&&"player_subscription"===e.metadata.type;Se.value=e.data.some(t)})},{immediate:!0}),g(async()=>{var e,t;if(pe.query.subscriptionSession&&"succeeded"===pe.query.subscriptionSession){y(Me,'<h3 style="margin-bottom: 15px;">Congrats!</h3>\n      <p> You\'ve Joined the Flex League! Play with the bot now or wait to play against real opponents.</p>',"info","Ok",!0),function(){var e,t,a,n;ke.value=!0,(null==(e=xe.value)?void 0:e.slug)&&(null==(t=k.currentUser)?void 0:t.uid)&&window.localStorage.setItem("tournament_".concat(null==(a=xe.value)?void 0:a.slug,"_signUpProcessing_").concat(null==(n=k.currentUser)?void 0:n.uid),"true")}()}else pe.query.subscriptionSession&&"canceled"===pe.query.subscriptionSession&&Me();if(!Object.keys(ye.selectedEvent).length||me.leagueID!==ye.selectedEvent.slug){const{locationSlug:e,leagueID:t}=pe.params;h(f(d("/venues/".concat(e,"/event-list/league")),b("slug"),w(t))).then(t=>{if(t.exists()){const a=Object.values(t.val())[0];ye.setSelectedEvent({venue:e,league:a})}})}!Ue.value&&window.localStorage.getItem("tournament_".concat(null==(e=xe.value)?void 0:e.slug,"_signUpProcessing_").concat(null==(t=k.currentUser)?void 0:t.uid))&&
1(ke.value=!0)}),(e,t)=>{var a;const n=P("v-progress-circular"),o=P("v-icon"),l=P("v-card-text"),u=P("v-card-actions"),s=P("v-card"),r=P("v-dialog");return T(),_("div",ee,[x(pe).query.originalVenue?(T(),_("p",{key:0,class:"back",onClick:t[0]||(t[0]=e=>function(){const{originalVenue:e,event:t}=pe.query;de.push("/".concat(e,"/").concat(t))}())},C("< Back"))):S("",!0),x(xe)?(T(),j(Q,{key:1,event:x(xe),players:Fe.value},{actions:q(()=>[Ne.value?(T(),_("div",te,[I(U,{class:"joinButton",type:"submit",variant:"flat","min-width":"165px",onClick:Le,disabled:Ae.value},{default:q(()=>[x(fe)?(T(),j(n,{key:0,color:"white",indeterminate:""})):x(ke)?(T(),_("span",ae,"Processing")):(T(),_("span",ne,"join"))]),_:1},8,["disabled"]),I(U,{variant:"outlined",class:"repportButton",onClick:t[1]||(t[1]=e=>Be("issue"))},{default:q(()=>[...t[8]||(t[8]=[V("Report an issue",-1)])]),_:1}),Ue.value?(T(),j(U,{key:0,variant:"outlined",class:"repportButton",onClick:t[2]||(t[2]=e=>Be("player"))},{default:q(()=>[...t[9]||(t[9]=[V("Report Player",-1)])]),_:1})):S("",!0)])):S("",!0),Ue.value?(T(),_("div",oe,[qe.value?(T(),j(U,{key:0,onClick:Te,class:"joinButton"},{default:q(()=>[...t[10]||(t[10]=[V("leave event",-1)])]),_:1})):S("",!0),I(U,{onClick:t[3]||(t[3]=e=>Be("issue")),variant:"outlined",class:"repportButton"},{default:q(()=>[...t[11]||(t[11]=[V("Report an issue",-1)])]),_:1}),Ue.value?(T(),j(U,{key:1,variant:"outlined",class:"repportButton",onClick:t[4]||(t[4]=e=>Be("player"))},{default:q(()=>[...t[12]||(t[12]=[V("Report Player",-1)])]),_:1})):S("",!0)])):S("",!0)]),_:1},8,["event","players"])):S("",!0),I(z,{showChatButton:Ve.value,chatId:null==(a=x(xe))?void 0:a.chatId,currentUserId:x(ge).user[".key"],members:Fe.value},null,8,["showChatButton","chatId","currentUserId","members"]),x(xe)?(T(),j(X,{key:2,runAutoSchedule:je.value,leagueID:x(xe).slug,locationSlug:x(xe).venue||me.locationSlug,source:"tournament"},null,8,["runAutoSchedule","leagueID","locationSlug"])):S("",!0),I(r,{modelValue:x(se),"onUpdate:modelValue":t[7]||(t[7]=e=>D(se)?se.value=e:se=e),"max-width":"500"},{default:q(()=>[I(s,{tile:"",class:"paymentNotification d-flex flex-column align-center justify-center pa-5"},{default:q(()=>[B("button",{class:"closeIcon",onClick:t[5]||(t[5]=e=>D(se)?se.value=!1:se=!1)},[I(o,{size:"24"},{default:q(()=>[...t[13]||(t[13]=[V("mdi-close",-1)])]),_:1})]),I(l,null,{default:q(()=>[t[14]||(t[14]=B("p",{class:"notificationText mb-4"}," Please enter a team code which will be added to tournament ",-1)),I(Z,{modelValue:x(he),"onUpdate:modelValue":t[6]||(t[6]=e=>D(he)?he.value=e:he=e),modelModifiers:{trim:!0},placeholder:"ex. T11AB"},null,8,["modelValue"])]),_:1}),I(u,{class:"buttons"},{default:q(()=>[I(U,{variant:"outlined",onClick:De},{default:q(()=>[...t[15]||(t[15]=[V("Ok",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}},[["__scopeId","data-v-bdacd057"]]);export{le 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.