PageSourceSearch

https://clubandresortbusiness.com/wp-content/plugins/gp-popups/js/…?ver=6bc2f7ca7ce26c07c139

js clubandresortbusiness.com collected 2026-09-26 01:04:16 UTC 101,639 bytes, 2 lines download raw bytes

1(()=>{"use strict";var e,t,o,n={},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e].call(o.exports,o,o.exports,i),o.exports}function a(e,t,o){var n="";if(o>0){var r=new Date;r.setTime(r.getTime()+24*o*60*60*1e3),n="; expires=".concat(r.toUTCString())}document.cookie="".concat(e,"=").concat(encodeURIComponent(t)).concat(n,"; path=/; SameSite=Lax")}function s(e){for(var t="".concat(e,"="),o=document.cookie.split(";"),n=0;n<o.length;n++){for(var r=o[n];" "===r.charAt(0);)r=r.substring(1);if(0===r.indexOf(t))return decodeURIComponent(r.substring(t.length))}return""}i.m=n,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var r=Object.create(null);i.r(r);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&o;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>o[e]));return a.default=()=>o,i.d(r,a),r},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,o)=>(i.f[o](e,t),t)),[])),i.u=e=>"ua-parser.js",i.miniCssF=e=>{},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o={},i.l=(e,t,n,r)=>{if(o[e])o[e].push(t);else{var a,s;if(void 0!==n)for(var c=document.getElementsByTagName("script"),p=0;p<c.length;p++){var u=c[p];if(u.getAttribute("src")==e){a=u;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=e),o[e]=[t];var l=(t,n)=>{a.onerror=a.onload=null,clearTimeout(d);var r=o[e];if(delete o[e],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((e=>e(n))),t)return t(n)},d=setTimeout(l.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=l.bind(null,a.onerror),a.onload=l.bind(null,a.onload),s&&document.head.appendChild(a)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={503:0};i.f.j=(t,o)=>{var n=i.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else{var r=new Promise(((o,r)=>n=e[t]=[o,r]));o.push(n[2]=r);var a=i.p+i.u(t),s=new Error;i.l(a,(o=>{if(i.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=o&&("load"===o.type?"missing":o.type),a=o&&o.target&&o.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+a+")",s.name="ChunkLoadError",s.type=r,s.request=a,n[1](s)}}),"chunk-"+t,t)}};var t=(t,o)=>{var n,r,[a,s,c]=o,p=0;if(a.some((t=>0!==e[t]))){for(n in s)i.o(s,n)&&(i.m[n]=s[n]);c&&c(i)}for(t&&t(o);p<a.length;p++)r=a[p],i.o(e,r)&&e[r]&&e[r][0](),e[r]=0},o=self.webpackChunk=self.webpackChunk||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var c=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a},p=function(e,t,o){if(o||2===arguments.length)for(var n,r=0,i=t.length;r<i;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))},u=null;function l(){return null!==u?u:u=function(){if("undefined"!=typeof window&&window.location){var e=new URLSearchParams(window.location.search);if(e.has("gp_debug")){var t=e.get("gp_debug");if(null===t||""===t||"1"===t||"true"===t)return!0}if(window.location.hash.includes("gp-debug"))return!0}return!1}()}function d(e){var t="[GP Popups] [".concat(e,"]"),o=function(e){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];
1("error"===e||l())&&console[e].apply(console,p([t],c(o),!1))};return{log:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.apply(void 0,p(["log"],c(e),!1))},warn:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.apply(void 0,p(["warn"],c(e),!1))},error:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.apply(void 0,p(["error"],c(e),!1))},info:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.apply(void 0,p(["info"],c(e),!1))},group:function(e,o){l()&&console.groupCollapsed("".concat(t," ").concat(e));try{o()}finally{l()&&console.groupEnd()}},groupExpanded:function(e,o){l()&&console.group("".concat(t," ").concat(e));try{o()}finally{l()&&console.groupEnd()}},table:function(e){l()&&(console.log(t),console.table(e))},time:function(e){l()&&console.time("".concat(t," ").concat(e))},timeEnd:function(e){l()&&console.timeEnd("".concat(t," ").concat(e))}}}d("Core");var h,g="gp-popup-open",f=new(function(){function e(){this.count=0}return e.prototype.acquire=function(){this.count++,1===this.count&&document.body.classList.add(g)},e.prototype.release=function(){this.count=Math.max(0,this.count-1),0===this.count&&document.body.classList.remove(g)},e.prototype.getCount=function(){return this.count},e.prototype.reset=function(){this.count=0,document.body.classList.remove(g)},e}()),m=function(){function e(){this.hasScrollLock=!1}return e.prototype.applyBodyState=function(e){this.hasScrollLock||(f.acquire(),this.hasScrollLock=!0)},e.prototype.removeBodyState=function(e){this.hasScrollLock&&(f.release(),this.hasScrollLock=!1)},e}(),y=(h=function(e,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},h(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),v=function(e){function t(){var t=e.apply(this,function(e,t,o){if(o||2===arguments.length)for(var n,r=0,i=t.length;r<i;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}([],function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a}(arguments),!1))||this;return t.getDisplayModeClasses=function(){return["gp-popup--popup"]},t.applyDialogSizing=function(e,t){e.style.width=t.popupWidth,e.style.height=t.popupHeight},t.shouldCloseOnBackdropClick=function(e){return e.closeOnBackdropClick},t}return y(t,e),t}(m),b=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},e(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),w=function(e){function t(t,o){void 0===o&&(o="fade");var n=e.call(this)||this;return n.getDisplayModeClasses=function(){return["gp-popup--banner-".concat(n.position)]},n.applyDialogSizing=function(e,t){e.style.height=t.popupHeight},n.shouldCloseOnBackdropClick=function(){return!1},n.onPopupRevealed=function(e){var t=e.offsetHeight;document.body.style.setProperty("--gp-popup-banner-height","".concat(t,"px"))},n.onPopupRemoving=function(){return new Promise((function(e){document.body.style.setProperty("--gp-popup-banner-height","0px"),setTimeout(e,300)}))},n.position=t,n.animationType=o,n}return b(t,e),t.prototype.applyBodyState=function(){document.body.classList.add("gp-popup-banner-".concat(this.position,"-open")),"fade"===this.animationType&&document.body.classList.add("gp-popup-banner-no-transition")},t.prototype.removeBodyState=function(){document.body.classList.remove("gp-popup-banner-".concat(this.position,"-open")),document.body.classList.remove("gp-popup-banner-no-transition"),document.body.style.removeProperty("--gp-popup-banner-height")},t}(m),_=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},e(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),S=function(e){function t(){var t=e.apply(this,function(e,t,o){if(o||2===arguments.length)for(var n,r=0,i=t.length;r<i;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}([],function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){r={error:e}}
1finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a}(arguments),!1))||this;return t.getDisplayModeClasses=function(){return["gp-popup--fullscreen"]},t.shouldCloseOnBackdropClick=function(){return!1},t}return _(t,e),t}(m),T=function(){var e=function(t,o){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},e(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),C={bottom_right:"br",bottom_left:"bl",top_right:"tr",top_left:"tl"},k=function(e){function t(t){var o=e.call(this)||this;return o.getDisplayModeClasses=function(){return["gp-popup--corner","gp-popup--corner-".concat(o.positionSuffix)]},o.applyDialogSizing=function(e,t){e.style.width=t.popupWidth,e.style.height=t.popupHeight},o.shouldCloseOnBackdropClick=function(e){return e.closeOnBackdropClick},o.positionSuffix=C[t]||"br",o}return T(t,e),t.prototype.applyBodyState=function(t){!1!==(null==t?void 0:t.showBackdrop)&&e.prototype.applyBodyState.call(this,t)},t}(m),x="gp_popups_vid";var P=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],n=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},I=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a},O=d("AnalyticsTracker"),M=function(){function e(e){this.config=e,this.visitorId=function(){var e=s(x);if(e&&/^[a-f0-9-]{36}$/.test(e))return e;var t="undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=Math.trunc(16*Math.random());return("x"===e?t:3&t|8).toString(16)}));return a(x,t,365),t}(),this.deviceType=function(){var e,t,o,n,r=navigator.userAgent.toLowerCase();try{for(var i=P(["tablet","ipad","playbook","silk","kindle"]),a=i.next();!a.done;a=i.next()){var s=a.value;if(r.includes(s))return"tablet"}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}try{for(var c=P(["mobile","android","iphone","ipod","blackberry","windows phone","opera mini","opera mobi"]),p=c.next();!p.done;p=c.next())if(s=p.value,r.includes(s))return"mobile"}catch(e){o={error:e}}finally{try{p&&!p.done&&(n=c.return)&&n.call(c)}finally{if(o)throw o.error}}return window.innerWidth<768?"mobile":window.innerWidth<1024?"tablet":"desktop"}(),O.log("AnalyticsTracker initialized",{enabled:e.enabled,visitorId:this.visitorId,deviceType:this.deviceType})}return e.prototype.trackImpression=function(e,t){this.sendEvent("impression",e,t)},e.prototype.trackDismissal=function(e,t){this.sendEvent("dismissal",e,t)},e.prototype.sendEvent=function(e,t,o){var n,r;if(this.config.enabled){var i={feed_id:t,form_id:o,event_type:e,page_url:window.location.href,referrer:document.referrer,device_type:this.deviceType,visitor_id:this.visitorId};O.log("Sending tracking event",i);var a=new FormData;a.append("action",this.config.action),a.append("nonce",this.config.nonce);try{for(var s=P(Object.entries(i)),c=s.next();!c.done;c=s.next()){var p=I(c.value,2),u=p[0],l=p[1];a.append(u,String(l))}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}if(navigator.sendBeacon&&navigator.sendBeacon(this.config.ajaxUrl,a))return void O.log("Event sent via sendBeacon");fetch(this.config.ajaxUrl,{method:"POST",body:a,keepalive:!0}).then((function(e){e.ok?O.log("Event sent via fetch"):O.warn("Failed to send event",e.status)})).catch((function(e){O.warn("Error sending event",e)}))}else O.log("Analytics disabled, skipping event",{eventType:e})},e.prototype.isEnabled=function(){return this.config.enabled},e}(),E=function(){return E=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},E.apply(this,arguments)},L=null;function A(){return null===L&&(L="undefined"!=typeof window&&"gpPopupsAdm
1inBarConfig"in window&&void 0!==window.gpPopupsAdminBarConfig),L}var R=function(){function e(e,t,o){void 0===o&&(o=100),this.currentState="waiting",this.progress={},this.intervalId=null,this.lastBroadcastTime=0,this.feedId=e,this.triggerType=t,this.throttleMs=o,this.enabled=A()}return e.prototype.isEnabled=function(){return this.enabled},e.prototype.setState=function(e){this.enabled&&(this.currentState=e,this.broadcast())},e.prototype.setProgress=function(e){this.enabled&&(this.progress=E(E({},this.progress),e),this.broadcastThrottled())},e.prototype.startCountdown=function(e){var t=this;if(this.enabled){this.progress={totalMs:e,remainingMs:e};var o=Date.now();this.stopCountdown(),this.intervalId=setInterval((function(){var n=Date.now()-o,r=Math.max(0,e-n);t.progress.remainingMs=r,t.broadcast(),r<=0&&t.stopCountdown()}),100),this.broadcast()}},e.prototype.stopCountdown=function(){null!==this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)},e.prototype.broadcast=function(){var e;this.enabled&&(e={feedId:this.feedId,triggerType:this.triggerType,state:this.currentState,progress:E({},this.progress)},A()&&window.dispatchEvent(new CustomEvent("gp-popups:trigger-state",{detail:e})),this.lastBroadcastTime=Date.now())},e.prototype.broadcastThrottled=function(){Date.now()-this.lastBroadcastTime>=this.throttleMs&&this.broadcast()},e.prototype.destroy=function(){this.stopCountdown()},e}(),V=function(){return V=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},V.apply(this,arguments)},D=d("Popup"),N=function(){function e(e){this.container=null,this.backdrop=null,this.dialog=null,this.iframe=null,this.closeButton=null,this.isOpen=!1,this.isReady=!1,this.isPendingShow=!1,this.tracker=null,this._config=e,this.displayMode=function(e){switch(e.displayMode){case"banner":return new w(e.bannerPosition||"top",e.animationType);case"fullscreen":return new S;case"corner":return new k(e.cornerPosition);default:return new v}}(e.display),this.boundHandleMessage=this.handleMessage.bind(this),this.boundHandleKeydown=this.handleKeydown.bind(this),this.tracker=function(){var e=window.gpPopupsAnalytics;return e?e.enabled?new M(e):(O.log("Analytics disabled in config"),null):(O.log("No analytics config found"),null)}(),window.addEventListener("message",this.boundHandleMessage)}return Object.defineProperty(e.prototype,"config",{get:function(){var e;return"function"==typeof(null===(e=window.gform)||void 0===e?void 0:e.applyFilters)?window.gform.applyFilters("gpp_popup_config",V({},this._config)):this._config},enumerable:!1,configurable:!0}),e.prototype.getFeedId=function(){return this.config.feedId},e.prototype.getIsOpen=function(){return this.isOpen},e.prototype.getRespectsDismisal=function(){return this.config.behavior.respectDismissal},e.prototype.show=function(e){var t=this;void 0===e&&(e=!1),D.group("show() feedId: ".concat(this.config.feedId),(function(){!e&&t.config.behavior.respectDismissal&&t.wasDismissed()?D.log("Popup was dismissed, not showing"):t.isOpen?D.log("Popup already open, not showing"):t.isPendingShow?D.log("Already pending show, waiting for iframe ready"):(t.container?D.log("Popup already exists (preloaded)"):(D.log("Creating popup..."),t.createPopup()),t.syncIframeUrl(),D.log("Attaching event listeners..."),t.attachEventListeners(),t.isReady?(D.log("Iframe already ready, showing immediately"),t.revealPopup()):(D.log("Iframe not ready, applying loading behavior"),t.isPendingShow=!0,"wait"===t.config.trigger.loadingBehavior?D.log("Popup is waiting for iframe ready before becoming visible"):t.revealPopupWithLoader()))}))},e.prototype.forceShow=function(){this.show(!0)},e.prototype.revealPopupWithLoader=function(){this.container?(D.log("revealPopupWithLoader() - Revealing popup with loader"),this.displayMode.applyBodyState(this.config.display),this.container.classList.remove("gp-popup--staging"),this.container.offsetHeight,this.container.classList.add("gp-popup--open"),D.log("revealPopupWithLoader() - Popup visible with loader, waiting for iframe ready")):D.warn("revealPopupWithLoader() - Container is null!")},e.prototype.revealPopup=function(){var e,t,o,n=this;this.container&&this.dialog?(D.log("revealPopup() - Revealing popup"),this.displayMode.applyBodyState(this.config.display),this.container.classList.remove("gp-popup--staging"),this.container.offsetHeight,this.container.classList.add("gp-popup--open"),null===(t=(e=this.displayMode).onPopupRevealed)||void 0===t||t.call(e,this.dialog),this.isOpen=!0,this.isPendingShow=!1,D.log("revealPopup() - Popup is now open"),this.broadcastState("open"),null===(o=this.tracker)||void 0===o||o.trackImpression(this.config.feedId,this.config.formId),setTimeout((function(){n.sendToIframe("focus_first_field")}),300),this.dispatchEvent("gp_popup_opened",{feedId:this.config.feedId})):D.warn("revealPopup() - Container or dialog is null!")},e.prototype.hide=function(e){var t,o,n,r=this;if(void 0===e&&(e=!0),this.isOpen&&this.container){e&&(null===(t=this.tracker)||void 0===t||t.trackDismissal(this.config.feedId,this.config.formId),this.broadcastState("dismissed")),this.container.classList.remove("gp-popup--open"),this.container.classList.add("gp-popup--closing");var i=null===(n=(o=this.displayMode).onPopupRemoving)||void 0===n?void 0:n.call(o);setTimeout((function(){return t=r,o=void 0,a=function(){return function(e,t){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]}
1,trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(6===s[0]&&i.label<r[1]){i.label=r[1],r=s;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(s);break}r[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{o=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}(this,(function(t){switch(t.label){case 0:return i?[4,i]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.removePopup(),this.isOpen=!1,e&&this.config.behavior.respectDismissal&&this.setDismissalCookie(),this.dispatchEvent("gp_popup_closed",{feedId:this.config.feedId}),[2]}}))},new((n=void 0)||(n=Promise))((function(e,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(t){var o;t.done?e(t.value):(o=t.value,o instanceof n?o:new n((function(e){e(o)}))).then(i,s)}c((a=a.apply(t,o||[])).next())}));var t,o,n,a}),300)}},e.prototype.toggle=function(){this.isOpen?this.hide():this.show()},e.prototype.destroy=function(){this.removePopup(),this.removeEventListeners()},e.prototype.getIsReady=function(){return this.isReady},e.prototype.preload=function(){var e=this;D.group("preload() feedId: ".concat(this.config.feedId),(function(){e.container?D.log("Popup already exists, skipping"):e.config.behavior.preloadIframe?(D.log("Creating popup structure for preload"),e.broadcastState("preloading"),e.createPopup()):D.log("Preloading disabled in config, skipping")}))},e.prototype.broadcastState=function(e){!function(e){A()&&window.dispatchEvent(new CustomEvent("gp-popups:popup-state",{detail:e}))}({feedId:this.config.feedId,state:e,isReady:this.isReady,isOpen:this.isOpen})},e.prototype.syncIframeUrl=function(){if(this.iframe){var e=this.config.iframeUrl;this.iframe.src!==e&&(this.iframe.src=e,this.isReady=!1)}},e.prototype.createIframe=function(){var e=document.createElement("iframe");return e.src=this.config.iframeUrl,e.className="gp-popup__iframe",e.setAttribute("title",this.config.title||(this.config.formId?"Form Popup":"Popup")),e.setAttribute("sandbox",this.config.iframeSandbox),e.setAttribute("scrolling","no"),e.setAttribute("allowtransparency","true"),e},e.prototype.createPopup=function(){var e,t,o=this,n=this.config.display;this.container=document.createElement("div"),this.container.className="gp-popup gp-popup--feed-".concat(this.config.feedId," gp-popup--").concat(n.animationType," gp-popup--staging"),this.displayMode.getDisplayModeClasses().forEach((function(e){o.container.classList.add(e)})),"corner"!==n.displayMode||n.showBackdrop||this.container.classList.add("gp-popup--corner-no-backdrop"),n.customCssClass&&this.container.classList.add(n.customCssClass),n.transparentBackground&&this.container.classList.add("gp-popup--transparent"),this.container.style.setProperty("--gp-popup-z-index",String(n.zIndex)),this.container.setAttribute("role","dialog");var r=this.config.title||(this.config.formId?"Form Popup":"Popup");this.container.setAttribute("aria-label",r),("corner"!==n.displayMode||n.showBackdrop)&&(this.backdrop=document.createElement("div"),this.backdrop.className="gp-popup__backdrop",this.backdrop.style.backgroundColor=n.backdropColor,n.backdropBlur&&(this.backdrop.style.backdropFilter="blur(4px)"),this.displayMode.shouldCloseOnBackdropClick(n)&&this.backdrop.addEventListener("click",(function(){return o.hide()}))),this.dialog=document.createElement("div"),this.dialog.className="gp-popup__dialog",null===(t=(e=this.displayMode).applyDialogSizing)||void 0===t||t.call(e,this.dialog,n),n.showCloseButton&&(this.closeButton=document.createElement("button"),this.closeButton.className="gp-popup__close",this.closeButton.setAttribute("type","button"),this.closeButton.setAttribute("aria-label","Close popup"),this.closeButton.innerHTML='\n\t\t\t\t<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n\t\t\t\t\t<line x1="18" y1="6" x2="6" y2="18"></line>\n\t\t\t\t\t<line x1="6" y1="6" x2="18" y2="18"></line>\n\t\t\t\t</svg>\n\t\t\t',this.closeButton.addEventListener("click",(function(){return o.hide()})),this.dialog.appendChild(this.closeButton));var i=document.createElement("div");i.className="gp-popup__content";var a=document.createElement("div");a.className="gp-popup__loader",a.innerHTML=this.config.loaderHtml||'<div class="gp-popup__spinner"></div>',i.appendChild(a),this.iframe=this.createIframe(),i.appendChild(this.iframe),this.dialog.appendChild(i),this.backdrop&&this.container.appendChild(this.backdrop),this.container.appendChild(this.dialog),document.body.appendChild(this.container)},e.prototype.removePopup=function(){var e,t;null===(t=(e=this.displayMode).onPopupRemoving)||void 0===t||t.call(e),this.displayMode.removeBodyState(this.config.display),this.container&&(this.container.remove(),this.container=null,this.backdrop=null,this.dialog=null,this.closeButton=null,this.iframe=null)},e.prototype.attachEventListeners=function(){this.config.display.closeOnEsc&&document.addEventListener("keydown",this.boundHandleKeydown)},e.prototype.removeEventListeners=function(){window.removeEventListener("message",this.boundHandleMessage),document.removeEventListener("keydown",this.boundHandleKeydown)},e.prototype.handleMessage=function(e){var t=e.data;if(t&&"gp-popups"===t.source&&t.feedId===this.config.feedId)switch(t.type){case"ready":this.onIframeReady(t.data);break;case"resize":this.onIframeResize(t.data);break;case"form_submitted":this.onFormSubmitted(t.data);break;case"form_rendered":this.onFormRendered();break;case"page_changed":this.onPageChanged(t.data);break;case"close_popup":this.hide();break;case"redirect":this.onRedirect(t.data)}},e.prototype.handleKeydown=function(e){"Escape"===e.key&&this.isOpen&&this.hide()},e.prototype.onIframeReady=function(e){var t;D.log("onIframeReady() called, height:",e.height),this.isReady=!0,this.broadcastState("preloaded");var o=null===(t=this.container)||void 0===t?void 0:t.querySelector(".gp-popup__loader");o&&o.remove(),"fullscreen"!==this.config.display.displayMode&&"auto"===this.config.display.popupHeight&&this.setIframeHeight(e.height),this.isPendingShow&&(D.log("onIframeReady() - Popup was pending show, revealing now"),this.revealPopup()),this.dispatchEvent("gp_popup_ready",{feedId:this.config.feedId})},e.prototype.onIframeResize=function(e){"fullscreen"!==this.config.display.displayMode&&"auto"===this.config.display.popupHeight&&this.setIframeHeight(e.height)},e.prototype.onFormSubmitted=function(e){var t=this;if(this.broadcastState("submitted"),this.dispatchEvent("gp_popup_submitted",{feedId:this.config.feedId,formId:e.formId}),this.config.behavior.respectDismissal&&this.setDismissalCookie(),this.config.behavior.autoCloseOnSubmission){var o=this.config.behavior,n=o.autoCloseDelay,r=o.autoCloseDelayUnit;setTimeout((function(){return t.hide(!1)}),"s"===r?1e3*n:n)}},e.prototype.onFormRendered=function(){this.dispatchEvent("gp_popup_form_rendered",{feedId:this.config.feedId})},e.prototype.onPageChanged=function(e){this.dispatchEvent("gp_popup_page_changed",{feedId:this.config.feedId,formId:e.formId,currentPage:e.currentPage})},e.prototype.onRedirect=function(e){D.log("Redirect confirmation received:",e.url),this.broadcastState("submitted"),this.config.behavior.respectDismissal&&this.setDismissalCookie(),this.dispatchEvent("gp_popup_redirect",{feedId:this.config.feedId,url:e.url},!0).defaultPrevented?D.log("Redirect prevented by event handler"):setTimeout((function(){window.location.href=e.url}),100)},e.prototype.setIframeHeight=function(e){this.iframe&&(this.iframe.style.height="".concat(e,"px"))},e.prototype.sendToIframe=function(e,t){var o;if(null===(o=this.iframe)||void 0===o?void 0:o.contentWindow){var n={source:"gp-popups-parent",type:e,data:t};this.iframe.contentWindow.postMessage(n,"*")}},e.prototype.dispatchEvent=function(e,t,o){void 0===o&&(o=!1);var n=new CustomEvent(e,{detail:t,bubbles:!0,cancelable:o});return document.dispatchEvent(n),n},e.prototype.wasDismissed=function(){return"1"===s(this.config.behavior.cookieName)},e.prototype.setDismissalCookie=function(){var e=this.config.behavior.cookieDuration;a(this.config.behavior.cookieName,"1",e)},e}(),B=d("ProximityPreload"),H=function(){function e(e,t){void 0===t&&(t=100),this.hasTriggered=!1,this.moveEventType=null,this.onPreloadCallback=null,this.cachedElements=null,this.cacheRefreshInterval=null,B.log("constructor - selector:",e,"proximityPx:",t),this.selector=e,this.proximityPx=t,this.boundHandler=this.handleMove.bind(this)}return e.prototype.init=function(e){var t=this;B.log("init() called"),this.onPreloadCallback=e,this.refreshElementCache(),this.cacheRefreshInterval=setInterval((function(){return t.refreshElementCache()}),2e3),this.attachMoveListener()},e.prototype.refreshElementCache=function(){this.cachedElements=Array.from(document.querySelectorAll(this.selector)),B.log("Element cache refreshed, found:",this.cachedElements.length)},e.prototype.destroy=function(){B.log("destroy() called"),this.detachMoveListener(),this.onPreloadCallback=null,this.cachedElements=null,this.cacheRefreshInterval&&(clearInterval(this.cacheRefreshInterval),this.cacheRefreshInterval=null)},e.prototype.reset=function(){var e=this;this.hasTriggered&&(B.log("reset() called - re-arming proximity detection"),this.hasTriggered=!1,this.refreshElementCache(),!this.cacheRefreshInterval&&this.onPreloadCallback&&(this.cacheRefreshInterval=setInterval((function(){return e.refreshElementCache()}),2e3)),this.onPreloadCallback&&this.attachMoveListener())},e.prototype.attachMoveListener=function(){if(void 0!==window.PointerEvent)this.moveEventType="pointermove";else{if("function"==typeof window.matchMedia&&!window.matchMedia("(hover: hover) and (pointer: fine)").matches)return this.moveEventType=null,void B.log("No hover-capable pointer, skipping proximity preload");this.moveEventType="mousemove"}document.addEventListener(this.moveEventType,this.boundHandler,{passive:!0})},e.prototype.detachMoveListener=function(){this.moveEventType&&document.removeEventListener(this.moveEventType,this.boundHandler)},e.prototype.handleMove=function(e){var t,o;if(("pointermove"!==this.moveEventType||"mouse"===e.pointerType)&&!this.hasTriggered&&this.onPreloadCallback){var n=this.cachedElements;if(n&&0!==n.length){var r=e,i=r.clientX,a=r.clientY;try{for(var s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],n=0;if(o)return o.call(e);
1if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(n),c=s.next();!c.done;c=s.next()){var p=c.value.getBoundingClientRect(),u=Math.max(p.left-i,0,i-p.right),l=Math.max(p.top-a,0,a-p.bottom),d=Math.sqrt(u*u+l*l);if(d<=this.proximityPx)return B.log("Mouse within proximity of element! Distance:",d,"px"),this.hasTriggered=!0,this.detachMoveListener(),this.cacheRefreshInterval&&(clearInterval(this.cacheRefreshInterval),this.cacheRefreshInterval=null),void this.onPreloadCallback()}}catch(e){t={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(t)throw t.error}}}}},e}(),j=d("ButtonTrigger"),U=function(){function e(e,t){this.preloadStrategy=null,j.log("constructor - selector:",t),this.popup=e,this.selector=t,this.boundHandler=this.handleClick.bind(this),this.boundPopupClosedHandler=this.handlePopupClosed.bind(this),this.broadcaster=new R(e.getFeedId(),"button")}return e.prototype.init=function(){var e=this;j.log("init() called"),this.selector?(this.broadcaster.setState("waiting"),this.broadcaster.setProgress({selector:this.selector}),this.preloadStrategy=new H(this.selector,100),this.preloadStrategy.init((function(){j.log("Proximity preload triggered"),e.broadcaster.setState("preloading"),e.popup.preload()})),document.addEventListener("click",this.boundHandler),this.popup.getRespectsDismisal()||document.addEventListener("gp_popup_closed",this.boundPopupClosedHandler)):j.log("No selector provided, skipping")},e.prototype.destroy=function(){var e;j.log("destroy() called"),this.broadcaster.destroy(),document.removeEventListener("click",this.boundHandler),document.removeEventListener("gp_popup_closed",this.boundPopupClosedHandler),null===(e=this.preloadStrategy)||void 0===e||e.destroy()},e.prototype.handleClick=function(e){e.target.closest(this.selector)&&(j.log("Button clicked! Showing popup"),e.preventDefault(),this.broadcaster.setState("triggered"),this.popup.show())},e.prototype.handlePopupClosed=function(e){var t,o;(null===(t=e.detail)||void 0===t?void 0:t.feedId)===this.popup.getFeedId()&&(j.log("Popup closed, resetting preload strategy for re-preloading"),null===(o=this.preloadStrategy)||void 0===o||o.reset(),this.broadcaster.setState("waiting"))},e}(),G=d("TimeoutPreload"),F=function(){function e(e){this.timeoutId=null,G.log("constructor - delay:",e,"ms"),this.delay=e}return e.prototype.init=function(e){if(G.log("init() called, delay:",this.delay),this.delay<=0)return G.log("Delay is <= 0, preloading immediately"),void e();this.timeoutId=setTimeout((function(){G.log("Timeout fired! Triggering preload"),e()}),this.delay)},e.prototype.destroy=function(){G.log("destroy() called"),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)},e}(),K=d("TimeoutTrigger"),z=function(){function e(e,t){this.showTimeoutId=null,this.preloadStrategy=null,K.log("constructor - delay:",t,"ms"),this.popup=e,this.delay=t,this.broadcaster=new R(e.getFeedId(),"timeout")}return e.prototype.init=function(){var e=this;if(K.log("init() called, delay:",this.delay),this.delay<0)K.log("Delay is < 0, not setting timeout");else{this.broadcaster.setState("waiting"),this.broadcaster.startCountdown(this.delay);var t=Math.max(0,this.delay-3e3);K.log("Setting preload for ".concat(t,"ms, show for ").concat(this.delay,"ms")),t<this.delay&&(this.preloadStrategy=new F(t),this.preloadStrategy.init((function(){K.log("Preload strategy triggered"),e.broadcaster.setState("preloading"),e.popup.preload()}))),this.showTimeoutId=setTimeout((function(){K.log("Show timeout fired! Calling popup.show()"),e.broadcaster.stopCountdown(),e.broadcaster.setState("triggered"),e.popup.show()}),this.delay)}},e.prototype.destroy=function(){var e;K.log("destroy() called"),this.broadcaster.destroy(),null===(e=this.preloadStrategy)||void 0===e||e.destroy(),null!==this.showTimeoutId&&(clearTimeout(this.showTimeoutId),this.showTimeoutId=null)},e}(),W=d("InteractionPreload"),J=function(){function e(e){void 0===e&&(e="any"),this.hasTriggered=!1,W.log("constructor - interactionType:",e),this.interactionType=e,this.boundHandler=function(){}}return e.prototype.init=function(e){var t=this;W.log("init() called, interactionType:",this.interactionType),this.boundHandler=function(){t.hasTriggered||(W.log("Interaction detected! Triggering preload"),t.hasTriggered=!0,t.removeListeners(),e())},this.addListeners()},e.prototype.destroy=function(){W.log("destroy() called"),this.removeListeners()},e.prototype.addListeners=function(){var e={once:!0,passive:!0};"mousemove"!==this.interactionType&&"any"!==this.interactionType||document.addEventListener("mousemove",this.boundHandler,e),"scroll"!==this.interactionType&&"any"!==this.interactionType||window.addEventListener("scroll",this.boundHandler,e),"any"===this.interactionType&&document.addEventListener("touchstart",this.boundHandler,e)},e.prototype.removeListeners=function(){document.removeEventListener("mousemove",this.boundHandler),window.removeEventListener("scroll",this.boundHandler),document.removeEventListener("touchstart",this.boundHandler)},e}(),q=d("ExitIntentTrigger"),Z=function(){function e(e,t){this.hasTriggered=!1,this.preloadStrategy=null,q.log("constructor - sensitivity:",t),this.popup=e,this.sensitivity=t,this.boundExitHandler=this.handleExitIntent.bind(this),this.broadcaster=new R(e.getFeedId(),"exit_intent")}return e.prototype.init=function(){var e=this;q.log("init() called"),this.broadcaster.setState("waiting"),this.preloadStrategy=new J("mousemove"),this.preloadStrategy.init((function(){q.log("Interaction preload triggered"),e.broadcaster.setState("preloading"),e.popup.preload()})),document.addEventListener("mouseleave",this.boundExitHandler),document.addEventListener("mouseout",this.boundExitHandler)},e.prototype.destroy=function(){var e;q.log("destroy() called"),this.broadcaster.destroy(),null===(e=this.preloadStrategy)||void 0===e||e.destroy(),document.removeEventListener("mouseleave",this.boundExitHandler),document.removeEventListener("mouseout",this.boundExitHandler)},e.prototype.handleExitIntent=function(e){if(!this.hasTriggered&&e.clientY
1<=this.sensitivity){if("mouseout"===e.type){var t=e.relatedTarget;if(t&&document.contains(t))return}q.log("Exit intent detected! Showing popup"),this.hasTriggered=!0,this.broadcaster.setState("triggered"),this.popup.show()}},e}(),Y=d("ScrollDepthTrigger"),Q=function(){function e(e,t,o){void 0===o&&(o="percent"),this.hasTriggered=!1,this.hasPreloaded=!1,Y.log("constructor - value:",t,o),this.popup=e,this.targetValue=Math.max(0,t),this.unit=o,this.boundScrollHandler=this.handleScroll.bind(this),this.broadcaster=new R(e.getFeedId(),"scroll_depth",100)}return e.prototype.init=function(){if(Y.log("init() called, target:",this.targetValue,this.unit),this.targetValue<=0)return Y.log("Value is <= 0, triggering immediately"),this.broadcaster.setState("triggered"),void this.popup.show();this.broadcaster.setState("waiting"),this.broadcaster.setProgress({currentValue:0,targetValue:this.targetValue,unit:this.unit}),window.addEventListener("scroll",this.boundScrollHandler,{passive:!0}),this.handleScroll()},e.prototype.destroy=function(){Y.log("destroy() called"),this.broadcaster.destroy(),window.removeEventListener("scroll",this.boundScrollHandler)},e.prototype.handleScroll=function(){if(!this.hasTriggered){var e=this.getCurrentScrollValue(),t=.5*this.targetValue;this.broadcaster.setProgress({currentValue:e,targetValue:this.targetValue,unit:this.unit}),!this.hasPreloaded&&e>=t&&(Y.log("Preload threshold reached at",e,this.unit),this.hasPreloaded=!0,this.broadcaster.setState("preloading"),this.popup.preload()),e>=this.targetValue&&(Y.log("Target depth reached!",e,">=",this.targetValue,this.unit),this.hasTriggered=!0,this.broadcaster.setState("triggered"),this.destroy(),this.popup.show())}},e.prototype.getCurrentScrollValue=function(){var e=window.scrollY||document.documentElement.scrollTop;if("pixels"===this.unit)return e;var t=document.documentElement.scrollHeight-window.innerHeight;return t<=0?100:e/t*100},e}(),$=d("HashTrigger"),X=function(){function e(e,t){this.preloadStrategy=null,$.log("constructor - hashValue:",t),this.popup=e,this.hashValue=t.replace(/^#/,""),this.boundHashChangeHandler=this.handleHashChange.bind(this),this.boundPopupClosedHandler=this.handlePopupClosed.bind(this),this.broadcaster=new R(e.getFeedId(),"hash")}return e.prototype.init=function(){var e=this;if($.log("init() called, watching for hash:",this.hashValue),this.hashValue){this.broadcaster.setState("waiting"),this.broadcaster.setProgress({hash:"#".concat(this.hashValue)});var t='[href$="#'.concat(this.hashValue,'"]');$.log("Setting up proximity preload for selector:",t),this.preloadStrategy=new H(t,100),this.preloadStrategy.init((function(){$.log("Proximity preload triggered for hash link"),e.broadcaster.setState("preloading"),e.popup.preload()})),window.addEventListener("hashchange",this.boundHashChangeHandler),this.popup.getRespectsDismisal()||document.addEventListener("gp_popup_closed",this.boundPopupClosedHandler),this.checkCurrentHash()}else $.log("No hash value provided, skipping")},e.prototype.destroy=function(){var e;$.log("destroy() called"),this.broadcaster.destroy(),window.removeEventListener("hashchange",this.boundHashChangeHandler),document.removeEventListener("gp_popup_closed",this.boundPopupClosedHandler),null===(e=this.preloadStrategy)||void 0===e||e.destroy()},e.prototype.handlePopupClosed=function(e){var t,o;(null===(t=e.detail)||void 0===t?void 0:t.feedId)===this.popup.getFeedId()&&($.log("Popup closed, resetting preload strategy"),null===(o=this.preloadStrategy)||void 0===o||o.reset())},e.prototype.handleHashChange=function(){$.log("Hash changed, checking..."),this.checkCurrentHash()},e.prototype.checkCurrentHash=function(){var e=window.location.hash.replace(/^#/,"");$.log("Checking hash:",e,"vs target:",this.hashValue),this.matchesHash(e)&&($.log("Hash matches! Showing popup"),this.broadcaster.setState("triggered"),this.popup.preload(),this.popup.show(),this.clearHash())},e.prototype.matchesHash=function(e){return e.toLowerCase()===this.hashValue.toLowerCase()},e.prototype.clearHash=function(){if(window.history&&window.history.replaceState){var e=window.location.pathname+window.location.search;window.history.replaceState(null,"",e),$.log("Hash cleared from URL")}},e}();const ee=window.wp.i18n;var te={is:(0,ee.__)("is","gp-popups"),is_not:(0,ee.__)("is not","gp-popups"),has:(0,ee.__)("has","gp-popups"),has_not:(0,ee.__)("does not have","gp-popups"),contains:(0,ee.__)("contains","gp-popups"),not_contains:(0,ee.__)("does not contain","gp-popups"),starts_with:(0,ee.__)("starts with","gp-popups"),ends_with:(0,ee.__)("ends with","gp-popups"),matches_regex:(0,ee.__)("matches pattern","gp-popups"),greater_than:(0,ee.__)("is greater than","gp-popups"),less_than:(0,ee.__)("is less than","gp-popups"),between:(0,ee.__)("is between","gp-popups"),exists:(0,ee.__)("exists","gp-popups"),not_exists:(0,ee.__)("does not exist","gp-popups")},oe=new function(){var e=this;this.conditions=new Map,this.categories=new Map,this.register=function(t){e.conditions.set(t.type,t)},this.registerCategory=function(t){e.categories.set(t.id,t)},this.get=function(t){return e.conditions.get(t)},this.getAll=function(){return Array.from(e.conditions.values())},this.getByCategory=function(t){return e.getAll().filter((function(e){return e.category===t}))},this.getCategories=function(){return Array.from(e.categories.values()).sort((function(e,t){var o,n;return(null!==(o=e.order)&&void 0!==o?o:100)-(null!==(n=t.order)&&void 0!==n?n:100)}))},this.getCategory=function(t){return e.categories.get(t)},this.getClientConditions=function(){return e.getAll().filter((function(e){return"client"===e.evaluationMode})).map((function(e){return e.type}))}
1,this.getServerConditions=function(){return e.getAll().filter((function(e){return"server"===e.evaluationMode})).map((function(e){return e.type}))},this.getAjaxRequiredConditions=function(){return e.getAll().filter((function(e){return"server"===e.evaluationMode&&!1===e.isCacheable})).map((function(e){return e.type}))},this.formatValue=function(t){var o=e.get(t.type);return(null==o?void 0:o.formatValue)?o.formatValue(t.value,t.operator):"string"==typeof t.value?t.value||(0,ee.__)("(empty)","gp-popups"):(0,ee.__)("(configured)","gp-popups")},this.formatSummary=function(t){var o=e.getOperatorLabel(t.operator),n=e.formatValue(t);return"exists"===t.operator||"not_exists"===t.operator?"".concat(n," ").concat(o):"".concat(o," ").concat(n)},this.getOptionLabel=function(t,o){var n,r,i=e.get(t);return null!==(r=null===(n=null==i?void 0:i.options)||void 0===n?void 0:n[o])&&void 0!==r?r:o},this.getOperatorLabel=function(e){return te[e]||e},this.getSupportedOperators=function(t){var o;return(null===(o=e.get(t))||void 0===o?void 0:o.supportedOperators)||["is"]},this.evaluateCondition=function(t,o){return n=e,r=void 0,a=function(){var e;return function(e,t){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(6===s[0]&&i.label<r[1]){i.label=r[1],r=s;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(s);break}r[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{o=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}(this,(function(n){return void 0!==t.serverResult?[2,{conditionId:t.id,conditionType:t.type,matched:t.serverResult.matched,reason:t.serverResult.reason||"Evaluated server-side",skipped:!1}]:!1===t.enabled?[2,{conditionId:t.id,conditionType:t.type,matched:!0,reason:"Condition is disabled",skipped:!0}]:(e=this.get(t.type))?"server"===e.evaluationMode?[2,{conditionId:t.id,conditionType:t.type,matched:!0,skipped:!0,reason:"Server-side condition (".concat(t.type,") - skipped in JS")}]:e.evaluate?[2,e.evaluate(t,o)]:[2,{conditionId:t.id,conditionType:t.type,matched:!1,reason:"No evaluator registered for ".concat(t.type)}]:[2,{conditionId:t.id,conditionType:t.type,matched:!1,reason:"Unknown condition type: ".concat(t.type)}]}))},new((i=Promise)||(i=Promise))((function(e,t){function o(e){try{c(a.next(e))}catch(e){t(e)}}function s(e){try{c(a.throw(e))}catch(e){t(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(o,s)}c((a=a.apply(n,r||[])).next())}));var n,r,i,a}},ne=function(e,t,o,n){return new(o||(o=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},re=function(e,t){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(6===s[0]&&i.label<r[1]){i.label=r[1],r=s;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(s);break}r[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{o=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},ie=null,ae=null,se=null;function ce(){return ne(this,void 0,Promise,(function(){return re(this,(function(e){switch(e.label){case 0:return ie?[3,2]:[4,i.e(927).then(i.t.bind(i,880,23))];case 1:ie=e.sent(),e.label=2;case 2:return[2,ie]}}))}))}function pe(e){return ne(this,void 0,Promise,(function(){var t;return re(this,(function(o){switch(o.label){case 0:return ae&&se===e?[2,ae]:[4,ce()];case 1:return t=o.sent(),ae=t.getParser(e),se=e,[2,ae]}}))}))}function ue(e){return ne(this,void 0,Promise,(function(){return re(this,(function(t){switch(t.label){case 0:return[4,pe(e)];case 1:switch(t.sent().getPlatformType()){case"mobile":return[2,"mobile"];case"tablet":return[2,"tablet"];default:return[2,"desktop"]}return[2]}}
1))}))}function le(e){return ne(this,void 0,Promise,(function(){var t,o,n;return re(this,(function(r){switch(r.label){case 0:return[4,pe(e)];case 1:return t=r.sent(),(o=(null===(n=t.getBrowserName())||void 0===n?void 0:n.toLowerCase())||"").includes("chrome")?[2,"chrome"]:o.includes("firefox")?[2,"firefox"]:o.includes("safari")?[2,"safari"]:o.includes("edge")?[2,"edge"]:o.includes("opera")?[2,"opera"]:o.includes("internet explorer")||o.includes("ie")?[2,"ie"]:[2,"unknown"]}}))}))}function de(e){return ne(this,void 0,Promise,(function(){var t,o,n;return re(this,(function(r){switch(r.label){case 0:return[4,pe(e)];case 1:return t=r.sent(),(o=(null===(n=t.getOSName())||void 0===n?void 0:n.toLowerCase())||"").includes("ios")?[2,"ios"]:o.includes("android")?[2,"android"]:o.includes("macos")||o.includes("mac os")?[2,"macos"]:o.includes("windows")?[2,"windows"]:o.includes("linux")?[2,"linux"]:[2,"unknown"]}}))}))}var he=function(e,t,o,n){return new(o||(o=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},ge=function(e,t){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(6===s[0]&&i.label<r[1]){i.label=r[1],r=s;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(s);break}r[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{o=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},fe=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a};function me(e){var t=fe(e.split(":").map(Number),2);return 60*t[0]+t[1]}var ye,ve="gp_popups_geoip_country",be=null;function we(e){var t=e.trim().toUpperCase();return/^[A-Z]{2}$/.test(t)?t:null}function _e(e){var t,o;if(!Array.isArray(e))return[];var n=new Set;try{for(var r=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],n=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),i=r.next();!i.done;i=r.next()){var a=i.value;if("string"==typeof a){var s=we(a);s&&n.add(s)}}}catch(e){t={error:e}}
1finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(t)throw t.error}}return Array.from(n)}function Se(){if("undefined"==typeof window)return null;try{return window.localStorage}catch(e){return null}}function Te(){return he(this,void 0,Promise,(function(){var e,t,o,n=this;return ge(this,(function(r){return void 0!==ye?[2,ye]:(e=function(){var e=Se();if(!e)return null;var t=null;try{t=e.getItem(ve)}catch(e){return null}if(!t)return null;try{var o=JSON.parse(t);if("string"==typeof o.countryCode&&"number"==typeof o.expires&&o.expires>Date.now())return we(o.countryCode)}catch(e){}try{e.removeItem(ve)}catch(e){}return null}())?(ye=e,[2,e]):be?[2,be]:"function"!=typeof fetch?(ye=null,[2,null]):(t=new AbortController,o=setTimeout((function(){return t.abort()}),5e3),be=fetch("https://ipinfo.io/json",{method:"GET",headers:{Accept:"application/json"},signal:t.signal}).then((function(e){return he(n,void 0,void 0,(function(){var t,o;return ge(this,(function(n){switch(n.label){case 0:return e.ok?[4,e.json()]:[2,null];case 1:return"string"!=typeof(t=n.sent()).country?[2,null]:(o=we(t.country))?(function(e){var t=Se();if(t)try{t.setItem(ve,JSON.stringify({countryCode:e,expires:Date.now()+864e5}))}catch(e){}}(o),[2,o]):[2,null]}}))}))})).catch((function(){return null})).then((function(e){return clearTimeout(o),ye=e,e})).finally((function(){be=null})),[2,be])}))}))}var Ce="gp_popups_visitor",ke=null;function xe(){if(null===ke){var e=function(e){for(var t="".concat(e,"="),o=document.cookie.split(";"),n=0;n<o.length;n++){for(var r=o[n];" "===r.charAt(0);)r=r.substring(1);if(0===r.indexOf(t))return decodeURIComponent(r.substring(t.length))}return null}(Ce);if(e){var t=parseInt(e,10);!isNaN(t)&&t>=1&&t<=100&&(ke=t)}
1null===ke&&(ke=Math.floor(100*Math.random())+1,function(e,t,o){var n="";if(o>0){var r=new Date;r.setTime(r.getTime()+24*o*60*60*1e3),n="; expires=".concat(r.toUTCString())}document.cookie="".concat(e,"=").concat(encodeURIComponent(t)).concat(n,"; path=/; SameSite=Lax")}(Ce,String(ke),365))}return ke}var Pe=[{code:"AF",name:"Afghanistan"},{code:"AX",name:"Åland Islands"},{code:"AL",name:"Albania"},{code:"DZ",name:"Algeria"},{code:"AS",name:"American Samoa"},{code:"AD",name:"Andorra"},{code:"AO",name:"Angola"},{code:"AI",name:"Anguilla"},{code:"AQ",name:"Antarctica"},{code:"AG",name:"Antigua and Barbuda"},{code:"AR",name:"Argentina"},{code:"AM",name:"Armenia"},{code:"AW",name:"Aruba"},{code:"AU",name:"Australia"},{code:"AT",name:"Austria"},{code:"AZ",name:"Azerbaijan"},{code:"BS",name:"Bahamas"},{code:"BH",name:"Bahrain"},{code:"BD",name:"Bangladesh"},{code:"BB",name:"Barbados"},{code:"BY",name:"Belarus"},{code:"BE",name:"Belgium"},{code:"BZ",name:"Belize"},{code:"BJ",name:"Benin"},{code:"BM",name:"Bermuda"},{code:"BT",name:"Bhutan"},{code:"BO",name:"Bolivia"},{code:"BQ",name:"Bonaire, Sint Eustatius and Saba"},{code:"BA",name:"Bosnia and Herzegovina"},{code:"BW",name:"Botswana"},{code:"BV",name:"Bouvet Island"},{code:"BR",name:"Brazil"},{code:"IO",name:"British Indian Ocean Territory"},{code:"BN",name:"Brunei Darussalam"},{code:"BG",name:"Bulgaria"},{code:"BF",name:"Burkina Faso"},{code:"BI",name:"Burundi"},{code:"CV",name:"Cabo Verde"},{code:"KH",name:"Cambodia"},{code:"CM",name:"Cameroon"},{code:"CA",name:"Canada"},{code:"KY",name:"Cayman Islands"},{code:"CF",name:"Central African Republic"},{code:"TD",name:"Chad"},{code:"CL",name:"Chile"},{code:"CN",name:"China"},{code:"CX",name:"Christmas Island"},{code:"CC",name:"Cocos (Keeling) Islands"},{code:"CO",name:"Colombia"},{code:"KM",name:"Comoros"},{code:"CG",name:"Congo"},{code:"CD",name:"Congo, Democratic Republic of the"},{code:"CK",name:"Cook Islands"},{code:"CR",name:"Costa Rica"},{code:"CI",name:"Côte d'Ivoire"},{code:"HR",name:"Croatia"},{code:"CU",name:"Cuba"},{code:"CW",name:"Curaçao"},{code:"CY",name:"Cyprus"},{code:"CZ",name:"Czechia"},{code:"DK",name:"Denmark"},{code:"DJ",name:"Djibouti"},{code:"DM",name:"Dominica"},{code:"DO",name:"Dominican Republic"},{code:"EC",name:"Ecuador"},{code:"EG",name:"Egypt"},{code:"SV",name:"El Salvador"},{code:"GQ",name:"Equatorial Guinea"},{code:"ER",name:"Eritrea"},{code:"EE",name:"Estonia"},{code:"SZ",name:"Eswatini"},{code:"ET",name:"Ethiopia"},{code:"FK",name:"Falkland Islands"},{code:"FO",name:"Faroe Islands"},{code:"FJ",name:"Fiji"},{code:"FI",name:"Finland"},{code:"FR",name:"France"},{code:"GF",name:"French Guiana"},{code:"PF",name:"French Polynesia"},{code:"TF",name:"French Southern Territories"},{code:"GA",name:"Gabon"},{code:"GM",name:"Gambia"},{code:"GE",name:"Georgia"},{code:"DE",name:"Germany"},{code:"GH",name:"Ghana"},{code:"GI",name:"Gibraltar"},{code:"GR",name:"Greece"},{code:"GL",name:"Greenland"},{code:"GD",name:"Grenada"},{code:"GP",name:"Guadeloupe"},{code:"GU",name:"Guam"},{code:"GT",name:"Guatemala"},{code:"GG",name:"Guernsey"},{code:"GN",name:"Guinea"},{code:"GW",name:"Guinea-Bissau"},{code:"GY",name:"Guyana"},{code:"HT",name:"Haiti"},{code:"HM",name:"Heard Island and McDonald Islands"},{code:"VA",name:"Holy See"},{code:"HN",name:"Honduras"},{code:"HK",name:"Hong Kong"},{code:"HU",name:"Hungary"},{code:"IS",name:"Iceland"},{code:"IN",name:"India"},{code:"ID",name:"Indonesia"},{code:"IR",name:"Iran"},{code:"IQ",name:"Iraq"},{code:"IE",name:"Ireland"},{code:"IM",name:"Isle of Man"},{code:"IL",name:"Israel"},{code:"IT",name:"Italy"},{code:"JM",name:"Jamaica"},{code:"JP",name:"Japan"},{code:"JE",name:"Jersey"},{code:"JO",name:"Jordan"},{code:"KZ",name:"Kazakhstan"},{code:"KE",name:"Kenya"},{code:"KI",name:"Kiribati"},{code:"KP",name:"Korea, Democratic People's Republic of"},{code:"KR",name:"Korea, Republic of"},{code:"KW",name:"Kuwait"},{code:"KG",name:"Kyrgyzstan"},{code:"LA",name:"Lao People's Democratic Republic"},{code:"LV",name:"Latvia"},{code:"LB",name:"Lebanon"},{code:"LS",name:"Lesotho"},{code:"LR",name:"Liberia"},{code:"LY",name:"Libya"},{code:"LI",name:"Liechtenstein"},{code:"LT",name:"Lithuania"},{code:"LU",name:"Luxembourg"},{code:"MO",name:"Macao"},{code:"MG",name:"Madagascar"},{code:"MW",name:"Malawi"},{code:"MY",name:"Malaysia"},{code:"MV",name:"Maldives"},{code:"ML",name:"Mali"},{code:"MT",name:"Malta"},{code:"MH",name:"Marshall Islands"},{code:"MQ",name:"Martinique"},{code:"MR",name:"Mauritania"},{code:"MU",name:"Mauritius"},{code:"YT",name:"Mayotte"},{code:"MX",name:"Mexico"},{code:"FM",name:"Micronesia"},{code:"MD",name:"Moldova"},{code:"MC",name:"Monaco"},{code:"MN",name:"Mongolia"},{code:"ME",name:"Montenegro"},{code:"MS",name:"Montserrat"},{code:"MA",name:"Morocco"},{code:"MZ",name:"Mozambique"},{code:"MM",name:"Myanmar"},{code:"NA",name:"Namibia"},{code:"NR",name:"Nauru"},{code:"NP",name:"Nepal"},{code:"NL",name:"Netherlands"},{code:"NC",name:"New Caledonia"},{code:"NZ",name:"New Zealand"},{code:"NI",name:"Nicaragua"},{code:"NE",name:"Niger"},{code:"NG",name:"Nigeria"},{code:"NU",name:"Niue"},{code:"NF",name:"Norfolk Island"},{code:"MK",name:"North Macedonia"},{code:"MP",name:"Northern Mariana Islands"},{code:"NO",name:"Norway"},{code:"OM",name:"Oman"},{code:"PK",name:"Pakistan"},{code:"PW",name:"Palau"},{code:"PS",name:"Palestine"},{code:"PA",name:"Panama"},{code:"PG",name:"Papua New Guinea"},{code:"PY",name:"Paraguay"},{code:"PE",name:"Peru"},{code:"PH",name:"Philippines"},{code:"PN",name:"Pitcairn"},{code:"PL",name:"Poland"},{code:"PT",name:"Portugal"},{code:"PR",name:"Puerto Rico"},{code:"QA",name:"Qatar"},{code:"RE",name:"Réunion"},{code:"RO",name:"Romania"},{code:"RU",name:"Russian Federation"},{code:"RW",name:"Rwanda"},{code:"BL",name:"Saint Barthélemy"},{code:"SH",name:"Saint Helena"},{code:"KN",name:"Saint Kitts and Nevis"},{code:"LC",name:"Saint Lucia"},{code:"MF",name:"Saint Martin"},{code:"PM",name:"Saint Pierre and Miquelon"},{code:"VC",name:"Saint Vincent and the Grenadines"},{code:"WS",name:"Samoa"},{code:"SM",name:"San Marino"},{code:"ST",name:"Sao Tome and Principe"},{code:"SA",name:"Saudi Arabia"},{code:"SN",name:"Senegal"},{code:"RS",name:"Serbia"},{code:"SC",name:"Seychelles"}
1,{code:"SL",name:"Sierra Leone"},{code:"SG",name:"Singapore"},{code:"SX",name:"Sint Maarten"},{code:"SK",name:"Slovakia"},{code:"SI",name:"Slovenia"},{code:"SB",name:"Solomon Islands"},{code:"SO",name:"Somalia"},{code:"ZA",name:"South Africa"},{code:"GS",name:"South Georgia and the South Sandwich Islands"},{code:"SS",name:"South Sudan"},{code:"ES",name:"Spain"},{code:"LK",name:"Sri Lanka"},{code:"SD",name:"Sudan"},{code:"SR",name:"Suriname"},{code:"SJ",name:"Svalbard and Jan Mayen"},{code:"SE",name:"Sweden"},{code:"CH",name:"Switzerland"},{code:"SY",name:"Syrian Arab Republic"},{code:"TW",name:"Taiwan"},{code:"TJ",name:"Tajikistan"},{code:"TZ",name:"Tanzania"},{code:"TH",name:"Thailand"},{code:"TL",name:"Timor-Leste"},{code:"TG",name:"Togo"},{code:"TK",name:"Tokelau"},{code:"TO",name:"Tonga"},{code:"TT",name:"Trinidad and Tobago"},{code:"TN",name:"Tunisia"},{code:"TR",name:"Türkiye"},{code:"TM",name:"Turkmenistan"},{code:"TC",name:"Turks and Caicos Islands"},{code:"TV",name:"Tuvalu"},{code:"UG",name:"Uganda"},{code:"UA",name:"Ukraine"},{code:"AE",name:"United Arab Emirates"},{code:"GB",name:"United Kingdom"},{code:"US",name:"United States"},{code:"UM",name:"United States Minor Outlying Islands"},{code:"UY",name:"Uruguay"},{code:"UZ",name:"Uzbekistan"},{code:"VU",name:"Vanuatu"},{code:"VE",name:"Venezuela"},{code:"VN",name:"Viet Nam"},{code:"VG",name:"Virgin Islands, British"},{code:"VI",name:"Virgin Islands, U.S."},{code:"WF",name:"Wallis and Futuna"},{code:"EH",name:"Western Sahara"},{code:"YE",name:"Yemen"},{code:"ZM",name:"Zambia"},{code:"ZW",name:"Zimbabwe"}].reduce((function(e,t){return e[t.code]=t.name,e}),{});oe.registerCategory({id:"content",label:(0,ee.__)("Content","gp-popups"),icon:"document",description:(0,ee.__)("Target specific pages, posts, or content types","gp-popups"),order:10}),oe.registerCategory({id:"url",label:(0,ee.__)("URL & Navigation","gp-popups"),icon:"link",description:(0,ee.__)("Target based on URL patterns and query parameters","gp-popups"),order:20}),oe.registerCategory({id:"user",label:(0,ee.__)("User & Authentication","gp-popups"),icon:"user",description:(0,ee.__)("Target based on user roles and login status","gp-popups"),order:30}),oe.registerCategory({id:"device",label:(0,ee.__)("Device & Browser","gp-popups"),icon:"device",description:(0,ee.__)("Target specific devices, browsers, operating systems, or visitor location","gp-popups"),order:40}),oe.registerCategory({id:"time",label:(0,ee.__)("Time & Schedule","gp-popups"),icon:"clock",description:(0,ee.__)("Target based on time of day or day of week","gp-popups"),order:50}),oe.registerCategory({id:"advanced",label:(0,ee.__)("Advanced","gp-popups"),icon:"cog",description:(0,ee.__)("Advanced targeting options like cookies and custom rules","gp-popups"),order:60}),oe.register({type:"specific_posts",label:(0,ee.__)("Specific Posts","gp-popups"),description:(0,ee.__)("Target specific posts, pages, or custom post types","gp-popups"),icon:"document-text",category:"content",evaluationMode:"server",isCacheable:!0,supportedOperators:["is","is_not"],defaultOperator:"is",defaultValue:{postIds:[]},helpText:(0,ee.__)("Select one or more posts to target","gp-popups"),formatValue:function(e){var t=e;return t.postIds&&0!==t.postIds.length?"".concat(t.postIds.length," ").concat((0,ee.__)("selected","gp-popups")):(0,ee.__)("(none selected)","gp-popups")}}),oe.register({type:"content_type",label:(0,ee.__)("Content Type","gp-popups"),description:(0,ee.__)("Target based on what kind of page is being viewed","gp-popups"),icon:"clipboard",category:"content",evaluationMode:"server",isCacheable:!0,supportedOperators:["is","is_not"],defaultOperator:"is",defaultValue:"page",helpText:(0,ee.__)("Select the type of content to target","gp-popups"),options:{front_page:(0,ee.__)("Front Page","gp-popups"),home:(0,ee.__)("Blog Home","gp-popups"),single:(0,ee.__)("Single Post","gp-popups"),page:(0,ee.__)("Page","gp-popups"),singular:(0,ee.__)("Any Singular","gp-popups"),attachment:(0,ee.__)("Attachment","gp-popups"),search:(0,ee.__)("Search Results","gp-popups"),404:(0,ee.__)("404 Page","gp-popups"),preview:(0,ee.__)("Preview","gp-popups")},formatValue:function(e){var t=e;return oe.getOptionLabel("content_type",t)||t}}),oe.register({type:"archive_type",label:(0,ee.__)("Archive Type","gp-popups"),description:(0,ee.__)("Target specific archive pages","gp-popups"),icon:"archive",category:"content",evaluationMode:"server",isCacheable:!0,supportedOperators:["is","is_not"],defaultOperator:"is",defaultValue:{archiveType:"any"},helpText:(0,ee.__)("Select the type of archive to target","gp-popups"),formatValue:function(e){var t=e;return{any:(0,ee.__)("Any Archive","gp-popups"),category:(0,ee.__)("Category Archive","gp-popups"),tag:(0,ee.__)("Tag Archive","gp-popups"),taxonomy:(0,ee.__)("Taxonomy Archive","gp-popups"),author:(0,ee.__)("Author Archive","gp-popups"),post_type_archive:(0,ee.__)("Post Type Archive","gp-popups"),date:(0,ee.__)("Date Archive","gp-popups"),year:(0,ee.__)("Year Archive","gp-popups"),month:(0,ee.__)("Month Archive","gp-popups"),day:(0,ee.__)("Day Archive","gp-popups")}[t.archiveType]||t.archiveType}}),oe.register({type:"taxonomy_term",label:(0,ee.__)("Taxonomy Term","gp-popups"),description:(0,ee.__)("Target content with specific categories, tags, or terms","gp-popups"),icon:"tag",category:"content",evaluationMode:"server",isCacheable:!0,supportedOperators:["has","has_not"],defaultOperator:"has",defaultValue:{taxonomy:"category",terms:[]},helpText:(0,ee.__)("Select taxonomy terms to target","gp-popups"),formatValue:function(e){var t=e;return t.terms&&0!==t.terms.length?"".concat(t.terms.length," ").concat((0,ee.__)("terms selected","gp-popups")):(0,ee.__)("(none selected)","gp-popups")}}),oe.register({type:"post_attribute",label:(0,ee.__)("Post Attribute","gp-popups"),description:(0,ee.__)("Target based on post attributes like template, parent, or custom fields","gp-popups"),icon:"settings",category:"content",evaluationMode:"server",isCacheable:!0,supportedOperators:["is","is_not","contains","not_contains","exists","not_exists"],defaultOperator:"is",defaultValue:{attribute:"sticky"},helpText:(0,ee.__)("Select a post attribute to check","gp-popups"),formatValue:function(e){var t=e;return{paginated:(0,ee.__)("Paginated","gp-popups"),sticky:(0,ee.__)("Sticky Post","gp-popups"),page_template:(0,ee.__)("Page Template","gp-popups"),has_parent:(0,ee.__)("Has Parent","gp-popups"),is_child:(0,ee.__)("Is Child Page","gp-popups"),custom_field:(0,ee.__)("Custom Field","gp-popups")}[t.attribute]||t.attribute}}),oe.register({type:"post_type",label:(0,ee.__)("Post Type","gp-popups"),description:(0,ee.__)("Target content belonging to specific post types (posts, pages, or custom post types)","gp-popups"),icon:"folder",category:"content",evaluationMode:"server",isCacheable:!0,supportedOperators:["is","is_not"],defaultOperator:"is",defaultValue:[],helpText:(0,ee.__)("Match based on the current post type","gp-popups"),formatValue:function(e){if("string"==typeof e)return e||(0,ee.__)("(none selected)","gp-popups");var t=e;return t&&0!==t.length?1===t.length?t[0]:"".concat(t.length," ").concat((0,ee.__)("types selected","gp-popups")):(0,ee.__)("(none selected)","gp-popups")}}
1),oe.register({type:"url_contains",label:(0,ee.__)("URL Contains","gp-popups"),description:(0,ee.__)("Target URLs containing specific text","gp-popups"),icon:"search",category:"url",evaluationMode:"client",supportedOperators:["contains","not_contains"],defaultOperator:"contains",defaultValue:{pattern:"",caseSensitive:!1},placeholder:"/products/",helpText:(0,ee.__)("Enter text that should appear in the URL","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var o,n,r,i,a,s,c,p,u;return ge(this,(function(l){return o=e.value,n=t.url.href,r=o.pattern,i=null!==(u=o.caseSensitive)&&void 0!==u&&u,a=i?n:n.toLowerCase(),s=i?r:r.toLowerCase(),c=a.includes(s),p="contains"===e.operator?c:!c,[2,{conditionId:e.id,conditionType:e.type,matched:p,reason:p?"URL ".concat("contains"===e.operator?"contains":"does not contain",' "').concat(r,'"'):"URL ".concat("contains"===e.operator?"does not contain":"contains",' "').concat(r,'"')}]}))}))},formatValue:function(e){var t=e;return t.pattern?'"'.concat(t.pattern,'"'):(0,ee.__)("(empty)","gp-popups")}}),oe.register({type:"url_matches",label:(0,ee.__)("URL Pattern (Regex)","gp-popups"),description:(0,ee.__)("Target URLs matching a regex pattern","gp-popups"),icon:"regex",category:"url",evaluationMode:"client",supportedOperators:["matches_regex"],defaultOperator:"matches_regex",defaultValue:{pattern:"",caseSensitive:!1},placeholder:"^/blog/[0-9]+",helpText:(0,ee.__)("Enter a regular expression pattern","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var o,n,r,i,a;return ge(this,(function(s){o=e.value,n=t.url.href;try{return r=o.caseSensitive?"":"i",i=new RegExp(o.pattern,r),a=i.test(n),[2,{conditionId:e.id,conditionType:e.type,matched:a,reason:a?'URL matches pattern "'.concat(o.pattern,'"'):'URL does not match pattern "'.concat(o.pattern,'"')}]}catch(t){return[2,{conditionId:e.id,conditionType:e.type,matched:!1,reason:"Invalid regex pattern: ".concat(o.pattern)}]}return[2]}))}))},formatValue:function(e){var t=e;return t.pattern?'"'.concat(t.pattern,'"'):(0,ee.__)("(empty)","gp-popups")}}),oe.register({type:"url_path",label:(0,ee.__)("URL Path","gp-popups"),description:(0,ee.__)("Target specific URL paths","gp-popups"),icon:"route",category:"url",evaluationMode:"client",supportedOperators:["is","is_not","starts_with","ends_with"],defaultOperator:"is",defaultValue:{pattern:"/",caseSensitive:!1},placeholder:"/shop/category/",helpText:(0,ee.__)("Enter the URL path (e.g., /about-us/)","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var o,n,r,i,a,s,c,p,u;return ge(this,(function(l){switch(o=e.value,n=t.url.pathname,r=o.pattern,i=null!==(u=o.caseSensitive)&&void 0!==u&&u,a=i?n:n.toLowerCase(),s=i?r:r.toLowerCase(),c=!1,p="",e.operator){case"is":p=(c=a===s)?'Path is "'.concat(r,'"'):'Path "'.concat(n,'" is not "').concat(r,'"');break;case"is_not":p=(c=a!==s)?'Path is not "'.concat(r,'"'):'Path "'.concat(n,'" is "').concat(r,'"');break;case"starts_with":c=a.startsWith(s),p=c?'Path starts with "'.concat(r,'"'):'Path "'.concat(n,'" does not start with "').concat(r,'"');break;case"ends_with":c=a.endsWith(s),p=c?'Path ends with "'.concat(r,'"'):'Path "'.concat(n,'" does not end with "').concat(r,'"');break;default:p="Unsupported operator: ".concat(e.operator)}return[2,{conditionId:e.id,conditionType:e.type,matched:c,reason:p}]}))}))},formatValue:function(e){var t=e;return t.pattern?'"'.concat(t.pattern,'"'):(0,ee.__)("(empty)","gp-popups")}}),oe.register({type:"query_param",label:(0,ee.__)("Query Parameter","gp-popups"),description:(0,ee.__)("Target URLs with specific query parameters","gp-popups"),icon:"question",category:"url",evaluationMode:"client",supportedOperators:["is","is_not","contains","exists","not_exists"],defaultOperator:"exists",defaultValue:{paramName:"",paramValue:""},placeholder:"utm_source",helpText:(0,ee.__)("Target visitors with specific URL parameters","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var o,n,r,i,a,s,c;return ge(this,(function(p){switch(o=e.value,n=t.url.searchParams,r=n.has(o.paramName),i=null!==(c=n.get(o.paramName))&&void 0!==c?c:"",a=!1,s="",e.operator){case"exists":a=r,s='Parameter "'.concat(o.paramName,a?'" exists':'" does not exist');break;case"not_exists":a=!r,s='Parameter "'.concat(o.paramName,a?'" does not exist':'" exists');break;case"is":a=r&&i===o.paramValue,s=a?'Parameter "'.concat(o.paramName,'" is "').concat(o.paramValue,'"'):'Parameter "'.concat(o.paramName,'" is not "').concat(o.paramValue,'"');break;case"is_not":a=!r||i!==o.paramValue,s=a?'Parameter "'.concat(o.paramName,'" is not "').concat(o.paramValue,'"'):'Parameter "'.concat(o.paramName,'" is "').concat(o.paramValue,'"');break;case"contains":a=r&&i.includes(o.paramValue||""),s=a?'Parameter "'.concat(o.paramName,'" contains "').concat(o.paramValue,'"'):'Parameter "'.concat(o.paramName,'" does not contain "').concat(o.paramValue,'"');break;default:s="Unsupported operator: ".concat(e.operator)}return[2,{conditionId:e.id,conditionType:e.type,matched:a,reason:s}]}))}))},formatValue:function(e,t){var o=e;return o.paramName?"exists"===t||"not_exists"===t?'"'.concat(o.paramName,'"'):o.paramValue?"".concat(o.paramName,'="').concat(o.paramValue,'"'):'"'.concat(o.paramName,'"'):(0,ee.__)("(empty)","gp-popups")}}),oe.register({type:"referrer",label:(0,ee.__)("Referrer","gp-popups"),description:(0,ee.__)("Target visitors from specific referral sources","gp-popups"),icon:"arrow-back",category:"url",evaluationMode:"client",supportedOperators:["is","is_not","contains","starts_with"],defaultOperator:"contains",defaultValue:{pattern:"",caseSensitive:!1},placeholder:"google.com",helpText:(0,ee.__)("Target visitors coming from specific websites","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var o,n,r,i,a,s,c,p,u;return ge(this,(function(l){switch(o=e.value,n=t.referrer,r=o.pattern,i=null!==(u=o.c
1aseSensitive)&&void 0!==u&&u,a=i?n:n.toLowerCase(),s=i?r:r.toLowerCase(),c=!1,p="",e.operator){case"is":p=(c=a===s)?'Referrer is "'.concat(r,'"'):'Referrer is not "'.concat(r,'"');break;case"is_not":p=(c=a!==s)?'Referrer is not "'.concat(r,'"'):'Referrer is "'.concat(r,'"');break;case"contains":c=a.includes(s),p=c?'Referrer contains "'.concat(r,'"'):'Referrer does not contain "'.concat(r,'"');break;case"starts_with":c=a.startsWith(s),p=c?'Referrer starts with "'.concat(r,'"'):'Referrer does not start with "'.concat(r,'"');break;default:p="Unsupported operator: ".concat(e.operator)}return[2,{conditionId:e.id,conditionType:e.type,matched:c,reason:p}]}))}))},formatValue:function(e){var t=e;return t.pattern?'"'.concat(t.pattern,'"'):(0,ee.__)("(empty)","gp-popups")}}),oe.register({type:"user_role",label:(0,ee.__)("User Role","gp-popups"),description:(0,ee.__)("Target users with specific roles","gp-popups"),icon:"user-group",category:"user",evaluationMode:"server",isCacheable:!1,supportedOperators:["is","is_not"],defaultOperator:"is",defaultValue:{roles:[]},helpText:(0,ee.__)("Select user roles to target","gp-popups"),options:{administrator:(0,ee.__)("Administrator","gp-popups"),editor:(0,ee.__)("Editor","gp-popups"),author:(0,ee.__)("Author","gp-popups"),contributor:(0,ee.__)("Contributor","gp-popups"),subscriber:(0,ee.__)("Subscriber","gp-popups")},formatValue:function(e){var t=e;return t.roles&&0!==t.roles.length?t.roles.map((function(e){return oe.getOptionLabel("user_role",e)})).join(", "):(0,ee.__)("(none selected)","gp-popups")}}),oe.register({type:"user_logged_in",label:(0,ee.__)("Login Status","gp-popups"),description:(0,ee.__)("Target logged in or logged out users","gp-popups"),icon:"lock",category:"user",evaluationMode:"server",isCacheable:!1,supportedOperators:["is"],defaultOperator:"is",defaultValue:"logged_in",helpText:(0,ee.__)("Target based on whether user is logged in","gp-popups"),options:{logged_in:(0,ee.__)("Logged In","gp-popups"),logged_out:(0,ee.__)("Logged Out","gp-popups")},formatValue:function(e){var t=e;return oe.getOptionLabel("user_logged_in",t)}}),oe.register({type:"device",label:(0,ee.__)("Device Type","gp-popups"),description:(0,ee.__)("Target specific device types","gp-popups"),icon:"phone",category:"device",evaluationMode:"client",supportedOperators:["is","is_not"],defaultOperator:"is",defaultValue:{devices:[]},helpText:(0,ee.__)("Select device types to target","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var o,n,r,i,a;return ge(this,(function(s){switch(s.label){case 0:return o=e.value,[4,ue(t.userAgent)];case 1:return n=s.sent(),r=o.devices,i=r.includes(n),a="is"===e.operator?i:!i,[2,{conditionId:e.id,conditionType:e.type,matched:a,reason:a?'Device "'.concat(n,'" ').concat("is"===e.operator?"is in":"is not in"," [").concat(r.join(", "),"]"):'Device "'.concat(n,'" ').concat("is"===e.operator?"is not in":"is in"," [").concat(r.join(", "),"]")}]}}))}))},options:{desktop:(0,ee.__)("Desktop","gp-popups"),tablet:(0,ee.__)("Tablet","gp-popups"),mobile:(0,ee.__)("Mobile","gp-popups")},formatValue:function(e){var t=e;return t.devices&&0!==t.devices.length?t.devices.map((function(e){return oe.getOptionLabel("device",e)})).join(", "):(0,ee.__)("(none selected)","gp-popups")}}),oe.register({type:"browser",label:(0,ee.__)("Browser","gp-popups"),description:(0,ee.__)("Target specific web browsers","gp-popups"),icon:"globe",category:"device",evaluationMode:"client",supportedOperators:["is","is_not"],defaultOperator:"is",defaultValue:{browsers:[]},helpText:(0,ee.__)("Select browsers to target","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var o,n,r,i,a;return ge(this,(function(s){switch(s.label){case 0:return o=e.value,[4,le(t.userAgent)];case 1:return n=s.sent(),r=o.browsers,i=r.includes(n),a="is"===e.operator?i:!i,[2,{conditionId:e.id,conditionType:e.type,matched:a,reason:a?'Browser "'.concat(n,'" ').concat("is"===e.operator?"is in":"is not in"," [").concat(r.join(", "),"]"):'Browser "'.concat(n,'" ').concat("is"===e.operator?"is not in":"is 
1in"," [").concat(r.join(", "),"]")}]}}))}))},options:{chrome:"Chrome",firefox:"Firefox",safari:"Safari",edge:"Edge",opera:"Opera",ie:"Internet Explorer"},formatValue:function(e){var t=e;return t.browsers&&0!==t.browsers.length?t.browsers.map((function(e){return oe.getOptionLabel("browser",e)})).join(", "):(0,ee.__)("(none selected)","gp-popups")}}),oe.register({type:"os",label:(0,ee.__)("Operating System","gp-popups"),description:(0,ee.__)("Target specific operating systems","gp-popups"),icon:"computer",category:"device",evaluationMode:"client",supportedOperators:["is","is_not"],defaultOperator:"is",defaultValue:"",helpText:(0,ee.__)("Select operating systems to target","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var o,n,r,i;return ge(this,(function(a){switch(a.label){case 0:return o=e.value,[4,de(t.userAgent)];case 1:return n=a.sent(),r=n===o,i="is"===e.operator?r:!r,[2,{conditionId:e.id,conditionType:e.type,matched:i,reason:i?'OS "'.concat(n,'" ').concat("is"===e.operator?"is":"is not",' "').concat(o,'"'):'OS "'.concat(n,'" ').concat("is"===e.operator?"is not":"is",' "').concat(o,'"')}]}}))}))},options:{windows:"Windows",macos:"macOS",linux:"Linux",ios:"iOS",android:"Android"},formatValue:function(e){var t=e;return oe.getOptionLabel("os",t)||t||(0,ee.__)("(none selected)","gp-popups")}}),oe.register({type:"geolocation",label:(0,ee.__)("Geolocation","gp-popups"),description:(0,ee.__)("Target visitors by country based on IP address","gp-popups"),icon:"globe",category:"device",evaluationMode:"client",supportedOperators:["is","is_not"],defaultOperator:"is",defaultValue:[],helpText:(0,ee.__)("Select the countries to target.","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var t,o,n,r;return ge(this,(function(i){switch(i.label){case 0:return 0===(t=_e(e.value)).length?[2,{conditionId:e.id,conditionType:e.type,matched:!1,reason:"No target countries configured"}]:[4,Te()];case 1:return(o=i.sent())?(n=t.includes(o),r="is"===e.operator?n:!n,[2,{conditionId:e.id,conditionType:e.type,matched:r,reason:r?'Country "'.concat(o,'" ').concat("is"===e.operator?"is in":"is not in"," [").concat(t.join(", "),"]"):'Country "'.concat(o,'" ').concat("is"===e.operator?"is not in":"is in"," [").concat(t.join(", "),"]")}]):[2,{conditionId:e.id,conditionType:e.type,matched:!1,reason:"Unable to determine visitor country"}]}}))}))},formatValue:function(e){var t=_e(e);return 0===t.length?(0,ee.__)("(none selected)","gp-popups"):t.map((function(e){return Pe[e]||e})).join(", ")}}),oe.register({type:"time_of_day",label:(0,ee.__)("Time of Day","gp-popups"),description:(0,ee.__)("Target specific hours of the day","gp-popups"),icon:"clock-time",category:"time",evaluationMode:"client",supportedOperators:["between"],defaultOperator:"between",defaultValue:{startTime:"09:00",endTime:"17:00",timezone:"local"},helpText:(0,ee.__)("Set the time range when popup should appear","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var o,n,r,i,a,s;return ge(this,(function(c){var p;return o=e.value,p=t.now,n=60*p.getHours()+p.getMinutes(),r=me(o.startTime),i=me(o.endTime),a=r<=i?n>=r&&n<=i:n>=r||n<=i,s="".concat(Math.floor(n/60).toString().padStart(2,"0"),":").concat((n%60).toString().padStart(2,"0")),[2,{c
1onditionId:e.id,conditionType:e.type,matched:a,reason:a?"Current time ".concat(s," is between ").concat(o.startTime," and ").concat(o.endTime):"Current time ".concat(s," is not between ").concat(o.startTime," and ").concat(o.endTime)}]}))}))},formatValue:function(e){var t=e;return t.startTime&&t.endTime?"".concat(t.startTime," – ").concat(t.endTime):(0,ee.__)("(not configured)","gp-popups")}}),oe.register({type:"day_of_week",label:(0,ee.__)("Day of Week","gp-popups"),description:(0,ee.__)("Target specific days of the week","gp-popups"),icon:"calendar-days",category:"time",evaluationMode:"client",supportedOperators:["is","is_not"],defaultOperator:"is",defaultValue:{days:[]},helpText:(0,ee.__)("Select days when popup should appear","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var o,n,r,i,a;return ge(this,(function(s){var c;return o=e.value,c=t.now,n=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"][c.getDay()],r=o.days,i=r.includes(n),a="is"===e.operator?i:!i,[2,{conditionId:e.id,conditionType:e.type,matched:a,reason:a?'Day "'.concat(n,'" ').concat("is"===e.operator?"is in":"is not in"," [").concat(r.join(", "),"]"):'Day "'.concat(n,'" ').concat("is"===e.operator?"is not in":"is in"," [").concat(r.join(", "),"]")}]}))}))},options:{monday:(0,ee.__)("Mon","gp-popups"),tuesday:(0,ee.__)("Tue","gp-popups"),wednesday:(0,ee.__)("Wed","gp-popups"),thursday:(0,ee.__)("Thu","gp-popups"),friday:(0,ee.__)("Fri","gp-popups"),saturday:(0,ee.__)("Sat","gp-popups"),sunday:(0,ee.__)("Sun","gp-popups")},formatValue:function(e){var t=e;return t.days&&0!==t.days.length?t.days.map((function(e){return oe.getOptionLabel("day_of_week",e)})).join(", "):(0,ee.__)("(none selected)","gp-popups")}}),oe.register({type:"date_range",label:(0,ee.__)("Date Range","gp-popups"),description:(0,ee.__)("Target specific date ranges","gp-popups"),icon:"calendar",category:"time",evaluationMode:"client",supportedOperators:["between"],defaultOperator:"between",defaultValue:{startDate:(new Date).toISOString().split("T")[0],endDate:new Date(Date.now()+6048e5).toISOString().split("T")[0],timezone:"local"},helpText:(0,ee.__)("Set the date range when popup should appear","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var o,n,r,i,a,s,c,p,u;return ge(this,(function(l){return o=e.value,n=t.now,r=new Date(o.startDate),i=new Date(o.endDate),o.startTime?(a=fe(o.startTime.split(":").map(Number),2),c=a[0],p=a[1],r.setHours(c,p,0,0)):r.setHours(0,0,0,0),o.endTime?(s=fe(o.endTime.split(":").map(Number),2),c=s[0],p=s[1],i.setHours(c,p,59,999)):i.setHours(23,59,59,999),u=n>=r&&n<=i,[2,{conditionId:e.id,conditionType:e.type,matched:u,reason:u?"Current date is within range ".concat(o.startDate," to ").concat(o.endDate):"Current date is outside range ".concat(o.startDate," to ").concat(o.endDate)}]}))}))},formatValue:function(e){var t=e;return t.startDate&&t.endDate?"".concat(t.startDate," – ").concat(t.endDate):(0,ee.__)("(not configured)","gp-popups")}}),oe.register({type:"cookie",label:(0,ee.__)("Cookie","gp-popups"),description:(0,ee.__)("Target based on browser cookies","gp-popups"),icon:"cookie",category:"advanced",evaluationMode:"client",supportedOperators:["is","is_not","contains","exists","not_exists"],defaultOperator:"exists",defaultValue:{cookieName:"",cookieValue:""},placeholder:"my_cookie",helpText:(0,ee.__)("Target visitors with specific cookies","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var o,n,r,i,a,s,c;return ge(this,(function(p){switch(o=e.value,n=t.cookies,r=o.cookieName in n,i=null!==(c=n[o.cookieName])&&void 0!==c?c:"",a=!1,s="",e.operator){case"exists":a=r,s='Cookie "'.concat(o.cookieName,a?'" exists':'" does not exist');break;case"not_exists":a=!r,s='Cookie "'.concat(o.cookieName,a?'" does not exist':'" exists');break;case"is":a=r&&i===o.cookieValue,s=a?'Cookie "'.concat(o.cookieName,'" is "').concat(o.cookieValue,'"'):'Cookie "'.concat(o.cookieName,'" is not "').concat(o.cookieValue,'"');break;case"is_not":a=!r||i!==o.cookieValue,s=a?'Cookie "'.concat(o.cookieName,'" is not "').concat(o.cookieValue,'"'):'Cookie "'.concat(o.cookieName,'" is "').concat(o.cookieValue,'"');break;case"contains":a=r&&i.includes(o.cookieValue||""),s=a?'Cookie "'.concat(o.cookieName,'" contains "').concat(o.cookieValue,'"'):'Cookie "'.concat(o.cookieName,'" does not contain "').concat(o.cookieValue,'"');break;default:s="Unsupported operator: ".concat(e.operator)}return[2,{conditionId:e.id,conditionType:e.type,matched:a,reason:s}]}))}))},formatValue:function(e,t){var o=e;return o.cookieName?"exists"===t||"not_exists"===t?'"'.concat(o.cookieName,'"'):o.cookieValue?"".concat(o.cookieName,'="').concat(o.cookieValue,'"'):'"'.concat(o.cookieName,'"'):(0,ee.__)("(empty)","gp-popups")}}),oe.register({type:"custom",label:(0,ee.__)("Custom JavaScript","gp-popups"),description:(0,ee.__)("Use custom JavaScript for advanced targeting","gp-popups"),icon:"code",category:"advanced",evaluationMode:"client",supportedOperators:["is"],defaultOperator:"is",defaultValue:"return true;",placeholder:"return window.myCondition === true;",helpText:(0,ee.__)("Write JavaScript that returns true/false","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var o,n,r,i,a;return ge(this,(function(s){o=e.value;try{return n=new Function("window","document","location",o),r=n(t.windowContext||window,(null===(a=t.windowContext)||void 0===a?void 0:a.document)||document,t.url),i=Boolean(r),[2,{conditionId:e.id,conditionType:e.type,matched:i,reason:i?"Custom condition returned true":"Custom condition returned false"}]}catch(t){return[2,{conditionId:e.id,conditionType:e.type,matched:!1,reason:"Custom condition error: ".concat(t instanceof Error?t.message:String(t))}]}return[2]}))}))},formatValue:function(e){var t=e;return t&&"return true;"!==t?t.length>30?t.substring(0,30)+"...":t:(0,ee.__)("(default)","gp-popups")}}),oe.register({type:"traffic_percentage",label:(0,ee.__)("Traffic Percentage","gp-popups"),description:(0,ee.__)("Show to a percentage of visitors for A/B testing","gp-popups"),icon:"dice",category:"advanced",evaluationMode:"client",supportedOperators:["is"],defaultOperator:"is",defaultValue:{min:1,max:100},helpText:(0,ee.__)("Define a visitor range (1–100) for A/B testing. Use non–overlapping ranges like 1–50 for Variant A and 51–100 for Variant B.","gp-popups"),evaluate:function(e,t){return he(this,void 0,Promise,(function(){var t,o,n,r,i;return ge(this,(function(a){return t=e.value,o=t.min,n=t.max,r=xe(),i=r>=o&&r<=n,[2,{conditionId:e.id,conditionType:e.type,matched:i,reason:i?"Visitor #".concat(r," is within range ").concat(o,"-").concat(n):"Visitor #".concat(r," is outside range ").concat(o,"-").concat(n)}]}))}))},formatValue:function(e){var t=e,o=t.max-t.min+1;
1return"".concat(t.min,"-").concat(t.max," (").concat(o,"%)")}});var Ie=function(e,t,o,n){return new(o||(o=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},Oe=function(e,t){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(6===s[0]&&i.label<r[1]){i.label=r[1],r=s;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(s);break}r[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{o=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},Me=function(e){var t="function"==typeof Symbol&&Symbol.iterator,o=t&&e[t],n=0;if(o)return o.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Ee(e,t){return Ie(this,void 0,Promise,(function(){return Oe(this,(function(o){return[2,oe.evaluateCondition(e,t)]}))}))}function Le(e,t){return Ie(this,void 0,Promise,(function(){var o,n,r,i,a,s,c,p,u;return Oe(this,(function(l){switch(l.label){case 0:if(!1===e.enabled)return[2,{groupId:e.id,groupName:e.name,matched:!1,logic:e.conditionLogic||"AND",conditionResults:[]}];o=e.conditionLogic||"AND",n=[],l.label=1;case 1:l.trys.push([1,6,7,8]),r=Me(e.conditions),i=r.next(),l.label=2;case 2:return i.done?[3,5]:[4,Ee(i.value,t)];case 3:if(a=l.sent(),n.push(a),"AND"===o&&!a.matched&&!a.skipped)return[2,{groupId:e.id,groupName:e.name,matched:!1,logic:o,conditionResults:n}];if("OR"===o&&a.matched)return[2,{groupId:e.id,groupName:e.name,matched:!0,logic:o,conditionResults:n}];l.label=4;case 4:return i=r.next(),[3,2];case 5:return[3,8];case 6:return s=l.sent(),p={error:s},[3,8];case 7:try{i&&!i.done&&(u=r.return)&&u.call(r)}finally{if(p)throw p.error}return[7];case 8:return c="AND"===o?n.every((function(e){return e.matched||e.skipped})):n.some((function(e){return e.matched})),[2,{groupId:e.id,groupName:e.name,matched:c,logic:o,conditionResults:n}]}}))}))}function Ae(e,t){return Ie(this,void 0,Promise,(function(){var o,n,r,i,a,s,c,p,u,l,d,h,g,f,m,y,v;return Oe(this,(function(b){switch(b.label){case 0:if(0===e.length)return[2,{matched:!0,groupResults:[],pendingServerConditions:[],errors:[]}];o=[],n=[],r=new Set,i=[],a=oe.getAjaxRequiredConditions(),b.label=1;case 1:b.trys.push([1,6,7,8]),s=Me(e),c=s.next(),b.label=2;case 2:return c.done?[3,5]:[4,Le(p=c.value,t)];case 3:u=b.sent(),o.push(u);try{for(y=void 0,l=Me(p.conditions),d=l.next();!d.done;d=l.next())h=d.value,a.includes(h.type)&&!1!==h.enabled&&!r.has(h.id)&&(n.push(h),r.add(h.id))}catch(e){y={error:e}}finally{try{d&&!d.done&&(v=l.return)&&v.call(l)}finally{if(y)throw y.error}}if(u.matched)return[2,{matched:!0,groupResults:o,pendingServerConditions:n,errors:i}];b.label=4;case 4:return c=s.next(),[3,2];case 5:return[3,8];case 6:return g=b.sent(),f={error:g},[3,8];case 7:try{c&&!c.done&&(m=s.return)&&m.call(s)}finally{if(f)throw f.error}return[7];case 8:return[2,{matched:!1,groupResults:o,pendingServerConditions:n,errors:i}]}}))}))}var Re=function(e,t,o,n){return new(o||(o=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},Ve=function(e,t){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]}
1,trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(6===s[0]&&i.label<r[1]){i.label=r[1],r=s;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(s);break}r[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{o=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},De=d("TargetingService");function Ne(e,t,o,n){return Re(this,void 0,Promise,(function(){var r,i,a,s,c;return Ve(this,(function(p){switch(p.label){case 0:return e&&0!==e.length?(u={},document.cookie.split(";").forEach((function(e){var t=function(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a}(e.trim().split("="),2),o=t[0],n=t[1];o&&(u[o]=decodeURIComponent(n||""))})),r={url:new URL(window.location.href),referrer:document.referrer,userAgent:navigator.userAgent,now:new Date,cookies:u,windowContext:window},[4,Ae(e,r)]):[2,{shouldShow:!0,reason:"No targeting conditions"}];case 1:return(i=p.sent()).matched?i.pendingServerConditions.length>0?(a=n||(null===(c=window.gpPopupsGlobal)||void 0===c?void 0:c.verifyTargetNonce)||"")?(De.log("Verifying server conditions:",i.pendingServerConditions),[4,Be(t,o,i.pendingServerConditions,a)]):(De.warn("No nonce available for server condition verification"),[2,{shouldShow:!1,reason:"Security token not available"}]):[3,3]:(De.log("Client-side targeting not matched"),[2,{shouldShow:!1,reason:"Client-side conditions not met"}]);case 2:return[2,{shouldShow:s=p.sent(),reason:s?"All conditions met":"Server-side conditions not met"}];case 3:return[2,{shouldShow:!0,reason:"All client-side conditions met"}]}var u}))}))}function Be(e,t,o,n){return Re(this,void 0,Promise,(function(){var r,i;return Ve(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"gp_popups_verify_targeting",nonce:n,feed_id:String(t),conditions:JSON.stringify(o)})})];case 1:return[4,a.sent().json()];case 2:return[2,(r=a.sent()).success&&r.data.matched];case 3:return i=a.sent(),De.error("Failed to verify server conditions:",i),[2,!1];case 4:return[2]}}
1))}))}var He=function(e,t,o,n){return new(o||(o=Promise))((function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},je=function(e,t){var o,n,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(o)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(o=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){i.label=s[1];break}if(6===s[0]&&i.label<r[1]){i.label=r[1],r=s;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(s);break}r[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{o=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},Ue=d("PopupManager"),Ge=function(){function e(){this.popups=new Map,Ue.log("PopupManager constructor"),this.setupPublicAPI()}return e.prototype.init=function(e){var t=this;Ue.group("Initializing ".concat(e.length," popup(s)"),(function(){return He(t,void 0,void 0,(function(){var t,o;return je(this,(function(n){switch(n.label){case 0:t=0,n.label=1;case 1:return t<e.length?(o=e[t],Ue.log("Creating popup ".concat(t+1,"/").concat(e.length,":"),o),[4,this.createPopup(o)]):[3,4];case 2:n.sent(),n.label=3;case 3:return t++,[3,1];case 4:return[2]}}
1))}))}))},e.prototype.wasDismissed=function(e){return!!e.behavior.respectDismissal&&"1"===s(e.behavior.cookieName)},e.prototype.createPopup=function(e){return He(this,void 0,Promise,(function(){var t,o,n,r,i,a,s,c,p;return je(this,(function(u){switch(u.label){case 0:return Ue.log("Popup ".concat(e.feedId," Setup")),Ue.log("feedId:",e.feedId),Ue.log("trigger type:",e.trigger.type),Ue.log("isActive:",e.isActive),e.isActive?this.wasDismissed(e)?(Ue.log("Popup was previously dismissed, skipping trigger initialization"),o=new N(e),this.popups.set(e.feedId,{popup:o,triggers:[],config:e}),[2]):(n=null!==(p=null===(c=e.targeting)||void 0===c?void 0:c.groups)&&void 0!==p?p:[]).length>0?[4,Ne(n,e.ajaxUrl,e.feedId)]:[3,2]:(Ue.log("Feed is inactive, skipping trigger initialization (admin testing only)"),t=new N(e),this.popups.set(e.feedId,{popup:t,triggers:[],config:e}),[2]);case 1:if(!(r=u.sent()).shouldShow)return Ue.log("Popup ".concat(e.feedId," targeting not matched: ").concat(r.reason)),i=new N(e),this.popups.set(e.feedId,{popup:i,triggers:[],config:e}),[2];u.label=2;case 2:return a=new N(e),s=this.createTriggersForPopup(a,e),this.popups.set(e.feedId,{popup:a,triggers:s,config:e}),Ue.log("Popup stored, total popups:",this.popups.size),[2]}}))}))},e.prototype.createTriggersForPopup=function(e,t){var o=[];switch(t.trigger.type){case"button":Ue.log("Creating ButtonTrigger with selector:",t.trigger.selector),o.push(new U(e,t.trigger.selector));break;case"timeout":var n="s"===t.trigger.delayUnit?1e3*t.trigger.delay:t.trigger.delay;Ue.log("Creating TimeoutTrigger with delay:",t.trigger.delay,t.trigger.delayUnit,"->",n,"ms"),o.push(new z(e,n));break;case"exit_intent":Ue.log("Creating ExitIntentTrigger with sensitivity:",t.trigger.sensitivity),o.push(new Z(e,t.trigger.sensitivity));break;case"scroll_depth":Ue.log("Creating ScrollDepthTrigger with value:",t.trigger.scrollDepthValue,t.trigger.scrollDepthUnit),o.push(new Q(e,t.trigger.scrollDepthValue,t.trigger.scrollDepthUnit));break;case"hash":Ue.log("Creating HashTrigger with hash:",t.trigger.hashValue),o.push(new X(e,t.trigger.hashValue));break;case"js_api":Ue.log("js_api trigger - no automatic trigger")}return Ue.log("Created ".concat(o.length," trigger(s), initializing...")),o.forEach((function(e,t){Ue.log("Initializing trigger ".concat(t+1,"/").concat(o.length)),e.init()})),o},e.prototype.show=function(e,t){var o=this.popups.get(e);o?o.popup.show():(null==t?void 0:t.bypassDismissal)&&this.forceLaunch(e)},e.prototype.forceLaunch=function(e){var t;Ue.log("Force launching popup ".concat(e));var o=this.popups.get(e);if(o)o.popup.forceShow();else{var n=null===(t=window.gpPopupsConfig)||void 0===t?void 0:t.find((function(t){return t.feedId===e}));if(n){var r=new N(n);this.popups.set(e,{popup:r,triggers:[],config:n}),r.forceShow()}else Ue.warn("Cannot force launch popup ".concat(e,": config not found"))}},e.prototype.hide=function(e){var t=this.popups.get(e);t&&t.popup.hide()},e.prototype.toggle=function(e){var t=this.popups.get(e);t&&t.popup.toggle()},e.prototype.isOpen=function(e){var t=this.popups.get(e);return!!t&&t.popup.getIsOpen()},e.prototype.destroy=function(){this.popups.forEach((function(e){var t=e.popup;e.triggers.forEach((function(e){return e.destroy()})),t.destroy()})),this.popups.clear()},e.prototype.testTrigger=function(e){Ue.log("Testing trigger for feed ".concat(e));var t=this.popups.get(e);if(t)if(t.triggers.length>0)Ue.log("Triggers already initialized for feed ".concat(e));else{if("js_api"===t.config.trigger.type)return Ue.log("js_api trigger - launching immediately"),void t.popup.forceShow();var o=this.createTriggersForPopup(t.popup,t.config);t.triggers=o}else Ue.warn("Cannot test trigger: popup ".concat(e," not found"))},e.prototype.setupPublicAPI=function(){var e=this;window.GPPopups={show:function(t,o){return e.show(t,o)},hide:function(t){return e.hide(t)},toggle:function(t){return e.toggle(t)},isOpen:function(t){return e.isOpen(t)}
1,forceLaunch:function(t){return e.forceLaunch(t)},testTrigger:function(t){return e.testTrigger(t)}}},e}(),Fe=d("Frontend");function Ke(){Fe.group("Initialization",(function(){if(Fe.log("init() called"),Fe.log("window.gpPopupsConfig:",window.gpPopupsConfig),window.gpPopupsConfig&&Array.isArray(window.gpPopupsConfig)){Fe.log("Found ".concat(window.gpPopupsConfig.length," popup config(s)"));var e=new Ge;Fe.log("PopupManager created, initializing with configs..."),e.init(window.gpPopupsConfig),Fe.log("PopupManager initialized")}else Fe.log("No popup configurations found, exiting")}))}Fe.log("Script loaded, document.readyState:",document.readyState),"loading"===document.readyState?(Fe.log("Adding DOMContentLoaded listener"),document.addEventListener("DOMContentLoaded",Ke)):(Fe.log("DOM already ready, calling init immediately"),Ke())})();
2//# sourceMappingURL=gp-popups-frontend.js.map

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.