HEX
Server: LiteSpeed
System: Linux linux31.centraldnserver.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: salamatk (1501)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open
Upload Files
File: /home/salamatk/.trash/woodmart1/js/scripts/wc/productFilters.min.js
!function(m){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.productFilters()}),m.each(["frontend/element_ready/wd_product_filters.default"],function(e,a){woodmartThemeModule.wdElementorAddAction(a,function(){woodmartThemeModule.productFilters()})}),woodmartThemeModule.productFilters=function(){woodmartThemeModule.$body.on("filter_price_slider_create filter_price_slider_slide",function(e,a,t,r,i,o){var s,l,c;"undefined"!=typeof accounting&&(s=accounting.formatMoney(a,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format}),l=accounting.formatMoney(t,{symbol:woocommerce_price_slider_params.currency_format_symbol,decimal:woocommerce_price_slider_params.currency_format_decimal_sep,thousand:woocommerce_price_slider_params.currency_format_thousand_sep,precision:woocommerce_price_slider_params.currency_format_num_decimals,format:woocommerce_price_slider_params.currency_format}),o.siblings(".filter_price_slider_amount").find("span.from").html(s),o.siblings(".filter_price_slider_amount").find("span.to").html(l),c=(o=o.parents(".wd-pf-checkboxes").find(".wd-pf-results")).find(".selected-value"),a===r&&t===i?c.remove():0===c.length?o.prepend('<li class="selected-value" data-title="price-filter" data-min="'+r+'" data-max="'+i+'">'+s+" - "+l+"</li>"):c.html(s+" - "+l),woodmartThemeModule.$body.trigger("price_slider_updated",[a,t]))}),m(".wd-pf-price-range .price_slider_widget").each(function(){var t=m(this),r=t.siblings(".filter_price_slider_amount").find(".min_price"),i=t.siblings(".filter_price_slider_amount").find(".max_price"),o=parseInt(r.data("min")),s=parseInt(i.data("max")),e=new URL(window.location.href),a=parseInt(e.searchParams.has("min_price")?e.searchParams.get("min_price"):r.val()),l=parseInt(e.searchParams.has("max_price")?e.searchParams.get("max_price"):i.val());m(".price_slider_widget, .price_label").show(),isNaN(a)&&(a=o),isNaN(l)&&(l=s),t.slider({range:!0,animate:!0,min:o,max:s,values:[a,l],create:function(){a===o&&l===s&&(r.val(""),i.val("")),woodmartThemeModule.$body.trigger("filter_price_slider_create",[a,l,o,s,t]),t.closest(".wd-pf-price-range").on("click",".wd-pf-results li",function(e){var a=m(this),t=a.closest(".wd-pf-checkboxes"),r=t.find(".pf-value");t.find(".min_price").val(""),t.find(".max_price").val(""),t.find(".price_slider_widget").slider("values",[t.find(".min_price").data("min"),t.find(".max_price").data("max")]),a.remove(),0!==r.length&&((t=new URL(r.attr("href"))).searchParams.delete("min_price"),t.searchParams.delete("max_price"),r.attr("href",t.href),r)&&r.trigger("click")})},slide:function(e,a){a.values[0]===o&&a.values[1]===s?(r.val(""),i.val("")):(r.val(a.values[0]),i.val(a.values[1])),woodmartThemeModule.$body.trigger("filter_price_slider_slide",[a.values[0],a.values[1],o,s,t])},change:function(e,a){woodmartThemeModule.$body.trigger("price_slider_change",[a.values[0],a.values[1]])}})});function n(e,a){var t;0!==e.length&&(0<(t=e.val()).indexOf(",")?e.val(t.replace(","+a,"").replace(a+",","")):e.val(t.replace(a,"")))}var e=m("form.wd-product-filters"),l={container:".wd-page-content",timeout:woodmart_settings.pjax_timeout,scrollTo:!1,renderCallback:function(a,e,t){woodmartThemeModule.removeDuplicatedStylesFromHTML(e,function(e){a.html(e),t(),woodmartThemeModule.$document.trigger("wdShopPageInit"),woodmartThemeModule.$document.trigger("wood-images-loaded")})}};e.each(function(e,o){var s=(o=m(o)).find(".wd-pf-btn button, .wp-block-wd-button"),a=o.find(".wd-pf-checkboxes");o.on("click",".wd-pf-results li",function(e){var a,t=m(this),r=t.data("title"),i=t.closest(".wd-pf-checkboxes"),o=i.find(`.pf-value[data-val="${r}"]`);i.hasClass("wd-pf-price-range")||(0===s.length?o.trigger("click"):(a=i.find(".result-input"),i.hasClass("wd-pf-categories")&&i.closest("form.wd-product-filters").attr("action",woodmart_settings.shop_url),n(a,r),o.closest("li").removeClass("wd-active"),t.remove()))}),a.each(function(){var a=m(this),t=a.find(".wd-pf-title"),r=a.hasClass("multi_select"),i=(t.on("click",function(e){e=e.target;m(e).is(t.find(".selected-value"))||(a.hasClass("wd-opened")?i():(a.addClass("wd-opened"),setTimeout(function(){woodmartThemeModule.$document.trigger("wdProductFiltersOpened")},300)))}),woodmartThemeModule.$document.on("click",function(e){e=e.target;(!a.hasClass("wd-opened")||!r||m(e).is(a)||m(e).parents().is(a))&&(r||m(e).is(t)||m(e).parents().is(t))||i()}),function(){a.removeClass("wd-opened")})}),0===s.length?o.on("click",".wd-pf-checkboxes li > .pf-value, .filter_price_slider_amount .pf-value",function(e){var a,t,r,i=o.find(".filter_price_slider_amount");0<i.length&&(a=(i=i.find(".pf-value")).siblings(".min_price"),t=i.siblings(".max_price"),r=i.attr("href"),r=new URL(r),a.length&&t.length&&(a.val()?r.searchParams.set(a.attr("name"),a.val()):r.searchParams.delete(a.attr("name")),t.val()?r.searchParams.set(t.attr("name"),t.val()):r.searchParams.delete(t.attr("name")),i.attr("href",r.href)),a.val(""),t.val("")),"1"===woodmart_settings.ajax_shop&&void 0!==m.fn.pjax&&m.pjax.click(e,l)}):(o.on("click",".wd-pf-checkboxes li > .pf-value",function(e){e.preventDefault();var e=m(this),a=e.closest("form.wd-product-filters"),t=e.parent(),r=e.parents(".wd-pf-checkboxes"),i=r.find(".result-input"),o=r.find(".wd-pf-results"),s=r.hasClass("multi_select"),l=i.val(),c=e.data("title"),d=e.data("val");s?t.hasClass("wd-active")?(n(i,d),o.find('li[data-title="'+d+'"]').remove(),t.removeClass("wd-active")):(""===l?i.val(d):i.val(l+","+d),o.prepend('<li class="selected-value" data-title="'+d+'">'+c+"</li>"),t.addClass("wd-active")):t.hasClass("wd-active")?(i.val(""),o.find(".selected-value").remove(),t.removeClass("wd-active")):(i.val(d),o.find(".selected-value").remove(),o.prepend('<li class="selected-value" data-title="'+d+'">'+c+"</li>"),t.parents(".wd-scroll-content").find(".wd-active").removeClass("wd-active"),t.addClass("wd-active")),r.hasClass("wd-pf-categories")&&(s=new URL(e.attr("href")),l=woodmart_settings.shop_url,t.hasClass("wd-active")&&(l=s.origin+s.pathname),a.attr("action",l))}),"1"===woodmart_settings.ajax_shop&&void 0!==m.fn.pjax?m(document).off("submit","form.wd-product-filters").on("submit","form.wd-product-filters",function(e){e.preventDefault(),o=m(this),l.url=o.attr("action"),l.data=o.find(':input[value!=""]').serialize(),m.pjax(l)}):m(document).off("submit","form.wd-product-filters").on("submit","form.wd-product-filters",function(e){m(":input",this).each(function(){this.disabled=!m(this).val()})}))}),woodmartThemeModule.$document.on("click",".wd-product-filters > a.btn",function(e){e.preventDefault(),m(this).parent("form").trigger("submit")})},m(document).ready(function(){woodmartThemeModule.productFilters()})}(jQuery);