(function(){window.WPD="undefined"!==typeof window.WPD?window.WPD:{};window.WPD.ajaxsearchpro=new function(){this.firstIteration=!0;this.helpers={};this.plugin={};this.addons={addons:[],add:function(c){-1==this.addons.indexOf(c)&&(c=this.addons.push(c),this.addons[c-1].init())},remove:function(c){this.addons.filter(function(d){return d.name==c?("undefined"!=typeof d.destroy&&d.destroy(),!1):!0})}}}})();
(function(c){c.fn.extend(window.WPD.ajaxsearchpro.plugin,{addAnimation:function(){let d=this,a=0,b=1,g=!0;if(0<d.call_num||d._no_animations)return d.n("results").find(".item, .asp_group_header").removeClass("opacityZero").removeClass("asp_an_"+d.animOptions.items),!1;d.n("results").find(".item, .asp_group_header").each(function(){let f=this;1===b&&(g=c(f).inViewPort(0));if(1<b&&g&&!c(f).inViewPort(0)||80<b)return c(f).removeClass("opacityZero"),!0;"isotopic"==d.o.resultstype&&b>d.il.itemsPerPage?
c(f).removeClass("opacityZero"):(setTimeout(function(){c(f).addClass("asp_an_"+d.animOptions.items);c(f).removeClass("opacityZero")},a+25),a+=45,b++)})},removeAnimation:function(){let d=this;this.n("items").each(function(){c(this).removeClass("asp_an_"+d.animOptions.items)})}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{setFilterStateInput:function(a){let b=this;"undefined"==typeof a&&(a=65);let g=function(){JSON.stringify(b.originalFormData)!=JSON.stringify(d.formData(c("form",b.n("searchsettings"))))?b.n("searchsettings").find("input[name=filters_initial]").val(0):b.n("searchsettings").find("input[name=filters_initial]").val(1)};0==a?g():setTimeout(function(){g()},a)},resetSearchFilters:function(){d.formData(c("form",
this.n("searchsettings")),this.originalFormData);this.resetNoUISliderFilters();"undefined"!=typeof this.select2jQuery&&this.select2jQuery(this.n("searchsettings").get(0)).find(".asp_gochosen,.asp_goselect2").trigger("change.asp_select2");this.n("text").val("");this.n("proloading").css("display","none");this.hideLoader();this.searchAbort();this.setFilterStateInput(0)},resetNoUISliderFilters:function(){0<this.noUiSliders.length&&this.noUiSliders.forEach(function(a){if("undefined"!=typeof a.noUiSlider){let b=
[];c(a).parent().find(".asp_slider_hidden").forEach(function(g){b.push(c(g).val())});0<b.length&&a.noUiSlider.set(b)}})}})})(WPD.dom);
(function(c){c.fn.extend(window.WPD.ajaxsearchpro.plugin,{showMoreResLoader:function(){this.n("resultsDiv").addClass("asp_more_res_loading")},showLoader:function(d){d="undefined"!==typeof d?d:!1;if("none"!=this.o.loaderLocation){this.n("search").hasClass("hiddend")||"results"==this.o.loaderLocation||this.n("proloading").css({display:"block"});if(!1!==d)return!1;(!this.n("search").hasClass("hiddend")||"search"==this.o.loaderLocation)&&(this.n("search").hasClass("hiddend")||"both"!=this.o.loaderLocation&&
"results"!=this.o.loaderLocation)||this.usingLiveLoader()||(0<this.n("resultsDiv").find(".asp_results_top").length&&this.n("resultsDiv").find(".asp_results_top").css("display","none"),this.showResultsBox(),c(".asp_res_loader",this.n("resultsDiv")).removeClass("hiddend"),this.n("results").css("display","none"),this.n("showmoreContainer").css("display","none"),"undefined"!==typeof this.hidePagination&&this.hidePagination())}},hideLoader:function(){this.n("proloading").css({display:"none"});c(".asp_res_loader",
this.n("resultsDiv")).addClass("hiddend");this.n("results").css("display","");this.n("resultsDiv").removeClass("asp_more_res_loading")}})})(WPD.dom);
(function(c){c.fn.extend(window.WPD.ajaxsearchpro.plugin,{loadASPFonts:function(){!1!==ASP.font_url&&(this.fontsLoaded=!0,(new FontFace("asppsicons2","url("+ASP.font_url+")",{style:"normal",weight:"normal","font-display":"swap"})).load().then(function(d){document.fonts.add(d)}).catch(function(d){}),ASP.font_url=!1)},updateHref:function(d){d=d||window.location.hash;this.o.trigger.update_href&&!this.usingLiveLoader()&&(window.location.origin||(window.location.origin=window.location.protocol+"//"+window.location.hostname+
(window.location.port?":"+window.location.port:"")),d=this.getStateURL()+(this.resultsOpened?"&asp_s=":"&asp_ls=")+this.n("text").val()+d,history.replaceState("","",d.replace(location.origin,"")))},stat_addKeyword:function(d,a){c.fn.ajax({url:ASP.ajaxurl,method:"POST",data:{action:"ajaxsearchpro_addkeyword",id:d,keyword:a},success:function(b){}})},fixClonedSelf:function(){let d=this.o.iid,a=this.o.rid;for(;!ASP.instances.set(this)&&!(++this.o.iid,50<this.o.iid););d!=this.o.iid&&(this.o.rid=this.o.id+
"_"+this.o.iid,this.n("search").get(0).id="ajaxsearchpro"+this.o.rid,this.n("search").removeClass("asp_m_"+a).addClass("asp_m_"+this.o.rid).data("instance",this.o.iid),this.n("searchsettings").get(0).id=this.n("searchsettings").get(0).id.replace("settings"+a,"settings"+this.o.rid),this.n("searchsettings").hasClass("asp_s_"+a)?this.n("searchsettings").removeClass("asp_s_"+a).addClass("asp_s_"+this.o.rid).data("instance",this.o.iid):this.n("searchsettings").removeClass("asp_sb_"+a).addClass("asp_sb_"+
this.o.rid).data("instance",this.o.iid),this.n("resultsDiv").get(0).id=this.n("resultsDiv").get(0).id.replace("prores"+a,"prores"+this.o.rid),this.n("resultsDiv").removeClass("asp_r_"+a).addClass("asp_r_"+this.o.rid).data("instance",this.o.iid),this.n("container").find(".asp_init_data").data("instance",this.o.iid),this.n("container").find(".asp_init_data").get(0).id=this.n("container").find(".asp_init_data").get(0).id.replace("asp_init_id_"+a,"asp_init_id_"+this.o.rid),this.n("prosettings").data("opened",
0))},destroy:function(){let d=this;Object.keys(d.nodes).forEach(function(l){let k,r;null==(r=(k=d.nodes[l]).off)||r.call(k)});"undefined"!==typeof d.n("searchsettings").get(0).referenced?(--d.n("searchsettings").get(0).referenced,0>d.n("searchsettings").get(0).referenced&&d.n("searchsettings").remove()):d.n("searchsettings").remove();if("undefined"!==typeof d.n("resultsDiv").get(0).referenced){if(--d.n("resultsDiv").get(0).referenced,0>d.n("resultsDiv").get(0).referenced){let l,k;null==(k=(l=d.n("resultsDiv")).remove)||
k.call(l)}}else{let l,k;null==(k=(l=d.n("resultsDiv")).remove)||k.call(l)}let a,b;null==(b=(a=d.n("trythis")).remove)||b.call(a);let g,f;null==(f=(g=d.n("search")).remove)||f.call(g);let h,e;null==(e=(h=d.n("container")).remove)||e.call(h);d.documentEventHandlers.forEach(function(l){c(l.node).off(l.event,l.handler)})}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{isRedirectToFirstResult:function(){return(0<c(".asp_res_url",this.n("resultsDiv")).length||0<c(".asp_es_"+this.o.id+" a").length||this.o.resPage.useAjax&&0<c(this.o.resPage.selector+"a").length)&&(1==this.o.redirectOnClick&&"click"==this.ktype&&"first_result"==this.o.trigger.click||1==this.o.redirectOnEnter&&("input"==this.ktype||"keyup"==this.ktype)&&13==this.keycode&&"first_result"==this.o.trigger.return||
"button"==this.ktype&&"first_result"==this.o.sb.redirect_action)},doRedirectToFirstResult:function(){let a,b;a="click"==this.ktype?this.o.trigger.click_location:"button"==this.ktype?this.o.sb.redirect_location:this.o.trigger.return_location;0<c(".asp_res_url",this.n("resultsDiv")).length?b=c(c(".asp_res_url",this.n("resultsDiv")).get(0)).attr("href"):0<c(".asp_es_"+this.o.id+" a").length?b=c(c(".asp_es_"+this.o.id+" a").get(0)).attr("href"):this.o.resPage.useAjax&&0<c(this.o.resPage.selector+"a").length&&
(b=c(c(this.o.resPage.selector+"a").get(0)).attr("href"));""!=b&&("same"==a?location.href=b:d.openInNewTab(b),this.hideLoader(),this.hideResults());return!1},doRedirectToResults:function(a){var b;if("undefined"!=typeof this.reportSettingsValidity&&!this.reportSettingsValidity())return null==(b=this.showNextInvalidFacetMessage)||b.call(this),!1;b="click"==a?this.o.trigger.click_location:"button"==a?this.o.sb.redirect_location:this.o.trigger.return_location;a=this.getRedirectURL(a);if(this.o.overridewpdefault){if(1==
this.o.resPage.useAjax){this.hideResults();this.liveLoad(this.o.resPage.selector,a);this.showLoader();if(0==this.att("blocking")){let g;null==(g=this.hideSettings)||g.call(this)}return!1}"post"==this.o.override_method?d.submitToUrl(a,"post",{asp_active:1,p_asid:this.o.id,p_asp_data:c("form",this.n("searchsettings")).serialize()},b):"same"==b?location.href=a:d.openInNewTab(a)}else d.submitToUrl(a,"post",{np_asid:this.o.id,np_asp_data:c("form",this.n("searchsettings")).serialize()},b);this.n("proloading").css("display",
"none");this.hideLoader();if(0==this.att("blocking")){let g;null==(g=this.hideSettings)||g.call(this)}this.hideResults();this.searchAbort()},getRedirectURL:function(a){a="undefined"!==typeof a?a:"enter";var b="click"==a?this.o.trigger.click:"button"==a?this.o.sb.redirect_action:this.o.trigger.return;"results_page"==b?a="?s="+d.nicePhrase(this.n("text").val()):"woo_results_page"==b?a="?post_type=product&s="+d.nicePhrase(this.n("text").val()):(a="button"==a?"elementor_page"==b?this.o.sb.elementor_url:
this.o.sb.redirect_url:"elementor_page"==b?this.o.trigger.elementor_url:this.o.trigger.redirect_url,a=d.decodeHTMLEntities(a),a=this.parseCustomRedirectURL(a,this.n("text").val()));1<this.o.homeurl.indexOf("?")&&0===a.indexOf("?")&&(a=a.replace("?","&"));if(this.o.overridewpdefault&&"post"!=this.o.override_method){let g="&";-1!==this.o.homeurl.indexOf("?")&&"elementor_page"!=b||-1!==a.indexOf("?")||(g="?");a=a+g+"asp_active=1&p_asid="+this.o.id+"&p_asp_data=1&"+c("form",this.n("searchsettings")).serialize();
b="elementor_page"==b?a:this.o.homeurl+a}else b="elementor_page"==b?a:this.o.homeurl+a;b=b.replace("https://","https:///");b=b.replace("http://","http:///");b=b.replace(/\/\//g,"/");b=d.Hooks.applyFilters("asp_redirect_url",b,this.o.id,this.o.iid);return b=d.wp_hooks_apply_filters("asp_redirect_url",b,this.o.id,this.o.iid)},parseCustomRedirectURL:function(a,b){let g=this,f=d.decodeHTMLEntities(a).replace(/{phrase}/g,d.nicePhrase(b));a=f.match(/{(.*?)}/g);null!==a&&a.forEach(function(h){h=h.replace(/[{}]/g,
"");var e=c('input[type=radio][name*="aspf['+h+'_"]:checked',g.n("searchsettings"));0==e.length&&(e=c('input[type=text][name*="aspf['+h+'_"]',g.n("searchsettings")));0==e.length&&(e=c('input[type=hidden][name*="aspf['+h+'_"]',g.n("searchsettings")));0==e.length&&(e=c('select[name*="aspf['+h+'_"]:not([multiple])',g.n("searchsettings")));0==e.length&&(e=c('input[type=radio][name*="termset['+h+'"]:checked',g.n("searchsettings")));0==e.length&&(e=c('input[type=text][name*="termset['+h+'"]',g.n("searchsettings")));
0==e.length&&(e=c('input[type=hidden][name*="termset['+h+'"]',g.n("searchsettings")));0==e.length&&(e=c('select[name*="termset['+h+'"]:not([multiple])',g.n("searchsettings")));if(0==e.length)return!0;e=e.val();f=f.replace("{"+h+"}",""+e)});return f}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{showResults:function(){let a=this;d.Hooks.applyFilters("asp/results/show/start",a);a.initResults();"horizontal"==a.o.resultstype?a.createHorizontalScroll():"vertical"==a.o.resultstype&&a.createVerticalScroll();switch(a.o.resultstype){case "horizontal":a.showHorizontalResults();break;case "vertical":a.showVerticalResults();break;case "polaroid":a.showPolaroidResults();break;case "isotopic":a.showIsotopicResults();
break;default:a.showHorizontalResults()}a.showAnimatedImages();a.hideLoader();a.n("proclose").css({display:"block"});d.isMobile()&&a.o.mobile.hide_keyboard&&!a.resultsOpened&&document.activeElement.blur();if(a.o.settingsHideOnRes&&0==a.att("blocking")){let b;null==(b=a.hideSettings)||b.call(a)}"undefined"!=typeof WPD.lazy&&setTimeout(function(){WPD.lazy(".asp_lazy")},100);a.eh.resulsDivHoverMouseEnter=a.eh.resulsDivHoverMouseEnter||function(){c(".item",a.n("resultsDiv")).removeClass("hovered");c(this).addClass("hovered")};
a.eh.resulsDivHoverMouseLeave=a.eh.resulsDivHoverMouseLeave||function(){c(".item",a.n("resultsDiv")).removeClass("hovered")};a.n("resultsDiv").find(".item").on("mouseenter",a.eh.resulsDivHoverMouseEnter);a.n("resultsDiv").find(".item").on("mouseleave",a.eh.resulsDivHoverMouseLeave);a.fixSettingsAccessibility();a.resultsOpened=!0;d.Hooks.addFilter("asp/results/show/end",a)},hideResults:function(a){let b=this;a="undefined"==typeof a?!0:a;b.initResults();if(!b.resultsOpened)return!1;b.n("resultsDiv").removeClass(b.resAnim.showClass).addClass(b.resAnim.hideClass);
setTimeout(function(){b.n("resultsDiv").css(b.resAnim.hideCSS)},b.resAnim.duration);b.n("proclose").css({display:"none"});d.isMobile()&&a&&document.activeElement.blur();b.resultsOpened=!1;"undefined"!=typeof b.ptstack&&delete b.ptstack;let g;null==(g=b.hideArrowBox)||g.call(b);b.n("s").trigger("asp_results_hide",[b.o.id,b.o.iid],!0,!0)},updateResults:function(a){if(""===a.replace(/^\s*[\r\n]/gm,"")||c(a).hasClass("asp_nores")||0<c(a).find(".asp_nores").length)this.n("showmoreContainer").css("display",
"none"),c("span",this.n("showmore")).html("");else if("isotopic"==this.o.resultstype&&0<this.call_num&&null!=this.isotopic&&"undefined"!=typeof this.isotopic.appended&&0<this.n("items").length){a=c(a);let b=this.n("items").last(),g=parseInt(this.n("items").last().attr("data-itemnum"));a.get().forEach(function(f){c(f).attr("data-itemnum",++g).css({width:b.css("width"),height:b.css("height")})});this.n("resdrg").append(a);this.isotopic.appended(a.get());this.nodes.items=0<c(".item",this.n("resultsDiv")).length?
c(".item",this.n("resultsDiv")):c(".photostack-flip",this.n("resultsDiv"))}else 0<this.call_num&&"vertical"==this.o.resultstype?this.n("resdrg").html(this.n("resdrg").html()+'<div class="asp_v_spacer"></div>'+a):this.n("resdrg").html(this.n("resdrg").html()+a)},showResultsBox:function(){this.initResults();this.n("s").trigger("asp_results_show",[this.o.id,this.o.iid],!0,!0);this.n("resultsDiv").css({display:"block",height:"auto"});this.n("results").find(".item, .asp_group_header").addClass(this.animationOpacity);
this.n("resultsDiv").css(this.resAnim.showCSS);this.n("resultsDiv").removeClass(this.resAnim.hideClass).addClass(this.resAnim.showClass);this.fixResultsPosition(!0)},addHighlightString:function(a){let b=this,g=b.n("text").val().replace(/["']/g,"");a="undefined"==typeof a?b.n("items").find("a.asp_res_url"):a;1==b.o.singleHighlight&&""!=g&&0<a.length&&a.forEach(function(){try{const f=new URL(c(this).attr("href"));f.searchParams.set("asp_highlight",g);f.searchParams.set("p_asid",b.o.id);c(this).attr("href",
f.href)}catch(f){}})},scrollToResults:function(){var a=Math.floor(.1*window.innerHeight);if(!(!this.resultsOpened||0<this.call_num||1!=this.o.scrollToResults.enabled||0<this.n("search").closest(".asp_preview_data").length||1==this.o.compact.enabled||this.n("resultsDiv").inViewPort(a))){a="hover"==this.o.resultsposition?this.n("probox").offset().top-20:this.n("resultsDiv").offset().top-20;a+=this.o.scrollToResults.offset;var b=c("#wpadminbar");0<b.length&&(a-=b.height());window.scrollTo({top:0>a?0:
a,behavior:"smooth"})}},scrollToResult:function(a){a=c(a);a.length&&!a.inViewPort(40)&&a.get(0).scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},showAnimatedImages:function(){this.n("items").each(function(){let a=c(this).find(".asp_image[data-src]"),b=a.data("src");if("undefined"!=typeof b&&null!=b&&""!==b&&-1<b.indexOf(".gif")&&0==a.find("canvas").length){a.prepend(c('<div class="asp_item_canvas"><canvas></canvas></div>').get(0));let g=c(this).find("canvas").get(0),f=c(this).find(".asp_item_canvas"),
h=g.getContext("2d"),e=new Image;e.crossOrigin="anonymous";e.onload=function(){c(g).attr({width:e.width,height:e.height});h.drawImage(e,0,0,e.width,e.height);f.css({"background-image":"url("+g.toDataURL()+")"})};e.src=b}})},updateNoResultsHeader:function(){let a=this,b=a.n("resdrg").find(".asp_nores"),g;0<b.length&&(b=b.detach());g=a.n("resultsDiv").find(".asp_nores");0<g.length&&g.remove();0<b.length&&(a.n("resultsDiv").prepend(b),a.n("resultsDiv").find(".asp_keyword").on("click",function(){a.n("text").val(d.decodeHTMLEntities(c(this).text()));
a.n("textAutocomplete").val("");0!=a.o.redirectOnClick&&0!=a.o.redirectOnEnter&&1!=a.o.trigger.type||a.search()}))},updateInfoHeader:function(a){let b,g=this.n("resultsDiv").find(".asp_results_top"),f=this.n("text").val().trim();0<g.length&&(0>=this.n("items").length||0<this.n("resultsDiv").find(".asp_nores").length?g.css("display","none"):("undefined"==typeof this.resInfoBoxTxt&&(this.resInfoBoxTxt=0<this.n("resultsDiv").find(".asp_results_top .asp_rt_phrase").length?this.n("resultsDiv").find(".asp_results_top .asp_rt_phrase").html():
"",this.resInfoBoxTxtNoPhrase=0<this.n("resultsDiv").find(".asp_results_top .asp_rt_nophrase").length?this.n("resultsDiv").find(".asp_results_top .asp_rt_nophrase").html():""),""!==f&&""!==this.resInfoBoxTxt?b=this.resInfoBoxTxt:""===f&&""!==this.resInfoBoxTxtNoPhrase&&(b=this.resInfoBoxTxtNoPhrase),""!==b?(b=b.replaceAll("{phrase}",d.escapeHtml(this.n("text").val())),b=b.replaceAll("{results_count}",this.n("items").length),b=b.replaceAll("{results_count_total}",a),g.html(b),g.css("display","block")):
g.css("display","none")))}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{createResultsScroll:function(a){let b=this,g,f=b.n("results");a="undefined"==typeof a?"vertical":a;f.on("scroll",function(){document.dispatchEvent(new Event("wpd-lazy-trigger"));b.o.show_more.infinite&&(clearTimeout(g),g=setTimeout(function(){b.checkAndTriggerInfiniteScroll(a)},60))})},createVerticalScroll:function(){this.createResultsScroll("vertical")},createHorizontalScroll:function(){this.createResultsScroll("horizontal")},checkAndTriggerInfiniteScroll:function(a){var b=
c(".item",this.n("resultsDiv"));a="undefined"==typeof a?"window":a;if(0==this.n("showmore").length||"none"==this.n("showmoreContainer").css("display"))return!1;if("window"==a||"horizontal"==a){if("isotopic"==this.o.resultstype&&"none"!=c("nav.asp_navigation",this.n("resultsDiv")).css("display"))return!1;a=b.last().inViewPort(0,this.n("resultsDiv").get(0));let g=b.last().inViewPort(0);!this.searching&&0<b.length&&a&&g&&this.n("showmore").find("a.asp_showmore").trigger("click")}else"vertical"==a?(b=
this.n("results"),d.isScrolledToBottom(b.get(0),20)&&this.n("showmore").find("a.asp_showmore").trigger("click")):"isotopic"==a&&!this.searching&&0<b.length&&this.n("resultsDiv").find("nav.asp_navigation ul li").last().hasClass("asp_active")&&this.n("showmore").find("a.asp_showmore").trigger("click")}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{isDuplicateSearchTriggered:function(){for(let a=0;25>a;a++)if(this.o.id+"_"+a!=this.o.rid&&!1!==ASP.instances.get(this.o.id,a))return ASP.instances.get(this.o.id,a).searching;return!1},searchAbort:function(){null!=this.post&&(this.post.abort(),this.isAutoP=!1)},searchWithCheck:function(a){let b=this;"undefined"==typeof a&&(a=50);b.n("text").val().length<b.o.charcount||(b.searchAbort(),clearTimeout(b.timeouts.searchWithCheck),
b.timeouts.searchWithCheck=setTimeout(function(){b.search()},a))},search:function(a,b,g,f,h){let e=this,l=!1;if(e.isDuplicateSearchTriggered())return!1;g="undefined"==typeof g?!1:g;f="undefined"==typeof f?!1:f;h="undefined"==typeof h?!1:h;let k={action:"ajaxsearchpro_search",aspp:e.n("text").val(),asid:e.o.id,asp_inst_id:e.o.rid,options:c("form",e.n("searchsettings")).serialize()};k=d.Hooks.applyFilters("asp_search_data",k,e.o.id,e.o.iid);k=d.wp_hooks_apply_filters("asp_search_data",k,e.o.id,e.o.iid);
let r;null==(r=e.hideArrowBox)||r.call(e);if("undefined"!=typeof e.reportSettingsValidity&&!e.isAutoP&&!e.reportSettingsValidity()){if(!h){let p;null==(p=e.showNextInvalidFacetMessage)||p.call(e);let q;null==(q=e.scrollToNextInvalidFacetMessage)||q.call(e)}l=!0}e.isAutoP&&(k.autop=1);if(!g&&!f&&JSON.stringify(k)===JSON.stringify(e.lastSearchData)){e.resultsOpened||e.usingLiveLoader()||e.showResults();if(e.isRedirectToFirstResult())return e.doRedirectToFirstResult(),!1;l=!0}if(l)return e.hideLoader(),
e.searchAbort(),!1;e.n("s").trigger("asp_search_start",[e.o.id,e.o.iid,e.n("text").val()],!0,!0);e.searching=!0;e.n("proclose").css({display:"none"});e.showLoader(g);if(0==e.att("blocking")&&0==e.o.trigger.facet){let p;null==(p=e.hideSettings)||p.call(e)}g?(e.call_num++,k.asp_call_num=e.call_num,e.autopStartedTheSearch&&(k.options+="&"+c.fn.serializeForAjax(e.autopData),--k.asp_call_num)):(e.call_num=0,e.autopStartedTheSearch=!!k.autop);f=c('form[name="asp_data"]');0<f.length&&(k.asp_preview_options=
f.serialize());"undefined"!=typeof a&&!1!==a&&(k.options+="&force_count="+parseInt(a));"undefined"!=typeof b&&!1!==b&&(k.options+="&force_order="+parseInt(b));let u;null==(u=e.gaEvent)||u.call(e,"search_start");0<c(".asp_es_"+e.o.id).length?e.liveLoad(".asp_es_"+e.o.id,e.getCurrentLiveURL(),e.o.trigger.update_href):e.o.resPage.useAjax?e.liveLoad(e.o.resPage.selector,e.getRedirectURL()):e.o.wooShop.useAjax?e.liveLoad(e.o.wooShop.selector,e.getLiveURLbyBaseLocation(e.o.wooShop.url)):e.o.taxArchive.useAjax?
e.liveLoad(e.o.taxArchive.selector,e.getLiveURLbyBaseLocation(e.o.taxArchive.url)):e.o.cptArchive.useAjax?e.liveLoad(e.o.cptArchive.selector,e.getLiveURLbyBaseLocation(e.o.cptArchive.url)):e.post=c.fn.ajax({url:ASP.ajaxurl,method:"POST",data:k,success:function(p){e.searching=!1;p=p.replace(/^\s*[\r\n]/gm,"");let q=p.match(/___ASPSTART_HTML___(.*[\s\S]*)___ASPEND_HTML___/),n=p.match(/___ASPSTART_DATA___(.*[\s\S]*)___ASPEND_DATA___/);if(null==q||"object"!=typeof q||"undefined"==typeof q[1])return e.hideLoader(),
alert('Ajax Search Pro Error:\r\n\r\nPlease look up "The response data is missing" from the documentation at\r\n\r\n documentation.ajaxsearchpro.com'),!1;q=q[1];q=d.Hooks.applyFilters("asp_search_html",q,e.o.id,e.o.iid);q=d.wp_hooks_apply_filters("asp_search_html",q,e.o.id,e.o.iid);n=JSON.parse(n[1]);e.n("s").trigger("asp_search_end",[e.o.id,e.o.iid,e.n("text").val(),n],!0,!0);if(e.autopStartedTheSearch)if("undefined"!=typeof k.autop){if(e.autopData.not_in={},e.autopData.not_in_count=0,"undefined"!=
typeof n.results){let m=[];"undefined"!=typeof n.results.groups?Object.keys(n.results.groups).forEach(function(t){"undefined"!=typeof n.results.groups[t].items&&(t=n.results.groups[t].items,Array.isArray(t)&&t.forEach(function(w){m.push(w)}))}):m=Array.isArray(n.results)?n.results:m;m.forEach(function(t){"undefined"==typeof e.autopData.not_in[t.content_type]&&(e.autopData.not_in[t.content_type]=[]);e.autopData.not_in[t.content_type].push(t.id);++e.autopData.not_in_count})}}else n.full_results_count+=
e.autopData.not_in_count;g?(e.updateResults(q),e.results_num+=n.results_count):(e.initResults(),e.n("resdrg").html(""),e.n("resdrg").html(q),e.results_num=n.results_count,e.o.statistics&&e.stat_addKeyword(e.o.id,e.n("text").val()));e.updateNoResultsHeader();e.nodes.items=0<c(".item",e.n("resultsDiv")).length?c(".item",e.n("resultsDiv")):c(".photostack-flip",e.n("resultsDiv"));e.addHighlightString();let v;null==(v=e.gaEvent)||v.call(e,"search_end",{results_count:e.n("items").length});if(e.isRedirectToFirstResult())return e.doRedirectToFirstResult(),
!1;e.hideLoader();e.showResults();""!=window.location.hash&&-1<window.location.hash.indexOf("#asp-res-")&&0<c(window.location.hash).length?e.scrollToResult(window.location.hash):e.scrollToResults();e.lastSuccesfulSearch=c("form",e.n("searchsettings")).serialize()+e.n("text").val().trim();e.lastSearchData=k;e.updateInfoHeader(n.full_results_count);e.updateHref();0<e.n("showmore").length&&(0<c("span",e.n("showmore")).length&&0<n.results_count&&0<n.full_results_count-e.results_num?(""==e.n("showmore").data("text")&&
e.n("showmore").data("text",e.n("showmore").html()),e.n("showmore").html(e.n("showmore").data("text").replaceAll("{phrase}",d.escapeHtml(e.n("text").val()))),e.n("showmoreContainer").css("display","block"),e.n("showmore").css("display","block"),c("span",e.n("showmore")).html("("+(n.full_results_count-e.results_num)+")"),p=c("a",e.n("showmore")),p.attr("href",""),p.off(),p.on(e.clickTouchend,function(m){m.preventDefault();m.stopImmediatePropagation();if("ajax"==e.o.show_more.action){if(e.searching)return!1;
e.showMoreResLoader();e.search(!1,!1,!0)}else c(this).off(),"results_page"==e.o.show_more.action?m="?s="+d.nicePhrase(e.n("text").val()):"woo_results_page"==e.o.show_more.action?m="?post_type=product&s="+d.nicePhrase(e.n("text").val()):(m="elementor_page"==e.o.show_more.action?e.parseCustomRedirectURL(e.o.show_more.elementor_url,e.n("text").val()):e.parseCustomRedirectURL(e.o.show_more.url,e.n("text").val()),m=c("<textarea />").html(m).text()),"elementor_page"!=e.o.show_more.action&&1<e.o.homeurl.indexOf("?")&&
0==m.indexOf("?")&&(m=m.replace("?","&")),m="elementor_page"==e.o.show_more.action?m:e.o.homeurl+m,e.o.overridewpdefault?"post"==e.o.override_method?d.submitToUrl(m,"post",{asp_active:1,p_asid:e.o.id,p_asp_data:c("form",e.n("searchsettings")).serialize()},e.o.show_more.location):(m=m+"&asp_active=1&p_asid="+e.o.id+"&p_asp_data=1&"+c("form",e.n("searchsettings")).serialize(),"same"==e.o.show_more.location?location.href=m:d.openInNewTab(m)):d.submitToUrl(m,"post",{np_asid:e.o.id,np_asp_data:c("form",
e.n("searchsettings")).serialize()},e.o.show_more.location)})):(e.n("showmoreContainer").css("display","none"),c("span",e.n("showmore")).html("")));e.isAutoP=!1},fail:function(p){p.aborted||(e.n("resdrg").html(""),e.n("resdrg").html('<div class="asp_nores">The request failed. Please check your connection! Status: '+p.status+"</div>"),e.nodes.item=0<c(".item",e.n("resultsDiv")).length?c(".item",e.n("resultsDiv")):c(".photostack-flip",e.n("resultsDiv")),e.results_num=0,e.searching=!1,e.hideLoader(),
e.showResults(),e.scrollToResults(),e.isAutoP=!1)}})}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{searchFor:function(a){"undefined"!=typeof a&&this.n("text").val(a);this.n("textAutocomplete").val("");this.search(!1,!1,!1,!0)},searchRedirect:function(a){a=this.parseCustomRedirectURL(this.o.trigger.redirect_url,a);1<this.o.homeurl.indexOf("?")&&0==a.indexOf("?")&&(a=a.replace("?","&"));this.o.overridewpdefault?"post"==this.o.override_method?d.submitToUrl(this.o.homeurl+a,"post",{asp_active:1,p_asid:this.o.id,
p_asp_data:c("form",this.n("searchsettings")).serialize()}):location.href=this.o.homeurl+a+"&asp_active=1&p_asid="+this.o.id+"&p_asp_data=1&"+c("form",this.n("searchsettings")).serialize():d.submitToUrl(this.o.homeurl+a,"post",{np_asid:this.o.id,np_asp_data:c("form",this.n("searchsettings")).serialize()})},toggleSettings:function(a){if("undefined"!=typeof a)if("show"==a){let b;null==(b=this.showSettings)||b.call(this)}else{let b;null==(b=this.hideSettings)||b.call(this)}else if(1==this.n("prosettings").data("opened")){let b;
null==(b=this.hideSettings)||b.call(this)}else{let b;null==(b=this.showSettings)||b.call(this)}},closeResults:function(a){"undefined"!=typeof a&&a&&(this.n("text").val(""),this.n("textAutocomplete").val(""));this.hideResults();this.n("proloading").css("display","none");this.hideLoader();this.searchAbort()},getStateURL:function(){let a=location.href,b;a=a.split("p_asid");a=a[0];a=a.replace("&asp_active=1","");a=a.replace("?asp_active=1","");a="?"==a.slice(-1)?a.slice(0,-1):a;a="&"==a.slice(-1)?a.slice(0,
-1):a;b=1<a.indexOf("?")?"&":"?";return a+b+"p_asid="+this.o.id+"&p_asp_data=1&"+c("form",this.n("searchsettings")).serialize()},resetSearch:function(){this.resetSearchFilters()},filtersInitial:function(){return 1==this.n("searchsettings").find("input[name=filters_initial]").val()},filtersChanged:function(){return 1==this.n("searchsettings").find("input[name=filters_changed]").val()}})})(WPD.dom);
(function(c){c.fn.extend(window.WPD.ajaxsearchpro.helpers,{Hooks:window.WPD.Hooks,deviceType:function(){let d=window.innerWidth;return 640>=d?"phone":1024>=d?"tablet":"desktop"},detectIOS:function(){return"undefined"!=typeof window.navigator&&"undefined"!=typeof window.navigator.userAgent?null!=window.navigator.userAgent.match(/(iPod|iPhone|iPad)/):!1},detectIE:function(){var d=window.navigator.userAgent;let a=d.indexOf("MSIE ");d=d.indexOf("Trident/");return 0<a||0<d?!0:!1},isMobile:function(){try{return document.createEvent("TouchEvent"),
!0}catch(d){return!1}},isTouchDevice:function(){return"ontouchstart"in window},isSafari:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},escapeHtml:function(d){return d.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")},whichjQuery:function(d){let a=!1;"undefined"!=typeof window.$&&("undefined"===typeof d?a=window.$:"undefined"!=typeof window.$.fn[d]&&(a=window.$));!1===a&&"undefined"!=typeof window.jQuery&&
(a=window.jQuery,"undefined"===typeof d?a=window.jQuery:"undefined"!=typeof window.jQuery.fn[d]&&(a=window.jQuery));return a},formData:function(d,a){let b=this,g=d.find("input,textarea,select,button").get();if(1===arguments.length)return a={},g.forEach(function(f){f.name&&!f.disabled&&(f.checked||/select|textarea/i.test(f.nodeName)||/text/i.test(f.type)||c(f).hasClass("hasDatepicker")||c(f).hasClass("asp_slider_hidden"))&&(void 0==a[f.name]&&(a[f.name]=[]),c(f).hasClass("hasDatepicker")?a[f.name].push(c(f).parent().find(".asp_datepicker_hidden").val()):
a[f.name].push(c(f).val()))}),JSON.stringify(a);"object"!=typeof a&&(a=JSON.parse(a));g.forEach(function(f){if(f.name)if(a[f.name]){let h=a[f.name],e=c(f);"[object Array]"!==Object.prototype.toString.call(h)&&(h=[h]);if("checkbox"==f.type||"radio"==f.type){let l=e.val(),k=!1;for(let r=0;r<h.length;r++)if(h[r]==l){k=!0;break}e.prop("checked",k)}else e.val(h[0]),c(f).hasClass("asp_gochosen")||c(f).hasClass("asp_goselect2")?WPD.intervalUntilExecute(function(l){l(f).trigger("change.asp_select2")},function(){return b.whichjQuery("asp_select2")},
50,3):c(f).hasClass("hasDatepicker")&&WPD.intervalUntilExecute(function(l){let k=h[0],r=l(e.get(0)).datepicker("option","dateFormat");l(e.get(0)).datepicker("option","dateFormat","yy-mm-dd");l(e.get(0)).datepicker("setDate",k);l(e.get(0)).datepicker("option","dateFormat",r);l(e.get(0)).trigger("selectnochange")},function(){return b.whichjQuery("datepicker")},50,3)}else"checkbox"!=f.type&&"radio"!=f.type||c(f).prop("checked",!1)});return d},submitToUrl:function(d,a,b,g){let f;f=c('<form style="display: none;" />');
f.attr("action",d);f.attr("method",a);c("body").append(f);"undefined"!==typeof b&&null!==b&&Object.keys(b).forEach(function(h){let e=b[h],l=c('<input type="hidden" />');l.attr("name",h);l.attr("value",e);f.append(l)});"undefined"!=typeof g&&"new"==g&&f.attr("target","_blank");f.get(0).submit()},openInNewTab:function(d){Object.assign(document.createElement("a"),{target:"_blank",href:d}).click()},isScrolledToBottom:function(d,a){return d.scrollHeight-d.scrollTop-c(d).outerHeight()<a},getWidthFromCSSValue:function(d,
a){d+="";d=-1<d.indexOf("px")?parseInt(d,10):-1<d.indexOf("%")?"undefined"!=typeof a&&null!=a?Math.floor(parseInt(d,10)/100*a):parseInt(d,10):parseInt(d,10);return 100>d?100:d},nicePhrase:function(d){return encodeURIComponent(d).replace(/%20/g,"+")},unqoutePhrase:function(d){return d.replace(/["']/g,"")},inputToFloat(d){return d.replace(/^[.]/g,"").replace(/[^0-9.-]/g,"").replace(/^[-]/g,"x").replace(/[-]/g,"").replace(/[x]/g,"-").replace(/(\..*?)\..*/g,"$1")},addThousandSeparators(d,a){return""!=
a?(a=a||",",String(d).replace(/(?:^|[^.\d])\d+/g,function(b){return b.replace(/\B(?=(?:\d{3})+\b)/g,a)})):d},decodeHTMLEntities:function(d){let a=document.createElement("div");d&&"string"===typeof d&&(d=d.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,""),d=d.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,""),a.innerHTML=d,d=a.textContent,a.textContent="");return d},isScrolledToRight:function(d){return d.scrollWidth-c(d).outerWidth()===d.scrollLeft},isScrolledToLeft:function(d){return 0===d.scrollLeft},
wp_hooks_apply_filters:function(){return"undefined"!=typeof wp&&"undefined"!=typeof wp.hooks&&"undefined"!=typeof wp.hooks.applyFilters?wp.hooks.applyFilters.apply(null,arguments):"undefined"!=typeof arguments[1]?arguments[1]:!1}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{detectAndFixFixedPositioning:function(){let a=!1,b=this.n("search").get(0);for(;b;)if(b=b.parentElement,null!=b&&"fixed"==window.getComputedStyle(b).position){a=!0;break}a||"fixed"==this.n("search").css("position")?("absolute"==this.n("resultsDiv").css("position")&&this.n("resultsDiv").css({position:"fixed","z-index":2147483647}),this.att("blocking")||this.n("searchsettings").css({position:"fixed","z-index":2147483647})):
("fixed"==this.n("resultsDiv").css("position")&&this.n("resultsDiv").css("position","absolute"),this.att("blocking")||this.n("searchsettings").css("position","absolute"))},fixSettingsAccessibility:function(){this.n("searchsettings").find("input.asp_select2-search__field").attr("aria-label","Select2 search")},fixTryThisPosition:function(){this.n("trythis").css({left:this.n("search").position().left})},fixResultsPosition:function(a){a="undefined"==typeof a?!1:a;var b=c("body");let g=0;var f=this.n("resultsDiv").css("position");
if(0!=c._fn.bodyTransformY()||"static"!=b.css("position"))g=b.offset().top;0!=c._fn.bodyTransformY()&&"fixed"==f&&(f="absolute",this.n("resultsDiv").css("position","absolute"));"fixed"==f&&(g=0);if("fixed"==f||"absolute"==f)if(1==a||"visible"==this.n("resultsDiv").css("visibility")){a=this.n("search").offset();f=0;if(0!=c._fn.bodyTransformX()||"static"!=b.css("position"))f=b.offset().left;if("undefined"!=typeof a){let h=0;b="phone"==d.deviceType()?this.o.results.width_phone:"tablet"==d.deviceType()?
this.o.results.width_tablet:this.o.results.width;"auto"==b&&(b=240>this.n("search").outerWidth()?240:this.n("search").outerWidth());this.n("resultsDiv").css("width",isNaN(b)?b:b+"px");"right"==this.o.resultsSnapTo?h=this.n("resultsDiv").outerWidth()-this.n("search").outerWidth():"center"==this.o.resultsSnapTo&&(h=Math.floor((this.n("resultsDiv").outerWidth()-parseInt(this.n("search").outerWidth()))/2));this.n("resultsDiv").css({top:a.top+this.n("search").outerHeight(!0)-g+"px",left:a.left-h-f+"px"})}}},
fixSettingsPosition:function(a){a="undefined"==typeof a?!1:a;var b=c("body"),g=0,f=this.n("searchsettings").css("position");if(0!=c._fn.bodyTransformY()||"static"!=b.css("position"))g=b.offset().top;0!=c._fn.bodyTransformY()&&"fixed"==f&&(f="absolute",this.n("searchsettings").css("position","absolute"));"fixed"==f&&(g=0);if((1==a||0!=this.n("prosettings").data("opened"))&&1!=this.att("blocking")){a=0;if(0!=c._fn.bodyTransformX()||"static"!=b.css("position"))a=b.offset().left;this.fixSettingsWidth();
b="none"!=this.n("prosettings").css("display")?this.n("prosettings"):this.n("promagnifier");f=b.offset();g=f.top+b.height()-2-g+"px";b="left"==this.o.settingsimagepos?f.left:f.left+b.width()-this.n("searchsettings").width();b=b-a+"px";this.n("searchsettings").css({display:"block",top:g,left:b})}},fixSettingsWidth:function(){if(!this.att("blocking")&&"masonry"!=this.o.fss_layout&&(this.n("searchsettings").css({width:"100%"}),10<this.n("searchsettings").width()%c("fieldset",this.n("searchsettings")).outerWidth(!0))){let a=
Math.floor(this.n("searchsettings").width()/c("fieldset",this.n("searchsettings")).outerWidth(!0));a=0>=a?1:a;this.n("searchsettings").css({width:a*c("fieldset",this.n("searchsettings")).outerWidth(!0)+8+"px"})}},hideOnInvisibleBox:function(){if(1==this.o.detectVisibility&&0==this.o.compact.enabled&&!this.n("search").hasClass("hiddend")&&!this.n("search").isVisible()){let a;null==(a=this.hideSettings)||a.call(this);this.hideResults()}}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{initMagnifierEvents:function(){let a=this;a.n("promagnifier").on("click",function(b){let g=a.n("search").attr("data-asp-compact")||"closed";a.keycode=b.keyCode||b.which;a.ktype=b.type;if(1==a.o.compact.enabled&&("closed"==g||1==a.o.compact.closeOnMagnifier&&"open"==g))return!1;let f;null==(f=a.gaEvent)||f.call(a,"magnifier");if(a.n("text").val().length>=a.o.charcount&&1==a.o.redirectOnClick&&"first_result"!=
a.o.trigger.click)return a.doRedirectToResults("click"),clearTimeout(void 0),!1;if("ajax_search"!=a.o.trigger.click&&"first_result"!=a.o.trigger.click)return!1;a.searchAbort();clearTimeout(a.timeouts.search);a.n("proloading").css("display","none");a.n("text").val().length>=a.o.charcount&&(a.timeouts.search=setTimeout(function(){c("form",a.n("searchsettings")).serialize()+a.n("text").val().trim()!=a.lastSuccesfulSearch||!a.resultsOpened&&!a.usingLiveLoader()?a.search():a.isRedirectToFirstResult()?
a.doRedirectToFirstResult():a.n("proclose").css("display","block")},a.o.trigger.delay))})},initButtonEvents:function(){let a=this;a.n("searchsettings").find("button.asp_s_btn").on("click",function(b){a.ktype="button";b.preventDefault();if(a.n("text").val().length>=a.o.charcount){if("ajax_search"!=a.o.sb.redirect_action)if("first_result"!=a.o.sb.redirect_action)a.doRedirectToResults("button");else{if(a.isRedirectToFirstResult())return a.doRedirectToFirstResult(),!1;a.search()}else c("form",a.n("searchsettings")).serialize()+
a.n("text").val().trim()==a.lastSuccesfulSearch&&a.resultsOpened||a.search();clearTimeout(a.timeouts.search)}});a.n("searchsettings").find("button.asp_r_btn").on("click",function(b){let g=d.formData(c("form",a.n("searchsettings"))),f=a.n("text").val();b.preventDefault();a.resetSearchFilters();"live"!=a.o.rb.action||JSON.stringify(g)==JSON.stringify(d.formData(c("form",a.n("searchsettings"))))&&""==f?"close"==a.o.rb.action&&a.hideResults():a.search(!1,!1,!1,!0,!0)})}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{initInputEvents:function(){let a=this,b=!1,g=function(){a.n("text").off("mousedown touchstart keydown",g);if(!b){a._initFocusInput();a.o.trigger.type&&a._initSearchInput();a._initEnterEvent();a._initFormEvent();let f;null==(f=a.initAutocompleteEvent)||f.call(a);b=!0}};a.n("text").on("mousedown touchstart keydown",g,{passive:!0})},_initFocusInput:function(){let a=this;a.n("text").on("click",function(b){b.stopPropagation();
b.stopImmediatePropagation();c(this).trigger("focus");let g;null==(g=a.gaEvent)||g.call(a,"focus");if(c("form",a.n("searchsettings")).serialize()+a.n("text").val().trim()==a.lastSuccesfulSearch)return a.resultsOpened||a.usingLiveLoader()||(a._no_animations=!0,a.showResults(),a._no_animations=!1),!1});a.n("text").on("focus input",function(){a.searching||(""!=c(this).val()?a.n("proclose").css("display","block"):a.n("proclose").css({display:"none"}))})},_initSearchInput:function(){let a=this,b=a.n("text").val();
a.n("text").on("input",function(g){a.keycode=g.keyCode||g.which;a.ktype=g.type;if(d.detectIE()){if(b==a.n("text").val())return!1;b=a.n("text").val()}a.updateHref();if(!a.o.trigger.type)return a.searchAbort(),clearTimeout(a.timeouts.search),a.hideLoader(),!1;let f;null==(f=a.hideArrowBox)||f.call(a);if(a.n("text").val().length<a.o.charcount){a.n("proloading").css("display","none");if(0==a.att("blocking")){let h;null==(h=a.hideSettings)||h.call(a)}a.hideResults(!1);a.searchAbort();clearTimeout(a.timeouts.search);
return!1}a.searchAbort();clearTimeout(a.timeouts.search);a.n("proloading").css("display","none");a.timeouts.search=setTimeout(function(){c("form",a.n("searchsettings")).serialize()+a.n("text").val().trim()!=a.lastSuccesfulSearch||!a.resultsOpened&&!a.usingLiveLoader()?a.search():a.isRedirectToFirstResult()?a.doRedirectToFirstResult():a.n("proclose").css("display","block")},a.o.trigger.delay)})},_initEnterEvent:function(){let a=this,b,g=!1;a.n("text").on("keyup",function(f){a.keycode=f.keyCode||f.which;
a.ktype=f.type;if(13==a.keycode){clearTimeout(b);b=setTimeout(function(){g=!1},300);if(g)return!1;g=!0}f=c(this).hasClass("orig");if(a.n("text").val().length>=a.o.charcount&&f&&13==a.keycode){let h;null==(h=a.gaEvent)||h.call(a,"return");1==a.o.redirectOnEnter?"first_result"!=a.o.trigger.return?a.doRedirectToResults(a.ktype):a.search():"ajax_search"==a.o.trigger.return&&(c("form",a.n("searchsettings")).serialize()+a.n("text").val().trim()==a.lastSuccesfulSearch&&a.resultsOpened||a.search());clearTimeout(a.timeouts.search)}})},
_initFormEvent:function(){let a=this;c(a.n("text").closest("form").get(0)).on("submit",function(b,g){b.preventDefault();d.isMobile()?a.o.redirectOnEnter?(b=new Event("keyup"),b.keyCode=b.which=13,this.n("text").get(0).dispatchEvent(b)):(a.search(),document.activeElement.blur()):"undefined"!=typeof g&&"ajax"==g&&a.search()})}})})(WPD.dom);
(function(c){c.fn.extend(window.WPD.ajaxsearchpro.plugin,{initNavigationEvents:function(){let d=this,a=function(b){let g=b.keyCode||b.which;if(0<c(".item",d.n("resultsDiv")).length&&"none"!=d.n("resultsDiv").css("display")&&"vertical"==d.o.resultstype){if(40==g||38==g){var f=d.n("resultsDiv").find(".item.hovered");d.n("text").trigger("blur");0==f.length?d.n("resultsDiv").find(".item").first().addClass("hovered"):(40==g&&(0==f.next(".item").length?d.n("resultsDiv").find(".item").removeClass("hovered").first().addClass("hovered"):
f.removeClass("hovered").next(".item").addClass("hovered")),38==g&&(0==f.prev(".item").length?d.n("resultsDiv").find(".item").removeClass("hovered").last().addClass("hovered"):f.removeClass("hovered").prev(".item").addClass("hovered")));b.stopPropagation();b.preventDefault();d.n("resultsDiv").find(".resdrg .item.hovered").inViewPort(50,d.n("resultsDiv").get(0))||(f=d.n("resultsDiv").find(".resdrg .item.hovered").get(0),null!=f&&"undefined"!=typeof f.scrollIntoView&&f.scrollIntoView({behavior:"smooth",
block:"start",inline:"nearest"}))}13==g&&0<c(".item.hovered",d.n("resultsDiv")).length&&(b.stopPropagation(),b.preventDefault(),c(".item.hovered a.asp_res_url",d.n("resultsDiv")).get(0).click())}};d.documentEventHandlers.push({node:document,event:"keydown",handler:a});c(document).on("keydown",a)}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{initOtherEvents:function(){let a=this;if(d.isMobile()&&d.detectIOS())a.n("text").on("touchstart",function(){a.savedScrollTop=window.scrollY;a.savedContainerTop=a.n("search").offset().top});if(a.o.focusOnPageload)c(window).on("load",function(){a.n("text").get(0).focus()},{options:{once:!0}});a.n("proclose").on(a.clickTouchend,function(g){g.preventDefault();g.stopImmediatePropagation();a.n("text").val("");
a.n("textAutocomplete").val("");a.hideResults();a.n("text").trigger("focus");a.n("proloading").css("display","none");a.hideLoader();a.searchAbort();if(0<c(".asp_es_"+a.o.id).length)a.showLoader(),a.liveLoad(".asp_es_"+a.o.id,a.getCurrentLiveURL(),a.o.trigger.update_href);else{g=["resPage","wooShop","taxArchive","cptArchive"];for(let f=0;f<g.length;f++)if(a.o[g[f]].useAjax){a.showLoader();a.liveLoad(a.o[g[f]].selector,a.getCurrentLiveURL());break}}a.n("text").get(0).focus()});if(d.isMobile()){var b=
function(){a.orientationChange();setTimeout(function(){a.orientationChange()},600)};a.documentEventHandlers.push({node:window,event:"orientationchange",handler:b});c(window).on("orientationchange",b)}else b=function(){a.resize()},a.documentEventHandlers.push({node:window,event:"resize",handler:b}),c(window).on("resize",b,{passive:!0});b=function(){a.scrolling(!1)};a.documentEventHandlers.push({node:window,event:"scroll",handler:b});c(window).on("scroll",b,{passive:!0});if(d.isMobile()&&""!=a.o.mobile.menu_selector)c(a.o.mobile.menu_selector).on("touchend",
function(){let g=this;setTimeout(function(){let f=c(g).find("input.orig");f=0==f.length?c(g).next().find("input.orig"):f;f=0==f.length?c(g).parent().find("input.orig"):f;f=0==f.length?a.n("text"):f;a.n("search").inViewPort()&&f.get(0).focus()},300)});d.detectIOS()&&d.isMobile()&&d.isTouchDevice()&&16>parseInt(a.n("text").css("font-size"))&&(a.n("text").data("fontSize",a.n("text").css("font-size")).css("font-size","16px"),a.n("textAutocomplete").css("font-size","16px"),c("body").append("<style>#ajaxsearchpro"+
a.o.rid+" input.orig::-webkit-input-placeholder{font-size: 16px !important;}</style>"))},orientationChange:function(){this.detectAndFixFixedPositioning();this.fixSettingsPosition();this.fixResultsPosition();this.fixTryThisPosition();"isotopic"==this.o.resultstype&&"visible"==this.n("resultsDiv").css("visibility")&&(this.calculateIsotopeRows(),this.showPagination(!0),this.removeAnimation())},resize:function(){this.detectAndFixFixedPositioning();this.fixSettingsPosition();this.fixResultsPosition();
this.fixTryThisPosition();let a;null==(a=this.hideArrowBox)||a.call(this);"isotopic"==this.o.resultstype&&"visible"==this.n("resultsDiv").css("visibility")&&(this.calculateIsotopeRows(),this.showPagination(!0),this.removeAnimation())},scrolling:function(a){this.detectAndFixFixedPositioning();this.hideOnInvisibleBox();this.fixSettingsPosition(a);this.fixResultsPosition(a)},initTryThisEvents:function(){let a=this;0<a.n("trythis").find("a").length&&(a.n("trythis").find("a").on("click touchend",function(b){b.preventDefault();
b.stopImmediatePropagation();a.o.compact.enabled&&"closed"==(a.n("search").attr("data-asp-compact")||"closed")&&a.n("promagnifier").trigger("click");document.activeElement.blur();a.n("textAutocomplete").val("");a.n("text").val(c(this).html());let g;null==(g=a.gaEvent)||g.call(a,"try_this");a.o.trigger.type&&a.searchWithCheck(80)}),a.n("trythis").css({visibility:"visible"}))},initSelect2:function(){let a=this;window.WPD.intervalUntilExecute(function(b){"undefined"!==typeof b.fn.asp_select2&&(a.select2jQuery=
b,c("select.asp_gochosen, select.asp_goselect2",a.n("searchsettings")).each(function(){c(this).removeAttr("data-asp_select2-id");c(this).find('option[value=""]').val("__any__");a.select2jQuery(this).asp_select2({width:"100%",theme:"flat",allowClear:0<c(this).find('option[value=""]').length,language:{noResults:function(){return a.o.select2.nores}}});a.select2jQuery(this).on("change",function(){c(this).trigger("change")})}))},function(){return d.whichjQuery("asp_select2")})}})})(WPD.dom);
(function(c){c.fn.extend(window.WPD.ajaxsearchpro.plugin,{initResultsEvents:function(){let d=this;d.n("resultsDiv").css({opacity:"0"});let a=function(b){let g=b.keyCode||b.which,f=b.type;if(0==c(b.target).closest(".asp_w").length){d.hideOnInvisibleBox();let h;null==(h=d.hideArrowBox)||h.call(d);if("click"!=f||"touchend"!=f||3!=g){if(d.o.compact.enabled)b=d.n("search").attr("data-asp-compact")||"closed",1!=d.o.compact.closeOnDocument||"open"!=b||d.resultsOpened||(d.closeCompact(),d.searchAbort(),d.hideLoader());
else if(0==d.resultsOpened||1!=d.o.closeOnDocClick)return;d.dragging||(d.hideLoader(),d.searchAbort(),d.hideResults())}}};d.documentEventHandlers.push({node:document,event:d.clickTouchend,handler:a});c(document).on(d.clickTouchend,a);d.n("resultsDiv").on("click",".results .item",function(){""!=c(this).attr("id")&&d.updateHref("#"+c(this).attr("id"));let b;null==(b=d.gaEvent)||b.call(d,"result_click",{result_title:c(this).find("a.asp_res_url").text(),result_url:c(this).find("a.asp_res_url").attr("href")})});
"isotopic"==d.o.resultstype&&(d.n("resultsDiv").on("swiped-left",function(){d.visiblePagination()&&d.n("resultsDiv").find("a.asp_next").trigger("click")}),d.n("resultsDiv").on("swiped-right",function(){d.visiblePagination()&&d.n("resultsDiv").find("a.asp_prev").trigger("click")}))}})})(WPD.dom);(function(c){c.fn.extend(window.WPD.ajaxsearchpro.plugin,{monitorTouchMove:function(){let d=this;d.dragging=!1;c("body").on("touchmove",function(){d.dragging=!0}).on("touchstart",function(){d.dragging=!1})}})})(WPD.dom);
(function(c){c.fn.extend(window.WPD.ajaxsearchpro.plugin,{initAutop:function(){if("disabled"==this.o.autop.state)return!1;var d=window.location.href;if(-1<d.indexOf("asp_ls=")||-1<d.indexOf("asp_ls&"))return!1;d=this.o.show_more.enabled&&"ajax"==this.o.show_more.action?!1:this.o.autop.count;this.isAutoP=!0;1==this.o.compact.enabled&&this.openCompact();"phrase"==this.o.autop.state?(this.o.is_results_page||this.n("text").val(this.o.autop.phrase),this.search(d)):"latest"==this.o.autop.state?this.search(d,
1):this.search(d,2)}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{initEtc:function(){let a=this;a.il={columns:3,rows:a.o.isotopic.pagination?a.o.isotopic.rows:1E4,itemsPerPage:6,lastVisibleItem:-1};a.filterFns={number:function(b,g){if("undefined"===typeof g||"object"===typeof b)g=b;b=c(g).attr("data-itemnum");const f=a.currentPage,h=a.il.itemsPerPage;b%(a.il.columns*a.il.rows)<a.il.columns*(a.il.rows-1)?c(g).addClass("asp_gutter_bottom"):c(g).removeClass("asp_gutter_bottom");
return parseInt(b,10)<h*f&&parseInt(b,10)>=h*(f-1)}};d.Hooks.applyFilters("asp/init/etc",a)},initInfiniteScroll:function(){let a=this;if(a.o.show_more.infinite&&"polaroid"!=a.o.resultstype){let b,g;g=function(){clearTimeout(b);b=setTimeout(function(){a.checkAndTriggerInfiniteScroll("window")},80)};a.documentEventHandlers.push({node:window,event:"scroll",handler:g});c(window).on("scroll",g);a.n("results").on("scroll",g);let f;a.n("resultsDiv").on("nav_switch",function(){clearTimeout(f);f=setTimeout(function(){a.checkAndTriggerInfiniteScroll("isotopic")},
800)})}},hooks:function(){let a=this;a.n("s").on("asp_elementor_results",function(b,g){a.o.id==g&&"function"==typeof jetpackLazyImagesModule&&setTimeout(function(){jetpackLazyImagesModule()},300)})}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro,a=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{init:function(b,g){this.autopStartedTheSearch=this.isAutoP=this.triggerPrevState=this.searching=!1;this.autopData={};this.fontsLoaded=this.resultsOpened=this.settingsChanged=this.resultsInitialized=this.settingsInitialized=!1;this.postAuto=this.post=null;this.savedContainerTop=this.savedScrollTop=0;this.disableMobileScroll=!1;this.clickTouchend="click touchend";this.mouseupTouchend=
"mouseup touchend";this.noUiSliders=[];this.timeouts={compactBeforeOpen:null,compactAfterOpen:null,search:null,searchWithCheck:null};this.eh={};this.documentEventHandlers=[];this.currentPage=1;this.currentPageURL=location.href;this.sIsotope=this.isotopic=null;this.lastSuccesfulSearch="";this.lastSearchData={};this._no_animations=!1;this.results_num=this.call_num=0;this.o=c.fn.extend({},b);this.dynamicAtts={};this.nodes={};this.nodes.search=c(g);a.isMobile()?this.animOptions=this.o.animations.mob:
this.animOptions=this.o.animations.pc;this.initNodeVariables();this.animationOpacity=0>this.animOptions.items.indexOf("In")?"opacityOne":"opacityZero";this.o.resPage.useAjax=this.o.compact.enabled?0:this.o.resPage.useAjax;a.isMobile()&&(this.o.trigger.type=this.o.mobile.trigger_on_type,this.o.trigger.click=this.o.mobile.click_action,this.o.trigger.click_location=this.o.mobile.click_action_location,this.o.trigger.return=this.o.mobile.return_action,this.o.trigger.return_location=this.o.mobile.return_action_location,
this.o.trigger.redirect_url=this.o.mobile.redirect_url,this.o.trigger.elementor_url=this.o.mobile.elementor_url);this.o.redirectOnClick="ajax_search"!=this.o.trigger.click&&"nothing"!=this.o.trigger.click;this.o.redirectOnEnter="ajax_search"!=this.o.trigger.return&&"nothing"!=this.o.trigger.return;this.usingLiveLoader()&&(this.o.trigger.type=this.o.resPage.trigger_type,this.o.trigger.facet=this.o.resPage.trigger_facet,this.o.resPage.trigger_magnifier&&(this.o.redirectOnClick=0,this.o.trigger.click=
"ajax_search"),this.o.resPage.trigger_return&&(this.o.redirectOnEnter=0,this.o.trigger.return="ajax_search"));1==this.o.compact.overlay&&0==c("#asp_absolute_overlay").length&&c("body").append("<div id='asp_absolute_overlay'></div>");if(this.usingLiveLoader()){let f;null==(f=this.initLiveLoaderPopState)||f.call(this)}"undefined"!==typeof this.initCompact&&this.initCompact();this.monitorTouchMove();this.initEvents();this.initAutop();this.initEtc();this.hooks();d.firstIteration=!1;this.n("s").trigger("asp_init_search_bar",
[this.o.id,this.o.iid],!0,!0);return this},n:function(b){if("undefined"===typeof this.nodes[b])switch(b){case "s":this.nodes[b]=this.nodes.search;break;case "container":this.nodes[b]=this.nodes.search.closest(".asp_w_container");break;case "searchsettings":this.nodes[b]=c(".asp_ss",this.n("container"));break;case "resultsDiv":this.nodes[b]=c(".asp_r",this.n("container"));break;case "probox":this.nodes[b]=c(".probox",this.nodes.search);break;case "proinput":this.nodes[b]=c(".proinput",this.nodes.search);
break;case "text":this.nodes[b]=c(".proinput input.orig",this.nodes.search);break;case "textAutocomplete":this.nodes[b]=c(".proinput input.autocomplete",this.nodes.search);break;case "proloading":this.nodes[b]=c(".proloading",this.nodes.search);break;case "proclose":this.nodes[b]=c(".proclose",this.nodes.search);break;case "promagnifier":this.nodes[b]=c(".promagnifier",this.nodes.search);break;case "prosettings":this.nodes[b]=c(".prosettings",this.nodes.search);break;case "settingsAppend":this.nodes[b]=
c("#wpdreams_asp_settings_"+this.o.id);break;case "resultsAppend":this.nodes[b]=c("#wpdreams_asp_results_"+this.o.id);break;case "trythis":this.nodes[b]=c("#asp-try-"+this.o.rid);break;case "hiddenContainer":this.nodes[b]=c(".asp_hidden_data",this.n("container"));break;case "aspItemOverlay":this.nodes[b]=c(".asp_item_overlay",this.n("hiddenContainer"));break;case "showmoreContainer":this.nodes[b]=c(".asp_showmore_container",this.n("resultsDiv"));break;case "showmore":this.nodes[b]=c(".showmore",this.n("resultsDiv"));
break;case "items":this.nodes[b]=0<c(".item",this.n("resultsDiv")).length?c(".item",this.n("resultsDiv")):c(".photostack-flip",this.n("resultsDiv"));break;case "results":this.nodes[b]=c(".results",this.n("resultsDiv"));break;case "resdrg":this.nodes[b]=c(".resdrg",this.n("resultsDiv"))}return this.nodes[b]},att:function(b){if("undefined"===typeof this.dynamicAtts[b])switch(b){case "blocking":this.dynamicAtts[b]=this.n("searchsettings").hasClass("asp_sb")}return this.dynamicAtts[b]},initNodeVariables:function(){this.o.id=
this.nodes.search.data("id");this.o.iid=this.nodes.search.data("instance");this.o.rid=this.o.id+"_"+this.o.iid;this.fixClonedSelf()},initEvents:function(){let b;null==(b=this.initSettingsSwitchEvents)||b.call(this);this.initOtherEvents();this.initTryThisEvents();this.initMagnifierEvents();this.initInputEvents();1==this.o.compact.enabled&&this.initCompactEvents()}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{initResults:function(){if(!this.resultsInitialized){this.initResultsBox();this.initResultsEvents();if("vertical"==this.o.resultstype){let a;null==(a=this.initNavigationEvents)||a.call(this)}if("isotopic"==this.o.resultstype){let a;null==(a=this.initIsotopicPagination)||a.call(this)}}},initResultsBox:function(){this.initResultsAnimations();d.isMobile()&&1==this.o.mobile.force_res_hover?(this.o.resultsposition=
"hover",this.nodes.resultsDiv=this.n("resultsDiv").clone(),c("body").append(this.nodes.resultsDiv),this.n("resultsDiv").css({position:"absolute"})):"hover"==this.o.resultsposition&&0>=this.n("resultsAppend").length?(this.nodes.resultsDiv=this.n("resultsDiv").clone(),c("body").append(this.nodes.resultsDiv)):(this.o.resultsposition="block",this.n("resultsDiv").css({position:"static"}),0<this.n("resultsAppend").length&&(0<this.n("resultsAppend").find(".asp_r_"+this.o.id).length?(this.nodes.resultsDiv=
this.n("resultsAppend").find(".asp_r_"+this.o.id),"undefined"!==typeof this.nodes.resultsDiv.get(0).referenced?++this.nodes.resultsDiv.get(0).referenced:this.nodes.resultsDiv.get(0).referenced=1):(this.nodes.resultsDiv=this.nodes.resultsDiv.clone(),this.nodes.resultsAppend.append(this.nodes.resultsDiv))));this.nodes.showmore=c(".showmore",this.nodes.resultsDiv);this.nodes.items=0<c(".item",this.n("resultsDiv")).length?c(".item",this.nodes.resultsDiv):c(".photostack-flip",this.nodes.resultsDiv);this.nodes.results=
c(".results",this.nodes.resultsDiv);this.nodes.resdrg=c(".resdrg",this.nodes.resultsDiv);this.nodes.resultsDiv.get(0).id=this.nodes.resultsDiv.get(0).id.replace("__original__","");this.detectAndFixFixedPositioning();this.initInfiniteScroll();this.resultsInitialized=!0},initResultsAnimations:function(){let a=this.n("resultsDiv").css("position");this.resAnim={showClass:"",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":this.animOptions.results.dur+"ms"},hideClass:"",hideCSS:{visibility:"hidden",
opacity:0,display:"none"},duration:this.animOptions.results.dur+"ms"};"fade"==this.animOptions.results.anim&&(this.resAnim.showClass="asp_an_fadeIn",this.resAnim.hideClass="asp_an_fadeOut");"fadedrop"!=this.animOptions.results.anim||"fixed"!=a&&"absolute"!=a?"fadedrop"==this.animOptions.results.anim&&(this.resAnim.showClass="asp_an_fadeIn",this.resAnim.hideClass="asp_an_fadeOut"):(this.resAnim.showClass="asp_an_fadeInDrop",this.resAnim.hideClass="asp_an_fadeOutDrop");this.n("resultsDiv").css({"-webkit-animation-duration":this.resAnim.duration+
"ms","animation-duration":this.resAnim.duration+"ms"})}})})(WPD.dom);
(function(c){c(".ajaxsearchprotop").each(function(){let d=JSON.parse(c(this).data("aspdata")),a=d.id;if(0==d.action)c("a",c(this)).on("click",function(b){b.preventDefault()});else if(2==d.action)c("a",c(this)).on("click",function(b){b.preventDefault();ASP.api(a,"searchFor",c(this).html());c("html").animate({scrollTop:c("div[id*=ajaxsearchpro"+a+"_]").first().offset().top-40},500)});else if(1==d.action)c("a",c(this)).on("click",function(b){if(ASP.api(a,"exists"))return b.preventDefault(),ASP.api(a,
"searchRedirect",c(this).html())})})})(WPD.dom);window.ASP="undefined"!==typeof window.ASP?window.ASP:{};
window.ASP.api=function(){let c=function(b,g,f,h){b=ASP.instances.get(b,g);return!1!==b&&b[f].apply(b,[h])},d=function(b,g,f){if(!isNaN(parseFloat(g))&&isFinite(g))return b=ASP.instances.get(b,g),!1!==b&&b[f].apply(b);b=ASP.instances.get(b);return!1!==b&&b.forEach(function(h){h[g].apply(h,[f])})},a=function(b,g){if("exists"==g)return ASP.instances.exist(b);b=ASP.instances.get(b);return!1!==b&&b.forEach(function(f){f[g].apply(f)})};if(4==arguments.length)return c.apply(this,arguments);if(3==arguments.length)return d.apply(this,
arguments);if(2==arguments.length)return a.apply(this,arguments);0==arguments.length&&(console.log("Usage: ASP.api(id, [optional]instance, function, [optional]args);"),console.log("For more info: https://knowledgebase.ajaxsearchpro.com/other/javascript-api"))};
