"use strict";var woof_redirect='';var woof_reset_btn_action=false;var woof_additional_fields={};jQuery(function(){try {woof_current_values=JSON.parse(woof_current_values);}catch(e) {woof_current_values=null;} if(woof_current_values==null||woof_current_values.length==0){woof_current_values={};}});if(typeof woof_lang_custom=='undefined'){var woof_lang_custom={}; /*!!important*/ } if(typeof woof_ext_filter_titles!='undefined'){woof_lang_custom=Object.assign({},woof_lang_custom,woof_ext_filter_titles);} jQuery(function($){jQuery('body').append('
');jQuery.extend(jQuery.fn,{within:function(pSelector){return this.filter(function(){return jQuery(this).closest(pSelector).length;});}});let forms=document.querySelectorAll('.woof[data-slug]');if(forms.length){forms.forEach(f=>{if(f.dataset.slug.length>0){swoof_search_slug=f.dataset.slug;}});} if(jQuery('#woof_results_by_ajax').length>0){woof_is_ajax=1;} woof_autosubmit=parseInt(jQuery('.woof').eq(0).data('autosubmit'),10);woof_ajax_redraw=parseInt(jQuery('.woof').eq(0).data('ajax-redraw'),10);woof_ext_init_functions=JSON.parse(woof_ext_init_functions);woof_init_native_woo_price_filter();jQuery('body').on('price_slider_change',function(event,min,max){if(woof_autosubmit&&!woof_show_price_search_button&&jQuery('.price_slider_wrapper').length<3){jQuery('.woof .widget_price_filter form').trigger('submit');}else{var min_price=jQuery(this).find('.price_slider_amount #min_price').val();var max_price=jQuery(this).find('.price_slider_amount #max_price').val();woof_current_values.min_price=min_price;woof_current_values.max_price=max_price;}});jQuery('body').on('change','.woof_price_filter_dropdown',function(){var val=jQuery(this).val();if(parseInt(val,10)==-1){delete woof_current_values.min_price;delete woof_current_values.max_price;}else{var val=val.split("-");woof_current_values.min_price=val[0];woof_current_values.max_price=val[1];} if(woof_autosubmit||jQuery(this).within('.woof').length==0){woof_submit_link(woof_get_submit_link());}});woof_recount_text_price_filter();jQuery('body').on('change','.woof_price_filter_txt',function(){var from=parseInt(jQuery(this).parent().find('.woof_price_filter_txt_from').val(),10);var to=parseInt(jQuery(this).parent().find('.woof_price_filter_txt_to').val(),10);if(to