\n ').concat(e.title,'\n ').concat(e.type,'\n \n \n \n \n \n \n ')})),e.querySelector(".search-autocomplete-results").innerHTML=o+'
'):e.querySelector(".search-autocomplete-results").innerHTML='",l.style.border="1px solid #393939"}(t)})).finally((function(){h.hide(),r.classList.remove("pe-none")}))}),750)):0===c.length&&(C(),h.hide(),r.classList.add("pe-none"))})),s.addEventListener("click",(function(){C()})),i&&u&&i.addEventListener("click",(function(){n.value="",C()})),document.addEventListener("click",(function(e){e.target.closest(".search-autocomplete")||C();var t=document.getElementById("navbarSearch");t&&!e.target.closest("#navbarSearch")&&"searchToggleBtn"!==e.target.id&&t.classList.remove("show")})),c){var p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("width","22"),p.setAttribute("height","22"),p.setAttribute("viewBox","0 0 16 16"),p.setAttribute("fill","none");var m=document.createElementNS("http://www.w3.org/2000/svg","path");m.setAttribute("d","M11.5 6.5C11.5 5.17392 10.9732 3.90215 10.0355 2.96447C9.09785 2.02678 7.82608 1.5 6.5 1.5C5.17392 1.5 3.90215 2.02678 2.96447 2.96447C2.02678 3.90215 1.5 5.17392 1.5 6.5C1.5 7.82608 2.02678 9.09785 2.96447 10.0355C3.90215 10.9732 5.17392 11.5 6.5 11.5C7.82608 11.5 9.09785 10.9732 10.0355 10.0355C10.9732 9.09785 11.5 7.82608 11.5 6.5ZM10.5344 11.5969C9.42813 12.475 8.025 13 6.5 13C2.90937 13 0 10.0906 0 6.5C0 2.90937 2.90937 0 6.5 0C10.0906 0 13 2.90937 13 6.5C13 8.025 12.475 9.42812 11.5969 10.5344L15.7812 14.7187C16.075 15.0125 16.075 15.4875 15.7812 15.7781C15.4875 16.0687 15.0125 16.0719 14.7219 15.7781L10.5344 11.5969Z"),m.setAttribute("fill","currentColor"),p.appendChild(m),r.innerHTML="",r.appendChild(p),n.placeholder=t(a<500?glc.searchAutocomplete.searchPlaceholder:glc.searchAutocomplete.searchPlaceholderLarge),document.addEventListener("click",(function(t){if(c){var o=t.target.closest(".search-autocomplete-nav");o&&o===c||(l.innerHTML="",e.querySelector(".input-group button").style.display="block",e.querySelector(".search-autocomplete-clear").style.display="none",n.value="",l.style.border="none")}}))}else if(a<500){n.placeholder=t(glc.searchAutocomplete.searchPlaceholder);var v=document.createElementNS("http://www.w3.org/2000/svg","svg");v.setAttribute("width","20"),v.setAttribute("height","20"),v.setAttribute("viewBox","0 0 16 16"),v.setAttribute("fill","none");var g=document.createElementNS("http://www.w3.org/2000/svg","path");g.setAttribute("d","M11.5 6.5C11.5 5.17392 10.9732 3.90215 10.0355 2.96447C9.09785 2.02678 7.82608 1.5 6.5 1.5C5.17392 1.5 3.90215 2.02678 2.96447 2.96447C2.02678 3.90215 1.5 5.17392 1.5 6.5C1.5 7.82608 2.02678 9.09785 2.96447 10.0355C3.90215 10.9732 5.17392 11.5 6.5 11.5C7.82608 11.5 9.09785 10.9732 10.0355 10.0355C10.9732 9.09785 11.5 7.82608 11.5 6.5ZM10.5344 11.5969C9.42813 12.475 8.025 13 6.5 13C2.90937 13 0 10.0906 0 6.5C0 2.90937 2.90937 0 6.5 0C10.0906 0 13 2.90937 13 6.5C13 8.025 12.475 9.42812 11.5969 10.5344L15.7812 14.7187C16.075 15.0125 16.075 15.4875 15.7812 15.7781C15.4875 16.0687 15.0125 16.0719 14.7219 15.7781L10.5344 11.5969Z"),g.setAttribute("fill","black"),v.appendChild(g),r.innerHTML="",r.appendChild(v)}else n.placeholder=t(glc.searchAutocomplete.searchPlaceholderLarge),r.innerHTML=glc.searchAutocomplete.searchButtonText;function C(){l.innerHTML="",e.querySelector(".input-group button").style.display="block",e.querySelector(".search-autocomplete-clear").style.display="none",n.value="",l.style.border="none",r.classList.add("pe-none")}}function t(e){var t=document.createElement("div");return e&&(t.innerHTML=e,e=t.textContent||t.innerText),e}document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(".search-autocomplete-container-navbar, .search-autocomplete-container").forEach((function(t){(t.classList.contains("search-autocomplete-container-navbar")||t.classList.contains("search-autocomplete-container"))&&e(t)}))}))}();!function(){var t,e,o,n=this,c=document.querySelector(".back-to-top"),s=document.getElementById("cctToolbarWrapper"),i=function(){return document.documentElement||document.body},r=(t=function(){var t=.3*i().scrollHeight;i().scrollTop>t?(c.classList.remove("d-none"),setTimeout((function(){c.classList.add("show")}),10)):(c.classList.remove("show"),setTimeout((function(){c.classList.add("d-none")}),300))},e=50,function(){for(var c=arguments.length,s=new Array(c),i=0;i{function t(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,l=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw l}}}}function n(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=Array(n);ed+a+c?(e.style.display="block",r.style.display="block"):(e.style.display="none",r.style.display="none"),(y>=0||0===u)&&(y=0,e.style.display="none"),o.style.marginLeft="".concat(y,"px")},e.addEventListener("click",(function(){u-=1;var t=o.children[u];y+=t.getBoundingClientRect().width,o.style.marginLeft="".concat(y,"px"),r.style.display="block",(y>=0||0===u)&&(y=0,e.style.display="none")})),r.addEventListener("click",(function(){u+=1;var t=o.children[u-1];y-=t.getBoundingClientRect().width,o.style.marginLeft="".concat(y,"px"),e.style.display="block",Math.abs(y)>=l-d&&(r.style.display="none")})),s(),window.addEventListener("resize",(function(){s()}))})();(()=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}!function(){var e=glc.stickyBanner,n=glc.queried_object_id;if("object"===t(e)){var o=null!==e.secret_bonus&&void 0!==e.secret_bonus,s=null!==e.open_in_new_tab&&void 0!==e.open_in_new_tab,i="sticky_banner_session",l=JSON.parse(sessionStorage.getItem(i));if(null!==l&&void 0!==l.state&&"closed"===l.state&&document.body.classList.remove("has-sticky-banner"),null===l||null!==l&&void 0!==l.campaign_id&&l.campaign_id!==e.campaign_id){for(var a={},c=0;cm&&h()}function S(t){if("DIALOG"===t.target.tagName){var e=t.target.getBoundingClientRect();!1===(e.top<=t.clientY&&t.clientY<=e.top+e.height&&e.left<=t.clientX&&t.clientX<=e.left+e.width)&&t.target.close()}}}()})();!function(){document.addEventListener("glc_ajaxDataLoaded",f),document.addEventListener("DOMContentLoaded",(function(){!function(){var e=document.getElementById("cctModalOpen"),t=document.getElementById("cctModalClose"),n=document.getElementById("cctModalMinimize"),o=document.getElementById("cctFullComparison");e.addEventListener("click",(function(e){var t;e.stopPropagation(),p(),m()?(L(),k(),h("closed")):(x(),t=document.getElementById("cctModalWrapper"),h("modal"),t.style.display="block")})),t.addEventListener("click",(function(e){e.stopPropagation(),L(),g(),h("closed"),x()})),n.addEventListener("click",(function(e){e.stopPropagation(),k(),L(),h("open")}));for(var c=document.getElementsByClassName("cctAlertCloseModal"),a=0;a... L O A D I N G ...',a=setTimeout((function(){var t=e.target.value,n=document.getElementById("cctSearchResult");if(""===t)return n.classList.add("d-none"),void(n.innerHTML="");var o=new FormData;o.append("method","_cct_load_casinos"),o.append("action","glc_ajax_controller"),o.append("json",JSON.stringify({search:t,template:"template-parts/casino-comparison-tool/cct-index-card"})),fetch(glc.ajax_url,{method:"POST",credentials:"same-origin",body:o}).then((function(e){return e.text()})).then((function(e){if(""!==e)n.innerHTML=e;else{var o='We couldn\'t find any matches for "'+String(t)+'" !
';n.innerHTML=o}n.classList.remove("d-none"),document.dispatchEvent(new Event("glc_cctCasinoIndex")),b()}))}),500)}function l(){var e=document.getElementById("cctToolbarClose");if(0===o.length||e.classList.contains("confirmation")){o=[],n.classList.remove("confirmation"),e.classList.remove("confirmation"),sessionStorage.removeItem("cct_stored_items"),Array.from(document.querySelectorAll(".toplist-card")).forEach((function(e){var t=e.querySelector('input[type="checkbox"]');null!==t&&(t.checked=!1,e.classList.remove("border-compare"))})),u(),p(),h("closed",!1);var t=document.getElementById("cctConfirmationAlert");t&&t.remove(),k()}else h("confirmation",!1)}function m(){return""!==glc.cct.full_comparison_url&&"/"+glc.cct.full_comparison_url===window.location.pathname}function u(){var n,c,a=document.getElementById("cctCasinoIndexLPContainer");0===o.length?(sessionStorage.removeItem("cct_stored_items"),!1===s.classList.contains("expanded")&&h("closed",!1),function(e){m()&&(e.querySelectorAll(".cct-img-placeholders-container").forEach((function(e){e.classList.add("d-block","cct-fc-no-casinos")})),e.querySelectorAll(".cct-fc-subtitle").forEach((function(e){e.classList.remove("d-none")})),e.querySelectorAll(".cct-placeholder-item").forEach((function(e,t){0!==t&&e.classList.add("d-none")})),e.querySelectorAll(".cctAjaxRequest").forEach((function(e){e.classList.add("d-none")})))}(a)):function(e){if(m()){if(null===e)return;e.querySelectorAll(".cct-img-placeholders-container").forEach((function(e){e.classList.remove("d-block","cct-fc-no-casinos")})),e.querySelectorAll(".cct-fc-subtitle").forEach((function(e){e.classList.add("d-none")})),e.querySelectorAll(".cct-placeholder-item").forEach((function(e,t){0!==t&&e.classList.remove("d-none")})),e.querySelectorAll(".cctAjaxRequest").forEach((function(e){e.classList.remove("d-none")}))}}(a),n=sessionStorage.getItem("cct_stored_items"),(c=new FormData).append("method","_cct_load_casino_meta"),c.append("action","glc_ajax_controller"),n&&c.append("json",n),fetch(glc.ajax_url,{method:"POST",credentials:"same-origin",body:c}).then((function(e){return e.text()})).then((function(e){for(var t=document.getElementsByClassName("cctAjaxRequest"),n=0;n'+o.length+"/4"}(),document.querySelectorAll(".cct_go_link").forEach((function(e){return e.remove()})),e=document.getElementsByClassName("cct-img-placeholders-container"),Array.from(e).forEach((function(e){t=e.getElementsByClassName("cct-img-placeholder"),Array.from(t).forEach((function(e,t,n){e.innerHTML="",e.classList.add("empty");var c=e.parentElement.getElementsByClassName("cct-title-placeholder")[0];if(c.innerHTML="",void 0!==o[t]){e.classList.remove("empty");var a=document.createElement("img"),i=document.createElement("img");a.src=o[t].post_logo.desktop,i.src=o[t].post_logo.mobile,a.classList.add("d-none","d-lg-block","w-100"),i.classList.add("d-lg-none");var r=document.createElement("div");r.innerHTML='',r.classList.add("cct-icon-x"),r.onclick=function(e){e.stopPropagation(),_(o[t].post_id),0===o.length&&(L(),p(),document.getElementById("cctToolbarWrapper").classList.contains("expanded")||k())};var d=document.createElement("a");d.classList.add("cct_go_link","w-100","btn","is-style-primary","mt-2"),d.innerHTML=glc.cct.to_the_casino,d.setAttribute("href",o[t].post_go_link+":cct"),d.setAttribute("target","_blank"),d.setAttribute("rel","nofollow noopener"),e.appendChild(a),e.appendChild(i),c.innerHTML=o[t].post_title,e.appendChild(r),e.classList.contains("cct-without-button")||e.parentElement.appendChild(d)}e.onclick=function(){!s.classList.contains("expanded")&&e.classList.contains("empty")&&(L(),k(),h("open"),p(),y())}}))}))}function p(){document.getElementById("cctAlertWrapper").classList.add("d-none")}function g(){document.getElementById("cctAlertWrapper").classList.remove("d-none")}function f(){"undefined"!=typeof Storage&&(s=document.getElementById("cctToolbarWrapper"),n=document.getElementById("cctToolbar"),c=sessionStorage.getItem("cct_stored_state")||"closed",o=JSON.parse(sessionStorage.getItem("cct_stored_items"))||[],h(c,!1),u(),document.getElementById("cctToolbarClose").addEventListener("click",(function(e){e.stopPropagation(),h("closed"),L(),l(),g(),x()})),document.getElementById("cctToolbarToggle").addEventListener("click",(function(e){e.stopPropagation(),m()?(L(),k(),h("closed")):h("toggle")})),document.getElementById("cctClose").addEventListener("click",(function(e){e.stopPropagation(),h("confirmation"),k(),p(),L(),l()})),Array.from(document.getElementsByClassName("toplist-card")).forEach((function(e,t,n){var c=e.querySelector('input[type="checkbox"]');if(c){var a=e.parentElement.getAttribute("data-mz-post-id");o.map((function(e){return e.post_id})).indexOf(a)>-1&&(c.checked=!0,e.classList.add("border-compare")),c.hasAttribute("hasclicklistener")||(c.setAttribute("hasclicklistener",""),c.addEventListener("click",(function(t){if(t.stopPropagation(),o.length>=4&&c.checked)return E("danger",s.getAttribute("data-cct-alert-title"),s.getAttribute("data-cct-alert-text"),null,"cctTooManyAlert"),void t.preventDefault();("closed"===sessionStorage.getItem("cct_stored_state")||0==o.length&&"minimised"===sessionStorage.getItem("cct_stored_state"))&&h("open");var n=e.parentElement.getAttribute("data-title"),i=e.parentElement.getAttribute("data-go-link"),r=e.querySelector("img").getAttribute("src"),d=r.replace("/400x210/","/72x72/");d=d.replace(".jpg",".png"),c.checked?(e.classList.add("border-compare"),o.push({post_id:a,post_title:n,post_go_link:i,post_logo:{desktop:r,mobile:d}}),sessionStorage.setItem("cct_stored_items",JSON.stringify(o)),u()):_(a)})))}})),"closed"===c&&o.length>0&&!1===m()&&h("open"),!0===m()&&h("closed"))}function v(){n.removeEventListener("click",v),h("open")}function h(e,t){if(void 0!==s&&void 0!==n){void 0===t&&(t=!0),void 0===e&&(e="closed"),t?(s.classList.add("transition"),n.classList.add("transition")):(s.classList.remove("transition"),n.classList.remove("transition"));var o=sessionStorage.getItem("cct_stored_state");switch(document.dispatchEvent(new Event("cct_state_changed",{state:e,prev_state:o})),e){case"open":s.classList.remove("d-none"),null===o||"closed"===o?setTimeout((function(){s.classList.remove("closed")}),10):"minimised"===o?s.classList.remove("minimised"):s.classList.contains("expanded"),sessionStorage.setItem("cct_stored_state",e);break;case"closed":"1"==glc.cct.minimized_as_default?h("minimised"):(s.classList.add("d-none"),s.classList.add("closed"),s.classList.remove("expanded"),s.classList.remove("minimised"),sessionStorage.setItem("cct_stored_state",e));break;case"stored":h(o);break;case"minimised":s.classList.contains("expanded")?s.classList.remove("expanded"):(s.classList.remove("d-none"),s.classList.add("minimised"),n.addEventListener("click",v),sessionStorage.setItem("cct_stored_state",e));break;case"confirmation":var c=function(){k(),document.removeEventListener("cct_alert_close",c),document.removeEventListener("cct_state_changed",c),n.classList.remove("confirmation"),a.classList.remove("confirmation")},a=document.getElementById("cctToolbarClose");s.classList.remove("expanded"),s.classList.remove("d-none"),n.classList.add("confirmation"),a.classList.add("confirmation"),x(),document.addEventListener("cct_alert_close",c),document.addEventListener("cct_state_changed",c),document.addEventListener("cct_alert_confirm",l);break;case"expanded":s.classList.add("expanded");break;case"modal":s.classList.add("d-none"),s.classList.remove("expanded");break;case"toggle":"open"===o?(h("minimised"),k()):"minimised"===o&&h("open");break;default:s.classList.add("d-none"),s.classList.add("closed")}}}function L(){document.getElementById("cctModalWrapper").style.display="none"}function y(){!function(){if(""!==r){var e=document.getElementById("cctCasinoIndexFilterDefault"),t=document.getElementById("cctCasinoIndexFilter");e&&t&&(e.remove(),t.prepend(e),r="")}}();var e=new FormData;e.append("method","_cct_load_casinos"),e.append("action","glc_ajax_controller"),e.append("json",JSON.stringify({template:"template-parts/casino-comparison-tool/cct-index-card"})),fetch(glc.ajax_url,{method:"POST",credentials:"same-origin",body:e}).then((function(e){return e.text()})).then((function(e){var t=document.getElementById("cctFilterHeader");t.innerHTML=t.getAttribute("data-cct-filter-header-popular"),document.getElementById("cctFilterResult").innerHTML=e,x(),document.dispatchEvent(new Event("glc_cctCasinoIndex")),h("expanded"),b()}))}function E(e,t,o,c,s,a){0!==c&&(void 0===c||c<200)&&(c=3e3);var i=document.createElement("div");if(null!=s){if(null!==document.getElementById(s))return;i.setAttribute("id",s)}i.classList.add("rounded-2","bs","alert","alert-"+e),i.innerHTML='";var r=document.createElement("div");if(r.classList.add("icon","icon-action","icon-close"),r.innerHTML='',r.addEventListener("click",(function(){document.dispatchEvent(new Event("cct_alert_close")),i.classList.remove("show"),setTimeout((function(){i.remove()}),200)})),!0===a){var d=document.createElement("div");d.classList.add("icon","icon-action","icon-confirm"),d.innerHTML='',d.addEventListener("click",(function(){document.dispatchEvent(new Event("cct_alert_confirm")),i.classList.remove("show"),setTimeout((function(){i.remove()}),200)})),i.classList.add("confirm"),i.appendChild(d)}document.addEventListener("cct_state_changed",(function(){i.classList.remove("show"),setTimeout((function(){i.remove()}),200)})),i.appendChild(r),n.parentElement.prepend(i),setTimeout((function(){i.classList.add("show")}),10),c>0&&(setTimeout((function(){i.classList.remove("show")}),c-200),setTimeout((function(){i.remove()}),c))}function _(e){for(var t=document.querySelectorAll('[data-mz-post-id="'+e+'"]'),n=0;n-1&&e[t].classList.add("border-compare"),e[t].addEventListener("click",(function(e){e.stopPropagation();var t=this.getAttribute("data-mz-post-id");if(o.map((function(e){return e.post_id})).indexOf(t)>-1)_(t);else if(o.length>=4)E("danger",s.getAttribute("data-cct-alert-title"),s.getAttribute("data-cct-alert-text"),null,"cctTooManyAlert");else{var n=this.getAttribute("data-title"),c=this.getAttribute("data-go-link"),a=this.querySelector("img").getAttribute("src"),i=a.replace("/400x210/","/72x72/");i=i.replace(".jpg",".png"),o.push({post_id:t,post_title:n,post_go_link:c,post_logo:{desktop:a,mobile:i}}),this.classList.add("border-compare");var r=document.querySelector('[data-mz-post-id="'+t+'"]'),d=r.querySelector('input[type="checkbox"]');null!==d&&(d.checked=!0,r.querySelector("div").classList.add("border-compare")),sessionStorage.setItem("cct_stored_items",JSON.stringify(o)),u()}}))}}function x(){document.getElementById("cctModalBg").classList.remove("d-none"),document.body.style.overflow="hidden"}function k(){document.getElementById("cctModalBg").classList.add("d-none"),document.body.style.overflow=""}document.addEventListener("glc_cctCasinoIndex",(function(){for(var e=document.getElementsByClassName("btn-cct-casino-filter"),t=document.getElementById("cctCasinoIndexFilter"),n=document.getElementById("cctFilterHeader"),o=0;o';c.innerHTML=t}b()}))}else y()}}));document.getElementById("cctCasinoIndexSearch").addEventListener("input",(function(e){""!==r&&y(),d(e)}))}))}();!function(){function t(){var t=document.getElementsByClassName("tandc-tooltip-toggle");t&&0!==t.length&&Array.from(t).forEach((function(t){t.addEventListener("mouseover",(function(n){n.stopPropagation(),t.classList.add("show")})),t.addEventListener("mouseleave",(function(n){n.stopPropagation(),t.classList.remove("show")}))}))}document.addEventListener("DOMContentLoaded",(function(){t()})),document.addEventListener("cct_metaLoad",(function(){t()}))}();(()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var s=0;s0,s=location.protocol+"//"+location.host+location.pathname+location.search+(t?"&":"?")+"newsletter_email="+encodeURIComponent(this.inputs[e].value);this.phones[e]&&(s+="&newsletter_phone="+encodeURIComponent(this.phones[e].value)),s+="&source="+encodeURIComponent(this.source[e]),s+="#newsletter-signup-"+e,window.location.href=s}return!0}},{key:"show_cookie_checkbox",value:function(){var e=-1!==document.cookie.indexOf("cookie_consent"),t=document.getElementsByClassName("newsletter-site-cookie-check-wrapper");return!1===e&&t.length>0||t.length>0&&t[0].remove(),!0}},{key:"validate_inputs",value:function(e){return this.validateEmail(this.inputs[e].value)?null===this.phones[e]||"undefined"===this.phones[e]||""==this.phones[e].value||this.validatePhone(this.prefixs[e]+this.phones[e].value)?!1!==this.ageCheck[e].checked&&!1!==this.cookieCheck[e].checked&&(null===this.cookieSiteCheck[e]||!1!==this.cookieSiteCheck[e].checked)||(this.set_status("error","data-text-checkbox-error",e),!1):(this.set_status("error","data-text-phone-error",e),!1):(this.set_status("error","data-text-email-error",e),!1)}},{key:"disable_all",value:function(){var e=this;this.cons.forEach((function(t,s){e.inputs[s]&&void 0!==e.inputs[s]&&(e.inputs[s].disabled=!0),e.phones[s]&&void 0!==e.phones[s]&&(e.phones[s].disabled=!0,e.phone_prefix[s].disabled=!0),e.btns[s]&&void 0!==e.btns[s]&&(e.btns[s].disabled=!0),e.cookieCheck[s]&&void 0!==e.cookieCheck[s]&&(e.cookieCheck[s].disabled=!0),e.ageCheck[s]&&void 0!==e.ageCheck[s]&&(e.ageCheck[s].disabled=!0),e.cookieSiteCheck[s]&&void 0!==e.cookieSiteCheck[s]&&(e.cookieSiteCheck[s].disabled=!0)}))}},{key:"update_values_after_page_reload",value:function(e){var t=new URLSearchParams(window.location.search),s=t.get("newsletter_email"),i=t.get("newsletter_phone");s&&this.inputs[e]&&(this.inputs[e].value=s),i&&this.phones[e]&&(this.phones[e].value=i),(s&&this.inputs[e]&&this.inputs[e].value===s||i&&this.phones[e]&&this.phones[e].value===i)&&(this.ageCheck[e].checked=!0,this.cookieCheck[e].checked=!0,null!==this.cookieSiteCheck[e]&&(this.cookieSiteCheck[e].checked=!0),this.set_status("success","data-text-success",e),this.disable_all())}},{key:"set_status",value:function(e,t,s){switch(e){case"error":this.cons[s].classList.add("error"),this.cons[s].classList.remove("success");break;case"success":this.cons[s].classList.add("success"),this.cons[s].classList.remove("error")}this.status[s].innerHTML=this.status[s].getAttribute(t)}},{key:"do_xtremepush",value:function(e,t,s){var i=e.replace(".","-");i=i.replace("@","_at_"),"function"==typeof xtremepush&&(null!==t&&t.length>3?(t=t.replace("+",""),xtremepush("user","import",{user_id:i,email:e,email_subscription:"0",mobile_number:""+t,sms_subscription:"0",user_attributes:{register_source:s}},(function(){xtremepush("event","email_submitted"),xtremepush("tag","register_source",s)}))):(t="",xtremepush("user","import",{user_id:i,email:e,email_subscription:"0",user_attributes:{register_source:s}},(function(){xtremepush("event","email_submitted"),xtremepush("tag","register_source",s)}))))}},{key:"validateEmail",value:function(e){return e.match(/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)}},{key:"validatePhone",value:function(e){return e.match(/^(\+|00)[0-9]{6,14}$/)}},{key:"setCookie",value:function(e,t,s){var i=new Date;i.setTime(i.getTime()+864e5*s),document.cookie=e+"="+t+";path=/;expires="+i.toGMTString()}}],o&&t(i.prototype,o),n&&t(i,n),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,o,n}();document.addEventListener("DOMContentLoaded",(function(){var e=new o;glc.newsletterSignup=e,glc.newsletterSignup.init()}))})();(()=>{function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(){"use strict";r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(e){f=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof m?r:m,i=Object.create(o.prototype),c=new T(n||[]);return a(i,"_invoke",{value:O(t,e,c)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",d="executing",v="completed",g={};function m(){}function w(){}function b(){}var x={};f(x,u,(function(){return this}));var L=Object.getPrototypeOf,E=L&&L(L(G([])));E&&E!==o&&i.call(E,u)&&(x=E);var _=b.prototype=m.prototype=Object.create(x);function j(t){["next","throw","return"].forEach((function(r){f(t,r,(function(t){return this._invoke(r,t)}))}))}function k(r,e){function n(o,a,c,u){var s=p(r[o],r,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,u)}))}u(s.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function O(t,r,n){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=S(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(t,r,n);if("normal"===s.type){if(o=n.done?v:"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=v,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function P(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function G(r){if(r||""===r){var n=r[u];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(u&&s){if(this.prev=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),g}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;N(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:G(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},n}function e(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=t.apply(r,n);function c(t){e(a,o,i,c,u,"next",t)}function u(t){e(a,o,i,c,u,"throw",t)}c(void 0)}))}}var o;!function(){var t;function e(){return i.apply(this,arguments)}function i(){return(i=n(r().mark((function e(){return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(void 0===o){r.next=4;break}o.showModal(),r.next=9;break;case 4:return t.show(),r.next=7,c();case 7:a(r.sent);case 9:case"end":return r.stop()}}),e)})))).apply(this,arguments)}function a(t){document.body.insertAdjacentHTML("beforeend",t);var r=(o=document.getElementById("modal-newsletter-subscription")).querySelector(".modal-container");o.addEventListener("click",(function(){o.close()})),r.addEventListener("click",(function(t){return t.stopPropagation()})),o.showModal(),glc.newsletterSignup.init()}function c(){return u.apply(this,arguments)}function u(){return u=n(r().mark((function e(){var o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(o=new FormData).append("method","ajax_get_modal"),o.append("action","glc_ajax_controller"),o.append("json",JSON.stringify({template:"newsletter-subscription",close_button:!0,modal_id:"modal-newsletter-subscription"})),e.abrupt("return",fetch(glc.ajax_url,{method:"POST",credentials:"same-origin",body:o}).then(function(){var t=n(r().mark((function t(e){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.text();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}()).then((function(r){return t.hide(),r})));case 5:case"end":return e.stop()}}),e)}))),u.apply(this,arguments)}document.addEventListener("DOMContentLoaded",(function(){var r=document.getElementById("newsletternavToggleBtn");t=new window.GlcSpinner(r,{backgroundColor:"rgba(255,255,255,0.6)",spinnerColor:"black",size:"16px"}),r?r.addEventListener("click",e):console.error("No newsletter subscription CTA found")}))}()})();!function(){var e=document.body.classList.contains("aftonbladet-gamelounge-partners")?"https://go-":"https://go.";if(document.body.classList.contains("type-offer")||document.body.classList.contains("type-casino")){var t=sessionStorage.getItem("useCollection"),o=sessionStorage.getItem("useCollectionUrl"),n=sessionStorage.getItem("useCollectionDestinationUrl"),s=document.referrer;if(!t||!o||!s||o!==s)return;if(window.location.href!==n)return;document.querySelectorAll('a[href^="'+e+'"]').forEach((function(e){var o=new URL(e.href),n=new URLSearchParams(o.search);n.has("use_collection")||(n.append("use_collection",t),e.href=o.origin+o.pathname+"?"+n.toString())}))}else document.querySelectorAll("a[data-use-collection]").forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault();var o=e.getAttribute("data-use-collection"),n=e.href;sessionStorage.setItem("useCollection",o),sessionStorage.setItem("useCollectionUrl",window.location.href),sessionStorage.setItem("useCollectionDestinationUrl",n),window.location.href=n}))}))}();