File: /home/icsla/.trash/cache/asp/asp-1442fdeb.js
/*
MIT
*/
(function(){window.WPD="undefined"!==typeof window.WPD?window.WPD:{};if("undefined"!=typeof WPD.dom)return!1;WPD.dom=function(){if("undefined"==typeof WPD.dom.fn||"undefined"==typeof WPD.dom.fn.a)WPD.dom.fn={a:[],is_wpd_dom:!0,length:0,get:function(c){return"undefined"==typeof c?this.a.slice():"undefined"!=typeof this.a[c]?this.a[c]:null},_:function(c){return"<"===c.charAt(0)?WPD.dom._fn.createElementsFromHTML(c):Array.prototype.slice.call(document.querySelectorAll(c))},$:function(c,d){let b=this.copy(this,
!0);b.a="undefined"!=typeof d?null!==d?d.find(c).get():[]:"string"==typeof c?b._(c):null!==c?[c]:[];b.length=b.a.length;return b},extend:function(){for(let c=1;c<arguments.length;c++)for(let d in arguments[c])arguments[c].hasOwnProperty(d)&&(arguments[0][d]=arguments[c][d]);return arguments[0]},copy:function(c,d){let b,a,e;if("object"!=typeof c||null===c)return c;b=new c.constructor;for(a in c)c.hasOwnProperty(a)&&(e=typeof c[a],b[a]=d&&"object"===e&&null!==c[a]?this.copy(c[a]):c[a]);return b},parent:function(c){let d=
this.get(0),b=this.copy(this,!0);b.a=[];null!=d&&(d=d.parentElement,"undefined"!=typeof c?d.matches(c)&&(b.a=[d]):b.a=null==d?[]:[d]);return b},first:function(){let c=this.copy(this,!0);c.a="undefined"!=typeof c.a[0]?[c.a[0]]:[];c.length=c.a.length;return c},last:function(){let c=this.copy(this,!0);c.a=0<c.a.length?[c.a[c.a.length-1]]:[];c.length=c.a.length;return c},prev:function(c){let d=this.copy(this,!0);if("undefined"==typeof c)d.a="undefined"!=typeof d.a[0]&&null!=d.a[0].previousElementSibling?
[d.a[0].previousElementSibling]:[];else if("undefined"!=typeof d.a[0]){let b=d.a[0].previousElementSibling;for(d.a=[];null!=b;){if(b.matches(c)){d.a=[b];break}b=b.previousElementSibling}}d.length=d.a.length;return d},next:function(c){let d=this.copy(this,!0);if("undefined"==typeof c)d.a="undefined"!=typeof d.a[0]&&null!=d.a[0].nextElementSibling?[d.a[0].nextElementSibling]:[];else if("undefined"!=typeof d.a[0]){let b=d.a[0].nextElementSibling;for(d.a=[];null!=b;){if(b.matches(c)){d.a=[b];break}b=
b.nextElementSibling}}d.length=d.a.length;return d},closest:function(c){let d=this.get(0),b=this.copy(this,!0);b.a=[];if("string"===typeof c){if(null!==d&&"undefined"!=typeof d.matches&&""!==c){if(!d.matches(c))for(;(d=d.parentElement)&&!d.matches(c););b.a=null==d?[]:[d]}}else if(null!==d&&"undefined"!=typeof d.matches&&"undefined"!=typeof c.matches){if(d!==c)for(;(d=d.parentElement)&&d!==c;);b.a=null==d?[]:[d]}b.length=b.a.length;return b},add:function(c){if("undefined"!==typeof c)if("undefined"!==
typeof c.nodeType)-1==this.a.indexOf(c)&&this.a.push(c);else if("undefined"!==typeof c.a){let d=this;c.a.forEach(function(b){-1==d.a.indexOf(b)&&d.a.push(b)})}return this},find:function(c){let d=this.copy(this,!0);d.a=[];this.forEach(function(b){null!==b&&"undefined"!=typeof b.querySelectorAll&&(d.a=d.a.concat(Array.prototype.slice.call(b.querySelectorAll(c))))});d.length=d.a.length;return d},forEach:function(c){this.a.forEach(function(d,b,a){c.apply(d,[d,b,a])});return this},each:function(c){return this.forEach(c)},
hasClass:function(c){let d=this.get(0);return null!=d?d.classList.contains(c):!1},addClass:function(c){let d=c;"string"==typeof c&&(d=c.split(" "));d=d.filter(function(b){return""!==b.trim()});0<d.length&&this.forEach(function(b){b.classList.add.apply(b.classList,d)});return this},removeClass:function(c){if("undefined"!=typeof c){let d=c;"string"==typeof c&&(d=c.split(" "));d=d.filter(function(b){return""!==b.trim()});0<d.length&&this.forEach(function(b){b.classList.remove.apply(b.classList,d)})}else this.forEach(function(d){0<
d.classList.length&&d.classList.remove.apply(d.classList,d.classList)});return this},is:function(c){let d=this.get(0);return null!=d?d.matches(c):!1},val:function(c){let d=this.get(0);if(null!=d)if(1==arguments.length)if("select-multiple"==d.type){c="string"===typeof c?c.split(","):c;for(let b=0,a=d.options.length,e;b<a;b++)e=d.options[b],e.selected=-1!=c.indexOf(e.value)}else d.value=c;else return"select-multiple"==d.type?Array.prototype.map.call(d.selectedOptions,function(b){return b.value}):d.value;
return this},isVisible:function(){let c=this.get(0),d=!0,b;for(;null!==c;){b=window.getComputedStyle(c);if("none"==b.display||"hidden"==b.visibility||0==b.opacity){d=!1;break}c=c.parentElement}return d},attr:function(c,d){let b,a=arguments,e=this;this.forEach(function(g){2==a.length?(g.setAttribute(c,d),b=e):"object"===typeof c?Object.keys(c).forEach(function(h){g.setAttribute(h,c[h])}):b=g.getAttribute(c)});return b},removeAttr:function(c){this.forEach(function(d){d.removeAttribute(c)});return this},
prop:function(c,d){let b,a=arguments;this.forEach(function(e){2==a.length?e[c]=d:b="undefined"!=typeof e[c]?e[c]:null});return 2==a.length?this:b},data:function(c,d){let b=this.get(0),a=c.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()});return null!=b?2==arguments.length?(b.dataset[a]=d,this):"undefined"==typeof b.dataset[a]?"":b.dataset[a]:""},html:function(c){let d=this.get(0);return null!=d?1==arguments.length?(d.innerHTML=c,this):d.innerHTML:""},text:function(c){let d=this.get(0);return null!=
d?1==arguments.length?(d.textContent=c,this):d.textContent:""},css:function(c,d){let b=this.get(),a;for(let e=0;e<b.length;e++)if(a=b[e],1==arguments.length)if("object"==typeof c)Object.keys(c).forEach(function(g){a.style[g]=c[g]});else return window.getComputedStyle(a)[c];else a.style[c]=d;return this},position:function(){let c=this.get(0);return null!=c?{top:c.offsetTop,left:c.offsetLeft}:{top:0,left:0}},offset:function(){let c=this.get(0);return null!=c?WPD.dom._fn.hasFixedParent(c)?c.getBoundingClientRect():
WPD.dom._fn.absolutePosition(c):{top:0,left:0}},outerWidth:function(c){c=c||!1;let d=this.get(0);if(null!=d)return c?parseInt(d.offsetWidth)+parseInt(this.css("marginLeft"))+parseInt(this.css("marginRight")):parseInt(d.offsetWidth)},outerHeight:function(c){return c?parseInt(this.css("height"))+parseInt(this.css("marginTop"))+parseInt(this.css("marginBottom")):parseInt(this.css("height"))},innerWidth:function(){var c=this.get(0);return null!=c?(c=window.getComputedStyle(c),this.outerWidth()-parseFloat(c.borderLeftWidth)-
parseFloat(c.borderRightWidth)):0},width:function(){return this.outerWidth()},height:function(){return this.outerHeight()},on:function(){let c=arguments,d=function(a,e){let g;if("mouseenter"==e.type||"mouseleave"==e.type||"hover"==e.type){var h=document.elementFromPoint(e.clientX,e.clientY);if(!h.matches(a[1]))for(;(h=h.parentElement)&&!h.matches(a[1]););null!=h&&(g=WPD.dom(h))}else g=WPD.dom(e.target).closest(a[1]);if(null!=g&&0<g.closest(this).length){h=[];h.push(e);if("undefined"!=typeof a[4])for(e=
4;e<a.length;e++)h.push(a[e]);a[2].apply(g.get(0),h)}},b=c[0].split(" ");for(let a=0;a<b.length;a++){let e=b[a];if("string"==typeof c[1])this.forEach(function(g){if(!WPD.dom._fn.hasEventListener(g,e,c[2])){let h=d.bind(g,c);g.addEventListener(e,h,c[3]);g._wpd_el="undefined"==typeof g._wpd_el?[]:g._wpd_el;g._wpd_el.push({type:e,selector:c[1],func:h,trigger:c[2],args:c[3]})}});else for(let g=0;g<b.length;g++){let h=b[g];this.forEach(function(f){WPD.dom._fn.hasEventListener(f,h,c[1])||(f.addEventListener(h,
c[1],c[2]),f._wpd_el="undefined"==typeof f._wpd_el?[]:f._wpd_el,f._wpd_el.push({type:h,func:c[1],trigger:c[1],args:c[2]}))})}}return this},off:function(c,d){this.forEach(function(b){if("undefined"!=typeof b._wpd_el&&0<b._wpd_el.length)if("undefined"===typeof c){let a;for(;a=b._wpd_el.pop();)b.removeEventListener(a.type,a.func,a.args);b._wpd_el=[]}else c.split(" ").forEach(function(a){if("undefined"==typeof d){let e;for(;e=b._wpd_el.pop();)b.removeEventListener(a,e.func,e.args);b._wpd_el=[]}else{let e=
[];b._wpd_el.forEach(function(g){g.type==a&&g.trigger==d?b.removeEventListener(a,g.func,g.args):e.push(g)});b._wpd_el=e}})});return this},offForced:function(){let c=this;this.forEach(function(d,b){let a=d.cloneNode(!0);d.parentNode.replaceChild(a,d);c.a[b]=a});return this},trigger:function(c,d,b,a){b=b||!1;a=a||!1;this.forEach(function(e){var g=!1;a&&"undefined"!=typeof jQuery&&"undefined"!=typeof jQuery._data&&"undefined"!=typeof jQuery._data(e,"events")&&"undefined"!=typeof jQuery._data(e,"events")[c]&&
(jQuery(e).trigger(c,d),g=!0);!g&&b&&(g=new Event(c),g.detail=d,e.dispatchEvent(g));if("undefined"!=typeof e._wpd_el)e._wpd_el.forEach(function(h){if(h.type==c){let f=new Event(c);h.trigger.apply(e,[f].concat(d))}});else{let h=!1,f=e;for(;;){f=f.parentElement;if(null==f)break;"undefined"!=typeof f._wpd_el&&f._wpd_el.forEach(function(k){if("undefined"!==typeof k.selector){var l=WPD.dom(f).find(k.selector);0<l.length&&0<=l.get().indexOf(e)&&k.type==c&&(l=new Event(c),k.trigger.apply(e,[l].concat(d)),
h=!0)}});if(h)break}}});return this},clone:function(){let c=this.get(0);null!=c?(this.a=[c.cloneNode(!0)],this.length=this.a.length):this.a=[];this.length=this.a.length;return this},remove:function(c){if("undefined"!=typeof c)return c.parentElement.removeChild(c);this.forEach(function(d){if(null!=d.parentElement)return d.parentElement.removeChild(d)});this.a=[];this.length=this.a.length;return null},detach:function(){let c=this,d=[];this.forEach(function(b){b=c.remove(b);null!=b&&d.push(b)});this.a=
d;this.length=this.a.length;return this},prepend:function(c){"string"==typeof c&&(c=WPD.dom._fn.createElementsFromHTML(c));c=Array.isArray(c)?c:[c];this.forEach(function(d){c.forEach(function(b){"undefined"!=typeof b.is_wpd_dom?b.forEach(function(a){d.insertBefore(a,d.children[0])}):d.insertBefore(b,d.children[0])})});return this},append:function(c){"string"==typeof c&&(c=WPD.dom._fn.createElementsFromHTML(c));c=Array.isArray(c)?c:[c];this.forEach(function(d){c.forEach(function(b){null!=b&&("undefined"!=
typeof b.is_wpd_dom?b.forEach(function(a){d.appendChild(a)}):d.appendChild(b.cloneNode(!0)))})});return this},uuidv4:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){let d=16*Math.random()|0;return("x"==c?d:d&3|8).toString(16)})}},WPD.dom._fn={bodyTransform:function(){let c=0,d=0;if("undefined"!==typeof WebKitCSSMatrix){var b=window.getComputedStyle(document.body);"undefined"!=typeof b.transform&&(b=new WebKitCSSMatrix(b.transform),"undefined"!=b.m41&&(c=b.m41),
"undefined"!=b.m42&&(d=b.m42))}return{x:c,y:d}},bodyTransformY:function(){return this.bodyTransform().y},bodyTransformX:function(){return this.bodyTransform().x},hasFixedParent:function(c){if(0!=WPD.dom._fn.bodyTransformY())return!1;do if("fixed"==window.getComputedStyle(c).position)return!0;while(c=c.parentElement);return!1},hasEventListener:function(c,d,b){if("undefined"==typeof c._wpd_el)return!1;for(let a=0;a<c._wpd_el.length;a++)if(c._wpd_el[a].trigger==b&&c._wpd_el[a].type==d)return!0;return!1},
allDescendants:function(c){let d=[],b=this;Array.isArray(c)||(c=[c]);c.forEach(function(a){for(let e=0;e<a.childNodes.length;e++){let g=a.childNodes[e];d.push(g);d=d.concat(b.allDescendants(g))}});return d},createElementsFromHTML:function(c){let d=document.createElement("template");d.innerHTML=c.replace(/(\r\n|\n|\r)/gm,"");return Array.prototype.slice.call(d.content.childNodes)},absolutePosition:function(c){if(!c.getClientRects().length)return{top:0,left:0};let d=c.getBoundingClientRect();c=c.ownerDocument.defaultView;
return{top:d.top+c.pageYOffset,left:d.left+c.pageXOffset}},plugin:function(c,d){WPD.dom.fn[c]=function(b){return"undefined"!=typeof b&&d[b]?d[b].apply(this,Array.prototype.slice.call(arguments,1)):this.each(function(a){a["wpd_dom_"+c]=Object.create(d).init(b,a)})}}},WPD.dom.version=1;return 1<=arguments.length?WPD.dom.fn.$.apply(WPD.dom.fn,arguments):WPD.dom.fn};WPD.dom();document.dispatchEvent(new Event("wpd-dom-core-loaded"))})();
(function(){if("undefined"!=typeof WPD.dom.fn.animate)return!1;WPD.dom.fn._animate={easing:{linear:function(c){return c},easeInOutQuad:function(c){return.5>c?2*c*c:1-Math.pow(-2*c+2,2)/2},easeOutQuad:function(c){return 1-(1-c)*(1-c)}}};WPD.dom.fn.animate=function(c,d,b){let a=this;d=d||200;b=b||"linear";this.forEach(function(e){let g,h=0,f,k={},l={},n,p,q;n=a.prop("_wpd_dom_animations");n=null==n?[]:n;!1===c?n.forEach(function(m){clearInterval(m)}):(q="undefined"!=typeof a._animate.easing[b]?a._animate.easing[b]:
a._animate.easing.easeInOutQuad,Object.keys(c).forEach(function(m){-1<m.indexOf("scroll")?k[m]=e[m]:k[m]=parseInt(window.getComputedStyle(e)[m]);l[m]=c[m]-k[m]}),g=d/1E3*60,p=setInterval(function(){h++;h>g?clearInterval(p):(f=q(h/g),Object.keys(l).forEach(function(m){-1<m.indexOf("scroll")?e[m]=k[m]+l[m]*f:e.style[m]=k[m]+l[m]*f+"px"}))},1E3/60),n.push(p),a.prop("_wpd_dom_animations",n))});return this};document.dispatchEvent(new Event("wpd-dom-animate-loaded"))})();
(function(){let c=WPD.dom;if("undefined"!=typeof WPD.dom.fn.unhighlight)return!1;WPD.dom.fn.unhighlight=function(d){let b={className:"highlight",element:"span"};c.fn.extend(b,d);return this.find(b.element+"."+b.className).each(function(){let a=this.parentNode;a.replaceChild(this.firstChild,this);a.normalize()})};WPD.dom.fn.highlight=function(d,b){function a(h,f,k,l,n){n=""==n?".exhghttt":n;if(3===h.nodeType){if(f=h.data.normalize("NFD").replace(/[\u0300-\u036f]/g,"").match(f))return k=document.createElement(k||
"span"),k.className=l||"highlight",l=/\.|,|\s/.test(f[0].charAt(0))?f.index+1:f.index,h=h.splitText(l),h.splitText(f[1].length),l=h.cloneNode(!0),k.appendChild(l),h.parentNode.replaceChild(k,h),1}else if(1===h.nodeType&&h.childNodes&&!/(script|style)/i.test(h.tagName)&&0< !c(h).closest(n).length&&(h.tagName!==k.toUpperCase()||h.className!==l))for(let p=0;p<h.childNodes.length;p++)p+=a(h.childNodes[p],f,k,l,n);return 0}let e={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1,excludeParents:""};
c.fn.extend(e,b);d.constructor===String&&(d=[d]);d=d.filter(function(h){return""!=h});d.forEach(function(h,f,k){k[f]=h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g,"")});if(0==d.length)return this;b=e.caseSensitive?"":"i";d="("+d.join("|")+")";e.wordsOnly&&(d="(?:,|^|\\s)"+d+"(?:,|$|\\s)");let g=new RegExp(d,b);return this.each(function(h){a(h,g,e.element,e.className,e.excludeParents)})}})();
(function(){if("undefined"!=typeof WPD.dom.fn.serialize)return!1;WPD.dom.fn.serialize=function(){let c=this.get(0);if(c&&"FORM"===c.nodeName){var d,b,a=[];for(d=c.elements.length-1;0<=d;--d)if(""!==c.elements[d].name)switch(c.elements[d].nodeName){case "INPUT":switch(c.elements[d].type){case "text":case "hidden":case "password":case "button":case "reset":case "submit":a.push(c.elements[d].name+"="+encodeURIComponent(c.elements[d].value));break;case "checkbox":case "radio":c.elements[d].checked&&a.push(c.elements[d].name+
"="+encodeURIComponent(c.elements[d].value))}break;case "TEXTAREA":a.push(c.elements[d].name+"="+encodeURIComponent(c.elements[d].value));break;case "SELECT":switch(c.elements[d].type){case "select-one":a.push(c.elements[d].name+"="+encodeURIComponent(c.elements[d].value));break;case "select-multiple":for(b=c.elements[d].options.length-1;0<=b;--b)c.elements[d].options[b].selected&&a.push(c.elements[d].name+"="+encodeURIComponent(c.elements[d].options[b].value))}break;case "BUTTON":switch(c.elements[d].type){case "reset":case "submit":case "button":a.push(c.elements[d].name+
"="+encodeURIComponent(c.elements[d].value))}}return a.join("&")}};WPD.dom.fn.serializeForAjax=function(c,d){let b=[],a;for(a in c)if(c.hasOwnProperty(a)){let e=d?d+"["+a+"]":a,g=c[a];b.push(null!==g&&"object"===typeof g?WPD.dom.fn.serializeForAjax(g,e):encodeURIComponent(e)+"="+encodeURIComponent(g))}return b.join("&")};document.dispatchEvent(new Event("wpd-dom-serialize-loaded"))})();
(function(){if("undefined"!=typeof WPD.dom.fn.inViewPort)return!1;WPD.dom.fn.inViewPort=function(c,d){var b=this.get(0);let a;if(null==b)return!1;c="undefined"==typeof c?0:c;d="undefined"==typeof d?window:"string"==typeof d?document.querySelector(d):d;var e=b.getBoundingClientRect();b=e.top;let g=e.bottom,h=e.left,f=e.right;null==d&&(d=window);d===window?(e=window.innerWidth||0,a=window.innerHeight||0):(e=d.clientWidth,a=d.clientHeight,d=d.getBoundingClientRect(),b-=d.top,g-=d.top,h-=d.left,f-=d.left);
c=~~Math.round(parseFloat(c));return 0>=f||h>=e?!1:0<c?b>=c&&g<a-c:(0<g&&b<=a-c)|(0>=b&&g>c)};document.dispatchEvent(new Event("wpd-dom-viewport-loaded"))})();
(function(){if("undefined"!=typeof WPD.dom.fn.ajax)return!1;WPD.dom.fn.ajax=function(c){c=this.extend({url:"",method:"GET",cors:"cors",data:{},success:null,fail:null,accept:"text/html",contentType:"application/x-www-form-urlencoded; charset=UTF-8"},c);if("cors"!=c.cors){var d="ajax_cb_"+this.uuidv4().replaceAll("-","");WPD.dom.fn[d]=function(){c.success.apply(this,arguments);delete WPD.dom.fn[c.data.fn]};c.data.callback="WPD.dom.fn."+d;c.data.fn=d;d=document.createElement("script");d.type="text/javascript";
d.src=c.url+"?"+this.serializeForAjax(c.data);d.onload=function(){this.remove()};document.body.appendChild(d)}else return d=new XMLHttpRequest,d.onreadystatechange=function(){null!=c.success&&4==this.readyState&&200==this.status&&c.success(this.responseText);null!=c.fail&&4==this.readyState&&400<=this.status&&c.fail(this)},d.open(c.method.toUpperCase(),c.url,!0),d.setRequestHeader("Content-type",c.contentType),d.setRequestHeader("Accept",c.accept),d.send(this.serializeForAjax(c.data)),d};document.dispatchEvent(new Event("wpd-dom-xhttp-loaded"))})();
window.WPD=window.WPD||{};
window.WPD.Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(c){let d="";let b,a,e,g,h,f=0;for(c=this._utf8_encode(c);f<c.length;){var k=c.charCodeAt(f++);b=c.charCodeAt(f++);a=c.charCodeAt(f++);e=k>>2;k=(k&3)<<4|b>>4;g=(b&15)<<2|a>>6;h=a&63;isNaN(b)?g=h=64:isNaN(a)&&(h=64);d=d+this._keyStr.charAt(e)+this._keyStr.charAt(k)+this._keyStr.charAt(g)+this._keyStr.charAt(h)}return d},decode:function(c){let d="";let b,a,e,g=0;for(c=c.replace(/[^A-Za-z0-9\+\/=]/g,
"");g<c.length;){var h=this._keyStr.indexOf(c.charAt(g++));var f=this._keyStr.indexOf(c.charAt(g++));a=this._keyStr.indexOf(c.charAt(g++));e=this._keyStr.indexOf(c.charAt(g++));h=h<<2|f>>4;f=(f&15)<<4|a>>2;b=(a&3)<<6|e;d+=String.fromCharCode(h);64!=a&&(d+=String.fromCharCode(f));64!=e&&(d+=String.fromCharCode(b))}return d=this._utf8_decode(d)},_utf8_encode:function(c){c=c.replace(/\r\n/g,"\n");let d="";for(let b=0;b<c.length;b++){let a=c.charCodeAt(b);128>a?d+=String.fromCharCode(a):(127<a&&2048>
a?d+=String.fromCharCode(a>>6|192):(d+=String.fromCharCode(a>>12|224),d+=String.fromCharCode(a>>6&63|128)),d+=String.fromCharCode(a&63|128))}return d},_utf8_decode:function(c){let d="",b=0,a,e,g;for(;b<c.length;)a=c.charCodeAt(b),128>a?(d+=String.fromCharCode(a),b++):191<a&&224>a?(e=c.charCodeAt(b+1),d+=String.fromCharCode((a&31)<<6|e&63),b+=2):(e=c.charCodeAt(b+1),g=c.charCodeAt(b+2),d+=String.fromCharCode((a&15)<<12|(e&63)<<6|g&63),b+=3);return d}};
(function(){window.WPD=window.WPD||{};WPD.Hooks=WPD.Hooks||{};let c=WPD.Hooks;c.filters=c.filters||{};c.addFilter=function(d,b,a,e){c.filters[d]=c.filters[d]||[];c.filters[d].push({priority:"undefined"===typeof a?10:a,scope:"undefined"===typeof e?null:e,callback:b})};c.removeFilter=function(d,b){"undefined"!=typeof c.filters[d]&&("undefined"==typeof b?c.filters[d]=[]:c.filters[d].forEach(function(a,e){a.callback===b&&c.filters[d].splice(e,1)}))};c.applyFilters=function(d){let b=[],a=Array.prototype.slice.call(arguments),
e=arguments[1];"undefined"!==typeof c.filters[d]&&0<c.filters[d].length&&(c.filters[d].forEach(function(g){b[g.priority]=b[g.priority]||[];b[g.priority].push({scope:g.scope,callback:g.callback})}),a.splice(0,2),b.forEach(function(g){g.forEach(function(h){e=h.callback.apply(h.scope,[e].concat(a))})}));return e}})();window.WPD=window.WPD||{};
window.WPD.intervalUntilExecute=function(c,d,b,a){let e,g=0,h="function"===typeof d?d():d;b="undefined"==typeof b?100:b;a="undefined"==typeof a?50:a;if(!1===h)e=setInterval(function(){h="function"===typeof d?d():d;g++;if(g>a)return clearInterval(e),!1;if(!1!==h)return clearInterval(e),c(h)},b);else return c(h)};
(function(c,d){function b(l,n,p){for(;l&&l!==d.documentElement;){var q=l.getAttribute(n);if(q)return q;l=l.parentNode}return p}"function"!==typeof c.CustomEvent&&(c.CustomEvent=function(l,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var p=d.createEvent("CustomEvent");p.initCustomEvent(l,n.bubbles,n.cancelable,n.detail);return p},c.CustomEvent.prototype=c.Event.prototype);d.addEventListener("touchstart",function(l){"true"!==l.target.getAttribute("data-swipe-ignore")&&(k=l.target,f=Date.now(),a=
l.touches[0].clientX,e=l.touches[0].clientY,h=g=0)},!1);d.addEventListener("touchmove",function(l){if(a&&e){var n=l.touches[0].clientY;g=a-l.touches[0].clientX;h=e-n}},!1);d.addEventListener("touchend",function(l){if(k===l.target){var n=parseInt(b(k,"data-swipe-threshold","20"),10),p=parseInt(b(k,"data-swipe-timeout","500"),10),q=Date.now()-f,m="";l=l.changedTouches||l.touches||[];Math.abs(g)>Math.abs(h)?Math.abs(g)>n&&q<p&&(m=0<g?"swiped-left":"swiped-right"):Math.abs(h)>n&&q<p&&(m=0<h?"swiped-up":
"swiped-down");""!==m&&(n={dir:m.replace(/swiped-/,""),xStart:parseInt(a,10),xEnd:parseInt((l[0]||{}).clientX||-1,10),yStart:parseInt(e,10),yEnd:parseInt((l[0]||{}).clientY||-1,10)},k.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:n})),k.dispatchEvent(new CustomEvent(m,{bubbles:!0,cancelable:!0,detail:n})));f=e=a=null}},!1);var a=null,e=null,g=null,h=null,f=null,k=null})(window,document);
(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})}}}})();WPD.dom._fn.plugin("ajaxsearchpro",window.WPD.ajaxsearchpro.plugin);
(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 b=d.indexOf("MSIE ");d=d.indexOf("Trident/");return 0<b||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("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")},whichjQuery:function(d){let b=!1;"undefined"!=typeof window.$&&("undefined"===typeof d?b=window.$:"undefined"!=typeof window.$.fn[d]&&(b=window.$));!1===b&&"undefined"!=typeof window.jQuery&&
(b=window.jQuery,"undefined"===typeof d?b=window.jQuery:"undefined"!=typeof window.jQuery.fn[d]&&(b=window.jQuery));return b},formData:function(d,b){let a=this,e=d.find("input,textarea,select,button").get();if(1===arguments.length)return b={},e.forEach(function(g){g.name&&!g.disabled&&(g.checked||/select|textarea/i.test(g.nodeName)||/text/i.test(g.type)||c(g).hasClass("hasDatepicker")||c(g).hasClass("asp_slider_hidden"))&&(void 0==b[g.name]&&(b[g.name]=[]),c(g).hasClass("hasDatepicker")?b[g.name].push(c(g).parent().find(".asp_datepicker_hidden").val()):
b[g.name].push(c(g).val()))}),JSON.stringify(b);"object"!=typeof b&&(b=JSON.parse(b));e.forEach(function(g){if(g.name)if(b[g.name]){let h=b[g.name],f=c(g);"[object Array]"!==Object.prototype.toString.call(h)&&(h=[h]);if("checkbox"==g.type||"radio"==g.type){let k=f.val(),l=!1;for(let n=0;n<h.length;n++)if(h[n]==k){l=!0;break}f.prop("checked",l)}else f.val(h[0]),c(g).hasClass("asp_gochosen")||c(g).hasClass("asp_goselect2")?WPD.intervalUntilExecute(function(k){k(g).trigger("change.asp_select2")},function(){return a.whichjQuery("asp_select2")},
50,3):c(g).hasClass("hasDatepicker")&&WPD.intervalUntilExecute(function(k){let l=h[0],n=k(f.get(0)).datepicker("option","dateFormat");k(f.get(0)).datepicker("option","dateFormat","yy-mm-dd");k(f.get(0)).datepicker("setDate",l);k(f.get(0)).datepicker("option","dateFormat",n);k(f.get(0)).trigger("selectnochange")},function(){return a.whichjQuery("datepicker")},50,3)}else"checkbox"!=g.type&&"radio"!=g.type||c(g).prop("checked",!1)});return d},submitToUrl:function(d,b,a,e){let g;g=c('<form style="display: none;" />');
g.attr("action",d);g.attr("method",b);c("body").append(g);"undefined"!==typeof a&&null!==a&&Object.keys(a).forEach(function(h){let f=a[h],k=c('<input type="hidden" />');k.attr("name",h);k.attr("value",f);g.append(k)});"undefined"!=typeof e&&"new"==e&&g.attr("target","_blank");g.get(0).submit()},openInNewTab:function(d){Object.assign(document.createElement("a"),{target:"_blank",href:d}).click()},isScrolledToBottom:function(d,b){return d.scrollHeight-d.scrollTop-c(d).outerHeight()<b},getWidthFromCSSValue:function(d,
b){d+="";d=-1<d.indexOf("px")?parseInt(d,10):-1<d.indexOf("%")?"undefined"!=typeof b&&null!=b?Math.floor(parseInt(d,10)/100*b):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,b){return""!=
b?(b=b||",",String(d).replace(/(?:^|[^.\d])\d+/g,function(a){return a.replace(/\B(?=(?:\d{3})+\b)/g,b)})):d},decodeHTMLEntities:function(d){let b=document.createElement("div");d&&"string"===typeof d&&(d=d.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,""),d=d.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,""),b.innerHTML=d,d=b.textContent,b.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,{addAnimation:function(){let b=this,a=0,e=1,g=!0;if(0<b.call_num||b._no_animations)return b.n("results").find(".item, .asp_group_header").removeClass("opacityZero").removeClass("asp_an_"+b.animOptions.items),!1;b.n("results").find(".item, .asp_group_header").each(function(){let h=this;1===e&&(g=c(h).inViewPort(0));if(1<e&&g&&!c(h).inViewPort(0)||80<e)return c(h).removeClass("opacityZero"),!0;"isotopic"==
b.o.resultstype&&e>b.il.itemsPerPage?c(h).removeClass("opacityZero"):(setTimeout(function(){c(h).addClass("asp_an_"+b.animOptions.items);c(h).removeClass("opacityZero")},a+25),a+=45,e++)})},removeAnimation:function(){let b=this;this.n("items").each(function(){c(this).removeClass("asp_an_"+b.animOptions.items)})},autocomplete:function(){let b=this,a=b.n("text").val();if(""==b.n("text").val())b.n("textAutocomplete").val("");else{var e=b.n("textAutocomplete").val();if(""==e||0!=e.indexOf(a))b.n("textAutocomplete").val(""),
b.n("text").val().length>=b.o.autocomplete.trigger_charcount&&(e={action:"ajaxsearchpro_autocomplete",asid:b.o.id,sauto:b.n("text").val(),asp_inst_id:b.o.rid,options:c("form",b.n("searchsettings")).serialize()},b.postAuto=c.fn.ajax({url:ASP.ajaxurl,method:"POST",data:e,success:function(g){0<g.length&&(g=c("<textarea />").html(g).text(),g=g.replace(/^\s*[\r\n]/gm,""),g=a+g.substr(a.length));b.n("textAutocomplete").val(g);b.fixAutocompleteScrollLeft()}}))}},autocompleteGoogleOnly:function(){let b=this,
a=b.n("text").val();if(""==b.n("text").val())b.n("textAutocomplete").val("");else{var e=b.n("textAutocomplete").val();if(""==e||0!=e.indexOf(a)){b.n("textAutocomplete").val("");var g=b.o.autocomplete.lang;["wpml_lang","polylang_lang","qtranslate_lang"].forEach(function(h){0<c('input[name="'+h+'"]',b.n("searchsettings")).length&&1<c('input[name="'+h+'"]',b.n("searchsettings")).val().length&&(g=c('input[name="'+h+'"]',b.n("searchsettings")).val())});b.n("text").val().length>=b.o.autocomplete.trigger_charcount&&
c.fn.ajax({url:"https://clients1.google.com/complete/search",cors:"no-cors",data:{q:a,hl:g,nolabels:"t",client:"hp",ds:""},success:function(h){0<h[1].length&&(h=h[1][0][0].replace(/(<([^>]+)>)/ig,""),h=c("<textarea />").html(h).text(),h=h.substr(a.length),b.n("textAutocomplete").val(a+h),b.fixAutocompleteScrollLeft())}})}}},fixAutocompleteScrollLeft:function(){this.n("textAutocomplete").get(0).scrollLeft=this.n("text").get(0).scrollLeft},openCompact:function(){let b=this;b.n("search").is("[data-asp-compact-w]")||
(b.n("probox").attr("data-asp-compact-w",b.n("probox").innerWidth()),b.n("search").attr("data-asp-compact-w",b.n("search").innerWidth()));b.n("search").css({width:b.n("search").width()+"px"});b.n("probox").css({width:"auto"});setTimeout(function(){b.n("search").find(".probox>div:not(.promagnifier)").removeClass("hiddend")},80);clearTimeout(b.timeouts.compactBeforeOpen);b.timeouts.compactBeforeOpen=setTimeout(function(){let a;a="phone"==d.deviceType()?b.o.compact.width_phone:"tablet"==d.deviceType()?
b.o.compact.width_tablet:b.o.compact.width;a=d.Hooks.applyFilters("asp_compact_width",a,b.o.id,b.o.iid);a=d.wp_hooks_apply_filters("asp_compact_width",a,b.o.id,b.o.iid);a=isNaN(a)?a:a+"px";"static"!=b.o.compact.position?b.n("search").css({"max-width":a,width:a}):(b.n("container").css({"max-width":a,width:a}),b.n("search").css({"max-width":"100%",width:"100%"}));1==b.o.compact.overlay&&(b.n("search").css("z-index",999999),b.n("searchsettings").css("z-index",999999),b.n("resultsDiv").css("z-index",
999999),b.n("trythis").css("z-index",999998),c("#asp_absolute_overlay").css({opacity:1,width:"100%",height:"100%","z-index":999990}));b.n("search").attr("data-asp-compact","open")},50);clearTimeout(b.timeouts.compactAfterOpen);b.timeouts.compactAfterOpen=setTimeout(function(){b.resize();b.n("trythis").css({display:"block"});1==b.o.compact.enabled&&"static"!=b.o.compact.position&&b.n("trythis").css({top:b.n("search").offset().top+b.n("search").outerHeight(!0)+"px",left:b.n("search").offset().left+
"px"});b.o.compact.focus&&b.n("text").get(0).focus();b.n("text").trigger("focus");b.scrolling()},500)},closeCompact:function(){let b=this;clearTimeout(b.timeouts.compactBeforeOpen);clearTimeout(b.timeouts.compactAfterOpen);b.timeouts.compactBeforeOpen=setTimeout(function(){b.n("search").attr("data-asp-compact","closed")},50);b.n("search").find(".probox>div:not(.promagnifier)").addClass("hiddend");"static"!=b.o.compact.position?b.n("search").css({width:"auto"}):(b.n("container").css({width:"auto"}),
b.n("search").css({"max-width":"unset",width:"auto"}));b.n("probox").css({width:b.n("probox").attr("data-asp-compact-w")+"px"});b.n("trythis").css({left:b.n("search").position().left,display:"none"});1==b.o.compact.overlay&&(b.n("search").css("z-index",""),b.n("searchsettings").css("z-index",""),b.n("resultsDiv").css("z-index",""),b.n("trythis").css("z-index",""),c("#asp_absolute_overlay").css({opacity:0,width:0,height:0,"z-index":0}))},setFilterStateInput:function(b){let a=this;"undefined"==typeof b&&
(b=65);let e=function(){JSON.stringify(a.originalFormData)!=JSON.stringify(d.formData(c("form",a.n("searchsettings"))))?a.n("searchsettings").find("input[name=filters_initial]").val(0):a.n("searchsettings").find("input[name=filters_initial]").val(1)};0==b?e():setTimeout(function(){e()},b)},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(b){if("undefined"!=typeof b.noUiSlider){let a=[];c(b).parent().find(".asp_slider_hidden").forEach(function(e){a.push(c(e).val())});0<a.length&&b.noUiSlider.set(a)}})},gaEvent:function(b,a){let e=this.gaGetTrackingID();if("undefined"==typeof ASP.analytics||"event"!=ASP.analytics.method)return!1;
let g="function"==typeof gtag?gtag:!1;if(!1===g&&"undefined"==typeof window.dataLayer)return!1;if("undefined"!=typeof ASP.analytics.event[b]&&1==ASP.analytics.event[b].active){let h={search_id:this.o.id,search_name:this.n("search").data("name"),phrase:this.n("text").val(),option_name:"",option_value:"",result_title:"",result_url:"",results_count:""},f={event_category:ASP.analytics.event[b].category,event_label:ASP.analytics.event[b].label,value:ASP.analytics.event[b].value};a=c.fn.extend(h,a);Object.keys(a).forEach(function(k){let l=
a[k];l=String(l).replace(/[\s\n\r]+/g," ").trim();Object.keys(f).forEach(function(n){f[n]=f[n].replace(new RegExp("{"+k+"}","gmi"),l)})});!1!==g?!1!==e?e.forEach(function(k){f.send_to=k;g("event",ASP.analytics.event[b].action,f)}):g("event",ASP.analytics.event[b].action,f):"undefined"!=typeof window.dataLayer.push&&window.dataLayer.push({event:"asp_event",event_name:ASP.analytics.event[b].action,event_category:f.event_category,event_label:f.event_label,event_value:f.value})}},gaGetTrackingID:function(){if("undefined"==
typeof ASP.analytics)return!1;if("undefined"!=typeof ASP.analytics.tracking_id&&""!=ASP.analytics.tracking_id)return[ASP.analytics.tracking_id];if(!1===("function"==typeof window.gtag?window.gtag:!1)&&"undefined"!=typeof window.ga&&"undefined"!=typeof window.ga.getAll){let b=[];window.ga.getAll().forEach(function(a){b.push(a.get("trackingId"))});return 0<b.length?b:!1}return!1},liveLoad:function(b,a,e,g,h){function f(q){let m=d.Hooks.applyFilters("asp/live_load/raw_data",q,l);var r=new DOMParser;
let v=r.parseFromString(m,"text/html"),t=c(v);l.o.statistics&&l.stat_addKeyword(l.o.id,l.n("text").val());""!=m&&0<t.length&&0<t.find(k).length&&(m=m.replace(/&asp_force_reset_pagination=1/gmi,""),m=m.replace(/%26asp_force_reset_pagination%3D1/gmi,""),m=m.replace(/&asp_force_reset_pagination=1/gmi,""),d.isSafari()&&(m=m.replace(/srcset/gmi,"nosrcset")),m=d.Hooks.applyFilters("asp_live_load_html",m,l.o.id,l.o.iid),m=d.wp_hooks_apply_filters("asp_live_load_html",m,l.o.id,l.o.iid),t=c(r.parseFromString(m,
"text/html")),r=t.find(k).get(0),r=d.Hooks.applyFilters("asp/live_load/replacement_node",r,l,p.get(0),m),null!=r&&p.get(0).parentNode.replaceChild(r,p.get(0)),p=c(k).first(),e&&(document.title=v.title,history.pushState({},null,a)),c(k).first().find(".woocommerce-ordering select.orderby").on("change",function(){0<c(this).closest("form").length&&c(this).closest("form").get(0).submit()}),l.addHighlightString(c(k).find("a")),d.Hooks.applyFilters("asp/live_load/finished",a,l,k,p.get(0)),ASP.initialize(),
l.lastSuccesfulSearch=c("form",l.n("searchsettings")).serialize()+l.n("text").val().trim(),l.lastSearchData=m,l.setLiveLoadCache(q,b));l.n("s").trigger("asp_search_end",[l.o.id,l.o.iid,l.n("text").val(),m],!0,!0);let u,w;null==(w=(u=l).gaEvent)||w.call(u,"search_end",{results_count:"unknown"});l.hideLoader();p.css("opacity",1);l.searching=!1;""!=l.n("text").val()&&l.n("proclose").css({display:"block"})}let k=b;if("body"==k||"html"==k)return console.log("Ajax Search Pro: Do not use html or body as the live loader selector."),
!1;let l=this;""!=ASP.pageHTML&&l.setLiveLoadCache(ASP.pageHTML,b);e="undefined"==typeof e?!0:e;g="undefined"==typeof g?!1:g;let n=".search-content #content #Content div[role=main] main[role=main] div.theme-content div.td-ss-main-content main.l-content #primary".split(" ");"#main"!=k&&n.unshift("#main");if(1>c(k).length&&(n.forEach(function(q,m){if(0<c(q).length)return k=q,!1}),1>c(k).length))return console.log("Ajax Search Pro: The live search selector does not exist on the page."),!1;k=d.Hooks.applyFilters("asp/live_load/selector",
k,this);let p=c(k).first();l.searchAbort();p.css("opacity",.4);a=d.Hooks.applyFilters("asp/live_load/url",a,l,k,p.get(0));d.Hooks.applyFilters("asp/live_load/start",a,l,k,p.get(0));g||1!=l.n("searchsettings").find("input[name=filters_initial]").val()||""!=l.n("text").val()?"undefined"!=typeof h?f(h.html):(l.searching=!0,l.post=c.fn.ajax({url:a,method:"GET",success:function(q){f(q);l.isAutoP=!1},dataType:"html",fail:function(q){p.css("opacity",1);q.aborted||(p.html("This request has failed. Please check your connection."),
l.hideLoader(),l.searching=!1,l.n("proclose").css({display:"block"}),l.isAutoP=!1)}})):window.WPD.intervalUntilExecute(function(){f(ASP.pageHTML)},function(){return""!=ASP.pageHTML})},usingLiveLoader:function(){return this._usingLiveLoader="undefined"==typeof this._usingLiveLoader?0<c(".asp_es_"+this.o.id).length||this.o.resPage.useAjax&&0<c(this.o.resPage.selector).length||this.o.wooShop.useAjax&&0<c(this.o.wooShop.selector).length||this.o.cptArchive.useAjax&&0<c(this.o.cptArchive.selector).length||
this.o.taxArchive.useAjax&&0<c(this.o.taxArchive.selector).length:this._usingLiveLoader},getLiveURLbyBaseLocation(b){let a="asp_ls="+d.nicePhrase(this.n("text").val()),e="&";-1===b.indexOf("?")&&(e="?");b=b+e+a+"&asp_active=1&asp_force_reset_pagination=1&p_asid="+this.o.id+"&p_asp_data=1&"+c("form",this.n("searchsettings")).serialize();b=b.replace("?&","?");return b=b.replace("&&","&")},getCurrentLiveURL:function(){var b="asp_ls="+d.nicePhrase(this.n("text").val());let a="&",e=window.location.href;
e=-1<e.indexOf("asp_ls=")?e.slice(0,e.indexOf("asp_ls=")):e;e=-1<e.indexOf("asp_ls&")?e.slice(0,e.indexOf("asp_ls&")):e;e=-1<e.indexOf("p_asid=")?e.slice(0,e.indexOf("p_asid=")):e;e=-1<e.indexOf("asp_")?e.slice(0,e.indexOf("asp_")):e;-1===e.indexOf("?")&&(a="?");b=e+a+b+"&asp_active=1&asp_force_reset_pagination=1&p_asid="+this.o.id+"&p_asp_data=1&"+c("form",this.n("searchsettings")).serialize();b=b.replace("?&","?");return b=b.replace("&&","&")},initLiveLoaderPopState:function(){let b=this;b.liveLoadCache=
[];window.addEventListener("popstate",a=>{a=b.getLiveLoadCache();!1!==a&&(b.n("text").val(a.phrase),d.formData(c("form",b.n("searchsettings")),a.settings),b.resetNoUISliderFilters(),b.liveLoad(a.selector,document.location.href,!1,!1,a))});""==ASP.pageHTML&&"undefined"===typeof ASP._ajax_page_html&&(ASP._ajax_page_html=!0,c.fn.ajax({url:b.currentPageURL,method:"GET",success:function(a){ASP.pageHTML=a},dataType:"html"}))},setLiveLoadCache:function(b,a){0==this.liveLoadCache.filter(e=>e.href==document.location.href).length&&
this.liveLoadCache.push({href:b==ASP.pageHTML?this.currentPageURL:document.location.href,phrase:b==ASP.pageHTML?"":this.n("text").val(),selector:a,html:b,settings:b==ASP.pageHTML?this.originalFormData:d.formData(c("form",this.n("searchsettings")))})},getLiveLoadCache:function(){let b=this.liveLoadCache.filter(a=>a.href==document.location.href);return 0<b.length?b[0]:!1},showMoreResLoader:function(){this.n("resultsDiv").addClass("asp_more_res_loading")},showLoader:function(b){b="undefined"!==typeof b?
b:!1;if("none"!=this.o.loaderLocation){this.n("search").hasClass("hiddend")||"results"==this.o.loaderLocation||this.n("proloading").css({display:"block"});if(!1!==b)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")},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(b){document.fonts.add(b)}).catch(function(b){}),ASP.font_url=!1)},updateHref:function(b){b=b||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:"")),b=this.getStateURL()+(this.resultsOpened?
"&asp_s=":"&asp_ls=")+this.n("text").val()+b,history.replaceState("","",b.replace(location.origin,"")))},stat_addKeyword:function(b,a){c.fn.ajax({url:ASP.ajaxurl,method:"POST",data:{action:"ajaxsearchpro_addkeyword",id:b,keyword:a},success:function(e){}})},fixClonedSelf:function(){let b=this.o.iid,a=this.o.rid;for(;!ASP.instances.set(this)&&!(++this.o.iid,50<this.o.iid););b!=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 b=this;Object.keys(b.nodes).forEach(function(l){let n,p;null==(p=(n=b.nodes[l]).off)||
p.call(n)});"undefined"!==typeof b.n("searchsettings").get(0).referenced?(--b.n("searchsettings").get(0).referenced,0>b.n("searchsettings").get(0).referenced&&b.n("searchsettings").remove()):b.n("searchsettings").remove();if("undefined"!==typeof b.n("resultsDiv").get(0).referenced){if(--b.n("resultsDiv").get(0).referenced,0>b.n("resultsDiv").get(0).referenced){let l,n;null==(n=(l=b.n("resultsDiv")).remove)||n.call(l)}}else{let l,n;null==(n=(l=b.n("resultsDiv")).remove)||n.call(l)}let a,e;null==(e=
(a=b.n("trythis")).remove)||e.call(a);let g,h;null==(h=(g=b.n("search")).remove)||h.call(g);let f,k;null==(k=(f=b.n("container")).remove)||k.call(f);b.documentEventHandlers.forEach(function(l){c(l.node).off(l.event,l.handler)})},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 b,a;b="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?a=c(c(".asp_res_url",this.n("resultsDiv")).get(0)).attr("href"):0<c(".asp_es_"+this.o.id+
" a").length?a=c(c(".asp_es_"+this.o.id+" a").get(0)).attr("href"):this.o.resPage.useAjax&&0<c(this.o.resPage.selector+"a").length&&(a=c(c(this.o.resPage.selector+"a").get(0)).attr("href"));""!=a&&("same"==b?location.href=a:d.openInNewTab(a),this.hideLoader(),this.hideResults());return!1},doRedirectToResults:function(b){var a;if("undefined"!=typeof this.reportSettingsValidity&&!this.reportSettingsValidity())return null==(a=this.showNextInvalidFacetMessage)||a.call(this),!1;a="click"==b?this.o.trigger.click_location:
"button"==b?this.o.sb.redirect_location:this.o.trigger.return_location;b=this.getRedirectURL(b);if(this.o.overridewpdefault){if(1==this.o.resPage.useAjax){this.hideResults();this.liveLoad(this.o.resPage.selector,b);this.showLoader();if(0==this.att("blocking")){let e;null==(e=this.hideSettings)||e.call(this)}return!1}"post"==this.o.override_method?d.submitToUrl(b,"post",{asp_active:1,p_asid:this.o.id,p_asp_data:c("form",this.n("searchsettings")).serialize()},a):"same"==a?location.href=b:d.openInNewTab(b)}else d.submitToUrl(b,
"post",{np_asid:this.o.id,np_asp_data:c("form",this.n("searchsettings")).serialize()},a);this.n("proloading").css("display","none");this.hideLoader();if(0==this.att("blocking")){let e;null==(e=this.hideSettings)||e.call(this)}this.hideResults();this.searchAbort()},getRedirectURL:function(b){b="undefined"!==typeof b?b:"enter";var a="click"==b?this.o.trigger.click:"button"==b?this.o.sb.redirect_action:this.o.trigger.return;"results_page"==a?b="?s="+d.nicePhrase(this.n("text").val()):"woo_results_page"==
a?b="?post_type=product&s="+d.nicePhrase(this.n("text").val()):(b="button"==b?"elementor_page"==a?this.o.sb.elementor_url:this.o.sb.redirect_url:"elementor_page"==a?this.o.trigger.elementor_url:this.o.trigger.redirect_url,b=d.decodeHTMLEntities(b),b=this.parseCustomRedirectURL(b,this.n("text").val()));1<this.o.homeurl.indexOf("?")&&0===b.indexOf("?")&&(b=b.replace("?","&"));if(this.o.overridewpdefault&&"post"!=this.o.override_method){let e="&";-1!==this.o.homeurl.indexOf("?")&&"elementor_page"!=a||
-1!==b.indexOf("?")||(e="?");b=b+e+"asp_active=1&p_asid="+this.o.id+"&p_asp_data=1&"+c("form",this.n("searchsettings")).serialize();a="elementor_page"==a?b:this.o.homeurl+b}else a="elementor_page"==a?b:this.o.homeurl+b;a=a.replace("https://","https:///");a=a.replace("http://","http:///");a=a.replace(/\/\//g,"/");a=d.Hooks.applyFilters("asp_redirect_url",a,this.o.id,this.o.iid);return a=d.wp_hooks_apply_filters("asp_redirect_url",a,this.o.id,this.o.iid)},parseCustomRedirectURL:function(b,a){let e=
this,g=d.decodeHTMLEntities(b).replace(/{phrase}/g,d.nicePhrase(a));b=g.match(/{(.*?)}/g);null!==b&&b.forEach(function(h){h=h.replace(/[{}]/g,"");var f=c('input[type=radio][name*="aspf['+h+'_"]:checked',e.n("searchsettings"));0==f.length&&(f=c('input[type=text][name*="aspf['+h+'_"]',e.n("searchsettings")));0==f.length&&(f=c('input[type=hidden][name*="aspf['+h+'_"]',e.n("searchsettings")));0==f.length&&(f=c('select[name*="aspf['+h+'_"]:not([multiple])',e.n("searchsettings")));0==f.length&&(f=c('input[type=radio][name*="termset['+
h+'"]:checked',e.n("searchsettings")));0==f.length&&(f=c('input[type=text][name*="termset['+h+'"]',e.n("searchsettings")));0==f.length&&(f=c('input[type=hidden][name*="termset['+h+'"]',e.n("searchsettings")));0==f.length&&(f=c('select[name*="termset['+h+'"]:not([multiple])',e.n("searchsettings")));if(0==f.length)return!0;f=f.val();g=g.replace("{"+h+"}",""+f)});return g},showResults:function(){let b=this;d.Hooks.applyFilters("asp/results/show/start",b);b.initResults();"horizontal"==b.o.resultstype?
b.createHorizontalScroll():"vertical"==b.o.resultstype&&b.createVerticalScroll();switch(b.o.resultstype){case "horizontal":b.showHorizontalResults();break;case "vertical":b.showVerticalResults();break;case "polaroid":b.showPolaroidResults();break;case "isotopic":b.showIsotopicResults();break;default:b.showHorizontalResults()}b.showAnimatedImages();b.hideLoader();b.n("proclose").css({display:"block"});d.isMobile()&&b.o.mobile.hide_keyboard&&!b.resultsOpened&&document.activeElement.blur();if(b.o.settingsHideOnRes&&
0==b.att("blocking")){let a;null==(a=b.hideSettings)||a.call(b)}"undefined"!=typeof WPD.lazy&&setTimeout(function(){WPD.lazy(".asp_lazy")},100);b.eh.resulsDivHoverMouseEnter=b.eh.resulsDivHoverMouseEnter||function(){c(".item",b.n("resultsDiv")).removeClass("hovered");c(this).addClass("hovered")};b.eh.resulsDivHoverMouseLeave=b.eh.resulsDivHoverMouseLeave||function(){c(".item",b.n("resultsDiv")).removeClass("hovered")};b.n("resultsDiv").find(".item").on("mouseenter",b.eh.resulsDivHoverMouseEnter);
b.n("resultsDiv").find(".item").on("mouseleave",b.eh.resulsDivHoverMouseLeave);b.fixSettingsAccessibility();b.resultsOpened=!0;d.Hooks.addFilter("asp/results/show/end",b)},hideResults:function(b){let a=this;b="undefined"==typeof b?!0:b;a.initResults();if(!a.resultsOpened)return!1;a.n("resultsDiv").removeClass(a.resAnim.showClass).addClass(a.resAnim.hideClass);setTimeout(function(){a.n("resultsDiv").css(a.resAnim.hideCSS)},a.resAnim.duration);a.n("proclose").css({display:"none"});d.isMobile()&&b&&
document.activeElement.blur();a.resultsOpened=!1;"undefined"!=typeof a.ptstack&&delete a.ptstack;let e;null==(e=a.hideArrowBox)||e.call(a);a.n("s").trigger("asp_results_hide",[a.o.id,a.o.iid],!0,!0)},updateResults:function(b){if(""===b.replace(/^\s*[\r\n]/gm,"")||c(b).hasClass("asp_nores")||0<c(b).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){b=c(b);let a=this.n("items").last(),e=parseInt(this.n("items").last().attr("data-itemnum"));b.get().forEach(function(g){c(g).attr("data-itemnum",++e).css({width:a.css("width"),height:a.css("height")})});this.n("resdrg").append(b);this.isotopic.appended(b.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>'+b):this.n("resdrg").html(this.n("resdrg").html()+b)},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(b){let a=this,e=a.n("text").val().replace(/["']/g,"");b="undefined"==typeof b?a.n("items").find("a.asp_res_url"):b;1==a.o.singleHighlight&&""!=e&&0<b.length&&b.forEach(function(){try{const g=new URL(c(this).attr("href"));g.searchParams.set("asp_highlight",e);g.searchParams.set("p_asid",a.o.id);c(this).attr("href",g.href)}catch(g){}})},scrollToResults:function(){var b=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(b))){b="hover"==this.o.resultsposition?this.n("probox").offset().top-20:this.n("resultsDiv").offset().top-20;b+=this.o.scrollToResults.offset;var a=c("#wpadminbar");0<a.length&&(b-=a.height());window.scrollTo({top:0>b?0:b,behavior:"smooth"})}},scrollToResult:function(b){b=c(b);b.length&&!b.inViewPort(40)&&b.get(0).scrollIntoView({behavior:"smooth",block:"center",
inline:"nearest"})},showAnimatedImages:function(){this.n("items").each(function(){let b=c(this).find(".asp_image[data-src]"),a=b.data("src");if("undefined"!=typeof a&&null!=a&&""!==a&&-1<a.indexOf(".gif")&&0==b.find("canvas").length){b.prepend(c('<div class="asp_item_canvas"><canvas></canvas></div>').get(0));let e=c(this).find("canvas").get(0),g=c(this).find(".asp_item_canvas"),h=e.getContext("2d"),f=new Image;f.crossOrigin="anonymous";f.onload=function(){c(e).attr({width:f.width,height:f.height});
h.drawImage(f,0,0,f.width,f.height);g.css({"background-image":"url("+e.toDataURL()+")"})};f.src=a}})},updateNoResultsHeader:function(){let b=this,a=b.n("resdrg").find(".asp_nores"),e;0<a.length&&(a=a.detach());e=b.n("resultsDiv").find(".asp_nores");0<e.length&&e.remove();0<a.length&&(b.n("resultsDiv").prepend(a),b.n("resultsDiv").find(".asp_keyword").on("click",function(){b.n("text").val(d.decodeHTMLEntities(c(this).text()));b.n("textAutocomplete").val("");0!=b.o.redirectOnClick&&0!=b.o.redirectOnEnter&&
1!=b.o.trigger.type||b.search()}))},updateInfoHeader:function(b){let a,e=this.n("resultsDiv").find(".asp_results_top"),g=this.n("text").val().trim();0<e.length&&(0>=this.n("items").length||0<this.n("resultsDiv").find(".asp_nores").length?e.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():""),""!==g&&""!==this.resInfoBoxTxt?a=this.resInfoBoxTxt:""===g&&""!==this.resInfoBoxTxtNoPhrase&&(a=this.resInfoBoxTxtNoPhrase),""!==a?(a=a.replaceAll("{phrase}",d.escapeHtml(this.n("text").val())),a=a.replaceAll("{results_count}",this.n("items").length),a=a.replaceAll("{results_count_total}",b),e.html(a),e.css("display","block")):e.css("display","none")))},showHorizontalResults:function(){this.showResultsBox();this.n("items").css("opacity",
this.animationOpacity);"hover"==this.o.resultsposition&&this.n("resultsDiv").css("width",this.n("search").width()-(this.n("resultsDiv").outerWidth(!0)-this.n("resultsDiv").width())+"px");if(0<this.n("items").length&&this.o.scrollBar.horizontal.enabled){let b=parseInt(this.n("items").css("marginLeft")),a=this.n("items").outerWidth()+2*b;this.n("resdrg").css("width",this.n("items").length*a+2*b+"px")}else this.n("results").css("overflowX","hidden"),this.n("resdrg").css("width","auto");1==this.o.highlight&&
c("div.item",this.n("resultsDiv")).highlight(this.n("text").val().split(" "),{element:"span",className:"highlighted",wordsOnly:1==this.o.highlightWholewords});if(1>this.call_num){let b=this.n("results");b.get(0).scrollLeft=0;if(this.o.scrollBar.horizontal.enabled){let a=0,e=Date.now();b.off("mousewheel");b.on("mousewheel",function(g){let h="undefined"!=typeof g.deltaFactor?g.deltaFactor:65,f=0<g.deltaY?1:-1;var k=Date.now()-e;k=100<k?1:3-2*k/100;a!=g.deltaY&&(k=1);c(this).animate(!1).animate({scrollLeft:this.scrollLeft+
f*h*2*k},250,"easeOutQuad");a=g.deltaY;e=Date.now();d.isScrolledToRight(b.get(0))&&1==f||d.isScrolledToLeft(b.get(0))&&-1==f||g.preventDefault()})}}this.showResultsBox();this.addAnimation();this.searching=!1},showIsotopicResults:function(){if(1==this._no_animations)return this.showResultsBox(),this.addAnimation(),this.searching=!1,!0;this.preProcessIsotopicResults();this.showResultsBox();0<this.n("items").length&&(this.n("results").css({height:"auto"}),1==this.o.highlight&&c("div.item",this.n("resultsDiv")).highlight(this.n("text").val().split(" "),
{element:"span",className:"highlighted",wordsOnly:this.o.highlightWholewords}));0==this.call_num&&this.calculateIsotopeRows();this.showPagination();this.isotopicPagerScroll();if(0==this.n("items").length)this.n("results").css({height:"11110px"}),this.n("results").css({height:"auto"}),this.n("resdrg").css({height:"auto"});else if("undefined"!==typeof rpp_isotope){if(null!=this.isotopic&&"undefined"!=typeof this.isotopic.destroy&&0==this.call_num&&this.isotopic.destroy(),0==this.call_num||null==this.isotopic)this.isotopic=
new rpp_isotope("#ajaxsearchprores"+this.o.rid+" .resdrg",{isOriginLeft:!c("body").hasClass("rtl"),itemSelector:"div.item",layoutMode:"masonry",filter:this.filterFns.number,masonry:{gutter:this.o.isotopic.gutter}})}else return!1;this.addAnimation();this.initIsotopicClick();this.searching=!1},initIsotopicClick:function(){let b=this;b.eh.isotopicClickhandle=b.eh.isotopicClickhandle||function(a){if(!b.dragging){let e=c(this).find(".asp_content a.asp_res_url"),g=e.attr("href");""!==g&&(a.preventDefault(),
2==a.which||"_blank"==e.attr("target")?d.openInNewTab(g):location.href=g)}};b.n("resultsDiv").find(".asp_isotopic_item").on("click",b.eh.isotopicClickhandle)},preProcessIsotopicResults:function(){let b=this,a=0,e="";b.o.isotopic.showOverlay&&0<b.n("aspItemOverlay").length&&(e=b.n("aspItemOverlay").get(0).outerHTML);b.n("items").forEach(function(g){let h="";var f=0<c(g).find(".asp_image").length,k=c(g).find(".asp_image");f&&(f=k.data("src"),k=b.o.isotopic.blurOverlay&&!d.isMobile()?"aspblur":"no_aspblur",
h=c("<div data-src='"+f+"' ></div>"),"undefined"==typeof WPD.lazy&&h.css({"background-image":"url("+f+")"}),h.css({filter:"url(#"+k+")","-webkit-filter":"url(#"+k+")","-moz-filter":"url(#"+k+")","-o-filter":"url(#"+k+")","-ms-filter":"url(#"+k+")"}).addClass("asp_item_overlay_img asp_lazy"),h=h.get(0).outerHTML);c(g).prepend(h+e+"");c(g).attr("data-itemnum",a);a++})},isotopicPagerScroll:function(){if(0>=c("nav>ul li.asp_active",this.n("resultsDiv")).length)return!1;var b=c("nav>ul li.asp_active",
this.n("resultsDiv")).offset().left;let a=c("nav>ul li.asp_active",this.n("resultsDiv")).outerWidth(!0),e=c("nav>a.asp_next",this.n("resultsDiv")).offset().left;var g=c("nav>a.asp_prev",this.n("resultsDiv")).offset().left;0>=a||(g=Math.ceil((g-b+2*a)/a),0<g?0==c("nav>ul li.asp_active",this.n("resultsDiv")).prev().length?c("nav>ul",this.n("resultsDiv")).css({left:a+"px"}):c("nav>ul",this.n("resultsDiv")).css({left:c("nav>ul",this.n("resultsDiv")).position().left+a*g+"px"}):(b=0==c("nav>ul li.asp_active",
this.n("resultsDiv")).next().length?Math.ceil((b-e+a)/a):Math.ceil((b-e+2*a)/a),0<b&&c("nav>ul",this.n("resultsDiv")).css({left:c("nav>ul",this.n("resultsDiv")).position().left-a*b+"px"})))},showPagination:function(b){b="undefined"!==typeof b?b:!1;if(!this.o.isotopic.pagination)return null!=this.isotopic&&b&&this.isotopic.arrange({transitionDuration:0,filter:this.filterFns.number}),!1;(1>this.call_num||b)&&c("nav.asp_navigation ul li",this.n("resultsDiv")).remove();c("nav.asp_navigation",this.n("resultsDiv")).css("display",
"none");if(0<this.n("items").length){var a=1;0<this.call_num&&!b&&(a=this.n("resultsDiv").find("nav.asp_navigation ul").first().find("li").length+1);let e=Math.ceil(this.n("items").length/this.il.itemsPerPage);if(1<e){let g=b&&0<this.il.lastVisibleItem?Math.ceil(this.il.lastVisibleItem/this.il.itemsPerPage):1;for(g=0>=g?1:g;a<=e;a++)a==g?c("nav.asp_navigation ul",this.n("resultsDiv")).append("<li class='asp_active'><span>"+a+"</span></li>"):c("nav.asp_navigation ul",this.n("resultsDiv")).append("<li><span>"+
a+"</span></li>");c("nav.asp_navigation",this.n("resultsDiv")).css("display","block");b?c("nav.asp_navigation ul li.asp_active",this.n("resultsDiv")).trigger("click_trigger"):c("nav.asp_navigation ul li.asp_active",this.n("resultsDiv")).trigger("click")}else null!=this.isotopic&&b&&this.isotopic.arrange({transitionDuration:0,filter:this.filterFns.number})}},hidePagination:function(){c("nav.asp_navigation",this.n("resultsDiv")).css("display","none")},visiblePagination:function(){return"none"!=c("nav.asp_navigation",
this.n("resultsDiv")).css("display")},calculateIsotopeRows:function(){let b=this;let a;var e=parseFloat(b.n("results").width());if("desktop"===d.deviceType()){var g=d.getWidthFromCSSValue(b.o.isotopic.itemWidth,e);a=d.getWidthFromCSSValue(b.o.isotopic.itemHeight,e)}else"tablet"===d.deviceType()?(g=d.getWidthFromCSSValue(b.o.isotopic.itemWidthTablet,e),a=d.getWidthFromCSSValue(b.o.isotopic.itemHeightTablet,e)):(g=d.getWidthFromCSSValue(b.o.isotopic.itemWidthPhone,e),a=d.getWidthFromCSSValue(b.o.isotopic.itemHeightPhone,
e));let h=b.o.isotopic.gutter,f=Math.floor(e/g);0>=f&&(f=1);Math.abs(e/f-g)>Math.abs(e/(f+1)-g)&&f++;e=e/f-(f-1)*h/f;g=e/g*a;b.il.columns=f;b.il.itemsPerPage=f*b.il.rows;b.il.lastVisibleItem=0;b.n("results").find(".asp_isotopic_item").forEach(function(k,l){"none"!=c(k).css("display")&&(b.il.lastVisibleItem=l)});isNaN(b.il.columns)||isNaN(b.il.itemsPerPage)||(b.n("resultsDiv").data("colums",b.il.columns),b.n("resultsDiv").data("itemsperpage",b.il.itemsPerPage));b.currentPage=1;b.n("items").css({width:Math.floor(e)+
"px",height:Math.floor(g)+"px"})},showPolaroidResults:function(){var b;null==(b=this.loadASPFonts)||b.call(this);this.n("results").addClass("photostack");c(".photostack>nav",this.n("resultsDiv")).remove();b=c("figure",this.n("resultsDiv"));this.showResultsBox();if(0<b.length)if(this.n("results").css({height:this.o.prescontainerheight}),1==this.o.highlight&&c("figcaption",this.n("resultsDiv")).highlight(this.n("text").val().split(" "),{element:"span",className:"highlighted",wordsOnly:this.o.highlightWholewords}),
"undefined"!==typeof Photostack)this.ptstack=new Photostack(this.n("results").get(0),{callback:function(a){}});else return!1;0==b.length&&(this.n("results").css({height:"11110px"}),this.n("results").css({height:"auto"}));this.addAnimation();this.fixResultsPosition(!0);this.searching=!1;this.initPolaroidEvents(b)},initPolaroidEvents:function(b){let a=this,e=1;b.each(function(){1<e&&c(this).removeClass("photostack-current");c(this).attr("idx",e);e++});b.on("click",function(g){c(this).hasClass("photostack-current")||
(g.preventDefault(),g=c(this).attr("idx"),c(".photostack>nav span:nth-child("+g+")",a.n("resultsDiv")).trigger("click",[],!0))});b.on("mousewheel",function(g){g.preventDefault();1<=(0<g.deltaY?1:-1)?0<c(".photostack>nav span.current",a.n("resultsDiv")).next().length?c(".photostack>nav span.current",a.n("resultsDiv")).next().trigger("click",[],!0):c(".photostack>nav span:nth-child(1)",a.n("resultsDiv")).trigger("click",[],!0):0<c(".photostack>nav span.current",a.n("resultsDiv")).prev().length?c(".photostack>nav span.current",
a.n("resultsDiv")).prev().trigger("click",[],!0):c(".photostack>nav span:nth-last-child(1)",a.n("resultsDiv")).trigger("click",[],!0)});a.n("resultsDiv").on("swiped-left",function(){0<c(".photostack>nav span.current",a.n("resultsDiv")).next().length?c(".photostack>nav span.current",a.n("resultsDiv")).next().trigger("click",[],!0):c(".photostack>nav span:nth-child(1)",a.n("resultsDiv")).trigger("click",[],!0)});a.n("resultsDiv").on("swiped-right",function(){0<c(".photostack>nav span.current",a.n("resultsDiv")).prev().length?
c(".photostack>nav span.current",a.n("resultsDiv")).prev().trigger("click",[],!0):c(".photostack>nav span:nth-last-child(1)",a.n("resultsDiv")).trigger("click",[],!0)})},showVerticalResults:function(){this.showResultsBox();if(0<this.n("items").length){let a=this.n("items").length<this.o.itemscount?this.n("items").length:this.o.itemscount;a=0>=a?9999:a;var b=c(".asp_group_header",this.n("resultsDiv"));if(0==this.o.itemscount||this.n("items").length<=this.o.itemscount)this.n("results").css({height:"auto"});
else if(1>this.call_num&&this.n("results").css({height:"30px"}),1>this.call_num){let e=0,g=0,h=0,f=0;this.n("items").each(function(){g+=c(this).outerHeight(!0);c(this).outerHeight(!0)>f&&(f=c(this).outerHeight(!0));e++});h=f*a;h>g&&(h=g);e=1>e?1:e;g=g/e*a;0<b.length&&b.each(function(k,l){k=Array.prototype.slice.call(k.parentNode.children).indexOf(k);k-l-Math.floor(k/3)<a&&(h+=c(this).outerHeight(!0))});this.n("results").css({height:h+"px"})}this.n("items").last().addClass("asp_last_item");this.n("results").find(".asp_group_header").prev(".item").addClass("asp_last_item");
1==this.o.highlight&&c("div.item",this.n("resultsDiv")).highlight(this.n("text").val().split(" "),{element:"span",className:"highlighted",wordsOnly:this.o.highlightWholewords})}this.resize();0==this.n("items").length&&this.n("results").css({height:"auto"});1>this.call_num&&(this.n("results").get(0).scrollTop=0);if(this.o.preventBodyScroll){let a;b=c("body");let e=b.css("overflow"),g="undefined"===typeof b.attr("style");this.n("results").off("touchstart");this.n("results").off("touchend");this.n("results").on("touchstart",
function(){clearTimeout(a);c("body").css("overflow","hidden")}).on("touchend",function(){clearTimeout(a);a=setTimeout(function(){g?c("body").removeAttr("style"):c("body").css("overflow",e)},300)})}this.addAnimation();this.fixResultsPosition(!0);this.searching=!1},createResultsScroll:function(b){let a=this,e,g=a.n("results");b="undefined"==typeof b?"vertical":b;g.on("scroll",function(){document.dispatchEvent(new Event("wpd-lazy-trigger"));a.o.show_more.infinite&&(clearTimeout(e),e=setTimeout(function(){a.checkAndTriggerInfiniteScroll(b)},
60))})},createVerticalScroll:function(){this.createResultsScroll("vertical")},createHorizontalScroll:function(){this.createResultsScroll("horizontal")},checkAndTriggerInfiniteScroll:function(b){var a=c(".item",this.n("resultsDiv"));b="undefined"==typeof b?"window":b;if(0==this.n("showmore").length||"none"==this.n("showmoreContainer").css("display"))return!1;if("window"==b||"horizontal"==b){if("isotopic"==this.o.resultstype&&"none"!=c("nav.asp_navigation",this.n("resultsDiv")).css("display"))return!1;
b=a.last().inViewPort(0,this.n("resultsDiv").get(0));let e=a.last().inViewPort(0);!this.searching&&0<a.length&&b&&e&&this.n("showmore").find("a.asp_showmore").trigger("click")}else"vertical"==b?(a=this.n("results"),d.isScrolledToBottom(a.get(0),20)&&this.n("showmore").find("a.asp_showmore").trigger("click")):"isotopic"==b&&!this.searching&&0<a.length&&this.n("resultsDiv").find("nav.asp_navigation ul li").last().hasClass("asp_active")&&this.n("showmore").find("a.asp_showmore").trigger("click")},isDuplicateSearchTriggered:function(){for(let b=
0;25>b;b++)if(this.o.id+"_"+b!=this.o.rid&&!1!==ASP.instances.get(this.o.id,b))return ASP.instances.get(this.o.id,b).searching;return!1},searchAbort:function(){null!=this.post&&(this.post.abort(),this.isAutoP=!1)},searchWithCheck:function(b){let a=this;"undefined"==typeof b&&(b=50);a.n("text").val().length<a.o.charcount||(a.searchAbort(),clearTimeout(a.timeouts.searchWithCheck),a.timeouts.searchWithCheck=setTimeout(function(){a.search()},b))},search:function(b,a,e,g,h){let f=this,k=!1;if(f.isDuplicateSearchTriggered())return!1;
e="undefined"==typeof e?!1:e;g="undefined"==typeof g?!1:g;h="undefined"==typeof h?!1:h;let l={action:"ajaxsearchpro_search",aspp:f.n("text").val(),asid:f.o.id,asp_inst_id:f.o.rid,options:c("form",f.n("searchsettings")).serialize()};l=d.Hooks.applyFilters("asp_search_data",l,f.o.id,f.o.iid);l=d.wp_hooks_apply_filters("asp_search_data",l,f.o.id,f.o.iid);let n;null==(n=f.hideArrowBox)||n.call(f);if("undefined"!=typeof f.reportSettingsValidity&&!f.isAutoP&&!f.reportSettingsValidity()){if(!h){let q;null==
(q=f.showNextInvalidFacetMessage)||q.call(f);let m;null==(m=f.scrollToNextInvalidFacetMessage)||m.call(f)}k=!0}f.isAutoP&&(l.autop=1);if(!e&&!g&&JSON.stringify(l)===JSON.stringify(f.lastSearchData)){f.resultsOpened||f.usingLiveLoader()||f.showResults();if(f.isRedirectToFirstResult())return f.doRedirectToFirstResult(),!1;k=!0}if(k)return f.hideLoader(),f.searchAbort(),!1;f.n("s").trigger("asp_search_start",[f.o.id,f.o.iid,f.n("text").val()],!0,!0);f.searching=!0;f.n("proclose").css({display:"none"});
f.showLoader(e);if(0==f.att("blocking")&&0==f.o.trigger.facet){let q;null==(q=f.hideSettings)||q.call(f)}e?(f.call_num++,l.asp_call_num=f.call_num,f.autopStartedTheSearch&&(l.options+="&"+c.fn.serializeForAjax(f.autopData),--l.asp_call_num)):(f.call_num=0,f.autopStartedTheSearch=!!l.autop);g=c('form[name="asp_data"]');0<g.length&&(l.asp_preview_options=g.serialize());"undefined"!=typeof b&&!1!==b&&(l.options+="&force_count="+parseInt(b));"undefined"!=typeof a&&!1!==a&&(l.options+="&force_order="+
parseInt(a));let p;null==(p=f.gaEvent)||p.call(f,"search_start");0<c(".asp_es_"+f.o.id).length?f.liveLoad(".asp_es_"+f.o.id,f.getCurrentLiveURL(),f.o.trigger.update_href):f.o.resPage.useAjax?f.liveLoad(f.o.resPage.selector,f.getRedirectURL()):f.o.wooShop.useAjax?f.liveLoad(f.o.wooShop.selector,f.getLiveURLbyBaseLocation(f.o.wooShop.url)):f.o.taxArchive.useAjax?f.liveLoad(f.o.taxArchive.selector,f.getLiveURLbyBaseLocation(f.o.taxArchive.url)):f.o.cptArchive.useAjax?f.liveLoad(f.o.cptArchive.selector,
f.getLiveURLbyBaseLocation(f.o.cptArchive.url)):f.post=c.fn.ajax({url:ASP.ajaxurl,method:"POST",data:l,success:function(q){f.searching=!1;q=q.replace(/^\s*[\r\n]/gm,"");let m=q.match(/___ASPSTART_HTML___(.*[\s\S]*)___ASPEND_HTML___/),r=q.match(/___ASPSTART_DATA___(.*[\s\S]*)___ASPEND_DATA___/);if(null==m||"object"!=typeof m||"undefined"==typeof m[1])return f.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;m=m[1];m=d.Hooks.applyFilters("asp_search_html",m,f.o.id,f.o.iid);m=d.wp_hooks_apply_filters("asp_search_html",m,f.o.id,f.o.iid);r=JSON.parse(r[1]);f.n("s").trigger("asp_search_end",[f.o.id,f.o.iid,f.n("text").val(),r],!0,!0);if(f.autopStartedTheSearch)if("undefined"!=typeof l.autop){if(f.autopData.not_in={},f.autopData.not_in_count=0,"undefined"!=typeof r.results){let t=[];"undefined"!=typeof r.results.groups?Object.keys(r.results.groups).forEach(function(u){"undefined"!=typeof r.results.groups[u].items&&
(u=r.results.groups[u].items,Array.isArray(u)&&u.forEach(function(w){t.push(w)}))}):t=Array.isArray(r.results)?r.results:t;t.forEach(function(u){"undefined"==typeof f.autopData.not_in[u.content_type]&&(f.autopData.not_in[u.content_type]=[]);f.autopData.not_in[u.content_type].push(u.id);++f.autopData.not_in_count})}}else r.full_results_count+=f.autopData.not_in_count;e?(f.updateResults(m),f.results_num+=r.results_count):(f.initResults(),f.n("resdrg").html(""),f.n("resdrg").html(m),f.results_num=r.results_count,
f.o.statistics&&f.stat_addKeyword(f.o.id,f.n("text").val()));f.updateNoResultsHeader();f.nodes.items=0<c(".item",f.n("resultsDiv")).length?c(".item",f.n("resultsDiv")):c(".photostack-flip",f.n("resultsDiv"));f.addHighlightString();let v;null==(v=f.gaEvent)||v.call(f,"search_end",{results_count:f.n("items").length});if(f.isRedirectToFirstResult())return f.doRedirectToFirstResult(),!1;f.hideLoader();f.showResults();""!=window.location.hash&&-1<window.location.hash.indexOf("#asp-res-")&&0<c(window.location.hash).length?
f.scrollToResult(window.location.hash):f.scrollToResults();f.lastSuccesfulSearch=c("form",f.n("searchsettings")).serialize()+f.n("text").val().trim();f.lastSearchData=l;f.updateInfoHeader(r.full_results_count);f.updateHref();0<f.n("showmore").length&&(0<c("span",f.n("showmore")).length&&0<r.results_count&&0<r.full_results_count-f.results_num?(""==f.n("showmore").data("text")&&f.n("showmore").data("text",f.n("showmore").html()),f.n("showmore").html(f.n("showmore").data("text").replaceAll("{phrase}",
d.escapeHtml(f.n("text").val()))),f.n("showmoreContainer").css("display","block"),f.n("showmore").css("display","block"),c("span",f.n("showmore")).html("("+(r.full_results_count-f.results_num)+")"),q=c("a",f.n("showmore")),q.attr("href",""),q.off(),q.on(f.clickTouchend,function(t){t.preventDefault();t.stopImmediatePropagation();if("ajax"==f.o.show_more.action){if(f.searching)return!1;f.showMoreResLoader();f.search(!1,!1,!0)}else c(this).off(),"results_page"==f.o.show_more.action?t="?s="+d.nicePhrase(f.n("text").val()):
"woo_results_page"==f.o.show_more.action?t="?post_type=product&s="+d.nicePhrase(f.n("text").val()):(t="elementor_page"==f.o.show_more.action?f.parseCustomRedirectURL(f.o.show_more.elementor_url,f.n("text").val()):f.parseCustomRedirectURL(f.o.show_more.url,f.n("text").val()),t=c("<textarea />").html(t).text()),"elementor_page"!=f.o.show_more.action&&1<f.o.homeurl.indexOf("?")&&0==t.indexOf("?")&&(t=t.replace("?","&")),t="elementor_page"==f.o.show_more.action?t:f.o.homeurl+t,f.o.overridewpdefault?"post"==
f.o.override_method?d.submitToUrl(t,"post",{asp_active:1,p_asid:f.o.id,p_asp_data:c("form",f.n("searchsettings")).serialize()},f.o.show_more.location):(t=t+"&asp_active=1&p_asid="+f.o.id+"&p_asp_data=1&"+c("form",f.n("searchsettings")).serialize(),"same"==f.o.show_more.location?location.href=t:d.openInNewTab(t)):d.submitToUrl(t,"post",{np_asid:f.o.id,np_asp_data:c("form",f.n("searchsettings")).serialize()},f.o.show_more.location)})):(f.n("showmoreContainer").css("display","none"),c("span",f.n("showmore")).html("")));
f.isAutoP=!1},fail:function(q){q.aborted||(f.n("resdrg").html(""),f.n("resdrg").html('<div class="asp_nores">The request failed. Please check your connection! Status: '+q.status+"</div>"),f.nodes.item=0<c(".item",f.n("resultsDiv")).length?c(".item",f.n("resultsDiv")):c(".photostack-flip",f.n("resultsDiv")),f.results_num=0,f.searching=!1,f.hideLoader(),f.showResults(),f.scrollToResults(),f.isAutoP=!1)}})},showSettings:function(b){let a=this,e;null==(e=a.initSettings)||e.call(a);b="undefined"==typeof b?
!0:b;a.n("s").trigger("asp_settings_show",[a.o.id,a.o.iid],!0,!0);b?(a.n("searchsettings").css(a.settAnim.showCSS),a.n("searchsettings").removeClass(a.settAnim.hideClass).addClass(a.settAnim.showClass)):a.n("searchsettings").css({display:"block",visibility:"visible",opacity:1});if(!("masonry"!=a.o.fss_layout||null!=a.sIsotope||d.isMobile()&&d.detectIOS()))if("undefined"!==typeof rpp_isotope)setTimeout(function(){let g=a.n("searchsettings").attr("id");a.n("searchsettings").css("width","100%");a.sIsotope=
new rpp_isotope("#"+g+" form",{isOriginLeft:!c("body").hasClass("rtl"),itemSelector:"fieldset",layoutMode:"masonry",transitionDuration:0,masonry:{columnWidth:a.n("searchsettings").find("fieldset:not(.hiddend)").outerWidth()}})},20);else return!1;"undefined"!=typeof a.select2jQuery&&a.select2jQuery(a.n("searchsettings").get(0)).find(".asp_gochosen,.asp_goselect2").trigger("change.asp_select2");a.n("prosettings").data("opened",1);a.fixSettingsPosition(!0);a.fixSettingsAccessibility()},hideSettings:function(){let b=
this,a;null==(a=b.initSettings)||a.call(b);b.n("s").trigger("asp_settings_hide",[b.o.id,b.o.iid],!0,!0);b.n("searchsettings").removeClass(b.settAnim.showClass).addClass(b.settAnim.hideClass);setTimeout(function(){b.n("searchsettings").css(b.settAnim.hideCSS)},b.settAnim.duration);b.n("prosettings").data("opened",0);null!=b.sIsotope&&setTimeout(function(){b.sIsotope.destroy();b.sIsotope=null},b.settAnim.duration);"undefined"!=typeof b.select2jQuery&&"undefined"!=typeof b.select2jQuery.fn.asp_select2&&
b.select2jQuery(b.n("searchsettings").get(0)).find(".asp_gochosen,.asp_goselect2").asp_select2("close");let e;null==(e=b.hideArrowBox)||e.call(b)},reportSettingsValidity:function(){let b=!0;if("hidden"==this.n("searchsettings").css("visibility"))return!0;this.n("searchsettings").find("fieldset.asp_required").each(function(){let a=c(this),e=!0;a.find("input[type=text]:not(.asp_select2-search__field)").each(function(){""==c(this).val()&&(e=!1)});a.find("select").each(function(){if(null==c(this).val()||
""==c(this).val()||c(this).closest("fieldset").is(".asp_filter_tax, .asp_filter_content_type")&&"-1"==c(this).val())e=!1});0<a.find("input[type=checkbox]").length&&(0===a.find("input[type=checkbox]:checked").length?e=!1:1===a.find("input[type=checkbox]:checked").length&&""===a.find("input[type=checkbox]:checked").val()&&(e=!1));0<a.find("input[type=radio]").length&&(0===a.find("input[type=radio]:checked").length&&(e=!1),e&&a.find("input[type=radio]").each(function(){c(this).prop("checked")&&(""==
c(this).val()||c(this).closest("fieldset").is(".asp_filter_tax, .asp_filter_content_type")&&"-1"==c(this).val())&&(e=!1)}));e?a.removeClass("asp-invalid"):(a.addClass("asp-invalid"),b=!1)});b||this.n("searchsettings").find("button.asp_s_btn").prop("disabled",!0);this.n("searchsettings").find("button.asp_s_btn").prop("disabled",!1);return b},showArrowBox:function(b,a){let e=this;var g=c("body");let h=g.find(".asp_arrow_box");0===h.length&&(g.append("<div class='asp_arrow_box'></div>"),h=g.find(".asp_arrow_box"),
h.on("mouseout",function(){let l;null==(l=e.hideArrowBox)||l.call(e)}));g=c(b).offset().top-window.scrollY;var f=!1;let k=b;for(;k;)if(k=k.parentElement,null!=k&&"fixed"==window.getComputedStyle(k).position){f=!0;break}f?(h.css("position","fixed"),f=0):(h.css("position","absolute"),f=window.scrollY);h.html(a);h.css("display","block");a=b.getBoundingClientRect().left+c(b).outerWidth()/2-h.outerWidth()/2+"px";100<g?(h.removeClass("asp_arrow_box_bottom"),h.css({top:f+b.getBoundingClientRect().top-h.outerHeight()-
4+"px",left:a})):(h.addClass("asp_arrow_box_bottom"),h.css({top:f+b.getBoundingClientRect().bottom+4+"px",left:a}))},hideArrowBox:function(){c("body").find(".asp_arrow_box").css("display","none")},showNextInvalidFacetMessage:function(){0<this.n("searchsettings").find(".asp-invalid").length&&this.showArrowBox(this.n("searchsettings").find(".asp-invalid").first().get(0),this.n("searchsettings").find(".asp-invalid").first().data("asp_invalid_msg"))},scrollToNextInvalidFacetMessage:function(){if(0<this.n("searchsettings").find(".asp-invalid").length){var b=
this.n("searchsettings").find(".asp-invalid").first();if(!b.inViewPort(0))if("undefined"!=typeof b.get(0).scrollIntoView)b.get(0).scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"});else{b=b.offset().top-20;let a=c("#wpadminbar");0<a.length&&(b-=a.height());b=0>b?0:b;window.scrollTo({top:b,behavior:"smooth"})}}},settingsCheckboxToggle:function(b,a){a="undefined"==typeof a?!0:a;let e=b,g=b.find('input[type="checkbox"]');b=parseInt(b.data("lvl"))+1;let h=0;for(;;){e=e.next();if(0<e.length&&
"undefined"!=typeof e.data("lvl")&&parseInt(e.data("lvl"))>=b)a&&e.find('input[type="checkbox"]').prop("checked",g.prop("checked")),this.o.settings.hideChildren&&(g.prop("checked")?e.removeClass("hiddend"):e.addClass("hiddend"));else break;h++;if(400<h)break}},searchFor:function(b){"undefined"!=typeof b&&this.n("text").val(b);this.n("textAutocomplete").val("");this.search(!1,!1,!1,!0)},searchRedirect:function(b){b=this.parseCustomRedirectURL(this.o.trigger.redirect_url,b);1<this.o.homeurl.indexOf("?")&&
0==b.indexOf("?")&&(b=b.replace("?","&"));this.o.overridewpdefault?"post"==this.o.override_method?d.submitToUrl(this.o.homeurl+b,"post",{asp_active:1,p_asid:this.o.id,p_asp_data:c("form",this.n("searchsettings")).serialize()}):location.href=this.o.homeurl+b+"&asp_active=1&p_asid="+this.o.id+"&p_asp_data=1&"+c("form",this.n("searchsettings")).serialize():d.submitToUrl(this.o.homeurl+b,"post",{np_asid:this.o.id,np_asp_data:c("form",this.n("searchsettings")).serialize()})},toggleSettings:function(b){if("undefined"!=
typeof b)if("show"==b){let a;null==(a=this.showSettings)||a.call(this)}else{let a;null==(a=this.hideSettings)||a.call(this)}else if(1==this.n("prosettings").data("opened")){let a;null==(a=this.hideSettings)||a.call(this)}else{let a;null==(a=this.showSettings)||a.call(this)}},closeResults:function(b){"undefined"!=typeof b&&b&&(this.n("text").val(""),this.n("textAutocomplete").val(""));this.hideResults();this.n("proloading").css("display","none");this.hideLoader();this.searchAbort()},getStateURL:function(){let b=
location.href,a;b=b.split("p_asid");b=b[0];b=b.replace("&asp_active=1","");b=b.replace("?asp_active=1","");b="?"==b.slice(-1)?b.slice(0,-1):b;b="&"==b.slice(-1)?b.slice(0,-1):b;a=1<b.indexOf("?")?"&":"?";return b+a+"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(".ajaxsearchprotop").each(function(){let d=JSON.parse(c(this).data("aspdata")),b=d.id;if(0==d.action)c("a",c(this)).on("click",function(a){a.preventDefault()});else if(2==d.action)c("a",c(this)).on("click",function(a){a.preventDefault();ASP.api(b,"searchFor",c(this).html());c("html").animate({scrollTop:c("div[id*=ajaxsearchpro"+b+"_]").first().offset().top-40},500)});else if(1==d.action)c("a",c(this)).on("click",function(a){if(ASP.api(b,"exists"))return a.preventDefault(),ASP.api(b,
"searchRedirect",c(this).html())})})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers,b=window.WPD.ajaxsearchpro;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{detectAndFixFixedPositioning:function(){let a=!1,e=this.n("search").get(0);for(;e;)if(e=e.parentElement,null!=e&&"fixed"==window.getComputedStyle(e).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 e=c("body");
let g=0;var h=this.n("resultsDiv").css("position");if(0!=c._fn.bodyTransformY()||"static"!=e.css("position"))g=e.offset().top;0!=c._fn.bodyTransformY()&&"fixed"==h&&(h="absolute",this.n("resultsDiv").css("position","absolute"));"fixed"==h&&(g=0);if("fixed"==h||"absolute"==h)if(1==a||"visible"==this.n("resultsDiv").css("visibility")){a=this.n("search").offset();h=0;if(0!=c._fn.bodyTransformX()||"static"!=e.css("position"))h=e.offset().left;if("undefined"!=typeof a){let f=0;e="phone"==d.deviceType()?
this.o.results.width_phone:"tablet"==d.deviceType()?this.o.results.width_tablet:this.o.results.width;"auto"==e&&(e=240>this.n("search").outerWidth()?240:this.n("search").outerWidth());this.n("resultsDiv").css("width",isNaN(e)?e:e+"px");"right"==this.o.resultsSnapTo?f=this.n("resultsDiv").outerWidth()-this.n("search").outerWidth():"center"==this.o.resultsSnapTo&&(f=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-f-h+"px"})}}},fixSettingsPosition:function(a){a="undefined"==typeof a?!1:a;var e=c("body"),g=0,h=this.n("searchsettings").css("position");if(0!=c._fn.bodyTransformY()||"static"!=e.css("position"))g=e.offset().top;0!=c._fn.bodyTransformY()&&"fixed"==h&&(h="absolute",this.n("searchsettings").css("position","absolute"));"fixed"==h&&(g=0);if((1==a||0!=this.n("prosettings").data("opened"))&&1!=this.att("blocking")){a=0;if(0!=c._fn.bodyTransformX()||"static"!=e.css("position"))a=e.offset().left;
this.fixSettingsWidth();e="none"!=this.n("prosettings").css("display")?this.n("prosettings"):this.n("promagnifier");h=e.offset();g=h.top+e.height()-2-g+"px";e="left"==this.o.settingsimagepos?h.left:h.left+e.width()-this.n("searchsettings").width();e=e-a+"px";this.n("searchsettings").css({display:"block",top:g,left:e})}},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()}},initAutocompleteEvent:function(){let a=
this,e;if(1==a.o.autocomplete.enabled&&!d.isMobile()||1==a.o.autocomplete.mobile&&d.isMobile())a.n("text").on("keyup",function(g){a.keycode=g.keyCode||g.which;a.ktype=g.type;let h=39;c("body").hasClass("rtl")&&(h=37);a.keycode==h&&""!=a.n("textAutocomplete").val()?(g.preventDefault(),a.n("text").val(a.n("textAutocomplete").val()),0!=a.o.trigger.type&&(a.searchAbort(),a.search())):(clearTimeout(e),null!=a.postAuto&&a.postAuto.abort(),1==a.o.autocomplete.googleOnly?a.autocompleteGoogleOnly():e=setTimeout(function(){a.autocomplete();
e=null},a.o.trigger.autocomplete_delay))}),a.n("text").on("keyup mouseup input blur select",function(){a.fixAutocompleteScrollLeft()})},initMagnifierEvents:function(){let a=this;a.n("promagnifier").on("click",function(e){let g=a.n("search").attr("data-asp-compact")||"closed";a.keycode=e.keyCode||e.which;a.ktype=e.type;if(1==a.o.compact.enabled&&("closed"==g||1==a.o.compact.closeOnMagnifier&&"open"==g))return!1;let h;null==(h=a.gaEvent)||h.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(e){a.ktype="button";e.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(e){let g=d.formData(c("form",a.n("searchsettings"))),h=a.n("text").val();e.preventDefault();a.resetSearchFilters();"live"!=a.o.rb.action||JSON.stringify(g)==JSON.stringify(d.formData(c("form",a.n("searchsettings"))))&&""==h?"close"==a.o.rb.action&&a.hideResults():
a.search(!1,!1,!1,!0,!0)})},initCompactEvents:function(){let a=this;a.n("promagnifier").on("click",function(){let e=a.n("search").attr("data-asp-compact")||"closed",g;null==(g=a.hideSettings)||g.call(a);a.hideResults();"closed"==e?(a.openCompact(),a.n("text").trigger("focus")):1==a.o.compact.closeOnMagnifier&&(a.closeCompact(),a.searchAbort(),a.n("proloading").css("display","none"))})},initDatePicker:function(){let a=this;WPD.intervalUntilExecute(function(e){function g(h,f,k,l,n){h=null!=k?e(k):e("#"+
f.id);f=e(".asp_datepicker_hidden",e(h).parent()).val();k="";if(null==h.datepicker("getDate"))e(".asp_datepicker_hidden",e(h).parent()).val("");else{k=String(h.datepicker("getDate"));var p=new Date(k.match(/(.*?)00:/)[1].trim());k=String(p.getFullYear());let q=("0"+(p.getMonth()+1)).slice(-2);p=("0"+String(p.getDate())).slice(-2);k=k+"-"+q+"-"+p;e(".asp_datepicker_hidden",e(h).parent()).val(k)}"undefined"!=typeof n&&null!=l||k==f||c(h.get(0)).trigger("change")}e(".asp_datepicker, .asp_datepicker_field",
a.n("searchsettings").get(0)).each(function(){let h=e(".asp_datepicker_format",e(this).parent()).val(),f=this,k=e(this).val();e(this).removeClass("hasDatepicker");e(this).datepicker({changeMonth:!0,changeYear:!0,dateFormat:"yy-mm-dd",onSelect:g,beforeShow:function(){e("#ui-datepicker-div").addClass("asp-ui")}});""==k?e(this).datepicker("setDate",""):e(this).datepicker("setDate",k);e(this).datepicker("option","dateFormat",h);g(null,null,f,!0);e(this).on("selectnochange",function(){g(null,null,f,!0)});
e(this).on("keyup",function(){null==e(f).datepicker("getDate")&&e(".asp_datepicker_hidden",e(f).parent()).val("");e(f).datepicker("hide")})});if(d.isMobile()&&d.detectIOS())e(window).on("pageshow",function(h){h.originalEvent.persisted&&setTimeout(function(){e(".asp_datepicker, .asp_datepicker_field",a.n("searchsettings").get(0)).each(function(){let f=e(this).datepicker("option","dateFormat");e(this).datepicker("option","dateFormat","yy-mm-dd");e(this).datepicker("setDate",e(this).next(".asp_datepicker_hidden").val());
e(this).datepicker("option","dateFormat",f)})},100)})},function(){return d.whichjQuery("datepicker")})},initFacetEvents:function(){let a=this,e=null,g=null;c(".asp_custom_f input[type=text]:not(.asp_select2-search__field):not(.asp_datepicker_field):not(.asp_datepicker)",a.n("searchsettings")).on("input",function(h){let f=h.keyCode||h.which,k=this;a.ktype=h.type;13==f&&(h.preventDefault(),h.stopImmediatePropagation());if("number"==c(this).data("asp-type")&&""!=this.value){h=this.value.replaceAll(c(this).data("asp-tsep"),
"");let l=d.inputToFloat(this.value),n=this;n.value=l;l=l<parseFloat(c(this).data("asp-min"))?c(this).data("asp-min"):l;l=l>parseFloat(c(this).data("asp-max"))?c(this).data("asp-max"):l;clearTimeout(g);g=setTimeout(function(){n.value=d.addThousandSeparators(l,c(n).data("asp-tsep"))},400);if(l.toString()!==h)return!1}clearTimeout(e);e=setTimeout(function(){let l;null==(l=a.gaEvent)||l.call(a,"facet_change",{option_label:c(k).closest("fieldset").find("legend").text(),option_value:c(k).val()})},1400);
a.n("searchsettings").find("input[name=filters_changed]").val(1);a.setFilterStateInput(65);0!=a.o.trigger.facet&&a.searchWithCheck(240)});a.n("searchsettings").find(".asp-number-range[data-asp-tsep]").forEach(function(){this.value=d.addThousandSeparators(this.value,c(this).data("asp-tsep"))});0!=a.o.trigger.facet&&(c("select",a.n("searchsettings")).on("change slidechange",function(h){a.ktype=h.type;a.n("searchsettings").find("input[name=filters_changed]").val(1);let f;null==(f=a.gaEvent)||f.call(a,
"facet_change",{option_label:c(this).closest("fieldset").find("legend").text(),option_value:c(this).find("option:checked").get().map(function(k){return k.text}).join()});a.setFilterStateInput(65);a.searchWithCheck(80);null!=a.sIsotope&&a.sIsotope.arrange()}),c("input:not([type=checkbox]):not([type=text]):not([type=radio])",a.n("searchsettings")).on("change slidechange",function(h){a.ktype=h.type;a.n("searchsettings").find("input[name=filters_changed]").val(1);let f;null==(f=a.gaEvent)||f.call(a,"facet_change",
{option_label:c(this).closest("fieldset").find("legend").text(),option_value:c(this).val()});a.setFilterStateInput(65);a.searchWithCheck(80)}),c("input[type=radio]",a.n("searchsettings")).on("change slidechange",function(h){a.ktype=h.type;a.n("searchsettings").find("input[name=filters_changed]").val(1);let f;null==(f=a.gaEvent)||f.call(a,"facet_change",{option_label:c(this).closest("fieldset").find("legend").text(),option_value:c(this).closest("label").text()});a.setFilterStateInput(65);a.searchWithCheck(80)}),
c("input[type=checkbox]",a.n("searchsettings")).on("asp_chbx_change",function(h){a.ktype=h.type;a.n("searchsettings").find("input[name=filters_changed]").val(1);let f;null==(f=a.gaEvent)||f.call(a,"facet_change",{option_label:c(this).closest("fieldset").find("legend").text(),option_value:c(this).closest(".asp_option").find(".asp_option_label").text()+(c(this).prop("checked")?"(checked)":"(unchecked)")});a.setFilterStateInput(65);a.searchWithCheck(80)}),c("input.asp_datepicker, input.asp_datepicker_field",
a.n("searchsettings")).on("change",function(h){a.ktype=h.type;a.n("searchsettings").find("input[name=filters_changed]").val(1);let f;null==(f=a.gaEvent)||f.call(a,"facet_change",{option_label:c(this).closest("fieldset").find("legend").text(),option_value:c(this).val()});a.setFilterStateInput(65);a.searchWithCheck(80)}),c('div[id*="-handles"]',a.n("searchsettings")).each(function(h){a.ktype=h.type;if("undefined"!=typeof this.noUiSlider)this.noUiSlider.on("change",function(f){let k="undefined"!=typeof this.target?
this.target:this,l;null==(l=a.gaEvent)||l.call(a,"facet_change",{option_label:c(k).closest("fieldset").find("legend").text(),option_value:f});a.n("searchsettings").find("input[name=filters_changed]").val(1);a.setFilterStateInput(65);a.searchWithCheck(80)})}))},initInputEvents:function(){let a=this,e=!1,g=function(){a.n("text").off("mousedown touchstart keydown",g);if(!e){a._initFocusInput();a.o.trigger.type&&a._initSearchInput();a._initEnterEvent();a._initFormEvent();let h;null==(h=a.initAutocompleteEvent)||
h.call(a);e=!0}};a.n("text").on("mousedown touchstart keydown",g,{passive:!0})},_initFocusInput:function(){let a=this;a.n("text").on("click",function(e){e.stopPropagation();e.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,e=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(e==a.n("text").val())return!1;e=a.n("text").val()}a.updateHref();if(!a.o.trigger.type)return a.searchAbort(),clearTimeout(a.timeouts.search),a.hideLoader(),!1;let h;null==(h=a.hideArrowBox)||h.call(a);if(a.n("text").val().length<
a.o.charcount){a.n("proloading").css("display","none");if(0==a.att("blocking")){let f;null==(f=a.hideSettings)||f.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,e,g=!1;a.n("text").on("keyup",function(h){a.keycode=h.keyCode||h.which;a.ktype=h.type;if(13==a.keycode){clearTimeout(e);e=setTimeout(function(){g=!1},300);if(g)return!1;g=!0}h=c(this).hasClass("orig");if(a.n("text").val().length>=a.o.charcount&&h&&13==a.keycode){let f;null==(f=a.gaEvent)||f.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(e,g){e.preventDefault();d.isMobile()?a.o.redirectOnEnter?(e=new Event("keyup"),e.keyCode=e.which=13,this.n("text").get(0).dispatchEvent(e)):(a.search(),document.activeElement.blur()):"undefined"!=typeof g&&"ajax"==
g&&a.search()})},initIsotopicPagination:function(){let a=this;a.n("resultsDiv").on(a.clickTouchend+" click_trigger","nav>a",function(e){e.preventDefault();e.stopImmediatePropagation();e=c(this).closest("nav").find("li.asp_active");"next"==(c(this).hasClass("asp_prev")?"prev":"next")?0<e.next("li").length?e.next("li").trigger("click"):c(this).closest("nav").find("li").first().trigger("click"):0<e.prev("li").length?e.prev("li").trigger("click"):c(this).closest("nav").find("li").last().trigger("click")});
a.n("resultsDiv").on(a.clickTouchend+" click_trigger","nav>ul li",function(e){e.preventDefault();e.stopImmediatePropagation();let g=e.type,h=this;e=1;d.isMobile()&&(a.n("text").trigger("blur"),e=300);setTimeout(function(){a.currentPage=parseInt(c(h).find("span").html(),10);c("nav>ul li",a.n("resultsDiv")).removeClass("asp_active");c("nav",a.n("resultsDiv")).each(function(f){c(c(f).find("ul li").get(a.currentPage-1)).addClass("asp_active")});"click_trigger"===g?a.isotopic.arrange({transitionDuration:0,
filter:a.filterFns.number}):a.isotopic.arrange({transitionDuration:400,filter:a.filterFns.number});a.isotopicPagerScroll();a.removeAnimation();"undefined"!=typeof WPD.lazy&&document.dispatchEvent(new Event("wpd-lazy-trigger"));a.n("resultsDiv").trigger("nav_switch")},e)})},initNavigationEvents:function(){let a=this,e=function(g){let h=g.keyCode||g.which;if(0<c(".item",a.n("resultsDiv")).length&&"none"!=a.n("resultsDiv").css("display")&&"vertical"==a.o.resultstype){if(40==h||38==h){var f=a.n("resultsDiv").find(".item.hovered");
a.n("text").trigger("blur");0==f.length?a.n("resultsDiv").find(".item").first().addClass("hovered"):(40==h&&(0==f.next(".item").length?a.n("resultsDiv").find(".item").removeClass("hovered").first().addClass("hovered"):f.removeClass("hovered").next(".item").addClass("hovered")),38==h&&(0==f.prev(".item").length?a.n("resultsDiv").find(".item").removeClass("hovered").last().addClass("hovered"):f.removeClass("hovered").prev(".item").addClass("hovered")));g.stopPropagation();g.preventDefault();a.n("resultsDiv").find(".resdrg .item.hovered").inViewPort(50,
a.n("resultsDiv").get(0))||(f=a.n("resultsDiv").find(".resdrg .item.hovered").get(0),null!=f&&"undefined"!=typeof f.scrollIntoView&&f.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}))}13==h&&0<c(".item.hovered",a.n("resultsDiv")).length&&(g.stopPropagation(),g.preventDefault(),c(".item.hovered a.asp_res_url",a.n("resultsDiv")).get(0).click())}};a.documentEventHandlers.push({node:document,event:"keydown",handler:e});c(document).on("keydown",e)},initNoUIEvents:function(){let a=this,
e=a.nodes.searchsettings,g;e.find("div[class*=noui-slider-json]").each(function(h,f){let k=c(this).data("aspnoui");if("undefined"===typeof k)return!1;k=WPD.Base64.decode(k);if("undefined"===typeof k||""==k)return!1;let l=JSON.parse(k);Object.keys(l.links).forEach(function(n){l.links[n].target="#"+e.get(0).id+" "+l.links[n].target});if(0<c(l.node,e).length){g=c(l.node,e).get(0);h=c(h).parent().find(".asp_slider_hidden");l.main.start=1<h.length?[h.first().val(),h.last().val()]:[h.first().val()];if("undefined"!==
typeof noUiSlider)"undefined"!=typeof g.noUiSlider&&g.noUiSlider.destroy(),g.innerHTML="",noUiSlider.create(g,l.main);else return!1;a.noUiSliders[f]=g;g.noUiSlider.on("update",function(n,p){let q=n[p];p?l.links.forEach(function(m){let r=wNumb(m.wNumb);"upper"==m.handle&&(c(m.target,e).is("input")?c(m.target,e).val(q):c(m.target,e).html(r.to(parseFloat(q))));c(l.node,e).on("slide",function(v){v.preventDefault()})}):l.links.forEach(function(m){let r=wNumb(m.wNumb);"lower"==m.handle&&(c(m.target,e).is("input")?
c(m.target,e).val(q):c(m.target,e).html(r.to(parseFloat(q))));c(l.node,e).on("slide",function(v){v.preventDefault()})})})}})},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 h=0;h<g.length;h++)if(a.o[g[h]].useAjax){a.showLoader();a.liveLoad(a.o[g[h]].selector,a.getCurrentLiveURL());break}}a.n("text").get(0).focus()});if(d.isMobile()){var e=
function(){a.orientationChange();setTimeout(function(){a.orientationChange()},600)};a.documentEventHandlers.push({node:window,event:"orientationchange",handler:e});c(window).on("orientationchange",e)}else e=function(){a.resize()},a.documentEventHandlers.push({node:window,event:"resize",handler:e}),c(window).on("resize",e,{passive:!0});e=function(){a.scrolling(!1)};a.documentEventHandlers.push({node:window,event:"scroll",handler:e});c(window).on("scroll",e,{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 h=c(g).find("input.orig");h=0==h.length?c(g).next().find("input.orig"):h;h=0==h.length?c(g).parent().find("input.orig"):h;h=0==h.length?a.n("text"):h;a.n("search").inViewPort()&&h.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(e){e.preventDefault();
e.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(e){"undefined"!==typeof e.fn.asp_select2&&(a.select2jQuery=
e,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")})},initResultsEvents:function(){let a=
this;a.n("resultsDiv").css({opacity:"0"});let e=function(g){let h=g.keyCode||g.which,f=g.type;if(0==c(g.target).closest(".asp_w").length){a.hideOnInvisibleBox();let k;null==(k=a.hideArrowBox)||k.call(a);if("click"!=f||"touchend"!=f||3!=h){if(a.o.compact.enabled)g=a.n("search").attr("data-asp-compact")||"closed",1!=a.o.compact.closeOnDocument||"open"!=g||a.resultsOpened||(a.closeCompact(),a.searchAbort(),a.hideLoader());else if(0==a.resultsOpened||1!=a.o.closeOnDocClick)return;a.dragging||(a.hideLoader(),
a.searchAbort(),a.hideResults())}}};a.documentEventHandlers.push({node:document,event:a.clickTouchend,handler:e});c(document).on(a.clickTouchend,e);a.n("resultsDiv").on("click",".results .item",function(){""!=c(this).attr("id")&&a.updateHref("#"+c(this).attr("id"));let g;null==(g=a.gaEvent)||g.call(a,"result_click",{result_title:c(this).find("a.asp_res_url").text(),result_url:c(this).find("a.asp_res_url").attr("href")})});"isotopic"==a.o.resultstype&&(a.n("resultsDiv").on("swiped-left",function(){a.visiblePagination()&&
a.n("resultsDiv").find("a.asp_next").trigger("click")}),a.n("resultsDiv").on("swiped-right",function(){a.visiblePagination()&&a.n("resultsDiv").find("a.asp_prev").trigger("click")}))},initSettingsSwitchEvents:function(){let a=this;a.n("prosettings").on("click",function(){if(0==a.n("prosettings").data("opened")){let e;null==(e=a.showSettings)||e.call(a)}else{let e;null==(e=a.hideSettings)||e.call(a)}});if(d.isMobile()){if("open"==a.o.mobile.force_sett_state||"none"==a.o.mobile.force_sett_state&&1==
a.o.settingsVisible){let e;null==(e=a.showSettings)||e.call(a,!1)}}else if(1==a.o.settingsVisible){let e;null==(e=a.showSettings)||e.call(a,!1)}},initSettingsEvents:function(){let a=this,e,g=function(){"undefined"===typeof a.originalFormData&&(a.originalFormData=d.formData(c("form",a.n("searchsettings"))));a.n("searchsettings").off("mousedown touchstart mouseover",g)};a.n("searchsettings").on("mousedown touchstart mouseover",g);let h=function(f){if(0==c(f.target).closest(".asp_w").length&&0==a.att("blocking")&&
!a.dragging&&0==c(f.target).closest(".ui-datepicker").length&&0==c(f.target).closest(".noUi-handle").length&&0==c(f.target).closest(".asp_select2").length&&0==c(f.target).closest(".asp_select2-container").length){let k;null==(k=a.hideSettings)||k.call(a)}};a.documentEventHandlers.push({node:document,event:a.clickTouchend,handler:h});c(document).on(a.clickTouchend,h);a.n("searchsettings").on("click",function(){a.settingsChanged=!0});a.n("searchsettings").on(a.clickTouchend,function(f){a.dragging||
a.updateHref();"undefined"==typeof f.target||c(f.target).hasClass("noUi-handle")?"click"==f.type&&f.stopImmediatePropagation():f.stopImmediatePropagation()});c('.asp_option_cat input[type="checkbox"]',a.n("searchsettings")).on("asp_chbx_change",function(){a.settingsCheckboxToggle(c(this).closest(".asp_option_cat"))});c(".asp_option_cat",a.n("searchsettings")).each(function(f){a.settingsCheckboxToggle(c(f),!1)});c("div.asp_option",a.n("searchsettings")).on(a.mouseupTouchend,function(f){f.preventDefault();
f.stopImmediatePropagation();if(a.dragging)return!1;c(this).find('input[type="checkbox"]').prop("checked",!c(this).find('input[type="checkbox"]').prop("checked"));clearTimeout(e);let k=this;e=setTimeout(function(){c(k).find('input[type="checkbox"]').trigger("asp_chbx_change")},50)});c("div.asp_option",a.n("searchsettings")).on("keyup",function(f){f.preventDefault();f=f.keyCode||f.which;13!=f&&32!=f||c(this).trigger("mouseup")});c("fieldset.asp_checkboxes_filter_box",a.n("searchsettings")).each(function(){let f=
!0;c(this).find('.asp_option:not(.asp_option_selectall) input[type="checkbox"]').each(function(){if(1==c(this).prop("checked"))return f=!1});f&&c(this).find('.asp_option_selectall input[type="checkbox"]').prop("checked",!1).removeAttr("data-origvalue")});c("fieldset",a.n("searchsettings")).each(function(){c(this).find(".asp_option:not(.hiddend)").last().addClass("asp-o-last")});c('.asp_option_cat input[type="checkbox"], .asp_option_cff input[type="checkbox"]',a.n("searchsettings")).on("asp_chbx_change",
function(){let f=c(this).data("targetclass");"string"==typeof f&&""!=f&&c("input."+f,a.n("searchsettings")).prop("checked",c(this).prop("checked"))})},monitorTouchMove:function(){let a=this;a.dragging=!1;c("body").on("touchmove",function(){a.dragging=!0}).on("touchstart",function(){a.dragging=!1})},initAutop:function(){if("disabled"==this.o.autop.state)return!1;var a=window.location.href;if(-1<a.indexOf("asp_ls=")||-1<a.indexOf("asp_ls&"))return!1;a=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(a)):"latest"==this.o.autop.state?this.search(a,1):this.search(a,2)},initCompact:function(){let a=this;1==a.o.compact.enabled&&"fixed"!=a.o.compact.position&&(a.o.compact.overlay=0);1==a.o.compact.enabled&&a.n("trythis").css({display:"none"});1==a.o.compact.enabled&&"fixed"==a.o.compact.position&&window.WPD.intervalUntilExecute(function(){let e=
c("body");a.nodes.container=a.n("search").closest(".asp_w_container");e.append(a.n("search").detach());e.append(a.n("trythis").detach());a.n("search").css({top:a.n("search").position().top+"px"})},function(){return"fixed"==a.n("search").css("position")})},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(e,g){if("undefined"===typeof g||"object"===typeof e)g=e;e=c(g).attr("data-itemnum");
const h=a.currentPage,f=a.il.itemsPerPage;e%(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(e,10)<f*h&&parseInt(e,10)>=f*(h-1)}};d.Hooks.applyFilters("asp/init/etc",a)},initInfiniteScroll:function(){let a=this;if(a.o.show_more.infinite&&"polaroid"!=a.o.resultstype){let e,g;g=function(){clearTimeout(e);e=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 h;a.n("resultsDiv").on("nav_switch",function(){clearTimeout(h);h=setTimeout(function(){a.checkAndTriggerInfiniteScroll("isotopic")},800)})}},hooks:function(){let a=this;a.n("s").on("asp_elementor_results",function(e,g){a.o.id==g&&"function"==typeof jetpackLazyImagesModule&&setTimeout(function(){jetpackLazyImagesModule()},300)})},init:function(a,e){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({},a);this.dynamicAtts={};this.nodes={};this.nodes.search=c(e);d.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;
d.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 g;null==(g=this.initLiveLoaderPopState)||g.call(this)}"undefined"!==typeof this.initCompact&&this.initCompact();this.monitorTouchMove();this.initEvents();this.initAutop();this.initEtc();this.hooks();b.firstIteration=!1;this.n("s").trigger("asp_init_search_bar",[this.o.id,this.o.iid],!0,!0);return this},n:function(a){if("undefined"===typeof this.nodes[a])switch(a){case "s":this.nodes[a]=this.nodes.search;break;case "container":this.nodes[a]=this.nodes.search.closest(".asp_w_container");
break;case "searchsettings":this.nodes[a]=c(".asp_ss",this.n("container"));break;case "resultsDiv":this.nodes[a]=c(".asp_r",this.n("container"));break;case "probox":this.nodes[a]=c(".probox",this.nodes.search);break;case "proinput":this.nodes[a]=c(".proinput",this.nodes.search);break;case "text":this.nodes[a]=c(".proinput input.orig",this.nodes.search);break;case "textAutocomplete":this.nodes[a]=c(".proinput input.autocomplete",this.nodes.search);break;case "proloading":this.nodes[a]=c(".proloading",
this.nodes.search);break;case "proclose":this.nodes[a]=c(".proclose",this.nodes.search);break;case "promagnifier":this.nodes[a]=c(".promagnifier",this.nodes.search);break;case "prosettings":this.nodes[a]=c(".prosettings",this.nodes.search);break;case "settingsAppend":this.nodes[a]=c("#wpdreams_asp_settings_"+this.o.id);break;case "resultsAppend":this.nodes[a]=c("#wpdreams_asp_results_"+this.o.id);break;case "trythis":this.nodes[a]=c("#asp-try-"+this.o.rid);break;case "hiddenContainer":this.nodes[a]=
c(".asp_hidden_data",this.n("container"));break;case "aspItemOverlay":this.nodes[a]=c(".asp_item_overlay",this.n("hiddenContainer"));break;case "showmoreContainer":this.nodes[a]=c(".asp_showmore_container",this.n("resultsDiv"));break;case "showmore":this.nodes[a]=c(".showmore",this.n("resultsDiv"));break;case "items":this.nodes[a]=0<c(".item",this.n("resultsDiv")).length?c(".item",this.n("resultsDiv")):c(".photostack-flip",this.n("resultsDiv"));break;case "results":this.nodes[a]=c(".results",this.n("resultsDiv"));
break;case "resdrg":this.nodes[a]=c(".resdrg",this.n("resultsDiv"))}return this.nodes[a]},att:function(a){if("undefined"===typeof this.dynamicAtts[a])switch(a){case "blocking":this.dynamicAtts[a]=this.n("searchsettings").hasClass("asp_sb")}return this.dynamicAtts[a]},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 a;null==(a=this.initSettingsSwitchEvents)||
a.call(this);this.initOtherEvents();this.initTryThisEvents();this.initMagnifierEvents();this.initInputEvents();1==this.o.compact.enabled&&this.initCompactEvents()},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"})},initSettings:function(){if(!this.settingsInitialized){let a;null==(a=this.loadASPFonts)||a.call(this);let e;null==(e=this.initSettingsBox)||e.call(this);let g;null==(g=this.initSettingsEvents)||g.call(this);let h;null==(h=this.initButtonEvents)||h.call(this);let f;null==(f=this.initNoUIEvents)||f.call(this);let k;null==(k=this.initDatePicker)||k.call(this);let l;null==
(l=this.initSelect2)||l.call(this);let n;null==(n=this.initFacetEvents)||n.call(this)}},initSettingsBox:function(){let a=this,e=function(h){let f=a.n("searchsettings").get(0);a.nodes.searchsettings=a.nodes.searchsettings.clone();h.append(a.nodes.searchsettings);c(f).find("*[id]").forEach(function(k){0>k.id.indexOf("__original__")&&(k.id="__original__"+k.id)});a.n("searchsettings").find("*[id]").forEach(function(k){-1<k.id.indexOf("__original__")&&(k.id=k.id.replace("__original__",""))})},g;null==
(g=a.initSettingsAnimations)||g.call(a);1==a.o.compact.enabled&&"fixed"==a.o.compact.position||d.isMobile()&&1==a.o.mobile.force_sett_hover?(a.n("searchsettings").attr("id",a.n("searchsettings").attr("id").replace("probsettings","prosettings")),a.n("searchsettings").removeClass("asp_sb asp_sb_"+a.o.id+" asp_sb_"+a.o.rid).addClass("asp_s asp_s_"+a.o.id+" asp_s_"+a.o.rid),a.dynamicAtts.blocking=!1,e(c("body")),a.n("searchsettings").css({position:"absolute"}),a.dynamicAtts.blocking=!1):0<a.n("settingsAppend").length?
0<a.n("settingsAppend").find(".asp_ss_"+a.o.id).length?(a.nodes.searchsettings=a.nodes.settingsAppend.find(".asp_ss_"+a.o.id),"undefined"!==typeof a.nodes.searchsettings.get(0).referenced?++a.nodes.searchsettings.get(0).referenced:a.nodes.searchsettings.get(0).referenced=1):(0==a.att("blocking")&&(a.n("searchsettings").attr("id",a.n("searchsettings").attr("id").replace("prosettings","probsettings")),a.n("searchsettings").removeClass("asp_s asp_s_"+a.o.id+" asp_s_"+a.o.rid).addClass("asp_sb asp_sb_"+
a.o.id+" asp_sb_"+a.o.rid),a.dynamicAtts.blocking=!0),e(a.nodes.settingsAppend)):0==a.att("blocking")&&e(c("body"));a.n("searchsettings").get(0).id=a.n("searchsettings").get(0).id.replace("__original__","");a.detectAndFixFixedPositioning();a.settingsInitialized=!0},initSettingsAnimations:function(){this.settAnim={showClass:"",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":this.animOptions.settings.dur+"ms"},hideClass:"",hideCSS:{visibility:"hidden",opacity:0,display:"none"},
duration:this.animOptions.settings.dur+"ms"};"fade"==this.animOptions.settings.anim&&(this.settAnim.showClass="asp_an_fadeIn",this.settAnim.hideClass="asp_an_fadeOut");"fadedrop"!=this.animOptions.settings.anim||this.att("blocking")?"fadedrop"==this.animOptions.settings.anim&&(this.settAnim.showClass="asp_an_fadeIn",this.settAnim.hideClass="asp_an_fadeOut"):(this.settAnim.showClass="asp_an_fadeInDrop",this.settAnim.hideClass="asp_an_fadeOutDrop");this.n("searchsettings").css({"-webkit-animation-duration":this.settAnim.duration+
"ms","animation-duration":this.settAnim.duration+"ms"})}})})(WPD.dom);window.ASP="undefined"!==typeof window.ASP?window.ASP:{};
window.ASP.api=function(){let c=function(a,e,g,h){a=ASP.instances.get(a,e);return!1!==a&&a[g].apply(a,[h])},d=function(a,e,g){if(!isNaN(parseFloat(e))&&isFinite(e))return a=ASP.instances.get(a,e),!1!==a&&a[g].apply(a);a=ASP.instances.get(a);return!1!==a&&a.forEach(function(h){h[e].apply(h,[g])})},b=function(a,e){if("exists"==e)return ASP.instances.exist(a);a=ASP.instances.get(a);return!1!==a&&a.forEach(function(g){g[e].apply(g)})};if(4==arguments.length)return c.apply(this,arguments);if(3==arguments.length)return d.apply(this,
arguments);if(2==arguments.length)return b.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"))};
window._ASP_load=function(){let c=WPD.dom;window.ASP.instances={instances:[],get:function(d,b){this.clean();if("undefined"===typeof d||0==d)return this.instances;if("undefined"===typeof b){b=[];for(var a=0;a<this.instances.length;a++)this.instances[a].o.id==d&&b.push(this.instances[a]);return 0<b.length?b:!1}for(a=0;a<this.instances.length;a++)if(this.instances[a].o.id==d&&this.instances[a].o.iid==b)return this.instances[a];return!1},set:function(d){if(this.exist(d.o.id,d.o.iid))return!1;this.instances.push(d);
return!0},exist:function(d,b){this.clean();for(let a=0;a<this.instances.length;a++)if(this.instances[a].o.id==d&&("undefined"===typeof b||this.instances[a].o.iid==b))return!0;return!1},clean:function(){let d=[],b=this;this.instances.forEach(function(a,e){0==c(".asp_m_"+a.o.rid).length&&d.push(e)});d.forEach(function(a){"undefined"!==typeof b.instances[a]&&(b.instances[a].destroy(),b.instances.splice(a,1))})},destroy:function(d,b){let a=this.get(d,b);if(!1!==a)if(Array.isArray(a))a.forEach(function(e){e.destroy()}),
this.instances=[];else{let e=0;this.instances.forEach(function(g,h){g.o.id==d&&g.o.iid==b&&(e=h)});a.destroy();this.instances.splice(e,1)}}};window.ASP.initialized=!1;window.ASP.initializeSearchByID=function(d){let b=ASP.getInstances();if("undefined"!==typeof d&&"object"!=typeof d)if("undefined"!==typeof b[d]){let a=[];a[d]=b[d];b=a}else return!1;b.forEach(function(a,e){c.fn._(".asp_m_"+e).forEach(function(g){if("undefined"!=typeof g.hasAsp)return!0;g.hasAsp=!0;return c(g).ajaxsearchpro(a)})})};window.ASP.getInstances=
function(){window.ASP_INSTANCES="undefined"!==typeof window.ASP_INSTANCES?window.ASP_INSTANCES:[];let d=window.ASP_INSTANCES;c.fn._(".asp_init_data").forEach(function(b){let a=b.dataset.aspId,e;"undefined"!=typeof b.dataset.aspdata&&(e=WPD.Base64.decode(b.dataset.aspdata));if("undefined"===typeof e||""==e)return!0;d[a]=JSON.parse(e)});return d};window.ASP.initialize=function(d){if("undefined"==typeof ASP.version)return!1;if(window.IntersectionObserver)if(ASP.script_async_load||ASP.init_only_in_viewport){d=
document.querySelectorAll(".asp_w_container, .asp_m");if(d.length){let b=new IntersectionObserver(function(a){a.forEach(function(e){e.isIntersecting&&(ASP.initializeSearchByID(e.target.dataset.id),b.unobserve(e.target))})});d.forEach(function(a){b.observe(a)})}ASP.getInstances().forEach(function(b,a){1==b.compact.enabled&&"fixed"==b.compact.position&&ASP.initializeSearchByID(a)})}else ASP.initializeSearchByID(d);else ASP.initializeSearchByID(d);ASP.initializeMutateDetector();ASP.initializeHighlight();
ASP.initializeOtherEvents();ASP.initialized=!0};window.ASP.initializeHighlight=function(){if(this.highlight.enabled){let a=this.highlight.data;var d=""!=a.selector&&0<c(a.selector).length?a.selector:"article";d=0<c(d).length?d:"body";var b=new URLSearchParams(location.search);b=b.get("s")||b.get("asp_highlight");c(d).unhighlight({className:"asp_single_highlighted_"+a.id});null!==b&&""!=b.trim()&&(c(d).highlight(b.trim().split(" "),{element:"span",className:"asp_single_highlighted_"+a.id,wordsOnly:a.whole,
excludeParents:".asp_w, .asp-try"}),d=c(".asp_single_highlighted_"+a.id),a.scroll&&0<d.length&&(d=d.offset().top-120,b=c("#wpadminbar"),0<b.length&&(d-=b.height()),d+=a.scroll_offset,d=0>d?0:d,c("html").animate({scrollTop:d},500)));return!1}};window.ASP.initializeOtherEvents=function(){let d,b=this;c("body").on("click touchend","#menu-item-search, .fa-search, .fa, .fas, .fusion-flyout-menu-toggle, .fusion-main-menu-search-open, #search_button, .mini-search.popup-search, .icon-search, .menu-item-search-dropdown, .mobile-menu-button, .td-icon-search, .tdb-search-icon, .side_menu_button, .search_button, .raven-search-form-toggle, [data-elementor-open-lightbox], .elementor-button-link, .elementor-button, i[class*=-search], a[class*=-search]",
function(){clearTimeout(d);d=setTimeout(function(){b.initializeSearchByID()},300)});if("undefined"!=typeof jQuery)jQuery(document).on("elementor/popup/show",function(){setTimeout(function(){b.initializeSearchByID()},10)})};window.ASP.initializeMutateDetector=function(){let d;"undefined"!=typeof ASP.detect_ajax&&1==ASP.detect_ajax&&(new MutationObserver(function(){clearTimeout(d);d=setTimeout(function(){ASP.initializeSearchByID()},500)})).observe(document.querySelector("body"),{subtree:!0,childList:!0})};
window.ASP.ready=function(){if("complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState)this.initialize();else c(document).on("DOMContentLoaded",this.initialize)};window.ASP.loadScriptStack=function(d){let b;0<d.length&&(b=document.createElement("script"),b.src=d.shift().src,b.onload=function(){0<d.length?window.ASP.loadScriptStack(d):window.ASP.ready()},document.body.appendChild(b))};window.ASP.init=function(){ASP.script_async_load?window.ASP.loadScriptStack(ASP.additional_scripts):
"undefined"!==typeof WPD.ajaxsearchpro&&window.ASP.ready()};window.WPD.intervalUntilExecute(window.ASP.init,function(){return"undefined"!=typeof window.ASP.version&&"undefined"!=c.fn.ajaxsearchpro})};(function(){-1===navigator.userAgent.indexOf("Chrome-Lighthouse")&&("undefined"!=typeof WPD&&"undefined"!=typeof WPD.dom?window._ASP_load():document.addEventListener("wpd-dom-core-loaded",window._ASP_load))})();
(function(c){let d=window.WPD.ajaxsearchpro.helpers;window.WPD.ajaxsearchpro.addons.add(new function(){this.name="Divi Widget Fixes";this.init=function(){d.Hooks.addFilter("asp/init/etc",this.diviBodyCommerceResultsPage,10,this)};this.diviBodyCommerceResultsPage=function(b){b.o.divi.bodycommerce&&b.o.is_results_page&&WPD.intervalUntilExecute(function(a){setTimeout(function(){a("#divi_filter_button").trigger("click")},50)},function(){return"undefined"!==typeof jQuery?jQuery:!1});return b}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;window.WPD.ajaxsearchpro.addons.add(new function(){this.name="Elementor Widget Fixes";this.init=function(){d.Hooks.addFilter("asp/init/etc",this.fixElementorPostPagination,10,this);d.Hooks.addFilter("asp/live_load/selector",this.fixSelector,10,this);d.Hooks.addFilter("asp/live_load/url",this.url,10,this);d.Hooks.addFilter("asp/live_load/start",this.start,10,this);d.Hooks.addFilter("asp/live_load/replacement_node",this.fixElementorLoadMoreResults,
10,this);d.Hooks.addFilter("asp/live_load/finished",this.finished,10,this)};this.fixSelector=function(b){-1<b.indexOf("asp_es_")&&(b+=" .elementor-widget-container");return b};this.url=function(b,a,e,g){0<=b.indexOf("asp_force_reset_pagination=1")&&(b=b.replace(/\?product\-page=[0-9]+&/,"?"));return b};this.start=function(b,a,e,g){c("form",a.n("searchsettings")).serialize()+a.n("text").val().trim()==a.lastSuccesfulSearch&&0<c(g).find(".e-load-more-spinner").length&&c(g).css("opacity",1)};this.finished=
function(b,a,e,g){g=c(g);!1!==e.indexOf("asp_es_")&&"undefined"!=typeof elementorFrontend&&"undefined"!=typeof elementorFrontend.init&&0==g.find(".asp_elementor_nores").length&&(e=g.parent().data("widget_type"),""!=e&&"undefined"!=typeof jQuery&&elementorFrontend.hooks.doAction("frontend/element_ready/"+e,jQuery(g.parent().get(0))),this.fixElementorPostPagination(a,b),a.o.scrollToResults.enabled&&this.scrollToResultsIfNeeded(g),a.n("s").trigger("asp_elementor_results",[a.o.id,a.o.iid,g.parent().get(0)],
!0,!0))};this.scrollToResultsIfNeeded=function(b){b=b.find(".elementor-post, .product").first();b.length&&!b.inViewPort(40)&&b.get(0).scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})};this.fixElementorPostPagination=function(b,a){let e=this,g=c(".asp_es_"+b.o.id);a="undefined"==typeof a?location.href:a;if(0<g.length){e.elementorHideSpinner(g.get(0));var h=a.indexOf("?");if(0<=h){let f=a.substring(h+1);f&&(f=f.replace(/&asp_force_reset_pagination=1/gmi,""),0<g.find(".e-load-more-anchor").length&&
0==g.find(".elementor-pagination a").length?(h=function(k){k.preventDefault();k.stopPropagation();if(!b.searching){k=""==g.data("page")?2:parseInt(g.data("page"))+1;let l=f.split("&page=");g.data("page",k);b.showLoader();e.elementorShowSpinner(g.get(0));b.liveLoad(".asp_es_"+b.o.id,a.split("?")[0]+"?"+l[0]+"&page="+k,!1,!0)}},g.find(".e-load-more-anchor").next(".elementor-button-wrapper").find("a").attr("href",""),g.find(".e-load-more-anchor").next(".elementor-button-wrapper").offForced().on("click",
h),g.find(".asp_e_load_more_anchor").on("asp_e_load_more",h)):(g.find(".elementor-pagination a, .elementor-widget-container .woocommerce-pagination a").each(function(){let k=c(this).attr("href");0>k.indexOf("asp_ls=")&&0>k.indexOf("asp_ls&")?0>k.indexOf("?")?c(this).attr("href",k+"?"+f):c(this).attr("href",k+"&"+f):c(this).attr("href",c(this).attr("href").replace(/&asp_force_reset_pagination=1/gmi,""))}),g.find(".elementor-pagination a, .elementor-widget-container .woocommerce-pagination a").on("click",
function(k){k.preventDefault();k.stopImmediatePropagation();k.stopPropagation();b.showLoader();b.liveLoad(".asp_es_"+b.o.id,c(this).attr("href"),!1,!0)})))}}return b};this.fixElementorLoadMoreResults=function(b,a,e,g){g=c(e).closest("div[data-settings]").data("settings");let h=c(e).find(".asp_e_load_more_anchor");if(null!=g&&""!=g&&(g=JSON.parse(g),"load_more_infinite_scroll"==g.pagination_type&&0==h.length&&(c(".e-load-more-anchor").css("display","none"),c(e).append('<div class="asp_e_load_more_anchor"></div>'),
h=c(e).find(".asp_e_load_more_anchor"),g=function(){h.inViewPort(50)&&(h.trigger("asp_e_load_more"),h.remove())},a.documentEventHandlers.push({node:window,event:"scroll",handler:g}),c(window).on("scroll",g)),0<c(b).find(".e-load-more-spinner").length)){c(e).removeClass("e-load-more-pagination-loading");a=c("form",a.n("searchsettings")).serialize()+a.n("text").val().trim()!=a.lastSuccesfulSearch;g=c(e).find(".e-load-more-anchor").next(".elementor-button-wrapper");let f=c(e).find(".e-load-more-message");
b=c(b).find("article");if(0<b.length&&0<b.parent().length&&0<c(e).find("article").parent().length){b=b.get(0).innerHTML;let k=c(e).data("asp-previous-data");""==k||a?(c(e).find("article").parent().get(0).innerHTML=b,c(e).data("asp-previous-data",b),g.css("display","block"),f.css("display","none")):k==b?(g.css("display","none"),f.css("display","block"),h.remove()):(c(e).find("article").parent().get(0).innerHTML+=b,c(e).data("asp-previous-data",b))}else g.css("display","none"),f.css("display","block"),
h.remove();return null}return b};this.elementorShowSpinner=function(b){c(b).addClass("e-load-more-pagination-loading");c(b).find(".e-load-more-spinner>*").addClass("eicon-animation-spin");c(b).css("opacity",1)};this.elementorHideSpinner=function(b){c(b).removeClass("e-load-more-pagination-loading");c(b).find(".eicon-animation-spin").removeClass("eicon-animation-spin")}})})(WPD.dom);