@convertcom/js-sdk-rules 2.1.2 → 2.1.4
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/lib/enums/src/goal-data-key.d.ts +6 -1
- package/lib/enums/src/segments/source-type.d.ts +2 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +158 -142
- package/lib/index.js.map +1 -1
- package/lib/index.min.js +1 -1
- package/lib/index.min.js.map +1 -1
- package/lib/index.min.mjs +1 -1
- package/lib/index.min.mjs.map +1 -1
- package/lib/index.mjs +158 -142
- package/lib/index.mjs.map +1 -1
- package/lib/legacy/index.js +126 -111
- package/lib/legacy/index.js.map +1 -1
- package/lib/legacy/index.min.js +1 -1
- package/lib/legacy/index.min.js.map +1 -1
- package/lib/package.json +5 -5
- package/lib/types/src/config/types.gen.d.ts +596 -245
- package/lib/utils/src/http-client.d.ts +0 -4
- package/package.json +30 -30
package/lib/legacy/index.js
CHANGED
|
@@ -41,113 +41,121 @@ function objectNotEmpty(object) {
|
|
|
41
41
|
|
|
42
42
|
var murmurhash = {exports: {}};
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
var hasRequiredMurmurhash;
|
|
45
|
+
function requireMurmurhash() {
|
|
46
|
+
if (hasRequiredMurmurhash) return murmurhash.exports;
|
|
47
|
+
hasRequiredMurmurhash = 1;
|
|
48
|
+
(function (module) {
|
|
49
|
+
(function () {
|
|
50
|
+
const createBuffer = val => new TextEncoder().encode(val);
|
|
47
51
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
52
|
+
/**
|
|
53
|
+
* JS Implementation of MurmurHash2
|
|
54
|
+
*
|
|
55
|
+
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
|
|
56
|
+
* @see http://github.com/garycourt/murmurhash-js
|
|
57
|
+
* @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
|
|
58
|
+
* @see http://sites.google.com/site/murmurhash/
|
|
59
|
+
*
|
|
60
|
+
* @param {Uint8Array | string} str ASCII only
|
|
61
|
+
* @param {number} seed Positive integer only
|
|
62
|
+
* @return {number} 32-bit positive integer hash
|
|
63
|
+
*/
|
|
64
|
+
function MurmurHashV2(str, seed) {
|
|
65
|
+
if (typeof str === 'string') str = createBuffer(str);
|
|
66
|
+
let l = str.length,
|
|
67
|
+
h = seed ^ l,
|
|
68
|
+
i = 0,
|
|
69
|
+
k;
|
|
70
|
+
while (l >= 4) {
|
|
71
|
+
k = str[i] & 0xff | (str[++i] & 0xff) << 8 | (str[++i] & 0xff) << 16 | (str[++i] & 0xff) << 24;
|
|
72
|
+
k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
|
73
|
+
k ^= k >>> 24;
|
|
74
|
+
k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
|
75
|
+
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k;
|
|
76
|
+
l -= 4;
|
|
77
|
+
++i;
|
|
78
|
+
}
|
|
79
|
+
switch (l) {
|
|
80
|
+
case 3:
|
|
81
|
+
h ^= (str[i + 2] & 0xff) << 16;
|
|
82
|
+
case 2:
|
|
83
|
+
h ^= (str[i + 1] & 0xff) << 8;
|
|
84
|
+
case 1:
|
|
85
|
+
h ^= str[i] & 0xff;
|
|
86
|
+
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
|
87
|
+
}
|
|
88
|
+
h ^= h >>> 13;
|
|
89
|
+
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
|
90
|
+
h ^= h >>> 15;
|
|
91
|
+
return h >>> 0;
|
|
83
92
|
}
|
|
84
|
-
h ^= h >>> 13;
|
|
85
|
-
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
|
86
|
-
h ^= h >>> 15;
|
|
87
|
-
return h >>> 0;
|
|
88
|
-
}
|
|
89
93
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
k1 = (k1 & 0xffff) * c1 + (((k1 >>> 16) * c1 & 0xffff) << 16) & 0xffffffff;
|
|
115
|
-
k1 = k1 << 15 | k1 >>> 17;
|
|
116
|
-
k1 = (k1 & 0xffff) * c2 + (((k1 >>> 16) * c2 & 0xffff) << 16) & 0xffffffff;
|
|
117
|
-
h1 ^= k1;
|
|
118
|
-
h1 = h1 << 13 | h1 >>> 19;
|
|
119
|
-
h1b = (h1 & 0xffff) * 5 + (((h1 >>> 16) * 5 & 0xffff) << 16) & 0xffffffff;
|
|
120
|
-
h1 = (h1b & 0xffff) + 0x6b64 + (((h1b >>> 16) + 0xe654 & 0xffff) << 16);
|
|
121
|
-
}
|
|
122
|
-
k1 = 0;
|
|
123
|
-
switch (remainder) {
|
|
124
|
-
case 3:
|
|
125
|
-
k1 ^= (key[i + 2] & 0xff) << 16;
|
|
126
|
-
case 2:
|
|
127
|
-
k1 ^= (key[i + 1] & 0xff) << 8;
|
|
128
|
-
case 1:
|
|
129
|
-
k1 ^= key[i] & 0xff;
|
|
94
|
+
/*
|
|
95
|
+
* JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)
|
|
96
|
+
*
|
|
97
|
+
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
|
|
98
|
+
* @see http://github.com/garycourt/murmurhash-js
|
|
99
|
+
* @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
|
|
100
|
+
* @see http://sites.google.com/site/murmurhash/
|
|
101
|
+
*
|
|
102
|
+
* @param {Uint8Array | string} key ASCII only
|
|
103
|
+
* @param {number} seed Positive integer only
|
|
104
|
+
* @return {number} 32-bit positive integer hash
|
|
105
|
+
*/
|
|
106
|
+
function MurmurHashV3(key, seed) {
|
|
107
|
+
if (typeof key === 'string') key = createBuffer(key);
|
|
108
|
+
let remainder, bytes, h1, h1b, c1, c2, k1, i;
|
|
109
|
+
remainder = key.length & 3; // key.length % 4
|
|
110
|
+
bytes = key.length - remainder;
|
|
111
|
+
h1 = seed;
|
|
112
|
+
c1 = 0xcc9e2d51;
|
|
113
|
+
c2 = 0x1b873593;
|
|
114
|
+
i = 0;
|
|
115
|
+
while (i < bytes) {
|
|
116
|
+
k1 = key[i] & 0xff | (key[++i] & 0xff) << 8 | (key[++i] & 0xff) << 16 | (key[++i] & 0xff) << 24;
|
|
117
|
+
++i;
|
|
130
118
|
k1 = (k1 & 0xffff) * c1 + (((k1 >>> 16) * c1 & 0xffff) << 16) & 0xffffffff;
|
|
131
119
|
k1 = k1 << 15 | k1 >>> 17;
|
|
132
120
|
k1 = (k1 & 0xffff) * c2 + (((k1 >>> 16) * c2 & 0xffff) << 16) & 0xffffffff;
|
|
133
121
|
h1 ^= k1;
|
|
122
|
+
h1 = h1 << 13 | h1 >>> 19;
|
|
123
|
+
h1b = (h1 & 0xffff) * 5 + (((h1 >>> 16) * 5 & 0xffff) << 16) & 0xffffffff;
|
|
124
|
+
h1 = (h1b & 0xffff) + 0x6b64 + (((h1b >>> 16) + 0xe654 & 0xffff) << 16);
|
|
125
|
+
}
|
|
126
|
+
k1 = 0;
|
|
127
|
+
switch (remainder) {
|
|
128
|
+
case 3:
|
|
129
|
+
k1 ^= (key[i + 2] & 0xff) << 16;
|
|
130
|
+
case 2:
|
|
131
|
+
k1 ^= (key[i + 1] & 0xff) << 8;
|
|
132
|
+
case 1:
|
|
133
|
+
k1 ^= key[i] & 0xff;
|
|
134
|
+
k1 = (k1 & 0xffff) * c1 + (((k1 >>> 16) * c1 & 0xffff) << 16) & 0xffffffff;
|
|
135
|
+
k1 = k1 << 15 | k1 >>> 17;
|
|
136
|
+
k1 = (k1 & 0xffff) * c2 + (((k1 >>> 16) * c2 & 0xffff) << 16) & 0xffffffff;
|
|
137
|
+
h1 ^= k1;
|
|
138
|
+
}
|
|
139
|
+
h1 ^= key.length;
|
|
140
|
+
h1 ^= h1 >>> 16;
|
|
141
|
+
h1 = (h1 & 0xffff) * 0x85ebca6b + (((h1 >>> 16) * 0x85ebca6b & 0xffff) << 16) & 0xffffffff;
|
|
142
|
+
h1 ^= h1 >>> 13;
|
|
143
|
+
h1 = (h1 & 0xffff) * 0xc2b2ae35 + (((h1 >>> 16) * 0xc2b2ae35 & 0xffff) << 16) & 0xffffffff;
|
|
144
|
+
h1 ^= h1 >>> 16;
|
|
145
|
+
return h1 >>> 0;
|
|
134
146
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
module.exports = murmur;
|
|
148
|
-
}
|
|
149
|
-
})();
|
|
150
|
-
})(murmurhash);
|
|
147
|
+
const murmur = MurmurHashV3;
|
|
148
|
+
murmur.v2 = MurmurHashV2;
|
|
149
|
+
murmur.v3 = MurmurHashV3;
|
|
150
|
+
{
|
|
151
|
+
module.exports = murmur;
|
|
152
|
+
}
|
|
153
|
+
})();
|
|
154
|
+
})(murmurhash);
|
|
155
|
+
return murmurhash.exports;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
requireMurmurhash();
|
|
151
159
|
|
|
152
160
|
/*!
|
|
153
161
|
* Convert JS SDK
|
|
@@ -173,11 +181,13 @@ function camelCase(input) {
|
|
|
173
181
|
* @returns {boolean}
|
|
174
182
|
*/
|
|
175
183
|
function isNumeric(value) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
184
|
+
const regex = /^-?(?:(?:\d{1,3}(?:,\d{3})+|\d+)(?:\.\d+)?|\.\d+)$/;
|
|
185
|
+
if (typeof value === 'number')
|
|
186
|
+
return Number.isFinite(value);
|
|
187
|
+
if (typeof value !== 'string' || !regex.test(value))
|
|
188
|
+
return false;
|
|
189
|
+
const num = parseFloat(value.replace(/,/g, ''));
|
|
190
|
+
return Number.isFinite(num);
|
|
181
191
|
}
|
|
182
192
|
/**
|
|
183
193
|
* Convert a string to a number
|
|
@@ -389,7 +399,7 @@ const MESSAGES = {
|
|
|
389
399
|
SEGMENTATION_NOT_RESTRICTED: 'Segmentation not restricted',
|
|
390
400
|
RULE_NOT_MATCH: 'Rule does not match',
|
|
391
401
|
RULE_MATCH: 'Found matched rule at OR block #',
|
|
392
|
-
RULE_MATCH_AND: 'AND block rule
|
|
402
|
+
RULE_MATCH_AND: 'AND block rule matched',
|
|
393
403
|
RULE_MATCH_START: 'About to evaluate rule #',
|
|
394
404
|
LOCATION_ACTIVATED: 'Location # activated',
|
|
395
405
|
LOCATION_DEACTIVATED: 'Location # deactivated',
|
|
@@ -460,6 +470,11 @@ var GoalDataKey;
|
|
|
460
470
|
GoalDataKey["AMOUNT"] = "amount";
|
|
461
471
|
GoalDataKey["PRODUCTS_COUNT"] = "productsCount";
|
|
462
472
|
GoalDataKey["TRANSACTION_ID"] = "transactionId";
|
|
473
|
+
GoalDataKey["CUSTOM_DIMENSION_1"] = "customDimension1";
|
|
474
|
+
GoalDataKey["CUSTOM_DIMENSION_2"] = "customDimension2";
|
|
475
|
+
GoalDataKey["CUSTOM_DIMENSION_3"] = "customDimension3";
|
|
476
|
+
GoalDataKey["CUSTOM_DIMENSION_4"] = "customDimension4";
|
|
477
|
+
GoalDataKey["CUSTOM_DIMENSION_5"] = "customDimension5";
|
|
463
478
|
})(GoalDataKey || (GoalDataKey = {}));
|
|
464
479
|
|
|
465
480
|
/*!
|
|
@@ -624,6 +639,7 @@ var SourceType;
|
|
|
624
639
|
SourceType["SEARCH"] = "search";
|
|
625
640
|
SourceType["REFERRAL"] = "referral";
|
|
626
641
|
SourceType["DIRECT"] = "direct";
|
|
642
|
+
SourceType["AI_TOOL"] = "ai_tool";
|
|
627
643
|
})(SourceType || (SourceType = {}));
|
|
628
644
|
|
|
629
645
|
/*!
|
|
@@ -840,14 +856,13 @@ class RuleManager {
|
|
|
840
856
|
arrayNotEmpty(rulesSubset === null || rulesSubset === void 0 ? void 0 : rulesSubset.AND)) {
|
|
841
857
|
for (let i = 0, l = rulesSubset.AND.length; i < l; i++) {
|
|
842
858
|
match = this._processORWHEN(data, rulesSubset.AND[i]);
|
|
843
|
-
|
|
844
|
-
|
|
859
|
+
// AND requires ALL to explicitly return true
|
|
860
|
+
if (match !== true) {
|
|
861
|
+
return match;
|
|
845
862
|
}
|
|
846
863
|
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
}
|
|
850
|
-
return match;
|
|
864
|
+
(_b = (_a = this._loggerManager) === null || _a === void 0 ? void 0 : _a.info) === null || _b === void 0 ? void 0 : _b.call(_a, 'RuleManager._processAND()', MESSAGES.RULE_MATCH_AND);
|
|
865
|
+
return true;
|
|
851
866
|
}
|
|
852
867
|
else {
|
|
853
868
|
(_d = (_c = this._loggerManager) === null || _c === void 0 ? void 0 : _c.warn) === null || _d === void 0 ? void 0 : _d.call(_c, 'RuleManager._processAND()', ERROR_MESSAGES.RULE_NOT_VALID);
|
package/lib/legacy/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/murmurhash/murmurhash.js"],"sourcesContent":["(function(){\n const _global = this;\n\n const createBuffer = (val) => new TextEncoder().encode(val)\n\n /**\n * JS Implementation of MurmurHash2\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV2(str, seed) {\n if (typeof str === 'string') str = createBuffer(str);\n let\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k =\n ((str[i] & 0xff)) |\n ((str[++i] & 0xff) << 8) |\n ((str[++i] & 0xff) << 16) |\n ((str[++i] & 0xff) << 24);\n\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3: h ^= (str[i + 2] & 0xff) << 16;\n case 2: h ^= (str[i + 1] & 0xff) << 8;\n case 1: h ^= (str[i] & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n };\n\n /*\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV3(key, seed) {\n if (typeof key === 'string') key = createBuffer(key);\n\n let remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;\n\n remainder = key.length & 3; // key.length % 4\n bytes = key.length - remainder;\n h1 = seed;\n c1 = 0xcc9e2d51;\n c2 = 0x1b873593;\n i = 0;\n\n while (i < bytes) {\n k1 =\n ((key[i] & 0xff)) |\n ((key[++i] & 0xff) << 8) |\n ((key[++i] & 0xff) << 16) |\n ((key[++i] & 0xff) << 24);\n ++i;\n\n k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3: k1 ^= (key[i + 2] & 0xff) << 16;\n case 2: k1 ^= (key[i + 1] & 0xff) << 8;\n case 1: k1 ^= (key[i] & 0xff);\n\n k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= key.length;\n\n h1 ^= h1 >>> 16;\n h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n h1 ^= h1 >>> 16;\n\n return h1 >>> 0;\n }\n\n const murmur = MurmurHashV3;\n murmur.v2 = MurmurHashV2;\n murmur.v3 = MurmurHashV3;\n\n if (typeof(module) != 'undefined') {\n module.exports = murmur;\n } else {\n const _previousRoot = _global.murmur;\n murmur.noConflict = function() {\n _global.murmur = _previousRoot;\n return murmur;\n }\n _global.murmur = murmur;\n }\n}());\n"],"names":["createBuffer","val","TextEncoder","encode","MurmurHashV2","str","seed","l","length","h","i","k","MurmurHashV3","key","remainder","bytes","h1","h1b","c1","c1b","c2","k1","murmur","v2","v3","module","exports"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAC,CAAU,YAAA;AAGT,IAAA,MAAMA,YAAY,GAAIC,GAAG,IAAK,IAAIC,WAAW,EAAE,CAACC,MAAM,CAACF,GAAG,CAAC,CAAA;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACE,IAAA,SAASG,YAAYA,CAACC,GAAG,EAAEC,IAAI,EAAE;MAC/B,IAAI,OAAOD,GAAG,KAAK,QAAQ,EAAEA,GAAG,GAAGL,YAAY,CAACK,GAAG,CAAC,CAAA;AACpD,MAAA,IACEE,CAAC,GAAGF,GAAG,CAACG,MAAM;QACdC,CAAC,GAAGH,IAAI,GAAGC,CAAC;AACZG,QAAAA,CAAC,GAAG,CAAC;QACLC,CAAC,CAAA;MAEH,O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,YAAY,CAAA;IAEW;MACjCa,MAAA,CAAAC,OAAA,GAAiBJ,MAAM,CAAA;AAC3B,KAOG;AACH,GAAC,GAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/murmurhash/murmurhash.js"],"sourcesContent":["(function(){\n const _global = this;\n\n const createBuffer = (val) => new TextEncoder().encode(val)\n\n /**\n * JS Implementation of MurmurHash2\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV2(str, seed) {\n if (typeof str === 'string') str = createBuffer(str);\n let\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k =\n ((str[i] & 0xff)) |\n ((str[++i] & 0xff) << 8) |\n ((str[++i] & 0xff) << 16) |\n ((str[++i] & 0xff) << 24);\n\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3: h ^= (str[i + 2] & 0xff) << 16;\n case 2: h ^= (str[i + 1] & 0xff) << 8;\n case 1: h ^= (str[i] & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n };\n\n /*\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV3(key, seed) {\n if (typeof key === 'string') key = createBuffer(key);\n\n let remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;\n\n remainder = key.length & 3; // key.length % 4\n bytes = key.length - remainder;\n h1 = seed;\n c1 = 0xcc9e2d51;\n c2 = 0x1b873593;\n i = 0;\n\n while (i < bytes) {\n k1 =\n ((key[i] & 0xff)) |\n ((key[++i] & 0xff) << 8) |\n ((key[++i] & 0xff) << 16) |\n ((key[++i] & 0xff) << 24);\n ++i;\n\n k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3: k1 ^= (key[i + 2] & 0xff) << 16;\n case 2: k1 ^= (key[i + 1] & 0xff) << 8;\n case 1: k1 ^= (key[i] & 0xff);\n\n k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= key.length;\n\n h1 ^= h1 >>> 16;\n h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n h1 ^= h1 >>> 16;\n\n return h1 >>> 0;\n }\n\n const murmur = MurmurHashV3;\n murmur.v2 = MurmurHashV2;\n murmur.v3 = MurmurHashV3;\n\n if (typeof(module) != 'undefined') {\n module.exports = murmur;\n } else {\n const _previousRoot = _global.murmur;\n murmur.noConflict = function() {\n _global.murmur = _previousRoot;\n return murmur;\n }\n _global.murmur = murmur;\n }\n}());\n"],"names":["createBuffer","val","TextEncoder","encode","MurmurHashV2","str","seed","l","length","h","i","k","MurmurHashV3","key","remainder","bytes","h1","h1b","c1","c2","k1","murmur","v2","v3","module","exports"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAC,CAAA,YAAU;AAGT,MAAA,MAAMA,YAAY,GAAIC,GAAG,IAAK,IAAIC,WAAW,EAAE,CAACC,MAAM,CAACF,GAAG,CAAC;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACE,MAAA,SAASG,YAAYA,CAACC,GAAG,EAAEC,IAAI,EAAE;QAC/B,IAAI,OAAOD,GAAG,KAAK,QAAQ,EAAEA,GAAG,GAAGL,YAAY,CAACK,GAAG,CAAC;AACpD,QAAA,IACEE,CAAC,GAAGF,GAAG,CAACG,MAAM;UACdC,CAAC,GAAGH,IAAI,GAAGC,CAAC;AACZG,UAAAA,CAAC,GAAG,CAAC;UACLC,CAAC;QAEH,OAAOJ,CAAC,IAAI,CAAC,EAAE;AACbI,UAAAA,CAAC,GACGN,GAAG,CAACK,CAAC,CAAC,GAAG,IAAI,GACd,CAACL,GAAG,CAAC,EAAEK,CAAC,CAAC,GAAG,IAAI,KAAK,CAAE,GACvB,CAACL,GAAG,CAAC,EAAEK,CAAC,CAAC,GAAG,IAAI,KAAK,EAAG,GACxB,CAACL,GAAG,CAAC,EAAEK,CAAC,CAAC,GAAG,IAAI,KAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
package/lib/legacy/index.min.js
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Copyright(c) 2020-2022 Convert Insights, Inc
|
|
5
5
|
* License Apache-2.0
|
|
6
6
|
*/
|
|
7
|
-
"use strict";function e(e){return Array.isArray(e)&&e.length>0}function t(e){return"object"==typeof e&&null!==e&&Object.keys(e).length>0}var o,r,n,a;function i(e){if("number"==typeof e)return!0;const t=parseFloat(String(e));return Number.isFinite(t)&&!isNaN(t)}function s(e){if("number"==typeof e)return e;const t=String(e).split(",");return parseFloat("0"==t[0]?String(e).replace(/,/g,"."):String(e).replace(/,/g,""))}o={exports:{}},function(){const e=e=>(new TextEncoder).encode(e);function t(t,o){let r,n,a,i,s,l,c,u;for("string"==typeof t&&(t=e(t)),r=3&t.length,n=t.length-r,a=o,s=3432918353,l=461845907,u=0;u<n;)c=255&t[u]|(255&t[++u])<<8|(255&t[++u])<<16|(255&t[++u])<<24,++u,c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*l+(((c>>>16)*l&65535)<<16)&4294967295,a^=c,a=a<<13|a>>>19,i=5*(65535&a)+((5*(a>>>16)&65535)<<16)&4294967295,a=27492+(65535&i)+((58964+(i>>>16)&65535)<<16);switch(c=0,r){case 3:c^=(255&t[u+2])<<16;case 2:c^=(255&t[u+1])<<8;case 1:c^=255&t[u],c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*l+(((c>>>16)*l&65535)<<16)&4294967295,a^=c}return a^=t.length,a^=a>>>16,a=2246822507*(65535&a)+((2246822507*(a>>>16)&65535)<<16)&4294967295,a^=a>>>13,a=3266489909*(65535&a)+((3266489909*(a>>>16)&65535)<<16)&4294967295,a^=a>>>16,a>>>0}const r=t;r.v2=function(t,o){"string"==typeof t&&(t=e(t));let r,n=t.length,a=o^n,i=0;for(;n>=4;)r=255&t[i]|(255&t[++i])<<8|(255&t[++i])<<16|(255&t[++i])<<24,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),r^=r>>>24,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^r,n-=4,++i;switch(n){case 3:a^=(255&t[i+2])<<16;case 2:a^=(255&t[i+1])<<8;case 1:a^=255&t[i],a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)}return a^=a>>>13,a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16),a^=a>>>15,a>>>0},r.v3=t,o.exports=r}();class l{static equals(e,o,r){return Array.isArray(e)?this._returnNegationCheck(-1!==e.indexOf(o),r):t(e)?this._returnNegationCheck(-1!==Object.keys(e).indexOf(String(o)),r):(e=String(e),o=String(o),e=e.valueOf().toLowerCase(),o=o.valueOf().toLowerCase(),this._returnNegationCheck(e===o,r))}static less(e,t,o){return typeof(e=i(e)?s(e):e)==typeof(t=i(t)?s(t):t)&&this._returnNegationCheck(e<t,o)}static lessEqual(e,t,o){return typeof(e=i(e)?s(e):e)==typeof(t=i(t)?s(t):t)&&this._returnNegationCheck(e<=t,o)}static contains(e,t,o){return e=String(e),t=String(t),e=e.valueOf().toLowerCase(),0===(t=t.valueOf().toLowerCase()).replace(/^([\s]*)|([\s]*)$/g,"").length?this._returnNegationCheck(!0,o):this._returnNegationCheck(-1!==e.indexOf(t),o)}static isIn(e,t,o=!1,r="|"){const n=String(e).split(r).map((e=>String(e)));"string"==typeof t&&(t=t.split(r)),Array.isArray(t)||(t=[]),t=t.map((e=>String(e).valueOf().toLowerCase()));for(let e=0;e<n.length;e++)if(-1!==t.indexOf(n[e]))return this._returnNegationCheck(!0,o);return this._returnNegationCheck(!1,o)}static startsWith(e,t,o){return e=String(e).valueOf().toLowerCase(),t=String(t).valueOf().toLowerCase(),this._returnNegationCheck(0===e.indexOf(t),o)}static endsWith(e,t,o){return e=String(e).valueOf().toLowerCase(),t=String(t).valueOf().toLowerCase(),this._returnNegationCheck(-1!==e.indexOf(t,e.length-t.length),o)}static regexMatches(e,t,o){e=String(e).valueOf().toLowerCase(),t=String(t).valueOf();const r=new RegExp(t,"i");return this._returnNegationCheck(r.test(e),o)}static _returnNegationCheck(e,t=!1){return t?!e:e}}r=l,l.equalsNumber=r.equals,l.matches=r.equals,"function"==typeof SuppressedError&&SuppressedError,function(e){e.VARIAION_NOT_DECIDED="convert.com_variation_not_decided"}(n||(n={})),function(e){e.FORCE_MULTIPLE_TRANSACTIONS="forceMultipleTransactions"}(a||(a={}));const c={SDK_KEY_MISSING:"SDK key is missing",DATA_OBJECT_MISSING:"Data object is missing",CONFIG_DATA_NOT_VALID:"Config Data is not valid",SDK_OR_DATA_OBJECT_REQUIRED:"SDK key or Data object should be provided",RULE_NOT_VALID:"Provided rule is not valid",RULE_DATA_NOT_VALID:"Provided rule data is not valid",RULE_MATCH_TYPE_NOT_SUPPORTED:'Provided rule matching type "#" is not supported',RULE_ERROR:"Rule error",DATA_STORE_NOT_VALID:"DataStore object is not valid. It should contain get and set methods",VISITOR_ID_REQUIRED:"Visitor string string is not present",GOAL_DATA_NOT_VALID:"GoalData object is not valid",UNABLE_TO_SELECT_BUCKET_FOR_VISITOR:"Unable to bucket visitor",UNABLE_TO_PERFORM_NETWORK_REQUEST:"Unable to perform network request",UNSUPPORTED_RESPONSE_TYPE:"Unsupported response type"},u={CONFIG_DATA_UPDATED:"Config Data updated",CORE_CONSTRUCTOR:"Core Manager constructor has been called",CORE_INITIALIZED:"Core Manager has been initialized",EXPERIENCE_CONSTRUCTOR:"Experience Manager constructor has been called",EXPERIENCE_NOT_FOUND:"Experience not found",EXPERIENCE_ARCHIVED:"Experience archived",EXPERIENCE_ENVIRONMENT_NOT_MATCH:"Experience environment does not match",EXPERIENCE_RULES_MATCHED:"Experience rules matched",VARIATIONS_NOT_FOUND:"Variations not found",VARIATION_CHANGE_NOT_SUPPORTED:"Variation change not supported",FEATURE_CONSTRUCTOR:"Feature Manager constructor has been called",FEATURE_NOT_FOUND:"Fullstack Feature not found",FEATURE_VARIABLES_NOT_FOUND:"Fullstack Feature Variables not found",FEATURE_VARIABLES_TYPE_NOT_FOUND:"Fullstack Feature Variables Type not found",BUCKETING_CONSTRUCTOR:"Bucketing Manager constructor has been called",DATA_CONSTRUCTOR:"Data Manager constructor has been called",RULE_CONSTRUCTOR:"Rule Manager constructor has been called",PROCESSING_ENTITY:"Processing #",LOCATION_MATCH:"Location # rule matched",LOCATION_NOT_MATCH:"Location does not match",LOCATION_NOT_RESTRICTED:"Location not restricted",AUDIENCE_MATCH:"Audience # rule matched",AUDIENCE_NOT_MATCH:"Audience does not match",NON_PERMANENT_AUDIENCE_NOT_RESTRICTED:"Non-Permanent Audience not restricted",AUDIENCE_NOT_RESTRICTED:"Audience not restricted",SEGMENTATION_MATCH:"Segmentation # rule matched",SEGMENTATION_NOT_RESTRICTED:"Segmentation not restricted",RULE_NOT_MATCH:"Rule does not match",RULE_MATCH:"Found matched rule at OR block #",RULE_MATCH_AND:"AND block rule macthed",RULE_MATCH_START:"About to evaluate rule #",LOCATION_ACTIVATED:"Location # activated",LOCATION_DEACTIVATED:"Location # deactivated",BUCKETED_VISITOR_FOUND:"Visitor is already bucketed for variation #",BUCKETED_VISITOR_FORCED:"Forcing variation #",BUCKETED_VISITOR:"Visitor is bucketed for variation #",GOAL_NOT_FOUND:"Goal not found",GOAL_RULE_NOT_MATCH:"Goal rule do not match",GOAL_FOUND:"Goal # already triggered",SEGMENTS_NOT_FOUND:"Segments not found",SEGMENTS_RULE_NOT_MATCH:"Segments rule do not match",CUSTOM_SEGMENTS_KEY_FOUND:"Custom segments key already set",SEND_BEACON_SUCCESS:"The user agent successfully queued the data for transfer",RELEASING_QUEUE:"Releasing event queue..."};var d,_,E,R,T,O,g,N,A,p,C,h,I,f,S,v;!function(e){e.OFF="OFF",e.EU_ONLY="EU ONLY",e.EEA_ONLY="EEA ONLY",e.WORLDWIDE="Worldwide"}(d||(d={})),function(e){e.AUDIENCE="audience",e.LOCATION="location",e.SEGMENT="segment",e.FEATURE="feature",e.GOAL="goal",e.EXPERIENCE="experience",e.VARIATION="variation"}(_||(_={})),function(e){e.ENABLED="enabled",e.DISABLED="disabled"}(E||(E={})),function(e){e.AMOUNT="amount",e.PRODUCTS_COUNT="productsCount",e.TRANSACTION_ID="transactionId"}(R||(R={})),function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(T||(T={})),function(e){e.LOG="log",e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.WARN="warn",e.ERROR="error"}(O||(O={})),function(e){e.WEB="web",e.FULLSTACK="fullstack"}(g||(g={})),function(e){e.NO_DATA_FOUND="convert.com_no_data_found",e.NEED_MORE_DATA="convert.com_need_more_data"}(N||(N={})),function(e){e.READY="ready",e.CONFIG_UPDATED="config.updated",e.API_QUEUE_RELEASED="api.queue.released",e.BUCKETING="bucketing",e.CONVERSION="conversion",e.SEGMENTS="segments",e.LOCATION_ACTIVATED="location.activated",e.LOCATION_DEACTIVATED="location.deactivated",e.AUDIENCES="audiences",e.DATA_STORE_QUEUE_RELEASED="datastore.queue.released"}(A||(A={})),function(e){e.RICH_STRUCTURE="richStructure",e.CUSTOM_CODE="customCode",e.DEFAULT_CODE="defaultCode",e.DEFAULT_CODE_MULTIPAGE="defaultCodeMultipage",e.DEFAULT_REDIRECT="defaultRedirect",e.FULLSTACK_FEATURE="fullStackFeature"}(p||(p={})),function(e){e.IE="IE",e.CH="CH",e.FF="FF",e.OP="OP",e.SF="SF",e.EDG="EDG",e.MO="MO",e.NS="NS",e.OTH="OTH"}(C||(C={})),function(e){e.ALLPH="ALLPH",e.IPH="IPH",e.OTHPH="OTHPH",e.ALLTAB="ALLTAB",e.IPAD="IPAD",e.OTHTAB="OTHTAB",e.DESK="DESK",e.OTHDEV="OTHDEV"}(h||(h={})),function(e){e.COUNTRY="country",e.BROWSER="browser",e.DEVICES="devices",e.SOURCE="source",e.CAMPAIGN="campaign",e.VISITOR_TYPE="visitorType",e.CUSTOM_SEGMENTS="customSegments"}(I||(I={})),function(e){e.CAMPAIGN="campaign",e.SEARCH="search",e.REFERRAL="referral",e.DIRECT="direct"}(f||(f={})),function(e){e.NEW="new",e.RETURNING="returning"}(S||(S={})),function(e){e[e.Continue=100]="Continue",e[e.SwitchingProtocols=101]="SwitchingProtocols",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints",e[e.Ok=200]="Ok",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.ImUsed=226]="ImUsed",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.Unused=306]="Unused",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.UriTooLong=414]="UriTooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.ImATeapot=418]="ImATeapot",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.TooEarly=425]="TooEarly",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HttpVersionNotSupported=505]="HttpVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(v||(v={}));const D=!0;exports.RuleManager=class{constructor(e,{loggerManager:t}={}){var o,r,n,a,i;this._comparisonProcessor=l,this._negation="!",this._keys_case_sensitive=D,this._loggerManager=t,this._comparisonProcessor=(null===(o=null==e?void 0:e.rules)||void 0===o?void 0:o.comparisonProcessor)||l,this._negation=String((null===(r=null==e?void 0:e.rules)||void 0===r?void 0:r.negation)||"!"),this._keys_case_sensitive=(null===(n=null==e?void 0:e.rules)||void 0===n?void 0:n.keys_case_sensitive)||D,this._mapper=(null==e?void 0:e.mapper)||(e=>e),null===(i=null===(a=this._loggerManager)||void 0===a?void 0:a.trace)||void 0===i||i.call(a,"RuleManager()",u.RULE_CONSTRUCTOR,this)}set comparisonProcessor(e){this._comparisonProcessor=e}get comparisonProcessor(){return this._comparisonProcessor}getComparisonProcessorMethods(){return Object.getOwnPropertyNames(this._comparisonProcessor).filter((e=>"function"==typeof this._comparisonProcessor[e]))}isRuleMatched(t,o,r){var n,a,i,s,l,d,_,E,R,T;let O;if(null===(a=null===(n=this._loggerManager)||void 0===n?void 0:n.trace)||void 0===a||a.call(n,"RuleManager.isRuleMatched()",this._mapper({data:t,ruleSet:o})),r&&(null===(s=null===(i=this._loggerManager)||void 0===i?void 0:i.info)||void 0===s||s.call(i,"RuleManager.isRuleMatched()",u.PROCESSING_ENTITY.replace("#",r))),Object.prototype.hasOwnProperty.call(o,"OR")&&e(null==o?void 0:o.OR)){for(let e=0,n=o.OR.length;e<n;e++){if(O=this._processAND(t,o.OR[e]),!0===O)return O;Object.values(N).includes(O)?null===(d=null===(l=this._loggerManager)||void 0===l?void 0:l.info)||void 0===d||d.call(l,"RuleManager.isRuleMatched()",r||"",c.RULE_ERROR):null===(E=null===(_=this._loggerManager)||void 0===_?void 0:_.info)||void 0===E||E.call(_,"RuleManager.isRuleMatched()",r||"",!1===O?u.RULE_NOT_MATCH:u.RULE_MATCH.replace("#",String(e)))}if(!1!==O)return O}else null===(T=null===(R=this._loggerManager)||void 0===R?void 0:R.warn)||void 0===T||T.call(R,"RuleManager.isRuleMatched()",r||"",c.RULE_NOT_VALID);return!1}isValidRule(e){var t,o;return null===(o=null===(t=this._loggerManager)||void 0===t?void 0:t.trace)||void 0===o||o.call(t,"RuleManager.isValidRule()",this._mapper({rule:e})),Object.prototype.hasOwnProperty.call(e,"matching")&&"object"==typeof e.matching&&Object.prototype.hasOwnProperty.call(e.matching,"match_type")&&"string"==typeof e.matching.match_type&&Object.prototype.hasOwnProperty.call(e.matching,"negated")&&"boolean"==typeof e.matching.negated&&Object.prototype.hasOwnProperty.call(e,"value")}_processAND(t,o){var r,n,a,i;let s;if(Object.prototype.hasOwnProperty.call(o,"AND")&&e(null==o?void 0:o.AND)){for(let e=0,r=o.AND.length;e<r;e++)if(s=this._processORWHEN(t,o.AND[e]),!1===s)return!1;return!1!==s&&(null===(n=null===(r=this._loggerManager)||void 0===r?void 0:r.info)||void 0===n||n.call(r,"RuleManager._processAND()",u.RULE_MATCH_AND)),s}return null===(i=null===(a=this._loggerManager)||void 0===a?void 0:a.warn)||void 0===i||i.call(a,"RuleManager._processAND()",c.RULE_NOT_VALID),!1}_processORWHEN(t,o){var r,n;let a;if(Object.prototype.hasOwnProperty.call(o,"OR_WHEN")&&e(null==o?void 0:o.OR_WHEN)){for(let e=0,r=o.OR_WHEN.length;e<r;e++)if(a=this._processRuleItem(t,o.OR_WHEN[e]),!0===a)return a;if(!1!==a)return a}else null===(n=null===(r=this._loggerManager)||void 0===r?void 0:r.warn)||void 0===n||n.call(r,"RuleManager._processORWHEN()",c.RULE_NOT_VALID);return!1}_processRuleItem(e,o){var r,n,a,i,s,l,d,_,E,R,T,O,g;if(this.isValidRule(o))try{const R=o.matching.negated||!1,T=o.matching.match_type;if(-1!==this.getComparisonProcessorMethods().indexOf(T))if(e&&"object"==typeof e)if(this.isUsingCustomInterface(e)){if(null==o?void 0:o.rule_type){null===(n=null===(r=this._loggerManager)||void 0===r?void 0:r.info)||void 0===n||n.call(r,"RuleManager._processRuleItem()",u.RULE_MATCH_START.replace("#",o.rule_type));for(const t of Object.getOwnPropertyNames(e.constructor.prototype)){if("constructor"===t)continue;const r=`get ${o.rule_type.replace(/_/g," ")}`.replace(/(?:^\w|[A-Z]|\b\w)/g,(function(e,t){return 0===t?e.toLowerCase():e.toUpperCase()})).replace(/\s+/g,"");if(t===r||(null===(a=null==e?void 0:e.mapper)||void 0===a?void 0:a.call(e,t))===r){const r=e[t](o);return Object.values(N).includes(r)||"js_condition"===o.rule_type?r:this._comparisonProcessor[T](r,o.value,R)}}}}else if(t(e))for(const t of Object.keys(e)){const r=this._keys_case_sensitive?t:t.toLowerCase();if(r===(this._keys_case_sensitive?o.key:String(o.key).toLowerCase()))return this._comparisonProcessor[T](e[t],o.value,R)}else null===(s=null===(i=this._loggerManager)||void 0===i?void 0:i.trace)||void 0===s||s.call(i,"RuleManager._processRuleItem()",{warn:c.RULE_DATA_NOT_VALID,data:e});else null===(d=null===(l=this._loggerManager)||void 0===l?void 0:l.trace)||void 0===d||d.call(l,"RuleManager._processRuleItem()",{warn:c.RULE_NOT_VALID,data:e,rule:o});else null===(E=null===(_=this._loggerManager)||void 0===_?void 0:_.warn)||void 0===E||E.call(_,"RuleManager._processRuleItem()",c.RULE_MATCH_TYPE_NOT_SUPPORTED.replace("#",T))}catch(e){null===(T=null===(R=this._loggerManager)||void 0===R?void 0:R.error)||void 0===T||T.call(R,"RuleManager._processRuleItem()",{error:e.message})}else null===(g=null===(O=this._loggerManager)||void 0===O?void 0:O.warn)||void 0===g||g.call(O,"RuleManager._processRuleItem()",c.RULE_NOT_VALID);return!1}isUsingCustomInterface(e){return t(e)&&Object.prototype.hasOwnProperty.call(e,"name")&&"RuleData"===e.name}};
|
|
7
|
+
"use strict";function e(e){return Array.isArray(e)&&e.length>0}function t(e){return"object"==typeof e&&null!==e&&Object.keys(e).length>0}var o,r,n,a,i,s={exports:{}};function l(e){if("number"==typeof e)return Number.isFinite(e);if("string"!=typeof e||!/^-?(?:(?:\d{1,3}(?:,\d{3})+|\d+)(?:\.\d+)?|\.\d+)$/.test(e))return!1;const t=parseFloat(e.replace(/,/g,""));return Number.isFinite(t)}function c(e){if("number"==typeof e)return e;const t=String(e).split(",");return parseFloat("0"==t[0]?String(e).replace(/,/g,"."):String(e).replace(/,/g,""))}o||(o=1,r=s,function(){const e=e=>(new TextEncoder).encode(e);function t(t,o){let r,n,a,i,s,l,c,u;for("string"==typeof t&&(t=e(t)),r=3&t.length,n=t.length-r,a=o,s=3432918353,l=461845907,u=0;u<n;)c=255&t[u]|(255&t[++u])<<8|(255&t[++u])<<16|(255&t[++u])<<24,++u,c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*l+(((c>>>16)*l&65535)<<16)&4294967295,a^=c,a=a<<13|a>>>19,i=5*(65535&a)+((5*(a>>>16)&65535)<<16)&4294967295,a=27492+(65535&i)+((58964+(i>>>16)&65535)<<16);switch(c=0,r){case 3:c^=(255&t[u+2])<<16;case 2:c^=(255&t[u+1])<<8;case 1:c^=255&t[u],c=(65535&c)*s+(((c>>>16)*s&65535)<<16)&4294967295,c=c<<15|c>>>17,c=(65535&c)*l+(((c>>>16)*l&65535)<<16)&4294967295,a^=c}return a^=t.length,a^=a>>>16,a=2246822507*(65535&a)+((2246822507*(a>>>16)&65535)<<16)&4294967295,a^=a>>>13,a=3266489909*(65535&a)+((3266489909*(a>>>16)&65535)<<16)&4294967295,a^=a>>>16,a>>>0}const o=t;o.v2=function(t,o){"string"==typeof t&&(t=e(t));let r,n=t.length,a=o^n,i=0;for(;n>=4;)r=255&t[i]|(255&t[++i])<<8|(255&t[++i])<<16|(255&t[++i])<<24,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),r^=r>>>24,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)^r,n-=4,++i;switch(n){case 3:a^=(255&t[i+2])<<16;case 2:a^=(255&t[i+1])<<8;case 1:a^=255&t[i],a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16)}return a^=a>>>13,a=1540483477*(65535&a)+((1540483477*(a>>>16)&65535)<<16),a^=a>>>15,a>>>0},o.v3=t,r.exports=o}());class u{static equals(e,o,r){return Array.isArray(e)?this._returnNegationCheck(-1!==e.indexOf(o),r):t(e)?this._returnNegationCheck(-1!==Object.keys(e).indexOf(String(o)),r):(e=String(e),o=String(o),e=e.valueOf().toLowerCase(),o=o.valueOf().toLowerCase(),this._returnNegationCheck(e===o,r))}static less(e,t,o){return typeof(e=l(e)?c(e):e)==typeof(t=l(t)?c(t):t)&&this._returnNegationCheck(e<t,o)}static lessEqual(e,t,o){return typeof(e=l(e)?c(e):e)==typeof(t=l(t)?c(t):t)&&this._returnNegationCheck(e<=t,o)}static contains(e,t,o){return e=String(e),t=String(t),e=e.valueOf().toLowerCase(),0===(t=t.valueOf().toLowerCase()).replace(/^([\s]*)|([\s]*)$/g,"").length?this._returnNegationCheck(!0,o):this._returnNegationCheck(-1!==e.indexOf(t),o)}static isIn(e,t,o=!1,r="|"){const n=String(e).split(r).map((e=>String(e)));"string"==typeof t&&(t=t.split(r)),Array.isArray(t)||(t=[]),t=t.map((e=>String(e).valueOf().toLowerCase()));for(let e=0;e<n.length;e++)if(-1!==t.indexOf(n[e]))return this._returnNegationCheck(!0,o);return this._returnNegationCheck(!1,o)}static startsWith(e,t,o){return e=String(e).valueOf().toLowerCase(),t=String(t).valueOf().toLowerCase(),this._returnNegationCheck(0===e.indexOf(t),o)}static endsWith(e,t,o){return e=String(e).valueOf().toLowerCase(),t=String(t).valueOf().toLowerCase(),this._returnNegationCheck(-1!==e.indexOf(t,e.length-t.length),o)}static regexMatches(e,t,o){e=String(e).valueOf().toLowerCase(),t=String(t).valueOf();const r=new RegExp(t,"i");return this._returnNegationCheck(r.test(e),o)}static _returnNegationCheck(e,t=!1){return t?!e:e}}n=u,u.equalsNumber=n.equals,u.matches=n.equals,"function"==typeof SuppressedError&&SuppressedError,function(e){e.VARIAION_NOT_DECIDED="convert.com_variation_not_decided"}(a||(a={})),function(e){e.FORCE_MULTIPLE_TRANSACTIONS="forceMultipleTransactions"}(i||(i={}));const d={SDK_KEY_MISSING:"SDK key is missing",DATA_OBJECT_MISSING:"Data object is missing",CONFIG_DATA_NOT_VALID:"Config Data is not valid",SDK_OR_DATA_OBJECT_REQUIRED:"SDK key or Data object should be provided",RULE_NOT_VALID:"Provided rule is not valid",RULE_DATA_NOT_VALID:"Provided rule data is not valid",RULE_MATCH_TYPE_NOT_SUPPORTED:'Provided rule matching type "#" is not supported',RULE_ERROR:"Rule error",DATA_STORE_NOT_VALID:"DataStore object is not valid. It should contain get and set methods",VISITOR_ID_REQUIRED:"Visitor string string is not present",GOAL_DATA_NOT_VALID:"GoalData object is not valid",UNABLE_TO_SELECT_BUCKET_FOR_VISITOR:"Unable to bucket visitor",UNABLE_TO_PERFORM_NETWORK_REQUEST:"Unable to perform network request",UNSUPPORTED_RESPONSE_TYPE:"Unsupported response type"},_={CONFIG_DATA_UPDATED:"Config Data updated",CORE_CONSTRUCTOR:"Core Manager constructor has been called",CORE_INITIALIZED:"Core Manager has been initialized",EXPERIENCE_CONSTRUCTOR:"Experience Manager constructor has been called",EXPERIENCE_NOT_FOUND:"Experience not found",EXPERIENCE_ARCHIVED:"Experience archived",EXPERIENCE_ENVIRONMENT_NOT_MATCH:"Experience environment does not match",EXPERIENCE_RULES_MATCHED:"Experience rules matched",VARIATIONS_NOT_FOUND:"Variations not found",VARIATION_CHANGE_NOT_SUPPORTED:"Variation change not supported",FEATURE_CONSTRUCTOR:"Feature Manager constructor has been called",FEATURE_NOT_FOUND:"Fullstack Feature not found",FEATURE_VARIABLES_NOT_FOUND:"Fullstack Feature Variables not found",FEATURE_VARIABLES_TYPE_NOT_FOUND:"Fullstack Feature Variables Type not found",BUCKETING_CONSTRUCTOR:"Bucketing Manager constructor has been called",DATA_CONSTRUCTOR:"Data Manager constructor has been called",RULE_CONSTRUCTOR:"Rule Manager constructor has been called",PROCESSING_ENTITY:"Processing #",LOCATION_MATCH:"Location # rule matched",LOCATION_NOT_MATCH:"Location does not match",LOCATION_NOT_RESTRICTED:"Location not restricted",AUDIENCE_MATCH:"Audience # rule matched",AUDIENCE_NOT_MATCH:"Audience does not match",NON_PERMANENT_AUDIENCE_NOT_RESTRICTED:"Non-Permanent Audience not restricted",AUDIENCE_NOT_RESTRICTED:"Audience not restricted",SEGMENTATION_MATCH:"Segmentation # rule matched",SEGMENTATION_NOT_RESTRICTED:"Segmentation not restricted",RULE_NOT_MATCH:"Rule does not match",RULE_MATCH:"Found matched rule at OR block #",RULE_MATCH_AND:"AND block rule matched",RULE_MATCH_START:"About to evaluate rule #",LOCATION_ACTIVATED:"Location # activated",LOCATION_DEACTIVATED:"Location # deactivated",BUCKETED_VISITOR_FOUND:"Visitor is already bucketed for variation #",BUCKETED_VISITOR_FORCED:"Forcing variation #",BUCKETED_VISITOR:"Visitor is bucketed for variation #",GOAL_NOT_FOUND:"Goal not found",GOAL_RULE_NOT_MATCH:"Goal rule do not match",GOAL_FOUND:"Goal # already triggered",SEGMENTS_NOT_FOUND:"Segments not found",SEGMENTS_RULE_NOT_MATCH:"Segments rule do not match",CUSTOM_SEGMENTS_KEY_FOUND:"Custom segments key already set",SEND_BEACON_SUCCESS:"The user agent successfully queued the data for transfer",RELEASING_QUEUE:"Releasing event queue..."};var E,O,T,R,g,N,A,p,C,h,I,S,f,D,v,U;!function(e){e.OFF="OFF",e.EU_ONLY="EU ONLY",e.EEA_ONLY="EEA ONLY",e.WORLDWIDE="Worldwide"}(E||(E={})),function(e){e.AUDIENCE="audience",e.LOCATION="location",e.SEGMENT="segment",e.FEATURE="feature",e.GOAL="goal",e.EXPERIENCE="experience",e.VARIATION="variation"}(O||(O={})),function(e){e.ENABLED="enabled",e.DISABLED="disabled"}(T||(T={})),function(e){e.AMOUNT="amount",e.PRODUCTS_COUNT="productsCount",e.TRANSACTION_ID="transactionId",e.CUSTOM_DIMENSION_1="customDimension1",e.CUSTOM_DIMENSION_2="customDimension2",e.CUSTOM_DIMENSION_3="customDimension3",e.CUSTOM_DIMENSION_4="customDimension4",e.CUSTOM_DIMENSION_5="customDimension5"}(R||(R={})),function(e){e[e.TRACE=0]="TRACE",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(g||(g={})),function(e){e.LOG="log",e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.WARN="warn",e.ERROR="error"}(N||(N={})),function(e){e.WEB="web",e.FULLSTACK="fullstack"}(A||(A={})),function(e){e.NO_DATA_FOUND="convert.com_no_data_found",e.NEED_MORE_DATA="convert.com_need_more_data"}(p||(p={})),function(e){e.READY="ready",e.CONFIG_UPDATED="config.updated",e.API_QUEUE_RELEASED="api.queue.released",e.BUCKETING="bucketing",e.CONVERSION="conversion",e.SEGMENTS="segments",e.LOCATION_ACTIVATED="location.activated",e.LOCATION_DEACTIVATED="location.deactivated",e.AUDIENCES="audiences",e.DATA_STORE_QUEUE_RELEASED="datastore.queue.released"}(C||(C={})),function(e){e.RICH_STRUCTURE="richStructure",e.CUSTOM_CODE="customCode",e.DEFAULT_CODE="defaultCode",e.DEFAULT_CODE_MULTIPAGE="defaultCodeMultipage",e.DEFAULT_REDIRECT="defaultRedirect",e.FULLSTACK_FEATURE="fullStackFeature"}(h||(h={})),function(e){e.IE="IE",e.CH="CH",e.FF="FF",e.OP="OP",e.SF="SF",e.EDG="EDG",e.MO="MO",e.NS="NS",e.OTH="OTH"}(I||(I={})),function(e){e.ALLPH="ALLPH",e.IPH="IPH",e.OTHPH="OTHPH",e.ALLTAB="ALLTAB",e.IPAD="IPAD",e.OTHTAB="OTHTAB",e.DESK="DESK",e.OTHDEV="OTHDEV"}(S||(S={})),function(e){e.COUNTRY="country",e.BROWSER="browser",e.DEVICES="devices",e.SOURCE="source",e.CAMPAIGN="campaign",e.VISITOR_TYPE="visitorType",e.CUSTOM_SEGMENTS="customSegments"}(f||(f={})),function(e){e.CAMPAIGN="campaign",e.SEARCH="search",e.REFERRAL="referral",e.DIRECT="direct",e.AI_TOOL="ai_tool"}(D||(D={})),function(e){e.NEW="new",e.RETURNING="returning"}(v||(v={})),function(e){e[e.Continue=100]="Continue",e[e.SwitchingProtocols=101]="SwitchingProtocols",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints",e[e.Ok=200]="Ok",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.ImUsed=226]="ImUsed",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.Unused=306]="Unused",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.UriTooLong=414]="UriTooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.ImATeapot=418]="ImATeapot",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.TooEarly=425]="TooEarly",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HttpVersionNotSupported=505]="HttpVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(U||(U={}));const M=!0;exports.RuleManager=class{constructor(e,{loggerManager:t}={}){var o,r,n,a,i;this._comparisonProcessor=u,this._negation="!",this._keys_case_sensitive=M,this._loggerManager=t,this._comparisonProcessor=(null===(o=null==e?void 0:e.rules)||void 0===o?void 0:o.comparisonProcessor)||u,this._negation=String((null===(r=null==e?void 0:e.rules)||void 0===r?void 0:r.negation)||"!"),this._keys_case_sensitive=(null===(n=null==e?void 0:e.rules)||void 0===n?void 0:n.keys_case_sensitive)||M,this._mapper=(null==e?void 0:e.mapper)||(e=>e),null===(i=null===(a=this._loggerManager)||void 0===a?void 0:a.trace)||void 0===i||i.call(a,"RuleManager()",_.RULE_CONSTRUCTOR,this)}set comparisonProcessor(e){this._comparisonProcessor=e}get comparisonProcessor(){return this._comparisonProcessor}getComparisonProcessorMethods(){return Object.getOwnPropertyNames(this._comparisonProcessor).filter((e=>"function"==typeof this._comparisonProcessor[e]))}isRuleMatched(t,o,r){var n,a,i,s,l,c,u,E,O,T;let R;if(null===(a=null===(n=this._loggerManager)||void 0===n?void 0:n.trace)||void 0===a||a.call(n,"RuleManager.isRuleMatched()",this._mapper({data:t,ruleSet:o})),r&&(null===(s=null===(i=this._loggerManager)||void 0===i?void 0:i.info)||void 0===s||s.call(i,"RuleManager.isRuleMatched()",_.PROCESSING_ENTITY.replace("#",r))),Object.prototype.hasOwnProperty.call(o,"OR")&&e(null==o?void 0:o.OR)){for(let e=0,n=o.OR.length;e<n;e++){if(R=this._processAND(t,o.OR[e]),!0===R)return R;Object.values(p).includes(R)?null===(c=null===(l=this._loggerManager)||void 0===l?void 0:l.info)||void 0===c||c.call(l,"RuleManager.isRuleMatched()",r||"",d.RULE_ERROR):null===(E=null===(u=this._loggerManager)||void 0===u?void 0:u.info)||void 0===E||E.call(u,"RuleManager.isRuleMatched()",r||"",!1===R?_.RULE_NOT_MATCH:_.RULE_MATCH.replace("#",String(e)))}if(!1!==R)return R}else null===(T=null===(O=this._loggerManager)||void 0===O?void 0:O.warn)||void 0===T||T.call(O,"RuleManager.isRuleMatched()",r||"",d.RULE_NOT_VALID);return!1}isValidRule(e){var t,o;return null===(o=null===(t=this._loggerManager)||void 0===t?void 0:t.trace)||void 0===o||o.call(t,"RuleManager.isValidRule()",this._mapper({rule:e})),Object.prototype.hasOwnProperty.call(e,"matching")&&"object"==typeof e.matching&&Object.prototype.hasOwnProperty.call(e.matching,"match_type")&&"string"==typeof e.matching.match_type&&Object.prototype.hasOwnProperty.call(e.matching,"negated")&&"boolean"==typeof e.matching.negated&&Object.prototype.hasOwnProperty.call(e,"value")}_processAND(t,o){var r,n,a,i;let s;if(Object.prototype.hasOwnProperty.call(o,"AND")&&e(null==o?void 0:o.AND)){for(let e=0,r=o.AND.length;e<r;e++)if(s=this._processORWHEN(t,o.AND[e]),!0!==s)return s;return null===(n=null===(r=this._loggerManager)||void 0===r?void 0:r.info)||void 0===n||n.call(r,"RuleManager._processAND()",_.RULE_MATCH_AND),!0}return null===(i=null===(a=this._loggerManager)||void 0===a?void 0:a.warn)||void 0===i||i.call(a,"RuleManager._processAND()",d.RULE_NOT_VALID),!1}_processORWHEN(t,o){var r,n;let a;if(Object.prototype.hasOwnProperty.call(o,"OR_WHEN")&&e(null==o?void 0:o.OR_WHEN)){for(let e=0,r=o.OR_WHEN.length;e<r;e++)if(a=this._processRuleItem(t,o.OR_WHEN[e]),!0===a)return a;if(!1!==a)return a}else null===(n=null===(r=this._loggerManager)||void 0===r?void 0:r.warn)||void 0===n||n.call(r,"RuleManager._processORWHEN()",d.RULE_NOT_VALID);return!1}_processRuleItem(e,o){var r,n,a,i,s,l,c,u,E,O,T,R,g;if(this.isValidRule(o))try{const O=o.matching.negated||!1,T=o.matching.match_type;if(-1!==this.getComparisonProcessorMethods().indexOf(T))if(e&&"object"==typeof e)if(this.isUsingCustomInterface(e)){if(null==o?void 0:o.rule_type){null===(n=null===(r=this._loggerManager)||void 0===r?void 0:r.info)||void 0===n||n.call(r,"RuleManager._processRuleItem()",_.RULE_MATCH_START.replace("#",o.rule_type));for(const t of Object.getOwnPropertyNames(e.constructor.prototype)){if("constructor"===t)continue;const r=`get ${o.rule_type.replace(/_/g," ")}`.replace(/(?:^\w|[A-Z]|\b\w)/g,(function(e,t){return 0===t?e.toLowerCase():e.toUpperCase()})).replace(/\s+/g,"");if(t===r||(null===(a=null==e?void 0:e.mapper)||void 0===a?void 0:a.call(e,t))===r){const r=e[t](o);return Object.values(p).includes(r)||"js_condition"===o.rule_type?r:this._comparisonProcessor[T](r,o.value,O)}}}}else if(t(e))for(const t of Object.keys(e)){const r=this._keys_case_sensitive?t:t.toLowerCase();if(r===(this._keys_case_sensitive?o.key:String(o.key).toLowerCase()))return this._comparisonProcessor[T](e[t],o.value,O)}else null===(s=null===(i=this._loggerManager)||void 0===i?void 0:i.trace)||void 0===s||s.call(i,"RuleManager._processRuleItem()",{warn:d.RULE_DATA_NOT_VALID,data:e});else null===(c=null===(l=this._loggerManager)||void 0===l?void 0:l.trace)||void 0===c||c.call(l,"RuleManager._processRuleItem()",{warn:d.RULE_NOT_VALID,data:e,rule:o});else null===(E=null===(u=this._loggerManager)||void 0===u?void 0:u.warn)||void 0===E||E.call(u,"RuleManager._processRuleItem()",d.RULE_MATCH_TYPE_NOT_SUPPORTED.replace("#",T))}catch(e){null===(T=null===(O=this._loggerManager)||void 0===O?void 0:O.error)||void 0===T||T.call(O,"RuleManager._processRuleItem()",{error:e.message})}else null===(g=null===(R=this._loggerManager)||void 0===R?void 0:R.warn)||void 0===g||g.call(R,"RuleManager._processRuleItem()",d.RULE_NOT_VALID);return!1}isUsingCustomInterface(e){return t(e)&&Object.prototype.hasOwnProperty.call(e,"name")&&"RuleData"===e.name}};
|
|
8
8
|
//# sourceMappingURL=index.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.min.js","sources":["../../../../node_modules/murmurhash/murmurhash.js"],"sourcesContent":["(function(){\n const _global = this;\n\n const createBuffer = (val) => new TextEncoder().encode(val)\n\n /**\n * JS Implementation of MurmurHash2\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV2(str, seed) {\n if (typeof str === 'string') str = createBuffer(str);\n let\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k =\n ((str[i] & 0xff)) |\n ((str[++i] & 0xff) << 8) |\n ((str[++i] & 0xff) << 16) |\n ((str[++i] & 0xff) << 24);\n\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3: h ^= (str[i + 2] & 0xff) << 16;\n case 2: h ^= (str[i + 1] & 0xff) << 8;\n case 1: h ^= (str[i] & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n };\n\n /*\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV3(key, seed) {\n if (typeof key === 'string') key = createBuffer(key);\n\n let remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;\n\n remainder = key.length & 3; // key.length % 4\n bytes = key.length - remainder;\n h1 = seed;\n c1 = 0xcc9e2d51;\n c2 = 0x1b873593;\n i = 0;\n\n while (i < bytes) {\n k1 =\n ((key[i] & 0xff)) |\n ((key[++i] & 0xff) << 8) |\n ((key[++i] & 0xff) << 16) |\n ((key[++i] & 0xff) << 24);\n ++i;\n\n k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3: k1 ^= (key[i + 2] & 0xff) << 16;\n case 2: k1 ^= (key[i + 1] & 0xff) << 8;\n case 1: k1 ^= (key[i] & 0xff);\n\n k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= key.length;\n\n h1 ^= h1 >>> 16;\n h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n h1 ^= h1 >>> 16;\n\n return h1 >>> 0;\n }\n\n const murmur = MurmurHashV3;\n murmur.v2 = MurmurHashV2;\n murmur.v3 = MurmurHashV3;\n\n if (typeof(module) != 'undefined') {\n module.exports = murmur;\n } else {\n const _previousRoot = _global.murmur;\n murmur.noConflict = function() {\n _global.murmur = _previousRoot;\n return murmur;\n }\n _global.murmur = murmur;\n }\n}());\n"],"names":["createBuffer","val","TextEncoder","encode","MurmurHashV3","key","seed","remainder","bytes","h1","h1b","c1","c2","k1","i","length","murmur","v2","str","k","l","h","v3","module","exports"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"index.min.js","sources":["../../../../node_modules/murmurhash/murmurhash.js"],"sourcesContent":["(function(){\n const _global = this;\n\n const createBuffer = (val) => new TextEncoder().encode(val)\n\n /**\n * JS Implementation of MurmurHash2\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV2(str, seed) {\n if (typeof str === 'string') str = createBuffer(str);\n let\n l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k =\n ((str[i] & 0xff)) |\n ((str[++i] & 0xff) << 8) |\n ((str[++i] & 0xff) << 16) |\n ((str[++i] & 0xff) << 24);\n\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n k ^= k >>> 24;\n k = (((k & 0xffff) * 0x5bd1e995) + ((((k >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16)) ^ k;\n\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3: h ^= (str[i + 2] & 0xff) << 16;\n case 2: h ^= (str[i + 1] & 0xff) << 8;\n case 1: h ^= (str[i] & 0xff);\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n }\n\n h ^= h >>> 13;\n h = (((h & 0xffff) * 0x5bd1e995) + ((((h >>> 16) * 0x5bd1e995) & 0xffff) << 16));\n h ^= h >>> 15;\n\n return h >>> 0;\n };\n\n /*\n * JS Implementation of MurmurHash3 (r136) (as of May 20, 2011)\n *\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:aappleby@gmail.com\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {Uint8Array | string} key ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n */\n function MurmurHashV3(key, seed) {\n if (typeof key === 'string') key = createBuffer(key);\n\n let remainder, bytes, h1, h1b, c1, c1b, c2, c2b, k1, i;\n\n remainder = key.length & 3; // key.length % 4\n bytes = key.length - remainder;\n h1 = seed;\n c1 = 0xcc9e2d51;\n c2 = 0x1b873593;\n i = 0;\n\n while (i < bytes) {\n k1 =\n ((key[i] & 0xff)) |\n ((key[++i] & 0xff) << 8) |\n ((key[++i] & 0xff) << 16) |\n ((key[++i] & 0xff) << 24);\n ++i;\n\n k1 = ((((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16))) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = ((((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16))) & 0xffffffff;\n\n h1 ^= k1;\n h1 = (h1 << 13) | (h1 >>> 19);\n h1b = ((((h1 & 0xffff) * 5) + ((((h1 >>> 16) * 5) & 0xffff) << 16))) & 0xffffffff;\n h1 = (((h1b & 0xffff) + 0x6b64) + ((((h1b >>> 16) + 0xe654) & 0xffff) << 16));\n }\n\n k1 = 0;\n\n switch (remainder) {\n case 3: k1 ^= (key[i + 2] & 0xff) << 16;\n case 2: k1 ^= (key[i + 1] & 0xff) << 8;\n case 1: k1 ^= (key[i] & 0xff);\n\n k1 = (((k1 & 0xffff) * c1) + ((((k1 >>> 16) * c1) & 0xffff) << 16)) & 0xffffffff;\n k1 = (k1 << 15) | (k1 >>> 17);\n k1 = (((k1 & 0xffff) * c2) + ((((k1 >>> 16) * c2) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= k1;\n }\n\n h1 ^= key.length;\n\n h1 ^= h1 >>> 16;\n h1 = (((h1 & 0xffff) * 0x85ebca6b) + ((((h1 >>> 16) * 0x85ebca6b) & 0xffff) << 16)) & 0xffffffff;\n h1 ^= h1 >>> 13;\n h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;\n h1 ^= h1 >>> 16;\n\n return h1 >>> 0;\n }\n\n const murmur = MurmurHashV3;\n murmur.v2 = MurmurHashV2;\n murmur.v3 = MurmurHashV3;\n\n if (typeof(module) != 'undefined') {\n module.exports = murmur;\n } else {\n const _previousRoot = _global.murmur;\n murmur.noConflict = function() {\n _global.murmur = _previousRoot;\n return murmur;\n }\n _global.murmur = murmur;\n }\n}());\n"],"names":["createBuffer","val","TextEncoder","encode","MurmurHashV3","key","seed","remainder","bytes","h1","h1b","c1","c2","k1","i","length","murmur","v2","str","k","l","h","v3","module","exports"],"mappings":";;;;;;6iBAAC,WAGC,MAAMA,EAAgBC,IAAQ,IAAIC,aAAcC,OAAOF,GAiEvD,SAASG,EAAaC,EAAKC,GAGzB,IAAIC,EAAWC,EAAOC,EAAIC,EAAKC,EAASC,EAASC,EAAIC,EASrD,IAXmB,iBAART,IAAkBA,EAAML,EAAaK,IAIhDE,EAAyB,EAAbF,EAAIU,OAChBP,EAAQH,EAAIU,OAASR,EACrBE,EAAKH,EACLK,EAAK,WACLC,EAAK,UACLE,EAAI,EAEGA,EAAIN,GACPK,EACa,IAATR,EAAIS,IACO,IAAXT,IAAMS,KAAc,GACT,IAAXT,IAAMS,KAAc,IACT,IAAXT,IAAMS,KAAc,KACxBA,EAEFD,GAAc,MAALA,GAAeF,KAAUE,IAAO,IAAMF,EAAM,QAAW,IAAQ,WACxEE,EAAMA,GAAM,GAAOA,IAAO,GAC1BA,GAAc,MAALA,GAAeD,KAAUC,IAAO,IAAMD,EAAM,QAAW,IAAQ,WAExEH,GAAMI,EACFJ,EAAMA,GAAM,GAAOA,IAAO,GAC9BC,EAAyB,GAAV,MAALD,KAAqC,GAAbA,IAAO,IAAW,QAAW,IAAQ,WACvEA,EAAwB,OAAV,MAANC,KAA4C,OAAdA,IAAQ,IAAgB,QAAW,IAK3E,OAFAG,EAAK,EAEGN,GACN,KAAK,EAAGM,IAA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qB,YAAV,MAAJA,KAA4C,YAAZA,IAAM,IAAoB,QAAW,IAOpF,OAJAA,GAAKA,IAAM,GACXA,EAAqB,YAAV,MAAJA,KAA4C,YAAZA,IAAM,IAAoB,QAAW,IAC5EA,GAAKA,IAAM,GAEJA,IAAM,CACjB,EAsEEL,EAAOM,GAAKlB,EAGVmB,EAAAC,QAAiBR,CASpB,CAxIA","x_google_ignoreList":[0]}
|
package/lib/package.json
CHANGED
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"license": "Apache-2.0",
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@convertcom/js-sdk-enums": ">=2.
|
|
19
|
-
"@convertcom/js-sdk-logger": ">=2.1.
|
|
20
|
-
"@convertcom/js-sdk-types": ">=3.
|
|
21
|
-
"@convertcom/js-sdk-utils": ">=2.2.
|
|
18
|
+
"@convertcom/js-sdk-enums": ">=2.3.0",
|
|
19
|
+
"@convertcom/js-sdk-logger": ">=2.1.2",
|
|
20
|
+
"@convertcom/js-sdk-types": ">=3.11.0",
|
|
21
|
+
"@convertcom/js-sdk-utils": ">=2.2.3"
|
|
22
22
|
},
|
|
23
|
-
"version": "2.1.
|
|
23
|
+
"version": "2.1.4"
|
|
24
24
|
}
|