(function(){"use strict";var i={};(function(){i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t}})(),(function(){i.d=function(e,t){for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}})(),(function(){i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}})();var _=e=>{let t=!1;const o=()=>document.readyState==="complete"||document.readyState==="interactive"||document.readyState==="loaded",n=()=>{window.removeEventListener("DOMContentLoaded",c),document.removeEventListener("readystatechange",r)},a=()=>{t||(t=!0,e(),n())},c=()=>{a()},r=()=>{o()&&a()};o()?a():(window.addEventListener("DOMContentLoaded",c),document.addEventListener("readystatechange",r))},y=window.WPD_Modal,f=i.n(y);const u=(e,t,o={})=>{if(!e)throw new Error("Cookie name is required.");const{days:n,hours:a,minutes:c,path:r="/",domain:p,secure:C,sameSite:h}=o;let m="";if(n||a||c){const l=new Date,v=(n||0)*24*60*60*1e3+(a||0)*60*60*1e3+(c||0)*60*1e3;l.setTime(l.getTime()+v),m=`; expires=${l.toUTCString()}`}let d=`${encodeURIComponent(e)}=${encodeURIComponent(t)}${m}; path=${r}`;p&&(d+=`; domain=${p}`),C&&(d+="; secure"),h&&(d+=`; samesite=${h}`),document.cookie=d},E=e=>{if(!e)throw new Error("Cookie name is required.");const t=encodeURIComponent(e)+"=",n=decodeURIComponent(document.cookie).split("; ");for(const a of n)if(a.startsWith(t))return a.substring(t.length);return null},O=(e,t={})=>{if(!e)throw new Error("Cookie name is required.");u(e,"",{...t,days:-1})};var w=window.wp.apiFetch,k=i.n(w),b=window.wp.url;let s={};function g(e,t=!1,o=!0){const n=JSON.stringify(e);if(!t&&s[n])return s[n];o&&(e.path=(0,b.addQueryArgs)(e.path,{timestamp:Date.now()}));const a=k()(e).then(c=>c).catch(c=>{throw delete s[n],c});return s[n]=a,a}function S(e){if(e===void 0){s={};return}delete s[e]}_(()=>{if(Number(ASP_BACKEND.asset_rev)>0){f().show({type:"warning",header:"Please verify your license!",content:'<p>Verifying the license ensures that the plugin is secure and automatically up to date.</p><p>If you need a license, you can grab one on the <a style="font-size:inherit" target="_blank" href="https://ajaxsearchpro.com/pricing/?utm_source=license_activation_modal">pricing page.</a></p>',showCloseIcon:!1,closeOnBackgroundClick:!1,buttons:{okay:{text:"Activate license",type:"okay",click:()=>{window.location.href=ASP_BACKEND.admin_url+"admin.php?page=asp_updates_help#license"}}}});return}g({path:"/ajax-search-pro/timed_modal/get",method:"GET"}).then(e=>{if(e){const t={type:e.type??"info",header:e.heading,content:e.content,showCloseIcon:!!e.show_close_icon,closeOnBackgroundClick:!!e.close_on_background_click};if(e.buttons){const o={};Object.keys(e.buttons).forEach((n,a)=>{o[n]={text:e.buttons[n].text,type:e.buttons[n].type},o[n].click=c=>{if(c.preventDefault(),e.buttons[n].dismmisses_forever&&u(e.clicked_okay_cookie_name,"yes",{days:1}),e.buttons[n].href)if(e.buttons[n].target&&e.buttons[n].target=="_blank"){let r=document.createElement("a");r.target="_blank",r.href=e.buttons[n].href,r.click()}else location.href=e.buttons[n].href}}),t.buttons=o}f().show(t),u(e.displayed_cookie_name,"yes",{days:1})}}).catch(e=>{console.log("Timed modal fetch error.",e)})})})();
