'); break; case 'en': $("#langswitch").html('
'); break; case 'de': $("#langswitch").html('
'); break; default: $("#langswitch").html('
'); break; } localStorage.language = lang; translate(localStorage.language);});if(localStorage.language!=undefined){ switch(localStorage.language) { case 'es': $("#langswitch").html('
'); break; case 'en': $("#langswitch").html('
'); break; case 'de': $("#langswitch").html('
'); break; default: $("#langswitch").html('
'); break; } translate(localStorage.language);}else{ translate('en'); $("#langswitch").html('
');}function removeQuery(url) { return url.split("?")[0].split("#")[0];}function cleanURL(){ var urlPath = removeQuery(window.location.href); window.history.replaceState({"html":urlPath,"pageTitle":document.title},"", urlPath); window.addEventListener('popstate', function (event) { history.pushState(null, document.title, location.href); });}cleanURL();function cleanString(string){ let regex = /^[a-zA-ZÀ-ÿ\u00f1\u00d1]+(\s*[a-zA-ZÀ-ÿ\u00f1\u00d1]*)*[a-zA-ZÀ-ÿ\u00f1\u00d1]+$/g; string = string.replace(/\s+/g, " ").toLowerCase(); return string.replace(regex, "");}function convertToSlugOLD(Text){ return Text .normalize("NFD").replace(/\p{Diacritic}/gu, "") .toLowerCase() .replace(/'/g,'-') .replace(/\´/g,'-') .replace(/ /g,'-') .replace(/[^\w-]+/g,'') ;}function convertToSlug(str, options = {}) { str = str.replaceAll(/U\+([0-9A-F]{4})/g, (match, p1) => String.fromCharCode(`0x${p1}`)); str = new TextDecoder('utf-8').decode(new TextEncoder().encode(str)); const defaults = { delimiter: '-', limit: null, lowercase: true, replacements: {}, transliterate: true, }; options = Object.assign(defaults, options); const char_map = { 'Ö': 'Oe', 'Ä': 'Ae', 'ö': 'oe', 'ä': 'ae', 'Å': 'A', 'å': 'a', 'Ø': 'O', 'ø': 'o', 'Ü': 'Ue', 'ü': 'ue', 'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Æ': 'AE', 'Ç': 'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I', 'Î': 'I', 'Ï': 'I', 'Ð': 'D', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O', 'Õ': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U', 'Ý': 'Y', 'Þ': 'TH', 'ß': 'ss', 'à': 'a', 'á': 'a', 'â': 'a', 'ã': 'a', 'æ': 'ae', 'ç': 'c', 'è': 'e', 'é': 'e', 'ê': 'e', 'ë': 'e', 'ì': 'i', 'í': 'i', 'î': 'i', 'ï': 'i', 'ð': 'd', 'ñ': 'n', 'ò': 'o', 'ó': 'o', 'ô': 'o', 'õ': 'o', 'ù': 'u', 'ú': 'u', 'û': 'u', 'ý': 'y', 'þ': 'th', 'ÿ': 'y', '&': 'and', '\u00e1': 'a', '\u00e9': 'e', '\u00ed': 'i', '\u00f3': 'o', '\u00fa': 'u', '\u00c1': 'A', '\u00c9': 'E', '\u00cd': 'I', '\u00d3': 'O', '\u00da': 'U', '\u00f1': 'ñ', '\u00d1': 'Ñ' }; for (const key in options.replacements) { str = str.replaceAll(key, options.replacements[key]); } if (options.transliterate) { for (const key in char_map) { str = str.replaceAll(key, char_map[key]); } } str = str.replaceAll(/[^\p{L}\p{Nd}]+/gu, options.delimiter); str = str.replaceAll(new RegExp('(' + options.delimiter.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + '){2,}', 'gu'), '$1'); str = str.substring(0, (options.limit ? options.limit : str.length)).trim(); return options.lowercase ? str.toLowerCase() : str;}function sPaceToDash(string){ return (string!=undefined?encodeURI(cleanText(string)).replace(/\%20| /g,'_').trim():'');} function dashToSpace(string){ return (string!=undefined?decodeURI(string).replace(/_/g,' ').trim():'');}function sPaceToPlus(string){ return (string!=undefined?encodeURI(cleanText(string)).replace(/\%20| /g,'+').trim():'');}function plusToSpace(string){ return (string!=undefined?decodeURI(string).replace(/\+/g,' ').trim():'');}function cleanText(string){ return (string!=undefined?string.replace(/\ /g,' ').trim():'');}$(document.body).on('click', '#tr_servicestatus', function(event) { showloading();});$(document.body).on('click', '.smoothscroll', function(event) { var it = $(this).attr('target'); $('html, body').animate({ scrollTop: $("#"+it).offset().top }, 2000);});function smoothScroll(it){ $('html, body').animate({ scrollTop: $("#"+it).offset().top }, 2000);}if(window.top != window.self){ $(".hideifframe").hide();}$.showloading = false;function showloading(){ $('#loadingmodal').show();}function hideloading(){ $('#loadingmodal').hide();}$(document).on({ ajaxStart: function() { if($.showloading)showloading(); }, ajaxStop: function() { if($.showloading)hideloading(); }});function showAlertBox(text,title,type){ KTUtil.scrollTop(); swal.fire({ "title": title, "html": text, "type":type, "confirmButtonClass": "btn btn-secondary" });}var MD5 = function(d){var r = M(V(Y(X(d),8*d.length)));return r.toLowerCase()};function M(d){for(var _,m="0123456789ABCDEF",f="",r=0;r>>4&15)+m.charAt(15&_);return f}function X(d){for(var _=Array(d.length>>2),m=0;m<_.length;m++)_[m]=0;for(m=0;m<8*d.length;m+=8)_[m>>5]|=(255&d.charCodeAt(m/8))<>5]>>>m%32&255);return _}function Y(d,_){d[_>>5]|=128<<_%32,d[14+(_+64>>>9<<4)]=_;for(var m=1732584193,f=-271733879,r=-1732584194,i=271733878,n=0;n>16)+(_>>16)+(m>>16)<<16|65535&m}function bit_rol(d,_){return d<<_|d>>>32-_}var countDownDate = new Date("1970-01-03 00:00:00").getTime();var x = setInterval(function() {var now = new Date().getTime();var distance = countDownDate - now;var days = Math.floor(distance / (1000 * 60 * 60 * 24));var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));var seconds = Math.floor((distance % (1000 * 60)) / 1000);var activateclock = document.getElementById("offerclock");if(activateclock!=undefined){ activateclock.innerHTML = days + " "+printTranslated('tr_day')+" " + hours + ":" + minutes + ":" + seconds + "";if (distance < 0) { clearInterval(x); activateclock.remove(); $("#hassends").show(); $("#hassends").html('
This offer will end in a few minutes');}else{ $("#hassends").show();}}}, 1000); $("#authmodaltitle").text(printTranslated('tr_pleaseconfirm')); $("#authpayment").hide(); $("#authpass").show(); function isNormalDoAuth(is){ if(is) { $("#authmodaltitle").text(printTranslated('tr_pleaseconfirm')); $("#authpayment").hide(); $("#authpass").show(); $("#authconfirm").show(); }else{ $("#authmodaltitle").text(printTranslated('tr_selectpaymentmethod')); $("#authpayment").show(); $("#authpass").hide(); $("#authconfirm").hide(); } } $(document.body).on('click', '#auth_credit', function(event) { isNormalDoAuth(true); }); if($.QueryString.paypal!=undefined && $.QueryString.paypal != 'cancel') { var obj = { payerID:$.QueryString.PayerID, authtoken:$.QueryString.token, what:$.QueryString.paypal, sid:localStorage.pid, token : "EAMrdUgamb4oXteRVXkooFNZSmxiSFRXNlU3ellGWERMdzU2VFE9PQ@@", }; $.showloading = true; mastercallhook('doCapture',JSON.stringify(obj),true,'confirmCapture'); } function confirmCapture(response,command,status){ if(status==true) { var result =JSON.parse(response); if(result == 'ok') { window.location.reload(); }else{ showAlertBox(printTranslated('tr_someerror'),'','error'); } } }if (typeof localStorage === "undefined" || localStorage === null) { Swal.fire({ title: "Local Storage Error", text: "It seems that local storage is not available or is blocked. This website requires local storage to function correctly. Please enable local storage in your browser settings.", icon: "error", confirmButtonText: "Ok" });}