(()=>{var e={230:()=>{function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"-1",d=new XMLHttpRequest,p=document.getElementById(e),l=p.querySelector(".review-hub");l.classList.add("loading"),d.onreadystatechange=function(){if(4===d.readyState&&200===d.status){var e=JSON.parse(d.responseText),i=r,o=p.querySelector(".pagination-container");for(var c in i.innerHTML="",o.innerHTML="",e.reviews)if(e.reviews.hasOwnProperty(c)){var s=document.createElement("div");s.classList.add("review-box");var u=e.reviews[c],v=document.createElement("span");v.textContent=c;var _=document.createElement("img");_.src=u.book_logo_url,_.alt=c;var h=document.createElement("p");h.textContent=u.book_welcome_bonus;var g=document.createElement("div");g.innerHTML=u.book_rating_html;var b=document.createElement("a");b.href=u.book_review_url,b.classList.add("read-review-btn"),b.textContent="Read Review",s.appendChild(_),s.appendChild(v),s.appendChild(g),s.appendChild(h);var f=document.createElement("ul");u.book_key_features.forEach((function(e){var t=document.createElement("li");t.textContent=e.key_feature_name+": "+e.key_feature_value,f.appendChild(t)})),t(s,u.book_categories),s.appendChild(b),i.appendChild(s),o.innerHTML=e.pagination_links,o.querySelectorAll(".pagination-container > a").forEach((function(e){e.addEventListener("click",(function(t){return t.preventDefault(),n(e.getAttribute("data-hub-id"),this.getAttribute("data-page-number")),!1}))})),p.querySelectorAll(".search-box  button.search_button")[0].addEventListener("click",(function(e){var t=p.querySelector('input[type="text"]').value;a(p,t)}))}""==i.innerHTML&&(i.innerHTML=e.no_results_text),l.classList.remove("loading")}},d.open("POST",review_hub_vars.url,!0),d.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),d.send("action=get_reviews&nonce="+review_hub_vars.nonce+"&posts_per_page="+i+"&page="+o+"&hub_id="+e+"&search_name="+c+"&review_types="+s+"&specifc_reviews="+u)}function t(e,t){if(t.length>0){var r=document.createElement("ul");r.classList.add("categories"),t.forEach((function(e){var t=document.createElement("li"),n="";switch(e){case"poker":n="poker";break;case"sports":n="sports";break;case"casino":n="casino"}t.classList.add(n),t.textContent=e,r.appendChild(t)})),e.appendChild(r)}}function r(e){var t=new Array;return t.hub_id=e.getAttribute("data-hub-id"),t.post_per_page=e.getAttribute("data-ppp"),t.current_page=e.getAttribute("data-page"),t.review_types=e.getAttribute("data-reviews-cat"),t.specifc_reviews=e.getAttribute("data-specifc-reviews"),t.hub_container=e.querySelector(".reviews-list-wrapper"),t}function n(t,n){var a=document.getElementById(t),i=a.querySelector('input[type="text"]').value;a.setAttribute("data-page",n);var o=r(a);e(o.hub_id,o.hub_container,o.post_per_page,o.current_page,i,o.review_types,o.specifc_reviews)}function a(t,n){t.setAttribute("data-page",1);var a=r(t);e(a.hub_id,a.hub_container,a.post_per_page,a.current_page,n,a.review_types,a.specifc_reviews)}document.addEventListener("DOMContentLoaded",(function(){if("interactive"==document.readyState){var t=document.getElementsByClassName("review-hub-wrapper");Array.from(t).forEach((function(t){var n=r(t);e(n.hub_id,n.hub_container,n.post_per_page,n.current_page,"",n.review_types,n.specifc_reviews)}))}}))}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(230)})()})();