apxor-qe 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apxor.qe.js.bak +1017 -1017
- package/dist/apxor.qe.min.js +1 -1
- package/package.json +2 -2
package/dist/apxor.qe.js.bak
CHANGED
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
var toUpperCase = function toUpperCase(key) {
|
|
309
309
|
return key.toUpperCase();
|
|
310
310
|
};
|
|
311
|
-
var
|
|
311
|
+
var jmAk = function jmAk(actual, expected, operator) {
|
|
312
312
|
switch (operator) {
|
|
313
313
|
case "EQ":
|
|
314
314
|
return actual === expected;
|
|
@@ -418,14 +418,14 @@
|
|
|
418
418
|
};
|
|
419
419
|
var isTimeBetween = function isTimeBetween(startTime, endTime, currentTime) {
|
|
420
420
|
// Extract hours and minutes from the time strings
|
|
421
|
-
var
|
|
422
|
-
|
|
423
|
-
startHour =
|
|
424
|
-
startMinute =
|
|
425
|
-
var
|
|
426
|
-
|
|
427
|
-
endHour =
|
|
428
|
-
endMinute =
|
|
421
|
+
var aPGV$split$map = startTime.split(":").map(Number),
|
|
422
|
+
aPGV$split$map2 = _slicedToArray(aPGV$split$map, 2),
|
|
423
|
+
startHour = aPGV$split$map2[0],
|
|
424
|
+
startMinute = aPGV$split$map2[1];
|
|
425
|
+
var mjEj$split$map = endTime.split(":").map(Number),
|
|
426
|
+
mjEj$split$map2 = _slicedToArray(mjEj$split$map, 2),
|
|
427
|
+
endHour = mjEj$split$map2[0],
|
|
428
|
+
endMinute = mjEj$split$map2[1];
|
|
429
429
|
var _currentTime$split$ma = currentTime.split(":").map(Number),
|
|
430
430
|
_currentTime$split$ma2 = _slicedToArray(_currentTime$split$ma, 2),
|
|
431
431
|
currentHour = _currentTime$split$ma2[0],
|
|
@@ -628,7 +628,7 @@
|
|
|
628
628
|
path = path.substring(0, index) + "svg:svg";
|
|
629
629
|
}
|
|
630
630
|
try {
|
|
631
|
-
return document.
|
|
631
|
+
return document.Vhzk(path, document, function (prefix) {
|
|
632
632
|
if (prefix === "svg") {
|
|
633
633
|
return "http://www.w3.org/2000/svg";
|
|
634
634
|
} else {
|
|
@@ -720,18 +720,18 @@
|
|
|
720
720
|
var Audience = /*#__PURE__*/_createClass(function Audience() {
|
|
721
721
|
var _this = this;
|
|
722
722
|
_classCallCheck(this, Audience);
|
|
723
|
-
_defineProperty(this, "
|
|
724
|
-
_defineProperty(this, "
|
|
725
|
-
_defineProperty(this, "
|
|
723
|
+
_defineProperty(this, "YnyK", "ALL");
|
|
724
|
+
_defineProperty(this, "OtlV", []);
|
|
725
|
+
_defineProperty(this, "ixdq", []);
|
|
726
726
|
_defineProperty(this, "userAttributesValidated", true);
|
|
727
727
|
_defineProperty(this, "sessionAttributeValidated", true);
|
|
728
728
|
_defineProperty(this, "parse", function () {
|
|
729
729
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
730
730
|
try {
|
|
731
|
-
_this.
|
|
732
|
-
_this.
|
|
733
|
-
_this.
|
|
734
|
-
if (!Array.isArray(_this.
|
|
731
|
+
_this.YnyK = config.audience.audience_type;
|
|
732
|
+
_this.OtlV = config.audience.attributes.user;
|
|
733
|
+
_this.ixdq = config.audience.attributes.session;
|
|
734
|
+
if (!Array.isArray(_this.OtlV) || !Array.isArray(_this.ixdq)) {
|
|
735
735
|
Logger$1.error("No attributes");
|
|
736
736
|
return false;
|
|
737
737
|
}
|
|
@@ -743,11 +743,11 @@
|
|
|
743
743
|
});
|
|
744
744
|
_defineProperty(this, "validate", function (user, session) {
|
|
745
745
|
var status = true;
|
|
746
|
-
if (_this.
|
|
746
|
+
if (_this.YnyK === "FTU") {
|
|
747
747
|
status = Apxor.getController().getSessionInfo().is_first_session;
|
|
748
748
|
}
|
|
749
|
-
var userAttributesCompare = _this.
|
|
750
|
-
var sessionAttributesCompare = _this.
|
|
749
|
+
var userAttributesCompare = _this.LEzd(user, _this.OtlV);
|
|
750
|
+
var sessionAttributesCompare = _this.LEzd(session, _this.ixdq);
|
|
751
751
|
if (!userAttributesCompare) {
|
|
752
752
|
_this.userAttributesValidated = false;
|
|
753
753
|
}
|
|
@@ -756,7 +756,7 @@
|
|
|
756
756
|
}
|
|
757
757
|
return status && userAttributesCompare && sessionAttributesCompare;
|
|
758
758
|
});
|
|
759
|
-
_defineProperty(this, "
|
|
759
|
+
_defineProperty(this, "LEzd", function (attributes, expected) {
|
|
760
760
|
var length = expected.length;
|
|
761
761
|
var status = true;
|
|
762
762
|
try {
|
|
@@ -804,7 +804,7 @@
|
|
|
804
804
|
} else if (type === "b") {
|
|
805
805
|
loggedValue = !!loggedValue;
|
|
806
806
|
}
|
|
807
|
-
return
|
|
807
|
+
return jmAk(loggedValue, configValue, operator);
|
|
808
808
|
});
|
|
809
809
|
});
|
|
810
810
|
status = status && match;
|
|
@@ -825,15 +825,15 @@
|
|
|
825
825
|
var Details = /*#__PURE__*/_createClass(function Details() {
|
|
826
826
|
var _this = this;
|
|
827
827
|
_classCallCheck(this, Details);
|
|
828
|
-
_defineProperty(this, "
|
|
829
|
-
_defineProperty(this, "
|
|
830
|
-
_defineProperty(this, "
|
|
828
|
+
_defineProperty(this, "KezF", "");
|
|
829
|
+
_defineProperty(this, "RmGv", {});
|
|
830
|
+
_defineProperty(this, "KvQs", "");
|
|
831
831
|
_defineProperty(this, "parse", function () {
|
|
832
832
|
var details = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
833
833
|
try {
|
|
834
|
-
_this.
|
|
835
|
-
_this.
|
|
836
|
-
_this.
|
|
834
|
+
_this.KezF = details.name;
|
|
835
|
+
_this.RmGv = details.additional_info;
|
|
836
|
+
_this.KvQs = details === null || details === void 0 ? void 0 : details.path;
|
|
837
837
|
} catch (error) {
|
|
838
838
|
return false;
|
|
839
839
|
}
|
|
@@ -844,14 +844,14 @@
|
|
|
844
844
|
var Timebounds = /*#__PURE__*/_createClass(function Timebounds() {
|
|
845
845
|
var _this = this;
|
|
846
846
|
_classCallCheck(this, Timebounds);
|
|
847
|
-
_defineProperty(this, "
|
|
848
|
-
_defineProperty(this, "
|
|
847
|
+
_defineProperty(this, "DtFf", 0);
|
|
848
|
+
_defineProperty(this, "tVTR", 0);
|
|
849
849
|
_defineProperty(this, "parse", function () {
|
|
850
850
|
var timeBounds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
851
851
|
try {
|
|
852
|
-
_this.
|
|
853
|
-
_this.
|
|
854
|
-
if (isNaN(_this.
|
|
852
|
+
_this.DtFf = Number(timeBounds.lower);
|
|
853
|
+
_this.tVTR = Number(timeBounds.upper);
|
|
854
|
+
if (isNaN(_this.DtFf) || isNaN(_this.tVTR)) {
|
|
855
855
|
return false;
|
|
856
856
|
}
|
|
857
857
|
} catch (error) {
|
|
@@ -864,17 +864,17 @@
|
|
|
864
864
|
var PreCondition = /*#__PURE__*/_createClass(function PreCondition() {
|
|
865
865
|
var _this = this;
|
|
866
866
|
_classCallCheck(this, PreCondition);
|
|
867
|
-
_defineProperty(this, "
|
|
868
|
-
_defineProperty(this, "
|
|
869
|
-
_defineProperty(this, "
|
|
870
|
-
_defineProperty(this, "
|
|
871
|
-
_defineProperty(this, "
|
|
867
|
+
_defineProperty(this, "oGib", 0);
|
|
868
|
+
_defineProperty(this, "wwnJ", "");
|
|
869
|
+
_defineProperty(this, "fGEZ", "");
|
|
870
|
+
_defineProperty(this, "sAgb", new Details());
|
|
871
|
+
_defineProperty(this, "tkCM", new Timebounds());
|
|
872
872
|
_defineProperty(this, "parse", function () {
|
|
873
873
|
var precondition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
874
874
|
try {
|
|
875
|
-
_this.
|
|
876
|
-
_this.
|
|
877
|
-
return _this.
|
|
875
|
+
_this.wwnJ = precondition.event_type;
|
|
876
|
+
_this.fGEZ = precondition.activity;
|
|
877
|
+
return _this.sAgb.parse(precondition.details) && _this.tkCM.parse(precondition.time_bounds);
|
|
878
878
|
} catch (error) {
|
|
879
879
|
return false;
|
|
880
880
|
}
|
|
@@ -885,37 +885,37 @@
|
|
|
885
885
|
var Condition = /*#__PURE__*/_createClass(function Condition() {
|
|
886
886
|
var _this = this;
|
|
887
887
|
_classCallCheck(this, Condition);
|
|
888
|
-
_defineProperty(this, "
|
|
889
|
-
_defineProperty(this, "
|
|
890
|
-
_defineProperty(this, "
|
|
891
|
-
_defineProperty(this, "
|
|
892
|
-
_defineProperty(this, "
|
|
893
|
-
_defineProperty(this, "
|
|
894
|
-
_defineProperty(this, "
|
|
895
|
-
_defineProperty(this, "
|
|
896
|
-
_defineProperty(this, "
|
|
897
|
-
_defineProperty(this, "
|
|
898
|
-
_defineProperty(this, "
|
|
899
|
-
_defineProperty(this, "
|
|
900
|
-
_defineProperty(this, "
|
|
888
|
+
_defineProperty(this, "oGib", 0);
|
|
889
|
+
_defineProperty(this, "JiXE", -1);
|
|
890
|
+
_defineProperty(this, "Psxj", 0);
|
|
891
|
+
_defineProperty(this, "djdu", "");
|
|
892
|
+
_defineProperty(this, "fGEZ", "");
|
|
893
|
+
_defineProperty(this, "wwnJ", "");
|
|
894
|
+
_defineProperty(this, "tkCM", new Timebounds());
|
|
895
|
+
_defineProperty(this, "sAgb", new Details());
|
|
896
|
+
_defineProperty(this, "hBAL", new PreCondition());
|
|
897
|
+
_defineProperty(this, "IKic", "AND");
|
|
898
|
+
_defineProperty(this, "kMTt", false);
|
|
899
|
+
_defineProperty(this, "YnyK", void 0);
|
|
900
|
+
_defineProperty(this, "FPgG", "");
|
|
901
901
|
_defineProperty(this, "parse", function () {
|
|
902
902
|
var condition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
903
903
|
try {
|
|
904
|
-
var
|
|
905
|
-
_this.
|
|
904
|
+
var vzQc$count_conf, vzQc$count_conf2;
|
|
905
|
+
_this.JiXE = condition === null || condition === void 0 ? void 0 : condition.sequence;
|
|
906
906
|
_this._conditionType = condition === null || condition === void 0 ? void 0 : condition.condition_type;
|
|
907
907
|
_this._id = condition === null || condition === void 0 ? void 0 : condition._id;
|
|
908
908
|
_this._eventCategory = condition !== null && condition !== void 0 && condition.event_category ? condition === null || condition === void 0 ? void 0 : condition.event_category : "specific_event";
|
|
909
|
-
_this.
|
|
910
|
-
_this.
|
|
911
|
-
_this.
|
|
912
|
-
_this.
|
|
913
|
-
_this.
|
|
909
|
+
_this.Psxj = condition === null || condition === void 0 || (vzQc$count_conf = condition.count_config) === null || vzQc$count_conf === void 0 ? void 0 : vzQc$count_conf.count;
|
|
910
|
+
_this.djdu = condition === null || condition === void 0 || (vzQc$count_conf2 = condition.count_config) === null || vzQc$count_conf2 === void 0 ? void 0 : vzQc$count_conf2.operator;
|
|
911
|
+
_this.fGEZ = condition === null || condition === void 0 ? void 0 : condition.activity;
|
|
912
|
+
_this.wwnJ = condition === null || condition === void 0 ? void 0 : condition.event_type;
|
|
913
|
+
_this.IKic = condition.combine_operator;
|
|
914
914
|
_this._timeEnabled = condition === null || condition === void 0 ? void 0 : condition.time_enabled;
|
|
915
915
|
_this._time = condition === null || condition === void 0 ? void 0 : condition.time;
|
|
916
|
-
_this.
|
|
917
|
-
_this.
|
|
918
|
-
return _this.
|
|
916
|
+
_this.YnyK = condition === null || condition === void 0 ? void 0 : condition.type;
|
|
917
|
+
_this.FPgG = condition === null || condition === void 0 ? void 0 : condition.route;
|
|
918
|
+
return _this.sAgb.parse(condition === null || condition === void 0 ? void 0 : condition.details) && _this.hBAL.parse(condition.trigger) && _this.tkCM.parse(condition.time_bounds);
|
|
919
919
|
} catch (error) {
|
|
920
920
|
Logger$2.error(error);
|
|
921
921
|
return false;
|
|
@@ -927,19 +927,19 @@
|
|
|
927
927
|
var GoalEvent = /*#__PURE__*/_createClass(function GoalEvent() {
|
|
928
928
|
var _this = this;
|
|
929
929
|
_classCallCheck(this, GoalEvent);
|
|
930
|
-
_defineProperty(this, "
|
|
931
|
-
_defineProperty(this, "
|
|
932
|
-
_defineProperty(this, "
|
|
933
|
-
_defineProperty(this, "
|
|
934
|
-
_defineProperty(this, "
|
|
935
|
-
_defineProperty(this, "
|
|
930
|
+
_defineProperty(this, "Psxj", 0);
|
|
931
|
+
_defineProperty(this, "djdu", "");
|
|
932
|
+
_defineProperty(this, "wwnJ", "");
|
|
933
|
+
_defineProperty(this, "tkCM", new Timebounds());
|
|
934
|
+
_defineProperty(this, "sAgb", new Details());
|
|
935
|
+
_defineProperty(this, "IKic", "AND");
|
|
936
936
|
_defineProperty(this, "parse", function (data) {
|
|
937
937
|
try {
|
|
938
|
-
_this.
|
|
939
|
-
_this.
|
|
940
|
-
_this.
|
|
941
|
-
_this.
|
|
942
|
-
return _this.
|
|
938
|
+
_this.Psxj = data.count_config.count;
|
|
939
|
+
_this.djdu = data.count_config.operator;
|
|
940
|
+
_this.wwnJ = data.event_type;
|
|
941
|
+
_this.IKic = data.combine_operator;
|
|
942
|
+
return _this.sAgb.parse(data.details) && _this.tkCM.parse(data.time_bounds);
|
|
943
943
|
} catch (error) {
|
|
944
944
|
Logger$3.error(error);
|
|
945
945
|
return false;
|
|
@@ -953,29 +953,29 @@
|
|
|
953
953
|
function ConditionValidator() {
|
|
954
954
|
var _this = this;
|
|
955
955
|
_classCallCheck(this, ConditionValidator);
|
|
956
|
-
_defineProperty(this, "
|
|
957
|
-
_defineProperty(this, "
|
|
958
|
-
_defineProperty(this, "
|
|
959
|
-
_defineProperty(this, "
|
|
960
|
-
_defineProperty(this, "
|
|
961
|
-
_defineProperty(this, "
|
|
962
|
-
_defineProperty(this, "
|
|
963
|
-
_defineProperty(this, "
|
|
964
|
-
_defineProperty(this, "
|
|
965
|
-
_defineProperty(this, "
|
|
966
|
-
_defineProperty(this, "
|
|
967
|
-
_defineProperty(this, "
|
|
968
|
-
_defineProperty(this, "
|
|
969
|
-
_defineProperty(this, "
|
|
970
|
-
_defineProperty(this, "
|
|
971
|
-
_defineProperty(this, "
|
|
972
|
-
_defineProperty(this, "
|
|
956
|
+
_defineProperty(this, "RexI", 0);
|
|
957
|
+
_defineProperty(this, "HZiO", "");
|
|
958
|
+
_defineProperty(this, "vzQc", new Condition());
|
|
959
|
+
_defineProperty(this, "vJKT", new GoalEvent());
|
|
960
|
+
_defineProperty(this, "AXNR", false);
|
|
961
|
+
_defineProperty(this, "KOzR", false);
|
|
962
|
+
_defineProperty(this, "EXJl", 0);
|
|
963
|
+
_defineProperty(this, "IKic", "AND");
|
|
964
|
+
_defineProperty(this, "JeVw", "OR");
|
|
965
|
+
_defineProperty(this, "pXyH", -1);
|
|
966
|
+
_defineProperty(this, "jzOu", []);
|
|
967
|
+
_defineProperty(this, "sOQM", {});
|
|
968
|
+
_defineProperty(this, "MyCf", false);
|
|
969
|
+
_defineProperty(this, "VIsH", void 0);
|
|
970
|
+
_defineProperty(this, "xgAm", void 0);
|
|
971
|
+
_defineProperty(this, "DOoL", void 0);
|
|
972
|
+
_defineProperty(this, "azNd", void 0);
|
|
973
973
|
_defineProperty(this, "no_KPI_TriggerDetails", []);
|
|
974
|
-
_defineProperty(this, "
|
|
974
|
+
_defineProperty(this, "MRwJ", false);
|
|
975
975
|
_defineProperty(this, "timerDidnt", void 0);
|
|
976
976
|
_defineProperty(this, "timerDid", void 0);
|
|
977
977
|
/**
|
|
978
|
-
* If respectSequence is true, don't auto-
|
|
978
|
+
* If respectSequence is true, don't auto-GrDR to events except for the condition whose index is 0
|
|
979
979
|
*
|
|
980
980
|
* @param condition
|
|
981
981
|
* @param type
|
|
@@ -994,106 +994,106 @@
|
|
|
994
994
|
var flag = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : "";
|
|
995
995
|
var childConditionIndex = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : -1;
|
|
996
996
|
var registerChecker = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : true;
|
|
997
|
-
_this.
|
|
998
|
-
_this.
|
|
999
|
-
_this.
|
|
1000
|
-
_this.
|
|
997
|
+
_this.HZiO = id;
|
|
998
|
+
_this.EXJl = index;
|
|
999
|
+
_this.jzOu = noKpiArray;
|
|
1000
|
+
_this.VIsH = respectSequence;
|
|
1001
1001
|
_this.childConditionIndex = childConditionIndex;
|
|
1002
1002
|
_this.across_sessions = across_sessions ? across_sessions : false;
|
|
1003
1003
|
if (flag !== "termination" || flag === "") {
|
|
1004
|
-
var result = _this.
|
|
1004
|
+
var result = _this.vzQc.parse(condition);
|
|
1005
1005
|
if (result) {
|
|
1006
|
-
_this.
|
|
1006
|
+
_this.IKic = _this.vzQc.IKic;
|
|
1007
1007
|
|
|
1008
1008
|
// FIXME: Why this code is written? Don't see any usecase
|
|
1009
|
-
if (_this.
|
|
1010
|
-
var eventName = _this.
|
|
1009
|
+
if (_this.vzQc.kMTt) {
|
|
1010
|
+
var eventName = _this.vzQc.sAgb.KezF;
|
|
1011
1011
|
if (eventName === "APX_PAGE_OPENED") {
|
|
1012
|
-
eventName = _this.
|
|
1013
|
-
eventName = isDefined(eventName) ? eventName : _this.
|
|
1012
|
+
eventName = _this.vzQc.sAgb.RmGv["navigation_id"];
|
|
1013
|
+
eventName = isDefined(eventName) ? eventName : _this.vzQc.sAgb.KezF;
|
|
1014
1014
|
}
|
|
1015
|
-
_this.
|
|
1016
|
-
var count = _this.
|
|
1017
|
-
var operator = _this.
|
|
1018
|
-
_this.
|
|
1019
|
-
_this.
|
|
1020
|
-
// If the condition is already satisfied and if it is page view, no need to
|
|
1015
|
+
_this.pXyH = Apxor.getController().getEventCount(eventName);
|
|
1016
|
+
var count = _this.vzQc.Psxj;
|
|
1017
|
+
var operator = _this.vzQc.djdu;
|
|
1018
|
+
_this.KOzR = _this.JMfV(_this.pXyH - 1, count, operator, false);
|
|
1019
|
+
_this.AXNR = _this.KOzR;
|
|
1020
|
+
// If the condition is already satisfied and if it is page view, no need to GrDR
|
|
1021
1021
|
// This only applies for NAVIGATION_EVENTS
|
|
1022
|
-
if (_this.
|
|
1022
|
+
if (_this.KOzR && _this.vzQc.sAgb.KezF === "APX_PAGE_OPENED") {
|
|
1023
1023
|
return true;
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
1026
|
if (registerChecker === true) {
|
|
1027
1027
|
if (!respectSequence || index === 0 || respectSequence === "unordered") {
|
|
1028
|
-
_this.
|
|
1028
|
+
_this.GrDR();
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
1031
1031
|
return true;
|
|
1032
1032
|
}
|
|
1033
1033
|
} else {
|
|
1034
|
-
var _result = _this.
|
|
1035
|
-
_this.
|
|
1036
|
-
_this.
|
|
1034
|
+
var _result = _this.vJKT.parse(condition);
|
|
1035
|
+
_this.JeVw = _this.vJKT.IKic;
|
|
1036
|
+
_this.wvOI();
|
|
1037
1037
|
return true;
|
|
1038
1038
|
}
|
|
1039
1039
|
return false;
|
|
1040
1040
|
});
|
|
1041
|
-
_defineProperty(this, "
|
|
1041
|
+
_defineProperty(this, "GrDR", function () {
|
|
1042
1042
|
var _window$ApxorRTM;
|
|
1043
1043
|
var childConditionIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
|
|
1044
1044
|
if (childConditionIndex != -1) {
|
|
1045
|
-
_this.
|
|
1045
|
+
_this.xgAm = childConditionIndex;
|
|
1046
1046
|
}
|
|
1047
|
-
var condition = _this.
|
|
1047
|
+
var condition = _this.vzQc;
|
|
1048
1048
|
var event_category = condition !== null && condition !== void 0 && condition._eventCategory ? condition === null || condition === void 0 ? void 0 : condition._eventCategory : "specific_event";
|
|
1049
|
-
var precondition = condition.
|
|
1049
|
+
var precondition = condition.hBAL;
|
|
1050
1050
|
var ceInstance = CE.getInstance();
|
|
1051
|
-
if (precondition.
|
|
1052
|
-
_this.
|
|
1051
|
+
if (precondition.wwnJ === "app_start") {
|
|
1052
|
+
_this.AXNR = true;
|
|
1053
1053
|
if (condition !== null && condition !== void 0 && condition._timeEnabled) {
|
|
1054
1054
|
if ((condition === null || condition === void 0 ? void 0 : condition._time.unit) != "session") {
|
|
1055
1055
|
var timeInMillisec = calculateTime(condition._time.unit, condition._time.value);
|
|
1056
|
-
if ((condition === null || condition === void 0 ? void 0 : condition.
|
|
1057
|
-
_this.
|
|
1056
|
+
if ((condition === null || condition === void 0 ? void 0 : condition.YnyK) == "didn't") {
|
|
1057
|
+
_this.MyCf = false;
|
|
1058
1058
|
_this.timerDidnt = setTimeout(function () {
|
|
1059
|
-
if (!_this.
|
|
1060
|
-
_this.
|
|
1061
|
-
if (_this.
|
|
1062
|
-
_this.
|
|
1063
|
-
_this.
|
|
1064
|
-
if (_this.
|
|
1065
|
-
_this.
|
|
1066
|
-
_this.
|
|
1067
|
-
ceInstance.validate(_this.
|
|
1059
|
+
if (!_this.MyCf) {
|
|
1060
|
+
_this.KOzR = true;
|
|
1061
|
+
if (_this.KOzR) {
|
|
1062
|
+
_this.RexI += 1;
|
|
1063
|
+
_this.KOzR = _this.JMfV(_this.RexI, _this.vzQc.Psxj, _this.vzQc.djdu);
|
|
1064
|
+
if (_this.KOzR) {
|
|
1065
|
+
_this.vzQc.oGib = Date.now();
|
|
1066
|
+
_this.MyCf = false;
|
|
1067
|
+
ceInstance.validate(_this.HZiO, _this.EXJl, _this.xgAm);
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
1070
1070
|
if (event_category === "specific_event") {
|
|
1071
|
-
ceInstance.unregisterFromEvent(generateKey(_this.
|
|
1071
|
+
ceInstance.unregisterFromEvent(generateKey(_this.vzQc.wwnJ) + "___" + _this.vzQc.sAgb.KezF, _this.LGqh);
|
|
1072
1072
|
} else {
|
|
1073
|
-
_this.
|
|
1073
|
+
_this.ahmf(event_category);
|
|
1074
1074
|
}
|
|
1075
|
-
_this.
|
|
1075
|
+
_this.AXNR = false;
|
|
1076
1076
|
}
|
|
1077
1077
|
}, timeInMillisec);
|
|
1078
1078
|
if (_this.across_sessions) {
|
|
1079
1079
|
var _timeInMillisec = calculateTime(condition._time.unit, condition._time.value);
|
|
1080
1080
|
var timeEnabled = condition._timeEnabled;
|
|
1081
1081
|
var condition_id = condition._id;
|
|
1082
|
-
_this.
|
|
1082
|
+
_this.bPyB(condition.YnyK, condition.sAgb.KezF, Date.now(), condition.sAgb.RmGv, _timeInMillisec, timeEnabled, condition_id);
|
|
1083
1083
|
}
|
|
1084
1084
|
if (event_category === "specific_event") {
|
|
1085
|
-
ceInstance.registerForEvent(generateKey(_this.
|
|
1086
|
-
_this.
|
|
1085
|
+
ceInstance.registerForEvent(generateKey(_this.vzQc.wwnJ) + "___" + _this.vzQc.sAgb.KezF, _this.LGqh);
|
|
1086
|
+
_this.azNd = _this.vzQc;
|
|
1087
1087
|
} else {
|
|
1088
|
-
_this.
|
|
1088
|
+
_this.yamK(event_category);
|
|
1089
1089
|
}
|
|
1090
|
-
} else if ((condition === null || condition === void 0 ? void 0 : condition.
|
|
1090
|
+
} else if ((condition === null || condition === void 0 ? void 0 : condition.YnyK) == "did") {
|
|
1091
1091
|
_this.timerDid = setTimeout(function () {
|
|
1092
|
-
if (!_this.
|
|
1092
|
+
if (!_this.MRwJ) {
|
|
1093
1093
|
if (event_category === "specific_event") {
|
|
1094
|
-
ceInstance.unregisterFromEvent(generateKey(_this.
|
|
1094
|
+
ceInstance.unregisterFromEvent(generateKey(_this.vzQc.wwnJ) + "___" + _this.vzQc.sAgb.KezF, _this.CelA);
|
|
1095
1095
|
} else {
|
|
1096
|
-
_this.
|
|
1096
|
+
_this.OtLn(event_category);
|
|
1097
1097
|
}
|
|
1098
1098
|
}
|
|
1099
1099
|
}, timeInMillisec);
|
|
@@ -1101,327 +1101,327 @@
|
|
|
1101
1101
|
var _timeInMillisec2 = calculateTime(condition._time.unit, condition._time.value);
|
|
1102
1102
|
var _timeEnabled = condition._timeEnabled;
|
|
1103
1103
|
var _condition_id = condition._id;
|
|
1104
|
-
_this.
|
|
1104
|
+
_this.bPyB(condition.YnyK, condition.sAgb.KezF, Date.now(), condition.sAgb.RmGv, _timeInMillisec2, _timeEnabled, _condition_id);
|
|
1105
1105
|
}
|
|
1106
1106
|
if (event_category === "specific_event") {
|
|
1107
|
-
ceInstance.registerForEvent(generateKey(_this.
|
|
1108
|
-
_this.
|
|
1107
|
+
ceInstance.registerForEvent(generateKey(_this.vzQc.wwnJ) + "___" + _this.vzQc.sAgb.KezF, _this.CelA);
|
|
1108
|
+
_this.DOoL = _this.vzQc;
|
|
1109
1109
|
} else {
|
|
1110
|
-
_this.
|
|
1110
|
+
_this.zFtC(event_category);
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
1114
|
} else {
|
|
1115
1115
|
if (event_category === "specific_event") {
|
|
1116
|
-
ceInstance.registerForEvent(generateKey(condition.
|
|
1116
|
+
ceInstance.registerForEvent(generateKey(condition.wwnJ) + "___" + condition.sAgb.KezF, _this.AJoA);
|
|
1117
1117
|
} else {
|
|
1118
|
-
_this.
|
|
1118
|
+
_this.yCKs(event_category);
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
1121
1121
|
} else {
|
|
1122
1122
|
if (condition !== null && condition !== void 0 && condition._timeEnabled) {
|
|
1123
1123
|
if ((condition === null || condition === void 0 ? void 0 : condition._time.unit) != "session") {
|
|
1124
1124
|
var _timeInMillisec3 = calculateTime(condition._time.unit, condition._time.value);
|
|
1125
|
-
if ((condition === null || condition === void 0 ? void 0 : condition.
|
|
1126
|
-
_this.
|
|
1125
|
+
if ((condition === null || condition === void 0 ? void 0 : condition.YnyK) == "didn't") {
|
|
1126
|
+
_this.MyCf = false;
|
|
1127
1127
|
_this.timerDidnt = setTimeout(function () {
|
|
1128
|
-
if (!_this.
|
|
1129
|
-
_this.
|
|
1130
|
-
if (_this.
|
|
1131
|
-
_this.
|
|
1132
|
-
_this.
|
|
1133
|
-
if (_this.
|
|
1134
|
-
_this.
|
|
1135
|
-
_this.
|
|
1136
|
-
ceInstance.validate(_this.
|
|
1128
|
+
if (!_this.MyCf) {
|
|
1129
|
+
_this.KOzR = true;
|
|
1130
|
+
if (_this.KOzR) {
|
|
1131
|
+
_this.RexI += 1;
|
|
1132
|
+
_this.KOzR = _this.JMfV(_this.RexI, _this.vzQc.Psxj, _this.vzQc.djdu);
|
|
1133
|
+
if (_this.KOzR) {
|
|
1134
|
+
_this.vzQc.oGib = Date.now();
|
|
1135
|
+
_this.MyCf = false;
|
|
1136
|
+
ceInstance.validate(_this.HZiO, _this.EXJl);
|
|
1137
1137
|
}
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
1140
1140
|
if (event_category === "specific_event") {
|
|
1141
|
-
ceInstance.unregisterFromEvent(generateKey(_this.
|
|
1141
|
+
ceInstance.unregisterFromEvent(generateKey(_this.vzQc.wwnJ) + "___" + _this.vzQc.sAgb.KezF, _this.LGqh);
|
|
1142
1142
|
}
|
|
1143
|
-
_this.
|
|
1143
|
+
_this.AXNR = false;
|
|
1144
1144
|
}, _timeInMillisec3);
|
|
1145
1145
|
if (event_category === "specific_event") {
|
|
1146
|
-
ceInstance.registerForEvent(generateKey(_this.
|
|
1147
|
-
_this.
|
|
1146
|
+
ceInstance.registerForEvent(generateKey(_this.vzQc.wwnJ) + "___" + _this.vzQc.sAgb.KezF, _this.LGqh);
|
|
1147
|
+
_this.azNd = _this.vzQc;
|
|
1148
1148
|
} else {
|
|
1149
|
-
_this.
|
|
1149
|
+
_this.yamK();
|
|
1150
1150
|
}
|
|
1151
|
-
} else if ((condition === null || condition === void 0 ? void 0 : condition.
|
|
1151
|
+
} else if ((condition === null || condition === void 0 ? void 0 : condition.YnyK) == "did") {
|
|
1152
1152
|
_this.timerDid = setTimeout(function () {
|
|
1153
|
-
if (!_this.
|
|
1153
|
+
if (!_this.MRwJ) {
|
|
1154
1154
|
if (event_category === "specific_event") {
|
|
1155
|
-
ceInstance.unregisterFromEvent(generateKey(_this.
|
|
1155
|
+
ceInstance.unregisterFromEvent(generateKey(_this.vzQc.wwnJ) + "___" + _this.vzQc.sAgb.KezF, _this.CelA);
|
|
1156
1156
|
}
|
|
1157
1157
|
}
|
|
1158
1158
|
}, _timeInMillisec3);
|
|
1159
1159
|
if (event_category === "specific_event") {
|
|
1160
|
-
ceInstance.registerForEvent(generateKey(_this.
|
|
1160
|
+
ceInstance.registerForEvent(generateKey(_this.vzQc.wwnJ) + "___" + _this.vzQc.sAgb.KezF, _this.CelA);
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
1164
|
} else {
|
|
1165
1165
|
if (event_category === "specific_event") {
|
|
1166
|
-
ceInstance.registerForEvent(generateKey(condition.
|
|
1166
|
+
ceInstance.registerForEvent(generateKey(condition.wwnJ) + "___" + precondition.sAgb.KezF, _this.AJoA);
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
1169
|
}
|
|
1170
|
-
if ((_window$ApxorRTM = window.ApxorRTM) !== null && _window$ApxorRTM !== void 0 && _window$ApxorRTM.badgesLists.includes(_this.
|
|
1171
|
-
ceInstance.registerForEvent(generateKey(condition.
|
|
1170
|
+
if ((_window$ApxorRTM = window.ApxorRTM) !== null && _window$ApxorRTM !== void 0 && _window$ApxorRTM.badgesLists.includes(_this.HZiO)) {
|
|
1171
|
+
ceInstance.registerForEvent(generateKey(condition.wwnJ) + "___" + "apxor-badge-container-".concat("-".concat(_this.HZiO).replaceAll(" ", "").replace(/[^\w\s]/gi, "")), _this.AJoA);
|
|
1172
1172
|
}
|
|
1173
1173
|
});
|
|
1174
|
-
_defineProperty(this, "
|
|
1174
|
+
_defineProperty(this, "yCKs", function (event_category) {
|
|
1175
1175
|
var ceInstance = new CE();
|
|
1176
1176
|
if (event_category === "apxor_event") {
|
|
1177
1177
|
ceInstance.registerForEvent("apxor_event", function (type, name, time, additionalInfo) {
|
|
1178
|
-
_this.
|
|
1178
|
+
_this.AJoA(generateKey(_this.vzQc.wwnJ), _this.vzQc.sAgb.KezF, time, _this.vzQc.sAgb.RmGv);
|
|
1179
1179
|
});
|
|
1180
1180
|
} else if (event_category === "customer_event") {
|
|
1181
1181
|
ceInstance.registerForEvent("customer_event", function (type, name, time, additionalInfo) {
|
|
1182
|
-
_this.
|
|
1182
|
+
_this.AJoA(generateKey(_this.vzQc.wwnJ), _this.vzQc.sAgb.KezF, time, _this.vzQc.sAgb.RmGv);
|
|
1183
1183
|
});
|
|
1184
1184
|
} else if (event_category === "any_event") {
|
|
1185
1185
|
ceInstance.registerForEvent("any_event", function (type, name, time, additionalInfo) {
|
|
1186
|
-
_this.
|
|
1186
|
+
_this.AJoA(generateKey(_this.vzQc.wwnJ), _this.vzQc.sAgb.KezF, time, _this.vzQc.sAgb.RmGv);
|
|
1187
1187
|
});
|
|
1188
1188
|
} else if (event_category === "campaign_event") {
|
|
1189
1189
|
ceInstance.registerForEvent("campaign_event", function (type, name, time, additionalInfo) {
|
|
1190
|
-
_this.
|
|
1190
|
+
_this.AJoA(generateKey(_this.vzQc.wwnJ), _this.vzQc.sAgb.KezF, time, _this.vzQc.sAgb.RmGv);
|
|
1191
1191
|
});
|
|
1192
1192
|
} else if (event_category === "survey_event") {
|
|
1193
1193
|
ceInstance.registerForEvent("survey_event", function (type, name, time, additionalInfo) {
|
|
1194
|
-
_this.
|
|
1194
|
+
_this.AJoA(generateKey(_this.vzQc.wwnJ), _this.vzQc.sAgb.KezF, time, _this.vzQc.sAgb.RmGv);
|
|
1195
1195
|
});
|
|
1196
1196
|
}
|
|
1197
1197
|
});
|
|
1198
|
-
_defineProperty(this, "
|
|
1198
|
+
_defineProperty(this, "ahmf", function (event_category) {
|
|
1199
1199
|
var ceInstance = new CE();
|
|
1200
|
-
var eventCategory = _this.
|
|
1200
|
+
var eventCategory = _this.vzQc._eventCategory;
|
|
1201
1201
|
if (eventCategory === "apxor_event") {
|
|
1202
|
-
ceInstance.unregisterFromEvent("apxor_event", _this.
|
|
1202
|
+
ceInstance.unregisterFromEvent("apxor_event", _this.LGqh);
|
|
1203
1203
|
} else if (eventCategory === "customer_event") {
|
|
1204
|
-
ceInstance.unregisterFromEvent("customer_event", _this.
|
|
1204
|
+
ceInstance.unregisterFromEvent("customer_event", _this.LGqh);
|
|
1205
1205
|
} else if (eventCategory === "any_event") {
|
|
1206
|
-
ceInstance.unregisterFromEvent("any_event", _this.
|
|
1206
|
+
ceInstance.unregisterFromEvent("any_event", _this.LGqh);
|
|
1207
1207
|
} else if (eventCategory === "campaign_event") {
|
|
1208
|
-
ceInstance.unregisterFromEvent("campaign_event", _this.
|
|
1208
|
+
ceInstance.unregisterFromEvent("campaign_event", _this.LGqh);
|
|
1209
1209
|
} else if (eventCategory === "survey_event") {
|
|
1210
|
-
ceInstance.unregisterFromEvent("survey_event", _this.
|
|
1210
|
+
ceInstance.unregisterFromEvent("survey_event", _this.LGqh);
|
|
1211
1211
|
}
|
|
1212
1212
|
});
|
|
1213
|
-
_defineProperty(this, "
|
|
1213
|
+
_defineProperty(this, "yamK", function () {
|
|
1214
1214
|
var ceInstance = new CE();
|
|
1215
|
-
var eventCategory = _this.
|
|
1215
|
+
var eventCategory = _this.vzQc._eventCategory;
|
|
1216
1216
|
if (eventCategory === "apxor_event") {
|
|
1217
|
-
ceInstance.registerForEvent("apxor_event", _this.
|
|
1217
|
+
ceInstance.registerForEvent("apxor_event", _this.LGqh);
|
|
1218
1218
|
} else if (eventCategory === "customer_event") {
|
|
1219
|
-
ceInstance.registerForEvent("customer_event", _this.
|
|
1219
|
+
ceInstance.registerForEvent("customer_event", _this.LGqh);
|
|
1220
1220
|
} else if (eventCategory === "any_event") {
|
|
1221
|
-
ceInstance.registerForEvent("any_event", _this.
|
|
1221
|
+
ceInstance.registerForEvent("any_event", _this.LGqh);
|
|
1222
1222
|
} else if (eventCategory === "campaign_event") {
|
|
1223
|
-
ceInstance.registerForEvent("campaign_event", _this.
|
|
1223
|
+
ceInstance.registerForEvent("campaign_event", _this.LGqh);
|
|
1224
1224
|
} else if (eventCategory === "survey_event") {
|
|
1225
|
-
ceInstance.registerForEvent("survey_event", _this.
|
|
1225
|
+
ceInstance.registerForEvent("survey_event", _this.LGqh);
|
|
1226
1226
|
}
|
|
1227
1227
|
});
|
|
1228
|
-
_defineProperty(this, "
|
|
1228
|
+
_defineProperty(this, "zFtC", function () {
|
|
1229
1229
|
var ceInstance = new CE();
|
|
1230
|
-
var eventCategory = _this.
|
|
1230
|
+
var eventCategory = _this.vzQc._eventCategory;
|
|
1231
1231
|
if (eventCategory === "apxor_event") {
|
|
1232
|
-
ceInstance.registerForEvent("apxor_event", _this.
|
|
1232
|
+
ceInstance.registerForEvent("apxor_event", _this.CelA);
|
|
1233
1233
|
} else if (eventCategory === "customer_event") {
|
|
1234
|
-
ceInstance.registerForEvent("customer_event", _this.
|
|
1234
|
+
ceInstance.registerForEvent("customer_event", _this.CelA);
|
|
1235
1235
|
} else if (eventCategory === "any_event") {
|
|
1236
|
-
ceInstance.registerForEvent("any_event", _this.
|
|
1236
|
+
ceInstance.registerForEvent("any_event", _this.CelA);
|
|
1237
1237
|
} else if (eventCategory === "campaign_event") {
|
|
1238
|
-
ceInstance.registerForEvent("campaign_event", _this.
|
|
1238
|
+
ceInstance.registerForEvent("campaign_event", _this.CelA);
|
|
1239
1239
|
} else if (eventCategory === "survey_event") {
|
|
1240
|
-
ceInstance.registerForEvent("survey_event", _this.
|
|
1240
|
+
ceInstance.registerForEvent("survey_event", _this.CelA);
|
|
1241
1241
|
}
|
|
1242
1242
|
});
|
|
1243
|
-
_defineProperty(this, "
|
|
1243
|
+
_defineProperty(this, "OtLn", function () {
|
|
1244
1244
|
var ceInstance = new CE();
|
|
1245
|
-
var eventCategory = _this.
|
|
1245
|
+
var eventCategory = _this.vzQc._eventCategory;
|
|
1246
1246
|
if (eventCategory === "apxor_event") {
|
|
1247
|
-
ceInstance.unregisterFromEvent("apxor_event", _this.
|
|
1247
|
+
ceInstance.unregisterFromEvent("apxor_event", _this.CelA);
|
|
1248
1248
|
} else if (eventCategory === "customer_event") {
|
|
1249
|
-
ceInstance.unregisterFromEvent("customer_event", _this.
|
|
1249
|
+
ceInstance.unregisterFromEvent("customer_event", _this.CelA);
|
|
1250
1250
|
} else if (eventCategory === "any_event") {
|
|
1251
|
-
ceInstance.unregisterFromEvent("any_event", _this.
|
|
1251
|
+
ceInstance.unregisterFromEvent("any_event", _this.CelA);
|
|
1252
1252
|
} else if (eventCategory === "campaign_event") {
|
|
1253
|
-
ceInstance.unregisterFromEvent("campaign_event", _this.
|
|
1253
|
+
ceInstance.unregisterFromEvent("campaign_event", _this.CelA);
|
|
1254
1254
|
} else if (eventCategory === "survey_event") {
|
|
1255
|
-
ceInstance.unregisterFromEvent("survey_event", _this.
|
|
1255
|
+
ceInstance.unregisterFromEvent("survey_event", _this.CelA);
|
|
1256
1256
|
}
|
|
1257
1257
|
});
|
|
1258
|
-
_defineProperty(this, "
|
|
1259
|
-
var condition = _this.
|
|
1258
|
+
_defineProperty(this, "wvOI", function () {
|
|
1259
|
+
var condition = _this.vJKT;
|
|
1260
1260
|
var ceInstance = CE.getInstance();
|
|
1261
|
-
_this.
|
|
1262
|
-
ceInstance.registerForEvent(generateKey(condition.
|
|
1261
|
+
_this.AXNR = true;
|
|
1262
|
+
ceInstance.registerForEvent(generateKey(condition.wwnJ) + "___" + condition.sAgb.KezF, _this.dDEu);
|
|
1263
1263
|
});
|
|
1264
|
-
_defineProperty(this, "
|
|
1265
|
-
var _this$
|
|
1264
|
+
_defineProperty(this, "mywK", function (type, name, time, additionalInfo) {
|
|
1265
|
+
var _this$vzQc;
|
|
1266
1266
|
var eventTime = Date.now();
|
|
1267
|
-
var time_differnce = (eventTime - _this.
|
|
1268
|
-
var time_fromConfig = ((_this$
|
|
1267
|
+
var time_differnce = (eventTime - _this.sOQM[name]) / 1000;
|
|
1268
|
+
var time_fromConfig = ((_this$vzQc = _this.vzQc) === null || _this$vzQc === void 0 || (_this$vzQc = _this$vzQc.sAgb) === null || _this$vzQc === void 0 || (_this$vzQc = _this$vzQc.RmGv) === null || _this$vzQc === void 0 ? void 0 : _this$vzQc.time) / 1000;
|
|
1269
1269
|
if (time_fromConfig > time_differnce) {
|
|
1270
1270
|
_this._displayCampaign(time);
|
|
1271
1271
|
}
|
|
1272
1272
|
});
|
|
1273
|
-
_defineProperty(this, "
|
|
1273
|
+
_defineProperty(this, "blEo", function (type, name, time, additionalInfo) {
|
|
1274
1274
|
var _this$_condition2, _this$_condition3;
|
|
1275
|
-
_this.
|
|
1275
|
+
_this.MyCf = true;
|
|
1276
1276
|
var currentTime = Date.now();
|
|
1277
|
-
var eventName = (_this$_condition2 = _this.
|
|
1278
|
-
var eventTime = _this.
|
|
1277
|
+
var eventName = (_this$_condition2 = _this.vzQc) === null || _this$_condition2 === void 0 || (_this$_condition2 = _this$_condition2.hBAL) === null || _this$_condition2 === void 0 ? void 0 : _this$_condition2.sAgb.KezF;
|
|
1278
|
+
var eventTime = _this.sOQM[eventName];
|
|
1279
1279
|
var time_differnce = (currentTime - eventTime) / 1000;
|
|
1280
|
-
var time_fromConfig = (_this$_condition3 = _this.
|
|
1280
|
+
var time_fromConfig = (_this$_condition3 = _this.vzQc) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.sAgb) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.RmGv) === null || _this$_condition3 === void 0 ? void 0 : _this$_condition3.time;
|
|
1281
1281
|
time_fromConfig = time_fromConfig / 1000;
|
|
1282
1282
|
if (time_fromConfig > time_differnce) {
|
|
1283
1283
|
_this._displayCampaign(time);
|
|
1284
1284
|
}
|
|
1285
1285
|
//unregister the event
|
|
1286
1286
|
});
|
|
1287
|
-
_defineProperty(this, "
|
|
1288
|
-
_this.
|
|
1287
|
+
_defineProperty(this, "CelA", function () {
|
|
1288
|
+
_this.MRwJ = true;
|
|
1289
1289
|
var ceInstance = new CE();
|
|
1290
1290
|
clearTimeout(_this.timerDid);
|
|
1291
|
-
_this.
|
|
1292
|
-
_this.
|
|
1293
|
-
if (_this.
|
|
1294
|
-
ceInstance.unregisterFromEvent(generateKey(_this.
|
|
1295
|
-
_this.
|
|
1296
|
-
ceInstance.validate(_this.
|
|
1291
|
+
_this.RexI += 1;
|
|
1292
|
+
_this.KOzR = _this.JMfV(_this.RexI, _this.vzQc.Psxj, _this.vzQc.djdu);
|
|
1293
|
+
if (_this.KOzR) {
|
|
1294
|
+
ceInstance.unregisterFromEvent(generateKey(_this.DOoL.wwnJ) + "___" + _this.DOoL.sAgb.KezF, _this.CelA);
|
|
1295
|
+
_this.MRwJ = false;
|
|
1296
|
+
ceInstance.validate(_this.HZiO, _this.EXJl, _this.xgAm);
|
|
1297
1297
|
}
|
|
1298
1298
|
});
|
|
1299
|
-
_defineProperty(this, "
|
|
1300
|
-
_this.
|
|
1299
|
+
_defineProperty(this, "LGqh", function (type, name, time, additionalInfo) {
|
|
1300
|
+
_this.MyCf = true;
|
|
1301
1301
|
clearTimeout(_this.timerDidnt);
|
|
1302
1302
|
var ceInstance = new CE();
|
|
1303
|
-
ceInstance.unregisterFromEvent(generateKey(_this.
|
|
1303
|
+
ceInstance.unregisterFromEvent(generateKey(_this.azNd.wwnJ) + "___" + _this.azNd.sAgb.KezF, _this.LGqh);
|
|
1304
1304
|
//return;
|
|
1305
1305
|
});
|
|
1306
|
-
_defineProperty(this, "
|
|
1306
|
+
_defineProperty(this, "AJoA", function (type, name, time, additionalInfo) {
|
|
1307
1307
|
var _window$ApxorRTM2, _window$ApxorRTM3;
|
|
1308
1308
|
var ceInstance = CE.getInstance();
|
|
1309
|
-
if (!_this.
|
|
1309
|
+
if (!_this.AXNR) {
|
|
1310
1310
|
// Validate Precondition
|
|
1311
|
-
_this.
|
|
1312
|
-
if (_this.
|
|
1313
|
-
var condition = _this.
|
|
1314
|
-
var precondition = condition.
|
|
1315
|
-
precondition.
|
|
1311
|
+
_this.AXNR = _this.tOnf(type, name, time, additionalInfo);
|
|
1312
|
+
if (_this.AXNR) {
|
|
1313
|
+
var condition = _this.vzQc;
|
|
1314
|
+
var precondition = condition.hBAL;
|
|
1315
|
+
precondition.oGib = time;
|
|
1316
1316
|
//events will be registred by its type activity event_type: "activity_time"
|
|
1317
|
-
if ((condition === null || condition === void 0 ? void 0 : condition.
|
|
1318
|
-
var
|
|
1319
|
-
var event_time = condition === null || condition === void 0 || (
|
|
1320
|
-
if ((condition === null || condition === void 0 || (
|
|
1317
|
+
if ((condition === null || condition === void 0 ? void 0 : condition.wwnJ) === "activity_time") {
|
|
1318
|
+
var vzQc$sAgb, vzQc$FPgG, vzQc$_details2, vzQc$_details3;
|
|
1319
|
+
var event_time = condition === null || condition === void 0 || (vzQc$sAgb = condition.sAgb) === null || vzQc$sAgb === void 0 || (vzQc$sAgb = vzQc$sAgb.RmGv) === null || vzQc$sAgb === void 0 ? void 0 : vzQc$sAgb.time;
|
|
1320
|
+
if ((condition === null || condition === void 0 || (vzQc$FPgG = condition.FPgG) === null || vzQc$FPgG === void 0 ? void 0 : vzQc$FPgG.length) > 0) {
|
|
1321
1321
|
setTimeout(function () {
|
|
1322
1322
|
var _Apxor$getController;
|
|
1323
1323
|
var appEventsForNoKpi = (_Apxor$getController = Apxor.getController()) === null || _Apxor$getController === void 0 ? void 0 : _Apxor$getController._appEventsNoKpi;
|
|
1324
|
-
appEventsForNoKpi.length <= 2 && condition.
|
|
1324
|
+
appEventsForNoKpi.length <= 2 && condition.FPgG === location.pathname && _this._displayCampaign(time);
|
|
1325
1325
|
}, event_time);
|
|
1326
|
-
} else if ((condition === null || condition === void 0 || (
|
|
1326
|
+
} else if ((condition === null || condition === void 0 || (vzQc$_details2 = condition.sAgb) === null || vzQc$_details2 === void 0 || (vzQc$_details2 = vzQc$_details2.RmGv) === null || vzQc$_details2 === void 0 ? void 0 : vzQc$_details2.nkpi.length) > 0) {
|
|
1327
1327
|
setTimeout(function () {
|
|
1328
|
-
if (!_this.
|
|
1329
|
-
_this.
|
|
1330
|
-
if (_this.
|
|
1331
|
-
_this.
|
|
1332
|
-
_this.
|
|
1333
|
-
if (_this.
|
|
1334
|
-
_this.
|
|
1335
|
-
_this.
|
|
1336
|
-
ceInstance.validate(_this.
|
|
1328
|
+
if (!_this.MyCf) {
|
|
1329
|
+
_this.KOzR = true;
|
|
1330
|
+
if (_this.KOzR) {
|
|
1331
|
+
_this.RexI += 1;
|
|
1332
|
+
_this.KOzR = _this.JMfV(_this.RexI, _this.vzQc.Psxj, _this.vzQc.djdu);
|
|
1333
|
+
if (_this.KOzR) {
|
|
1334
|
+
_this.vzQc.oGib = time;
|
|
1335
|
+
_this.MyCf = false;
|
|
1336
|
+
ceInstance.validate(_this.HZiO, _this.EXJl);
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
|
-
condition.
|
|
1341
|
-
ceInstance.unregisterFromEvent(toUpperCase(condition.
|
|
1342
|
-
_this.
|
|
1340
|
+
condition.sAgb.RmGv.nkpi.map(function (nokpi) {
|
|
1341
|
+
ceInstance.unregisterFromEvent(toUpperCase(condition.sAgb.RmGv.et) + "___" + nokpi, _this);
|
|
1342
|
+
_this.AXNR = false;
|
|
1343
1343
|
});
|
|
1344
1344
|
}, event_time);
|
|
1345
|
-
condition.
|
|
1346
|
-
ceInstance.registerForEvent(toUpperCase(condition.
|
|
1345
|
+
condition.sAgb.RmGv.nkpi.map(function (nokpi) {
|
|
1346
|
+
ceInstance.registerForEvent(toUpperCase(condition.sAgb.RmGv.et) + "___" + nokpi, _this.LGqh);
|
|
1347
1347
|
});
|
|
1348
1348
|
}
|
|
1349
1349
|
//it is for unregistering the events did case after completing the time imit
|
|
1350
|
-
else if ((condition === null || condition === void 0 || (
|
|
1350
|
+
else if ((condition === null || condition === void 0 || (vzQc$_details3 = condition.sAgb) === null || vzQc$_details3 === void 0 || (vzQc$_details3 = vzQc$_details3.RmGv) === null || vzQc$_details3 === void 0 ? void 0 : vzQc$_details3.kpi.length) > 0) {
|
|
1351
1351
|
setTimeout(function () {
|
|
1352
|
-
condition.
|
|
1353
|
-
ceInstance.unregisterFromEvent(toUpperCase(condition.
|
|
1352
|
+
condition.sAgb.RmGv.kpi.map(function (kpi) {
|
|
1353
|
+
ceInstance.unregisterFromEvent(toUpperCase(condition.sAgb.RmGv.et) + "___" + kpi, _this);
|
|
1354
1354
|
});
|
|
1355
1355
|
}, event_time);
|
|
1356
|
-
condition.
|
|
1357
|
-
if (kpi === condition.
|
|
1356
|
+
condition.sAgb.RmGv.kpi.map(function (kpi) {
|
|
1357
|
+
if (kpi === condition.hBAL.sAgb.KezF) {
|
|
1358
1358
|
//unregister the previous event
|
|
1359
|
-
ceInstance.unregisterFromEvent(generateKey(precondition.
|
|
1360
|
-
ceInstance.registerForEvent(toUpperCase(condition.
|
|
1359
|
+
ceInstance.unregisterFromEvent(generateKey(precondition.wwnJ) + "___" + precondition.sAgb.KezF, _this);
|
|
1360
|
+
ceInstance.registerForEvent(toUpperCase(condition.sAgb.RmGv.et) + "___" + kpi, _this.mywK);
|
|
1361
1361
|
} else {
|
|
1362
|
-
ceInstance.registerForEvent(toUpperCase(condition.
|
|
1362
|
+
ceInstance.registerForEvent(toUpperCase(condition.sAgb.RmGv.et) + "___" + kpi, _this.blEo);
|
|
1363
1363
|
}
|
|
1364
1364
|
});
|
|
1365
1365
|
}
|
|
1366
1366
|
} else {
|
|
1367
|
-
ceInstance.unregisterFromEvent(generateKey(precondition.
|
|
1368
|
-
ceInstance.registerForEvent(generateKey(condition.
|
|
1367
|
+
ceInstance.unregisterFromEvent(generateKey(precondition.wwnJ) + "___" + precondition.sAgb.KezF, _this);
|
|
1368
|
+
ceInstance.registerForEvent(generateKey(condition.wwnJ) + "___" + condition.sAgb.KezF, _this);
|
|
1369
1369
|
}
|
|
1370
|
-
_this.
|
|
1370
|
+
_this.sOQM[name] = Date.now();
|
|
1371
1371
|
}
|
|
1372
1372
|
return;
|
|
1373
1373
|
}
|
|
1374
|
-
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.
|
|
1375
|
-
_this.
|
|
1376
|
-
_this.
|
|
1377
|
-
ceInstance.validate(_this.
|
|
1374
|
+
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.HZiO) && Apxor.getController().isBadgeTriggerSatisfied(_this.HZiO)) {
|
|
1375
|
+
_this.KOzR = true;
|
|
1376
|
+
_this.vzQc.oGib = time;
|
|
1377
|
+
ceInstance.validate(_this.HZiO, _this.EXJl);
|
|
1378
1378
|
return;
|
|
1379
1379
|
}
|
|
1380
1380
|
|
|
1381
1381
|
// Validate Condition
|
|
1382
|
-
var validationStatus = generateKey(_this.
|
|
1382
|
+
var validationStatus = generateKey(_this.vzQc.wwnJ) === type && _this.TtKY(time - _this.vzQc.hBAL.oGib, _this.vzQc.tkCM) && _this.vzQc.sAgb.KezF === name && _this.RBbM(_this.vzQc.sAgb.RmGv, additionalInfo);
|
|
1383
1383
|
if (validationStatus) {
|
|
1384
|
-
_this.
|
|
1385
|
-
_this.
|
|
1386
|
-
if (_this.
|
|
1387
|
-
_this.
|
|
1384
|
+
_this.RexI += 1;
|
|
1385
|
+
_this.KOzR = _this.JMfV(_this.RexI, _this.vzQc.Psxj, _this.vzQc.djdu);
|
|
1386
|
+
if (_this.KOzR) {
|
|
1387
|
+
_this.vzQc.oGib = time;
|
|
1388
1388
|
if (_this.across_sessions) {
|
|
1389
|
-
var timeInMillisec = calculateTime(_this.
|
|
1390
|
-
var timeEnabled = _this.
|
|
1391
|
-
var condition_id = _this.
|
|
1392
|
-
var satisfiedCount = _this.
|
|
1393
|
-
_this.
|
|
1389
|
+
var timeInMillisec = calculateTime(_this.vzQc._time.unit, _this.vzQc._time.value);
|
|
1390
|
+
var timeEnabled = _this.vzQc._timeEnabled;
|
|
1391
|
+
var condition_id = _this.vzQc._id;
|
|
1392
|
+
var satisfiedCount = _this.RexI;
|
|
1393
|
+
_this.bPyB(_this.vzQc.YnyK, name, time, additionalInfo, timeInMillisec, timeEnabled, condition_id, satisfiedCount);
|
|
1394
1394
|
}
|
|
1395
|
-
ceInstance.validate(_this.
|
|
1395
|
+
ceInstance.validate(_this.HZiO, _this.EXJl, _this.xgAm);
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
1398
|
});
|
|
1399
|
-
_defineProperty(this, "
|
|
1399
|
+
_defineProperty(this, "dDEu", function (type, name, time, additionalInfo) {
|
|
1400
1400
|
var ceInstance = CE.getInstance();
|
|
1401
|
-
var validationStatus = generateKey(_this.
|
|
1401
|
+
var validationStatus = generateKey(_this.vJKT.wwnJ) === type && _this.TtKY(time, _this.vJKT.tkCM) && _this.vJKT.sAgb.KezF === name && _this.RBbM(_this.vJKT.sAgb.RmGv, additionalInfo);
|
|
1402
1402
|
if (validationStatus) {
|
|
1403
|
-
_this.
|
|
1404
|
-
_this.
|
|
1405
|
-
if (_this.
|
|
1406
|
-
_this.
|
|
1407
|
-
ceInstance.validateForTermination(_this.
|
|
1403
|
+
_this.RexI += 1;
|
|
1404
|
+
_this.KOzR = _this.JMfV(_this.RexI, _this.vJKT.Psxj, _this.vJKT.djdu);
|
|
1405
|
+
if (_this.KOzR) {
|
|
1406
|
+
_this.vJKT.oGib = time;
|
|
1407
|
+
ceInstance.validateForTermination(_this.HZiO, _this.EXJl);
|
|
1408
1408
|
}
|
|
1409
1409
|
}
|
|
1410
1410
|
});
|
|
1411
|
-
_defineProperty(this, "
|
|
1412
|
-
var precondition = _this.
|
|
1413
|
-
var result = generateKey(precondition.
|
|
1414
|
-
result = name === "APX_PAGE_OPENED" ? result && location.pathname === precondition.
|
|
1411
|
+
_defineProperty(this, "tOnf", function (type, name, time, additionalInfo) {
|
|
1412
|
+
var precondition = _this.vzQc.hBAL;
|
|
1413
|
+
var result = generateKey(precondition.wwnJ) === type && precondition.sAgb.KezF === name && _this.TtKY(time, precondition.tkCM) && _this.RBbM(precondition.sAgb.RmGv, additionalInfo);
|
|
1414
|
+
result = name === "APX_PAGE_OPENED" ? result && location.pathname === precondition.sAgb.KvQs : result;
|
|
1415
1415
|
return result;
|
|
1416
1416
|
});
|
|
1417
|
-
_defineProperty(this, "
|
|
1417
|
+
_defineProperty(this, "TtKY", function (time, timeBounds) {
|
|
1418
1418
|
var currentTime = Math.ceil(time);
|
|
1419
|
-
return currentTime > timeBounds.
|
|
1419
|
+
return currentTime > timeBounds.DtFf && currentTime < timeBounds.tVTR;
|
|
1420
1420
|
});
|
|
1421
|
-
_defineProperty(this, "
|
|
1421
|
+
_defineProperty(this, "JMfV", function (current, required, operator) {
|
|
1422
1422
|
var checkOld = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
1423
|
-
if (checkOld && _this.
|
|
1424
|
-
current = current + _this.
|
|
1423
|
+
if (checkOld && _this.vzQc.kMTt) {
|
|
1424
|
+
current = current + _this.pXyH;
|
|
1425
1425
|
}
|
|
1426
1426
|
switch (operator) {
|
|
1427
1427
|
case "EQ":
|
|
@@ -1438,7 +1438,7 @@
|
|
|
1438
1438
|
return false;
|
|
1439
1439
|
}
|
|
1440
1440
|
});
|
|
1441
|
-
_defineProperty(this, "
|
|
1441
|
+
_defineProperty(this, "RBbM", function (expected, received) {
|
|
1442
1442
|
var status = true;
|
|
1443
1443
|
try {
|
|
1444
1444
|
var _loop = function _loop() {
|
|
@@ -1484,9 +1484,9 @@
|
|
|
1484
1484
|
} else if (type === "b") {
|
|
1485
1485
|
loggedValue = !!loggedValue;
|
|
1486
1486
|
}
|
|
1487
|
-
return
|
|
1487
|
+
return jmAk(loggedValue, expectedValue, operator);
|
|
1488
1488
|
}
|
|
1489
|
-
//
|
|
1489
|
+
// jmAk(loggedValue, expectedValue, operator)
|
|
1490
1490
|
);
|
|
1491
1491
|
|
|
1492
1492
|
var presence_checker = (_expected$item = expected[item]) !== null && _expected$item !== void 0 && _expected$item.present ? (_expected$item2 = expected[item]) === null || _expected$item2 === void 0 ? void 0 : _expected$item2.present : false;
|
|
@@ -1501,7 +1501,7 @@
|
|
|
1501
1501
|
}
|
|
1502
1502
|
status = status && match;
|
|
1503
1503
|
} else {
|
|
1504
|
-
status = status &&
|
|
1504
|
+
status = status && jmAk(received[item], expected[item], "EQ");
|
|
1505
1505
|
}
|
|
1506
1506
|
},
|
|
1507
1507
|
_ret;
|
|
@@ -1515,7 +1515,7 @@
|
|
|
1515
1515
|
}
|
|
1516
1516
|
return status;
|
|
1517
1517
|
});
|
|
1518
|
-
_defineProperty(this, "
|
|
1518
|
+
_defineProperty(this, "bPyB", function (type, name, time, additionalInfo, timeInMillisec, timeEnabled, id, satisfiedCount) {
|
|
1519
1519
|
var objectPresenceChecker = false;
|
|
1520
1520
|
var requiredObject;
|
|
1521
1521
|
_this.no_KPI_TriggerDetails = Apxor.getController().getFromStorage("apx_nokpi_triggerdetails");
|
|
@@ -1555,7 +1555,7 @@
|
|
|
1555
1555
|
}
|
|
1556
1556
|
Apxor.getController().persistToStorage("apx_nokpi_triggerdetails", JSON.stringify(_this.no_KPI_TriggerDetails));
|
|
1557
1557
|
});
|
|
1558
|
-
_defineProperty(this, "
|
|
1558
|
+
_defineProperty(this, "IgHd", function (validators) {
|
|
1559
1559
|
var ceInstance = new CE();
|
|
1560
1560
|
var _iterator = _createForOfIteratorHelper(validators),
|
|
1561
1561
|
_step;
|
|
@@ -1563,7 +1563,7 @@
|
|
|
1563
1563
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
1564
1564
|
var validator = _step.value;
|
|
1565
1565
|
if ((validator === null || validator === void 0 ? void 0 : validator.length) === 1 || (validator === null || validator === void 0 ? void 0 : validator.length) === undefined) {
|
|
1566
|
-
ceInstance.unregisterFromEvent(generateKey(validator === null || validator === void 0 ? void 0 : validator.
|
|
1566
|
+
ceInstance.unregisterFromEvent(generateKey(validator === null || validator === void 0 ? void 0 : validator.vzQc.wwnJ) + "___" + (validator === null || validator === void 0 ? void 0 : validator.vzQc.sAgb.KezF), _this.AJoA);
|
|
1567
1567
|
} else {
|
|
1568
1568
|
var _iterator2 = _createForOfIteratorHelper(validator),
|
|
1569
1569
|
_step2;
|
|
@@ -1571,7 +1571,7 @@
|
|
|
1571
1571
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
1572
1572
|
var _childValidator$_cond;
|
|
1573
1573
|
var childValidator = _step2.value;
|
|
1574
|
-
ceInstance.unregisterFromEvent(generateKey(childValidator === null || childValidator === void 0 ? void 0 : childValidator.
|
|
1574
|
+
ceInstance.unregisterFromEvent(generateKey(childValidator === null || childValidator === void 0 ? void 0 : childValidator.vzQc.wwnJ) + "___" + (childValidator === null || childValidator === void 0 || (_childValidator$_cond = childValidator.vzQc) === null || _childValidator$_cond === void 0 ? void 0 : _childValidator$_cond.sAgb.KezF), _this.AJoA);
|
|
1575
1575
|
}
|
|
1576
1576
|
} catch (err) {
|
|
1577
1577
|
_iterator2.e(err);
|
|
@@ -1591,14 +1591,14 @@
|
|
|
1591
1591
|
key: "_displayCampaign",
|
|
1592
1592
|
value: function _displayCampaign(time) {
|
|
1593
1593
|
var ceInstance = CE.getInstance();
|
|
1594
|
-
this.
|
|
1595
|
-
if (this.
|
|
1596
|
-
this.
|
|
1597
|
-
this.
|
|
1598
|
-
if (this.
|
|
1599
|
-
this.
|
|
1600
|
-
ceInstance.validate(this.
|
|
1601
|
-
//ceInstance.updateCount(this.
|
|
1594
|
+
this.KOzR = true;
|
|
1595
|
+
if (this.KOzR) {
|
|
1596
|
+
this.RexI += 1;
|
|
1597
|
+
this.KOzR = this.JMfV(this.RexI, this.vzQc.Psxj, this.vzQc.djdu);
|
|
1598
|
+
if (this.KOzR) {
|
|
1599
|
+
this.vzQc.oGib = time;
|
|
1600
|
+
ceInstance.validate(this.HZiO, this.EXJl);
|
|
1601
|
+
//ceInstance.updateCount(this.HZiO);
|
|
1602
1602
|
}
|
|
1603
1603
|
}
|
|
1604
1604
|
}
|
|
@@ -1610,38 +1610,38 @@
|
|
|
1610
1610
|
var Frequency = /*#__PURE__*/_createClass(function Frequency() {
|
|
1611
1611
|
var _this = this;
|
|
1612
1612
|
_classCallCheck(this, Frequency);
|
|
1613
|
-
_defineProperty(this, "
|
|
1614
|
-
_defineProperty(this, "
|
|
1615
|
-
_defineProperty(this, "
|
|
1616
|
-
_defineProperty(this, "
|
|
1617
|
-
_defineProperty(this, "
|
|
1618
|
-
_defineProperty(this, "
|
|
1613
|
+
_defineProperty(this, "Psxj", 0);
|
|
1614
|
+
_defineProperty(this, "GMOy", 0);
|
|
1615
|
+
_defineProperty(this, "RydK", "SESSION");
|
|
1616
|
+
_defineProperty(this, "LyNa", 0);
|
|
1617
|
+
_defineProperty(this, "HWOF", 0);
|
|
1618
|
+
_defineProperty(this, "dnrC", 0);
|
|
1619
1619
|
_defineProperty(this, "_enable_repetition_gap", void 0);
|
|
1620
1620
|
_defineProperty(this, "_enable_days_limit", void 0);
|
|
1621
1621
|
_defineProperty(this, "_enable_session_limit", void 0);
|
|
1622
|
-
_defineProperty(this, "
|
|
1623
|
-
_defineProperty(this, "
|
|
1624
|
-
_defineProperty(this, "
|
|
1622
|
+
_defineProperty(this, "WJmN", void 0);
|
|
1623
|
+
_defineProperty(this, "kWUo", void 0);
|
|
1624
|
+
_defineProperty(this, "bJSv", void 0);
|
|
1625
1625
|
_defineProperty(this, "DSLimits", void 0);
|
|
1626
1626
|
_defineProperty(this, "parse", function () {
|
|
1627
1627
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1628
1628
|
try {
|
|
1629
1629
|
var _config$frequency, _config$frequency3, _config$frequency4, _config$frequency7, _config$frequency8;
|
|
1630
|
-
_this.
|
|
1631
|
-
_this.
|
|
1632
|
-
_this.
|
|
1633
|
-
if (_this.
|
|
1634
|
-
_this.
|
|
1635
|
-
}
|
|
1636
|
-
_this.
|
|
1637
|
-
_this.
|
|
1638
|
-
_this.
|
|
1630
|
+
_this.HZiO = config._id;
|
|
1631
|
+
_this.Cwrc = config.meta;
|
|
1632
|
+
_this.Psxj = config.frequency.count;
|
|
1633
|
+
if (_this.Psxj === -1) {
|
|
1634
|
+
_this.Psxj = 9999999;
|
|
1635
|
+
}
|
|
1636
|
+
_this.dnrC = _this.Psxj;
|
|
1637
|
+
_this.GMOy = config.frequency.time_interval;
|
|
1638
|
+
_this.RydK = config.frequency.validity;
|
|
1639
1639
|
_this.DSLimits = config.frequency.DSLimits;
|
|
1640
|
-
_this.
|
|
1640
|
+
_this.HWOF = config.frequency.ses_lmt;
|
|
1641
1641
|
_this._enable_session_limit = (_config$frequency = config.frequency) === null || _config$frequency === void 0 ? void 0 : _config$frequency.enable_session_limit;
|
|
1642
1642
|
if (_this._enable_session_limit) {
|
|
1643
1643
|
var _config$frequency2;
|
|
1644
|
-
_this.
|
|
1644
|
+
_this.WJmN = (_config$frequency2 = config.frequency) === null || _config$frequency2 === void 0 ? void 0 : _config$frequency2.session_count;
|
|
1645
1645
|
}
|
|
1646
1646
|
_this._dayCount = (_config$frequency3 = config.frequency) !== null && _config$frequency3 !== void 0 && _config$frequency3.day_lmt ? (_config$frequency4 = config.frequency) === null || _config$frequency4 === void 0 ? void 0 : _config$frequency4.day_lmt : 0;
|
|
1647
1647
|
_this._enable_repetition_gap = config.frequency.enable_repetition_gap ? config.frequency.enable_repetition_gap : false;
|
|
@@ -1652,31 +1652,31 @@
|
|
|
1652
1652
|
}
|
|
1653
1653
|
_this._enable_days_limit = (_config$frequency7 = config.frequency) !== null && _config$frequency7 !== void 0 && _config$frequency7.enable_days_limit ? (_config$frequency8 = config.frequency) === null || _config$frequency8 === void 0 ? void 0 : _config$frequency8.enable_days_limit : false;
|
|
1654
1654
|
if (_this._enable_days_limit) {
|
|
1655
|
-
_this.
|
|
1656
|
-
_this.
|
|
1655
|
+
_this.bJSv = config.frequency.days_limit.days ? config.frequency.days_limit.days : 1;
|
|
1656
|
+
_this.kWUo = config.frequency.days_limit.limit;
|
|
1657
1657
|
}
|
|
1658
1658
|
|
|
1659
1659
|
// let data = Apxor.getController().getFromStorage(QE_STATE);
|
|
1660
1660
|
// let qe_state = JSON.parse(decode(Apxor.getSiteId(), data));
|
|
1661
1661
|
var qe_state = CE.getInstance().getQeState();
|
|
1662
1662
|
if (!isDefined(qe_state) || !isDefined(qe_state[config._id])) return true;
|
|
1663
|
-
if (_this.
|
|
1664
|
-
_this.
|
|
1665
|
-
if (_this.
|
|
1666
|
-
_this.
|
|
1663
|
+
if (_this.RydK === "SESSION") {
|
|
1664
|
+
_this.Psxj = parseInt(_this.Psxj) - parseInt(qe_state[config._id]["SESSION"]);
|
|
1665
|
+
if (_this.Psxj <= 0) {
|
|
1666
|
+
_this.UJHf("Session limit reached");
|
|
1667
1667
|
console.warn("Max count limit reached for session:" + config._id);
|
|
1668
1668
|
if (Apxor.getController().isTestDevice()) {
|
|
1669
|
-
validationToastDisplayandRemoval("Maximum overall limit reached for campaign name ".concat(_this.
|
|
1669
|
+
validationToastDisplayandRemoval("Maximum overall limit reached for campaign name ".concat(_this.Cwrc.name));
|
|
1670
1670
|
}
|
|
1671
1671
|
return false;
|
|
1672
1672
|
}
|
|
1673
|
-
} else if (_this.
|
|
1674
|
-
_this.
|
|
1675
|
-
if (_this.
|
|
1676
|
-
_this.
|
|
1673
|
+
} else if (_this.RydK === "OVERALL") {
|
|
1674
|
+
_this.Psxj = parseInt(_this.Psxj) - parseInt(qe_state[config._id]["OVERALL"]);
|
|
1675
|
+
if (_this.Psxj <= 0) {
|
|
1676
|
+
_this.UJHf("Overall limit reached");
|
|
1677
1677
|
console.warn("Max count limit reached for overall:" + config._id);
|
|
1678
1678
|
if (Apxor.getController().isTestDevice()) {
|
|
1679
|
-
validationToastDisplayandRemoval("Maximum overall limit reached for campaign name ".concat(_this.
|
|
1679
|
+
validationToastDisplayandRemoval("Maximum overall limit reached for campaign name ".concat(_this.Cwrc.name));
|
|
1680
1680
|
}
|
|
1681
1681
|
return false;
|
|
1682
1682
|
}
|
|
@@ -1690,38 +1690,38 @@
|
|
|
1690
1690
|
}
|
|
1691
1691
|
return true;
|
|
1692
1692
|
});
|
|
1693
|
-
_defineProperty(this, "
|
|
1694
|
-
_this.
|
|
1693
|
+
_defineProperty(this, "JTks", function () {
|
|
1694
|
+
_this.Psxj = _this.Psxj - 1;
|
|
1695
1695
|
});
|
|
1696
1696
|
_defineProperty(this, "getFrequencyCount", function () {
|
|
1697
|
-
return _this.
|
|
1697
|
+
return _this.Psxj;
|
|
1698
1698
|
});
|
|
1699
|
-
_defineProperty(this, "
|
|
1700
|
-
if (_this.
|
|
1701
|
-
_this.
|
|
1699
|
+
_defineProperty(this, "ovoh", function () {
|
|
1700
|
+
if (_this.RydK === "SESSION") {
|
|
1701
|
+
_this.Psxj = _this.dnrC;
|
|
1702
1702
|
Logger$5.info("Campaign Limit reset");
|
|
1703
1703
|
}
|
|
1704
1704
|
});
|
|
1705
1705
|
/**
|
|
1706
|
-
* @function
|
|
1706
|
+
* @function DJrV
|
|
1707
1707
|
* @description Validates if the campaign count is with in the limits set in the config.
|
|
1708
1708
|
* @param {string} Config id
|
|
1709
1709
|
* @returns {boolean} true - If the Campaign limits are not reached
|
|
1710
1710
|
* false - Otherwise
|
|
1711
1711
|
*/
|
|
1712
|
-
_defineProperty(this, "
|
|
1712
|
+
_defineProperty(this, "DJrV", function (id) {
|
|
1713
1713
|
try {
|
|
1714
|
-
if (_this.
|
|
1715
|
-
if (_this.
|
|
1716
|
-
_this.
|
|
1714
|
+
if (_this.Psxj <= 0) {
|
|
1715
|
+
if (_this.RydK === "OVERALL") {
|
|
1716
|
+
_this.UJHf("Overall limit reached");
|
|
1717
1717
|
if (Apxor.getController().isTestDevice()) {
|
|
1718
|
-
validationToastDisplayandRemoval("Maximum overall limit reached for campaign name ".concat(_this.
|
|
1718
|
+
validationToastDisplayandRemoval("Maximum overall limit reached for campaign name ".concat(_this.Cwrc.name));
|
|
1719
1719
|
}
|
|
1720
|
-
} else if (_this.
|
|
1720
|
+
} else if (_this.RydK === "SESSION") {
|
|
1721
1721
|
if (Apxor.getController().isTestDevice()) {
|
|
1722
|
-
validationToastDisplayandRemoval("Maximum session limit reached for campaign name ".concat(_this.
|
|
1722
|
+
validationToastDisplayandRemoval("Maximum session limit reached for campaign name ".concat(_this.Cwrc.name));
|
|
1723
1723
|
}
|
|
1724
|
-
_this.
|
|
1724
|
+
_this.UJHf("Session limit reached");
|
|
1725
1725
|
}
|
|
1726
1726
|
return false;
|
|
1727
1727
|
}
|
|
@@ -1732,12 +1732,12 @@
|
|
|
1732
1732
|
//If the frequency counts are not stored no validity checks are needed.
|
|
1733
1733
|
if (!isDefined(qe_state) || !isDefined(qe_state[id])) return true;
|
|
1734
1734
|
if (_this._enable_session_limit) {
|
|
1735
|
-
var sessionCountFromConfig = parseInt(_this.
|
|
1735
|
+
var sessionCountFromConfig = parseInt(_this.WJmN);
|
|
1736
1736
|
var thisSessionCount = parseInt(qe_state[id]["SESSION"]);
|
|
1737
1737
|
if (sessionCountFromConfig - thisSessionCount <= 0) {
|
|
1738
|
-
_this.
|
|
1738
|
+
_this.UJHf("Session limit reached");
|
|
1739
1739
|
if (Apxor.getController().isTestDevice()) {
|
|
1740
|
-
validationToastDisplayandRemoval("Maximum session limit reached for campaign name ".concat(_this.
|
|
1740
|
+
validationToastDisplayandRemoval("Maximum session limit reached for campaign name ".concat(_this.Cwrc.name));
|
|
1741
1741
|
}
|
|
1742
1742
|
return false;
|
|
1743
1743
|
}
|
|
@@ -1746,16 +1746,16 @@
|
|
|
1746
1746
|
if (_this._repetitionUnit != "session") {
|
|
1747
1747
|
var repetition_times = Apxor.getController().getFromStorage("apx-last-shown-times");
|
|
1748
1748
|
repetition_times = JSON.parse(repetition_times);
|
|
1749
|
-
if (!isNull(isObjectWithGivenKeyPresent(repetition_times, _this.
|
|
1750
|
-
var currentObj = isObjectWithGivenKeyPresent(repetition_times, _this.
|
|
1751
|
-
var current_repetition_time = currentObj[_this.
|
|
1749
|
+
if (!isNull(isObjectWithGivenKeyPresent(repetition_times, _this.HZiO))) {
|
|
1750
|
+
var currentObj = isObjectWithGivenKeyPresent(repetition_times, _this.HZiO);
|
|
1751
|
+
var current_repetition_time = currentObj[_this.HZiO];
|
|
1752
1752
|
var current_time = Date.now();
|
|
1753
1753
|
var timeInSecFromConfig;
|
|
1754
1754
|
timeInSecFromConfig = calculateTime(_this._repetitionUnit, _this._repetitionValue);
|
|
1755
1755
|
if (current_time - current_repetition_time < timeInSecFromConfig) {
|
|
1756
|
-
_this.
|
|
1756
|
+
_this.UJHf("Config does not satisfy time difference ");
|
|
1757
1757
|
if (Apxor.getController().isTestDevice()) {
|
|
1758
|
-
validationToastDisplayandRemoval("Config does not satisfy time difference for campaign name ".concat(_this.
|
|
1758
|
+
validationToastDisplayandRemoval("Config does not satisfy time difference for campaign name ".concat(_this.Cwrc.name));
|
|
1759
1759
|
}
|
|
1760
1760
|
return false;
|
|
1761
1761
|
}
|
|
@@ -1763,14 +1763,14 @@
|
|
|
1763
1763
|
} else {
|
|
1764
1764
|
var sessionsTowait = Apxor.getController().getFromStorage("apx-last-shown-session");
|
|
1765
1765
|
sessionsTowait = JSON.parse(sessionsTowait);
|
|
1766
|
-
if (!isNull(isObjectWithGivenKeyPresent(sessionsTowait, _this.
|
|
1767
|
-
var _currentObj = isObjectWithGivenKeyPresent(sessionsTowait, _this.
|
|
1768
|
-
var current_repetition_session = _currentObj[_this.
|
|
1766
|
+
if (!isNull(isObjectWithGivenKeyPresent(sessionsTowait, _this.HZiO))) {
|
|
1767
|
+
var _currentObj = isObjectWithGivenKeyPresent(sessionsTowait, _this.HZiO);
|
|
1768
|
+
var current_repetition_session = _currentObj[_this.HZiO];
|
|
1769
1769
|
var current_session = Apxor.getController().getFromStorage("apx_retained_session");
|
|
1770
1770
|
if (current_session - current_repetition_session < parseInt(_this._repetitionValue)) {
|
|
1771
|
-
_this.
|
|
1771
|
+
_this.UJHf("Config does not satisfy session difference ");
|
|
1772
1772
|
if (Apxor.getController().isTestDevice()) {
|
|
1773
|
-
validationToastDisplayandRemoval("Config does not satisfy session difference for campaign name ".concat(_this.
|
|
1773
|
+
validationToastDisplayandRemoval("Config does not satisfy session difference for campaign name ".concat(_this.Cwrc.name));
|
|
1774
1774
|
}
|
|
1775
1775
|
return false;
|
|
1776
1776
|
}
|
|
@@ -1779,13 +1779,13 @@
|
|
|
1779
1779
|
}
|
|
1780
1780
|
|
|
1781
1781
|
//If the config has a session count limit set
|
|
1782
|
-
if (_this.
|
|
1783
|
-
var sessionCountInConfig = parseInt(_this.
|
|
1782
|
+
if (_this.HWOF !== 0 && _this.DSLimits) {
|
|
1783
|
+
var sessionCountInConfig = parseInt(_this.HWOF);
|
|
1784
1784
|
var _thisSessionCount = parseInt(qe_state[id]["SESSION"]);
|
|
1785
1785
|
if (sessionCountInConfig - _thisSessionCount <= 0) {
|
|
1786
|
-
_this.
|
|
1786
|
+
_this.UJHf("Session limit reached");
|
|
1787
1787
|
if (Apxor.getController().isTestDevice()) {
|
|
1788
|
-
validationToastDisplayandRemoval("Session limit reached for campaign name ".concat(_this.
|
|
1788
|
+
validationToastDisplayandRemoval("Session limit reached for campaign name ".concat(_this.Cwrc.name));
|
|
1789
1789
|
}
|
|
1790
1790
|
return false;
|
|
1791
1791
|
}
|
|
@@ -1798,42 +1798,42 @@
|
|
|
1798
1798
|
var dayCountInConfig = parseInt(_this._dayCount);
|
|
1799
1799
|
var thisDayCount = parseInt(((_qe_state$id = qe_state[id]) === null || _qe_state$id === void 0 ? void 0 : _qe_state$id.DATES[date]) || 0);
|
|
1800
1800
|
if (dayCountInConfig - thisDayCount <= 0) {
|
|
1801
|
-
_this.
|
|
1801
|
+
_this.UJHf("Day limit reached");
|
|
1802
1802
|
if (Apxor.getController().isTestDevice()) {
|
|
1803
|
-
validationToastDisplayandRemoval("Day limit reached for campaign name ".concat(_this.
|
|
1803
|
+
validationToastDisplayandRemoval("Day limit reached for campaign name ".concat(_this.Cwrc.name));
|
|
1804
1804
|
}
|
|
1805
1805
|
return false;
|
|
1806
1806
|
}
|
|
1807
1807
|
}
|
|
1808
|
-
if (_this.
|
|
1809
|
-
var daysCount = _this.
|
|
1808
|
+
if (_this.bJSv > 0 && _this._enable_days_limit) {
|
|
1809
|
+
var daysCount = _this.bJSv;
|
|
1810
1810
|
var shownLimit = 0;
|
|
1811
1811
|
var daysListInDDMMYYYY = getPastDates(daysCount);
|
|
1812
1812
|
daysListInDDMMYYYY.forEach(function (fetchedDate) {
|
|
1813
1813
|
var _qe_state$id2;
|
|
1814
1814
|
shownLimit = shownLimit + parseInt(((_qe_state$id2 = qe_state[id]) === null || _qe_state$id2 === void 0 ? void 0 : _qe_state$id2.DATES[fetchedDate]) || 0);
|
|
1815
1815
|
});
|
|
1816
|
-
if (shownLimit > _this.
|
|
1816
|
+
if (shownLimit > _this.kWUo) {
|
|
1817
1817
|
Logger$5.info("Shown Limit Crossed");
|
|
1818
1818
|
if (Apxor.getController().isTestDevice()) {
|
|
1819
|
-
validationToastDisplayandRemoval("Days limit reached for campaign name ".concat(_this.
|
|
1819
|
+
validationToastDisplayandRemoval("Days limit reached for campaign name ".concat(_this.Cwrc.name));
|
|
1820
1820
|
}
|
|
1821
1821
|
return false;
|
|
1822
1822
|
}
|
|
1823
1823
|
}
|
|
1824
1824
|
} catch (e) {
|
|
1825
|
-
_this.
|
|
1825
|
+
_this.UJHf("Error validating the frequency: ".concat(e));
|
|
1826
1826
|
Logger$5.error("Error validating the frequency:" + e);
|
|
1827
1827
|
}
|
|
1828
1828
|
return true;
|
|
1829
1829
|
});
|
|
1830
|
-
_defineProperty(this, "
|
|
1831
|
-
var _this$
|
|
1830
|
+
_defineProperty(this, "UJHf", function (reason) {
|
|
1831
|
+
var _this$Cwrc$attr;
|
|
1832
1832
|
Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_non_eligible_user", {
|
|
1833
|
-
apx_nudge_type: _this.
|
|
1834
|
-
apx_nudge_id: _this.
|
|
1835
|
-
apx_nudge_name: _this.
|
|
1836
|
-
apx_variant_code: _this.
|
|
1833
|
+
apx_nudge_type: _this.Cwrc.type === "SURVEY" ? "survey" : "campaign",
|
|
1834
|
+
apx_nudge_id: _this.HZiO,
|
|
1835
|
+
apx_nudge_name: _this.Cwrc.name,
|
|
1836
|
+
apx_variant_code: _this.Cwrc.isExperiment || _this.Cwrc.only_context ? (_this$Cwrc$attr = _this.Cwrc.attr) === null || _this$Cwrc$attr === void 0 ? void 0 : _this$Cwrc$attr[APX_VARIANT_CODE] : "TG",
|
|
1837
1837
|
apx_failure_type: "warn",
|
|
1838
1838
|
apx_reason: reason
|
|
1839
1839
|
});
|
|
@@ -1846,10 +1846,10 @@
|
|
|
1846
1846
|
var GroupConditionValidator = /*#__PURE__*/_createClass(function GroupConditionValidator() {
|
|
1847
1847
|
var _this = this;
|
|
1848
1848
|
_classCallCheck(this, GroupConditionValidator);
|
|
1849
|
-
_defineProperty(this, "
|
|
1850
|
-
_defineProperty(this, "
|
|
1851
|
-
_defineProperty(this, "
|
|
1852
|
-
_defineProperty(this, "
|
|
1849
|
+
_defineProperty(this, "XFsF", []);
|
|
1850
|
+
_defineProperty(this, "dFuJ", 0);
|
|
1851
|
+
_defineProperty(this, "afSl", false);
|
|
1852
|
+
_defineProperty(this, "zDYy", void 0);
|
|
1853
1853
|
_defineProperty(this, "initialize", function () {
|
|
1854
1854
|
var conditions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1855
1855
|
var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -1858,51 +1858,51 @@
|
|
|
1858
1858
|
var noKpiArray = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
|
1859
1859
|
var parentRespectSequence = arguments.length > 5 ? arguments[5] : undefined;
|
|
1860
1860
|
var across_sessions = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
1861
|
-
_this.
|
|
1862
|
-
_this.
|
|
1863
|
-
_this.
|
|
1864
|
-
_this.
|
|
1861
|
+
_this.HZiO = id;
|
|
1862
|
+
_this.EXJl = index;
|
|
1863
|
+
_this.jzOu = noKpiArray;
|
|
1864
|
+
_this.VIsH = respectSequence;
|
|
1865
1865
|
_this.across_sessions = across_sessions;
|
|
1866
1866
|
var childConditions = [];
|
|
1867
|
-
_this.
|
|
1867
|
+
_this.dFuJ = conditions.length;
|
|
1868
1868
|
try {
|
|
1869
1869
|
if (childConditions != null) {
|
|
1870
1870
|
respectSequence = conditions === null || conditions === void 0 ? void 0 : conditions.sequence_type;
|
|
1871
|
-
childConditions = _this.
|
|
1872
|
-
if (parentRespectSequence === "unordered" || _this.
|
|
1873
|
-
_this.
|
|
1871
|
+
childConditions = _this.Gmtw(conditions, _this.dFuJ);
|
|
1872
|
+
if (parentRespectSequence === "unordered" || _this.EXJl === 0) {
|
|
1873
|
+
_this.GrDR();
|
|
1874
1874
|
}
|
|
1875
|
-
return _this.
|
|
1875
|
+
return _this.XFsF;
|
|
1876
1876
|
}
|
|
1877
1877
|
} catch (error) {
|
|
1878
1878
|
Logger$6.error(error);
|
|
1879
1879
|
return false;
|
|
1880
1880
|
}
|
|
1881
1881
|
});
|
|
1882
|
-
_defineProperty(this, "
|
|
1882
|
+
_defineProperty(this, "Gmtw", function (conditions, conditionsLength) {
|
|
1883
1883
|
for (var index = 0; index < conditionsLength; index++) {
|
|
1884
|
-
_this.
|
|
1884
|
+
_this.zDYy = new ConditionValidator();
|
|
1885
1885
|
try {
|
|
1886
|
-
if (_this.
|
|
1887
|
-
_this.
|
|
1888
|
-
_this.
|
|
1886
|
+
if (_this.zDYy.initialize(conditions[index], _this.HZiO, _this.EXJl, _this.VIsH, _this.pCID, _this.across_sessions, "", -1, false)) {
|
|
1887
|
+
_this.XFsF.push(_this.zDYy);
|
|
1888
|
+
_this.XFsF.sequence_type = _this.VIsH;
|
|
1889
1889
|
}
|
|
1890
1890
|
} catch (error) {
|
|
1891
1891
|
Logger$6.error(error);
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
1894
|
-
return _this.
|
|
1894
|
+
return _this.XFsF;
|
|
1895
1895
|
});
|
|
1896
|
-
_defineProperty(this, "
|
|
1897
|
-
if (_this.
|
|
1898
|
-
_this.
|
|
1896
|
+
_defineProperty(this, "GrDR", function () {
|
|
1897
|
+
if (_this.VIsH === "ordered" || _this.VIsH === "strictly_ordered") {
|
|
1898
|
+
_this.XFsF[0].GrDR(0);
|
|
1899
1899
|
} else {
|
|
1900
|
-
var _iterator = _createForOfIteratorHelper(_this.
|
|
1900
|
+
var _iterator = _createForOfIteratorHelper(_this.XFsF),
|
|
1901
1901
|
_step;
|
|
1902
1902
|
try {
|
|
1903
1903
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
1904
1904
|
var validator = _step.value;
|
|
1905
|
-
validator.
|
|
1905
|
+
validator.GrDR();
|
|
1906
1906
|
}
|
|
1907
1907
|
} catch (err) {
|
|
1908
1908
|
_iterator.e(err);
|
|
@@ -1911,22 +1911,22 @@
|
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
1913
1913
|
});
|
|
1914
|
-
_defineProperty(this, "
|
|
1915
|
-
_this.
|
|
1914
|
+
_defineProperty(this, "IgHd", function (validators) {
|
|
1915
|
+
_this.zDYy.IgHd(validators);
|
|
1916
1916
|
});
|
|
1917
1917
|
});
|
|
1918
1918
|
|
|
1919
1919
|
var Meta = /*#__PURE__*/_createClass(function Meta() {
|
|
1920
1920
|
var _this = this;
|
|
1921
1921
|
_classCallCheck(this, Meta);
|
|
1922
|
-
_defineProperty(this, "
|
|
1923
|
-
_defineProperty(this, "
|
|
1922
|
+
_defineProperty(this, "KezF", "");
|
|
1923
|
+
_defineProperty(this, "YnyK", "");
|
|
1924
1924
|
_defineProperty(this, "parse", function () {
|
|
1925
1925
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1926
1926
|
try {
|
|
1927
1927
|
var _config$meta, _config$meta2;
|
|
1928
|
-
_this.
|
|
1929
|
-
_this.
|
|
1928
|
+
_this.KezF = config.meta.name;
|
|
1929
|
+
_this.YnyK = config.meta.type;
|
|
1930
1930
|
_this._only_context = config.meta.only_context;
|
|
1931
1931
|
_this._attr = ((_config$meta = config.meta) === null || _config$meta === void 0 ? void 0 : _config$meta.attr) || {};
|
|
1932
1932
|
_this._isExperiment = (_config$meta2 = config.meta) === null || _config$meta2 === void 0 ? void 0 : _config$meta2.isExperiment;
|
|
@@ -1942,11 +1942,11 @@
|
|
|
1942
1942
|
var OverallConfig = /*#__PURE__*/_createClass(function OverallConfig() {
|
|
1943
1943
|
var _this = this;
|
|
1944
1944
|
_classCallCheck(this, OverallConfig);
|
|
1945
|
-
_defineProperty(this, "
|
|
1945
|
+
_defineProperty(this, "eVuR", []);
|
|
1946
1946
|
_defineProperty(this, "_ret_day", {});
|
|
1947
|
-
_defineProperty(this, "
|
|
1948
|
-
_defineProperty(this, "
|
|
1949
|
-
_defineProperty(this, "
|
|
1947
|
+
_defineProperty(this, "Nsaw", {});
|
|
1948
|
+
_defineProperty(this, "lpRT", false);
|
|
1949
|
+
_defineProperty(this, "iTrW", false);
|
|
1950
1950
|
_defineProperty(this, "retainedDaysValidated", true);
|
|
1951
1951
|
_defineProperty(this, "retainedSessionValidated", true);
|
|
1952
1952
|
_defineProperty(this, "eventDoneInLT", false);
|
|
@@ -1954,11 +1954,11 @@
|
|
|
1954
1954
|
_defineProperty(this, "parse", function () {
|
|
1955
1955
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1956
1956
|
try {
|
|
1957
|
-
_this.
|
|
1957
|
+
_this.eVuR = config.overall_cfg.events;
|
|
1958
1958
|
_this._ret_day = config.overall_cfg.ret_day;
|
|
1959
|
-
_this.
|
|
1960
|
-
_this.
|
|
1961
|
-
_this.
|
|
1959
|
+
_this.Nsaw = config.overall_cfg.session;
|
|
1960
|
+
_this.lpRT = config.overall_cfg.toggleRetDay;
|
|
1961
|
+
_this.iTrW = config.overall_cfg.toggleSession;
|
|
1962
1962
|
} catch (error) {
|
|
1963
1963
|
Logger$7.error(error);
|
|
1964
1964
|
return false;
|
|
@@ -1968,11 +1968,11 @@
|
|
|
1968
1968
|
_defineProperty(this, "validate", function () {
|
|
1969
1969
|
var retainedDays = parseInt(Apxor.getController().getFromStorage(APX_RETAINED_DAYS));
|
|
1970
1970
|
var retainedSession = parseInt(Apxor.getController().getFromStorage(APX_RETAINED_SESSIONS));
|
|
1971
|
-
if (_this.
|
|
1971
|
+
if (_this.lpRT && !isNaN(retainedDays) && !(retainedDays >= _this._ret_day.from && retainedDays <= _this._ret_day.to)) {
|
|
1972
1972
|
_this.retainedDaysValidated = false;
|
|
1973
1973
|
return false;
|
|
1974
1974
|
}
|
|
1975
|
-
if (_this.
|
|
1975
|
+
if (_this.iTrW && !isNaN(retainedSession) && !(retainedSession >= _this.Nsaw.from && retainedSession <= _this.Nsaw.to)) {
|
|
1976
1976
|
_this.retainedSessionValidated = false;
|
|
1977
1977
|
return false;
|
|
1978
1978
|
}
|
|
@@ -1981,8 +1981,8 @@
|
|
|
1981
1981
|
var data = Apxor.getController().getFromStorage("_apx_lt_count");
|
|
1982
1982
|
var siteid = Apxor.getSiteId();
|
|
1983
1983
|
var LtCountObjDecoded = JSON.parse(new TextDecoder().decode(stringToArrayBuffer(decode(siteid, data))));
|
|
1984
|
-
for (var i = 0; i < _this.
|
|
1985
|
-
var evName = _this.
|
|
1984
|
+
for (var i = 0; i < _this.eVuR.length; i++) {
|
|
1985
|
+
var evName = _this.eVuR[i].name.replace("'", "").replace("’", "");
|
|
1986
1986
|
if (LtCountObjDecoded[evName]) {
|
|
1987
1987
|
_this.eventDoneInLT = true;
|
|
1988
1988
|
return false;
|
|
@@ -1999,14 +1999,14 @@
|
|
|
1999
1999
|
var Attributes = /*#__PURE__*/_createClass(function Attributes() {
|
|
2000
2000
|
var _this = this;
|
|
2001
2001
|
_classCallCheck(this, Attributes);
|
|
2002
|
-
_defineProperty(this, "
|
|
2003
|
-
_defineProperty(this, "
|
|
2002
|
+
_defineProperty(this, "OtlV", []);
|
|
2003
|
+
_defineProperty(this, "ixdq", []);
|
|
2004
2004
|
_defineProperty(this, "parse", function () {
|
|
2005
2005
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2006
2006
|
try {
|
|
2007
|
-
_this.
|
|
2008
|
-
_this.
|
|
2009
|
-
if (!Array.isArray(_this.
|
|
2007
|
+
_this.OtlV = config.attributes.user;
|
|
2008
|
+
_this.ixdq = config.attributes.session;
|
|
2009
|
+
if (!Array.isArray(_this.OtlV) || !Array.isArray(_this.ixdq)) {
|
|
2010
2010
|
Logger$8.error("No attributes");
|
|
2011
2011
|
return false;
|
|
2012
2012
|
}
|
|
@@ -2017,9 +2017,9 @@
|
|
|
2017
2017
|
return true;
|
|
2018
2018
|
});
|
|
2019
2019
|
_defineProperty(this, "validate", function (user, session) {
|
|
2020
|
-
return _this.
|
|
2020
|
+
return _this.LEzd(user, _this.OtlV) && _this.LEzd(session, _this.ixdq);
|
|
2021
2021
|
});
|
|
2022
|
-
_defineProperty(this, "
|
|
2022
|
+
_defineProperty(this, "LEzd", function (attributes, expected) {
|
|
2023
2023
|
var length = expected.length;
|
|
2024
2024
|
var status = true;
|
|
2025
2025
|
try {
|
|
@@ -2049,7 +2049,7 @@
|
|
|
2049
2049
|
}
|
|
2050
2050
|
var match = loggedValues.some(function (loggedValue) {
|
|
2051
2051
|
return values.some(function (configValue) {
|
|
2052
|
-
return
|
|
2052
|
+
return jmAk(loggedValue, configValue, operator);
|
|
2053
2053
|
});
|
|
2054
2054
|
});
|
|
2055
2055
|
status = status && match;
|
|
@@ -2073,18 +2073,18 @@
|
|
|
2073
2073
|
var TimeBasedTermination = /*#__PURE__*/_createClass(function TimeBasedTermination() {
|
|
2074
2074
|
var _this = this;
|
|
2075
2075
|
_classCallCheck(this, TimeBasedTermination);
|
|
2076
|
-
_defineProperty(this, "
|
|
2076
|
+
_defineProperty(this, "VFVG", Apxor.getController());
|
|
2077
2077
|
_defineProperty(this, "type", "");
|
|
2078
2078
|
_defineProperty(this, "_duration_seconds", 0);
|
|
2079
|
-
_defineProperty(this, "
|
|
2079
|
+
_defineProperty(this, "eLrt", 1);
|
|
2080
2080
|
_defineProperty(this, "parse", function (config) {
|
|
2081
2081
|
try {
|
|
2082
2082
|
var _config$terminate_inf, _config$terminate_inf2, _config$terminate_inf3;
|
|
2083
|
-
_this.
|
|
2083
|
+
_this.YnyK = (_config$terminate_inf = config.terminate_info.time_based) === null || _config$terminate_inf === void 0 ? void 0 : _config$terminate_inf.type;
|
|
2084
2084
|
_this._duration_seconds = (_config$terminate_inf2 = config.terminate_info) === null || _config$terminate_inf2 === void 0 ? void 0 : _config$terminate_inf2.time_based.duration_seconds;
|
|
2085
|
-
_this.
|
|
2086
|
-
if (_this.
|
|
2087
|
-
_this.
|
|
2085
|
+
_this.eLrt = (_config$terminate_inf3 = config.terminate_info.time_based) === null || _config$terminate_inf3 === void 0 ? void 0 : _config$terminate_inf3.days;
|
|
2086
|
+
if (_this.jmAk(config._id)) {
|
|
2087
|
+
_this.VFVG.persistTerminationInfoLocally(config._id);
|
|
2088
2088
|
return false;
|
|
2089
2089
|
}
|
|
2090
2090
|
} catch (_unused) {
|
|
@@ -2092,16 +2092,16 @@
|
|
|
2092
2092
|
}
|
|
2093
2093
|
return true;
|
|
2094
2094
|
});
|
|
2095
|
-
_defineProperty(this, "
|
|
2095
|
+
_defineProperty(this, "jmAk", function (id) {
|
|
2096
2096
|
var _Data$id;
|
|
2097
|
-
var Data = JSON.parse(_this.
|
|
2097
|
+
var Data = JSON.parse(_this.VFVG.getFromStorage(APX_TERMINATION_ID));
|
|
2098
2098
|
if (!Data[id] || !((_Data$id = Data[id]) !== null && _Data$id !== void 0 && _Data$id.startDate)) return false;
|
|
2099
2099
|
var startDate = new Date(Data[id].startDate);
|
|
2100
2100
|
var presentDate = new Date(getDateInMMDDYYYY());
|
|
2101
2101
|
var diff = parseInt((presentDate - startDate) / (1000 * 60 * 60 * 24), 10);
|
|
2102
2102
|
var currentTime = _getTime();
|
|
2103
|
-
var
|
|
2104
|
-
return diff === _this.
|
|
2103
|
+
var aPGV = Data[id].aPGV;
|
|
2104
|
+
return diff === _this.eLrt && currentTime.hours >= aPGV.hours || diff > _this.eLrt || Data[id].goalAcheived;
|
|
2105
2105
|
});
|
|
2106
2106
|
});
|
|
2107
2107
|
|
|
@@ -2110,19 +2110,19 @@
|
|
|
2110
2110
|
_classCallCheck(this, TerminationInfo);
|
|
2111
2111
|
_defineProperty(this, "enable_goal_events", false);
|
|
2112
2112
|
_defineProperty(this, "attributes", {});
|
|
2113
|
-
_defineProperty(this, "
|
|
2114
|
-
_defineProperty(this, "
|
|
2113
|
+
_defineProperty(this, "kfIW", new Attributes());
|
|
2114
|
+
_defineProperty(this, "uDLj", new TimeBasedTermination());
|
|
2115
2115
|
_defineProperty(this, "parse", function () {
|
|
2116
2116
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2117
2117
|
try {
|
|
2118
2118
|
var _config$terminate_inf, _config$terminate_inf2, _config$terminate_inf3;
|
|
2119
2119
|
_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;
|
|
2120
|
-
if (_this.enable_time_based && !_this.
|
|
2120
|
+
if (_this.enable_time_based && !_this.uDLj.parse(config)) {
|
|
2121
2121
|
return false;
|
|
2122
2122
|
}
|
|
2123
2123
|
_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;
|
|
2124
2124
|
_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;
|
|
2125
|
-
if (_this.enable_attributes && !_this.
|
|
2125
|
+
if (_this.enable_attributes && !_this.kfIW.parse(config.terminate_info)) {
|
|
2126
2126
|
return false;
|
|
2127
2127
|
}
|
|
2128
2128
|
} catch (error) {
|
|
@@ -2132,7 +2132,7 @@
|
|
|
2132
2132
|
return true;
|
|
2133
2133
|
});
|
|
2134
2134
|
_defineProperty(this, "validate", function (user, session) {
|
|
2135
|
-
return _this.
|
|
2135
|
+
return _this.kfIW.validate(user, session);
|
|
2136
2136
|
});
|
|
2137
2137
|
});
|
|
2138
2138
|
|
|
@@ -2140,15 +2140,15 @@
|
|
|
2140
2140
|
var Validity = /*#__PURE__*/_createClass(function Validity() {
|
|
2141
2141
|
var _this = this;
|
|
2142
2142
|
_classCallCheck(this, Validity);
|
|
2143
|
-
_defineProperty(this, "
|
|
2144
|
-
_defineProperty(this, "
|
|
2145
|
-
_defineProperty(this, "
|
|
2146
|
-
_defineProperty(this, "
|
|
2147
|
-
_defineProperty(this, "
|
|
2148
|
-
_defineProperty(this, "
|
|
2143
|
+
_defineProperty(this, "EdtB", -1);
|
|
2144
|
+
_defineProperty(this, "QnYB", -1);
|
|
2145
|
+
_defineProperty(this, "aPGV", -1);
|
|
2146
|
+
_defineProperty(this, "mjEj", -1);
|
|
2147
|
+
_defineProperty(this, "gVCe", -1);
|
|
2148
|
+
_defineProperty(this, "jytr", -1);
|
|
2149
2149
|
_defineProperty(this, "_is_user_timezone", void 0);
|
|
2150
|
-
_defineProperty(this, "
|
|
2151
|
-
_defineProperty(this, "
|
|
2150
|
+
_defineProperty(this, "mjqT", false);
|
|
2151
|
+
_defineProperty(this, "GBVo", false);
|
|
2152
2152
|
_defineProperty(this, "_nudge_expired", false);
|
|
2153
2153
|
_defineProperty(this, "_not_yet_active", false);
|
|
2154
2154
|
_defineProperty(this, "_not_in_specified_time", false);
|
|
@@ -2157,36 +2157,36 @@
|
|
|
2157
2157
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2158
2158
|
try {
|
|
2159
2159
|
var _config$validity, _config$validity2;
|
|
2160
|
-
_this.
|
|
2161
|
-
_this.
|
|
2160
|
+
_this.HZiO = config._id;
|
|
2161
|
+
_this.Cwrc = config.meta;
|
|
2162
2162
|
if (isNaN(Date.parse(config.validity.start_date)) || isNaN(Date.parse(config.validity.end_date)) || !Array.isArray(config.validity.days_in_week)) {
|
|
2163
2163
|
Logger$9.error("Not valid dates");
|
|
2164
2164
|
return false;
|
|
2165
2165
|
}
|
|
2166
|
-
_this.
|
|
2167
|
-
_this.
|
|
2166
|
+
_this.EdtB = Date.parse(config.validity.start_date);
|
|
2167
|
+
_this.QnYB = Date.parse(config.validity.end_date);
|
|
2168
2168
|
_this._days_in_week = (_config$validity = config.validity) !== null && _config$validity !== void 0 && _config$validity.days_in_week ? (_config$validity2 = config.validity) === null || _config$validity2 === void 0 ? void 0 : _config$validity2.days_in_week : [1, 2, 3, 4, 5, 6, 7];
|
|
2169
2169
|
_this._is_user_timezone = config.is_user_timezone ? config.is_user_timezone : true;
|
|
2170
2170
|
if (isDefined(config.at_specific_time)) {
|
|
2171
|
-
_this.
|
|
2172
|
-
if (_this.
|
|
2173
|
-
_this.
|
|
2174
|
-
_this.
|
|
2171
|
+
_this.mjqT = config.at_specific_time;
|
|
2172
|
+
if (_this.mjqT && isDefined(config.time_limits)) {
|
|
2173
|
+
_this.aPGV = config.time_limits.start_time;
|
|
2174
|
+
_this.mjEj = config.time_limits.end_time;
|
|
2175
2175
|
|
|
2176
2176
|
// If invalid format is passed, return false
|
|
2177
|
-
if (isNumber(_this.
|
|
2177
|
+
if (isNumber(_this.aPGV) || isNumber(_this.mjEj)) {
|
|
2178
2178
|
Logger$9.error("Not valid times");
|
|
2179
2179
|
return false;
|
|
2180
2180
|
}
|
|
2181
2181
|
}
|
|
2182
2182
|
}
|
|
2183
2183
|
if (isDefined(config.time_excludes_in_day)) {
|
|
2184
|
-
_this.
|
|
2185
|
-
if (_this.
|
|
2186
|
-
_this.
|
|
2187
|
-
_this.
|
|
2184
|
+
_this.GBVo = config.time_excludes_in_day;
|
|
2185
|
+
if (_this.GBVo && isDefined(config.time_excludes)) {
|
|
2186
|
+
_this.gVCe = config.time_excludes.start_time;
|
|
2187
|
+
_this.jytr = config.time_excludes.end_time;
|
|
2188
2188
|
// If invalid format is passed, return false
|
|
2189
|
-
if (isNumber(_this.
|
|
2189
|
+
if (isNumber(_this.gVCe) || isNumber(_this.jytr)) {
|
|
2190
2190
|
Logger$9.error("Not valid exclude times");
|
|
2191
2191
|
return false;
|
|
2192
2192
|
}
|
|
@@ -2203,38 +2203,38 @@
|
|
|
2203
2203
|
var currentDate = new Date();
|
|
2204
2204
|
var currentDay = currentDate.getDay() + 1;
|
|
2205
2205
|
var currentTimeIn24hourFormat = _getCurrentTime(_this._is_user_timezone);
|
|
2206
|
-
if (currentTime > _this.
|
|
2207
|
-
if (_this.
|
|
2206
|
+
if (currentTime > _this.EdtB && currentTime < _this.QnYB && _this._days_in_week.includes(currentDay)) {
|
|
2207
|
+
if (_this.mjqT && !(_timeEvaluator(currentTimeIn24hourFormat, _this.aPGV, "GT") && _timeEvaluator(currentTimeIn24hourFormat, _this.mjEj, "LT"))) {
|
|
2208
2208
|
_this._not_in_specified_time = true;
|
|
2209
2209
|
}
|
|
2210
|
-
if (_this.
|
|
2211
|
-
_this.
|
|
2210
|
+
if (_this.GBVo && isTimeBetween(_this.gVCe, _this.jytr, currentTimeIn24hourFormat)) {
|
|
2211
|
+
_this.UJHf("Exclude Time limits check failed");
|
|
2212
2212
|
if (Apxor.getController().isTestDevice()) {
|
|
2213
|
-
validationToastDisplayandRemoval("Exclude Time Limits check failed for campaign name ".concat(_this.
|
|
2213
|
+
validationToastDisplayandRemoval("Exclude Time Limits check failed for campaign name ".concat(_this.Cwrc.name));
|
|
2214
2214
|
}
|
|
2215
2215
|
return false;
|
|
2216
2216
|
}
|
|
2217
|
-
return !_this.
|
|
2218
|
-
} else if (currentTime < _this.
|
|
2217
|
+
return !_this.mjqT || _timeEvaluator(currentTimeIn24hourFormat, _this.aPGV, "GT") && _timeEvaluator(currentTimeIn24hourFormat, _this.mjEj, "LT");
|
|
2218
|
+
} else if (currentTime < _this.EdtB) {
|
|
2219
2219
|
_this._not_yet_active = true;
|
|
2220
|
-
} else if (currentTime > _this.
|
|
2220
|
+
} else if (currentTime > _this.QnYB) {
|
|
2221
2221
|
_this._nudge_expired = true;
|
|
2222
2222
|
} else if (!_this._days_in_week.includes(currentDay)) {
|
|
2223
|
-
_this.
|
|
2223
|
+
_this.UJHf("Current week day did not match with Configured Week day");
|
|
2224
2224
|
if (Apxor.getController().isTestDevice()) {
|
|
2225
|
-
validationToastDisplayandRemoval("Current week day did not match with Configured Week day for campaign name ".concat(_this.
|
|
2225
|
+
validationToastDisplayandRemoval("Current week day did not match with Configured Week day for campaign name ".concat(_this.Cwrc.name));
|
|
2226
2226
|
}
|
|
2227
2227
|
return false;
|
|
2228
2228
|
}
|
|
2229
2229
|
return false;
|
|
2230
2230
|
});
|
|
2231
|
-
_defineProperty(this, "
|
|
2232
|
-
var _this$
|
|
2231
|
+
_defineProperty(this, "UJHf", function (reason) {
|
|
2232
|
+
var _this$Cwrc$attr;
|
|
2233
2233
|
Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_non_eligible_user", {
|
|
2234
|
-
apx_nudge_type: _this.
|
|
2235
|
-
apx_nudge_id: _this.
|
|
2236
|
-
apx_nudge_name: _this.
|
|
2237
|
-
apx_variant_code: _this.
|
|
2234
|
+
apx_nudge_type: _this.Cwrc.type === "SURVEY" ? "survey" : "campaign",
|
|
2235
|
+
apx_nudge_id: _this.HZiO,
|
|
2236
|
+
apx_nudge_name: _this.Cwrc.name,
|
|
2237
|
+
apx_variant_code: _this.Cwrc.isExperiment || _this.Cwrc.only_context ? (_this$Cwrc$attr = _this.Cwrc.attr) === null || _this$Cwrc$attr === void 0 ? void 0 : _this$Cwrc$attr[APX_VARIANT_CODE] : "TG",
|
|
2238
2238
|
apx_failure_type: "warn",
|
|
2239
2239
|
apx_reason: reason
|
|
2240
2240
|
});
|
|
@@ -2244,20 +2244,20 @@
|
|
|
2244
2244
|
var Binding = /*#__PURE__*/_createClass(function Binding() {
|
|
2245
2245
|
var _this = this;
|
|
2246
2246
|
_classCallCheck(this, Binding);
|
|
2247
|
-
_defineProperty(this, "
|
|
2248
|
-
_defineProperty(this, "
|
|
2249
|
-
_defineProperty(this, "
|
|
2250
|
-
_defineProperty(this, "
|
|
2247
|
+
_defineProperty(this, "DNou", "");
|
|
2248
|
+
_defineProperty(this, "UZJK", "");
|
|
2249
|
+
_defineProperty(this, "SGcD", "");
|
|
2250
|
+
_defineProperty(this, "CdeV", "");
|
|
2251
2251
|
_defineProperty(this, "parse", function () {
|
|
2252
2252
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2253
2253
|
try {
|
|
2254
|
-
_this.
|
|
2255
|
-
if (!_this.
|
|
2254
|
+
_this.DNou = config === null || config === void 0 ? void 0 : config.screen_binding;
|
|
2255
|
+
if (!_this.DNou) {
|
|
2256
2256
|
return true;
|
|
2257
2257
|
} else {
|
|
2258
|
-
_this.
|
|
2259
|
-
_this.
|
|
2260
|
-
_this.
|
|
2258
|
+
_this.UZJK = config === null || config === void 0 ? void 0 : config.binding.url;
|
|
2259
|
+
_this.SGcD = config === null || config === void 0 ? void 0 : config.binding["var"];
|
|
2260
|
+
_this.CdeV = config === null || config === void 0 ? void 0 : config.binding.operator;
|
|
2261
2261
|
return true;
|
|
2262
2262
|
}
|
|
2263
2263
|
} catch (error) {
|
|
@@ -2272,11 +2272,11 @@
|
|
|
2272
2272
|
* operator :operator can be either "EQ" used for equality comparision or "SW" used for startswith comparision
|
|
2273
2273
|
*/
|
|
2274
2274
|
_defineProperty(this, "validate", function () {
|
|
2275
|
-
var url = _this.
|
|
2276
|
-
var variable = _this.
|
|
2277
|
-
var operator = _this.
|
|
2275
|
+
var url = _this.UZJK;
|
|
2276
|
+
var variable = _this.SGcD;
|
|
2277
|
+
var operator = _this.CdeV;
|
|
2278
2278
|
var currentUrl = window.location.href;
|
|
2279
|
-
if (!_this.
|
|
2279
|
+
if (!_this.DNou) {
|
|
2280
2280
|
return true;
|
|
2281
2281
|
} else {
|
|
2282
2282
|
if (operator === "EQ") {
|
|
@@ -2320,44 +2320,44 @@
|
|
|
2320
2320
|
var ConfigItem = /*#__PURE__*/_createClass(function ConfigItem() {
|
|
2321
2321
|
var _this = this;
|
|
2322
2322
|
_classCallCheck(this, ConfigItem);
|
|
2323
|
-
_defineProperty(this, "
|
|
2324
|
-
_defineProperty(this, "
|
|
2325
|
-
_defineProperty(this, "
|
|
2326
|
-
_defineProperty(this, "
|
|
2327
|
-
_defineProperty(this, "
|
|
2328
|
-
_defineProperty(this, "
|
|
2329
|
-
_defineProperty(this, "
|
|
2330
|
-
_defineProperty(this, "
|
|
2331
|
-
_defineProperty(this, "
|
|
2332
|
-
_defineProperty(this, "
|
|
2333
|
-
_defineProperty(this, "
|
|
2334
|
-
_defineProperty(this, "
|
|
2323
|
+
_defineProperty(this, "Lbqk", []);
|
|
2324
|
+
_defineProperty(this, "pDYw", []);
|
|
2325
|
+
_defineProperty(this, "HZiO", "");
|
|
2326
|
+
_defineProperty(this, "Cwrc", new Meta());
|
|
2327
|
+
_defineProperty(this, "EdGF", new Audience());
|
|
2328
|
+
_defineProperty(this, "RydK", new Validity());
|
|
2329
|
+
_defineProperty(this, "zNfa", new Frequency());
|
|
2330
|
+
_defineProperty(this, "kFaW", new OverallConfig());
|
|
2331
|
+
_defineProperty(this, "MysB", new TerminationInfo());
|
|
2332
|
+
_defineProperty(this, "pFiw", new Binding());
|
|
2333
|
+
_defineProperty(this, "VIsH", false);
|
|
2334
|
+
_defineProperty(this, "pCID", []);
|
|
2335
2335
|
_defineProperty(this, "_variant_code", "");
|
|
2336
|
-
_defineProperty(this, "
|
|
2336
|
+
_defineProperty(this, "afSl", false);
|
|
2337
2337
|
_defineProperty(this, "groupCombineOperator", "OR");
|
|
2338
|
-
_defineProperty(this, "
|
|
2339
|
-
_defineProperty(this, "
|
|
2340
|
-
_defineProperty(this, "
|
|
2338
|
+
_defineProperty(this, "MyCf", false);
|
|
2339
|
+
_defineProperty(this, "CboV", false);
|
|
2340
|
+
_defineProperty(this, "pKnG", void 0);
|
|
2341
2341
|
_defineProperty(this, "timeForKPI", void 0);
|
|
2342
2342
|
_defineProperty(this, "kpiIndex", 0);
|
|
2343
|
-
_defineProperty(this, "
|
|
2343
|
+
_defineProperty(this, "MQhn", void 0);
|
|
2344
2344
|
_defineProperty(this, "_across_sessions", false);
|
|
2345
|
-
_defineProperty(this, "
|
|
2346
|
-
_defineProperty(this, "
|
|
2347
|
-
_defineProperty(this, "
|
|
2348
|
-
_defineProperty(this, "
|
|
2349
|
-
_defineProperty(this, "
|
|
2350
|
-
_defineProperty(this, "
|
|
2351
|
-
_defineProperty(this, "
|
|
2352
|
-
_defineProperty(this, "
|
|
2353
|
-
_defineProperty(this, "
|
|
2354
|
-
_defineProperty(this, "
|
|
2355
|
-
_defineProperty(this, "
|
|
2356
|
-
_defineProperty(this, "
|
|
2345
|
+
_defineProperty(this, "JsGT", void 0);
|
|
2346
|
+
_defineProperty(this, "sVCV", false);
|
|
2347
|
+
_defineProperty(this, "pnVO", void 0);
|
|
2348
|
+
_defineProperty(this, "tzvU", void 0);
|
|
2349
|
+
_defineProperty(this, "PITd", void 0);
|
|
2350
|
+
_defineProperty(this, "ULTA", void 0);
|
|
2351
|
+
_defineProperty(this, "jDXU", void 0);
|
|
2352
|
+
_defineProperty(this, "KQfN", void 0);
|
|
2353
|
+
_defineProperty(this, "FoSx", void 0);
|
|
2354
|
+
_defineProperty(this, "rzpc", void 0);
|
|
2355
|
+
_defineProperty(this, "tYHj", void 0);
|
|
2356
|
+
_defineProperty(this, "DDdA", void 0);
|
|
2357
2357
|
_defineProperty(this, "parse", function () {
|
|
2358
2358
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2359
2359
|
try {
|
|
2360
|
-
var _this$
|
|
2360
|
+
var _this$Cwrc$_attr;
|
|
2361
2361
|
// If ID is not present, throw it out
|
|
2362
2362
|
if (!isDefined(config._id)) {
|
|
2363
2363
|
Logger$a.error("No Id");
|
|
@@ -2371,10 +2371,10 @@
|
|
|
2371
2371
|
}
|
|
2372
2372
|
|
|
2373
2373
|
// If META, VALIDITY, FREQUENCY and AUDIENCE is not parsed properly, throw it out
|
|
2374
|
-
if (!(_this.
|
|
2374
|
+
if (!(_this.Cwrc.parse(config) && _this.RydK.parse(config) && _this.zNfa.parse(config) && _this.EdGF.parse(config) && _this.kFaW.parse(config) && _this.MysB.parse(config) && _this.pFiw.parse(config))) {
|
|
2375
2375
|
return false;
|
|
2376
2376
|
}
|
|
2377
|
-
_this._variant_code = _this.
|
|
2377
|
+
_this._variant_code = _this.Cwrc._isExperiment || _this.Cwrc._only_context ? (_this$Cwrc$_attr = _this.Cwrc._attr) === null || _this$Cwrc$_attr === void 0 ? void 0 : _this$Cwrc$_attr[APX_VARIANT_CODE] : "TG";
|
|
2378
2378
|
_this._across_sessions = config !== null && config !== void 0 && config.across_sessions ? config === null || config === void 0 ? void 0 : config.across_sessions : false;
|
|
2379
2379
|
_this.enable_conditions = config === null || config === void 0 ? void 0 : config.enable_conditions;
|
|
2380
2380
|
_this.enable_conditions_v2 = config === null || config === void 0 ? void 0 : config.enable_conditions_v2;
|
|
@@ -2383,12 +2383,12 @@
|
|
|
2383
2383
|
Logger$a.error("No valid conditions", config.conditions);
|
|
2384
2384
|
return false;
|
|
2385
2385
|
}
|
|
2386
|
-
_this.
|
|
2387
|
-
_this.
|
|
2386
|
+
_this.HZiO = config._id;
|
|
2387
|
+
_this.VIsH = isDefined(config.sequence_enabled) ? config.sequence_enabled : false;
|
|
2388
2388
|
if (isDefined(config.conditions_v2) && _this.enable_conditions_v2) {
|
|
2389
|
-
_this.
|
|
2389
|
+
_this.VIsH = config === null || config === void 0 ? void 0 : config.sequence_type;
|
|
2390
2390
|
}
|
|
2391
|
-
if (_this.
|
|
2391
|
+
if (_this.VIsH === true) {
|
|
2392
2392
|
// iff respectSequence is true, Sort the Conditions by their sequence order
|
|
2393
2393
|
// We need to sort, if server sends them in orderless manner
|
|
2394
2394
|
config.conditions.sort(function (prev, current) {
|
|
@@ -2400,40 +2400,40 @@
|
|
|
2400
2400
|
var conditions;
|
|
2401
2401
|
if (isDefined(config.conditions_v2) && _this.enable_conditions_v2) {
|
|
2402
2402
|
conditions = config.conditions_v2;
|
|
2403
|
-
_this.
|
|
2403
|
+
_this.sVCV = true;
|
|
2404
2404
|
} else {
|
|
2405
2405
|
conditions = config.conditions;
|
|
2406
2406
|
}
|
|
2407
|
-
_this.
|
|
2407
|
+
_this.JsGT = conditions;
|
|
2408
2408
|
var length = conditions.length;
|
|
2409
2409
|
var no_context_enabled = config === null || config === void 0 ? void 0 : config.no_context_enabled;
|
|
2410
2410
|
if (length === 0 && no_context_enabled) {
|
|
2411
2411
|
setTimeout(function () {
|
|
2412
|
-
_this.
|
|
2412
|
+
_this.tUgG();
|
|
2413
2413
|
}, 10);
|
|
2414
2414
|
}
|
|
2415
|
-
_this.
|
|
2416
|
-
_this.
|
|
2417
|
-
_this.
|
|
2418
|
-
if (_this.
|
|
2415
|
+
_this.DDdA = length;
|
|
2416
|
+
_this.onbn(conditions, length);
|
|
2417
|
+
_this.vcHj();
|
|
2418
|
+
if (_this.MysB.enable_goal_events) {
|
|
2419
2419
|
var goal_events = config.terminate_info.goal_events.events;
|
|
2420
2420
|
var goaleventslength = goal_events.length;
|
|
2421
2421
|
for (var i = 0; i < goaleventslength; i++) {
|
|
2422
2422
|
var conditionValidator = new ConditionValidator();
|
|
2423
|
-
if (conditionValidator.initialize(goal_events[i], _this.
|
|
2424
|
-
_this.
|
|
2423
|
+
if (conditionValidator.initialize(goal_events[i], _this.HZiO, i, true, [], _this._across_sessions, "termination")) {
|
|
2424
|
+
_this.pDYw.push(conditionValidator);
|
|
2425
2425
|
}
|
|
2426
2426
|
}
|
|
2427
2427
|
}
|
|
2428
|
-
return _this.
|
|
2428
|
+
return _this.Lbqk.length > 0;
|
|
2429
2429
|
} catch (error) {
|
|
2430
2430
|
Logger$a.error(error);
|
|
2431
2431
|
return false;
|
|
2432
2432
|
}
|
|
2433
2433
|
});
|
|
2434
|
-
_defineProperty(this, "
|
|
2434
|
+
_defineProperty(this, "onbn", function (conditions, length) {
|
|
2435
2435
|
var _loop = function _loop() {
|
|
2436
|
-
_this.
|
|
2436
|
+
_this.pCID = [];
|
|
2437
2437
|
var condition = conditions[index];
|
|
2438
2438
|
var condition_type = condition !== null && condition !== void 0 && condition.condition_type ? condition === null || condition === void 0 ? void 0 : condition.condition_type : "single";
|
|
2439
2439
|
if (condition_type === "group") {
|
|
@@ -2441,32 +2441,32 @@
|
|
|
2441
2441
|
var conditions_v2 = condition.conditions_v2;
|
|
2442
2442
|
_this.groupCombineOperator = condition.combine_operator;
|
|
2443
2443
|
var groupRespectSequence = condition === null || condition === void 0 ? void 0 : condition.sequence_type;
|
|
2444
|
-
_this.
|
|
2445
|
-
var groupValidator = _this.
|
|
2446
|
-
_this.
|
|
2447
|
-
//this.
|
|
2444
|
+
_this.tYHj = new GroupConditionValidator();
|
|
2445
|
+
var groupValidator = _this.tYHj.initialize(conditions_v2, _this.HZiO, index, groupRespectSequence, _this.pCID, _this.VIsH, _this._across_sessions);
|
|
2446
|
+
_this.Lbqk.push(groupValidator);
|
|
2447
|
+
//this.onbn(condition.conditions_v2, length_child_conditions);
|
|
2448
2448
|
} else {
|
|
2449
2449
|
if (condition.type === "didn't") {
|
|
2450
|
-
var
|
|
2450
|
+
var vzQc$details;
|
|
2451
2451
|
var obj = {
|
|
2452
2452
|
trigger_key: condition.trigger.details.name,
|
|
2453
|
-
no_kpi_array: condition === null || condition === void 0 || (
|
|
2453
|
+
no_kpi_array: condition === null || condition === void 0 || (vzQc$details = condition.details) === null || vzQc$details === void 0 || (vzQc$details = vzQc$details.additional_info) === null || vzQc$details === void 0 ? void 0 : vzQc$details.nkpi,
|
|
2454
2454
|
condition_id: condition === null || condition === void 0 ? void 0 : condition._id,
|
|
2455
2455
|
time_bounds: condition.time_bounds.upper
|
|
2456
2456
|
};
|
|
2457
|
-
_this.
|
|
2457
|
+
_this.pCID = [].concat(_toConsumableArray(_this.pCID), [obj]);
|
|
2458
2458
|
}
|
|
2459
|
-
_this.
|
|
2460
|
-
if (_this.
|
|
2461
|
-
_this.
|
|
2459
|
+
_this.tYHj = new ConditionValidator();
|
|
2460
|
+
if (_this.tYHj.initialize(condition, _this.HZiO, index, _this.VIsH, _this.pCID, _this._across_sessions)) {
|
|
2461
|
+
_this.Lbqk.push(_this.tYHj);
|
|
2462
2462
|
var max_retries = (condition === null || condition === void 0 ? void 0 : condition.timeout) / (condition === null || condition === void 0 ? void 0 : condition.findinterval);
|
|
2463
2463
|
var frame_id = (condition === null || condition === void 0 ? void 0 : condition.frameid) || "";
|
|
2464
2464
|
var url = condition === null || condition === void 0 ? void 0 : condition.url;
|
|
2465
2465
|
if (window.location.href === url) {
|
|
2466
2466
|
if (condition.event_type === "view_visibility") {
|
|
2467
2467
|
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) {
|
|
2468
|
-
//this.
|
|
2469
|
-
_this.
|
|
2468
|
+
//this.GrDR();
|
|
2469
|
+
_this.tUgG(true);
|
|
2470
2470
|
}
|
|
2471
2471
|
}
|
|
2472
2472
|
}
|
|
@@ -2476,8 +2476,8 @@
|
|
|
2476
2476
|
if (window.location.href === url) {
|
|
2477
2477
|
if (condition.event_type === "view_visibility") {
|
|
2478
2478
|
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) {
|
|
2479
|
-
//this.
|
|
2480
|
-
_this.
|
|
2479
|
+
//this.GrDR();
|
|
2480
|
+
_this.tUgG(true);
|
|
2481
2481
|
}
|
|
2482
2482
|
}
|
|
2483
2483
|
}
|
|
@@ -2489,188 +2489,188 @@
|
|
|
2489
2489
|
_loop();
|
|
2490
2490
|
}
|
|
2491
2491
|
});
|
|
2492
|
-
_defineProperty(this, "
|
|
2493
|
-
if (_this._across_sessions && _this.
|
|
2492
|
+
_defineProperty(this, "vcHj", function () {
|
|
2493
|
+
if (_this._across_sessions && _this.VIsH === "ordered") {
|
|
2494
2494
|
var satisfied = false;
|
|
2495
2495
|
var no_KPI_TriggerDetails = Apxor.getController().getFromStorage("apx_nokpi_triggerdetails");
|
|
2496
2496
|
no_KPI_TriggerDetails = JSON.parse(no_KPI_TriggerDetails);
|
|
2497
2497
|
if (no_KPI_TriggerDetails != null && no_KPI_TriggerDetails != undefined) {
|
|
2498
2498
|
var _loop2 = function _loop2(i) {
|
|
2499
2499
|
var _this$_conditionValid, _this$_conditionValid2, _this$_conditionValid3;
|
|
2500
|
-
if ((_this$_conditionValid = _this.
|
|
2501
|
-
if (_this.
|
|
2502
|
-
var conditionValidatorId = _this.
|
|
2503
|
-
var matchingObject = _this.
|
|
2500
|
+
if ((_this$_conditionValid = _this.Lbqk[i]) !== null && _this$_conditionValid !== void 0 && (_this$_conditionValid = _this$_conditionValid.vzQc) !== null && _this$_conditionValid !== void 0 && _this$_conditionValid._timeEnabled && _this.Lbqk[i].length === undefined) {
|
|
2501
|
+
if (_this.Lbqk[i].vzQc.YnyK === "didn't") {
|
|
2502
|
+
var conditionValidatorId = _this.Lbqk[i].vzQc._id;
|
|
2503
|
+
var matchingObject = _this.doNY(conditionValidatorId, no_KPI_TriggerDetails);
|
|
2504
2504
|
if (matchingObject) {
|
|
2505
2505
|
if (Date.now() > matchingObject.finishTime) {
|
|
2506
|
-
_this.
|
|
2507
|
-
_this.
|
|
2506
|
+
_this.Lbqk[i].KOzR = true;
|
|
2507
|
+
_this.Lbqk[i].RexI = matchingObject.satisfiedCount;
|
|
2508
2508
|
satisfied = true;
|
|
2509
2509
|
} else {
|
|
2510
2510
|
var timeleft = matchingObject.finishTime - Date.now();
|
|
2511
|
-
var eventCategory = _this.
|
|
2511
|
+
var eventCategory = _this.Lbqk[i].vzQc._eventCategory ? _this.Lbqk[i].vzQc._eventCategory : "specific_event";
|
|
2512
2512
|
var ceInstance = new CE();
|
|
2513
2513
|
if (eventCategory === "specific_event") {
|
|
2514
|
-
ceInstance.registerForEvent(generateKey(_this.
|
|
2515
|
-
_this.
|
|
2514
|
+
ceInstance.registerForEvent(generateKey(_this.Lbqk[i].vzQc.wwnJ) + "___" + _this.Lbqk[i].vzQc.sAgb.KezF, _this.LGqh);
|
|
2515
|
+
_this.jDXU = _this.Lbqk[i];
|
|
2516
2516
|
} else {
|
|
2517
|
-
_this.
|
|
2517
|
+
_this.yamK(eventCategory);
|
|
2518
2518
|
}
|
|
2519
2519
|
setTimeout(function () {
|
|
2520
|
-
if (i === _this.
|
|
2521
|
-
_this.
|
|
2522
|
-
_this.
|
|
2520
|
+
if (i === _this.Lbqk.length - 1 && !_this.MyCf) {
|
|
2521
|
+
_this.Lbqk[i].KOzR = true;
|
|
2522
|
+
_this.Lbqk[i].RexI = matchingObject.satisfiedCount;
|
|
2523
2523
|
satisfied = true;
|
|
2524
2524
|
if (eventCategory === "specific_event") {
|
|
2525
|
-
ceInstance.unregisterFromEvent(generateKey(_this.
|
|
2525
|
+
ceInstance.unregisterFromEvent(generateKey(_this.Lbqk[i].vzQc.wwnJ) + "___" + _this.Lbqk[i].vzQc.sAgb.KezF, _this.LGqh);
|
|
2526
2526
|
} else {
|
|
2527
|
-
_this.
|
|
2527
|
+
_this.qdnR(_this.Lbqk[i]);
|
|
2528
2528
|
}
|
|
2529
|
-
_this.
|
|
2529
|
+
_this.tUgG();
|
|
2530
2530
|
}
|
|
2531
2531
|
}, timeleft);
|
|
2532
2532
|
}
|
|
2533
2533
|
}
|
|
2534
2534
|
}
|
|
2535
|
-
if (_this.
|
|
2536
|
-
var _conditionValidatorId = _this.
|
|
2537
|
-
var _matchingObject = _this.
|
|
2535
|
+
if (_this.Lbqk[i].vzQc.YnyK === "did") {
|
|
2536
|
+
var _conditionValidatorId = _this.Lbqk[i].vzQc._id;
|
|
2537
|
+
var _matchingObject = _this.doNY(_conditionValidatorId, no_KPI_TriggerDetails);
|
|
2538
2538
|
if (_matchingObject) {
|
|
2539
2539
|
if (_matchingObject.satisfiedCount == null) {
|
|
2540
2540
|
if (Date.now() < _matchingObject.finishTime) {
|
|
2541
|
-
_this.
|
|
2542
|
-
_this.
|
|
2541
|
+
_this.PITd = _matchingObject;
|
|
2542
|
+
_this.tzvU = i;
|
|
2543
2543
|
var _timeleft = _matchingObject.finishTime - Date.now();
|
|
2544
|
-
var _eventCategory = _this.
|
|
2544
|
+
var _eventCategory = _this.Lbqk[i].vzQc._eventCategory ? _this.Lbqk[i].vzQc._eventCategory : "specific_event";
|
|
2545
2545
|
var _ceInstance = new CE();
|
|
2546
2546
|
if (_eventCategory === "specific_event") {
|
|
2547
|
-
_ceInstance.registerForEvent(generateKey(_this.
|
|
2547
|
+
_ceInstance.registerForEvent(generateKey(_this.Lbqk[i].vzQc.wwnJ) + "___" + _this.Lbqk[i].vzQc.sAgb.KezF, _this.dDch);
|
|
2548
2548
|
} else {
|
|
2549
|
-
_this.
|
|
2549
|
+
_this.yamK(_eventCategory);
|
|
2550
2550
|
}
|
|
2551
2551
|
setTimeout(function () {
|
|
2552
2552
|
if (_eventCategory === "specific_event") {
|
|
2553
|
-
_ceInstance.unregisterFromEvent(generateKey(_this.
|
|
2553
|
+
_ceInstance.unregisterFromEvent(generateKey(_this.Lbqk[i].vzQc.wwnJ) + "___" + _this.Lbqk[i].vzQc.sAgb.KezF, _this.dDch);
|
|
2554
2554
|
} else {
|
|
2555
|
-
_this.
|
|
2555
|
+
_this.qdnR(_this.Lbqk[i]);
|
|
2556
2556
|
}
|
|
2557
2557
|
}, _timeleft);
|
|
2558
2558
|
}
|
|
2559
2559
|
} else {
|
|
2560
|
-
_this.
|
|
2561
|
-
_this.
|
|
2560
|
+
_this.Lbqk[i].RexI = _matchingObject.satisfiedCount;
|
|
2561
|
+
_this.Lbqk[i].KOzR = true;
|
|
2562
2562
|
}
|
|
2563
2563
|
}
|
|
2564
2564
|
}
|
|
2565
2565
|
} else {
|
|
2566
|
-
satisfied = _this.
|
|
2566
|
+
satisfied = _this.eMgY(i, no_KPI_TriggerDetails);
|
|
2567
2567
|
}
|
|
2568
|
-
if (satisfied && (!((_this$_conditionValid2 = _this.
|
|
2569
|
-
if (i === _this.
|
|
2570
|
-
_this.
|
|
2568
|
+
if (satisfied && (!((_this$_conditionValid2 = _this.Lbqk[i]) !== null && _this$_conditionValid2 !== void 0 && (_this$_conditionValid2 = _this$_conditionValid2.vzQc) !== null && _this$_conditionValid2 !== void 0 && _this$_conditionValid2._timeEnabled) || ((_this$_conditionValid3 = _this.Lbqk[i]) === null || _this$_conditionValid3 === void 0 ? void 0 : _this$_conditionValid3.length) > 1)) {
|
|
2569
|
+
if (i === _this.Lbqk.length - 1) {
|
|
2570
|
+
_this.tUgG();
|
|
2571
2571
|
}
|
|
2572
2572
|
} else if (!satisfied) {
|
|
2573
|
-
if (!_this.
|
|
2573
|
+
if (!_this.Lbqk[i].length === undefined) _this.Lbqk[i].GrDR();
|
|
2574
2574
|
}
|
|
2575
2575
|
};
|
|
2576
|
-
for (var i = 0; i < _this.
|
|
2576
|
+
for (var i = 0; i < _this.Lbqk.length; i++) {
|
|
2577
2577
|
_loop2(i);
|
|
2578
2578
|
}
|
|
2579
2579
|
}
|
|
2580
|
-
} else if (_this._across_sessions && _this.
|
|
2580
|
+
} else if (_this._across_sessions && _this.VIsH === "unordered") {
|
|
2581
2581
|
var _no_KPI_TriggerDetails = Apxor.getController().getFromStorage("apx_nokpi_triggerdetails");
|
|
2582
2582
|
_no_KPI_TriggerDetails = JSON.parse(_no_KPI_TriggerDetails);
|
|
2583
2583
|
if (_no_KPI_TriggerDetails != null && _no_KPI_TriggerDetails != undefined) {
|
|
2584
|
-
for (var _i = 0; _i < _this.
|
|
2585
|
-
_this.
|
|
2584
|
+
for (var _i = 0; _i < _this.Lbqk.length; _i++) {
|
|
2585
|
+
_this.eMgY(_i, _no_KPI_TriggerDetails);
|
|
2586
2586
|
}
|
|
2587
2587
|
}
|
|
2588
2588
|
}
|
|
2589
2589
|
});
|
|
2590
|
-
_defineProperty(this, "
|
|
2591
|
-
if (_this.
|
|
2592
|
-
var conditionValidatorId = _this.
|
|
2590
|
+
_defineProperty(this, "eMgY", function (index, no_KPI_TriggerDetails) {
|
|
2591
|
+
if (_this.Lbqk[index].length === undefined || _this.Lbqk[index].length === 1) {
|
|
2592
|
+
var conditionValidatorId = _this.Lbqk[index].vzQc._id;
|
|
2593
2593
|
var satisfied = false;
|
|
2594
|
-
var matchingObject = _this.
|
|
2594
|
+
var matchingObject = _this.doNY(conditionValidatorId, no_KPI_TriggerDetails);
|
|
2595
2595
|
if (matchingObject) {
|
|
2596
|
-
_this.
|
|
2596
|
+
_this.pnVO = matchingObject;
|
|
2597
2597
|
var validator = new ConditionValidator();
|
|
2598
|
-
satisfied = validator.
|
|
2598
|
+
satisfied = validator.JMfV(matchingObject.satisfiedCount, _this.Lbqk[index].vzQc.Psxj, _this.Lbqk[index].vzQc.djdu);
|
|
2599
2599
|
if (matchingObject) {
|
|
2600
2600
|
if (satisfied) {
|
|
2601
|
-
_this.
|
|
2601
|
+
_this.Lbqk[index].KOzR = true;
|
|
2602
2602
|
} else {
|
|
2603
|
-
_this.
|
|
2603
|
+
_this.Lbqk[index].RexI = matchingObject.satisfiedCount;
|
|
2604
2604
|
}
|
|
2605
2605
|
}
|
|
2606
2606
|
} else {
|
|
2607
|
-
_this.
|
|
2607
|
+
_this.Lbqk[index].GrDR();
|
|
2608
2608
|
}
|
|
2609
2609
|
return satisfied;
|
|
2610
|
-
} else if (_this.
|
|
2610
|
+
} else if (_this.Lbqk[index].length >= 1) {
|
|
2611
2611
|
var _this$_conditionValid4;
|
|
2612
2612
|
var groupRespectSequence = "unordered";
|
|
2613
|
-
groupRespectSequence = (_this$_conditionValid4 = _this.
|
|
2613
|
+
groupRespectSequence = (_this$_conditionValid4 = _this.Lbqk[index]) === null || _this$_conditionValid4 === void 0 ? void 0 : _this$_conditionValid4.sequence_type;
|
|
2614
2614
|
var individualConditionSatisfied;
|
|
2615
2615
|
if (groupRespectSequence === "ordered" || groupRespectSequence === "strictly_ordered") {
|
|
2616
|
-
for (var i = 0; i < _this.
|
|
2617
|
-
var individualCondition = _this.
|
|
2618
|
-
var singleConditionValidatorId = individualCondition.
|
|
2616
|
+
for (var i = 0; i < _this.Lbqk[index].length; i++) {
|
|
2617
|
+
var individualCondition = _this.Lbqk[index][i];
|
|
2618
|
+
var singleConditionValidatorId = individualCondition.vzQc._id;
|
|
2619
2619
|
individualConditionSatisfied = false;
|
|
2620
|
-
var _matchingObject2 = _this.
|
|
2620
|
+
var _matchingObject2 = _this.doNY(singleConditionValidatorId, no_KPI_TriggerDetails);
|
|
2621
2621
|
if (_matchingObject2) {
|
|
2622
2622
|
var _validator = new ConditionValidator();
|
|
2623
|
-
individualConditionSatisfied = _validator.
|
|
2623
|
+
individualConditionSatisfied = _validator.JMfV(_matchingObject2.satisfiedCount, individualCondition.vzQc.Psxj, individualCondition.vzQc.djdu);
|
|
2624
2624
|
if (_matchingObject2) {
|
|
2625
2625
|
if (individualConditionSatisfied) {
|
|
2626
|
-
_this.
|
|
2626
|
+
_this.Lbqk[index][i].KOzR = true;
|
|
2627
2627
|
var childIndex = i + 1;
|
|
2628
|
-
var upcomingValidator = _this.
|
|
2629
|
-
if (upcomingValidator === undefined && isDefined(_this.
|
|
2630
|
-
_this.
|
|
2628
|
+
var upcomingValidator = _this.Lbqk[index][i + 1];
|
|
2629
|
+
if (upcomingValidator === undefined && isDefined(_this.Lbqk[index + 1])) {
|
|
2630
|
+
_this.Lbqk[index + 1].GrDR();
|
|
2631
2631
|
individualConditionSatisfied = true;
|
|
2632
2632
|
}
|
|
2633
2633
|
if (upcomingValidator != undefined) {
|
|
2634
|
-
_this.
|
|
2634
|
+
_this.Lbqk[index][i + 1].GrDR(childIndex);
|
|
2635
2635
|
}
|
|
2636
2636
|
} else {
|
|
2637
|
-
_this.
|
|
2637
|
+
_this.Lbqk[index][i].RexI = _matchingObject2.satisfiedCount;
|
|
2638
2638
|
}
|
|
2639
2639
|
}
|
|
2640
2640
|
} else {
|
|
2641
|
-
if (isDefined(_this.
|
|
2642
|
-
_this.
|
|
2643
|
-
} else if (isUndefined(_this.
|
|
2644
|
-
_this.
|
|
2641
|
+
if (isDefined(_this.Lbqk[index][i - 1]) && _this.Lbqk[index][i].KOzR === true) {
|
|
2642
|
+
_this.Lbqk[index][i].GrDR();
|
|
2643
|
+
} else if (isUndefined(_this.Lbqk[index][i - 1])) {
|
|
2644
|
+
_this.Lbqk[index][i].GrDR();
|
|
2645
2645
|
}
|
|
2646
2646
|
}
|
|
2647
2647
|
}
|
|
2648
2648
|
return individualConditionSatisfied;
|
|
2649
2649
|
} else {
|
|
2650
2650
|
var conditionSatisfiedChecker;
|
|
2651
|
-
for (var _i2 = 0; _i2 < _this.
|
|
2652
|
-
var individualCombineOperator = _this.
|
|
2651
|
+
for (var _i2 = 0; _i2 < _this.Lbqk[index].length; _i2++) {
|
|
2652
|
+
var individualCombineOperator = _this.Lbqk[index][0].vzQc.IKic;
|
|
2653
2653
|
if (individualCombineOperator === "OR") {
|
|
2654
2654
|
conditionSatisfiedChecker = false;
|
|
2655
2655
|
} else {
|
|
2656
2656
|
conditionSatisfiedChecker = true;
|
|
2657
2657
|
}
|
|
2658
|
-
var _individualCondition = _this.
|
|
2659
|
-
var _singleConditionValidatorId = _individualCondition.
|
|
2658
|
+
var _individualCondition = _this.Lbqk[index][_i2];
|
|
2659
|
+
var _singleConditionValidatorId = _individualCondition.vzQc._id;
|
|
2660
2660
|
individualConditionSatisfied = false;
|
|
2661
|
-
var _matchingObject3 = _this.
|
|
2661
|
+
var _matchingObject3 = _this.doNY(_singleConditionValidatorId, no_KPI_TriggerDetails);
|
|
2662
2662
|
if (_matchingObject3) {
|
|
2663
2663
|
var _validator2 = new ConditionValidator();
|
|
2664
|
-
individualConditionSatisfied = _validator2.
|
|
2664
|
+
individualConditionSatisfied = _validator2.JMfV(_matchingObject3.satisfiedCount, _individualCondition.vzQc.Psxj, _individualCondition.vzQc.djdu);
|
|
2665
2665
|
if (_matchingObject3) {
|
|
2666
2666
|
if (individualConditionSatisfied) {
|
|
2667
|
-
_this.
|
|
2667
|
+
_this.Lbqk[index][_i2].KOzR = true;
|
|
2668
2668
|
} else {
|
|
2669
|
-
_this.
|
|
2669
|
+
_this.Lbqk[index][_i2].RexI = _matchingObject3.satisfiedCount;
|
|
2670
2670
|
}
|
|
2671
2671
|
}
|
|
2672
2672
|
} else {
|
|
2673
|
-
_individualCondition.
|
|
2673
|
+
_individualCondition.GrDR();
|
|
2674
2674
|
}
|
|
2675
2675
|
if (individualCombineOperator === "AND") {
|
|
2676
2676
|
conditionSatisfiedChecker = conditionSatisfiedChecker && individualConditionSatisfied;
|
|
@@ -2682,36 +2682,36 @@
|
|
|
2682
2682
|
}
|
|
2683
2683
|
}
|
|
2684
2684
|
});
|
|
2685
|
-
_defineProperty(this, "
|
|
2685
|
+
_defineProperty(this, "doNY", function (id, list) {
|
|
2686
2686
|
return list.find(function (obj) {
|
|
2687
2687
|
return obj.id === id;
|
|
2688
2688
|
});
|
|
2689
2689
|
});
|
|
2690
|
-
_defineProperty(this, "
|
|
2690
|
+
_defineProperty(this, "Vhzk", function (index) {
|
|
2691
2691
|
var childIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
|
|
2692
2692
|
var ceInstance = CE.getInstance();
|
|
2693
2693
|
if (index < 0) {
|
|
2694
2694
|
return;
|
|
2695
2695
|
}
|
|
2696
|
-
var currentValidator = _this.
|
|
2696
|
+
var currentValidator = _this.Lbqk[index];
|
|
2697
2697
|
var groupRespectSequence = "unordered";
|
|
2698
2698
|
if ((currentValidator === null || currentValidator === void 0 ? void 0 : currentValidator.length) > 1) {
|
|
2699
2699
|
groupRespectSequence = currentValidator === null || currentValidator === void 0 ? void 0 : currentValidator.sequence_type;
|
|
2700
2700
|
}
|
|
2701
|
-
if (_this.
|
|
2701
|
+
if (_this.VIsH === true || _this.VIsH === "ordered" || _this.VIsH === "strictly_ordered" || groupRespectSequence === "ordered" || groupRespectSequence === "strictly_ordered") {
|
|
2702
2702
|
_this.kpiIndex = index + 1;
|
|
2703
|
-
var conditionValidator = _this.
|
|
2703
|
+
var conditionValidator = _this.Lbqk[index];
|
|
2704
2704
|
if ((conditionValidator === null || conditionValidator === void 0 ? void 0 : conditionValidator.length) > 0) {
|
|
2705
2705
|
if (isDefined(conditionValidator)) {
|
|
2706
|
-
if (_this.
|
|
2706
|
+
if (_this.VIsH === "unordered" && groupRespectSequence === "ordered") {
|
|
2707
2707
|
var prevValidator = currentValidator[childIndex - 1];
|
|
2708
2708
|
if (isDefined(prevValidator)) {
|
|
2709
2709
|
if (prevValidator.length === undefined || prevValidator.length == 1) {
|
|
2710
|
-
if (!prevValidator.
|
|
2710
|
+
if (!prevValidator.KOzR) {
|
|
2711
2711
|
return;
|
|
2712
2712
|
}
|
|
2713
2713
|
} else if (prevValidator.length > 1) {
|
|
2714
|
-
if (!_this.
|
|
2714
|
+
if (!_this.WYtY(prevValidator)) {
|
|
2715
2715
|
return;
|
|
2716
2716
|
}
|
|
2717
2717
|
}
|
|
@@ -2719,103 +2719,103 @@
|
|
|
2719
2719
|
var nextValidator = currentValidator[childIndex + 1];
|
|
2720
2720
|
if (!isDefined(nextValidator)) {
|
|
2721
2721
|
if (groupRespectSequence === "strictly_ordered") {
|
|
2722
|
-
if (_this.
|
|
2723
|
-
_this.
|
|
2722
|
+
if (_this.afSl != true) {
|
|
2723
|
+
_this.tUgG();
|
|
2724
2724
|
}
|
|
2725
2725
|
} else {
|
|
2726
2726
|
var _currentValidator$chi;
|
|
2727
2727
|
if (((_currentValidator$chi = currentValidator[childIndex]) === null || _currentValidator$chi === void 0 ? void 0 : _currentValidator$chi.length) > 0) {
|
|
2728
|
-
if (_this.
|
|
2729
|
-
_this.
|
|
2728
|
+
if (_this.WYtY(currentValidator)) {
|
|
2729
|
+
_this.tUgG();
|
|
2730
2730
|
}
|
|
2731
2731
|
} else {
|
|
2732
|
-
_this.
|
|
2732
|
+
_this.tUgG();
|
|
2733
2733
|
}
|
|
2734
2734
|
}
|
|
2735
2735
|
} else {
|
|
2736
|
-
nextValidator.
|
|
2737
|
-
if (_this.
|
|
2738
|
-
_this._currentEventname = conditionValidator[childIndex].
|
|
2736
|
+
nextValidator.GrDR(childIndex + 1);
|
|
2737
|
+
if (_this.VIsH === "strictly_ordered") {
|
|
2738
|
+
_this._currentEventname = conditionValidator[childIndex].vzQc.sAgb.KezF;
|
|
2739
2739
|
var controller = Apxor.getController();
|
|
2740
|
-
controller.registerForEvent(APP_EVENT, _this.
|
|
2741
|
-
controller.registerForEvent(CLIENT_EVENT, _this.
|
|
2740
|
+
controller.registerForEvent(APP_EVENT, _this.oFUw);
|
|
2741
|
+
controller.registerForEvent(CLIENT_EVENT, _this.oFUw);
|
|
2742
2742
|
}
|
|
2743
2743
|
}
|
|
2744
2744
|
} else {
|
|
2745
|
-
var _prevValidator = _this.
|
|
2746
|
-
// if (isDefined(prevValidator) && !prevValidator.
|
|
2745
|
+
var _prevValidator = _this.Lbqk[index - 1];
|
|
2746
|
+
// if (isDefined(prevValidator) && !prevValidator.KOzR) {
|
|
2747
2747
|
// return;
|
|
2748
2748
|
// }
|
|
2749
2749
|
if (isDefined(_prevValidator)) {
|
|
2750
2750
|
if (_prevValidator.length === undefined || _prevValidator.length == 1) {
|
|
2751
|
-
if (!_prevValidator.
|
|
2751
|
+
if (!_prevValidator.KOzR) {
|
|
2752
2752
|
return;
|
|
2753
2753
|
}
|
|
2754
2754
|
} else if (_prevValidator.length > 1) {
|
|
2755
|
-
if (!_this.
|
|
2755
|
+
if (!_this.WYtY(_prevValidator)) {
|
|
2756
2756
|
return;
|
|
2757
2757
|
}
|
|
2758
2758
|
}
|
|
2759
2759
|
}
|
|
2760
|
-
var
|
|
2760
|
+
var MQhn;
|
|
2761
2761
|
if (conditionValidator.length === undefined || conditionValidator.length === 1) {
|
|
2762
|
-
|
|
2762
|
+
MQhn = _this.Lbqk[index + 1];
|
|
2763
2763
|
} else if (conditionValidator.length > 1) {
|
|
2764
2764
|
if (groupRespectSequence === "ordered" || groupRespectSequence === "strictly_ordered") {
|
|
2765
2765
|
if (childIndex === conditionValidator.length - 1) {
|
|
2766
|
-
|
|
2766
|
+
MQhn = _this.Lbqk[index + 1];
|
|
2767
2767
|
} else {
|
|
2768
|
-
|
|
2768
|
+
MQhn = _this.Lbqk[index][childIndex + 1];
|
|
2769
2769
|
}
|
|
2770
2770
|
} else {
|
|
2771
|
-
if (_this.
|
|
2772
|
-
|
|
2771
|
+
if (_this.WYtY(conditionValidator)) {
|
|
2772
|
+
MQhn = _this.Lbqk[index + 1];
|
|
2773
2773
|
}
|
|
2774
2774
|
}
|
|
2775
2775
|
}
|
|
2776
|
-
if (!isDefined(
|
|
2777
|
-
if (_this.
|
|
2778
|
-
if (_this.
|
|
2779
|
-
_this.
|
|
2776
|
+
if (!isDefined(MQhn)) {
|
|
2777
|
+
if (_this.VIsH === "strictly_ordered") {
|
|
2778
|
+
if (_this.afSl != true) {
|
|
2779
|
+
_this.tUgG();
|
|
2780
2780
|
}
|
|
2781
2781
|
} else {
|
|
2782
|
-
if (_this.
|
|
2783
|
-
_this.
|
|
2782
|
+
if (_this.WYtY(conditionValidator)) {
|
|
2783
|
+
_this.tUgG();
|
|
2784
2784
|
}
|
|
2785
2785
|
}
|
|
2786
2786
|
} else {
|
|
2787
|
-
if (
|
|
2788
|
-
|
|
2787
|
+
if (MQhn.length === undefined || MQhn.length === 1) {
|
|
2788
|
+
MQhn.GrDR(childIndex + 1);
|
|
2789
2789
|
} else {
|
|
2790
|
-
if (_this.
|
|
2791
|
-
if (
|
|
2792
|
-
|
|
2793
|
-
} else if (
|
|
2794
|
-
if (
|
|
2795
|
-
for (var i = 0; i <
|
|
2796
|
-
|
|
2790
|
+
if (_this.WYtY(conditionValidator)) {
|
|
2791
|
+
if (MQhn.length === undefined) {
|
|
2792
|
+
MQhn.GrDR();
|
|
2793
|
+
} else if (MQhn.length > 1) {
|
|
2794
|
+
if (MQhn.sequence_type === "unordered") {
|
|
2795
|
+
for (var i = 0; i < MQhn.length; i++) {
|
|
2796
|
+
MQhn[i].GrDR(i);
|
|
2797
2797
|
}
|
|
2798
|
-
} else if (
|
|
2799
|
-
|
|
2798
|
+
} else if (MQhn.sequence_type === "ordered" || MQhn.sequence_type === "strictly_ordered") {
|
|
2799
|
+
MQhn[0].GrDR(0);
|
|
2800
2800
|
}
|
|
2801
2801
|
}
|
|
2802
2802
|
}
|
|
2803
2803
|
}
|
|
2804
|
-
if (_this.
|
|
2805
|
-
_this._currentEventname = conditionValidator[childIndex].
|
|
2806
|
-
var
|
|
2807
|
-
|
|
2808
|
-
|
|
2804
|
+
if (_this.VIsH === "strictly_ordered") {
|
|
2805
|
+
_this._currentEventname = conditionValidator[childIndex].vzQc.sAgb.KezF;
|
|
2806
|
+
var VFVG = Apxor.getController();
|
|
2807
|
+
VFVG.registerForEvent(APP_EVENT, _this.oFUw);
|
|
2808
|
+
VFVG.registerForEvent(CLIENT_EVENT, _this.oFUw);
|
|
2809
2809
|
}
|
|
2810
2810
|
}
|
|
2811
2811
|
}
|
|
2812
2812
|
}
|
|
2813
2813
|
} else {
|
|
2814
|
-
if (isDefined(conditionValidator) && conditionValidator.
|
|
2815
|
-
conditionValidator.
|
|
2814
|
+
if (isDefined(conditionValidator) && conditionValidator.KOzR) {
|
|
2815
|
+
conditionValidator.sOQM[conditionValidator.vzQc.sAgb.KezF] = Date.now();
|
|
2816
2816
|
// Check if previous validator is satisfied
|
|
2817
|
-
var _prevValidator2 = _this.
|
|
2818
|
-
// if (isDefined(prevValidator) && !prevValidator.
|
|
2817
|
+
var _prevValidator2 = _this.Lbqk[index - 1];
|
|
2818
|
+
// if (isDefined(prevValidator) && !prevValidator.KOzR) {
|
|
2819
2819
|
// // TODO: If current index is satisfied before previous one, do something
|
|
2820
2820
|
// // either unregister all conditions or remove this item from ConfigLookup
|
|
2821
2821
|
// return;
|
|
@@ -2823,113 +2823,113 @@
|
|
|
2823
2823
|
|
|
2824
2824
|
if (isDefined(_prevValidator2)) {
|
|
2825
2825
|
if (_prevValidator2.length === undefined || _prevValidator2.length == 1) {
|
|
2826
|
-
if (!_prevValidator2.
|
|
2826
|
+
if (!_prevValidator2.KOzR) {
|
|
2827
2827
|
return;
|
|
2828
2828
|
}
|
|
2829
2829
|
} else if (_prevValidator2.length > 1) {
|
|
2830
|
-
if (!_this.
|
|
2830
|
+
if (!_this.WYtY(_prevValidator2)) {
|
|
2831
2831
|
return;
|
|
2832
2832
|
}
|
|
2833
2833
|
}
|
|
2834
2834
|
}
|
|
2835
|
-
var _nextValidator2 = _this.
|
|
2835
|
+
var _nextValidator2 = _this.Lbqk[index + 1];
|
|
2836
2836
|
if (!isDefined(_nextValidator2)) {
|
|
2837
2837
|
// It means this is the last condition
|
|
2838
2838
|
// Validate all conditions
|
|
2839
|
-
if (_this.
|
|
2840
|
-
if (_this.
|
|
2841
|
-
_this.
|
|
2839
|
+
if (_this.VIsH === "strictly_ordered") {
|
|
2840
|
+
if (_this.afSl != true) {
|
|
2841
|
+
_this.tUgG();
|
|
2842
2842
|
}
|
|
2843
2843
|
} else {
|
|
2844
|
-
_this.
|
|
2844
|
+
_this.tUgG();
|
|
2845
2845
|
}
|
|
2846
2846
|
} else {
|
|
2847
2847
|
var _nextValidator2$_cond;
|
|
2848
|
-
if (_nextValidator2 !== null && _nextValidator2 !== void 0 && (_nextValidator2$_cond = _nextValidator2.
|
|
2848
|
+
if (_nextValidator2 !== null && _nextValidator2 !== void 0 && (_nextValidator2$_cond = _nextValidator2.vzQc) !== null && _nextValidator2$_cond !== void 0 && _nextValidator2$_cond._timeEnabled) {
|
|
2849
2849
|
var _nextValidator2$_cond2;
|
|
2850
|
-
if (((_nextValidator2$_cond2 = _nextValidator2.
|
|
2850
|
+
if (((_nextValidator2$_cond2 = _nextValidator2.vzQc) === null || _nextValidator2$_cond2 === void 0 ? void 0 : _nextValidator2$_cond2._time.unit) != "session") {
|
|
2851
2851
|
var _nextValidator2$_cond3, _nextValidator2$_cond4;
|
|
2852
|
-
var timeInMillisec = calculateTime(_nextValidator2.
|
|
2853
|
-
if (((_nextValidator2$_cond3 = _nextValidator2.
|
|
2854
|
-
_this.
|
|
2855
|
-
if (!_this.
|
|
2856
|
-
_this.
|
|
2857
|
-
_nextValidator2.
|
|
2858
|
-
if (_nextValidator2.
|
|
2859
|
-
_nextValidator2.
|
|
2852
|
+
var timeInMillisec = calculateTime(_nextValidator2.vzQc._time.unit, _nextValidator2.vzQc._time.value);
|
|
2853
|
+
if (((_nextValidator2$_cond3 = _nextValidator2.vzQc) === null || _nextValidator2$_cond3 === void 0 ? void 0 : _nextValidator2$_cond3.YnyK) == "didn't") {
|
|
2854
|
+
_this.FoSx = setTimeout(function () {
|
|
2855
|
+
if (!_this.MyCf) {
|
|
2856
|
+
_this.MyCf = false;
|
|
2857
|
+
_nextValidator2.KOzR = true;
|
|
2858
|
+
if (_nextValidator2.KOzR) {
|
|
2859
|
+
_nextValidator2.RexI += 1;
|
|
2860
2860
|
var _conditionValidator = new ConditionValidator();
|
|
2861
|
-
_nextValidator2.
|
|
2862
|
-
if (_nextValidator2.
|
|
2863
|
-
_nextValidator2.
|
|
2861
|
+
_nextValidator2.KOzR = _conditionValidator.JMfV(_nextValidator2.RexI, _nextValidator2.vzQc.Psxj, _nextValidator2.vzQc.djdu);
|
|
2862
|
+
if (_nextValidator2.KOzR) {
|
|
2863
|
+
_nextValidator2.vzQc.oGib = Date.now();
|
|
2864
2864
|
var nextIndex = index + 1;
|
|
2865
|
-
var upcomingValidator = _this.
|
|
2865
|
+
var upcomingValidator = _this.Lbqk[nextIndex + 1];
|
|
2866
2866
|
if (!isDefined(upcomingValidator)) {
|
|
2867
|
-
// this.
|
|
2868
|
-
_this.
|
|
2867
|
+
// this.MyCf = false;
|
|
2868
|
+
_this.tUgG();
|
|
2869
2869
|
} else {
|
|
2870
|
-
upcomingValidator.
|
|
2870
|
+
upcomingValidator.GrDR();
|
|
2871
2871
|
}
|
|
2872
|
-
// ceInstance.validate(this.
|
|
2872
|
+
// ceInstance.validate(this.HZiO, index);
|
|
2873
2873
|
}
|
|
2874
2874
|
}
|
|
2875
2875
|
|
|
2876
|
-
ceInstance.unregisterFromEvent(generateKey(_nextValidator2.
|
|
2877
|
-
_nextValidator2.
|
|
2876
|
+
ceInstance.unregisterFromEvent(generateKey(_nextValidator2.vzQc.wwnJ) + "___" + _nextValidator2.vzQc.sAgb.KezF, _this.LGqh);
|
|
2877
|
+
_nextValidator2.AXNR = false;
|
|
2878
2878
|
} else {
|
|
2879
|
-
_this.
|
|
2879
|
+
_this.MyCf = false;
|
|
2880
2880
|
}
|
|
2881
2881
|
}, timeInMillisec);
|
|
2882
2882
|
if (_this._across_sessions) {
|
|
2883
|
-
var _timeInMillisec = calculateTime(_nextValidator2.
|
|
2884
|
-
var timeEnabled = _nextValidator2.
|
|
2885
|
-
var condition_id = _nextValidator2.
|
|
2883
|
+
var _timeInMillisec = calculateTime(_nextValidator2.vzQc._time.unit, _nextValidator2.vzQc._time.value);
|
|
2884
|
+
var timeEnabled = _nextValidator2.vzQc._timeEnabled;
|
|
2885
|
+
var condition_id = _nextValidator2.vzQc._id;
|
|
2886
2886
|
var cv = new ConditionValidator();
|
|
2887
|
-
cv.
|
|
2887
|
+
cv.bPyB(_nextValidator2.vzQc.YnyK, _nextValidator2.vzQc.sAgb.KezF, Date.now(), _nextValidator2.vzQc.sAgb.RmGv, _timeInMillisec, timeEnabled, condition_id);
|
|
2888
2888
|
}
|
|
2889
|
-
if (_nextValidator2.
|
|
2890
|
-
ceInstance.registerForEvent(generateKey(_nextValidator2.
|
|
2891
|
-
_this.
|
|
2889
|
+
if (_nextValidator2.vzQc._eventCategory === "specific_event") {
|
|
2890
|
+
ceInstance.registerForEvent(generateKey(_nextValidator2.vzQc.wwnJ) + "___" + _nextValidator2.vzQc.sAgb.KezF, _this.LGqh);
|
|
2891
|
+
_this.jDXU = _nextValidator2;
|
|
2892
2892
|
} else {
|
|
2893
|
-
_this.
|
|
2893
|
+
_this.yamK(_nextValidator2);
|
|
2894
2894
|
}
|
|
2895
|
-
} else if (((_nextValidator2$_cond4 = _nextValidator2.
|
|
2896
|
-
_this.
|
|
2897
|
-
_this.
|
|
2898
|
-
if (isDefined(_this.
|
|
2899
|
-
_this.
|
|
2895
|
+
} else if (((_nextValidator2$_cond4 = _nextValidator2.vzQc) === null || _nextValidator2$_cond4 === void 0 ? void 0 : _nextValidator2$_cond4.YnyK) == "did") {
|
|
2896
|
+
_this.MyCf = false;
|
|
2897
|
+
_this.MQhn = _nextValidator2;
|
|
2898
|
+
if (isDefined(_this.Lbqk[index + 2]) && _this._across_sessions) {
|
|
2899
|
+
_this.ULTA = _this.Lbqk[index + 2];
|
|
2900
2900
|
}
|
|
2901
|
-
_this.
|
|
2902
|
-
if (!_this.
|
|
2903
|
-
_this.
|
|
2904
|
-
ceInstance.unregisterFromEvent(generateKey(_nextValidator2.
|
|
2901
|
+
_this.rzpc = setTimeout(function () {
|
|
2902
|
+
if (!_this.MyCf) {
|
|
2903
|
+
_this.MyCf = false;
|
|
2904
|
+
ceInstance.unregisterFromEvent(generateKey(_nextValidator2.vzQc.wwnJ) + "___" + _nextValidator2.vzQc.sAgb.KezF, _this.blEo);
|
|
2905
2905
|
} else {
|
|
2906
|
-
_this.
|
|
2906
|
+
_this.MyCf = false;
|
|
2907
2907
|
}
|
|
2908
2908
|
}, timeInMillisec);
|
|
2909
|
-
_this.
|
|
2909
|
+
_this.pKnG = conditionValidator;
|
|
2910
2910
|
_this.timeForKPI = timeInMillisec;
|
|
2911
|
-
ceInstance.registerForEvent(generateKey(_nextValidator2.
|
|
2912
|
-
_this.
|
|
2911
|
+
ceInstance.registerForEvent(generateKey(_nextValidator2.vzQc.wwnJ) + "___" + _nextValidator2.vzQc.sAgb.KezF, _this.blEo);
|
|
2912
|
+
_this.KQfN = _nextValidator2;
|
|
2913
2913
|
if (_this._across_sessions) {
|
|
2914
|
-
var _timeInMillisec2 = calculateTime(_nextValidator2.
|
|
2915
|
-
var _timeEnabled = _nextValidator2.
|
|
2916
|
-
var _condition_id = _nextValidator2.
|
|
2914
|
+
var _timeInMillisec2 = calculateTime(_nextValidator2.vzQc._time.unit, _nextValidator2.vzQc._time.value);
|
|
2915
|
+
var _timeEnabled = _nextValidator2.vzQc._timeEnabled;
|
|
2916
|
+
var _condition_id = _nextValidator2.vzQc._id;
|
|
2917
2917
|
var _cv = new ConditionValidator();
|
|
2918
|
-
_cv.
|
|
2918
|
+
_cv.bPyB(_nextValidator2.vzQc.YnyK, _nextValidator2.vzQc.sAgb.KezF, Date.now(), _nextValidator2.vzQc.sAgb.RmGv, _timeInMillisec2, _timeEnabled, _condition_id);
|
|
2919
2919
|
}
|
|
2920
2920
|
}
|
|
2921
2921
|
}
|
|
2922
2922
|
} else {
|
|
2923
2923
|
if (_nextValidator2.length > 0) {
|
|
2924
2924
|
if (_nextValidator2.sequence_type === "ordered" || _nextValidator2.sequence_type === "strictly_ordered") {
|
|
2925
|
-
_nextValidator2[0].
|
|
2925
|
+
_nextValidator2[0].GrDR(childIndex + 1);
|
|
2926
2926
|
} else {
|
|
2927
2927
|
var _iterator = _createForOfIteratorHelper(_nextValidator2),
|
|
2928
2928
|
_step;
|
|
2929
2929
|
try {
|
|
2930
2930
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
2931
2931
|
var validator = _step.value;
|
|
2932
|
-
validator.
|
|
2932
|
+
validator.GrDR();
|
|
2933
2933
|
}
|
|
2934
2934
|
} catch (err) {
|
|
2935
2935
|
_iterator.e(err);
|
|
@@ -2938,87 +2938,87 @@
|
|
|
2938
2938
|
}
|
|
2939
2939
|
}
|
|
2940
2940
|
} else {
|
|
2941
|
-
_nextValidator2.
|
|
2941
|
+
_nextValidator2.GrDR();
|
|
2942
2942
|
}
|
|
2943
2943
|
}
|
|
2944
|
-
if (_this.
|
|
2945
|
-
_this._currentEventname = conditionValidator.
|
|
2944
|
+
if (_this.VIsH === "strictly_ordered") {
|
|
2945
|
+
_this._currentEventname = conditionValidator.vzQc.sAgb.KezF;
|
|
2946
2946
|
var _controller2 = Apxor.getController();
|
|
2947
|
-
_controller2.registerForEvent(APP_EVENT, _this.
|
|
2948
|
-
_controller2.registerForEvent(CLIENT_EVENT, _this.
|
|
2947
|
+
_controller2.registerForEvent(APP_EVENT, _this.oFUw);
|
|
2948
|
+
_controller2.registerForEvent(CLIENT_EVENT, _this.oFUw);
|
|
2949
2949
|
}
|
|
2950
2950
|
}
|
|
2951
2951
|
}
|
|
2952
2952
|
}
|
|
2953
2953
|
} else {
|
|
2954
2954
|
// Validate all conditions
|
|
2955
|
-
_this.
|
|
2956
|
-
_this.
|
|
2955
|
+
_this.Ylla();
|
|
2956
|
+
_this.tUgG();
|
|
2957
2957
|
}
|
|
2958
2958
|
});
|
|
2959
|
-
_defineProperty(this, "
|
|
2959
|
+
_defineProperty(this, "oFUw", function (event) {
|
|
2960
2960
|
if (event && event.name != _this._currentEventname) {
|
|
2961
|
-
_this.
|
|
2961
|
+
_this.afSl = true;
|
|
2962
2962
|
return;
|
|
2963
2963
|
}
|
|
2964
2964
|
});
|
|
2965
|
-
_defineProperty(this, "
|
|
2965
|
+
_defineProperty(this, "yamK", function (validator) {
|
|
2966
2966
|
var ceInstance = new CE();
|
|
2967
|
-
var eventCategory = validator.
|
|
2967
|
+
var eventCategory = validator.vzQc._eventCategory;
|
|
2968
2968
|
if (eventCategory === "apxor_event") {
|
|
2969
|
-
ceInstance.registerForEvent("apxor_event", _this.
|
|
2969
|
+
ceInstance.registerForEvent("apxor_event", _this.LGqh);
|
|
2970
2970
|
} else if (eventCategory === "customer_event") {
|
|
2971
|
-
ceInstance.registerForEvent("customer_event", _this.
|
|
2971
|
+
ceInstance.registerForEvent("customer_event", _this.LGqh);
|
|
2972
2972
|
} else if (eventCategory === "any_event") {
|
|
2973
|
-
ceInstance.registerForEvent("any_event", _this.
|
|
2973
|
+
ceInstance.registerForEvent("any_event", _this.LGqh);
|
|
2974
2974
|
} else if (eventCategory === "campaign_event") {
|
|
2975
|
-
ceInstance.registerForEvent("campaign_event", _this.
|
|
2975
|
+
ceInstance.registerForEvent("campaign_event", _this.LGqh);
|
|
2976
2976
|
} else if (eventCategory === "survey_event") {
|
|
2977
|
-
ceInstance.registerForEvent("survey_event", _this.
|
|
2977
|
+
ceInstance.registerForEvent("survey_event", _this.LGqh);
|
|
2978
2978
|
}
|
|
2979
2979
|
});
|
|
2980
|
-
_defineProperty(this, "
|
|
2980
|
+
_defineProperty(this, "qdnR", function (validator) {
|
|
2981
2981
|
var ceInstance = new CE();
|
|
2982
|
-
var eventCategory = validator.
|
|
2982
|
+
var eventCategory = validator.vzQc._eventCategory;
|
|
2983
2983
|
if (eventCategory === "apxor_event") {
|
|
2984
|
-
ceInstance.unregisterFromEvent("apxor_event", _this.
|
|
2984
|
+
ceInstance.unregisterFromEvent("apxor_event", _this.LGqh);
|
|
2985
2985
|
} else if (eventCategory === "customer_event") {
|
|
2986
|
-
ceInstance.unregisterFromEvent("customer_event", _this.
|
|
2986
|
+
ceInstance.unregisterFromEvent("customer_event", _this.LGqh);
|
|
2987
2987
|
} else if (eventCategory === "any_event") {
|
|
2988
|
-
ceInstance.unregisterFromEvent("any_event", _this.
|
|
2988
|
+
ceInstance.unregisterFromEvent("any_event", _this.LGqh);
|
|
2989
2989
|
} else if (eventCategory === "campaign_event") {
|
|
2990
|
-
ceInstance.unregisterFromEvent("campaign_event", _this.
|
|
2990
|
+
ceInstance.unregisterFromEvent("campaign_event", _this.LGqh);
|
|
2991
2991
|
} else if (eventCategory === "survey_event") {
|
|
2992
|
-
ceInstance.unregisterFromEvent("survey_event", _this.
|
|
2992
|
+
ceInstance.unregisterFromEvent("survey_event", _this.LGqh);
|
|
2993
2993
|
}
|
|
2994
2994
|
});
|
|
2995
|
-
_defineProperty(this, "
|
|
2995
|
+
_defineProperty(this, "LGqh", function () {
|
|
2996
2996
|
var _this$_unregisterVali, _this$_unregisterVali2;
|
|
2997
|
-
if (_this.
|
|
2998
|
-
_this.
|
|
2999
|
-
clearTimeout(_this.
|
|
2997
|
+
if (_this.FoSx) {
|
|
2998
|
+
_this.MyCf = false;
|
|
2999
|
+
clearTimeout(_this.FoSx);
|
|
3000
3000
|
}
|
|
3001
3001
|
var ceInstance = new CE();
|
|
3002
|
-
_this.
|
|
3002
|
+
_this.MyCf = true;
|
|
3003
3003
|
if (_this._across_sessions) {
|
|
3004
3004
|
if (localStorage.getItem("apx_nokpi_triggerdetails") !== null) {
|
|
3005
3005
|
localStorage.removeItem("apx_nokpi_triggerdetails");
|
|
3006
3006
|
}
|
|
3007
3007
|
}
|
|
3008
|
-
ceInstance.unregisterFromEvent(generateKey((_this$_unregisterVali = _this.
|
|
3008
|
+
ceInstance.unregisterFromEvent(generateKey((_this$_unregisterVali = _this.jDXU) === null || _this$_unregisterVali === void 0 || (_this$_unregisterVali = _this$_unregisterVali.vzQc) === null || _this$_unregisterVali === void 0 ? void 0 : _this$_unregisterVali.wwnJ) + "___" + ((_this$_unregisterVali2 = _this.jDXU) === null || _this$_unregisterVali2 === void 0 || (_this$_unregisterVali2 = _this$_unregisterVali2.vzQc) === null || _this$_unregisterVali2 === void 0 || (_this$_unregisterVali2 = _this$_unregisterVali2.sAgb) === null || _this$_unregisterVali2 === void 0 ? void 0 : _this$_unregisterVali2.KezF), _this.LGqh);
|
|
3009
3009
|
});
|
|
3010
|
-
_defineProperty(this, "
|
|
3010
|
+
_defineProperty(this, "blEo", function () {
|
|
3011
3011
|
var _this$_unregisterVali3, _this$_unregisterVali4, _this$_nextUpcomingVa;
|
|
3012
3012
|
var ceInstance = new CE();
|
|
3013
|
-
_this.
|
|
3014
|
-
if (_this.
|
|
3015
|
-
clearTimeout(_this.
|
|
3013
|
+
_this.MyCf = true;
|
|
3014
|
+
if (_this.rzpc) {
|
|
3015
|
+
clearTimeout(_this.rzpc);
|
|
3016
3016
|
}
|
|
3017
3017
|
var conditionValidator = new ConditionValidator();
|
|
3018
|
-
_this.
|
|
3019
|
-
_this.
|
|
3020
|
-
ceInstance.unregisterFromEvent(generateKey((_this$_unregisterVali3 = _this.
|
|
3021
|
-
if (_this._across_sessions && (_this$_nextUpcomingVa = _this.
|
|
3018
|
+
_this.MQhn.RexI += 1;
|
|
3019
|
+
_this.MQhn.KOzR = conditionValidator.JMfV(_this.MQhn.RexI, _this.MQhn.vzQc.Psxj, _this.MQhn.vzQc.djdu);
|
|
3020
|
+
ceInstance.unregisterFromEvent(generateKey((_this$_unregisterVali3 = _this.KQfN) === null || _this$_unregisterVali3 === void 0 || (_this$_unregisterVali3 = _this$_unregisterVali3.vzQc) === null || _this$_unregisterVali3 === void 0 ? void 0 : _this$_unregisterVali3.wwnJ) + "___" + ((_this$_unregisterVali4 = _this.KQfN) === null || _this$_unregisterVali4 === void 0 || (_this$_unregisterVali4 = _this$_unregisterVali4.vzQc) === null || _this$_unregisterVali4 === void 0 ? void 0 : _this$_unregisterVali4.sAgb.KezF), _this.blEo);
|
|
3021
|
+
if (_this._across_sessions && (_this$_nextUpcomingVa = _this.ULTA) !== null && _this$_nextUpcomingVa !== void 0 && _this$_nextUpcomingVa.vzQc._timeBased) {
|
|
3022
3022
|
var no_KPI_TriggerDetails = Apxor.getController().getFromStorage("apx_nokpi_triggerdetails");
|
|
3023
3023
|
if (no_KPI_TriggerDetails === null || no_KPI_TriggerDetails === undefined) {
|
|
3024
3024
|
no_KPI_TriggerDetails = [];
|
|
@@ -3028,7 +3028,7 @@
|
|
|
3028
3028
|
var objectPresenceChecker;
|
|
3029
3029
|
var requiredObject;
|
|
3030
3030
|
for (var i = 0; i < no_KPI_TriggerDetails.length; i++) {
|
|
3031
|
-
if (_this.no_KPI_TriggerDetails[i].id === _this.
|
|
3031
|
+
if (_this.no_KPI_TriggerDetails[i].id === _this.ULTA.vzQc._id) {
|
|
3032
3032
|
objectPresenceChecker = true;
|
|
3033
3033
|
requiredObject = no_KPI_TriggerDetails[i];
|
|
3034
3034
|
break;
|
|
@@ -3038,42 +3038,42 @@
|
|
|
3038
3038
|
if (objectPresenceChecker) {
|
|
3039
3039
|
requiredObject.satisfiedCount += 1;
|
|
3040
3040
|
} else {
|
|
3041
|
-
var id = _this.
|
|
3042
|
-
var type = _this.
|
|
3043
|
-
var name = _this.
|
|
3044
|
-
var additionalInfo = _this.
|
|
3041
|
+
var id = _this.MQhn.vzQc._id;
|
|
3042
|
+
var type = _this.MQhn.vzQc.YnyK;
|
|
3043
|
+
var name = _this.MQhn.vzQc.sAgb.KezF;
|
|
3044
|
+
var additionalInfo = _this.MQhn.vzQc.sAgb.RmGv;
|
|
3045
3045
|
triggerObj = {
|
|
3046
3046
|
id: id,
|
|
3047
3047
|
type: type,
|
|
3048
3048
|
time: Date.now(),
|
|
3049
3049
|
name: name,
|
|
3050
3050
|
additionalInfo: additionalInfo,
|
|
3051
|
-
satisfiedCount: _this.
|
|
3052
|
-
timeBased: _this.
|
|
3051
|
+
satisfiedCount: _this.MQhn.vzQc._timeEnabled,
|
|
3052
|
+
timeBased: _this.MQhn.vzQc._timeEnabled
|
|
3053
3053
|
//finishTime: finishTime,
|
|
3054
3054
|
};
|
|
3055
3055
|
|
|
3056
3056
|
_this.no_KPI_TriggerDetails.push(triggerObj);
|
|
3057
3057
|
}
|
|
3058
3058
|
}
|
|
3059
|
-
if (_this.
|
|
3060
|
-
var upcomingValidator = _this.
|
|
3059
|
+
if (_this.MQhn.KOzR) {
|
|
3060
|
+
var upcomingValidator = _this.Lbqk[_this.kpiIndex + 1];
|
|
3061
3061
|
if (!isDefined(upcomingValidator)) {
|
|
3062
|
-
_this.
|
|
3062
|
+
_this.tUgG();
|
|
3063
3063
|
} else {
|
|
3064
|
-
upcomingValidator.
|
|
3064
|
+
upcomingValidator.GrDR();
|
|
3065
3065
|
}
|
|
3066
3066
|
}
|
|
3067
3067
|
});
|
|
3068
|
-
_defineProperty(this, "
|
|
3069
|
-
if (_this.
|
|
3070
|
-
_this.
|
|
3071
|
-
var
|
|
3072
|
-
if (
|
|
3073
|
-
if (_this.
|
|
3074
|
-
_this.
|
|
3075
|
-
_this.
|
|
3076
|
-
_this.
|
|
3068
|
+
_defineProperty(this, "dDch", function () {
|
|
3069
|
+
if (_this.tzvU === _this.Lbqk.length - 1) {
|
|
3070
|
+
_this.CboV = true;
|
|
3071
|
+
var KOzR = true;
|
|
3072
|
+
if (KOzR) {
|
|
3073
|
+
if (_this.Lbqk[_this.tzvU]) {
|
|
3074
|
+
_this.Lbqk[_this.tzvU].RexI = _this.PITd.satisfiedCount;
|
|
3075
|
+
_this.Lbqk[_this.tzvU].KOzR = true;
|
|
3076
|
+
_this.tUgG();
|
|
3077
3077
|
}
|
|
3078
3078
|
}
|
|
3079
3079
|
} else {
|
|
@@ -3086,7 +3086,7 @@
|
|
|
3086
3086
|
var requiredObject;
|
|
3087
3087
|
var objectPresenceChecker;
|
|
3088
3088
|
for (var i = 0; i < no_KPI_TriggerDetails.length; i++) {
|
|
3089
|
-
if (no_KPI_TriggerDetails[i].id === _this.
|
|
3089
|
+
if (no_KPI_TriggerDetails[i].id === _this.tzvU) {
|
|
3090
3090
|
objectPresenceChecker = true;
|
|
3091
3091
|
requiredObject = no_KPI_TriggerDetails[i];
|
|
3092
3092
|
break;
|
|
@@ -3096,27 +3096,27 @@
|
|
|
3096
3096
|
requiredObject.satisfiedCount = 1;
|
|
3097
3097
|
}
|
|
3098
3098
|
Apxor.getController().persistToStorage("apx_nokpi_triggerdetails", JSON.stringify(no_KPI_TriggerDetails));
|
|
3099
|
-
_this.
|
|
3100
|
-
_this.
|
|
3101
|
-
if (_this.
|
|
3102
|
-
var timeInMillisec = calculateTime(_this.
|
|
3103
|
-
var timeEnabled = _this.
|
|
3104
|
-
var condition_id = _this.
|
|
3105
|
-
var satisfiedCount = _this.
|
|
3106
|
-
var name = _this.
|
|
3107
|
-
var additionalInfo = _this.
|
|
3099
|
+
_this.Lbqk[_this.tzvU].RexI = _this.PITd.satisfiedCount;
|
|
3100
|
+
_this.Lbqk[_this.tzvU].KOzR = true;
|
|
3101
|
+
if (_this.Lbqk[_this.tzvU + 1].vzQc._timeEnabled) {
|
|
3102
|
+
var timeInMillisec = calculateTime(_this.Lbqk[_this.tzvU + 1].vzQc._time.unit, _this.Lbqk[_this.tzvU + 1].vzQc._time.value);
|
|
3103
|
+
var timeEnabled = _this.Lbqk[_this.tzvU + 1].vzQc._timeEnabled;
|
|
3104
|
+
var condition_id = _this.Lbqk[_this.tzvU + 1].vzQc._id;
|
|
3105
|
+
var satisfiedCount = _this.Lbqk[_this.tzvU + 1].RexI;
|
|
3106
|
+
var name = _this.Lbqk[_this.tzvU + 1].vzQc.sAgb.KezF;
|
|
3107
|
+
var additionalInfo = _this.Lbqk[_this.tzvU + 1].sAgb.RmGv;
|
|
3108
3108
|
var condition_validator = new ConditionValidator();
|
|
3109
|
-
condition_validator.
|
|
3109
|
+
condition_validator.bPyB(_this.vzQc.YnyK, name, Date.now(), additionalInfo, timeInMillisec, timeEnabled, condition_id, satisfiedCount);
|
|
3110
3110
|
}
|
|
3111
3111
|
}
|
|
3112
3112
|
});
|
|
3113
|
-
_defineProperty(this, "
|
|
3114
|
-
if (_this._across_sessions && _this.
|
|
3113
|
+
_defineProperty(this, "Ylla", function () {
|
|
3114
|
+
if (_this._across_sessions && _this.sVCV) {
|
|
3115
3115
|
var matching_validator;
|
|
3116
3116
|
var matchedIndex;
|
|
3117
3117
|
var matchednestedIndex;
|
|
3118
3118
|
var conditionType = "single";
|
|
3119
|
-
var
|
|
3119
|
+
var KOzR = false;
|
|
3120
3120
|
var no_KPI_TriggerDetails = Apxor.getController().getFromStorage("apx_nokpi_triggerdetails");
|
|
3121
3121
|
no_KPI_TriggerDetails = JSON.parse(no_KPI_TriggerDetails);
|
|
3122
3122
|
if (no_KPI_TriggerDetails.length > 0) {
|
|
@@ -3127,9 +3127,9 @@
|
|
|
3127
3127
|
var trigger = _step2.value;
|
|
3128
3128
|
var id_to_check = trigger["id"];
|
|
3129
3129
|
var satifiedCount = trigger["satisfiedCount"];
|
|
3130
|
-
matching_validator = _this.
|
|
3130
|
+
matching_validator = _this.Lbqk.find(function (validator, index) {
|
|
3131
3131
|
if ((validator === null || validator === void 0 ? void 0 : validator.length) === 1 || (validator === null || validator === void 0 ? void 0 : validator.length) === undefined) {
|
|
3132
|
-
if (validator.
|
|
3132
|
+
if (validator.vzQc._id === id_to_check) {
|
|
3133
3133
|
conditionType = "single";
|
|
3134
3134
|
matchedIndex = index;
|
|
3135
3135
|
return true;
|
|
@@ -3138,7 +3138,7 @@
|
|
|
3138
3138
|
} else if (validator.length > 0) {
|
|
3139
3139
|
// If the condition is a group, check if any individual condition has the id
|
|
3140
3140
|
var nestedIndex = validator.findIndex(function (individualCondition) {
|
|
3141
|
-
return individualCondition.
|
|
3141
|
+
return individualCondition.vzQc._id === id_to_check;
|
|
3142
3142
|
});
|
|
3143
3143
|
if (nestedIndex !== -1) {
|
|
3144
3144
|
// If id_to_check is found in a nested condition, store both indexes
|
|
@@ -3152,22 +3152,22 @@
|
|
|
3152
3152
|
});
|
|
3153
3153
|
if (conditionType === "single" && matching_validator) {
|
|
3154
3154
|
var condition_validator = new ConditionValidator();
|
|
3155
|
-
|
|
3156
|
-
var matchingValidatorIndex = _this.
|
|
3157
|
-
var _validator$
|
|
3158
|
-
return (validator === null || validator === void 0 || (_validator$
|
|
3155
|
+
KOzR = condition_validator.JMfV(satifiedCount, matching_validator.vzQc.Psxj, matching_validator.vzQc.djdu);
|
|
3156
|
+
var matchingValidatorIndex = _this.Lbqk.findIndex(function (validator) {
|
|
3157
|
+
var _validator$vzQc;
|
|
3158
|
+
return (validator === null || validator === void 0 || (_validator$vzQc = validator.vzQc) === null || _validator$vzQc === void 0 ? void 0 : _validator$vzQc._id) === id_to_check;
|
|
3159
3159
|
});
|
|
3160
3160
|
if (matchingValidatorIndex === undefined) {
|
|
3161
3161
|
matchingValidatorIndex = matchedIndex;
|
|
3162
3162
|
}
|
|
3163
|
-
if (
|
|
3164
|
-
_this.
|
|
3163
|
+
if (KOzR) {
|
|
3164
|
+
_this.Lbqk[matchingValidatorIndex].KOzR = true;
|
|
3165
3165
|
}
|
|
3166
3166
|
} else if (conditionType === "group" && matching_validator) {
|
|
3167
3167
|
var _condition_validator = new ConditionValidator();
|
|
3168
|
-
|
|
3169
|
-
if (
|
|
3170
|
-
_this.
|
|
3168
|
+
KOzR = _condition_validator.JMfV(satifiedCount, matching_validator[matchednestedIndex].vzQc.Psxj, matching_validator[matchednestedIndex].vzQc.djdu);
|
|
3169
|
+
if (KOzR) {
|
|
3170
|
+
_this.Lbqk[matchedIndex][matchednestedIndex].KOzR = true;
|
|
3171
3171
|
}
|
|
3172
3172
|
}
|
|
3173
3173
|
};
|
|
@@ -3182,64 +3182,64 @@
|
|
|
3182
3182
|
}
|
|
3183
3183
|
}
|
|
3184
3184
|
});
|
|
3185
|
-
_defineProperty(this, "
|
|
3185
|
+
_defineProperty(this, "aKBV", function (index) {
|
|
3186
3186
|
if (index < 0) {
|
|
3187
3187
|
return;
|
|
3188
3188
|
}
|
|
3189
|
-
_this.
|
|
3189
|
+
_this.nUug();
|
|
3190
3190
|
});
|
|
3191
|
-
_defineProperty(this, "
|
|
3191
|
+
_defineProperty(this, "tUgG", function () {
|
|
3192
3192
|
var _window$ApxorRTM, _window$ApxorRTM2;
|
|
3193
3193
|
var view_visibility = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
3194
3194
|
// Check If Audience, Validity is satisfied or not
|
|
3195
3195
|
var userAttributes = Apxor.getController().getUserAttributes();
|
|
3196
3196
|
var sessionAttributes = Apxor.getController().getSessionAttributes();
|
|
3197
|
-
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.
|
|
3197
|
+
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.HZiO) && Apxor.getController().isBadgeTriggerSatisfied(_this.HZiO))) {
|
|
3198
3198
|
Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_trigger_satisfied", {
|
|
3199
|
-
apx_nudge_type: _this.
|
|
3200
|
-
apx_nudge_id: _this.
|
|
3201
|
-
apx_nudge_name: _this.
|
|
3202
|
-
apx_variant_code: _this.
|
|
3199
|
+
apx_nudge_type: _this.Cwrc.YnyK === "SURVEY" ? "survey" : "campaign",
|
|
3200
|
+
apx_nudge_id: _this.HZiO,
|
|
3201
|
+
apx_nudge_name: _this.Cwrc.KezF,
|
|
3202
|
+
apx_variant_code: _this.Cwrc._isExperiment || _this.Cwrc._only_context ? _this.Cwrc._attr[APX_VARIANT_CODE] : "TG"
|
|
3203
3203
|
});
|
|
3204
3204
|
}
|
|
3205
|
-
if (!_this.
|
|
3205
|
+
if (!_this.RydK.validate() || !_this.EdGF.validate(userAttributes, sessionAttributes) || !_this.kFaW.validate() || !_this.pFiw.validate()) {
|
|
3206
3206
|
// eslint-disable-next-line no-unused-vars
|
|
3207
|
-
var apx_nudge_type = _this.
|
|
3208
|
-
if (!_this.
|
|
3209
|
-
_this.
|
|
3207
|
+
var apx_nudge_type = _this.Cwrc.YnyK === "SURVEY" ? "survey" : "campaign";
|
|
3208
|
+
if (!_this.kFaW.retainedDaysValidated) {
|
|
3209
|
+
_this.UJHf("Retained day criteria not met");
|
|
3210
3210
|
return;
|
|
3211
3211
|
}
|
|
3212
|
-
if (!_this.
|
|
3213
|
-
_this.
|
|
3212
|
+
if (!_this.kFaW.retainedSessionValidated) {
|
|
3213
|
+
_this.UJHf("User session criteria not met");
|
|
3214
3214
|
return;
|
|
3215
3215
|
}
|
|
3216
|
-
if (_this.
|
|
3217
|
-
_this.
|
|
3216
|
+
if (_this.kFaW.eventDoneInLT) {
|
|
3217
|
+
_this.UJHf("Event done in life time");
|
|
3218
3218
|
return;
|
|
3219
3219
|
}
|
|
3220
|
-
if (!_this.
|
|
3221
|
-
_this.
|
|
3220
|
+
if (!_this.EdGF.userAttributesValidated) {
|
|
3221
|
+
_this.UJHf("User property filter not met");
|
|
3222
3222
|
return;
|
|
3223
3223
|
}
|
|
3224
|
-
if (!_this.
|
|
3225
|
-
_this.
|
|
3224
|
+
if (!_this.EdGF.sessionAttributeValidated) {
|
|
3225
|
+
_this.UJHf("Session property filter not met");
|
|
3226
3226
|
return;
|
|
3227
3227
|
}
|
|
3228
|
-
if (_this.
|
|
3229
|
-
_this.
|
|
3228
|
+
if (_this.RydK._not_in_specified_time) {
|
|
3229
|
+
_this.UJHf("Time limits check failed");
|
|
3230
3230
|
return;
|
|
3231
3231
|
}
|
|
3232
|
-
if (_this.
|
|
3233
|
-
_this.
|
|
3232
|
+
if (_this.RydK._not_yet_active) {
|
|
3233
|
+
_this.UJHf("not in the scheduled time");
|
|
3234
3234
|
return;
|
|
3235
3235
|
}
|
|
3236
|
-
if (_this.
|
|
3237
|
-
_this.
|
|
3236
|
+
if (_this.RydK._nudge_expired) {
|
|
3237
|
+
_this.UJHf("nudge expired");
|
|
3238
3238
|
return;
|
|
3239
3239
|
}
|
|
3240
3240
|
return;
|
|
3241
3241
|
}
|
|
3242
|
-
var length = _this.
|
|
3242
|
+
var length = _this.Lbqk.length;
|
|
3243
3243
|
var isSatisfied = length < 1;
|
|
3244
3244
|
var combineOperator = "";
|
|
3245
3245
|
if (length === 0) {
|
|
@@ -3247,24 +3247,24 @@
|
|
|
3247
3247
|
}
|
|
3248
3248
|
for (var index = 0; index < length; index++) {
|
|
3249
3249
|
var currentResult = void 0;
|
|
3250
|
-
var validator = _this.
|
|
3250
|
+
var validator = _this.Lbqk[index];
|
|
3251
3251
|
if (validator.length > 1) {
|
|
3252
|
-
var combine_operator = validator[0].
|
|
3252
|
+
var combine_operator = validator[0].vzQc.IKic;
|
|
3253
3253
|
if (combine_operator === "AND") {
|
|
3254
3254
|
currentResult = true;
|
|
3255
3255
|
} else {
|
|
3256
3256
|
currentResult = false;
|
|
3257
3257
|
}
|
|
3258
3258
|
for (var i = 0; i < validator.length; i++) {
|
|
3259
|
-
var _combine_operator = validator[0].
|
|
3259
|
+
var _combine_operator = validator[0].vzQc.IKic;
|
|
3260
3260
|
if (_combine_operator === "AND") {
|
|
3261
|
-
currentResult = currentResult && validator[i].
|
|
3261
|
+
currentResult = currentResult && validator[i].KOzR;
|
|
3262
3262
|
} else {
|
|
3263
|
-
currentResult = currentResult || validator[i].
|
|
3263
|
+
currentResult = currentResult || validator[i].KOzR;
|
|
3264
3264
|
}
|
|
3265
3265
|
}
|
|
3266
3266
|
} else {
|
|
3267
|
-
currentResult = validator.
|
|
3267
|
+
currentResult = validator.KOzR;
|
|
3268
3268
|
}
|
|
3269
3269
|
if (combineOperator.trim() === "") {
|
|
3270
3270
|
isSatisfied = currentResult;
|
|
@@ -3281,7 +3281,7 @@
|
|
|
3281
3281
|
if (validator.length > 1) {
|
|
3282
3282
|
combineOperator = _this.groupCombineOperator;
|
|
3283
3283
|
} else {
|
|
3284
|
-
combineOperator = validator.
|
|
3284
|
+
combineOperator = validator.IKic;
|
|
3285
3285
|
}
|
|
3286
3286
|
}
|
|
3287
3287
|
if (view_visibility === true) {
|
|
@@ -3291,40 +3291,40 @@
|
|
|
3291
3291
|
var _window$ApxorRTM3, _window$ApxorRTM4;
|
|
3292
3292
|
console.debug("onCondition satisfied");
|
|
3293
3293
|
// Check if count reached it's maximum
|
|
3294
|
-
if (!_this.
|
|
3295
|
-
console.warn("Maximum limit reached", _this.
|
|
3294
|
+
if (!_this.zNfa.DJrV(_this.HZiO)) {
|
|
3295
|
+
console.warn("Maximum limit reached", _this.HZiO);
|
|
3296
3296
|
return;
|
|
3297
3297
|
}
|
|
3298
3298
|
|
|
3299
3299
|
//logging event for view not found for test device
|
|
3300
|
-
if (!((_window$ApxorRTM3 = window.ApxorRTM) !== null && _window$ApxorRTM3 !== void 0 && _window$ApxorRTM3.isBadgePresent && (_window$ApxorRTM4 = window.ApxorRTM) !== null && _window$ApxorRTM4 !== void 0 && _window$ApxorRTM4.badgesLists.includes(_this.
|
|
3301
|
-
var _apx_nudge_type = _this.
|
|
3300
|
+
if (!((_window$ApxorRTM3 = window.ApxorRTM) !== null && _window$ApxorRTM3 !== void 0 && _window$ApxorRTM3.isBadgePresent && (_window$ApxorRTM4 = window.ApxorRTM) !== null && _window$ApxorRTM4 !== void 0 && _window$ApxorRTM4.badgesLists.includes(_this.HZiO) && Apxor.getController().isBadgeTriggerSatisfied(_this.HZiO))) {
|
|
3301
|
+
var _apx_nudge_type = _this.Cwrc.YnyK === "SURVEY" ? "survey" : "campaign";
|
|
3302
3302
|
Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_trigger_satisfied", {
|
|
3303
|
-
apx_nudge_type: _this.
|
|
3304
|
-
apx_nudge_id: _this.
|
|
3305
|
-
apx_nudge_name: _this.
|
|
3306
|
-
apx_variant_code: _this.
|
|
3303
|
+
apx_nudge_type: _this.Cwrc.YnyK === "SURVEY" ? "survey" : "campaign",
|
|
3304
|
+
apx_nudge_id: _this.HZiO,
|
|
3305
|
+
apx_nudge_name: _this.Cwrc.KezF,
|
|
3306
|
+
apx_variant_code: _this.Cwrc._isExperiment || _this.Cwrc._only_context ? _this.Cwrc._attr[APX_VARIANT_CODE] : "TG"
|
|
3307
3307
|
}, false, "", _apx_nudge_type);
|
|
3308
3308
|
}
|
|
3309
3309
|
if (_this._across_sessions) {
|
|
3310
3310
|
localStorage.removeItem("apx_nokpi_triggerdetails");
|
|
3311
3311
|
}
|
|
3312
|
-
var _iterator3 = _createForOfIteratorHelper(_this.
|
|
3312
|
+
var _iterator3 = _createForOfIteratorHelper(_this.Lbqk),
|
|
3313
3313
|
_step3;
|
|
3314
3314
|
try {
|
|
3315
3315
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
3316
3316
|
var _validator3 = _step3.value;
|
|
3317
3317
|
if ((_validator3 === null || _validator3 === void 0 ? void 0 : _validator3.length) === 1 || (_validator3 === null || _validator3 === void 0 ? void 0 : _validator3.length) === undefined) {
|
|
3318
|
-
_validator3.
|
|
3319
|
-
_validator3.
|
|
3318
|
+
_validator3.KOzR = false;
|
|
3319
|
+
_validator3.RexI = 0;
|
|
3320
3320
|
} else {
|
|
3321
3321
|
var _iterator4 = _createForOfIteratorHelper(_validator3),
|
|
3322
3322
|
_step4;
|
|
3323
3323
|
try {
|
|
3324
3324
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
3325
3325
|
var childValidator = _step4.value;
|
|
3326
|
-
childValidator.
|
|
3327
|
-
childValidator.
|
|
3326
|
+
childValidator.KOzR = false;
|
|
3327
|
+
childValidator.RexI = 0;
|
|
3328
3328
|
}
|
|
3329
3329
|
} catch (err) {
|
|
3330
3330
|
_iterator4.e(err);
|
|
@@ -3333,39 +3333,39 @@
|
|
|
3333
3333
|
}
|
|
3334
3334
|
}
|
|
3335
3335
|
}
|
|
3336
|
-
//this.
|
|
3336
|
+
//this.tYHj = new ConditionValidator();
|
|
3337
3337
|
} catch (err) {
|
|
3338
3338
|
_iterator3.e(err);
|
|
3339
3339
|
} finally {
|
|
3340
3340
|
_iterator3.f();
|
|
3341
3341
|
}
|
|
3342
|
-
_this.
|
|
3343
|
-
_this.
|
|
3344
|
-
_this.
|
|
3345
|
-
if (_this.
|
|
3346
|
-
var _apx_nudge_type2 = _this.
|
|
3347
|
-
Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.
|
|
3348
|
-
message_name: _this.
|
|
3349
|
-
id: _this.
|
|
3342
|
+
_this.tYHj.IgHd(_this.Lbqk);
|
|
3343
|
+
_this.Lbqk = [];
|
|
3344
|
+
_this.onbn(_this.JsGT, _this.DDdA);
|
|
3345
|
+
if (_this.Cwrc._only_context === true) {
|
|
3346
|
+
var _apx_nudge_type2 = _this.Cwrc.YnyK === "SURVEY" ? "survey" : "campaign";
|
|
3347
|
+
Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.Cwrc._attr), {}, {
|
|
3348
|
+
message_name: _this.Cwrc.KezF,
|
|
3349
|
+
id: _this.HZiO
|
|
3350
3350
|
}), false, "", _apx_nudge_type2);
|
|
3351
3351
|
}
|
|
3352
3352
|
// Emit event
|
|
3353
|
-
Apxor.getController().dispatchEvent(_this.
|
|
3354
|
-
name: _this.
|
|
3353
|
+
Apxor.getController().dispatchEvent(_this.Cwrc.YnyK, {
|
|
3354
|
+
name: _this.Cwrc.YnyK,
|
|
3355
3355
|
additional_info: {
|
|
3356
|
-
uuid: _this.
|
|
3357
|
-
name: _this.
|
|
3356
|
+
uuid: _this.HZiO,
|
|
3357
|
+
name: _this.Cwrc.KezF
|
|
3358
3358
|
}
|
|
3359
3359
|
});
|
|
3360
3360
|
}
|
|
3361
3361
|
});
|
|
3362
|
-
_defineProperty(this, "
|
|
3363
|
-
var length = _this.
|
|
3362
|
+
_defineProperty(this, "nUug", function () {
|
|
3363
|
+
var length = _this.pDYw.length;
|
|
3364
3364
|
var isSatisfied = length < 1;
|
|
3365
3365
|
var combineOperator = "";
|
|
3366
3366
|
for (var index = 0; index < length; index++) {
|
|
3367
|
-
var validator = _this.
|
|
3368
|
-
var currentResult = validator.
|
|
3367
|
+
var validator = _this.pDYw[index];
|
|
3368
|
+
var currentResult = validator.KOzR;
|
|
3369
3369
|
if (combineOperator.trim() === "") {
|
|
3370
3370
|
isSatisfied = currentResult;
|
|
3371
3371
|
} else {
|
|
@@ -3378,23 +3378,23 @@
|
|
|
3378
3378
|
break;
|
|
3379
3379
|
}
|
|
3380
3380
|
}
|
|
3381
|
-
combineOperator = validator.
|
|
3381
|
+
combineOperator = validator.JeVw;
|
|
3382
3382
|
}
|
|
3383
3383
|
if (isSatisfied) {
|
|
3384
|
-
Apxor.getController().persistTerminationInfoLocally(_this.
|
|
3385
|
-
if (_this.
|
|
3386
|
-
var apx_nudge_type = _this.
|
|
3387
|
-
Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.
|
|
3388
|
-
message_name: _this.
|
|
3389
|
-
id: _this.
|
|
3384
|
+
Apxor.getController().persistTerminationInfoLocally(_this.HZiO);
|
|
3385
|
+
if (_this.Cwrc._only_context === true) {
|
|
3386
|
+
var apx_nudge_type = _this.Cwrc.YnyK === "SURVEY" ? "survey" : "campaign";
|
|
3387
|
+
Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.Cwrc._attr), {}, {
|
|
3388
|
+
message_name: _this.Cwrc.KezF,
|
|
3389
|
+
id: _this.HZiO
|
|
3390
3390
|
}), false, "apxor", apx_nudge_type);
|
|
3391
3391
|
}
|
|
3392
3392
|
// Emit event
|
|
3393
|
-
Apxor.getController().dispatchEvent(_this.
|
|
3394
|
-
name: _this.
|
|
3393
|
+
Apxor.getController().dispatchEvent(_this.Cwrc.YnyK, {
|
|
3394
|
+
name: _this.Cwrc.YnyK,
|
|
3395
3395
|
additional_info: {
|
|
3396
|
-
uuid: _this.
|
|
3397
|
-
name: _this.
|
|
3396
|
+
uuid: _this.HZiO,
|
|
3397
|
+
name: _this.Cwrc.KezF
|
|
3398
3398
|
}
|
|
3399
3399
|
});
|
|
3400
3400
|
}
|
|
@@ -3402,42 +3402,42 @@
|
|
|
3402
3402
|
_defineProperty(this, "validateForTerminationAttributes", function () {
|
|
3403
3403
|
var userAttributes = Apxor.getController().getUserAttributes();
|
|
3404
3404
|
var sessionAttributes = Apxor.getController().getSessionAttributes();
|
|
3405
|
-
return _this.
|
|
3405
|
+
return _this.MysB.validate(userAttributes, sessionAttributes);
|
|
3406
3406
|
});
|
|
3407
|
-
_defineProperty(this, "
|
|
3408
|
-
_this.
|
|
3407
|
+
_defineProperty(this, "JTks", function () {
|
|
3408
|
+
_this.zNfa.JTks();
|
|
3409
3409
|
});
|
|
3410
3410
|
_defineProperty(this, "getFrequencyCount", function () {
|
|
3411
|
-
return _this.
|
|
3411
|
+
return _this.zNfa.getFrequencyCount();
|
|
3412
3412
|
});
|
|
3413
|
-
_defineProperty(this, "
|
|
3414
|
-
return _this.
|
|
3413
|
+
_defineProperty(this, "dmUH", function () {
|
|
3414
|
+
return _this.zNfa.ovoh();
|
|
3415
3415
|
});
|
|
3416
|
-
_defineProperty(this, "
|
|
3416
|
+
_defineProperty(this, "WYtY", function (validator) {
|
|
3417
3417
|
var currentResult;
|
|
3418
|
-
var combine_operator = validator[0].
|
|
3418
|
+
var combine_operator = validator[0].vzQc.IKic;
|
|
3419
3419
|
if (combine_operator === "AND") {
|
|
3420
3420
|
currentResult = true;
|
|
3421
3421
|
} else {
|
|
3422
3422
|
currentResult = false;
|
|
3423
3423
|
}
|
|
3424
3424
|
for (var i = 0; i < validator.length; i++) {
|
|
3425
|
-
var _combine_operator2 = validator[0].
|
|
3425
|
+
var _combine_operator2 = validator[0].vzQc.IKic;
|
|
3426
3426
|
if (_combine_operator2 === "AND") {
|
|
3427
|
-
currentResult = currentResult && validator[i].
|
|
3427
|
+
currentResult = currentResult && validator[i].KOzR;
|
|
3428
3428
|
} else {
|
|
3429
|
-
currentResult = currentResult || validator[i].
|
|
3429
|
+
currentResult = currentResult || validator[i].KOzR;
|
|
3430
3430
|
}
|
|
3431
3431
|
}
|
|
3432
3432
|
return currentResult;
|
|
3433
3433
|
});
|
|
3434
|
-
_defineProperty(this, "
|
|
3435
|
-
var _this$
|
|
3434
|
+
_defineProperty(this, "UJHf", function (reason) {
|
|
3435
|
+
var _this$Cwrc$_attr2;
|
|
3436
3436
|
Apxor === null || Apxor === void 0 || Apxor.logEvent("apx_non_eligible_user", {
|
|
3437
|
-
apx_nudge_type: _this.
|
|
3438
|
-
apx_nudge_id: _this.
|
|
3439
|
-
apx_nudge_name: _this.
|
|
3440
|
-
apx_variant_code: _this.
|
|
3437
|
+
apx_nudge_type: _this.Cwrc.YnyK === "SURVEY" ? "survey" : "campaign",
|
|
3438
|
+
apx_nudge_id: _this.HZiO,
|
|
3439
|
+
apx_nudge_name: _this.Cwrc.KezF,
|
|
3440
|
+
apx_variant_code: _this.Cwrc._isExperiment || _this.Cwrc._only_context ? (_this$Cwrc$_attr2 = _this.Cwrc._attr) === null || _this$Cwrc$_attr2 === void 0 ? void 0 : _this$Cwrc$_attr2[APX_VARIANT_CODE] : "TG",
|
|
3441
3441
|
apx_failure_type: "warn",
|
|
3442
3442
|
apx_reason: reason
|
|
3443
3443
|
});
|
|
@@ -3447,7 +3447,7 @@
|
|
|
3447
3447
|
var ConfigLookup = /*#__PURE__*/_createClass(function ConfigLookup() {
|
|
3448
3448
|
var _this = this;
|
|
3449
3449
|
_classCallCheck(this, ConfigLookup);
|
|
3450
|
-
_defineProperty(this, "
|
|
3450
|
+
_defineProperty(this, "oiDl", {});
|
|
3451
3451
|
_defineProperty(this, "parse", function () {
|
|
3452
3452
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
3453
3453
|
configs: []
|
|
@@ -3470,7 +3470,7 @@
|
|
|
3470
3470
|
var configId = _config._id;
|
|
3471
3471
|
var configItem = new ConfigItem();
|
|
3472
3472
|
if (configItem.parse(_config)) {
|
|
3473
|
-
_this.
|
|
3473
|
+
_this.oiDl[configId] = configItem;
|
|
3474
3474
|
} else {
|
|
3475
3475
|
console.warn("Failed to parse cfg", configId);
|
|
3476
3476
|
}
|
|
@@ -3479,51 +3479,51 @@
|
|
|
3479
3479
|
});
|
|
3480
3480
|
_defineProperty(this, "validate", function (id, index) {
|
|
3481
3481
|
var childIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
3482
|
-
if (_this.
|
|
3483
|
-
var configItem = _this.
|
|
3484
|
-
configItem.
|
|
3482
|
+
if (_this.oiDl[id]) {
|
|
3483
|
+
var configItem = _this.oiDl[id];
|
|
3484
|
+
configItem.Vhzk(index, childIndex);
|
|
3485
3485
|
}
|
|
3486
3486
|
});
|
|
3487
3487
|
_defineProperty(this, "getVariantCode", function (id) {
|
|
3488
|
-
if (_this.
|
|
3489
|
-
var configItem = _this.
|
|
3488
|
+
if (_this.oiDl[id]) {
|
|
3489
|
+
var configItem = _this.oiDl[id];
|
|
3490
3490
|
return configItem._variant_code;
|
|
3491
3491
|
}
|
|
3492
3492
|
return "";
|
|
3493
3493
|
});
|
|
3494
3494
|
_defineProperty(this, "validateForTermination", function (id, index) {
|
|
3495
|
-
if (_this.
|
|
3496
|
-
var configItem = _this.
|
|
3497
|
-
configItem.
|
|
3495
|
+
if (_this.oiDl[id]) {
|
|
3496
|
+
var configItem = _this.oiDl[id];
|
|
3497
|
+
configItem.aKBV(index);
|
|
3498
3498
|
}
|
|
3499
3499
|
});
|
|
3500
3500
|
_defineProperty(this, "validateForTerminationAttributes", function (id) {
|
|
3501
|
-
if (_this.
|
|
3502
|
-
var configItem = _this.
|
|
3501
|
+
if (_this.oiDl[id]) {
|
|
3502
|
+
var configItem = _this.oiDl[id];
|
|
3503
3503
|
return configItem.validateForTerminationAttributes();
|
|
3504
3504
|
}
|
|
3505
3505
|
return false;
|
|
3506
3506
|
});
|
|
3507
|
-
_defineProperty(this, "
|
|
3508
|
-
var campiagnConfig = _this.
|
|
3509
|
-
campiagnConfig.
|
|
3507
|
+
_defineProperty(this, "JTks", function (id) {
|
|
3508
|
+
var campiagnConfig = _this.oiDl[id];
|
|
3509
|
+
campiagnConfig.JTks();
|
|
3510
3510
|
});
|
|
3511
3511
|
_defineProperty(this, "getFrequencyCount", function (id) {
|
|
3512
|
-
var campiagnConfig = _this.
|
|
3512
|
+
var campiagnConfig = _this.oiDl[id];
|
|
3513
3513
|
if (campiagnConfig != undefined) return campiagnConfig.getFrequencyCount();
|
|
3514
3514
|
});
|
|
3515
3515
|
_defineProperty(this, "resetFrequencyCounts", function () {
|
|
3516
|
-
var configs = _this.
|
|
3516
|
+
var configs = _this.oiDl;
|
|
3517
3517
|
for (var configId in configs) {
|
|
3518
|
-
configs[configId].
|
|
3518
|
+
configs[configId].dmUH();
|
|
3519
3519
|
}
|
|
3520
3520
|
});
|
|
3521
|
-
_defineProperty(this, "
|
|
3521
|
+
_defineProperty(this, "Cutc", function (campaignId) {
|
|
3522
3522
|
try {
|
|
3523
|
-
if (_this.
|
|
3524
|
-
var configItem = _this.
|
|
3525
|
-
if (configItem && configItem.
|
|
3526
|
-
return configItem.
|
|
3523
|
+
if (_this.oiDl) {
|
|
3524
|
+
var configItem = _this.oiDl[campaignId];
|
|
3525
|
+
if (configItem && configItem.Cwrc) {
|
|
3526
|
+
return configItem.Cwrc;
|
|
3527
3527
|
}
|
|
3528
3528
|
}
|
|
3529
3529
|
} catch (e) {
|
|
@@ -3539,51 +3539,51 @@
|
|
|
3539
3539
|
var EventsListener = /*#__PURE__*/_createClass(function EventsListener() {
|
|
3540
3540
|
var _this = this;
|
|
3541
3541
|
_classCallCheck(this, EventsListener);
|
|
3542
|
-
_defineProperty(this, "
|
|
3543
|
-
_defineProperty(this, "
|
|
3544
|
-
_defineProperty(this, "
|
|
3542
|
+
_defineProperty(this, "qOpx", {});
|
|
3543
|
+
_defineProperty(this, "NAfO", []);
|
|
3544
|
+
_defineProperty(this, "MpRk", false);
|
|
3545
3545
|
_defineProperty(this, "initialize", function () {
|
|
3546
3546
|
var controller = Apxor.getController();
|
|
3547
3547
|
controller.registerForEvent(APP_EVENT$1, function (event) {
|
|
3548
|
-
return _this.
|
|
3548
|
+
return _this.opho(event, "AE");
|
|
3549
3549
|
});
|
|
3550
3550
|
controller.registerForEvent(CLIENT_EVENT$1, function (event) {
|
|
3551
|
-
return _this.
|
|
3551
|
+
return _this.opho(event, "CE");
|
|
3552
3552
|
});
|
|
3553
3553
|
});
|
|
3554
|
-
_defineProperty(this, "
|
|
3554
|
+
_defineProperty(this, "izHC", function () {
|
|
3555
3555
|
// Clear Buffer
|
|
3556
|
-
var _iterator = _createForOfIteratorHelper(_this.
|
|
3556
|
+
var _iterator = _createForOfIteratorHelper(_this.NAfO),
|
|
3557
3557
|
_step;
|
|
3558
3558
|
try {
|
|
3559
3559
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
3560
3560
|
var item = _step.value;
|
|
3561
|
-
_this.
|
|
3561
|
+
_this.Gpts(item.event, item.key, item.type);
|
|
3562
3562
|
}
|
|
3563
3563
|
} catch (err) {
|
|
3564
3564
|
_iterator.e(err);
|
|
3565
3565
|
} finally {
|
|
3566
3566
|
_iterator.f();
|
|
3567
3567
|
}
|
|
3568
|
-
_this.
|
|
3568
|
+
_this.MpRk = true;
|
|
3569
3569
|
});
|
|
3570
|
-
_defineProperty(this, "
|
|
3570
|
+
_defineProperty(this, "YwuD", function (event, callback) {
|
|
3571
3571
|
if (!isFunction(callback)) {
|
|
3572
3572
|
return;
|
|
3573
3573
|
}
|
|
3574
3574
|
var listeners;
|
|
3575
|
-
if (_this.
|
|
3576
|
-
listeners = _this.
|
|
3575
|
+
if (_this.qOpx[event]) {
|
|
3576
|
+
listeners = _this.qOpx[event];
|
|
3577
3577
|
} else {
|
|
3578
3578
|
listeners = [];
|
|
3579
3579
|
}
|
|
3580
3580
|
listeners.push(callback);
|
|
3581
|
-
_this.
|
|
3582
|
-
Logger$b.debug("Listeners list: ", _this.
|
|
3581
|
+
_this.qOpx[event] = listeners;
|
|
3582
|
+
Logger$b.debug("Listeners list: ", _this.qOpx);
|
|
3583
3583
|
});
|
|
3584
3584
|
_defineProperty(this, "unregisterFromEvent", function (event, callback) {
|
|
3585
|
-
if (_this.
|
|
3586
|
-
var listeners = _this.
|
|
3585
|
+
if (_this.qOpx[event]) {
|
|
3586
|
+
var listeners = _this.qOpx[event];
|
|
3587
3587
|
var updatedListeners = [];
|
|
3588
3588
|
for (var index = 0; index < listeners.length; index++) {
|
|
3589
3589
|
var listener = listeners[index];
|
|
@@ -3591,36 +3591,36 @@
|
|
|
3591
3591
|
updatedListeners.push(listener);
|
|
3592
3592
|
}
|
|
3593
3593
|
}
|
|
3594
|
-
_this.
|
|
3594
|
+
_this.qOpx[event] = updatedListeners;
|
|
3595
3595
|
}
|
|
3596
3596
|
});
|
|
3597
|
-
_defineProperty(this, "
|
|
3597
|
+
_defineProperty(this, "opho", function (event) {
|
|
3598
3598
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "AE";
|
|
3599
|
-
_this.
|
|
3599
|
+
_this.Gpts(event, "any_event", type);
|
|
3600
3600
|
if ((event === null || event === void 0 ? void 0 : event.loggedBy) === "apxor") {
|
|
3601
|
-
_this.
|
|
3601
|
+
_this.Gpts(event, "apxor_event", type);
|
|
3602
3602
|
} else if ((event === null || event === void 0 ? void 0 : event.loggedBy) === "customer") {
|
|
3603
|
-
_this.
|
|
3603
|
+
_this.Gpts(event, "customer_event", type);
|
|
3604
3604
|
}
|
|
3605
3605
|
if ((event === null || event === void 0 ? void 0 : event.apx_nudge_type) === "campaign") {
|
|
3606
|
-
_this.
|
|
3606
|
+
_this.Gpts(event, "campaign_event", type);
|
|
3607
3607
|
} else if ((event === null || event === void 0 ? void 0 : event.apx_nudge_type) === "survey") {
|
|
3608
|
-
_this.
|
|
3608
|
+
_this.Gpts(event, "survey_event", type);
|
|
3609
3609
|
}
|
|
3610
3610
|
var key = type + "___" + event.name;
|
|
3611
|
-
_this.
|
|
3611
|
+
_this.Gpts(event, key, type);
|
|
3612
3612
|
});
|
|
3613
|
-
_defineProperty(this, "
|
|
3614
|
-
if (!_this.
|
|
3615
|
-
_this.
|
|
3613
|
+
_defineProperty(this, "Gpts", function (event, key, type) {
|
|
3614
|
+
if (!_this.MpRk) {
|
|
3615
|
+
_this.NAfO.push({
|
|
3616
3616
|
event: event,
|
|
3617
3617
|
key: key,
|
|
3618
3618
|
type: type
|
|
3619
3619
|
});
|
|
3620
3620
|
} else {
|
|
3621
|
-
Logger$b.debug("Notifying listeners for event: " + event + ", " + key, _this.
|
|
3622
|
-
if (_this.
|
|
3623
|
-
var listeners = _this.
|
|
3621
|
+
Logger$b.debug("Notifying listeners for event: " + event + ", " + key, _this.qOpx);
|
|
3622
|
+
if (_this.qOpx[key]) {
|
|
3623
|
+
var listeners = _this.qOpx[key];
|
|
3624
3624
|
var time = Apxor.getController().getSDKRunningTimeInSec();
|
|
3625
3625
|
for (var index = 0; index < listeners.length; index++) {
|
|
3626
3626
|
var listener = listeners[index];
|
|
@@ -3636,17 +3636,17 @@
|
|
|
3636
3636
|
function CE() {
|
|
3637
3637
|
var _this = this;
|
|
3638
3638
|
_classCallCheck(this, CE);
|
|
3639
|
-
_defineProperty(this, "
|
|
3640
|
-
_defineProperty(this, "
|
|
3641
|
-
_defineProperty(this, "
|
|
3642
|
-
_defineProperty(this, "
|
|
3643
|
-
_defineProperty(this, "
|
|
3639
|
+
_defineProperty(this, "FDnn", false);
|
|
3640
|
+
_defineProperty(this, "CJvL", null);
|
|
3641
|
+
_defineProperty(this, "wOne", getDateInDDMMYYYY());
|
|
3642
|
+
_defineProperty(this, "ccUz", new EventsListener());
|
|
3643
|
+
_defineProperty(this, "hTmp", Apxor.getSiteId());
|
|
3644
3644
|
_defineProperty(this, "_qeState", {});
|
|
3645
3645
|
_defineProperty(this, "getQeState", function () {
|
|
3646
3646
|
try {
|
|
3647
3647
|
var data = Apxor.getController().getFromStorage(QE_STATE);
|
|
3648
3648
|
if (data) {
|
|
3649
|
-
return JSON.parse(decode(_this.
|
|
3649
|
+
return JSON.parse(decode(_this.hTmp, data));
|
|
3650
3650
|
} else {
|
|
3651
3651
|
_this._qeState = {};
|
|
3652
3652
|
return _this.setQeState();
|
|
@@ -3675,10 +3675,10 @@
|
|
|
3675
3675
|
return _this._qeState;
|
|
3676
3676
|
});
|
|
3677
3677
|
_defineProperty(this, "initialize", function () {
|
|
3678
|
-
if (!_this.
|
|
3679
|
-
_this.
|
|
3680
|
-
_this.
|
|
3681
|
-
_this.
|
|
3678
|
+
if (!_this.FDnn) {
|
|
3679
|
+
_this.FDnn = true;
|
|
3680
|
+
_this.CJvL = new ConfigLookup();
|
|
3681
|
+
_this.ccUz.initialize();
|
|
3682
3682
|
_this._qeState = _this.getQeState();
|
|
3683
3683
|
Logger$c.info("QE Initialized..");
|
|
3684
3684
|
}
|
|
@@ -3689,12 +3689,12 @@
|
|
|
3689
3689
|
* @param config
|
|
3690
3690
|
*/
|
|
3691
3691
|
_defineProperty(this, "parse", function (config) {
|
|
3692
|
-
if (!_this.
|
|
3692
|
+
if (!_this.KfZt()) {
|
|
3693
3693
|
Logger$c.warn("Must call init first. Unable to proceed");
|
|
3694
3694
|
return;
|
|
3695
3695
|
}
|
|
3696
|
-
_this.
|
|
3697
|
-
_this.
|
|
3696
|
+
_this.CJvL.parse(config);
|
|
3697
|
+
_this.ccUz.izHC();
|
|
3698
3698
|
});
|
|
3699
3699
|
/**
|
|
3700
3700
|
* Validates all conditions for given config ID
|
|
@@ -3704,22 +3704,22 @@
|
|
|
3704
3704
|
*/
|
|
3705
3705
|
_defineProperty(this, "validate", function (id, index) {
|
|
3706
3706
|
var childIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
3707
|
-
if (!_this.
|
|
3707
|
+
if (!_this.KfZt()) {
|
|
3708
3708
|
return;
|
|
3709
3709
|
}
|
|
3710
|
-
_this.
|
|
3710
|
+
_this.CJvL.validate(id, index, childIndex);
|
|
3711
3711
|
});
|
|
3712
3712
|
_defineProperty(this, "getVariantCode", function (id) {
|
|
3713
|
-
return _this.
|
|
3713
|
+
return _this.CJvL.getVariantCode(id);
|
|
3714
3714
|
});
|
|
3715
3715
|
_defineProperty(this, "validateForTermination", function (id, index) {
|
|
3716
|
-
if (!_this.
|
|
3716
|
+
if (!_this.KfZt()) {
|
|
3717
3717
|
return;
|
|
3718
3718
|
}
|
|
3719
|
-
_this.
|
|
3719
|
+
_this.CJvL.validateForTermination(id, index);
|
|
3720
3720
|
});
|
|
3721
3721
|
_defineProperty(this, "validateForTerminationAttributes", function (user, session) {
|
|
3722
|
-
return _this.
|
|
3722
|
+
return _this.CJvL.validateForTerminationAttributes(user, session);
|
|
3723
3723
|
});
|
|
3724
3724
|
_defineProperty(this, "updateCount", function (id) {
|
|
3725
3725
|
try {
|
|
@@ -3728,25 +3728,25 @@
|
|
|
3728
3728
|
}
|
|
3729
3729
|
_this.incrementFrequencies(id);
|
|
3730
3730
|
_this.setQeState(id);
|
|
3731
|
-
_this.
|
|
3731
|
+
_this.CJvL.JTks(id);
|
|
3732
3732
|
} catch (e) {
|
|
3733
3733
|
console.log("Could not update the count config:".concat(e));
|
|
3734
3734
|
}
|
|
3735
3735
|
});
|
|
3736
3736
|
_defineProperty(this, "resetFrequencyCounts", function () {
|
|
3737
|
-
_this.
|
|
3737
|
+
_this.CJvL.resetFrequencyCounts();
|
|
3738
3738
|
});
|
|
3739
3739
|
_defineProperty(this, "getFrequencyCount", function (id) {
|
|
3740
|
-
return _this.
|
|
3740
|
+
return _this.CJvL.getFrequencyCount(id);
|
|
3741
3741
|
});
|
|
3742
3742
|
_defineProperty(this, "registerForEvent", function (event, callback) {
|
|
3743
|
-
_this.
|
|
3743
|
+
_this.ccUz.YwuD(event, callback);
|
|
3744
3744
|
});
|
|
3745
3745
|
_defineProperty(this, "unregisterFromEvent", function (event, callback) {
|
|
3746
|
-
_this.
|
|
3746
|
+
_this.ccUz.unregisterFromEvent(event, callback);
|
|
3747
3747
|
});
|
|
3748
3748
|
_defineProperty(this, "notifyEventListener", function (event) {
|
|
3749
|
-
_this.
|
|
3749
|
+
_this.ccUz.opho(event);
|
|
3750
3750
|
});
|
|
3751
3751
|
/**
|
|
3752
3752
|
* Fetches the config from Server
|
|
@@ -3759,14 +3759,14 @@
|
|
|
3759
3759
|
_defineProperty(this, "fetch", function (type, validateUrl, apiUrl, callback) {
|
|
3760
3760
|
Apxor.getController().fetchConfiguration(type, validateUrl, apiUrl, callback);
|
|
3761
3761
|
});
|
|
3762
|
-
_defineProperty(this, "
|
|
3763
|
-
return _this.
|
|
3762
|
+
_defineProperty(this, "KfZt", function () {
|
|
3763
|
+
return _this.FDnn;
|
|
3764
3764
|
});
|
|
3765
3765
|
_defineProperty(this, "getCampaignMetaFromQueryEngine", function (campaignId) {
|
|
3766
|
-
return _this.
|
|
3766
|
+
return _this.CJvL.Cutc(campaignId);
|
|
3767
3767
|
});
|
|
3768
|
-
_defineProperty(this, "
|
|
3769
|
-
return _this.
|
|
3768
|
+
_defineProperty(this, "EcAB", function () {
|
|
3769
|
+
return _this.wOne;
|
|
3770
3770
|
});
|
|
3771
3771
|
if (!CE.instance) {
|
|
3772
3772
|
CE.instance = this;
|
|
@@ -3790,7 +3790,7 @@
|
|
|
3790
3790
|
OVERALL: 0,
|
|
3791
3791
|
DATES: {}
|
|
3792
3792
|
};
|
|
3793
|
-
if (this.
|
|
3793
|
+
if (this.wOne) this._qeState[id].DATES[this.wOne] = 0;
|
|
3794
3794
|
this.setQeState(id);
|
|
3795
3795
|
}
|
|
3796
3796
|
} catch (e) {
|
|
@@ -3809,12 +3809,12 @@
|
|
|
3809
3809
|
|
|
3810
3810
|
// Increment the DATES count for this particular date by 1. If the date changes reset.
|
|
3811
3811
|
var currentDate = getDateInDDMMYYYY();
|
|
3812
|
-
if (currentDate !== this.
|
|
3813
|
-
this.
|
|
3812
|
+
if (currentDate !== this.wOne || !(configFrequency.DATES && configFrequency.DATES[currentDate])) {
|
|
3813
|
+
this.wOne = currentDate;
|
|
3814
3814
|
configFrequency.DATES = {};
|
|
3815
|
-
configFrequency.DATES[this.
|
|
3815
|
+
configFrequency.DATES[this.wOne] = 0;
|
|
3816
3816
|
}
|
|
3817
|
-
configFrequency.DATES[this.
|
|
3817
|
+
configFrequency.DATES[this.wOne] = configFrequency.DATES[this.wOne] + 1;
|
|
3818
3818
|
}
|
|
3819
3819
|
}], [{
|
|
3820
3820
|
key: "getInstance",
|
|
@@ -3833,7 +3833,7 @@
|
|
|
3833
3833
|
|
|
3834
3834
|
/* eslint-disable no-empty */
|
|
3835
3835
|
|
|
3836
|
-
window.ceVersion =
|
|
3836
|
+
window.ceVersion = 203;
|
|
3837
3837
|
try {
|
|
3838
3838
|
if (exports !== undefined || exports !== null) {
|
|
3839
3839
|
exports["default"] = CE;
|