apxor-qe 1.6.0 → 1.6.1-qa.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.
@@ -112,6 +112,7 @@
112
112
  return typeof key === "symbol" ? key : String(key);
113
113
  }
114
114
 
115
+ var Logger = window.ApxorLogger;
115
116
  var isUndefined = function isUndefined(term) {
116
117
  return typeof term === "undefined";
117
118
  };
@@ -207,7 +208,7 @@
207
208
  var toUpperCase = function toUpperCase(key) {
208
209
  return key.toUpperCase();
209
210
  };
210
- var zJVe = function zJVe(actual, expected, operator) {
211
+ var bptN = function bptN(actual, expected, operator) {
211
212
  switch (operator) {
212
213
  case "EQ":
213
214
  return actual === expected;
@@ -263,39 +264,243 @@
263
264
  mins: currentTime.getMinutes()
264
265
  };
265
266
  };
267
+ var _doesUrlMatchSkeleton = function _doesUrlMatchSkeleton(currenturl, skeleton, variable) {
268
+ var startsWith = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
269
+ var variablePattern = "([^/]+)";
270
+ var escapedVariable = variable ?
271
+ // eslint-disable-next-line no-useless-escape
272
+ variable.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&") : "";
273
+ var pattern = skeleton.replace(new RegExp(escapedVariable, "g"), variablePattern);
274
+ // Adjust regex based on startsWith
275
+ var regex = new RegExp("^".concat(pattern) + (startsWith ? "" : "$"));
276
+ var match = currenturl.match(regex);
277
+ return match !== null;
278
+ };
266
279
 
267
- var Logger = window.ApxorLogger;
280
+ // Checks if the given element is in viewport or not.
281
+ var isElementInViewport = function isElementInViewport(el) {
282
+ var elementOffsetHight = el.offsetHeight;
283
+ var elementOffsetWidth = el.offsetWidth;
284
+ var boundingRect = el.getBoundingClientRect();
285
+ if (boundingRect.left >= -elementOffsetWidth && boundingRect.top >= -elementOffsetHight && boundingRect.right <= (window.innerWidth || document.documentElement.clientWidth) + elementOffsetWidth && boundingRect.bottom <= (window.innerHeight || document.documentElement.clientHeight) + elementOffsetHight) {
286
+ return true;
287
+ } else {
288
+ return false;
289
+ }
290
+ };
291
+
292
+ /**
293
+ * @function _findTargetElement
294
+ * @private
295
+ * @description Finds the target element in the DOM.
296
+ * @param {function} targetFoundCallback
297
+ */
298
+ function _findTargetElement(id) {
299
+ var frame_id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
300
+ var enable_retry = arguments.length > 2 ? arguments[2] : undefined;
301
+ var interval = arguments.length > 3 ? arguments[3] : undefined;
302
+ var max_retries = arguments.length > 4 ? arguments[4] : undefined;
303
+ var targetElement = getElementFromSelector(id, frame_id);
304
+ if (!targetElement) {
305
+ if (enable_retry) {
306
+ Logger.info("Not found yet. Rechecking the DOM.");
307
+ return _retryFindingTargetElement(max_retries, interval, id, frame_id);
308
+ } else {
309
+ Logger.info("Element with selector:".concat(id, " not found."));
310
+ return false;
311
+ }
312
+ } else {
313
+ var targetFoundCallback = function targetFoundCallback() {
314
+ var isElementVisible = _isElementVisible(targetElement);
315
+ if (isElementVisible) {
316
+ // Attch a click callback to the target. If the target dismiss config is true, it will dismiss the tooltip
317
+ // let targetClickCallback = this._targetClickCallback.bind(this);
318
+ // this.targetElement.addEventListener("click", targetClickCallback);
319
+ var targetValidCallback = function targetValidCallback(targetElement) {
320
+ //Once the target is found then scroll into it.
321
+ return _scrollIntoTargetIfNeeded(targetElement);
322
+ };
323
+ return targetValidCallback(targetElement);
324
+ } else {
325
+ Logger.info("Invalid target element. Width and height are 0 for element: ".concat(id, ". Can't show tooltip"));
326
+ return false;
327
+ //_resetRTMAction();
328
+ }
329
+ };
330
+
331
+ return targetFoundCallback();
332
+ }
333
+ }
334
+
335
+ /**
336
+ * @function _retryFindingTargetElement
337
+ * @private
338
+ * @description Continuously rechecks the DOM for the target element after every retry_interval.
339
+ * Maximum times it checks is configured through max_retries
340
+ * @param {function} targetFoundCallback
341
+ */
342
+ function _retryFindingTargetElement(max_retries, interval, id) {
343
+ var frame_id = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "";
344
+ //After every find_interval check the DOM for target element.
345
+ var elementRecheckIntervalId = setInterval(function () {
346
+ var targetElement = getElementFromSelector(id, frame_id);
347
+ //If the element is found, stop checking the DOM.
348
+ if (targetElement) {
349
+ clearInterval(elementRecheckIntervalId);
350
+ var targetFoundCallback = function targetFoundCallback() {
351
+ var isElementVisible = _isElementVisible();
352
+ if (isElementVisible) {
353
+ // Attch a click callback to the target. If the target dismiss config is true, it will dismiss the tooltip
354
+ // let targetClickCallback = this._targetClickCallback.bind(this);
355
+ // this.targetElement.addEventListener("click", targetClickCallback);
356
+ var targetValidCallback = function targetValidCallback() {
357
+ //Once the target is found then scroll into it.
358
+ _scrollIntoTargetIfNeeded();
359
+ };
360
+ targetValidCallback();
361
+ } else {
362
+ Logger.info("Invalid target element. Width and height are 0 for element: ".concat(id, ". Can't show tooltip"));
363
+ //this._resetRTMAction();
364
+ }
365
+ };
366
+
367
+ targetFoundCallback(targetElement);
368
+ } else {
369
+ max_retries = max_retries - 1;
370
+ // If the element is not found even after max interval, stop checking
371
+ if (max_retries <= 0) {
372
+ clearInterval(elementRecheckIntervalId);
373
+ console.warn("Element with selector:".concat(id, " not found."));
374
+ //this._resetRTMAction();
375
+ }
376
+ }
377
+ }, interval);
378
+ }
379
+
380
+ /**
381
+ * @function getElementFromSelector
382
+ * @description Finds the element in DOM for a given selector. Selector can be an ID, or any css selector. It can also be an XPath.
383
+ * @param {string} selector
384
+ * @returns {HTMLElement} Returns the HTML element that matches the given selector
385
+ */
386
+ var getElementFromSelector = function getElementFromSelector(selector) {
387
+ var iframe_id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
388
+ // Given selector can be an ID.
389
+ var element = document.getElementById(selector);
390
+ if (!element) {
391
+ try {
392
+ element = document.querySelector(selector);
393
+ } catch (e) {
394
+ //If there is an exception, it means it is not a valid selector.
395
+ window.ApxorLogger.error("Error finding element in DOM:" + e);
396
+ }
397
+ }
398
+ // If no element is found till now, it means it is neither an ID nor a valid css selector. It could be an XPath.
399
+ if (!element) {
400
+ element = getElementByXPath(selector);
401
+ }
402
+
403
+ // If no element is found, it means the selector is not an ID. It could be a css selector
404
+ if (!element && iframe_id.length > 0) {
405
+ var _document$getElementB;
406
+ element = (_document$getElementB = document.getElementById(iframe_id)) === null || _document$getElementB === void 0 || (_document$getElementB = _document$getElementB.contentWindow) === null || _document$getElementB === void 0 || (_document$getElementB = _document$getElementB.document) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.querySelector(selector);
407
+ }
408
+ return element;
409
+ };
410
+ var getElementByXPath = function getElementByXPath(path) {
411
+ var index = path.indexOf("svg");
412
+ if (index !== -1) {
413
+ path = path.substring(0, index) + "svg:svg";
414
+ }
415
+ try {
416
+ return document.iHps(path, document, function (prefix) {
417
+ if (prefix === "svg") {
418
+ return "http://www.w3.org/2000/svg";
419
+ } else {
420
+ return null;
421
+ }
422
+ }, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
423
+ } catch (e) {
424
+ window.ApxorLogger.error("Error finding element in DOM:" + e);
425
+ }
426
+ return null;
427
+ };
428
+
429
+ /**
430
+ * @function _isElementVisible
431
+ * @private
432
+ * @description Checks if the element has a visible height and width
433
+ * @returns {boolean} true - If element is visible
434
+ * false - If the element is not visible
435
+ */
436
+ function _isElementVisible(targetElement) {
437
+ try {
438
+ var rect = targetElement.getBoundingClientRect();
439
+ if (rect.width === 0 || rect.height === 0) {
440
+ return false;
441
+ }
442
+ } catch (e) {
443
+ return false;
444
+ }
445
+ return true;
446
+ }
447
+
448
+ /**
449
+ * @function _scrollIntoTargetIfNeeded
450
+ * @private
451
+ * @description Scrolls into the target element if needed.
452
+ * @param {function} targetReachedCallback
453
+ */
454
+ function _scrollIntoTargetIfNeeded(targetElement) {
455
+ var isTargetInViewPort = isElementInViewport(targetElement);
456
+ // If the element is not in the viewport. scroll into the target element only if the config says so.
457
+ if (isTargetInViewPort) {
458
+ return true;
459
+ } else {
460
+ return false;
461
+ }
462
+ }
463
+ var feedBackMessagePopUpCE = function feedBackMessagePopUpCE(message) {
464
+ var feedbackModal = "\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(message, "</div></div>\n </div>\n ");
465
+ var feedbackParentDiv = document.createElement("div");
466
+ feedbackParentDiv.style = "\n z-index:99999999;\n background:#16202f;\n position:fixed;\n top:1%;\n right:1%;\n border-radius: 12px;\n ";
467
+ feedbackParentDiv.innerHTML = feedbackModal;
468
+ feedbackParentDiv.id = "apx-container";
469
+ document.body.appendChild(feedbackParentDiv);
470
+ };
471
+
472
+ var Logger$1 = window.ApxorLogger;
268
473
  var Audience = /*#__PURE__*/_createClass(function Audience() {
269
474
  var _this = this;
270
475
  _classCallCheck(this, Audience);
271
- _defineProperty(this, "FQLi", "ALL");
272
- _defineProperty(this, "PrKM", []);
273
- _defineProperty(this, "vvVn", []);
476
+ _defineProperty(this, "ARue", "ALL");
477
+ _defineProperty(this, "LpbY", []);
478
+ _defineProperty(this, "Hlto", []);
274
479
  _defineProperty(this, "userAttributesValidated", true);
275
480
  _defineProperty(this, "sessionAttributeValidated", true);
276
481
  _defineProperty(this, "parse", function () {
277
482
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
278
483
  try {
279
- _this.FQLi = config.audience.audience_type;
280
- _this.PrKM = config.audience.attributes.user;
281
- _this.vvVn = config.audience.attributes.session;
282
- if (!Array.isArray(_this.PrKM) || !Array.isArray(_this.vvVn)) {
283
- Logger.error("No attributes");
484
+ _this.ARue = config.audience.audience_type;
485
+ _this.LpbY = config.audience.attributes.user;
486
+ _this.Hlto = config.audience.attributes.session;
487
+ if (!Array.isArray(_this.LpbY) || !Array.isArray(_this.Hlto)) {
488
+ Logger$1.error("No attributes");
284
489
  return false;
285
490
  }
286
491
  } catch (error) {
287
- Logger.error(error);
492
+ Logger$1.error(error);
288
493
  return false;
289
494
  }
290
495
  return true;
291
496
  });
292
497
  _defineProperty(this, "validate", function (user, session) {
293
498
  var status = true;
294
- if (_this.FQLi === "FTU") {
499
+ if (_this.ARue === "FTU") {
295
500
  status = Apxor.getController().getSessionInfo().is_first_session;
296
501
  }
297
- var userAttributesCompare = _this.MTJF(user, _this.PrKM);
298
- var sessionAttributesCompare = _this.MTJF(session, _this.vvVn);
502
+ var userAttributesCompare = _this.asXO(user, _this.LpbY);
503
+ var sessionAttributesCompare = _this.asXO(session, _this.Hlto);
299
504
  if (!userAttributesCompare) {
300
505
  _this.userAttributesValidated = false;
301
506
  }
@@ -304,7 +509,7 @@
304
509
  }
305
510
  return status && userAttributesCompare && sessionAttributesCompare;
306
511
  });
307
- _defineProperty(this, "MTJF", function (attributes, expected) {
512
+ _defineProperty(this, "asXO", function (attributes, expected) {
308
513
  var length = expected.length;
309
514
  var status = true;
310
515
  try {
@@ -352,7 +557,7 @@
352
557
  } else if (type === "b") {
353
558
  loggedValue = !!loggedValue;
354
559
  }
355
- return zJVe(loggedValue, configValue, operator);
560
+ return bptN(loggedValue, configValue, operator);
356
561
  });
357
562
  });
358
563
  status = status && match;
@@ -363,83 +568,98 @@
363
568
  if (_ret) return _ret.v;
364
569
  }
365
570
  } catch (error) {
366
- Logger.error(error);
571
+ Logger$1.error(error);
367
572
  status = false;
368
573
  }
369
574
  return status;
370
575
  });
371
576
  });
372
577
 
