1import{_ as t,R as s,U as e,W as n,e as o,v as a,t as i,n as c,q as h,r as u,B as r,z as l,D as d,F as p,x as g,$ as m,aZ as y,f as w,g as f,y as C}from"./index-M5qy_4Wm.js";const M={key:1},v={key:0,class:"chatWindow"},b={class:"screen"},k=["src"];const B=t({props:["location","person","personKey","channel","instructions"],data:()=>({me:null,chatMsg:"",chatCountA:0,chatCountB:0,chat:[],chatOpen:!1}),watch:{channel(){this.initChat()},chat(t){this.chatOpen?this.chatCountA=this.chatCountB=t.length:this.chatCountB=t.length}},methods:{instructionsChat(){this.instructionsMessage("Hi "+this.person.first+"!");let t=this;window.setTimeout(function(){t.instructionsMessage("I will guide you through the process of playing a match against your opponent.")},2e3),window.setTimeout(function(){t.instructionsMessage("You can chat with your opponent in real-time here. We encourage you each to share your Instagram or Messenger profile, so you can call each other, meet and throw live, in real-time, against each other. Above your target, we'll have social icons you can click on to connect with your opponent.")},1e4),window.setTimeout(function(){t.instructionsMessage("You don't have to call each other, it's just recommended and you can rely on great sportsmanship to continue your match.")},2e4),window.setTimeout(function(){t.instructionsMessage("When you score, click on your target with your score. Your opponent will then enter their own score.")},3e4),window.setTimeout(function(){t.instructionsMessage("If your opponent disconnects or loses connectivity you can exit your match after 60 seconds of inactivity.")},4e4),window.setTimeout(function(){t.instructionsMessage("In a tie scenario 'sudden death throw' button will be activated and players can select who the winner is.")},6e4),window.setTimeout(function(){t.instructionsMessage("That`s basically it! Easy isn`t it? If you have any questions you can contact us at [email protected]")},8e4)},instructionsMessage(t){let s=Date.now();n(e(this.location),{first:"Axe",last:"Bot",pic:"https://firebasestorage.googleapis.com/v0/b/forged-7adb7.appspot.com/o/robot.png?alt=media&token=121df055-2b09-440a-9b35-a9c70226c966",id:"test",msg:t,time:1-s}).then(t=>{})},sendMessage(){let t=Date.now();if(""===this.chatMsg)return!1;n(e(this.location),{first:this.person.first,last:this.person.last,pic:this.person.pic,id:this.personKey,msg:this.chatMsg.slice(0,160),time:1-t}).then(t=>{}),this.chatMsg=""},initChat(){this.chatCountA=0,this.chatCountB=0,this.$databaseBind("chat",s(e(this.location)))}},mounted(){this.initChat(),this.instructions&&this.instructionsChat()}},[["render",function(t,s,e,n,B,A){const T=u("v-icon");return f(),o("div",{class:l(t.$route.name)},[a("div",{class:l(["chatIcon",{active:B.chatCountA!=B.chatCountB}]),onClick:s[0]||(s[0]=t=>{B.chatOpen=!0,B.chatCountA=B.chatCountB})},[B.chatCountA===B.chatCountB?(f(),c(T,{key:0,class:"icon",color:"black"},{default:h(()=>[...s[5]||(s[5]=[C("mdi-message-text",-1)])]),_:1})):(f(),o("span",M,r(B.chatCountB-B.chatCountA),1))],2),B.chatOpen?(f(),o("div",v,[a("div",b,[a("ul",null,[(f(!0),o(p,null,g(B.chat,t=>(f(),o("li",{class:l({me:t.id==e.personKey}),key:t.id},[t.id!=e.personKey?(f(),o("img",{key:0,src:t.pic},null,8,k)):i("",!0),a("span",null,[a("strong",null,r(t.first)+" "+r(t.last)+":",1),C(" "+r(t.msg),1)])],2))),128))])]),d(a("input",{"onUpdate:modelValue":s[1]||(s[1]=t=>B.chatMsg=t),onKeyup:s[2]||(s[2]=y(t=>A.sendMessage(),["enter"]))},null,544),[[m,B.chatMsg]]),a("button",{onClick:s[3]||(s[3]=t=>A.sendMessage())},"send"),a("button",{class:"close",onClick:s[4]||(s[4]=t=>B.chatOpen=!1)},[w(T,null,{default:h(()=>[...s[6]||(s[6]=[C("mdi-close",-1)])]),_:1})])])):i("",!0)],2)}],["__scopeId","data-v-c088a970"]]);export{B as c};
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.