/******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 993: /***/ (function(module, exports) { !function(e, t) { "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define("DoMini", [], t) : "object" == typeof exports ? exports.DoMini = t() : e.DoMini = t(); }(window, () => (() => { "use strict"; var e = { d: (t2, n2) => { for (var i2 in n2) e.o(n2, i2) && !e.o(t2, i2) && Object.defineProperty(t2, i2, { enumerable: true, get: n2[i2] }); }, o: (e2, t2) => Object.prototype.hasOwnProperty.call(e2, t2) }, t = {}; let n; e.d(t, { default: () => r }), void 0 === window.DoMini ? (n = function(e2, t2) { return void 0 !== arguments[2] ? this.constructor.call(this, e2, t2) : 1 !== arguments.length || "function" != typeof arguments[0] ? new n(e2, t2, true) : void ("complete" === document.readyState || "loaded" === document.readyState || "interactive" === document.readyState ? arguments[0].apply(this, [n]) : window.addEventListener("DOMContentLoaded", () => { arguments[0].apply(this, [n]); })); }, n.prototype = n.fn = { constructor: function(e2, t2) { if (this.length = 0, void 0 !== t2) { if (t2 instanceof n) return t2.find(e2); if (this.isValidNode(t2) || "string" == typeof t2) return n(t2).find(e2); } else if ("string" == typeof e2 && "" !== e2) this.push(...this._(e2)); else { if (e2 instanceof n) return e2; this.isValidNode(e2) && this.push(e2); } return this; }, _: function(e2) { return "<" === e2.charAt(0) ? n._fn.createElementsFromHTML(e2) : [...document.querySelectorAll(e2)]; }, isValidNode: (e2) => e2 instanceof Element || e2 instanceof Document || e2 instanceof Window, push: Array.prototype.push, pop: Array.prototype.pop, sort: Array.prototype.sort, splice: Array.prototype.splice }, n.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator], n._fn = {}, n.version = "0.2.8") : n = window.DoMini; const i = n; i.fn.get = function(e2) { return void 0 === e2 ? Array.from(this) : this[e2]; }, i.fn.extend = function() { for (let e2 = 1; e2 < arguments.length; e2++) for (let t2 in arguments[e2]) arguments[e2].hasOwnProperty(t2) && (arguments[0][t2] = arguments[e2][t2]); return arguments[0]; }, i.fn.forEach = function(e2) { return this.get().forEach(function(t2, n2, i2) { e2.apply(t2, [t2, n2, i2]); }), this; }, i.fn.each = function(e2) { return this.get().forEach(function(t2, n2, i2) { e2.apply(t2, [n2, t2, i2]); }), this; }, i.fn.css = function(e2, t2) { for (const n2 of this) if (1 === arguments.length) { if ("object" != typeof e2) return window.getComputedStyle(n2)[e2]; Object.keys(e2).forEach(function(t3) { n2.style[t3] = e2[t3]; }); } else n2.style[e2] = t2; return this; }, i.fn.hasClass = function(e2) { let t2 = this.get(0); return null != t2 && t2.classList.contains(e2); }, i.fn.addClass = function(e2) { let t2 = e2; return "string" == typeof e2 && (t2 = e2.split(" ")), t2 = t2.filter(function(e3) { return "" !== e3.trim(); }), t2.length > 0 && this.forEach(function(e3) { e3.classList.add.apply(e3.classList, t2); }), this; }, i.fn.removeClass = function(e2) { if (void 0 !== e2) { let t2 = e2; "string" == typeof e2 && (t2 = e2.split(" ")), t2 = t2.filter(function(e3) { return "" !== e3.trim(); }), t2.length > 0 && this.forEach(function(e3) { e3.classList.remove.apply(e3.classList, t2); }); } else this.forEach(function(e3) { e3.classList.length > 0 && e3.classList.remove.apply(e3.classList, e3.classList); }); return this; }, i.fn.isVisible = function() { let e2, t2 = this.get(0), n2 = true; for (; null !== t2; ) { if (e2 = window.getComputedStyle(t2), "none" === e2.display || "hidden" === e2.visibility || 0 === parseInt(e2.opacity)) { n2 = false; break; } t2 = t2.parentElement; } return n2; }, i.fn.val = function(e2) { let t2; if (1 === arguments.length) { for (const t3 of this) if ("select-multiple" === t3.type) { e2 = "string" == typeof e2 ? e2.split(",") : e2; for (let n2, i2 = 0, o2 = t3.options.length; i2 < o2; i2++) n2 = t3.options[i2], n2.selected = -1 !== e2.indexOf(n2.value); } else t3.value = e2; t2 = this; } else { let e3 = this.get(0); null != e3 && (t2 = "select-multiple" === e3.type ? Array.prototype.map.call(e3.selectedOptions, function(e4) { return e4.value; }) : e3.value); } return t2; }, i.fn.attr = function(e2, t2) { let n2; for (const i2 of this) if (2 === arguments.length) i2.setAttribute(e2, t2), n2 = this; else { if ("object" != typeof e2) { n2 = i2.getAttribute(e2); break; } Object.keys(e2).forEach(function(t3) { i2.setAttribute(t3, e2[t3]); }); } return n2; }, i.fn.removeAttr = function(e2) { for (const t2 of this) t2.removeAttribute(e2); return this; }, i.fn.prop = function(e2, t2) { let n2; for (const i2 of this) { if (2 !== arguments.length) { n2 = void 0 !== i2[e2] ? i2[e2] : null; break; } i2[e2] = t2; } return 2 === arguments.length ? this : n2; }, i.fn.data = function(e2, t2) { const n2 = e2.replace(/-([a-z])/g, function(e3) { return e3[1].toUpperCase(); }); if (2 === arguments.length) { for (const e3 of this) null != e3 && (e3.dataset[n2] = t2); return this; } { let e3 = this.get(0); return null != e3 && void 0 !== e3.dataset[n2] ? e3.dataset[n2] : ""; } }, i.fn.html = function(e2) { if (1 === arguments.length) { for (const t2 of this) t2.innerHTML = e2; return this; } { let e3 = this.get(0); return null == e3 ? "" : e3.innerHTML; } }, i.fn.text = function(e2) { if (1 === arguments.length) { for (const t2 of this) t2.textContent = e2; return this; } { let e3 = this.get(0); return null == e3 ? "" : e3.textContent; } }, i.fn.position = function() { let e2 = this.get(0); return null != e2 ? { top: e2.offsetTop, left: e2.offsetLeft } : { top: 0, left: 0 }; }, i.fn.offset = function() { let e2 = this.get(0); return null != e2 ? i._fn.hasFixedParent(e2) ? e2.getBoundingClientRect() : i._fn.absolutePosition(e2) : { top: 0, left: 0 }; }, i.fn.outerWidth = function(e2) { e2 = e2 || false; let t2 = this.get(0); return null != t2 ? e2 ? parseInt(t2.offsetWidth) + parseInt(this.css("marginLeft")) + parseInt(this.css("marginRight")) : parseInt(t2.offsetWidth) : 0; }, i.fn.outerHeight = function(e2) { e2 = e2 || false; let t2 = this.get(0); return null != t2 ? e2 ? parseInt(t2.offsetHeight) + parseInt(this.css("marginTop")) + parseInt(this.css("marginBottom")) : parseInt(t2.offsetHeight) : 0; }, i.fn.noPaddingHeight = function(e2) { return e2 = e2 || false, this.length > 0 ? e2 ? parseInt(this.css("height")) + parseInt(this.css("marginTop")) + parseInt(this.css("marginBottom")) : parseInt(this.css("height")) : 0; }, i.fn.noPaddingWidth = function(e2) { return e2 = e2 || false, this.length > 0 ? e2 ? parseInt(this.css("width")) + parseInt(this.css("marginLeft")) + parseInt(this.css("marginRight")) : parseInt(this.css("width")) : 0; }, i.fn.innerWidth = function() { let e2 = this.get(0); if (null != e2) { let t2 = window.getComputedStyle(e2); return this.outerWidth() - parseFloat(t2.borderLeftWidth) - parseFloat(t2.borderRightWidth); } return 0; }, i.fn.innerHeight = function() { let e2 = this.get(0); if (null != e2) { let t2 = window.getComputedStyle(e2); return this.outerHeight() - parseFloat(t2.borderTopWidth) - parseFloat(t2.borderBottomtWidth); } return 0; }, i.fn.width = function() { return this.outerWidth(); }, i.fn.height = function() { return this.outerHeight(); }, i.fn.on = function() { let e2 = arguments, t2 = function(e3, t3) { let n3; if ("mouseenter" === t3.type || "mouseleave" === t3.type || "mouseover" === t3.type) { let o2 = document.elementFromPoint(t3.clientX, t3.clientY); if (!o2.matches(e3[1])) for (; (o2 = o2.parentElement) && !o2.matches(e3[1]); ) ; null != o2 && (n3 = i(o2)); } else n3 = i(t3.target).closest(e3[1]); if (null != n3 && n3.closest(this).length > 0) { let i2 = []; if (i2.push(t3), void 0 !== e3[4]) for (let t4 = 4; t4 < e3.length; t4++) i2.push(e3[t4]); e3[2].apply(n3.get(0), i2); } }, n2 = e2[0].split(" "); for (let o2 = 0; o2 < n2.length; o2++) { let r2 = n2[o2]; if ("string" == typeof e2[1]) this.forEach(function(n3) { if (!i._fn.hasEventListener(n3, r2, e2[2])) { let i2 = t2.bind(n3, e2); n3.addEventListener(r2, i2, e2[3]), n3._domini_events = void 0 === n3._domini_events ? [] : n3._domini_events, n3._domini_events.push({ type: r2, selector: e2[1], func: i2, trigger: e2[2], args: e2[3] }); } }); else for (let t3 = 0; t3 < n2.length; t3++) { let o3 = n2[t3]; this.forEach(function(t4) { i._fn.hasEventListener(t4, o3, e2[1]) || (t4.addEventListener(o3, e2[1], e2[2]), t4._domini_events = void 0 === t4._domini_events ? [] : t4._domini_events, t4._domini_events.push({ type: o3, func: e2[1], trigger: e2[1], args: e2[2] })); }); } } return this; }, i.fn.off = function(e2, t2) { return this.forEach(function(n2) { if (void 0 !== n2._domini_events && n2._domini_events.length > 0) if (void 0 === e2) { let e3; for (; e3 = n2._domini_events.pop(); ) n2.removeEventListener(e3.type, e3.func, e3.args); n2._domini_events = []; } else e2.split(" ").forEach(function(e3) { let i2, o2 = []; for (; i2 = n2._domini_events.pop(); ) i2.type !== e3 || void 0 !== t2 && i2.trigger !== t2 ? o2.push(i2) : n2.removeEventListener(e3, i2.func, i2.args); n2._domini_events = o2; }); }), this; }, i.fn.offForced = function() { let e2 = this; return this.forEach(function(t2, n2) { let i2 = t2.cloneNode(true); t2.parentNode.replaceChild(i2, t2), e2[n2] = i2; }), this; }, i.fn.trigger = function(e2, t2, n2, o2) { return n2 = n2 || false, o2 = o2 || false, this.forEach(function(r2) { let s = false; if (o2 && "undefined" != typeof jQuery && void 0 !== jQuery._data && void 0 !== jQuery._data(r2, "events") && void 0 !== jQuery._data(r2, "events")[e2] && (jQuery(r2).trigger(e2, t2), s = true), !s && n2) { let n3 = new Event(e2); n3.detail = t2, r2.dispatchEvent(n3); } if (void 0 !== r2._domini_events) r2._domini_events.forEach(function(n3) { if (n3.type === e2) { let i2 = new Event(e2); n3.trigger.apply(r2, [i2].concat(t2)); } }); else { let n3 = false, o3 = r2; for (; o3 = o3.parentElement, null != o3 && (void 0 !== o3._domini_events && o3._domini_events.forEach(function(s2) { if (void 0 !== s2.selector) { let l = i(o3).find(s2.selector); if (l.length > 0 && l.get().indexOf(r2) >= 0 && s2.type === e2) { let i2 = new Event(e2); s2.trigger.apply(r2, [i2].concat(t2)), n3 = true; } } }), !n3); ) ; } }), this; }, i.fn.clear = function() { for (const e2 of this) delete e2._domini_events; return this; }, i.fn.clone = function() { let e2 = []; for (const t2 of this) e2.push(t2.cloneNode(true)); return i().add(e2); }, i.fn.detach = function(e2) { let t2 = this, n2 = []; void 0 !== e2 && (t2 = this.find(e2)); for (const e3 of t2) null != e3.parentElement && n2.push(e3.parentElement.removeChild(e3)); return i().add(n2); }, i.fn.remove = function(e2) { return this.detach(e2).off().clear(); }, i.fn.prepend = function(e2) { if ((e2 = i._fn.elementArrayFromAny(e2)).length > 0) for (const t2 of this) for (const n2 of e2) t2.insertBefore(n2, t2.children[0]); return this; }, i.fn.append = function(e2) { if ((e2 = i._fn.elementArrayFromAny(e2)).length > 0) for (const t2 of this) for (const n2 of e2) t2.appendChild(n2); return this; }, i.fn.is = function(e2) { let t2 = false; for (const n2 of this) if (n2.matches(e2)) { t2 = true; break; } return t2; }, i.fn.parent = function(e2) { let t2 = []; for (const n2 of this) { let i2 = n2.parentElement; "string" == typeof e2 && (null == i2 || i2.matches(e2) || (i2 = null)), t2.push(i2); } return i().add(t2); }, i.fn.copy = function(e2, t2) { let n2, i2, o2; if ("object" != typeof e2 || null === e2) return n2 = e2, n2; for (i2 in n2 = new e2.constructor(), e2) e2.hasOwnProperty(i2) && (o2 = typeof e2[i2], t2 && "object" === o2 && null !== e2[i2] ? n2[i2] = this.copy(e2[i2]) : n2[i2] = e2[i2]); return n2; }, i.fn.first = function() { return i(this[0]); }, i.fn.last = function() { return i(this[this.length - 1]); }, i.fn.prev = function(e2) { let t2 = []; for (const n2 of this) { let i2; if ("string" == typeof e2) for (i2 = n2.previousElementSibling; null != i2; ) { if (i2.matches(e2)) { t2.push(i2); break; } i2 = i2.previousElementSibling; } else t2.push(n2.previousElementSibling); } return i(null).add(t2); }, i.fn.next = function(e2) { let t2 = []; for (const n2 of this) { let i2; if ("string" == typeof e2) for (i2 = n2.nextElementSibling; null != i2; ) { if (i2.matches(e2)) { t2.includes(i2) || t2.push(i2); break; } i2 = i2.nextElementSibling; } else t2.push(n2.nextElementSibling); } return i(null).add(t2); }, i.fn.closest = function(e2) { let t2 = []; for (let n2 of this) if ("string" == typeof e2 && "" !== e2) { for (; !n2.matches(e2) && (n2 = n2.parentElement); ) ; t2.includes(n2) || t2.push(n2); } else { if ((e2 = e2 instanceof i ? e2.get(0) : e2) instanceof Element) for (; n2 !== e2 && (n2 = n2.parentElement); ) ; else n2 = null; t2.includes(n2) || t2.push(n2); } return i().add(t2); }, i.fn.add = function(e2) { let t2 = i._fn.elementArrayFromAny(e2); for (const e3 of t2) Array.from(this).includes(e3) || this.push(e3); return this; }, i.fn.find = function(e2) { const t2 = new i(); if ("string" == typeof e2) { let n2 = []; this.get().forEach(function(t3) { const i2 = t3.querySelectorAll?.(e2) ?? []; n2 = n2.concat(Array.from(i2)); }), n2.length > 0 && t2.add(n2); } return t2; }, i._fn.bodyTransform = function() { let e2 = 0, t2 = 0; if ("undefined" != typeof WebKitCSSMatrix) { let n2 = window.getComputedStyle(document.body); if (void 0 !== n2.transform) { let i2 = new WebKitCSSMatrix(n2.transform); "undefined" !== i2.m41 && (e2 = i2.m41), "undefined" !== i2.m42 && (t2 = i2.m42); } } return { x: e2, y: t2 }; }, i._fn.bodyTransformY = function() { return this.bodyTransform().y; }, i._fn.bodyTransformX = function() { return this.bodyTransform().x; }, i._fn.hasFixedParent = function(e2) { if (0 != i._fn.bodyTransformY()) return false; do { if ("fixed" == window.getComputedStyle(e2).position) return true; } while (e2 = e2.parentElement); return false; }, i._fn.hasEventListener = function(e2, t2, n2) { if (void 0 === e2._domini_events) return false; for (let i2 = 0; i2 < e2._domini_events.length; i2++) if (e2._domini_events[i2].trigger === n2 && e2._domini_events[i2].type === t2) return true; return false; }, i._fn.allDescendants = function(e2) { let t2 = [], n2 = this; return Array.isArray(e2) || (e2 = [e2]), e2.forEach(function(e3) { for (let i2 = 0; i2 < e3.childNodes.length; i2++) { let o2 = e3.childNodes[i2]; t2.push(o2), t2 = t2.concat(n2.allDescendants(o2)); } }), t2; }, i._fn.createElementsFromHTML = function(e2) { let t2 = document.createElement("template"); return t2.innerHTML = e2.replace(/(\r\n|\n|\r)/gm, ""), [...t2.content.childNodes]; }, i._fn.elementArrayFromAny = function(e2) { if ("string" == typeof e2) e2 = i(e2).get(); else if (e2 instanceof i) e2 = e2.get(); else if (e2 instanceof Element) e2 = [e2]; else { if (!(e2 instanceof Array)) return []; e2 = e2.filter((e3) => e3 instanceof Element); } return e2; }, i._fn.ElementArrayFromAny = i._fn.elementArrayFromAny, i._fn.absolutePosition = function(e2) { if (!e2.getClientRects().length) return { top: 0, left: 0 }; let t2 = e2.getBoundingClientRect(), n2 = e2.ownerDocument.defaultView; return { top: t2.top + n2.pageYOffset, left: t2.left + n2.pageXOffset }; }, i._fn.plugin = function(e2, t2) { i.fn[e2] = function(n2) { return void 0 !== n2 && t2[n2] ? t2[n2].apply(this, Array.prototype.slice.call(arguments, 1)) : this.forEach(function(i2) { i2["domini_" + e2] = Object.create(t2).init(n2, i2); }); }; }, document.dispatchEvent(new Event("domini-dom-core-loaded")); const o = i; i.fn.animate = function(e2, t2, n2) { t2 = t2 || 200, n2 = n2 || "easeInOutQuad"; for (const o2 of this) { let r2, s, l, f, a, c = 0, u = 60, h = {}, d = {}; if (l = this.prop("_domini_animations"), l = null == l ? [] : l, false === e2) l.forEach(function(e3) { clearInterval(e3); }); else { let p = function() { c++, c > r2 ? clearInterval(f) : (s = a(c / r2), Object.keys(d).forEach(function(e3) { e3.indexOf("scroll") > -1 ? o2[e3] = h[e3] + d[e3] * s : o2.style[e3] = h[e3] + d[e3] * s + "px"; })); }; a = i.fn.animate.easing[n2] ?? i.fn.animate.easing.easeInOutQuad, Object.keys(e2).forEach(function(t3) { t3.indexOf("scroll") > -1 ? (h[t3] = o2[t3], d[t3] = e2[t3] - h[t3]) : (h[t3] = parseInt(window.getComputedStyle(o2)[t3]), d[t3] = e2[t3] - h[t3]); }), r2 = t2 / 1e3 * u, f = setInterval(p, 1e3 / u), l.push(f), this.prop("_domini_animations", l); } } return this; }, i.fn.animate.easing = { linear: function(e2) { return e2; }, easeInOutQuad: function(e2) { return e2 < 0.5 ? 2 * e2 * e2 : 1 - Math.pow(-2 * e2 + 2, 2) / 2; }, easeOutQuad: function(e2) { return 1 - (1 - e2) * (1 - e2); } }, i.fn.unhighlight = function(e2) { let t2 = { className: "highlight", element: "span" }; return i.fn.extend(t2, e2), this.find(t2.element + "." + t2.className).forEach(function() { let e3 = this.parentNode; e3.replaceChild(this.firstChild, this), e3.normalize(); }); }, i.fn.highlight = function(e2, t2) { this.defaults = { className: "highlight", element: "span", caseSensitive: false, wordsOnly: false, excludeParents: ".excludeFromHighlight" }; const n2 = i, o2 = { ...this.defaults, ...t2 }; if (e2.constructor === String && (e2 = [e2]), (e2 = e2.filter(function(e3) { return "" !== e3; })).forEach(function(e3, t3, n3) { n3[t3] = e3.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g, ""); }), 0 === e2.length) return this; let r2 = o2.caseSensitive ? "" : "i", s = "(" + e2.join("|") + ")"; o2.wordsOnly && (s = "(?:,|^|\\s)" + s + "(?:,|$|\\s)"); let l = new RegExp(s, r2); function f(e3, t3, i2, o3, r3) { if (r3 = "" === r3 ? n2.fn.highlight.defaults : r3, 3 === e3.nodeType) { if (!n2(e3.parentNode).is(r3)) { let n3 = e3.data.normalize("NFD").replace(/[\u0300-\u036f]/g, "").match(t3); if (n3) { let t4, r4 = document.createElement(i2 || "span"); r4.className = o3 || "highlight", t4 = /\.|,|\s/.test(n3[0].charAt(0)) ? n3.index + 1 : n3.index; let s2 = e3.splitText(t4); s2.splitText(n3[1].length); let l2 = s2.cloneNode(true); return r4.appendChild(l2), s2.parentNode.replaceChild(r4, s2), 1; } } } else if (1 === e3.nodeType && e3.childNodes && !/(script|style)/i.test(e3.tagName) && !n2(e3).closest(r3).length > 0 && (e3.tagName !== i2.toUpperCase() || e3.className !== o3)) for (let n3 = 0; n3 < e3.childNodes.length; n3++) n3 += f(e3.childNodes[n3], t3, i2, o3, r3); return 0; } return this.forEach(function(e3) { f(e3, l, o2.element, o2.className, o2.excludeParents); }); }, i.fn.serialize = function() { let e2 = this.get(0); if (!e2 || "FORM" !== e2.nodeName) return ""; let t2, n2, i2 = []; for (t2 = e2.elements.length - 1; t2 >= 0; t2 -= 1) if ("" !== e2.elements[t2].name) switch (e2.elements[t2].nodeName) { case "INPUT": switch (e2.elements[t2].type) { case "checkbox": case "radio": e2.elements[t2].checked && i2.push(e2.elements[t2].name + "=" + encodeURIComponent(e2.elements[t2].value)); break; case "file": break; default: i2.push(e2.elements[t2].name + "=" + encodeURIComponent(e2.elements[t2].value)); } break; case "TEXTAREA": i2.push(e2.elements[t2].name + "=" + encodeURIComponent(e2.elements[t2].value)); break; case "SELECT": switch (e2.elements[t2].type) { case "select-one": i2.push(e2.elements[t2].name + "=" + encodeURIComponent(e2.elements[t2].value)); break; case "select-multiple": for (n2 = e2.elements[t2].options.length - 1; n2 >= 0; n2 -= 1) e2.elements[t2].options[n2].selected && i2.push(e2.elements[t2].name + "=" + encodeURIComponent(e2.elements[t2].options[n2].value)); } break; case "BUTTON": switch (e2.elements[t2].type) { case "reset": case "submit": case "button": i2.push(e2.elements[t2].name + "=" + encodeURIComponent(e2.elements[t2].value)); } } return i2.join("&"); }, i.fn.serializeObject = function(e2, t2) { let n2, o2 = []; for (n2 in e2) if (e2.hasOwnProperty(n2)) { let r2 = t2 ? t2 + "[" + n2 + "]" : n2, s = e2[n2]; o2.push(null !== s && "object" == typeof s ? i.fn.serializeObject(s, r2) : encodeURIComponent(r2) + "=" + encodeURIComponent(s)); } return o2.join("&"); }, i.fn.inViewPort = function(e2, t2) { let n2, i2, o2 = this.get(0); if (null == o2) return false; e2 = void 0 === e2 ? 0 : e2, t2 = void 0 === t2 ? window : "string" == typeof t2 ? document.querySelector(t2) : t2; let r2 = o2.getBoundingClientRect(), s = r2.top, l = r2.bottom, f = r2.left, a = r2.right, c = false; if (null == t2 && (t2 = window), t2 === window) n2 = window.innerWidth || 0, i2 = window.innerHeight || 0; else { n2 = t2.clientWidth, i2 = t2.clientHeight; let e3 = t2.getBoundingClientRect(); s -= e3.top, l -= e3.top, f -= e3.left, a -= e3.left; } return e2 = ~~Math.round(parseFloat(e2)), a <= 0 || f >= n2 || (c = e2 > 0 ? s >= e2 && l < i2 - e2 : (l > 0 && s <= i2 - e2) | (s <= 0 && l > e2)), c; }, i.fn.ajax = function(e2) { if ("cors" === (e2 = this.extend({ url: "", method: "GET", cors: "cors", data: {}, success: null, fail: null, accept: "text/html", contentType: "application/x-www-form-urlencoded; charset=UTF-8" }, e2)).cors) { let t2 = new XMLHttpRequest(); return t2.onreadystatechange = function() { null != e2.success && 4 === this.readyState && this.status >= 200 && this.status < 400 && e2.success(this.responseText), null != e2.fail && 4 === this.readyState && this.status >= 400 && e2.fail(this); }, t2.open(e2.method.toUpperCase(), e2.url, true), t2.setRequestHeader("Content-type", e2.contentType), t2.setRequestHeader("Accept", e2.accept), t2.send(this.serializeObject(e2.data)), t2; } { let t2 = "ajax_cb_" + "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e3) { let t3 = 16 * Math.random() | 0; return ("x" === e3 ? t3 : 3 & t3 | 8).toString(16); }).replaceAll("-", ""); i.fn[t2] = function() { e2.success.apply(this, arguments), delete i.fn[e2.data.fn]; }, e2.data.callback = "DoMini.fn." + t2, e2.data.fn = t2; let n2 = document.createElement("script"); n2.type = "text/javascript", n2.src = e2.url + "?" + this.serializeObject(e2.data), n2.onload = function() { this.remove(); }, document.body.appendChild(n2); } }; const r = o; return t.default; })()); /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ !function() { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function() { return module['default']; } : /******/ function() { return module; }; /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ !function() { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = function(exports, definition) { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ !function() { /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } /******/ }(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry needs to be wrapped in an IIFE because it needs to be in strict mode. !function() { "use strict"; // EXTERNAL MODULE: ./node_modules/domini/dist/domini.js var domini = __webpack_require__(993); var domini_default = /*#__PURE__*/__webpack_require__.n(domini); ;// ./src/client/external/helpers/base64.js const Base64 = { // private property _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", // public method for encoding encode: function(input) { return btoa(this._utf8_encode(input)); }, // public method for decoding decode: function(input) { return this._utf8_decode( atob(input.replace(/[^A-Za-z0-9\+\/\=]/g, "")) ); }, // private method for UTF-8 encoding _utf8_encode: function(string) { string = string.replace(/\r\n/g, "\n"); let utftext = ""; for (let n = 0; n < string.length; n++) { let c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if (c > 127 && c < 2048) { utftext += String.fromCharCode(c >> 6 | 192); utftext += String.fromCharCode(c & 63 | 128); } else { utftext += String.fromCharCode(c >> 12 | 224); utftext += String.fromCharCode(c >> 6 & 63 | 128); utftext += String.fromCharCode(c & 63 | 128); } } return utftext; }, // private method for UTF-8 decoding _utf8_decode: function(utftext) { let string = "", i = 0, c = 0, c2, c3; while (i < utftext.length) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++; } else if (c > 191 && c < 224) { c2 = utftext.charCodeAt(i + 1); string += String.fromCharCode((c & 31) << 6 | c2 & 63); i += 2; } else { c2 = utftext.charCodeAt(i + 1); c3 = utftext.charCodeAt(i + 2); string += String.fromCharCode((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63); i += 3; } } return string; } }; /* harmony default export */ var base64 = (Base64); ;// ./src/client/external/helpers/hooks-filters.js const Hooks = { filters: {}, /** * Adds a callback function to a specific programmatically triggered tag (hook) * * @param tag - the hook name * @param callback - the callback function variable name * @param priority - (optional) default=10 * @param scope - (optional) function scope. When a function is executed within an object scope, the object variable should be passed. */ addFilter: function(tag, callback, priority, scope) { priority = typeof priority === "undefined" ? 10 : priority; scope = typeof scope === "undefined" ? null : scope; Hooks.filters[tag] = Hooks.filters[tag] || []; Hooks.filters[tag].push({ priority, scope, callback }); }, /** * Removes a callback function from a hook * * @param tag - the hook name * @param callback - the callback function variable */ removeFilter: function(tag, callback) { if (typeof Hooks.filters[tag] != "undefined") { if (typeof callback == "undefined") { Hooks.filters[tag] = []; } else { Hooks.filters[tag].forEach(function(filter, i) { if (filter.callback === callback) { Hooks.filters[tag].splice(i, 1); } }); } } }, applyFilters: function(tag) { let filters = [], args = Array.prototype.slice.call(arguments), value = arguments[1]; if (typeof Hooks.filters[tag] !== "undefined" && Hooks.filters[tag].length > 0) { Hooks.filters[tag].forEach(function(hook) { filters[hook.priority] = filters[hook.priority] || []; filters[hook.priority].push({ scope: hook.scope, callback: hook.callback }); }); args.splice(0, 2); filters.forEach(function(hooks) { hooks.forEach(function(obj) { value = obj.callback.apply(obj.scope, [value].concat(args)); }); }); } return value; } }; /* harmony default export */ var hooks_filters = (Hooks); ;// ./src/client/external/helpers/interval-until-execute.js function interval_until_execute_intervalUntilExecute(f, criteria, interval = 100, maxTries = 50) { let t, tries = 0, res = typeof criteria === "function" ? criteria() : criteria; if (res === false) { t = setInterval(function() { res = typeof criteria === "function" ? criteria() : criteria; tries++; if (tries > maxTries) { clearInterval(t); return false; } if (res !== false) { clearInterval(t); return f(res); } }, interval); } else { return f(res); } } ; ;// ./src/client/external/helpers/swiped.js /** * swiped-events.js - v@version@ * Pure JavaScript swipe events * https://github.com/john-doherty/swiped-events * @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element * @author John Doherty * @license MIT */ (function(window2, document2) { "use strict"; if (typeof window2.CustomEvent !== "function") { window2.CustomEvent = function(event, params) { params = params || { bubbles: false, cancelable: false, detail: void 0 }; var evt = document2.createEvent("CustomEvent"); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; }; window2.CustomEvent.prototype = window2.Event.prototype; } document2.addEventListener("touchstart", handleTouchStart, false); document2.addEventListener("touchmove", handleTouchMove, false); document2.addEventListener("touchend", handleTouchEnd, false); var xDown = null; var yDown = null; var xDiff = null; var yDiff = null; var timeDown = null; var startEl = null; function handleTouchEnd(e) { if (startEl !== e.target) return; var swipeThreshold = parseInt(getNearestAttribute(startEl, "data-swipe-threshold", "20"), 10); var swipeTimeout = parseInt(getNearestAttribute(startEl, "data-swipe-timeout", "500"), 10); var timeDiff = Date.now() - timeDown; var eventType = ""; var changedTouches = e.changedTouches || e.touches || []; if (Math.abs(xDiff) > Math.abs(yDiff)) { if (Math.abs(xDiff) > swipeThreshold && timeDiff < swipeTimeout) { if (xDiff > 0) { eventType = "swiped-left"; } else { eventType = "swiped-right"; } } } else if (Math.abs(yDiff) > swipeThreshold && timeDiff < swipeTimeout) { if (yDiff > 0) { eventType = "swiped-up"; } else { eventType = "swiped-down"; } } if (eventType !== "") { var eventData = { dir: eventType.replace(/swiped-/, ""), xStart: parseInt(xDown, 10), xEnd: parseInt((changedTouches[0] || {}).clientX || -1, 10), yStart: parseInt(yDown, 10), yEnd: parseInt((changedTouches[0] || {}).clientY || -1, 10) }; startEl.dispatchEvent(new CustomEvent("swiped", { bubbles: true, cancelable: true, detail: eventData })); startEl.dispatchEvent(new CustomEvent(eventType, { bubbles: true, cancelable: true, detail: eventData })); } xDown = null; yDown = null; timeDown = null; } function handleTouchStart(e) { if (e.target.getAttribute("data-swipe-ignore") === "true") return; startEl = e.target; timeDown = Date.now(); xDown = e.touches[0].clientX; yDown = e.touches[0].clientY; xDiff = 0; yDiff = 0; } function handleTouchMove(e) { if (!xDown || !yDown) return; var xUp = e.touches[0].clientX; var yUp = e.touches[0].clientY; xDiff = xDown - xUp; yDiff = yDown - yUp; } function getNearestAttribute(el, attributeName, defaultValue) { while (el && el !== document2.documentElement) { var attributeValue = el.getAttribute(attributeName); if (attributeValue) { return attributeValue; } el = el.parentNode; } return defaultValue; } })(window, document); ;// ./src/client/bundle/optimized/asp-prereq.js window.WPD = window.WPD || {}; window.WPD.dom = domini; window.WPD.domini = window.WPD.dom; window.WPD.DoMini = window.WPD.dom; window.DoMini = window.WPD.dom; window.WPD.Base64 = window.WPD.Base64 || base64; window.WPD.Hooks = window.WPD.Hooks || hooks_filters; window.WPD.intervalUntilExecute = window.WPD.intervalUntilExecute || interval_until_execute_intervalUntilExecute; ;// ./src/client/plugin/core/base.js const base_AjaxSearchPro = new function() { this.helpers = {}; this.plugin = {}; this.addons = { addons: [], add: function(addon) { if (this.addons.indexOf(addon) === -1) { let k = this.addons.push(addon); this.addons[k - 1].init(); } }, remove: function(name) { this.addons.filter(function(addon) { if (addon.name === name) { if (typeof addon.destroy != "undefined") { addon.destroy(); } return false; } else { return true; } }); } }; }(); /* harmony default export */ var base = (base_AjaxSearchPro); ;// ./src/client/plugin/core/etc/helpers.js "use strict"; base.helpers.Hooks = window.WPD.Hooks; base.helpers.deviceType = function() { let w = window.innerWidth; if (w <= 640) { return "phone"; } else if (w <= 1024) { return "tablet"; } else { return "desktop"; } }; base.helpers.detectIOS = function() { if (typeof window.navigator != "undefined" && typeof window.navigator.userAgent != "undefined") return window.navigator.userAgent.match(/(iPod|iPhone|iPad)/) != null; return false; }; base.helpers.isMobile = function() { try { document.createEvent("TouchEvent"); return true; } catch (e) { return false; } }; base.helpers.isTouchDevice = function() { return "ontouchstart" in window; }; base.helpers.isSafari = function() { return /^((?!chrome|android).)*safari/i.test(navigator.userAgent); }; base.helpers.escapeHtml = function(unsafe) { return unsafe.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'"); }; base.helpers.whichjQuery = function(plugin) { let jq = false; if (typeof window.$ != "undefined") { if (typeof plugin === "undefined") { jq = window.$; } else { if (typeof window.$.fn[plugin] != "undefined") { jq = window.$; } } } if (jq === false && typeof window.jQuery != "undefined") { jq = window.jQuery; if (typeof plugin === "undefined") { jq = window.jQuery; } else { if (typeof window.jQuery.fn[plugin] != "undefined") { jq = window.jQuery; } } } return jq; }; base.helpers.formData = function(form, data) { let $this = this, els = form.find("input,textarea,select,button").get(); if (arguments.length === 1) { data = {}; els.forEach(function(el) { if (el.name && !el.disabled && (el.checked || /select|textarea/i.test(el.nodeName) || /text/i.test(el.type) || domini(el).hasClass("hasDatepicker") || domini(el).hasClass("asp_slider_hidden"))) { if (data[el.name] === void 0) { data[el.name] = []; } if (domini(el).hasClass("hasDatepicker")) { data[el.name].push(domini(el).parent().find(".asp_datepicker_hidden").val()); } else { data[el.name].push(domini(el).val()); } } }); return JSON.stringify(data); } else { if (typeof data != "object") { data = JSON.parse(data); } els.forEach(function(el) { if (el.name) { if (data[el.name]) { let names = data[el.name], _this = domini(el); if (Object.prototype.toString.call(names) !== "[object Array]") { names = [names]; } if (el.type === "checkbox" || el.type === "radio") { let val = _this.val(), found = false; for (let i = 0; i < names.length; i++) { if (names[i] === val) { found = true; break; } } _this.prop("checked", found); } else { _this.val(names[0]); if (domini(el).hasClass("asp_gochosen") || domini(el).hasClass("asp_goselect2")) { WPD.intervalUntilExecute(function(_$) { _$(el).trigger("change.asp_select2"); }, function() { return $this.whichjQuery("asp_select2"); }, 50, 3); } else if (domini(el).hasClass("hasDatepicker")) { WPD.intervalUntilExecute(function(_$) { let value = names[0], format = _$(_this.get(0)).datepicker("option", "dateFormat"); _$(_this.get(0)).datepicker("option", "dateFormat", "yy-mm-dd"); _$(_this.get(0)).datepicker("setDate", value); _$(_this.get(0)).datepicker("option", "dateFormat", format); _$(_this.get(0)).trigger("selectnochange"); }, function() { return $this.whichjQuery("datepicker"); }, 50, 3); } } } else { if (el.type === "checkbox" || el.type === "radio") { domini(el).prop("checked", false); } } } }); return form; } }; base.helpers.submitToUrl = function(action, method, input, target) { let form; form = domini('
'); form.attr("action", action); form.attr("method", method); domini("body").append(form); if (typeof input !== "undefined" && input !== null) { Object.keys(input).forEach(function(name) { let value = input[name]; let $input = domini(''); $input.attr("name", name); $input.attr("value", value); form.append($input); }); } if (typeof target != "undefined" && target === "new") { form.attr("target", "_blank"); } form.get(0).submit(); }; base.helpers.openInNewTab = function(url) { Object.assign(document.createElement("a"), { target: "_blank", href: url }).click(); }; base.helpers.isScrolledToBottom = function(el, tolerance) { return el.scrollHeight - el.scrollTop - domini(el).outerHeight() < tolerance; }; base.helpers.getWidthFromCSSValue = function(width, containerWidth) { let min = 100, ret; width = width + ""; if (width.indexOf("px") > -1) { ret = parseInt(width, 10); } else if (width.indexOf("%") > -1) { if (typeof containerWidth != "undefined" && containerWidth != null) { ret = Math.floor(parseInt(width, 10) / 100 * containerWidth); } else { ret = parseInt(width, 10); } } else { ret = parseInt(width, 10); } return ret < 100 ? min : ret; }; base.helpers.nicePhrase = function(s) { return encodeURIComponent(s).replace(/\%20/g, "+"); }; base.helpers.inputToFloat = function(input) { return input.replace(/^[.]/g, "").replace(/[^0-9.-]/g, "").replace(/^[-]/g, "x").replace(/[-]/g, "").replace(/[x]/g, "-").replace(/(\..*?)\..*/g, "$1"); }; base.helpers.addThousandSeparators = function(n, s) { if (s !== "") { s = s || ","; return String(n).replace(/(?:^|[^.\d])\d+/g, function(n2) { return n2.replace(/\B(?=(?:\d{3})+\b)/g, s); }); } else { return n; } }; base.helpers.decodeHTMLEntities = function(str) { let element = document.createElement("div"); if (str && typeof str === "string") { str = str.replace(/]*>([\S\s]*?)<\/script>/gmi, ""); str = str.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi, ""); element.innerHTML = str; str = element.textContent; element.textContent = ""; } return str; }; base.helpers.isScrolledToRight = function(el) { return el.scrollWidth - domini(el).outerWidth() === el.scrollLeft; }; base.helpers.isScrolledToLeft = function(el) { return el.scrollLeft === 0; }; /* harmony default export */ var helpers = ((/* unused pure expression or super */ null && (AjaxSearchPro))); ;// ./src/client/plugin/core/actions/animation.js "use strict"; base.plugin.addAnimation = function() { let $this = this, i = 0, j = 1, delay = 25, checkViewport = true; if ($this.call_num > 0 || $this._no_animations) { $this.n("results").find(".item, .asp_group_header").removeClass("opacityZero").removeClass("asp_an_" + $this.animOptions.items); return false; } $this.n("results").find(".item, .asp_group_header").forEach(function() { let x = this; if (j === 1) { checkViewport = domini(x).inViewPort(0); } if (j > 1 && checkViewport && !domini(x).inViewPort(0) || j > 80) { domini(x).removeClass("opacityZero"); return true; } if ($this.o.resultstype === "isotopic" && j > $this.il.itemsPerPage) { domini(x).removeClass("opacityZero"); return; } setTimeout(function() { domini(x).addClass("asp_an_" + $this.animOptions.items); domini(x).removeClass("opacityZero"); }, i + delay); i = i + 45; j++; }); }; base.plugin.removeAnimation = function() { let $this = this; this.n("items").forEach(function() { domini(this).removeClass("asp_an_" + $this.animOptions.items); }); }; /* harmony default export */ var animation = ((/* unused pure expression or super */ null && (AjaxSearchPro))); ;// ./src/client/plugin/core/actions/filters.js "use strict"; let filters_helpers = base.helpers; base.plugin.setFilterStateInput = function(timeout) { let $this = this; if (typeof timeout == "undefined") { timeout = 65; } let process = function() { if (JSON.stringify($this.originalFormData) !== JSON.stringify(filters_helpers.formData(domini("form", $this.n("searchsettings"))))) { $this.n("searchsettings").find("input[name=filters_initial]").val(0); } else { $this.n("searchsettings").find("input[name=filters_initial]").val(1); } }; if (timeout === 0) { process(); } else { setTimeout(function() { process(); }, timeout); } }; base.plugin.resetSearchFilters = function() { let $this = this; filters_helpers.formData(domini("form", $this.n("searchsettings")), $this.originalFormData); $this.resetNoUISliderFilters(); if (typeof $this.select2jQuery != "undefined") { $this.select2jQuery($this.n("searchsettings").get(0)).find(".asp_gochosen,.asp_goselect2").trigger("change.asp_select2"); } $this.n("text").val(""); $this.n("textAutocomplete").val(""); $this.n("proloading").css("display", "none"); $this.hideLoader(); $this.searchAbort(); $this.setFilterStateInput(0); $this.n("searchsettings").trigger("set_option_checked"); }; base.plugin.resetNoUISliderFilters = function() { if (this.noUiSliders.length > 0) { this.noUiSliders.forEach(function(slider) { if (typeof slider.noUiSlider != "undefined") { let vals = []; domini(slider).parent().find(".asp_slider_hidden").forEach(function(el) { vals.push(domini(el).val()); }); if (vals.length > 0) { slider.noUiSlider.set(vals); } } }); } }; /* harmony default export */ var filters = ((/* unused pure expression or super */ null && (AjaxSearchPro))); ;// ./src/client/plugin/core/actions/loader.js "use strict"; base.plugin.showMoreResLoader = function() { let $this = this; $this.n("resultsDiv").addClass("asp_more_res_loading"); }; base.plugin.showLoader = function(recall) { let $this = this; recall = typeof recall !== "undefined" ? recall : false; if ($this.o.loaderLocation === "none") return; if (!$this.n("search").hasClass("hiddend") && $this.o.loaderLocation !== "results") { $this.n("proloading").css({ display: "block" }); } if (recall !== false) { return false; } if ($this.n("search").hasClass("hiddend") && $this.o.loaderLocation !== "search" || !$this.n("search").hasClass("hiddend") && ($this.o.loaderLocation === "both" || $this.o.loaderLocation === "results")) { if (!$this.usingLiveLoader()) { if ($this.n("resultsDiv").find(".asp_results_top").length > 0) $this.n("resultsDiv").find(".asp_results_top").css("display", "none"); $this.showResultsBox(); domini(".asp_res_loader", $this.n("resultsDiv")).removeClass("hiddend"); $this.n("results").css("display", "none"); $this.n("showmoreContainer").css("display", "none"); if (typeof $this.hidePagination !== "undefined") { $this.hidePagination(); } } } }; base.plugin.hideLoader = function() { let $this = this; $this.n("proloading").css({ display: "none" }); domini(".asp_res_loader", $this.n("resultsDiv")).addClass("hiddend"); $this.n("results").css("display", ""); $this.n("resultsDiv").removeClass("asp_more_res_loading"); }; /* harmony default export */ var loader = ((/* unused pure expression or super */ null && (AjaxSearchPro))); ;// ./src/client/plugin/core/actions/other.js "use strict"; base.plugin.loadASPFonts = function() { if (ASP.font_url !== false) { let font = new FontFace( "asppsicons2", "url(" + ASP.font_url + ")", { style: "normal", weight: "normal", display: "swap" } ); font.load().then(function(loaded_face) { document.fonts.add(loaded_face); }).catch(function(er) { }); ASP.font_url = false; } }; base.plugin.updateHref = function(anchor) { anchor = anchor || window.location.hash; if (this.o.trigger.update_href && !this.usingLiveLoader()) { if (!window.location.origin) { window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : ""); } let url = this.getStateURL() + (this.resultsOpened ? "&asp_s=" : "&asp_ls=") + this.n("text").val() + anchor; history.replaceState("", "", url.replace(location.origin, "")); } }; base.plugin.stat_addKeyword = function(id, keyword) { let data = { action: "ajaxsearchpro_addkeyword", id, keyword }; domini.fn.ajax({ "url": ASP.ajaxurl, "method": "POST", "data": data, "success": function(response) { } }); }; base.plugin.fixClonedSelf = function() { let $this = this, old_instance_id = String($this.o.iid), old_real_id = String($this.o.rid); while (!ASP.instances.set($this)) { ++$this.o.iid; if ($this.o.iid > 50) { break; } } if (old_instance_id !== $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_" + old_real_id).addClass("asp_m_" + $this.o.rid).data("instance", $this.o.iid); $this.n("container").removeClass("asp_w_container_" + old_real_id).addClass("asp_w_container_" + $this.o.rid).data("instance", $this.o.iid); $this.n("searchsettings").get(0).id = $this.n("searchsettings").get(0).id.replace("settings" + old_real_id, "settings" + $this.o.rid); if ($this.n("searchsettings").hasClass("asp_s_" + old_real_id)) { $this.n("searchsettings").removeClass("asp_s_" + old_real_id).addClass("asp_s_" + $this.o.rid).data("instance", $this.o.iid); } else { $this.n("searchsettings").removeClass("asp_sb_" + old_real_id).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" + old_real_id, "prores" + $this.o.rid); $this.n("resultsDiv").removeClass("asp_r_" + old_real_id).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_" + old_real_id, "asp_init_id_" + $this.o.rid); $this.n("prosettings").data("opened", 0); } }; base.plugin.destroy = function() { let $this = this; Object.keys($this.nodes).forEach(function(k) { $this.nodes[k].off?.(); }); if (typeof $this.n("searchsettings").get(0).referenced !== "undefined") { --$this.n("searchsettings").get(0).referenced; if ($this.n("searchsettings").get(0).referenced < 0) { $this.n("searchsettings").remove(); } } else { $this.n("searchsettings").remove(); } if (typeof $this.n("resultsDiv").get(0).referenced !== "undefined") { --$this.n("resultsDiv").get(0).referenced; if ($this.n("resultsDiv").get(0).referenced < 0) { $this.n("resultsDiv").remove?.(); } } else { $this.n("resultsDiv").remove?.(); } $this.n("trythis").remove?.(); $this.n("search").remove?.(); $this.n("container").remove?.(); $this.documentEventHandlers.forEach(function(h) { domini(h.node).off(h.event, h.handler); }); }; /* harmony default export */ var other = ((/* unused pure expression or super */ null && (AjaxSearchPro))); ;// ./src/client/plugin/core/actions/redirect.js "use strict"; let redirect_helpers = base.helpers; base.plugin.isRedirectToFirstResult = function() { let $this = this; return (domini(".asp_res_url", $this.n("resultsDiv")).length > 0 || domini(".asp_es_" + $this.o.id + " a").length > 0 || $this.o.resPage.useAjax && domini($this.o.resPage.selector + "a").length > 0) && ($this.o.redirectOnClick && $this.ktype === "click" && $this.o.trigger.click === "first_result" || $this.o.redirectOnEnter && ($this.ktype === "input" || $this.ktype === "keyup") && $this.keycode === 13 && $this.o.trigger.return === "first_result" || $this.ktype === "button" && $this.o.sb.redirect_action === "first_result"); }; base.plugin.doRedirectToFirstResult = function() { let $this = this, _loc, url; if ($this.ktype === "click") { _loc = $this.o.trigger.click_location; } else if ($this.ktype === "button") { _loc = $this.o.sb.redirect_location; } else { _loc = $this.o.trigger.return_location; } if (domini(".asp_res_url", $this.n("resultsDiv")).length > 0) { url = domini(domini(".asp_res_url", $this.n("resultsDiv")).get(0)).attr("href"); } else if (domini(".asp_es_" + $this.o.id + " a").length > 0) { url = domini(domini(".asp_es_" + $this.o.id + " a").get(0)).attr("href"); } else if ($this.o.resPage.useAjax && domini($this.o.resPage.selector + "a").length > 0) { url = domini(domini($this.o.resPage.selector + "a").get(0)).attr("href"); } if (url !== "") { if (_loc === "same") { location.href = url; } else { redirect_helpers.openInNewTab(url); } $this.hideLoader(); $this.hideResults(); } return false; }; base.plugin.doRedirectToResults = function(ktype) { let $this = this, _loc; if (typeof $this.reportSettingsValidity != "undefined" && !$this.reportSettingsValidity()) { $this.showNextInvalidFacetMessage?.(); return false; } if (ktype === "click") { _loc = $this.o.trigger.click_location; } else if (ktype === "button") { _loc = $this.o.sb.redirect_location; } else { _loc = $this.o.trigger.return_location; } let url = $this.getRedirectURL(ktype); if ($this.o.overridewpdefault) { if ($this.o.resPage.useAjax) { $this.hideResults(); $this.liveLoad($this.o.resPage.selector, url); $this.showLoader(); if ($this.att("blocking") === false) { $this.hideSettings?.(); } return false; } if ($this.o.override_method === "post") { redirect_helpers.submitToUrl(url, "post", { asp_active: 1, p_asid: $this.o.id, p_asp_data: domini("form", $this.n("searchsettings")).serialize() }, _loc); } else { if (_loc === "same") { location.href = url; } else { redirect_helpers.openInNewTab(url); } } } else { redirect_helpers.submitToUrl(url, "post", { np_asid: $this.o.id, np_asp_data: domini("form", $this.n("searchsettings")).serialize() }, _loc); } $this.n("proloading").css("display", "none"); $this.hideLoader(); if ($this.att("blocking") === false) $this.hideSettings?.(); $this.hideResults(); $this.searchAbort(); }; base.plugin.getRedirectURL = function(ktype) { let $this = this, url, source, final, base_url; ktype = typeof ktype !== "undefined" ? ktype : "enter"; if (ktype === "click") { source = $this.o.trigger.click; } else if (ktype === "button") { source = $this.o.sb.redirect_action; } else { source = $this.o.trigger.return; } if (source === "results_page") { url = "?s=" + redirect_helpers.nicePhrase($this.n("text").val()); } else if (source === "woo_results_page") { url = "?post_type=product&s=" + redirect_helpers.nicePhrase($this.n("text").val()); } else { if (ktype === "button") { base_url = source === "elementor_page" ? $this.o.sb.elementor_url : $this.o.sb.redirect_url; base_url = redirect_helpers.decodeHTMLEntities(base_url); url = $this.parseCustomRedirectURL(base_url, $this.n("text").val()); } else { base_url = source === "elementor_page" ? $this.o.trigger.elementor_url : $this.o.trigger.redirect_url; base_url = redirect_helpers.decodeHTMLEntities(base_url); url = $this.parseCustomRedirectURL(base_url, $this.n("text").val()); } } if ($this.o.homeurl.indexOf("?") > 1 && url.indexOf("?") === 0) { url = url.replace("?", "&"); } if ($this.o.overridewpdefault && $this.o.override_method !== "post") { let start = "&"; if (($this.o.homeurl.indexOf("?") === -1 || source === "elementor_page") && url.indexOf("?") === -1) { start = "?"; } let addUrl = url + start + "asp_active=1&p_asid=" + $this.o.id + "&p_asp_data=1&" + domini("form", $this.n("searchsettings")).serialize(); if (source === "elementor_page") { final = addUrl; } else { final = $this.o.homeurl + addUrl; } } else { if (source === "elementor_page") { final = url; } else { final = $this.o.homeurl + url; } } final = final.replace("https://", "https:///"); final = final.replace("http://", "http:///"); final = final.replace(/\/\//g, "/"); return redirect_helpers.Hooks.applyFilters("asp_redirect_url", final, $this.o.id, $this.o.iid); }; base.plugin.parseCustomRedirectURL = function(url, phrase) { let $this = this, u = redirect_helpers.decodeHTMLEntities(url).replace(/{phrase}/g, redirect_helpers.nicePhrase(phrase)), items = u.match(/{(.*?)}/g); if (items !== null) { items.forEach(function(v) { v = v.replace(/[{}]/g, ""); let node = domini('input[type=radio][name*="aspf[' + v + '_"]:checked', $this.n("searchsettings")); if (node.length === 0) node = domini('input[type=text][name*="aspf[' + v + '_"]', $this.n("searchsettings")); if (node.length === 0) node = domini('input[type=hidden][name*="aspf[' + v + '_"]', $this.n("searchsettings")); if (node.length === 0) node = domini('select[name*="aspf[' + v + '_"]:not([multiple])', $this.n("searchsettings")); if (node.length === 0) node = domini('input[type=radio][name*="termset[' + v + '"]:checked', $this.n("searchsettings")); if (node.length === 0) node = domini('input[type=text][name*="termset[' + v + '"]', $this.n("searchsettings")); if (node.length === 0) node = domini('input[type=hidden][name*="termset[' + v + '"]', $this.n("searchsettings")); if (node.length === 0) node = domini('select[name*="termset[' + v + '"]:not([multiple])', $this.n("searchsettings")); if (node.length === 0) return true; let val = node.val(); val = "" + val; u = u.replace("{" + v + "}", val); }); } return u; }; /* harmony default export */ var redirect = ((/* unused pure expression or super */ null && (AjaxSearchPro))); ;// ./src/client/plugin/core/actions/results.js "use strict"; let results_helpers = base.helpers; base.plugin.showResults = function() { let $this = this; results_helpers.Hooks.applyFilters("asp/results/show/start", $this); $this.initResults(); if ($this.o.resultstype === "horizontal") { $this.createHorizontalScroll(); } else { if ($this.o.resultstype === "vertical") { $this.createVerticalScroll(); } } switch ($this.o.resultstype) { case "horizontal": $this.showHorizontalResults(); break; case "vertical": $this.showVerticalResults(); break; case "polaroid": $this.showPolaroidResults(); break; case "isotopic": $this.showIsotopicResults(); break; default: $this.showHorizontalResults(); break; } $this.showAnimatedImages(); $this.hideLoader(); $this.n("proclose").css({ display: "block" }); if (results_helpers.isMobile() && $this.o.mobile.hide_keyboard && !$this.resultsOpened) document.activeElement.blur(); if ($this.o.settingsHideOnRes && $this.att("blocking") === false) $this.hideSettings?.(); $this.eh.resulsDivHoverMouseEnter = $this.eh.resulsDivHoverMouseEnter || function() { domini(".item", $this.n("resultsDiv")).removeClass("hovered"); domini(this).addClass("hovered"); }; $this.eh.resulsDivHoverMouseLeave = $this.eh.resulsDivHoverMouseLeave || function() { domini(".item", $this.n("resultsDiv")).removeClass("hovered"); }; $this.n("resultsDiv").find(".item").on("mouseenter", $this.eh.resulsDivHoverMouseEnter); $this.n("resultsDiv").find(".item").on("mouseleave", $this.eh.resulsDivHoverMouseLeave); $this.fixSettingsAccessibility(); $this.resultsOpened = true; results_helpers.Hooks.addFilter("asp/results/show/end", $this); }; base.plugin.hideResults = function(blur) { let $this = this; blur = typeof blur == "undefined" ? true : blur; $this.initResults(); if (!$this.resultsOpened) return false; $this.n("resultsDiv").removeClass($this.resAnim.showClass).addClass($this.resAnim.hideClass); setTimeout(function() { $this.n("resultsDiv").css($this.resAnim.hideCSS); }, $this.resAnim.duration); $this.n("proclose").css({ display: "none" }); if (results_helpers.isMobile() && blur) document.activeElement.blur(); $this.resultsOpened = false; if (typeof $this.ptstack != "undefined") delete $this.ptstack; $this.hideArrowBox?.(); $this.n("s").trigger("asp_results_hide", [$this.o.id, $this.o.iid], true, true); }; base.plugin.updateResults = function(html) { let $this = this; if (html.replace(/^\s*[\r\n]/gm, "") === "" || domini(html).hasClass("asp_nores") || domini(html).find(".asp_nores").length > 0) { $this.n("showmoreContainer").css("display", "none"); domini("span", $this.n("showmore")).html(""); } else { if ($this.o.resultstype === "isotopic" && $this.call_num > 0 && $this.isotopic != null && typeof $this.isotopic.appended != "undefined" && $this.n("items").length > 0) { let $items = domini(html), $last = $this.n("items").last(), last = parseInt($this.n("items").last().attr("data-itemnum")); $items.get().forEach(function(el) { domini(el).attr("data-itemnum", ++last).css({ "width": $last.css("width"), "height": $last.css("height") }); }); $this.n("resdrg").append($items); $this.isotopic.appended($items.get()); $this.nodes.items = domini(".item", $this.n("resultsDiv")).length > 0 ? domini(".item", $this.n("resultsDiv")) : domini(".photostack-flip", $this.n("resultsDiv")); } else { if ($this.call_num > 0 && $this.o.resultstype === "vertical") { $this.n("resdrg").html($this.n("resdrg").html() + '
' + html); } else { $this.n("resdrg").html($this.n("resdrg").html() + html); } } } }; base.plugin.showResultsBox = function() { let $this = this; $this.initResults(); $this.n("s").trigger("asp_results_show", [$this.o.id, $this.o.iid], true, true); $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(true); }; base.plugin.keywordHighlight = function() { const $this = this; if (!$this.o.highlight) { return; } const phrase = $this.n("text").val().replace(/["']/g, ""); if (phrase === "" || phrase.length < $this.o.trigger.minWordLength) { return; } const words = phrase.trim().split(" ").filter((s) => s.length >= $this.o.trigger.minWordLength); $this.n("resultsDiv").find("figcaption, div.item").highlight([phrase.trim()], { element: "span", className: "highlighted", wordsOnly: $this.o.highlightWholewords }); if (words.length > 0) { $this.n("resultsDiv").find("figcaption, div.item").highlight(words, { element: "span", className: "highlighted", wordsOnly: $this.o.highlightWholewords }); } }; base.plugin.addHighlightString = function($items) { let $this = this, phrase = $this.n("text").val().replace(/["']/g, ""); $items = typeof $items == "undefined" ? $this.n("items").find("a.asp_res_url") : $items; if ($this.o.singleHighlight && phrase !== "" && $items.length > 0) { $items.forEach(function() { try { const url = new URL(domini(this).attr("href")); url.searchParams.set("asp_highlight", phrase); url.searchParams.set("p_asid", $this.o.id); domini(this).attr("href", url.href); } catch (e) { } }); } }; base.plugin.scrollToResults = function() { let $this = this, tolerance = Math.floor(window.innerHeight * 0.1), stop; if (!$this.resultsOpened || $this.call_num > 0 || !$this.o.scrollToResults.enabled || $this.n("search").closest(".asp_preview_data").length > 0 || $this.o.compact.enabled || $this.n("resultsDiv").inViewPort(tolerance)) return; if ($this.o.resultsposition === "hover") { stop = $this.n("probox").offset().top - 20; } else { stop = $this.n("resultsDiv").offset().top - 20; } stop = stop + $this.o.scrollToResults.offset; let $adminbar = domini("#wpadminbar"); if ($adminbar.length > 0) stop -= $adminbar.height(); stop = stop < 0 ? 0 : stop; window.scrollTo({ top: stop, behavior: "smooth" }); }; base.plugin.scrollToResult = function(id) { let $el = domini(id); if ($el.length && !$el.inViewPort(40)) { $el.get(0).scrollIntoView({ behavior: "smooth", block: "center", inline: "nearest" }); } }; base.plugin.showAnimatedImages = function() { let $this = this; $this.n("items").forEach(function() { let $image = domini(this).find(".asp_image[data-src]"), src = $image.data("src"); if (typeof src != "undefined" && src != null && src !== "" && src.indexOf(".gif") > -1) { if ($image.find("canvas").length === 0) { $image.prepend(domini('
').get(0)); let c = domini(this).find("canvas").get(0), $cc = domini(this).find(".asp_item_canvas"), ctx = c.getContext("2d"), img = new Image(); img.crossOrigin = "anonymous"; img.onload = function() { domini(c).attr({ "width": img.width, "height": img.height }); ctx.drawImage(img, 0, 0, img.width, img.height); $cc.css({ "background-image": "url(" + c.toDataURL() + ")" }); }; img.src = src; } } }); }; base.plugin.updateNoResultsHeader = function() { let $this = this, $new_nores = $this.n("resdrg").find(".asp_nores"), $old_nores; if ($new_nores.length > 0) { $new_nores = $new_nores.detach(); } $old_nores = $this.n("resultsDiv").find(".asp_nores"); if ($old_nores.length > 0) { $old_nores.remove(); } if ($new_nores.length > 0) { $this.n("resultsDiv").prepend($new_nores); $this.n("resultsDiv").find(".asp_keyword").on("click", function() { $this.n("text").val(results_helpers.decodeHTMLEntities(domini(this).text())); $this.n("textAutocomplete").val(""); if (!$this.o.redirectOnClick || !$this.o.redirectOnEnter || $this.o.trigger.type) { $this.search(); } }); } }; base.plugin.updateInfoHeader = function(totalCount) { let $this = this, content = "", $rt = $this.n("resultsDiv").find(".asp_results_top"), phrase = $this.n("text").val().trim(); if ($rt.length > 0) { if ($this.n("items").length <= 0 || $this.n("resultsDiv").find(".asp_nores").length > 0) { $rt.css("display", "none"); } else { if (typeof $this.updateInfoHeader.resInfoBoxTxt == "undefined") { $this.updateInfoHeader.resInfoBoxTxt = $this.n("resultsDiv").find(".asp_results_top .asp_rt_phrase").length > 0 ? $this.n("resultsDiv").find(".asp_results_top .asp_rt_phrase").html() : ""; $this.updateInfoHeader.resInfoBoxTxtNoPhrase = $this.n("resultsDiv").find(".asp_results_top .asp_rt_nophrase").length > 0 ? $this.n("resultsDiv").find(".asp_results_top .asp_rt_nophrase").html() : ""; } if (phrase !== "" && $this.updateInfoHeader.resInfoBoxTxt !== "") { content = $this.updateInfoHeader.resInfoBoxTxt; } else if (phrase === "" && $this.updateInfoHeader.resInfoBoxTxtNoPhrase !== "") { content = $this.updateInfoHeader.resInfoBoxTxtNoPhrase; } if (content === void 0) { return; } if (content !== "") { content = content.replaceAll("{phrase}", results_helpers.escapeHtml($this.n("text").val())); content = content.replaceAll("{results_count}", $this.n("items").length); content = content.replaceAll("{results_count_total}", totalCount); $rt.html(content); $rt.css("display", "block"); } else { $rt.css("display", "none"); } } } }; ;// ./src/client/plugin/core/actions/scroll.js "use strict"; let scroll_helpers = base.helpers; base.plugin.createResultsScroll = function(type) { let $this = this, t, $resScroll = $this.n("results"); type = typeof type == "undefined" ? "vertical" : type; $resScroll.on("scroll", function() { if ($this.o.show_more.infinite) { clearTimeout(t); t = setTimeout(function() { $this.checkAndTriggerInfiniteScroll(type); }, 60); } }); }; base.plugin.createVerticalScroll = function() { this.createResultsScroll("vertical"); }; base.plugin.createHorizontalScroll = function() { this.createResultsScroll("horizontal"); }; base.plugin.checkAndTriggerInfiniteScroll = function(caller) { let $this = this, $r = domini(".item", $this.n("resultsDiv")); caller = typeof caller == "undefined" ? "window" : caller; if ($this.n("showmore").length === 0 || $this.n("showmoreContainer").css("display") === "none") { return false; } if (caller === "window" || caller === "horizontal") { if ($this.o.resultstype === "isotopic" && domini("nav.asp_navigation", $this.n("resultsDiv")).css("display") !== "none") { return false; } let onViewPort = $r.last().inViewPort(0, $this.n("resultsDiv").get(0)), onScreen = $r.last().inViewPort(0); if (!$this.searching && $r.length > 0 && onViewPort && onScreen) { $this.n("showmore").find("a.asp_showmore").trigger("click"); } } else if (caller === "vertical") { let $scrollable = $this.n("results"); if (scroll_helpers.isScrolledToBottom($scrollable.get(0), 20)) { $this.n("showmore").find("a.asp_showmore").trigger("click"); } } else if (caller === "isotopic") { if (!$this.searching && $r.length > 0 && $this.n("resultsDiv").find("nav.asp_navigation ul li").last().hasClass("asp_active")) { $this.n("showmore").find("a.asp_showmore").trigger("click"); } } }; ;// ./src/client/plugin/core/actions/search.js "use strict"; let search_helpers = base.helpers; base.plugin.isDuplicateSearchTriggered = function() { let $this = this; for (let i = 0; i < 25; i++) { let id = $this.o.id + "_" + i; if (id !== $this.o.rid) { if (window.ASP.instances.get($this.o.id, i) !== false) { return window.ASP.instances.get($this.o.id, i).searching; } } } return false; }; base.plugin.searchAbort = function() { let $this = this; if ($this.post != null) { $this.post.abort(); $this.isAutoP = false; } }; base.plugin.searchWithCheck = function(timeout) { let $this = this; if (typeof timeout == "undefined") timeout = 50; if ($this.n("text").val().length < $this.o.charcount) return; $this.searchAbort(); clearTimeout($this.timeouts.searchWithCheck); $this.timeouts.searchWithCheck = setTimeout(function() { $this.search(); }, timeout); }; base.plugin.search = function(count, order, recall, apiCall, supressInvalidMsg) { let $this = this, abort = false; if ($this.isDuplicateSearchTriggered()) return false; recall = typeof recall == "undefined" ? false : recall; apiCall = typeof apiCall == "undefined" ? false : apiCall; supressInvalidMsg = typeof supressInvalidMsg == "undefined" ? false : supressInvalidMsg; let data = { action: "ajaxsearchpro_search", aspp: $this.n("text").val(), asid: $this.o.id, asp_inst_id: $this.o.rid, options: domini("form", $this.n("searchsettings")).serialize() }; data = search_helpers.Hooks.applyFilters("asp_search_data", data, $this.o.id, $this.o.iid); $this.hideArrowBox?.(); if (typeof $this.reportSettingsValidity != "undefined" && !$this.isAutoP && !$this.reportSettingsValidity()) { if (!supressInvalidMsg) { $this.showNextInvalidFacetMessage?.(); $this.scrollToNextInvalidFacetMessage?.(); } abort = true; } if ($this.isAutoP) { data.autop = 1; } if (!recall && !apiCall && JSON.stringify(data) === JSON.stringify($this.lastSearchData)) { if (!$this.resultsOpened && !$this.usingLiveLoader()) { $this.showResults(); } if ($this.isRedirectToFirstResult()) { $this.doRedirectToFirstResult(); return false; } abort = true; } if (abort) { $this.hideLoader(); $this.searchAbort(); return false; } $this.n("s").trigger("asp_search_start", [$this.o.id, $this.o.iid, $this.n("text").val()], true, true); $this.searching = true; $this.n("proclose").css({ display: "none" }); $this.showLoader(recall); if (!$this.att("blocking") && !$this.o.trigger.facet) $this.hideSettings?.(); if (recall) { $this.call_num++; data.asp_call_num = $this.call_num; if ($this.autopStartedTheSearch) { data.options += "&" + domini.fn.serializeObject($this.autopData); --data.asp_call_num; } } else { $this.call_num = 0; $this.autopStartedTheSearch = !!data.autop; } let $form = domini('form[name="asp_data"]'); if ($form.length > 0) { data.asp_preview_options = $form.serialize(); } if (typeof count != "undefined" && count !== false) { data.options += "&force_count=" + parseInt(count); } if (typeof order != "undefined" && order !== false) { data.options += "&force_order=" + parseInt(order); } $this.gaEvent?.("search_start"); if (domini(".asp_es_" + $this.o.id).length > 0) { $this.liveLoad(".asp_es_" + $this.o.id, $this.getCurrentLiveURL(), $this.o.trigger.update_href); } else if ($this.o.resPage.useAjax) { $this.liveLoad($this.o.resPage.selector, $this.getRedirectURL()); } else if ($this.o.wooShop.useAjax) { $this.liveLoad($this.o.wooShop.selector, $this.getLiveURLbyBaseLocation($this.o.wooShop.url)); } else if ($this.o.taxArchive.useAjax) { $this.liveLoad($this.o.taxArchive.selector, $this.getLiveURLbyBaseLocation($this.o.taxArchive.url)); } else if ($this.o.cptArchive.useAjax) { $this.liveLoad($this.o.cptArchive.selector, $this.getLiveURLbyBaseLocation($this.o.cptArchive.url)); } else { $this.post = domini.fn.ajax({ "url": window.ASP.ajaxurl, "method": "POST", "data": data, "success": function(response) { $this.searching = false; response = response.replace(/^\s*[\r\n]/gm, ""); let html_response = response.match(/___ASPSTART_HTML___(.*[\s\S]*)___ASPEND_HTML___/), data_response = response.match(/___ASPSTART_DATA___(.*[\s\S]*)___ASPEND_DATA___/); if (html_response == null || typeof html_response != "object" || typeof html_response[1] == "undefined") { $this.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'); return false; } else { html_response = html_response[1]; html_response = search_helpers.Hooks.applyFilters("asp_search_html", html_response, $this.o.id, $this.o.iid); } data_response = JSON.parse(data_response[1]); $this.n("s").trigger("asp_search_end", [$this.o.id, $this.o.iid, $this.n("text").val(), data_response], true, true); if ($this.autopStartedTheSearch) { if (typeof data.autop != "undefined") { $this.autopData["not_in"] = {}; $this.autopData["not_in_count"] = 0; if (typeof data_response.results != "undefined") { let res = []; if (typeof data_response.results.groups != "undefined") { Object.keys(data_response.results.groups).forEach(function(k) { if (typeof data_response.results.groups[k].items != "undefined") { let group = data_response.results.groups[k].items; if (Array.isArray(group)) { group.forEach(function(result) { res.push(result); }); } } }); } else { res = Array.isArray(data_response.results) ? data_response.results : res; } res.forEach(function(r) { if (typeof $this.autopData["not_in"][r["content_type"]] == "undefined") { $this.autopData["not_in"][r["content_type"]] = []; } $this.autopData["not_in"][r["content_type"]].push(r["id"]); ++$this.autopData["not_in_count"]; }); } } else { data_response.full_results_count += $this.autopData["not_in_count"]; } } if (!recall) { $this.initResults(); $this.n("resdrg").html(""); $this.n("resdrg").html(html_response); $this.results_num = data_response.results_count; if ($this.o.statistics) $this.stat_addKeyword($this.o.id, $this.n("text").val()); } else { $this.updateResults(html_response); $this.results_num += data_response.results_count; } $this.updateNoResultsHeader(); $this.nodes.items = domini(".item", $this.n("resultsDiv")).length > 0 ? domini(".item", $this.n("resultsDiv")) : domini(".photostack-flip", $this.n("resultsDiv")); $this.addHighlightString(); $this.gaEvent?.("search_end", { "results_count": $this.n("items").length }); if ($this.isRedirectToFirstResult()) { $this.doRedirectToFirstResult(); return false; } $this.hideLoader(); $this.showResults(); if (window.location.hash !== "" && window.location.hash.indexOf("#asp-res-") > -1 && domini(window.location.hash).length > 0) { $this.scrollToResult(window.location.hash); } else { $this.scrollToResults(); } $this.lastSuccesfulSearch = domini("form", $this.n("searchsettings")).serialize() + $this.n("text").val().trim(); $this.lastSearchData = data; $this.updateInfoHeader(data_response.full_results_count); $this.updateHref(); if ($this.n("showmore").length > 0) { if (domini("span", $this.n("showmore")).length > 0 && data_response.results_count > 0 && data_response.full_results_count - $this.results_num > 0) { if ($this.n("showmore").data("text") === "") { $this.n("showmore").data("text", $this.n("showmore").html()); } $this.n("showmore").html($this.n("showmore").data("text").replaceAll("{phrase}", search_helpers.escapeHtml($this.n("text").val()))); $this.n("showmoreContainer").css("display", "block"); $this.n("showmore").css("display", "block"); domini("span", $this.n("showmore")).html("(" + (data_response.full_results_count - $this.results_num) + ")"); let $a = domini("a", $this.n("showmore")); $a.attr("href", ""); $a.off(); $a.on($this.clickTouchend, function(e) { e.preventDefault(); e.stopImmediatePropagation(); if ($this.o.show_more.action === "ajax") { if ($this.searching) return false; $this.showMoreResLoader(); $this.search(false, false, true); } else { let url, base_url; domini(this).off(); if ($this.o.show_more.action === "results_page") { url = "?s=" + search_helpers.nicePhrase($this.n("text").val()); } else if ($this.o.show_more.action === "woo_results_page") { url = "?post_type=product&s=" + search_helpers.nicePhrase($this.n("text").val()); } else { if ($this.o.show_more.action === "elementor_page") { url = $this.parseCustomRedirectURL($this.o.show_more.elementor_url, $this.n("text").val()); } else { url = $this.parseCustomRedirectURL($this.o.show_more.url, $this.n("text").val()); } url = domini("