function ipValidation(){if(window.GEOLOCATION_CACHED_DATA)e=window.GEOLOCATION_CACHED_DATA;else try{var e=JSON.parse(GEOLOCATION_REQUEST.response),t=1===window.location.hostname.split(".").length?"":".".concat(getBaseDomain());addCookie("m4u_country",e.countryCode,30,t,"/")}catch(e){return window.GEOLOCATION_CACHED_DATA=null}var o=document.getElementById("modal-block-window"),n=o.dataset.blockedCountries.split(";"),a=o.dataset.ipWhitelist.split(";");n.includes(e.countryCode)&&((t=new XMLHttpRequest).onreadystatechange=function(){var e;4===this.readyState&&200===this.status&&(e=JSON.parse(this.responseText),!a.includes(e.ipAddress))&&n.includes(e.countryCode)&&showBlockedModal(o)},t.open("GET","https://free.freeipapi.com/api/json",!0),t.send())}function showBlockedModal(e){new Modal(e,{backdrop:"static",keyboard:!1}).show()}window.GEOLOCATION_CACHED_DATA||4===GEOLOCATION_REQUEST.readyState?ipValidation():GEOLOCATION_REQUEST.addEventListener("load",ipValidation);