(()=>{"use strict";var e={n:o=>{var i=o&&o.__esModule?()=>o.default:()=>o;return e.d(i,{a:i}),i},d:(o,i)=>{for(var r in i)e.o(i,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:i[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.jQuery;e.n(o)()(function(e){e(".pwb-dropdown-widget").on("change",function(){var o=e(this).find(":selected").val();location.href=o}),"function"==typeof e.fn.slick&&(e(".pwb-carousel").slick({slide:".pwb-slick-slide",infinite:!0,draggable:!1,prevArrow:'<div class="slick-prev"><span>'+pwb_ajax_object.carousel_prev+"</span></div>",nextArrow:'<div class="slick-next"><span>'+pwb_ajax_object.carousel_next+"</span></div>",speed:300,lazyLoad:"progressive",responsive:[{breakpoint:1024,settings:{slidesToShow:4,draggable:!0,arrows:!1}},{breakpoint:600,settings:{slidesToShow:3,draggable:!0,arrows:!1}},{breakpoint:480,settings:{slidesToShow:2,draggable:!0,arrows:!1}}]}),e(".pwb-product-carousel").slick({slide:".pwb-slick-slide",infinite:!0,draggable:!1,prevArrow:'<div class="slick-prev"><span>'+pwb_ajax_object.carousel_prev+"</span></div>",nextArrow:'<div class="slick-next"><span>'+pwb_ajax_object.carousel_next+"</span></div>",speed:300,lazyLoad:"progressive",responsive:[{breakpoint:1024,settings:{slidesToShow:3,draggable:!0,arrows:!1}},{breakpoint:600,settings:{slidesToShow:2,draggable:!0,arrows:!1}},{breakpoint:480,settings:{slidesToShow:1,draggable:!0,arrows:!1}}]}));var o=function(){var o=[location.protocol,"//",location.host,location.pathname].join(""),i=window.location.href,r=[];e('.pwb-filter-products input[type="checkbox"]').each(function(o){e(this).prop("checked")&&r.push(e(this).val())}),i=(r=r.join())?-1===(i=(i=i.replace(/&?pwb-brand-filter=([^&]$|[^&]*)/i,"")).replace(/\/page\/\d*\//i,"")).indexOf("?")?i+"?pwb-brand-filter="+r:i+"&pwb-brand-filter="+r:o,location.href=i};e(".pwb-apply-filter").on("click",function(){o()}),e(".pwb-remove-filter").on("click",function(){!function(){[location.protocol,"//",location.host,location.pathname].join("");var e=window.location.href;e=(e=e.replace(/&?pwb-brand-filter=([^&]$|[^&]*)/i,"")).replace(/\/page\/\d*\//i,""),location.href=e}()}),e(".pwb-filter-products.pwb-hide-submit-btn input").on("change",function(){o()});var r=i("pwb-brand-filter");if(null!=r){var t=r.split(",");e('.pwb-filter-products input[type="checkbox"]').prop("checked",!1);for(var a=0,n=t.length;a<n;a++)e('.pwb-filter-products input[type="checkbox"]').each(function(o){e(this).val()&&t[a]==e(this).val()&&e(this).prop("checked",!0)})}else e('.pwb-filter-products input[type="checkbox"]').prop("checked",!1)});var i=function(e){var o,i,r=decodeURIComponent(window.location.search.substring(1)).split("&");for(i=0;i<r.length;i++)if((o=r[i].split("="))[0]===e)return void 0===o[1]||o[1]}})();