Files
onexbet/some js/store.701b5cb85d9318b1fdc761dba4410cf5.js
2026-07-21 03:55:57 +03:00

1 line
36 KiB
JavaScript
Executable File

window.BET_ON_YOUR_PAGE_URL_PREFIX="betsonyour";var store_global=new Vuex.Store({state:function state(){return{GLOBAL:{userId:typeof user_balance!=="undefined"?user_balance.getMainUserId():Number(Core.cookie.get("ua",0)),uhash:Core.cookie.get("uhash"),lng:Core.cookie.get("lng"),isSilentMode:window.user_settings?window.user_settings.get("isSilentMode"):Core.cookie.get("smd",false),cfdata:Core.cookie.get("cfdata",""),cfview:parseInt(Core.cookie.get("coefview",0)),tzo:Core.cookie.get("tzo",0),indicator:Number(Core.cookie.get("indicator",0)),countryId:typeof back_vars!=="undefined"?back_vars.countryId:0,show_slider_top_games:!parseInt(Core.cookie.get("hide_slider_top_games",0)),antisports_line:window.DISALLOWED_SPORTS_LINE||"",antisports_live:window.DISALLOWED_SPORTS_LIVE||"",lite_version:parseInt(window.Core.cookie.get("lite_version",0)),cyberSports:[42,85,86,89,90,91,93,94,96,97,98,99,100,101,103,104,106,107,108,109,110,114,115,116,117,120,121,123,125,127,128,129,130,131,134,135,136,139,141,143,144,145,148,150,152,154,158,160,162,165,167,166,169,170,172,168,177,178,179,181,183,184,187,190,191,192,193,194,195,196,199,200,201,205,207,208,209,211,212,213,214,215,218,219,221,223,224,225,227,228,229,231,232,233,237],cyber_blocked_refIds:[15,44,85,74,208,209,210,211],currSection:"",isLive:"",is_bet_on_your_page:window.location.pathname.indexOf(window.BET_ON_YOUR_PAGE_URL_PREFIX)!==-1,CONST_LINE:"line",CONST_LIVE:"live",CONST_SPORTS:"sports",CONST_CYBER:"cyber",CONST_MAIN:"",CONST_MULTI:"multi",CONST_CRICKET:"cricket",CONST_LIVEANONS:"liveanons",CONST_RESULTS:"results",CONST_MATCH_OF_DAYS:"matchofdays",CONST_CHAMPS:"champs",CONST_MAN_U:"manchester",CONST_TEAMS:"team",CONST_SPONSORS:"partnerclubs",CONST_HOURSERACE:"hourserace",CONST_UFC:"ufc",CONST_POLITICS:"politics",CONST_FINANCE:"finance",CONST_INFORMATION:"information",CONST_ASIA_LIVE:"live_asia",CONST_TOTAL:"total",CONST_TODAY:"today",CONST_OUTRIGHTS:"outrights",CONST_MONEYLINE:"moneyline",CONST_EARLY:"early",CONST_FIRSTHALF:"firsthalf",currSport:0,currLiga:"live_asia",asia_view:null,is_asia:!!parseInt(Core.cookie.get("asia_view",0)),CONST_BUILDER:"builder",CONST_ROULETTE:"roulette",CONST_EVENTS:"events",load_components:{builder:false,roulette:false},refId:window.REF_ID,partnerId:window.REF_ID===1?0:window.REF_ID,is_kassa:user_settings.isKassa(),openedSports:[],openedSportsSections:[],openedLeagues:[],openedGames:[],window_width:0,show_game_num:!!parseInt(Core.cookie.get("show_number_game",0)),express_of_day:{show_line:!parseInt(Core.cookie.get("disable_line_express",0)),show_live:!parseInt(Core.cookie.get("disable_live_express",0))},compact_view:!parseInt(Core.cookie.get("compact_vid_off",0))&&typeof IFRAME_REF_ID==="undefined",xhr_live:typeof IS_SOCKET_PROTOCOL_ACCESS_LIVE!=="undefined"?!IS_SOCKET_PROTOCOL_ACCESS_LIVE:true,xhr_line:typeof IS_SOCKET_PROTOCOL_ACCESS_LINE!=="undefined"?!IS_SOCKET_PROTOCOL_ACCESS_LINE:true,xhr:typeof IS_SOCKET_PROTOCOL_ACCESS!=="undefined"?!IS_SOCKET_PROTOCOL_ACCESS:true,rtl:Number(Core.cookie.get("is_rtl"))===2,iFrameId:typeof IFRAME_REF_ID!=="undefined"?IFRAME_REF_ID:0,CONST_IFRAME_METHODID_LIVE:1,CONST_IFRAME_METHODID_LINE:2,CONST_IFRAME_METHODID_FINANCE:6,has_fav:false,has_builder_buid:false},WebSocket:{uri:"wss://"+window.location.host+"/WsLive.svc/",instance:{},params:{LIVE:{URL:"/LiveR",HUB_NAME:"liveHub"},LINE:{URL:"/LineR",HUB_NAME:"lineHub"}},status:{SUCCESS:0},lastUIid:0,UIids:[],METHODS:{REGISTER:"RG",LEFT_MENU_SPORTS:"LS",LEFT_MENU_LEAGUES:"LC",LEFT_MENU_GAMES:"LG",DASHBOARD:"W1x2",GETGAME:"GG",SUB_GAMES:"SG"},ACT_STATUS:{CHANGE:0,DEL:1,ADD:2},opening_socket_timeout_id:null,get_params_by_storage_name:function get_params_by_storage_name(e){switch(e){case store_global.state.GLOBAL.CONST_LINE:return{URL:"/LineR",HUB_NAME:"lineHub"};default:return{URL:"/LiveR",HUB_NAME:"liveHub"};}},open:function open(t){var s=this;this.close(t);this.instance[t]={};return this.instance[t].promise=new ES6Promise(function(e,a){var o=s.get_params_by_storage_name(t),r=[78,51].indexOf(store_global.state.GLOBAL.refId)!==-1&&!window.DEBUG_MODE?":8080":"";s.instance[t].connection=$.hubConnection("https://"+window.location.host+r+o.URL,{useDefaultUrl:false});s.instance[t].hub=s.instance[t].connection.createHubProxy(o.HUB_NAME);s.instance[t].connection.logging=false;s.instance[t].connection.disconnectTimeout=86400000;s.instance[t].connection.error(function(e){console.error(e);a()});s.instance[t].hub.on("NotifyUser",function(a){try{a=JSON.parse(a)}catch(o){store_global.dispatch("saveToLog",{msg_type:store_global.state.CONST_LOG_TYPE_RESPONSE_HANDLE_EXCEPTION,backtrace:o.stack,service_response:a,service_uri:s.instance[t].connection.appRelativeUrl});return 0}if(a.H.UI&&s.UIids.indexOf(a.H.UI)===-1){console.error("\u041F\u0440\u0438\u0448\u043B\u0438 \u0441\u0442\u0430\u0440\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435");return 0}if(a.B.ET){console.error(a.B.ET);if(a.H.M!==s.METHODS.GETGAME&&a.H.M!==s.METHODS.DASHBOARD){return 0}}switch(a.H.M){case s.METHODS.REGISTER:if(a.B&&a.B.ST===s.status.SUCCESS){e()}break;case s.METHODS.LEFT_MENU_SPORTS:store_global.dispatch("menu/setLeftMenuSportsSocket",{data:a});break;case s.METHODS.LEFT_MENU_LEAGUES:store_global.dispatch("menu/setLeftMenuLeaguesSocket",{data:a});break;case s.METHODS.LEFT_MENU_GAMES:store_global.dispatch("menu/setLeftMenuGamesSocket",{data:a});break;case s.METHODS.DASHBOARD:store_global.dispatch("dashboard/setDashboardSocket",{data:a,empty:a.B.ET});break;case s.METHODS.GETGAME:var o=function message(){store_global.dispatch("game/setGameSocket",{data:a,finished:a.B.ET})};if(store_global.getters["game/is_component_mounted"]){o()}else{var r=a.B.I||store_global.getters["game/get_id_by_ui"](a.H.UI);if(store_global.state.game.games[r].is_main&&!store_global.state.game.main_game_id){store_global.commit("game/setMainGameId",r)}store_global.dispatch("game/pushSocketMessagesQueue",{message:o})}break;case s.METHODS.SUB_GAMES:store_global.dispatch("dashboard/setSubGames",{data:a});break;default:break;}});s.instance[t].connection.stateChanged(function(e){switch(e.newState){case $.signalR.connectionState.reconnecting:console.error("signalR reconnect: "+t);break;case $.signalR.connectionState.connected:if(store_global.state.GLOBAL.xhr){s.close(t);return}var a={L:store_global.state.GLOBAL.lng,CV:store_global.state.GLOBAL.cfview};if(store_global.state.GLOBAL.partnerId){a.P=store_global.state.GLOBAL.partnerId}if(store_global.state.GLOBAL.cfdata){a.I=store_global.state.GLOBAL.userId}a.storage_name=t;s.send({M:s.METHODS.REGISTER},a);break;case $.signalR.connectionState.disconnected:s.instance[t]=null;break;}});s.instance[t].connection.start({waitForPageLoad:false,transport:["webSockets","longPolling","foreverFrame","serverSentEvents"]})})},send:function send(e,t){var s=this,a=t.storage_name;if(!e){e={}}if(!t){t={}}if(this.instance[a]){switch(this.instance[a].connection.state){case $.signalR.connectionState.connected:delete t.storage_name;this.instance[a].hub.invoke("subscribe",JSON.stringify({H:e,RQ:t})).fail(function(e){console.log(e)});break;case $.signalR.connectionState.disconnected:case $.signalR.connectionState.connecting:if(this.instance[a].promise){ES6Promise.resolve(this.instance[a].promise).then(function(){s.send(e,t)}).catch(function(e){console.error(e)})}break;default:break;}}else{this.open(a).then(function(){s.send(e,t)});var o=setTimeout(function(){if(s.instance[a].connection.state!==$.signalR.connectionState.connected){console.log("Websockets offline, switching to rest");s.close(a);store_global.commit("set_socket_access",false);store_global.commit("setSocketAccessLive",false);store_global.dispatch("forceUpdate",{})}},2500);store_global.commit("setOpeningSocketTimeoutId",o)}},close:function close(e,t){if(this.instance[e]){var s=store_global.getters["opening_socket_timeout_id"];if(s){clearTimeout(s);store_global.commit("setOpeningSocketTimeoutId",null)}var a=this;if(t){setTimeout(function(){a.instance[e].connection.stop()},0);return}a.instance[e].connection.stop()}}},xhr:{status:{CONST_DONE:4}},CONST_LOG_TYPE_ERROR_CODE:1,CONST_LOG_TYPE_RESPONSE_HANDLE_EXCEPTION:2}},actions:{clearCommon:function clearCommon(e){e.dispatch("game/clearGames");e.dispatch("menu/clear_all");e.dispatch("dashboard/closeDashboard");e.commit("clear_opened_sports");e.commit("clear_opened_champs")},forceUpdate:function forceUpdate(e,t){t.currSection=e.state.GLOBAL.currSection;if(t&&t.old_section){if(t.old_section!==t.currSection){e.dispatch("checkSocketAccess")}e.dispatch("clearCommon").then(function(){Object.keys(e.state.WebSocket.instance).map(function(s){e.state.WebSocket.close(s,t.old_section!==t.currSection)});e.dispatch("forceUpdateAfter",t)});return}e.dispatch("forceUpdateAfter",t)},forceUpdateAfter:function forceUpdateAfter(e,t){if(t.currSection==e.rootState.GLOBAL.CONST_SPORTS&&t&&t.first){e.dispatch("setCurrState",$.extend({},t,{sportId:back_vars.sportId,liga:back_vars.champId}))}e.dispatch("dashboard/setCurrStorageName");e.dispatch("menu/setCurrStorageName");var s=location.pathname.substr(1,location.pathname.length);if(s[s.length-1]!=="/"){s+="/"}s=s.split("/");s.pop();if(s.length&&s[0].length===2){s.shift()}if(s.length&&s[0]==="iframe"){s.shift()}if(e.state.GLOBAL.is_bet_on_your_page){s.shift()}if(e.state.GLOBAL.iFrameId){s=[]}switch(s.length){case 2:if(t&&t.first){e.dispatch("set_global_state",$.extend({},t,{sports:[back_vars.sportId]}))}else{var a=back_vars.sports.find(function(e){return e.name==s[1].replace(" ","").replace("-","")});e.dispatch("set_global_state",$.extend({},t,{sports:a?[a.id]:[]}))}break;case 3:if(t&&t.first){e.dispatch("set_global_state",$.extend({},t,{sports:[back_vars.sportId],champs:[back_vars.champId]}))}else{var a=back_vars.sports.find(function(e){return e.name==s[1].replace(" ","").replace("-","")}),o=parseInt(s[2].split("-")[0]);e.dispatch("set_global_state",$.extend({},t,{sports:a?[a.id]:[],champs:[o]}))}break;case 4:case 5:if(s.length==5&&e.rootState.GLOBAL.currSection!=e.rootState.GLOBAL.CONST_SPORTS){e.dispatch("set_global_state",$.extend({},t,{sports:[],champs:[]}));break}if(t&&t.first){e.dispatch("set_global_state",$.extend({},t,{sports:[back_vars.sportId],champs:[back_vars.champId],gameId:back_vars.gameId}))}else{var r=parseInt(s[3].split("-")[0]);if(e.rootState.GLOBAL.currSection===e.rootState.GLOBAL.CONST_SPORTS){var n=s[2];if(s.length===5){n=s[3];r=parseInt(s[4].split("-")[0])}e.dispatch("set_global_state",$.extend({},t,{sports:[],champs:[n],gameId:r}));return 0}var a=back_vars.sports.find(function(e){return e.name==s[1].replace(" ","").replace("-","")}),o=parseInt(s[2].split("-")[0]);e.dispatch("set_global_state",$.extend({},t,{sports:a?[a.id]:[],champs:[o],gameId:r}))}break;default:var i=[e.state.GLOBAL.CONST_CRICKET,e.state.GLOBAL.CONST_HOURSERACE,e.state.GLOBAL.CONST_UFC,e.state.GLOBAL.CONST_POLITICS];if(i.indexOf(e.state.GLOBAL.currSection)!==-1&&t&&t.first){e.dispatch("set_global_state",$.extend({},t,{sports:[back_vars.sportId]}))}else{e.dispatch("set_global_state",$.extend({},t,{sports:[],champs:[]}))}break;}},set_global_state:function set_global_state(e,t){switch(true){case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_CRICKET:case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_HOURSERACE:case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_UFC:case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_POLITICS:e.dispatch("toggleSports",{sportId:t.sports[0],dash_skip:true,menu_skip:true,remove_off:true,storage_name:e.state.GLOBAL.CONST_LIVE,first:t.first,force:true});e.dispatch("toggleSports",{sportId:t.sports[0],dash_skip:true,menu_skip:true,remove_off:true,storage_name:e.state.GLOBAL.CONST_LINE,first:t.first,force:true});var s=e.state.GLOBAL.isLive?e.state.GLOBAL.CONST_LIVE:e.state.GLOBAL.CONST_LINE;if(t.champs&&t.champs.length){e.dispatch("toggleChamps",{sportId:back_vars.sportId,champId:t.champs[0],dash_skip:true,menu_skip:true,remove_off:true,storage_name:s,first:t.first})}e.dispatch("menu/getLeftMenuSports",t);if((e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_UFC||e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_POLITICS)&&t.gameId){var a=location.pathname.substr(1,location.pathname.length);if(a[a.length-1]!=="/"){a+="/"}a=a.split("/");a.pop();if(a.length&&a[0].length===2){a.shift()}e.dispatch("game/getGame",{gameId:t.gameId,is_live:a[1]===e.rootState.GLOBAL.CONST_LIVE,is_main:true},{root:true});e.dispatch("menu/toggleLeftMenuSubGames",{sportId:back_vars.sportId,champId:t.champs[0],gameId:t.gameId,remove_off:true,storage_name:s,request_off:true})}else{e.dispatch("dashboard/getDashboard",t)}break;case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_MAIN&&e.state.GLOBAL.asia_view:case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_LIVEANONS:e.dispatch("menu/getLeftMenuSports",t);e.dispatch("dashboard/getDashboard",t);break;case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_MAIN:case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_LINE:case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_LIVE:case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_MAN_U:case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_TEAMS:case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_SPONSORS:var s=t.storage_name?t.storage_name:e.state.GLOBAL.isLive?e.state.GLOBAL.CONST_LIVE:e.state.GLOBAL.CONST_LINE;if(!e.state.GLOBAL.xhr){e.dispatch("menu/getLeftMenuSports",t);if(t.gameId){e.dispatch("game/getGame",{gameId:t.gameId,is_live:s===e.state.GLOBAL.CONST_LIVE,is_main:true},{root:true});e.dispatch("menu/toggleLeftMenuSubGames",{sportId:t.sports[0],champId:t.champs[0],gameId:t.gameId,remove_off:true,storage_name:s,request_off:true})}else{e.dispatch("dashboard/getDashboard",t)}if(t.sports&&t.sports.length){t.sports.map(function(a){ES6Promise.resolve(e.state.menu.storage[s].promise.instance).then(function(){var o=e.state.menu.storage[s].Sports.findIndex(function(e){if(t.first&&typeof e.SportId==="string"&&e.SportId.indexOf("|")!==-1&&typeof t.sportId!=="string"){return e.SportId.split("|")[0]==a}return e.SportId==a});e.dispatch("toggleSports",{sportId:a,dash_skip:true,remove_off:true,storage_name:s,first:t.first});if(t.champs&&t.champs.length){t.champs.map(function(r){ES6Promise.resolve(e.state.menu.storage[s].Sports[o].promise.instance).then(function(){e.dispatch("toggleChamps",{sportId:a,champId:r,dash_skip:true,remove_off:true,storage_name:s,first:t.first});var n=e.state.menu.storage[s].Sports[o].Champs.findIndex(function(e){return e.LigaId===r});ES6Promise.resolve(e.state.menu.storage[s].Sports[o].Champs[n].promise.instance).then(function(){Vue.nextTick(function(){setTimeout(function(){var e=".left_menuEventCon_slide li a[data-game='"+t.gameId+"']";if(!$(e).length){e=".left_menuEventCon_slide li a[data-champ='"+r+"']"}if(e.length&&store_global.state.menu.scrollbar_api){store_global.state.menu.scrollbar_api.refresh();store_global.state.menu.scrollbar_api.scrollToElement(e,1000,0,-262,iscroll.utils.ease.circular)}},2500)})})}).catch(function(e){console.error(e)})})}}).catch(function(e){console.error(e)})})}}else{if(t.sports&&t.sports.length){t.sports.map(function(a){e.dispatch("toggleSports",{sportId:a,dash_skip:t.gameId||t.champs&&t.champs.length,menu_skip:t.champs&&t.champs.length,storage_name:s,first:t.first,remove_off:true});if(t.champs&&t.champs.length){t.champs.map(function(o){e.dispatch("toggleChamps",{sportId:a,champId:o,dash_skip:t.gameId,remove_off:true,storage_name:s,first:t.first});Vue.nextTick(function(){setTimeout(function(){var e=".left_menuEventCon_slide li a[data-game='"+t.gameId+"']";if(!$(e).length){e=".left_menuEventCon_slide li a[data-champ='"+o+"']"}if(e.length&&store_global.state.menu.scrollbar_api){store_global.state.menu.scrollbar_api.refresh();store_global.state.menu.scrollbar_api.scrollToElement(e,1000,0,-262,iscroll.utils.ease.circular)}},2500)})})}})}if((!t.sports||!t.sports.length)&&(!t.champs||!t.champs.length)){e.dispatch("menu/getLeftMenuSports",t);e.dispatch("dashboard/getDashboard",t)}if(t.gameId){e.dispatch("game/getGame",{gameId:t.gameId,is_live:s===e.state.GLOBAL.CONST_LIVE,is_main:true},{root:true});e.dispatch("menu/toggleLeftMenuSubGames",{sportId:t.sports[0],champId:t.champs[0],gameId:t.gameId,remove_off:true,storage_name:s,request_off:true})}}break;case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_CYBER:var s=e.state.GLOBAL.isLive?e.state.GLOBAL.CONST_LIVE:e.state.GLOBAL.CONST_LINE;e.dispatch("menu/getLeftMenuSports",t);if(t.gameId){e.dispatch("game/getGame",{gameId:t.gameId,is_live:e.state.GLOBAL.isLive,is_main:true},{root:true});e.dispatch("menu/toggleLeftMenuSubGames",{sportId:t.sports[0],champId:t.champs[0],gameId:t.gameId,remove_off:true,is_live:e.state.GLOBAL.isLive,request_off:true})}e.dispatch("dashboard/getDashboard",t);if(t.sports&&t.sports.length){t.sports.map(function(a){ES6Promise.resolve(e.state.menu.storage[s].promise.instance).then(function(){var o=e.state.menu.storage[s].Sports.findIndex(function(e){return e.SportId==a});e.dispatch("toggleSports",{sportId:a,dash_skip:true,remove_off:true,storage_name:s,first:t.first});if(t.champs&&t.champs.length){t.champs.map(function(r){ES6Promise.resolve(e.state.menu.storage[s].Sports[o].promise.instance).then(function(){e.dispatch("toggleChamps",{sportId:a,champId:r,dash_skip:true,remove_off:true,storage_name:s,first:t.first});var n=e.state.menu.storage[s].Sports[o].Champs.findIndex(function(e){return e.LigaId===r});ES6Promise.resolve(e.state.menu.storage[s].Sports[o].Champs[n].promise.instance).then(function(){Vue.nextTick(function(){setTimeout(function(){var e=".left_menuEventCon_slide li a[data-game='"+t.gameId+"']";if(!$(e).length){e=".left_menuEventCon_slide li a[data-champ='"+r+"']"}if(e.length&&store_global.state.menu.scrollbar_api){store_global.state.menu.scrollbar_api.refresh();store_global.state.menu.scrollbar_api.scrollToElement(e,1000,0,-262,iscroll.utils.ease.circular)}},2500)})})}).catch(function(e){console.error(e)})})}}).catch(function(e){console.error(e)})})}break;case e.state.GLOBAL.currSection===e.state.GLOBAL.CONST_SPORTS:e.dispatch("menu/getLeftMenuSports",t);if(t.gameId){e.dispatch("game/getGame",{gameId:t.gameId,is_live:e.state.GLOBAL.isLive,is_main:true},{root:true});e.dispatch("menu/toggleLeftMenuSubGames",{sportId:t.sports[0],storage:t.champs[0],gameId:t.gameId,is_live:e.state.GLOBAL.isLive,request_off:true})}var s=e.state.GLOBAL.currLiga===e.state.GLOBAL.CONST_LIVE?e.state.GLOBAL.CONST_ASIA_LIVE:e.state.GLOBAL.currLiga;if(t.sports&&t.sports.length){t.sports.map(function(a){e.dispatch("toggleSports",{sportId:a,dash_skip:t.gameId,menu_skip:t.champs&&t.champs.length,storage_name:s,first:t.first})})}else{e.dispatch("dashboard/getDashboard",t)}break;default:break;}},setCurrSection:function setCurrSection(e,t){var s=e.getters.getCurSection;e.commit("setCurrSection",{section:t,action:e.getters.getAction()});if(e.getters["dashboard/"+"is_active_recommended_dashboard"]){e.dispatch("dashboard/"+"unsetRecommendedDashboard")}if([e.state.GLOBAL.CONST_LIVE,e.state.GLOBAL.CONST_LINE,e.state.GLOBAL.CONST_SPORTS].indexOf(s)!==-1){store_global.dispatch("forceUpdate",{old_section:s})}},toggleSports:function toggleSports(e,t){if(e.getters.get_opened_sportIds.indexOf(t.sportId)===-1||t.force){e.dispatch("addOpenedSports",t)}else{if(!t.remove_off){e.dispatch("removeOpenedSports",t)}}},toggleChamps:function toggleChamps(e,t){if(e.getters.get_opened_champsIds.indexOf(t.champId)===-1||t.force){e.dispatch("addOpenedChamps",t)}else{if(!t.remove_off){e.dispatch("removeOpenedChamps",t)}}},addOpenedSports:function addOpenedSports(e,t){if(e.getters.get_opened_sportIds.indexOf(t.sportId)===-1){e.commit("addOpenedSports",t)}if(Vue.component("left-menu")&&(e.state.GLOBAL.xhr||e.getters["menu/check_storage"](t.storage_name))){e.dispatch("menu/addOpenedSports",t)}if(Vue.component("dashboard")){e.dispatch("dashboard/addOpenedSports",t)}},addOpenedChamps:function addOpenedChamps(e,t){if(e.getters.get_opened_champsIds.indexOf(t.champId)===-1){e.commit("addOpenedChamps",t)}if(Vue.component("left-menu")&&(e.state.GLOBAL.xhr||e.getters["menu/check_storage"](t.storage_name))){e.dispatch("menu/addOpenedChamps",t)}if(Vue.component("dashboard")){e.dispatch("dashboard/addOpenedChamps",t)}},removeOpenedSports:function removeOpenedSports(e,t){e.commit("removeOpenedSports",t);if(Vue.component("left-menu")&&e.getters["menu/check_storage"](t.storage_name)){e.dispatch("menu/removeOpenedSports",t)}e.dispatch("dashboard/removeOpenedSports",t)},removeOpenedChamps:function removeOpenedChamps(e,t){e.commit("removeOpenedChamps",t);if(Vue.component("left-menu")&&e.getters["menu/check_storage"](t.storage_name)){e.dispatch("menu/removeOpenedChamps",t)}e.dispatch("dashboard/removeOpenedChamps",t)},setCurrState:function setCurrState(e,t){if(t.sportId||t.liga){e.commit("setAsiaState",t)}},checkSocketAccess:function checkSocketAccess(e){switch(e.getters.getSection()){case e.state.GLOBAL.CONST_LIVE:e.commit("set_socket_access",!e.state.GLOBAL.xhr_live);break;case e.state.GLOBAL.CONST_LINE:e.commit("set_socket_access",!e.state.GLOBAL.xhr_line);break;default:e.commit("set_socket_access",!e.state.GLOBAL.xhr);break;}},handleAjaxError:function handleAjaxError(e,t){if(t&&t.jqXHR&&t.jqXHR.status>=400&&t.context.url){e.dispatch("saveToLog",{msg_type:e.state.CONST_LOG_TYPE_ERROR_CODE,service_uri:t.context.url,status_code:t.jqXHR.status,service_params:t.params?JSON.stringify(params):"",service_response:t.jqXHR.responseText},{root:true})}},saveToLog:function saveToLog(e,t){$.ajax({url:"/savetolog",dataType:"json",data:t})},load_videos_from_cookie:function load_videos_from_cookie(t,s){if(typeof NEW_MAIN!=="undefined"&&NEW_MAIN){return}var a=s.game||false,o=Core.cookie.get("videos","");if(o.length){o=JSON.parse(o);o.map(function(s){if(!a||s.gameId===a){t.dispatch("videos/change_state",s)}})}},addFavorite:function addFavorite(e,t){document.dispatchEvent(new CustomEvent("include.favorite"));if(e.state.GLOBAL.has_fav){e.dispatch("favorites/add",t)}else{localStorage.setItem("favorites",JSON.stringify([t]))}},checkComponents:function checkComponents(e,t){if(!e.state.GLOBAL.load_components[t]){adding_scripts.getBundle(t)}}},mutations:{setSilentMode:function setSilentMode(e,t){e.GLOBAL.isSilentMode=t},setCurrSection:function setCurrSection(e,t){e.GLOBAL.currSection=t.section;e.GLOBAL.isLive=function(){switch(true){case t.section===e.GLOBAL.CONST_LINE:case t.section===e.GLOBAL.CONST_MAN_U:case t.section===e.GLOBAL.CONST_TEAMS:case t.section===e.GLOBAL.CONST_SPONSORS:case t.section===e.GLOBAL.CONST_LIVEANONS:case t.section===e.GLOBAL.CONST_SPORTS&&t.action===e.GLOBAL.CONST_OUTRIGHTS:case t.section===e.GLOBAL.CONST_SPORTS&&t.action===e.GLOBAL.CONST_TODAY:case t.section===e.GLOBAL.CONST_SPORTS&&t.action===e.GLOBAL.CONST_EARLY:case t.section===e.GLOBAL.CONST_SPORTS&&t.action===e.GLOBAL.CONST_MONEYLINE:case t.section===e.GLOBAL.CONST_SPORTS&&t.action===e.GLOBAL.CONST_TOTAL:case t.section===e.GLOBAL.CONST_SPORTS&&t.action===e.GLOBAL.CONST_FIRSTHALF:case t.section===e.GLOBAL.CONST_POLITICS&&t.action===e.GLOBAL.CONST_LINE:case t.section===e.GLOBAL.CONST_UFC&&t.action===e.GLOBAL.CONST_LINE:return false;default:return true;}}()},addWebSocketsUIid:function addWebSocketsUIid(e,t){e.WebSocket.lastUIid=t;if(e.WebSocket.UIids.indexOf(t)==-1){e.WebSocket.UIids.push(t)}},removeWebSocketsUIid:function removeWebSocketsUIid(e,t){e.WebSocket.UIids=e.WebSocket.UIids.filter(function(e){return e!=t})},vue_set_recursive:function vue_set_recursive(e,t){if(Object.prototype.toString.call(t.value)==="[object Object]"){if(typeof t.path[t.prop]=="undefined"){Vue.set(t.path,t.prop,t.value);return 0}for(var s in t.value){if(t.value.hasOwnProperty(s)){store_global.commit("vue_set_recursive",{path:t.path[t.prop],prop:s,value:t.value[s]})}}return 0}else{Vue.set(t.path,t.prop,t.value)}},addOpenedSports:function addOpenedSports(e,t){e.GLOBAL.openedSports.push({sportId:t.sportId})},addOpenedChamps:function addOpenedChamps(e,t){e.GLOBAL.openedLeagues.push({champId:t.champId})},removeOpenedSports:function removeOpenedSports(e,t){e.GLOBAL.openedSports=e.GLOBAL.openedSports.filter(function(e){return e.sportId!=t.sportId})},removeOpenedChamps:function removeOpenedChamps(e,t){e.GLOBAL.openedLeagues=e.GLOBAL.openedLeagues.filter(function(e){return e.champId!=t.champId})},clear_opened_sports:function clear_opened_sports(e,t){e.GLOBAL.openedSports=[]},clear_opened_champs:function clear_opened_champs(e,t){e.GLOBAL.openedLeagues=[]},set_window_width:function set_window_width(e,t){e.GLOBAL.window_width=t.width},auth_mutation:function auth_mutation(e,t){e.GLOBAL.userId=parseInt(Core.cookie.get("ua",0));e.GLOBAL.uhash=Core.cookie.get("uhash");e.GLOBAL.cfdata=Core.cookie.get("cfdata","")},setAsiaState:function setAsiaState(e,t){if(t.sportId){e.GLOBAL.currSport=t.sportId}e.GLOBAL.currLiga=t.liga?t.liga:e.GLOBAL.CONST_LIVE},set_compact_view:function set_compact_view(e,t){e.GLOBAL.compact_view=t},set_indicator:function set_indicator(e,t){e.GLOBAL.indicator=t},set_socket_access:function set_socket_access(e,t){e.GLOBAL.xhr=!t},set_user_id:function set_user_id(e,t){e.GLOBAL.userId=user_balance.getMainUserId()},set_show_game_num:function set_show_game_num(e,t){e.GLOBAL.show_game_num=t.val},setAsiaView:function setAsiaView(e,t){e.GLOBAL.asia_view=t.value},setFavorite:function setFavorite(e,t){e.GLOBAL.has_fav=true},setComponents:function setComponents(e,t){e.GLOBAL.load_components[t]=true},setOpeningSocketTimeoutId:function setOpeningSocketTimeoutId(e,t){e.WebSocket.opening_socket_timeout_id=t},setSocketAccessLive:function setSocketAccessLive(e,t){e.GLOBAL.xhr_live=!t}},getters:{get_game_for_me:function get_game_for_me(e){return function(t){return typeof e.game!=="undefined"&&typeof e.game.games!=="undefined"&&typeof e.game.games[t]!=="undefined"?e.game.games[t]:null}},is_show_zone:function is_show_zone(e){return[15].indexOf(e.GLOBAL.refId)===-1},getCurSection:function getCurSection(e){return e.GLOBAL.currSection},getNewUI:function getNewUI(e){return function(){var t=e.WebSocket.lastUIid+1;store_global.commit("addWebSocketsUIid",t);return t}},getSection:function getSection(e){return function(){if(e.GLOBAL.iFrameId){var t=findGetParameter("method_id");if(t){switch(parseInt(t)){case e.GLOBAL.CONST_IFRAME_METHODID_LINE:return e.GLOBAL.CONST_LINE;case e.GLOBAL.CONST_IFRAME_METHODID_FINANCE:return e.GLOBAL.CONST_FINANCE;default:return e.GLOBAL.CONST_LIVE;}}return findGetParameter("page")}var s=new RegExp(/\/([0-9A-Z_]+)/ig),a=window.location.pathname.match(s),o="";if(a&&a.length){a=a.filter(function(e){return e.length>3});if(a.length){o=a.shift();if(["/iframe","/"+window.BET_ON_YOUR_PAGE_URL_PREFIX].indexOf(o)!==-1){o=a.shift()}}else{return o}}return o.substr(1)}},getAction:function getAction(e){return function(){var t=new RegExp(/\/([0-9A-Z_]+)/ig),s=window.location.pathname.match(t),a="";if(s&&s.length){s=s.filter(function(e){return e.length>3});if(s.length>=2){a=e.GLOBAL.is_asia?s[2]||"":s[1]}else{return a}}return a.substr(1)}},getSportUrl:function getSportUrl(e){return function(t,s){var a,s=s?s:e.GLOBAL.currSection;switch(true){case!!t.SportNameEng.length:a=t.SportNameEng.translit();break;case!!t.SportName.length:a=t.SportName.translit();break;case!!t.SportNameRus.length:a=t.SportNameRus.translit();break;default:a="";break;}return(e.GLOBAL.asia_view?"sports":s)+"/"+(a?a+"/":"")}},getChampUrl:function getChampUrl(e){return function(e){return e.LigaId+"-"+(e.ChampEng?e.ChampEng.translit():e.Champ?e.Champ.translit():e.ChampRus?e.ChampRus.translit():e.LigaEng?e.LigaEng.translit():e.Liga?e.Liga.translit():"")+"/"}},getGameUrl:function getGameUrl(){return function(e){return(e.ConstId?e.ConstId:e.Id?e.Id:e.GameId?e.GameId:"")+"-"+(e.Opp1Eng&&e.Opp2Eng?e.Opp1Eng.translit()+"-"+e.Opp2Eng.translit():e.Opp1Eng?e.Opp1Eng.translit():e.ChampEng?e.ChampEng.translit():e.Opp1&&e.Opp2?e.Opp1.translit()+"-"+e.Opp2.translit():e.Opp1?e.Opp1.translit():e.Champ?e.Champ.translit():"")+"/"}},getMainGameUrlFromSub:function getMainGameUrlFromSub(){return function(e){return(e.MainGameConstId?e.MainGameConstId:e.MainGameId)+"-"+(e.Opp1Eng&&e.Opp2Eng?e.Opp1Eng.translit()+"-"+e.Opp2Eng.translit():e.Opp1Eng?e.Opp1Eng.translit():e.ChampEng?e.ChampEng.translit():e.Opp1&&e.Opp2?e.Opp1.translit()+"-"+e.Opp2.translit():e.Opp1?e.Opp1.translit():e.Champ?e.Champ.translit():"")+"/"}},getDateByUNIXTIME:function getDateByUNIXTIME(e){return function(t){var s=new Date((t+3600*e.GLOBAL.tzo)*1000),a=s.getUTCDate(),o=s.getUTCMonth()+1,r=s.getUTCFullYear();if(a<10)a="0"+a;if(o<10)o="0"+o;return a+"."+o+"."+r}},getDateByUNIXTIME_exclude_year:function getDateByUNIXTIME_exclude_year(e){return function(t){var s=new Date((t+3600*e.GLOBAL.tzo)*1000),a=s.getUTCDate(),o=s.getUTCMonth()+1;if(a<10)a="0"+a;if(o<10)o="0"+o;return a+"."+o}},getDateByUNIXTIME_exclude_year_full_month:function getDateByUNIXTIME_exclude_year_full_month(e){return function(t){var s=new Date((t+3600*e.GLOBAL.tzo)*1000),a=s.getUTCDate(),o=dictionary["month"+s.getUTCMonth()];return a+" "+o}},getTimeByUNIXTIME:function getTimeByUNIXTIME(e){return function(t){var s=new Date((t+3600*e.GLOBAL.tzo)*1000),a=s.getUTCHours(),o=s.getUTCMinutes();if(a<10)a="0"+a;if(o<10)o="0"+o;return a+":"+o}},getTimeStringUntilByUNIXTIME:function getTimeStringUntilByUNIXTIME(e){return function(e){var t=new Date(e*1000).valueOf(),s=Math.floor(t-new Date().valueOf());var a,o,r,n,i=60*1000,c=i*60,d=c*24;if(s>=0){a=Math.floor(s/d);s-=d*a;o=Math.floor(s/c);s-=c*o;r=Math.floor(s/i);s-=i*r;n=Math.floor(s/1000);if(r){if(r<10){r="0"+r}}if(n<10){n="0"+n}}else{return{days:0,hours:0,mins:0,secs:0}}return{days:a,hours:o,mins:r,secs:n}}},getTimeStringByUNIXTIME:function getTimeStringByUNIXTIME(e){return function(e){var t,s,a,o,r=60*1000,n=r*60,i=n*24;if(e>=0){t=Math.floor(e/i);e-=i*t;s=Math.floor(e/n);e-=n*s;a=Math.floor(e/r);e-=r*a;o=Math.floor(e/1000);if(a){if(a<10){a="0"+a}}if(o<10){o="0"+o}}else{return{days:0,hours:0,mins:0,secs:0}}return{days:t,hours:s,mins:a,secs:o}}},get_opened_sportIds:function get_opened_sportIds(e,t,s,a){if(e.GLOBAL.openedSports.length){return e.GLOBAL.openedSports.map(function(e){return e.sportId})}return e.GLOBAL.openedSports},get_opened_champsIds:function get_opened_champsIds(e,t,s,a){if(e.GLOBAL.openedLeagues.length){return e.GLOBAL.openedLeagues.map(function(e){return e.champId})}return e.GLOBAL.openedLeagues},get_opened_gameIds:function get_opened_gameIds(e,t,s,a){return e.GLOBAL.openedGames},getCfParam:function getCfParam(e,t,s,a){var o="";if(e.GLOBAL.cfdata){var r=e.GLOBAL.cfdata.split("%");if((r[0]!=""||r[2]!="")&&!e.GLOBAL.isLive||r[1]!=""&&e.GLOBAL.isLive){o=e.GLOBAL.userId}}return o},midnight:function midnight(e,t,s,a){return function(){var e,t,s;t=new Date||0;if(!t){return 1440}e=24-t.getHours();s=t.getMinutes();return e*60-s}},is_cyber_sport:function is_cyber_sport(e,t,s,a){return function(t){return e.GLOBAL.cyberSports.indexOf(t)!=-1}},get_cyber_type:function get_cyber_type(e,t,s,a){if([51,153].indexOf(e.GLOBAL.refId)!==-1&&!e.GLOBAL.xhr){return 3}else if(typeof window.IFRAME_CYBER_TYPE!=="undefined"){return window.IFRAME_CYBER_TYPE}else if(e.GLOBAL.currSection===e.GLOBAL.CONST_CYBER||typeof is_iframe_cyber!=="undefined"&&parseInt(is_iframe_cyber)===1){return 1}else if(e.GLOBAL.cyber_blocked_refIds.indexOf(e.GLOBAL.refId)!==-1){return 2}return 0},get_section_name:function get_section_name(e,t,s,a){return function(t){if(!t){t=e.GLOBAL.currSection}if(e.GLOBAL.is_bet_on_your_page){return window.dictionary.betsonyour}switch(t){case e.GLOBAL.CONST_LINE:return dictionary.line;case e.GLOBAL.CONST_LIVE:return dictionary.live;case e.GLOBAL.CONST_CYBER:return dictionary.cyber;case e.GLOBAL.CONST_MAIN:return dictionary.main;case e.GLOBAL.CONST_MULTI:return dictionary.multi;case e.GLOBAL.CONST_CRICKET:return dictionary.cricket;case e.GLOBAL.CONST_TEAMS:return"";case e.GLOBAL.CONST_MAN_U:return dictionary.manchester_united;case e.GLOBAL.CONST_SPONSORS:return dictionary.partners_clubs;case e.GLOBAL.CONST_HOURSERACE:return dictionary.pointsGoldenRace;default:return t;}}},parseAsiaEvents:function parseAsiaEvents(e,t,s,a){return function(t,s,a){var o=[],r=e.GLOBAL.currLiga==e.GLOBAL.CONST_MONEYLINE?[1,2,3]:[1,3,2],n=[],i=$.isPlainObject(t)?t.Events_Asia:[];o=s.map(function(s){var e=i.filter(function(e){return s.indexOf(e.T)!=-1});if($.isPlainObject(t)){e=e.map(function(e){e.idGame=t.Id;e.FH=a;e.NameGame=t.NameGame;return e})}if(s.indexOf(1)==-1){e=e.array_chunk(2)}else{n=[];r.map(function(t){var s=e.filter(function(e){return e.T==t});n.push(!s.length?{text:"",title:""}:s.pop())});e=n}return e});return o}},getFlags:function getFlags(e,t,s,a){return function(e){var t=[{name:"Top",value:1,active:false},{name:"GetEmpty",value:2,active:true},{name:"Mobi",value:4,active:false},{name:"CountryOnly",value:8,active:Vue.component("left-menu")?s.menu.selected_country:0},{name:"AltFlag",value:16,active:false},{name:"Adult",value:32,active:helper.getenabledAdult()},{name:"HasZone",value:64,active:false},{name:"HasVideo",value:128,active:false},{name:"VirtualSports",value:256,active:true},{name:"WithCountries",value:512,active:Vue.component("left-menu")?s.menu.with_country:0},{name:"NotLogin",value:1024,active:s.GLOBAL.refId===73&&!s.GLOBAL.userId}];t=t.filter(function(e){return e.active});if(t.length){return t.reduce(function(e,t){return e+t.value},0)}return 0}},is_asia:function is_asia(e){return e.GLOBAL.is_asia},is_sports:function is_sports(e){return e.GLOBAL.currSection===e.GLOBAL.CONST_SPORTS},name_of_market_custom:function name_of_market_custom(e){return function(e,t,s){s=s||"";var a={1:"1",3:"2",3653:"1",3655:"2",11:"more",63:"more",146:"more",148:"more",150:"more",152:"more",154:"more",156:"more",158:"more",160:"more",12:"less",64:"less",147:"less",149:"less",151:"less",153:"less",155:"less",157:"less",159:"less",161:"less",13:"more",65:"more",162:"more",164:"more",166:"more",168:"more",170:"more",172:"more",174:"more",176:"more",14:"less",66:"less",163:"less",165:"less",167:"less",169:"less",171:"less",173:"less",175:"less",177:"less",7:"1",8:"2",401:"1",58:"1",2:"X",3654:"X",402:"2",59:"2",2466:"victory1",2468:"draw",2467:"victory2",4:"victory1draw",5:"victory1victory2",6:"2X",9:"more",10:"less",180:"yes",181:"no",123:"victory1",124:"victory2",15:"v1v1",16:"v1x",17:"v1v2",18:"xv1",19:"xx",20:"xv2",21:"v2v1",22:"v2x",23:"v2v2",424:"handicap_v1",425:"handicap_x",426:"handicap_v2",664:"first_goal",482:"first_goal",653:"first_goal",2948:"first_goal",3523:"both_goal_total_yes",3524:"both_goal_total_no"};var o="";if(t){o+="_"+t}if(typeof ITALY_MARKETS!=="undefined"&&ITALY_MARKETS){o+="_it"}return typeof dictionary[a[e]+o]!=="undefined"?dictionary[a[e]+o]:typeof dictionary[a[e]]!=="undefined"?dictionary[a[e]]:s||a[e]}},$_is_lite_version:function $_is_lite_version(e){return e.GLOBAL.lite_version},antisports_live:function antisports_live(e){return e.GLOBAL.antisports_live?e.GLOBAL.antisports_live.split("|").map(function(e){return parseInt(e)}):[]},antisports_line:function antisports_line(e){return e.GLOBAL.antisports_line?e.GLOBAL.antisports_line.split("|").map(function(e){return parseInt(e)}):[]},is_esports:function is_esports(e){return e.GLOBAL.refId===198},opening_socket_timeout_id:function opening_socket_timeout_id(e){return e.WebSocket.opening_socket_timeout_id},$_is_multi_live:function $_is_multi_live(e){return e.GLOBAL.currSection===e.GLOBAL.CONST_MULTI}}});function app_function(e){if(!e){e={}}return new Vue({el:!store_global.state.GLOBAL.iFrameId?"#headF":"#iframe_bind_vue",store:store_global,data:function data(){return{store:store_global.state,menu_items_hovered:[]}},beforeCreate:function beforeCreate(){if(!this.$store){this.$store=this.$options.store}this.$store.dispatch("setCurrSection",this.$store.getters.getSection());if(!e.auth){this.$store.commit("setAsiaView",{value:this.$store.state.GLOBAL.currSection!==this.$store.state.GLOBAL.CONST_CYBER&&!!parseInt(Core.cookie.get("asia_view",0))});document.dispatchEvent(new CustomEvent("init.store"));this.$store.commit("set_window_width",{width:window.innerWidth})}},methods:{setMenuItemHovered:function setMenuItemHovered(e){if(!this.isMenuItemHovered(e)){this.menu_items_hovered.push(e)}},isMenuItemHovered:function isMenuItemHovered(e){return this.menu_items_hovered.indexOf(e)!==-1}}})}var app=app_function();$(window).resize(function(t){setTimeout(function(){store_global.commit("set_window_width",{width:window.innerWidth})},100)});function vue_set(e,t,s){if(typeof e[t]==="undefined"){window.Vue.set(e,t,s);return}if(Array.isArray(e)){e.splice(t,1,s);return}e[t]=s}