$((function(){new StarRating(".star-rating");var e=$(document).find(".reviews-list"),a=function(a){e.append('<div class="loading-spinner"></div>'),$.get(a||"".concat(e.data("url")),(function(a){var t=a.data;e.html(t),void 0!==Theme.lazyLoadInstance&&Theme.lazyLoadInstance.update()}))};a(),$(document).on("submit",".review-form",(function(e){e.preventDefault();var t=$(e.currentTarget),n=t.find('button[type="submit"]');$.ajax({method:"POST",url:t.prop("action"),data:t.serialize(),beforeSend:function(){return n.prop("disabled",!0).addClass("btn-loading")},success:function(e){var n=e.data;t.get(0).reset(),t.find("textarea").prop("disabled",!0).val(""),Theme.showSuccess(n.message),a()},error:function(e){Theme.handleError(e),n.prop("disabled",!1)},complete:function(){"undefined"!=typeof refreshRecaptcha&&refreshRecaptcha(),n.removeClass("btn-loading")}})})).on("click",".pagination ul li a",(function(t){t.preventDefault(),a(t.target.href),$("html, body").animate({scrollTop:e.offset().top-220},0)}))}));