(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3d1e7fdd"],{"0c1b":function(t,e,s){},"188b":function(t,e,s){"use strict";s("b0c0");var a=function(){var t=this,e=t._self._c;return e("div",{class:["betArea","type"+t.type]},t._l(t.markets,(function(s,a){return e("div",{key:"market_"+a,staticClass:"market"},[s.marketId!==(t.markets[a-1]||{}).marketId?e("div",{staticClass:"title"},[t._v(t._s(s.name))]):t._e(),e("ul",{class:{more:s.outcomes.length>3}},[t._l(s.outcomes,(function(a,i){return e("li",{key:"outcome_"+i,class:{selected:t.selectedData[t.matchId+"-"+s.marketId+"-"+s.specifiers+"-"+a.id]},on:{click:function(e){return t.$emit("checkBet",{marketId:s.marketId,specifiers:s.specifiers,outcomeId:a.id,odds:a.odds,titleName:s.name,name:a.name})}}},[e("span",{staticClass:"outcomeName"},[t._v(t._s(a.name))]),e("span",[t._v(t._s(a.odds))])])})),s.outcomes.length>3&&s.outcomes.length%3===2?e("li",{staticClass:"fillDom"}):t._e()],2)])})),0)},i=[],n=(s("a9e3"),{name:"betArea",props:{type:{type:String,default:null},matchId:{type:Number,default:null},markets:{type:Array,default:function(){return[]}},selectedData:{type:Object,default:function(){return{}}}}}),u=n,c=(s("1c24"),s("2877")),o=Object(c["a"])(u,a,i,!1,null,"5ced5f98",null);e["a"]=o.exports},"1c24":function(t,e,s){"use strict";s("0c1b")},"23f0":function(t,e,s){},"70d7":function(t,e,s){},"79ad":function(t,e,s){"use strict";s("f2ef")},9242:function(t,e,s){"use strict";s("23f0")},a0b0:function(t,e,s){t.exports=s.p+"img/icon02.5d096554.png"},a5f79:function(t,e,s){t.exports=s.p+"img/win.ad909eb6.png"},a7992:function(t,e,s){t.exports=s.p+"img/icon03.9a0ee3da.png"},aab1:function(t,e,s){"use strict";s.r(e);s("ac1f"),s("466d"),s("caad");var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"virtuals",on:{click:t.domClick},nativeOn:{touchstart:function(e){return e.preventDefault(),t.domClick.apply(null,arguments)}}},[t._m(0),t._m(1),t._m(2),t._m(3),t._m(4),e("div",{class:["fixedContent",{outside:t.outside}],on:{click:function(e){return t.setStateListShow(!1)}}},[t.outside?t._e():e("header-game",{attrs:{bgColor:"#051f1b"}}),t.outside?t._e():e("tourname",{attrs:{tournaments:t.tournaments,tournamentId:t.tournamentId},on:{checkTab:t.checkTabTour}}),t.outside?t._e():e("schedules",{attrs:{schedules:t.schedules,selectedScheduleId:t.selectedScheduleId},on:{checkTab:t.checkTabSchedule}}),e("site-area",{attrs:{outside:t.outside,status:t.status,matchId:t.matchId,areaTimes:t.areaTimes,match:t.match,resultData:t.resultData.score,nextData:t.nextData,clear:t.animaClear,audioPlay:t.audioPlay},on:{audioPlay:t.audioPlayFn,userCheckSound:t.userCheckSound,animaStage:t.animaStage}})],1),t.outside?t._e():e("div",{on:{click:function(e){return t.setStateListShow(!1)}}},[e("bet-area",{attrs:{matchId:t.matchId,markets:t.markets,selectedData:t.selectedData},on:{checkBet:t.checkBet}})],1),t._e(),t.outside?t._e():e("bet-bar",{attrs:{odds:t.odds,stakes:t.stakes,stake:t.stake,stateListShow:t.stateListShow,amount:t.amount,coupon:t.coupon},on:{click:function(t){t.stopPropagation()},setStateListShow:t.setStateListShow,updateStake:t.updateStake,pay:t.pay}}),t.outside?t._e():e("black-out",{directives:[{name:"show",rawName:"v-show",value:[2,3].includes(t.status)||t.isbet,expression:"[2, 3].includes(status) || isbet"}],attrs:{isbet:t.isbet,win:t.winDom?t.win:null},on:{toNext:t.toNextPhase}})],1)},i=[function(){var t=this,e=t._self._c;return e("audio",{attrs:{id:"bgAudio",preload:"true"}},[e("source",{attrs:{src:s("6db2"),type:"audio/ogg"}}),e("source",{attrs:{src:s("9c91"),type:"audio/mpeg"}})])},function(){var t=this,e=t._self._c;return e("audio",{attrs:{id:"bgAudio2",preload:"true"}},[e("source",{attrs:{src:s("6db2"),type:"audio/ogg"}}),e("source",{attrs:{src:s("9c91"),type:"audio/mpeg"}})])},function(){var t=this,e=t._self._c;return e("audio",{attrs:{id:"startAudio",preload:"true"}},[e("source",{attrs:{src:s("1cd5"),type:"audio/ogg"}}),e("source",{attrs:{src:s("264a"),type:"audio/mpeg"}})])},function(){var t=this,e=t._self._c;return e("audio",{attrs:{id:"winAudio",preload:"true"}},[e("source",{attrs:{src:s("4975"),type:"audio/mpeg"}})])},function(){var t=this,e=t._self._c;return e("audio",{attrs:{id:"win2Audio",preload:"true"}},[e("source",{attrs:{src:s("ae26"),type:"audio/mpeg"}}),e("source",{attrs:{src:s("c344"),type:"audio/ogg"}})])}],n=(s("4795"),s("0d03"),s("b0c0"),s("b64b"),s("4160"),s("d3b7"),s("159b"),s("99af"),s("c975"),s("b680"),s("14d9"),s("5530")),u=s("f40c"),c=function(){var t=this,e=t._self._c;return e("div",{staticClass:"betBar"},[e("div",{staticClass:"stakeContent",on:{click:function(e){return t.changeStake()}}},[e("div",[e("span",{staticClass:"text"},[t._v(t._s(t.$language.stake))]),e("span",{staticClass:"num"},[t._v(t._s(t.stake))])]),e("span")]),e("div",{staticClass:"moneyContent"},[e("div",[e("span",[t._v(t._s(t.$language.totalOdds)+":")]),e("span",{staticClass:"num"},[t._v(t._s(t.odds.toFixed(2)))])]),e("div",[e("span",[t._v(t._s(t.$language.payout)+":")]),e("span",{staticClass:"num"},[t._v(t._s((Math.round(1e3*t.odds)*t.stake/1e3).toFixed(2)))])])]),e("div",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],staticClass:"pay",on:{click:function(e){return t.$emit("pay",{stake:t.stake})}}},[e("span",{staticClass:"text"},[t._v(t._s(t.$language.placeBet))]),e("span",{staticClass:"num"},[t._v(t._s(t.$language.aboutToPay)+" "+t._s(t.amount-(t.coupon.reduceAmount||0)>0?t.amount-(t.coupon.reduceAmount||0):0))])]),e("ul",{directives:[{name:"show",rawName:"v-show",value:t.stateListShow,expression:"stateListShow"}],staticClass:"stateList"},t._l(t.stakes,(function(s,a){return e("li",{key:"stake_"+a,class:{active:s===t.stake},on:{click:function(e){return t.checkStake(s)}}},[t._v(" "+t._s(s)+" ")])})),0)])},o=[],d=(s("a9e3"),{name:"betBar",props:{odds:{type:Number,default:0},amount:{type:Number,default:0},stakes:{type:Array,default:function(){return[]}},stateListShow:{type:Boolean,default:!1},stake:{type:Number,default:0},coupon:{type:Object,default:function(){return{}}}},data:function(){return{stakesIndex:0}},watch:{stakes:{handler:function(t){this.stake||this.$emit("updateStake",t[0])},immediate:!0}},created:function(){},methods:{changeStake:function(){this.$emit("setStateListShow",!this.stateListShow)},checkStake:function(t){this.$emit("updateStake",t),this.$emit("setStateListShow",!1)}}}),r=d,l=(s("9242"),s("2877")),h=Object(l["a"])(r,c,o,!1,null,"2212823e",null),m=h.exports,f=s("b3c2"),g=function(){var t=this,e=t._self._c;return e("div",{staticClass:"schedules"},[e("span",{staticClass:"pre",on:{click:function(e){return t.listScroll("left")}}}),e("div",{ref:"timeList",staticClass:"timeList"},t._l(t.schedules,(function(s){return e("span",{key:s.id,ref:s.matchId===t.selectedScheduleId?"selected":"",refInFor:!0,class:["time",{active:s.matchId===t.selectedScheduleId,live:"live"===s.status}],on:{click:function(e){return t.$emit("checkTab",s.matchId)}}},[t._v(" "+t._s("live"===s.status?"LIVE":t.setTime(s.startTime))+" ")])})),0),e("span",{staticClass:"next",on:{click:function(e){return t.listScroll("right")}}})])},p=[],y={name:"schedules",props:{schedules:{type:Array,default:function(){return[]}},selectedScheduleId:{type:Number,default:null}},data:function(){return{scrollFinish:!0}},watch:{schedules:{handler:function(t){var e=this;t.length&&this.$nextTick((function(){setTimeout((function(){var t=e.$refs.timeList.scrollLeft;e.scrollFn((e.$refs.selected[0].offsetLeft-160-t)/40)}),200)}))},immediate:!0}},mounted:function(){},methods:{setTime:function(t){var e=new Date(t).getHours();e<10&&(e="0".concat(e));var s=new Date(t).getMinutes();return s<10&&(s="0".concat(s)),e+":"+s},listScroll:function(t){var e=Math.round(this.$refs.timeList.offsetWidth/4*3),s=this.$refs.timeList.scrollLeft;switch(t){case"left":if(0===this.$refs.timeList.scrollLeft)return;s<=e?s=0:s-=e;break;case"right":s+=e;break}this.scrollFn((s-this.$refs.timeList.scrollLeft)/40)},scrollFn:function(t){var e=this;if(this.scrollFinish){this.scrollFinish=!1;var s=40,a=function a(){0!==s?(s--,e.$refs.timeList.scrollLeft+=t,requestAnimationFrame(a)):e.scrollFinish=!0};requestAnimationFrame(a)}}}},v=y,b=(s("79ad"),Object(l["a"])(v,g,p,!1,null,"39d9b0f7",null)),w=b.exports,I=s("188b"),k=s("885c"),S=function(){var t=this,e=t._self._c;return e("div",{class:["blackOut",{winActive:t.win&&t.win.win}]},[e("div",{directives:[{name:"show",rawName:"v-show",value:!t.win||!t.win.win,expression:"!win || !win.win"}],staticClass:"content"},[e("div",{staticClass:"title"},[e("div",{staticClass:"top"},[e("img",{class:{win:t.win&&t.win.win},attrs:{src:t.ImgSrc,alt:""}}),e("div",[e("span",{staticClass:"name"},[t._v(t._s(t.title))]),e("span",{staticClass:"text"},[t._v(t._s(t.text))])])]),e("router-link",{directives:[{name:"show",rawName:"v-show",value:t.isbet,expression:"isbet"}],staticClass:"view",attrs:{tag:"span",to:{name:"VirtualBets"}}},[t._v(t._s(t.$language.viewDetail))])],1),e("div",{staticClass:"next"},[e("span",{directives:[{name:"show",rawName:"v-show",value:!t.isbet,expression:"!isbet"}]}),e("span",{on:{click:function(e){return t.$emit("toNext")}}},[t._v(" "+t._s(t.$language.nextMatch)+" > ")])])]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.win&&t.win.win,expression:"win && win.win"}],staticClass:"win"},[e("span",{staticClass:"title"},[t._v(" "+t._s(t.$language.youWin.toUpperCase())+" "),e("Countup",{attrs:{tag:"span",decimals:2,"end-val":t.formatCash({value:t.win&&t.win.amount||0,toFixed:!0})}}),t._v(" "+t._s(t.currency.toUpperCase())+" ")],1),t._m(0),e("div",{staticClass:"view"},[e("router-link",{attrs:{tag:"span",to:{name:"VirtualBets"}}},[t._v(" "+t._s(t.$language.viewDetail)+" ")]),e("span",{on:{click:function(e){return t.$emit("toNext")}}},[t._v(t._s(t.$language.nextMatch))])],1)])])},T=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"img"},[e("img",{attrs:{src:s("a5f79"),alt:""}})])}],_=s("c71b"),A=s("cf45"),B={name:"blackOut",components:{Countup:_["a"]},props:{isbet:{type:Boolean,default:!1},win:{type:Boolean||Object,default:function(){return!1}}},computed:Object(n["a"])(Object(n["a"])({},Vuex.mapGetters(["currency"])),{},{text:function(){return this.isbet?this.win&&this.win.win?"".concat(this.$language.youWin," ").concat(this.win.amount," ").concat(this.currency.toUpperCase()):this.win&&!this.win.win?this.$language.youLose:this.$language.waitResult:this.$language.waitResult},title:function(){return this.isbet?this.win&&this.win.win||this.win&&!this.win.win?this.$language.matchEnded:this.$language.betAccepted:this.$language.betStop},ImgSrc:function(){return this.isbet?this.win&&this.win.win?"":this.win&&!this.win.win?s("a0b0"):s("a7992"):s("fa5f")}}),methods:{formatCash:A["h"]}},C=B,D=(s("b0c1"),Object(l["a"])(C,S,T,!1,null,"310eabb0",null)),x=D.exports,$=s("9ffe"),E=s("6936"),L=s("7886"),P={name:"Virtuals",components:{HeaderGame:u["a"],BetBar:m,Tourname:f["a"],Schedules:w,BetArea:I["a"],SiteArea:k["a"],BlackOut:x,Coupon:$["a"]},props:{VirtualType:{type:String,default:""},audio:{type:Boolean,default:!0}},data:function(){return{status:1,tournaments:[],tournamentId:null,markets:[],matchId:"",nextMatchId:null,selectedData:{},odds:0,selectedNum:0,stakes:[],selectedScheduleId:null,match:null,stateListShow:!1,phaseLoopTime:8e3,areaTimes:{bet:null,match:null,matchTotalTime:90,errorTime:0},resultData:{score:{}},nextData:{home:{},away:{}},isbet:!1,stake:0,animaClear:0,coupon:{},win:{},winDom:!1,useFreeBet:!1,useBonus:!1,leaveed:!1,userPlay:!0,bgAudioPlayed:1}},computed:Object(n["a"])(Object(n["a"])({},Vuex.mapGetters(["token","visibility","country"])),{},{amount:function(){return this.stake*this.selectedNum>0?this.stake*this.selectedNum:0},outside:function(){return["home"].includes(this.VirtualType)},audioPlay:function(){return this.audio&&this.userPlay}}),watch:{status:function(t){switch(t){case 0:break;case 1:break;case 2:break;case 3:break}},amount:function(t){t<this.coupon.limitAnteAmount&&(this.coupon={})},visibility:function(t){"show"===t?(this.enterVirtual(),this.audioPlayFn({type:1})):"hidden"===t&&(this.leaveVirtual(),this.audioPlayFn({type:10}))}},created:function(){Object(A["g"])({eventName:"game_click"}),Object(A["g"])({eventName:"home_click"}),this.bgAudioId="bgAudio";var t=this.$route.params;t.tournamentId&&(this.tournamentId=1*t.tournamentId),t.matchId&&(this.selectedScheduleId=1*t.matchId),this.ws(),this.enterVirtual();var e=localStorage.getItem("virtual-audio-play");e&&(this.userPlay=!!(1*e))},beforeDestroy:function(){this.leaveVirtual(),this.closeWs()},mounted:function(){var t=this;this.$store.commit("SET_OPEN_GAME",L["g"][this.country].virtualFootball),this.$nextTick((function(){setTimeout((function(){t.audioPlay&&t.audioPlayFn({type:1})}),1e3)}))},methods:{ws:function(){var t=this;this.closeWs(),E["a"].getInstance().socketConnect({gameId:this.$route.query.gameId,country:this.country},(function(){t.token&&E["a"].getInstance().wsLogin(),E["a"].getInstance().handleMsg({key:"VirtualMatches",configKey:"GameLeagueFootballMsg",fn:function(e){t.getGameInfo(e)}}),E["a"].getInstance().handleMsg({key:"VirtualMatchResult",configKey:"GameLeagueFootballMsg",fn:function(e){t.getMatchResult({time:e.now-e.matchStartTime>2e3?Math.ceil((e.now-e.matchStartTime)/1e3):0,matchResult:e.matchResult,nextMatch:e.nextMatch})}}),t.requestMsgReq()}))},requestMsgReq:function(){var t=(this.tournamentId||1)+"";this.selectedScheduleId&&(t=t+","+this.selectedScheduleId),E["a"].getInstance().requestMsgReq({configKey:"GameLeagueFootballMsg",data:{address:"instantVirtual",location:t,type:0,country:this.country}})},closeWs:function(){E["a"].getInstance().socketBroken()},domClick:function(){this.audioPlay&&(document.getElementById("bgAudio").play(),document.getElementById("bgAudio").volume=.5,document.getElementById("bgAudio2").play(),document.getElementById("bgAudio2").volume=.5,1===this.bgAudioPlayed?(this.bgAudioPlayed=1,document.getElementById("bgAudio2").pause()):(this.bgAudioPlayed=2,document.getElementById("bgAudio").pause()),this.played||(this.played=!0,document.getElementById("startAudio").play(),document.getElementById("startAudio").pause(),document.getElementById("winAudio").play(),document.getElementById("winAudio").pause(),document.getElementById("win2Audio").play(),document.getElementById("win2Audio").pause(),this.audioPlayFn({type:1})))},setBgAudioTimer:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=e.status,a=void 0===s?0:s;if(this.audioPlay&&!this.leaveed){document.getElementById(this.bgAudioId).volume=.5;var i="bgAudio";"bgAudio"===this.bgAudioId?(i="bgAudio2",this.bgAudioPlayed=2):(i="bgAudio",this.bgAudioPlayed=1),clearInterval(this.bgAudioTimer);var n=document.getElementById(i);a?n.play():(setTimeout((function(){if(n.volume=.5,document.getElementById(t.bgAudioId).volume=0,Object(A["w"])())document.getElementById(t.bgAudioId).currentTime=0;else try{document.getElementById(t.bgAudioId).fastSeek(0)}catch(e){document.getElementById(t.bgAudioId).currentTime=0}document.getElementById(t.bgAudioId).pause(),t.bgAudioId=i}),1100),n.play(),n.volume=0),this.bgAudioTimer=setInterval((function(){t.setBgAudioTimer()}),1e3*(n.duration-n.currentTime-1.5))}},userCheckSound:function(){this.userPlay=!this.userPlay,localStorage.setItem("virtual-audio-play",1*this.userPlay),this.userPlay?this.setBgAudioTimer({status:1}):this.audioPlayFn({type:10})},audioPlayFn:function(t){var e=t.type;if((4!==e||this.win.win)&&(this.audioPlay&&!this.leaveed||10===e))switch(e){case 1:this.setBgAudioTimer();break;case 2:if(document.getElementById("startAudio").play(),Object(A["w"])())document.getElementById("startAudio").currentTime=0;else try{document.getElementById("startAudio").fastSeek(0)}catch(s){document.getElementById("startAudio").currentTime=0}break;case 3:if(document.getElementById("winAudio").play(),Object(A["w"])())document.getElementById("winAudio").currentTime=0;else try{document.getElementById("winAudio").fastSeek(0)}catch(a){document.getElementById("winAudio").currentTime=0}break;case 4:if(document.getElementById("win2Audio").play(),Object(A["w"])())document.getElementById("win2Audio").currentTime=0;else try{document.getElementById("win2Audio").fastSeek(0)}catch(i){document.getElementById("win2Audio").currentTime=0}break;case 10:if(Object(A["w"])())document.getElementById("bgAudio").currentTime=0,document.getElementById("bgAudio2").currentTime=0;else try{document.getElementById("bgAudio").fastSeek(0),document.getElementById("bgAudio2").fastSeek(0)}catch(n){document.getElementById("bgAudio").currentTime=0,document.getElementById("bgAudio2").currentTime=0}document.getElementById("bgAudio").pause(),document.getElementById("bgAudio2").pause(),document.getElementById("winAudio").pause(),document.getElementById("startAudio").pause(),document.getElementById("win2Audio").pause(),this.bgAudioId="bgAudio";break}},enterVirtual:function(){this.animaClear=+new Date,this.leaveed=!1,this.getData(),this.requestMsgReq()},leaveVirtual:function(){this.animaClear=+new Date,this.areaTimes={bet:null,match:null,matchTotalTime:90,errorTime:0},this.coupon={},this.amount=0,this.resultData={score:{}},this.win={},this.leaveed=!0,clearInterval(this.bgAudioTimer),clearTimeout(this.getDataTimer),clearTimeout(this.getDataTimer)},getData:function(){var t=this,e={country:this.country};this.selectedScheduleId&&(e.matchId=this.selectedScheduleId),this.tournamentId&&(e.tournamentId=this.tournamentId),this.$get({url:"kaya/virtual/match",noPrompt:!0,params:e}).then((function(e){e.data&&t.getGameInfo(e.data)}))},getGameInfo:function(t){if(this.cutPeriod(),t.now>=t.matchStopTime+1e4)return this.selectedScheduleId=null,this.getData(),void this.requestMsgReq();this.tournaments=t.tournaments||[],this.tournamentId=t.tournamentId,this.matchId=t.matchId,this.schedules=t.schedules||[],this.stakes=t.stakes,t.match.onlineNum=t.onlineNum,this.$set(this,"match",t.match||null),this.markets=t.match&&t.match.markets||[];var e=t.now,s=t.match.matchLiveTime,a=t.match.matchStartTime,i=t.match.matchStopTime;t.betOrder?(this.isbet=!0,this.setBets(t.betOrder),this.win.amount=Object(A["h"])({value:t.betOrder.winAmount||0,toFixed:!0}),this.win.win=t.betOrder.win):(this.win={},this.isbet=!1),this.useFreeBet=t.useFreeBet||!1,this.useBonus=t.useBonus||!1,this.matchTotalTime=Math.floor((i-a)/1e3*4.5),e>i?(this.status=3,this.areaTimes.matchTotalTime=90,this.showWin(this.matchId)):e>a?(this.status=2,this.areaTimes.matchTotalTime=this.matchTotalTime):e>s?(this.animaClear=+new Date,this.status=1,this.$set(this.areaTimes,"bet",Math.floor((a-e)/1e3))):(this.animaClear=+new Date,this.status=0,this.$set(this.areaTimes,"bet",Math.floor((a-e)/1e3))),this.selectedScheduleId||this.setSelectedScheduleId()},getMatchResult:function(t){var e=this,s=t.time,a=t.matchResult,i=t.nextMatch;this.selectedScheduleId&&this.selectedScheduleId==a.matchId&&(this.selectedScheduleId=null,this.requestMsgReq()),this.status=2,this.areaTimes.matchTotalTime=this.matchTotalTime,this.$nextTick((function(){if(0===s&&e.audioPlayFn({type:2}),a){var t=Object.assign({status:!0},a);e.$set(e.areaTimes,"match",s),e.resultData=Object.assign({score:t,data:{matchResult:a,nextMatch:i}}),e.$set(e,"nextData",{home:{name:i.match.homeTeam.name},away:{name:i.match.awayTeam.name}})}}))},setBets:function(t){var e=JSON.parse(t.betInfo),s={},a=0;e.forEach((function(t){var e="".concat(t.matchId,"-").concat(t.marketId,"-").concat(t.specifiers||"","-").concat(t.outcomeId);s[e]={odds:t.odds},a=t.amount})),this.selectedData=s,this.stake=a},setSelectedScheduleId:function(){for(var t=null,e=0;e<this.schedules.length;e++)if("live"===this.schedules[e].status&&(t=this.schedules[e].matchId),this.selectedScheduleId===this.schedules[e].matchId)return;this.selectedScheduleId=t},checkTabSchedule:function(t){this.selectedScheduleId!==t&&(this.leaveVirtual(),this.selectedData={},this.selectedNum=0,this.odds=0,this.selectedScheduleId=t,this.coupon={},this.win={},this.winDom=!1,this.getData(),this.requestMsgReq())},checkTabTour:function(t){var e=t.tournamentId;this.tournamentId!==e&&(this.leaveVirtual(),this.selectedData={},this.selectedNum=0,this.odds=0,this.tournamentId=e,this.selectedScheduleId=null,this.coupon={},this.win={},this.winDom=!1,this.getData(),this.requestMsgReq())},checkBet:function(t){var e=t.marketId,s=t.specifiers,a=t.outcomeId,i=t.odds,n="".concat(this.matchId,"-").concat(e,"-").concat(s,"-").concat(a);for(var u in this.selectedData){var c="".concat(this.matchId,"-").concat(e,"-").concat(s);0===u.indexOf(c)&&u!==n&&this.$set(this.selectedData,u,null)}this.selectedData[n]?this.$set(this.selectedData,n,null):this.$set(this.selectedData,n,{odds:i}),this.setOdds()},setOdds:function(){var t=0,e=0;for(var s in this.selectedData)this.selectedData[s]&&(t+=Math.round(1e3*this.selectedData[s].odds),e++);this.odds=t/1e3,this.selectedNum=e,0===this.selectedNum&&(this.coupon={})},cutPeriod:function(){this.odds=0,this.selectedData={},this.selectedNum=0,this.winDom=!1,this.isbet=!1,this.status=0,this.coupon={},this.amount=0,this.win={},this.areaTimes={bet:null,match:null,matchTotalTime:90,errorTime:0}},updateStake:function(t){this.stake=t,this.amount=1*(Math.round(t*this.odds*1e3)/1e3).toFixed(2)},pay:function(t){var e=this;if(this.odds){var s={couponId:this.coupon.id||0,stake:this.amount,payAmount:this.amount-(this.coupon.reduceAmount||0),channel:Object(A["C"])(),items:[]};for(var a in this.selectedData)if(this.selectedData[a]){var i=a.split("-");s.items.push({matchId:i[0],marketId:i[1],specifiers:i[2],outcomeId:i[3],stake:t.stake,odds:this.selectedData[a].odds})}this.$post({url:"kaya/virtual/bet",data:s,auth:!0}).then((function(){e.isbet=!0,e.$store.dispatch("GetUserInfo",{noLogin:!0,noPrompt:!0})}))}},setStateListShow:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.stateListShow=t},useCoupon:function(t){var e=t.data;this.coupon=e},animaStage:function(t){var e=this,s=t.stage,a=void 0===s?0:s;2==a&&(clearTimeout(this.getDataTimer),this.getDataTimer=setTimeout((function(){e.getData()}),9e3))},showWin:function(t){this.win.win&&this.win.matchId!==t&&(this.win.matchId=t),this.winDom=!0},toNextPhase:function(){var t=null;if(this.selectedScheduleId){for(var e=0;e<this.schedules.length;e++)if(this.schedules[e].matchId===this.selectedScheduleId){t=this.schedules[e+1].matchId;break}}else for(var s=0;s<this.schedules.length;s++)if("live"===this.schedules[s].status){t=this.schedules[s+1].matchId;break}this.leaveVirtual(),this.selectedData={},this.selectedNum=0,this.odds=0,this.selectedScheduleId=t,this.coupon={},this.win={},this.winDom=!1,this.getData(),this.requestMsgReq()}}},O=P,M=(s("fee1"),Object(l["a"])(O,a,i,!1,null,"59b1293e",null));e["default"]=M.exports},b0c1:function(t,e,s){"use strict";s("bf14")},bf14:function(t,e,s){},f2ef:function(t,e,s){},fa5f:function(t,e,s){t.exports=s.p+"img/icon04.2d39d5d7.png"},fee1:function(t,e,s){"use strict";s("70d7")}}]);