373
- var Logger$1 = window.ApxorLogger;
578
+ var QE_STATE = "qe_state";
579
+ var APX_RETAINED_SESSIONS = "apx_retained_session";
580
+ var APX_RETAINED_DAYS = "apx_retained_days";
581
+ var APX_CONTEXT_EVALUATED = "apx_context_evaluated";
582
+ var APX_VARIANT_CODE = "apx_variant_code";
583
+
584
+ var Logger$2 = window.ApxorLogger;
374
585
  var Frequency = /*#__PURE__*/_createClass(function Frequency() {
375
586
  var _this = this;
376
587
  _classCallCheck(this, Frequency);
377
- _defineProperty(this, "xHSD", 0);
378
- _defineProperty(this, "hKvz", 0);
379
- _defineProperty(this, "cDOC", "SESSION");
380
- _defineProperty(this, "efHR", 0);
381
- _defineProperty(this, "QRcg", 0);
382
- _defineProperty(this, "ahkX", 0);
588
+ _defineProperty(this, "gJSN", 0);
589
+ _defineProperty(this, "XtEG", 0);
590
+ _defineProperty(this, "lrki", "SESSION");
591
+ _defineProperty(this, "pTMN", 0);
592
+ _defineProperty(this, "rzbk", 0);
593
+ _defineProperty(this, "GsAb", 0);
383
594
  _defineProperty(this, "parse", function () {
384
595
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
385
596
  try {
386
- _this.xHSD = config.frequency.count;
387
- if (_this.xHSD === -1) {
388
- _this.xHSD = 1000;
389
- }
390
- _this.ahkX = _this.xHSD;
391
- _this.hKvz = config.frequency.time_interval;
392
- _this.cDOC = config.frequency.validity;
393
- _this.QRcg = config.frequency.ses_lmt;
597
+ _this.ltQf = config._id;
598
+ _this.liLD = config.meta;
599
+ _this.gJSN = config.frequency.count;
600
+ if (_this.gJSN === -1) {
601
+ _this.gJSN = 1000;
602
+ }
603
+ _this.GsAb = _this.gJSN;
604
+ _this.XtEG = config.frequency.time_interval;
605
+ _this.lrki = config.frequency.validity;
606
+ _this.rzbk = config.frequency.ses_lmt;
394
607
  _this._dayCount = config.frequency.day_lmt;
395
608
  // let data = Apxor.getController().getFromStorage(QE_STATE);
396
609
  // let qe_state = JSON.parse(decode(Apxor.getSiteId(), data));
397
610
  var qe_state = CE.getInstance().getQeState();
398
611
  if (!isDefined(qe_state) || !isDefined(qe_state[config._id])) return true;
399
- if (_this.cDOC === "SESSION") {
400
- _this.xHSD = parseInt(_this.xHSD) - parseInt(qe_state[config._id]["SESSION"]);
401
- if (_this.xHSD <= 0) {
612
+ if (_this.lrki === "SESSION") {
613
+ _this.gJSN = parseInt(_this.gJSN) - parseInt(qe_state[config._id]["SESSION"]);
614
+ if (_this.gJSN <= 0) {
615
+ _this.zMgT("Session limit reached");
402
616
  console.warn("Max count limit reached for session:" + config._id);
403
617
  return false;
404
618
  }
405
- } else if (_this.cDOC === "OVERALL") {
406
- _this.xHSD = parseInt(_this.xHSD) - parseInt(qe_state[config._id]["OVERALL"]);
407
- if (_this.xHSD <= 0) {
619
+ } else if (_this.lrki === "OVERALL") {
620
+ _this.gJSN = parseInt(_this.gJSN) - parseInt(qe_state[config._id]["OVERALL"]);
621
+ if (_this.gJSN <= 0) {
622
+ _this.zMgT("Overall limit reached");
408
623
  console.warn("Max count limit reached for overall:" + config._id);
409
624
  return false;
410
625
  }
411
626
  } else {
412
- Logger$1.info("Invalid config.");
627
+ Logger$2.info("Invalid config.");
413
628
  return false;
414
629
  }
415
630
  } catch (error) {
416
- Logger$1.error(error);
631
+ Logger$2.error(error);
417
632
  return false;
418
633
  }
419
634
  return true;
420
635
  });
421
- _defineProperty(this, "fcGL", function () {
422
- _this.xHSD = _this.xHSD - 1;
636
+ _defineProperty(this, "GDwW", function () {
637
+ _this.gJSN = _this.gJSN - 1;
423
638
  });
424
639
  _defineProperty(this, "getFrequencyCount", function () {
425
- return _this.xHSD;
640
+ return _this.gJSN;
426
641
  });
427
- _defineProperty(this, "bUYG", function () {
428
- if (_this.cDOC === "SESSION") {
429
- _this.xHSD = _this.ahkX;
430
- Logger$1.info("Campaign Limit reset");
642
+ _defineProperty(this, "MYCG", function () {
643
+ if (_this.lrki === "SESSION") {
644
+ _this.gJSN = _this.GsAb;
645
+ Logger$2.info("Campaign Limit reset");
431
646
  }
432
647
  });
433
648
  /**
434
- * @function KeXl
649
+ * @function gbnE
435
650
  * @description Validates if the campaign count is with in the limits set in the config.
436
651
  * @param {string} Config id
437
652
  * @returns {boolean} true - If the Campaign limits are not reached
438
653
  * false - Otherwise
439
654
  */
440
- _defineProperty(this, "KeXl", function (id) {
655
+ _defineProperty(this, "gbnE", function (id) {
441
656
  try {
442
- if (_this.xHSD <= 0) {
657
+ if (_this.gJSN <= 0) {
658
+ if (_this.lrki === "OVERALL") {
659
+ _this.zMgT("Overall limit reached");
660
+ } else if (_this.lrki === "SESSION") {
661
+ _this.zMgT("Session limit reached");
662
+ }
443
663
  return false;
444
664
  }
445
665
 
@@ -450,10 +670,11 @@
450
670
  if (!isDefined(qe_state) || !isDefined(qe_state[id])) return true;
451
671
 
452
672
  //If the config has a session count limit set
453
- if (_this.QRcg !== 0) {
454
- var sessionCountInConfig = parseInt(_this.QRcg);
673
+ if (_this.rzbk !== 0) {
674
+ var sessionCountInConfig = parseInt(_this.rzbk);
455
675
  var thisSessionCount = parseInt(qe_state[id]["SESSION"]);
456
676
  if (sessionCountInConfig - thisSessionCount <= 0) {
677
+ _this.zMgT("Session limit reached");
457
678
  return false;
458
679
  }
459
680
  }
@@ -465,27 +686,40 @@
465
686
  var dayCountInConfig = parseInt(_this._dayCount);
466
687
  var thisDayCount = parseInt(((_qe_state$id = qe_state[id]) === null || _qe_state$id === void 0 ? void 0 : _qe_state$id.DATES[date]) || 0);
467
688
  if (dayCountInConfig - thisDayCount <= 0) {
689
+ _this.zMgT("Day limit reached");
468
690
  return false;
469
691
  }
470
692
  }
471
693
  } catch (e) {
472
- Logger$1.error("Error validating the frequency:" + e);
694
+ _this.zMgT("Error validating the frequency: ".concat(e));
695
+ Logger$2.error("Error validating the frequency:" + e);
473
696
  }
474
697
  return true;
475
698
  });
699
+ _defineProperty(this, "zMgT", function (reason) {
700
+ var _this$liLD$attr;
701
+ Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_non_eligible_user", {
702
+ apx_nudge_type: _this.liLD.type === "SURVEY" ? "survey" : "campaign",
703
+ apx_nudge_id: _this.ltQf,
704
+ apx_nudge_name: _this.liLD.name,
705
+ apx_variant_code: _this.liLD.isExperiment || _this.liLD.only_context ? (_this$liLD$attr = _this.liLD.attr) === null || _this$liLD$attr === void 0 ? void 0 : _this$liLD$attr[APX_VARIANT_CODE] : "TG",
706
+ apx_failure_type: "warn",
707
+ apx_reason: reason
708
+ });
709
+ });
476
710
  });
477
711
 
478
712
  var Meta = /*#__PURE__*/_createClass(function Meta() {
479
713
  var _this = this;
480
714
  _classCallCheck(this, Meta);
481
- _defineProperty(this, "oMsP", "");
482
- _defineProperty(this, "FQLi", "");
715
+ _defineProperty(this, "gNrp", "");
716
+ _defineProperty(this, "ARue", "");
483
717
  _defineProperty(this, "parse", function () {
484
718
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
485
719
  try {
486
720
  var _config$meta, _config$meta2;
487
- _this.oMsP = config.meta.name;
488
- _this.FQLi = config.meta.type;
721
+ _this.gNrp = config.meta.name;
722
+ _this.ARue = config.meta.type;
489
723
  _this._only_context = config.meta.only_context;
490
724
  _this._attr = ((_config$meta = config.meta) === null || _config$meta === void 0 ? void 0 : _config$meta.attr) || {};
491
725
  _this._isExperiment = (_config$meta2 = config.meta) === null || _config$meta2 === void 0 ? void 0 : _config$meta2.isExperiment;
@@ -497,53 +731,57 @@
497
731
  });
498
732
  });
499
733
 
500
- var Logger$2 = window.ApxorLogger;
734
+ var Logger$3 = window.ApxorLogger;
501
735
  var Validity = /*#__PURE__*/_createClass(function Validity() {
502
736
  var _this = this;
503
737
  _classCallCheck(this, Validity);
504
- _defineProperty(this, "WQuL", -1);
505
- _defineProperty(this, "nesV", -1);
506
- _defineProperty(this, "iBRX", -1);
507
- _defineProperty(this, "DrYp", -1);
508
- _defineProperty(this, "aquB", false);
738
+ _defineProperty(this, "Qnke", -1);
739
+ _defineProperty(this, "iLgX", -1);
740
+ _defineProperty(this, "EfLi", -1);
741
+ _defineProperty(this, "PpNt", -1);
742
+ _defineProperty(this, "VIcS", false);
509
743
  _defineProperty(this, "_nudge_expired", false);
510
744
  _defineProperty(this, "_not_yet_active", false);
745
+ _defineProperty(this, "_not_in_specified_time", false);
511
746
  _defineProperty(this, "parse", function () {
512
747
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
513
748
  try {
514
749
  if (isNaN(Date.parse(config.validity.start_date)) || isNaN(Date.parse(config.validity.end_date))) {
515
- Logger$2.error("Not valid dates");
750
+ Logger$3.error("Not valid dates");
516
751
  return false;
517
752
  }
518
- _this.WQuL = Date.parse(config.validity.start_date);
519
- _this.nesV = Date.parse(config.validity.end_date);
520
- if (isDefined(config.time_limits_in_day)) {
521
- _this.aquB = config.time_limits_in_day;
522
- if (_this.aquB && isDefined(config.time_limits)) {
753
+ _this.Qnke = Date.parse(config.validity.start_date);
754
+ _this.iLgX = Date.parse(config.validity.end_date);
755
+ if (isDefined(config.at_specific_time)) {
756
+ _this.VIcS = config.at_specific_time;
757
+ if (_this.VIcS && isDefined(config.time_limits)) {
523
758
  var currentDate = new Date().toISOString().split("T")[0];
524
- _this.iBRX = Date.parse(currentDate + "T" + config.time_limits.start_time + ".000Z");
525
- _this.DrYp = Date.parse(currentDate + "T" + config.time_limits.end_time + ".000Z");
759
+ _this.EfLi = Date.parse(currentDate + "T" + config.time_limits.start_time + ":00.000Z");
760
+ _this.PpNt = Date.parse(currentDate + "T" + config.time_limits.end_time + ":00.000Z");
526
761
 
527
762
  // If invalid format is passed, return false
528
- if (isNaN(_this.iBRX) || isNaN(_this.DrYp)) {
529
- Logger$2.error("Not valid times");
763
+ if (isNaN(_this.EfLi) || isNaN(_this.PpNt)) {
764
+ Logger$3.error("Not valid times");
530
765
  return false;
531
766
  }
532
767
  }
533
768
  }
534
769
  } catch (error) {
535
- Logger$2.error(error);
770
+ Logger$3.error(error);
536
771
  return false;
537
772
  }
538
773
  return true;
539
774
  });
540
775
  _defineProperty(this, "validate", function () {
541
776
  var currentTime = Date.now();
542
- if (currentTime > _this.WQuL && currentTime < _this.nesV) {
543
- return !_this.aquB || currentTime >= _this.iBRX && currentTime <= _this.DrYp;
544
- } else if (currentTime < _this.WQuL) {
777
+ if (currentTime > _this.Qnke && currentTime < _this.iLgX) {
778
+ if (_this.VIcS && !(currentTime >= _this.EfLi && currentTime <= _this.PpNt)) {
779
+ _this._not_in_specified_time = true;
780
+ }
781
+ return !_this.VIcS || currentTime >= _this.EfLi && currentTime <= _this.PpNt;
782
+ } else if (currentTime < _this.Qnke) {
545
783
  _this._not_yet_active = true;
546
- } else if (currentTime > _this.nesV) {
784
+ } else if (currentTime > _this.iLgX) {
547
785
  _this._nudge_expired = true;
548
786
  }
549
787
  return false;
@@ -553,13 +791,13 @@
553
791
  var Details = /*#__PURE__*/_createClass(function Details() {
554
792
  var _this = this;
555
793
  _classCallCheck(this, Details);
556
- _defineProperty(this, "oMsP", "");
557
- _defineProperty(this, "dkks", {});
794
+ _defineProperty(this, "gNrp", "");
795
+ _defineProperty(this, "PvVy", {});
558
796
  _defineProperty(this, "parse", function () {
559
797
  var details = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
560
798
  try {
561
- _this.oMsP = details.name;
562
- _this.dkks = details.additional_info;
799
+ _this.gNrp = details.name;
800
+ _this.PvVy = details.additional_info;
563
801
  } catch (error) {
564
802
  return false;
565
803
  }
@@ -570,14 +808,14 @@
570
808
  var Timebounds = /*#__PURE__*/_createClass(function Timebounds() {
571
809
  var _this = this;
572
810
  _classCallCheck(this, Timebounds);
573
- _defineProperty(this, "Awql", 0);
574
- _defineProperty(this, "AYIU", 0);
811
+ _defineProperty(this, "ejXF", 0);
812
+ _defineProperty(this, "dQza", 0);
575
813
  _defineProperty(this, "parse", function () {
576
814
  var timeBounds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
577
815
  try {
578
- _this.Awql = Number(timeBounds.lower);
579
- _this.AYIU = Number(timeBounds.upper);
580
- if (isNaN(_this.Awql) || isNaN(_this.AYIU)) {
816
+ _this.ejXF = Number(timeBounds.lower);
817
+ _this.dQza = Number(timeBounds.upper);
818
+ if (isNaN(_this.ejXF) || isNaN(_this.dQza)) {
581
819
  return false;
582
820
  }
583
821
  } catch (error) {
@@ -590,102 +828,102 @@
590
828
  var PreCondition = /*#__PURE__*/_createClass(function PreCondition() {
591
829
  var _this = this;
592
830
  _classCallCheck(this, PreCondition);
593
- _defineProperty(this, "zyyu", 0);
594
- _defineProperty(this, "NQWX", "");
595
- _defineProperty(this, "adGH", "");
596
- _defineProperty(this, "upqd", new Details());
597
- _defineProperty(this, "NkDv", new Timebounds());
831
+ _defineProperty(this, "OOcg", 0);
832
+ _defineProperty(this, "vmZw", "");
833
+ _defineProperty(this, "aKIq", "");
834
+ _defineProperty(this, "UhhO", new Details());
835
+ _defineProperty(this, "sMpO", new Timebounds());
598
836
  _defineProperty(this, "parse", function () {
599
837
  var precondition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
600
838
  try {
601
- _this.NQWX = precondition.event_type;
602
- _this.adGH = precondition.activity;
603
- return _this.upqd.parse(precondition.details) && _this.NkDv.parse(precondition.time_bounds);
839
+ _this.vmZw = precondition.event_type;
840
+ _this.aKIq = precondition.activity;
841
+ return _this.UhhO.parse(precondition.details) && _this.sMpO.parse(precondition.time_bounds);
604
842
  } catch (error) {
605
843
  return false;
606
844
  }
607
845
  });
608
846
  });
609
847
 
610
- var Logger$3 = window.ApxorLogger;
848
+ var Logger$4 = window.ApxorLogger;
611
849
  var Condition = /*#__PURE__*/_createClass(function Condition() {
612
850
  var _this = this;
613
851
  _classCallCheck(this, Condition);
614
- _defineProperty(this, "zyyu", 0);
615
- _defineProperty(this, "wiTa", -1);
616
- _defineProperty(this, "xHSD", 0);
617
- _defineProperty(this, "hNtx", "");
618
- _defineProperty(this, "adGH", "");
619
- _defineProperty(this, "NQWX", "");
620
- _defineProperty(this, "NkDv", new Timebounds());
621
- _defineProperty(this, "upqd", new Details());
622
- _defineProperty(this, "JUGy", new PreCondition());
623
- _defineProperty(this, "SaTl", "AND");
624
- _defineProperty(this, "RWTK", false);
625
- _defineProperty(this, "FQLi", void 0);
852
+ _defineProperty(this, "OOcg", 0);
853
+ _defineProperty(this, "Nixp", -1);
854
+ _defineProperty(this, "gJSN", 0);
855
+ _defineProperty(this, "zzjI", "");
856
+ _defineProperty(this, "aKIq", "");
857
+ _defineProperty(this, "vmZw", "");
858
+ _defineProperty(this, "sMpO", new Timebounds());
859
+ _defineProperty(this, "UhhO", new Details());
860
+ _defineProperty(this, "iBqE", new PreCondition());
861
+ _defineProperty(this, "mEtI", "AND");
862
+ _defineProperty(this, "xPfP", false);
863
+ _defineProperty(this, "ARue", void 0);
626
864
  _defineProperty(this, "parse", function () {
627
865
  var condition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
628
866
  try {
629
- _this.wiTa = condition.sequence;
630
- _this.xHSD = condition.count_config.count;
631
- _this.hNtx = condition.count_config.operator;
632
- _this.adGH = condition.activity;
633
- _this.NQWX = condition.event_type;
634
- _this.SaTl = condition.combine_operator;
635
- _this.FQLi = condition.type;
636
- return _this.upqd.parse(condition.details) && _this.JUGy.parse(condition.trigger) && _this.NkDv.parse(condition.time_bounds);
867
+ _this.Nixp = condition.sequence;
868
+ _this.gJSN = condition.count_config.count;
869
+ _this.zzjI = condition.count_config.operator;
870
+ _this.aKIq = condition.activity;
871
+ _this.vmZw = condition.event_type;
872
+ _this.mEtI = condition.combine_operator;
873
+ _this.ARue = condition.type;
874
+ return _this.UhhO.parse(condition.details) && _this.iBqE.parse(condition.trigger) && _this.sMpO.parse(condition.time_bounds);
637
875
  } catch (error) {
638
- Logger$3.error(error);
876
+ Logger$4.error(error);
639
877
  return false;
640
878
  }
641
879
  });
642
880
  });
643
881
 
644
- var Logger$4 = window.ApxorLogger;
882
+ var Logger$5 = window.ApxorLogger;
645
883
  var GoalEvent = /*#__PURE__*/_createClass(function GoalEvent() {
646
884
  var _this = this;
647
885
  _classCallCheck(this, GoalEvent);
648
- _defineProperty(this, "xHSD", 0);
649
- _defineProperty(this, "hNtx", "");
650
- _defineProperty(this, "NQWX", "");
651
- _defineProperty(this, "NkDv", new Timebounds());
652
- _defineProperty(this, "upqd", new Details());
653
- _defineProperty(this, "SaTl", "AND");
886
+ _defineProperty(this, "gJSN", 0);
887
+ _defineProperty(this, "zzjI", "");
888
+ _defineProperty(this, "vmZw", "");
889
+ _defineProperty(this, "sMpO", new Timebounds());
890
+ _defineProperty(this, "UhhO", new Details());
891
+ _defineProperty(this, "mEtI", "AND");
654
892
  _defineProperty(this, "parse", function (data) {
655
893
  try {
656
- _this.xHSD = data.count_config.count;
657
- _this.hNtx = data.count_config.operator;
658
- _this.NQWX = data.event_type;
659
- _this.SaTl = data.combine_operator;
660
- return _this.upqd.parse(data.details) && _this.NkDv.parse(data.time_bounds);
894
+ _this.gJSN = data.count_config.count;
895
+ _this.zzjI = data.count_config.operator;
896
+ _this.vmZw = data.event_type;
897
+ _this.mEtI = data.combine_operator;
898
+ return _this.UhhO.parse(data.details) && _this.sMpO.parse(data.time_bounds);
661
899
  } catch (error) {
662
- Logger$4.error(error);
900
+ Logger$5.error(error);
663
901
  return false;
664
902
  }
665
903
  });
666
904
  });
667
905
 
668
906
  /* eslint-disable no-unused-vars */
669
- var Logger$5 = window.ApxorLogger;
907
+ var Logger$6 = window.ApxorLogger;
670
908
  var ConditionValidator = /*#__PURE__*/function () {
671
909
  function ConditionValidator() {
672
910
  var _this = this;
673
911
  _classCallCheck(this, ConditionValidator);
674
- _defineProperty(this, "qHqZ", 0);
675
- _defineProperty(this, "HaKf", "");
676
- _defineProperty(this, "zaHz", new Condition());
677
- _defineProperty(this, "NeXy", new GoalEvent());
678
- _defineProperty(this, "vlIP", false);
679
- _defineProperty(this, "qTuv", false);
680
- _defineProperty(this, "qtnm", 0);
681
- _defineProperty(this, "SaTl", "AND");
682
- _defineProperty(this, "iFER", "OR");
683
- _defineProperty(this, "inbh", -1);
684
- _defineProperty(this, "ityk", []);
685
- _defineProperty(this, "zrSw", {});
686
- _defineProperty(this, "OeeL", false);
912
+ _defineProperty(this, "zfeU", 0);
913
+ _defineProperty(this, "ltQf", "");
914
+ _defineProperty(this, "LnyZ", new Condition());
915
+ _defineProperty(this, "gYxJ", new GoalEvent());
916
+ _defineProperty(this, "rrDQ", false);
917
+ _defineProperty(this, "kpHz", false);
918
+ _defineProperty(this, "yvsV", 0);
919
+ _defineProperty(this, "mEtI", "AND");
920
+ _defineProperty(this, "aCAW", "OR");
921
+ _defineProperty(this, "WXbt", -1);
922
+ _defineProperty(this, "jzCx", []);
923
+ _defineProperty(this, "uNrb", {});
924
+ _defineProperty(this, "WWDG", false);
687
925
  /**
688
- * If respectSequence is true, don't auto-WNgJ to events except for the condition whose index is 0
926
+ * If respectSequence is true, don't auto-kpoN to events except for the condition whose index is 0
689
927
  *
690
928
  * @param condition
691
929
  * @param type
@@ -701,191 +939,191 @@
701
939
  var respectSequence = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
702
940
  var noKpiArray = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
703
941
  var flag = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : "";
704
- _this.HaKf = id;
705
- _this.qtnm = index;
706
- _this.ityk = noKpiArray;
942
+ _this.ltQf = id;
943
+ _this.yvsV = index;
944
+ _this.jzCx = noKpiArray;
707
945
  if (flag !== "termination" || flag === "") {
708
- var result = _this.zaHz.parse(condition);
946
+ var result = _this.LnyZ.parse(condition);
709
947
  if (result) {
710
- _this.SaTl = _this.zaHz.SaTl;
948
+ _this.mEtI = _this.LnyZ.mEtI;
711
949
 
712
950
  // FIXME: Why this code is written? Don't see any usecase
713
- if (_this.zaHz.RWTK) {
714
- var eventName = _this.zaHz.upqd.oMsP;
951
+ if (_this.LnyZ.xPfP) {
952
+ var eventName = _this.LnyZ.UhhO.gNrp;
715
953
  if (eventName === "APX_PAGE_OPENED") {
716
- eventName = _this.zaHz.upqd.dkks["navigation_id"];
717
- eventName = isDefined(eventName) ? eventName : _this.zaHz.upqd.oMsP;
954
+ eventName = _this.LnyZ.UhhO.PvVy["navigation_id"];
955
+ eventName = isDefined(eventName) ? eventName : _this.LnyZ.UhhO.gNrp;
718
956
  }
719
- _this.inbh = Apxor.getController().getEventCount(eventName);
720
- var count = _this.zaHz.xHSD;
721
- var operator = _this.zaHz.hNtx;
722
- _this.qTuv = _this.vOLn(_this.inbh - 1, count, operator, false);
723
- _this.vlIP = _this.qTuv;
724
- // If the condition is already satisfied and if it is page view, no need to WNgJ
957
+ _this.WXbt = Apxor.getController().getEventCount(eventName);
958
+ var count = _this.LnyZ.gJSN;
959
+ var operator = _this.LnyZ.zzjI;
960
+ _this.kpHz = _this.WCWA(_this.WXbt - 1, count, operator, false);
961
+ _this.rrDQ = _this.kpHz;
962
+ // If the condition is already satisfied and if it is page view, no need to kpoN
725
963
  // This only applies for NAVIGATION_EVENTS
726
- if (_this.qTuv && _this.zaHz.upqd.oMsP === "APX_PAGE_OPENED") {
964
+ if (_this.kpHz && _this.LnyZ.UhhO.gNrp === "APX_PAGE_OPENED") {
727
965
  return true;
728
966
  }
729
967
  }
730
968
  if (!respectSequence || index === 0) {
731
- _this.WNgJ();
969
+ _this.kpoN();
732
970
  }
733
971
  return true;
734
972
  }
735
973
  } else {
736
- var _result = _this.NeXy.parse(condition);
737
- _this.iFER = _this.NeXy.SaTl;
738
- _this.EHwr();
974
+ var _result = _this.gYxJ.parse(condition);
975
+ _this.aCAW = _this.gYxJ.mEtI;
976
+ _this.maFW();
739
977
  return true;
740
978
  }
741
979
  return false;
742
980
  });
743
- _defineProperty(this, "WNgJ", function () {
981
+ _defineProperty(this, "kpoN", function () {
744
982
  var _window$ApxorRTM;
745
- var condition = _this.zaHz;
746
- var precondition = condition.JUGy;
983
+ var condition = _this.LnyZ;
984
+ var precondition = condition.iBqE;
747
985
  var ceInstance = CE.getInstance();
748
- if (precondition.NQWX === "app_start") {
749
- _this.vlIP = true;
750
- ceInstance.registerForEvent(generateKey(condition.NQWX) + "___" + condition.upqd.oMsP, _this.KgGJ);
986
+ if (precondition.vmZw === "app_start") {
987
+ _this.rrDQ = true;
988
+ ceInstance.registerForEvent(generateKey(condition.vmZw) + "___" + condition.UhhO.gNrp, _this.DTtA);
751
989
  } else {
752
- ceInstance.registerForEvent(generateKey(condition.NQWX) + "___" + precondition.upqd.oMsP, _this.KgGJ);
990
+ ceInstance.registerForEvent(generateKey(condition.vmZw) + "___" + precondition.UhhO.gNrp, _this.DTtA);
753
991
  }
754
- if ((_window$ApxorRTM = window.ApxorRTM) !== null && _window$ApxorRTM !== void 0 && _window$ApxorRTM.badgesLists.includes(_this.HaKf)) {
755
- ceInstance.registerForEvent(generateKey(condition.NQWX) + "___" + "apxor-badge-container-".concat("-".concat(_this.HaKf).replaceAll(" ", "").replace(/[^\w\s]/gi, "")), _this.KgGJ);
992
+ if ((_window$ApxorRTM = window.ApxorRTM) !== null && _window$ApxorRTM !== void 0 && _window$ApxorRTM.badgesLists.includes(_this.ltQf)) {
993
+ ceInstance.registerForEvent(generateKey(condition.vmZw) + "___" + "apxor-badge-container-".concat("-".concat(_this.ltQf).replaceAll(" ", "").replace(/[^\w\s]/gi, "")), _this.DTtA);
756
994
  }
757
995
  });
758
- _defineProperty(this, "EHwr", function () {
759
- var condition = _this.NeXy;
996
+ _defineProperty(this, "maFW", function () {
997
+ var condition = _this.gYxJ;
760
998
  var ceInstance = CE.getInstance();
761
- _this.vlIP = true;
762
- ceInstance.registerForEvent(generateKey(condition.NQWX) + "___" + condition.upqd.oMsP, _this.JdIY);
999
+ _this.rrDQ = true;
1000
+ ceInstance.registerForEvent(generateKey(condition.vmZw) + "___" + condition.UhhO.gNrp, _this.lTzm);
763
1001
  });
764
- _defineProperty(this, "ZJDs", function (type, name, time, additionalInfo) {
765
- var _this$zaHz;
1002
+ _defineProperty(this, "WPAT", function (type, name, time, additionalInfo) {
1003
+ var _this$LnyZ;
766
1004
  var eventTime = Date.now();
767
- var time_differnce = (eventTime - _this.zrSw[name]) / 1000;
768
- var time_fromConfig = ((_this$zaHz = _this.zaHz) === null || _this$zaHz === void 0 || (_this$zaHz = _this$zaHz.upqd) === null || _this$zaHz === void 0 || (_this$zaHz = _this$zaHz.dkks) === null || _this$zaHz === void 0 ? void 0 : _this$zaHz.time) / 1000;
1005
+ var time_differnce = (eventTime - _this.uNrb[name]) / 1000;
1006
+ var time_fromConfig = ((_this$LnyZ = _this.LnyZ) === null || _this$LnyZ === void 0 || (_this$LnyZ = _this$LnyZ.UhhO) === null || _this$LnyZ === void 0 || (_this$LnyZ = _this$LnyZ.PvVy) === null || _this$LnyZ === void 0 ? void 0 : _this$LnyZ.time) / 1000;
769
1007
  if (time_fromConfig > time_differnce) {
770
1008
  _this._displayCampaign(time);
771
1009
  }
772
1010
  });
773
- _defineProperty(this, "oBOr", function (type, name, time, additionalInfo) {
1011
+ _defineProperty(this, "TFdl", function (type, name, time, additionalInfo) {
774
1012
  var _this$_condition2, _this$_condition3;
775
- _this.OeeL = true;
1013
+ _this.WWDG = true;
776
1014
  var currentTime = Date.now();
777
- var eventName = (_this$_condition2 = _this.zaHz) === null || _this$_condition2 === void 0 || (_this$_condition2 = _this$_condition2.JUGy) === null || _this$_condition2 === void 0 ? void 0 : _this$_condition2.upqd.oMsP;
778
- var eventTime = _this.zrSw[eventName];
1015
+ var eventName = (_this$_condition2 = _this.LnyZ) === null || _this$_condition2 === void 0 || (_this$_condition2 = _this$_condition2.iBqE) === null || _this$_condition2 === void 0 ? void 0 : _this$_condition2.UhhO.gNrp;
1016
+ var eventTime = _this.uNrb[eventName];
779
1017
  var time_differnce = (currentTime - eventTime) / 1000;
780
- var time_fromConfig = (_this$_condition3 = _this.zaHz) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.upqd) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.dkks) === null || _this$_condition3 === void 0 ? void 0 : _this$_condition3.time;
1018
+ var time_fromConfig = (_this$_condition3 = _this.LnyZ) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.UhhO) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.PvVy) === null || _this$_condition3 === void 0 ? void 0 : _this$_condition3.time;
781
1019
  time_fromConfig = time_fromConfig / 1000;
782
1020
  if (time_fromConfig > time_differnce) {
783
1021
  _this._displayCampaign(time);
784
1022
  }
785
1023
  //unregister the event
786
1024
  });
787
- _defineProperty(this, "KgGJ", function (type, name, time, additionalInfo) {
1025
+ _defineProperty(this, "DTtA", function (type, name, time, additionalInfo) {
788
1026
  var _window$ApxorRTM2, _window$ApxorRTM3;
789
1027
  var ceInstance = CE.getInstance();
790
- if (!_this.vlIP) {
1028
+ if (!_this.rrDQ) {
791
1029
  // Validate Precondition
792
- _this.vlIP = _this.fCmr(type, name, time, additionalInfo);
793
- if (_this.vlIP) {
794
- var condition = _this.zaHz;
795
- var precondition = condition.JUGy;
796
- precondition.zyyu = time;
1030
+ _this.rrDQ = _this.LrmB(type, name, time, additionalInfo);
1031
+ if (_this.rrDQ) {
1032
+ var condition = _this.LnyZ;
1033
+ var precondition = condition.iBqE;
1034
+ precondition.OOcg = time;
797
1035
  //events will be registred by its type activity event_type: "activity_time"
798
- if ((condition === null || condition === void 0 ? void 0 : condition.NQWX) === "activity_time") {
799
- var zaHz$upqd, zaHz$_details2, zaHz$_details3;
800
- var event_time = condition === null || condition === void 0 || (zaHz$upqd = condition.upqd) === null || zaHz$upqd === void 0 || (zaHz$upqd = zaHz$upqd.dkks) === null || zaHz$upqd === void 0 ? void 0 : zaHz$upqd.time;
801
- if ((condition === null || condition === void 0 || (zaHz$_details2 = condition.upqd) === null || zaHz$_details2 === void 0 || (zaHz$_details2 = zaHz$_details2.dkks) === null || zaHz$_details2 === void 0 ? void 0 : zaHz$_details2.nkpi.length) > 0) {
1036
+ if ((condition === null || condition === void 0 ? void 0 : condition.vmZw) === "activity_time") {
1037
+ var LnyZ$UhhO, LnyZ$_details2, LnyZ$_details3;
1038
+ var event_time = condition === null || condition === void 0 || (LnyZ$UhhO = condition.UhhO) === null || LnyZ$UhhO === void 0 || (LnyZ$UhhO = LnyZ$UhhO.PvVy) === null || LnyZ$UhhO === void 0 ? void 0 : LnyZ$UhhO.time;
1039
+ if ((condition === null || condition === void 0 || (LnyZ$_details2 = condition.UhhO) === null || LnyZ$_details2 === void 0 || (LnyZ$_details2 = LnyZ$_details2.PvVy) === null || LnyZ$_details2 === void 0 ? void 0 : LnyZ$_details2.nkpi.length) > 0) {
802
1040
  setTimeout(function () {
803
- if (!_this.OeeL) {
804
- _this.qTuv = true;
805
- if (_this.qTuv) {
806
- _this.qHqZ += 1;
807
- _this.qTuv = _this.vOLn(_this.qHqZ, _this.zaHz.xHSD, _this.zaHz.hNtx);
808
- if (_this.qTuv) {
809
- _this.zaHz.zyyu = time;
810
- ceInstance.validate(_this.HaKf, _this.qtnm);
1041
+ if (!_this.WWDG) {
1042
+ _this.kpHz = true;
1043
+ if (_this.kpHz) {
1044
+ _this.zfeU += 1;
1045
+ _this.kpHz = _this.WCWA(_this.zfeU, _this.LnyZ.gJSN, _this.LnyZ.zzjI);
1046
+ if (_this.kpHz) {
1047
+ _this.LnyZ.OOcg = time;
1048
+ ceInstance.validate(_this.ltQf, _this.yvsV);
811
1049
  }
812
1050
  }
813
1051
  }
814
- condition.upqd.dkks.nkpi.map(function (nokpi) {
815
- ceInstance.unregisterFromEvent(toUpperCase(condition.upqd.dkks.et) + "___" + nokpi, _this);
1052
+ condition.UhhO.PvVy.nkpi.map(function (nokpi) {
1053
+ ceInstance.unregisterFromEvent(toUpperCase(condition.UhhO.PvVy.et) + "___" + nokpi, _this);
816
1054
  });
817
1055
  }, event_time);
818
- condition.upqd.dkks.nkpi.map(function (nokpi) {
819
- ceInstance.registerForEvent(toUpperCase(condition.upqd.dkks.et) + "___" + nokpi, _this.oBOr);
1056
+ condition.UhhO.PvVy.nkpi.map(function (nokpi) {
1057
+ ceInstance.registerForEvent(toUpperCase(condition.UhhO.PvVy.et) + "___" + nokpi, _this.TFdl);
820
1058
  });
821
1059
  }
822
1060
  //it is for unregistering the events did case after completing the time imit
823
- if ((condition === null || condition === void 0 || (zaHz$_details3 = condition.upqd) === null || zaHz$_details3 === void 0 || (zaHz$_details3 = zaHz$_details3.dkks) === null || zaHz$_details3 === void 0 ? void 0 : zaHz$_details3.kpi.length) > 0) {
1061
+ if ((condition === null || condition === void 0 || (LnyZ$_details3 = condition.UhhO) === null || LnyZ$_details3 === void 0 || (LnyZ$_details3 = LnyZ$_details3.PvVy) === null || LnyZ$_details3 === void 0 ? void 0 : LnyZ$_details3.kpi.length) > 0) {
824
1062
  setTimeout(function () {
825
- condition.upqd.dkks.kpi.map(function (kpi) {
826
- ceInstance.unregisterFromEvent(toUpperCase(condition.upqd.dkks.et) + "___" + kpi, _this);
1063
+ condition.UhhO.PvVy.kpi.map(function (kpi) {
1064
+ ceInstance.unregisterFromEvent(toUpperCase(condition.UhhO.PvVy.et) + "___" + kpi, _this);
827
1065
  });
828
1066
  }, event_time);
829
- condition.upqd.dkks.kpi.map(function (kpi) {
830
- if (kpi === condition.JUGy.upqd.oMsP) {
1067
+ condition.UhhO.PvVy.kpi.map(function (kpi) {
1068
+ if (kpi === condition.iBqE.UhhO.gNrp) {
831
1069
  //unregister the previous event
832
- ceInstance.unregisterFromEvent(generateKey(precondition.NQWX) + "___" + precondition.upqd.oMsP, _this);
833
- ceInstance.registerForEvent(toUpperCase(condition.upqd.dkks.et) + "___" + kpi, _this.ZJDs);
1070
+ ceInstance.unregisterFromEvent(generateKey(precondition.vmZw) + "___" + precondition.UhhO.gNrp, _this);
1071
+ ceInstance.registerForEvent(toUpperCase(condition.UhhO.PvVy.et) + "___" + kpi, _this.WPAT);
834
1072
  } else {
835
- ceInstance.registerForEvent(toUpperCase(condition.upqd.dkks.et) + "___" + kpi, _this.oBOr);
1073
+ ceInstance.registerForEvent(toUpperCase(condition.UhhO.PvVy.et) + "___" + kpi, _this.TFdl);
836
1074
  }
837
1075
  });
838
1076
  }
839
1077
  } else {
840
- ceInstance.unregisterFromEvent(generateKey(precondition.NQWX) + "___" + precondition.upqd.oMsP, _this);
841
- ceInstance.registerForEvent(generateKey(condition.NQWX) + "___" + condition.upqd.oMsP, _this);
1078
+ ceInstance.unregisterFromEvent(generateKey(precondition.vmZw) + "___" + precondition.UhhO.gNrp, _this);
1079
+ ceInstance.registerForEvent(generateKey(condition.vmZw) + "___" + condition.UhhO.gNrp, _this);
842
1080
  }
843
- _this.zrSw[name] = Date.now();
1081
+ _this.uNrb[name] = Date.now();
844
1082
  }
845
1083
  return;
846
1084
  }
847
- if ((_window$ApxorRTM2 = window.ApxorRTM) !== null && _window$ApxorRTM2 !== void 0 && _window$ApxorRTM2.isBadgePresent && (_window$ApxorRTM3 = window.ApxorRTM) !== null && _window$ApxorRTM3 !== void 0 && _window$ApxorRTM3.badgesLists.includes(_this.HaKf) && Apxor.getController().isBadgeTriggerSatisfied(_this.HaKf)) {
848
- _this.qTuv = true;
849
- _this.zaHz.zyyu = time;
850
- ceInstance.validate(_this.HaKf, _this.qtnm);
1085
+ if ((_window$ApxorRTM2 = window.ApxorRTM) !== null && _window$ApxorRTM2 !== void 0 && _window$ApxorRTM2.isBadgePresent && (_window$ApxorRTM3 = window.ApxorRTM) !== null && _window$ApxorRTM3 !== void 0 && _window$ApxorRTM3.badgesLists.includes(_this.ltQf) && Apxor.getController().isBadgeTriggerSatisfied(_this.ltQf)) {
1086
+ _this.kpHz = true;
1087
+ _this.LnyZ.OOcg = time;
1088
+ ceInstance.validate(_this.ltQf, _this.yvsV);
851
1089
  return;
852
1090
  }
853
1091
 
854
1092
  // Validate Condition
855
- var validationStatus = generateKey(_this.zaHz.NQWX) === type && _this.Aqjf(time - _this.zaHz.JUGy.zyyu, _this.zaHz.NkDv) && _this.zaHz.upqd.oMsP === name && _this.hyAp(_this.zaHz.upqd.dkks, additionalInfo);
1093
+ var validationStatus = generateKey(_this.LnyZ.vmZw) === type && _this.AnPN(time - _this.LnyZ.iBqE.OOcg, _this.LnyZ.sMpO) && _this.LnyZ.UhhO.gNrp === name && _this.aZfX(_this.LnyZ.UhhO.PvVy, additionalInfo);
856
1094
  if (validationStatus) {
857
- _this.qHqZ += 1;
858
- _this.qTuv = _this.vOLn(_this.qHqZ, _this.zaHz.xHSD, _this.zaHz.hNtx);
859
- if (_this.qTuv) {
860
- _this.zaHz.zyyu = time;
861
- ceInstance.validate(_this.HaKf, _this.qtnm);
1095
+ _this.zfeU += 1;
1096
+ _this.kpHz = _this.WCWA(_this.zfeU, _this.LnyZ.gJSN, _this.LnyZ.zzjI);
1097
+ if (_this.kpHz) {
1098
+ _this.LnyZ.OOcg = time;
1099
+ ceInstance.validate(_this.ltQf, _this.yvsV);
862
1100
  }
863
1101
  }
864
1102
  });
865
- _defineProperty(this, "JdIY", function (type, name, time, additionalInfo) {
1103
+ _defineProperty(this, "lTzm", function (type, name, time, additionalInfo) {
866
1104
  var ceInstance = CE.getInstance();
867
- var validationStatus = generateKey(_this.NeXy.NQWX) === type && _this.Aqjf(time, _this.NeXy.NkDv) && _this.NeXy.upqd.oMsP === name && _this.hyAp(_this.NeXy.upqd.dkks, additionalInfo);
1105
+ var validationStatus = generateKey(_this.gYxJ.vmZw) === type && _this.AnPN(time, _this.gYxJ.sMpO) && _this.gYxJ.UhhO.gNrp === name && _this.aZfX(_this.gYxJ.UhhO.PvVy, additionalInfo);
868
1106
  if (validationStatus) {
869
- _this.qHqZ += 1;
870
- _this.qTuv = _this.vOLn(_this.qHqZ, _this.NeXy.xHSD, _this.NeXy.hNtx);
871
- if (_this.qTuv) {
872
- _this.NeXy.zyyu = time;
873
- ceInstance.validateForTermination(_this.HaKf, _this.qtnm);
1107
+ _this.zfeU += 1;
1108
+ _this.kpHz = _this.WCWA(_this.zfeU, _this.gYxJ.gJSN, _this.gYxJ.zzjI);
1109
+ if (_this.kpHz) {
1110
+ _this.gYxJ.OOcg = time;
1111
+ ceInstance.validateForTermination(_this.ltQf, _this.yvsV);
874
1112
  }
875
1113
  }
876
1114
  });
877
- _defineProperty(this, "fCmr", function (type, name, time, additionalInfo) {
878
- var precondition = _this.zaHz.JUGy;
879
- return generateKey(precondition.NQWX) === type && precondition.upqd.oMsP === name && _this.Aqjf(time, precondition.NkDv) && _this.hyAp(precondition.upqd.dkks, additionalInfo);
1115
+ _defineProperty(this, "LrmB", function (type, name, time, additionalInfo) {
1116
+ var precondition = _this.LnyZ.iBqE;
1117
+ return generateKey(precondition.vmZw) === type && precondition.UhhO.gNrp === name && _this.AnPN(time, precondition.sMpO) && _this.aZfX(precondition.UhhO.PvVy, additionalInfo);
880
1118
  });
881
- _defineProperty(this, "Aqjf", function (time, timeBounds) {
1119
+ _defineProperty(this, "AnPN", function (time, timeBounds) {
882
1120
  var currentTime = Math.ceil(time);
883
- return currentTime > timeBounds.Awql && currentTime < timeBounds.AYIU;
1121
+ return currentTime > timeBounds.ejXF && currentTime < timeBounds.dQza;
884
1122
  });
885
- _defineProperty(this, "vOLn", function (current, required, operator) {
1123
+ _defineProperty(this, "WCWA", function (current, required, operator) {
886
1124
  var checkOld = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
887
- if (checkOld && _this.zaHz.RWTK) {
888
- current = current + _this.inbh;
1125
+ if (checkOld && _this.LnyZ.xPfP) {
1126
+ current = current + _this.WXbt;
889
1127
  }
890
1128
  switch (operator) {
891
1129
  case "EQ":
@@ -902,7 +1140,7 @@
902
1140
  return false;
903
1141
  }
904
1142
  });
905
- _defineProperty(this, "hyAp", function (expected, received) {
1143
+ _defineProperty(this, "aZfX", function (expected, received) {
906
1144
  var status = true;
907
1145
  try {
908
1146
  var _loop = function _loop() {
@@ -947,14 +1185,14 @@
947
1185
  } else if (type === "b") {
948
1186
  loggedValue = !!loggedValue;
949
1187
  }
950
- return zJVe(loggedValue, expectedValue, operator);
1188
+ return bptN(loggedValue, expectedValue, operator);
951
1189
  }
952
- // zJVe(loggedValue, expectedValue, operator)
1190
+ // bptN(loggedValue, expectedValue, operator)
953
1191
  );
954
1192
 
955
1193
  status = status && match;
956
1194
  } else {
957
- status = status && zJVe(received[item], expected[item], "EQ");
1195
+ status = status && bptN(received[item], expected[item], "EQ");
958
1196
  }
959
1197
  },
960
1198
  _ret;
@@ -963,7 +1201,7 @@
963
1201
  if (_ret) return _ret.v;
964
1202
  }
965
1203
  } catch (error) {
966
- Logger$5.error(error);
1204
+ Logger$6.error(error);
967
1205
  status = false;
968
1206
  }
969
1207
  return status;
@@ -973,13 +1211,13 @@
973
1211
  key: "_displayCampaign",
974
1212
  value: function _displayCampaign(time) {
975
1213
  var ceInstance = CE.getInstance();
976
- this.qTuv = true;
977
- if (this.qTuv) {
978
- this.qHqZ += 1;
979
- this.qTuv = this.vOLn(this.qHqZ, this.zaHz.xHSD, this.zaHz.hNtx);
980
- if (this.qTuv) {
981
- this.zaHz.zyyu = time;
982
- ceInstance.validate(this.HaKf, this.qtnm);
1214
+ this.kpHz = true;
1215
+ if (this.kpHz) {
1216
+ this.zfeU += 1;
1217
+ this.kpHz = this.WCWA(this.zfeU, this.LnyZ.gJSN, this.LnyZ.zzjI);
1218
+ if (this.kpHz) {
1219
+ this.LnyZ.OOcg = time;
1220
+ ceInstance.validate(this.ltQf, this.yvsV);
983
1221
  }
984
1222
  }
985
1223
  }
@@ -987,21 +1225,15 @@
987
1225
  return ConditionValidator;
988
1226
  }();
989
1227
 
990
- var QE_STATE = "qe_state";
991
- var APX_RETAINED_SESSIONS = "apx_retained_session";
992
- var APX_RETAINED_DAYS = "apx_retained_days";
993
- var APX_CONTEXT_EVALUATED = "apx_context_evaluated";
994
- var APX_VARIANT_CODE = "apx_variant_code";
995
-
996
- var Logger$6 = window.ApxorLogger;
1228
+ var Logger$7 = window.ApxorLogger;
997
1229
  var OverallConfig = /*#__PURE__*/_createClass(function OverallConfig() {
998
1230
  var _this = this;
999
1231
  _classCallCheck(this, OverallConfig);
1000
- _defineProperty(this, "FMqv", []);
1232
+ _defineProperty(this, "MOQE", []);
1001
1233
  _defineProperty(this, "_ret_day", {});
1002
- _defineProperty(this, "gFsE", {});
1003
- _defineProperty(this, "gBeH", false);
1004
- _defineProperty(this, "sPne", false);
1234
+ _defineProperty(this, "svXn", {});
1235
+ _defineProperty(this, "tkzI", false);
1236
+ _defineProperty(this, "paZC", false);
1005
1237
  _defineProperty(this, "retainedDaysValidated", true);
1006
1238
  _defineProperty(this, "retainedSessionValidated", true);
1007
1239
  _defineProperty(this, "eventDoneInLT", false);
@@ -1009,13 +1241,13 @@
1009
1241
  _defineProperty(this, "parse", function () {
1010
1242
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1011
1243
  try {
1012
- _this.FMqv = config.overall_cfg.events;
1244
+ _this.MOQE = config.overall_cfg.events;
1013
1245
  _this._ret_day = config.overall_cfg.ret_day;
1014
- _this.gFsE = config.overall_cfg.session;
1015
- _this.gBeH = config.overall_cfg.toggleRetDay;
1016
- _this.sPne = config.overall_cfg.toggleSession;
1246
+ _this.svXn = config.overall_cfg.session;
1247
+ _this.tkzI = config.overall_cfg.toggleRetDay;
1248
+ _this.paZC = config.overall_cfg.toggleSession;
1017
1249
  } catch (error) {
1018
- Logger$6.error(error);
1250
+ Logger$7.error(error);
1019
1251
  return false;
1020
1252
  }
1021
1253
  return true;
@@ -1023,11 +1255,11 @@
1023
1255
  _defineProperty(this, "validate", function () {
1024
1256
  var retainedDays = parseInt(Apxor.getController().getFromStorage(APX_RETAINED_DAYS));
1025
1257
  var retainedSession = parseInt(Apxor.getController().getFromStorage(APX_RETAINED_SESSIONS));
1026
- if (_this.gBeH && !isNaN(retainedDays) && !(retainedDays >= _this._ret_day.from && retainedDays <= _this._ret_day.to)) {
1258
+ if (_this.tkzI && !isNaN(retainedDays) && !(retainedDays >= _this._ret_day.from && retainedDays <= _this._ret_day.to)) {
1027
1259
  _this.retainedDaysValidated = false;
1028
1260
  return false;
1029
1261
  }
1030
- if (_this.sPne && !isNaN(retainedSession) && !(retainedSession >= _this.gFsE.from && retainedSession <= _this.gFsE.to)) {
1262
+ if (_this.paZC && !isNaN(retainedSession) && !(retainedSession >= _this.svXn.from && retainedSession <= _this.svXn.to)) {
1031
1263
  _this.retainedSessionValidated = false;
1032
1264
  return false;
1033
1265
  }
@@ -1036,45 +1268,45 @@
1036
1268
  var data = Apxor.getController().getFromStorage("_apx_lt_count");
1037
1269
  var siteid = Apxor.getSiteId();
1038
1270
  var LtCountObjDecoded = JSON.parse(new TextDecoder().decode(stringToArrayBuffer(decode(siteid, data))));
1039
- for (var i = 0; i < _this.FMqv.length; i++) {
1040
- var evName = _this.FMqv[i].name.replace("'", "").replace("’", "");
1271
+ for (var i = 0; i < _this.MOQE.length; i++) {
1272
+ var evName = _this.MOQE[i].name.replace("'", "").replace("’", "");
1041
1273
  if (LtCountObjDecoded[evName]) {
1042
1274
  _this.eventDoneInLT = true;
1043
1275
  return false;
1044
1276
  }
1045
1277
  }
1046
1278
  } catch (e) {
1047
- Logger$6.error("Failed to validate the lt count:" + e);
1279
+ Logger$7.error("Failed to validate the lt count:" + e);
1048
1280
  }
1049
1281
  return true;
1050
1282
  });
1051
1283
  });
1052
1284
 
1053
- var Logger$7 = window.ApxorLogger;
1285
+ var Logger$8 = window.ApxorLogger;
1054
1286
  var Attributes = /*#__PURE__*/_createClass(function Attributes() {
1055
1287
  var _this = this;
1056
1288
  _classCallCheck(this, Attributes);
1057
- _defineProperty(this, "PrKM", []);
1058
- _defineProperty(this, "vvVn", []);
1289
+ _defineProperty(this, "LpbY", []);
1290
+ _defineProperty(this, "Hlto", []);
1059
1291
  _defineProperty(this, "parse", function () {
1060
1292
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1061
1293
  try {
1062
- _this.PrKM = config.attributes.user;
1063
- _this.vvVn = config.attributes.session;
1064
- if (!Array.isArray(_this.PrKM) || !Array.isArray(_this.vvVn)) {
1065
- Logger$7.error("No attributes");
1294
+ _this.LpbY = config.attributes.user;
1295
+ _this.Hlto = config.attributes.session;
1296
+ if (!Array.isArray(_this.LpbY) || !Array.isArray(_this.Hlto)) {
1297
+ Logger$8.error("No attributes");
1066
1298
  return false;
1067
1299
  }
1068
1300
  } catch (error) {
1069
- Logger$7.error(error);
1301
+ Logger$8.error(error);
1070
1302
  return false;
1071
1303
  }
1072
1304
  return true;
1073
1305
  });
1074
1306
  _defineProperty(this, "validate", function (user, session) {
1075
- return _this.MTJF(user, _this.PrKM) && _this.MTJF(session, _this.vvVn);
1307
+ return _this.asXO(user, _this.LpbY) && _this.asXO(session, _this.Hlto);
1076
1308
  });
1077
- _defineProperty(this, "MTJF", function (attributes, expected) {
1309
+ _defineProperty(this, "asXO", function (attributes, expected) {
1078
1310
  var length = expected.length;
1079
1311
  var status = true;
1080
1312
  try {
@@ -1104,7 +1336,7 @@
1104
1336
  }
1105
1337
  var match = loggedValues.some(function (loggedValue) {
1106
1338
  return values.some(function (configValue) {
1107
- return zJVe(loggedValue, configValue, operator);
1339
+ return bptN(loggedValue, configValue, operator);
1108
1340
  });
1109
1341
  });
1110
1342
  status = status && match;
@@ -1115,7 +1347,7 @@
1115
1347
  if (_ret) return _ret.v;
1116
1348
  }
1117
1349
  } catch (error) {
1118
- Logger$7.error(error);
1350
+ Logger$8.error(error);
1119
1351
  status = false;
1120
1352
  }
1121
1353
  return status;
@@ -1128,18 +1360,18 @@
1128
1360
  var TimeBasedTermination = /*#__PURE__*/_createClass(function TimeBasedTermination() {
1129
1361
  var _this = this;
1130
1362
  _classCallCheck(this, TimeBasedTermination);
1131
- _defineProperty(this, "LUcN", Apxor.getController());
1363
+ _defineProperty(this, "VYrJ", Apxor.getController());
1132
1364
  _defineProperty(this, "type", "");
1133
1365
  _defineProperty(this, "_duration_seconds", 0);
1134
- _defineProperty(this, "XBmy", 1);
1366
+ _defineProperty(this, "ymgl", 1);
1135
1367
  _defineProperty(this, "parse", function (config) {
1136
1368
  try {
1137
1369
  var _config$terminate_inf, _config$terminate_inf2, _config$terminate_inf3;
1138
- _this.FQLi = (_config$terminate_inf = config.terminate_info.time_based) === null || _config$terminate_inf === void 0 ? void 0 : _config$terminate_inf.type;
1370
+ _this.ARue = (_config$terminate_inf = config.terminate_info.time_based) === null || _config$terminate_inf === void 0 ? void 0 : _config$terminate_inf.type;
1139
1371
  _this._duration_seconds = (_config$terminate_inf2 = config.terminate_info) === null || _config$terminate_inf2 === void 0 ? void 0 : _config$terminate_inf2.time_based.duration_seconds;
1140
- _this.XBmy = (_config$terminate_inf3 = config.terminate_info.time_based) === null || _config$terminate_inf3 === void 0 ? void 0 : _config$terminate_inf3.days;
1141
- if (_this.zJVe(config._id)) {
1142
- _this.LUcN.persistTerminationInfoLocally(config._id);
1372
+ _this.ymgl = (_config$terminate_inf3 = config.terminate_info.time_based) === null || _config$terminate_inf3 === void 0 ? void 0 : _config$terminate_inf3.days;
1373
+ if (_this.bptN(config._id)) {
1374
+ _this.VYrJ.persistTerminationInfoLocally(config._id);
1143
1375
  return false;
1144
1376
  }
1145
1377
  } catch (_unused) {
@@ -1147,16 +1379,16 @@
1147
1379
  }
1148
1380
  return true;
1149
1381
  });
1150
- _defineProperty(this, "zJVe", function (id) {
1382
+ _defineProperty(this, "bptN", function (id) {
1151
1383
  var _Data$id;
1152
- var Data = JSON.parse(_this.LUcN.getFromStorage(APX_TERMINATION_ID));
1384
+ var Data = JSON.parse(_this.VYrJ.getFromStorage(APX_TERMINATION_ID));
1153
1385
  if (!Data[id] || !((_Data$id = Data[id]) !== null && _Data$id !== void 0 && _Data$id.startDate)) return false;
1154
1386
  var startDate = new Date(Data[id].startDate);
1155
1387
  var presentDate = new Date(getDateInMMDDYYYY());
1156
1388
  var diff = parseInt((presentDate - startDate) / (1000 * 60 * 60 * 24), 10);
1157
1389
  var currentTime = _getTime();
1158
- var iBRX = Data[id].iBRX;
1159
- return diff === _this.XBmy && currentTime.hours >= iBRX.hours || diff > _this.XBmy || Data[id].goalAcheived;
1390
+ var EfLi = Data[id].EfLi;
1391
+ return diff === _this.ymgl && currentTime.hours >= EfLi.hours || diff > _this.ymgl || Data[id].goalAcheived;
1160
1392
  });
1161
1393
  });
1162
1394
 
@@ -1165,19 +1397,19 @@
1165
1397
  _classCallCheck(this, TerminationInfo);
1166
1398
  _defineProperty(this, "enable_goal_events", false);
1167
1399
  _defineProperty(this, "attributes", {});
1168
- _defineProperty(this, "YcaG", new Attributes());
1169
- _defineProperty(this, "iyKG", new TimeBasedTermination());
1400
+ _defineProperty(this, "QkAi", new Attributes());
1401
+ _defineProperty(this, "vykZ", new TimeBasedTermination());
1170
1402
  _defineProperty(this, "parse", function () {
1171
1403
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1172
1404
  try {
1173
1405
  var _config$terminate_inf, _config$terminate_inf2, _config$terminate_inf3;
1174
1406
  _this.enable_time_based = config === null || config === void 0 || (_config$terminate_inf = config.terminate_info) === null || _config$terminate_inf === void 0 ? void 0 : _config$terminate_inf.enable_time_based;
1175
- if (_this.enable_time_based && !_this.iyKG.parse(config)) {
1407
+ if (_this.enable_time_based && !_this.vykZ.parse(config)) {
1176
1408
  return false;
1177
1409
  }
1178
1410
  _this.enable_goal_events = config === null || config === void 0 || (_config$terminate_inf2 = config.terminate_info) === null || _config$terminate_inf2 === void 0 ? void 0 : _config$terminate_inf2.enable_goal_events;
1179
1411
  _this.enable_attributes = config === null || config === void 0 || (_config$terminate_inf3 = config.terminate_info) === null || _config$terminate_inf3 === void 0 ? void 0 : _config$terminate_inf3.enable_attributes;
1180
- if (_this.enable_attributes && !_this.YcaG.parse(config.terminate_info)) {
1412
+ if (_this.enable_attributes && !_this.QkAi.parse(config.terminate_info)) {
1181
1413
  return false;
1182
1414
  }
1183
1415
  } catch (error) {
@@ -1187,55 +1419,129 @@
1187
1419
  return true;
1188
1420
  });
1189
1421
  _defineProperty(this, "validate", function (user, session) {
1190
- return _this.YcaG.validate(user, session);
1422
+ return _this.QkAi.validate(user, session);
1191
1423
  });
1192
1424
  });
1193
1425
 
1194
- var Logger$8 = window.ApxorLogger;
1426
+ var Binding = /*#__PURE__*/_createClass(function Binding() {
1427
+ var _this = this;
1428
+ _classCallCheck(this, Binding);
1429
+ _defineProperty(this, "vrga", "");
1430
+ _defineProperty(this, "NSgn", "");
1431
+ _defineProperty(this, "hgtN", "");
1432
+ _defineProperty(this, "OmGM", "");
1433
+ _defineProperty(this, "parse", function () {
1434
+ var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1435
+ try {
1436
+ _this.vrga = config === null || config === void 0 ? void 0 : config.screen_binding;
1437
+ if (!_this.vrga) {
1438
+ return true;
1439
+ } else {
1440
+ _this.NSgn = config === null || config === void 0 ? void 0 : config.binding.url;
1441
+ _this.hgtN = config === null || config === void 0 ? void 0 : config.binding["var"];
1442
+ _this.OmGM = config === null || config === void 0 ? void 0 : config.binding.operator;
1443
+ return true;
1444
+ }
1445
+ } catch (error) {
1446
+ window.ApxorLogger.error(error);
1447
+ return false;
1448
+ }
1449
+ });
1450
+ /**
1451
+ * compares the current url with url from config based on the operator
1452
+ * url :Screen binding url from config
1453
+ * variable :variable is the dynamic part of the url which we get in config which is by default "$"
1454
+ * operator :operator can be either "EQ" used for equality comparision or "SW" used for startswith comparision
1455
+ */
1456
+ _defineProperty(this, "validate", function () {
1457
+ var url = _this.NSgn;
1458
+ var variable = _this.hgtN;
1459
+ var operator = _this.OmGM;
1460
+ var currentUrl = window.location.href;
1461
+ if (!_this.vrga) {
1462
+ return true;
1463
+ } else {
1464
+ if (operator === "EQ") {
1465
+ if (!url.includes(variable)) {
1466
+ if (currentUrl === url) {
1467
+ return true;
1468
+ } else {
1469
+ return false;
1470
+ }
1471
+ } else {
1472
+ var matched = _doesUrlMatchSkeleton(currentUrl, url, variable, false);
1473
+ if (matched) {
1474
+ return true;
1475
+ } else {
1476
+ return false;
1477
+ }
1478
+ }
1479
+ } else if (operator === "SW") {
1480
+ if (!url.includes(variable)) {
1481
+ if (currentUrl.startsWith(url)) {
1482
+ return true;
1483
+ } else {
1484
+ return false;
1485
+ }
1486
+ } else {
1487
+ var _matched = _doesUrlMatchSkeleton(currentUrl, url, variable, true);
1488
+ if (_matched) {
1489
+ return true;
1490
+ } else {
1491
+ return false;
1492
+ }
1493
+ }
1494
+ }
1495
+ }
1496
+ });
1497
+ });
1498
+
1499
+ var Logger$9 = window.ApxorLogger;
1195
1500
  var ConfigItem = /*#__PURE__*/_createClass(function ConfigItem() {
1196
1501
  var _this = this;
1197
1502
  _classCallCheck(this, ConfigItem);
1198
- _defineProperty(this, "dWwf", []);
1199
- _defineProperty(this, "OhKQ", []);
1200
- _defineProperty(this, "HaKf", "");
1201
- _defineProperty(this, "tEDn", new Meta());
1202
- _defineProperty(this, "XfZa", new Audience());
1203
- _defineProperty(this, "cDOC", new Validity());
1204
- _defineProperty(this, "UQKk", new Frequency());
1205
- _defineProperty(this, "pRSj", new OverallConfig());
1206
- _defineProperty(this, "aeXK", new TerminationInfo());
1207
- _defineProperty(this, "OOUd", false);
1208
- _defineProperty(this, "FMFC", []);
1503
+ _defineProperty(this, "lLoL", []);
1504
+ _defineProperty(this, "kuIQ", []);
1505
+ _defineProperty(this, "ltQf", "");
1506
+ _defineProperty(this, "liLD", new Meta());
1507
+ _defineProperty(this, "bEUi", new Audience());
1508
+ _defineProperty(this, "lrki", new Validity());
1509
+ _defineProperty(this, "Sfjv", new Frequency());
1510
+ _defineProperty(this, "qTcR", new OverallConfig());
1511
+ _defineProperty(this, "DhFu", new TerminationInfo());
1512
+ _defineProperty(this, "pEEU", new Binding());
1513
+ _defineProperty(this, "YVfa", false);
1514
+ _defineProperty(this, "VKON", []);
1209
1515
  _defineProperty(this, "_variant_code", "");
1210
1516
  _defineProperty(this, "parse", function () {
1211
1517
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1212
1518
  try {
1213
- var _this$tEDn$_attr;
1519
+ var _this$liLD$_attr;
1214
1520
  // If ID is not present, throw it out
1215
1521
  if (!isDefined(config._id)) {
1216
- Logger$8.error("No Id");
1522
+ Logger$9.error("No Id");
1217
1523
  return false;
1218
1524
  }
1219
1525
 
1220
1526
  // If config is disabled, throw it out
1221
1527
  if (!isDefined(config.enabled) || !config.enabled) {
1222
- Logger$8.error("Not enabled");
1528
+ Logger$9.error("Not enabled");
1223
1529
  return false;
1224
1530
  }
1225
1531
 
1226
1532
  // If META, VALIDITY, FREQUENCY and AUDIENCE is not parsed properly, throw it out
1227
- if (!(_this.tEDn.parse(config) && _this.cDOC.parse(config) && _this.UQKk.parse(config) && _this.XfZa.parse(config) && _this.pRSj.parse(config) && _this.aeXK.parse(config))) {
1533
+ if (!(_this.liLD.parse(config) && _this.lrki.parse(config) && _this.Sfjv.parse(config) && _this.bEUi.parse(config) && _this.qTcR.parse(config) && _this.DhFu.parse(config) && _this.pEEU.parse(config))) {
1228
1534
  return false;
1229
1535
  }
1230
- _this._variant_code = _this.tEDn._isExperiment || _this.tEDn._only_context ? (_this$tEDn$_attr = _this.tEDn._attr) === null || _this$tEDn$_attr === void 0 ? void 0 : _this$tEDn$_attr[APX_VARIANT_CODE] : "TG";
1536
+ _this._variant_code = _this.liLD._isExperiment || _this.liLD._only_context ? (_this$liLD$_attr = _this.liLD._attr) === null || _this$liLD$_attr === void 0 ? void 0 : _this$liLD$_attr[APX_VARIANT_CODE] : "TG";
1231
1537
  // If there are no conditions, throw it out
1232
1538
  if (!isDefined(config.conditions) || !Array.isArray(config.conditions)) {
1233
- Logger$8.error("No valid conditions", config.conditions);
1539
+ Logger$9.error("No valid conditions", config.conditions);
1234
1540
  return false;
1235
1541
  }
1236
- _this.HaKf = config._id;
1237
- _this.OOUd = isDefined(config.sequence_enabled) ? config.sequence_enabled : false;
1238
- if (_this.OOUd) {
1542
+ _this.ltQf = config._id;
1543
+ _this.YVfa = isDefined(config.sequence_enabled) ? config.sequence_enabled : false;
1544
+ if (_this.YVfa) {
1239
1545
  // iff respectSequence is true, Sort the Conditions by their sequence order
1240
1546
  // We need to sort, if server sends them in orderless manner
1241
1547
  config.conditions.sort(function (prev, current) {
@@ -1246,18 +1552,22 @@
1246
1552
  // Parse all conditions now
1247
1553
  var conditions = config.conditions;
1248
1554
  var length = conditions.length;
1249
- for (var index = 0; index < length; index++) {
1250
- _this.FMFC = [];
1555
+ var no_context_enabled = config === null || config === void 0 ? void 0 : config.no_context_enabled;
1556
+ if (length === 0 && no_context_enabled) {
1557
+ _this.ALzC();
1558
+ }
1559
+ var _loop = function _loop() {
1560
+ _this.VKON = [];
1251
1561
  var condition = conditions[index];
1252
1562
  if (condition.type === "didn't") {
1253
- var zaHz$details;
1563
+ var LnyZ$details;
1254
1564
  var obj = {
1255
1565
  trigger_key: condition.trigger.details.name,
1256
- no_kpi_array: condition === null || condition === void 0 || (zaHz$details = condition.details) === null || zaHz$details === void 0 || (zaHz$details = zaHz$details.additional_info) === null || zaHz$details === void 0 ? void 0 : zaHz$details.nkpi,
1566
+ no_kpi_array: condition === null || condition === void 0 || (LnyZ$details = condition.details) === null || LnyZ$details === void 0 || (LnyZ$details = LnyZ$details.additional_info) === null || LnyZ$details === void 0 ? void 0 : LnyZ$details.nkpi,
1257
1567
  condition_id: condition === null || condition === void 0 ? void 0 : condition._id,
1258
1568
  time_bounds: condition.time_bounds.upper
1259
1569
  };
1260
- _this.FMFC = [].concat(_toConsumableArray(_this.FMFC), [obj]);
1570
+ _this.VKON = [].concat(_toConsumableArray(_this.VKON), [obj]);
1261
1571
  //this will be the key
1262
1572
  //when event occur check this array and then then check the time
1263
1573
  //check the time diffrence
@@ -1266,143 +1576,144 @@
1266
1576
  }
1267
1577
 
1268
1578
  var conditionValidator = new ConditionValidator();
1269
- if (conditionValidator.initialize(condition, _this.HaKf, index, _this.OOUd, _this.FMFC)) {
1270
- _this.dWwf.push(conditionValidator);
1579
+ if (conditionValidator.initialize(condition, _this.ltQf, index, _this.YVfa, _this.VKON)) {
1580
+ _this.lLoL.push(conditionValidator);
1581
+ var max_retries = (condition === null || condition === void 0 ? void 0 : condition.timeout) / (condition === null || condition === void 0 ? void 0 : condition.findinterval);
1582
+ var frame_id = (condition === null || condition === void 0 ? void 0 : condition.frameid) || "";
1583
+ var url = condition === null || condition === void 0 ? void 0 : condition.url;
1584
+ if (window.location.href === url) {
1585
+ if (condition.event_type === "view_visibility") {
1586
+ if (_findTargetElement(condition.view_id, frame_id, condition === null || condition === void 0 ? void 0 : condition.enable_retry, condition === null || condition === void 0 ? void 0 : condition.findinterval, max_retries) === true) {
1587
+ //this.kpoN();
1588
+ _this.ALzC(true);
1589
+ }
1590
+ }
1591
+ }
1592
+ // eslint-disable-next-line no-unused-vars
1593
+ window.addEventListener("navigate", function (event) {
1594
+ var url = condition === null || condition === void 0 ? void 0 : condition.url;
1595
+ if (window.location.href === url) {
1596
+ if (condition.event_type === "view_visibility") {
1597
+ if (_findTargetElement(condition.view_id, frame_id, condition === null || condition === void 0 ? void 0 : condition.enable_retry, condition === null || condition === void 0 ? void 0 : condition.findinterval, max_retries) === true) {
1598
+ //this.kpoN();
1599
+ _this.ALzC(true);
1600
+ }
1601
+ }
1602
+ }
1603
+ });
1271
1604
  }
1605
+ };
1606
+ for (var index = 0; index < length; index++) {
1607
+ _loop();
1272
1608
  }
1273
- if (_this.aeXK.enable_goal_events) {
1609
+ if (_this.DhFu.enable_goal_events) {
1274
1610
  var goal_events = config.terminate_info.goal_events.events;
1275
1611
  var goaleventslength = goal_events.length;
1276
1612
  for (var i = 0; i < goaleventslength; i++) {
1277
- var _conditionValidator = new ConditionValidator();
1278
- if (_conditionValidator.initialize(goal_events[i], _this.HaKf, i, true, [], "termination")) {
1279
- _this.OhKQ.push(_conditionValidator);
1613
+ var conditionValidator = new ConditionValidator();
1614
+ if (conditionValidator.initialize(goal_events[i], _this.ltQf, i, true, [], "termination")) {
1615
+ _this.kuIQ.push(conditionValidator);
1280
1616
  }
1281
1617
  }
1282
1618
  }
1283
- return _this.dWwf.length > 0;
1619
+ return _this.lLoL.length > 0;
1284
1620
  } catch (error) {
1285
- Logger$8.error(error);
1621
+ Logger$9.error(error);
1286
1622
  return false;
1287
1623
  }
1288
1624
  });
1289
- _defineProperty(this, "QIaF", function (index) {
1625
+ _defineProperty(this, "iHps", function (index) {
1290
1626
  if (index < 0) {
1291
1627
  return;
1292
1628
  }
1293
- if (_this.OOUd) {
1294
- var conditionValidator = _this.dWwf[index];
1295
- if (isDefined(conditionValidator) && conditionValidator.qTuv) {
1629
+ if (_this.YVfa) {
1630
+ var conditionValidator = _this.lLoL[index];
1631
+ if (isDefined(conditionValidator) && conditionValidator.kpHz) {
1296
1632
  // Check if previous validator is satisfied
1297
- var prevValidator = _this.dWwf[index - 1];
1298
- if (isDefined(prevValidator) && !prevValidator.qTuv) {
1633
+ var prevValidator = _this.lLoL[index - 1];
1634
+ if (isDefined(prevValidator) && !prevValidator.kpHz) {
1299
1635
  // TODO: If current index is satisfied before previous one, do something
1300
1636
  // either unregister all conditions or remove this item from ConfigLookup
1301
1637
  return;
1302
1638
  }
1303
- var nextValidator = _this.dWwf[index + 1];
1639
+ var nextValidator = _this.lLoL[index + 1];
1304
1640
  if (!isDefined(nextValidator)) {
1305
1641
  // It means this is the last condition
1306
1642
  // Validate all conditions
1307
- _this.qZQl();
1643
+ _this.ALzC();
1308
1644
  } else {
1309
- nextValidator.WNgJ();
1645
+ nextValidator.kpoN();
1310
1646
  }
1311
1647
  }
1312
1648
  } else {
1313
1649
  // Validate all conditions
1314
- _this.qZQl();
1650
+ _this.ALzC();
1315
1651
  }
1316
1652
  });
1317
- _defineProperty(this, "rRdK", function (index) {
1653
+ _defineProperty(this, "ybGY", function (index) {
1318
1654
  if (index < 0) {
1319
1655
  return;
1320
1656
  }
1321
- _this.sGUk();
1657
+ _this.puwz();
1322
1658
  });
1323
- _defineProperty(this, "qZQl", function () {
1659
+ _defineProperty(this, "ALzC", function () {
1660
+ var _window$ApxorRTM, _window$ApxorRTM2;
1661
+ var view_visibility = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
1324
1662
  // Check If Audience, Validity is satisfied or not
1325
1663
  var userAttributes = Apxor.getController().getUserAttributes();
1326
1664
  var sessionAttributes = Apxor.getController().getSessionAttributes();
1327
- if (!_this.cDOC.validate() || !_this.XfZa.validate(userAttributes, sessionAttributes) || !_this.pRSj.validate()) {
1328
- if (!_this.pRSj.retainedDaysValidated) {
1329
- Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_non_eligible_user", {
1330
- apx_nudge_type: _this.tEDn.FQLi === "SURVEY" ? "survey" : "campaign",
1331
- apx_nudge_id: _this.HaKf,
1332
- apx_nudge_name: _this.tEDn.oMsP,
1333
- apx_variant_code: _this.tEDn._isExperiment || _this.tEDn._only_context ? _this.tEDn._attr[APX_VARIANT_CODE] : "TG",
1334
- apx_failure_type: "warn",
1335
- apx_reason: "Retained day criteria not met"
1336
- });
1665
+ if (!((_window$ApxorRTM = window.ApxorRTM) !== null && _window$ApxorRTM !== void 0 && _window$ApxorRTM.isBadgePresent && (_window$ApxorRTM2 = window.ApxorRTM) !== null && _window$ApxorRTM2 !== void 0 && _window$ApxorRTM2.badgesLists.includes(_this.ltQf) && Apxor.getController().isBadgeTriggerSatisfied(_this.ltQf))) {
1666
+ Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_trigger_satisfied", {
1667
+ apx_nudge_type: _this.liLD.ARue === "SURVEY" ? "survey" : "campaign",
1668
+ apx_nudge_id: _this.ltQf,
1669
+ apx_nudge_name: _this.liLD.gNrp,
1670
+ apx_variant_code: _this.liLD._isExperiment || _this.liLD._only_context ? _this.liLD._attr[APX_VARIANT_CODE] : "TG"
1671
+ });
1672
+ }
1673
+ if (!_this.lrki.validate() || !_this.bEUi.validate(userAttributes, sessionAttributes) || !_this.qTcR.validate() || !_this.pEEU.validate()) {
1674
+ if (!_this.qTcR.retainedDaysValidated) {
1675
+ _this.zMgT("Retained day criteria not met");
1676
+ return;
1337
1677
  }
1338
- if (!_this.pRSj.retainedSessionValidated) {
1339
- Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_non_eligible_user", {
1340
- apx_nudge_type: _this.tEDn.FQLi === "SURVEY" ? "survey" : "campaign",
1341
- apx_nudge_id: _this.HaKf,
1342
- apx_nudge_name: _this.tEDn.oMsP,
1343
- apx_variant_code: _this.tEDn._isExperiment || _this.tEDn._only_context ? _this.tEDn._attr[APX_VARIANT_CODE] : "TG",
1344
- apx_failure_type: "warn",
1345
- apx_reason: "User session criteria not met"
1346
- });
1678
+ if (!_this.qTcR.retainedSessionValidated) {
1679
+ _this.zMgT("User session criteria not met");
1680
+ return;
1347
1681
  }
1348
- if (_this.pRSj.eventDoneInLT) {
1349
- Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_non_eligible_user", {
1350
- apx_nudge_type: _this.tEDn.FQLi === "SURVEY" ? "survey" : "campaign",
1351
- apx_nudge_id: _this.HaKf,
1352
- apx_nudge_name: _this.tEDn.oMsP,
1353
- apx_variant_code: _this.tEDn._isExperiment || _this.tEDn._only_context ? _this.tEDn._attr[APX_VARIANT_CODE] : "TG",
1354
- apx_failure_type: "warn",
1355
- apx_reason: "Event done in life time"
1356
- });
1682
+ if (_this.qTcR.eventDoneInLT) {
1683
+ _this.zMgT("Event done in life time");
1684
+ return;
1357
1685
  }
1358
- if (!_this.XfZa.userAttributesValidated) {
1359
- Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_non_eligible_user", {
1360
- apx_nudge_type: _this.tEDn.FQLi === "SURVEY" ? "survey" : "campaign",
1361
- apx_nudge_id: _this.HaKf,
1362
- apx_nudge_name: _this.tEDn.oMsP,
1363
- apx_variant_code: _this.tEDn._isExperiment || _this.tEDn._only_context ? _this.tEDn._attr[APX_VARIANT_CODE] : "TG",
1364
- apx_failure_type: "warn",
1365
- apx_reason: "User property filter not met"
1366
- });
1686
+ if (!_this.bEUi.userAttributesValidated) {
1687
+ _this.zMgT("User property filter not met");
1688
+ return;
1367
1689
  }
1368
- if (!_this.XfZa.sessionAttributeValidated) {
1369
- Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_non_eligible_user", {
1370
- apx_nudge_type: _this.tEDn.FQLi === "SURVEY" ? "survey" : "campaign",
1371
- apx_nudge_id: _this.HaKf,
1372
- apx_nudge_name: _this.tEDn.oMsP,
1373
- apx_variant_code: _this.tEDn._isExperiment || _this.tEDn._only_context ? _this.tEDn._attr[APX_VARIANT_CODE] : "TG",
1374
- apx_failure_type: "warn",
1375
- apx_reason: "Session property filter not met"
1376
- });
1690
+ if (!_this.bEUi.sessionAttributeValidated) {
1691
+ _this.zMgT("Session property filter not met");
1692
+ return;
1377
1693
  }
1378
- if (_this.cDOC._not_yet_active) {
1379
- Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_non_eligible_user", {
1380
- apx_nudge_type: _this.tEDn.FQLi === "SURVEY" ? "survey" : "campaign",
1381
- apx_nudge_id: _this.HaKf,
1382
- apx_nudge_name: _this.tEDn.oMsP,
1383
- apx_variant_code: _this.tEDn._isExperiment || _this.tEDn._only_context ? _this.tEDn._attr[APX_VARIANT_CODE] : "TG",
1384
- apx_failure_type: "warn",
1385
- apx_reason: "nudge not yet active"
1386
- });
1694
+ if (_this.lrki._not_in_specified_time) {
1695
+ _this.zMgT("Time limits check failed");
1696
+ return;
1387
1697
  }
1388
- if (_this.cDOC._nudge_expired) {
1389
- Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_non_eligible_user", {
1390
- apx_nudge_type: _this.tEDn.FQLi === "SURVEY" ? "survey" : "campaign",
1391
- apx_nudge_id: _this.HaKf,
1392
- apx_nudge_name: _this.tEDn.oMsP,
1393
- apx_variant_code: _this.tEDn._isExperiment || _this.tEDn._only_context ? _this.tEDn._attr[APX_VARIANT_CODE] : "TG",
1394
- apx_failure_type: "warn",
1395
- apx_reason: "nudge expired"
1396
- });
1698
+ if (_this.lrki._not_yet_active) {
1699
+ _this.zMgT("not in the scheduled time");
1700
+ return;
1701
+ }
1702
+ if (_this.lrki._nudge_expired) {
1703
+ _this.zMgT("nudge expired");
1704
+ return;
1397
1705
  }
1398
1706
  return;
1399
1707
  }
1400
- var length = _this.dWwf.length;
1708
+ var length = _this.lLoL.length;
1401
1709
  var isSatisfied = length < 1;
1402
1710
  var combineOperator = "";
1711
+ if (length === 0) {
1712
+ isSatisfied = true;
1713
+ }
1403
1714
  for (var index = 0; index < length; index++) {
1404
- var validator = _this.dWwf[index];
1405
- var currentResult = validator.qTuv;
1715
+ var validator = _this.lLoL[index];
1716
+ var currentResult = validator.kpHz;
1406
1717
  if (combineOperator.trim() === "") {
1407
1718
  isSatisfied = currentResult;
1408
1719
  } else {
@@ -1415,59 +1726,61 @@
1415
1726
  break;
1416
1727
  }
1417
1728
  }
1418
- combineOperator = validator.SaTl;
1729
+ combineOperator = validator.mEtI;
1730
+ }
1731
+ if (view_visibility === true) {
1732
+ isSatisfied = true;
1419
1733
  }
1420
1734
  if (isSatisfied) {
1421
- var _window$ApxorRTM, _window$ApxorRTM2;
1422
1735
  console.debug("onCondition satisfied");
1423
1736
  // Check if count reached it's maximum
1424
- if (!_this.UQKk.KeXl(_this.HaKf)) {
1425
- console.warn("Maximum limit reached", _this.HaKf);
1426
- //logging event for view not found for test device
1427
- Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_non_eligible_user", {
1428
- apx_nudge_type: "campaign",
1429
- apx_nudge_id: _this.HaKf,
1430
- apx_nudge_name: _this.tEDn.oMsP,
1431
- apx_variant_code: _this.tEDn._isExperiment || _this.tEDn._only_context ? _this.tEDn._attr[APX_VARIANT_CODE] : "TG",
1432
- apx_failure_type: "warn",
1433
- apx_reason: "Campaign limit reached"
1434
- });
1737
+ if (!_this.Sfjv.gbnE(_this.ltQf)) {
1738
+ console.warn("Maximum limit reached", _this.ltQf);
1739
+ if (Apxor.getController().isTestDevice()) {
1740
+ feedBackMessagePopUpCE("Maximum limit reached for campaign name ".concat(_this.liLD.gNrp));
1741
+ var closeButton = document.getElementById("close-button");
1742
+ var dismissCallback = function dismissCallback() {
1743
+ var modal_popup_container = document.getElementById("apx-container");
1744
+ modal_popup_container === null || modal_popup_container === void 0 || modal_popup_container.remove();
1745
+ };
1746
+ closeButton === null || closeButton === void 0 || closeButton.addEventListener("click", dismissCallback);
1747
+ window.setTimeout(dismissCallback, 20000);
1748
+ }
1435
1749
  return;
1436
1750
  }
1437
1751
 
1438
1752
  //logging event for view not found for test device
1439
- if (!((_window$ApxorRTM = window.ApxorRTM) !== null && _window$ApxorRTM !== void 0 && _window$ApxorRTM.isBadgePresent && (_window$ApxorRTM2 = window.ApxorRTM) !== null && _window$ApxorRTM2 !== void 0 && _window$ApxorRTM2.badgesLists.includes(_this.HaKf) && Apxor.getController().isBadgeTriggerSatisfied(_this.HaKf))) {
1440
- Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_trigger_satisfied", {
1441
- apx_nudge_type: _this.tEDn.FQLi === "SURVEY" ? "survey" : "campaign",
1442
- apx_nudge_id: _this.HaKf,
1443
- apx_nudge_name: _this.tEDn.oMsP,
1444
- apx_variant_code: _this.tEDn._isExperiment || _this.tEDn._only_context ? _this.tEDn._attr[APX_VARIANT_CODE] : "TG"
1445
- });
1446
- }
1447
- console.log("Dispatching event", _this.tEDn.FQLi);
1448
- if (_this.tEDn._only_context === true) {
1449
- Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.tEDn._attr), {}, {
1450
- message_name: _this.tEDn.oMsP,
1451
- id: _this.HaKf
1452
- }));
1453
- }
1753
+
1754
+ console.log("Dispatching event", _this.liLD.ARue);
1755
+
1756
+ //if (this.liLD._only_context === true) {
1757
+ Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({
1758
+ apx_nudge_type: _this.liLD.ARue === "SURVEY" ? "survey" : "campaign",
1759
+ apx_nudge_id: _this.ltQf,
1760
+ apx_nudge_name: _this.liLD.gNrp,
1761
+ apx_variant_code: _this.liLD._isExperiment || _this.liLD._only_context ? _this.liLD._attr[APX_VARIANT_CODE] : "TG"
1762
+ }, _this.liLD._attr), {}, {
1763
+ message_name: _this.liLD.gNrp,
1764
+ id: _this.ltQf
1765
+ }));
1766
+ //}
1454
1767
  // Emit event
1455
- Apxor.getController().dispatchEvent(_this.tEDn.FQLi, {
1456
- name: _this.tEDn.FQLi,
1768
+ Apxor.getController().dispatchEvent(_this.liLD.ARue, {
1769
+ name: _this.liLD.ARue,
1457
1770
  additional_info: {
1458
- uuid: _this.HaKf,
1459
- name: _this.tEDn.oMsP
1771
+ uuid: _this.ltQf,
1772
+ name: _this.liLD.gNrp
1460
1773
  }
1461
1774
  });
1462
1775
  }
1463
1776
  });
1464
- _defineProperty(this, "sGUk", function () {
1465
- var length = _this.OhKQ.length;
1777
+ _defineProperty(this, "puwz", function () {
1778
+ var length = _this.kuIQ.length;
1466
1779
  var isSatisfied = length < 1;
1467
1780
  var combineOperator = "";
1468
1781
  for (var index = 0; index < length; index++) {
1469
- var validator = _this.OhKQ[index];
1470
- var currentResult = validator.qTuv;
1782
+ var validator = _this.kuIQ[index];
1783
+ var currentResult = validator.kpHz;
1471
1784
  if (combineOperator.trim() === "") {
1472
1785
  isSatisfied = currentResult;
1473
1786
  } else {
@@ -1480,23 +1793,23 @@
1480
1793
  break;
1481
1794
  }
1482
1795
  }
1483
- combineOperator = validator.iFER;
1796
+ combineOperator = validator.aCAW;
1484
1797
  }
1485
1798
  if (isSatisfied) {
1486
- console.log("Dispatching event", _this.tEDn.FQLi);
1487
- Apxor.getController().persistTerminationInfoLocally(_this.HaKf);
1488
- if (_this.tEDn._only_context === true) {
1489
- Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.tEDn._attr), {}, {
1490
- message_name: _this.tEDn.oMsP,
1491
- id: _this.HaKf
1799
+ console.log("Dispatching event", _this.liLD.ARue);
1800
+ Apxor.getController().persistTerminationInfoLocally(_this.ltQf);
1801
+ if (_this.liLD._only_context === true) {
1802
+ Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.liLD._attr), {}, {
1803
+ message_name: _this.liLD.gNrp,
1804
+ id: _this.ltQf
1492
1805
  }));
1493
1806
  }
1494
1807
  // Emit event
1495
- Apxor.getController().dispatchEvent(_this.tEDn.FQLi, {
1496
- name: _this.tEDn.FQLi,
1808
+ Apxor.getController().dispatchEvent(_this.liLD.ARue, {
1809
+ name: _this.liLD.ARue,
1497
1810
  additional_info: {
1498
- uuid: _this.HaKf,
1499
- name: _this.tEDn.oMsP
1811
+ uuid: _this.ltQf,
1812
+ name: _this.liLD.gNrp
1500
1813
  }
1501
1814
  });
1502
1815
  }
@@ -1504,23 +1817,34 @@
1504
1817
  _defineProperty(this, "validateForTerminationAttributes", function () {
1505
1818
  var userAttributes = Apxor.getController().getUserAttributes();
1506
1819
  var sessionAttributes = Apxor.getController().getSessionAttributes();
1507
- return _this.aeXK.validate(userAttributes, sessionAttributes);
1820
+ return _this.DhFu.validate(userAttributes, sessionAttributes);
1508
1821
  });
1509
- _defineProperty(this, "fcGL", function () {
1510
- _this.UQKk.fcGL();
1822
+ _defineProperty(this, "GDwW", function () {
1823
+ _this.Sfjv.GDwW();
1511
1824
  });
1512
1825
  _defineProperty(this, "getFrequencyCount", function () {
1513
- return _this.UQKk.getFrequencyCount();
1826
+ return _this.Sfjv.getFrequencyCount();
1827
+ });
1828
+ _defineProperty(this, "PAkQ", function () {
1829
+ return _this.Sfjv.MYCG();
1514
1830
  });
1515
- _defineProperty(this, "MRHT", function () {
1516
- return _this.UQKk.bUYG();
1831
+ _defineProperty(this, "zMgT", function (reason) {
1832
+ var _this$liLD$_attr2;
1833
+ Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_non_eligible_user", {
1834
+ apx_nudge_type: _this.liLD.ARue === "SURVEY" ? "survey" : "campaign",
1835
+ apx_nudge_id: _this.ltQf,
1836
+ apx_nudge_name: _this.liLD.gNrp,
1837
+ apx_variant_code: _this.liLD._isExperiment || _this.liLD._only_context ? (_this$liLD$_attr2 = _this.liLD._attr) === null || _this$liLD$_attr2 === void 0 ? void 0 : _this$liLD$_attr2[APX_VARIANT_CODE] : "TG",
1838
+ apx_failure_type: "warn",
1839
+ apx_reason: reason
1840
+ });
1517
1841
  });
1518
1842
  });
1519
1843
 
1520
1844
  var ConfigLookup = /*#__PURE__*/_createClass(function ConfigLookup() {
1521
1845
  var _this = this;
1522
1846
  _classCallCheck(this, ConfigLookup);
1523
- _defineProperty(this, "FbaP", {});
1847
+ _defineProperty(this, "Uyzu", {});
1524
1848
  _defineProperty(this, "parse", function () {
1525
1849
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
1526
1850
  configs: []
@@ -1543,7 +1867,7 @@
1543
1867
  var configId = _config._id;
1544
1868
  var configItem = new ConfigItem();
1545
1869
  if (configItem.parse(_config)) {
1546
- _this.FbaP[configId] = configItem;
1870
+ _this.Uyzu[configId] = configItem;
1547
1871
  } else {
1548
1872
  console.warn("Failed to parse cfg", configId);
1549
1873
  }
@@ -1551,51 +1875,51 @@
1551
1875
  }
1552
1876
  });
1553
1877
  _defineProperty(this, "validate", function (id, index) {
1554
- if (_this.FbaP[id]) {
1555
- var configItem = _this.FbaP[id];
1556
- configItem.QIaF(index);
1878
+ if (_this.Uyzu[id]) {
1879
+ var configItem = _this.Uyzu[id];
1880
+ configItem.iHps(index);
1557
1881
  }
1558
1882
  });
1559
1883
  _defineProperty(this, "getVariantCode", function (id) {
1560
- if (_this.FbaP[id]) {
1561
- var configItem = _this.FbaP[id];
1884
+ if (_this.Uyzu[id]) {
1885
+ var configItem = _this.Uyzu[id];
1562
1886
  return configItem._variant_code;
1563
1887
  }
1564
1888
  return "";
1565
1889
  });
1566
1890
  _defineProperty(this, "validateForTermination", function (id, index) {
1567
- if (_this.FbaP[id]) {
1568
- var configItem = _this.FbaP[id];
1569
- configItem.rRdK(index);
1891
+ if (_this.Uyzu[id]) {
1892
+ var configItem = _this.Uyzu[id];
1893
+ configItem.ybGY(index);
1570
1894
  }
1571
1895
  });
1572
1896
  _defineProperty(this, "validateForTerminationAttributes", function (id) {
1573
- if (_this.FbaP[id]) {
1574
- var configItem = _this.FbaP[id];
1897
+ if (_this.Uyzu[id]) {
1898
+ var configItem = _this.Uyzu[id];
1575
1899
  return configItem.validateForTerminationAttributes();
1576
1900
  }
1577
1901
  return false;
1578
1902
  });
1579
- _defineProperty(this, "fcGL", function (id) {
1580
- var campiagnConfig = _this.FbaP[id];
1581
- campiagnConfig.fcGL();
1903
+ _defineProperty(this, "GDwW", function (id) {
1904
+ var campiagnConfig = _this.Uyzu[id];
1905
+ campiagnConfig.GDwW();
1582
1906
  });
1583
1907
  _defineProperty(this, "getFrequencyCount", function (id) {
1584
- var campiagnConfig = _this.FbaP[id];
1585
- return campiagnConfig.getFrequencyCount();
1908
+ var campiagnConfig = _this.Uyzu[id];
1909
+ if (campiagnConfig != undefined) return campiagnConfig.getFrequencyCount();
1586
1910
  });
1587
1911
  _defineProperty(this, "resetFrequencyCounts", function () {
1588
- var configs = _this.FbaP;
1912
+ var configs = _this.Uyzu;
1589
1913
  for (var configId in configs) {
1590
- configs[configId].MRHT();
1914
+ configs[configId].PAkQ();
1591
1915
  }
1592
1916
  });
1593
- _defineProperty(this, "BrVD", function (campaignId) {
1917
+ _defineProperty(this, "SeVw", function (campaignId) {
1594
1918
  try {
1595
- if (_this.FbaP) {
1596
- var configItem = _this.FbaP[campaignId];
1597
- if (configItem && configItem.tEDn) {
1598
- return configItem.tEDn;
1919
+ if (_this.Uyzu) {
1920
+ var configItem = _this.Uyzu[campaignId];
1921
+ if (configItem && configItem.liLD) {
1922
+ return configItem.liLD;
1599
1923
  }
1600
1924
  }
1601
1925
  } catch (e) {
@@ -1607,46 +1931,46 @@
1607
1931
 
1608
1932
  var APP_EVENT = "APP_EVENT";
1609
1933
  var CLIENT_EVENT = "CLIENT_EVENT";
1610
- var Logger$9 = window.ApxorLogger;
1934
+ var Logger$a = window.ApxorLogger;
1611
1935
  var EventsListener = /*#__PURE__*/_createClass(function EventsListener() {
1612
1936
  var _this = this;
1613
1937
  _classCallCheck(this, EventsListener);
1614
- _defineProperty(this, "oTRj", {});
1615
- _defineProperty(this, "LSjS", []);
1616
- _defineProperty(this, "pfJM", false);
1938
+ _defineProperty(this, "fSbL", {});
1939
+ _defineProperty(this, "IMYI", []);
1940
+ _defineProperty(this, "kSMC", false);
1617
1941
  _defineProperty(this, "initialize", function () {
1618
1942
  var controller = Apxor.getController();
1619
1943
  controller.registerForEvent(APP_EVENT, function (event) {
1620
- return _this.SbMk(event, "AE");
1944
+ return _this.rJYj(event, "AE");
1621
1945
  });
1622
1946
  controller.registerForEvent(CLIENT_EVENT, function (event) {
1623
- return _this.SbMk(event, "CE");
1947
+ return _this.rJYj(event, "CE");
1624
1948
  });
1625
1949
  });
1626
- _defineProperty(this, "NABs", function () {
1950
+ _defineProperty(this, "DOxG", function () {
1627
1951
  // Clear Buffer
1628
- for (var item in _this.LSjS) {
1629
- _this.NCWL(item.event, item.key, item.type);
1952
+ for (var item in _this.IMYI) {
1953
+ _this.Ugjx(item.event, item.key, item.type);
1630
1954
  }
1631
- _this.pfJM = true;
1955
+ _this.kSMC = true;
1632
1956
  });
1633
- _defineProperty(this, "BusP", function (event, callback) {
1957
+ _defineProperty(this, "KseZ", function (event, callback) {
1634
1958
  if (!isFunction(callback)) {
1635
1959
  return;
1636
1960
  }
1637
1961
  var listeners;
1638
- if (_this.oTRj[event]) {
1639
- listeners = _this.oTRj[event];
1962
+ if (_this.fSbL[event]) {
1963
+ listeners = _this.fSbL[event];
1640
1964
  } else {
1641
1965
  listeners = [];
1642
1966
  }
1643
1967
  listeners.push(callback);
1644
- _this.oTRj[event] = listeners;
1645
- Logger$9.debug("Listeners list: ", _this.oTRj);
1968
+ _this.fSbL[event] = listeners;
1969
+ Logger$a.debug("Listeners list: ", _this.fSbL);
1646
1970
  });
1647
1971
  _defineProperty(this, "unregisterFromEvent", function (event, callback) {
1648
- if (_this.oTRj[event]) {
1649
- var listeners = _this.oTRj[event];
1972
+ if (_this.fSbL[event]) {
1973
+ var listeners = _this.fSbL[event];
1650
1974
  var updatedListeners = [];
1651
1975
  for (var index = 0; index < listeners.length; index++) {
1652
1976
  var listener = listeners[index];
@@ -1654,25 +1978,25 @@
1654
1978
  updatedListeners.push(listener);
1655
1979
  }
1656
1980
  }
1657
- _this.oTRj[event] = updatedListeners;
1981
+ _this.fSbL[event] = updatedListeners;
1658
1982
  }
1659
1983
  });
1660
- _defineProperty(this, "SbMk", function (event) {
1984
+ _defineProperty(this, "rJYj", function (event) {
1661
1985
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "AE";
1662
1986
  var key = type + "___" + event.name;
1663
- _this.NCWL(event, key, type);
1987
+ _this.Ugjx(event, key, type);
1664
1988
  });
1665
- _defineProperty(this, "NCWL", function (event, key, type) {
1666
- if (!_this.pfJM) {
1667
- _this.LSjS.push({
1989
+ _defineProperty(this, "Ugjx", function (event, key, type) {
1990
+ if (!_this.kSMC) {
1991
+ _this.IMYI.push({
1668
1992
  event: event,
1669
1993
  key: key,
1670
1994
  type: type
1671
1995
  });
1672
1996
  } else {
1673
- Logger$9.debug("Notifying listeners for event: " + event + ", " + key, _this.oTRj);
1674
- if (_this.oTRj[key]) {
1675
- var listeners = _this.oTRj[key];
1997
+ Logger$a.debug("Notifying listeners for event: " + event + ", " + key, _this.fSbL);
1998
+ if (_this.fSbL[key]) {
1999
+ var listeners = _this.fSbL[key];
1676
2000
  var time = Apxor.getController().getSDKRunningTimeInSec();
1677
2001
  for (var index = 0; index < listeners.length; index++) {
1678
2002
  var listener = listeners[index];
@@ -1683,22 +2007,22 @@
1683
2007
  });
1684
2008
  });
1685
2009
 
1686
- var Logger$a = window.ApxorLogger;
2010
+ var Logger$b = window.ApxorLogger;
1687
2011
  var CE = /*#__PURE__*/function () {
1688
2012
  function CE() {
1689
2013
  var _this = this;
1690
2014
  _classCallCheck(this, CE);
1691
- _defineProperty(this, "rstJ", false);
1692
- _defineProperty(this, "OuiB", null);
1693
- _defineProperty(this, "PyGg", getDateInDDMMYYYY());
1694
- _defineProperty(this, "qhQM", new EventsListener());
1695
- _defineProperty(this, "hZaK", Apxor.getSiteId());
2015
+ _defineProperty(this, "VIBl", false);
2016
+ _defineProperty(this, "Bbtb", null);
2017
+ _defineProperty(this, "RhAp", getDateInDDMMYYYY());
2018
+ _defineProperty(this, "oHjc", new EventsListener());
2019
+ _defineProperty(this, "KoPV", Apxor.getSiteId());
1696
2020
  _defineProperty(this, "_qeState", {});
1697
2021
  _defineProperty(this, "getQeState", function () {
1698
2022
  try {
1699
2023
  var data = Apxor.getController().getFromStorage(QE_STATE);
1700
2024
  if (data) {
1701
- return JSON.parse(decode(_this.hZaK, data));
2025
+ return JSON.parse(decode(_this.KoPV, data));
1702
2026
  } else {
1703
2027
  _this._qeState = {};
1704
2028
  return _this.setQeState();
@@ -1727,12 +2051,12 @@
1727
2051
  return _this._qeState;
1728
2052
  });
1729
2053
  _defineProperty(this, "initialize", function () {
1730
- if (!_this.rstJ) {
1731
- _this.rstJ = true;
1732
- _this.OuiB = new ConfigLookup();
1733
- _this.qhQM.initialize();
2054
+ if (!_this.VIBl) {
2055
+ _this.VIBl = true;
2056
+ _this.Bbtb = new ConfigLookup();
2057
+ _this.oHjc.initialize();
1734
2058
  _this._qeState = _this.getQeState();
1735
- Logger$a.info("QE Initialized..");
2059
+ Logger$b.info("QE Initialized..");
1736
2060
  }
1737
2061
  });
1738
2062
  /**
@@ -1741,12 +2065,12 @@
1741
2065
  * @param config
1742
2066
  */
1743
2067
  _defineProperty(this, "parse", function (config) {
1744
- if (!_this.QLjA()) {
1745
- Logger$a.warn("Must call init first. Unable to proceed");
2068
+ if (!_this.ZTGF()) {
2069
+ Logger$b.warn("Must call init first. Unable to proceed");
1746
2070
  return;
1747
2071
  }
1748
- _this.OuiB.parse(config);
1749
- _this.qhQM.NABs();
2072
+ _this.Bbtb.parse(config);
2073
+ _this.oHjc.DOxG();
1750
2074
  });
1751
2075
  /**
1752
2076
  * Validates all conditions for given config ID
@@ -1755,22 +2079,22 @@
1755
2079
  * @param index
1756
2080
  */
1757
2081
  _defineProperty(this, "validate", function (id, index) {
1758
- if (!_this.QLjA()) {
2082
+ if (!_this.ZTGF()) {
1759
2083
  return;
1760
2084
  }
1761
- _this.OuiB.validate(id, index);
2085
+ _this.Bbtb.validate(id, index);
1762
2086
  });
1763
2087
  _defineProperty(this, "getVariantCode", function (id) {
1764
- return _this.OuiB.getVariantCode(id);
2088
+ return _this.Bbtb.getVariantCode(id);
1765
2089
  });
1766
2090
  _defineProperty(this, "validateForTermination", function (id, index) {
1767
- if (!_this.QLjA()) {
2091
+ if (!_this.ZTGF()) {
1768
2092
  return;
1769
2093
  }
1770
- _this.OuiB.validateForTermination(id, index);
2094
+ _this.Bbtb.validateForTermination(id, index);
1771
2095
  });
1772
2096
  _defineProperty(this, "validateForTerminationAttributes", function (user, session) {
1773
- return _this.OuiB.validateForTerminationAttributes(user, session);
2097
+ return _this.Bbtb.validateForTerminationAttributes(user, session);
1774
2098
  });
1775
2099
  _defineProperty(this, "updateCount", function (id) {
1776
2100
  try {
@@ -1779,25 +2103,25 @@
1779
2103
  }
1780
2104
  _this.incrementFrequencies(id);
1781
2105
  _this.setQeState(id);
1782
- _this.OuiB.fcGL(id);
2106
+ _this.Bbtb.GDwW(id);
1783
2107
  } catch (e) {
1784
2108
  console.log("Could not update the count config:".concat(e));
1785
2109
  }
1786
2110
  });
1787
2111
  _defineProperty(this, "resetFrequencyCounts", function () {
1788
- _this.OuiB.resetFrequencyCounts();
2112
+ _this.Bbtb.resetFrequencyCounts();
1789
2113
  });
1790
2114
  _defineProperty(this, "getFrequencyCount", function (id) {
1791
- return _this.OuiB.getFrequencyCount(id);
2115
+ return _this.Bbtb.getFrequencyCount(id);
1792
2116
  });
1793
2117
  _defineProperty(this, "registerForEvent", function (event, callback) {
1794
- _this.qhQM.BusP(event, callback);
2118
+ _this.oHjc.KseZ(event, callback);
1795
2119
  });
1796
2120
  _defineProperty(this, "unregisterFromEvent", function (event, callback) {
1797
- _this.qhQM.unregisterFromEvent(event, callback);
2121
+ _this.oHjc.unregisterFromEvent(event, callback);
1798
2122
  });
1799
2123
  _defineProperty(this, "notifyEventListener", function (event) {
1800
- _this.qhQM.SbMk(event);
2124
+ _this.oHjc.rJYj(event);
1801
2125
  });
1802
2126
  /**
1803
2127
  * Fetches the config from Server
@@ -1810,14 +2134,14 @@
1810
2134
  _defineProperty(this, "fetch", function (type, validateUrl, apiUrl, callback) {
1811
2135
  Apxor.getController().fetchConfiguration(type, validateUrl, apiUrl, callback);
1812
2136
  });
1813
- _defineProperty(this, "QLjA", function () {
1814
- return _this.rstJ;
2137
+ _defineProperty(this, "ZTGF", function () {
2138
+ return _this.VIBl;
1815
2139
  });
1816
2140
  _defineProperty(this, "getCampaignMetaFromQueryEngine", function (campaignId) {
1817
- return _this.OuiB.BrVD(campaignId);
2141
+ return _this.Bbtb.SeVw(campaignId);
1818
2142
  });
1819
- _defineProperty(this, "tmiN", function () {
1820
- return _this.PyGg;
2143
+ _defineProperty(this, "CoFi", function () {
2144
+ return _this.RhAp;
1821
2145
  });
1822
2146
  if (!CE.instance) {
1823
2147
  CE.instance = this;
@@ -1841,11 +2165,11 @@
1841
2165
  OVERALL: 0,
1842
2166
  DATES: {}
1843
2167
  };
1844
- if (this.PyGg) this._qeState[id].DATES[this.PyGg] = 0;
2168
+ if (this.RhAp) this._qeState[id].DATES[this.RhAp] = 0;
1845
2169
  this.setQeState(id);
1846
2170
  }
1847
2171
  } catch (e) {
1848
- Logger$a.error("Can not create the frequency count object:" + e);
2172
+ Logger$b.error("Can not create the frequency count object:" + e);
1849
2173
  }
1850
2174
  }
1851
2175
  }, {
@@ -1860,12 +2184,12 @@
1860
2184
 
1861
2185
  // Increment the DATES count for this particular date by 1. If the date changes reset.
1862
2186
  var currentDate = getDateInDDMMYYYY();
1863
- if (currentDate !== this.PyGg || !(configFrequency.DATES && configFrequency.DATES[currentDate])) {
1864
- this.PyGg = currentDate;
2187
+ if (currentDate !== this.RhAp || !(configFrequency.DATES && configFrequency.DATES[currentDate])) {
2188
+ this.RhAp = currentDate;
1865
2189
  configFrequency.DATES = {};
1866
- configFrequency.DATES[this.PyGg] = 0;
2190
+ configFrequency.DATES[this.RhAp] = 0;
1867
2191
  }
1868
- configFrequency.DATES[this.PyGg] = configFrequency.DATES[this.PyGg] + 1;
2192
+ configFrequency.DATES[this.RhAp] = configFrequency.DATES[this.RhAp] + 1;
1869
2193
  }
1870
2194
  }], [{
1871
2195
  key: "getInstance",