1/******/ (function() { // webpackBootstrap 2/******/ "use strict"; 3/******/ // The require scope 4/******/ var __webpack_require__ = {}; 5/******/ 6/************************************************************************/ 7/******/ /* webpack/runtime/define property getters */ 8/******/ !function() { 9/******/ // define getter functions for harmony exports 10/******/ __webpack_require__.d = function(exports, definition) { 11/******/ for(var key in definition) { 12/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 13/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 14/******/ } 15/******/ } 16/******/ }; 17/******/ }(); 18/******/ 19/******/ /* webpack/runtime/hasOwnProperty shorthand */ 20/******/ !function() { 21/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } 22/******/ }(); 23/******/ 24/************************************************************************/ 25var __webpack_exports__ = {}; 26 27// EXPORTS 28__webpack_require__.d(__webpack_exports__, { 29 "default": function() { return /* binding */ asp_core; } 30}); 31 32;// ./src/client/plugin/core/base.js 33 34const base_AjaxSearchPro = new function() { 35 this.helpers = {}; 36 this.plugin = {}; 37 this.addons = { 38 addons: [], 39 add: function(addon) { 40 if (this.addons.indexOf(addon) === -1) { 41 let k = this.addons.push(addon); 42 this.addons[k - 1].init(); 43 } 44 }, 45 remove: function(name) { 46 this.addons.filter(function(addon) { 47 if (addon.name === name) { 48 if (typeof addon.destroy != "undefined") { 49 addon.destroy(); 50 } 51 return false; 52 } else { 53 return true; 54 } 55 }); 56 } 57 }; 58}(); 59/* harmony default export */ var base = (base_AjaxSearchPro); 60 61;// external "DoMini" 62var external_DoMini_namespaceObject = Object(window.WPD)["DoMini"]; 63;// ./src/client/plugin/core/etc/helpers.js 64 65 66 67"use strict"; 68base.helpers.Hooks = window.WPD.Hooks; 69base.helpers.deviceType = function() { 70 let w = window.innerWidth; 71 if (w <= 640) { 72 return "phone"; 73 } else if (w <= 1024) { 74 return "tablet"; 75 } else { 76 return "desktop"; 77 } 78}; 79base.helpers.detectIOS = function() { 80 if (typeof window.navigator != "undefined" && typeof window.navigator.userAgent != "undefined") 81 return window.navigator.userAgent.match(/(iPod|iPhone|iPad)/) != null; 82 return false; 83}; 84base.helpers.isMobile = function() { 85 try { 86 document.createEvent("TouchEvent"); 87 return true; 88 } catch (e) { 89 return false; 90 } 91}; 92base.helpers.isTouchDevice = function() { 93 return "ontouchstart" in window; 94}; 95base.helpers.isSafari = function() { 96 return /^((?!chrome|android).)*safari/i.test(navigator.userAgent); 97}; 98base.helpers.escapeHtml = function(unsafe) { 99 return unsafe.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'"); 100}; 101base.helpers.whichjQuery = function(plugin) { 102 let jq = false; 103 if (typeof window.$ != "undefined") { 104 if (typeof plugin === "undefined") { 105 jq = window.$; 106 } else { 107 if (typeof window.$.fn[plugin] != "undefined") { 108 jq = window.$; 109 } 110 } 111 } 112 if (jq === false && typeof window.jQuery != "undefined") { 113 jq = window.jQuery; 114 if (typeof plugin === "undefined") { 115 jq = window.jQuery; 116 } else { 117 if (typeof window.jQuery.fn[plugin] != "undefined") { 118 jq = window.jQuery; 119 } 120 } 121 } 122 return jq; 123}; 124base.helpers.formData = function(form, data) { 125 let $this = this, els = form.find("input,textarea,select,button").get(); 126 if (arguments.length === 1) { 127 data = {}; 128 els.forEach(function(el) { 129 if (el.name && !el.disabled && (el.checked || /select|textarea/i.test(el.nodeName) || /text/i.test(el.type) || external_DoMini_namespaceObject(el).hasClass("hasDatepicker") || external_DoMini_namespaceObject(el).hasClass("asp_slider_hidden"))) { 130 if (data[el.name] === void 0) { 131 data[el.name] = []; 132 } 133 if (external_DoMini_namespaceObject(el).hasClass("hasDatepicker")) { 134 data[el.name].push(external_DoMini_namespaceObject(el).parent().find(".asp_datepicker_hidden").val()); 135 } else { 136 data[el.name].push(external_DoMini_namespaceObject(el).val()); 137 } 138 } 139 }); 140 return JSON.stringify(data); 141 } else { 142 if (typeof data != "object") { 143 data = JSON.parse(data); 144 }
145 els.forEach(function(el) { 146 if (el.name) { 147 if (data[el.name]) { 148 let names = data[el.name], _this = external_DoMini_namespaceObject(el); 149 if (Object.prototype.toString.call(names) !== "[object Array]") { 150 names = [names]; 151 } 152 if (el.type === "checkbox" || el.type === "radio") { 153 let val = _this.val(), found = false; 154 for (let i = 0; i < names.length; i++) { 155 if (names[i] === val) { 156 found = true; 157 break; 158 } 159 } 160 _this.prop("checked", found); 161 } else { 162 _this.val(names[0]); 163 if (external_DoMini_namespaceObject(el).hasClass("asp_gochosen") || external_DoMini_namespaceObject(el).hasClass("asp_goselect2")) { 164 WPD.intervalUntilExecute(function(_$) { 165 _$(el).trigger("change.asp_select2"); 166 }, function() { 167 return $this.whichjQuery("asp_select2"); 168 }, 50, 3); 169 } else if (external_DoMini_namespaceObject(el).hasClass("hasDatepicker")) { 170 WPD.intervalUntilExecute(function(_$) { 171 let value = names[0], format = _$(_this.get(0)).datepicker("option", "dateFormat"); 172 _$(_this.get(0)).datepicker("option", "dateFormat", "yy-mm-dd"); 173 _$(_this.get(0)).datepicker("setDate", value); 174 _$(_this.get(0)).datepicker("option", "dateFormat", format); 175 _$(_this.get(0)).trigger("selectnochange"); 176 }, function() { 177 return $this.whichjQuery("datepicker"); 178 }, 50, 3); 179 } 180 } 181 } else { 182 if (el.type === "checkbox" || el.type === "radio") { 183 external_DoMini_namespaceObject(el).prop("checked", false); 184 } 185 } 186 } 187 }); 188 return form; 189 } 190}; 191base.helpers.submitToUrl = function(action, method, input, target) { 192 let form; 193 form = external_DoMini_namespaceObject('<form style="display: none;" />'); 194 form.attr("action", action); 195 form.attr("method", method); 196 external_DoMini_namespaceObject("body").append(form); 197 if (typeof input !== "undefined" && input !== null) { 198 Object.keys(input).forEach(function(name) { 199 let value = input[name]; 200 let $input = external_DoMini_namespaceObject('<input type="hidden" />'); 201 $input.attr("name", name); 202 $input.attr("value", value); 203 form.append($input); 204 }); 205 } 206 if (typeof target != "undefined" && target === "new") { 207 form.attr("target", "_blank"); 208 } 209 form.get(0).submit(); 210}; 211base.helpers.openInNewTab = function(url) { 212 Object.assign(document.createElement("a"), { target: "_blank", href: url }).click(); 213}; 214base.helpers.isScrolledToBottom = function(el, tolerance) { 215 return el.scrollHeight - el.scrollTop - external_DoMini_namespaceObject(el).outerHeight() < tolerance; 216}; 217base.helpers.getWidthFromCSSValue = function(width, containerWidth) { 218 let min = 100, ret; 219 width = width + ""; 220 if (width.indexOf("px") > -1) { 221 ret = parseInt(width, 10); 222 } else if (width.indexOf("%") > -1) { 223 if (typeof containerWidth != "undefined" && containerWidth != null) { 224 ret = Math.floor(parseInt(width, 10) / 100 * containerWidth); 225 } else { 226 ret = parseInt(width, 10); 227 } 228 } else { 229 ret = parseInt(width, 10); 230 } 231 return ret < 100 ? min : ret; 232}; 233base.helpers.nicePhrase = function(s) { 234 return encodeURIComponent(s).replace(/\%20/g, "+"); 235}; 236base.helpers.inputToFloat = function(input) { 237 return input.replace(/^[.]/g, "").replace(/[^0-9.-]/g, "").replace(/^[-]/g, "x").replace(/[-]/g, "").replace(/[x]/g, "-").replace(/(\..*?)\..*/g, "$1"); 238}; 239base.helpers.addThousandSeparators = function(n, s) { 240 if (s !== "") { 241 s = s || ","; 242 return String(n).replace(/(?:^|[^.\d])\d+/g, function(n2) { 243 return n2.replace(/\B(?=(?:\d{3})+\b)/g, s); 244 }); 245 } else { 246 return n; 247 } 248}; 249base.helpers.decodeHTMLEntities = function(str) { 250 let element = document.createElement("div"); 251 if (str && typeof str === "string") { 252 str = str.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi, ""); 253 str = str.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi, ""); 254 element.innerHTML = str; 255 str = element.textContent; 256 element.textContent = ""; 257 } 258 return str; 259}; 260base.helpers.isScrolledToRight = function(el) { 261 return el.scrollWidth - external_DoMini_namespaceObject(el).outerWidth() === el.scrollLeft; 262}; 263base.helpers.isScrolledToLeft = function(el) { 264 return el.scrollLeft === 0; 265}; 266/* harmony default export */ var helpers = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 267 268;// ./src/client/plugin/core/actions/animation.js 269 270 271 272"use strict"; 273base.plugin.addAnimation = function() {
274 let $this = this, i = 0, j = 1, delay = 25, checkViewport = true; 275 if ($this.call_num > 0 || $this._no_animations) { 276 $this.n("results").find(".item, .asp_group_header").removeClass("opacityZero").removeClass("asp_an_" + $this.animOptions.items); 277 return false; 278 } 279 $this.n("results").find(".item, .asp_group_header").forEach(function() { 280 let x = this; 281 if (j === 1) { 282 checkViewport = external_DoMini_namespaceObject(x).inViewPort(0); 283 } 284 if (j > 1 && checkViewport && !external_DoMini_namespaceObject(x).inViewPort(0) || j > 80) { 285 external_DoMini_namespaceObject(x).removeClass("opacityZero"); 286 return true; 287 } 288 if ($this.o.resultstype === "isotopic" && j > $this.il.itemsPerPage) { 289 external_DoMini_namespaceObject(x).removeClass("opacityZero"); 290 return; 291 } 292 setTimeout(function() { 293 external_DoMini_namespaceObject(x).addClass("asp_an_" + $this.animOptions.items); 294 external_DoMini_namespaceObject(x).removeClass("opacityZero"); 295 }, i + delay); 296 i = i + 45; 297 j++; 298 }); 299}; 300base.plugin.removeAnimation = function() { 301 let $this = this; 302 this.n("items").forEach(function() { 303 external_DoMini_namespaceObject(this).removeClass("asp_an_" + $this.animOptions.items); 304 }); 305}; 306/* harmony default export */ var animation = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 307 308;// ./src/client/plugin/core/actions/filters.js 309 310 311 312"use strict"; 313let filters_helpers = base.helpers; 314base.plugin.setFilterStateInput = function(timeout) { 315 let $this = this; 316 if (typeof timeout == "undefined") { 317 timeout = 65; 318 } 319 let process = function() { 320 if (JSON.stringify($this.originalFormData) !== JSON.stringify(filters_helpers.formData(external_DoMini_namespaceObject("form", $this.n("searchsettings"))))) { 321 $this.n("searchsettings").find("input[name=filters_initial]").val(0); 322 } else { 323 $this.n("searchsettings").find("input[name=filters_initial]").val(1); 324 } 325 }; 326 if (timeout === 0) { 327 process(); 328 } else { 329 setTimeout(function() { 330 process(); 331 }, timeout); 332 } 333}; 334base.plugin.resetSearchFilters = function() { 335 let $this = this; 336 if (typeof $this.originalFormData === "undefined") { 337 return; 338 } 339 filters_helpers.formData(external_DoMini_namespaceObject("form", $this.n("searchsettings")), $this.originalFormData); 340 $this.resetNoUISliderFilters(); 341 if (typeof $this.select2jQuery != "undefined") { 342 $this.select2jQuery($this.n("searchsettings").get(0)).find(".asp_gochosen,.asp_goselect2").trigger("change.asp_select2"); 343 } 344 $this.n("text").val(""); 345 $this.n("textAutocomplete").val(""); 346 $this.n("proloading").css("display", "none"); 347 $this.hideLoader(); 348 $this.searchAbort(); 349 $this.setFilterStateInput(0); 350 $this.n("searchsettings").trigger("set_option_checked"); 351}; 352base.plugin.resetNoUISliderFilters = function() { 353 if (this.noUiSliders.length > 0) { 354 this.noUiSliders.forEach(function(slider) { 355 if (typeof slider.noUiSlider != "undefined") { 356 let vals = []; 357 external_DoMini_namespaceObject(slider).parent().find(".asp_slider_hidden").forEach(function(el) { 358 vals.push(external_DoMini_namespaceObject(el).val()); 359 }); 360 if (vals.length > 0) { 361 slider.noUiSlider.set(vals); 362 } 363 } 364 }); 365 } 366}; 367/* harmony default export */ var filters = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 368 369;// ./src/client/plugin/core/actions/loader.js 370 371 372 373"use strict"; 374base.plugin.showMoreResLoader = function() { 375 let $this = this; 376 $this.n("resultsDiv").addClass("asp_more_res_loading"); 377}; 378base.plugin.showLoader = function(recall) { 379 let $this = this; 380 recall = typeof recall !== "undefined" ? recall : false; 381 if ($this.o.loaderLocation === "none") return; 382 if (!$this.n("search").hasClass("hiddend") && $this.o.loaderLocation !== "results") { 383 $this.n("proloading").css({ 384 display: "block" 385 }); 386 } 387 if (recall !== false) { 388 return false; 389 } 390 if ($this.n("search").hasClass("hiddend") && $this.o.loaderLocation !== "search" || !$this.n("search").hasClass("hiddend") && ($this.o.loaderLocation === "both" || $this.o.loaderLocation === "results")) { 391 if (!$this.usingLiveLoader()) { 392 if ($this.n("resultsDiv").find(".asp_results_top").length > 0) 393 $this.n("resultsDiv").find(".asp_results_top").css("display", "none"); 394 $this.showResultsBox(); 395 external_DoMini_namespaceObject(".asp_res_loader", $this.n("resultsDiv")).removeClass("hiddend"); 396 $this.n("results").css("display", "none"); 397 $this.n("showmoreContainer").css("display", "none"); 398 if (typeof $this.hidePagination !== "undefined") { 399 $this.hidePagination(); 400 } 401 } 402 } 403}; 404base.plugin.hideLoader = function() {
405 let $this = this; 406 $this.n("proloading").css({ 407 display: "none" 408 }); 409 external_DoMini_namespaceObject(".asp_res_loader", $this.n("resultsDiv")).addClass("hiddend"); 410 $this.n("results").css("display", ""); 411 $this.n("resultsDiv").removeClass("asp_more_res_loading"); 412}; 413/* harmony default export */ var loader = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 414 415;// ./src/client/plugin/core/actions/other.js 416 417 418 419"use strict"; 420base.plugin.loadASPFonts = function() { 421 if (ASP.font_url !== false) { 422 let font = new FontFace( 423 "asppsicons2", 424 "url(" + ASP.font_url.replace("http:", "") + ")", 425 { style: "normal", weight: "normal", display: "swap" } 426 ); 427 font.load().then(function(loaded_face) { 428 document.fonts.add(loaded_face); 429 }).catch(function(er) { 430 }); 431 ASP.font_url = false; 432 } 433}; 434base.plugin.updateHref = function(anchor) { 435 anchor = anchor || window.location.hash; 436 if (this.o.trigger.update_href && !this.usingLiveLoader()) { 437 if (!window.location.origin) { 438 window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : ""); 439 } 440 let url = this.getStateURL() + (this.resultsOpened ? "&asp_s=" : "&asp_ls=") + this.n("text").val() + anchor; 441 history.replaceState("", "", url.replace(location.origin, "")); 442 } 443}; 444base.plugin.fixClonedSelf = function() { 445 let $this = this, old_instance_id = String($this.o.iid), old_real_id = String($this.o.rid); 446 while (!ASP.instances.set($this)) { 447 ++$this.o.iid; 448 if ($this.o.iid > 50) { 449 break; 450 } 451 } 452 if (old_instance_id !== $this.o.iid) { 453 $this.o.rid = $this.o.id + "_" + $this.o.iid; 454 $this.n("search").get(0).id = "ajaxsearchpro" + $this.o.rid; 455 $this.n("search").removeClass("asp_m_" + old_real_id).addClass("asp_m_" + $this.o.rid).data("instance", $this.o.iid); 456 $this.n("container").removeClass("asp_w_container_" + old_real_id).addClass("asp_w_container_" + $this.o.rid).data("instance", $this.o.iid); 457 $this.n("searchsettings").get(0).id = $this.n("searchsettings").get(0).id.replace("settings" + old_real_id, "settings" + $this.o.rid); 458 if ($this.n("searchsettings").hasClass("asp_s_" + old_real_id)) { 459 $this.n("searchsettings").removeClass("asp_s_" + old_real_id).addClass("asp_s_" + $this.o.rid).data("instance", $this.o.iid); 460 } else { 461 $this.n("searchsettings").removeClass("asp_sb_" + old_real_id).addClass("asp_sb_" + $this.o.rid).data("instance", $this.o.iid); 462 } 463 $this.n("resultsDiv").get(0).id = $this.n("resultsDiv").get(0).id.replace("prores" + old_real_id, "prores" + $this.o.rid); 464 $this.n("resultsDiv").removeClass("asp_r_" + old_real_id).addClass("asp_r_" + $this.o.rid).data("instance", $this.o.iid); 465 $this.n("container").find(".asp_init_data").data("instance", $this.o.iid); 466 $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); 467 $this.n("prosettings").data("opened", 0); 468 } 469}; 470base.plugin.destroy = function() { 471 let $this = this; 472 Object.keys($this.nodes).forEach(function(k) { 473 $this.nodes[k].off?.(); 474 }); 475 if (typeof $this.n("searchsettings").get(0).referenced !== "undefined") { 476 --$this.n("searchsettings").get(0).referenced; 477 if ($this.n("searchsettings").get(0).referenced < 0) { 478 $this.n("searchsettings").remove(); 479 } 480 } else { 481 $this.n("searchsettings").remove(); 482 } 483 if (typeof $this.n("resultsDiv").get(0).referenced !== "undefined") { 484 --$this.n("resultsDiv").get(0).referenced; 485 if ($this.n("resultsDiv").get(0).referenced < 0) { 486 $this.n("resultsDiv").remove?.(); 487 } 488 } else { 489 $this.n("resultsDiv").remove?.(); 490 } 491 $this.n("trythis").remove?.(); 492 $this.n("search").remove?.(); 493 $this.n("container").remove?.(); 494 $this.documentEventHandlers.forEach(function(h) { 495 external_DoMini_namespaceObject(h.node).off(h.event, h.handler); 496 }); 497}; 498/* harmony default export */ var other = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 499 500;// ./src/client/plugin/core/actions/redirect.js 501 502 503 504"use strict"; 505let redirect_helpers = base.helpers; 506base.plugin.isRedirectToFirstResult = function() {
507 let $this = this; 508 return (external_DoMini_namespaceObject(".asp_res_url", $this.n("resultsDiv")).length > 0 || external_DoMini_namespaceObject(".asp_es_" + $this.o.id + " a").length > 0 || $this.o.resPage.useAjax && external_DoMini_namespaceObject($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"); 509}; 510base.plugin.doRedirectToFirstResult = function() { 511 let $this = this, _loc, url; 512 if ($this.ktype === "click") { 513 _loc = $this.o.trigger.click_location; 514 } else if ($this.ktype === "button") { 515 _loc = $this.o.sb.redirect_location; 516 } else { 517 _loc = $this.o.trigger.return_location; 518 } 519 if (external_DoMini_namespaceObject(".asp_res_url", $this.n("resultsDiv")).length > 0) { 520 url = external_DoMini_namespaceObject(external_DoMini_namespaceObject(".asp_res_url", $this.n("resultsDiv")).get(0)).attr("href"); 521 } else if (external_DoMini_namespaceObject(".asp_es_" + $this.o.id + " a").length > 0) { 522 url = external_DoMini_namespaceObject(external_DoMini_namespaceObject(".asp_es_" + $this.o.id + " a").get(0)).attr("href"); 523 } else if ($this.o.resPage.useAjax && external_DoMini_namespaceObject($this.o.resPage.selector + "a").length > 0) { 524 url = external_DoMini_namespaceObject(external_DoMini_namespaceObject($this.o.resPage.selector + "a").get(0)).attr("href"); 525 } 526 if (url !== "") { 527 if (_loc === "same") { 528 location.href = url; 529 } else { 530 redirect_helpers.openInNewTab(url); 531 } 532 $this.hideLoader(); 533 $this.hideResults(); 534 } 535 return false; 536}; 537base.plugin.doRedirectToResults = function(ktype) { 538 let $this = this, _loc; 539 if (typeof $this.reportSettingsValidity != "undefined" && !$this.reportSettingsValidity()) { 540 $this.showNextInvalidFacetMessage?.(); 541 return false; 542 } 543 if (ktype === "click") { 544 _loc = $this.o.trigger.click_location; 545 } else if (ktype === "button") { 546 _loc = $this.o.sb.redirect_location; 547 } else { 548 _loc = $this.o.trigger.return_location; 549 } 550 let url = $this.getRedirectURL(ktype); 551 if ($this.o.overridewpdefault) { 552 if ($this.o.resPage.useAjax) { 553 $this.hideResults(); 554 $this.liveLoad($this.o.resPage.selector, url); 555 $this.showLoader(); 556 if ($this.att("blocking") === false) { 557 $this.hideSettings?.(); 558 } 559 return false; 560 } 561 if ($this.o.override_method === "post") { 562 redirect_helpers.submitToUrl(url, "post", { 563 asp_active: 1, 564 p_asid: $this.o.id, 565 p_asp_data: external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize() 566 }, _loc); 567 } else { 568 if (_loc === "same") { 569 location.href = url; 570 } else { 571 redirect_helpers.openInNewTab(url); 572 } 573 } 574 } else { 575 redirect_helpers.submitToUrl(url, "post", { 576 np_asid: $this.o.id, 577 np_asp_data: external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize() 578 }, _loc); 579 } 580 $this.n("proloading").css("display", "none"); 581 $this.hideLoader(); 582 if ($this.att("blocking") === false) $this.hideSettings?.(); 583 $this.hideResults(); 584 $this.searchAbort(); 585}; 586base.plugin.getRedirectURL = function(ktype) { 587 let $this = this, url, source, final, base_url; 588 ktype = typeof ktype !== "undefined" ? ktype : "enter"; 589 if (ktype === "click") { 590 source = $this.o.trigger.click; 591 } else if (ktype === "button") { 592 source = $this.o.sb.redirect_action; 593 } else { 594 source = $this.o.trigger.return; 595 } 596 if (source === "results_page") { 597 url = "?s=" + redirect_helpers.nicePhrase($this.n("text").val()); 598 } else if (source === "woo_results_page") { 599 url = "?post_type=product&s=" + redirect_helpers.nicePhrase($this.n("text").val()); 600 } else { 601 if (ktype === "button") { 602 base_url = source === "elementor_page" ? $this.o.sb.elementor_url : $this.o.sb.redirect_url; 603 base_url = redirect_helpers.decodeHTMLEntities(base_url); 604 url = $this.parseCustomRedirectURL(base_url, $this.n("text").val()); 605 } else { 606 base_url = source === "elementor_page" ? $this.o.trigger.elementor_url : $this.o.trigger.redirect_url; 607 base_url = redirect_helpers.decodeHTMLEntities(base_url); 608 url = $this.parseCustomRedirectURL(base_url, $this.n("text").val()); 609 } 610 } 611 if ($this.o.homeurl.indexOf("?") > 1 && url.indexOf("?") === 0) { 612 url = url.replace("?", "&"); 613 } 614 if ($this.o.overridewpdefault && $this.o.override_method !== "post") { 615 let start = "&"; 616 if (($this.o.homeurl.indexOf("?") === -1 || source === "elementor_page") && url.indexOf("?") === -1) { 617 start = "?"; 618 } 619 let addUrl = url + start + "asp_active=1&p_asid=" + $this.o.id + "&p_asp_data=1&" + external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize(); 620 if (source === "elementor_page") { 621 final = addUrl; 622 } else { 623 final = $this.o.homeurl + addUrl; 624 } 625 } else { 626 if (source === "elementor_page") { 627 final = url; 628 } else { 629 final = $this.o.homeurl + url; 630 } 631 } 632 final = final.replace("https://", "https:///"); 633 final = final.replace("http://", "http:///"); 634 final = final.replace(/\/\//g, "/"); 635 return redirect_helpers.Hooks.applyFilters("asp_redirect_url", final, $this.o.id, $this.o.iid); 636}; 637base.plugin.parseCustomRedirectURL = function(url, phrase) {
638 let $this = this, u = redirect_helpers.decodeHTMLEntities(url).replace(/{phrase}/g, redirect_helpers.nicePhrase(phrase)), items = u.match(/{(.*?)}/g); 639 if (items !== null) { 640 items.forEach(function(v) { 641 v = v.replace(/[{}]/g, ""); 642 let node = external_DoMini_namespaceObject('input[type=radio][name*="aspf[' + v + '_"]:checked', $this.n("searchsettings")); 643 if (node.length === 0) 644 node = external_DoMini_namespaceObject('input[type=text][name*="aspf[' + v + '_"]', $this.n("searchsettings")); 645 if (node.length === 0) 646 node = external_DoMini_namespaceObject('input[type=hidden][name*="aspf[' + v + '_"]', $this.n("searchsettings")); 647 if (node.length === 0) 648 node = external_DoMini_namespaceObject('select[name*="aspf[' + v + '_"]:not([multiple])', $this.n("searchsettings")); 649 if (node.length === 0) 650 node = external_DoMini_namespaceObject('input[type=radio][name*="termset[' + v + '"]:checked', $this.n("searchsettings")); 651 if (node.length === 0) 652 node = external_DoMini_namespaceObject('input[type=text][name*="termset[' + v + '"]', $this.n("searchsettings")); 653 if (node.length === 0) 654 node = external_DoMini_namespaceObject('input[type=hidden][name*="termset[' + v + '"]', $this.n("searchsettings")); 655 if (node.length === 0) 656 node = external_DoMini_namespaceObject('select[name*="termset[' + v + '"]:not([multiple])', $this.n("searchsettings")); 657 if (node.length === 0) 658 return true; 659 let val = node.val(); 660 val = "" + val; 661 u = u.replace("{" + v + "}", val); 662 }); 663 } 664 return u; 665}; 666/* harmony default export */ var redirect = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 667 668;// ./src/client/plugin/core/actions/results.js 669 670 671 672"use strict"; 673let results_helpers = base.helpers; 674base.plugin.showResults = function() { 675 let $this = this; 676 results_helpers.Hooks.applyFilters("asp/results/show/start", $this); 677 $this.initResults(); 678 if ($this.o.resultstype === "horizontal") { 679 $this.createHorizontalScroll(); 680 } else { 681 if ($this.o.resultstype === "vertical") { 682 $this.createVerticalScroll(); 683 } 684 } 685 switch ($this.o.resultstype) { 686 case "horizontal": 687 $this.showHorizontalResults(); 688 break; 689 case "vertical": 690 $this.showVerticalResults(); 691 break; 692 case "polaroid": 693 $this.showPolaroidResults(); 694 break; 695 case "isotopic": 696 $this.showIsotopicResults(); 697 break; 698 default: 699 $this.showHorizontalResults(); 700 break; 701 } 702 $this.showAnimatedImages(); 703 $this.hideLoader(); 704 if (!$this.n("proclose").hasClass("--skip")) { 705 $this.n("proclose").css({ 706 display: "block" 707 }); 708 } 709 $this.n("proclose").removeClass("--skip"); 710 if (results_helpers.isMobile() && $this.o.mobile.hide_keyboard && !$this.resultsOpened) 711 document.activeElement.blur(); 712 if ($this.o.settingsHideOnRes && $this.att("blocking") === false) 713 $this.hideSettings?.(); 714 $this.eh.resulsDivHoverMouseEnter = $this.eh.resulsDivHoverMouseEnter || function() { 715 external_DoMini_namespaceObject(".item", $this.n("resultsDiv")).removeClass("hovered"); 716 external_DoMini_namespaceObject(this).addClass("hovered"); 717 }; 718 $this.eh.resulsDivHoverMouseLeave = $this.eh.resulsDivHoverMouseLeave || function() { 719 external_DoMini_namespaceObject(".item", $this.n("resultsDiv")).removeClass("hovered"); 720 }; 721 $this.n("resultsDiv").find(".item").on("mouseenter", $this.eh.resulsDivHoverMouseEnter); 722 $this.n("resultsDiv").find(".item").on("mouseleave", $this.eh.resulsDivHoverMouseLeave); 723 $this.fixSettingsAccessibility(); 724 $this.resultsOpened = true; 725 results_helpers.Hooks.addFilter("asp/results/show/end", $this); 726}; 727base.plugin.hideResults = function(blur) { 728 let $this = this; 729 blur = typeof blur == "undefined" ? true : blur; 730 $this.initResults(); 731 if (!$this.resultsOpened) return false; 732 $this.n("resultsDiv").removeClass($this.resAnim.showClass).addClass($this.resAnim.hideClass); 733 setTimeout(function() { 734 $this.n("resultsDiv").css($this.resAnim.hideCSS); 735 }, $this.resAnim.duration); 736 $this.n("proclose").css({ 737 display: "none" 738 }); 739 if (results_helpers.isMobile() && blur) 740 document.activeElement.blur(); 741 $this.resultsOpened = false;
742 if (typeof $this.ptstack != "undefined") 743 delete $this.ptstack; 744 $this.hideArrowBox?.(); 745 $this.n("s").trigger("asp_results_hide", [$this.o.id, $this.o.iid], true, true); 746}; 747base.plugin.updateResults = function(html) { 748 let $this = this; 749 if (html.replace(/^\s*[\r\n]/gm, "") === "" || external_DoMini_namespaceObject(html).hasClass("asp_nores") || external_DoMini_namespaceObject(html).find(".asp_nores").length > 0) { 750 $this.n("showmoreContainer").css("display", "none"); 751 external_DoMini_namespaceObject("span", $this.n("showmore")).html(""); 752 } else { 753 if ($this.o.resultstype === "isotopic" && $this.call_num > 0 && $this.isotopic != null && typeof $this.isotopic.appended != "undefined" && $this.n("items").length > 0) { 754 let $items = external_DoMini_namespaceObject(html), $last = $this.n("items").last(), last = parseInt($this.n("items").last().attr("data-itemnum")); 755 $items.get().forEach(function(el) { 756 external_DoMini_namespaceObject(el).attr("data-itemnum", ++last).css({ 757 "width": $last.css("width"), 758 "height": $last.css("height") 759 }); 760 }); 761 $this.n("resdrg").append($items); 762 $this.isotopic.appended($items.get()); 763 $this.nodes.items = external_DoMini_namespaceObject(".item", $this.n("resultsDiv")).length > 0 ? external_DoMini_namespaceObject(".item", $this.n("resultsDiv")) : external_DoMini_namespaceObject(".photostack-flip", $this.n("resultsDiv")); 764 } else { 765 if ($this.call_num > 0 && $this.o.resultstype === "vertical") { 766 $this.n("resdrg").html($this.n("resdrg").html() + '<div class="asp_v_spacer"></div>' + html); 767 } else { 768 $this.n("resdrg").html($this.n("resdrg").html() + html); 769 } 770 } 771 } 772}; 773base.plugin.showResultsBox = function() { 774 let $this = this; 775 $this.initResults(); 776 $this.n("s").trigger("asp_results_show", [$this.o.id, $this.o.iid], true, true); 777 $this.n("resultsDiv").css({ 778 display: "block", 779 height: "auto" 780 }); 781 $this.n("results").find(".item, .asp_group_header").addClass($this.animationOpacity); 782 $this.n("resultsDiv").css($this.resAnim.showCSS); 783 $this.n("resultsDiv").removeClass($this.resAnim.hideClass).addClass($this.resAnim.showClass); 784 $this.fixResultsPosition(true); 785}; 786base.plugin.keywordHighlight = function() { 787 const $this = this; 788 if (!$this.o.highlight) { 789 return; 790 } 791 const phrase = $this.n("text").val().replace(/["']/g, ""); 792 if (phrase === "" || phrase.length < $this.o.trigger.minWordLength) { 793 return; 794 } 795 const words = phrase.trim().split(" ").filter((s) => s.length >= $this.o.trigger.minWordLength); 796 $this.n("resultsDiv").find("figcaption, div.item").highlight([phrase.trim()], { 797 element: "span", 798 className: "highlighted", 799 wordsOnly: $this.o.highlightWholewords 800 }); 801 if (words.length > 0) { 802 $this.n("resultsDiv").find("figcaption, div.item").highlight(words, { 803 element: "span", 804 className: "highlighted", 805 wordsOnly: $this.o.highlightWholewords 806 }); 807 } 808}; 809base.plugin.addHighlightString = function($items) { 810 let $this = this, phrase = $this.n("text").val().replace(/["']/g, ""); 811 $items = typeof $items == "undefined" ? $this.n("items").find("a.asp_res_url") : $items; 812 if ($this.o.singleHighlight && phrase !== "" && $items.length > 0) { 813 $items.forEach(function() { 814 try { 815 const url = new URL(external_DoMini_namespaceObject(this).attr("href")); 816 url.searchParams.set("asp_highlight", phrase); 817 url.searchParams.set("p_asid", $this.o.id); 818 external_DoMini_namespaceObject(this).attr("href", url.href); 819 } catch (e) { 820 } 821 }); 822 } 823}; 824base.plugin.scrollToResults = function() { 825 let $this = this, tolerance = Math.floor(window.innerHeight * 0.1), stop; 826 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; 827 if ($this.o.resultsposition === "hover") { 828 stop = $this.n("probox").offset().top - 20; 829 } else { 830 stop = $this.n("resultsDiv").offset().top - 20; 831 } 832 stop = stop + $this.o.scrollToResults.offset; 833 let $adminbar = external_DoMini_namespaceObject("#wpadminbar"); 834 if ($adminbar.length > 0) 835 stop -= $adminbar.height(); 836 stop = stop < 0 ? 0 : stop; 837 window.scrollTo({ top: stop, behavior: "smooth" }); 838}; 839base.plugin.scrollToResult = function(id) { 840 let $el = external_DoMini_namespaceObject(id); 841 if ($el.length && !$el.inViewPort(40)) { 842 $el.get(0).scrollIntoView({ behavior: "smooth", block: "center", inline: "nearest" }); 843 } 844}; 845base.plugin.showAnimatedImages = function() {
846 let $this = this; 847 $this.n("items").forEach(function() { 848 let $image = external_DoMini_namespaceObject(this).find(".asp_image[data-src]"), src = $image.data("src"); 849 if (typeof src != "undefined" && src != null && src !== "" && src.indexOf(".gif") > -1) { 850 if ($image.find("canvas").length === 0) { 851 $image.prepend(external_DoMini_namespaceObject('<div class="asp_item_canvas"><canvas></canvas></div>').get(0)); 852 let c = external_DoMini_namespaceObject(this).find("canvas").get(0), $cc = external_DoMini_namespaceObject(this).find(".asp_item_canvas"), ctx = c.getContext("2d"), img = new Image(); 853 img.crossOrigin = "anonymous"; 854 img.onload = function() { 855 external_DoMini_namespaceObject(c).attr({ 856 "width": img.width, 857 "height": img.height 858 }); 859 ctx.drawImage(img, 0, 0, img.width, img.height); 860 $cc.css({ 861 "background-image": "url(" + c.toDataURL() + ")" 862 }); 863 }; 864 img.src = src; 865 } 866 } 867 }); 868}; 869base.plugin.updateNoResultsHeader = function() { 870 let $this = this, $new_nores = $this.n("resdrg").find(".asp_nores"), $old_nores; 871 if ($new_nores.length > 0) { 872 $new_nores = $new_nores.detach(); 873 } 874 $old_nores = $this.n("resultsDiv").find(".asp_nores"); 875 if ($old_nores.length > 0) { 876 $old_nores.remove(); 877 } 878 if ($new_nores.length > 0) { 879 $this.n("resultsDiv").prepend($new_nores); 880 $this.n("resultsDiv").find(".asp_keyword").on("click", function() { 881 $this.n("text").val(results_helpers.decodeHTMLEntities(external_DoMini_namespaceObject(this).text())); 882 $this.n("textAutocomplete").val(""); 883 if (!$this.o.redirectOnClick || !$this.o.redirectOnEnter || $this.o.trigger.type) { 884 $this.search(); 885 } 886 }); 887 } 888}; 889base.plugin.updateInfoHeader = function(totalCount) { 890 let $this = this, content = "", $rt = $this.n("resultsDiv").find(".asp_results_top"), phrase = $this.n("text").val().trim(); 891 if ($rt.length > 0) { 892 if ($this.n("items").length <= 0 || $this.n("resultsDiv").find(".asp_nores").length > 0) { 893 $rt.css("display", "none"); 894 } else { 895 if (typeof $this.updateInfoHeader.resInfoBoxTxt == "undefined") { 896 $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() : ""; 897 $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() : ""; 898 } 899 if (phrase !== "" && $this.updateInfoHeader.resInfoBoxTxt !== "") { 900 content = $this.updateInfoHeader.resInfoBoxTxt; 901 } else if (phrase === "" && $this.updateInfoHeader.resInfoBoxTxtNoPhrase !== "") { 902 content = $this.updateInfoHeader.resInfoBoxTxtNoPhrase; 903 } 904 if (content === void 0) { 905 return; 906 } 907 if (content !== "") { 908 content = content.replaceAll("{phrase}", results_helpers.escapeHtml($this.n("text").val())); 909 content = content.replaceAll("{results_count}", $this.n("items").length); 910 content = content.replaceAll("{results_count_total}", totalCount); 911 $rt.html(content); 912 $rt.css("display", "block"); 913 } else { 914 $rt.css("display", "none"); 915 } 916 } 917 } 918}; 919 920;// ./src/client/plugin/core/actions/scroll.js 921 922 923 924"use strict"; 925let scroll_helpers = base.helpers; 926base.plugin.createResultsScroll = function(type) { 927 let $this = this, t, $resScroll = $this.n("results"); 928 type = typeof type == "undefined" ? "vertical" : type; 929 $resScroll.on("scroll", function() { 930 if ($this.o.show_more.infinite) { 931 clearTimeout(t); 932 t = setTimeout(function() { 933 $this.checkAndTriggerInfiniteScroll(type); 934 }, 60); 935 } 936 }); 937}; 938base.plugin.createVerticalScroll = function() { 939 this.createResultsScroll("vertical"); 940}; 941base.plugin.createHorizontalScroll = function() { 942 this.createResultsScroll("horizontal"); 943}; 944base.plugin.checkAndTriggerInfiniteScroll = function(caller) {
945 let $this = this, $r = external_DoMini_namespaceObject(".item", $this.n("resultsDiv")); 946 caller = typeof caller == "undefined" ? "window" : caller; 947 if ($this.n("showmore").length === 0 || $this.n("showmoreContainer").css("display") === "none") { 948 return false; 949 } 950 if (caller === "window" || caller === "horizontal") { 951 if ($this.o.resultstype === "isotopic" && external_DoMini_namespaceObject("nav.asp_navigation", $this.n("resultsDiv")).css("display") !== "none") { 952 return false; 953 } 954 let onViewPort = $r.last().inViewPort(0, $this.n("resultsDiv").get(0)), onScreen = $r.last().inViewPort(0); 955 if (!$this.searching && $r.length > 0 && onViewPort && onScreen) { 956 $this.n("showmore").find("a.asp_showmore").trigger("click"); 957 } 958 } else if (caller === "vertical") { 959 let $scrollable = $this.n("results"); 960 if (scroll_helpers.isScrolledToBottom($scrollable.get(0), 20)) { 961 $this.n("showmore").find("a.asp_showmore").trigger("click"); 962 } 963 } else if (caller === "isotopic") { 964 if (!$this.searching && $r.length > 0 && $this.n("resultsDiv").find("nav.asp_navigation ul li").last().hasClass("asp_active")) { 965 $this.n("showmore").find("a.asp_showmore").trigger("click"); 966 } 967 } 968}; 969 970;// ./src/client/global/utils/other.ts 971 972const nicePhrase = function(s) { 973 return encodeURIComponent(s).replace(/\%20/g, "+"); 974}; 975function isNumeric(input) { 976 if (typeof input === "number" && !isNaN(input)) { 977 return true; 978 } 979 if (typeof input === "string") { 980 const trimmed = input.trim(); 981 if (trimmed === "") return false; 982 const num = Number(trimmed); 983 return !isNaN(num) && trimmed === String(num).trim(); 984 } 985 return false; 986} 987function md5(str) { 988 const bytes = new TextEncoder().encode(str); 989 const len = bytes.length; 990 const paddedLen = (len + 8 >>> 6 << 6) + 64; 991 const padded = new Uint8Array(paddedLen); 992 padded.set(bytes); 993 padded[len] = 128; 994 const view = new DataView(padded.buffer); 995 view.setUint32(paddedLen - 8, len << 3 >>> 0, true); 996 view.setUint32(paddedLen - 4, len >>> 29, true); 997 let a = 1732584193, b = 4023233417, c = 2562383102, d = 271733878; 998 const s = [7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]; 999 const k = [3614090360, 3905402710, 606105819, 3250441966, 4118548399, 1200080426, 2821735955, 4249261313, 1770035416, 2336552879, 4294925233, 2304563134, 1804603682, 4254626195, 2792965006, 1236535329, 4129170786, 3225465664, 643717713, 3921069994, 3593408605, 38016083, 3634488961, 3889429448, 568446438, 3275163606, 4107603335, 1163531501, 2850285829, 4243563512, 1735328473, 2368359562, 4294588738, 2272392833, 1839030562, 4259657740, 2763975236, 1272893353, 4139469664, 3200236656, 681279174, 3936430074, 3572445317, 76029189, 3654602809, 3873151461, 530742520, 3299628645, 4096336452, 1126891415, 2878612391, 4237533241, 1700485571, 2399980690, 4293915773, 2240044497, 1873313359, 4264355552, 2734768916, 1309151649, 4149444226, 3174756917, 718787259, 3951481745]; 1000 for (let i = 0; i < paddedLen; i += 64) { 1001 const w = []; 1002 for (let t = 0; t < 16; t++) w[t] = view.getUint32(i + t * 4, true); 1003 const aa = a, bb = b, cc = c, dd = d; 1004 for (let j = 0; j < 64; j++) { 1005 let f, g; 1006 if (j < 16) { 1007 f = b & c | ~b & d; 1008 g = j; 1009 } else if (j < 32) { 1010 f = d & b | ~d & c; 1011 g = (5 * j + 1) % 16; 1012 } else if (j < 48) { 1013 f = b ^ c ^ d; 1014 g = (3 * j + 5) % 16; 1015 } else { 1016 f = c ^ (b | ~d); 1017 g = 7 * j % 16; 1018 } 1019 const rot = a + f + k[j] + w[g] >>> 0; 1020 const temp = d; 1021 d = c; 1022 c = b; 1023 b = b + (rot << s[j] | rot >>> 32 - s[j]) >>> 0; 1024 a = temp; 1025 } 1026 a = a + aa >>> 0; 1027 b = b + bb >>> 0; 1028 c = c + cc >>> 0; 1029 d = d + dd >>> 0; 1030 } 1031 const toHexLe = (n) => [n & 255, n >>> 8 & 255, n >>> 16 & 255, n >>> 24 & 255].map((byte) => byte.toString(16).padStart(2, "0")).join(""); 1032 return toHexLe(a) + toHexLe(b) + toHexLe(c) + toHexLe(d); 1033} 1034function parse_str(str) { 1035 const decodeQueryComponent = (value) => decodeURIComponent(value.replace(/\+/g, "%20")); 1036 const splitKeys = (rawKey) => {
1037 const keys = []; 1038 let bracketContentStart = 0; 1039 for (let index = 0; index < rawKey.length; index++) { 1040 if (rawKey.charAt(index) === "[" && !bracketContentStart) { 1041 bracketContentStart = index + 1; 1042 } else if (rawKey.charAt(index) === "]" && bracketContentStart) { 1043 if (!keys.length) { 1044 keys.push(rawKey.slice(0, bracketContentStart - 1)); 1045 } 1046 keys.push(rawKey.substring(bracketContentStart, index)); 1047 bracketContentStart = 0; 1048 if (rawKey.charAt(index + 1) !== "[") { 1049 break; 1050 } 1051 } 1052 } 1053 return keys.length ? keys : [rawKey]; 1054 }; 1055 const normalizeRootKey = (key) => { 1056 let normalizedKey = key; 1057 for (let index = 0; index < normalizedKey.length; index++) { 1058 const character = normalizedKey.charAt(index); 1059 if (character === " " || character === "." || character === "[") { 1060 normalizedKey = normalizedKey.substring(0, index) + "_" + normalizedKey.substring(index + 1); 1061 } 1062 if (character === "[") { 1063 break; 1064 } 1065 } 1066 return normalizedKey; 1067 }; 1068 const getNextNumericKey = (target) => { 1069 let maxIndex = -1; 1070 for (const property in target) { 1071 if (Object.prototype.hasOwnProperty.call(target, property) && /^\d+$/.test(property) && Number(property) > maxIndex) { 1072 maxIndex = Number(property); 1073 } 1074 } 1075 return String(maxIndex + 1); 1076 }; 1077 const isSequentialArray = (obj) => { 1078 const keys = Object.keys(obj); 1079 if (keys.length === 0) return false; 1080 const numericKeys = keys.filter((k) => /^\d+$/.test(k)).map(Number).sort((a, b) => a - b); 1081 if (numericKeys.length !== keys.length) return false; 1082 for (let i = 0; i < numericKeys.length; i++) { 1083 if (numericKeys[i] !== i) return false; 1084 } 1085 return true; 1086 }; 1087 const convertToArrays = (obj) => { 1088 if (typeof obj !== "object" || obj === null) { 1089 return obj; 1090 } 1091 if (isSequentialArray(obj)) { 1092 const arr = []; 1093 const keys = Object.keys(obj).map(Number).sort((a, b) => a - b); 1094 for (const key of keys) { 1095 arr[key] = convertToArrays(obj[String(key)]); 1096 } 1097 return arr; 1098 } 1099 const result2 = {}; 1100 for (const key in obj) { 1101 if (Object.prototype.hasOwnProperty.call(obj, key)) { 1102 result2[key] = convertToArrays(obj[key]); 1103 } 1104 } 1105 return result2; 1106 }; 1107 const result = {}; 1108 const segments = String(str).replace(/^&/, "").replace(/&$/, "").split("&"); 1109 for (const segment of segments) { 1110 const [rawKeyPart, ...rawValueParts] = segment.split("="); 1111 let rawKey = decodeQueryComponent(rawKeyPart ?? ""); 1112 const value = rawValueParts.length === 0 ? "" : decodeQueryComponent(rawValueParts.join("=")); 1113 rawKey = rawKey.trimStart(); 1114 const nullByteIndex = rawKey.indexOf("\0"); 1115 if (nullByteIndex > -1) { 1116 rawKey = rawKey.slice(0, nullByteIndex); 1117 } 1118 if (!rawKey || rawKey.charAt(0) === "[") { 1119 continue; 1120 } 1121 const keys = splitKeys(rawKey); 1122 keys[0] = normalizeRootKey(keys[0]); 1123 let current = result; 1124 let parent = result; 1125 let currentKey = ""; 1126 for (let index = 0; index < keys.length; index++) { 1127 currentKey = keys[index].replace(/^['"]/, "").replace(/['"]$/, ""); 1128 parent = current; 1129 if ((currentKey === "" || currentKey === " ") && index !== 0) { 1130 currentKey = getNextNumericKey(current); 1131 } 1132 if (Object(current[currentKey]) !== current[currentKey]) { 1133 current[currentKey] = {}; 1134 } 1135 current = current[currentKey]; 1136 } 1137 parent[currentKey] = value; 1138 } 1139 return convertToArrays(result); 1140} 1141 1142;// ./src/client/plugin/core/actions/search.js 1143 1144 1145 1146 1147"use strict"; 1148let search_helpers = base.helpers; 1149base.plugin.isDuplicateSearchTriggered = function() { 1150 let $this = this; 1151 for (let i = 0; i < 25; i++) { 1152 let id = $this.o.id + "_" + i; 1153 if (id !== $this.o.rid) { 1154 if (window.ASP.instances.get($this.o.id, i) !== false) { 1155 return window.ASP.instances.get($this.o.id, i).searching; 1156 } 1157 } 1158 } 1159 return false; 1160}; 1161base.plugin.searchAbort = function() { 1162 let $this = this; 1163 if ($this.post != null) { 1164 $this.post.abort(); 1165 $this.isAutoP = false;
1166 } 1167}; 1168base.plugin.searchWithCheck = function(timeout) { 1169 let $this = this; 1170 if (typeof timeout == "undefined") 1171 timeout = 50; 1172 if ($this.n("text").val().length < $this.o.charcount) return; 1173 $this.searchAbort(); 1174 clearTimeout($this.timeouts.searchWithCheck); 1175 $this.timeouts.searchWithCheck = setTimeout(function() { 1176 $this.search(); 1177 }, timeout); 1178}; 1179base.plugin.search = function(count, order, recall, apiCall, supressInvalidMsg) { 1180 let $this = this, abort = false; 1181 const shouldAbortSearch = function(data2, recall2, apiCall2, supressInvalidMsg2) { 1182 $this.hideArrowBox?.(); 1183 if (typeof $this.reportSettingsValidity != "undefined" && !$this.isAutoP && !$this.reportSettingsValidity()) { 1184 if (!supressInvalidMsg2) { 1185 $this.showNextInvalidFacetMessage?.(); 1186 $this.scrollToNextInvalidFacetMessage?.(); 1187 } 1188 return true; 1189 } 1190 if (!recall2 && !apiCall2 && JSON.stringify(data2) === JSON.stringify($this.lastSearchData)) { 1191 if (!$this.resultsOpened && !$this.usingLiveLoader()) { 1192 $this.showResults(); 1193 } 1194 if ($this.isRedirectToFirstResult()) { 1195 $this.doRedirectToFirstResult(); 1196 return true; 1197 } 1198 return true; 1199 } 1200 return false; 1201 }; 1202 const prepareRequestData = function() { 1203 let data2 = { 1204 action: "ajaxsearchpro_search", 1205 aspp: $this.n("text").val(), 1206 asid: $this.o.id, 1207 asp_inst_id: $this.o.rid, 1208 options: external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize() 1209 }; 1210 data2 = search_helpers.Hooks.applyFilters("asp_search_data", data2, $this.o.id, $this.o.iid); 1211 if ($this.isAutoP) { 1212 data2.autop = 1; 1213 } 1214 return data2; 1215 }; 1216 const applyPaginationData = function(data2, recall2) { 1217 if (recall2) { 1218 $this.call_num++; 1219 data2.asp_call_num = $this.call_num; 1220 if ($this.autopStartedTheSearch) { 1221 data2.options += "&" + external_DoMini_namespaceObject.fn.serializeObject($this.autopData); 1222 --data2.asp_call_num; 1223 } 1224 } else { 1225 $this.call_num = 0; 1226 $this.autopStartedTheSearch = !!data2.autop; 1227 } 1228 }; 1229 const applyPreviewOptions = function(data2) { 1230 let $form = external_DoMini_namespaceObject('form[name="asp_data"]'); 1231 if ($form.length > 0) { 1232 data2.asp_preview_options = $form.serialize(); 1233 } 1234 }; 1235 const applyForcedOptions = function(data2, count2, order2) { 1236 if (typeof count2 != "undefined" && count2 !== false) { 1237 data2.options += "&force_count=" + parseInt(count2); 1238 } 1239 if (typeof order2 != "undefined" && order2 !== false) { 1240 data2.options += "&force_order=" + parseInt(order2); 1241 } 1242 }; 1243 const handleAjaxFailure = function(jqXHR) { 1244 if (jqXHR.aborted) 1245 return; 1246 $this.n("resdrg").html(""); 1247 $this.n("resdrg").html('<div class="asp_nores">The request failed. Please check your connection! Status: ' + jqXHR.status + "</div>"); 1248 $this.nodes.item = external_DoMini_namespaceObject(".item", $this.n("resultsDiv")).length > 0 ? external_DoMini_namespaceObject(".item", $this.n("resultsDiv")) : external_DoMini_namespaceObject(".photostack-flip", $this.n("resultsDiv")); 1249 $this.results_num = 0; 1250 $this.searching = false; 1251 $this.hideLoader(); 1252 $this.showResults(); 1253 $this.scrollToResults(); 1254 $this.isAutoP = false; 1255 }; 1256 const collectResults = function(data_response) { 1257 let res = []; 1258 if (typeof data_response.results.groups != "undefined") { 1259 Object.keys(data_response.results.groups).forEach(function(k) { 1260 if (typeof data_response.results.groups[k].items != "undefined") { 1261 let group = data_response.results.groups[k].items; 1262 if (Array.isArray(group)) { 1263 group.forEach(function(result) { 1264 res.push(result); 1265 }); 1266 } 1267 } 1268 }); 1269 } else { 1270 res = Array.isArray(data_response.results) ? data_response.results : res; 1271 } 1272 return res; 1273 }; 1274 const handleResponse = function(data_response, data2, recall2, hash) { 1275 $this.searching = false; 1276 if (data_response.html === void 0) { 1277 $this.hideLoader(); 1278 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'); 1279 return false;
1280 } 1281 let html_response = search_helpers.Hooks.applyFilters("asp_search_html", data_response.html, $this.o.id, $this.o.iid); 1282 $this.n("s").trigger("asp_search_end", [$this.o.id, $this.o.iid, $this.n("text").val(), data_response], true, true); 1283 let res = collectResults(data_response); 1284 $this.statisticsID = data_response?.statistics_id ?? 0; 1285 if (typeof hash === "string" && !window.ASP.cache.list.has(hash)) { 1286 window.ASP.cache.list.add(hash); 1287 } 1288 if ($this.autopStartedTheSearch) { 1289 if (typeof data2.autop != "undefined") { 1290 $this.autopData["not_in"] = {}; 1291 $this.autopData["not_in_count"] = 0; 1292 if (typeof data_response.results != "undefined") { 1293 res.forEach(function(r) { 1294 if (typeof $this.autopData["not_in"][r["content_type"]] == "undefined") { 1295 $this.autopData["not_in"][r["content_type"]] = []; 1296 } 1297 $this.autopData["not_in"][r["content_type"]].push(r["id"]); 1298 ++$this.autopData["not_in_count"]; 1299 }); 1300 } 1301 } else { 1302 data_response.full_results_count += $this.autopData["not_in_count"]; 1303 } 1304 } 1305 if (!recall2) { 1306 $this.initResults(); 1307 $this.n("resdrg").html(""); 1308 $this.n("resdrg").html(html_response); 1309 $this.results_num = data_response.results_count; 1310 } else { 1311 $this.updateResults(html_response); 1312 $this.results_num += data_response.results_count; 1313 } 1314 $this.updateNoResultsHeader(); 1315 $this.nodes.items = external_DoMini_namespaceObject(".item", $this.n("resultsDiv")).length > 0 ? external_DoMini_namespaceObject(".item", $this.n("resultsDiv")) : external_DoMini_namespaceObject(".photostack-flip", $this.n("resultsDiv")); 1316 $this.addHighlightString(); 1317 $this.gaEvent?.("search_end", { "results_count": $this.n("items").length }); 1318 if ($this.isRedirectToFirstResult()) { 1319 $this.doRedirectToFirstResult(); 1320 return false; 1321 } 1322 $this.hideLoader(); 1323 $this.showResults(); 1324 if (window.location.hash !== "" && window.location.hash.indexOf("#asp-res-") > -1 && external_DoMini_namespaceObject(window.location.hash).length > 0) { 1325 $this.scrollToResult(window.location.hash); 1326 } else { 1327 $this.scrollToResults(); 1328 } 1329 $this.lastSuccesfulSearch = external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize() + $this.n("text").val().trim(); 1330 $this.lastSearchData = data2; 1331 $this.updateInfoHeader(data_response.full_results_count); 1332 $this.updateHref(); 1333 if ($this.n("showmore").length > 0) { 1334 if (external_DoMini_namespaceObject("span", $this.n("showmore")).length > 0 && data_response.results_count > 0 && data_response.full_results_count - $this.results_num > 0) { 1335 if ($this.n("showmore").data("text") === "") { 1336 $this.n("showmore").data("text", $this.n("showmore").html()); 1337 } 1338 $this.n("showmore").html($this.n("showmore").data("text").replaceAll("{phrase}", search_helpers.escapeHtml($this.n("text").val()))); 1339 $this.n("showmoreContainer").css("display", "block"); 1340 $this.n("showmore").css("display", "block"); 1341 external_DoMini_namespaceObject("span", $this.n("showmore")).html("(" + (data_response.full_results_count - $this.results_num) + ")"); 1342 let $a = external_DoMini_namespaceObject("a", $this.n("showmore")); 1343 $a.attr("href", ""); 1344 $a.off(); 1345 $a.on($this.clickTouchend, function(e) { 1346 e.preventDefault(); 1347 e.stopImmediatePropagation(); 1348 if ($this.o.show_more.action === "ajax") { 1349 if ($this.searching) 1350 return false; 1351 $this.showMoreResLoader(); 1352 $this.search(false, false, true); 1353 } else { 1354 let url, base_url; 1355 external_DoMini_namespaceObject(this).off(); 1356 if ($this.o.show_more.action === "results_page") { 1357 url = "?s=" + search_helpers.nicePhrase($this.n("text").val()); 1358 } else if ($this.o.show_more.action === "woo_results_page") { 1359 url = "?post_type=product&s=" + search_helpers.nicePhrase($this.n("text").val()); 1360 } else { 1361 if ($this.o.show_more.action === "elementor_page") { 1362 url = $this.parseCustomRedirectURL($this.o.show_more.elementor_url, $this.n("text").val()); 1363 } else { 1364 url = $this.parseCustomRedirectURL($this.o.show_more.url, $this.n("text").val()); 1365 } 1366 url = external_DoMini_namespaceObject("<textarea />").html(url).text(); 1367 } 1368 if ($this.o.show_more.action !== "elementor_page" && $this.o.homeurl.indexOf("?") > 1 && url.indexOf("?") === 0) { 1369 url = url.replace("?", "&"); 1370 } 1371 base_url = $this.o.show_more.action === "elementor_page" ? url : $this.o.homeurl + url; 1372 if ($this.o.overridewpdefault) { 1373 if ($this.o.override_method === "post") { 1374 search_helpers.submitToUrl(base_url, "post", { 1375 asp_active: 1, 1376 p_asid: $this.o.id, 1377 p_asp_data: external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize() 1378 }, $this.o.show_more.location); 1379 } else { 1380 let final = base_url + "&asp_active=1&p_asid=" + $this.o.id + "&p_asp_data=1&" + external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize(); 1381 if ($this.o.show_more.location === "same") { 1382 location.href = final; 1383 } else { 1384 search_helpers.openInNewTab(final); 1385 } 1386 } 1387 } else { 1388 search_helpers.submitToUrl(base_url, "post", { 1389 np_asid: $this.o.id, 1390 np_asp_data: external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize() 1391 }, $this.o.show_more.location); 1392 } 1393 } 1394 }); 1395 } else { 1396 $this.n("showmoreContainer").css("display", "none"); 1397 external_DoMini_namespaceObject("span", $this.n("showmore")).html(""); 1398 } 1399 } 1400 $this.isAutoP = false;
1401 search_helpers.Hooks.applyFilters("asp/search/end", $this, data2); 1402 }; 1403 const tryLiveLoad = function() { 1404 if (external_DoMini_namespaceObject(".asp_es_" + $this.o.id).length > 0) { 1405 $this.liveLoad(".asp_es_" + $this.o.id, $this.getCurrentLiveURL(), $this.o.trigger.update_href); 1406 return true; 1407 } else if ($this.o.resPage.useAjax) { 1408 $this.liveLoad($this.o.resPage.selector, $this.getRedirectURL()); 1409 return true; 1410 } else if ($this.o.wooShop.useAjax) { 1411 $this.liveLoad($this.o.wooShop.selector, $this.getLiveURLbyBaseLocation($this.o.wooShop.url)); 1412 return true; 1413 } else if ($this.o.taxArchive.useAjax) { 1414 $this.liveLoad($this.o.taxArchive.selector, $this.getLiveURLbyBaseLocation($this.o.taxArchive.url)); 1415 return true; 1416 } else if ($this.o.cptArchive.useAjax) { 1417 $this.liveLoad($this.o.cptArchive.selector, $this.getLiveURLbyBaseLocation($this.o.cptArchive.url)); 1418 return true; 1419 } 1420 return false; 1421 }; 1422 const getCacheHash = function(data2) { 1423 const options = parse_str(data2.options); 1424 const str = data2.asid + $this.n("text").val() + JSON.stringify(options) + (data2.autop === void 0 ? "" : data2.autop) + (data2.asp_call_num === void 0 ? 0 : data2.asp_call_num); 1425 return md5(str).slice(0, 14); 1426 }; 1427 const ajaxSearch = function(data2, hash) { 1428 $this.post = external_DoMini_namespaceObject.fn.ajax({ 1429 "url": window.ASP.ajaxurl, 1430 "method": "POST", 1431 "data": data2, 1432 "success": function(response) { 1433 const data_response = JSON.parse(response); 1434 responseHandler(data_response, hash); 1435 }, 1436 "fail": handleAjaxFailure 1437 }); 1438 }; 1439 const responseHandler = function(data_response, hash) { 1440 return handleResponse(data_response, data, recall, hash); 1441 }; 1442 const registerCachedStatistics = function(data_response) { 1443 const params = { 1444 phrase: $this.n("text").val(), 1445 page: $this.call_num + 1, 1446 asp_id: $this.o.id, 1447 device_type: $this.n("searchsettings").find("input[name=device]").val(), 1448 lang: data_response.lang, 1449 user_id: ASP.cache.uid, 1450 found_results: data_response.full_results_count !== void 0 ? data_response.full_results_count : 0, 1451 results: [], 1452 suggested: 0 1453 }; 1454 if (data_response.results.suggested !== void 0) { 1455 window.ASP.cache.queue.pushToSend({ ...params, found_results: 0 }); 1456 params.results = data_response.results.suggested.map((result) => { 1457 return { 1458 id: result.id, 1459 content_type: result.content_type 1460 }; 1461 }); 1462 params.suggested = 1; 1463 params.phrase = data_response.results.keywords[0]; 1464 } else { 1465 if (data_response.results.groups !== void 0) { 1466 Object.keys(data_response.results.groups).forEach(function(k) { 1467 data_response.results.groups[k].items.map((result) => { 1468 if (params.results.find((r) => r.id === result.id) === void 0) { 1469 params.results.push({ 1470 id: result.id, 1471 content_type: result.content_type 1472 }); 1473 } 1474 }); 1475 }); 1476 } else if (Array.isArray(data_response.results)) { 1477 params.results = data_response.results.map((result) => { 1478 return { 1479 id: result.id, 1480 content_type: result.content_type 1481 }; 1482 }); 1483 } 1484 } 1485 window.ASP.cache.queue.pushToSend(params); 1486 }; 1487 if ($this.isDuplicateSearchTriggered()) 1488 return false; 1489 recall = typeof recall == "undefined" ? false : recall; 1490 apiCall = typeof apiCall == "undefined" ? false : apiCall; 1491 supressInvalidMsg = typeof supressInvalidMsg == "undefined" ? false : supressInvalidMsg; 1492 this.updateSettingsDeviceField?.(); 1493 let data = prepareRequestData(); 1494 abort = shouldAbortSearch(data, recall, apiCall, supressInvalidMsg); 1495 if (abort) { 1496 $this.hideLoader(); 1497 $this.searchAbort(); 1498 return false; 1499 } 1500 $this.n("s").trigger("asp_search_start", [$this.o.id, $this.o.iid, $this.n("text").val()], true, true); 1501 $this.searching = true; 1502 $this.n("proclose").css({ 1503 display: "none" 1504 }); 1505 $this.showLoader(recall); 1506 if (!$this.att("blocking") && !$this.o.trigger.facet) $this.hideSettings?.(); 1507 applyPaginationData(data, recall); 1508 applyPreviewOptions(data); 1509 applyForcedOptions(data, count, order); 1510 data.version = ASP.version; 1511 $this.gaEvent?.("search_start"); 1512 if (tryLiveLoad()) { 1513 return; 1514 } 1515 if (window.ASP.cache.enabled && window.ASP.cache.type === "super_file") { 1516 const hash = getCacheHash(data); 1517 if (window.ASP.cache.list.has(hash)) { 1518 fetch(window.ASP.cache.url + hash + ".json?t=" + ASP.cache.timestamp).then((response) => { 1519 if (!response.ok) { 1520 throw new Error("Network response was not ok"); 1521 } 1522 return response.json(); 1523 }).then((response) => { 1524 if (window.ASP.statistics.enabled) { 1525 registerCachedStatistics(response); 1526 } 1527 responseHandler(response, hash); 1528 }).catch((error) => { 1529 console.error("Error:", error); 1530 ajaxSearch(data, hash); 1531 window.ASP.initCache(true); 1532 }); 1533 return; 1534 } 1535 ajaxSearch(data, hash); 1536 } else { 1537 ajaxSearch(data); 1538 } 1539}; 1540/* harmony default export */ var search = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 1541 1542;// ./src/client/plugin/core/etc/api.js 1543 1544 1545 1546"use strict"; 1547let api_helpers = base.helpers; 1548base.plugin.searchFor = function(phrase) { 1549 if (typeof phrase != "undefined") { 1550 this.n("text").val(phrase); 1551 } 1552 this.n("textAutocomplete").val(""); 1553 this.search(false, false, false, true); 1554}; 1555base.plugin.searchRedirect = function(phrase) { 1556 let url = this.parseCustomRedirectURL(this.o.trigger.redirect_url, phrase); 1557 if (this.o.homeurl.indexOf("?") > 1 && url.indexOf("?") === 0) { 1558 url = url.replace("?", "&"); 1559 } 1560 if (this.o.overridewpdefault) { 1561 if (this.o.override_method === "post") { 1562 api_helpers.submitToUrl(this.o.homeurl + url, "post", { 1563 asp_active: 1, 1564 p_asid: this.o.id, 1565 p_asp_data: external_DoMini_namespaceObject("form", this.n("searchsettings")).serialize() 1566 }); 1567 } else { 1568 location.href = this.o.homeurl + url + "&asp_active=1&p_asid=" + this.o.id + "&p_asp_data=1&" + external_DoMini_namespaceObject("form", this.n("searchsettings")).serialize(); 1569 } 1570 } else { 1571 api_helpers.submitToUrl(this.o.homeurl + url, "post", { 1572 np_asid: this.o.id, 1573 np_asp_data: external_DoMini_namespaceObject("form", this.n("searchsettings")).serialize() 1574 }); 1575 } 1576}; 1577base.plugin.toggleSettings = function(state) { 1578 if (typeof state != "undefined") { 1579 if (state === "show") { 1580 this.showSettings?.(); 1581 } else { 1582 this.hideSettings?.(); 1583 } 1584 } else { 1585 if (this.n("prosettings").data("opened") === "1") { 1586 this.hideSettings?.(); 1587 } else { 1588 this.showSettings?.(); 1589 } 1590 } 1591}; 1592base.plugin.closeResults = function(clear) { 1593 if (typeof clear != "undefined" && clear) { 1594 this.n("text").val(""); 1595 this.n("textAutocomplete").val(""); 1596 } 1597 this.hideResults(); 1598 this.n("proloading").css("display", "none"); 1599 this.hideLoader(); 1600 this.searchAbort(); 1601}; 1602base.plugin.getStateURL = function() { 1603 let url = location.href, sep; 1604 url = url.split("p_asid"); 1605 url = url[0]; 1606 url = url.replace("&asp_active=1", ""); 1607 url = url.replace("?asp_active=1", ""); 1608 url = url.slice(-1) === "?" ? url.slice(0, -1) : url; 1609 url = url.slice(-1) === "&" ? url.slice(0, -1) : url; 1610 sep = url.indexOf("?") > 1 ? "&" : "?"; 1611 return url + sep + "p_asid=" + this.o.id + "&p_asp_data=1&" + external_DoMini_namespaceObject("form", this.n("searchsettings")).serialize(); 1612}; 1613base.plugin.resetSearch = function() { 1614 this.resetSearchFilters(); 1615}; 1616base.plugin.filtersInitial = function() { 1617 return this.n("searchsettings").find("input[name=filters_initial]").val() === "1"; 1618}; 1619base.plugin.filtersChanged = function() { 1620 return this.n("searchsettings").find("input[name=filters_changed]").val() === "1"; 1621}; 1622/* harmony default export */ var api = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 1623 1624;// ./src/client/plugin/core/etc/position.js 1625 1626 1627 1628"use strict"; 1629let position_helpers = base.helpers; 1630base.plugin.detectAndFixFixedPositioning = function() {
1631 let $this = this, fixedp = false, n = $this.n("search").get(0); 1632 while (n) { 1633 n = n.parentElement; 1634 if (n != null && window.getComputedStyle(n).position === "fixed") { 1635 fixedp = true; 1636 break; 1637 } 1638 } 1639 if (fixedp || $this.n("search").css("position") === "fixed") { 1640 if ($this.n("resultsDiv").css("position") === "absolute") { 1641 $this.n("resultsDiv").css({ 1642 "position": "fixed", 1643 "z-index": 2147483646 1644 }); 1645 } 1646 if (!$this.att("blocking")) { 1647 $this.n("searchsettings").css({ 1648 "position": "fixed", 1649 "z-index": 2147483646 1650 }); 1651 } 1652 } else { 1653 if ($this.n("resultsDiv").css("position") === "fixed") 1654 $this.n("resultsDiv").css("position", "absolute"); 1655 if (!$this.att("blocking")) 1656 $this.n("searchsettings").css("position", "absolute"); 1657 } 1658}; 1659base.plugin.fixSettingsAccessibility = function() { 1660 let $this = this; 1661 $this.n("searchsettings").find("input.asp_select2-search__field").attr("aria-label", "Select2 search"); 1662}; 1663base.plugin.fixTryThisPosition = function() { 1664 let $this = this; 1665 $this.n("trythis").css({ 1666 left: $this.n("search").position().left 1667 }); 1668}; 1669base.plugin.fixResultsPosition = function(ignoreVisibility) { 1670 ignoreVisibility = typeof ignoreVisibility == "undefined" ? false : ignoreVisibility; 1671 let $this = this, $body = external_DoMini_namespaceObject("body"), bodyTop = 0, rpos = $this.n("resultsDiv").css("position"); 1672 if (external_DoMini_namespaceObject._fn.bodyTransformY() !== 0 || $body.css("position") !== "static") { 1673 bodyTop = $body.offset().top; 1674 } 1675 if (external_DoMini_namespaceObject._fn.bodyTransformY() !== 0 && rpos === "fixed") { 1676 rpos = "absolute"; 1677 $this.n("resultsDiv").css("position", "absolute"); 1678 } 1679 if (rpos === "fixed") { 1680 bodyTop = 0; 1681 } 1682 if (rpos !== "fixed" && rpos !== "absolute") { 1683 return; 1684 } 1685 if (ignoreVisibility || $this.n("resultsDiv").css("visibility") === "visible") { 1686 let _rposition = $this.n("search").offset(), bodyLeft = 0; 1687 if (external_DoMini_namespaceObject._fn.bodyTransformX() !== 0 || $body.css("position") !== "static") { 1688 bodyLeft = $body.offset().left; 1689 } 1690 if (typeof _rposition != "undefined") { 1691 let vwidth, adjust = 0; 1692 if (position_helpers.deviceType() === "phone") { 1693 vwidth = $this.o.results.width_phone; 1694 } else if (position_helpers.deviceType() === "tablet") { 1695 vwidth = $this.o.results.width_tablet; 1696 } else { 1697 vwidth = $this.o.results.width; 1698 } 1699 if (vwidth === "auto") { 1700 vwidth = $this.n("search").outerWidth() < 240 ? 240 : $this.n("search").outerWidth(); 1701 } 1702 $this.n("resultsDiv").css("width", !isNaN(vwidth) ? vwidth + "px" : vwidth); 1703 if ($this.o.resultsSnapTo === "right") { 1704 adjust = $this.n("resultsDiv").outerWidth() - $this.n("search").outerWidth(); 1705 } else if ($this.o.resultsSnapTo === "center") { 1706 adjust = Math.floor(($this.n("resultsDiv").outerWidth() - parseInt($this.n("search").outerWidth())) / 2); 1707 } 1708 $this.n("resultsDiv").css({ 1709 top: _rposition.top + $this.n("search").outerHeight(true) - bodyTop + "px", 1710 left: _rposition.left - adjust - bodyLeft + "px" 1711 }); 1712 } 1713 } 1714}; 1715base.plugin.fixSettingsPosition = function(ignoreVisibility) { 1716 ignoreVisibility = typeof ignoreVisibility == "undefined" ? false : ignoreVisibility; 1717 let $this = this, $body = external_DoMini_namespaceObject("body"), bodyTop = 0, settPos = $this.n("searchsettings").css("position"); 1718 if (external_DoMini_namespaceObject._fn.bodyTransformY() !== 0 || $body.css("position") !== "static") { 1719 bodyTop = $body.offset().top; 1720 } 1721 if (external_DoMini_namespaceObject._fn.bodyTransformY() !== 0 && settPos === "fixed") { 1722 settPos = "absolute"; 1723 $this.n("searchsettings").css("position", "absolute"); 1724 } 1725 if (settPos === "fixed") { 1726 bodyTop = 0; 1727 } 1728 if ((ignoreVisibility || $this.n("prosettings").data("opened") === "1") && $this.att("blocking") !== true) { 1729 let $n, sPosition, top, left, bodyLeft = 0; 1730 if (external_DoMini_namespaceObject._fn.bodyTransformX() !== 0 || $body.css("position") !== "static") { 1731 bodyLeft = $body.offset().left; 1732 } 1733 $this.fixSettingsWidth(); 1734 if ($this.n("prosettings").css("display") !== "none") { 1735 $n = $this.n("prosettings"); 1736 } else { 1737 $n = $this.n("promagnifier"); 1738 } 1739 sPosition = $n.offset(); 1740 top = sPosition.top + $n.height() - 2 - bodyTop + "px"; 1741 left = $this.o.settingsimagepos === "left" ? sPosition.left : sPosition.left + $n.width() - $this.n("searchsettings").width(); 1742 left = left - bodyLeft + "px"; 1743 $this.n("searchsettings").css({ 1744 display: "block", 1745 top, 1746 left 1747 }); 1748 } 1749}; 1750base.plugin.fixSettingsWidth = function() {
1751 let $this = this; 1752 if ($this.att("blocking") || $this.o.fss_layout === "masonry") return; 1753 $this.n("searchsettings").css({ "width": "100%" }); 1754 if ($this.n("searchsettings").width() % external_DoMini_namespaceObject("fieldset", $this.n("searchsettings")).outerWidth(true) > 10) { 1755 let newColumnCount = Math.floor($this.n("searchsettings").width() / external_DoMini_namespaceObject("fieldset", $this.n("searchsettings")).outerWidth(true)); 1756 newColumnCount = newColumnCount <= 0 ? 1 : newColumnCount; 1757 $this.n("searchsettings").css({ 1758 "width": newColumnCount * external_DoMini_namespaceObject("fieldset", $this.n("searchsettings")).outerWidth(true) + 8 + "px" 1759 }); 1760 } 1761}; 1762base.plugin.hideOnInvisibleBox = function() { 1763 let $this = this; 1764 if ($this.o.detectVisibility && !$this.o.compact.enabled && !$this.n("search").hasClass("hiddend") && !$this.n("search").isVisible()) { 1765 $this.hideSettings?.(); 1766 $this.hideResults(); 1767 } 1768}; 1769/* harmony default export */ var position = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 1770 1771;// ./src/client/plugin/core/events/button.js 1772 1773 1774 1775"use strict"; 1776let button_helpers = base.helpers; 1777base.plugin.initMagnifierEvents = function() { 1778 let $this = this, t; 1779 $this.n("promagnifier").on("click", function(e) { 1780 let compact = $this.n("search").attr("data-asp-compact") || "closed"; 1781 $this.keycode = e.keyCode || e.which; 1782 $this.ktype = e.type; 1783 if ($this.o.compact.enabled) { 1784 if (compact === "closed" || $this.o.compact.closeOnMagnifier && compact === "open") { 1785 return false; 1786 } 1787 } 1788 $this.gaEvent?.("magnifier"); 1789 if ($this.n("text").val().length >= $this.o.trigger.charcount_magnifier_enter && $this.o.redirectOnClick && $this.o.trigger.click !== "first_result") { 1790 $this.doRedirectToResults("click"); 1791 clearTimeout(t); 1792 return false; 1793 } 1794 if ($this.o.trigger.click === "ajax_search" && $this.n("text").val().length < $this.o.trigger.charcount_magnifier_enter) { 1795 return false; 1796 } 1797 if (!($this.o.trigger.click === "ajax_search" || $this.o.trigger.click === "first_result")) { 1798 return false; 1799 } 1800 $this.searchAbort(); 1801 clearTimeout($this.timeouts.search); 1802 $this.n("proloading").css("display", "none"); 1803 if ($this.n("text").val().length >= $this.o.charcount) { 1804 $this.timeouts.search = setTimeout(function() { 1805 if (external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize() + $this.n("text").val().trim() !== $this.lastSuccesfulSearch || !$this.resultsOpened && !$this.usingLiveLoader()) { 1806 $this.search(); 1807 } else { 1808 if ($this.isRedirectToFirstResult()) 1809 $this.doRedirectToFirstResult(); 1810 else 1811 $this.n("proclose").css("display", "block"); 1812 } 1813 }, $this.o.trigger.delay); 1814 } 1815 }); 1816}; 1817base.plugin.initButtonEvents = function() { 1818 let $this = this; 1819 $this.n("searchsettings").find("button.asp_s_btn").on("click", function(e) { 1820 $this.ktype = "button"; 1821 e.preventDefault(); 1822 if ($this.n("text").val().length >= $this.o.charcount) { 1823 if ($this.o.sb.redirect_action !== "ajax_search") { 1824 if ($this.o.sb.redirect_action !== "first_result") { 1825 $this.doRedirectToResults("button"); 1826 } else { 1827 if ($this.isRedirectToFirstResult()) { 1828 $this.doRedirectToFirstResult(); 1829 return false; 1830 } 1831 $this.search(); 1832 } 1833 } else { 1834 if (external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize() + $this.n("text").val().trim() !== $this.lastSuccesfulSearch || !$this.resultsOpened) { 1835 $this.search(); 1836 } 1837 } 1838 clearTimeout($this.timeouts.search); 1839 } 1840 }); 1841 $this.n("searchsettings").find("button.asp_r_btn").on("click", function(e) { 1842 let currentFormData = button_helpers.formData(external_DoMini_namespaceObject("form", $this.n("searchsettings"))), lastPhrase = $this.n("text").val(); 1843 e.preventDefault(); 1844 $this.resetSearchFilters(); 1845 if ($this.o.rb.action === "live" && (JSON.stringify(currentFormData) !== JSON.stringify(button_helpers.formData(external_DoMini_namespaceObject("form", $this.n("searchsettings")))) || lastPhrase !== "")) { 1846 if ($this.isAutoP) { 1847 $this.initAutop(); 1848 } else { 1849 $this.search(false, false, false, true, true); 1850 } 1851 } else { 1852 if ($this.o.rb.action === "close") { 1853 $this.hideResults(); 1854 } 1855 } 1856 }); 1857}; 1858/* harmony default export */ var events_button = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 1859 1860;// ./src/client/plugin/core/events/input.js 1861 1862 1863 1864"use strict"; 1865let input_helpers = base.helpers; 1866base.plugin.initInputEvents = function() {
1867 let $this = this, initialized = false; 1868 let initTriggers = function() { 1869 $this.n("text").off("mousedown touchstart keydown", initTriggers); 1870 if (!initialized) { 1871 $this._initFocusInput(); 1872 if ($this.o.trigger.type) { 1873 $this._initSearchInput(); 1874 } 1875 $this._initEnterEvent(); 1876 $this._initFormEvent(); 1877 $this.initAutocompleteEvent?.(); 1878 initialized = true; 1879 } 1880 }; 1881 $this.n("text").on("mousedown touchstart keydown", initTriggers, { passive: true }); 1882}; 1883base.plugin._initFocusInput = function() { 1884 let $this = this; 1885 $this.n("text").on("click", function(e) { 1886 e.stopPropagation(); 1887 e.stopImmediatePropagation(); 1888 external_DoMini_namespaceObject(this).trigger("focus"); 1889 $this.gaEvent?.("focus"); 1890 if (external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize() + $this.n("text").val().trim() === $this.lastSuccesfulSearch) { 1891 if (!$this.resultsOpened && !$this.usingLiveLoader()) { 1892 $this._no_animations = true; 1893 $this.showResults(); 1894 $this._no_animations = false; 1895 } 1896 return false; 1897 } 1898 }); 1899 $this.n("text").on("focus input", function() { 1900 if ($this.searching) { 1901 return; 1902 } 1903 if (external_DoMini_namespaceObject(this).val() !== "") { 1904 $this.n("proclose").css("display", "block"); 1905 } else { 1906 $this.n("proclose").css({ 1907 display: "none" 1908 }); 1909 } 1910 }); 1911}; 1912base.plugin._initSearchInput = function() { 1913 let $this = this; 1914 $this.n("text").on("input", function(e) { 1915 $this.keycode = e.keyCode || e.which; 1916 $this.ktype = e.type; 1917 $this.updateHref(); 1918 if (!$this.o.trigger.type) { 1919 $this.searchAbort(); 1920 clearTimeout($this.timeouts.search); 1921 $this.hideLoader(); 1922 return false; 1923 } 1924 $this.hideArrowBox?.(); 1925 if ($this.n("text").val().length < $this.o.charcount) { 1926 $this.n("proloading").css("display", "none"); 1927 if (!$this.att("blocking")) $this.hideSettings?.(); 1928 $this.hideResults(false); 1929 $this.searchAbort(); 1930 clearTimeout($this.timeouts.search); 1931 return false; 1932 } 1933 $this.searchAbort(); 1934 clearTimeout($this.timeouts.search); 1935 $this.n("textAutocomplete").val(""); 1936 $this.n("proloading").css("display", "none"); 1937 $this.timeouts.search = setTimeout(function() { 1938 if (external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize() + $this.n("text").val().trim() !== $this.lastSuccesfulSearch || !$this.resultsOpened && !$this.usingLiveLoader()) { 1939 $this.search(); 1940 } else { 1941 if ($this.isRedirectToFirstResult()) 1942 $this.doRedirectToFirstResult(); 1943 else 1944 $this.n("proclose").css("display", "block"); 1945 } 1946 }, $this.o.trigger.delay); 1947 }); 1948}; 1949base.plugin._initEnterEvent = function() { 1950 let $this = this, rt, enterRecentlyPressed = false; 1951 $this.n("text").on("keyup", function(e) { 1952 $this.keycode = e.keyCode || e.which; 1953 $this.ktype = e.type; 1954 if ($this.keycode === 13) { 1955 clearTimeout(rt); 1956 rt = setTimeout(function() { 1957 enterRecentlyPressed = false; 1958 }, 300); 1959 if (enterRecentlyPressed) { 1960 return false; 1961 } else { 1962 enterRecentlyPressed = true; 1963 } 1964 } 1965 let isInput = external_DoMini_namespaceObject(this).hasClass("orig"); 1966 if (isInput && $this.keycode === 13) { 1967 if ($this.o.redirectOnEnter && $this.n("text").val().length >= $this.o.trigger.charcount_magnifier_enter) { 1968 $this.gaEvent?.("return"); 1969 if ($this.o.trigger.return !== "first_result") { 1970 $this.doRedirectToResults($this.ktype); 1971 } else { 1972 $this.search(); 1973 } 1974 } else if ($this.o.trigger.return === "ajax_search" && $this.n("text").val().length >= $this.o.trigger.charcount_magnifier_enter) { 1975 if (external_DoMini_namespaceObject("form", $this.n("searchsettings")).serialize() + $this.n("text").val().trim() !== $this.lastSuccesfulSearch || !$this.resultsOpened) { 1976 $this.gaEvent?.("return"); 1977 $this.search(); 1978 } 1979 } 1980 clearTimeout($this.timeouts.search); 1981 } 1982 }); 1983}; 1984base.plugin._initFormEvent = function() {
1985 let $this = this; 1986 external_DoMini_namespaceObject($this.n("text").closest("form").get(0)).on("submit", function(e, args) { 1987 e.preventDefault(); 1988 if (input_helpers.isMobile()) { 1989 if ($this.o.redirectOnEnter) { 1990 let event = new Event("keyup"); 1991 event.keyCode = event.which = 13; 1992 this.n("text").get(0).dispatchEvent(event); 1993 } else { 1994 $this.search(); 1995 document.activeElement.blur(); 1996 } 1997 } else if (typeof args != "undefined" && args === "ajax") { 1998 $this.search(); 1999 } 2000 }); 2001}; 2002/* harmony default export */ var input = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 2003 2004;// ./src/client/plugin/core/events/navigation.js 2005 2006 2007 2008"use strict"; 2009base.plugin.initNavigationEvents = function() { 2010 let $this = this; 2011 let handler = function(e) { 2012 let keycode = e.keyCode || e.which; 2013 if (external_DoMini_namespaceObject(".item", $this.n("resultsDiv")).length > 0 && $this.n("resultsDiv").css("display") !== "none" && $this.o.resultstype === "vertical") { 2014 if (keycode === 40 || keycode === 38) { 2015 let $hovered = $this.n("resultsDiv").find(".item.hovered"); 2016 $this.n("text").trigger("blur"); 2017 if ($hovered.length === 0) { 2018 $this.n("resultsDiv").find(".item").first().addClass("hovered"); 2019 } else { 2020 if (keycode === 40) { 2021 if ($hovered.next(".item").length === 0) { 2022 $this.n("resultsDiv").find(".item").removeClass("hovered").first().addClass("hovered"); 2023 } else { 2024 $hovered.removeClass("hovered").next(".item").addClass("hovered"); 2025 } 2026 } 2027 if (keycode === 38) { 2028 if ($hovered.prev(".item").length === 0) { 2029 $this.n("resultsDiv").find(".item").removeClass("hovered").last().addClass("hovered"); 2030 } else { 2031 $hovered.removeClass("hovered").prev(".item").addClass("hovered"); 2032 } 2033 } 2034 } 2035 e.stopPropagation(); 2036 e.preventDefault(); 2037 if (!$this.n("resultsDiv").find(".resdrg .item.hovered").inViewPort(50, $this.n("resultsDiv").get(0))) { 2038 let n = $this.n("resultsDiv").find(".resdrg .item.hovered").get(0); 2039 if (n != null && typeof n.scrollIntoView != "undefined") { 2040 n.scrollIntoView({ behavior: "smooth", block: "start", inline: "nearest" }); 2041 } 2042 } 2043 } 2044 if (keycode === 13 && external_DoMini_namespaceObject(".item.hovered", $this.n("resultsDiv")).length > 0) { 2045 e.stopPropagation(); 2046 e.preventDefault(); 2047 external_DoMini_namespaceObject(".item.hovered a.asp_res_url", $this.n("resultsDiv")).get(0).click(); 2048 } 2049 } 2050 }; 2051 $this.documentEventHandlers.push({ 2052 "node": document, 2053 "event": "keydown", 2054 "handler": handler 2055 }); 2056 external_DoMini_namespaceObject(document).on("keydown", handler); 2057}; 2058/* harmony default export */ var navigation = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 2059 2060;// ./src/client/global/utils/device.ts 2061 2062const deviceType = () => { 2063 let w = window.innerWidth; 2064 if (w <= 640) { 2065 return "phone"; 2066 } else if (w <= 1024) { 2067 return "tablet"; 2068 } else { 2069 return "desktop"; 2070 } 2071}; 2072const detectIOS = () => { 2073 if (typeof window.navigator != "undefined" && typeof window.navigator.userAgent != "undefined") 2074 return window.navigator.userAgent.match(/(iPod|iPhone|iPad)/) != null; 2075 return false; 2076}; 2077const isMobile = () => { 2078 try { 2079 document.createEvent("TouchEvent"); 2080 return true; 2081 } catch (e) { 2082 return false; 2083 } 2084}; 2085const isTouchDevice = () => { 2086 return "ontouchstart" in window; 2087}; 2088 2089;// ./src/client/utils/browser.ts 2090 2091 2092const isFirefox = navigator.userAgent.toLowerCase().includes("firefox"); 2093const ua = navigator.userAgent; 2094const isWebKit = /AppleWebKit/.test(ua) && !/Edge/.test(ua); 2095let fakeInput; 2096const focusInput = (targetInput) => { 2097 if (!detectIOS()) { 2098 targetInput?.focus(); 2099 return; 2100 } 2101 if (targetInput === void 0 || fakeInput === void 0) { 2102 fakeInput = document.createElement("input"); 2103 fakeInput.setAttribute("type", "text"); 2104 fakeInput.style.position = "absolute"; 2105 fakeInput.style.opacity = "0"; 2106 fakeInput.style.height = "0"; 2107 fakeInput.style.fontSize = "16px"; 2108 document.body.prepend(fakeInput); 2109 } 2110 if (targetInput === void 0) { 2111 fakeInput.focus(); 2112 } else { 2113 targetInput.focus(); 2114 } 2115}; 2116 2117 2118;// ./src/client/plugin/core/events/other.js 2119 2120 2121 2122 2123"use strict"; 2124let other_helpers = base.helpers; 2125base.plugin.initOtherEvents = function() {
2126 let $this = this, handler, handler2; 2127 if ($this.o.preventEvents && typeof jQuery !== "undefined") { 2128 jQuery($this.n("search").get(0)).closest("a, li").off(); 2129 } 2130 if (other_helpers.isMobile() && other_helpers.detectIOS()) { 2131 $this.n("text").on("touchstart", function() { 2132 $this.savedScrollTop = window.scrollY; 2133 $this.savedContainerTop = $this.n("search").offset().top; 2134 }); 2135 } 2136 if ($this.o.focusOnPageload) { 2137 external_DoMini_namespaceObject(window).on("load", function() { 2138 $this.n("text").get(0).focus(); 2139 }, { "options": { "once": true } }); 2140 } 2141 $this.n("proclose").on($this.clickTouchend, function(e) { 2142 e.preventDefault(); 2143 e.stopImmediatePropagation(); 2144 $this.n("text").val(""); 2145 $this.n("textAutocomplete").val(""); 2146 $this.n("proloading").css("display", "none"); 2147 $this.hideLoader(); 2148 $this.searchAbort(); 2149 if ($this.o.close_icon.action === "clear") { 2150 if ($this.o.close_icon.close_results) { 2151 $this.hideResults(); 2152 } 2153 } else if ($this.o.close_icon.action === "reset") { 2154 $this.resetSearchFilters(); 2155 if ($this.o.close_icon.close_results) { 2156 $this.hideResults(); 2157 } 2158 } else if ($this.o.close_icon.action === "reset_and_search") { 2159 $this.resetSearchFilters(); 2160 if ($this.usingLiveLoader()) { 2161 if (external_DoMini_namespaceObject(".asp_es_" + $this.o.id).length > 0) { 2162 $this.showLoader(); 2163 $this.liveLoad(".asp_es_" + $this.o.id, $this.getCurrentLiveURL(), $this.o.trigger.update_href); 2164 } else { 2165 const array = ["resPage", "wooShop", "taxArchive", "cptArchive"]; 2166 for (let i = 0; i < array.length; i++) { 2167 if ($this.o[array[i]].useAjax) { 2168 $this.showLoader(); 2169 $this.liveLoad($this.o[array[i]].selector, $this.getCurrentLiveURL()); 2170 break; 2171 } 2172 } 2173 } 2174 } else { 2175 if ($this.o.autop.state !== "disabled") { 2176 $this.initAutop(); 2177 } else { 2178 $this.search(false, false, false, true, true); 2179 } 2180 } 2181 $this.n("proclose").addClass("--skip"); 2182 } 2183 $this.n("proclose").css({ 2184 display: "none" 2185 }); 2186 $this.n("text").trigger("focus"); 2187 $this.n("text").get(0).focus(); 2188 }); 2189 if (other_helpers.isMobile()) { 2190 handler = function() { 2191 $this.orientationChange(); 2192 setTimeout(function() { 2193 $this.orientationChange(); 2194 }, 600); 2195 }; 2196 $this.documentEventHandlers.push({ 2197 "node": window, 2198 "event": "orientationchange", 2199 "handler": handler 2200 }); 2201 external_DoMini_namespaceObject(window).on("orientationchange", handler); 2202 } else { 2203 handler = function() { 2204 $this.resize(); 2205 }; 2206 $this.documentEventHandlers.push({ 2207 "node": window, 2208 "event": "resize", 2209 "handler": handler 2210 }); 2211 external_DoMini_namespaceObject(window).on("resize", handler, { passive: true }); 2212 } 2213 handler2 = function() { 2214 $this.scrolling(false); 2215 }; 2216 $this.documentEventHandlers.push({ 2217 "node": window, 2218 "event": "scroll", 2219 "handler": handler2 2220 }); 2221 external_DoMini_namespaceObject(window).on("scroll", handler2, { passive: true }); 2222 if (other_helpers.isMobile() && $this.o.mobile.menu_selector !== "") { 2223 external_DoMini_namespaceObject($this.o.mobile.menu_selector).on("touchend", function(e) { 2224 let _this = this; 2225 focusInput(); 2226 setTimeout(function() { 2227 let $input = external_DoMini_namespaceObject(_this).find("input.orig"); 2228 $input = $input.length === 0 ? external_DoMini_namespaceObject(_this).next().find("input.orig") : $input; 2229 $input = $input.length === 0 ? external_DoMini_namespaceObject(_this).parent().find("input.orig") : $input; 2230 $input = $input.length === 0 ? $this.n("text") : $input; 2231 if ($this.n("search").inViewPort()) { 2232 focusInput($input.get(0)); 2233 } 2234 }, 1e3); 2235 }); 2236 } 2237 if (other_helpers.detectIOS() && other_helpers.isMobile() && other_helpers.isTouchDevice()) { 2238 if (parseInt($this.n("text").css("font-size")) < 16) { 2239 $this.n("text").data("fontSize", $this.n("text").css("font-size")).css("font-size", "16px"); 2240 $this.n("textAutocomplete").css("font-size", "16px"); 2241 external_DoMini_namespaceObject("body").append("<style>#ajaxsearchpro" + $this.o.rid + " input.orig::-webkit-input-placeholder{font-size: 16px !important;}</style>"); 2242 } 2243 } 2244}; 2245base.plugin.orientationChange = function() { 2246 const $this = this; 2247 $this.detectAndFixFixedPositioning(); 2248 $this.fixSettingsPosition(); 2249 $this.fixResultsPosition(); 2250 $this.fixTryThisPosition(); 2251 $this.updateSettingsDeviceField?.(); 2252 if ($this.o.resultstype === "isotopic" && $this.n("resultsDiv").css("visibility") === "visible") { 2253 $this.calculateIsotopeRows(); 2254 $this.showPagination(true); 2255 $this.removeAnimation(); 2256 } 2257}; 2258base.plugin.resize = function() { 2259 this.hideArrowBox?.(); 2260 this.orientationChange(); 2261 this.updateSettingsDeviceField?.(); 2262}; 2263base.plugin.scrolling = function(ignoreVisibility) {
2264 let $this = this; 2265 $this.detectAndFixFixedPositioning(); 2266 $this.hideOnInvisibleBox(); 2267 $this.fixSettingsPosition(ignoreVisibility); 2268 $this.fixResultsPosition(ignoreVisibility); 2269}; 2270base.plugin.initTryThisEvents = function() { 2271 let $this = this; 2272 if ($this.n("trythis").find("a").length > 0) { 2273 $this.n("trythis").find("a").on("click touchend", function(e) { 2274 e.preventDefault(); 2275 e.stopImmediatePropagation(); 2276 if ($this.o.compact.enabled) { 2277 let state = $this.n("search").attr("data-asp-compact") || "closed"; 2278 if (state === "closed") 2279 $this.n("promagnifier").trigger("click"); 2280 } 2281 document.activeElement.blur(); 2282 $this.n("textAutocomplete").val(""); 2283 $this.n("text").val(external_DoMini_namespaceObject(this).text()); 2284 $this.gaEvent?.("try_this"); 2285 if ($this.o.trigger.type) { 2286 $this.searchWithCheck(80); 2287 } 2288 }); 2289 $this.n("trythis").css({ 2290 visibility: "visible" 2291 }); 2292 } 2293}; 2294base.plugin.initSelect2 = function() { 2295 let $this = this; 2296 window.WPD.intervalUntilExecute(function(jq) { 2297 if (typeof jq.fn.asp_select2 !== "undefined") { 2298 $this.select2jQuery = jq; 2299 external_DoMini_namespaceObject("select.asp_gochosen, select.asp_goselect2", $this.n("searchsettings")).forEach(function() { 2300 external_DoMini_namespaceObject(this).removeAttr("data-asp_select2-id"); 2301 external_DoMini_namespaceObject(this).find('option[value=""]').val("__any__"); 2302 $this.select2jQuery(this).asp_select2({ 2303 width: "100%", 2304 theme: "flat", 2305 allowClear: external_DoMini_namespaceObject(this).find('option[value=""]').length > 0, 2306 "language": { 2307 "noResults": function() { 2308 return $this.o.select2.nores; 2309 } 2310 }, 2311 escapeMarkup: function(markup) { 2312 return markup; 2313 } 2314 }); 2315 $this.select2jQuery(this).on("change", function() { 2316 external_DoMini_namespaceObject(this).trigger("change"); 2317 }); 2318 }); 2319 } 2320 }, function() { 2321 return other_helpers.whichjQuery("asp_select2"); 2322 }); 2323}; 2324/* harmony default export */ var events_other = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 2325 2326;// ./src/client/plugin/core/events/results.js 2327 2328 2329 2330"use strict"; 2331base.plugin.initResultsEvents = function() { 2332 let $this = this; 2333 $this.n("resultsDiv").css({ 2334 opacity: "0" 2335 }); 2336 let handler = function(e) { 2337 let keycode = e.keyCode || e.which, ktype = e.type; 2338 if (external_DoMini_namespaceObject(e.target).closest(".asp_w, .asp-sl-overlay, .asp-simple-lightbox").length === 0) { 2339 $this.hideOnInvisibleBox(); 2340 $this.hideArrowBox?.(); 2341 if (ktype !== "click" || ktype !== "touchend" || keycode !== 3) { 2342 if ($this.o.compact.enabled) { 2343 let compact = $this.n("search").attr("data-asp-compact") || "closed"; 2344 if ($this.o.compact.closeOnDocument && compact === "open" && !$this.resultsOpened) { 2345 $this.closeCompact(); 2346 $this.searchAbort(); 2347 $this.hideLoader(); 2348 } 2349 } else { 2350 if (!$this.resultsOpened || !$this.o.closeOnDocClick) return; 2351 } 2352 if (!$this.dragging) { 2353 $this.hideLoader(); 2354 $this.searchAbort(); 2355 $this.hideResults(); 2356 } 2357 } 2358 } 2359 }; 2360 $this.documentEventHandlers.push({ 2361 "node": document, 2362 "event": $this.clickTouchend, 2363 "handler": handler 2364 }); 2365 external_DoMini_namespaceObject(document).on($this.clickTouchend, handler); 2366 const recordInteractions = ASP.statistics.enabled && ASP.statistics.record_results && ASP.statistics.record_result_interactions; 2367 $this.n("resultsDiv").on("click", ".results .item", function(e) { 2368 if ($this.o.results.disableClick) { 2369 e.preventDefault(); 2370 return false; 2371 } 2372 if (external_DoMini_namespaceObject(this).attr("id") !== "") { 2373 $this.updateHref("#" + external_DoMini_namespaceObject(this).attr("id")); 2374 } 2375 if (recordInteractions) { 2376 ASP.registerInteraction(this, $this.statisticsID); 2377 } 2378 $this.gaEvent?.("result_click", { 2379 "result_title": external_DoMini_namespaceObject(this).find("a.asp_res_url").text(), 2380 "result_url": external_DoMini_namespaceObject(this).find("a.asp_res_url").attr("href") 2381 }); 2382 }); 2383 if ($this.o.resultstype === "isotopic") { 2384 $this.n("resultsDiv").on("swiped-left", function() { 2385 if ($this.visiblePagination()) 2386 $this.n("resultsDiv").find("a.asp_next").trigger("click"); 2387 }); 2388 $this.n("resultsDiv").on("swiped-right", function() { 2389 if ($this.visiblePagination()) 2390 $this.n("resultsDiv").find("a.asp_prev").trigger("click"); 2391 }); 2392 } 2393}; 2394/* harmony default export */ var results = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 2395 2396;// ./src/client/plugin/core/events/touch.js 2397 2398 2399 2400"use strict"; 2401base.plugin.monitorTouchMove = function() {
2402 let $this = this; 2403 $this.dragging = false; 2404 external_DoMini_namespaceObject("body").on("touchmove", function() { 2405 $this.dragging = true; 2406 }).on("touchstart", function() { 2407 $this.dragging = false; 2408 }); 2409}; 2410/* harmony default export */ var touch = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 2411 2412;// ./src/client/plugin/core/init/autopopulate.js 2413 2414 2415let autopopulate_helpers = base.helpers; 2416"use strict"; 2417base.plugin.initAutop = function() { 2418 let $this = this; 2419 if ($this.o.autop.state === "disabled") return false; 2420 let location = window.location.href; 2421 let stop = location.indexOf("asp_ls=") > -1 || location.indexOf("asp_ls&") > -1; 2422 if (stop) { 2423 return false; 2424 } 2425 let count = $this.o.show_more.enabled && $this.o.show_more.action === "ajax" ? false : $this.o.autop.count; 2426 $this.isAutoP = true; 2427 if ($this.o.compact.enabled) { 2428 $this.openCompact(); 2429 } 2430 if ($this.o.autop.state === "phrase") { 2431 if (!$this.o.is_results_page) { 2432 $this.n("text").val(autopopulate_helpers.decodeHTMLEntities($this.o.autop.phrase)); 2433 } 2434 $this.search(count); 2435 } else if ($this.o.autop.state === "latest") { 2436 $this.search(count, 1); 2437 } else { 2438 $this.search(count, 2); 2439 } 2440}; 2441/* harmony default export */ var autopopulate = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 2442 2443;// ./src/client/plugin/core/init/etc.js 2444 2445 2446 2447"use strict"; 2448let etc_helpers = base.helpers; 2449base.plugin.initEtc = function() { 2450 let $this = this; 2451 $this.il = { 2452 columns: 3, 2453 rows: $this.o.isotopic.pagination ? $this.o.isotopic.rows : 1e4, 2454 itemsPerPage: 6, 2455 lastVisibleItem: -1 2456 }; 2457 $this.filterFns = { 2458 number: function(i, el) { 2459 if (typeof el === "undefined" || typeof i === "object") { 2460 el = i; 2461 } 2462 const number = external_DoMini_namespaceObject(el).attr("data-itemnum"), currentPage = $this.currentPage, itemsPerPage = $this.il.itemsPerPage; 2463 if (number % ($this.il.columns * $this.il.rows) < $this.il.columns * ($this.il.rows - 1)) 2464 external_DoMini_namespaceObject(el).addClass("asp_gutter_bottom"); 2465 else 2466 external_DoMini_namespaceObject(el).removeClass("asp_gutter_bottom"); 2467 return parseInt(number, 10) < itemsPerPage * currentPage && parseInt(number, 10) >= itemsPerPage * (currentPage - 1); 2468 } 2469 }; 2470 etc_helpers.Hooks.applyFilters("asp/init/etc", $this); 2471}; 2472base.plugin.initInfiniteScroll = function() { 2473 let $this = this; 2474 if ($this.o.show_more.infinite && $this.o.resultstype !== "polaroid") { 2475 let t, handler; 2476 handler = function() { 2477 clearTimeout(t); 2478 t = setTimeout(function() { 2479 $this.checkAndTriggerInfiniteScroll("window"); 2480 }, 80); 2481 }; 2482 $this.documentEventHandlers.push({ 2483 "node": window, 2484 "event": "scroll", 2485 "handler": handler 2486 }); 2487 external_DoMini_namespaceObject(window).on("scroll", handler); 2488 $this.n("results").on("scroll", handler); 2489 let tt; 2490 $this.n("resultsDiv").on("nav_switch", function() { 2491 clearTimeout(tt); 2492 tt = setTimeout(function() { 2493 $this.checkAndTriggerInfiniteScroll("isotopic"); 2494 }, 800); 2495 }); 2496 } 2497}; 2498base.plugin.hooks = function() { 2499 let $this = this; 2500 $this.n("s").on("asp_elementor_results", function(e, id) { 2501 if (parseInt($this.o.id) === parseInt(id)) { 2502 if (typeof window.jetpackLazyImagesModule == "function") { 2503 setTimeout(function() { 2504 window.jetpackLazyImagesModule(); 2505 }, 300); 2506 } 2507 } 2508 }); 2509}; 2510/* harmony default export */ var etc = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 2511 2512;// ./src/client/plugin/core/init/init.js 2513 2514 2515 2516"use strict"; 2517let init_helpers = base.helpers; 2518base.plugin.init = function(options, elem) { 2519 let $this = this; 2520 $this.searching = false; 2521 $this.triggerPrevState = false; 2522 $this.isAutoP = false; 2523 $this.autopStartedTheSearch = false; 2524 $this.autopData = {}; 2525 $this.settingsInitialized = false; 2526 $this.resultsInitialized = false; 2527 $this.settingsChanged = false; 2528 $this.resultsOpened = false; 2529 $this.post = null; 2530 $this.postAuto = null; 2531 $this.savedScrollTop = 0; 2532 $this.savedContainerTop = 0; 2533 $this.disableMobileScroll = false;
2534 $this.clickTouchend = "click touchend"; 2535 $this.mouseupTouchend = "mouseup touchend"; 2536 $this.noUiSliders = []; 2537 $this.timeouts = { 2538 "compactBeforeOpen": null, 2539 "compactAfterOpen": null, 2540 "search": null, 2541 "searchWithCheck": null 2542 }; 2543 $this.eh = {}; 2544 $this.documentEventHandlers = [ 2545 /** 2546 * {"node": document|window, "event": event_name, "handler": function()..} 2547 */ 2548 ]; 2549 $this.currentPage = 1; 2550 $this.currentPageURL = location.href; 2551 $this.isotopic = null; 2552 $this.sIsotope = null; 2553 $this.lastSuccesfulSearch = ""; 2554 $this.lastSearchData = {}; 2555 $this._no_animations = false; 2556 $this.call_num = 0; 2557 $this.results_num = 0; 2558 $this.o = external_DoMini_namespaceObject.fn.extend({}, options); 2559 $this.dynamicAtts = {}; 2560 $this.nodes = {}; 2561 $this.nodes.search = external_DoMini_namespaceObject(elem); 2562 if (init_helpers.isMobile()) 2563 $this.animOptions = $this.o.animations.mob; 2564 else 2565 $this.animOptions = $this.o.animations.pc; 2566 $this.initNodeVariables(); 2567 $this.animationOpacity = $this.animOptions.items.indexOf("In") < 0 ? "opacityOne" : "opacityZero"; 2568 $this.o.resPage.useAjax = $this.o.compact.enabled ? 0 : $this.o.resPage.useAjax; 2569 if (init_helpers.isMobile()) { 2570 $this.o.trigger.type = $this.o.mobile.trigger_on_type; 2571 $this.o.trigger.click = $this.o.mobile.click_action; 2572 $this.o.trigger.click_location = $this.o.mobile.click_action_location; 2573 $this.o.trigger.return = $this.o.mobile.return_action; 2574 $this.o.trigger.return_location = $this.o.mobile.return_action_location; 2575 $this.o.trigger.redirect_url = $this.o.mobile.redirect_url; 2576 $this.o.trigger.elementor_url = $this.o.mobile.elementor_url; 2577 } 2578 $this.o.redirectOnClick = $this.o.trigger.click !== "ajax_search" && $this.o.trigger.click !== "nothing"; 2579 $this.o.redirectOnEnter = $this.o.trigger.return !== "ajax_search" && $this.o.trigger.return !== "nothing"; 2580 if ($this.usingLiveLoader()) { 2581 $this.o.trigger.type = $this.o.resPage.trigger_type; 2582 $this.o.trigger.facet = $this.o.resPage.trigger_facet; 2583 if ($this.o.resPage.trigger_magnifier) { 2584 $this.o.redirectOnClick = 0; 2585 $this.o.trigger.click = "ajax_search"; 2586 } 2587 if ($this.o.resPage.trigger_return) { 2588 $this.o.redirectOnEnter = 0; 2589 $this.o.trigger.return = "ajax_search"; 2590 } 2591 } 2592 $this.statisticsID = $this.n("container").data("statistics-id"); 2593 $this.statisticsID = $this.statisticsID === "" ? 0 : parseInt($this.statisticsID); 2594 if ($this.o.compact.overlay && external_DoMini_namespaceObject("#asp_absolute_overlay").length === 0) { 2595 external_DoMini_namespaceObject("body").append("<div id='asp_absolute_overlay'></div>"); 2596 } 2597 if ($this.usingLiveLoader()) { 2598 $this.initLiveLoaderPopState?.(); 2599 } 2600 if (typeof $this.initCompact !== "undefined") { 2601 $this.initCompact(); 2602 } 2603 $this.monitorTouchMove(); 2604 $this.initEvents(); 2605 $this.initAutop(); 2606 $this.initEtc(); 2607 $this.hooks(); 2608 $this.n("s").trigger("asp_init_search_bar", [$this.o.id, $this.o.iid], true, true); 2609 return this; 2610}; 2611base.plugin.n = function(k) { 2612 if (typeof this.nodes[k] !== "undefined") { 2613 return this.nodes[k]; 2614 } else { 2615 switch (k) { 2616 case "s": 2617 this.nodes[k] = this.nodes.search; 2618 break; 2619 case "container": 2620 this.nodes[k] = this.nodes.search.closest(".asp_w_container"); 2621 break; 2622 case "searchsettings": 2623 this.nodes[k] = external_DoMini_namespaceObject(".asp_ss", this.n("container")); 2624 break; 2625 case "resultsDiv": 2626 this.nodes[k] = external_DoMini_namespaceObject(".asp_r", this.n("container")); 2627 break; 2628 case "probox": 2629 this.nodes[k] = external_DoMini_namespaceObject(".probox", this.nodes.search); 2630 break; 2631 case "proinput": 2632 this.nodes[k] = external_DoMini_namespaceObject(".proinput", this.nodes.search); 2633 break; 2634 case "text": 2635 this.nodes[k] = external_DoMini_namespaceObject(".proinput input.orig", this.nodes.search); 2636 break; 2637 case "textAutocomplete": 2638 this.nodes[k] = external_DoMini_namespaceObject(".proinput input.autocomplete", this.nodes.search); 2639 break; 2640 case "proloading": 2641 this.nodes[k] = external_DoMini_namespaceObject(".proloading", this.nodes.search); 2642 break; 2643 case "proclose": 2644 this.nodes[k] = external_DoMini_namespaceObject(".proclose", this.nodes.search); 2645 break; 2646 case "promagnifier": 2647 this.nodes[k] = external_DoMini_namespaceObject(".promagnifier", this.nodes.search); 2648 break; 2649 case "prosettings": 2650 this.nodes[k] = external_DoMini_namespaceObject(".prosettings", this.nodes.search); 2651 break; 2652 case "settingsAppend": 2653 this.nodes[k] = external_DoMini_namespaceObject("#wpdreams_asp_settings_" + this.o.id); 2654 break; 2655 case "resultsAppend": 2656 this.nodes[k] = external_DoMini_namespaceObject("#wpdreams_asp_results_" + this.o.id); 2657 break; 2658 case "trythis": 2659 this.nodes[k] = external_DoMini_namespaceObject("#asp-try-" + this.o.rid); 2660 break; 2661 case "hiddenContainer": 2662 this.nodes[k] = external_DoMini_namespaceObject(".asp_hidden_data", this.n("container")); 2663 break; 2664 case "aspItemOverlay": 2665 this.nodes[k] = external_DoMini_namespaceObject(".asp_item_overlay", this.n("hiddenContainer")); 2666 break; 2667 case "showmoreContainer": 2668 this.nodes[k] = external_DoMini_namespaceObject(".asp_showmore_container", this.n("resultsDiv")); 2669 break; 2670 case "showmore": 2671 this.nodes[k] = external_DoMini_namespaceObject(".showmore", this.n("resultsDiv")); 2672 break; 2673 case "items": 2674 this.nodes[k] = external_DoMini_namespaceObject(".item", this.n("resultsDiv")).length > 0 ? external_DoMini_namespaceObject(".item", this.n("resultsDiv")) : external_DoMini_namespaceObject(".photostack-flip", this.n("resultsDiv")); 2675 break; 2676 case "results": 2677 this.nodes[k] = external_DoMini_namespaceObject(".results", this.n("resultsDiv")); 2678 break; 2679 case "resdrg": 2680 this.nodes[k] = external_DoMini_namespaceObject(".resdrg", this.n("resultsDiv")); 2681 break; 2682 } 2683 return this.nodes[k]; 2684 } 2685}; 2686base.plugin.att = function(k) { 2687 if (typeof this.dynamicAtts[k] !== "undefined") { 2688 return this.dynamicAtts[k]; 2689 } else { 2690 switch (k) { 2691 case "blocking": 2692 this.dynamicAtts[k] = this.n("searchsettings").hasClass("asp_sb"); 2693 } 2694 } 2695 return this.dynamicAtts[k]; 2696}; 2697base.plugin.initNodeVariables = function() {
2698 let $this = this; 2699 $this.o.id = $this.nodes.search.data("id"); 2700 $this.o.iid = $this.nodes.search.data("instance"); 2701 $this.o.rid = $this.o.id + "_" + $this.o.iid; 2702 $this.fixClonedSelf(); 2703}; 2704base.plugin.initEvents = function() { 2705 this.initSettingsSwitchEvents?.(); 2706 this.initOtherEvents(); 2707 this.initTryThisEvents(); 2708 this.initMagnifierEvents(); 2709 this.initInputEvents(); 2710 if (this.o.compact.enabled) { 2711 this.initCompactEvents(); 2712 } 2713}; 2714/* harmony default export */ var init = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 2715 2716;// ./src/client/plugin/core/init/results.js 2717 2718 2719 2720"use strict"; 2721let init_results_helpers = base.helpers; 2722base.plugin.initResults = function() { 2723 if (!this.resultsInitialized) { 2724 this.initResultsBox(); 2725 this.initResultsEvents(); 2726 if (this.o.resultstype === "vertical") { 2727 this.initNavigationEvents?.(); 2728 } 2729 if (this.o.resultstype === "isotopic") { 2730 this.initIsotopicPagination?.(); 2731 } 2732 } 2733}; 2734base.plugin.initResultsBox = function() { 2735 let $this = this; 2736 $this.initResultsAnimations(); 2737 if (init_results_helpers.isMobile() && $this.o.mobile.force_res_hover) { 2738 $this.o.resultsposition = "hover"; 2739 $this.nodes.resultsDiv = $this.n("resultsDiv").clone(); 2740 external_DoMini_namespaceObject("body").append($this.nodes.resultsDiv); 2741 $this.n("resultsDiv").css({ 2742 "position": "absolute" 2743 }); 2744 } else { 2745 if ($this.o.resultsposition === "hover" && $this.n("resultsAppend").length <= 0) { 2746 $this.nodes.resultsDiv = $this.n("resultsDiv").clone(); 2747 external_DoMini_namespaceObject("body").append($this.nodes.resultsDiv); 2748 } else { 2749 $this.o.resultsposition = "block"; 2750 $this.n("resultsDiv").css({ 2751 "position": "static" 2752 }); 2753 if ($this.n("resultsAppend").length > 0) { 2754 if ($this.n("resultsAppend").find(".asp_r_" + $this.o.id).length > 0) { 2755 $this.nodes.resultsDiv = $this.n("resultsAppend").find(".asp_r_" + $this.o.id); 2756 if (typeof $this.nodes.resultsDiv.get(0).referenced !== "undefined") { 2757 ++$this.nodes.resultsDiv.get(0).referenced; 2758 } else { 2759 $this.nodes.resultsDiv.get(0).referenced = 1; 2760 } 2761 } else { 2762 $this.nodes.resultsDiv = $this.nodes.resultsDiv.clone(); 2763 $this.nodes.resultsAppend.append($this.nodes.resultsDiv); 2764 } 2765 } 2766 } 2767 } 2768 $this.nodes.showmore = external_DoMini_namespaceObject(".showmore", $this.nodes.resultsDiv); 2769 $this.nodes.items = external_DoMini_namespaceObject(".item", $this.n("resultsDiv")).length > 0 ? external_DoMini_namespaceObject(".item", $this.nodes.resultsDiv) : external_DoMini_namespaceObject(".photostack-flip", $this.nodes.resultsDiv); 2770 $this.nodes.results = external_DoMini_namespaceObject(".results", $this.nodes.resultsDiv); 2771 $this.nodes.resdrg = external_DoMini_namespaceObject(".resdrg", $this.nodes.resultsDiv); 2772 $this.nodes.resultsDiv.get(0).id = $this.nodes.resultsDiv.get(0).id.replace("__original__", ""); 2773 $this.detectAndFixFixedPositioning(); 2774 $this.initInfiniteScroll(); 2775 $this.resultsInitialized = true; 2776}; 2777base.plugin.initResultsAnimations = function() { 2778 let $this = this, rpos = $this.n("resultsDiv").css("position"), blocking = rpos !== "fixed" && rpos !== "absolute"; 2779 $this.resAnim = { 2780 "showClass": "", 2781 "showCSS": { 2782 "visibility": "visible", 2783 "display": "block", 2784 "opacity": 1, 2785 "animation-duration": $this.animOptions.results.dur + "ms" 2786 }, 2787 "hideClass": "", 2788 "hideCSS": { 2789 "visibility": "hidden", 2790 "opacity": 0, 2791 "display": "none" 2792 }, 2793 "duration": $this.animOptions.results.dur + "ms" 2794 }; 2795 if ($this.animOptions.results.anim === "fade") { 2796 $this.resAnim.showClass = "asp_an_fadeIn"; 2797 $this.resAnim.hideClass = "asp_an_fadeOut"; 2798 } 2799 if ($this.animOptions.results.anim === "fadedrop" && !blocking) { 2800 $this.resAnim.showClass = "asp_an_fadeInDrop"; 2801 $this.resAnim.hideClass = "asp_an_fadeOutDrop"; 2802 } else if ($this.animOptions.results.anim === "fadedrop") { 2803 $this.resAnim.showClass = "asp_an_fadeIn"; 2804 $this.resAnim.hideClass = "asp_an_fadeOut"; 2805 } 2806 $this.n("resultsDiv").css({ 2807 "-webkit-animation-duration": $this.resAnim.duration + "ms", 2808 "animation-duration": $this.resAnim.duration + "ms"
2809 }); 2810}; 2811/* harmony default export */ var init_results = ((/* unused pure expression or super */ null && (AjaxSearchPro))); 2812 2813;// ./src/client/bundle/optimized/asp-core.js 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837/* harmony default export */ var asp_core = (base); 2838 2839Object(window.WPD).AjaxSearchPro = __webpack_exports__["default"]; 2840/******/ })() 2841;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.