apxor-qe 2.0.4 → 2.0.5
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 +1058 -1026
- package/dist/apxor.qe.min.js +1 -1
- package/package.json +1 -1
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 vRev = function vRev(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 nYTe$split$map = startTime.split(":").map(Number),
|
|
422
|
+
nYTe$split$map2 = _slicedToArray(nYTe$split$map, 2),
|
|
423
|
+
startHour = nYTe$split$map2[0],
|
|
424
|
+
startMinute = nYTe$split$map2[1];
|
|
425
|
+
var iDwb$split$map = endTime.split(":").map(Number),
|
|
426
|
+
iDwb$split$map2 = _slicedToArray(iDwb$split$map, 2),
|
|
427
|
+
endHour = iDwb$split$map2[0],
|
|
428
|
+
endMinute = iDwb$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.ReXr(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, "DFrC", "ALL");
|
|
724
|
+
_defineProperty(this, "jkhw", []);
|
|
725
|
+
_defineProperty(this, "xsNZ", []);
|
|
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.DFrC = config.audience.audience_type;
|
|
732
|
+
_this.jkhw = config.audience.attributes.user;
|
|
733
|
+
_this.xsNZ = config.audience.attributes.session;
|
|
734
|
+
if (!Array.isArray(_this.jkhw) || !Array.isArray(_this.xsNZ)) {
|
|
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.DFrC === "FTU") {
|
|
747
747
|
status = Apxor.getController().getSessionInfo().is_first_session;
|
|
748
748
|
}
|
|
749
|
-
var userAttributesCompare = _this.
|
|
750
|
-
var sessionAttributesCompare = _this.
|
|
749
|
+
var userAttributesCompare = _this.ViXp(user, _this.jkhw);
|
|
750
|
+
var sessionAttributesCompare = _this.ViXp(session, _this.xsNZ);
|
|
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, "ViXp", 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 vRev(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, "UGic", "");
|
|
829
|
+
_defineProperty(this, "cIhR", {});
|
|
830
|
+
_defineProperty(this, "heYC", "");
|
|
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.UGic = details.name;
|
|
835
|
+
_this.cIhR = details.additional_info;
|
|
836
|
+
_this.heYC = 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, "YSug", 0);
|
|
848
|
+
_defineProperty(this, "HlwB", 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.YSug = Number(timeBounds.lower);
|
|
853
|
+
_this.HlwB = Number(timeBounds.upper);
|
|
854
|
+
if (isNaN(_this.YSug) || isNaN(_this.HlwB)) {
|
|
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, "QQId", 0);
|
|
868
|
+
_defineProperty(this, "vDdr", "");
|
|
869
|
+
_defineProperty(this, "hMhi", "");
|
|
870
|
+
_defineProperty(this, "uXsD", new Details());
|
|
871
|
+
_defineProperty(this, "GHht", 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.vDdr = precondition.event_type;
|
|
876
|
+
_this.hMhi = precondition.activity;
|
|
877
|
+
return _this.uXsD.parse(precondition.details) && _this.GHht.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, "QQId", 0);
|
|
889
|
+
_defineProperty(this, "HUHi", -1);
|
|
890
|
+
_defineProperty(this, "oBTS", 0);
|
|
891
|
+
_defineProperty(this, "SGjX", "");
|
|
892
|
+
_defineProperty(this, "hMhi", "");
|
|
893
|
+
_defineProperty(this, "vDdr", "");
|
|
894
|
+
_defineProperty(this, "GHht", new Timebounds());
|
|
895
|
+
_defineProperty(this, "uXsD", new Details());
|
|
896
|
+
_defineProperty(this, "xVLs", new PreCondition());
|
|
897
|
+
_defineProperty(this, "yztc", "AND");
|
|
898
|
+
_defineProperty(this, "BigG", false);
|
|
899
|
+
_defineProperty(this, "DFrC", void 0);
|
|
900
|
+
_defineProperty(this, "QXzb", "");
|
|
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 fHuv$count_conf, fHuv$count_conf2;
|
|
905
|
+
_this.HUHi = 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.oBTS = condition === null || condition === void 0 || (fHuv$count_conf = condition.count_config) === null || fHuv$count_conf === void 0 ? void 0 : fHuv$count_conf.count;
|
|
910
|
+
_this.SGjX = condition === null || condition === void 0 || (fHuv$count_conf2 = condition.count_config) === null || fHuv$count_conf2 === void 0 ? void 0 : fHuv$count_conf2.operator;
|
|
911
|
+
_this.hMhi = condition === null || condition === void 0 ? void 0 : condition.activity;
|
|
912
|
+
_this.vDdr = condition === null || condition === void 0 ? void 0 : condition.event_type;
|
|
913
|
+
_this.yztc = 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.DFrC = condition === null || condition === void 0 ? void 0 : condition.type;
|
|
917
|
+
_this.QXzb = condition === null || condition === void 0 ? void 0 : condition.route;
|
|
918
|
+
return _this.uXsD.parse(condition === null || condition === void 0 ? void 0 : condition.details) && _this.xVLs.parse(condition.trigger) && _this.GHht.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, "oBTS", 0);
|
|
931
|
+
_defineProperty(this, "SGjX", "");
|
|
932
|
+
_defineProperty(this, "vDdr", "");
|
|
933
|
+
_defineProperty(this, "GHht", new Timebounds());
|
|
934
|
+
_defineProperty(this, "uXsD", new Details());
|
|
935
|
+
_defineProperty(this, "yztc", "AND");
|
|
936
936
|
_defineProperty(this, "parse", function (data) {
|
|
937
937
|
try {
|
|
938
|
-
_this.
|
|
939
|
-
_this.
|
|
940
|
-
_this.
|
|
941
|
-
_this.
|
|
942
|
-
return _this.
|
|
938
|
+
_this.oBTS = data.count_config.count;
|
|
939
|
+
_this.SGjX = data.count_config.operator;
|
|
940
|
+
_this.vDdr = data.event_type;
|
|
941
|
+
_this.yztc = data.combine_operator;
|
|
942
|
+
return _this.uXsD.parse(data.details) && _this.GHht.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, "XmsR", 0);
|
|
957
|
+
_defineProperty(this, "ABDA", "");
|
|
958
|
+
_defineProperty(this, "fHuv", new Condition());
|
|
959
|
+
_defineProperty(this, "suqg", new GoalEvent());
|
|
960
|
+
_defineProperty(this, "zWyW", false);
|
|
961
|
+
_defineProperty(this, "yoCa", false);
|
|
962
|
+
_defineProperty(this, "SdOG", 0);
|
|
963
|
+
_defineProperty(this, "yztc", "AND");
|
|
964
|
+
_defineProperty(this, "eMRD", "OR");
|
|
965
|
+
_defineProperty(this, "mMVK", -1);
|
|
966
|
+
_defineProperty(this, "gMeI", []);
|
|
967
|
+
_defineProperty(this, "gwWN", {});
|
|
968
|
+
_defineProperty(this, "xyKD", false);
|
|
969
|
+
_defineProperty(this, "OwjD", void 0);
|
|
970
|
+
_defineProperty(this, "PgpX", void 0);
|
|
971
|
+
_defineProperty(this, "yevy", void 0);
|
|
972
|
+
_defineProperty(this, "vTHP", void 0);
|
|
973
973
|
_defineProperty(this, "no_KPI_TriggerDetails", []);
|
|
974
|
-
_defineProperty(this, "
|
|
974
|
+
_defineProperty(this, "VkyX", 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-jRNn 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.ABDA = id;
|
|
998
|
+
_this.SdOG = index;
|
|
999
|
+
_this.gMeI = noKpiArray;
|
|
1000
|
+
_this.OwjD = 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.fHuv.parse(condition);
|
|
1005
1005
|
if (result) {
|
|
1006
|
-
_this.
|
|
1006
|
+
_this.yztc = _this.fHuv.yztc;
|
|
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.fHuv.BigG) {
|
|
1010
|
+
var eventName = _this.fHuv.uXsD.UGic;
|
|
1011
1011
|
if (eventName === "APX_PAGE_OPENED") {
|
|
1012
|
-
eventName = _this.
|
|
1013
|
-
eventName = isDefined(eventName) ? eventName : _this.
|
|
1012
|
+
eventName = _this.fHuv.uXsD.cIhR["navigation_id"];
|
|
1013
|
+
eventName = isDefined(eventName) ? eventName : _this.fHuv.uXsD.UGic;
|
|
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.mMVK = Apxor.getController().getEventCount(eventName);
|
|
1016
|
+
var count = _this.fHuv.oBTS;
|
|
1017
|
+
var operator = _this.fHuv.SGjX;
|
|
1018
|
+
_this.yoCa = _this.dZrw(_this.mMVK - 1, count, operator, false);
|
|
1019
|
+
_this.zWyW = _this.yoCa;
|
|
1020
|
+
// If the condition is already satisfied and if it is page view, no need to jRNn
|
|
1021
1021
|
// This only applies for NAVIGATION_EVENTS
|
|
1022
|
-
if (_this.
|
|
1022
|
+
if (_this.yoCa && _this.fHuv.uXsD.UGic === "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.jRNn();
|
|
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.suqg.parse(condition);
|
|
1035
|
+
_this.eMRD = _this.suqg.yztc;
|
|
1036
|
+
_this.zgOY();
|
|
1037
1037
|
return true;
|
|
1038
1038
|
}
|
|
1039
1039
|
return false;
|
|
1040
1040
|
});
|
|
1041
|
-
_defineProperty(this, "
|
|
1041
|
+
_defineProperty(this, "jRNn", 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.PgpX = childConditionIndex;
|
|
1046
1046
|
}
|
|
1047
|
-
var condition = _this.
|
|
1047
|
+
var condition = _this.fHuv;
|
|
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.xVLs;
|
|
1050
1050
|
var ceInstance = CE.getInstance();
|
|
1051
|
-
if (precondition.
|
|
1052
|
-
_this.
|
|
1051
|
+
if (precondition.vDdr === "app_start") {
|
|
1052
|
+
_this.zWyW = 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.DFrC) == "didn't") {
|
|
1057
|
+
_this.xyKD = 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.xyKD) {
|
|
1060
|
+
_this.yoCa = true;
|
|
1061
|
+
if (_this.yoCa) {
|
|
1062
|
+
_this.XmsR += 1;
|
|
1063
|
+
_this.yoCa = _this.dZrw(_this.XmsR, _this.fHuv.oBTS, _this.fHuv.SGjX);
|
|
1064
|
+
if (_this.yoCa) {
|
|
1065
|
+
_this.fHuv.QQId = Date.now();
|
|
1066
|
+
_this.xyKD = false;
|
|
1067
|
+
ceInstance.validate(_this.ABDA, _this.SdOG, _this.PgpX);
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
1070
1070
|
if (event_category === "specific_event") {
|
|
1071
|
-
ceInstance.unregisterFromEvent(generateKey(_this.
|
|
1071
|
+
ceInstance.unregisterFromEvent(generateKey(_this.fHuv.vDdr) + "___" + _this.fHuv.uXsD.UGic, _this.yLyk);
|
|
1072
1072
|
} else {
|
|
1073
|
-
_this.
|
|
1073
|
+
_this.qKoB(event_category);
|
|
1074
1074
|
}
|
|
1075
|
-
_this.
|
|
1075
|
+
_this.zWyW = 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.rbcW(condition.DFrC, condition.uXsD.UGic, Date.now(), condition.uXsD.cIhR, _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.fHuv.vDdr) + "___" + _this.fHuv.uXsD.UGic, _this.yLyk);
|
|
1086
|
+
_this.vTHP = _this.fHuv;
|
|
1087
1087
|
} else {
|
|
1088
|
-
_this.
|
|
1088
|
+
_this.xrGZ(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.DFrC) == "did") {
|
|
1091
1091
|
_this.timerDid = setTimeout(function () {
|
|
1092
|
-
if (!_this.
|
|
1092
|
+
if (!_this.VkyX) {
|
|
1093
1093
|
if (event_category === "specific_event") {
|
|
1094
|
-
ceInstance.unregisterFromEvent(generateKey(_this.
|
|
1094
|
+
ceInstance.unregisterFromEvent(generateKey(_this.fHuv.vDdr) + "___" + _this.fHuv.uXsD.UGic, _this.erQr);
|
|
1095
1095
|
} else {
|
|
1096
|
-
_this.
|
|
1096
|
+
_this.wjhx(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.rbcW(condition.DFrC, condition.uXsD.UGic, Date.now(), condition.uXsD.cIhR, _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.fHuv.vDdr) + "___" + _this.fHuv.uXsD.UGic, _this.erQr);
|
|
1108
|
+
_this.yevy = _this.fHuv;
|
|
1109
1109
|
} else {
|
|
1110
|
-
_this.
|
|
1110
|
+
_this.hcXm(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.vDdr) + "___" + condition.uXsD.UGic, _this.dkXM);
|
|
1117
1117
|
} else {
|
|
1118
|
-
_this.
|
|
1118
|
+
_this.rGmm(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.DFrC) == "didn't") {
|
|
1126
|
+
_this.xyKD = 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.xyKD) {
|
|
1129
|
+
_this.yoCa = true;
|
|
1130
|
+
if (_this.yoCa) {
|
|
1131
|
+
_this.XmsR += 1;
|
|
1132
|
+
_this.yoCa = _this.dZrw(_this.XmsR, _this.fHuv.oBTS, _this.fHuv.SGjX);
|
|
1133
|
+
if (_this.yoCa) {
|
|
1134
|
+
_this.fHuv.QQId = Date.now();
|
|
1135
|
+
_this.xyKD = false;
|
|
1136
|
+
ceInstance.validate(_this.ABDA, _this.SdOG);
|
|
1137
1137
|
}
|
|
1138
1138
|
}
|
|
1139
1139
|
}
|
|
1140
1140
|
if (event_category === "specific_event") {
|
|
1141
|
-
ceInstance.unregisterFromEvent(generateKey(_this.
|
|
1141
|
+
ceInstance.unregisterFromEvent(generateKey(_this.fHuv.vDdr) + "___" + _this.fHuv.uXsD.UGic, _this.yLyk);
|
|
1142
1142
|
}
|
|
1143
|
-
_this.
|
|
1143
|
+
_this.zWyW = false;
|
|
1144
1144
|
}, _timeInMillisec3);
|
|
1145
1145
|
if (event_category === "specific_event") {
|
|
1146
|
-
ceInstance.registerForEvent(generateKey(_this.
|
|
1147
|
-
_this.
|
|
1146
|
+
ceInstance.registerForEvent(generateKey(_this.fHuv.vDdr) + "___" + _this.fHuv.uXsD.UGic, _this.yLyk);
|
|
1147
|
+
_this.vTHP = _this.fHuv;
|
|
1148
1148
|
} else {
|
|
1149
|
-
_this.
|
|
1149
|
+
_this.xrGZ();
|
|
1150
1150
|
}
|
|
1151
|
-
} else if ((condition === null || condition === void 0 ? void 0 : condition.
|
|
1151
|
+
} else if ((condition === null || condition === void 0 ? void 0 : condition.DFrC) == "did") {
|
|
1152
1152
|
_this.timerDid = setTimeout(function () {
|
|
1153
|
-
if (!_this.
|
|
1153
|
+
if (!_this.VkyX) {
|
|
1154
1154
|
if (event_category === "specific_event") {
|
|
1155
|
-
ceInstance.unregisterFromEvent(generateKey(_this.
|
|
1155
|
+
ceInstance.unregisterFromEvent(generateKey(_this.fHuv.vDdr) + "___" + _this.fHuv.uXsD.UGic, _this.erQr);
|
|
1156
1156
|
}
|
|
1157
1157
|
}
|
|
1158
1158
|
}, _timeInMillisec3);
|
|
1159
1159
|
if (event_category === "specific_event") {
|
|
1160
|
-
ceInstance.registerForEvent(generateKey(_this.
|
|
1160
|
+
ceInstance.registerForEvent(generateKey(_this.fHuv.vDdr) + "___" + _this.fHuv.uXsD.UGic, _this.erQr);
|
|
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.vDdr) + "___" + precondition.uXsD.UGic, _this.dkXM);
|
|
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.ABDA)) {
|
|
1171
|
+
ceInstance.registerForEvent(generateKey(condition.vDdr) + "___" + "apxor-badge-container-".concat("-".concat(_this.ABDA).replaceAll(" ", "").replace(/[^\w\s]/gi, "")), _this.dkXM);
|
|
1172
1172
|
}
|
|
1173
1173
|
});
|
|
1174
|
-
_defineProperty(this, "
|
|
1174
|
+
_defineProperty(this, "rGmm", 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.dkXM(generateKey(_this.fHuv.vDdr), _this.fHuv.uXsD.UGic, time, _this.fHuv.uXsD.cIhR);
|
|
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.dkXM(generateKey(_this.fHuv.vDdr), _this.fHuv.uXsD.UGic, time, _this.fHuv.uXsD.cIhR);
|
|
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.dkXM(generateKey(_this.fHuv.vDdr), _this.fHuv.uXsD.UGic, time, _this.fHuv.uXsD.cIhR);
|
|
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.dkXM(generateKey(_this.fHuv.vDdr), _this.fHuv.uXsD.UGic, time, _this.fHuv.uXsD.cIhR);
|
|
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.dkXM(generateKey(_this.fHuv.vDdr), _this.fHuv.uXsD.UGic, time, _this.fHuv.uXsD.cIhR);
|
|
1195
1195
|
});
|
|
1196
1196
|
}
|
|
1197
1197
|
});
|
|
1198
|
-
_defineProperty(this, "
|
|
1198
|
+
_defineProperty(this, "qKoB", function (event_category) {
|
|
1199
1199
|
var ceInstance = new CE();
|
|
1200
|
-
var eventCategory = _this.
|
|
1200
|
+
var eventCategory = _this.fHuv._eventCategory;
|
|
1201
1201
|
if (eventCategory === "apxor_event") {
|
|
1202
|
-
ceInstance.unregisterFromEvent("apxor_event", _this.
|
|
1202
|
+
ceInstance.unregisterFromEvent("apxor_event", _this.yLyk);
|
|
1203
1203
|
} else if (eventCategory === "customer_event") {
|
|
1204
|
-
ceInstance.unregisterFromEvent("customer_event", _this.
|
|
1204
|
+
ceInstance.unregisterFromEvent("customer_event", _this.yLyk);
|
|
1205
1205
|
} else if (eventCategory === "any_event") {
|
|
1206
|
-
ceInstance.unregisterFromEvent("any_event", _this.
|
|
1206
|
+
ceInstance.unregisterFromEvent("any_event", _this.yLyk);
|
|
1207
1207
|
} else if (eventCategory === "campaign_event") {
|
|
1208
|
-
ceInstance.unregisterFromEvent("campaign_event", _this.
|
|
1208
|
+
ceInstance.unregisterFromEvent("campaign_event", _this.yLyk);
|
|
1209
1209
|
} else if (eventCategory === "survey_event") {
|
|
1210
|
-
ceInstance.unregisterFromEvent("survey_event", _this.
|
|
1210
|
+
ceInstance.unregisterFromEvent("survey_event", _this.yLyk);
|
|
1211
1211
|
}
|
|
1212
1212
|
});
|
|
1213
|
-
_defineProperty(this, "
|
|
1213
|
+
_defineProperty(this, "xrGZ", function () {
|
|
1214
1214
|
var ceInstance = new CE();
|
|
1215
|
-
var eventCategory = _this.
|
|
1215
|
+
var eventCategory = _this.fHuv._eventCategory;
|
|
1216
1216
|
if (eventCategory === "apxor_event") {
|
|
1217
|
-
ceInstance.registerForEvent("apxor_event", _this.
|
|
1217
|
+
ceInstance.registerForEvent("apxor_event", _this.yLyk);
|
|
1218
1218
|
} else if (eventCategory === "customer_event") {
|
|
1219
|
-
ceInstance.registerForEvent("customer_event", _this.
|
|
1219
|
+
ceInstance.registerForEvent("customer_event", _this.yLyk);
|
|
1220
1220
|
} else if (eventCategory === "any_event") {
|
|
1221
|
-
ceInstance.registerForEvent("any_event", _this.
|
|
1221
|
+
ceInstance.registerForEvent("any_event", _this.yLyk);
|
|
1222
1222
|
} else if (eventCategory === "campaign_event") {
|
|
1223
|
-
ceInstance.registerForEvent("campaign_event", _this.
|
|
1223
|
+
ceInstance.registerForEvent("campaign_event", _this.yLyk);
|
|
1224
1224
|
} else if (eventCategory === "survey_event") {
|
|
1225
|
-
ceInstance.registerForEvent("survey_event", _this.
|
|
1225
|
+
ceInstance.registerForEvent("survey_event", _this.yLyk);
|
|
1226
1226
|
}
|
|
1227
1227
|
});
|
|
1228
|
-
_defineProperty(this, "
|
|
1228
|
+
_defineProperty(this, "hcXm", function () {
|
|
1229
1229
|
var ceInstance = new CE();
|
|
1230
|
-
var eventCategory = _this.
|
|
1230
|
+
var eventCategory = _this.fHuv._eventCategory;
|
|
1231
1231
|
if (eventCategory === "apxor_event") {
|
|
1232
|
-
ceInstance.registerForEvent("apxor_event", _this.
|
|
1232
|
+
ceInstance.registerForEvent("apxor_event", _this.erQr);
|
|
1233
1233
|
} else if (eventCategory === "customer_event") {
|
|
1234
|
-
ceInstance.registerForEvent("customer_event", _this.
|
|
1234
|
+
ceInstance.registerForEvent("customer_event", _this.erQr);
|
|
1235
1235
|
} else if (eventCategory === "any_event") {
|
|
1236
|
-
ceInstance.registerForEvent("any_event", _this.
|
|
1236
|
+
ceInstance.registerForEvent("any_event", _this.erQr);
|
|
1237
1237
|
} else if (eventCategory === "campaign_event") {
|
|
1238
|
-
ceInstance.registerForEvent("campaign_event", _this.
|
|
1238
|
+
ceInstance.registerForEvent("campaign_event", _this.erQr);
|
|
1239
1239
|
} else if (eventCategory === "survey_event") {
|
|
1240
|
-
ceInstance.registerForEvent("survey_event", _this.
|
|
1240
|
+
ceInstance.registerForEvent("survey_event", _this.erQr);
|
|
1241
1241
|
}
|
|
1242
1242
|
});
|
|
1243
|
-
_defineProperty(this, "
|
|
1243
|
+
_defineProperty(this, "wjhx", function () {
|
|
1244
1244
|
var ceInstance = new CE();
|
|
1245
|
-
var eventCategory = _this.
|
|
1245
|
+
var eventCategory = _this.fHuv._eventCategory;
|
|
1246
1246
|
if (eventCategory === "apxor_event") {
|
|
1247
|
-
ceInstance.unregisterFromEvent("apxor_event", _this.
|
|
1247
|
+
ceInstance.unregisterFromEvent("apxor_event", _this.erQr);
|
|
1248
1248
|
} else if (eventCategory === "customer_event") {
|
|
1249
|
-
ceInstance.unregisterFromEvent("customer_event", _this.
|
|
1249
|
+
ceInstance.unregisterFromEvent("customer_event", _this.erQr);
|
|
1250
1250
|
} else if (eventCategory === "any_event") {
|
|
1251
|
-
ceInstance.unregisterFromEvent("any_event", _this.
|
|
1251
|
+
ceInstance.unregisterFromEvent("any_event", _this.erQr);
|
|
1252
1252
|
} else if (eventCategory === "campaign_event") {
|
|
1253
|
-
ceInstance.unregisterFromEvent("campaign_event", _this.
|
|
1253
|
+
ceInstance.unregisterFromEvent("campaign_event", _this.erQr);
|
|
1254
1254
|
} else if (eventCategory === "survey_event") {
|
|
1255
|
-
ceInstance.unregisterFromEvent("survey_event", _this.
|
|
1255
|
+
ceInstance.unregisterFromEvent("survey_event", _this.erQr);
|
|
1256
1256
|
}
|
|
1257
1257
|
});
|
|
1258
|
-
_defineProperty(this, "
|
|
1259
|
-
var condition = _this.
|
|
1258
|
+
_defineProperty(this, "zgOY", function () {
|
|
1259
|
+
var condition = _this.suqg;
|
|
1260
1260
|
var ceInstance = CE.getInstance();
|
|
1261
|
-
_this.
|
|
1262
|
-
ceInstance.registerForEvent(generateKey(condition.
|
|
1261
|
+
_this.zWyW = true;
|
|
1262
|
+
ceInstance.registerForEvent(generateKey(condition.vDdr) + "___" + condition.uXsD.UGic, _this.ISVV);
|
|
1263
1263
|
});
|
|
1264
|
-
_defineProperty(this, "
|
|
1265
|
-
var _this$
|
|
1264
|
+
_defineProperty(this, "AwuV", function (type, name, time, additionalInfo) {
|
|
1265
|
+
var _this$fHuv;
|
|
1266
1266
|
var eventTime = Date.now();
|
|
1267
|
-
var time_differnce = (eventTime - _this.
|
|
1268
|
-
var time_fromConfig = ((_this$
|
|
1267
|
+
var time_differnce = (eventTime - _this.gwWN[name]) / 1000;
|
|
1268
|
+
var time_fromConfig = ((_this$fHuv = _this.fHuv) === null || _this$fHuv === void 0 || (_this$fHuv = _this$fHuv.uXsD) === null || _this$fHuv === void 0 || (_this$fHuv = _this$fHuv.cIhR) === null || _this$fHuv === void 0 ? void 0 : _this$fHuv.time) / 1000;
|
|
1269
1269
|
if (time_fromConfig > time_differnce) {
|
|
1270
1270
|
_this._displayCampaign(time);
|
|
1271
1271
|
}
|
|
1272
1272
|
});
|
|
1273
|
-
_defineProperty(this, "
|
|
1273
|
+
_defineProperty(this, "SLEo", function (type, name, time, additionalInfo) {
|
|
1274
1274
|
var _this$_condition2, _this$_condition3;
|
|
1275
|
-
_this.
|
|
1275
|
+
_this.xyKD = true;
|
|
1276
1276
|
var currentTime = Date.now();
|
|
1277
|
-
var eventName = (_this$_condition2 = _this.
|
|
1278
|
-
var eventTime = _this.
|
|
1277
|
+
var eventName = (_this$_condition2 = _this.fHuv) === null || _this$_condition2 === void 0 || (_this$_condition2 = _this$_condition2.xVLs) === null || _this$_condition2 === void 0 ? void 0 : _this$_condition2.uXsD.UGic;
|
|
1278
|
+
var eventTime = _this.gwWN[eventName];
|
|
1279
1279
|
var time_differnce = (currentTime - eventTime) / 1000;
|
|
1280
|
-
var time_fromConfig = (_this$_condition3 = _this.
|
|
1280
|
+
var time_fromConfig = (_this$_condition3 = _this.fHuv) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.uXsD) === null || _this$_condition3 === void 0 || (_this$_condition3 = _this$_condition3.cIhR) === 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, "erQr", function () {
|
|
1288
|
+
_this.VkyX = 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.XmsR += 1;
|
|
1292
|
+
_this.yoCa = _this.dZrw(_this.XmsR, _this.fHuv.oBTS, _this.fHuv.SGjX);
|
|
1293
|
+
if (_this.yoCa) {
|
|
1294
|
+
ceInstance.unregisterFromEvent(generateKey(_this.yevy.vDdr) + "___" + _this.yevy.uXsD.UGic, _this.erQr);
|
|
1295
|
+
_this.VkyX = false;
|
|
1296
|
+
ceInstance.validate(_this.ABDA, _this.SdOG, _this.PgpX);
|
|
1297
1297
|
}
|
|
1298
1298
|
});
|
|
1299
|
-
_defineProperty(this, "
|
|
1300
|
-
_this.
|
|
1299
|
+
_defineProperty(this, "yLyk", function (type, name, time, additionalInfo) {
|
|
1300
|
+
_this.xyKD = true;
|
|
1301
1301
|
clearTimeout(_this.timerDidnt);
|
|
1302
1302
|
var ceInstance = new CE();
|
|
1303
|
-
ceInstance.unregisterFromEvent(generateKey(_this.
|
|
1303
|
+
ceInstance.unregisterFromEvent(generateKey(_this.vTHP.vDdr) + "___" + _this.vTHP.uXsD.UGic, _this.yLyk);
|
|
1304
1304
|
//return;
|
|
1305
1305
|
});
|
|
1306
|
-
_defineProperty(this, "
|
|
1306
|
+
_defineProperty(this, "dkXM", function (type, name, time, additionalInfo) {
|
|
1307
1307
|
var _window$ApxorRTM2, _window$ApxorRTM3;
|
|
1308
1308
|
var ceInstance = CE.getInstance();
|
|
1309
|
-
if (!_this.
|
|
1309
|
+
if (!_this.zWyW) {
|
|
1310
1310
|
// Validate Precondition
|
|
1311
|
-
_this.
|
|
1312
|
-
if (_this.
|
|
1313
|
-
var condition = _this.
|
|
1314
|
-
var precondition = condition.
|
|
1315
|
-
precondition.
|
|
1311
|
+
_this.zWyW = _this.KRGs(type, name, time, additionalInfo);
|
|
1312
|
+
if (_this.zWyW) {
|
|
1313
|
+
var condition = _this.fHuv;
|
|
1314
|
+
var precondition = condition.xVLs;
|
|
1315
|
+
precondition.QQId = 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.vDdr) === "activity_time") {
|
|
1318
|
+
var fHuv$uXsD, fHuv$QXzb, fHuv$_details2, fHuv$_details3;
|
|
1319
|
+
var event_time = condition === null || condition === void 0 || (fHuv$uXsD = condition.uXsD) === null || fHuv$uXsD === void 0 || (fHuv$uXsD = fHuv$uXsD.cIhR) === null || fHuv$uXsD === void 0 ? void 0 : fHuv$uXsD.time;
|
|
1320
|
+
if ((condition === null || condition === void 0 || (fHuv$QXzb = condition.QXzb) === null || fHuv$QXzb === void 0 ? void 0 : fHuv$QXzb.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.QXzb === 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 || (fHuv$_details2 = condition.uXsD) === null || fHuv$_details2 === void 0 || (fHuv$_details2 = fHuv$_details2.cIhR) === null || fHuv$_details2 === void 0 ? void 0 : fHuv$_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.xyKD) {
|
|
1329
|
+
_this.yoCa = true;
|
|
1330
|
+
if (_this.yoCa) {
|
|
1331
|
+
_this.XmsR += 1;
|
|
1332
|
+
_this.yoCa = _this.dZrw(_this.XmsR, _this.fHuv.oBTS, _this.fHuv.SGjX);
|
|
1333
|
+
if (_this.yoCa) {
|
|
1334
|
+
_this.fHuv.QQId = time;
|
|
1335
|
+
_this.xyKD = false;
|
|
1336
|
+
ceInstance.validate(_this.ABDA, _this.SdOG);
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
|
-
condition.
|
|
1341
|
-
ceInstance.unregisterFromEvent(toUpperCase(condition.
|
|
1342
|
-
_this.
|
|
1340
|
+
condition.uXsD.cIhR.nkpi.map(function (nokpi) {
|
|
1341
|
+
ceInstance.unregisterFromEvent(toUpperCase(condition.uXsD.cIhR.et) + "___" + nokpi, _this);
|
|
1342
|
+
_this.zWyW = false;
|
|
1343
1343
|
});
|
|
1344
1344
|
}, event_time);
|
|
1345
|
-
condition.
|
|
1346
|
-
ceInstance.registerForEvent(toUpperCase(condition.
|
|
1345
|
+
condition.uXsD.cIhR.nkpi.map(function (nokpi) {
|
|
1346
|
+
ceInstance.registerForEvent(toUpperCase(condition.uXsD.cIhR.et) + "___" + nokpi, _this.yLyk);
|
|
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 || (fHuv$_details3 = condition.uXsD) === null || fHuv$_details3 === void 0 || (fHuv$_details3 = fHuv$_details3.cIhR) === null || fHuv$_details3 === void 0 ? void 0 : fHuv$_details3.kpi.length) > 0) {
|
|
1351
1351
|
setTimeout(function () {
|
|
1352
|
-
condition.
|
|
1353
|
-
ceInstance.unregisterFromEvent(toUpperCase(condition.
|
|
1352
|
+
condition.uXsD.cIhR.kpi.map(function (kpi) {
|
|
1353
|
+
ceInstance.unregisterFromEvent(toUpperCase(condition.uXsD.cIhR.et) + "___" + kpi, _this);
|
|
1354
1354
|
});
|
|
1355
1355
|
}, event_time);
|
|
1356
|
-
condition.
|
|
1357
|
-
if (kpi === condition.
|
|
1356
|
+
condition.uXsD.cIhR.kpi.map(function (kpi) {
|
|
1357
|
+
if (kpi === condition.xVLs.uXsD.UGic) {
|
|
1358
1358
|
//unregister the previous event
|
|
1359
|
-
ceInstance.unregisterFromEvent(generateKey(precondition.
|
|
1360
|
-
ceInstance.registerForEvent(toUpperCase(condition.
|
|
1359
|
+
ceInstance.unregisterFromEvent(generateKey(precondition.vDdr) + "___" + precondition.uXsD.UGic, _this);
|
|
1360
|
+
ceInstance.registerForEvent(toUpperCase(condition.uXsD.cIhR.et) + "___" + kpi, _this.AwuV);
|
|
1361
1361
|
} else {
|
|
1362
|
-
ceInstance.registerForEvent(toUpperCase(condition.
|
|
1362
|
+
ceInstance.registerForEvent(toUpperCase(condition.uXsD.cIhR.et) + "___" + kpi, _this.SLEo);
|
|
1363
1363
|
}
|
|
1364
1364
|
});
|
|
1365
1365
|
}
|
|
1366
1366
|
} else {
|
|
1367
|
-
ceInstance.unregisterFromEvent(generateKey(precondition.
|
|
1368
|
-
ceInstance.registerForEvent(generateKey(condition.
|
|
1367
|
+
ceInstance.unregisterFromEvent(generateKey(precondition.vDdr) + "___" + precondition.uXsD.UGic, _this);
|
|
1368
|
+
ceInstance.registerForEvent(generateKey(condition.vDdr) + "___" + condition.uXsD.UGic, _this);
|
|
1369
1369
|
}
|
|
1370
|
-
_this.
|
|
1370
|
+
_this.gwWN[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.ABDA) && Apxor.getController().isBadgeTriggerSatisfied(_this.ABDA)) {
|
|
1375
|
+
_this.yoCa = true;
|
|
1376
|
+
_this.fHuv.QQId = time;
|
|
1377
|
+
ceInstance.validate(_this.ABDA, _this.SdOG);
|
|
1378
1378
|
return;
|
|
1379
1379
|
}
|
|
1380
1380
|
|
|
1381
1381
|
// Validate Condition
|
|
1382
|
-
var validationStatus = generateKey(_this.
|
|
1382
|
+
var validationStatus = generateKey(_this.fHuv.vDdr) === type && _this.nEoX(time - _this.fHuv.xVLs.QQId, _this.fHuv.GHht) && _this.fHuv.uXsD.UGic === name && _this.BxfC(_this.fHuv.uXsD.cIhR, additionalInfo);
|
|
1383
1383
|
if (validationStatus) {
|
|
1384
|
-
_this.
|
|
1385
|
-
_this.
|
|
1386
|
-
if (_this.
|
|
1387
|
-
_this.
|
|
1384
|
+
_this.XmsR += 1;
|
|
1385
|
+
_this.yoCa = _this.dZrw(_this.XmsR, _this.fHuv.oBTS, _this.fHuv.SGjX);
|
|
1386
|
+
if (_this.yoCa) {
|
|
1387
|
+
_this.fHuv.QQId = 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.fHuv._time.unit, _this.fHuv._time.value);
|
|
1390
|
+
var timeEnabled = _this.fHuv._timeEnabled;
|
|
1391
|
+
var condition_id = _this.fHuv._id;
|
|
1392
|
+
var satisfiedCount = _this.XmsR;
|
|
1393
|
+
_this.rbcW(_this.fHuv.DFrC, name, time, additionalInfo, timeInMillisec, timeEnabled, condition_id, satisfiedCount);
|
|
1394
1394
|
}
|
|
1395
|
-
ceInstance.validate(_this.
|
|
1395
|
+
ceInstance.validate(_this.ABDA, _this.SdOG, _this.PgpX);
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
1398
|
});
|
|
1399
|
-
_defineProperty(this, "
|
|
1399
|
+
_defineProperty(this, "ISVV", function (type, name, time, additionalInfo) {
|
|
1400
1400
|
var ceInstance = CE.getInstance();
|
|
1401
|
-
var validationStatus = generateKey(_this.
|
|
1401
|
+
var validationStatus = generateKey(_this.suqg.vDdr) === type && _this.nEoX(time, _this.suqg.GHht) && _this.suqg.uXsD.UGic === name && _this.BxfC(_this.suqg.uXsD.cIhR, additionalInfo);
|
|
1402
1402
|
if (validationStatus) {
|
|
1403
|
-
_this.
|
|
1404
|
-
_this.
|
|
1405
|
-
if (_this.
|
|
1406
|
-
_this.
|
|
1407
|
-
ceInstance.validateForTermination(_this.
|
|
1403
|
+
_this.XmsR += 1;
|
|
1404
|
+
_this.yoCa = _this.dZrw(_this.XmsR, _this.suqg.oBTS, _this.suqg.SGjX);
|
|
1405
|
+
if (_this.yoCa) {
|
|
1406
|
+
_this.suqg.QQId = time;
|
|
1407
|
+
ceInstance.validateForTermination(_this.ABDA, _this.SdOG);
|
|
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, "KRGs", function (type, name, time, additionalInfo) {
|
|
1412
|
+
var precondition = _this.fHuv.xVLs;
|
|
1413
|
+
var result = generateKey(precondition.vDdr) === type && precondition.uXsD.UGic === name && _this.nEoX(time, precondition.GHht) && _this.BxfC(precondition.uXsD.cIhR, additionalInfo);
|
|
1414
|
+
result = name === "APX_PAGE_OPENED" ? result && location.pathname === precondition.uXsD.heYC : result;
|
|
1415
1415
|
return result;
|
|
1416
1416
|
});
|
|
1417
|
-
_defineProperty(this, "
|
|
1417
|
+
_defineProperty(this, "nEoX", function (time, timeBounds) {
|
|
1418
1418
|
var currentTime = Math.ceil(time);
|
|
1419
|
-
return currentTime > timeBounds.
|
|
1419
|
+
return currentTime > timeBounds.YSug && currentTime < timeBounds.HlwB;
|
|
1420
1420
|
});
|
|
1421
|
-
_defineProperty(this, "
|
|
1421
|
+
_defineProperty(this, "dZrw", 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.fHuv.BigG) {
|
|
1424
|
+
current = current + _this.mMVK;
|
|
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, "BxfC", 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 vRev(loggedValue, expectedValue, operator);
|
|
1488
1488
|
}
|
|
1489
|
-
//
|
|
1489
|
+
// vRev(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 && vRev(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, "rbcW", 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, "oFex", 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.fHuv.vDdr) + "___" + (validator === null || validator === void 0 ? void 0 : validator.fHuv.uXsD.UGic), _this.dkXM);
|
|
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.fHuv.vDdr) + "___" + (childValidator === null || childValidator === void 0 || (_childValidator$_cond = childValidator.fHuv) === null || _childValidator$_cond === void 0 ? void 0 : _childValidator$_cond.uXsD.UGic), _this.dkXM);
|
|
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.yoCa = true;
|
|
1595
|
+
if (this.yoCa) {
|
|
1596
|
+
this.XmsR += 1;
|
|
1597
|
+
this.yoCa = this.dZrw(this.XmsR, this.fHuv.oBTS, this.fHuv.SGjX);
|
|
1598
|
+
if (this.yoCa) {
|
|
1599
|
+
this.fHuv.QQId = time;
|
|
1600
|
+
ceInstance.validate(this.ABDA, this.SdOG);
|
|
1601
|
+
//ceInstance.updateCount(this.ABDA);
|
|
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, "oBTS", 0);
|
|
1614
|
+
_defineProperty(this, "WVfG", 0);
|
|
1615
|
+
_defineProperty(this, "AEyV", "SESSION");
|
|
1616
|
+
_defineProperty(this, "Rcoc", 0);
|
|
1617
|
+
_defineProperty(this, "uIOV", 0);
|
|
1618
|
+
_defineProperty(this, "UhtC", 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, "IbRb", void 0);
|
|
1623
|
+
_defineProperty(this, "ErEX", void 0);
|
|
1624
|
+
_defineProperty(this, "SQOs", 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.ABDA = config._id;
|
|
1631
|
+
_this.ofFb = config.meta;
|
|
1632
|
+
_this.oBTS = config.frequency.count;
|
|
1633
|
+
if (_this.oBTS === -1) {
|
|
1634
|
+
_this.oBTS = 9999999;
|
|
1635
|
+
}
|
|
1636
|
+
_this.UhtC = _this.oBTS;
|
|
1637
|
+
_this.WVfG = config.frequency.time_interval;
|
|
1638
|
+
_this.AEyV = config.frequency.validity;
|
|
1639
1639
|
_this.DSLimits = config.frequency.DSLimits;
|
|
1640
|
-
_this.
|
|
1640
|
+
_this.uIOV = 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.IbRb = (_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.SQOs = config.frequency.days_limit.days ? config.frequency.days_limit.days : 1;
|
|
1656
|
+
_this.ErEX = 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.AEyV === "SESSION") {
|
|
1664
|
+
_this.oBTS = parseInt(_this.oBTS) - parseInt(qe_state[config._id]["SESSION"]);
|
|
1665
|
+
if (_this.oBTS <= 0) {
|
|
1666
|
+
_this.IdAw("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.ofFb.name));
|
|
1670
1670
|
}
|
|
1671
1671
|
return false;
|
|
1672
1672
|
}
|
|
1673
|
-
} else if (_this.
|
|
1674
|
-
_this.
|
|
1675
|
-
if (_this.
|
|
1676
|
-
_this.
|
|
1673
|
+
} else if (_this.AEyV === "OVERALL") {
|
|
1674
|
+
_this.oBTS = parseInt(_this.oBTS) - parseInt(qe_state[config._id]["OVERALL"]);
|
|
1675
|
+
if (_this.oBTS <= 0) {
|
|
1676
|
+
_this.IdAw("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.ofFb.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, "RQvg", function () {
|
|
1694
|
+
_this.oBTS = _this.oBTS - 1;
|
|
1695
1695
|
});
|
|
1696
1696
|
_defineProperty(this, "getFrequencyCount", function () {
|
|
1697
|
-
return _this.
|
|
1697
|
+
return _this.oBTS;
|
|
1698
1698
|
});
|
|
1699
|
-
_defineProperty(this, "
|
|
1700
|
-
if (_this.
|
|
1701
|
-
_this.
|
|
1699
|
+
_defineProperty(this, "TyZe", function () {
|
|
1700
|
+
if (_this.AEyV === "SESSION") {
|
|
1701
|
+
_this.oBTS = _this.UhtC;
|
|
1702
1702
|
Logger$5.info("Campaign Limit reset");
|
|
1703
1703
|
}
|
|
1704
1704
|
});
|
|
1705
1705
|
/**
|
|
1706
|
-
* @function
|
|
1706
|
+
* @function Vsbc
|
|
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, "Vsbc", function (id) {
|
|
1713
1713
|
try {
|
|
1714
|
-
if (_this.
|
|
1715
|
-
if (_this.
|
|
1716
|
-
_this.
|
|
1714
|
+
if (_this.oBTS <= 0) {
|
|
1715
|
+
if (_this.AEyV === "OVERALL") {
|
|
1716
|
+
_this.IdAw("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.ofFb.name));
|
|
1719
1719
|
}
|
|
1720
|
-
} else if (_this.
|
|
1720
|
+
} else if (_this.AEyV === "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.ofFb.name));
|
|
1723
1723
|
}
|
|
1724
|
-
_this.
|
|
1724
|
+
_this.IdAw("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.IbRb);
|
|
1736
1736
|
var thisSessionCount = parseInt(qe_state[id]["SESSION"]);
|
|
1737
1737
|
if (sessionCountFromConfig - thisSessionCount <= 0) {
|
|
1738
|
-
_this.
|
|
1738
|
+
_this.IdAw("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.ofFb.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.ABDA))) {
|
|
1750
|
+
var currentObj = isObjectWithGivenKeyPresent(repetition_times, _this.ABDA);
|
|
1751
|
+
var current_repetition_time = currentObj[_this.ABDA];
|
|
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.IdAw("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.ofFb.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.ABDA))) {
|
|
1767
|
+
var _currentObj = isObjectWithGivenKeyPresent(sessionsTowait, _this.ABDA);
|
|
1768
|
+
var current_repetition_session = _currentObj[_this.ABDA];
|
|
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.IdAw("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.ofFb.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.uIOV !== 0 && _this.DSLimits) {
|
|
1783
|
+
var sessionCountInConfig = parseInt(_this.uIOV);
|
|
1784
1784
|
var _thisSessionCount = parseInt(qe_state[id]["SESSION"]);
|
|
1785
1785
|
if (sessionCountInConfig - _thisSessionCount <= 0) {
|
|
1786
|
-
_this.
|
|
1786
|
+
_this.IdAw("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.ofFb.name));
|
|
1789
1789
|
}
|
|
1790
1790
|
return false;
|
|
1791
1791
|
}
|
|
@@ -1798,43 +1798,45 @@
|
|
|
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.IdAw("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.ofFb.name));
|
|
1804
1804
|
}
|
|
1805
1805
|
return false;
|
|
1806
1806
|
}
|
|
1807
1807
|
}
|
|
1808
|
-
if (_this.
|
|
1809
|
-
var daysCount = _this.
|
|
1808
|
+
if (_this.SQOs > 0 && _this._enable_days_limit) {
|
|
1809
|
+
var daysCount = _this.SQOs;
|
|
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.ErEX) {
|
|
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.ofFb.name));
|
|
1820
1820
|
}
|
|
1821
1821
|
return false;
|
|
1822
1822
|
}
|
|
1823
1823
|
}
|
|
1824
1824
|
} catch (e) {
|
|
1825
|
-
_this.
|
|
1825
|
+
_this.IdAw("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, "IdAw", function (reason) {
|
|
1831
|
+
var _this$ofFb$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
|
-
|
|
1837
|
-
|
|
1833
|
+
apx_nudge_type: _this.ofFb.type === "SURVEY" ? "survey" : "campaign",
|
|
1834
|
+
apx_nudge_id: _this.ABDA,
|
|
1835
|
+
apx_nudge_name: _this.ofFb.name,
|
|
1836
|
+
message_name: _this.ofFb.UGic,
|
|
1837
|
+
id: _this.ABDA,
|
|
1838
|
+
apx_variant_code: _this.ofFb.isExperiment || _this.ofFb.only_context ? (_this$ofFb$attr = _this.ofFb.attr) === null || _this$ofFb$attr === void 0 ? void 0 : _this$ofFb$attr[APX_VARIANT_CODE] : "TG",
|
|
1839
|
+
apx_notshown_type: "warn",
|
|
1838
1840
|
apx_reason: reason
|
|
1839
1841
|
});
|
|
1840
1842
|
});
|
|
@@ -1846,10 +1848,10 @@
|
|
|
1846
1848
|
var GroupConditionValidator = /*#__PURE__*/_createClass(function GroupConditionValidator() {
|
|
1847
1849
|
var _this = this;
|
|
1848
1850
|
_classCallCheck(this, GroupConditionValidator);
|
|
1849
|
-
_defineProperty(this, "
|
|
1850
|
-
_defineProperty(this, "
|
|
1851
|
-
_defineProperty(this, "
|
|
1852
|
-
_defineProperty(this, "
|
|
1851
|
+
_defineProperty(this, "OTPw", []);
|
|
1852
|
+
_defineProperty(this, "GbmE", 0);
|
|
1853
|
+
_defineProperty(this, "Zyiy", false);
|
|
1854
|
+
_defineProperty(this, "eEYX", void 0);
|
|
1853
1855
|
_defineProperty(this, "initialize", function () {
|
|
1854
1856
|
var conditions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
1855
1857
|
var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
@@ -1858,51 +1860,51 @@
|
|
|
1858
1860
|
var noKpiArray = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
|
1859
1861
|
var parentRespectSequence = arguments.length > 5 ? arguments[5] : undefined;
|
|
1860
1862
|
var across_sessions = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
1861
|
-
_this.
|
|
1862
|
-
_this.
|
|
1863
|
-
_this.
|
|
1864
|
-
_this.
|
|
1863
|
+
_this.ABDA = id;
|
|
1864
|
+
_this.SdOG = index;
|
|
1865
|
+
_this.gMeI = noKpiArray;
|
|
1866
|
+
_this.OwjD = respectSequence;
|
|
1865
1867
|
_this.across_sessions = across_sessions;
|
|
1866
1868
|
var childConditions = [];
|
|
1867
|
-
_this.
|
|
1869
|
+
_this.GbmE = conditions.length;
|
|
1868
1870
|
try {
|
|
1869
1871
|
if (childConditions != null) {
|
|
1870
1872
|
respectSequence = conditions === null || conditions === void 0 ? void 0 : conditions.sequence_type;
|
|
1871
|
-
childConditions = _this.
|
|
1872
|
-
if (parentRespectSequence === "unordered" || _this.
|
|
1873
|
-
_this.
|
|
1873
|
+
childConditions = _this.tTRq(conditions, _this.GbmE);
|
|
1874
|
+
if (parentRespectSequence === "unordered" || _this.SdOG === 0) {
|
|
1875
|
+
_this.jRNn();
|
|
1874
1876
|
}
|
|
1875
|
-
return _this.
|
|
1877
|
+
return _this.OTPw;
|
|
1876
1878
|
}
|
|
1877
1879
|
} catch (error) {
|
|
1878
1880
|
Logger$6.error(error);
|
|
1879
1881
|
return false;
|
|
1880
1882
|
}
|
|
1881
1883
|
});
|
|
1882
|
-
_defineProperty(this, "
|
|
1884
|
+
_defineProperty(this, "tTRq", function (conditions, conditionsLength) {
|
|
1883
1885
|
for (var index = 0; index < conditionsLength; index++) {
|
|
1884
|
-
_this.
|
|
1886
|
+
_this.eEYX = new ConditionValidator();
|
|
1885
1887
|
try {
|
|
1886
|
-
if (_this.
|
|
1887
|
-
_this.
|
|
1888
|
-
_this.
|
|
1888
|
+
if (_this.eEYX.initialize(conditions[index], _this.ABDA, _this.SdOG, _this.OwjD, _this.IyJN, _this.across_sessions, "", -1, false)) {
|
|
1889
|
+
_this.OTPw.push(_this.eEYX);
|
|
1890
|
+
_this.OTPw.sequence_type = _this.OwjD;
|
|
1889
1891
|
}
|
|
1890
1892
|
} catch (error) {
|
|
1891
1893
|
Logger$6.error(error);
|
|
1892
1894
|
}
|
|
1893
1895
|
}
|
|
1894
|
-
return _this.
|
|
1896
|
+
return _this.OTPw;
|
|
1895
1897
|
});
|
|
1896
|
-
_defineProperty(this, "
|
|
1897
|
-
if (_this.
|
|
1898
|
-
_this.
|
|
1898
|
+
_defineProperty(this, "jRNn", function () {
|
|
1899
|
+
if (_this.OwjD === "ordered" || _this.OwjD === "strictly_ordered") {
|
|
1900
|
+
_this.OTPw[0].jRNn(0);
|
|
1899
1901
|
} else {
|
|
1900
|
-
var _iterator = _createForOfIteratorHelper(_this.
|
|
1902
|
+
var _iterator = _createForOfIteratorHelper(_this.OTPw),
|
|
1901
1903
|
_step;
|
|
1902
1904
|
try {
|
|
1903
1905
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
1904
1906
|
var validator = _step.value;
|
|
1905
|
-
validator.
|
|
1907
|
+
validator.jRNn();
|
|
1906
1908
|
}
|
|
1907
1909
|
} catch (err) {
|
|
1908
1910
|
_iterator.e(err);
|
|
@@ -1911,22 +1913,22 @@
|
|
|
1911
1913
|
}
|
|
1912
1914
|
}
|
|
1913
1915
|
});
|
|
1914
|
-
_defineProperty(this, "
|
|
1915
|
-
_this.
|
|
1916
|
+
_defineProperty(this, "oFex", function (validators) {
|
|
1917
|
+
_this.eEYX.oFex(validators);
|
|
1916
1918
|
});
|
|
1917
1919
|
});
|
|
1918
1920
|
|
|
1919
1921
|
var Meta = /*#__PURE__*/_createClass(function Meta() {
|
|
1920
1922
|
var _this = this;
|
|
1921
1923
|
_classCallCheck(this, Meta);
|
|
1922
|
-
_defineProperty(this, "
|
|
1923
|
-
_defineProperty(this, "
|
|
1924
|
+
_defineProperty(this, "UGic", "");
|
|
1925
|
+
_defineProperty(this, "DFrC", "");
|
|
1924
1926
|
_defineProperty(this, "parse", function () {
|
|
1925
1927
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1926
1928
|
try {
|
|
1927
1929
|
var _config$meta, _config$meta2;
|
|
1928
|
-
_this.
|
|
1929
|
-
_this.
|
|
1930
|
+
_this.UGic = config.meta.name;
|
|
1931
|
+
_this.DFrC = config.meta.type;
|
|
1930
1932
|
_this._only_context = config.meta.only_context;
|
|
1931
1933
|
_this._attr = ((_config$meta = config.meta) === null || _config$meta === void 0 ? void 0 : _config$meta.attr) || {};
|
|
1932
1934
|
_this._isExperiment = (_config$meta2 = config.meta) === null || _config$meta2 === void 0 ? void 0 : _config$meta2.isExperiment;
|
|
@@ -1942,11 +1944,11 @@
|
|
|
1942
1944
|
var OverallConfig = /*#__PURE__*/_createClass(function OverallConfig() {
|
|
1943
1945
|
var _this = this;
|
|
1944
1946
|
_classCallCheck(this, OverallConfig);
|
|
1945
|
-
_defineProperty(this, "
|
|
1947
|
+
_defineProperty(this, "zKQj", []);
|
|
1946
1948
|
_defineProperty(this, "_ret_day", {});
|
|
1947
|
-
_defineProperty(this, "
|
|
1948
|
-
_defineProperty(this, "
|
|
1949
|
-
_defineProperty(this, "
|
|
1949
|
+
_defineProperty(this, "OFTf", {});
|
|
1950
|
+
_defineProperty(this, "IPPT", false);
|
|
1951
|
+
_defineProperty(this, "kTaF", false);
|
|
1950
1952
|
_defineProperty(this, "retainedDaysValidated", true);
|
|
1951
1953
|
_defineProperty(this, "retainedSessionValidated", true);
|
|
1952
1954
|
_defineProperty(this, "eventDoneInLT", false);
|
|
@@ -1954,11 +1956,11 @@
|
|
|
1954
1956
|
_defineProperty(this, "parse", function () {
|
|
1955
1957
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1956
1958
|
try {
|
|
1957
|
-
_this.
|
|
1959
|
+
_this.zKQj = config.overall_cfg.events;
|
|
1958
1960
|
_this._ret_day = config.overall_cfg.ret_day;
|
|
1959
|
-
_this.
|
|
1960
|
-
_this.
|
|
1961
|
-
_this.
|
|
1961
|
+
_this.OFTf = config.overall_cfg.session;
|
|
1962
|
+
_this.IPPT = config.overall_cfg.toggleRetDay;
|
|
1963
|
+
_this.kTaF = config.overall_cfg.toggleSession;
|
|
1962
1964
|
} catch (error) {
|
|
1963
1965
|
Logger$7.error(error);
|
|
1964
1966
|
return false;
|
|
@@ -1968,11 +1970,11 @@
|
|
|
1968
1970
|
_defineProperty(this, "validate", function () {
|
|
1969
1971
|
var retainedDays = parseInt(Apxor.getController().getFromStorage(APX_RETAINED_DAYS));
|
|
1970
1972
|
var retainedSession = parseInt(Apxor.getController().getFromStorage(APX_RETAINED_SESSIONS));
|
|
1971
|
-
if (_this.
|
|
1973
|
+
if (_this.IPPT && !isNaN(retainedDays) && !(retainedDays >= _this._ret_day.from && retainedDays <= _this._ret_day.to)) {
|
|
1972
1974
|
_this.retainedDaysValidated = false;
|
|
1973
1975
|
return false;
|
|
1974
1976
|
}
|
|
1975
|
-
if (_this.
|
|
1977
|
+
if (_this.kTaF && !isNaN(retainedSession) && !(retainedSession >= _this.OFTf.from && retainedSession <= _this.OFTf.to)) {
|
|
1976
1978
|
_this.retainedSessionValidated = false;
|
|
1977
1979
|
return false;
|
|
1978
1980
|
}
|
|
@@ -1981,8 +1983,8 @@
|
|
|
1981
1983
|
var data = Apxor.getController().getFromStorage("_apx_lt_count");
|
|
1982
1984
|
var siteid = Apxor.getSiteId();
|
|
1983
1985
|
var LtCountObjDecoded = JSON.parse(new TextDecoder().decode(stringToArrayBuffer(decode(siteid, data))));
|
|
1984
|
-
for (var i = 0; i < _this.
|
|
1985
|
-
var evName = _this.
|
|
1986
|
+
for (var i = 0; i < _this.zKQj.length; i++) {
|
|
1987
|
+
var evName = _this.zKQj[i].name.replace("'", "").replace("’", "");
|
|
1986
1988
|
if (LtCountObjDecoded[evName]) {
|
|
1987
1989
|
_this.eventDoneInLT = true;
|
|
1988
1990
|
return false;
|
|
@@ -1999,14 +2001,14 @@
|
|
|
1999
2001
|
var Attributes = /*#__PURE__*/_createClass(function Attributes() {
|
|
2000
2002
|
var _this = this;
|
|
2001
2003
|
_classCallCheck(this, Attributes);
|
|
2002
|
-
_defineProperty(this, "
|
|
2003
|
-
_defineProperty(this, "
|
|
2004
|
+
_defineProperty(this, "jkhw", []);
|
|
2005
|
+
_defineProperty(this, "xsNZ", []);
|
|
2004
2006
|
_defineProperty(this, "parse", function () {
|
|
2005
2007
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2006
2008
|
try {
|
|
2007
|
-
_this.
|
|
2008
|
-
_this.
|
|
2009
|
-
if (!Array.isArray(_this.
|
|
2009
|
+
_this.jkhw = config.attributes.user;
|
|
2010
|
+
_this.xsNZ = config.attributes.session;
|
|
2011
|
+
if (!Array.isArray(_this.jkhw) || !Array.isArray(_this.xsNZ)) {
|
|
2010
2012
|
Logger$8.error("No attributes");
|
|
2011
2013
|
return false;
|
|
2012
2014
|
}
|
|
@@ -2017,9 +2019,9 @@
|
|
|
2017
2019
|
return true;
|
|
2018
2020
|
});
|
|
2019
2021
|
_defineProperty(this, "validate", function (user, session) {
|
|
2020
|
-
return _this.
|
|
2022
|
+
return _this.ViXp(user, _this.jkhw) && _this.ViXp(session, _this.xsNZ);
|
|
2021
2023
|
});
|
|
2022
|
-
_defineProperty(this, "
|
|
2024
|
+
_defineProperty(this, "ViXp", function (attributes, expected) {
|
|
2023
2025
|
var length = expected.length;
|
|
2024
2026
|
var status = true;
|
|
2025
2027
|
try {
|
|
@@ -2049,7 +2051,7 @@
|
|
|
2049
2051
|
}
|
|
2050
2052
|
var match = loggedValues.some(function (loggedValue) {
|
|
2051
2053
|
return values.some(function (configValue) {
|
|
2052
|
-
return
|
|
2054
|
+
return vRev(loggedValue, configValue, operator);
|
|
2053
2055
|
});
|
|
2054
2056
|
});
|
|
2055
2057
|
status = status && match;
|
|
@@ -2073,18 +2075,18 @@
|
|
|
2073
2075
|
var TimeBasedTermination = /*#__PURE__*/_createClass(function TimeBasedTermination() {
|
|
2074
2076
|
var _this = this;
|
|
2075
2077
|
_classCallCheck(this, TimeBasedTermination);
|
|
2076
|
-
_defineProperty(this, "
|
|
2078
|
+
_defineProperty(this, "IGdf", Apxor.getController());
|
|
2077
2079
|
_defineProperty(this, "type", "");
|
|
2078
2080
|
_defineProperty(this, "_duration_seconds", 0);
|
|
2079
|
-
_defineProperty(this, "
|
|
2081
|
+
_defineProperty(this, "DAMZ", 1);
|
|
2080
2082
|
_defineProperty(this, "parse", function (config) {
|
|
2081
2083
|
try {
|
|
2082
2084
|
var _config$terminate_inf, _config$terminate_inf2, _config$terminate_inf3;
|
|
2083
|
-
_this.
|
|
2085
|
+
_this.DFrC = (_config$terminate_inf = config.terminate_info.time_based) === null || _config$terminate_inf === void 0 ? void 0 : _config$terminate_inf.type;
|
|
2084
2086
|
_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.
|
|
2087
|
+
_this.DAMZ = (_config$terminate_inf3 = config.terminate_info.time_based) === null || _config$terminate_inf3 === void 0 ? void 0 : _config$terminate_inf3.days;
|
|
2088
|
+
if (_this.vRev(config._id)) {
|
|
2089
|
+
_this.IGdf.persistTerminationInfoLocally(config._id);
|
|
2088
2090
|
return false;
|
|
2089
2091
|
}
|
|
2090
2092
|
} catch (_unused) {
|
|
@@ -2092,16 +2094,16 @@
|
|
|
2092
2094
|
}
|
|
2093
2095
|
return true;
|
|
2094
2096
|
});
|
|
2095
|
-
_defineProperty(this, "
|
|
2097
|
+
_defineProperty(this, "vRev", function (id) {
|
|
2096
2098
|
var _Data$id;
|
|
2097
|
-
var Data = JSON.parse(_this.
|
|
2099
|
+
var Data = JSON.parse(_this.IGdf.getFromStorage(APX_TERMINATION_ID));
|
|
2098
2100
|
if (!Data[id] || !((_Data$id = Data[id]) !== null && _Data$id !== void 0 && _Data$id.startDate)) return false;
|
|
2099
2101
|
var startDate = new Date(Data[id].startDate);
|
|
2100
2102
|
var presentDate = new Date(getDateInMMDDYYYY());
|
|
2101
2103
|
var diff = parseInt((presentDate - startDate) / (1000 * 60 * 60 * 24), 10);
|
|
2102
2104
|
var currentTime = _getTime();
|
|
2103
|
-
var
|
|
2104
|
-
return diff === _this.
|
|
2105
|
+
var nYTe = Data[id].nYTe;
|
|
2106
|
+
return diff === _this.DAMZ && currentTime.hours >= nYTe.hours || diff > _this.DAMZ || Data[id].goalAcheived;
|
|
2105
2107
|
});
|
|
2106
2108
|
});
|
|
2107
2109
|
|
|
@@ -2110,19 +2112,19 @@
|
|
|
2110
2112
|
_classCallCheck(this, TerminationInfo);
|
|
2111
2113
|
_defineProperty(this, "enable_goal_events", false);
|
|
2112
2114
|
_defineProperty(this, "attributes", {});
|
|
2113
|
-
_defineProperty(this, "
|
|
2114
|
-
_defineProperty(this, "
|
|
2115
|
+
_defineProperty(this, "oamw", new Attributes());
|
|
2116
|
+
_defineProperty(this, "wuBT", new TimeBasedTermination());
|
|
2115
2117
|
_defineProperty(this, "parse", function () {
|
|
2116
2118
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2117
2119
|
try {
|
|
2118
2120
|
var _config$terminate_inf, _config$terminate_inf2, _config$terminate_inf3;
|
|
2119
2121
|
_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.
|
|
2122
|
+
if (_this.enable_time_based && !_this.wuBT.parse(config)) {
|
|
2121
2123
|
return false;
|
|
2122
2124
|
}
|
|
2123
2125
|
_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
2126
|
_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.
|
|
2127
|
+
if (_this.enable_attributes && !_this.oamw.parse(config.terminate_info)) {
|
|
2126
2128
|
return false;
|
|
2127
2129
|
}
|
|
2128
2130
|
} catch (error) {
|
|
@@ -2132,7 +2134,7 @@
|
|
|
2132
2134
|
return true;
|
|
2133
2135
|
});
|
|
2134
2136
|
_defineProperty(this, "validate", function (user, session) {
|
|
2135
|
-
return _this.
|
|
2137
|
+
return _this.oamw.validate(user, session);
|
|
2136
2138
|
});
|
|
2137
2139
|
});
|
|
2138
2140
|
|
|
@@ -2140,15 +2142,15 @@
|
|
|
2140
2142
|
var Validity = /*#__PURE__*/_createClass(function Validity() {
|
|
2141
2143
|
var _this = this;
|
|
2142
2144
|
_classCallCheck(this, Validity);
|
|
2143
|
-
_defineProperty(this, "
|
|
2144
|
-
_defineProperty(this, "
|
|
2145
|
-
_defineProperty(this, "
|
|
2146
|
-
_defineProperty(this, "
|
|
2147
|
-
_defineProperty(this, "
|
|
2148
|
-
_defineProperty(this, "
|
|
2145
|
+
_defineProperty(this, "jjeA", -1);
|
|
2146
|
+
_defineProperty(this, "vFlH", -1);
|
|
2147
|
+
_defineProperty(this, "nYTe", -1);
|
|
2148
|
+
_defineProperty(this, "iDwb", -1);
|
|
2149
|
+
_defineProperty(this, "ycyp", -1);
|
|
2150
|
+
_defineProperty(this, "dCIk", -1);
|
|
2149
2151
|
_defineProperty(this, "_is_user_timezone", void 0);
|
|
2150
|
-
_defineProperty(this, "
|
|
2151
|
-
_defineProperty(this, "
|
|
2152
|
+
_defineProperty(this, "cfKb", false);
|
|
2153
|
+
_defineProperty(this, "fmrF", false);
|
|
2152
2154
|
_defineProperty(this, "_nudge_expired", false);
|
|
2153
2155
|
_defineProperty(this, "_not_yet_active", false);
|
|
2154
2156
|
_defineProperty(this, "_not_in_specified_time", false);
|
|
@@ -2157,36 +2159,36 @@
|
|
|
2157
2159
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2158
2160
|
try {
|
|
2159
2161
|
var _config$validity, _config$validity2;
|
|
2160
|
-
_this.
|
|
2161
|
-
_this.
|
|
2162
|
+
_this.ABDA = config._id;
|
|
2163
|
+
_this.ofFb = config.meta;
|
|
2162
2164
|
if (isNaN(Date.parse(config.validity.start_date)) || isNaN(Date.parse(config.validity.end_date)) || !Array.isArray(config.validity.days_in_week)) {
|
|
2163
2165
|
Logger$9.error("Not valid dates");
|
|
2164
2166
|
return false;
|
|
2165
2167
|
}
|
|
2166
|
-
_this.
|
|
2167
|
-
_this.
|
|
2168
|
+
_this.jjeA = Date.parse(config.validity.start_date);
|
|
2169
|
+
_this.vFlH = Date.parse(config.validity.end_date);
|
|
2168
2170
|
_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
2171
|
_this._is_user_timezone = config.is_user_timezone ? config.is_user_timezone : true;
|
|
2170
2172
|
if (isDefined(config.at_specific_time)) {
|
|
2171
|
-
_this.
|
|
2172
|
-
if (_this.
|
|
2173
|
-
_this.
|
|
2174
|
-
_this.
|
|
2173
|
+
_this.cfKb = config.at_specific_time;
|
|
2174
|
+
if (_this.cfKb && isDefined(config.time_limits)) {
|
|
2175
|
+
_this.nYTe = config.time_limits.start_time;
|
|
2176
|
+
_this.iDwb = config.time_limits.end_time;
|
|
2175
2177
|
|
|
2176
2178
|
// If invalid format is passed, return false
|
|
2177
|
-
if (isNumber(_this.
|
|
2179
|
+
if (isNumber(_this.nYTe) || isNumber(_this.iDwb)) {
|
|
2178
2180
|
Logger$9.error("Not valid times");
|
|
2179
2181
|
return false;
|
|
2180
2182
|
}
|
|
2181
2183
|
}
|
|
2182
2184
|
}
|
|
2183
2185
|
if (isDefined(config.time_excludes_in_day)) {
|
|
2184
|
-
_this.
|
|
2185
|
-
if (_this.
|
|
2186
|
-
_this.
|
|
2187
|
-
_this.
|
|
2186
|
+
_this.fmrF = config.time_excludes_in_day;
|
|
2187
|
+
if (_this.fmrF && isDefined(config.time_excludes)) {
|
|
2188
|
+
_this.ycyp = config.time_excludes.start_time;
|
|
2189
|
+
_this.dCIk = config.time_excludes.end_time;
|
|
2188
2190
|
// If invalid format is passed, return false
|
|
2189
|
-
if (isNumber(_this.
|
|
2191
|
+
if (isNumber(_this.ycyp) || isNumber(_this.dCIk)) {
|
|
2190
2192
|
Logger$9.error("Not valid exclude times");
|
|
2191
2193
|
return false;
|
|
2192
2194
|
}
|
|
@@ -2203,39 +2205,41 @@
|
|
|
2203
2205
|
var currentDate = new Date();
|
|
2204
2206
|
var currentDay = currentDate.getDay() + 1;
|
|
2205
2207
|
var currentTimeIn24hourFormat = _getCurrentTime(_this._is_user_timezone);
|
|
2206
|
-
if (currentTime > _this.
|
|
2207
|
-
if (_this.
|
|
2208
|
+
if (currentTime > _this.jjeA && currentTime < _this.vFlH && _this._days_in_week.includes(currentDay)) {
|
|
2209
|
+
if (_this.cfKb && !(_timeEvaluator(currentTimeIn24hourFormat, _this.nYTe, "GT") && _timeEvaluator(currentTimeIn24hourFormat, _this.iDwb, "LT"))) {
|
|
2208
2210
|
_this._not_in_specified_time = true;
|
|
2209
2211
|
}
|
|
2210
|
-
if (_this.
|
|
2211
|
-
_this.
|
|
2212
|
+
if (_this.fmrF && isTimeBetween(_this.ycyp, _this.dCIk, currentTimeIn24hourFormat)) {
|
|
2213
|
+
_this.IdAw("Exclude Time limits check failed");
|
|
2212
2214
|
if (Apxor.getController().isTestDevice()) {
|
|
2213
|
-
validationToastDisplayandRemoval("Exclude Time Limits check failed for campaign name ".concat(_this.
|
|
2215
|
+
validationToastDisplayandRemoval("Exclude Time Limits check failed for campaign name ".concat(_this.ofFb.name));
|
|
2214
2216
|
}
|
|
2215
2217
|
return false;
|
|
2216
2218
|
}
|
|
2217
|
-
return !_this.
|
|
2218
|
-
} else if (currentTime < _this.
|
|
2219
|
+
return !_this.cfKb || _timeEvaluator(currentTimeIn24hourFormat, _this.nYTe, "GT") && _timeEvaluator(currentTimeIn24hourFormat, _this.iDwb, "LT");
|
|
2220
|
+
} else if (currentTime < _this.jjeA) {
|
|
2219
2221
|
_this._not_yet_active = true;
|
|
2220
|
-
} else if (currentTime > _this.
|
|
2222
|
+
} else if (currentTime > _this.vFlH) {
|
|
2221
2223
|
_this._nudge_expired = true;
|
|
2222
2224
|
} else if (!_this._days_in_week.includes(currentDay)) {
|
|
2223
|
-
_this.
|
|
2225
|
+
_this.IdAw("Current week day did not match with Configured Week day");
|
|
2224
2226
|
if (Apxor.getController().isTestDevice()) {
|
|
2225
|
-
validationToastDisplayandRemoval("Current week day did not match with Configured Week day for campaign name ".concat(_this.
|
|
2227
|
+
validationToastDisplayandRemoval("Current week day did not match with Configured Week day for campaign name ".concat(_this.ofFb.name));
|
|
2226
2228
|
}
|
|
2227
2229
|
return false;
|
|
2228
2230
|
}
|
|
2229
2231
|
return false;
|
|
2230
2232
|
});
|
|
2231
|
-
_defineProperty(this, "
|
|
2232
|
-
var _this$
|
|
2233
|
+
_defineProperty(this, "IdAw", function (reason) {
|
|
2234
|
+
var _this$ofFb$attr;
|
|
2233
2235
|
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
|
-
|
|
2238
|
-
|
|
2236
|
+
apx_nudge_type: _this.ofFb.type === "SURVEY" ? "survey" : "campaign",
|
|
2237
|
+
apx_nudge_id: _this.ABDA,
|
|
2238
|
+
apx_nudge_name: _this.ofFb.name,
|
|
2239
|
+
message_name: _this.ofFb.UGic,
|
|
2240
|
+
id: _this.ABDA,
|
|
2241
|
+
apx_variant_code: _this.ofFb.isExperiment || _this.ofFb.only_context ? (_this$ofFb$attr = _this.ofFb.attr) === null || _this$ofFb$attr === void 0 ? void 0 : _this$ofFb$attr[APX_VARIANT_CODE] : "TG",
|
|
2242
|
+
apx_notshown_type: "warn",
|
|
2239
2243
|
apx_reason: reason
|
|
2240
2244
|
});
|
|
2241
2245
|
});
|
|
@@ -2244,20 +2248,20 @@
|
|
|
2244
2248
|
var Binding = /*#__PURE__*/_createClass(function Binding() {
|
|
2245
2249
|
var _this = this;
|
|
2246
2250
|
_classCallCheck(this, Binding);
|
|
2247
|
-
_defineProperty(this, "
|
|
2248
|
-
_defineProperty(this, "
|
|
2249
|
-
_defineProperty(this, "
|
|
2250
|
-
_defineProperty(this, "
|
|
2251
|
+
_defineProperty(this, "MLvn", "");
|
|
2252
|
+
_defineProperty(this, "nLZR", "");
|
|
2253
|
+
_defineProperty(this, "aCat", "");
|
|
2254
|
+
_defineProperty(this, "qNPe", "");
|
|
2251
2255
|
_defineProperty(this, "parse", function () {
|
|
2252
2256
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2253
2257
|
try {
|
|
2254
|
-
_this.
|
|
2255
|
-
if (!_this.
|
|
2258
|
+
_this.MLvn = config === null || config === void 0 ? void 0 : config.screen_binding;
|
|
2259
|
+
if (!_this.MLvn) {
|
|
2256
2260
|
return true;
|
|
2257
2261
|
} else {
|
|
2258
|
-
_this.
|
|
2259
|
-
_this.
|
|
2260
|
-
_this.
|
|
2262
|
+
_this.nLZR = config === null || config === void 0 ? void 0 : config.binding.url;
|
|
2263
|
+
_this.aCat = config === null || config === void 0 ? void 0 : config.binding["var"];
|
|
2264
|
+
_this.qNPe = config === null || config === void 0 ? void 0 : config.binding.operator;
|
|
2261
2265
|
return true;
|
|
2262
2266
|
}
|
|
2263
2267
|
} catch (error) {
|
|
@@ -2272,11 +2276,11 @@
|
|
|
2272
2276
|
* operator :operator can be either "EQ" used for equality comparision or "SW" used for startswith comparision
|
|
2273
2277
|
*/
|
|
2274
2278
|
_defineProperty(this, "validate", function () {
|
|
2275
|
-
var url = _this.
|
|
2276
|
-
var variable = _this.
|
|
2277
|
-
var operator = _this.
|
|
2279
|
+
var url = _this.nLZR;
|
|
2280
|
+
var variable = _this.aCat;
|
|
2281
|
+
var operator = _this.qNPe;
|
|
2278
2282
|
var currentUrl = window.location.href;
|
|
2279
|
-
if (!_this.
|
|
2283
|
+
if (!_this.MLvn) {
|
|
2280
2284
|
return true;
|
|
2281
2285
|
} else {
|
|
2282
2286
|
if (operator === "EQ") {
|
|
@@ -2320,44 +2324,44 @@
|
|
|
2320
2324
|
var ConfigItem = /*#__PURE__*/_createClass(function ConfigItem() {
|
|
2321
2325
|
var _this = this;
|
|
2322
2326
|
_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, "
|
|
2327
|
+
_defineProperty(this, "qfrr", []);
|
|
2328
|
+
_defineProperty(this, "vqdX", []);
|
|
2329
|
+
_defineProperty(this, "ABDA", "");
|
|
2330
|
+
_defineProperty(this, "ofFb", new Meta());
|
|
2331
|
+
_defineProperty(this, "Rtvw", new Audience());
|
|
2332
|
+
_defineProperty(this, "AEyV", new Validity());
|
|
2333
|
+
_defineProperty(this, "sqke", new Frequency());
|
|
2334
|
+
_defineProperty(this, "Rlua", new OverallConfig());
|
|
2335
|
+
_defineProperty(this, "TAxm", new TerminationInfo());
|
|
2336
|
+
_defineProperty(this, "SXtO", new Binding());
|
|
2337
|
+
_defineProperty(this, "OwjD", false);
|
|
2338
|
+
_defineProperty(this, "IyJN", []);
|
|
2335
2339
|
_defineProperty(this, "_variant_code", "");
|
|
2336
|
-
_defineProperty(this, "
|
|
2340
|
+
_defineProperty(this, "Zyiy", false);
|
|
2337
2341
|
_defineProperty(this, "groupCombineOperator", "OR");
|
|
2338
|
-
_defineProperty(this, "
|
|
2339
|
-
_defineProperty(this, "
|
|
2340
|
-
_defineProperty(this, "
|
|
2342
|
+
_defineProperty(this, "xyKD", false);
|
|
2343
|
+
_defineProperty(this, "vtAp", false);
|
|
2344
|
+
_defineProperty(this, "sHdE", void 0);
|
|
2341
2345
|
_defineProperty(this, "timeForKPI", void 0);
|
|
2342
2346
|
_defineProperty(this, "kpiIndex", 0);
|
|
2343
|
-
_defineProperty(this, "
|
|
2347
|
+
_defineProperty(this, "jaQb", void 0);
|
|
2344
2348
|
_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, "
|
|
2349
|
+
_defineProperty(this, "JWQI", void 0);
|
|
2350
|
+
_defineProperty(this, "RlZB", false);
|
|
2351
|
+
_defineProperty(this, "JILc", void 0);
|
|
2352
|
+
_defineProperty(this, "GGny", void 0);
|
|
2353
|
+
_defineProperty(this, "vpAf", void 0);
|
|
2354
|
+
_defineProperty(this, "YXfN", void 0);
|
|
2355
|
+
_defineProperty(this, "bsQT", void 0);
|
|
2356
|
+
_defineProperty(this, "FefJ", void 0);
|
|
2357
|
+
_defineProperty(this, "DBxj", void 0);
|
|
2358
|
+
_defineProperty(this, "MhIU", void 0);
|
|
2359
|
+
_defineProperty(this, "qIOQ", void 0);
|
|
2360
|
+
_defineProperty(this, "ymdm", void 0);
|
|
2357
2361
|
_defineProperty(this, "parse", function () {
|
|
2358
2362
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2359
2363
|
try {
|
|
2360
|
-
var _this$
|
|
2364
|
+
var _this$ofFb$_attr;
|
|
2361
2365
|
// If ID is not present, throw it out
|
|
2362
2366
|
if (!isDefined(config._id)) {
|
|
2363
2367
|
Logger$a.error("No Id");
|
|
@@ -2371,10 +2375,10 @@
|
|
|
2371
2375
|
}
|
|
2372
2376
|
|
|
2373
2377
|
// If META, VALIDITY, FREQUENCY and AUDIENCE is not parsed properly, throw it out
|
|
2374
|
-
if (!(_this.
|
|
2378
|
+
if (!(_this.ofFb.parse(config) && _this.AEyV.parse(config) && _this.sqke.parse(config) && _this.Rtvw.parse(config) && _this.Rlua.parse(config) && _this.TAxm.parse(config) && _this.SXtO.parse(config))) {
|
|
2375
2379
|
return false;
|
|
2376
2380
|
}
|
|
2377
|
-
_this._variant_code = _this.
|
|
2381
|
+
_this._variant_code = _this.ofFb._isExperiment || _this.ofFb._only_context ? (_this$ofFb$_attr = _this.ofFb._attr) === null || _this$ofFb$_attr === void 0 ? void 0 : _this$ofFb$_attr[APX_VARIANT_CODE] : "TG";
|
|
2378
2382
|
_this._across_sessions = config !== null && config !== void 0 && config.across_sessions ? config === null || config === void 0 ? void 0 : config.across_sessions : false;
|
|
2379
2383
|
_this.enable_conditions = config === null || config === void 0 ? void 0 : config.enable_conditions;
|
|
2380
2384
|
_this.enable_conditions_v2 = config === null || config === void 0 ? void 0 : config.enable_conditions_v2;
|
|
@@ -2383,12 +2387,12 @@
|
|
|
2383
2387
|
Logger$a.error("No valid conditions", config.conditions);
|
|
2384
2388
|
return false;
|
|
2385
2389
|
}
|
|
2386
|
-
_this.
|
|
2387
|
-
_this.
|
|
2390
|
+
_this.ABDA = config._id;
|
|
2391
|
+
_this.OwjD = isDefined(config.sequence_enabled) ? config.sequence_enabled : false;
|
|
2388
2392
|
if (isDefined(config.conditions_v2) && _this.enable_conditions_v2) {
|
|
2389
|
-
_this.
|
|
2393
|
+
_this.OwjD = config === null || config === void 0 ? void 0 : config.sequence_type;
|
|
2390
2394
|
}
|
|
2391
|
-
if (_this.
|
|
2395
|
+
if (_this.OwjD === true) {
|
|
2392
2396
|
// iff respectSequence is true, Sort the Conditions by their sequence order
|
|
2393
2397
|
// We need to sort, if server sends them in orderless manner
|
|
2394
2398
|
config.conditions.sort(function (prev, current) {
|
|
@@ -2400,40 +2404,40 @@
|
|
|
2400
2404
|
var conditions;
|
|
2401
2405
|
if (isDefined(config.conditions_v2) && _this.enable_conditions_v2) {
|
|
2402
2406
|
conditions = config.conditions_v2;
|
|
2403
|
-
_this.
|
|
2407
|
+
_this.RlZB = true;
|
|
2404
2408
|
} else {
|
|
2405
2409
|
conditions = config.conditions;
|
|
2406
2410
|
}
|
|
2407
|
-
_this.
|
|
2411
|
+
_this.JWQI = conditions;
|
|
2408
2412
|
var length = conditions.length;
|
|
2409
2413
|
var no_context_enabled = config === null || config === void 0 ? void 0 : config.no_context_enabled;
|
|
2410
2414
|
if (length === 0 && no_context_enabled) {
|
|
2411
2415
|
setTimeout(function () {
|
|
2412
|
-
_this.
|
|
2416
|
+
_this.XvYs();
|
|
2413
2417
|
}, 10);
|
|
2414
2418
|
}
|
|
2415
|
-
_this.
|
|
2416
|
-
_this.
|
|
2417
|
-
_this.
|
|
2418
|
-
if (_this.
|
|
2419
|
+
_this.ymdm = length;
|
|
2420
|
+
_this.TNJX(conditions, length);
|
|
2421
|
+
_this.pnkr();
|
|
2422
|
+
if (_this.TAxm.enable_goal_events) {
|
|
2419
2423
|
var goal_events = config.terminate_info.goal_events.events;
|
|
2420
2424
|
var goaleventslength = goal_events.length;
|
|
2421
2425
|
for (var i = 0; i < goaleventslength; i++) {
|
|
2422
2426
|
var conditionValidator = new ConditionValidator();
|
|
2423
|
-
if (conditionValidator.initialize(goal_events[i], _this.
|
|
2424
|
-
_this.
|
|
2427
|
+
if (conditionValidator.initialize(goal_events[i], _this.ABDA, i, true, [], _this._across_sessions, "termination")) {
|
|
2428
|
+
_this.vqdX.push(conditionValidator);
|
|
2425
2429
|
}
|
|
2426
2430
|
}
|
|
2427
2431
|
}
|
|
2428
|
-
return _this.
|
|
2432
|
+
return _this.qfrr.length > 0;
|
|
2429
2433
|
} catch (error) {
|
|
2430
2434
|
Logger$a.error(error);
|
|
2431
2435
|
return false;
|
|
2432
2436
|
}
|
|
2433
2437
|
});
|
|
2434
|
-
_defineProperty(this, "
|
|
2438
|
+
_defineProperty(this, "TNJX", function (conditions, length) {
|
|
2435
2439
|
var _loop = function _loop() {
|
|
2436
|
-
_this.
|
|
2440
|
+
_this.IyJN = [];
|
|
2437
2441
|
var condition = conditions[index];
|
|
2438
2442
|
var condition_type = condition !== null && condition !== void 0 && condition.condition_type ? condition === null || condition === void 0 ? void 0 : condition.condition_type : "single";
|
|
2439
2443
|
if (condition_type === "group") {
|
|
@@ -2441,32 +2445,32 @@
|
|
|
2441
2445
|
var conditions_v2 = condition.conditions_v2;
|
|
2442
2446
|
_this.groupCombineOperator = condition.combine_operator;
|
|
2443
2447
|
var groupRespectSequence = condition === null || condition === void 0 ? void 0 : condition.sequence_type;
|
|
2444
|
-
_this.
|
|
2445
|
-
var groupValidator = _this.
|
|
2446
|
-
_this.
|
|
2447
|
-
//this.
|
|
2448
|
+
_this.qIOQ = new GroupConditionValidator();
|
|
2449
|
+
var groupValidator = _this.qIOQ.initialize(conditions_v2, _this.ABDA, index, groupRespectSequence, _this.IyJN, _this.OwjD, _this._across_sessions);
|
|
2450
|
+
_this.qfrr.push(groupValidator);
|
|
2451
|
+
//this.TNJX(condition.conditions_v2, length_child_conditions);
|
|
2448
2452
|
} else {
|
|
2449
2453
|
if (condition.type === "didn't") {
|
|
2450
|
-
var
|
|
2454
|
+
var fHuv$details;
|
|
2451
2455
|
var obj = {
|
|
2452
2456
|
trigger_key: condition.trigger.details.name,
|
|
2453
|
-
no_kpi_array: condition === null || condition === void 0 || (
|
|
2457
|
+
no_kpi_array: condition === null || condition === void 0 || (fHuv$details = condition.details) === null || fHuv$details === void 0 || (fHuv$details = fHuv$details.additional_info) === null || fHuv$details === void 0 ? void 0 : fHuv$details.nkpi,
|
|
2454
2458
|
condition_id: condition === null || condition === void 0 ? void 0 : condition._id,
|
|
2455
2459
|
time_bounds: condition.time_bounds.upper
|
|
2456
2460
|
};
|
|
2457
|
-
_this.
|
|
2461
|
+
_this.IyJN = [].concat(_toConsumableArray(_this.IyJN), [obj]);
|
|
2458
2462
|
}
|
|
2459
|
-
_this.
|
|
2460
|
-
if (_this.
|
|
2461
|
-
_this.
|
|
2463
|
+
_this.qIOQ = new ConditionValidator();
|
|
2464
|
+
if (_this.qIOQ.initialize(condition, _this.ABDA, index, _this.OwjD, _this.IyJN, _this._across_sessions)) {
|
|
2465
|
+
_this.qfrr.push(_this.qIOQ);
|
|
2462
2466
|
var max_retries = (condition === null || condition === void 0 ? void 0 : condition.timeout) / (condition === null || condition === void 0 ? void 0 : condition.findinterval);
|
|
2463
2467
|
var frame_id = (condition === null || condition === void 0 ? void 0 : condition.frameid) || "";
|
|
2464
2468
|
var url = condition === null || condition === void 0 ? void 0 : condition.url;
|
|
2465
2469
|
if (window.location.href === url) {
|
|
2466
2470
|
if (condition.event_type === "view_visibility") {
|
|
2467
2471
|
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.
|
|
2472
|
+
//this.jRNn();
|
|
2473
|
+
_this.XvYs(true);
|
|
2470
2474
|
}
|
|
2471
2475
|
}
|
|
2472
2476
|
}
|
|
@@ -2476,8 +2480,8 @@
|
|
|
2476
2480
|
if (window.location.href === url) {
|
|
2477
2481
|
if (condition.event_type === "view_visibility") {
|
|
2478
2482
|
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.
|
|
2483
|
+
//this.jRNn();
|
|
2484
|
+
_this.XvYs(true);
|
|
2481
2485
|
}
|
|
2482
2486
|
}
|
|
2483
2487
|
}
|
|
@@ -2489,188 +2493,188 @@
|
|
|
2489
2493
|
_loop();
|
|
2490
2494
|
}
|
|
2491
2495
|
});
|
|
2492
|
-
_defineProperty(this, "
|
|
2493
|
-
if (_this._across_sessions && _this.
|
|
2496
|
+
_defineProperty(this, "pnkr", function () {
|
|
2497
|
+
if (_this._across_sessions && _this.OwjD === "ordered") {
|
|
2494
2498
|
var satisfied = false;
|
|
2495
2499
|
var no_KPI_TriggerDetails = Apxor.getController().getFromStorage("apx_nokpi_triggerdetails");
|
|
2496
2500
|
no_KPI_TriggerDetails = JSON.parse(no_KPI_TriggerDetails);
|
|
2497
2501
|
if (no_KPI_TriggerDetails != null && no_KPI_TriggerDetails != undefined) {
|
|
2498
2502
|
var _loop2 = function _loop2(i) {
|
|
2499
2503
|
var _this$_conditionValid, _this$_conditionValid2, _this$_conditionValid3;
|
|
2500
|
-
if ((_this$_conditionValid = _this.
|
|
2501
|
-
if (_this.
|
|
2502
|
-
var conditionValidatorId = _this.
|
|
2503
|
-
var matchingObject = _this.
|
|
2504
|
+
if ((_this$_conditionValid = _this.qfrr[i]) !== null && _this$_conditionValid !== void 0 && (_this$_conditionValid = _this$_conditionValid.fHuv) !== null && _this$_conditionValid !== void 0 && _this$_conditionValid._timeEnabled && _this.qfrr[i].length === undefined) {
|
|
2505
|
+
if (_this.qfrr[i].fHuv.DFrC === "didn't") {
|
|
2506
|
+
var conditionValidatorId = _this.qfrr[i].fHuv._id;
|
|
2507
|
+
var matchingObject = _this.ldkM(conditionValidatorId, no_KPI_TriggerDetails);
|
|
2504
2508
|
if (matchingObject) {
|
|
2505
2509
|
if (Date.now() > matchingObject.finishTime) {
|
|
2506
|
-
_this.
|
|
2507
|
-
_this.
|
|
2510
|
+
_this.qfrr[i].yoCa = true;
|
|
2511
|
+
_this.qfrr[i].XmsR = matchingObject.satisfiedCount;
|
|
2508
2512
|
satisfied = true;
|
|
2509
2513
|
} else {
|
|
2510
2514
|
var timeleft = matchingObject.finishTime - Date.now();
|
|
2511
|
-
var eventCategory = _this.
|
|
2515
|
+
var eventCategory = _this.qfrr[i].fHuv._eventCategory ? _this.qfrr[i].fHuv._eventCategory : "specific_event";
|
|
2512
2516
|
var ceInstance = new CE();
|
|
2513
2517
|
if (eventCategory === "specific_event") {
|
|
2514
|
-
ceInstance.registerForEvent(generateKey(_this.
|
|
2515
|
-
_this.
|
|
2518
|
+
ceInstance.registerForEvent(generateKey(_this.qfrr[i].fHuv.vDdr) + "___" + _this.qfrr[i].fHuv.uXsD.UGic, _this.yLyk);
|
|
2519
|
+
_this.bsQT = _this.qfrr[i];
|
|
2516
2520
|
} else {
|
|
2517
|
-
_this.
|
|
2521
|
+
_this.xrGZ(eventCategory);
|
|
2518
2522
|
}
|
|
2519
2523
|
setTimeout(function () {
|
|
2520
|
-
if (i === _this.
|
|
2521
|
-
_this.
|
|
2522
|
-
_this.
|
|
2524
|
+
if (i === _this.qfrr.length - 1 && !_this.xyKD) {
|
|
2525
|
+
_this.qfrr[i].yoCa = true;
|
|
2526
|
+
_this.qfrr[i].XmsR = matchingObject.satisfiedCount;
|
|
2523
2527
|
satisfied = true;
|
|
2524
2528
|
if (eventCategory === "specific_event") {
|
|
2525
|
-
ceInstance.unregisterFromEvent(generateKey(_this.
|
|
2529
|
+
ceInstance.unregisterFromEvent(generateKey(_this.qfrr[i].fHuv.vDdr) + "___" + _this.qfrr[i].fHuv.uXsD.UGic, _this.yLyk);
|
|
2526
2530
|
} else {
|
|
2527
|
-
_this.
|
|
2531
|
+
_this.JoxB(_this.qfrr[i]);
|
|
2528
2532
|
}
|
|
2529
|
-
_this.
|
|
2533
|
+
_this.XvYs();
|
|
2530
2534
|
}
|
|
2531
2535
|
}, timeleft);
|
|
2532
2536
|
}
|
|
2533
2537
|
}
|
|
2534
2538
|
}
|
|
2535
|
-
if (_this.
|
|
2536
|
-
var _conditionValidatorId = _this.
|
|
2537
|
-
var _matchingObject = _this.
|
|
2539
|
+
if (_this.qfrr[i].fHuv.DFrC === "did") {
|
|
2540
|
+
var _conditionValidatorId = _this.qfrr[i].fHuv._id;
|
|
2541
|
+
var _matchingObject = _this.ldkM(_conditionValidatorId, no_KPI_TriggerDetails);
|
|
2538
2542
|
if (_matchingObject) {
|
|
2539
2543
|
if (_matchingObject.satisfiedCount == null) {
|
|
2540
2544
|
if (Date.now() < _matchingObject.finishTime) {
|
|
2541
|
-
_this.
|
|
2542
|
-
_this.
|
|
2545
|
+
_this.vpAf = _matchingObject;
|
|
2546
|
+
_this.GGny = i;
|
|
2543
2547
|
var _timeleft = _matchingObject.finishTime - Date.now();
|
|
2544
|
-
var _eventCategory = _this.
|
|
2548
|
+
var _eventCategory = _this.qfrr[i].fHuv._eventCategory ? _this.qfrr[i].fHuv._eventCategory : "specific_event";
|
|
2545
2549
|
var _ceInstance = new CE();
|
|
2546
2550
|
if (_eventCategory === "specific_event") {
|
|
2547
|
-
_ceInstance.registerForEvent(generateKey(_this.
|
|
2551
|
+
_ceInstance.registerForEvent(generateKey(_this.qfrr[i].fHuv.vDdr) + "___" + _this.qfrr[i].fHuv.uXsD.UGic, _this.Daaj);
|
|
2548
2552
|
} else {
|
|
2549
|
-
_this.
|
|
2553
|
+
_this.xrGZ(_eventCategory);
|
|
2550
2554
|
}
|
|
2551
2555
|
setTimeout(function () {
|
|
2552
2556
|
if (_eventCategory === "specific_event") {
|
|
2553
|
-
_ceInstance.unregisterFromEvent(generateKey(_this.
|
|
2557
|
+
_ceInstance.unregisterFromEvent(generateKey(_this.qfrr[i].fHuv.vDdr) + "___" + _this.qfrr[i].fHuv.uXsD.UGic, _this.Daaj);
|
|
2554
2558
|
} else {
|
|
2555
|
-
_this.
|
|
2559
|
+
_this.JoxB(_this.qfrr[i]);
|
|
2556
2560
|
}
|
|
2557
2561
|
}, _timeleft);
|
|
2558
2562
|
}
|
|
2559
2563
|
} else {
|
|
2560
|
-
_this.
|
|
2561
|
-
_this.
|
|
2564
|
+
_this.qfrr[i].XmsR = _matchingObject.satisfiedCount;
|
|
2565
|
+
_this.qfrr[i].yoCa = true;
|
|
2562
2566
|
}
|
|
2563
2567
|
}
|
|
2564
2568
|
}
|
|
2565
2569
|
} else {
|
|
2566
|
-
satisfied = _this.
|
|
2570
|
+
satisfied = _this.BzBT(i, no_KPI_TriggerDetails);
|
|
2567
2571
|
}
|
|
2568
|
-
if (satisfied && (!((_this$_conditionValid2 = _this.
|
|
2569
|
-
if (i === _this.
|
|
2570
|
-
_this.
|
|
2572
|
+
if (satisfied && (!((_this$_conditionValid2 = _this.qfrr[i]) !== null && _this$_conditionValid2 !== void 0 && (_this$_conditionValid2 = _this$_conditionValid2.fHuv) !== null && _this$_conditionValid2 !== void 0 && _this$_conditionValid2._timeEnabled) || ((_this$_conditionValid3 = _this.qfrr[i]) === null || _this$_conditionValid3 === void 0 ? void 0 : _this$_conditionValid3.length) > 1)) {
|
|
2573
|
+
if (i === _this.qfrr.length - 1) {
|
|
2574
|
+
_this.XvYs();
|
|
2571
2575
|
}
|
|
2572
2576
|
} else if (!satisfied) {
|
|
2573
|
-
if (!_this.
|
|
2577
|
+
if (!_this.qfrr[i].length === undefined) _this.qfrr[i].jRNn();
|
|
2574
2578
|
}
|
|
2575
2579
|
};
|
|
2576
|
-
for (var i = 0; i < _this.
|
|
2580
|
+
for (var i = 0; i < _this.qfrr.length; i++) {
|
|
2577
2581
|
_loop2(i);
|
|
2578
2582
|
}
|
|
2579
2583
|
}
|
|
2580
|
-
} else if (_this._across_sessions && _this.
|
|
2584
|
+
} else if (_this._across_sessions && _this.OwjD === "unordered") {
|
|
2581
2585
|
var _no_KPI_TriggerDetails = Apxor.getController().getFromStorage("apx_nokpi_triggerdetails");
|
|
2582
2586
|
_no_KPI_TriggerDetails = JSON.parse(_no_KPI_TriggerDetails);
|
|
2583
2587
|
if (_no_KPI_TriggerDetails != null && _no_KPI_TriggerDetails != undefined) {
|
|
2584
|
-
for (var _i = 0; _i < _this.
|
|
2585
|
-
_this.
|
|
2588
|
+
for (var _i = 0; _i < _this.qfrr.length; _i++) {
|
|
2589
|
+
_this.BzBT(_i, _no_KPI_TriggerDetails);
|
|
2586
2590
|
}
|
|
2587
2591
|
}
|
|
2588
2592
|
}
|
|
2589
2593
|
});
|
|
2590
|
-
_defineProperty(this, "
|
|
2591
|
-
if (_this.
|
|
2592
|
-
var conditionValidatorId = _this.
|
|
2594
|
+
_defineProperty(this, "BzBT", function (index, no_KPI_TriggerDetails) {
|
|
2595
|
+
if (_this.qfrr[index].length === undefined || _this.qfrr[index].length === 1) {
|
|
2596
|
+
var conditionValidatorId = _this.qfrr[index].fHuv._id;
|
|
2593
2597
|
var satisfied = false;
|
|
2594
|
-
var matchingObject = _this.
|
|
2598
|
+
var matchingObject = _this.ldkM(conditionValidatorId, no_KPI_TriggerDetails);
|
|
2595
2599
|
if (matchingObject) {
|
|
2596
|
-
_this.
|
|
2600
|
+
_this.JILc = matchingObject;
|
|
2597
2601
|
var validator = new ConditionValidator();
|
|
2598
|
-
satisfied = validator.
|
|
2602
|
+
satisfied = validator.dZrw(matchingObject.satisfiedCount, _this.qfrr[index].fHuv.oBTS, _this.qfrr[index].fHuv.SGjX);
|
|
2599
2603
|
if (matchingObject) {
|
|
2600
2604
|
if (satisfied) {
|
|
2601
|
-
_this.
|
|
2605
|
+
_this.qfrr[index].yoCa = true;
|
|
2602
2606
|
} else {
|
|
2603
|
-
_this.
|
|
2607
|
+
_this.qfrr[index].XmsR = matchingObject.satisfiedCount;
|
|
2604
2608
|
}
|
|
2605
2609
|
}
|
|
2606
2610
|
} else {
|
|
2607
|
-
_this.
|
|
2611
|
+
_this.qfrr[index].jRNn();
|
|
2608
2612
|
}
|
|
2609
2613
|
return satisfied;
|
|
2610
|
-
} else if (_this.
|
|
2614
|
+
} else if (_this.qfrr[index].length >= 1) {
|
|
2611
2615
|
var _this$_conditionValid4;
|
|
2612
2616
|
var groupRespectSequence = "unordered";
|
|
2613
|
-
groupRespectSequence = (_this$_conditionValid4 = _this.
|
|
2617
|
+
groupRespectSequence = (_this$_conditionValid4 = _this.qfrr[index]) === null || _this$_conditionValid4 === void 0 ? void 0 : _this$_conditionValid4.sequence_type;
|
|
2614
2618
|
var individualConditionSatisfied;
|
|
2615
2619
|
if (groupRespectSequence === "ordered" || groupRespectSequence === "strictly_ordered") {
|
|
2616
|
-
for (var i = 0; i < _this.
|
|
2617
|
-
var individualCondition = _this.
|
|
2618
|
-
var singleConditionValidatorId = individualCondition.
|
|
2620
|
+
for (var i = 0; i < _this.qfrr[index].length; i++) {
|
|
2621
|
+
var individualCondition = _this.qfrr[index][i];
|
|
2622
|
+
var singleConditionValidatorId = individualCondition.fHuv._id;
|
|
2619
2623
|
individualConditionSatisfied = false;
|
|
2620
|
-
var _matchingObject2 = _this.
|
|
2624
|
+
var _matchingObject2 = _this.ldkM(singleConditionValidatorId, no_KPI_TriggerDetails);
|
|
2621
2625
|
if (_matchingObject2) {
|
|
2622
2626
|
var _validator = new ConditionValidator();
|
|
2623
|
-
individualConditionSatisfied = _validator.
|
|
2627
|
+
individualConditionSatisfied = _validator.dZrw(_matchingObject2.satisfiedCount, individualCondition.fHuv.oBTS, individualCondition.fHuv.SGjX);
|
|
2624
2628
|
if (_matchingObject2) {
|
|
2625
2629
|
if (individualConditionSatisfied) {
|
|
2626
|
-
_this.
|
|
2630
|
+
_this.qfrr[index][i].yoCa = true;
|
|
2627
2631
|
var childIndex = i + 1;
|
|
2628
|
-
var upcomingValidator = _this.
|
|
2629
|
-
if (upcomingValidator === undefined && isDefined(_this.
|
|
2630
|
-
_this.
|
|
2632
|
+
var upcomingValidator = _this.qfrr[index][i + 1];
|
|
2633
|
+
if (upcomingValidator === undefined && isDefined(_this.qfrr[index + 1])) {
|
|
2634
|
+
_this.qfrr[index + 1].jRNn();
|
|
2631
2635
|
individualConditionSatisfied = true;
|
|
2632
2636
|
}
|
|
2633
2637
|
if (upcomingValidator != undefined) {
|
|
2634
|
-
_this.
|
|
2638
|
+
_this.qfrr[index][i + 1].jRNn(childIndex);
|
|
2635
2639
|
}
|
|
2636
2640
|
} else {
|
|
2637
|
-
_this.
|
|
2641
|
+
_this.qfrr[index][i].XmsR = _matchingObject2.satisfiedCount;
|
|
2638
2642
|
}
|
|
2639
2643
|
}
|
|
2640
2644
|
} else {
|
|
2641
|
-
if (isDefined(_this.
|
|
2642
|
-
_this.
|
|
2643
|
-
} else if (isUndefined(_this.
|
|
2644
|
-
_this.
|
|
2645
|
+
if (isDefined(_this.qfrr[index][i - 1]) && _this.qfrr[index][i].yoCa === true) {
|
|
2646
|
+
_this.qfrr[index][i].jRNn();
|
|
2647
|
+
} else if (isUndefined(_this.qfrr[index][i - 1])) {
|
|
2648
|
+
_this.qfrr[index][i].jRNn();
|
|
2645
2649
|
}
|
|
2646
2650
|
}
|
|
2647
2651
|
}
|
|
2648
2652
|
return individualConditionSatisfied;
|
|
2649
2653
|
} else {
|
|
2650
2654
|
var conditionSatisfiedChecker;
|
|
2651
|
-
for (var _i2 = 0; _i2 < _this.
|
|
2652
|
-
var individualCombineOperator = _this.
|
|
2655
|
+
for (var _i2 = 0; _i2 < _this.qfrr[index].length; _i2++) {
|
|
2656
|
+
var individualCombineOperator = _this.qfrr[index][0].fHuv.yztc;
|
|
2653
2657
|
if (individualCombineOperator === "OR") {
|
|
2654
2658
|
conditionSatisfiedChecker = false;
|
|
2655
2659
|
} else {
|
|
2656
2660
|
conditionSatisfiedChecker = true;
|
|
2657
2661
|
}
|
|
2658
|
-
var _individualCondition = _this.
|
|
2659
|
-
var _singleConditionValidatorId = _individualCondition.
|
|
2662
|
+
var _individualCondition = _this.qfrr[index][_i2];
|
|
2663
|
+
var _singleConditionValidatorId = _individualCondition.fHuv._id;
|
|
2660
2664
|
individualConditionSatisfied = false;
|
|
2661
|
-
var _matchingObject3 = _this.
|
|
2665
|
+
var _matchingObject3 = _this.ldkM(_singleConditionValidatorId, no_KPI_TriggerDetails);
|
|
2662
2666
|
if (_matchingObject3) {
|
|
2663
2667
|
var _validator2 = new ConditionValidator();
|
|
2664
|
-
individualConditionSatisfied = _validator2.
|
|
2668
|
+
individualConditionSatisfied = _validator2.dZrw(_matchingObject3.satisfiedCount, _individualCondition.fHuv.oBTS, _individualCondition.fHuv.SGjX);
|
|
2665
2669
|
if (_matchingObject3) {
|
|
2666
2670
|
if (individualConditionSatisfied) {
|
|
2667
|
-
_this.
|
|
2671
|
+
_this.qfrr[index][_i2].yoCa = true;
|
|
2668
2672
|
} else {
|
|
2669
|
-
_this.
|
|
2673
|
+
_this.qfrr[index][_i2].XmsR = _matchingObject3.satisfiedCount;
|
|
2670
2674
|
}
|
|
2671
2675
|
}
|
|
2672
2676
|
} else {
|
|
2673
|
-
_individualCondition.
|
|
2677
|
+
_individualCondition.jRNn();
|
|
2674
2678
|
}
|
|
2675
2679
|
if (individualCombineOperator === "AND") {
|
|
2676
2680
|
conditionSatisfiedChecker = conditionSatisfiedChecker && individualConditionSatisfied;
|
|
@@ -2682,36 +2686,36 @@
|
|
|
2682
2686
|
}
|
|
2683
2687
|
}
|
|
2684
2688
|
});
|
|
2685
|
-
_defineProperty(this, "
|
|
2689
|
+
_defineProperty(this, "ldkM", function (id, list) {
|
|
2686
2690
|
return list.find(function (obj) {
|
|
2687
2691
|
return obj.id === id;
|
|
2688
2692
|
});
|
|
2689
2693
|
});
|
|
2690
|
-
_defineProperty(this, "
|
|
2694
|
+
_defineProperty(this, "ReXr", function (index) {
|
|
2691
2695
|
var childIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
|
|
2692
2696
|
var ceInstance = CE.getInstance();
|
|
2693
2697
|
if (index < 0) {
|
|
2694
2698
|
return;
|
|
2695
2699
|
}
|
|
2696
|
-
var currentValidator = _this.
|
|
2700
|
+
var currentValidator = _this.qfrr[index];
|
|
2697
2701
|
var groupRespectSequence = "unordered";
|
|
2698
2702
|
if ((currentValidator === null || currentValidator === void 0 ? void 0 : currentValidator.length) > 1) {
|
|
2699
2703
|
groupRespectSequence = currentValidator === null || currentValidator === void 0 ? void 0 : currentValidator.sequence_type;
|
|
2700
2704
|
}
|
|
2701
|
-
if (_this.
|
|
2705
|
+
if (_this.OwjD === true || _this.OwjD === "ordered" || _this.OwjD === "strictly_ordered" || groupRespectSequence === "ordered" || groupRespectSequence === "strictly_ordered") {
|
|
2702
2706
|
_this.kpiIndex = index + 1;
|
|
2703
|
-
var conditionValidator = _this.
|
|
2707
|
+
var conditionValidator = _this.qfrr[index];
|
|
2704
2708
|
if ((conditionValidator === null || conditionValidator === void 0 ? void 0 : conditionValidator.length) > 0) {
|
|
2705
2709
|
if (isDefined(conditionValidator)) {
|
|
2706
|
-
if (_this.
|
|
2710
|
+
if (_this.OwjD === "unordered" && groupRespectSequence === "ordered") {
|
|
2707
2711
|
var prevValidator = currentValidator[childIndex - 1];
|
|
2708
2712
|
if (isDefined(prevValidator)) {
|
|
2709
2713
|
if (prevValidator.length === undefined || prevValidator.length == 1) {
|
|
2710
|
-
if (!prevValidator.
|
|
2714
|
+
if (!prevValidator.yoCa) {
|
|
2711
2715
|
return;
|
|
2712
2716
|
}
|
|
2713
2717
|
} else if (prevValidator.length > 1) {
|
|
2714
|
-
if (!_this.
|
|
2718
|
+
if (!_this.yJXi(prevValidator)) {
|
|
2715
2719
|
return;
|
|
2716
2720
|
}
|
|
2717
2721
|
}
|
|
@@ -2719,103 +2723,103 @@
|
|
|
2719
2723
|
var nextValidator = currentValidator[childIndex + 1];
|
|
2720
2724
|
if (!isDefined(nextValidator)) {
|
|
2721
2725
|
if (groupRespectSequence === "strictly_ordered") {
|
|
2722
|
-
if (_this.
|
|
2723
|
-
_this.
|
|
2726
|
+
if (_this.Zyiy != true) {
|
|
2727
|
+
_this.XvYs();
|
|
2724
2728
|
}
|
|
2725
2729
|
} else {
|
|
2726
2730
|
var _currentValidator$chi;
|
|
2727
2731
|
if (((_currentValidator$chi = currentValidator[childIndex]) === null || _currentValidator$chi === void 0 ? void 0 : _currentValidator$chi.length) > 0) {
|
|
2728
|
-
if (_this.
|
|
2729
|
-
_this.
|
|
2732
|
+
if (_this.yJXi(currentValidator)) {
|
|
2733
|
+
_this.XvYs();
|
|
2730
2734
|
}
|
|
2731
2735
|
} else {
|
|
2732
|
-
_this.
|
|
2736
|
+
_this.XvYs();
|
|
2733
2737
|
}
|
|
2734
2738
|
}
|
|
2735
2739
|
} else {
|
|
2736
|
-
nextValidator.
|
|
2737
|
-
if (_this.
|
|
2738
|
-
_this._currentEventname = conditionValidator[childIndex].
|
|
2740
|
+
nextValidator.jRNn(childIndex + 1);
|
|
2741
|
+
if (_this.OwjD === "strictly_ordered") {
|
|
2742
|
+
_this._currentEventname = conditionValidator[childIndex].fHuv.uXsD.UGic;
|
|
2739
2743
|
var controller = Apxor.getController();
|
|
2740
|
-
controller.registerForEvent(APP_EVENT, _this.
|
|
2741
|
-
controller.registerForEvent(CLIENT_EVENT, _this.
|
|
2744
|
+
controller.registerForEvent(APP_EVENT, _this.nUlv);
|
|
2745
|
+
controller.registerForEvent(CLIENT_EVENT, _this.nUlv);
|
|
2742
2746
|
}
|
|
2743
2747
|
}
|
|
2744
2748
|
} else {
|
|
2745
|
-
var _prevValidator = _this.
|
|
2746
|
-
// if (isDefined(prevValidator) && !prevValidator.
|
|
2749
|
+
var _prevValidator = _this.qfrr[index - 1];
|
|
2750
|
+
// if (isDefined(prevValidator) && !prevValidator.yoCa) {
|
|
2747
2751
|
// return;
|
|
2748
2752
|
// }
|
|
2749
2753
|
if (isDefined(_prevValidator)) {
|
|
2750
2754
|
if (_prevValidator.length === undefined || _prevValidator.length == 1) {
|
|
2751
|
-
if (!_prevValidator.
|
|
2755
|
+
if (!_prevValidator.yoCa) {
|
|
2752
2756
|
return;
|
|
2753
2757
|
}
|
|
2754
2758
|
} else if (_prevValidator.length > 1) {
|
|
2755
|
-
if (!_this.
|
|
2759
|
+
if (!_this.yJXi(_prevValidator)) {
|
|
2756
2760
|
return;
|
|
2757
2761
|
}
|
|
2758
2762
|
}
|
|
2759
2763
|
}
|
|
2760
|
-
var
|
|
2764
|
+
var jaQb;
|
|
2761
2765
|
if (conditionValidator.length === undefined || conditionValidator.length === 1) {
|
|
2762
|
-
|
|
2766
|
+
jaQb = _this.qfrr[index + 1];
|
|
2763
2767
|
} else if (conditionValidator.length > 1) {
|
|
2764
2768
|
if (groupRespectSequence === "ordered" || groupRespectSequence === "strictly_ordered") {
|
|
2765
2769
|
if (childIndex === conditionValidator.length - 1) {
|
|
2766
|
-
|
|
2770
|
+
jaQb = _this.qfrr[index + 1];
|
|
2767
2771
|
} else {
|
|
2768
|
-
|
|
2772
|
+
jaQb = _this.qfrr[index][childIndex + 1];
|
|
2769
2773
|
}
|
|
2770
2774
|
} else {
|
|
2771
|
-
if (_this.
|
|
2772
|
-
|
|
2775
|
+
if (_this.yJXi(conditionValidator)) {
|
|
2776
|
+
jaQb = _this.qfrr[index + 1];
|
|
2773
2777
|
}
|
|
2774
2778
|
}
|
|
2775
2779
|
}
|
|
2776
|
-
if (!isDefined(
|
|
2777
|
-
if (_this.
|
|
2778
|
-
if (_this.
|
|
2779
|
-
_this.
|
|
2780
|
+
if (!isDefined(jaQb)) {
|
|
2781
|
+
if (_this.OwjD === "strictly_ordered") {
|
|
2782
|
+
if (_this.Zyiy != true) {
|
|
2783
|
+
_this.XvYs();
|
|
2780
2784
|
}
|
|
2781
2785
|
} else {
|
|
2782
|
-
if (_this.
|
|
2783
|
-
_this.
|
|
2786
|
+
if (_this.yJXi(conditionValidator)) {
|
|
2787
|
+
_this.XvYs();
|
|
2784
2788
|
}
|
|
2785
2789
|
}
|
|
2786
2790
|
} else {
|
|
2787
|
-
if (
|
|
2788
|
-
|
|
2791
|
+
if (jaQb.length === undefined || jaQb.length === 1) {
|
|
2792
|
+
jaQb.jRNn(childIndex + 1);
|
|
2789
2793
|
} else {
|
|
2790
|
-
if (_this.
|
|
2791
|
-
if (
|
|
2792
|
-
|
|
2793
|
-
} else if (
|
|
2794
|
-
if (
|
|
2795
|
-
for (var i = 0; i <
|
|
2796
|
-
|
|
2794
|
+
if (_this.yJXi(conditionValidator)) {
|
|
2795
|
+
if (jaQb.length === undefined) {
|
|
2796
|
+
jaQb.jRNn();
|
|
2797
|
+
} else if (jaQb.length > 1) {
|
|
2798
|
+
if (jaQb.sequence_type === "unordered") {
|
|
2799
|
+
for (var i = 0; i < jaQb.length; i++) {
|
|
2800
|
+
jaQb[i].jRNn(i);
|
|
2797
2801
|
}
|
|
2798
|
-
} else if (
|
|
2799
|
-
|
|
2802
|
+
} else if (jaQb.sequence_type === "ordered" || jaQb.sequence_type === "strictly_ordered") {
|
|
2803
|
+
jaQb[0].jRNn(0);
|
|
2800
2804
|
}
|
|
2801
2805
|
}
|
|
2802
2806
|
}
|
|
2803
2807
|
}
|
|
2804
|
-
if (_this.
|
|
2805
|
-
_this._currentEventname = conditionValidator[childIndex].
|
|
2806
|
-
var
|
|
2807
|
-
|
|
2808
|
-
|
|
2808
|
+
if (_this.OwjD === "strictly_ordered") {
|
|
2809
|
+
_this._currentEventname = conditionValidator[childIndex].fHuv.uXsD.UGic;
|
|
2810
|
+
var IGdf = Apxor.getController();
|
|
2811
|
+
IGdf.registerForEvent(APP_EVENT, _this.nUlv);
|
|
2812
|
+
IGdf.registerForEvent(CLIENT_EVENT, _this.nUlv);
|
|
2809
2813
|
}
|
|
2810
2814
|
}
|
|
2811
2815
|
}
|
|
2812
2816
|
}
|
|
2813
2817
|
} else {
|
|
2814
|
-
if (isDefined(conditionValidator) && conditionValidator.
|
|
2815
|
-
conditionValidator.
|
|
2818
|
+
if (isDefined(conditionValidator) && conditionValidator.yoCa) {
|
|
2819
|
+
conditionValidator.gwWN[conditionValidator.fHuv.uXsD.UGic] = Date.now();
|
|
2816
2820
|
// Check if previous validator is satisfied
|
|
2817
|
-
var _prevValidator2 = _this.
|
|
2818
|
-
// if (isDefined(prevValidator) && !prevValidator.
|
|
2821
|
+
var _prevValidator2 = _this.qfrr[index - 1];
|
|
2822
|
+
// if (isDefined(prevValidator) && !prevValidator.yoCa) {
|
|
2819
2823
|
// // TODO: If current index is satisfied before previous one, do something
|
|
2820
2824
|
// // either unregister all conditions or remove this item from ConfigLookup
|
|
2821
2825
|
// return;
|
|
@@ -2823,113 +2827,113 @@
|
|
|
2823
2827
|
|
|
2824
2828
|
if (isDefined(_prevValidator2)) {
|
|
2825
2829
|
if (_prevValidator2.length === undefined || _prevValidator2.length == 1) {
|
|
2826
|
-
if (!_prevValidator2.
|
|
2830
|
+
if (!_prevValidator2.yoCa) {
|
|
2827
2831
|
return;
|
|
2828
2832
|
}
|
|
2829
2833
|
} else if (_prevValidator2.length > 1) {
|
|
2830
|
-
if (!_this.
|
|
2834
|
+
if (!_this.yJXi(_prevValidator2)) {
|
|
2831
2835
|
return;
|
|
2832
2836
|
}
|
|
2833
2837
|
}
|
|
2834
2838
|
}
|
|
2835
|
-
var _nextValidator2 = _this.
|
|
2839
|
+
var _nextValidator2 = _this.qfrr[index + 1];
|
|
2836
2840
|
if (!isDefined(_nextValidator2)) {
|
|
2837
2841
|
// It means this is the last condition
|
|
2838
2842
|
// Validate all conditions
|
|
2839
|
-
if (_this.
|
|
2840
|
-
if (_this.
|
|
2841
|
-
_this.
|
|
2843
|
+
if (_this.OwjD === "strictly_ordered") {
|
|
2844
|
+
if (_this.Zyiy != true) {
|
|
2845
|
+
_this.XvYs();
|
|
2842
2846
|
}
|
|
2843
2847
|
} else {
|
|
2844
|
-
_this.
|
|
2848
|
+
_this.XvYs();
|
|
2845
2849
|
}
|
|
2846
2850
|
} else {
|
|
2847
2851
|
var _nextValidator2$_cond;
|
|
2848
|
-
if (_nextValidator2 !== null && _nextValidator2 !== void 0 && (_nextValidator2$_cond = _nextValidator2.
|
|
2852
|
+
if (_nextValidator2 !== null && _nextValidator2 !== void 0 && (_nextValidator2$_cond = _nextValidator2.fHuv) !== null && _nextValidator2$_cond !== void 0 && _nextValidator2$_cond._timeEnabled) {
|
|
2849
2853
|
var _nextValidator2$_cond2;
|
|
2850
|
-
if (((_nextValidator2$_cond2 = _nextValidator2.
|
|
2854
|
+
if (((_nextValidator2$_cond2 = _nextValidator2.fHuv) === null || _nextValidator2$_cond2 === void 0 ? void 0 : _nextValidator2$_cond2._time.unit) != "session") {
|
|
2851
2855
|
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.
|
|
2856
|
+
var timeInMillisec = calculateTime(_nextValidator2.fHuv._time.unit, _nextValidator2.fHuv._time.value);
|
|
2857
|
+
if (((_nextValidator2$_cond3 = _nextValidator2.fHuv) === null || _nextValidator2$_cond3 === void 0 ? void 0 : _nextValidator2$_cond3.DFrC) == "didn't") {
|
|
2858
|
+
_this.DBxj = setTimeout(function () {
|
|
2859
|
+
if (!_this.xyKD) {
|
|
2860
|
+
_this.xyKD = false;
|
|
2861
|
+
_nextValidator2.yoCa = true;
|
|
2862
|
+
if (_nextValidator2.yoCa) {
|
|
2863
|
+
_nextValidator2.XmsR += 1;
|
|
2860
2864
|
var _conditionValidator = new ConditionValidator();
|
|
2861
|
-
_nextValidator2.
|
|
2862
|
-
if (_nextValidator2.
|
|
2863
|
-
_nextValidator2.
|
|
2865
|
+
_nextValidator2.yoCa = _conditionValidator.dZrw(_nextValidator2.XmsR, _nextValidator2.fHuv.oBTS, _nextValidator2.fHuv.SGjX);
|
|
2866
|
+
if (_nextValidator2.yoCa) {
|
|
2867
|
+
_nextValidator2.fHuv.QQId = Date.now();
|
|
2864
2868
|
var nextIndex = index + 1;
|
|
2865
|
-
var upcomingValidator = _this.
|
|
2869
|
+
var upcomingValidator = _this.qfrr[nextIndex + 1];
|
|
2866
2870
|
if (!isDefined(upcomingValidator)) {
|
|
2867
|
-
// this.
|
|
2868
|
-
_this.
|
|
2871
|
+
// this.xyKD = false;
|
|
2872
|
+
_this.XvYs();
|
|
2869
2873
|
} else {
|
|
2870
|
-
upcomingValidator.
|
|
2874
|
+
upcomingValidator.jRNn();
|
|
2871
2875
|
}
|
|
2872
|
-
// ceInstance.validate(this.
|
|
2876
|
+
// ceInstance.validate(this.ABDA, index);
|
|
2873
2877
|
}
|
|
2874
2878
|
}
|
|
2875
2879
|
|
|
2876
|
-
ceInstance.unregisterFromEvent(generateKey(_nextValidator2.
|
|
2877
|
-
_nextValidator2.
|
|
2880
|
+
ceInstance.unregisterFromEvent(generateKey(_nextValidator2.fHuv.vDdr) + "___" + _nextValidator2.fHuv.uXsD.UGic, _this.yLyk);
|
|
2881
|
+
_nextValidator2.zWyW = false;
|
|
2878
2882
|
} else {
|
|
2879
|
-
_this.
|
|
2883
|
+
_this.xyKD = false;
|
|
2880
2884
|
}
|
|
2881
2885
|
}, timeInMillisec);
|
|
2882
2886
|
if (_this._across_sessions) {
|
|
2883
|
-
var _timeInMillisec = calculateTime(_nextValidator2.
|
|
2884
|
-
var timeEnabled = _nextValidator2.
|
|
2885
|
-
var condition_id = _nextValidator2.
|
|
2887
|
+
var _timeInMillisec = calculateTime(_nextValidator2.fHuv._time.unit, _nextValidator2.fHuv._time.value);
|
|
2888
|
+
var timeEnabled = _nextValidator2.fHuv._timeEnabled;
|
|
2889
|
+
var condition_id = _nextValidator2.fHuv._id;
|
|
2886
2890
|
var cv = new ConditionValidator();
|
|
2887
|
-
cv.
|
|
2891
|
+
cv.rbcW(_nextValidator2.fHuv.DFrC, _nextValidator2.fHuv.uXsD.UGic, Date.now(), _nextValidator2.fHuv.uXsD.cIhR, _timeInMillisec, timeEnabled, condition_id);
|
|
2888
2892
|
}
|
|
2889
|
-
if (_nextValidator2.
|
|
2890
|
-
ceInstance.registerForEvent(generateKey(_nextValidator2.
|
|
2891
|
-
_this.
|
|
2893
|
+
if (_nextValidator2.fHuv._eventCategory === "specific_event") {
|
|
2894
|
+
ceInstance.registerForEvent(generateKey(_nextValidator2.fHuv.vDdr) + "___" + _nextValidator2.fHuv.uXsD.UGic, _this.yLyk);
|
|
2895
|
+
_this.bsQT = _nextValidator2;
|
|
2892
2896
|
} else {
|
|
2893
|
-
_this.
|
|
2897
|
+
_this.xrGZ(_nextValidator2);
|
|
2894
2898
|
}
|
|
2895
|
-
} else if (((_nextValidator2$_cond4 = _nextValidator2.
|
|
2896
|
-
_this.
|
|
2897
|
-
_this.
|
|
2898
|
-
if (isDefined(_this.
|
|
2899
|
-
_this.
|
|
2899
|
+
} else if (((_nextValidator2$_cond4 = _nextValidator2.fHuv) === null || _nextValidator2$_cond4 === void 0 ? void 0 : _nextValidator2$_cond4.DFrC) == "did") {
|
|
2900
|
+
_this.xyKD = false;
|
|
2901
|
+
_this.jaQb = _nextValidator2;
|
|
2902
|
+
if (isDefined(_this.qfrr[index + 2]) && _this._across_sessions) {
|
|
2903
|
+
_this.YXfN = _this.qfrr[index + 2];
|
|
2900
2904
|
}
|
|
2901
|
-
_this.
|
|
2902
|
-
if (!_this.
|
|
2903
|
-
_this.
|
|
2904
|
-
ceInstance.unregisterFromEvent(generateKey(_nextValidator2.
|
|
2905
|
+
_this.MhIU = setTimeout(function () {
|
|
2906
|
+
if (!_this.xyKD) {
|
|
2907
|
+
_this.xyKD = false;
|
|
2908
|
+
ceInstance.unregisterFromEvent(generateKey(_nextValidator2.fHuv.vDdr) + "___" + _nextValidator2.fHuv.uXsD.UGic, _this.SLEo);
|
|
2905
2909
|
} else {
|
|
2906
|
-
_this.
|
|
2910
|
+
_this.xyKD = false;
|
|
2907
2911
|
}
|
|
2908
2912
|
}, timeInMillisec);
|
|
2909
|
-
_this.
|
|
2913
|
+
_this.sHdE = conditionValidator;
|
|
2910
2914
|
_this.timeForKPI = timeInMillisec;
|
|
2911
|
-
ceInstance.registerForEvent(generateKey(_nextValidator2.
|
|
2912
|
-
_this.
|
|
2915
|
+
ceInstance.registerForEvent(generateKey(_nextValidator2.fHuv.vDdr) + "___" + _nextValidator2.fHuv.uXsD.UGic, _this.SLEo);
|
|
2916
|
+
_this.FefJ = _nextValidator2;
|
|
2913
2917
|
if (_this._across_sessions) {
|
|
2914
|
-
var _timeInMillisec2 = calculateTime(_nextValidator2.
|
|
2915
|
-
var _timeEnabled = _nextValidator2.
|
|
2916
|
-
var _condition_id = _nextValidator2.
|
|
2918
|
+
var _timeInMillisec2 = calculateTime(_nextValidator2.fHuv._time.unit, _nextValidator2.fHuv._time.value);
|
|
2919
|
+
var _timeEnabled = _nextValidator2.fHuv._timeEnabled;
|
|
2920
|
+
var _condition_id = _nextValidator2.fHuv._id;
|
|
2917
2921
|
var _cv = new ConditionValidator();
|
|
2918
|
-
_cv.
|
|
2922
|
+
_cv.rbcW(_nextValidator2.fHuv.DFrC, _nextValidator2.fHuv.uXsD.UGic, Date.now(), _nextValidator2.fHuv.uXsD.cIhR, _timeInMillisec2, _timeEnabled, _condition_id);
|
|
2919
2923
|
}
|
|
2920
2924
|
}
|
|
2921
2925
|
}
|
|
2922
2926
|
} else {
|
|
2923
2927
|
if (_nextValidator2.length > 0) {
|
|
2924
2928
|
if (_nextValidator2.sequence_type === "ordered" || _nextValidator2.sequence_type === "strictly_ordered") {
|
|
2925
|
-
_nextValidator2[0].
|
|
2929
|
+
_nextValidator2[0].jRNn(childIndex + 1);
|
|
2926
2930
|
} else {
|
|
2927
2931
|
var _iterator = _createForOfIteratorHelper(_nextValidator2),
|
|
2928
2932
|
_step;
|
|
2929
2933
|
try {
|
|
2930
2934
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
2931
2935
|
var validator = _step.value;
|
|
2932
|
-
validator.
|
|
2936
|
+
validator.jRNn();
|
|
2933
2937
|
}
|
|
2934
2938
|
} catch (err) {
|
|
2935
2939
|
_iterator.e(err);
|
|
@@ -2938,87 +2942,87 @@
|
|
|
2938
2942
|
}
|
|
2939
2943
|
}
|
|
2940
2944
|
} else {
|
|
2941
|
-
_nextValidator2.
|
|
2945
|
+
_nextValidator2.jRNn();
|
|
2942
2946
|
}
|
|
2943
2947
|
}
|
|
2944
|
-
if (_this.
|
|
2945
|
-
_this._currentEventname = conditionValidator.
|
|
2948
|
+
if (_this.OwjD === "strictly_ordered") {
|
|
2949
|
+
_this._currentEventname = conditionValidator.fHuv.uXsD.UGic;
|
|
2946
2950
|
var _controller2 = Apxor.getController();
|
|
2947
|
-
_controller2.registerForEvent(APP_EVENT, _this.
|
|
2948
|
-
_controller2.registerForEvent(CLIENT_EVENT, _this.
|
|
2951
|
+
_controller2.registerForEvent(APP_EVENT, _this.nUlv);
|
|
2952
|
+
_controller2.registerForEvent(CLIENT_EVENT, _this.nUlv);
|
|
2949
2953
|
}
|
|
2950
2954
|
}
|
|
2951
2955
|
}
|
|
2952
2956
|
}
|
|
2953
2957
|
} else {
|
|
2954
2958
|
// Validate all conditions
|
|
2955
|
-
_this.
|
|
2956
|
-
_this.
|
|
2959
|
+
_this.iUCb();
|
|
2960
|
+
_this.XvYs();
|
|
2957
2961
|
}
|
|
2958
2962
|
});
|
|
2959
|
-
_defineProperty(this, "
|
|
2963
|
+
_defineProperty(this, "nUlv", function (event) {
|
|
2960
2964
|
if (event && event.name != _this._currentEventname) {
|
|
2961
|
-
_this.
|
|
2965
|
+
_this.Zyiy = true;
|
|
2962
2966
|
return;
|
|
2963
2967
|
}
|
|
2964
2968
|
});
|
|
2965
|
-
_defineProperty(this, "
|
|
2969
|
+
_defineProperty(this, "xrGZ", function (validator) {
|
|
2966
2970
|
var ceInstance = new CE();
|
|
2967
|
-
var eventCategory = validator.
|
|
2971
|
+
var eventCategory = validator.fHuv._eventCategory;
|
|
2968
2972
|
if (eventCategory === "apxor_event") {
|
|
2969
|
-
ceInstance.registerForEvent("apxor_event", _this.
|
|
2973
|
+
ceInstance.registerForEvent("apxor_event", _this.yLyk);
|
|
2970
2974
|
} else if (eventCategory === "customer_event") {
|
|
2971
|
-
ceInstance.registerForEvent("customer_event", _this.
|
|
2975
|
+
ceInstance.registerForEvent("customer_event", _this.yLyk);
|
|
2972
2976
|
} else if (eventCategory === "any_event") {
|
|
2973
|
-
ceInstance.registerForEvent("any_event", _this.
|
|
2977
|
+
ceInstance.registerForEvent("any_event", _this.yLyk);
|
|
2974
2978
|
} else if (eventCategory === "campaign_event") {
|
|
2975
|
-
ceInstance.registerForEvent("campaign_event", _this.
|
|
2979
|
+
ceInstance.registerForEvent("campaign_event", _this.yLyk);
|
|
2976
2980
|
} else if (eventCategory === "survey_event") {
|
|
2977
|
-
ceInstance.registerForEvent("survey_event", _this.
|
|
2981
|
+
ceInstance.registerForEvent("survey_event", _this.yLyk);
|
|
2978
2982
|
}
|
|
2979
2983
|
});
|
|
2980
|
-
_defineProperty(this, "
|
|
2984
|
+
_defineProperty(this, "JoxB", function (validator) {
|
|
2981
2985
|
var ceInstance = new CE();
|
|
2982
|
-
var eventCategory = validator.
|
|
2986
|
+
var eventCategory = validator.fHuv._eventCategory;
|
|
2983
2987
|
if (eventCategory === "apxor_event") {
|
|
2984
|
-
ceInstance.unregisterFromEvent("apxor_event", _this.
|
|
2988
|
+
ceInstance.unregisterFromEvent("apxor_event", _this.yLyk);
|
|
2985
2989
|
} else if (eventCategory === "customer_event") {
|
|
2986
|
-
ceInstance.unregisterFromEvent("customer_event", _this.
|
|
2990
|
+
ceInstance.unregisterFromEvent("customer_event", _this.yLyk);
|
|
2987
2991
|
} else if (eventCategory === "any_event") {
|
|
2988
|
-
ceInstance.unregisterFromEvent("any_event", _this.
|
|
2992
|
+
ceInstance.unregisterFromEvent("any_event", _this.yLyk);
|
|
2989
2993
|
} else if (eventCategory === "campaign_event") {
|
|
2990
|
-
ceInstance.unregisterFromEvent("campaign_event", _this.
|
|
2994
|
+
ceInstance.unregisterFromEvent("campaign_event", _this.yLyk);
|
|
2991
2995
|
} else if (eventCategory === "survey_event") {
|
|
2992
|
-
ceInstance.unregisterFromEvent("survey_event", _this.
|
|
2996
|
+
ceInstance.unregisterFromEvent("survey_event", _this.yLyk);
|
|
2993
2997
|
}
|
|
2994
2998
|
});
|
|
2995
|
-
_defineProperty(this, "
|
|
2999
|
+
_defineProperty(this, "yLyk", function () {
|
|
2996
3000
|
var _this$_unregisterVali, _this$_unregisterVali2;
|
|
2997
|
-
if (_this.
|
|
2998
|
-
_this.
|
|
2999
|
-
clearTimeout(_this.
|
|
3001
|
+
if (_this.DBxj) {
|
|
3002
|
+
_this.xyKD = false;
|
|
3003
|
+
clearTimeout(_this.DBxj);
|
|
3000
3004
|
}
|
|
3001
3005
|
var ceInstance = new CE();
|
|
3002
|
-
_this.
|
|
3006
|
+
_this.xyKD = true;
|
|
3003
3007
|
if (_this._across_sessions) {
|
|
3004
3008
|
if (localStorage.getItem("apx_nokpi_triggerdetails") !== null) {
|
|
3005
3009
|
localStorage.removeItem("apx_nokpi_triggerdetails");
|
|
3006
3010
|
}
|
|
3007
3011
|
}
|
|
3008
|
-
ceInstance.unregisterFromEvent(generateKey((_this$_unregisterVali = _this.
|
|
3012
|
+
ceInstance.unregisterFromEvent(generateKey((_this$_unregisterVali = _this.bsQT) === null || _this$_unregisterVali === void 0 || (_this$_unregisterVali = _this$_unregisterVali.fHuv) === null || _this$_unregisterVali === void 0 ? void 0 : _this$_unregisterVali.vDdr) + "___" + ((_this$_unregisterVali2 = _this.bsQT) === null || _this$_unregisterVali2 === void 0 || (_this$_unregisterVali2 = _this$_unregisterVali2.fHuv) === null || _this$_unregisterVali2 === void 0 || (_this$_unregisterVali2 = _this$_unregisterVali2.uXsD) === null || _this$_unregisterVali2 === void 0 ? void 0 : _this$_unregisterVali2.UGic), _this.yLyk);
|
|
3009
3013
|
});
|
|
3010
|
-
_defineProperty(this, "
|
|
3014
|
+
_defineProperty(this, "SLEo", function () {
|
|
3011
3015
|
var _this$_unregisterVali3, _this$_unregisterVali4, _this$_nextUpcomingVa;
|
|
3012
3016
|
var ceInstance = new CE();
|
|
3013
|
-
_this.
|
|
3014
|
-
if (_this.
|
|
3015
|
-
clearTimeout(_this.
|
|
3017
|
+
_this.xyKD = true;
|
|
3018
|
+
if (_this.MhIU) {
|
|
3019
|
+
clearTimeout(_this.MhIU);
|
|
3016
3020
|
}
|
|
3017
3021
|
var conditionValidator = new ConditionValidator();
|
|
3018
|
-
_this.
|
|
3019
|
-
_this.
|
|
3020
|
-
ceInstance.unregisterFromEvent(generateKey((_this$_unregisterVali3 = _this.
|
|
3021
|
-
if (_this._across_sessions && (_this$_nextUpcomingVa = _this.
|
|
3022
|
+
_this.jaQb.XmsR += 1;
|
|
3023
|
+
_this.jaQb.yoCa = conditionValidator.dZrw(_this.jaQb.XmsR, _this.jaQb.fHuv.oBTS, _this.jaQb.fHuv.SGjX);
|
|
3024
|
+
ceInstance.unregisterFromEvent(generateKey((_this$_unregisterVali3 = _this.FefJ) === null || _this$_unregisterVali3 === void 0 || (_this$_unregisterVali3 = _this$_unregisterVali3.fHuv) === null || _this$_unregisterVali3 === void 0 ? void 0 : _this$_unregisterVali3.vDdr) + "___" + ((_this$_unregisterVali4 = _this.FefJ) === null || _this$_unregisterVali4 === void 0 || (_this$_unregisterVali4 = _this$_unregisterVali4.fHuv) === null || _this$_unregisterVali4 === void 0 ? void 0 : _this$_unregisterVali4.uXsD.UGic), _this.SLEo);
|
|
3025
|
+
if (_this._across_sessions && (_this$_nextUpcomingVa = _this.YXfN) !== null && _this$_nextUpcomingVa !== void 0 && _this$_nextUpcomingVa.fHuv._timeBased) {
|
|
3022
3026
|
var no_KPI_TriggerDetails = Apxor.getController().getFromStorage("apx_nokpi_triggerdetails");
|
|
3023
3027
|
if (no_KPI_TriggerDetails === null || no_KPI_TriggerDetails === undefined) {
|
|
3024
3028
|
no_KPI_TriggerDetails = [];
|
|
@@ -3028,7 +3032,7 @@
|
|
|
3028
3032
|
var objectPresenceChecker;
|
|
3029
3033
|
var requiredObject;
|
|
3030
3034
|
for (var i = 0; i < no_KPI_TriggerDetails.length; i++) {
|
|
3031
|
-
if (_this.no_KPI_TriggerDetails[i].id === _this.
|
|
3035
|
+
if (_this.no_KPI_TriggerDetails[i].id === _this.YXfN.fHuv._id) {
|
|
3032
3036
|
objectPresenceChecker = true;
|
|
3033
3037
|
requiredObject = no_KPI_TriggerDetails[i];
|
|
3034
3038
|
break;
|
|
@@ -3038,42 +3042,42 @@
|
|
|
3038
3042
|
if (objectPresenceChecker) {
|
|
3039
3043
|
requiredObject.satisfiedCount += 1;
|
|
3040
3044
|
} else {
|
|
3041
|
-
var id = _this.
|
|
3042
|
-
var type = _this.
|
|
3043
|
-
var name = _this.
|
|
3044
|
-
var additionalInfo = _this.
|
|
3045
|
+
var id = _this.jaQb.fHuv._id;
|
|
3046
|
+
var type = _this.jaQb.fHuv.DFrC;
|
|
3047
|
+
var name = _this.jaQb.fHuv.uXsD.UGic;
|
|
3048
|
+
var additionalInfo = _this.jaQb.fHuv.uXsD.cIhR;
|
|
3045
3049
|
triggerObj = {
|
|
3046
3050
|
id: id,
|
|
3047
3051
|
type: type,
|
|
3048
3052
|
time: Date.now(),
|
|
3049
3053
|
name: name,
|
|
3050
3054
|
additionalInfo: additionalInfo,
|
|
3051
|
-
satisfiedCount: _this.
|
|
3052
|
-
timeBased: _this.
|
|
3055
|
+
satisfiedCount: _this.jaQb.fHuv._timeEnabled,
|
|
3056
|
+
timeBased: _this.jaQb.fHuv._timeEnabled
|
|
3053
3057
|
//finishTime: finishTime,
|
|
3054
3058
|
};
|
|
3055
3059
|
|
|
3056
3060
|
_this.no_KPI_TriggerDetails.push(triggerObj);
|
|
3057
3061
|
}
|
|
3058
3062
|
}
|
|
3059
|
-
if (_this.
|
|
3060
|
-
var upcomingValidator = _this.
|
|
3063
|
+
if (_this.jaQb.yoCa) {
|
|
3064
|
+
var upcomingValidator = _this.qfrr[_this.kpiIndex + 1];
|
|
3061
3065
|
if (!isDefined(upcomingValidator)) {
|
|
3062
|
-
_this.
|
|
3066
|
+
_this.XvYs();
|
|
3063
3067
|
} else {
|
|
3064
|
-
upcomingValidator.
|
|
3068
|
+
upcomingValidator.jRNn();
|
|
3065
3069
|
}
|
|
3066
3070
|
}
|
|
3067
3071
|
});
|
|
3068
|
-
_defineProperty(this, "
|
|
3069
|
-
if (_this.
|
|
3070
|
-
_this.
|
|
3071
|
-
var
|
|
3072
|
-
if (
|
|
3073
|
-
if (_this.
|
|
3074
|
-
_this.
|
|
3075
|
-
_this.
|
|
3076
|
-
_this.
|
|
3072
|
+
_defineProperty(this, "Daaj", function () {
|
|
3073
|
+
if (_this.GGny === _this.qfrr.length - 1) {
|
|
3074
|
+
_this.vtAp = true;
|
|
3075
|
+
var yoCa = true;
|
|
3076
|
+
if (yoCa) {
|
|
3077
|
+
if (_this.qfrr[_this.GGny]) {
|
|
3078
|
+
_this.qfrr[_this.GGny].XmsR = _this.vpAf.satisfiedCount;
|
|
3079
|
+
_this.qfrr[_this.GGny].yoCa = true;
|
|
3080
|
+
_this.XvYs();
|
|
3077
3081
|
}
|
|
3078
3082
|
}
|
|
3079
3083
|
} else {
|
|
@@ -3086,7 +3090,7 @@
|
|
|
3086
3090
|
var requiredObject;
|
|
3087
3091
|
var objectPresenceChecker;
|
|
3088
3092
|
for (var i = 0; i < no_KPI_TriggerDetails.length; i++) {
|
|
3089
|
-
if (no_KPI_TriggerDetails[i].id === _this.
|
|
3093
|
+
if (no_KPI_TriggerDetails[i].id === _this.GGny) {
|
|
3090
3094
|
objectPresenceChecker = true;
|
|
3091
3095
|
requiredObject = no_KPI_TriggerDetails[i];
|
|
3092
3096
|
break;
|
|
@@ -3096,27 +3100,27 @@
|
|
|
3096
3100
|
requiredObject.satisfiedCount = 1;
|
|
3097
3101
|
}
|
|
3098
3102
|
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.
|
|
3103
|
+
_this.qfrr[_this.GGny].XmsR = _this.vpAf.satisfiedCount;
|
|
3104
|
+
_this.qfrr[_this.GGny].yoCa = true;
|
|
3105
|
+
if (_this.qfrr[_this.GGny + 1].fHuv._timeEnabled) {
|
|
3106
|
+
var timeInMillisec = calculateTime(_this.qfrr[_this.GGny + 1].fHuv._time.unit, _this.qfrr[_this.GGny + 1].fHuv._time.value);
|
|
3107
|
+
var timeEnabled = _this.qfrr[_this.GGny + 1].fHuv._timeEnabled;
|
|
3108
|
+
var condition_id = _this.qfrr[_this.GGny + 1].fHuv._id;
|
|
3109
|
+
var satisfiedCount = _this.qfrr[_this.GGny + 1].XmsR;
|
|
3110
|
+
var name = _this.qfrr[_this.GGny + 1].fHuv.uXsD.UGic;
|
|
3111
|
+
var additionalInfo = _this.qfrr[_this.GGny + 1].uXsD.cIhR;
|
|
3108
3112
|
var condition_validator = new ConditionValidator();
|
|
3109
|
-
condition_validator.
|
|
3113
|
+
condition_validator.rbcW(_this.fHuv.DFrC, name, Date.now(), additionalInfo, timeInMillisec, timeEnabled, condition_id, satisfiedCount);
|
|
3110
3114
|
}
|
|
3111
3115
|
}
|
|
3112
3116
|
});
|
|
3113
|
-
_defineProperty(this, "
|
|
3114
|
-
if (_this._across_sessions && _this.
|
|
3117
|
+
_defineProperty(this, "iUCb", function () {
|
|
3118
|
+
if (_this._across_sessions && _this.RlZB) {
|
|
3115
3119
|
var matching_validator;
|
|
3116
3120
|
var matchedIndex;
|
|
3117
3121
|
var matchednestedIndex;
|
|
3118
3122
|
var conditionType = "single";
|
|
3119
|
-
var
|
|
3123
|
+
var yoCa = false;
|
|
3120
3124
|
var no_KPI_TriggerDetails = Apxor.getController().getFromStorage("apx_nokpi_triggerdetails");
|
|
3121
3125
|
no_KPI_TriggerDetails = JSON.parse(no_KPI_TriggerDetails);
|
|
3122
3126
|
if (no_KPI_TriggerDetails.length > 0) {
|
|
@@ -3127,9 +3131,9 @@
|
|
|
3127
3131
|
var trigger = _step2.value;
|
|
3128
3132
|
var id_to_check = trigger["id"];
|
|
3129
3133
|
var satifiedCount = trigger["satisfiedCount"];
|
|
3130
|
-
matching_validator = _this.
|
|
3134
|
+
matching_validator = _this.qfrr.find(function (validator, index) {
|
|
3131
3135
|
if ((validator === null || validator === void 0 ? void 0 : validator.length) === 1 || (validator === null || validator === void 0 ? void 0 : validator.length) === undefined) {
|
|
3132
|
-
if (validator.
|
|
3136
|
+
if (validator.fHuv._id === id_to_check) {
|
|
3133
3137
|
conditionType = "single";
|
|
3134
3138
|
matchedIndex = index;
|
|
3135
3139
|
return true;
|
|
@@ -3138,7 +3142,7 @@
|
|
|
3138
3142
|
} else if (validator.length > 0) {
|
|
3139
3143
|
// If the condition is a group, check if any individual condition has the id
|
|
3140
3144
|
var nestedIndex = validator.findIndex(function (individualCondition) {
|
|
3141
|
-
return individualCondition.
|
|
3145
|
+
return individualCondition.fHuv._id === id_to_check;
|
|
3142
3146
|
});
|
|
3143
3147
|
if (nestedIndex !== -1) {
|
|
3144
3148
|
// If id_to_check is found in a nested condition, store both indexes
|
|
@@ -3152,22 +3156,22 @@
|
|
|
3152
3156
|
});
|
|
3153
3157
|
if (conditionType === "single" && matching_validator) {
|
|
3154
3158
|
var condition_validator = new ConditionValidator();
|
|
3155
|
-
|
|
3156
|
-
var matchingValidatorIndex = _this.
|
|
3157
|
-
var _validator$
|
|
3158
|
-
return (validator === null || validator === void 0 || (_validator$
|
|
3159
|
+
yoCa = condition_validator.dZrw(satifiedCount, matching_validator.fHuv.oBTS, matching_validator.fHuv.SGjX);
|
|
3160
|
+
var matchingValidatorIndex = _this.qfrr.findIndex(function (validator) {
|
|
3161
|
+
var _validator$fHuv;
|
|
3162
|
+
return (validator === null || validator === void 0 || (_validator$fHuv = validator.fHuv) === null || _validator$fHuv === void 0 ? void 0 : _validator$fHuv._id) === id_to_check;
|
|
3159
3163
|
});
|
|
3160
3164
|
if (matchingValidatorIndex === undefined) {
|
|
3161
3165
|
matchingValidatorIndex = matchedIndex;
|
|
3162
3166
|
}
|
|
3163
|
-
if (
|
|
3164
|
-
_this.
|
|
3167
|
+
if (yoCa) {
|
|
3168
|
+
_this.qfrr[matchingValidatorIndex].yoCa = true;
|
|
3165
3169
|
}
|
|
3166
3170
|
} else if (conditionType === "group" && matching_validator) {
|
|
3167
3171
|
var _condition_validator = new ConditionValidator();
|
|
3168
|
-
|
|
3169
|
-
if (
|
|
3170
|
-
_this.
|
|
3172
|
+
yoCa = _condition_validator.dZrw(satifiedCount, matching_validator[matchednestedIndex].fHuv.oBTS, matching_validator[matchednestedIndex].fHuv.SGjX);
|
|
3173
|
+
if (yoCa) {
|
|
3174
|
+
_this.qfrr[matchedIndex][matchednestedIndex].yoCa = true;
|
|
3171
3175
|
}
|
|
3172
3176
|
}
|
|
3173
3177
|
};
|
|
@@ -3182,64 +3186,66 @@
|
|
|
3182
3186
|
}
|
|
3183
3187
|
}
|
|
3184
3188
|
});
|
|
3185
|
-
_defineProperty(this, "
|
|
3189
|
+
_defineProperty(this, "cAjr", function (index) {
|
|
3186
3190
|
if (index < 0) {
|
|
3187
3191
|
return;
|
|
3188
3192
|
}
|
|
3189
|
-
_this.
|
|
3193
|
+
_this.hFnp();
|
|
3190
3194
|
});
|
|
3191
|
-
_defineProperty(this, "
|
|
3195
|
+
_defineProperty(this, "XvYs", function () {
|
|
3192
3196
|
var _window$ApxorRTM, _window$ApxorRTM2;
|
|
3193
3197
|
var view_visibility = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
3194
3198
|
// Check If Audience, Validity is satisfied or not
|
|
3195
3199
|
var userAttributes = Apxor.getController().getUserAttributes();
|
|
3196
3200
|
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.
|
|
3201
|
+
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.ABDA) && Apxor.getController().isBadgeTriggerSatisfied(_this.ABDA))) {
|
|
3198
3202
|
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
|
-
|
|
3203
|
+
apx_nudge_type: _this.ofFb.DFrC === "SURVEY" ? "survey" : "campaign",
|
|
3204
|
+
apx_nudge_id: _this.ABDA,
|
|
3205
|
+
apx_nudge_name: _this.ofFb.UGic,
|
|
3206
|
+
message_name: _this.ofFb.UGic,
|
|
3207
|
+
id: _this.ABDA,
|
|
3208
|
+
apx_variant_code: _this.ofFb._isExperiment || _this.ofFb._only_context ? _this.ofFb._attr[APX_VARIANT_CODE] : "TG"
|
|
3203
3209
|
});
|
|
3204
3210
|
}
|
|
3205
|
-
if (!_this.
|
|
3211
|
+
if (!_this.AEyV.validate() || !_this.Rtvw.validate(userAttributes, sessionAttributes) || !_this.Rlua.validate() || !_this.SXtO.validate()) {
|
|
3206
3212
|
// eslint-disable-next-line no-unused-vars
|
|
3207
|
-
var apx_nudge_type = _this.
|
|
3208
|
-
if (!_this.
|
|
3209
|
-
_this.
|
|
3213
|
+
var apx_nudge_type = _this.ofFb.DFrC === "SURVEY" ? "survey" : "campaign";
|
|
3214
|
+
if (!_this.Rlua.retainedDaysValidated) {
|
|
3215
|
+
_this.IdAw("Retained day criteria not met");
|
|
3210
3216
|
return;
|
|
3211
3217
|
}
|
|
3212
|
-
if (!_this.
|
|
3213
|
-
_this.
|
|
3218
|
+
if (!_this.Rlua.retainedSessionValidated) {
|
|
3219
|
+
_this.IdAw("User session criteria not met");
|
|
3214
3220
|
return;
|
|
3215
3221
|
}
|
|
3216
|
-
if (_this.
|
|
3217
|
-
_this.
|
|
3222
|
+
if (_this.Rlua.eventDoneInLT) {
|
|
3223
|
+
_this.IdAw("Event done in life time");
|
|
3218
3224
|
return;
|
|
3219
3225
|
}
|
|
3220
|
-
if (!_this.
|
|
3221
|
-
_this.
|
|
3226
|
+
if (!_this.Rtvw.userAttributesValidated) {
|
|
3227
|
+
_this.IdAw("User property filter not met");
|
|
3222
3228
|
return;
|
|
3223
3229
|
}
|
|
3224
|
-
if (!_this.
|
|
3225
|
-
_this.
|
|
3230
|
+
if (!_this.Rtvw.sessionAttributeValidated) {
|
|
3231
|
+
_this.IdAw("Session property filter not met");
|
|
3226
3232
|
return;
|
|
3227
3233
|
}
|
|
3228
|
-
if (_this.
|
|
3229
|
-
_this.
|
|
3234
|
+
if (_this.AEyV._not_in_specified_time) {
|
|
3235
|
+
_this.IdAw("Time limits check failed");
|
|
3230
3236
|
return;
|
|
3231
3237
|
}
|
|
3232
|
-
if (_this.
|
|
3233
|
-
_this.
|
|
3238
|
+
if (_this.AEyV._not_yet_active) {
|
|
3239
|
+
_this.IdAw("not in the scheduled time");
|
|
3234
3240
|
return;
|
|
3235
3241
|
}
|
|
3236
|
-
if (_this.
|
|
3237
|
-
_this.
|
|
3242
|
+
if (_this.AEyV._nudge_expired) {
|
|
3243
|
+
_this.IdAw("nudge expired");
|
|
3238
3244
|
return;
|
|
3239
3245
|
}
|
|
3240
3246
|
return;
|
|
3241
3247
|
}
|
|
3242
|
-
var length = _this.
|
|
3248
|
+
var length = _this.qfrr.length;
|
|
3243
3249
|
var isSatisfied = length < 1;
|
|
3244
3250
|
var combineOperator = "";
|
|
3245
3251
|
if (length === 0) {
|
|
@@ -3247,24 +3253,24 @@
|
|
|
3247
3253
|
}
|
|
3248
3254
|
for (var index = 0; index < length; index++) {
|
|
3249
3255
|
var currentResult = void 0;
|
|
3250
|
-
var validator = _this.
|
|
3256
|
+
var validator = _this.qfrr[index];
|
|
3251
3257
|
if (validator.length > 1) {
|
|
3252
|
-
var combine_operator = validator[0].
|
|
3258
|
+
var combine_operator = validator[0].fHuv.yztc;
|
|
3253
3259
|
if (combine_operator === "AND") {
|
|
3254
3260
|
currentResult = true;
|
|
3255
3261
|
} else {
|
|
3256
3262
|
currentResult = false;
|
|
3257
3263
|
}
|
|
3258
3264
|
for (var i = 0; i < validator.length; i++) {
|
|
3259
|
-
var _combine_operator = validator[0].
|
|
3265
|
+
var _combine_operator = validator[0].fHuv.yztc;
|
|
3260
3266
|
if (_combine_operator === "AND") {
|
|
3261
|
-
currentResult = currentResult && validator[i].
|
|
3267
|
+
currentResult = currentResult && validator[i].yoCa;
|
|
3262
3268
|
} else {
|
|
3263
|
-
currentResult = currentResult || validator[i].
|
|
3269
|
+
currentResult = currentResult || validator[i].yoCa;
|
|
3264
3270
|
}
|
|
3265
3271
|
}
|
|
3266
3272
|
} else {
|
|
3267
|
-
currentResult = validator.
|
|
3273
|
+
currentResult = validator.yoCa;
|
|
3268
3274
|
}
|
|
3269
3275
|
if (combineOperator.trim() === "") {
|
|
3270
3276
|
isSatisfied = currentResult;
|
|
@@ -3281,50 +3287,70 @@
|
|
|
3281
3287
|
if (validator.length > 1) {
|
|
3282
3288
|
combineOperator = _this.groupCombineOperator;
|
|
3283
3289
|
} else {
|
|
3284
|
-
combineOperator = validator.
|
|
3290
|
+
combineOperator = validator.yztc;
|
|
3285
3291
|
}
|
|
3286
3292
|
}
|
|
3287
3293
|
if (view_visibility === true) {
|
|
3288
3294
|
isSatisfied = true;
|
|
3289
3295
|
}
|
|
3290
3296
|
if (isSatisfied) {
|
|
3291
|
-
var _window$ApxorRTM3, _window$ApxorRTM4;
|
|
3292
3297
|
console.debug("onCondition satisfied");
|
|
3293
3298
|
// Check if count reached it's maximum
|
|
3294
|
-
if (!_this.
|
|
3295
|
-
console.warn("Maximum limit reached", _this.
|
|
3299
|
+
if (!_this.sqke.Vsbc(_this.ABDA)) {
|
|
3300
|
+
console.warn("Maximum limit reached", _this.ABDA);
|
|
3296
3301
|
return;
|
|
3297
3302
|
}
|
|
3298
3303
|
|
|
3299
|
-
//
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3304
|
+
// FIXME: Event being firing twice
|
|
3305
|
+
// logging event for view not found for test device
|
|
3306
|
+
// if (
|
|
3307
|
+
// !(
|
|
3308
|
+
// window.ApxorRTM?.isBadgePresent &&
|
|
3309
|
+
// window.ApxorRTM?.badgesLists.includes(this.ABDA) &&
|
|
3310
|
+
// Apxor.getController().isBadgeTriggerSatisfied(this.ABDA)
|
|
3311
|
+
// )
|
|
3312
|
+
// ) {
|
|
3313
|
+
// let apx_nudge_type =
|
|
3314
|
+
// this.ofFb.DFrC === "SURVEY" ? "survey" : "campaign";
|
|
3315
|
+
// Apxor?.logEvent(
|
|
3316
|
+
// "apx_trigger_satisfied",
|
|
3317
|
+
// {
|
|
3318
|
+
// apx_nudge_type:
|
|
3319
|
+
// this.ofFb.DFrC === "SURVEY" ? "survey" : "campaign",
|
|
3320
|
+
// apx_nudge_id: this.ABDA,
|
|
3321
|
+
// apx_nudge_name: this.ofFb.UGic,
|
|
3322
|
+
// message_name: this.ofFb.UGic,
|
|
3323
|
+
// id: this.ABDA,
|
|
3324
|
+
// apx_variant_code:
|
|
3325
|
+
// this.ofFb._isExperiment || this.ofFb._only_context
|
|
3326
|
+
// ? this.ofFb._attr[APX_VARIANT_CODE]
|
|
3327
|
+
// : "TG",
|
|
3328
|
+
// },
|
|
3329
|
+
// false,
|
|
3330
|
+
// "",
|
|
3331
|
+
// apx_nudge_type
|
|
3332
|
+
// );
|
|
3333
|
+
// }
|
|
3334
|
+
|
|
3309
3335
|
if (_this._across_sessions) {
|
|
3310
3336
|
localStorage.removeItem("apx_nokpi_triggerdetails");
|
|
3311
3337
|
}
|
|
3312
|
-
var _iterator3 = _createForOfIteratorHelper(_this.
|
|
3338
|
+
var _iterator3 = _createForOfIteratorHelper(_this.qfrr),
|
|
3313
3339
|
_step3;
|
|
3314
3340
|
try {
|
|
3315
3341
|
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
3316
3342
|
var _validator3 = _step3.value;
|
|
3317
3343
|
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.
|
|
3344
|
+
_validator3.yoCa = false;
|
|
3345
|
+
_validator3.XmsR = 0;
|
|
3320
3346
|
} else {
|
|
3321
3347
|
var _iterator4 = _createForOfIteratorHelper(_validator3),
|
|
3322
3348
|
_step4;
|
|
3323
3349
|
try {
|
|
3324
3350
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
3325
3351
|
var childValidator = _step4.value;
|
|
3326
|
-
childValidator.
|
|
3327
|
-
childValidator.
|
|
3352
|
+
childValidator.yoCa = false;
|
|
3353
|
+
childValidator.XmsR = 0;
|
|
3328
3354
|
}
|
|
3329
3355
|
} catch (err) {
|
|
3330
3356
|
_iterator4.e(err);
|
|
@@ -3333,39 +3359,41 @@
|
|
|
3333
3359
|
}
|
|
3334
3360
|
}
|
|
3335
3361
|
}
|
|
3336
|
-
// this.
|
|
3362
|
+
// this.qIOQ = new ConditionValidator();
|
|
3337
3363
|
} catch (err) {
|
|
3338
3364
|
_iterator3.e(err);
|
|
3339
3365
|
} finally {
|
|
3340
3366
|
_iterator3.f();
|
|
3341
3367
|
}
|
|
3342
|
-
_this.
|
|
3343
|
-
_this.
|
|
3344
|
-
_this.
|
|
3345
|
-
if (_this.
|
|
3346
|
-
var
|
|
3347
|
-
Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.
|
|
3348
|
-
message_name: _this.
|
|
3349
|
-
|
|
3350
|
-
|
|
3368
|
+
_this.qIOQ.oFex(_this.qfrr);
|
|
3369
|
+
_this.qfrr = [];
|
|
3370
|
+
_this.TNJX(_this.JWQI, _this.ymdm);
|
|
3371
|
+
if (_this.ofFb._only_context === true) {
|
|
3372
|
+
var _apx_nudge_type = _this.ofFb.DFrC === "SURVEY" ? "survey" : "campaign";
|
|
3373
|
+
Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.ofFb._attr), {}, {
|
|
3374
|
+
message_name: _this.ofFb.UGic,
|
|
3375
|
+
apx_nudge_name: _this.ofFb.UGic,
|
|
3376
|
+
apx_nudge_id: _this.ABDA,
|
|
3377
|
+
id: _this.ABDA
|
|
3378
|
+
}), false, "", _apx_nudge_type);
|
|
3351
3379
|
}
|
|
3352
3380
|
// Emit event
|
|
3353
|
-
Apxor.getController().dispatchEvent(_this.
|
|
3354
|
-
name: _this.
|
|
3381
|
+
Apxor.getController().dispatchEvent(_this.ofFb.DFrC, {
|
|
3382
|
+
name: _this.ofFb.DFrC,
|
|
3355
3383
|
additional_info: {
|
|
3356
|
-
uuid: _this.
|
|
3357
|
-
name: _this.
|
|
3384
|
+
uuid: _this.ABDA,
|
|
3385
|
+
name: _this.ofFb.UGic
|
|
3358
3386
|
}
|
|
3359
3387
|
});
|
|
3360
3388
|
}
|
|
3361
3389
|
});
|
|
3362
|
-
_defineProperty(this, "
|
|
3363
|
-
var length = _this.
|
|
3390
|
+
_defineProperty(this, "hFnp", function () {
|
|
3391
|
+
var length = _this.vqdX.length;
|
|
3364
3392
|
var isSatisfied = length < 1;
|
|
3365
3393
|
var combineOperator = "";
|
|
3366
3394
|
for (var index = 0; index < length; index++) {
|
|
3367
|
-
var validator = _this.
|
|
3368
|
-
var currentResult = validator.
|
|
3395
|
+
var validator = _this.vqdX[index];
|
|
3396
|
+
var currentResult = validator.yoCa;
|
|
3369
3397
|
if (combineOperator.trim() === "") {
|
|
3370
3398
|
isSatisfied = currentResult;
|
|
3371
3399
|
} else {
|
|
@@ -3378,23 +3406,25 @@
|
|
|
3378
3406
|
break;
|
|
3379
3407
|
}
|
|
3380
3408
|
}
|
|
3381
|
-
combineOperator = validator.
|
|
3409
|
+
combineOperator = validator.eMRD;
|
|
3382
3410
|
}
|
|
3383
3411
|
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
|
-
|
|
3412
|
+
Apxor.getController().persistTerminationInfoLocally(_this.ABDA);
|
|
3413
|
+
if (_this.ofFb._only_context === true) {
|
|
3414
|
+
var apx_nudge_type = _this.ofFb.DFrC === "SURVEY" ? "survey" : "campaign";
|
|
3415
|
+
Apxor.logEvent(APX_CONTEXT_EVALUATED, _objectSpread2(_objectSpread2({}, _this.ofFb._attr), {}, {
|
|
3416
|
+
message_name: _this.ofFb.UGic,
|
|
3417
|
+
apx_nudge_name: _this.ofFb.UGic,
|
|
3418
|
+
apx_nudge_id: _this.ABDA,
|
|
3419
|
+
id: _this.ABDA
|
|
3390
3420
|
}), false, "apxor", apx_nudge_type);
|
|
3391
3421
|
}
|
|
3392
3422
|
// Emit event
|
|
3393
|
-
Apxor.getController().dispatchEvent(_this.
|
|
3394
|
-
name: _this.
|
|
3423
|
+
Apxor.getController().dispatchEvent(_this.ofFb.DFrC, {
|
|
3424
|
+
name: _this.ofFb.DFrC,
|
|
3395
3425
|
additional_info: {
|
|
3396
|
-
uuid: _this.
|
|
3397
|
-
name: _this.
|
|
3426
|
+
uuid: _this.ABDA,
|
|
3427
|
+
name: _this.ofFb.UGic
|
|
3398
3428
|
}
|
|
3399
3429
|
});
|
|
3400
3430
|
}
|
|
@@ -3402,43 +3432,45 @@
|
|
|
3402
3432
|
_defineProperty(this, "validateForTerminationAttributes", function () {
|
|
3403
3433
|
var userAttributes = Apxor.getController().getUserAttributes();
|
|
3404
3434
|
var sessionAttributes = Apxor.getController().getSessionAttributes();
|
|
3405
|
-
return _this.
|
|
3435
|
+
return _this.TAxm.validate(userAttributes, sessionAttributes);
|
|
3406
3436
|
});
|
|
3407
|
-
_defineProperty(this, "
|
|
3408
|
-
_this.
|
|
3437
|
+
_defineProperty(this, "RQvg", function () {
|
|
3438
|
+
_this.sqke.RQvg();
|
|
3409
3439
|
});
|
|
3410
3440
|
_defineProperty(this, "getFrequencyCount", function () {
|
|
3411
|
-
return _this.
|
|
3441
|
+
return _this.sqke.getFrequencyCount();
|
|
3412
3442
|
});
|
|
3413
|
-
_defineProperty(this, "
|
|
3414
|
-
return _this.
|
|
3443
|
+
_defineProperty(this, "RVJD", function () {
|
|
3444
|
+
return _this.sqke.TyZe();
|
|
3415
3445
|
});
|
|
3416
|
-
_defineProperty(this, "
|
|
3446
|
+
_defineProperty(this, "yJXi", function (validator) {
|
|
3417
3447
|
var currentResult;
|
|
3418
|
-
var combine_operator = validator[0].
|
|
3448
|
+
var combine_operator = validator[0].fHuv.yztc;
|
|
3419
3449
|
if (combine_operator === "AND") {
|
|
3420
3450
|
currentResult = true;
|
|
3421
3451
|
} else {
|
|
3422
3452
|
currentResult = false;
|
|
3423
3453
|
}
|
|
3424
3454
|
for (var i = 0; i < validator.length; i++) {
|
|
3425
|
-
var _combine_operator2 = validator[0].
|
|
3455
|
+
var _combine_operator2 = validator[0].fHuv.yztc;
|
|
3426
3456
|
if (_combine_operator2 === "AND") {
|
|
3427
|
-
currentResult = currentResult && validator[i].
|
|
3457
|
+
currentResult = currentResult && validator[i].yoCa;
|
|
3428
3458
|
} else {
|
|
3429
|
-
currentResult = currentResult || validator[i].
|
|
3459
|
+
currentResult = currentResult || validator[i].yoCa;
|
|
3430
3460
|
}
|
|
3431
3461
|
}
|
|
3432
3462
|
return currentResult;
|
|
3433
3463
|
});
|
|
3434
|
-
_defineProperty(this, "
|
|
3435
|
-
var _this$
|
|
3464
|
+
_defineProperty(this, "IdAw", function (reason) {
|
|
3465
|
+
var _this$ofFb$_attr2;
|
|
3436
3466
|
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
|
-
|
|
3441
|
-
|
|
3467
|
+
apx_nudge_type: _this.ofFb.DFrC === "SURVEY" ? "survey" : "campaign",
|
|
3468
|
+
apx_nudge_id: _this.ABDA,
|
|
3469
|
+
apx_nudge_name: _this.ofFb.UGic,
|
|
3470
|
+
message_name: _this.ofFb.UGic,
|
|
3471
|
+
id: _this.ABDA,
|
|
3472
|
+
apx_variant_code: _this.ofFb._isExperiment || _this.ofFb._only_context ? (_this$ofFb$_attr2 = _this.ofFb._attr) === null || _this$ofFb$_attr2 === void 0 ? void 0 : _this$ofFb$_attr2[APX_VARIANT_CODE] : "TG",
|
|
3473
|
+
apx_notshown_type: "warn",
|
|
3442
3474
|
apx_reason: reason
|
|
3443
3475
|
});
|
|
3444
3476
|
});
|
|
@@ -3447,7 +3479,7 @@
|
|
|
3447
3479
|
var ConfigLookup = /*#__PURE__*/_createClass(function ConfigLookup() {
|
|
3448
3480
|
var _this = this;
|
|
3449
3481
|
_classCallCheck(this, ConfigLookup);
|
|
3450
|
-
_defineProperty(this, "
|
|
3482
|
+
_defineProperty(this, "zCLd", {});
|
|
3451
3483
|
_defineProperty(this, "parse", function () {
|
|
3452
3484
|
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
3453
3485
|
configs: []
|
|
@@ -3470,7 +3502,7 @@
|
|
|
3470
3502
|
var configId = _config._id;
|
|
3471
3503
|
var configItem = new ConfigItem();
|
|
3472
3504
|
if (configItem.parse(_config)) {
|
|
3473
|
-
_this.
|
|
3505
|
+
_this.zCLd[configId] = configItem;
|
|
3474
3506
|
} else {
|
|
3475
3507
|
console.warn("Failed to parse cfg", configId);
|
|
3476
3508
|
}
|
|
@@ -3479,51 +3511,51 @@
|
|
|
3479
3511
|
});
|
|
3480
3512
|
_defineProperty(this, "validate", function (id, index) {
|
|
3481
3513
|
var childIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
3482
|
-
if (_this.
|
|
3483
|
-
var configItem = _this.
|
|
3484
|
-
configItem.
|
|
3514
|
+
if (_this.zCLd[id]) {
|
|
3515
|
+
var configItem = _this.zCLd[id];
|
|
3516
|
+
configItem.ReXr(index, childIndex);
|
|
3485
3517
|
}
|
|
3486
3518
|
});
|
|
3487
3519
|
_defineProperty(this, "getVariantCode", function (id) {
|
|
3488
|
-
if (_this.
|
|
3489
|
-
var configItem = _this.
|
|
3520
|
+
if (_this.zCLd[id]) {
|
|
3521
|
+
var configItem = _this.zCLd[id];
|
|
3490
3522
|
return configItem._variant_code;
|
|
3491
3523
|
}
|
|
3492
3524
|
return "";
|
|
3493
3525
|
});
|
|
3494
3526
|
_defineProperty(this, "validateForTermination", function (id, index) {
|
|
3495
|
-
if (_this.
|
|
3496
|
-
var configItem = _this.
|
|
3497
|
-
configItem.
|
|
3527
|
+
if (_this.zCLd[id]) {
|
|
3528
|
+
var configItem = _this.zCLd[id];
|
|
3529
|
+
configItem.cAjr(index);
|
|
3498
3530
|
}
|
|
3499
3531
|
});
|
|
3500
3532
|
_defineProperty(this, "validateForTerminationAttributes", function (id) {
|
|
3501
|
-
if (_this.
|
|
3502
|
-
var configItem = _this.
|
|
3533
|
+
if (_this.zCLd[id]) {
|
|
3534
|
+
var configItem = _this.zCLd[id];
|
|
3503
3535
|
return configItem.validateForTerminationAttributes();
|
|
3504
3536
|
}
|
|
3505
3537
|
return false;
|
|
3506
3538
|
});
|
|
3507
|
-
_defineProperty(this, "
|
|
3508
|
-
var campiagnConfig = _this.
|
|
3509
|
-
campiagnConfig.
|
|
3539
|
+
_defineProperty(this, "RQvg", function (id) {
|
|
3540
|
+
var campiagnConfig = _this.zCLd[id];
|
|
3541
|
+
campiagnConfig.RQvg();
|
|
3510
3542
|
});
|
|
3511
3543
|
_defineProperty(this, "getFrequencyCount", function (id) {
|
|
3512
|
-
var campiagnConfig = _this.
|
|
3544
|
+
var campiagnConfig = _this.zCLd[id];
|
|
3513
3545
|
if (campiagnConfig != undefined) return campiagnConfig.getFrequencyCount();
|
|
3514
3546
|
});
|
|
3515
3547
|
_defineProperty(this, "resetFrequencyCounts", function () {
|
|
3516
|
-
var configs = _this.
|
|
3548
|
+
var configs = _this.zCLd;
|
|
3517
3549
|
for (var configId in configs) {
|
|
3518
|
-
configs[configId].
|
|
3550
|
+
configs[configId].RVJD();
|
|
3519
3551
|
}
|
|
3520
3552
|
});
|
|
3521
|
-
_defineProperty(this, "
|
|
3553
|
+
_defineProperty(this, "EAAe", function (campaignId) {
|
|
3522
3554
|
try {
|
|
3523
|
-
if (_this.
|
|
3524
|
-
var configItem = _this.
|
|
3525
|
-
if (configItem && configItem.
|
|
3526
|
-
return configItem.
|
|
3555
|
+
if (_this.zCLd) {
|
|
3556
|
+
var configItem = _this.zCLd[campaignId];
|
|
3557
|
+
if (configItem && configItem.ofFb) {
|
|
3558
|
+
return configItem.ofFb;
|
|
3527
3559
|
}
|
|
3528
3560
|
}
|
|
3529
3561
|
} catch (e) {
|
|
@@ -3539,51 +3571,51 @@
|
|
|
3539
3571
|
var EventsListener = /*#__PURE__*/_createClass(function EventsListener() {
|
|
3540
3572
|
var _this = this;
|
|
3541
3573
|
_classCallCheck(this, EventsListener);
|
|
3542
|
-
_defineProperty(this, "
|
|
3543
|
-
_defineProperty(this, "
|
|
3544
|
-
_defineProperty(this, "
|
|
3574
|
+
_defineProperty(this, "VhOV", {});
|
|
3575
|
+
_defineProperty(this, "VRqD", []);
|
|
3576
|
+
_defineProperty(this, "KSTc", false);
|
|
3545
3577
|
_defineProperty(this, "initialize", function () {
|
|
3546
3578
|
var controller = Apxor.getController();
|
|
3547
3579
|
controller.registerForEvent(APP_EVENT$1, function (event) {
|
|
3548
|
-
return _this.
|
|
3580
|
+
return _this.YXge(event, "AE");
|
|
3549
3581
|
});
|
|
3550
3582
|
controller.registerForEvent(CLIENT_EVENT$1, function (event) {
|
|
3551
|
-
return _this.
|
|
3583
|
+
return _this.YXge(event, "CE");
|
|
3552
3584
|
});
|
|
3553
3585
|
});
|
|
3554
|
-
_defineProperty(this, "
|
|
3586
|
+
_defineProperty(this, "nARi", function () {
|
|
3555
3587
|
// Clear Buffer
|
|
3556
|
-
var _iterator = _createForOfIteratorHelper(_this.
|
|
3588
|
+
var _iterator = _createForOfIteratorHelper(_this.VRqD),
|
|
3557
3589
|
_step;
|
|
3558
3590
|
try {
|
|
3559
3591
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
3560
3592
|
var item = _step.value;
|
|
3561
|
-
_this.
|
|
3593
|
+
_this.pMOK(item.event, item.key, item.type);
|
|
3562
3594
|
}
|
|
3563
3595
|
} catch (err) {
|
|
3564
3596
|
_iterator.e(err);
|
|
3565
3597
|
} finally {
|
|
3566
3598
|
_iterator.f();
|
|
3567
3599
|
}
|
|
3568
|
-
_this.
|
|
3600
|
+
_this.KSTc = true;
|
|
3569
3601
|
});
|
|
3570
|
-
_defineProperty(this, "
|
|
3602
|
+
_defineProperty(this, "zXsm", function (event, callback) {
|
|
3571
3603
|
if (!isFunction(callback)) {
|
|
3572
3604
|
return;
|
|
3573
3605
|
}
|
|
3574
3606
|
var listeners;
|
|
3575
|
-
if (_this.
|
|
3576
|
-
listeners = _this.
|
|
3607
|
+
if (_this.VhOV[event]) {
|
|
3608
|
+
listeners = _this.VhOV[event];
|
|
3577
3609
|
} else {
|
|
3578
3610
|
listeners = [];
|
|
3579
3611
|
}
|
|
3580
3612
|
listeners.push(callback);
|
|
3581
|
-
_this.
|
|
3582
|
-
Logger$b.debug("Listeners list: ", _this.
|
|
3613
|
+
_this.VhOV[event] = listeners;
|
|
3614
|
+
Logger$b.debug("Listeners list: ", _this.VhOV);
|
|
3583
3615
|
});
|
|
3584
3616
|
_defineProperty(this, "unregisterFromEvent", function (event, callback) {
|
|
3585
|
-
if (_this.
|
|
3586
|
-
var listeners = _this.
|
|
3617
|
+
if (_this.VhOV[event]) {
|
|
3618
|
+
var listeners = _this.VhOV[event];
|
|
3587
3619
|
var updatedListeners = [];
|
|
3588
3620
|
for (var index = 0; index < listeners.length; index++) {
|
|
3589
3621
|
var listener = listeners[index];
|
|
@@ -3591,36 +3623,36 @@
|
|
|
3591
3623
|
updatedListeners.push(listener);
|
|
3592
3624
|
}
|
|
3593
3625
|
}
|
|
3594
|
-
_this.
|
|
3626
|
+
_this.VhOV[event] = updatedListeners;
|
|
3595
3627
|
}
|
|
3596
3628
|
});
|
|
3597
|
-
_defineProperty(this, "
|
|
3629
|
+
_defineProperty(this, "YXge", function (event) {
|
|
3598
3630
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "AE";
|
|
3599
|
-
_this.
|
|
3631
|
+
_this.pMOK(event, "any_event", type);
|
|
3600
3632
|
if ((event === null || event === void 0 ? void 0 : event.loggedBy) === "apxor") {
|
|
3601
|
-
_this.
|
|
3633
|
+
_this.pMOK(event, "apxor_event", type);
|
|
3602
3634
|
} else if ((event === null || event === void 0 ? void 0 : event.loggedBy) === "customer") {
|
|
3603
|
-
_this.
|
|
3635
|
+
_this.pMOK(event, "customer_event", type);
|
|
3604
3636
|
}
|
|
3605
3637
|
if ((event === null || event === void 0 ? void 0 : event.apx_nudge_type) === "campaign") {
|
|
3606
|
-
_this.
|
|
3638
|
+
_this.pMOK(event, "campaign_event", type);
|
|
3607
3639
|
} else if ((event === null || event === void 0 ? void 0 : event.apx_nudge_type) === "survey") {
|
|
3608
|
-
_this.
|
|
3640
|
+
_this.pMOK(event, "survey_event", type);
|
|
3609
3641
|
}
|
|
3610
3642
|
var key = type + "___" + event.name;
|
|
3611
|
-
_this.
|
|
3643
|
+
_this.pMOK(event, key, type);
|
|
3612
3644
|
});
|
|
3613
|
-
_defineProperty(this, "
|
|
3614
|
-
if (!_this.
|
|
3615
|
-
_this.
|
|
3645
|
+
_defineProperty(this, "pMOK", function (event, key, type) {
|
|
3646
|
+
if (!_this.KSTc) {
|
|
3647
|
+
_this.VRqD.push({
|
|
3616
3648
|
event: event,
|
|
3617
3649
|
key: key,
|
|
3618
3650
|
type: type
|
|
3619
3651
|
});
|
|
3620
3652
|
} else {
|
|
3621
|
-
Logger$b.debug("Notifying listeners for event: " + event + ", " + key, _this.
|
|
3622
|
-
if (_this.
|
|
3623
|
-
var listeners = _this.
|
|
3653
|
+
Logger$b.debug("Notifying listeners for event: " + event + ", " + key, _this.VhOV);
|
|
3654
|
+
if (_this.VhOV[key]) {
|
|
3655
|
+
var listeners = _this.VhOV[key];
|
|
3624
3656
|
var time = Apxor.getController().getSDKRunningTimeInSec();
|
|
3625
3657
|
for (var index = 0; index < listeners.length; index++) {
|
|
3626
3658
|
var listener = listeners[index];
|
|
@@ -3636,17 +3668,17 @@
|
|
|
3636
3668
|
function CE() {
|
|
3637
3669
|
var _this = this;
|
|
3638
3670
|
_classCallCheck(this, CE);
|
|
3639
|
-
_defineProperty(this, "
|
|
3640
|
-
_defineProperty(this, "
|
|
3641
|
-
_defineProperty(this, "
|
|
3642
|
-
_defineProperty(this, "
|
|
3643
|
-
_defineProperty(this, "
|
|
3671
|
+
_defineProperty(this, "Zogu", false);
|
|
3672
|
+
_defineProperty(this, "DCuT", null);
|
|
3673
|
+
_defineProperty(this, "eElz", getDateInDDMMYYYY());
|
|
3674
|
+
_defineProperty(this, "uUxG", new EventsListener());
|
|
3675
|
+
_defineProperty(this, "sNNK", Apxor.getSiteId());
|
|
3644
3676
|
_defineProperty(this, "_qeState", {});
|
|
3645
3677
|
_defineProperty(this, "getQeState", function () {
|
|
3646
3678
|
try {
|
|
3647
3679
|
var data = Apxor.getController().getFromStorage(QE_STATE);
|
|
3648
3680
|
if (data) {
|
|
3649
|
-
return JSON.parse(decode(_this.
|
|
3681
|
+
return JSON.parse(decode(_this.sNNK, data));
|
|
3650
3682
|
} else {
|
|
3651
3683
|
_this._qeState = {};
|
|
3652
3684
|
return _this.setQeState();
|
|
@@ -3675,10 +3707,10 @@
|
|
|
3675
3707
|
return _this._qeState;
|
|
3676
3708
|
});
|
|
3677
3709
|
_defineProperty(this, "initialize", function () {
|
|
3678
|
-
if (!_this.
|
|
3679
|
-
_this.
|
|
3680
|
-
_this.
|
|
3681
|
-
_this.
|
|
3710
|
+
if (!_this.Zogu) {
|
|
3711
|
+
_this.Zogu = true;
|
|
3712
|
+
_this.DCuT = new ConfigLookup();
|
|
3713
|
+
_this.uUxG.initialize();
|
|
3682
3714
|
_this._qeState = _this.getQeState();
|
|
3683
3715
|
Logger$c.info("QE Initialized..");
|
|
3684
3716
|
}
|
|
@@ -3689,12 +3721,12 @@
|
|
|
3689
3721
|
* @param config
|
|
3690
3722
|
*/
|
|
3691
3723
|
_defineProperty(this, "parse", function (config) {
|
|
3692
|
-
if (!_this.
|
|
3724
|
+
if (!_this.iwiH()) {
|
|
3693
3725
|
Logger$c.warn("Must call init first. Unable to proceed");
|
|
3694
3726
|
return;
|
|
3695
3727
|
}
|
|
3696
|
-
_this.
|
|
3697
|
-
_this.
|
|
3728
|
+
_this.DCuT.parse(config);
|
|
3729
|
+
_this.uUxG.nARi();
|
|
3698
3730
|
});
|
|
3699
3731
|
/**
|
|
3700
3732
|
* Validates all conditions for given config ID
|
|
@@ -3704,22 +3736,22 @@
|
|
|
3704
3736
|
*/
|
|
3705
3737
|
_defineProperty(this, "validate", function (id, index) {
|
|
3706
3738
|
var childIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -1;
|
|
3707
|
-
if (!_this.
|
|
3739
|
+
if (!_this.iwiH()) {
|
|
3708
3740
|
return;
|
|
3709
3741
|
}
|
|
3710
|
-
_this.
|
|
3742
|
+
_this.DCuT.validate(id, index, childIndex);
|
|
3711
3743
|
});
|
|
3712
3744
|
_defineProperty(this, "getVariantCode", function (id) {
|
|
3713
|
-
return _this.
|
|
3745
|
+
return _this.DCuT.getVariantCode(id);
|
|
3714
3746
|
});
|
|
3715
3747
|
_defineProperty(this, "validateForTermination", function (id, index) {
|
|
3716
|
-
if (!_this.
|
|
3748
|
+
if (!_this.iwiH()) {
|
|
3717
3749
|
return;
|
|
3718
3750
|
}
|
|
3719
|
-
_this.
|
|
3751
|
+
_this.DCuT.validateForTermination(id, index);
|
|
3720
3752
|
});
|
|
3721
3753
|
_defineProperty(this, "validateForTerminationAttributes", function (user, session) {
|
|
3722
|
-
return _this.
|
|
3754
|
+
return _this.DCuT.validateForTerminationAttributes(user, session);
|
|
3723
3755
|
});
|
|
3724
3756
|
_defineProperty(this, "updateCount", function (id) {
|
|
3725
3757
|
try {
|
|
@@ -3728,25 +3760,25 @@
|
|
|
3728
3760
|
}
|
|
3729
3761
|
_this.incrementFrequencies(id);
|
|
3730
3762
|
_this.setQeState(id);
|
|
3731
|
-
_this.
|
|
3763
|
+
_this.DCuT.RQvg(id);
|
|
3732
3764
|
} catch (e) {
|
|
3733
3765
|
console.log("Could not update the count config:".concat(e));
|
|
3734
3766
|
}
|
|
3735
3767
|
});
|
|
3736
3768
|
_defineProperty(this, "resetFrequencyCounts", function () {
|
|
3737
|
-
_this.
|
|
3769
|
+
_this.DCuT.resetFrequencyCounts();
|
|
3738
3770
|
});
|
|
3739
3771
|
_defineProperty(this, "getFrequencyCount", function (id) {
|
|
3740
|
-
return _this.
|
|
3772
|
+
return _this.DCuT.getFrequencyCount(id);
|
|
3741
3773
|
});
|
|
3742
3774
|
_defineProperty(this, "registerForEvent", function (event, callback) {
|
|
3743
|
-
_this.
|
|
3775
|
+
_this.uUxG.zXsm(event, callback);
|
|
3744
3776
|
});
|
|
3745
3777
|
_defineProperty(this, "unregisterFromEvent", function (event, callback) {
|
|
3746
|
-
_this.
|
|
3778
|
+
_this.uUxG.unregisterFromEvent(event, callback);
|
|
3747
3779
|
});
|
|
3748
3780
|
_defineProperty(this, "notifyEventListener", function (event) {
|
|
3749
|
-
_this.
|
|
3781
|
+
_this.uUxG.YXge(event);
|
|
3750
3782
|
});
|
|
3751
3783
|
/**
|
|
3752
3784
|
* Fetches the config from Server
|
|
@@ -3759,14 +3791,14 @@
|
|
|
3759
3791
|
_defineProperty(this, "fetch", function (type, validateUrl, apiUrl, callback) {
|
|
3760
3792
|
Apxor.getController().fetchConfiguration(type, validateUrl, apiUrl, callback);
|
|
3761
3793
|
});
|
|
3762
|
-
_defineProperty(this, "
|
|
3763
|
-
return _this.
|
|
3794
|
+
_defineProperty(this, "iwiH", function () {
|
|
3795
|
+
return _this.Zogu;
|
|
3764
3796
|
});
|
|
3765
3797
|
_defineProperty(this, "getCampaignMetaFromQueryEngine", function (campaignId) {
|
|
3766
|
-
return _this.
|
|
3798
|
+
return _this.DCuT.EAAe(campaignId);
|
|
3767
3799
|
});
|
|
3768
|
-
_defineProperty(this, "
|
|
3769
|
-
return _this.
|
|
3800
|
+
_defineProperty(this, "ihPs", function () {
|
|
3801
|
+
return _this.eElz;
|
|
3770
3802
|
});
|
|
3771
3803
|
if (!CE.instance) {
|
|
3772
3804
|
CE.instance = this;
|
|
@@ -3790,7 +3822,7 @@
|
|
|
3790
3822
|
OVERALL: 0,
|
|
3791
3823
|
DATES: {}
|
|
3792
3824
|
};
|
|
3793
|
-
if (this.
|
|
3825
|
+
if (this.eElz) this._qeState[id].DATES[this.eElz] = 0;
|
|
3794
3826
|
this.setQeState(id);
|
|
3795
3827
|
}
|
|
3796
3828
|
} catch (e) {
|
|
@@ -3809,12 +3841,12 @@
|
|
|
3809
3841
|
|
|
3810
3842
|
// Increment the DATES count for this particular date by 1. If the date changes reset.
|
|
3811
3843
|
var currentDate = getDateInDDMMYYYY();
|
|
3812
|
-
if (currentDate !== this.
|
|
3813
|
-
this.
|
|
3844
|
+
if (currentDate !== this.eElz || !(configFrequency.DATES && configFrequency.DATES[currentDate])) {
|
|
3845
|
+
this.eElz = currentDate;
|
|
3814
3846
|
configFrequency.DATES = {};
|
|
3815
|
-
configFrequency.DATES[this.
|
|
3847
|
+
configFrequency.DATES[this.eElz] = 0;
|
|
3816
3848
|
}
|
|
3817
|
-
configFrequency.DATES[this.
|
|
3849
|
+
configFrequency.DATES[this.eElz] = configFrequency.DATES[this.eElz] + 1;
|
|
3818
3850
|
}
|
|
3819
3851
|
}], [{
|
|
3820
3852
|
key: "getInstance",
|
|
@@ -3833,7 +3865,7 @@
|
|
|
3833
3865
|
|
|
3834
3866
|
/* eslint-disable no-empty */
|
|
3835
3867
|
|
|
3836
|
-
window.ceVersion =
|
|
3868
|
+
window.ceVersion = 205;
|
|
3837
3869
|
try {
|
|
3838
3870
|
if (exports !== undefined || exports !== null) {
|
|
3839
3871
|
exports["default"] = CE;
|