(function(){if(typeof window==="undefined"){return}const d="geolocation";const e="geostate";const b="grxgeostate";const c="http://locate.jeetwin-gaming.com/service/locate";const a="http://ematrix.filmipop.com/v2/city/get?city_name=";window.locateservice={setcookie:function(g,m,h,o,j,f){try{const l=new Date();l.setTime(l.getTime());if(h){h=h*1000*60*60*24}const n=new Date(l.getTime()+h);let cookiestr=g+"="+escape(m);if(h){cookiestr+=";expires="+n.toGMTString()}if(o){cookiestr+=";path="+o}if(j){cookiestr+=";domain="+j }if(f){cookiestr+=";secure"}document.cookie=cookiestr}catch(k){}},readcookie:function(f){const h=f+"=";const g=document.cookie.split(";");for(let i=0;i=0){domain="timesofindia.com"}locateservice.setcookie(d,locateservice.checkSpecialCase(h.city),1,"/",domain);locateservice.setcookie(b,h.region,1,"/",domain);if(typeof g==="function"){g("success")}if(locateservice.readcookie(e)===undefined){locateservice.geturldata(a+locateservice.checkSpecialCase(h.city),locateservice.setgeostate)}}else{if(typeof f==="function"){f("error")}}},setgeostate:function(f){console.log("%c LOCATE STATE DATA : ","background: #00aa5a; color: white; border-radius: 2px; font-size: 14px; line-height: 15px",f); if(f&&f.state_code){let domain="jeetwin-gaming.com";if(document.domain.indexOf("timesofindia.com")>=0){domain="timesofindia.com"}locateservice.setcookie(e,f.state_code,365,"/",domain)}},geturldata:function(g,l,j,h){try{if(typeof window==="undefined"){return}const k=new XMLHttpRequest();k.ontimeout=function(){console.error("The request for "+g+" timed out.");if(typeof h==="function"){h("error")}};k.onload=function(){try{if(k.readyState===4){if(k.status===200){l.call(k,k.response,j,h)}else{console.error(k.statusText); if(typeof h==="function"){h("error")}}}}catch(m){console.error("Error occurred at locate service",m.message);if(typeof h==="function"){h("error")}}};k.onerror=function(){console.error("The request for "+g+" caught an error");if(typeof h==="function"){h("error")}};k.responseType="json";k.open("GET",g,true);k.timeout=60000;k.send(null)}catch(f){console.error("The request for "+g+" caught an error",f);if(typeof h==="function"){h("error")}}},initiate:function(){return new Promise(function(g,f){if(locateservice.readcookie(d)===undefined){locateservice.geturldata(c,locateservice.setgeocity,g,f) }else{g("success")}})}}}());