apxor-qe 1.2.1-qa.0 → 1.2.1

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.
@@ -238,16 +238,16 @@
238
238
  var Audience = /*#__PURE__*/_createClass(function Audience() {
239
239
  var _this = this;
240
240
  _classCallCheck(this, Audience);
241
- _defineProperty(this, "iFUh", "ALL");
242
- _defineProperty(this, "PZkA", []);
243
- _defineProperty(this, "BJFI", []);
241
+ _defineProperty(this, "ivYh", "ALL");
242
+ _defineProperty(this, "swAi", []);
243
+ _defineProperty(this, "Cgrz", []);
244
244
  _defineProperty(this, "parse", function () {
245
245
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
246
246
  try {
247
- _this.iFUh = config.audience.audience_type;
248
- _this.PZkA = config.audience.attributes.user;
249
- _this.BJFI = config.audience.attributes.session;
250
- if (!Array.isArray(_this.PZkA) || !Array.isArray(_this.BJFI)) {
247
+ _this.ivYh = config.audience.audience_type;
248
+ _this.swAi = config.audience.attributes.user;
249
+ _this.Cgrz = config.audience.attributes.session;
250
+ if (!Array.isArray(_this.swAi) || !Array.isArray(_this.Cgrz)) {
251
251
  Logger.error("No attributes");
252
252
  return false;
253
253
  }
@@ -259,12 +259,12 @@
259
259
  });
260
260
  _defineProperty(this, "validate", function (user, session) {
261
261
  var status = true;
262
- if (_this.iFUh === "FTU") {
262
+ if (_this.ivYh === "FTU") {
263
263
  status = Apxor.getController().getSessionInfo().is_first_session;
264
264
  }
265
- return status && _this.yYES(user, _this.PZkA) && _this.yYES(session, _this.BJFI);
265
+ return status && _this.aGEF(user, _this.swAi) && _this.aGEF(session, _this.Cgrz);
266
266
  });
267
- _defineProperty(this, "yYES", function (attributes, expected) {
267
+ _defineProperty(this, "aGEF", function (attributes, expected) {
268
268
  var length = expected.length;
269
269
  var status = true;
270
270
  try {
@@ -315,34 +315,34 @@
315
315
  var Frequency = /*#__PURE__*/_createClass(function Frequency() {
316
316
  var _this = this;
317
317
  _classCallCheck(this, Frequency);
318
- _defineProperty(this, "EryT", 0);
319
- _defineProperty(this, "bBzm", 0);
320
- _defineProperty(this, "DTlJ", "SESSION");
321
- _defineProperty(this, "pkwS", 0);
322
- _defineProperty(this, "QpXP", 0);
323
- _defineProperty(this, "SMdK", 0);
318
+ _defineProperty(this, "QbNu", 0);
319
+ _defineProperty(this, "Ahfz", 0);
320
+ _defineProperty(this, "LAYA", "SESSION");
321
+ _defineProperty(this, "BUyy", 0);
322
+ _defineProperty(this, "xPGq", 0);
323
+ _defineProperty(this, "jvRb", 0);
324
324
  _defineProperty(this, "parse", function () {
325
325
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
326
326
  try {
327
- _this.EryT = config.frequency.count;
328
- _this.SMdK = _this.EryT;
329
- _this.bBzm = config.frequency.time_interval;
330
- _this.DTlJ = config.frequency.validity;
331
- _this.QpXP = config.frequency.ses_lmt;
327
+ _this.QbNu = config.frequency.count;
328
+ _this.jvRb = _this.QbNu;
329
+ _this.Ahfz = config.frequency.time_interval;
330
+ _this.LAYA = config.frequency.validity;
331
+ _this.xPGq = config.frequency.ses_lmt;
332
332
  _this._dayCount = config.frequency.day_lmt;
333
333
  // let data = Apxor.getController().getFromStorage(QE_STATE);
334
334
  // let qe_state = JSON.parse(decode(Apxor.getSiteId(), data));
335
335
  var qe_state = CE.getInstance().getQeState();
336
336
  if (!isDefined(qe_state) || !isDefined(qe_state[config._id])) return true;
337
- if (_this.DTlJ === "SESSION") {
338
- _this.EryT = parseInt(_this.EryT) - parseInt(qe_state[config._id]["SESSION"]);
339
- if (_this.EryT <= 0) {
337
+ if (_this.LAYA === "SESSION") {
338
+ _this.QbNu = parseInt(_this.QbNu) - parseInt(qe_state[config._id]["SESSION"]);
339
+ if (_this.QbNu <= 0) {
340
340
  console.warn("Max count limit reached for session:" + config._id);
341
341
  return false;
342
342
  }
343
- } else if (_this.DTlJ === "OVERALL") {
344
- _this.EryT = parseInt(_this.EryT) - parseInt(qe_state[config._id]["OVERALL"]);
345
- if (_this.EryT <= 0) {
343
+ } else if (_this.LAYA === "OVERALL") {
344
+ _this.QbNu = parseInt(_this.QbNu) - parseInt(qe_state[config._id]["OVERALL"]);
345
+ if (_this.QbNu <= 0) {
346
346
  console.warn("Max count limit reached for overall:" + config._id);
347
347
  return false;
348
348
  }
@@ -356,28 +356,28 @@
356
356
  }
357
357
  return true;
358
358
  });
359
- _defineProperty(this, "CgAS", function () {
360
- _this.EryT = _this.EryT - 1;
359
+ _defineProperty(this, "cnxa", function () {
360
+ _this.QbNu = _this.QbNu - 1;
361
361
  });
362
362
  _defineProperty(this, "getFrequencyCount", function () {
363
- return _this.EryT;
363
+ return _this.QbNu;
364
364
  });
365
- _defineProperty(this, "ihJn", function () {
366
- if (_this.DTlJ === "SESSION") {
367
- _this.EryT = _this.SMdK;
365
+ _defineProperty(this, "zibq", function () {
366
+ if (_this.LAYA === "SESSION") {
367
+ _this.QbNu = _this.jvRb;
368
368
  Logger$1.info("Campaign Limit reset");
369
369
  }
370
370
  });
371
371
  /**
372
- * @function fmBg
372
+ * @function Yfir
373
373
  * @description Validates if the campaign count is with in the limits set in the config.
374
374
  * @param {string} Config id
375
375
  * @returns {boolean} true - If the Campaign limits are not reached
376
376
  * false - Otherwise
377
377
  */
378
- _defineProperty(this, "fmBg", function (id) {
378
+ _defineProperty(this, "Yfir", function (id) {
379
379
  try {
380
- if (_this.EryT <= 0) {
380
+ if (_this.QbNu <= 0) {
381
381
  return false;
382
382
  }
383
383
 
@@ -388,8 +388,8 @@
388
388
  if (!isDefined(qe_state) || !isDefined(qe_state[id])) return true;
389
389
 
390
390
  //If the config has a session count limit set
391
- if (_this.QpXP !== 0) {
392
- var sessionCountInConfig = parseInt(_this.QpXP);
391
+ if (_this.xPGq !== 0) {
392
+ var sessionCountInConfig = parseInt(_this.xPGq);
393
393
  var thisSessionCount = parseInt(qe_state[id]["SESSION"]);
394
394
  if (sessionCountInConfig - thisSessionCount <= 0) {
395
395
  return false;
@@ -416,14 +416,14 @@
416
416
  var Meta = /*#__PURE__*/_createClass(function Meta() {
417
417
  var _this = this;
418
418
  _classCallCheck(this, Meta);
419
- _defineProperty(this, "UJen", "");
420
- _defineProperty(this, "iFUh", "");
419
+ _defineProperty(this, "vaGr", "");
420
+ _defineProperty(this, "ivYh", "");
421
421
  _defineProperty(this, "parse", function () {
422
422
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
423
423
  try {
424
424
  var _config$meta;
425
- _this.UJen = config.meta.name;
426
- _this.iFUh = config.meta.type;
425
+ _this.vaGr = config.meta.name;
426
+ _this.ivYh = config.meta.type;
427
427
  _this._only_context = config.meta.only_context;
428
428
  _this._attr = ((_config$meta = config.meta) === null || _config$meta === void 0 ? void 0 : _config$meta.attr) || {};
429
429
  } catch (error) {
@@ -438,11 +438,11 @@
438
438
  var Validity = /*#__PURE__*/_createClass(function Validity() {
439
439
  var _this = this;
440
440
  _classCallCheck(this, Validity);
441
- _defineProperty(this, "ABuC", -1);
442
- _defineProperty(this, "NvKk", -1);
443
- _defineProperty(this, "tbvE", -1);
444
- _defineProperty(this, "ImUl", -1);
445
- _defineProperty(this, "BXRW", false);
441
+ _defineProperty(this, "kvkt", -1);
442
+ _defineProperty(this, "lgIh", -1);
443
+ _defineProperty(this, "CYCz", -1);
444
+ _defineProperty(this, "Qhzg", -1);
445
+ _defineProperty(this, "qZSX", false);
446
446
  _defineProperty(this, "parse", function () {
447
447
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
448
448
  try {
@@ -450,17 +450,17 @@
450
450
  Logger$2.error("Not valid dates");
451
451
  return false;
452
452
  }
453
- _this.ABuC = Date.parse(config.validity.start_date);
454
- _this.NvKk = Date.parse(config.validity.end_date);
453
+ _this.kvkt = Date.parse(config.validity.start_date);
454
+ _this.lgIh = Date.parse(config.validity.end_date);
455
455
  if (isDefined(config.time_limits_in_day)) {
456
- _this.BXRW = config.time_limits_in_day;
457
- if (_this.BXRW && isDefined(config.time_limits)) {
456
+ _this.qZSX = config.time_limits_in_day;
457
+ if (_this.qZSX && isDefined(config.time_limits)) {
458
458
  var currentDate = new Date().toISOString().split("T")[0];
459
- _this.tbvE = Date.parse(currentDate + "T" + config.time_limits.start_time + ".000Z");
460
- _this.ImUl = Date.parse(currentDate + "T" + config.time_limits.end_time + ".000Z");
459
+ _this.CYCz = Date.parse(currentDate + "T" + config.time_limits.start_time + ".000Z");
460
+ _this.Qhzg = Date.parse(currentDate + "T" + config.time_limits.end_time + ".000Z");
461
461
 
462
462
  // If invalid format is passed, return false
463
- if (isNaN(_this.tbvE) || isNaN(_this.ImUl)) {
463
+ if (isNaN(_this.CYCz) || isNaN(_this.Qhzg)) {
464
464
  Logger$2.error("Not valid times");
465
465
  return false;
466
466
  }
@@ -474,8 +474,8 @@
474
474
  });
475
475
  _defineProperty(this, "validate", function () {
476
476
  var currentTime = Date.now();
477
- if (currentTime > _this.ABuC && currentTime < _this.NvKk) {
478
- return !_this.BXRW || currentTime >= _this.tbvE && currentTime <= _this.ImUl;
477
+ if (currentTime > _this.kvkt && currentTime < _this.lgIh) {
478
+ return !_this.qZSX || currentTime >= _this.CYCz && currentTime <= _this.Qhzg;
479
479
  }
480
480
  return false;
481
481
  });
@@ -484,13 +484,13 @@
484
484
  var Details = /*#__PURE__*/_createClass(function Details() {
485
485
  var _this = this;
486
486
  _classCallCheck(this, Details);
487
- _defineProperty(this, "UJen", "");
488
- _defineProperty(this, "siFg", {});
487
+ _defineProperty(this, "vaGr", "");
488
+ _defineProperty(this, "xhRu", {});
489
489
  _defineProperty(this, "parse", function () {
490
490
  var details = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
491
491
  try {
492
- _this.UJen = details.name;
493
- _this.siFg = details.additional_info;
492
+ _this.vaGr = details.name;
493
+ _this.xhRu = details.additional_info;
494
494
  } catch (error) {
495
495
  return false;
496
496
  }
@@ -501,14 +501,14 @@
501
501
  var Timebounds = /*#__PURE__*/_createClass(function Timebounds() {
502
502
  var _this = this;
503
503
  _classCallCheck(this, Timebounds);
504
- _defineProperty(this, "qpBO", 0);
505
- _defineProperty(this, "bNgD", 0);
504
+ _defineProperty(this, "TNxD", 0);
505
+ _defineProperty(this, "kxyu", 0);
506
506
  _defineProperty(this, "parse", function () {
507
507
  var timeBounds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
508
508
  try {
509
- _this.qpBO = Number(timeBounds.lower);
510
- _this.bNgD = Number(timeBounds.upper);
511
- if (isNaN(_this.qpBO) || isNaN(_this.bNgD)) {
509
+ _this.TNxD = Number(timeBounds.lower);
510
+ _this.kxyu = Number(timeBounds.upper);
511
+ if (isNaN(_this.TNxD) || isNaN(_this.kxyu)) {
512
512
  return false;
513
513
  }
514
514
  } catch (error) {
@@ -521,17 +521,17 @@
521
521
  var PreCondition = /*#__PURE__*/_createClass(function PreCondition() {
522
522
  var _this = this;
523
523
  _classCallCheck(this, PreCondition);
524
- _defineProperty(this, "PJzC", 0);
525
- _defineProperty(this, "ZTfT", "");
526
- _defineProperty(this, "VrGK", "");
527
- _defineProperty(this, "AEID", new Details());
528
- _defineProperty(this, "siCr", new Timebounds());
524
+ _defineProperty(this, "zXLB", 0);
525
+ _defineProperty(this, "VlYY", "");
526
+ _defineProperty(this, "SiPE", "");
527
+ _defineProperty(this, "ScWj", new Details());
528
+ _defineProperty(this, "eLLb", new Timebounds());
529
529
  _defineProperty(this, "parse", function () {
530
530
  var precondition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
531
531
  try {
532
- _this.ZTfT = precondition.event_type;
533
- _this.VrGK = precondition.activity;
534
- return _this.AEID.parse(precondition.details) && _this.siCr.parse(precondition.time_bounds);
532
+ _this.VlYY = precondition.event_type;
533
+ _this.SiPE = precondition.activity;
534
+ return _this.ScWj.parse(precondition.details) && _this.eLLb.parse(precondition.time_bounds);
535
535
  } catch (error) {
536
536
  return false;
537
537
  }
@@ -542,29 +542,29 @@
542
542
  var Condition = /*#__PURE__*/_createClass(function Condition() {
543
543
  var _this = this;
544
544
  _classCallCheck(this, Condition);
545
- _defineProperty(this, "PJzC", 0);
546
- _defineProperty(this, "vOzK", -1);
547
- _defineProperty(this, "EryT", 0);
548
- _defineProperty(this, "rxsh", "");
549
- _defineProperty(this, "VrGK", "");
550
- _defineProperty(this, "ZTfT", "");
551
- _defineProperty(this, "siCr", new Timebounds());
552
- _defineProperty(this, "AEID", new Details());
553
- _defineProperty(this, "CuHY", new PreCondition());
554
- _defineProperty(this, "kJkn", "AND");
555
- _defineProperty(this, "NFIW", false);
556
- _defineProperty(this, "iFUh", void 0);
545
+ _defineProperty(this, "zXLB", 0);
546
+ _defineProperty(this, "GiHC", -1);
547
+ _defineProperty(this, "QbNu", 0);
548
+ _defineProperty(this, "Gpim", "");
549
+ _defineProperty(this, "SiPE", "");
550
+ _defineProperty(this, "VlYY", "");
551
+ _defineProperty(this, "eLLb", new Timebounds());
552
+ _defineProperty(this, "ScWj", new Details());
553
+ _defineProperty(this, "GiPO", new PreCondition());
554
+ _defineProperty(this, "SIXE", "AND");
555
+ _defineProperty(this, "fJlK", false);
556
+ _defineProperty(this, "ivYh", void 0);
557
557
  _defineProperty(this, "parse", function () {
558
558
  var condition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
559
559
  try {
560
- _this.vOzK = condition.sequence;
561
- _this.EryT = condition.count_config.count;
562
- _this.rxsh = condition.count_config.operator;
563
- _this.VrGK = condition.activity;
564
- _this.ZTfT = condition.event_type;
565
- _this.kJkn = condition.combine_operator;
566
- _this.iFUh = condition.type;
567
- return _this.AEID.parse(condition.details) && _this.CuHY.parse(condition.trigger) && _this.siCr.parse(condition.time_bounds);
560
+ _this.GiHC = condition.sequence;
561
+ _this.QbNu = condition.count_config.count;
562
+ _this.Gpim = condition.count_config.operator;
563
+ _this.SiPE = condition.activity;
564
+ _this.VlYY = condition.event_type;
565
+ _this.SIXE = condition.combine_operator;
566
+ _this.ivYh = condition.type;
567
+ return _this.ScWj.parse(condition.details) && _this.GiPO.parse(condition.trigger) && _this.eLLb.parse(condition.time_bounds);
568
568
  } catch (error) {
569
569
  Logger$3.error(error);
570
570
  return false;
@@ -578,19 +578,19 @@
578
578
  function ConditionValidator() {
579
579
  var _this = this;
580
580
  _classCallCheck(this, ConditionValidator);
581
- _defineProperty(this, "xfkt", 0);
582
- _defineProperty(this, "kQmq", "");
583
- _defineProperty(this, "xogN", new Condition());
584
- _defineProperty(this, "MAdD", false);
585
- _defineProperty(this, "fjVn", false);
586
- _defineProperty(this, "fDne", 0);
587
- _defineProperty(this, "kJkn", "AND");
588
- _defineProperty(this, "RofU", -1);
589
- _defineProperty(this, "aJDv", []);
590
- _defineProperty(this, "YPme", {});
591
- _defineProperty(this, "mhrT", false);
581
+ _defineProperty(this, "WuXg", 0);
582
+ _defineProperty(this, "VZgC", "");
583
+ _defineProperty(this, "jrHz", new Condition());
584
+ _defineProperty(this, "HpgP", false);
585
+ _defineProperty(this, "jNsl", false);
586
+ _defineProperty(this, "pyWB", 0);
587
+ _defineProperty(this, "SIXE", "AND");
588
+ _defineProperty(this, "NQJv", -1);
589
+ _defineProperty(this, "lQVv", []);
590
+ _defineProperty(this, "lajT", {});
591
+ _defineProperty(this, "TgUk", false);
592
592
  /**
593
- * If respectSequence is true, don't auto-fggZ to events except for the condition whose index is 0
593
+ * If respectSequence is true, don't auto-jirn to events except for the condition whose index is 0
594
594
  *
595
595
  * @param condition
596
596
  * @param type
@@ -605,155 +605,155 @@
605
605
  var index = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
606
606
  var respectSequence = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
607
607
  var noKpiArray = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
608
- _this.kQmq = id;
609
- _this.fDne = index;
610
- _this.aJDv = noKpiArray;
611
- var result = _this.xogN.parse(condition);
608
+ _this.VZgC = id;
609
+ _this.pyWB = index;
610
+ _this.lQVv = noKpiArray;
611
+ var result = _this.jrHz.parse(condition);
612
612
  if (result) {
613
- _this.kJkn = _this.xogN.kJkn;
613
+ _this.SIXE = _this.jrHz.SIXE;
614
614
 
615
615
  // FIXME: Why this code is written? Don't see any usecase
616
- if (_this.xogN.NFIW) {
617
- var eventName = _this.xogN.AEID.UJen;
616
+ if (_this.jrHz.fJlK) {
617
+ var eventName = _this.jrHz.ScWj.vaGr;
618
618
  if (eventName === "APX_PAGE_OPENED") {
619
- eventName = _this.xogN.AEID.siFg["navigation_id"];
620
- eventName = isDefined(eventName) ? eventName : _this.xogN.AEID.UJen;
619
+ eventName = _this.jrHz.ScWj.xhRu["navigation_id"];
620
+ eventName = isDefined(eventName) ? eventName : _this.jrHz.ScWj.vaGr;
621
621
  }
622
- _this.RofU = Apxor.getController().getEventCount(eventName);
623
- var count = _this.xogN.EryT;
624
- var operator = _this.xogN.rxsh;
625
- _this.fjVn = _this.FIzB(_this.RofU - 1, count, operator, false);
626
- _this.MAdD = _this.fjVn;
627
- // If the condition is already satisfied and if it is page view, no need to fggZ
622
+ _this.NQJv = Apxor.getController().getEventCount(eventName);
623
+ var count = _this.jrHz.QbNu;
624
+ var operator = _this.jrHz.Gpim;
625
+ _this.jNsl = _this.HeFJ(_this.NQJv - 1, count, operator, false);
626
+ _this.HpgP = _this.jNsl;
627
+ // If the condition is already satisfied and if it is page view, no need to jirn
628
628
  // This only applies for NAVIGATION_EVENTS
629
- if (_this.fjVn && _this.xogN.AEID.UJen === "APX_PAGE_OPENED") {
629
+ if (_this.jNsl && _this.jrHz.ScWj.vaGr === "APX_PAGE_OPENED") {
630
630
  return true;
631
631
  }
632
632
  }
633
633
  if (!respectSequence || index === 0) {
634
- _this.fggZ();
634
+ _this.jirn();
635
635
  }
636
636
  return true;
637
637
  }
638
638
  return false;
639
639
  });
640
- _defineProperty(this, "fggZ", function () {
641
- var condition = _this.xogN;
642
- var precondition = condition.CuHY;
640
+ _defineProperty(this, "jirn", function () {
641
+ var condition = _this.jrHz;
642
+ var precondition = condition.GiPO;
643
643
  var ceInstance = CE.getInstance();
644
- if (precondition.ZTfT === "app_start") {
645
- _this.MAdD = true;
646
- ceInstance.registerForEvent(generateKey(condition.ZTfT) + "___" + condition.AEID.UJen, _this.XBGa);
644
+ if (precondition.VlYY === "app_start") {
645
+ _this.HpgP = true;
646
+ ceInstance.registerForEvent(generateKey(condition.VlYY) + "___" + condition.ScWj.vaGr, _this.yfLP);
647
647
  } else {
648
- ceInstance.registerForEvent(generateKey(condition.ZTfT) + "___" + precondition.AEID.UJen, _this.XBGa);
648
+ ceInstance.registerForEvent(generateKey(condition.VlYY) + "___" + precondition.ScWj.vaGr, _this.yfLP);
649
649
  }
650
650
  });
651
- _defineProperty(this, "CflY", function (type, name, time, additionalInfo) {
652
- var _this$xogN, _this$xogN$_det, _this$xogN$_det2;
651
+ _defineProperty(this, "vMTP", function (type, name, time, additionalInfo) {
652
+ var _this$jrHz, _this$jrHz$_det, _this$jrHz$_det2;
653
653
  var eventTime = Date.now();
654
- var time_differnce = (eventTime - _this.YPme[name]) / 1000;
655
- var time_fromConfig = ((_this$xogN = _this.xogN) === null || _this$xogN === void 0 ? void 0 : (_this$xogN$_det = _this$xogN.AEID) === null || _this$xogN$_det === void 0 ? void 0 : (_this$xogN$_det2 = _this$xogN$_det.siFg) === null || _this$xogN$_det2 === void 0 ? void 0 : _this$xogN$_det2.time) / 1000;
654
+ var time_differnce = (eventTime - _this.lajT[name]) / 1000;
655
+ var time_fromConfig = ((_this$jrHz = _this.jrHz) === null || _this$jrHz === void 0 ? void 0 : (_this$jrHz$_det = _this$jrHz.ScWj) === null || _this$jrHz$_det === void 0 ? void 0 : (_this$jrHz$_det2 = _this$jrHz$_det.xhRu) === null || _this$jrHz$_det2 === void 0 ? void 0 : _this$jrHz$_det2.time) / 1000;
656
656
  if (time_fromConfig > time_differnce) {
657
657
  _this._displayCampaign(time);
658
658
  }
659
659
  });
660
- _defineProperty(this, "YiQd", function (type, name, time, additionalInfo) {
660
+ _defineProperty(this, "xJxT", function (type, name, time, additionalInfo) {
661
661
  var _this$_condition2, _this$_condition2$_pr, _this$_condition3, _this$_condition3$_de, _this$_condition3$_de2;
662
- _this.mhrT = true;
662
+ _this.TgUk = true;
663
663
  var currentTime = Date.now();
664
- var eventName = (_this$_condition2 = _this.xogN) === null || _this$_condition2 === void 0 ? void 0 : (_this$_condition2$_pr = _this$_condition2.CuHY) === null || _this$_condition2$_pr === void 0 ? void 0 : _this$_condition2$_pr.AEID.UJen;
665
- var eventTime = _this.YPme[eventName];
664
+ var eventName = (_this$_condition2 = _this.jrHz) === null || _this$_condition2 === void 0 ? void 0 : (_this$_condition2$_pr = _this$_condition2.GiPO) === null || _this$_condition2$_pr === void 0 ? void 0 : _this$_condition2$_pr.ScWj.vaGr;
665
+ var eventTime = _this.lajT[eventName];
666
666
  var time_differnce = (currentTime - eventTime) / 1000;
667
- var time_fromConfig = (_this$_condition3 = _this.xogN) === null || _this$_condition3 === void 0 ? void 0 : (_this$_condition3$_de = _this$_condition3.AEID) === null || _this$_condition3$_de === void 0 ? void 0 : (_this$_condition3$_de2 = _this$_condition3$_de.siFg) === null || _this$_condition3$_de2 === void 0 ? void 0 : _this$_condition3$_de2.time;
667
+ var time_fromConfig = (_this$_condition3 = _this.jrHz) === null || _this$_condition3 === void 0 ? void 0 : (_this$_condition3$_de = _this$_condition3.ScWj) === null || _this$_condition3$_de === void 0 ? void 0 : (_this$_condition3$_de2 = _this$_condition3$_de.xhRu) === null || _this$_condition3$_de2 === void 0 ? void 0 : _this$_condition3$_de2.time;
668
668
  time_fromConfig = time_fromConfig / 1000;
669
669
  if (time_fromConfig > time_differnce) {
670
670
  _this._displayCampaign(time);
671
671
  }
672
672
  //unregister the event
673
673
  });
674
- _defineProperty(this, "XBGa", function (type, name, time, additionalInfo) {
674
+ _defineProperty(this, "yfLP", function (type, name, time, additionalInfo) {
675
675
  var ceInstance = CE.getInstance();
676
- if (!_this.MAdD) {
676
+ if (!_this.HpgP) {
677
677
  // Validate Precondition
678
- _this.MAdD = _this.yRTw(type, name, time, additionalInfo);
679
- if (_this.MAdD) {
680
- var condition = _this.xogN;
681
- var precondition = condition.CuHY;
682
- precondition.PJzC = time;
678
+ _this.HpgP = _this.XLRj(type, name, time, additionalInfo);
679
+ if (_this.HpgP) {
680
+ var condition = _this.jrHz;
681
+ var precondition = condition.GiPO;
682
+ precondition.zXLB = time;
683
683
  //events will be registred by its type activity event_type: "activity_time"
684
- if ((condition === null || condition === void 0 ? void 0 : condition.ZTfT) === "activity_time") {
685
- var xogN$AEID, xogN$AEID$_, xogN$_details2, xogN$_details2$, xogN$_details3, xogN$_details3$;
686
- var event_time = condition === null || condition === void 0 ? void 0 : (xogN$AEID = condition.AEID) === null || xogN$AEID === void 0 ? void 0 : (xogN$AEID$_ = xogN$AEID.siFg) === null || xogN$AEID$_ === void 0 ? void 0 : xogN$AEID$_.time;
687
- if ((condition === null || condition === void 0 ? void 0 : (xogN$_details2 = condition.AEID) === null || xogN$_details2 === void 0 ? void 0 : (xogN$_details2$ = xogN$_details2.siFg) === null || xogN$_details2$ === void 0 ? void 0 : xogN$_details2$.nkpi.length) > 0) {
684
+ if ((condition === null || condition === void 0 ? void 0 : condition.VlYY) === "activity_time") {
685
+ var jrHz$ScWj, jrHz$ScWj$_, jrHz$_details2, jrHz$_details2$, jrHz$_details3, jrHz$_details3$;
686
+ var event_time = condition === null || condition === void 0 ? void 0 : (jrHz$ScWj = condition.ScWj) === null || jrHz$ScWj === void 0 ? void 0 : (jrHz$ScWj$_ = jrHz$ScWj.xhRu) === null || jrHz$ScWj$_ === void 0 ? void 0 : jrHz$ScWj$_.time;
687
+ if ((condition === null || condition === void 0 ? void 0 : (jrHz$_details2 = condition.ScWj) === null || jrHz$_details2 === void 0 ? void 0 : (jrHz$_details2$ = jrHz$_details2.xhRu) === null || jrHz$_details2$ === void 0 ? void 0 : jrHz$_details2$.nkpi.length) > 0) {
688
688
  setTimeout(function () {
689
- if (!_this.mhrT) {
690
- _this.fjVn = true;
691
- if (_this.fjVn) {
692
- _this.xfkt += 1;
693
- _this.fjVn = _this.FIzB(_this.xfkt, _this.xogN.EryT, _this.xogN.rxsh);
694
- if (_this.fjVn) {
695
- _this.xogN.PJzC = time;
696
- ceInstance.validate(_this.kQmq, _this.fDne);
689
+ if (!_this.TgUk) {
690
+ _this.jNsl = true;
691
+ if (_this.jNsl) {
692
+ _this.WuXg += 1;
693
+ _this.jNsl = _this.HeFJ(_this.WuXg, _this.jrHz.QbNu, _this.jrHz.Gpim);
694
+ if (_this.jNsl) {
695
+ _this.jrHz.zXLB = time;
696
+ ceInstance.validate(_this.VZgC, _this.pyWB);
697
697
  }
698
698
  }
699
699
  }
700
- condition.AEID.siFg.nkpi.map(function (nokpi) {
701
- ceInstance.unregisterFromEvent(toUpperCase(condition.AEID.siFg.et) + "___" + nokpi, _this);
700
+ condition.ScWj.xhRu.nkpi.map(function (nokpi) {
701
+ ceInstance.unregisterFromEvent(toUpperCase(condition.ScWj.xhRu.et) + "___" + nokpi, _this);
702
702
  });
703
703
  }, event_time);
704
- condition.AEID.siFg.nkpi.map(function (nokpi) {
705
- ceInstance.registerForEvent(toUpperCase(condition.AEID.siFg.et) + "___" + nokpi, _this.YiQd);
704
+ condition.ScWj.xhRu.nkpi.map(function (nokpi) {
705
+ ceInstance.registerForEvent(toUpperCase(condition.ScWj.xhRu.et) + "___" + nokpi, _this.xJxT);
706
706
  });
707
707
  }
708
708
  //it is for unregistering the events did case after completing the time imit
709
- if ((condition === null || condition === void 0 ? void 0 : (xogN$_details3 = condition.AEID) === null || xogN$_details3 === void 0 ? void 0 : (xogN$_details3$ = xogN$_details3.siFg) === null || xogN$_details3$ === void 0 ? void 0 : xogN$_details3$.kpi.length) > 0) {
709
+ if ((condition === null || condition === void 0 ? void 0 : (jrHz$_details3 = condition.ScWj) === null || jrHz$_details3 === void 0 ? void 0 : (jrHz$_details3$ = jrHz$_details3.xhRu) === null || jrHz$_details3$ === void 0 ? void 0 : jrHz$_details3$.kpi.length) > 0) {
710
710
  setTimeout(function () {
711
- condition.AEID.siFg.kpi.map(function (kpi) {
712
- ceInstance.unregisterFromEvent(toUpperCase(condition.AEID.siFg.et) + "___" + kpi, _this);
711
+ condition.ScWj.xhRu.kpi.map(function (kpi) {
712
+ ceInstance.unregisterFromEvent(toUpperCase(condition.ScWj.xhRu.et) + "___" + kpi, _this);
713
713
  });
714
714
  }, event_time);
715
- condition.AEID.siFg.kpi.map(function (kpi) {
716
- if (kpi === condition.CuHY.AEID.UJen) {
715
+ condition.ScWj.xhRu.kpi.map(function (kpi) {
716
+ if (kpi === condition.GiPO.ScWj.vaGr) {
717
717
  //unregister the previous event
718
- ceInstance.unregisterFromEvent(generateKey(precondition.ZTfT) + "___" + precondition.AEID.UJen, _this);
719
- ceInstance.registerForEvent(toUpperCase(condition.AEID.siFg.et) + "___" + kpi, _this.CflY);
718
+ ceInstance.unregisterFromEvent(generateKey(precondition.VlYY) + "___" + precondition.ScWj.vaGr, _this);
719
+ ceInstance.registerForEvent(toUpperCase(condition.ScWj.xhRu.et) + "___" + kpi, _this.vMTP);
720
720
  } else {
721
- ceInstance.registerForEvent(toUpperCase(condition.AEID.siFg.et) + "___" + kpi, _this.YiQd);
721
+ ceInstance.registerForEvent(toUpperCase(condition.ScWj.xhRu.et) + "___" + kpi, _this.xJxT);
722
722
  }
723
723
  });
724
724
  }
725
725
  } else {
726
- ceInstance.unregisterFromEvent(generateKey(precondition.ZTfT) + "___" + precondition.AEID.UJen, _this);
727
- ceInstance.registerForEvent(generateKey(condition.ZTfT) + "___" + condition.AEID.UJen, _this);
726
+ ceInstance.unregisterFromEvent(generateKey(precondition.VlYY) + "___" + precondition.ScWj.vaGr, _this);
727
+ ceInstance.registerForEvent(generateKey(condition.VlYY) + "___" + condition.ScWj.vaGr, _this);
728
728
  }
729
- _this.YPme[name] = Date.now();
729
+ _this.lajT[name] = Date.now();
730
730
  }
731
731
  return;
732
732
  }
733
733
 
734
734
  // Validate Condition
735
- var validationStatus = generateKey(_this.xogN.ZTfT) === type && _this.zDvX(time - _this.xogN.CuHY.PJzC, _this.xogN.siCr) && _this.xogN.AEID.UJen === name && _this.kzTQ(_this.xogN.AEID.siFg, additionalInfo);
735
+ var validationStatus = generateKey(_this.jrHz.VlYY) === type && _this.VwBV(time - _this.jrHz.GiPO.zXLB, _this.jrHz.eLLb) && _this.jrHz.ScWj.vaGr === name && _this.ltAR(_this.jrHz.ScWj.xhRu, additionalInfo);
736
736
  if (validationStatus) {
737
- _this.xfkt += 1;
738
- _this.fjVn = _this.FIzB(_this.xfkt, _this.xogN.EryT, _this.xogN.rxsh);
739
- if (_this.fjVn) {
740
- _this.xogN.PJzC = time;
741
- ceInstance.validate(_this.kQmq, _this.fDne);
737
+ _this.WuXg += 1;
738
+ _this.jNsl = _this.HeFJ(_this.WuXg, _this.jrHz.QbNu, _this.jrHz.Gpim);
739
+ if (_this.jNsl) {
740
+ _this.jrHz.zXLB = time;
741
+ ceInstance.validate(_this.VZgC, _this.pyWB);
742
742
  }
743
743
  }
744
744
  });
745
- _defineProperty(this, "yRTw", function (type, name, time, additionalInfo) {
746
- var precondition = _this.xogN.CuHY;
747
- return generateKey(precondition.ZTfT) === type && precondition.AEID.UJen === name && _this.zDvX(time, precondition.siCr) && _this.kzTQ(precondition.AEID.siFg, additionalInfo);
745
+ _defineProperty(this, "XLRj", function (type, name, time, additionalInfo) {
746
+ var precondition = _this.jrHz.GiPO;
747
+ return generateKey(precondition.VlYY) === type && precondition.ScWj.vaGr === name && _this.VwBV(time, precondition.eLLb) && _this.ltAR(precondition.ScWj.xhRu, additionalInfo);
748
748
  });
749
- _defineProperty(this, "zDvX", function (time, timeBounds) {
749
+ _defineProperty(this, "VwBV", function (time, timeBounds) {
750
750
  var currentTime = Math.ceil(time);
751
- return currentTime > timeBounds.qpBO && currentTime < timeBounds.bNgD;
751
+ return currentTime > timeBounds.TNxD && currentTime < timeBounds.kxyu;
752
752
  });
753
- _defineProperty(this, "FIzB", function (current, required, operator) {
753
+ _defineProperty(this, "HeFJ", function (current, required, operator) {
754
754
  var checkOld = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
755
- if (checkOld && _this.xogN.NFIW) {
756
- current = current + _this.RofU;
755
+ if (checkOld && _this.jrHz.fJlK) {
756
+ current = current + _this.NQJv;
757
757
  }
758
758
  switch (operator) {
759
759
  case "EQ":
@@ -770,7 +770,7 @@
770
770
  return false;
771
771
  }
772
772
  });
773
- _defineProperty(this, "kzTQ", function (expected, received) {
773
+ _defineProperty(this, "ltAR", function (expected, received) {
774
774
  var status = true;
775
775
  try {
776
776
  var _loop = function _loop() {
@@ -817,13 +817,13 @@
817
817
  key: "_displayCampaign",
818
818
  value: function _displayCampaign(time) {
819
819
  var ceInstance = CE.getInstance();
820
- this.fjVn = true;
821
- if (this.fjVn) {
822
- this.xfkt += 1;
823
- this.fjVn = this.FIzB(this.xfkt, this.xogN.EryT, this.xogN.rxsh);
824
- if (this.fjVn) {
825
- this.xogN.PJzC = time;
826
- ceInstance.validate(this.kQmq, this.fDne);
820
+ this.jNsl = true;
821
+ if (this.jNsl) {
822
+ this.WuXg += 1;
823
+ this.jNsl = this.HeFJ(this.WuXg, this.jrHz.QbNu, this.jrHz.Gpim);
824
+ if (this.jNsl) {
825
+ this.jrHz.zXLB = time;
826
+ ceInstance.validate(this.VZgC, this.pyWB);
827
827
  }
828
828
  }
829
829
  }
@@ -840,20 +840,20 @@
840
840
  var OverallConfig = /*#__PURE__*/_createClass(function OverallConfig() {
841
841
  var _this = this;
842
842
  _classCallCheck(this, OverallConfig);
843
- _defineProperty(this, "wwqM", []);
843
+ _defineProperty(this, "sZzG", []);
844
844
  _defineProperty(this, "_ret_day", {});
845
- _defineProperty(this, "VdHE", {});
846
- _defineProperty(this, "XLDN", false);
847
- _defineProperty(this, "wuRU", false);
845
+ _defineProperty(this, "Xzos", {});
846
+ _defineProperty(this, "oFUv", false);
847
+ _defineProperty(this, "UFdW", false);
848
848
  _defineProperty(this, "parse", function () {
849
849
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
850
850
  try {
851
- _this.wwqM = config.overall_cfg.events;
851
+ _this.sZzG = config.overall_cfg.events;
852
852
  _this._ret_day = config.overall_cfg.ret_day;
853
- _this.VdHE = config.overall_cfg.session;
854
- _this.XLDN = config.overall_cfg.toggleRetDay;
855
- _this.wwqM = config.overall_cfg.events;
856
- _this.wuRU = config.overall_cfg.toggleSession;
853
+ _this.Xzos = config.overall_cfg.session;
854
+ _this.oFUv = config.overall_cfg.toggleRetDay;
855
+ _this.sZzG = config.overall_cfg.events;
856
+ _this.UFdW = config.overall_cfg.toggleSession;
857
857
  } catch (error) {
858
858
  Logger$5.error(error);
859
859
  return false;
@@ -863,10 +863,10 @@
863
863
  _defineProperty(this, "validate", function () {
864
864
  var retainedDays = parseInt(Apxor.getController().getFromStorage(APX_RETAINED_DAYS));
865
865
  var retainedSession = parseInt(Apxor.getController().getFromStorage(APX_RETAINED_SESSIONS));
866
- if (_this.XLDN && !isNaN(retainedDays) && !(retainedDays >= _this._ret_day.from && retainedDays <= _this._ret_day.to)) {
866
+ if (_this.oFUv && !isNaN(retainedDays) && !(retainedDays >= _this._ret_day.from && retainedDays <= _this._ret_day.to)) {
867
867
  return false;
868
868
  }
869
- if (_this.wuRU && !isNaN(retainedSession) && !(retainedSession >= _this.VdHE.from && retainedSession <= _this.VdHE.to)) {
869
+ if (_this.UFdW && !isNaN(retainedSession) && !(retainedSession >= _this.Xzos.from && retainedSession <= _this.Xzos.to)) {
870
870
  return false;
871
871
  }
872
872
  try {
@@ -874,8 +874,8 @@
874
874
  var data = Apxor.getController().getFromStorage("_apx_lt_count");
875
875
  var siteid = Apxor.getSiteId();
876
876
  var LtCountObjDecoded = JSON.parse(decode(siteid, data));
877
- for (var i = 0; i < _this.wwqM.length; i++) {
878
- var evName = _this.wwqM[i].name.replace("'", "").replace("’", "");
877
+ for (var i = 0; i < _this.sZzG.length; i++) {
878
+ var evName = _this.sZzG[i].name.replace("'", "").replace("’", "");
879
879
  if (LtCountObjDecoded[evName]) {
880
880
  return false;
881
881
  }
@@ -891,15 +891,15 @@
891
891
  var ConfigItem = /*#__PURE__*/_createClass(function ConfigItem() {
892
892
  var _this = this;
893
893
  _classCallCheck(this, ConfigItem);
894
- _defineProperty(this, "BWUl", []);
895
- _defineProperty(this, "kQmq", "");
896
- _defineProperty(this, "RfXY", new Meta());
897
- _defineProperty(this, "umZx", new Audience());
898
- _defineProperty(this, "DTlJ", new Validity());
899
- _defineProperty(this, "sWvb", new Frequency());
900
- _defineProperty(this, "Skej", new OverallConfig());
901
- _defineProperty(this, "EvKg", false);
902
- _defineProperty(this, "MjoH", []);
894
+ _defineProperty(this, "oaNf", []);
895
+ _defineProperty(this, "VZgC", "");
896
+ _defineProperty(this, "HSbO", new Meta());
897
+ _defineProperty(this, "ougI", new Audience());
898
+ _defineProperty(this, "LAYA", new Validity());
899
+ _defineProperty(this, "NJhT", new Frequency());
900
+ _defineProperty(this, "FIof", new OverallConfig());
901
+ _defineProperty(this, "xPmO", false);
902
+ _defineProperty(this, "GmJY", []);
903
903
  _defineProperty(this, "parse", function () {
904
904
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
905
905
  try {
@@ -916,7 +916,7 @@
916
916
  }
917
917
 
918
918
  // If META, VALIDITY, FREQUENCY and AUDIENCE is not parsed properly, throw it out
919
- if (!(_this.RfXY.parse(config) && _this.DTlJ.parse(config) && _this.sWvb.parse(config) && _this.umZx.parse(config) && _this.Skej.parse(config))) {
919
+ if (!(_this.HSbO.parse(config) && _this.LAYA.parse(config) && _this.NJhT.parse(config) && _this.ougI.parse(config) && _this.FIof.parse(config))) {
920
920
  return false;
921
921
  }
922
922
 
@@ -925,9 +925,9 @@
925
925
  Logger$6.error("No valid conditions", config.conditions);
926
926
  return false;
927
927
  }
928
- _this.kQmq = config._id;
929
- _this.EvKg = isDefined(config.sequence_enabled) ? config.sequence_enabled : false;
930
- if (_this.EvKg) {
928
+ _this.VZgC = config._id;
929
+ _this.xPmO = isDefined(config.sequence_enabled) ? config.sequence_enabled : false;
930
+ if (_this.xPmO) {
931
931
  // iff respectSequence is true, Sort the Conditions by their sequence order
932
932
  // We need to sort, if server sends them in orderless manner
933
933
  config.conditions.sort(function (prev, current) {
@@ -939,17 +939,17 @@
939
939
  var conditions = config.conditions;
940
940
  var length = conditions.length;
941
941
  for (var index = 0; index < length; index++) {
942
- _this.MjoH = [];
942
+ _this.GmJY = [];
943
943
  var condition = conditions[index];
944
944
  if (condition.type === "didn't") {
945
- var xogN$details, xogN$details$ad;
945
+ var jrHz$details, jrHz$details$ad;
946
946
  var obj = {
947
947
  trigger_key: condition.trigger.details.name,
948
- no_kpi_array: condition === null || condition === void 0 ? void 0 : (xogN$details = condition.details) === null || xogN$details === void 0 ? void 0 : (xogN$details$ad = xogN$details.additional_info) === null || xogN$details$ad === void 0 ? void 0 : xogN$details$ad.nkpi,
948
+ no_kpi_array: condition === null || condition === void 0 ? void 0 : (jrHz$details = condition.details) === null || jrHz$details === void 0 ? void 0 : (jrHz$details$ad = jrHz$details.additional_info) === null || jrHz$details$ad === void 0 ? void 0 : jrHz$details$ad.nkpi,
949
949
  condition_id: condition === null || condition === void 0 ? void 0 : condition._id,
950
950
  time_bounds: condition.time_bounds.upper
951
951
  };
952
- _this.MjoH = [].concat(_toConsumableArray(_this.MjoH), [obj]);
952
+ _this.GmJY = [].concat(_toConsumableArray(_this.GmJY), [obj]);
953
953
  //this will be the key
954
954
  //when event occur check this array and then then check the time
955
955
  //check the time diffrence
@@ -958,57 +958,57 @@
958
958
  }
959
959
 
960
960
  var conditionValidator = new ConditionValidator();
961
- if (conditionValidator.initialize(condition, _this.kQmq, index, _this.EvKg, _this.MjoH)) {
962
- _this.BWUl.push(conditionValidator);
961
+ if (conditionValidator.initialize(condition, _this.VZgC, index, _this.xPmO, _this.GmJY)) {
962
+ _this.oaNf.push(conditionValidator);
963
963
  }
964
964
  }
965
- return _this.BWUl.length > 0;
965
+ return _this.oaNf.length > 0;
966
966
  } catch (error) {
967
967
  Logger$6.error(error);
968
968
  return false;
969
969
  }
970
970
  });
971
- _defineProperty(this, "vgMy", function (index) {
971
+ _defineProperty(this, "GBBl", function (index) {
972
972
  if (index < 0) {
973
973
  return;
974
974
  }
975
- if (_this.EvKg) {
976
- var conditionValidator = _this.BWUl[index];
977
- if (isDefined(conditionValidator) && conditionValidator.fjVn) {
975
+ if (_this.xPmO) {
976
+ var conditionValidator = _this.oaNf[index];
977
+ if (isDefined(conditionValidator) && conditionValidator.jNsl) {
978
978
  // Check if previous validator is satisfied
979
- var prevValidator = _this.BWUl[index - 1];
980
- if (isDefined(prevValidator) && !prevValidator.fjVn) {
979
+ var prevValidator = _this.oaNf[index - 1];
980
+ if (isDefined(prevValidator) && !prevValidator.jNsl) {
981
981
  // TODO: If current index is satisfied before previous one, do something
982
982
  // either unregister all conditions or remove this item from ConfigLookup
983
983
  return;
984
984
  }
985
- var nextValidator = _this.BWUl[index + 1];
985
+ var nextValidator = _this.oaNf[index + 1];
986
986
  if (!isDefined(nextValidator)) {
987
987
  // It means this is the last condition
988
988
  // Validate all conditions
989
- _this.bcPN();
989
+ _this.Bmfx();
990
990
  } else {
991
- nextValidator.fggZ();
991
+ nextValidator.jirn();
992
992
  }
993
993
  }
994
994
  } else {
995
995
  // Validate all conditions
996
- _this.bcPN();
996
+ _this.Bmfx();
997
997
  }
998
998
  });
999
- _defineProperty(this, "bcPN", function () {
999
+ _defineProperty(this, "Bmfx", function () {
1000
1000
  // Check If Audience, Validity is satisfied or not
1001
1001
  var userAttributes = Apxor.getController().getUserAttributes();
1002
1002
  var sessionAttributes = Apxor.getController().getSessionAttributes();
1003
- if (!_this.DTlJ.validate() || !_this.umZx.validate(userAttributes, sessionAttributes) || !_this.Skej.validate()) {
1003
+ if (!_this.LAYA.validate() || !_this.ougI.validate(userAttributes, sessionAttributes) || !_this.FIof.validate()) {
1004
1004
  return;
1005
1005
  }
1006
- var length = _this.BWUl.length;
1006
+ var length = _this.oaNf.length;
1007
1007
  var isSatisfied = length < 1;
1008
1008
  var combineOperator = "";
1009
1009
  for (var index = 0; index < length; index++) {
1010
- var validator = _this.BWUl[index];
1011
- var currentResult = validator.fjVn;
1010
+ var validator = _this.oaNf[index];
1011
+ var currentResult = validator.jNsl;
1012
1012
  if (combineOperator.trim() === "") {
1013
1013
  isSatisfied = currentResult;
1014
1014
  } else {
@@ -1021,47 +1021,47 @@
1021
1021
  break;
1022
1022
  }
1023
1023
  }
1024
- combineOperator = validator.kJkn;
1024
+ combineOperator = validator.SIXE;
1025
1025
  }
1026
1026
  if (isSatisfied) {
1027
1027
  console.debug("onCondition satisfied");
1028
1028
  // Check if count reached it's maximum
1029
- if (!_this.sWvb.fmBg(_this.kQmq)) {
1030
- console.warn("Maximum limit reached", _this.kQmq);
1029
+ if (!_this.NJhT.Yfir(_this.VZgC)) {
1030
+ console.warn("Maximum limit reached", _this.VZgC);
1031
1031
  return;
1032
1032
  }
1033
- console.log("Dispatching event", _this.RfXY.iFUh);
1034
- if (_this.RfXY._only_context === true) {
1035
- Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.RfXY._attr), {}, {
1036
- message_name: _this.RfXY.UJen,
1037
- id: _this.kQmq
1033
+ console.log("Dispatching event", _this.HSbO.ivYh);
1034
+ if (_this.HSbO._only_context === true) {
1035
+ Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.HSbO._attr), {}, {
1036
+ message_name: _this.HSbO.vaGr,
1037
+ id: _this.VZgC
1038
1038
  }));
1039
1039
  }
1040
1040
  // Emit event
1041
- Apxor.getController().dispatchEvent(_this.RfXY.iFUh, {
1042
- name: _this.RfXY.iFUh,
1041
+ Apxor.getController().dispatchEvent(_this.HSbO.ivYh, {
1042
+ name: _this.HSbO.ivYh,
1043
1043
  additional_info: {
1044
- uuid: _this.kQmq,
1045
- name: _this.RfXY.UJen
1044
+ uuid: _this.VZgC,
1045
+ name: _this.HSbO.vaGr
1046
1046
  }
1047
1047
  });
1048
1048
  }
1049
1049
  });
1050
- _defineProperty(this, "CgAS", function () {
1051
- _this.sWvb.CgAS();
1050
+ _defineProperty(this, "cnxa", function () {
1051
+ _this.NJhT.cnxa();
1052
1052
  });
1053
1053
  _defineProperty(this, "getFrequencyCount", function () {
1054
- return _this.sWvb.getFrequencyCount();
1054
+ return _this.NJhT.getFrequencyCount();
1055
1055
  });
1056
- _defineProperty(this, "EbNj", function () {
1057
- return _this.sWvb.ihJn();
1056
+ _defineProperty(this, "NFqM", function () {
1057
+ return _this.NJhT.zibq();
1058
1058
  });
1059
1059
  });
1060
1060
 
1061
1061
  var ConfigLookup = /*#__PURE__*/_createClass(function ConfigLookup() {
1062
1062
  var _this = this;
1063
1063
  _classCallCheck(this, ConfigLookup);
1064
- _defineProperty(this, "zWnJ", {});
1064
+ _defineProperty(this, "lljB", {});
1065
1065
  _defineProperty(this, "parse", function () {
1066
1066
  var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
1067
1067
  configs: []
@@ -1084,7 +1084,7 @@
1084
1084
  var configId = _config._id;
1085
1085
  var configItem = new ConfigItem();
1086
1086
  if (configItem.parse(_config)) {
1087
- _this.zWnJ[configId] = configItem;
1087
+ _this.lljB[configId] = configItem;
1088
1088
  } else {
1089
1089
  console.warn("Failed to parse cfg", configId);
1090
1090
  }
@@ -1092,31 +1092,31 @@
1092
1092
  }
1093
1093
  });
1094
1094
  _defineProperty(this, "validate", function (id, index) {
1095
- if (_this.zWnJ[id]) {
1096
- var configItem = _this.zWnJ[id];
1097
- configItem.vgMy(index);
1095
+ if (_this.lljB[id]) {
1096
+ var configItem = _this.lljB[id];
1097
+ configItem.GBBl(index);
1098
1098
  }
1099
1099
  });
1100
- _defineProperty(this, "CgAS", function (id) {
1101
- var campiagnConfig = _this.zWnJ[id];
1102
- campiagnConfig.CgAS();
1100
+ _defineProperty(this, "cnxa", function (id) {
1101
+ var campiagnConfig = _this.lljB[id];
1102
+ campiagnConfig.cnxa();
1103
1103
  });
1104
1104
  _defineProperty(this, "getFrequencyCount", function (id) {
1105
- var campiagnConfig = _this.zWnJ[id];
1105
+ var campiagnConfig = _this.lljB[id];
1106
1106
  return campiagnConfig.getFrequencyCount();
1107
1107
  });
1108
1108
  _defineProperty(this, "resetFrequencyCounts", function () {
1109
- var configs = _this.zWnJ;
1109
+ var configs = _this.lljB;
1110
1110
  for (var configId in configs) {
1111
- configs[configId].EbNj();
1111
+ configs[configId].NFqM();
1112
1112
  }
1113
1113
  });
1114
- _defineProperty(this, "zjhq", function (campaignId) {
1114
+ _defineProperty(this, "YDSO", function (campaignId) {
1115
1115
  try {
1116
- if (_this.zWnJ) {
1117
- var configItem = _this.zWnJ[campaignId];
1118
- if (configItem && configItem.RfXY) {
1119
- return configItem.RfXY;
1116
+ if (_this.lljB) {
1117
+ var configItem = _this.lljB[campaignId];
1118
+ if (configItem && configItem.HSbO) {
1119
+ return configItem.HSbO;
1120
1120
  }
1121
1121
  }
1122
1122
  } catch (e) {
@@ -1132,42 +1132,42 @@
1132
1132
  var EventsListener = /*#__PURE__*/_createClass(function EventsListener() {
1133
1133
  var _this = this;
1134
1134
  _classCallCheck(this, EventsListener);
1135
- _defineProperty(this, "Jzbz", {});
1136
- _defineProperty(this, "ohdM", []);
1137
- _defineProperty(this, "kgpd", false);
1135
+ _defineProperty(this, "xUpW", {});
1136
+ _defineProperty(this, "dRvR", []);
1137
+ _defineProperty(this, "DDNd", false);
1138
1138
  _defineProperty(this, "initialize", function () {
1139
1139
  var controller = Apxor.getController();
1140
1140
  controller.registerForEvent(APP_EVENT, function (event) {
1141
- return _this.kkta(event, "AE");
1141
+ return _this.IsCi(event, "AE");
1142
1142
  });
1143
1143
  controller.registerForEvent(CLIENT_EVENT, function (event) {
1144
- return _this.kkta(event, "CE");
1144
+ return _this.IsCi(event, "CE");
1145
1145
  });
1146
1146
  });
1147
- _defineProperty(this, "DWsN", function () {
1147
+ _defineProperty(this, "ndnI", function () {
1148
1148
  // Clear Buffer
1149
- for (var item in _this.ohdM) {
1150
- _this.LGDG(item.event, item.key, item.type);
1149
+ for (var item in _this.dRvR) {
1150
+ _this.Fzta(item.event, item.key, item.type);
1151
1151
  }
1152
- _this.kgpd = true;
1152
+ _this.DDNd = true;
1153
1153
  });
1154
- _defineProperty(this, "MCaN", function (event, callback) {
1154
+ _defineProperty(this, "QOqX", function (event, callback) {
1155
1155
  if (!isFunction(callback)) {
1156
1156
  return;
1157
1157
  }
1158
1158
  var listeners;
1159
- if (_this.Jzbz[event]) {
1160
- listeners = _this.Jzbz[event];
1159
+ if (_this.xUpW[event]) {
1160
+ listeners = _this.xUpW[event];
1161
1161
  } else {
1162
1162
  listeners = [];
1163
1163
  }
1164
1164
  listeners.push(callback);
1165
- _this.Jzbz[event] = listeners;
1166
- Logger$7.debug("Listeners list: ", _this.Jzbz);
1165
+ _this.xUpW[event] = listeners;
1166
+ Logger$7.debug("Listeners list: ", _this.xUpW);
1167
1167
  });
1168
1168
  _defineProperty(this, "unregisterFromEvent", function (event, callback) {
1169
- if (_this.Jzbz[event]) {
1170
- var listeners = _this.Jzbz[event];
1169
+ if (_this.xUpW[event]) {
1170
+ var listeners = _this.xUpW[event];
1171
1171
  var updatedListeners = [];
1172
1172
  for (var index = 0; index < listeners.length; index++) {
1173
1173
  var listener = listeners[index];
@@ -1175,25 +1175,25 @@
1175
1175
  updatedListeners.push(listener);
1176
1176
  }
1177
1177
  }
1178
- _this.Jzbz[event] = updatedListeners;
1178
+ _this.xUpW[event] = updatedListeners;
1179
1179
  }
1180
1180
  });
1181
- _defineProperty(this, "kkta", function (event) {
1181
+ _defineProperty(this, "IsCi", function (event) {
1182
1182
  var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "AE";
1183
1183
  var key = type + "___" + event.name;
1184
- _this.LGDG(event, key, type);
1184
+ _this.Fzta(event, key, type);
1185
1185
  });
1186
- _defineProperty(this, "LGDG", function (event, key, type) {
1187
- if (!_this.kgpd) {
1188
- _this.ohdM.push({
1186
+ _defineProperty(this, "Fzta", function (event, key, type) {
1187
+ if (!_this.DDNd) {
1188
+ _this.dRvR.push({
1189
1189
  event: event,
1190
1190
  key: key,
1191
1191
  type: type
1192
1192
  });
1193
1193
  } else {
1194
- Logger$7.debug("Notifying listeners for event: " + event + ", " + key, _this.Jzbz);
1195
- if (_this.Jzbz[key]) {
1196
- var listeners = _this.Jzbz[key];
1194
+ Logger$7.debug("Notifying listeners for event: " + event + ", " + key, _this.xUpW);
1195
+ if (_this.xUpW[key]) {
1196
+ var listeners = _this.xUpW[key];
1197
1197
  var time = Apxor.getController().getSDKRunningTimeInSec();
1198
1198
  for (var index = 0; index < listeners.length; index++) {
1199
1199
  var listener = listeners[index];
@@ -1209,17 +1209,17 @@
1209
1209
  function CE() {
1210
1210
  var _this = this;
1211
1211
  _classCallCheck(this, CE);
1212
- _defineProperty(this, "WHSu", false);
1213
- _defineProperty(this, "gbMj", null);
1214
- _defineProperty(this, "xElT", getDateInDDMMYYYY());
1215
- _defineProperty(this, "auCK", new EventsListener());
1216
- _defineProperty(this, "dhYk", Apxor.getSiteId());
1212
+ _defineProperty(this, "XRon", false);
1213
+ _defineProperty(this, "KSfx", null);
1214
+ _defineProperty(this, "kkXn", getDateInDDMMYYYY());
1215
+ _defineProperty(this, "fOwS", new EventsListener());
1216
+ _defineProperty(this, "NhQg", Apxor.getSiteId());
1217
1217
  _defineProperty(this, "_qeState", {});
1218
1218
  _defineProperty(this, "getQeState", function () {
1219
1219
  try {
1220
1220
  var data = Apxor.getController().getFromStorage(QE_STATE);
1221
1221
  if (data) {
1222
- return JSON.parse(decode(_this.dhYk, data));
1222
+ return JSON.parse(decode(_this.NhQg, data));
1223
1223
  } else {
1224
1224
  _this._qeState = {};
1225
1225
  return _this.setQeState();
@@ -1248,10 +1248,10 @@
1248
1248
  return _this._qeState;
1249
1249
  });
1250
1250
  _defineProperty(this, "initialize", function () {
1251
- if (!_this.WHSu) {
1252
- _this.WHSu = true;
1253
- _this.gbMj = new ConfigLookup();
1254
- _this.auCK.initialize();
1251
+ if (!_this.XRon) {
1252
+ _this.XRon = true;
1253
+ _this.KSfx = new ConfigLookup();
1254
+ _this.fOwS.initialize();
1255
1255
  _this._qeState = _this.getQeState();
1256
1256
  Logger$8.info("QE Initialized..");
1257
1257
  }
@@ -1262,12 +1262,12 @@
1262
1262
  * @param config
1263
1263
  */
1264
1264
  _defineProperty(this, "parse", function (config) {
1265
- if (!_this.Kwhz()) {
1265
+ if (!_this.HAyL()) {
1266
1266
  Logger$8.warn("Must call init first. Unable to proceed");
1267
1267
  return;
1268
1268
  }
1269
- _this.gbMj.parse(config);
1270
- _this.auCK.DWsN();
1269
+ _this.KSfx.parse(config);
1270
+ _this.fOwS.ndnI();
1271
1271
  });
1272
1272
  /**
1273
1273
  * Validates all conditions for given config ID
@@ -1276,10 +1276,10 @@
1276
1276
  * @param index
1277
1277
  */
1278
1278
  _defineProperty(this, "validate", function (id, index) {
1279
- if (!_this.Kwhz()) {
1279
+ if (!_this.HAyL()) {
1280
1280
  return;
1281
1281
  }
1282
- _this.gbMj.validate(id, index);
1282
+ _this.KSfx.validate(id, index);
1283
1283
  });
1284
1284
  _defineProperty(this, "updateCount", function (id) {
1285
1285
  try {
@@ -1288,22 +1288,22 @@
1288
1288
  }
1289
1289
  _this.incrementFrequencies(id);
1290
1290
  _this.setQeState(id);
1291
- _this.gbMj.CgAS(id);
1291
+ _this.KSfx.cnxa(id);
1292
1292
  } catch (e) {
1293
1293
  console.log("Could not update the count config:".concat(e));
1294
1294
  }
1295
1295
  });
1296
1296
  _defineProperty(this, "resetFrequencyCounts", function () {
1297
- _this.gbMj.resetFrequencyCounts();
1297
+ _this.KSfx.resetFrequencyCounts();
1298
1298
  });
1299
1299
  _defineProperty(this, "getFrequencyCount", function (id) {
1300
- return _this.gbMj.getFrequencyCount(id);
1300
+ return _this.KSfx.getFrequencyCount(id);
1301
1301
  });
1302
1302
  _defineProperty(this, "registerForEvent", function (event, callback) {
1303
- _this.auCK.MCaN(event, callback);
1303
+ _this.fOwS.QOqX(event, callback);
1304
1304
  });
1305
1305
  _defineProperty(this, "unregisterFromEvent", function (event, callback) {
1306
- _this.auCK.unregisterFromEvent(event, callback);
1306
+ _this.fOwS.unregisterFromEvent(event, callback);
1307
1307
  });
1308
1308
  /**
1309
1309
  * Fetches the config from Server
@@ -1316,14 +1316,14 @@
1316
1316
  _defineProperty(this, "fetch", function (type, validateUrl, apiUrl, callback) {
1317
1317
  Apxor.getController().fetchConfiguration(type, validateUrl, apiUrl, callback);
1318
1318
  });
1319
- _defineProperty(this, "Kwhz", function () {
1320
- return _this.WHSu;
1319
+ _defineProperty(this, "HAyL", function () {
1320
+ return _this.XRon;
1321
1321
  });
1322
1322
  _defineProperty(this, "getCampaignMetaFromQueryEngine", function (campaignId) {
1323
- return _this.gbMj.zjhq(campaignId);
1323
+ return _this.KSfx.YDSO(campaignId);
1324
1324
  });
1325
- _defineProperty(this, "rDKN", function () {
1326
- return _this.xElT;
1325
+ _defineProperty(this, "mDOI", function () {
1326
+ return _this.kkXn;
1327
1327
  });
1328
1328
  if (!CE.instance) {
1329
1329
  CE.instance = this;
@@ -1347,7 +1347,7 @@
1347
1347
  OVERALL: 0,
1348
1348
  DATES: {}
1349
1349
  };
1350
- if (this.xElT) this._qeState[id].DATES[this.xElT] = 0;
1350
+ if (this.kkXn) this._qeState[id].DATES[this.kkXn] = 0;
1351
1351
  this.setQeState(id);
1352
1352
  }
1353
1353
  } catch (e) {
@@ -1366,12 +1366,12 @@
1366
1366
 
1367
1367
  // Increment the DATES count for this particular date by 1. If the date changes reset.
1368
1368
  var currentDate = getDateInDDMMYYYY();
1369
- if (currentDate !== this.xElT || !(configFrequency.DATES && configFrequency.DATES[currentDate])) {
1370
- this.xElT = currentDate;
1369
+ if (currentDate !== this.kkXn || !(configFrequency.DATES && configFrequency.DATES[currentDate])) {
1370
+ this.kkXn = currentDate;
1371
1371
  configFrequency.DATES = {};
1372
- configFrequency.DATES[this.xElT] = 0;
1372
+ configFrequency.DATES[this.kkXn] = 0;
1373
1373
  }
1374
- configFrequency.DATES[this.xElT] = configFrequency.DATES[this.xElT] + 1;
1374
+ configFrequency.DATES[this.kkXn] = configFrequency.DATES[this.kkXn] + 1;
1375
1375
  }
1376
1376
  }], [{
1377
1377
  key: "getInstance",