!function(n){"use strict";function o(){n(".fusion-woo-sorting").each(function(){const o=n(this).find(".orderby"),t=n(this).find(".sort-count");o.length&&o.find(".current-li a").html(o.find(" ul li.current a").html()),t.length&&o.find(".current-li a").html(o.find(" ul li.current a").html())})}n(document).on("awb_woo_filters_ajax_complete",function(){o()}),o(),"1"!==fusionWooSortingVars.woo_ajax_sorting&&n(document).on("change",".fusion-woo-sorting .awb-sort-select",function(o){o.preventDefault(),window.location=n(this).val()}),n(window).on("wcpf_after_ajax_filtering",function(){var o=new URLSearchParams(window.location.search);n(".fusion-woo-sorting").find("a").each(function(){var t,i=n(this).attr("href");if(void 0!==i){for(t of o.entries())-1===i.indexOf(t[0])&&(i+="&"+t[0]+"="+t[1]);n(this).attr("href",i)}})})}(jQuery);