window.filterProduct=function(e){var t=[],n=[],a=document.querySelector("input[name=filter_by_price]").value.split(";"),r=document.getElementById("pagination-next"),i=document.querySelector('div[data-widget="carousel-container"]');document.querySelectorAll("input[name=brands]").forEach((function(e){e.checked&&t.push(e.value)})),document.querySelectorAll("input[name=categories]").forEach((function(e){e.checked&&n.push(e.value)}));var c=new URL(location.href);c.searchParams.set("brands",t),c.searchParams.set("categories",n),c.searchParams.set("min_price",a[0]),c.searchParams.set("max_price",a[1]),history.pushState({},"",c.href),$.ajax(location.href,{beforeSend:function(){Swal.fire({title:"Ýüklenilýär",allowOutsideClick:!1,timer:500,timerProgressBar:!0,didOpen:function(){Swal.showLoading()}})},success:function(e){setInterval(500,(function(){swal.close()})),r&&(e.pagination.next_page_url||(r.style.display="none"),r.href=e.pagination.next_page_url),i.innerHTML=e.products}})};