apxor-qe 1.6.3-qa.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apxor.qe.js.bak +524 -512
- package/dist/apxor.qe.min.js +1 -1
- package/package.json +25 -5
package/dist/apxor.qe.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("apxor")):"function"==typeof define&&define.amd?define(["apxor"],e):(t=t||self)["apxor-qe"]=e(t.Apxor)}(this,(function(t){"use strict";function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function n(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,c(i.key),i)}}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e,n){return(e=c(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function c(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var d=window.ApxorLogger,v=function(t){return void 0!==t&&!function(t){return null===t}(t)},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function p(t,e){return Array.from(e).map((function(e,n){return String.fromCharCode(e^function(t,e){return t.charCodeAt(Math.floor(e%t.length))}(t,n))})).join("")}var f=function(t,e){return p(t,e=function(t){var e,n,i,r,o,a,s=0,u=[];if(!t)return t;t+="";do{e=(a=h.indexOf(t.charAt(s++))<<18|h.indexOf(t.charAt(s++))<<12|(r=h.indexOf(t.charAt(s++)))<<6|(o=h.indexOf(t.charAt(s++))))>>16&255,n=a>>8&255,i=255&a,u.push(e),64!==r&&(u.push(n),64!==o&&u.push(i))}while(s<t.length);return u}(e))},g=function(t){switch(t){case"app_event":return"AE";case"client_event":return"CE";case"activity_time":case"activity_event":return"AE"}return"Unknown"},_=function(t){return t.toUpperCase()},y=function(t,e,n){switch(n){case"EQ":return t===e;case"GT":return t>e;case"GTE":return t>=e;case"LT":return t<e;case"LTE":return t<=e;case"NEQ":return t!==e;case"R":return m(e).test(t);default:return!1}},m=function(t){var e=t.replace(/.*\/([gimuy]*)$/,"$1");e===t&&(e="");var n=e?t.replace(new RegExp("^/(.*?)/"+e+"$"),"$1"):t;return new RegExp(n,e)},w=function(){var t=new Date;return t.getDate()+"/"+t.getMonth()+"/"+t.getFullYear()},b=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r="([^/]+)",o=n?n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"):"",a=e.replace(new RegExp(o,"g"),r),s=new RegExp("^".concat(a)+(i?"":"$")),u=t.match(s);return null!==u};function O(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,o=S(t,e);if(o){var a=function(){if(F(o)){return function(t){return M(t)}(o)}return d.info("Invalid target element. Width and height are 0 for element: ".concat(t,". Can't show tooltip")),!1};return a()}return n?(d.info("Not found yet. Rechecking the DOM."),E(r,i,t,e)):(d.info("Element with selector:".concat(t," not found.")),!1)}function E(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=setInterval((function(){var e=S(n,i);if(e){clearInterval(r);!function(){if(F()){M()}else d.info("Invalid target element. Width and height are 0 for element: ".concat(n,". Can't show tooltip"))}()}else(t-=1)<=0&&(clearInterval(r),console.warn("Element with selector:".concat(n," not found.")))}),e)}var S=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=document.getElementById(t);if(!i)try{i=document.querySelector(t)}catch(t){window.ApxorLogger.error("Error finding element in DOM:"+t)}(i||(i=x(t)),!i&&n.length>0)&&(i=null===(e=document.getElementById(n))||void 0===e||null===(e=e.contentWindow)||void 0===e||null===(e=e.document)||void 0===e?void 0:e.querySelector(t));return i},x=function(t){var e=t.indexOf("svg");-1!==e&&(t=t.substring(0,e)+"svg:svg");try{return document.DOOS(t,document,(function(t){return"svg"===t?"http://www.w3.org/2000/svg":null}),XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}catch(t){window.ApxorLogger.error("Error finding element in DOM:"+t)}return null};function F(t){try{var e=t.getBoundingClientRect();if(0===e.width||0===e.height)return!1}catch(t){return!1}return!0}function M(t){var e,n,i,r;return!!(n=(e=t).offsetHeight,i=e.offsetWidth,(r=e.getBoundingClientRect()).left>=-i&&r.top>=-n&&r.right<=(window.innerWidth||document.documentElement.clientWidth)+i&&r.bottom<=(window.innerHeight||document.documentElement.clientHeight)+n)}var C=function(t){var e='\n <style> \n .apx-container{\n padding:10px;\n }\n </style>\n <div id="apx-innerElement" class="apx-container">\n <div id="close-button" style="cursor: pointer;position:absolute;top:9px;right:9px;"><svg width="11" height="11" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path opacity="0.5" d="M11.0962 9.07071L17.8586 15.8331L15.8331 17.8586L9.0707 11.0962L8.99999 11.0255L8.92928 11.0962L2.16693 17.8586L0.141421 15.8331L6.90379 9.07071L6.9745 9L6.90379 8.92929L0.141421 2.16694L2.16693 0.141422L8.92928 6.9038L8.99999 6.97451L9.0707 6.9038L15.8331 0.141422L17.8586 2.16694L11.0962 8.92929L11.0255 9L11.0962 9.07071Z" fill="white" stroke="#002845" stroke-width="0.2"/>\n </svg>\n </div>\n <div style="font-family: inherit;font-style: normal;font-weight: 600;font-size: 16px;line-height: 22px;\n color: #FFFFFF; display: flex; gap: 12px;"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-circle-check-filled" width="33" height="33" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z" stroke-width="0" fill="currentColor" />\n</svg><div style = "align-self: center;padding-right:20px;">'.concat(t,"</div></div>\n </div>\n "),n=document.createElement("div");n.style="\n z-index:99999999;\n background:#16202f;\n position:fixed;\n top:1%;\n right:1%;\n border-radius: 12px;\n ",n.innerHTML=e,n.id="apx-container",document.body.appendChild(n)},A=window.ApxorLogger,T=a((function e(){var n=this;r(this,e),s(this,"VaVo","ALL"),s(this,"sDWS",[]),s(this,"yMFf",[]),s(this,"userAttributesValidated",!0),s(this,"sessionAttributeValidated",!0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(n.VaVo=t.audience.audience_type,n.sDWS=t.audience.attributes.user,n.yMFf=t.audience.attributes.session,!Array.isArray(n.sDWS)||!Array.isArray(n.yMFf))return A.error("No attributes"),!1}catch(t){return A.error(t),!1}return!0})),s(this,"validate",(function(e,i){var r=!0;"FTU"===n.VaVo&&(r=t.getController().getSessionInfo().is_first_session);var o=n.Mbis(e,n.sDWS),a=n.Mbis(i,n.yMFf);return o||(n.userAttributesValidated=!1),a||(n.sessionAttributeValidated=!1),r&&o&&a})),s(this,"Mbis",(function(t,e){var n=e.length,i=!0;try{for(var r,o=function(){var n=e[a];if(void 0===t[n.name]||!1===i)return{v:!1};var r=n.operator,o=n.type,s=n.value.map((function(t){if("s"===o)return t;if("l"===o)return parseInt(t);if("f"===o)return parseFloat(t);if("b"===o)switch(t){case"true":return!0;case"false":return!1;default:return t}})),u=(Array.isArray(t[n.name])?t[n.name]:[t[n.name]]).some((function(t){return s.some((function(e){return"s"===o?t="".concat(t):"l"===o?t=parseInt(t):"f"===o?t=parseFloat(t):"b"===o&&(t=!!t),y(t,e,r)}))}));i=i&&u},a=0;a<n;a++)if(r=o())return r.v}catch(t){A.error(t),i=!1}return i}))})),I=window.ApxorLogger,L=a((function e(){var n=this;r(this,e),s(this,"MWXm",0),s(this,"oNDH",0),s(this,"sChz","SESSION"),s(this,"ElVV",0),s(this,"bLMV",0),s(this,"kWOI",0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{n.UOvb=t._id,n.ZRcw=t.meta,n.MWXm=t.frequency.count,-1===n.MWXm&&(n.MWXm=1e3),n.kWOI=n.MWXm,n.oNDH=t.frequency.time_interval,n.sChz=t.frequency.validity,n.bLMV=t.frequency.ses_lmt,n._dayCount=t.frequency.day_lmt;var e=rt.getInstance().getQeState();if(!v(e)||!v(e[t._id]))return!0;if("SESSION"===n.sChz){if(n.MWXm=parseInt(n.MWXm)-parseInt(e[t._id].SESSION),n.MWXm<=0)return n.Jhva("Session limit reached"),console.warn("Max count limit reached for session:"+t._id),!1}else{if("OVERALL"!==n.sChz)return I.info("Invalid config."),!1;if(n.MWXm=parseInt(n.MWXm)-parseInt(e[t._id].OVERALL),n.MWXm<=0)return n.Jhva("Overall limit reached"),console.warn("Max count limit reached for overall:"+t._id),!1}}catch(t){return I.error(t),!1}return!0})),s(this,"KQWg",(function(){n.MWXm=n.MWXm-1})),s(this,"getFrequencyCount",(function(){return n.MWXm})),s(this,"ffxG",(function(){"SESSION"===n.sChz&&(n.MWXm=n.kWOI,I.info("Campaign Limit reset"))})),s(this,"xWvr",(function(t){try{if(n.MWXm<=0)return"OVERALL"===n.sChz?n.Jhva("Overall limit reached"):"SESSION"===n.sChz&&n.Jhva("Session limit reached"),!1;var e=rt.getInstance().getQeState();if(!v(e)||!v(e[t]))return!0;if(0!==n.bLMV)if(parseInt(n.bLMV)-parseInt(e[t].SESSION)<=0)return n.Jhva("Session limit reached"),!1;if(0!==n._dayCount){var i,r=w();if(parseInt(n._dayCount)-parseInt((null===(i=e[t])||void 0===i?void 0:i.DATES[r])||0)<=0)return n.Jhva("Day limit reached"),!1}}catch(t){n.Jhva("Error validating the frequency: ".concat(t)),I.error("Error validating the frequency:"+t)}return!0})),s(this,"Jhva",(function(e){var i;null==t||t.logEvent("apx_non_eligible_user",{apx_nudge_type:"SURVEY"===n.ZRcw.type?"survey":"campaign",apx_nudge_id:n.UOvb,apx_nudge_name:n.ZRcw.name,apx_variant_code:n.ZRcw.isExperiment||n.ZRcw.only_context?null===(i=n.ZRcw.attr)||void 0===i?void 0:i.apx_variant_code:"TG",apx_failure_type:"warn",apx_reason:e})}))})),R=a((function t(){var e=this;r(this,t),s(this,"EzOS",""),s(this,"VaVo",""),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var n,i;e.EzOS=t.meta.name,e.VaVo=t.meta.type,e._only_context=t.meta.only_context,e._attr=(null===(n=t.meta)||void 0===n?void 0:n.attr)||{},e._isExperiment=null===(i=t.meta)||void 0===i?void 0:i.isExperiment}catch(t){return window.ApxorLogger.error(t),!1}return!0}))})),N=window.ApxorLogger,G=a((function t(){var e=this;r(this,t),s(this,"fooS",-1),s(this,"kSER",-1),s(this,"gKFX",-1),s(this,"LVss",-1),s(this,"TMmn",!1),s(this,"_nudge_expired",!1),s(this,"_not_yet_active",!1),s(this,"_not_in_specified_time",!1),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(isNaN(Date.parse(t.validity.start_date))||isNaN(Date.parse(t.validity.end_date)))return N.error("Not valid dates"),!1;if(e.fooS=Date.parse(t.validity.start_date),e.kSER=Date.parse(t.validity.end_date),v(t.at_specific_time)&&(e.TMmn=t.at_specific_time,e.TMmn&&v(t.time_limits))){var n=(new Date).toISOString().split("T")[0];if(e.gKFX=Date.parse(n+"T"+t.time_limits.start_time+":00.000Z"),e.LVss=Date.parse(n+"T"+t.time_limits.end_time+":00.000Z"),isNaN(e.gKFX)||isNaN(e.LVss))return N.error("Not valid times"),!1}}catch(t){return N.error(t),!1}return!0})),s(this,"validate",(function(){var t=Date.now();return t>e.fooS&&t<e.kSER?(!e.TMmn||t>=e.gKFX&&t<=e.LVss||(e._not_in_specified_time=!0),!e.TMmn||t>=e.gKFX&&t<=e.LVss):(t<e.fooS?e._not_yet_active=!0:t>e.kSER&&(e._nudge_expired=!0),!1)}))})),V=a((function t(){var e=this;r(this,t),s(this,"EzOS",""),s(this,"pyOM",{}),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{e.EzOS=t.name,e.pyOM=t.additional_info}catch(t){return!1}return!0}))})),U=a((function t(){var e=this;r(this,t),s(this,"NBtp",0),s(this,"ZJHd",0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(e.NBtp=Number(t.lower),e.ZJHd=Number(t.upper),isNaN(e.NBtp)||isNaN(e.ZJHd))return!1}catch(t){return!1}return!0}))})),D=a((function t(){var e=this;r(this,t),s(this,"IwMM",0),s(this,"ssBF",""),s(this,"nGQM",""),s(this,"tuth",new V),s(this,"XFvh",new U),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return e.ssBF=t.event_type,e.nGQM=t.activity,e.tuth.parse(t.details)&&e.XFvh.parse(t.time_bounds)}catch(t){return!1}}))})),W=window.ApxorLogger,Z=a((function t(){var e=this;r(this,t),s(this,"IwMM",0),s(this,"POaq",-1),s(this,"MWXm",0),s(this,"yTeO",""),s(this,"nGQM",""),s(this,"ssBF",""),s(this,"XFvh",new U),s(this,"tuth",new V),s(this,"NtQG",new D),s(this,"TlGR","AND"),s(this,"nxcI",!1),s(this,"VaVo",void 0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return e.POaq=t.sequence,e.MWXm=t.count_config.count,e.yTeO=t.count_config.operator,e.nGQM=t.activity,e.ssBF=t.event_type,e.TlGR=t.combine_operator,e.VaVo=t.type,e.tuth.parse(t.details)&&e.NtQG.parse(t.trigger)&&e.XFvh.parse(t.time_bounds)}catch(t){return W.error(t),!1}}))})),X=window.ApxorLogger,z=a((function t(){var e=this;r(this,t),s(this,"MWXm",0),s(this,"yTeO",""),s(this,"ssBF",""),s(this,"XFvh",new U),s(this,"tuth",new V),s(this,"TlGR","AND"),s(this,"parse",(function(t){try{return e.MWXm=t.count_config.count,e.yTeO=t.count_config.operator,e.ssBF=t.event_type,e.TlGR=t.combine_operator,e.tuth.parse(t.details)&&e.XFvh.parse(t.time_bounds)}catch(t){return X.error(t),!1}}))})),j=window.ApxorLogger,k=function(){function e(){var n=this;r(this,e),s(this,"bUKF",0),s(this,"UOvb",""),s(this,"GppC",new Z),s(this,"FNCF",new z),s(this,"hprw",!1),s(this,"jddI",!1),s(this,"Nvar",0),s(this,"TlGR","AND"),s(this,"HAaq","OR"),s(this,"Iiwo",-1),s(this,"bmGo",[]),s(this,"NUWz",{}),s(this,"QHZw",!1),s(this,"initialize",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";if(n.UOvb=i,n.Nvar=r,n.bmGo=a,"termination"===s&&""!==s){n.FNCF.parse(e);return n.HAaq=n.FNCF.TlGR,n.zXFR(),!0}var u=n.GppC.parse(e);if(u){if(n.TlGR=n.GppC.TlGR,n.GppC.nxcI){var l=n.GppC.tuth.EzOS;"APX_PAGE_OPENED"===l&&(l=n.GppC.tuth.pyOM.navigation_id,l=v(l)?l:n.GppC.tuth.EzOS),n.Iiwo=t.getController().getEventCount(l);var c=n.GppC.MWXm,d=n.GppC.yTeO;if(n.jddI=n.yHyw(n.Iiwo-1,c,d,!1),n.hprw=n.jddI,n.jddI&&"APX_PAGE_OPENED"===n.GppC.tuth.EzOS)return!0}return o&&0!==r||n.wxSy(),!0}return!1})),s(this,"wxSy",(function(){var t,e=n.GppC,i=e.NtQG,r=rt.getInstance();"app_start"===i.ssBF?(n.hprw=!0,r.registerForEvent(g(e.ssBF)+"___"+e.tuth.EzOS,n.bJZM)):r.registerForEvent(g(e.ssBF)+"___"+i.tuth.EzOS,n.bJZM),null!==(t=window.ApxorRTM)&&void 0!==t&&t.badgesLists.includes(n.UOvb)&&r.registerForEvent(g(e.ssBF)+"___"+"apxor-badge-container-".concat("-".concat(n.UOvb).replaceAll(" ","").replace(/[^\w\s]/gi,"")),n.bJZM)})),s(this,"zXFR",(function(){var t=n.FNCF,e=rt.getInstance();n.hprw=!0,e.registerForEvent(g(t.ssBF)+"___"+t.tuth.EzOS,n.cseb)})),s(this,"BsOm",(function(t,e,i,r){var o,a=(Date.now()-n.NUWz[e])/1e3;(null===(o=n.GppC)||void 0===o||null===(o=o.tuth)||void 0===o||null===(o=o.pyOM)||void 0===o?void 0:o.time)/1e3>a&&n._displayCampaign(i)})),s(this,"PfgK",(function(t,e,i,r){var o,a;n.QHZw=!0;var s=Date.now(),u=null===(o=n.GppC)||void 0===o||null===(o=o.NtQG)||void 0===o?void 0:o.tuth.EzOS,l=(s-n.NUWz[u])/1e3,c=null===(a=n.GppC)||void 0===a||null===(a=a.tuth)||void 0===a||null===(a=a.pyOM)||void 0===a?void 0:a.time;(c/=1e3)>l&&n._displayCampaign(i)})),s(this,"bJZM",(function(e,i,r,o){var a,s,u=rt.getInstance();if(n.hprw){if(null!==(a=window.ApxorRTM)&&void 0!==a&&a.isBadgePresent&&null!==(s=window.ApxorRTM)&&void 0!==s&&s.badgesLists.includes(n.UOvb)&&t.getController().isBadgeTriggerSatisfied(n.UOvb))return n.jddI=!0,n.GppC.IwMM=r,void u.validate(n.UOvb,n.Nvar);g(n.GppC.ssBF)===e&&n.MOcy(r-n.GppC.NtQG.IwMM,n.GppC.XFvh)&&n.GppC.tuth.EzOS===i&&n.WjZY(n.GppC.tuth.pyOM,o)&&(n.bUKF+=1,n.jddI=n.yHyw(n.bUKF,n.GppC.MWXm,n.GppC.yTeO),n.jddI&&(n.GppC.IwMM=r,u.validate(n.UOvb,n.Nvar)))}else if(n.hprw=n.CNSZ(e,i,r,o),n.hprw){var l=n.GppC,c=l.NtQG;if(c.IwMM=r,"activity_time"===(null==l?void 0:l.ssBF)){var d,v,h,p=null==l||null===(d=l.tuth)||void 0===d||null===(d=d.pyOM)||void 0===d?void 0:d.time;(null==l||null===(v=l.tuth)||void 0===v||null===(v=v.pyOM)||void 0===v?void 0:v.nkpi.length)>0&&(setTimeout((function(){n.QHZw||(n.jddI=!0,n.jddI&&(n.bUKF+=1,n.jddI=n.yHyw(n.bUKF,n.GppC.MWXm,n.GppC.yTeO),n.jddI&&(n.GppC.IwMM=r,u.validate(n.UOvb,n.Nvar)))),l.tuth.pyOM.nkpi.map((function(t){u.unregisterFromEvent(_(l.tuth.pyOM.et)+"___"+t,n)}))}),p),l.tuth.pyOM.nkpi.map((function(t){u.registerForEvent(_(l.tuth.pyOM.et)+"___"+t,n.PfgK)}))),(null==l||null===(h=l.tuth)||void 0===h||null===(h=h.pyOM)||void 0===h?void 0:h.kpi.length)>0&&(setTimeout((function(){l.tuth.pyOM.kpi.map((function(t){u.unregisterFromEvent(_(l.tuth.pyOM.et)+"___"+t,n)}))}),p),l.tuth.pyOM.kpi.map((function(t){t===l.NtQG.tuth.EzOS?(u.unregisterFromEvent(g(c.ssBF)+"___"+c.tuth.EzOS,n),u.registerForEvent(_(l.tuth.pyOM.et)+"___"+t,n.BsOm)):u.registerForEvent(_(l.tuth.pyOM.et)+"___"+t,n.PfgK)})))}else u.unregisterFromEvent(g(c.ssBF)+"___"+c.tuth.EzOS,n),u.registerForEvent(g(l.ssBF)+"___"+l.tuth.EzOS,n);n.NUWz[i]=Date.now()}})),s(this,"cseb",(function(t,e,i,r){var o=rt.getInstance();g(n.FNCF.ssBF)===t&&n.MOcy(i,n.FNCF.XFvh)&&n.FNCF.tuth.EzOS===e&&n.WjZY(n.FNCF.tuth.pyOM,r)&&(n.bUKF+=1,n.jddI=n.yHyw(n.bUKF,n.FNCF.MWXm,n.FNCF.yTeO),n.jddI&&(n.FNCF.IwMM=i,o.validateForTermination(n.UOvb,n.Nvar)))})),s(this,"CNSZ",(function(t,e,i,r){var o=n.GppC.NtQG;return g(o.ssBF)===t&&o.tuth.EzOS===e&&n.MOcy(i,o.XFvh)&&n.WjZY(o.tuth.pyOM,r)})),s(this,"MOcy",(function(t,e){var n=Math.ceil(t);return n>e.NBtp&&n<e.ZJHd})),s(this,"yHyw",(function(t,e,i){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];switch(r&&n.GppC.nxcI&&(t+=n.Iiwo),i){case"EQ":return t===e;case"GT":return t>e;case"GTE":return t>=e;case"LT":return t<e;case"LTE":return t<=e;default:return!1}})),s(this,"WjZY",(function(t,e){var n=!0;try{var r,o=function(){if(!1===n)return{v:!1};if("object"===i(t[a])){var r,o=t[a].op,s=t[a].t;if("s"===s)r=t[a].val;else if("l"===s||"f"===s)r=parseFloat(t[a].val);else if("b"===s)switch(t[a].val){case"true":r=!0;break;case"false":r=!1;break;default:r=t[a].val}var u=(Array.isArray(e[a])?e[a]:[e[a]]).some((function(t){return"s"===s?t="".concat(t):"l"===s?t=parseInt(t):"f"===s?t=parseFloat(t):"b"===s&&(t=!!t),y(t,r,o)}));n=n&&u}else n=n&&y(e[a],t[a],"EQ")};for(var a in t)if(r=o())return r.v}catch(t){j.error(t),n=!1}return n}))}return a(e,[{key:"_displayCampaign",value:function(t){var e=rt.getInstance();this.jddI=!0,this.jddI&&(this.bUKF+=1,this.jddI=this.yHyw(this.bUKF,this.GppC.MWXm,this.GppC.yTeO),this.jddI&&(this.GppC.IwMM=t,e.validate(this.UOvb,this.Nvar)))}}]),e}(),Q=window.ApxorLogger,J=a((function e(){var n=this;r(this,e),s(this,"TOUc",[]),s(this,"_ret_day",{}),s(this,"BeCd",{}),s(this,"YsMA",!1),s(this,"bYxI",!1),s(this,"retainedDaysValidated",!0),s(this,"retainedSessionValidated",!0),s(this,"eventDoneInLT",!1),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{n.TOUc=t.overall_cfg.events,n._ret_day=t.overall_cfg.ret_day,n.BeCd=t.overall_cfg.session,n.YsMA=t.overall_cfg.toggleRetDay,n.bYxI=t.overall_cfg.toggleSession}catch(t){return Q.error(t),!1}return!0})),s(this,"validate",(function(){var e=parseInt(t.getController().getFromStorage("apx_retained_days")),i=parseInt(t.getController().getFromStorage("apx_retained_session"));if(n.YsMA&&!isNaN(e)&&!(e>=n._ret_day.from&&e<=n._ret_day.to))return n.retainedDaysValidated=!1,!1;if(n.bYxI&&!isNaN(i)&&!(i>=n.BeCd.from&&i<=n.BeCd.to))return n.retainedSessionValidated=!1,!1;try{for(var r=t.getController().getFromStorage("_apx_lt_count"),o=t.getSiteId(),a=JSON.parse((new TextDecoder).decode(function(t){for(var e=new ArrayBuffer(t.length),n=new Uint8Array(e),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return e}(f(o,r)))),s=0;s<n.TOUc.length;s++){if(a[n.TOUc[s].name.replace("'","").replace("’","")])return n.eventDoneInLT=!0,!1}}catch(t){Q.error("Failed to validate the lt count:"+t)}return!0}))})),q=window.ApxorLogger,B=a((function t(){var e=this;r(this,t),s(this,"sDWS",[]),s(this,"yMFf",[]),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(e.sDWS=t.attributes.user,e.yMFf=t.attributes.session,!Array.isArray(e.sDWS)||!Array.isArray(e.yMFf))return q.error("No attributes"),!1}catch(t){return q.error(t),!1}return!0})),s(this,"validate",(function(t,n){return e.Mbis(t,e.sDWS)&&e.Mbis(n,e.yMFf)})),s(this,"Mbis",(function(t,e){var n=e.length,i=!0;try{for(var r,o=function(){var n=e[a];if(!t[n.name]||!1===i)return{v:!1};var r=n.operator,o=n.type,s=n.value.map((function(t){return"s"===o?t:"l"===o?parseInt(t):"f"===o?parseFloat(t):void 0})),u=(Array.isArray(t[n.name])?t[n.name]:[t[n.name]]).some((function(t){return s.some((function(e){return y(t,e,r)}))}));i=i&&u},a=0;a<n;a++)if(r=o())return r.v}catch(t){q.error(t),i=!1}return i}))})),Y=a((function e(){var n=this;r(this,e),s(this,"qniJ",t.getController()),s(this,"type",""),s(this,"_duration_seconds",0),s(this,"eeGv",1),s(this,"parse",(function(t){try{var e,i,r;if(n.VaVo=null===(e=t.terminate_info.time_based)||void 0===e?void 0:e.type,n._duration_seconds=null===(i=t.terminate_info)||void 0===i?void 0:i.time_based.duration_seconds,n.eeGv=null===(r=t.terminate_info.time_based)||void 0===r?void 0:r.days,n.KMXo(t._id))return n.qniJ.persistTerminationInfoLocally(t._id),!1}catch(t){return!1}return!0})),s(this,"KMXo",(function(t){var e,i=JSON.parse(n.qniJ.getFromStorage("apx_termination_ID"));if(!i[t]||null===(e=i[t])||void 0===e||!e.startDate)return!1;var r,o=new Date(i[t].startDate),a=new Date((r=new Date).getMonth()+"/"+r.getDate()+"/"+r.getFullYear()),s=parseInt((a-o)/864e5,10),u=function(){var t=new Date;return{hours:t.getHours(),mins:t.getMinutes()}}(),l=i[t].gKFX;return s===n.eeGv&&u.hours>=l.hours||s>n.eeGv||i[t].goalAcheived}))})),P=a((function t(){var e=this;r(this,t),s(this,"enable_goal_events",!1),s(this,"attributes",{}),s(this,"wTeX",new B),s(this,"KAkY",new Y),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var n,i,r;if(e.enable_time_based=null==t||null===(n=t.terminate_info)||void 0===n?void 0:n.enable_time_based,e.enable_time_based&&!e.KAkY.parse(t))return!1;if(e.enable_goal_events=null==t||null===(i=t.terminate_info)||void 0===i?void 0:i.enable_goal_events,e.enable_attributes=null==t||null===(r=t.terminate_info)||void 0===r?void 0:r.enable_attributes,e.enable_attributes&&!e.wTeX.parse(t.terminate_info))return!1}catch(t){return window.ApxorLogger.error(t),!1}return!0})),s(this,"validate",(function(t,n){return e.wTeX.validate(t,n)}))})),H=a((function t(){var e=this;r(this,t),s(this,"yrGg",""),s(this,"ZOHg",""),s(this,"Mdxv",""),s(this,"Wmoc",""),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return e.yrGg=null==t?void 0:t.screen_binding,!e.yrGg||(e.ZOHg=null==t?void 0:t.binding.url,e.Mdxv=null==t?void 0:t.binding.var,e.Wmoc=null==t?void 0:t.binding.operator,!0)}catch(t){return window.ApxorLogger.error(t),!1}})),s(this,"validate",(function(){var t=e.ZOHg,n=e.Mdxv,i=e.Wmoc,r=window.location.href;return!e.yrGg||("EQ"===i?t.includes(n)?!!b(r,t,n,!1):r===t:"SW"===i?t.includes(n)?!!b(r,t,n,!0):!!r.startsWith(t):void 0)}))})),K=window.ApxorLogger,$=a((function e(){var i=this;r(this,e),s(this,"lEUi",[]),s(this,"gdpH",[]),s(this,"UOvb",""),s(this,"ZRcw",new R),s(this,"jppE",new T),s(this,"sChz",new G),s(this,"kJYL",new L),s(this,"uipS",new J),s(this,"UIio",new P),s(this,"TDxl",new H),s(this,"PYFX",!1),s(this,"xJtu",[]),s(this,"_variant_code",""),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var e;if(!v(t._id))return K.error("No Id"),!1;if(!v(t.enabled)||!t.enabled)return K.error("Not enabled"),!1;if(!(i.ZRcw.parse(t)&&i.sChz.parse(t)&&i.kJYL.parse(t)&&i.jppE.parse(t)&&i.uipS.parse(t)&&i.UIio.parse(t)&&i.TDxl.parse(t)))return!1;if(i._variant_code=i.ZRcw._isExperiment||i.ZRcw._only_context?null===(e=i.ZRcw._attr)||void 0===e?void 0:e.apx_variant_code:"TG",!v(t.conditions)||!Array.isArray(t.conditions))return K.error("No valid conditions",t.conditions),!1;i.UOvb=t._id,i.PYFX=!!v(t.sequence_enabled)&&t.sequence_enabled,i.PYFX&&t.conditions.sort((function(t,e){return t.sequence<e.sequence}));var n=t.conditions,r=n.length,o=null==t?void 0:t.no_context_enabled;0===r&&o&&i.llet();for(var a=function(){i.xJtu=[];var t=n[s];if("didn't"===t.type){var e,r={trigger_key:t.trigger.details.name,no_kpi_array:null==t||null===(e=t.details)||void 0===e||null===(e=e.additional_info)||void 0===e?void 0:e.nkpi,condition_id:null==t?void 0:t._id,time_bounds:t.time_bounds.upper};i.xJtu=[].concat(u(i.xJtu),[r])}var o=new k;if(o.initialize(t,i.UOvb,s,i.PYFX,i.xJtu)){i.lEUi.push(o);var a=(null==t?void 0:t.timeout)/(null==t?void 0:t.findinterval),l=(null==t?void 0:t.frameid)||"",c=null==t?void 0:t.url;window.location.href===c&&"view_visibility"===t.event_type&&!0===O(t.view_id,l,null==t?void 0:t.enable_retry,null==t?void 0:t.findinterval,a)&&i.llet(!0),window.addEventListener("navigate",(function(e){var n=null==t?void 0:t.url;window.location.href===n&&"view_visibility"===t.event_type&&!0===O(t.view_id,l,null==t?void 0:t.enable_retry,null==t?void 0:t.findinterval,a)&&i.llet(!0)}))}},s=0;s<r;s++)a();if(i.UIio.enable_goal_events)for(var l=t.terminate_info.goal_events.events,c=l.length,d=0;d<c;d++){var h=new k;h.initialize(l[d],i.UOvb,d,!0,[],"termination")&&i.gdpH.push(h)}return i.lEUi.length>0}catch(t){return K.error(t),!1}})),s(this,"DOOS",(function(t){if(!(t<0))if(i.PYFX){var e=i.lEUi[t];if(v(e)&&e.jddI){var n=i.lEUi[t-1];if(v(n)&&!n.jddI)return;var r=i.lEUi[t+1];v(r)?r.wxSy():i.llet()}}else i.llet()})),s(this,"AbUp",(function(t){t<0||i.xxnf()})),s(this,"llet",(function(){var e,r,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=t.getController().getUserAttributes(),s=t.getController().getSessionAttributes();if(null!==(e=window.ApxorRTM)&&void 0!==e&&e.isBadgePresent&&null!==(r=window.ApxorRTM)&&void 0!==r&&r.badgesLists.includes(i.UOvb)&&t.getController().isBadgeTriggerSatisfied(i.UOvb)||null==t||t.logEvent("apx_trigger_satisfied",{apx_nudge_type:"SURVEY"===i.ZRcw.VaVo?"survey":"campaign",apx_nudge_id:i.UOvb,apx_nudge_name:i.ZRcw.EzOS,apx_variant_code:i.ZRcw._isExperiment||i.ZRcw._only_context?i.ZRcw._attr.apx_variant_code:"TG"}),!(i.sChz.validate()&&i.jppE.validate(a,s)&&i.uipS.validate()&&i.TDxl.validate()))return i.uipS.retainedDaysValidated?i.uipS.retainedSessionValidated?i.uipS.eventDoneInLT?void i.Jhva("Event done in life time"):i.jppE.userAttributesValidated?i.jppE.sessionAttributeValidated?i.sChz._not_in_specified_time?void i.Jhva("Time limits check failed"):i.sChz._not_yet_active?void i.Jhva("not in the scheduled time"):i.sChz._nudge_expired?void i.Jhva("nudge expired"):void 0:void i.Jhva("Session property filter not met"):void i.Jhva("User property filter not met"):void i.Jhva("User session criteria not met"):void i.Jhva("Retained day criteria not met");var u=i.lEUi.length,l=u<1,c="";0===u&&(l=!0);for(var d=0;d<u;d++){var v=i.lEUi[d],h=v.jddI;if(""===c.trim())l=h;else switch(c){case"AND":l=l&&h;break;case"OR":l=l||h}c=v.TlGR}if(!0===o&&(l=!0),l){if(console.debug("onCondition satisfied"),!i.kJYL.xWvr(i.UOvb)){if(console.warn("Maximum limit reached",i.UOvb),t.getController().isTestDevice()){C("Maximum limit reached for campaign name ".concat(i.ZRcw.EzOS));var p=document.getElementById("close-button"),f=function(){var t=document.getElementById("apx-container");null==t||t.remove()};null==p||p.addEventListener("click",f),window.setTimeout(f,2e4)}return}console.log("Dispatching event",i.ZRcw.VaVo),t.logEvent("apx_context_evaluated",n(n({apx_nudge_type:"SURVEY"===i.ZRcw.VaVo?"survey":"campaign",apx_nudge_id:i.UOvb,apx_nudge_name:i.ZRcw.EzOS,apx_variant_code:i.ZRcw._isExperiment||i.ZRcw._only_context?i.ZRcw._attr.apx_variant_code:"TG"},i.ZRcw._attr),{},{message_name:i.ZRcw.EzOS,id:i.UOvb})),t.getController().dispatchEvent(i.ZRcw.VaVo,{name:i.ZRcw.VaVo,additional_info:{uuid:i.UOvb,name:i.ZRcw.EzOS}})}})),s(this,"xxnf",(function(){for(var e=i.gdpH.length,r=e<1,o="",a=0;a<e;a++){var s=i.gdpH[a],u=s.jddI;if(""===o.trim())r=u;else switch(o){case"AND":r=r&&u;break;case"OR":r=r||u}o=s.HAaq}r&&(console.log("Dispatching event",i.ZRcw.VaVo),t.getController().persistTerminationInfoLocally(i.UOvb),!0===i.ZRcw._only_context&&t.logEvent("apx_context_evaluated",n(n({},i.ZRcw._attr),{},{message_name:i.ZRcw.EzOS,id:i.UOvb})),t.getController().dispatchEvent(i.ZRcw.VaVo,{name:i.ZRcw.VaVo,additional_info:{uuid:i.UOvb,name:i.ZRcw.EzOS}}))})),s(this,"validateForTerminationAttributes",(function(){var e=t.getController().getUserAttributes(),n=t.getController().getSessionAttributes();return i.UIio.validate(e,n)})),s(this,"KQWg",(function(){i.kJYL.KQWg()})),s(this,"getFrequencyCount",(function(){return i.kJYL.getFrequencyCount()})),s(this,"DTqR",(function(){return i.kJYL.ffxG()})),s(this,"Jhva",(function(e){var n;null==t||t.logEvent("apx_non_eligible_user",{apx_nudge_type:"SURVEY"===i.ZRcw.VaVo?"survey":"campaign",apx_nudge_id:i.UOvb,apx_nudge_name:i.ZRcw.EzOS,apx_variant_code:i.ZRcw._isExperiment||i.ZRcw._only_context?null===(n=i.ZRcw._attr)||void 0===n?void 0:n.apx_variant_code:"TG",apx_failure_type:"warn",apx_reason:e})}))})),tt=a((function t(){var e=this;r(this,t),s(this,"dlip",{}),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{configs:[]};if(v(t)&&v(t.configs)){var n=t.configs;if(!Array.isArray(n))return;n.sort((function(t,e){var n,i;return(null!==(n=t.prio)&&void 0!==n?n:-1)-(null!==(i=e.prio)&&void 0!==i?i:-1)}));for(var i=0;i<n.length;i++){var r=n[i],o=r._id,a=new $;a.parse(r)?e.dlip[o]=a:console.warn("Failed to parse cfg",o)}}})),s(this,"validate",(function(t,n){e.dlip[t]&&e.dlip[t].DOOS(n)})),s(this,"getVariantCode",(function(t){return e.dlip[t]?e.dlip[t]._variant_code:""})),s(this,"validateForTermination",(function(t,n){e.dlip[t]&&e.dlip[t].AbUp(n)})),s(this,"validateForTerminationAttributes",(function(t){return!!e.dlip[t]&&e.dlip[t].validateForTerminationAttributes()})),s(this,"KQWg",(function(t){e.dlip[t].KQWg()})),s(this,"getFrequencyCount",(function(t){var n=e.dlip[t];if(null!=n)return n.getFrequencyCount()})),s(this,"resetFrequencyCounts",(function(){var t=e.dlip;for(var n in t)t[n].DTqR()})),s(this,"bVJz",(function(t){try{if(e.dlip){var n=e.dlip[t];if(n&&n.ZRcw)return n.ZRcw}}catch(t){console.log("Error in getting the campaign meta ".concat(t))}return{}}))})),et=window.ApxorLogger,nt=a((function e(){var n=this;r(this,e),s(this,"goSo",{}),s(this,"Gxpk",[]),s(this,"MEaQ",!1),s(this,"initialize",(function(){var e=t.getController();e.registerForEvent("APP_EVENT",(function(t){return n.vrud(t,"AE")})),e.registerForEvent("CLIENT_EVENT",(function(t){return n.vrud(t,"CE")}))})),s(this,"MMWW",(function(){for(var t in n.Gxpk)n.QdLk(t.event,t.key,t.type);n.MEaQ=!0})),s(this,"vVxZ",(function(t,e){var i;"function"==typeof e&&((i=n.goSo[t]?n.goSo[t]:[]).push(e),n.goSo[t]=i,et.debug("Listeners list: ",n.goSo))})),s(this,"unregisterFromEvent",(function(t,e){if(n.goSo[t]){for(var i=n.goSo[t],r=[],o=0;o<i.length;o++){var a=i[o];a!==e&&r.push(a)}n.goSo[t]=r}})),s(this,"vrud",(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"AE",i=e+"___"+t.name;n.QdLk(t,i,e)})),s(this,"QdLk",(function(e,i,r){if(n.MEaQ){if(et.debug("Notifying listeners for event: "+e+", "+i,n.goSo),n.goSo[i])for(var o=n.goSo[i],a=t.getController().getSDKRunningTimeInSec(),s=0;s<o.length;s++){(0,o[s])(r,e.name,a,e.additional_info)}}else n.Gxpk.push({event:e,key:i,type:r})}))})),it=window.ApxorLogger,rt=function(){function e(){var n=this;return r(this,e),s(this,"rGsi",!1),s(this,"nFaY",null),s(this,"eTtX",w()),s(this,"lLUW",new nt),s(this,"ZFVe",t.getSiteId()),s(this,"lpio",{}),s(this,"getQeState",(function(){try{var e=t.getController().getFromStorage("qe_state");return e?JSON.parse(f(n.ZFVe,e)):(n.lpio={},n.setQeState())}catch(t){return n.lpio={},n.setQeState()}})),s(this,"setQeState",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{t.getController().persistToStorage("qe_state",n.lpio,!0)}catch(i){""===e?n.lpio={}:n.lpio[e]={SESSION:0,OVERALL:0,DATES:{}},t.getController().persistToStorage("qe_state",n.lpio,!0)}return n.lpio})),s(this,"initialize",(function(){n.rGsi||(n.rGsi=!0,n.nFaY=new tt,n.lLUW.initialize(),n.lpio=n.getQeState(),it.info("QE Initialized.."))})),s(this,"parse",(function(t){n.ehwg()?(n.nFaY.parse(t),n.lLUW.MMWW()):it.warn("Must call init first. Unable to proceed")})),s(this,"validate",(function(t,e){n.ehwg()&&n.nFaY.validate(t,e)})),s(this,"getVariantCode",(function(t){return n.nFaY.getVariantCode(t)})),s(this,"validateForTermination",(function(t,e){n.ehwg()&&n.nFaY.validateForTermination(t,e)})),s(this,"validateForTerminationAttributes",(function(t,e){return n.nFaY.validateForTerminationAttributes(t,e)})),s(this,"updateCount",(function(t){try{v(n.lpio[t])||n.createObjConfig(t),n.incrementFrequencies(t),n.setQeState(t),n.nFaY.KQWg(t)}catch(t){console.log("Could not update the count config:".concat(t))}})),s(this,"resetFrequencyCounts",(function(){n.nFaY.resetFrequencyCounts()})),s(this,"getFrequencyCount",(function(t){return n.nFaY.getFrequencyCount(t)})),s(this,"registerForEvent",(function(t,e){n.lLUW.vVxZ(t,e)})),s(this,"unregisterFromEvent",(function(t,e){n.lLUW.unregisterFromEvent(t,e)})),s(this,"notifyEventListener",(function(t){n.lLUW.vrud(t)})),s(this,"fetch",(function(e,n,i,r){t.getController().fetchConfiguration(e,n,i,r)})),s(this,"ehwg",(function(){return n.rGsi})),s(this,"getCampaignMetaFromQueryEngine",(function(t){return n.nFaY.bVJz(t)})),s(this,"dlqc",(function(){return n.eTtX})),e.instance||(e.instance=this),e.instance}return a(e,[{key:"createObjConfig",value:function(t){try{this.lpio=this.getQeState(),v(this.lpio[t])||(this.lpio[t]={SESSION:0,OVERALL:0,DATES:{}},this.eTtX&&(this.lpio[t].DATES[this.eTtX]=0),this.setQeState(t))}catch(t){it.error("Can not create the frequency count object:"+t)}}},{key:"incrementFrequencies",value:function(t){this.lpio=this.getQeState();var e=this.lpio[t];e.SESSION=e.SESSION+1,e.OVERALL=e.OVERALL+1;var n=w();n===this.eTtX&&e.DATES&&e.DATES[n]||(this.eTtX=n,e.DATES={},e.DATES[this.eTtX]=0),e.DATES[this.eTtX]=e.DATES[this.eTtX]+1}}],[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}]),e}();s(rt,"instance",void 0),window.ceVersion=160;try{void 0===exports&&null===exports||(exports.default=rt,module.exports=exports.default)}catch(t){}return rt}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("apxor")):"function"==typeof define&&define.amd?define(["apxor"],e):(t=t||self)["apxor-qe"]=e(t.Apxor)}(this,(function(t){"use strict";function e(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function n(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,c(i.key),i)}}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e,n){return(e=c(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function c(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var d=window.ApxorLogger,v=function(t){return void 0!==t&&!function(t){return null===t}(t)},f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function h(t,e){return Array.from(e).map((function(e,n){return String.fromCharCode(e^function(t,e){return t.charCodeAt(Math.floor(e%t.length))}(t,n))})).join("")}var g=function(t,e){return h(t,e=function(t){var e,n,i,r,o,a,s=0,u=[];if(!t)return t;t+="";do{e=(a=f.indexOf(t.charAt(s++))<<18|f.indexOf(t.charAt(s++))<<12|(r=f.indexOf(t.charAt(s++)))<<6|(o=f.indexOf(t.charAt(s++))))>>16&255,n=a>>8&255,i=255&a,u.push(e),64!==r&&(u.push(n),64!==o&&u.push(i))}while(s<t.length);return u}(e))},p=function(t){switch(t){case"app_event":return"AE";case"client_event":return"CE";case"activity_time":case"activity_event":return"AE"}return"Unknown"},y=function(t){return t.toUpperCase()},_=function(t,e,n){switch(n){case"EQ":return t===e;case"GT":return t>e;case"GTE":return t>=e;case"LT":return t<e;case"LTE":return t<=e;case"NEQ":return t!==e;case"R":return m(e).test(t);default:return!1}},m=function(t){var e=t.replace(/.*\/([gimuy]*)$/,"$1");e===t&&(e="");var n=e?t.replace(new RegExp("^/(.*?)/"+e+"$"),"$1"):t;return new RegExp(n,e)},b=function(){var t=new Date;return t.getDate()+"/"+t.getMonth()+"/"+t.getFullYear()},F=function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t||!e||!n)return!1;var r=n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),o=e.replace(new RegExp(r,"g"),"(.+)"),a=i?"^".concat(o):"".concat(o,"$"),s=new RegExp(a);return s.test(t)};function T(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,o=A(t,e);if(o){var a=function(){if(D(o)){return function(t){return x(t)}(o)}return d.info("Invalid target element. Width and height are 0 for element: ".concat(t,". Can't show tooltip")),!1};return a()}return n?(d.info("Not found yet. Rechecking the DOM."),w(r,i,t,e)):(d.info("Element with selector:".concat(t," not found.")),!1)}function w(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=setInterval((function(){var e=A(n,i);if(e){clearInterval(r);!function(){if(D()){x()}else d.info("Invalid target element. Width and height are 0 for element: ".concat(n,". Can't show tooltip"))}()}else(t-=1)<=0&&(clearInterval(r),console.warn("Element with selector:".concat(n," not found.")))}),e)}var A=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=document.getElementById(t);if(!i)try{i=document.querySelector(t)}catch(t){window.ApxorLogger.error("Error finding element in DOM:"+t)}(i||(i=S(t)),!i&&n.length>0)&&(i=null===(e=document.getElementById(n))||void 0===e||null===(e=e.contentWindow)||void 0===e||null===(e=e.document)||void 0===e?void 0:e.querySelector(t));return i},S=function(t){var e=t.indexOf("svg");-1!==e&&(t=t.substring(0,e)+"svg:svg");try{return document.WTJq(t,document,(function(t){return"svg"===t?"http://www.w3.org/2000/svg":null}),XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}catch(t){window.ApxorLogger.error("Error finding element in DOM:"+t)}return null};function D(t){try{var e=t.getBoundingClientRect();if(0===e.width||0===e.height)return!1}catch(t){return!1}return!0}function x(t){var e,n,i,r;return!!(n=(e=t).offsetHeight,i=e.offsetWidth,(r=e.getBoundingClientRect()).left>=-i&&r.top>=-n&&r.right<=(window.innerWidth||document.documentElement.clientWidth)+i&&r.bottom<=(window.innerHeight||document.documentElement.clientHeight)+n)}var O=function(t){var e='\n <style> \n .apx-container{\n padding:10px;\n }\n </style>\n <div id="apx-innerElement" class="apx-container">\n <div id="close-button" style="cursor: pointer;position:absolute;top:9px;right:9px;"><svg width="11" height="11" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path opacity="0.5" d="M11.0962 9.07071L17.8586 15.8331L15.8331 17.8586L9.0707 11.0962L8.99999 11.0255L8.92928 11.0962L2.16693 17.8586L0.141421 15.8331L6.90379 9.07071L6.9745 9L6.90379 8.92929L0.141421 2.16694L2.16693 0.141422L8.92928 6.9038L8.99999 6.97451L9.0707 6.9038L15.8331 0.141422L17.8586 2.16694L11.0962 8.92929L11.0255 9L11.0962 9.07071Z" fill="white" stroke="#002845" stroke-width="0.2"/>\n </svg>\n </div>\n <div style="font-family: inherit;font-style: normal;font-weight: 600;font-size: 16px;line-height: 22px;\n color: #FFFFFF; display: flex; gap: 12px;"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-circle-check-filled" width="33" height="33" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff" fill="none" stroke-linecap="round" stroke-linejoin="round">\n <path stroke="none" d="M0 0h24v24H0z" fill="none"/>\n <path d="M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z" stroke-width="0" fill="currentColor" />\n</svg><div style = "align-self: center;padding-right:20px;">'.concat(t,"</div></div>\n </div>\n "),n=document.createElement("div");n.style="\n z-index:99999999;\n background:#16202f;\n position:fixed;\n top:1%;\n right:1%;\n border-radius: 12px;\n ",n.innerHTML=e,n.id="apx-container",document.body.appendChild(n)},E=window.ApxorLogger,H=a((function e(){var n=this;r(this,e),s(this,"WBXT","ALL"),s(this,"fGzd",[]),s(this,"eYdP",[]),s(this,"userAttributesValidated",!0),s(this,"sessionAttributeValidated",!0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(n.WBXT=t.audience.audience_type,n.fGzd=t.audience.attributes.user,n.eYdP=t.audience.attributes.session,!Array.isArray(n.fGzd)||!Array.isArray(n.eYdP))return E.error("No attributes"),!1}catch(t){return E.error(t),!1}return!0})),s(this,"validate",(function(e,i){var r=!0;"FTU"===n.WBXT&&(r=t.getController().getSessionInfo().is_first_session);var o=n.WJGy(e,n.fGzd),a=n.WJGy(i,n.eYdP);return o||(n.userAttributesValidated=!1),a||(n.sessionAttributeValidated=!1),r&&o&&a})),s(this,"WJGy",(function(t,e){var n=e.length,i=!0;try{for(var r,o=function(){var n=e[a];if(void 0===t[n.name]||!1===i)return{v:!1};var r=n.operator,o=n.type,s=n.value.map((function(t){if("s"===o)return t;if("l"===o)return parseInt(t);if("f"===o)return parseFloat(t);if("b"===o)switch(t){case"true":return!0;case"false":return!1;default:return t}})),u=(Array.isArray(t[n.name])?t[n.name]:[t[n.name]]).some((function(t){return s.some((function(e){return"s"===o?t="".concat(t):"l"===o?t=parseInt(t):"f"===o?t=parseFloat(t):"b"===o&&(t=!!t),_(t,e,r)}))}));i=i&&u},a=0;a<n;a++)if(r=o())return r.v}catch(t){E.error(t),i=!1}return i}))})),k=window.ApxorLogger,X=a((function e(){var n=this;r(this,e),s(this,"MSzB",0),s(this,"EOhX",0),s(this,"kTyF","SESSION"),s(this,"JeZK",0),s(this,"ubBd",0),s(this,"ZJRP",0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{n.tkvH=t._id,n.FaOX=t.meta,n.MSzB=t.frequency.count,-1===n.MSzB&&(n.MSzB=1e3),n.ZJRP=n.MSzB,n.EOhX=t.frequency.time_interval,n.kTyF=t.frequency.validity,n.ubBd=t.frequency.ses_lmt,n._dayCount=t.frequency.day_lmt;var e=rt.getInstance().getQeState();if(!v(e)||!v(e[t._id]))return!0;if("SESSION"===n.kTyF){if(n.MSzB=parseInt(n.MSzB)-parseInt(e[t._id].SESSION),n.MSzB<=0)return n.vYAT("Session limit reached"),console.warn("Max count limit reached for session:"+t._id),!1}else{if("OVERALL"!==n.kTyF)return k.info("Invalid config."),!1;if(n.MSzB=parseInt(n.MSzB)-parseInt(e[t._id].OVERALL),n.MSzB<=0)return n.vYAT("Overall limit reached"),console.warn("Max count limit reached for overall:"+t._id),!1}}catch(t){return k.error(t),!1}return!0})),s(this,"hJWa",(function(){n.MSzB=n.MSzB-1})),s(this,"getFrequencyCount",(function(){return n.MSzB})),s(this,"Hhtv",(function(){"SESSION"===n.kTyF&&(n.MSzB=n.ZJRP,k.info("Campaign Limit reset"))})),s(this,"tiom",(function(t){try{if(n.MSzB<=0)return"OVERALL"===n.kTyF?n.vYAT("Overall limit reached"):"SESSION"===n.kTyF&&n.vYAT("Session limit reached"),!1;var e=rt.getInstance().getQeState();if(!v(e)||!v(e[t]))return!0;if(0!==n.ubBd)if(parseInt(n.ubBd)-parseInt(e[t].SESSION)<=0)return n.vYAT("Session limit reached"),!1;if(0!==n._dayCount){var i,r=b();if(parseInt(n._dayCount)-parseInt((null===(i=e[t])||void 0===i?void 0:i.DATES[r])||0)<=0)return n.vYAT("Day limit reached"),!1}}catch(t){n.vYAT("Error validating the frequency: ".concat(t)),k.error("Error validating the frequency:"+t)}return!0})),s(this,"vYAT",(function(e){var i;null==t||t.logEvent("apx_non_eligible_user",{apx_nudge_type:"SURVEY"===n.FaOX.type?"survey":"campaign",apx_nudge_id:n.tkvH,apx_nudge_name:n.FaOX.name,apx_variant_code:n.FaOX.isExperiment||n.FaOX.only_context?null===(i=n.FaOX.attr)||void 0===i?void 0:i.apx_variant_code:"TG",apx_failure_type:"warn",apx_reason:e})}))})),B=a((function t(){var e=this;r(this,t),s(this,"FiDT",""),s(this,"WBXT",""),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var n,i;e.FiDT=t.meta.name,e.WBXT=t.meta.type,e._only_context=t.meta.only_context,e._attr=(null===(n=t.meta)||void 0===n?void 0:n.attr)||{},e._isExperiment=null===(i=t.meta)||void 0===i?void 0:i.isExperiment}catch(t){return window.ApxorLogger.error(t),!1}return!0}))})),I=window.ApxorLogger,N=a((function t(){var e=this;r(this,t),s(this,"QLwb",-1),s(this,"MNVx",-1),s(this,"ybQh",-1),s(this,"yFSG",-1),s(this,"GpDT",!1),s(this,"_nudge_expired",!1),s(this,"_not_yet_active",!1),s(this,"_not_in_specified_time",!1),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(isNaN(Date.parse(t.validity.start_date))||isNaN(Date.parse(t.validity.end_date)))return I.error("Not valid dates"),!1;if(e.QLwb=Date.parse(t.validity.start_date),e.MNVx=Date.parse(t.validity.end_date),v(t.at_specific_time)&&(e.GpDT=t.at_specific_time,e.GpDT&&v(t.time_limits))){var n=(new Date).toISOString().split("T")[0];if(e.ybQh=Date.parse(n+"T"+t.time_limits.start_time+":00.000Z"),e.yFSG=Date.parse(n+"T"+t.time_limits.end_time+":00.000Z"),isNaN(e.ybQh)||isNaN(e.yFSG))return I.error("Not valid times"),!1}}catch(t){return I.error(t),!1}return!0})),s(this,"validate",(function(){var t=Date.now();return t>e.QLwb&&t<e.MNVx?(!e.GpDT||t>=e.ybQh&&t<=e.yFSG||(e._not_in_specified_time=!0),!e.GpDT||t>=e.ybQh&&t<=e.yFSG):(t<e.QLwb?e._not_yet_active=!0:t>e.MNVx&&(e._nudge_expired=!0),!1)}))})),L=a((function t(){var e=this;r(this,t),s(this,"FiDT",""),s(this,"bFur",{}),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{e.FiDT=t.name,e.bFur=t.additional_info}catch(t){return!1}return!0}))})),C=a((function t(){var e=this;r(this,t),s(this,"xTRO",0),s(this,"qRLS",0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(e.xTRO=Number(t.lower),e.qRLS=Number(t.upper),isNaN(e.xTRO)||isNaN(e.qRLS))return!1}catch(t){return!1}return!0}))})),U=a((function t(){var e=this;r(this,t),s(this,"XwIs",0),s(this,"PTXF",""),s(this,"UDkI",""),s(this,"yHbl",new L),s(this,"ECcI",new C),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return e.PTXF=t.event_type,e.UDkI=t.activity,e.yHbl.parse(t.details)&&e.ECcI.parse(t.time_bounds)}catch(t){return!1}}))})),G=window.ApxorLogger,P=a((function t(){var e=this;r(this,t),s(this,"XwIs",0),s(this,"CcMq",-1),s(this,"MSzB",0),s(this,"jxcB",""),s(this,"UDkI",""),s(this,"PTXF",""),s(this,"ECcI",new C),s(this,"yHbl",new L),s(this,"koaL",new U),s(this,"ZdyA","AND"),s(this,"cUqy",!1),s(this,"WBXT",void 0),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return e.CcMq=t.sequence,e.MSzB=t.count_config.count,e.jxcB=t.count_config.operator,e.UDkI=t.activity,e.PTXF=t.event_type,e.ZdyA=t.combine_operator,e.WBXT=t.type,e.yHbl.parse(t.details)&&e.koaL.parse(t.trigger)&&e.ECcI.parse(t.time_bounds)}catch(t){return G.error(t),!1}}))})),q=window.ApxorLogger,M=a((function t(){var e=this;r(this,t),s(this,"MSzB",0),s(this,"jxcB",""),s(this,"PTXF",""),s(this,"ECcI",new C),s(this,"yHbl",new L),s(this,"ZdyA","AND"),s(this,"parse",(function(t){try{return e.MSzB=t.count_config.count,e.jxcB=t.count_config.operator,e.PTXF=t.event_type,e.ZdyA=t.combine_operator,e.yHbl.parse(t.details)&&e.ECcI.parse(t.time_bounds)}catch(t){return q.error(t),!1}}))})),K=window.ApxorLogger,R=function(){function e(){var n=this;r(this,e),s(this,"HUFK",0),s(this,"tkvH",""),s(this,"HBDN",new P),s(this,"vGYK",new M),s(this,"ZDcP",!1),s(this,"KUlF",!1),s(this,"SgFM",0),s(this,"ZdyA","AND"),s(this,"seqy","OR"),s(this,"TPiO",-1),s(this,"sHgA",[]),s(this,"HTsU",{}),s(this,"qHPA",!1),s(this,"initialize",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"";if(n.tkvH=i,n.SgFM=r,n.sHgA=a,"termination"===s&&""!==s){n.vGYK.parse(e);return n.seqy=n.vGYK.ZdyA,n.BUIy(),!0}var u=n.HBDN.parse(e);if(u){if(n.ZdyA=n.HBDN.ZdyA,n.HBDN.cUqy){var l=n.HBDN.yHbl.FiDT;"APX_PAGE_OPENED"===l&&(l=n.HBDN.yHbl.bFur.navigation_id,l=v(l)?l:n.HBDN.yHbl.FiDT),n.TPiO=t.getController().getEventCount(l);var c=n.HBDN.MSzB,d=n.HBDN.jxcB;if(n.KUlF=n.tZfA(n.TPiO-1,c,d,!1),n.ZDcP=n.KUlF,n.KUlF&&"APX_PAGE_OPENED"===n.HBDN.yHbl.FiDT)return!0}return o&&0!==r||n.IyAK(),!0}return!1})),s(this,"IyAK",(function(){var t,e=n.HBDN,i=e.koaL,r=rt.getInstance();"app_start"===i.PTXF?(n.ZDcP=!0,r.registerForEvent(p(e.PTXF)+"___"+e.yHbl.FiDT,n.SeWP)):r.registerForEvent(p(e.PTXF)+"___"+i.yHbl.FiDT,n.SeWP),null!==(t=window.ApxorRTM)&&void 0!==t&&t.badgesLists.includes(n.tkvH)&&r.registerForEvent(p(e.PTXF)+"___"+"apxor-badge-container-".concat("-".concat(n.tkvH).replaceAll(" ","").replace(/[^\w\s]/gi,"")),n.SeWP)})),s(this,"BUIy",(function(){var t=n.vGYK,e=rt.getInstance();n.ZDcP=!0,e.registerForEvent(p(t.PTXF)+"___"+t.yHbl.FiDT,n.wgNe)})),s(this,"owSn",(function(t,e,i,r){var o,a=(Date.now()-n.HTsU[e])/1e3;(null===(o=n.HBDN)||void 0===o||null===(o=o.yHbl)||void 0===o||null===(o=o.bFur)||void 0===o?void 0:o.time)/1e3>a&&n._displayCampaign(i)})),s(this,"jrrY",(function(t,e,i,r){var o,a;n.qHPA=!0;var s=Date.now(),u=null===(o=n.HBDN)||void 0===o||null===(o=o.koaL)||void 0===o?void 0:o.yHbl.FiDT,l=(s-n.HTsU[u])/1e3,c=null===(a=n.HBDN)||void 0===a||null===(a=a.yHbl)||void 0===a||null===(a=a.bFur)||void 0===a?void 0:a.time;(c/=1e3)>l&&n._displayCampaign(i)})),s(this,"SeWP",(function(e,i,r,o){var a,s,u=rt.getInstance();if(n.ZDcP){if(null!==(a=window.ApxorRTM)&&void 0!==a&&a.isBadgePresent&&null!==(s=window.ApxorRTM)&&void 0!==s&&s.badgesLists.includes(n.tkvH)&&t.getController().isBadgeTriggerSatisfied(n.tkvH))return n.KUlF=!0,n.HBDN.XwIs=r,void u.validate(n.tkvH,n.SgFM);p(n.HBDN.PTXF)===e&&n.AYJW(r-n.HBDN.koaL.XwIs,n.HBDN.ECcI)&&n.HBDN.yHbl.FiDT===i&&n.bscd(n.HBDN.yHbl.bFur,o)&&(n.HUFK+=1,n.KUlF=n.tZfA(n.HUFK,n.HBDN.MSzB,n.HBDN.jxcB),n.KUlF&&(n.HBDN.XwIs=r,u.validate(n.tkvH,n.SgFM)))}else if(n.ZDcP=n.KRhD(e,i,r,o),n.ZDcP){var l=n.HBDN,c=l.koaL;if(c.XwIs=r,"activity_time"===(null==l?void 0:l.PTXF)){var d,v,f,h=null==l||null===(d=l.yHbl)||void 0===d||null===(d=d.bFur)||void 0===d?void 0:d.time;(null==l||null===(v=l.yHbl)||void 0===v||null===(v=v.bFur)||void 0===v?void 0:v.nkpi.length)>0&&(setTimeout((function(){n.qHPA||(n.KUlF=!0,n.KUlF&&(n.HUFK+=1,n.KUlF=n.tZfA(n.HUFK,n.HBDN.MSzB,n.HBDN.jxcB),n.KUlF&&(n.HBDN.XwIs=r,u.validate(n.tkvH,n.SgFM)))),l.yHbl.bFur.nkpi.map((function(t){u.unregisterFromEvent(y(l.yHbl.bFur.et)+"___"+t,n)}))}),h),l.yHbl.bFur.nkpi.map((function(t){u.registerForEvent(y(l.yHbl.bFur.et)+"___"+t,n.jrrY)}))),(null==l||null===(f=l.yHbl)||void 0===f||null===(f=f.bFur)||void 0===f?void 0:f.kpi.length)>0&&(setTimeout((function(){l.yHbl.bFur.kpi.map((function(t){u.unregisterFromEvent(y(l.yHbl.bFur.et)+"___"+t,n)}))}),h),l.yHbl.bFur.kpi.map((function(t){t===l.koaL.yHbl.FiDT?(u.unregisterFromEvent(p(c.PTXF)+"___"+c.yHbl.FiDT,n),u.registerForEvent(y(l.yHbl.bFur.et)+"___"+t,n.owSn)):u.registerForEvent(y(l.yHbl.bFur.et)+"___"+t,n.jrrY)})))}else u.unregisterFromEvent(p(c.PTXF)+"___"+c.yHbl.FiDT,n),u.registerForEvent(p(l.PTXF)+"___"+l.yHbl.FiDT,n);n.HTsU[i]=Date.now()}})),s(this,"wgNe",(function(t,e,i,r){var o=rt.getInstance();p(n.vGYK.PTXF)===t&&n.AYJW(i,n.vGYK.ECcI)&&n.vGYK.yHbl.FiDT===e&&n.bscd(n.vGYK.yHbl.bFur,r)&&(n.HUFK+=1,n.KUlF=n.tZfA(n.HUFK,n.vGYK.MSzB,n.vGYK.jxcB),n.KUlF&&(n.vGYK.XwIs=i,o.validateForTermination(n.tkvH,n.SgFM)))})),s(this,"KRhD",(function(t,e,i,r){var o=n.HBDN.koaL;return p(o.PTXF)===t&&o.yHbl.FiDT===e&&n.AYJW(i,o.ECcI)&&n.bscd(o.yHbl.bFur,r)})),s(this,"AYJW",(function(t,e){var n=Math.ceil(t);return n>e.xTRO&&n<e.qRLS})),s(this,"tZfA",(function(t,e,i){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];switch(r&&n.HBDN.cUqy&&(t+=n.TPiO),i){case"EQ":return t===e;case"GT":return t>e;case"GTE":return t>=e;case"LT":return t<e;case"LTE":return t<=e;default:return!1}})),s(this,"bscd",(function(t,e){var n=!0;try{var r,o=function(){if(!1===n)return{v:!1};if("object"===i(t[a])){var r,o=t[a].op,s=t[a].t;if("s"===s)r=t[a].val;else if("l"===s||"f"===s)r=parseFloat(t[a].val);else if("b"===s)switch(t[a].val){case"true":r=!0;break;case"false":r=!1;break;default:r=t[a].val}var u=(Array.isArray(e[a])?e[a]:[e[a]]).some((function(t){return"s"===s?t="".concat(t):"l"===s?t=parseInt(t):"f"===s?t=parseFloat(t):"b"===s&&(t=!!t),_(t,r,o)}));n=n&&u}else n=n&&_(e[a],t[a],"EQ")};for(var a in t)if(r=o())return r.v}catch(t){K.error(t),n=!1}return n}))}return a(e,[{key:"_displayCampaign",value:function(t){var e=rt.getInstance();this.KUlF=!0,this.KUlF&&(this.HUFK+=1,this.KUlF=this.tZfA(this.HUFK,this.HBDN.MSzB,this.HBDN.jxcB),this.KUlF&&(this.HBDN.XwIs=t,e.validate(this.tkvH,this.SgFM)))}}]),e}(),Y=window.ApxorLogger,Q=a((function e(){var n=this;r(this,e),s(this,"yTgw",[]),s(this,"_ret_day",{}),s(this,"jJTV",{}),s(this,"oZvY",!1),s(this,"laSF",!1),s(this,"retainedDaysValidated",!0),s(this,"retainedSessionValidated",!0),s(this,"eventDoneInLT",!1),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{n.yTgw=t.overall_cfg.events,n._ret_day=t.overall_cfg.ret_day,n.jJTV=t.overall_cfg.session,n.oZvY=t.overall_cfg.toggleRetDay,n.laSF=t.overall_cfg.toggleSession}catch(t){return Y.error(t),!1}return!0})),s(this,"validate",(function(){var e=parseInt(t.getController().getFromStorage("apx_retained_days")),i=parseInt(t.getController().getFromStorage("apx_retained_session"));if(n.oZvY&&!isNaN(e)&&!(e>=n._ret_day.from&&e<=n._ret_day.to))return n.retainedDaysValidated=!1,!1;if(n.laSF&&!isNaN(i)&&!(i>=n.jJTV.from&&i<=n.jJTV.to))return n.retainedSessionValidated=!1,!1;try{for(var r=t.getController().getFromStorage("_apx_lt_count"),o=t.getSiteId(),a=JSON.parse((new TextDecoder).decode(function(t){for(var e=new ArrayBuffer(t.length),n=new Uint8Array(e),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return e}(g(o,r)))),s=0;s<n.yTgw.length;s++){if(a[n.yTgw[s].name.replace("'","").replace("’","")])return n.eventDoneInLT=!0,!1}}catch(t){Y.error("Failed to validate the lt count:"+t)}return!0}))})),V=window.ApxorLogger,z=a((function t(){var e=this;r(this,t),s(this,"fGzd",[]),s(this,"eYdP",[]),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{if(e.fGzd=t.attributes.user,e.eYdP=t.attributes.session,!Array.isArray(e.fGzd)||!Array.isArray(e.eYdP))return V.error("No attributes"),!1}catch(t){return V.error(t),!1}return!0})),s(this,"validate",(function(t,n){return e.WJGy(t,e.fGzd)&&e.WJGy(n,e.eYdP)})),s(this,"WJGy",(function(t,e){var n=e.length,i=!0;try{for(var r,o=function(){var n=e[a];if(!t[n.name]||!1===i)return{v:!1};var r=n.operator,o=n.type,s=n.value.map((function(t){return"s"===o?t:"l"===o?parseInt(t):"f"===o?parseFloat(t):void 0})),u=(Array.isArray(t[n.name])?t[n.name]:[t[n.name]]).some((function(t){return s.some((function(e){return _(t,e,r)}))}));i=i&&u},a=0;a<n;a++)if(r=o())return r.v}catch(t){V.error(t),i=!1}return i}))})),W=a((function e(){var n=this;r(this,e),s(this,"lSAU",t.getController()),s(this,"type",""),s(this,"_duration_seconds",0),s(this,"UCQR",1),s(this,"parse",(function(t){try{var e,i,r;if(n.WBXT=null===(e=t.terminate_info.time_based)||void 0===e?void 0:e.type,n._duration_seconds=null===(i=t.terminate_info)||void 0===i?void 0:i.time_based.duration_seconds,n.UCQR=null===(r=t.terminate_info.time_based)||void 0===r?void 0:r.days,n.StAu(t._id))return n.lSAU.persistTerminationInfoLocally(t._id),!1}catch(t){return!1}return!0})),s(this,"StAu",(function(t){var e,i=JSON.parse(n.lSAU.getFromStorage("apx_termination_ID"));if(!i[t]||null===(e=i[t])||void 0===e||!e.startDate)return!1;var r,o=new Date(i[t].startDate),a=new Date((r=new Date).getMonth()+"/"+r.getDate()+"/"+r.getFullYear()),s=parseInt((a-o)/864e5,10),u=function(){var t=new Date;return{hours:t.getHours(),mins:t.getMinutes()}}(),l=i[t].ybQh;return s===n.UCQR&&u.hours>=l.hours||s>n.UCQR||i[t].goalAcheived}))})),j=a((function t(){var e=this;r(this,t),s(this,"enable_goal_events",!1),s(this,"attributes",{}),s(this,"MEqZ",new z),s(this,"ujNH",new W),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var n,i,r;if(e.enable_time_based=null==t||null===(n=t.terminate_info)||void 0===n?void 0:n.enable_time_based,e.enable_time_based&&!e.ujNH.parse(t))return!1;if(e.enable_goal_events=null==t||null===(i=t.terminate_info)||void 0===i?void 0:i.enable_goal_events,e.enable_attributes=null==t||null===(r=t.terminate_info)||void 0===r?void 0:r.enable_attributes,e.enable_attributes&&!e.MEqZ.parse(t.terminate_info))return!1}catch(t){return window.ApxorLogger.error(t),!1}return!0})),s(this,"validate",(function(t,n){return e.MEqZ.validate(t,n)}))})),J=a((function t(){var e=this;r(this,t),s(this,"KdxM",""),s(this,"BOkL",""),s(this,"Trrq",""),s(this,"fqdK",""),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return e.KdxM=null==t?void 0:t.screen_binding,!e.KdxM||(e.BOkL=null==t?void 0:t.binding.url,e.Trrq=null==t?void 0:t.binding.var,e.fqdK=null==t?void 0:t.binding.operator,!0)}catch(t){return window.ApxorLogger.error(t),!1}})),s(this,"validate",(function(){var t=e.BOkL,n=e.Trrq,i=e.fqdK,r=window.location.href;return!e.KdxM||("EQ"===i?t.includes(n)?!!F(r,t,n,!1):r===t:"SW"===i?t.includes(n)?!!F(r,t,n,!0):!!r.startsWith(t):void 0)}))})),Z=window.ApxorLogger,$=a((function e(){var i=this;r(this,e),s(this,"TbxE",[]),s(this,"oJYY",[]),s(this,"tkvH",""),s(this,"FaOX",new B),s(this,"wdlK",new H),s(this,"kTyF",new N),s(this,"tsTs",new X),s(this,"aNwp",new Q),s(this,"smLy",new j),s(this,"VfRX",new J),s(this,"RJwC",!1),s(this,"eGzd",[]),s(this,"_variant_code",""),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{var e;if(!v(t._id))return Z.error("No Id"),!1;if(!v(t.enabled)||!t.enabled)return Z.error("Not enabled"),!1;if(!(i.FaOX.parse(t)&&i.kTyF.parse(t)&&i.tsTs.parse(t)&&i.wdlK.parse(t)&&i.aNwp.parse(t)&&i.smLy.parse(t)&&i.VfRX.parse(t)))return!1;if(i._variant_code=i.FaOX._isExperiment||i.FaOX._only_context?null===(e=i.FaOX._attr)||void 0===e?void 0:e.apx_variant_code:"TG",!v(t.conditions)||!Array.isArray(t.conditions))return Z.error("No valid conditions",t.conditions),!1;i.tkvH=t._id,i.RJwC=!!v(t.sequence_enabled)&&t.sequence_enabled,i.RJwC&&t.conditions.sort((function(t,e){return t.sequence<e.sequence}));var n=t.conditions,r=n.length,o=null==t?void 0:t.no_context_enabled;0===r&&o&&setTimeout((function(){i.VHRs()}),10);for(var a=function(){i.eGzd=[];var t=n[s];if("didn't"===t.type){var e,r={trigger_key:t.trigger.details.name,no_kpi_array:null==t||null===(e=t.details)||void 0===e||null===(e=e.additional_info)||void 0===e?void 0:e.nkpi,condition_id:null==t?void 0:t._id,time_bounds:t.time_bounds.upper};i.eGzd=[].concat(u(i.eGzd),[r])}var o=new R;if(o.initialize(t,i.tkvH,s,i.RJwC,i.eGzd)){i.TbxE.push(o);var a=(null==t?void 0:t.timeout)/(null==t?void 0:t.findinterval),l=(null==t?void 0:t.frameid)||"",c=null==t?void 0:t.url;window.location.href===c&&"view_visibility"===t.event_type&&!0===T(t.view_id,l,null==t?void 0:t.enable_retry,null==t?void 0:t.findinterval,a)&&i.VHRs(!0),window.addEventListener("navigate",(function(e){var n=null==t?void 0:t.url;window.location.href===n&&"view_visibility"===t.event_type&&!0===T(t.view_id,l,null==t?void 0:t.enable_retry,null==t?void 0:t.findinterval,a)&&i.VHRs(!0)}))}},s=0;s<r;s++)a();if(i.smLy.enable_goal_events)for(var l=t.terminate_info.goal_events.events,c=l.length,d=0;d<c;d++){var f=new R;f.initialize(l[d],i.tkvH,d,!0,[],"termination")&&i.oJYY.push(f)}return i.TbxE.length>0}catch(t){return Z.error(t),!1}})),s(this,"WTJq",(function(t){if(!(t<0))if(i.RJwC){var e=i.TbxE[t];if(v(e)&&e.KUlF){var n=i.TbxE[t-1];if(v(n)&&!n.KUlF)return;var r=i.TbxE[t+1];v(r)?r.IyAK():i.VHRs()}}else i.VHRs()})),s(this,"zTfD",(function(t){t<0||i.PXuU()})),s(this,"VHRs",(function(){var e,r,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=t.getController().getUserAttributes(),s=t.getController().getSessionAttributes();if(null!==(e=window.ApxorRTM)&&void 0!==e&&e.isBadgePresent&&null!==(r=window.ApxorRTM)&&void 0!==r&&r.badgesLists.includes(i.tkvH)&&t.getController().isBadgeTriggerSatisfied(i.tkvH)||null==t||t.logEvent("apx_trigger_satisfied",{apx_nudge_type:"SURVEY"===i.FaOX.WBXT?"survey":"campaign",apx_nudge_id:i.tkvH,apx_nudge_name:i.FaOX.FiDT,apx_variant_code:i.FaOX._isExperiment||i.FaOX._only_context?i.FaOX._attr.apx_variant_code:"TG"}),!(i.kTyF.validate()&&i.wdlK.validate(a,s)&&i.aNwp.validate()&&i.VfRX.validate()))return i.aNwp.retainedDaysValidated?i.aNwp.retainedSessionValidated?i.aNwp.eventDoneInLT?void i.vYAT("Event done in life time"):i.wdlK.userAttributesValidated?i.wdlK.sessionAttributeValidated?i.kTyF._not_in_specified_time?void i.vYAT("Time limits check failed"):i.kTyF._not_yet_active?void i.vYAT("not in the scheduled time"):i.kTyF._nudge_expired?void i.vYAT("nudge expired"):void 0:void i.vYAT("Session property filter not met"):void i.vYAT("User property filter not met"):void i.vYAT("User session criteria not met"):void i.vYAT("Retained day criteria not met");var u=i.TbxE.length,l=u<1,c="";0===u&&(l=!0);for(var d=0;d<u;d++){var v=i.TbxE[d],f=v.KUlF;if(""===c.trim())l=f;else switch(c){case"AND":l=l&&f;break;case"OR":l=l||f}c=v.ZdyA}if(!0===o&&(l=!0),l){if(console.debug("onCondition satisfied"),!i.tsTs.tiom(i.tkvH)){if(console.warn("Maximum limit reached",i.tkvH),t.getController().isTestDevice()){O("Maximum limit reached for campaign name ".concat(i.FaOX.FiDT));var h=document.getElementById("close-button"),g=function(){var t=document.getElementById("apx-container");null==t||t.remove()};null==h||h.addEventListener("click",g),window.setTimeout(g,2e4)}return}console.log("Dispatching event",i.FaOX.WBXT),t.logEvent("apx_context_evaluated",n(n({apx_nudge_type:"SURVEY"===i.FaOX.WBXT?"survey":"campaign",apx_nudge_id:i.tkvH,apx_nudge_name:i.FaOX.FiDT,apx_variant_code:i.FaOX._isExperiment||i.FaOX._only_context?i.FaOX._attr.apx_variant_code:"TG"},i.FaOX._attr),{},{message_name:i.FaOX.FiDT,id:i.tkvH})),t.getController().dispatchEvent(i.FaOX.WBXT,{name:i.FaOX.WBXT,additional_info:{uuid:i.tkvH,name:i.FaOX.FiDT}})}})),s(this,"PXuU",(function(){for(var e=i.oJYY.length,r=e<1,o="",a=0;a<e;a++){var s=i.oJYY[a],u=s.KUlF;if(""===o.trim())r=u;else switch(o){case"AND":r=r&&u;break;case"OR":r=r||u}o=s.seqy}r&&(console.log("Dispatching event",i.FaOX.WBXT),t.getController().persistTerminationInfoLocally(i.tkvH),!0===i.FaOX._only_context&&t.logEvent("apx_context_evaluated",n(n({},i.FaOX._attr),{},{message_name:i.FaOX.FiDT,id:i.tkvH})),t.getController().dispatchEvent(i.FaOX.WBXT,{name:i.FaOX.WBXT,additional_info:{uuid:i.tkvH,name:i.FaOX.FiDT}}))})),s(this,"validateForTerminationAttributes",(function(){var e=t.getController().getUserAttributes(),n=t.getController().getSessionAttributes();return i.smLy.validate(e,n)})),s(this,"hJWa",(function(){i.tsTs.hJWa()})),s(this,"getFrequencyCount",(function(){return i.tsTs.getFrequencyCount()})),s(this,"KlBp",(function(){return i.tsTs.Hhtv()})),s(this,"vYAT",(function(e){var n;null==t||t.logEvent("apx_non_eligible_user",{apx_nudge_type:"SURVEY"===i.FaOX.WBXT?"survey":"campaign",apx_nudge_id:i.tkvH,apx_nudge_name:i.FaOX.FiDT,apx_variant_code:i.FaOX._isExperiment||i.FaOX._only_context?null===(n=i.FaOX._attr)||void 0===n?void 0:n.apx_variant_code:"TG",apx_failure_type:"warn",apx_reason:e})}))})),tt=a((function t(){var e=this;r(this,t),s(this,"UGOI",{}),s(this,"parse",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{configs:[]};if(v(t)&&v(t.configs)){var n=t.configs;if(!Array.isArray(n))return;n.sort((function(t,e){var n,i;return(null!==(n=t.prio)&&void 0!==n?n:-1)-(null!==(i=e.prio)&&void 0!==i?i:-1)}));for(var i=0;i<n.length;i++){var r=n[i],o=r._id,a=new $;a.parse(r)?e.UGOI[o]=a:console.warn("Failed to parse cfg",o)}}})),s(this,"validate",(function(t,n){e.UGOI[t]&&e.UGOI[t].WTJq(n)})),s(this,"getVariantCode",(function(t){return e.UGOI[t]?e.UGOI[t]._variant_code:""})),s(this,"validateForTermination",(function(t,n){e.UGOI[t]&&e.UGOI[t].zTfD(n)})),s(this,"validateForTerminationAttributes",(function(t){return!!e.UGOI[t]&&e.UGOI[t].validateForTerminationAttributes()})),s(this,"hJWa",(function(t){e.UGOI[t].hJWa()})),s(this,"getFrequencyCount",(function(t){var n=e.UGOI[t];if(null!=n)return n.getFrequencyCount()})),s(this,"resetFrequencyCounts",(function(){var t=e.UGOI;for(var n in t)t[n].KlBp()})),s(this,"ZNQa",(function(t){try{if(e.UGOI){var n=e.UGOI[t];if(n&&n.FaOX)return n.FaOX}}catch(t){console.log("Error in getting the campaign meta ".concat(t))}return{}}))})),et=window.ApxorLogger,nt=a((function e(){var n=this;r(this,e),s(this,"kUGk",{}),s(this,"OKHG",[]),s(this,"oTBy",!1),s(this,"initialize",(function(){var e=t.getController();e.registerForEvent("APP_EVENT",(function(t){return n.bhnD(t,"AE")})),e.registerForEvent("CLIENT_EVENT",(function(t){return n.bhnD(t,"CE")}))})),s(this,"JJQh",(function(){for(var t in n.OKHG)n.sFoD(t.event,t.key,t.type);n.oTBy=!0})),s(this,"vWFx",(function(t,e){var i;"function"==typeof e&&((i=n.kUGk[t]?n.kUGk[t]:[]).push(e),n.kUGk[t]=i,et.debug("Listeners list: ",n.kUGk))})),s(this,"unregisterFromEvent",(function(t,e){if(n.kUGk[t]){for(var i=n.kUGk[t],r=[],o=0;o<i.length;o++){var a=i[o];a!==e&&r.push(a)}n.kUGk[t]=r}})),s(this,"bhnD",(function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"AE",i=e+"___"+t.name;n.sFoD(t,i,e)})),s(this,"sFoD",(function(e,i,r){if(n.oTBy){if(et.debug("Notifying listeners for event: "+e+", "+i,n.kUGk),n.kUGk[i])for(var o=n.kUGk[i],a=t.getController().getSDKRunningTimeInSec(),s=0;s<o.length;s++){(0,o[s])(r,e.name,a,e.additional_info)}}else n.OKHG.push({event:e,key:i,type:r})}))})),it=window.ApxorLogger,rt=function(){function e(){var n=this;return r(this,e),s(this,"UnLY",!1),s(this,"sqeD",null),s(this,"OmCk",b()),s(this,"ymVO",new nt),s(this,"looJ",t.getSiteId()),s(this,"QmXA",{}),s(this,"getQeState",(function(){try{var e=t.getController().getFromStorage("qe_state");return e?JSON.parse(g(n.looJ,e)):(n.QmXA={},n.setQeState())}catch(t){return n.QmXA={},n.setQeState()}})),s(this,"setQeState",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{t.getController().persistToStorage("qe_state",n.QmXA,!0)}catch(i){""===e?n.QmXA={}:n.QmXA[e]={SESSION:0,OVERALL:0,DATES:{}},t.getController().persistToStorage("qe_state",n.QmXA,!0)}return n.QmXA})),s(this,"initialize",(function(){n.UnLY||(n.UnLY=!0,n.sqeD=new tt,n.ymVO.initialize(),n.QmXA=n.getQeState(),it.info("QE Initialized.."))})),s(this,"parse",(function(t){n.pHuQ()?(n.sqeD.parse(t),n.ymVO.JJQh()):it.warn("Must call init first. Unable to proceed")})),s(this,"validate",(function(t,e){n.pHuQ()&&n.sqeD.validate(t,e)})),s(this,"getVariantCode",(function(t){return n.sqeD.getVariantCode(t)})),s(this,"validateForTermination",(function(t,e){n.pHuQ()&&n.sqeD.validateForTermination(t,e)})),s(this,"validateForTerminationAttributes",(function(t,e){return n.sqeD.validateForTerminationAttributes(t,e)})),s(this,"updateCount",(function(t){try{v(n.QmXA[t])||n.createObjConfig(t),n.incrementFrequencies(t),n.setQeState(t),n.sqeD.hJWa(t)}catch(t){console.log("Could not update the count config:".concat(t))}})),s(this,"resetFrequencyCounts",(function(){n.sqeD.resetFrequencyCounts()})),s(this,"getFrequencyCount",(function(t){return n.sqeD.getFrequencyCount(t)})),s(this,"registerForEvent",(function(t,e){n.ymVO.vWFx(t,e)})),s(this,"unregisterFromEvent",(function(t,e){n.ymVO.unregisterFromEvent(t,e)})),s(this,"notifyEventListener",(function(t){n.ymVO.bhnD(t)})),s(this,"fetch",(function(e,n,i,r){t.getController().fetchConfiguration(e,n,i,r)})),s(this,"pHuQ",(function(){return n.UnLY})),s(this,"getCampaignMetaFromQueryEngine",(function(t){return n.sqeD.ZNQa(t)})),s(this,"cLOV",(function(){return n.OmCk})),e.instance||(e.instance=this),e.instance}return a(e,[{key:"createObjConfig",value:function(t){try{this.QmXA=this.getQeState(),v(this.QmXA[t])||(this.QmXA[t]={SESSION:0,OVERALL:0,DATES:{}},this.OmCk&&(this.QmXA[t].DATES[this.OmCk]=0),this.setQeState(t))}catch(t){it.error("Can not create the frequency count object:"+t)}}},{key:"incrementFrequencies",value:function(t){this.QmXA=this.getQeState();var e=this.QmXA[t];e.SESSION=e.SESSION+1,e.OVERALL=e.OVERALL+1;var n=b();n===this.OmCk&&e.DATES&&e.DATES[n]||(this.OmCk=n,e.DATES={},e.DATES[this.OmCk]=0),e.DATES[this.OmCk]=e.DATES[this.OmCk]+1}}],[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}]),e}();s(rt,"instance",void 0),window.ceVersion=180;try{void 0===exports&&null===exports||(exports.default=rt,module.exports=exports.default)}catch(t){}return rt}));
|
package/package.json
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apxor-qe",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"author": "
|
|
3
|
+
"version": "1.8.0",
|
|
4
|
+
"author": "Ravi Teja Akella <ravi.akella@apxor.com> (https://www.apxor.com)",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
7
|
-
"name": "
|
|
8
|
-
"email": "
|
|
7
|
+
"name": "Raavi Venkata Sai Chaitanya",
|
|
8
|
+
"email": "saichaitanya.raavi@apxor.com",
|
|
9
|
+
"url": "https://www.apxor.com"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "Gautham Gokulakonda",
|
|
13
|
+
"email": "gautham.gokulakonda@apxor.com",
|
|
14
|
+
"url": "https://www.apxor.com"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "Taraka Swathi",
|
|
18
|
+
"email": "tarakaswathi.singamsetti@apxor.com",
|
|
19
|
+
"url": "https://www.apxor.com"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "Rahul SriRam",
|
|
23
|
+
"email": "rahul.kocherlakota@apxor.com",
|
|
9
24
|
"url": "https://www.apxor.com"
|
|
10
25
|
}
|
|
11
26
|
],
|
|
@@ -52,8 +67,13 @@
|
|
|
52
67
|
},
|
|
53
68
|
"dependencies": {
|
|
54
69
|
"jsdom": "^22.1.0",
|
|
55
|
-
"apxor": "2.
|
|
70
|
+
"apxor": "2.7.0"
|
|
71
|
+
},
|
|
72
|
+
"engines": {
|
|
73
|
+
"pnpm": ">=8",
|
|
74
|
+
"node": ">=20"
|
|
56
75
|
},
|
|
76
|
+
"packageManager": "pnpm@9.3.0",
|
|
57
77
|
"files": [
|
|
58
78
|
"dist"
|
|
59
79
|
],
|