D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
oems
/
wp-content
/
plugins
/
ajax-search-lite
/
build
/
js
/
Filename :
analytics.js
back
Copy
(function(){var dn={8623:(function(s){(function(M,L){s.exports=L()})(window,(()=>(()=>{"use strict";var M={d:(t,n)=>{for(var r in n)M.o(n,r)&&!M.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n)},L={};let f;M.d(L,{default:()=>J}),window.DoMini===void 0?(f=function(t,n){return arguments[2]!==void 0?this.constructor.call(this,t,n):arguments.length!==1||typeof arguments[0]!="function"?new f(t,n,!0):void(document.readyState==="complete"||document.readyState==="loaded"||document.readyState==="interactive"?arguments[0].apply(this,[f]):window.addEventListener("DOMContentLoaded",(()=>{arguments[0].apply(this,[f])})))},f.prototype=f.fn={constructor:function(t,n){if(this.length=0,n!==void 0){if(n instanceof f)return n.find(t);if(this.isValidNode(n)||typeof n=="string")return f(n).find(t)}else if(typeof t=="string"&&t!=="")this.push(...this._(t));else{if(t instanceof f)return t;this.isValidNode(t)&&this.push(t)}return this},_:function(t){return t.charAt(0)==="<"?f._fn.createElementsFromHTML(t):[...document.querySelectorAll(t)]},isValidNode:t=>t instanceof Element||t instanceof Document||t instanceof Window,push:Array.prototype.push,pop:Array.prototype.pop,sort:Array.prototype.sort,splice:Array.prototype.splice},f.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],f._fn={},f.version="0.2.8"):f=window.DoMini;const d=f;d.fn.get=function(t){return t===void 0?Array.from(this):this[t]},d.fn.extend=function(){for(let t=1;t<arguments.length;t++)for(let n in arguments[t])arguments[t].hasOwnProperty(n)&&(arguments[0][n]=arguments[t][n]);return arguments[0]},d.fn.forEach=function(t){return this.get().forEach((function(n,r,i){t.apply(n,[n,r,i])})),this},d.fn.each=function(t){return this.get().forEach((function(n,r,i){t.apply(n,[r,n,i])})),this},d.fn.css=function(t,n){for(const r of this)if(arguments.length===1){if(typeof t!="object")return window.getComputedStyle(r)[t];Object.keys(t).forEach((function(i){r.style[i]=t[i]}))}else r.style[t]=n;return this},d.fn.hasClass=function(t){let n=this.get(0);return n!=null&&n.classList.contains(t)},d.fn.addClass=function(t){let n=t;return typeof t=="string"&&(n=t.split(" ")),n=n.filter((function(r){return r.trim()!==""})),n.length>0&&this.forEach((function(r){r.classList.add.apply(r.classList,n)})),this},d.fn.removeClass=function(t){if(t!==void 0){let n=t;typeof t=="string"&&(n=t.split(" ")),n=n.filter((function(r){return r.trim()!==""})),n.length>0&&this.forEach((function(r){r.classList.remove.apply(r.classList,n)}))}else this.forEach((function(n){n.classList.length>0&&n.classList.remove.apply(n.classList,n.classList)}));return this},d.fn.isVisible=function(){let t,n=this.get(0),r=!0;for(;n!==null;){if(t=window.getComputedStyle(n),t.display==="none"||t.visibility==="hidden"||parseInt(t.opacity)===0){r=!1;break}n=n.parentElement}return r},d.fn.val=function(t){let n;if(arguments.length===1){for(const r of this)if(r.type==="select-multiple"){t=typeof t=="string"?t.split(","):t;for(let i,p=0,v=r.options.length;p<v;p++)i=r.options[p],i.selected=t.indexOf(i.value)!==-1}else r.value=t;n=this}else{let r=this.get(0);r!=null&&(n=r.type==="select-multiple"?Array.prototype.map.call(r.selectedOptions,(function(i){return i.value})):r.value)}return n},d.fn.attr=function(t,n){let r;for(const i of this)if(arguments.length===2)i.setAttribute(t,n),r=this;else{if(typeof t!="object"){r=i.getAttribute(t);break}Object.keys(t).forEach((function(p){i.setAttribute(p,t[p])}))}return r},d.fn.removeAttr=function(t){for(const n of this)n.removeAttribute(t);return this},d.fn.prop=function(t,n){let r;for(const i of this){if(arguments.length!==2){r=i[t]!==void 0?i[t]:null;break}i[t]=n}return arguments.length===2?this:r},d.fn.data=function(t,n){const r=t.replace(/-([a-z])/g,(function(i){return i[1].toUpperCase()}));if(arguments.length===2){for(const i of this)i!=null&&(i.dataset[r]=n);return this}{let i=this.get(0);return i!=null&&i.dataset[r]!==void 0?i.dataset[r]:""}},d.fn.html=function(t){if(arguments.length===1){for(const n of this)n.innerHTML=t;return this}{let n=this.get(0);return n==null?"":n.innerHTML}},d.fn.text=function(t){if(arguments.length===1){for(const n of this)n.textContent=t;return this}{let n=this.get(0);return n==null?"":n.textContent}},d.fn.position=function(){let t=this.get(0);return t!=null?{top:t.offsetTop,left:t.offsetLeft}:{top:0,left:0}},d.fn.offset=function(){let t=this.get(0);return t!=null?d._fn.hasFixedParent(t)?t.getBoundingClientRect():d._fn.absolutePosition(t):{top:0,left:0}},d.fn.outerWidth=function(t){t=t||!1;let n=this.get(0);return n!=null?t?parseInt(n.offsetWidth)+parseInt(this.css("marginLeft"))+parseInt(this.css("marginRight")):parseInt(n.offsetWidth):0},d.fn.outerHeight=function(t){t=t||!1;let n=this.get(0);return n!=null?t?parseInt(n.offsetHeight)+parseInt(this.css("marginTop"))+parseInt(this.css("marginBottom")):parseInt(n.offsetHeight):0},d.fn.noPaddingHeight=function(t){return t=t||!1,this.length>0?t?parseInt(this.css("height"))+parseInt(this.css("marginTop"))+parseInt(this.css("marginBottom")):parseInt(this.css("height")):0},d.fn.noPaddingWidth=function(t){return t=t||!1,this.length>0?t?parseInt(this.css("width"))+parseInt(this.css("marginLeft"))+parseInt(this.css("marginRight")):parseInt(this.css("width")):0},d.fn.innerWidth=function(){let t=this.get(0);if(t!=null){let n=window.getComputedStyle(t);return this.outerWidth()-parseFloat(n.borderLeftWidth)-parseFloat(n.borderRightWidth)}return 0},d.fn.innerHeight=function(){let t=this.get(0);if(t!=null){let n=window.getComputedStyle(t);return this.outerHeight()-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomtWidth)}return 0},d.fn.width=function(){return this.outerWidth()},d.fn.height=function(){return this.outerHeight()},d.fn.on=function(){let t=arguments,n=function(i,p){let v;if(p.type==="mouseenter"||p.type==="mouseleave"||p.type==="mouseover"){let x=document.elementFromPoint(p.clientX,p.clientY);if(!x.matches(i[1]))for(;(x=x.parentElement)&&!x.matches(i[1]););x!=null&&(v=d(x))}else v=d(p.target).closest(i[1]);if(v!=null&&v.closest(this).length>0){let x=[];if(x.push(p),i[4]!==void 0)for(let y=4;y<i.length;y++)x.push(i[y]);i[2].apply(v.get(0),x)}},r=t[0].split(" ");for(let i=0;i<r.length;i++){let p=r[i];if(typeof t[1]=="string")this.forEach((function(v){if(!d._fn.hasEventListener(v,p,t[2])){let x=n.bind(v,t);v.addEventListener(p,x,t[3]),v._domini_events=v._domini_events===void 0?[]:v._domini_events,v._domini_events.push({type:p,selector:t[1],func:x,trigger:t[2],args:t[3]})}}));else for(let v=0;v<r.length;v++){let x=r[v];this.forEach((function(y){d._fn.hasEventListener(y,x,t[1])||(y.addEventListener(x,t[1],t[2]),y._domini_events=y._domini_events===void 0?[]:y._domini_events,y._domini_events.push({type:x,func:t[1],trigger:t[1],args:t[2]}))}))}}return this},d.fn.off=function(t,n){return this.forEach((function(r){if(r._domini_events!==void 0&&r._domini_events.length>0)if(t===void 0){let i;for(;i=r._domini_events.pop();)r.removeEventListener(i.type,i.func,i.args);r._domini_events=[]}else t.split(" ").forEach((function(i){let p,v=[];for(;p=r._domini_events.pop();)p.type!==i||n!==void 0&&p.trigger!==n?v.push(p):r.removeEventListener(i,p.func,p.args);r._domini_events=v}))})),this},d.fn.offForced=function(){let t=this;return this.forEach((function(n,r){let i=n.cloneNode(!0);n.parentNode.replaceChild(i,n),t[r]=i})),this},d.fn.trigger=function(t,n,r,i){return r=r||!1,i=i||!1,this.forEach((function(p){let v=!1;if(i&&typeof jQuery<"u"&&jQuery._data!==void 0&&jQuery._data(p,"events")!==void 0&&jQuery._data(p,"events")[t]!==void 0&&(jQuery(p).trigger(t,n),v=!0),!v&&r){let x=new Event(t);x.detail=n,p.dispatchEvent(x)}if(p._domini_events!==void 0)p._domini_events.forEach((function(x){if(x.type===t){let y=new Event(t);x.trigger.apply(p,[y].concat(n))}}));else{let x=!1,y=p;for(;y=y.parentElement,y!=null&&(y._domini_events!==void 0&&y._domini_events.forEach((function(b){if(b.selector!==void 0){let D=d(y).find(b.selector);if(D.length>0&&D.get().indexOf(p)>=0&&b.type===t){let F=new Event(t);b.trigger.apply(p,[F].concat(n)),x=!0}}})),!x););}})),this},d.fn.clear=function(){for(const t of this)delete t._domini_events;return this},d.fn.clone=function(){let t=[];for(const n of this)t.push(n.cloneNode(!0));return d().add(t)},d.fn.detach=function(t){let n=this,r=[];t!==void 0&&(n=this.find(t));for(const i of n)i.parentElement!=null&&r.push(i.parentElement.removeChild(i));return d().add(r)},d.fn.remove=function(t){return this.detach(t).off().clear()},d.fn.prepend=function(t){if((t=d._fn.elementArrayFromAny(t)).length>0)for(const n of this)for(const r of t)n.insertBefore(r,n.children[0]);return this},d.fn.append=function(t){if((t=d._fn.elementArrayFromAny(t)).length>0)for(const n of this)for(const r of t)n.appendChild(r);return this},d.fn.is=function(t){let n=!1;for(const r of this)if(r.matches(t)){n=!0;break}return n},d.fn.parent=function(t){let n=[];for(const r of this){let i=r.parentElement;typeof t=="string"&&(i==null||i.matches(t)||(i=null)),n.push(i)}return d().add(n)},d.fn.copy=function(t,n){let r,i,p;if(typeof t!="object"||t===null)return r=t,r;for(i in r=new t.constructor,t)t.hasOwnProperty(i)&&(p=typeof t[i],n&&p==="object"&&t[i]!==null?r[i]=this.copy(t[i]):r[i]=t[i]);return r},d.fn.first=function(){return d(this[0])},d.fn.last=function(){return d(this[this.length-1])},d.fn.prev=function(t){let n=[];for(const r of this){let i;if(typeof t=="string")for(i=r.previousElementSibling;i!=null;){if(i.matches(t)){n.push(i);break}i=i.previousElementSibling}else n.push(r.previousElementSibling)}return d(null).add(n)},d.fn.next=function(t){let n=[];for(const r of this){let i;if(typeof t=="string")for(i=r.nextElementSibling;i!=null;){if(i.matches(t)){n.includes(i)||n.push(i);break}i=i.nextElementSibling}else n.push(r.nextElementSibling)}return d(null).add(n)},d.fn.closest=function(t){let n=[];for(let r of this)if(typeof t=="string"&&t!==""){for(;!r.matches(t)&&(r=r.parentElement););n.includes(r)||n.push(r)}else{if((t=t instanceof d?t.get(0):t)instanceof Element)for(;r!==t&&(r=r.parentElement););else r=null;n.includes(r)||n.push(r)}return d().add(n)},d.fn.add=function(t){let n=d._fn.elementArrayFromAny(t);for(const r of n)Array.from(this).includes(r)||this.push(r);return this},d.fn.find=function(t){const n=new d;if(typeof t=="string"){let r=[];this.get().forEach((function(i){const p=i.querySelectorAll?.(t)??[];r=r.concat(Array.from(p))})),r.length>0&&n.add(r)}return n},d._fn.bodyTransform=function(){let t=0,n=0;if(typeof WebKitCSSMatrix<"u"){let r=window.getComputedStyle(document.body);if(r.transform!==void 0){let i=new WebKitCSSMatrix(r.transform);i.m41!=="undefined"&&(t=i.m41),i.m42!=="undefined"&&(n=i.m42)}}return{x:t,y:n}},d._fn.bodyTransformY=function(){return this.bodyTransform().y},d._fn.bodyTransformX=function(){return this.bodyTransform().x},d._fn.hasFixedParent=function(t){if(d._fn.bodyTransformY()!=0)return!1;do if(window.getComputedStyle(t).position=="fixed")return!0;while(t=t.parentElement);return!1},d._fn.hasEventListener=function(t,n,r){if(t._domini_events===void 0)return!1;for(let i=0;i<t._domini_events.length;i++)if(t._domini_events[i].trigger===r&&t._domini_events[i].type===n)return!0;return!1},d._fn.allDescendants=function(t){let n=[],r=this;return Array.isArray(t)||(t=[t]),t.forEach((function(i){for(let p=0;p<i.childNodes.length;p++){let v=i.childNodes[p];n.push(v),n=n.concat(r.allDescendants(v))}})),n},d._fn.createElementsFromHTML=function(t){let n=document.createElement("template");return n.innerHTML=t.replace(/(\r\n|\n|\r)/gm,""),[...n.content.childNodes]},d._fn.elementArrayFromAny=function(t){if(typeof t=="string")t=d(t).get();else if(t instanceof d)t=t.get();else if(t instanceof Element)t=[t];else{if(!(t instanceof Array))return[];t=t.filter((n=>n instanceof Element))}return t},d._fn.ElementArrayFromAny=d._fn.elementArrayFromAny,d._fn.absolutePosition=function(t){if(!t.getClientRects().length)return{top:0,left:0};let n=t.getBoundingClientRect(),r=t.ownerDocument.defaultView;return{top:n.top+r.pageYOffset,left:n.left+r.pageXOffset}},d._fn.plugin=function(t,n){d.fn[t]=function(r){return r!==void 0&&n[r]?n[r].apply(this,Array.prototype.slice.call(arguments,1)):this.forEach((function(i){i["domini_"+t]=Object.create(n).init(r,i)}))}},document.dispatchEvent(new Event("domini-dom-core-loaded"));const re=d;d.fn.animate=function(t,n,r){n=n||200,r=r||"easeInOutQuad";for(const i of this){let p,v,x,y,b,D=0,F=60,P={},Q={};if(x=this.prop("_domini_animations"),x=x??[],t===!1)x.forEach((function(Z){clearInterval(Z)}));else{let Z=function(){D++,D>p?clearInterval(y):(v=b(D/p),Object.keys(Q).forEach((function(W){W.indexOf("scroll")>-1?i[W]=P[W]+Q[W]*v:i.style[W]=P[W]+Q[W]*v+"px"})))};b=d.fn.animate.easing[r]??d.fn.animate.easing.easeInOutQuad,Object.keys(t).forEach((function(W){W.indexOf("scroll")>-1?(P[W]=i[W],Q[W]=t[W]-P[W]):(P[W]=parseInt(window.getComputedStyle(i)[W]),Q[W]=t[W]-P[W])})),p=n/1e3*F,y=setInterval(Z,1e3/F),x.push(y),this.prop("_domini_animations",x)}}return this},d.fn.animate.easing={linear:function(t){return t},easeInOutQuad:function(t){return t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2},easeOutQuad:function(t){return 1-(1-t)*(1-t)}},d.fn.unhighlight=function(t){let n={className:"highlight",element:"span"};return d.fn.extend(n,t),this.find(n.element+"."+n.className).forEach((function(){let r=this.parentNode;r.replaceChild(this.firstChild,this),r.normalize()}))},d.fn.highlight=function(t,n){this.defaults={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1,excludeParents:".excludeFromHighlight"};const r=d,i={...this.defaults,...n};if(t.constructor===String&&(t=[t]),(t=t.filter((function(b){return b!==""}))).forEach((function(b,D,F){F[D]=b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g,"")})),t.length===0)return this;let p=i.caseSensitive?"":"i",v="("+t.join("|")+")";i.wordsOnly&&(v="(?:,|^|\\s)"+v+"(?:,|$|\\s)");let x=new RegExp(v,p);function y(b,D,F,P,Q){if(Q=Q===""?r.fn.highlight.defaults:Q,b.nodeType===3){if(!r(b.parentNode).is(Q)){let Z=b.data.normalize("NFD").replace(/[\u0300-\u036f]/g,"").match(D);if(Z){let W,ge=document.createElement(F||"span");ge.className=P||"highlight",W=/\.|,|\s/.test(Z[0].charAt(0))?Z.index+1:Z.index;let _e=b.splitText(W);_e.splitText(Z[1].length);let He=_e.cloneNode(!0);return ge.appendChild(He),_e.parentNode.replaceChild(ge,_e),1}}}else if(b.nodeType===1&&b.childNodes&&!/(script|style)/i.test(b.tagName)&&!r(b).closest(Q).length>0&&(b.tagName!==F.toUpperCase()||b.className!==P))for(let Z=0;Z<b.childNodes.length;Z++)Z+=y(b.childNodes[Z],D,F,P,Q);return 0}return this.forEach((function(b){y(b,x,i.element,i.className,i.excludeParents)}))},d.fn.serialize=function(){let t=this.get(0);if(!t||t.nodeName!=="FORM")return"";let n,r,i=[];for(n=t.elements.length-1;n>=0;n-=1)if(t.elements[n].name!=="")switch(t.elements[n].nodeName){case"INPUT":switch(t.elements[n].type){case"checkbox":case"radio":t.elements[n].checked&&i.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value));break;case"file":break;default:i.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value))}break;case"TEXTAREA":i.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value));break;case"SELECT":switch(t.elements[n].type){case"select-one":i.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value));break;case"select-multiple":for(r=t.elements[n].options.length-1;r>=0;r-=1)t.elements[n].options[r].selected&&i.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].options[r].value))}break;case"BUTTON":switch(t.elements[n].type){case"reset":case"submit":case"button":i.push(t.elements[n].name+"="+encodeURIComponent(t.elements[n].value))}}return i.join("&")},d.fn.serializeObject=function(t,n){let r,i=[];for(r in t)if(t.hasOwnProperty(r)){let p=n?n+"["+r+"]":r,v=t[r];i.push(v!==null&&typeof v=="object"?d.fn.serializeObject(v,p):encodeURIComponent(p)+"="+encodeURIComponent(v))}return i.join("&")},d.fn.inViewPort=function(t,n){let r,i,p=this.get(0);if(p==null)return!1;t=t===void 0?0:t,n=n===void 0?window:typeof n=="string"?document.querySelector(n):n;let v=p.getBoundingClientRect(),x=v.top,y=v.bottom,b=v.left,D=v.right,F=!1;if(n==null&&(n=window),n===window)r=window.innerWidth||0,i=window.innerHeight||0;else{r=n.clientWidth,i=n.clientHeight;let P=n.getBoundingClientRect();x-=P.top,y-=P.top,b-=P.left,D-=P.left}return t=~~Math.round(parseFloat(t)),D<=0||b>=r||(F=t>0?x>=t&&y<i-t:(y>0&&x<=i-t)|(x<=0&&y>t)),F},d.fn.ajax=function(t){if((t=this.extend({url:"",method:"GET",cors:"cors",data:{},success:null,fail:null,accept:"text/html",contentType:"application/x-www-form-urlencoded; charset=UTF-8"},t)).cors==="cors"){let n=new XMLHttpRequest;return n.onreadystatechange=function(){t.success!=null&&this.readyState===4&&this.status>=200&&this.status<400&&t.success(this.responseText),t.fail!=null&&this.readyState===4&&this.status>=400&&t.fail(this)},n.open(t.method.toUpperCase(),t.url,!0),n.setRequestHeader("Content-type",t.contentType),n.setRequestHeader("Accept",t.accept),n.send(this.serializeObject(t.data)),n}{let n="ajax_cb_"+"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(i){let p=16*Math.random()|0;return(i==="x"?p:3&p|8).toString(16)})).replaceAll("-","");d.fn[n]=function(){t.success.apply(this,arguments),delete d.fn[t.data.fn]},t.data.callback="DoMini.fn."+n,t.data.fn=n;let r=document.createElement("script");r.type="text/javascript",r.src=t.url+"?"+this.serializeObject(t.data),r.onload=function(){this.remove()},document.body.appendChild(r)}};const J=re;return L.default})()))}),9645:(function(s){"use strict";/* object-assign (c) Sindre Sorhus @license MIT */var M=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;function d(J){if(J==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(J)}function re(){try{if(!Object.assign)return!1;var J=new String("abc");if(J[5]="de",Object.getOwnPropertyNames(J)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(p){return t[p]});if(r.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(p){i[p]=p}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}s.exports=re()?Object.assign:function(J,t){for(var n,r=d(J),i,p=1;p<arguments.length;p++){n=Object(arguments[p]);for(var v in n)L.call(n,v)&&(r[v]=n[v]);if(M){i=M(n);for(var x=0;x<i.length;x++)f.call(n,i[x])&&(r[i[x]]=n[i[x]])}}return r}}),3691:(function(s,M,L){"use strict";/** @license React v17.0.2 * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */L(9645);var f=L(1609),d=60103;if(M.Fragment=60107,typeof Symbol=="function"&&Symbol.for){var re=Symbol.for;d=re("react.element"),M.Fragment=re("react.fragment")}var J=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,t=Object.prototype.hasOwnProperty,n={key:!0,ref:!0,__self:!0,__source:!0};function r(i,p,v){var x,y={},b=null,D=null;v!==void 0&&(b=""+v),p.key!==void 0&&(b=""+p.key),p.ref!==void 0&&(D=p.ref);for(x in p)t.call(p,x)&&!n.hasOwnProperty(x)&&(y[x]=p[x]);if(i&&i.defaultProps)for(x in p=i.defaultProps,p)y[x]===void 0&&(y[x]=p[x]);return{$$typeof:d,type:i,key:b,ref:D,props:y,_owner:J.current}}M.jsx=r,M.jsxs=r}),3593:(function(s,M,L){"use strict";s.exports=L(3691)}),8140:(function(s,M,L){"use strict";/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var f=L(1609);function d(y,b){return y===b&&(y!==0||1/y===1/b)||y!==y&&b!==b}var re=typeof Object.is=="function"?Object.is:d,J=f.useState,t=f.useEffect,n=f.useLayoutEffect,r=f.useDebugValue;function i(y,b){var D=b(),F=J({inst:{value:D,getSnapshot:b}}),P=F[0].inst,Q=F[1];return n(function(){P.value=D,P.getSnapshot=b,p(P)&&Q({inst:P})},[y,D,b]),t(function(){return p(P)&&Q({inst:P}),y(function(){p(P)&&Q({inst:P})})},[y]),r(D),D}function p(y){var b=y.getSnapshot;y=y.value;try{var D=b();return!re(y,D)}catch{return!0}}function v(y,b){return b()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:i;M.useSyncExternalStore=f.useSyncExternalStore!==void 0?f.useSyncExternalStore:x}),8279:(function(s,M,L){"use strict";s.exports=L(8140)}),1609:(function(s){"use strict";s.exports=window.React})},gt={};function ee(s){var M=gt[s];if(M!==void 0)return M.exports;var L=gt[s]={exports:{}};return dn[s](L,L.exports,ee),L.exports}(function(){ee.n=function(s){var M=s&&s.__esModule?function(){return s.default}:function(){return s};return ee.d(M,{a:M}),M}})(),(function(){ee.d=function(s,M){for(var L in M)ee.o(M,L)&&!ee.o(s,L)&&Object.defineProperty(s,L,{enumerable:!0,get:M[L]})}})(),(function(){ee.o=function(s,M){return Object.prototype.hasOwnProperty.call(s,M)}})();var cs={};(function(){"use strict";var s=ee(3593),M=window.ReactDOM,L=ee.n(M),f=ee(1609),d=ee.n(f);const re=["Yay","Top of the morning to you","You did it","All good chief","Looking good","Good job"],J=["Something went south :(","Ooof, please try again","Ouch, that didn't work...","Ooops, that didn't work..."];let t=[],n=[];const r=()=>n.forEach(e=>e(t)),i=e=>{t=t.filter(o=>o.id!==e),r()},p=(e,o="")=>{const a=Math.random().toString(36).substring(2,9);o===""&&(e==="success"?o=re[Math.floor(Math.random()*re.length)]:o=J[Math.floor(Math.random()*J.length)]),t=[...t,{id:a,type:e,text:o}],r(),setTimeout(()=>i(a),e==="success"?3e3:15e3)},v=(e="")=>p("success",e),x=(e="")=>{typeof e=="string"?p("error",e):p("error",e.message)},y=()=>{const[e,o]=(0,f.useState)(t);return(0,f.useEffect)(()=>(n.push(o),o(t),()=>{n=n.filter(a=>a!==o)}),[]),{messages:e,addSuccess:v,addError:x,addMessage:p,dismissMessage:i}};function b(e){var o,a,c="";if(typeof e=="string"||typeof e=="number")c+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(o=0;o<l;o++)e[o]&&(a=b(e[o]))&&(c&&(c+=" "),c+=a)}else for(a in e)e[a]&&(c&&(c+=" "),c+=a);return c}function D(){for(var e,o,a=0,c="",l=arguments.length;a<l;a++)(e=arguments[a])&&(o=b(e))&&(c&&(c+=" "),c+=o);return c}var F=D;/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const P=(...e)=>e.filter((o,a,c)=>!!o&&o.trim()!==""&&c.indexOf(o)===a).join(" ").trim();/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Q=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Z=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,a,c)=>c?c.toUpperCase():a.toLowerCase());/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const W=e=>{const o=Z(e);return o.charAt(0).toUpperCase()+o.slice(1)};/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var ge={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _e=e=>{for(const o in e)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1};var He,un;/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xt=(0,f.createContext)({});function ls({children:e,size:o,color:a,strokeWidth:c,absoluteStrokeWidth:l,className:h}){const u=He(()=>({size:o,color:a,strokeWidth:c,absoluteStrokeWidth:l,className:h}),[o,a,c,l,h]);return un(xt.Provider,{value:u},e)}const fn=()=>(0,f.useContext)(xt);/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hn=(0,f.forwardRef)(({color:e,size:o,strokeWidth:a,absoluteStrokeWidth:c,className:l="",children:h,iconNode:u,...m},w)=>{const{size:O=24,strokeWidth:R=2,absoluteStrokeWidth:E=!1,color:A="currentColor",className:C=""}=fn()??{},T=c??E?Number(a??R)*24/Number(o??O):a??R;return(0,f.createElement)("svg",{ref:w,...ge,width:o??O??ge.width,height:o??O??ge.height,stroke:e??A,strokeWidth:T,className:P("lucide",C,l),...!h&&!_e(m)&&{"aria-hidden":"true"},...m},[...u.map(([_,k])=>(0,f.createElement)(_,k)),...Array.isArray(h)?h:[h]])});/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const B=(e,o)=>{const a=(0,f.forwardRef)(({className:c,...l},h)=>(0,f.createElement)(hn,{ref:h,iconNode:o,className:P(`lucide-${Q(W(e))}`,`lucide-${e}`,c),...l}));return a.displayName=W(e),a};/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pn=B("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mn=B("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vt=B("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wn={success:(0,s.jsx)(pn,{className:"wdo:w-5 wdo:h-5 wdo:shrink-0"}),error:(0,s.jsx)(mn,{className:"wdo:w-5 wdo:h-5 wdo:shrink-0"})};var gn=({messages:e})=>(0,s.jsx)("div",{className:"wdo:fixed wdo:top-16 wdo:left-1/2 wdo:-translate-x-1/2 wdo:w-full wdo:max-w-md wdo:z-50 wdo:flex wdo:flex-col wdo:gap-2 wdo:px-4",children:e.map(o=>(0,s.jsxs)("div",{className:F("wdo:toast",o.type==="success"?"wdo:toast-success":"wdo:toast-error"),children:[(0,s.jsx)("span",{className:F("wdo:shrink-0",o.type==="success"?"wdo:text-green-600 wdo:dark:text-green-400":"wdo:text-red-600 wdo:dark:text-red-400"),children:wn[o.type]}),(0,s.jsx)("span",{className:"wdo:grow wdo:text-sm",children:o.text}),(0,s.jsx)("button",{className:"wdo:shrink-0 wdo:p-0.5 wdo:rounded wdo:border-0 wdo:cursor-pointer wdo:bg-transparent wdo:text-wp-admin-500 wdo:hover:text-wp-admin-800 wdo:dark:text-wp-admin-400 wdo:dark:hover:text-wp-admin-100 wdo:transition-colors",onClick:()=>i(o.id),"aria-label":"Dismiss",children:(0,s.jsx)(vt,{className:"wdo:w-4 wdo:h-4"})})]},o.id))});/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xn=B("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vn=B("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yn=B("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),yt=(0,f.createContext)(void 0),_t=e=>e==="light"||e==="dark"||e==="system",jt=e=>e==="dark"?!0:e==="light"?!1:window.matchMedia("(prefers-color-scheme: dark)").matches,_n=({children:e})=>{const[o,a]=(0,f.useState)(()=>{const u=localStorage.getItem("wdo_darkmode");return _t(u)?u:"system"}),[c,l]=(0,f.useState)(()=>jt(o)),h=u=>{a(u),localStorage.setItem("wdo_darkmode",u)};return(0,f.useEffect)(()=>{l(jt(o))},[o]),(0,f.useEffect)(()=>{if(o!=="system")return;const u=window.matchMedia("(prefers-color-scheme: dark)"),m=w=>l(w.matches);return u.addEventListener("change",m),()=>u.removeEventListener("change",m)},[o]),(0,f.useEffect)(()=>{document.body.classList.toggle("wdo:dark",c)},[c]),(0,f.useEffect)(()=>{const u=m=>{m.key==="wdo_darkmode"&&_t(m.newValue)&&a(m.newValue)};return window.addEventListener("storage",u),()=>window.removeEventListener("storage",u)},[]),(0,s.jsx)(yt.Provider,{value:{isDark:c,mode:o,setMode:h},children:e})},bt=()=>{const e=(0,f.useContext)(yt);if(e===void 0)throw new Error("useIsDark must be used within a DarkModeProvider");return e},jn=[{mode:"light",icon:(0,s.jsx)(xn,{}),title:"Light"},{mode:"system",icon:(0,s.jsx)(vn,{}),title:"System"},{mode:"dark",icon:(0,s.jsx)(yn,{}),title:"Dark"}],bn=()=>{const{isDark:e,mode:o,setMode:a}=bt();return(0,s.jsx)("div",{className:F("wdo:inline-flex wdo:rounded-lg wdo:p-0.5 wdo:gap-0.5",e?"wdo:bg-wp-admin-700":"wdo:bg-wp-admin-200"),children:jn.map(({mode:c,icon:l,title:h})=>{const u=o===c;return(0,s.jsx)("button",{title:h,onClick:()=>a(c),className:F("wdo:rounded wdo:p-1.5 wdo:border-0 wdo:cursor-pointer","wdo:transition-colors wdo:flex wdo:items-center wdo:justify-center",u?e?"wdo:bg-wp-admin-500 wdo:text-white":"wdo:bg-white wdo:text-wp-admin-700 wdo:shadow-sm":e?"wdo:bg-transparent wdo:text-wp-admin-300":"wdo:bg-transparent wdo:text-wp-admin-500"),children:(0,s.jsx)("span",{className:"wdo:w-[18px] wdo:h-[18px] wdo:flex wdo:items-center wdo:justify-center",children:l})},c)})})};var kn=({subtitle:e="",logo:o,className:a=""})=>(0,s.jsxs)("div",{className:"wdo:top-bar",children:[(0,s.jsxs)("div",{className:F("wdo:flex wdo:items-baseline wdo:gap-3",a),children:[o,e?(0,s.jsx)("h2",{children:e}):""]}),(0,s.jsx)(bn,{})]}),Nn=()=>(0,s.jsx)("svg",{height:"20",width:"20",viewBox:"0 0 20 20",style:{float:"right"},"aria-hidden":"true",focusable:"false",children:(0,s.jsx)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})}),En=()=>(0,s.jsx)("svg",{height:"20",width:"20",viewBox:"0 0 20 20",style:{float:"right",transform:"rotate(180deg)"},"aria-hidden":"true",focusable:"false",children:(0,s.jsx)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})});const De=(0,f.createContext)(null),Sn=({children:e})=>{const[o,a]=(0,f.useState)(null),[c,l]=(0,f.useState)(()=>window.location.hash.slice(1)||null),[h,u]=(0,f.useState)([]),m=(0,f.useRef)([]),[w,O]=(0,f.useState)(()=>({})),R=k=>{const I=m.current.reduce((j,Y)=>(j[Y]=!0,j),{});O(j=>({...j,...I,[k]:!0}))},E=k=>{O(I=>({...I,[k]:!1}))},A=k=>{O(I=>({...I,[k]:!(I[k]??!1)}))},C=k=>{u(I=>[...I,c]),l(k),k?window.history.pushState(null,"",`#${k}`):window.history.replaceState(null,"",window.location.pathname+window.location.search)},T=()=>{if(h.length===0)return;const k=h[h.length-1];u(I=>I.slice(0,-1)),l(k),k?window.history.pushState(null,"",`#${k}`):window.history.replaceState(null,"",window.location.pathname+window.location.search)},_=h.length>0;return(0,f.useEffect)(()=>{const k=()=>{l(window.location.hash.slice(1)||null),c&&R(c)};return c&&R(c),window.addEventListener("hashchange",k),()=>window.removeEventListener("hashchange",k)},[]),(0,s.jsx)(De.Provider,{value:{activeId:c,setActiveId:l,isOpen:w,toggleOpen:A,open:R,close:E,openedParents:m,confirmBeforeSwap:o,setConfirmBeforeSwap:a,navigate:C,goBack:T,canGoBack:_},children:e})},Cn=({children:e,...o})=>(0,s.jsx)("ul",{style:{listStyleType:"none",padding:0,userSelect:"none"},...o,children:f.Children.map(e,a=>(0,f.cloneElement)(a,{level:0}))}),kt=({label:e,id:o,children:a,iconBefore:c,iconAfter:l,disabled:h,defaultActive:u=!1,level:m=0,parents:w=[],...O})=>{const R=(0,f.useContext)(De);if(!R)throw new Error("MenuItem must be used within a MenuProvider");const{activeId:E,isOpen:A,toggleOpen:C,openedParents:T,confirmBeforeSwap:_,setConfirmBeforeSwap:k,navigate:I}=R,j=E!==null?E===o:u,Y=f.Children.count(a)>0,te=Y?A[o]:!1;j&&(Y&&(T.current=[...new Set(T.current.concat([o]))]),w.length&&(T.current=[...new Set(T.current.concat(w))]));const q=["","wdo:pl-4","wdo:pl-6","wdo:pl-8","wdo:pl-10"];return(0,s.jsxs)("li",{...O,children:[(0,s.jsxs)("a",{href:o?`#${o}`:void 0,onClick:N=>{N.preventDefault(),Y&&!te&&C(o),!h&&(_===null||confirm(_))&&(k(null),Y||I(o))},className:` ${q[m]??""} ${j?"wdo:menu-item-active":""} wdo:menu-item `,children:[c&&(0,s.jsx)("span",{children:c}),(0,s.jsx)("span",{children:e}),l&&(0,s.jsx)("span",{children:l}),Y&&(0,s.jsx)("span",{className:"wdo:dark:fill-gray-300",onClick:N=>{N.stopPropagation(),N.preventDefault(),C(o)},children:te?(0,s.jsx)(En,{}):(0,s.jsx)(Nn,{})})]}),Y&&(0,s.jsx)("ul",{style:{listStyleType:"none",padding:0,display:te?"block":"none"},children:f.Children.map(a,N=>(0,f.cloneElement)(N,{level:m+1,parents:w.concat([o]),...O}))})]})};var g=window.wp.i18n;/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const On=B("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nt=B("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var js=ee(8623),ne,Et;const bs=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),St=e=>{let o=!1;return typeof window.$<"u"&&(typeof e>"u"||typeof window.$.fn[e]<"u")&&(o=window.$),o===!1&&typeof window.jQuery<"u"&&(o=window.jQuery,(typeof e>"u"||typeof window.jQuery.fn[e]<"u")&&(o=window.jQuery)),o},ks=function(e,o){let a=e.find("input,textarea,select,button").get();if(arguments.length===1){const c={};return a.forEach(function(l){l.name&&!l.disabled&&(l.checked||/select|textarea/i.test(l.nodeName)||/text/i.test(l.type)||ne(l).hasClass("hasDatepicker")||ne(l).hasClass("asp_slider_hidden"))&&(c[l.name]===void 0&&(c[l.name]=[]),ne(l).hasClass("hasDatepicker")?c[l.name].push(ne(l).parent().find(".asp_datepicker_hidden").val()):c[l.name].push(ne(l).val()))}),JSON.stringify(c)}else if(o!==void 0){const c=typeof o!="object"?JSON.parse(o):o;return a.forEach(function(l){if(l.name)if(c[l.name]){let h=c[l.name],u=ne(l);if(Object.prototype.toString.call(h)!=="[object Array]"&&(h=[h]),l.type==="checkbox"||l.type==="radio"){let m=u.val(),w=!1;for(let O=0;O<h.length;O++)if(h[O]===m){w=!0;break}u.prop("checked",w)}else u.val(h[0]),ne(l).hasClass("asp_gochosen")||ne(l).hasClass("asp_goselect2")?Et(function(m){m(l).trigger("change.asp_select2")},function(){return St("asp_select2")},50,3):ne(l).hasClass("hasDatepicker")&&Et(function(m){const w=u.get(0);if(w===void 0)return;let O=h[0],R=m(w).datepicker("option","dateFormat");m(w).datepicker("option","dateFormat","yy-mm-dd"),m(w).datepicker("setDate",O),m(w).datepicker("option","dateFormat",R),m(w).trigger("selectnochange")},function(){return St("datepicker")},50,3)}else(l.type==="checkbox"||l.type==="radio")&&ne(l).prop("checked",!1)}),e}},Ns=function(e,o,a,c="self"){let l;l=ne('<form style="display: none;" />'),l.attr("action",e),l.attr("method",o),ne("body").append(l),typeof a<"u"&&a!==null&&Object.keys(a).forEach(function(h){let u=a[h],m=ne('<input type="hidden" />');m.attr("name",h),m.attr("value",u),l.append(m)}),c=="new"&&l.attr("target","_blank"),l.get(0).submit()},An=function(e){Object.assign(document.createElement("a"),{target:"_blank",href:e}).click()},Rn=function(e){if(typeof e.checkVisibility>"u")return!0;let o=e,a=!0;for(;o!==null;){if(!o.checkVisibility({opacityProperty:!0,visibilityProperty:!0,contentVisibilityAuto:!0})){a=!1;break}o=o.parentElement}return a},Es=function(e,o=0){for(const a of e)if(Rn(a))return window.scrollTo({top:a.getBoundingClientRect().top-120+window.pageYOffset+o,behavior:"smooth"}),!0;return!1};var Mn=({utmContent:e})=>{const o=`https://ajaxsearchpro.com/pricing/?utm_source=ajax-search-lite&utm_medium=plugin-admin&utm_campaign=statistics-upsell&utm_content=${e}`;return(0,s.jsx)("div",{className:"wdo:mt-4 wdo:px-2",children:(0,s.jsx)("a",{href:o,target:"_blank",className:"wdo:flex wdo:items-center wdo:justify-center wdo:gap-1.5 wdo:text-sm wdo:font-semibold wdo:py-2 wdo:px-3 wdo:rounded wdo:bg-[#e264af] wdo:text-white wdo:no-underline wdo:hover:no-underline wdo:hover:opacity-90 wdo:hover:text-white wdo:transition-opacity",children:(0,g.__)("\u2B50 Upgrade to Pro","ajax-search-lite")})})};/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Tn=B("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var In=({feature:e})=>{const o=ASL_BACKEND.admin_url+"plugins.php";return(0,s.jsx)("div",{className:"wdo:flex wdo:flex-col wdo:items-center wdo:justify-center wdo:min-h-[60vh] wdo:p-8 wdo:text-center",children:(0,s.jsxs)("div",{className:"wdo:max-w-md",children:[(0,s.jsx)(Tn,{className:"wdo:w-[3rem] wdo:h-[3rem] wdo:text-amber-400 wdo:mb-4 wdo:mx-auto"}),(0,s.jsx)("h2",{className:"wdo:text-xl wdo:font-bold wdo:mb-3",children:(0,g.__)("Ajax Search Pro is active","ajax-search-lite")}),(0,s.jsxs)("p",{className:"wdo:text-gray-500 wdo:dark:text-gray-400 wdo:leading-relaxed wdo:mb-6",children:[(0,g.__)(`${e} is already provided by Ajax Search Pro. Running both plugins simultaneously may cause conflicts.`,"ajax-search-lite")," ",(0,g.__)("Please deactivate Ajax Search Lite to manage this feature from Ajax Search Pro.","ajax-search-lite")]}),(0,s.jsxs)("a",{href:o,className:"wdo:inline-flex wdo:items-center wdo:gap-2 wdo:text-sm wdo:font-semibold wdo:py-2 wdo:px-4 wdo:rounded wdo:bg-amber-400 wdo:text-white wdo:no-underline wdo:hover:no-underline wdo:hover:opacity-90 wdo:hover:text-white wdo:transition-opacity",children:[(0,g.__)("Go to Plugins page","ajax-search-lite"),(0,s.jsx)(Nt,{size:14})]})]})})};/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dn=B("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Pn=B("shopping-cart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ln=B("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fn=B("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Vn=B("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Wn=B("chart-no-axes-column",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]]),zn=[{Icon:Dn,title:"Live Indexing",description:"Always up-to-date results via a dedicated database index"},{Icon:Pn,title:"WooCommerce",description:"Product search with price, stock status, and images"},{Icon:Ln,title:"Advanced Filters",description:"Filter by category, tag, date, price, and custom taxonomy"},{Icon:Fn,title:"Custom Fields & ACF",description:"Search and display values from custom fields"},{Icon:Vn,title:"Multiple Instances",description:"Independent search widgets with separate settings each"},{Icon:Wn,title:"Analytics & Tracking",description:"Built-in GA4 event tracking for every search interaction"}];var Un=({utmContent:e})=>{const o=`https://ajaxsearchpro.com/pricing/?utm_source=ajax-search-lite&utm_medium=plugin-admin&utm_campaign=pro-features-panel&utm_content=${e}`;return(0,s.jsxs)("div",{className:"wdo:mt-4 wdo:card wdo:p-6 wdo:border-l-4 wdo:border-l-[#e264af] wdo:bg-white wdo:dark:bg-wp-admin-900 wdo:max-w-[var(--wdo-breakpoint-3xl)]",children:[(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:sm:flex-row wdo:sm:items-center wdo:justify-between wdo:gap-4 wdo:mb-5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"wdo:text-[1.1em] wdo:font-semibold wdo:dark:text-white",children:(0,g.__)("Unlock more with Ajax Search Pro","ajax-search-lite")}),(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-wp-admin-500 wdo:dark:text-wp-admin-400 wdo:mt-0.5",children:(0,g.__)("Powerful features not available in the free version","ajax-search-lite")})]}),(0,s.jsx)("a",{href:o,target:"_blank",rel:"noreferrer",className:"wdo:flex wdo:items-center wdo:justify-center wdo:gap-1.5 wdo:text-sm wdo:font-semibold wdo:py-2 wdo:px-4 wdo:rounded wdo:bg-[#e264af] wdo:text-white wdo:no-underline wdo:hover:no-underline wdo:hover:opacity-90 wdo:hover:text-white wdo:transition-opacity wdo:shrink-0",children:(0,g.__)("\u2B50 Upgrade to Pro","ajax-search-lite")})]}),(0,s.jsx)("div",{className:"wdo:grid wdo:grid-cols-1 wdo:sm:grid-cols-2 wdo:lg:grid-cols-3 wdo:gap-4",children:zn.map(({Icon:a,title:c,description:l})=>(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-3 wdo:items-start",children:[(0,s.jsx)("div",{className:"wdo:text-[#e264af] wdo:shrink-0 wdo:mt-0.5",children:(0,s.jsx)(a,{size:17})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"wdo:text-sm wdo:font-medium wdo:dark:text-white",children:(0,g.__)(c,"ajax-search-lite")}),(0,s.jsx)("p",{className:"wdo:text-xs wdo:text-wp-admin-500 wdo:dark:text-wp-admin-400 wdo:mt-0.5",children:(0,g.__)(l,"ajax-search-lite")})]})]},c))})]})};/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bn=B("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]),Ct="asl_review_notice",Ot=10080*60*1e3;function qn(){try{const e=localStorage.getItem(Ct);return e?JSON.parse(e):null}catch{return null}}function At(e){localStorage.setItem(Ct,JSON.stringify(e))}function $n(e){return!e||e.status==="dismissed"?!1:e.status==="snoozed"?Date.now()>e.until:Date.now()-e.firstSeen>=Ot}const Hn=()=>{const{isDark:e}=bt(),[o,a]=(0,f.useState)(!1);if((0,f.useEffect)(()=>{let l=qn();l||(l={status:"pending",firstSeen:Date.now()},At(l)),a($n(l))},[]),!o)return null;const c=l=>{At(l==="snoozed"?{status:"snoozed",until:Date.now()+Ot}:{status:"dismissed"}),a(!1)};return(0,s.jsx)("div",{className:"asl-review-border-wrap",children:(0,s.jsxs)("div",{className:"asl-review-border-inner wdo:flex wdo:items-center wdo:gap-4 wdo:p-4 wdo:flex-wrap",style:{background:e?"#0b0c0c":"#fff"},children:[(0,s.jsx)(Bn,{className:"wdo:w-6 wdo:h-6 wdo:text-asp wdo:shrink-0"}),(0,s.jsxs)("div",{className:"wdo:flex-1 wdo:min-w-0",children:[(0,s.jsx)("p",{className:"wdo:font-semibold wdo:dark:text-wp-admin-100",children:(0,g.__)("Enjoying Ajax Search Lite?","ajax-search-lite")}),(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-wp-admin-500 wdo:dark:text-wp-admin-400 wdo:mt-0.5",children:(0,g.__)("A quick review on WordPress.org helps the plugin grow. It only takes a minute!","ajax-search-lite")})]}),(0,s.jsxs)("div",{className:"wdo:flex wdo:gap-2 wdo:flex-wrap wdo:shrink-0 wdo:items-center",children:[(0,s.jsx)("a",{href:"https://wordpress.org/support/plugin/ajax-search-lite/reviews/#new-post",target:"_blank",rel:"noopener noreferrer",className:"wdo:button wdo:button-primary",onClick:()=>c("dismissed"),children:(0,g.__)("Leave a Review","ajax-search-lite")}),(0,s.jsx)("button",{className:"wdo:button",onClick:()=>c("snoozed"),children:(0,g.__)("Maybe later","ajax-search-lite")}),(0,s.jsx)("button",{className:"wdo:button wdo:button-ghost",onClick:()=>c("dismissed"),children:(0,g.__)("Never","ajax-search-lite")})]})]})})},Pe=({label:e,className:o,description:a,labelClass:c="wdo:basis-3/5",optionClass:l="",children:h,disabled:u=!1,optionDescription:m,footer:w})=>(0,s.jsxs)("div",{className:F("wdo:option",u&&"wdo:pointer-events-none wdo:select-none wdo:opacity-50",o),...u?{"aria-disabled":"true",tabIndex:-1}:{},children:[(0,s.jsxs)("div",{className:F("wdo:option-label-container wdo:lg:grow-0 wdo:grow",c),children:[(0,s.jsx)("p",{className:"wdo:option-label",children:e}),a&&(0,s.jsx)("p",{className:"wdo:option-description",children:a})]}),(0,s.jsx)("div",{className:l||void 0,children:(0,s.jsxs)("div",{className:"wdo:option-container",children:[(0,s.jsx)("div",{children:h}),m&&(0,s.jsx)("div",{className:"wdo:option-description",children:m})]})}),w&&(0,s.jsx)("div",{className:"wdo:basis-full",children:w})]}),Rt=({value:e,onChange:o,tabIndex:a=0})=>{const[c,l]=(0,f.useState)(e??!1);(0,f.useEffect)(()=>{e!==void 0&&l(e)},[e]);const h=()=>{const m=!c;l(m),o?.(m)},u=c?"on":"off";return(0,s.jsx)("div",{onClick:h,onKeyDown:m=>(m.key==="Enter"||m.key===" ")&&h(),"data-state":u,className:"wdo:on-off wdo:group",role:"switch","aria-checked":c,tabIndex:a,children:(0,s.jsx)("div",{className:"wdo:group-data-[state=on]:translate-x-[23px] wdo:group-data-[state=off]:translate-x-[3px]"})})},Le=({className:e,...o})=>(0,s.jsx)("input",{type:"text",className:"wdo:input "+e,...o});/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Xn=B("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var Mt;const de=({className:e="",children:o,isLoading:a,...c})=>(0,s.jsx)("button",{className:`wdo:button ${e}`,...c,...a?{disabled:!0}:{},children:a?(0,s.jsx)(Xn,{className:"wdo:animate-spin wdo:w-4 wdo:h-4"}):o}),Tt=({className:e="",children:o,...a})=>(0,s.jsx)(de,{className:`wdo:button-primary ${e}`,...a,children:o}),Vs=({className:e="",children:o,...a})=>Mt(de,{className:`wdo:button-danger ${e}`,...a,children:o}),Ws=({className:e="",children:o,...a})=>Mt(de,{className:`wdo:button-ghost ${e}`,...a,children:o}),Gn=({children:e,onOverlayClick:o,isOpen:a=!1,...c})=>(0,s.jsx)("div",{className:F("wdo:modal",a&&"open"),onClick:o,children:(0,s.jsx)("div",{className:"wdo:modal-content",onClick:l=>l.stopPropagation(),...c,children:e})});var Qn=d().memo(Gn),Yn=window.wp.apiFetch,Xe=ee.n(Yn),Jn=window.wp.url,Kn,Zn;let je={};function zs(e,o=!1,a=!0){const c=JSON.stringify(e);if(!o&&je[c])return je[c];a&&(e.path=Zn(e.path,{timestamp:Date.now()}));const l=Kn(e).then(h=>h).catch(h=>{throw delete je[c],h});return je[c]=l,l}function It(e){if(e===void 0){je={};return}delete je[e]}var eo=window.lodash,to=ee.n(eo),Dt=ee(8279);const Pt=0,Lt=1,Ft=2,Vt=3;var Wt=Object.prototype.hasOwnProperty;function Ge(e,o){var a,c;if(e===o)return!0;if(e&&o&&(a=e.constructor)===o.constructor){if(a===Date)return e.getTime()===o.getTime();if(a===RegExp)return e.toString()===o.toString();if(a===Array){if((c=e.length)===o.length)for(;c--&&Ge(e[c],o[c]););return c===-1}if(!a||typeof e=="object"){c=0;for(a in e)if(Wt.call(e,a)&&++c&&!Wt.call(o,a)||!(a in o)||!Ge(e[a],o[a]))return!1;return Object.keys(o).length===c}}return e!==e&&o!==o}const he=new WeakMap,pe=()=>{},K=pe(),Fe=Object,S=e=>e===K,ae=e=>typeof e=="function",me=(e,o)=>({...e,...o}),zt=e=>ae(e.then),Qe={},Ve={},Ye="undefined",Ae=typeof window!=Ye,Je=typeof document!=Ye,no=Ae&&"Deno"in window,oo=()=>Ae&&typeof window.requestAnimationFrame!=Ye,Ut=(e,o)=>{const a=he.get(e);return[()=>!S(o)&&e.get(o)||Qe,c=>{if(!S(o)){const l=e.get(o);o in Ve||(Ve[o]=l),a[5](o,me(l,c),l||Qe)}},a[6],()=>!S(o)&&o in Ve?Ve[o]:!S(o)&&e.get(o)||Qe]};let Ke=!0;const so=()=>Ke,[Ze,et]=Ae&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[pe,pe],ro=()=>{const e=Je&&document.visibilityState;return S(e)||e!=="hidden"},ao=e=>(Je&&document.addEventListener("visibilitychange",e),Ze("focus",e),()=>{Je&&document.removeEventListener("visibilitychange",e),et("focus",e)}),io=e=>{const o=()=>{Ke=!0,e()},a=()=>{Ke=!1};return Ze("online",o),Ze("offline",a),()=>{et("online",o),et("offline",a)}},co={isOnline:so,isVisible:ro},lo={initFocus:ao,initReconnect:io},Bt=!f.useId,be=!Ae||no,uo=e=>oo()?window.requestAnimationFrame(e):setTimeout(e,1),We=be?f.useEffect:f.useLayoutEffect,tt=typeof navigator<"u"&&navigator.connection,qt=!be&&tt&&(["slow-2g","2g"].includes(tt.effectiveType)||tt.saveData),ze=new WeakMap,fo=e=>Fe.prototype.toString.call(e),nt=(e,o)=>e===`[object ${o}]`;let ho=0;const ot=e=>{const o=typeof e,a=fo(e),c=nt(a,"Date"),l=nt(a,"RegExp"),h=nt(a,"Object");let u,m;if(Fe(e)===e&&!c&&!l){if(u=ze.get(e),u)return u;if(u=++ho+"~",ze.set(e,u),Array.isArray(e)){for(u="@",m=0;m<e.length;m++)u+=ot(e[m])+",";ze.set(e,u)}if(h){u="#";const w=Fe.keys(e).sort();for(;!S(m=w.pop());)S(e[m])||(u+=m+":"+ot(e[m])+",");ze.set(e,u)}}else u=c?e.toJSON():o=="symbol"?e.toString():o=="string"?JSON.stringify(e):""+e;return u},st=e=>{if(ae(e))try{e=e()}catch{e=""}const o=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?ot(e):"",[e,o]};let po=0;const rt=()=>++po;async function $t(...e){const[o,a,c,l]=e,h=me({populateCache:!0,throwOnError:!0},typeof l=="boolean"?{revalidate:l}:l||{});let u=h.populateCache;const m=h.rollbackOnError;let w=h.optimisticData;const O=A=>typeof m=="function"?m(A):m!==!1,R=h.throwOnError;if(ae(a)){const A=a,C=[],T=o.keys();for(const _ of T)!/^\$(inf|sub)\$/.test(_)&&A(o.get(_)._k)&&C.push(_);return Promise.all(C.map(E))}return E(a);async function E(A){const[C]=st(A);if(!C)return;const[T,_]=Ut(o,C),[k,I,j,Y]=he.get(o),te=()=>{const ce=k[C];return(ae(h.revalidate)?h.revalidate(T().data,A):h.revalidate!==!1)&&(delete j[C],delete Y[C],ce&&ce[0])?ce[0](Ft).then(()=>T().data):T().data};if(e.length<3)return te();let q=c,N,z=!1;const ie=rt();I[C]=[ie,0];const U=!S(w),ke=T(),ue=ke.data,Ne=ke._c,xe=S(Ne)?ue:Ne;if(U&&(w=ae(w)?w(xe,ue):w,_({data:w,_c:xe})),ae(q))try{q=q(xe)}catch(ce){N=ce,z=!0}if(q&&zt(q))if(q=await q.catch(ce=>{N=ce,z=!0}),ie!==I[C][0]){if(z)throw N;return q}else z&&U&&O(N)&&(u=!0,_({data:xe,_c:K}));if(u&&!z)if(ae(u)){const ce=u(q,xe);_({data:ce,error:K,_c:K})}else _({data:q,error:K,_c:K});if(I[C][1]=rt(),Promise.resolve(te()).then(()=>{_({_c:K})}),z){if(R)throw N;return}return q}}const Ht=(e,o)=>{for(const a in e)e[a][0]&&e[a][0](o)},Xt=(e,o)=>{if(!he.has(e)){const a=me(lo,o),c=Object.create(null),l=$t.bind(K,e);let h=pe;const u=Object.create(null),m=(R,E)=>{const A=u[R]||[];return u[R]=A,A.push(E),()=>A.splice(A.indexOf(E),1)},w=(R,E,A)=>{e.set(R,E);const C=u[R];if(C)for(const T of C)T(E,A)},O=()=>{if(!he.has(e)&&(he.set(e,[c,Object.create(null),Object.create(null),Object.create(null),l,w,m]),!be)){const R=a.initFocus(setTimeout.bind(K,Ht.bind(K,c,Pt))),E=a.initReconnect(setTimeout.bind(K,Ht.bind(K,c,Lt)));h=()=>{R&&R(),E&&E(),he.delete(e)}}};return O(),[e,l,O,h]}return[e,he.get(e)[4]]},mo=(e,o,a,c,l)=>{const h=a.errorRetryCount,u=l.retryCount,m=~~((Math.random()+.5)*(1<<(u<8?u:8)))*a.errorRetryInterval;!S(h)&&u>h||setTimeout(c,m,l)},wo=Ge,[at,go]=Xt(new Map),Gt=me({onLoadingSlow:pe,onSuccess:pe,onError:pe,onErrorRetry:mo,onDiscarded:pe,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:qt?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:qt?5e3:3e3,compare:wo,isPaused:()=>!1,cache:at,mutate:go,fallback:{}},co),Qt=(e,o)=>{const a=me(e,o);if(o){const{use:c,fallback:l}=e,{use:h,fallback:u}=o;c&&h&&(a.use=c.concat(h)),l&&u&&(a.fallback=me(l,u))}return a},it=(0,f.createContext)({}),xo=e=>{const{value:o}=e,a=(0,f.useContext)(it),c=ae(o),l=(0,f.useMemo)(()=>c?o(a):o,[c,a,o]),h=(0,f.useMemo)(()=>c?l:Qt(a,l),[c,a,l]),u=l&&l.provider,m=(0,f.useRef)(K);u&&!m.current&&(m.current=Xt(u(h.cache||at),l));const w=m.current;return w&&(h.cache=w[0],h.mutate=w[1]),We(()=>{if(w)return w[2]&&w[2](),w[3]},[]),(0,f.createElement)(it.Provider,me(e,{value:h}))},vo="$inf$";var yo,_o,jo,bo;const Yt=Ae&&window.__SWR_DEVTOOLS_USE__,ko=Yt?window.__SWR_DEVTOOLS_USE__:[],No=()=>{Yt&&(window.__SWR_DEVTOOLS_REACT__=f)},Jt=e=>ae(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Eo=()=>{const e=(0,f.useContext)(it);return(0,f.useMemo)(()=>me(Gt,e),[e])},Us=(e,o)=>{if(yo)return;const[a,c]=_o(e),[,,,l]=jo.get(bo);if(l[a])return l[a];const h=o(c);return l[a]=h,h},So=e=>(o,a,c)=>e(o,a&&((...h)=>{const[u]=st(o),[,,,m]=he.get(at);if(u.startsWith(vo))return a(...h);const w=m[u];return S(w)?a(...h):(delete m[u],w)}),c),Co=ko.concat(So),Oo=e=>function(...a){const c=Eo(),[l,h,u]=Jt(a),m=Qt(c,u);let w=e;const{use:O}=m,R=(O||[]).concat(Co);for(let E=R.length;E--;)w=R[E](w);return w(l,h||m.fetcher||null,m)},Ao=(e,o,a)=>{const c=o[e]||(o[e]=[]);return c.push(a),()=>{const l=c.indexOf(a);l>=0&&(c[l]=c[c.length-1],c.pop())}},Bs=(e,o)=>(...a)=>{const[c,l,h]=Jt(a),u=(h.use||[]).concat(o);return e(c,l,{...h,use:u})};No();const Ro=void 0,ct=null,Kt=e=>e===Ro,Mo=e=>typeof e=="function",Ue=new WeakMap,To=e=>ct.prototype.toString.call(e),lt=(e,o)=>e===`[object ${o}]`;let Io=0;const dt=e=>{const o=typeof e,a=To(e),c=lt(a,"Date"),l=lt(a,"RegExp"),h=lt(a,"Object");let u,m;if(ct(e)===e&&!c&&!l){if(u=Ue.get(e),u)return u;if(u=++Io+"~",Ue.set(e,u),Array.isArray(e)){for(u="@",m=0;m<e.length;m++)u+=dt(e[m])+",";Ue.set(e,u)}if(h){u="#";const w=ct.keys(e).sort();for(;!Kt(m=w.pop());)Kt(e[m])||(u+=m+":"+dt(e[m])+",");Ue.set(e,u)}}else u=c?e.toJSON():o=="symbol"?e.toString():o=="string"?JSON.stringify(e):""+e;return u},Do=e=>{if(Mo(e))try{e=e()}catch{e=""}const o=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?dt(e):"",[e,o]},$s=e=>Do(e)[0],ut=f.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(o=>{e.status="fulfilled",e.value=o},o=>{e.status="rejected",e.reason=o}),e}}),ft={dedupe:!0},Zt=Promise.resolve(K),Po=()=>pe,Lo=(e,o,a)=>{const{cache:c,compare:l,suspense:h,fallbackData:u,revalidateOnMount:m,revalidateIfStale:w,refreshInterval:O,refreshWhenHidden:R,refreshWhenOffline:E,keepPreviousData:A,strictServerPrefetchWarning:C}=a,[T,_,k,I]=he.get(c),[j,Y]=st(e),te=(0,f.useRef)(!1),q=(0,f.useRef)(!1),N=(0,f.useRef)(j),z=(0,f.useRef)(o),ie=(0,f.useRef)(a),U=()=>ie.current,ke=()=>U().isVisible()&&U().isOnline(),[ue,Ne,xe,ce]=Ut(c,j),Ee=(0,f.useRef)({}).current,Se=S(u)?S(a.fallback)?K:a.fallback[j]:u,nn=(V,$)=>{for(const H in Ee){const X=H;if(X==="data"){if(!l(V[X],$[X])&&(!S(V[X])||!l($e,$[X])))return!1}else if($[X]!==V[X])return!1}return!0},ht=!te.current,on=(0,f.useMemo)(()=>{const V=ue(),$=ce(),H=G=>{const le=me(G);return delete le._k,(()=>{if(!j||!o||U().isPaused())return!1;if(ht&&!S(m))return m;const Ie=S(Se)?le.data:Se;return S(Ie)||w})()?{isValidating:!0,isLoading:!0,...le}:le},X=H(V),fe=V===$?X:H($);let oe=X;return[()=>{const G=H(ue());return nn(G,oe)?(oe.data=G.data,oe.isLoading=G.isLoading,oe.isValidating=G.isValidating,oe.error=G.error,oe):(oe=G,G)},()=>fe]},[c,j]),Ce=(0,Dt.useSyncExternalStore)((0,f.useCallback)(V=>xe(j,($,H)=>{nn(H,$)||V()}),[c,j]),on[0],on[1]),os=T[j]&&T[j].length>0,Oe=Ce.data,ve=S(Oe)?Se&&zt(Se)?ut(Se):Se:Oe,qe=Ce.error,pt=(0,f.useRef)(ve),$e=A?S(Oe)?S(pt.current)?ve:pt.current:Oe:ve,ye=j&&S(ve),Re=(0,f.useRef)(null);!be&&(0,Dt.useSyncExternalStore)(Po,()=>(Re.current=!1,Re),()=>(Re.current=!0,Re));const ss=Re.current;C&&ss&&!h&&ye&&console.warn(`Missing pre-initiated data for serialized key "${j}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const sn=!j||!o||U().isPaused()||os&&!S(qe)?!1:ht&&!S(m)?m:h?S(ve)?!1:w:S(ve)||w,rn=ht&&sn,rs=S(Ce.isValidating)?rn:Ce.isValidating,as=S(Ce.isLoading)?rn:Ce.isLoading,Me=(0,f.useCallback)(async V=>{const $=z.current;if(!j||!$||q.current||U().isPaused())return!1;let H,X,fe=!0;const oe=V||{},G=!k[j]||!oe.dedupe,le=()=>Bt?!q.current&&j===N.current&&te.current:j===N.current,Te={isValidating:!1,isLoading:!1},Ie=()=>{Ne(Te)},cn=()=>{const se=k[j];se&&se[1]===X&&delete k[j]},ln={isValidating:!0};S(ue().data)&&(ln.isLoading=!0);try{if(G&&(Ne(ln),a.loadingTimeout&&S(ue().data)&&setTimeout(()=>{fe&&le()&&U().onLoadingSlow(j,a)},a.loadingTimeout),k[j]=[$(Y),rt()]),[H,X]=k[j],H=await H,G&&setTimeout(cn,a.dedupingInterval),!k[j]||k[j][1]!==X)return G&&le()&&U().onDiscarded(j),!1;Te.error=K;const se=_[j];if(!S(se)&&(X<=se[0]||X<=se[1]||se[1]===0))return Ie(),G&&le()&&U().onDiscarded(j),!1;const we=ue().data;Te.data=l(we,H)?we:H,G&&le()&&U().onSuccess(H,j,a)}catch(se){cn();const we=U(),{shouldRetryOnError:mt}=we;we.isPaused()||(Te.error=se,G&&le()&&(we.onError(se,j,we),(mt===!0||ae(mt)&&mt(se))&&(!U().revalidateOnFocus||!U().revalidateOnReconnect||ke())&&we.onErrorRetry(se,j,we,is=>{const wt=T[j];wt&&wt[0]&&wt[0](Vt,is)},{retryCount:(oe.retryCount||0)+1,dedupe:!0})))}return fe=!1,Ie(),!0},[j,c]),an=(0,f.useCallback)((...V)=>$t(c,N.current,...V),[]);if(We(()=>{z.current=o,ie.current=a,S(Oe)||(pt.current=Oe)}),We(()=>{if(!j)return;const V=Me.bind(K,ft);let $=0;U().revalidateOnFocus&&($=Date.now()+U().focusThrottleInterval);const X=Ao(j,T,(fe,oe={})=>{if(fe==Pt){const G=Date.now();U().revalidateOnFocus&&G>$&&ke()&&($=G+U().focusThrottleInterval,V())}else if(fe==Lt)U().revalidateOnReconnect&&ke()&&V();else{if(fe==Ft)return Me();if(fe==Vt)return Me(oe)}});return q.current=!1,N.current=j,te.current=!0,Ne({_k:Y}),sn&&(k[j]||(S(ve)||be?V():uo(V))),()=>{q.current=!0,X()}},[j]),We(()=>{let V;function $(){const X=ae(O)?O(ue().data):O;X&&V!==-1&&(V=setTimeout(H,X))}function H(){!ue().error&&(R||U().isVisible())&&(E||U().isOnline())?Me(ft).then($):$()}return $(),()=>{V&&(clearTimeout(V),V=-1)}},[O,R,E,j]),(0,f.useDebugValue)($e),h){if(!Bt&&be&&ye)throw new Error("Fallback data is required when using Suspense in SSR.");ye&&(z.current=o,ie.current=a,q.current=!1);const V=I[j],$=!S(V)&&ye?an(V):Zt;if(ut($),!S(qe)&&ye)throw qe;const H=ye?Me(ft):Zt;!S($e)&&ye&&(H.status="fulfilled",H.value=!0),ut(H)}return{mutate:an,get data(){return Ee.data=!0,$e},get error(){return Ee.error=!0,qe},get isValidating(){return Ee.isValidating=!0,rs},get isLoading(){return Ee.isLoading=!0,as}}},Hs=Fe.defineProperty(xo,"defaultValue",{value:Gt}),Fo=Oo(Lo);var Vo=()=>{const e=(0,Jn.addQueryArgs)("/ajax-search-lite/options/analytics"),o=u=>Xe()({path:u}),{data:a,isLoading:c,mutate:l,error:h}=Fo(e,o,{revalidateIfStale:!1,revalidateOnFocus:!0,revalidateOnReconnect:!1,revalidateOnMount:!0});return h?{data:void 0,error:h,isLoading:c,mutate:l}:{data:a||{},error:void 0,isLoading:c,mutate:l}};const Be=e=>/^[a-zA-Z][a-zA-Z0-9_]*$/.test(e.trim()),Wo=e=>{const o=["focus","search_start","search_end","magnifier","return","facet_change","result_click"];for(const a of o)for(const c of e[a]?.items??[]){if(!c.name.trim())return(0,g.__)("Event name is required.","ajax-search-lite");if(!Be(c.action))return(0,g.__)("Event action must start with a letter and contain only letters, numbers, and underscores (no spaces).","ajax-search-lite");for(const l of c.params){if(!Be(l.key))return(0,g.__)("Parameter name must start with a letter and contain only letters, numbers, and underscores.","ajax-search-lite");if(!l.value.trim())return(0,g.__)("Parameter value must not be empty.","ajax-search-lite")}}return null};/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zo=B("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Uo=B("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bo=B("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var qo=({item:e,availableVars:o,initialExpanded:a,onChange:c,onDelete:l})=>{const[h,u]=(0,f.useState)(a??!1),[m,w]=(0,f.useState)(!1),O=e.name.trim()==="",R=e.action!==""&&!Be(e.action),E=(_,k)=>{c({...e,[_]:k})},A=(_,k,I)=>{const j=e.params.map((Y,te)=>te===_?{...Y,[k]:I}:Y);E("params",j)},C=_=>{E("params",e.params.filter((k,I)=>I!==_))},T=()=>{E("params",[...e.params,{key:"",value:""}])};return(0,s.jsxs)("div",{className:"wdo:border wdo:border-gray-200 wdo:dark:border-gray-700 wdo:rounded-lg wdo:mb-2",children:[(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-3 wdo:px-4 wdo:py-3 wdo:cursor-pointer",onClick:()=>u(_=>!_),children:[(0,s.jsx)("div",{onClick:_=>_.stopPropagation(),children:(0,s.jsx)(Rt,{value:e.active,onChange:_=>{E("active",_)}})}),(0,s.jsx)("input",{type:"text",className:"wdo:input wdo:flex-1 wdo:min-w-0"+(O?" wdo:!border-red-400":""),placeholder:(0,g.__)("Event name (e.g. Track search phrase)","ajax-search-lite"),value:e.name,onClick:_=>_.stopPropagation(),onChange:_=>E("name",_.target.value)}),(0,s.jsxs)("div",{className:"wdo:flex wdo:items-center wdo:gap-2 wdo:ml-auto wdo:shrink-0",children:[m?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"wdo:text-sm wdo:text-red-500",children:(0,g.__)("Delete?","ajax-search-lite")}),(0,s.jsx)(de,{className:"wdo:border-red-400 wdo:bg-transparent wdo:text-red-400 wdo:hover:bg-transparent wdo:text-sm wdo:py-1 wdo:px-2",onClick:_=>{_.stopPropagation(),l()},children:(0,g.__)("Yes","ajax-search-lite")}),(0,s.jsx)(de,{className:"wdo:text-sm wdo:py-1 wdo:px-2",onClick:_=>{_.stopPropagation(),w(!1)},children:(0,g.__)("No","ajax-search-lite")})]}):(0,s.jsx)(de,{className:"wdo:border-transparent wdo:bg-transparent wdo:text-gray-400 wdo:hover:text-red-400 wdo:hover:bg-transparent wdo:p-1",onClick:_=>{_.stopPropagation(),w(!0)},title:(0,g.__)("Delete event","ajax-search-lite"),children:(0,s.jsx)(zo,{size:16})}),h?(0,s.jsx)(Uo,{size:16,className:"wdo:text-gray-400"}):(0,s.jsx)(Bo,{size:16,className:"wdo:text-gray-400"})]})]}),h&&(0,s.jsxs)("div",{className:"wdo:border-t wdo:border-gray-200 wdo:dark:border-gray-700",children:[(0,s.jsx)(Pe,{label:(0,g.__)("Event action","ajax-search-lite"),description:(0,g.__)("Required. The GA4 event name \u2014 letters, numbers and underscores only, no spaces (e.g. search_start).","ajax-search-lite"),children:(0,s.jsx)(Le,{value:e.action,className:R?"wdo:!border-red-400":"",onChange:_=>E("action",_.target.value)})}),(0,s.jsxs)(Pe,{label:(0,g.__)("Parameters","ajax-search-lite"),description:`${(0,g.__)("Available variables:","ajax-search-lite")} ${o.join(", ")}`,labelClass:"wdo:w-full",optionClass:"wdo:w-full",children:[e.params.length>0&&(0,s.jsxs)("div",{className:"wdo:mb-2",children:[(0,s.jsxs)("div",{className:"wdo:grid wdo:gap-x-2",style:{gridTemplateColumns:"1fr 1fr auto"},children:[(0,s.jsx)("span",{className:"wdo:text-xs wdo:text-wp-admin-400 wdo:dark:text-wp-admin-500 wdo:px-1",children:(0,g.__)("Parameter name","ajax-search-lite")}),(0,s.jsx)("span",{className:"wdo:text-xs wdo:text-wp-admin-400 wdo:dark:text-wp-admin-500 wdo:px-1",children:(0,g.__)("Value","ajax-search-lite")}),(0,s.jsx)("span",{})]}),e.params.map((_,k)=>(0,s.jsxs)("div",{className:"wdo:grid wdo:gap-x-2 wdo:mt-1 wdo:items-center",style:{gridTemplateColumns:"1fr 1fr auto"},children:[(0,s.jsx)(Le,{placeholder:"event_category",value:_.key,className:_.key!==""&&!Be(_.key)?"wdo:!border-red-400":"",onChange:I=>A(k,"key",I.target.value)}),(0,s.jsx)(Le,{placeholder:"{phrase}",value:_.value,className:_.key!==""&&_.value.trim()===""?"wdo:!border-red-400":"",onChange:I=>A(k,"value",I.target.value)}),(0,s.jsx)("button",{className:"wdo:p-1 wdo:text-wp-admin-400 wdo:hover:text-red-400 wdo:transition-colors",onClick:()=>C(k),title:(0,g.__)("Remove parameter","ajax-search-lite"),children:(0,s.jsx)(vt,{size:14})})]},k))]}),(0,s.jsx)(de,{className:"wdo:text-sm wdo:py-1 wdo:px-3",onClick:T,children:(0,g.__)("+ Add parameter","ajax-search-lite")})]})]})]})};/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $o=B("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Ho={active:!0,name:"",action:"",params:[]},Xo={focus:["{phrase}"],search_start:["{phrase}"],search_end:["{phrase}","{results_count}"],magnifier:["{phrase}"],return:["{phrase}"],facet_change:["{phrase}","{option_label}","{option_value}"],result_click:["{phrase}","{result_title}","{result_url}"]};var Go=({triggerKey:e,label:o,description:a,config:c,onChange:l})=>{const h=c?.items??[],[u,m]=(0,f.useState)(null),w=(E,A)=>{const C=[...h];C[E]=A,l({items:C})},O=E=>{l({items:h.filter((A,C)=>C!==E)})},R=()=>{m(h.length),l({items:[...h,{...Ho}]})};return(0,s.jsx)("div",{className:"wdo:border-b wdo:border-gray-200 wdo:dark:border-gray-700 last:wdo:border-b-0",children:(0,s.jsxs)("div",{className:"wdo:px-6 wdo:pt-5 wdo:pb-2",children:[(0,s.jsxs)("div",{className:"wdo:flex wdo:items-start wdo:justify-between wdo:gap-4 wdo:mb-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"wdo:text-base wdo:font-semibold wdo:dark:text-white",children:o}),(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-500 wdo:dark:text-gray-400 wdo:mt-0.5",children:a})]}),(0,s.jsxs)(de,{className:"wdo:shrink-0 wdo:flex wdo:items-center wdo:gap-1 wdo:text-sm wdo:py-1 wdo:px-3",onClick:R,children:[(0,s.jsx)($o,{size:14}),(0,g.__)("Add event","ajax-search-lite")]})]}),h.length>0?(0,s.jsx)("div",{className:"wdo:mb-3",children:h.map((E,A)=>(0,s.jsx)(qo,{item:E,availableVars:Xo[e]??["{phrase}"],initialExpanded:u===A,onChange:C=>w(A,C),onDelete:()=>O(A)},A))}):(0,s.jsx)("p",{className:"wdo:text-sm wdo:text-gray-400 wdo:dark:text-gray-500 wdo:mb-3 wdo:italic",children:(0,g.__)('No events configured. Click "Add event" to create one.',"ajax-search-lite")})]})})};/** * @license lucide-react v1.14.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Qo=B("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var Yo=({className:e,children:o})=>(0,s.jsxs)("div",{className:`wdo:flex wdo:gap-3 wdo:items-center wdo:p-3 wdo:rounded-sm wdo:border wdo:border-blue-500/30 wdo:bg-blue-500/10 wdo:text-blue-700 wdo:dark:text-blue-400 wdo:text-sm ${e??""}`,children:[(0,s.jsx)(Qo,{className:"wdo:w-5 wdo:h-5 wdo:shrink-0"}),(0,s.jsx)("div",{children:o})]}),Jo,en,Ko;const nr=({className:e,children:o})=>Jo("div",{className:`wdo:flex wdo:gap-3 wdo:items-center wdo:p-3 wdo:rounded-sm wdo:border wdo:border-amber-500/30 wdo:bg-amber-500/10 wdo:text-amber-700 wdo:dark:text-amber-400 wdo:text-sm ${e??""}`,children:[en(Ko,{className:"wdo:w-5 wdo:h-5 wdo:shrink-0"}),en("div",{children:o})]});var or=null;const Zo=[{key:"focus",label:(0,g.__)("Input focus","ajax-search-lite"),description:(0,g.__)("Fires when the user clicks on the search input field.","ajax-search-lite")},{key:"search_start",label:(0,g.__)("Search start","ajax-search-lite"),description:(0,g.__)("Fires when the live search request begins.","ajax-search-lite")},{key:"search_end",label:(0,g.__)("Search end","ajax-search-lite"),description:(0,g.__)("Fires when the live search results are displayed.","ajax-search-lite")},{key:"magnifier",label:(0,g.__)("Magnifier click","ajax-search-lite"),description:(0,g.__)("Fires when the user clicks the magnifier icon.","ajax-search-lite")},{key:"return",label:(0,g.__)("Enter / Return key","ajax-search-lite"),description:(0,g.__)("Fires when the user presses Enter in the search input.","ajax-search-lite")},{key:"facet_change",label:(0,g.__)("Filter change","ajax-search-lite"),description:(0,g.__)("Fires when the user changes a front-end filter option.","ajax-search-lite")},{key:"result_click",label:(0,g.__)("Result click","ajax-search-lite"),description:(0,g.__)("Fires when the user clicks on a search result.","ajax-search-lite")}],es=()=>{const[e,o]=(0,f.useState)(null),{data:a,isLoading:c,error:l,mutate:h}=Vo(),[u,m]=(0,f.useState)(!1),[w,O]=(0,f.useState)(!1),[R,E]=(0,f.useState)(!1),{addSuccess:A,addError:C}=y(),T=(0,f.useContext)(De);(0,f.useEffect)(()=>{a!==void 0&&o(a)},[c]);const _=N=>{to().isEqual(N,a)?T?.setConfirmBeforeSwap(null):T?.setConfirmBeforeSwap((0,g.__)("There are unsaved changes, are you sure you want to leave?","ajax-search-lite"))},k=N=>{if(!e)return;const z={...e,method:{value:N}};o(z),_(z)},I=N=>{if(!e)return;const z={...e,tracking_id:{value:N}};o(z),_(z)},j=(N,z)=>{if(!e)return;const ie={...e,[N]:z};o(ie),_(ie)},Y=()=>{if(!e)return;const N=Wo(e);if(N){C(N);return}m(!0),Xe()({path:"/ajax-search-lite/options/analytics",headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({...e})}).then(z=>{o(z),A((0,g.__)("Options saved successfully!","ajax-search-lite"))}).catch(z=>{C(z)}).finally(()=>{It(),h(),m(!1),T?.setConfirmBeforeSwap(null)})},te=()=>{O(!0),Xe()({path:"/ajax-search-lite/options/analytics/reset",headers:{"Content-Type":"application/json"},method:"POST"}).then(N=>{o(N),A((0,g.__)("Options reset successfully!","ajax-search-lite"))}).catch(N=>{C(N)}).finally(()=>{It(),h(),O(!1),E(!1),T?.setConfirmBeforeSwap(null)})};if(c||e===null||Object.keys(e).length===0)return(0,s.jsx)("div",{className:"wdo:flex wdo:flex-col wdo:card wdo:m-4",children:(0,s.jsx)("p",{className:"wdo:p-6",children:(0,g.__)("Loading...","ajax-search-lite")})});if(l)return(0,s.jsx)("div",{className:"wdo:flex wdo:flex-col wdo:card wdo:m-4",children:(0,s.jsx)("p",{className:"wdo:p-6",children:(0,g.__)("Error loading options, please reload the page.","ajax-search-lite")})});const q=e.method.value;return(0,s.jsxs)("div",{className:"wdo:flex wdo:flex-col wdo:card wdo:m-4",children:[(0,s.jsx)("div",{className:"wdo:p-6",children:(0,s.jsx)("h1",{className:"wdo:text-[1.8em] wdo:dark:text-white",children:"Settings"})}),(0,s.jsx)(Pe,{label:(0,g.__)("Event tracking enabled","ajax-search-lite"),description:(0,g.__)("Send search interaction events to Google Analytics / GTM.","ajax-search-lite"),children:(0,s.jsx)(Rt,{value:e.method.value,onChange:k})}),q&&(0,s.jsx)(Pe,{label:(0,g.__)("Tracking ID (optional)","ajax-search-lite"),description:(0,g.__)("Leave empty to use the globally installed GA/GTM tracker. Provide a UA-XXXXXX-X or G-XXXXXXXX ID to send events to a specific property.","ajax-search-lite"),children:(0,s.jsx)(Le,{value:e.tracking_id.value,placeholder:"UA-XXXXXXXX-X",onChange:N=>I(N.target.value)})}),q&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"wdo:px-6 wdo:pt-4 wdo:pb-2",children:(0,s.jsx)(Yo,{children:(0,g.__)("Configure one or more GA events per trigger. Each event fires independently when its trigger occurs.","ajax-search-lite")})}),Zo.map(({key:N,label:z,description:ie})=>(0,s.jsx)(Go,{triggerKey:N,label:z,description:ie,config:e[N],onChange:U=>j(N,U)},N))]}),(0,s.jsxs)("div",{className:"wdo:p-6 wdo:flex wdo:gap-6",children:[(0,s.jsx)(Tt,{isLoading:u,disabled:u||w,onClick:N=>{N.preventDefault(),Y()},children:(0,g.__)("Save!","ajax-search-lite")}),(0,s.jsx)(de,{isLoading:w,disabled:u||w,onClick:()=>E(!0),children:(0,g.__)("Reset to defaults","ajax-search-lite")})]}),(0,s.jsxs)(Qn,{isOpen:R,onOverlayClick:()=>E(!1),children:[(0,s.jsx)("h2",{className:"wdo:mb-2",children:(0,g.__)("Confirm","ajax-search-lite")}),(0,s.jsx)("p",{children:(0,g.__)("Are you sure you want to reset all analytics settings to defaults? All configured events will be removed.","ajax-search-lite")}),(0,s.jsxs)("div",{className:"wdo:flex wdo:mt-6 wdo:gap-6",children:[(0,s.jsx)(Tt,{isLoading:w,disabled:u||w,onClick:N=>{N.preventDefault(),te()},children:(0,g.__)("Reset","ajax-search-lite")}),(0,s.jsx)(de,{disabled:u||w,onClick:()=>E(!1),children:(0,g.__)("Cancel","ajax-search-lite")})]})]})]})},ts=()=>{const e=(0,f.useContext)(De);return e?.activeId==="settings"||!e?.activeId?(0,s.jsx)(es,{}):""};var ns=()=>{const{messages:e}=y();return(0,s.jsxs)(_n,{children:[(0,s.jsx)(gn,{messages:e}),(0,s.jsx)(kn,{subtitle:"Analytics",logo:(0,s.jsx)("h1",{className:"wdo:text-[1.85em]! wdo:leading-[1.45em]! wdo:font-bold",children:"Ajax Search Lite"})}),ASL_BACKEND.is_pro_active?(0,s.jsx)(In,{feature:"Analytics"}):(0,s.jsxs)(Sn,{children:[(0,s.jsxs)("div",{className:"wdo:panel-container",children:[(0,s.jsxs)("nav",{className:"wdo:menu-panel",children:[(0,s.jsxs)(Cn,{children:[(0,s.jsx)(kt,{label:(0,g.__)("Settings","ajax-search-lite"),id:"settings",defaultActive:!0,iconBefore:(0,s.jsx)(On,{})}),(0,s.jsx)(kt,{label:(0,g.__)("Documentation","ajax-search-lite"),id:"documentation",onClick:o=>{o.preventDefault(),An("https://documentation.ajaxsearchpro.com/analytics-integration")},iconAfter:(0,s.jsx)(Nt,{})})]}),(0,s.jsx)(Mn,{utmContent:"analytics-sidebar-button"})]}),(0,s.jsxs)("div",{className:"wdo:content-panel",children:[(0,s.jsx)(Hn,{}),(0,s.jsx)(ts,{})]})]}),(0,s.jsx)(Un,{utmContent:"analytics-pro-panel"})]})]})};const tn=document.getElementById("asp-root");tn!==null&&L().render((0,s.jsx)(ns,{}),tn)})()})();