expf-sigma-node.js 0.1.11 → 0.1.13

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.
Files changed (3) hide show
  1. package/LICENSE +201 -0
  2. package/package.json +3 -3
  3. package/public/sigma.js +21 -563
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expf-sigma-node.js",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "expf-sigma-node.js lets you manage features flags and remote config across web, server side applications. Deliver true Continuous Integration. Get builds out faster. Control who has access to new features.",
5
5
  "main": "public/sigma.js",
6
6
  "keywords": [
@@ -16,7 +16,7 @@
16
16
  "url": "https://expf-team.ru/sigma/node_js_sdk/issues"
17
17
  },
18
18
  "author": "iskander.mirmakhmadov",
19
- "license": "ISC",
19
+ "license": "Apache-2.0",
20
20
  "scripts": {
21
21
  "release": "np",
22
22
  "build": "esbuild --bundle ./src/sigma.js --platform=node --format=cjs --outdir=public",
@@ -26,6 +26,7 @@
26
26
  "test": "jest"
27
27
  },
28
28
  "dependencies": {
29
+ "node-cache": "^5.1.2",
29
30
  "node-fetch": "^2.1.2"
30
31
  },
31
32
  "devDependencies": {
@@ -47,7 +48,6 @@
47
48
  "jest-environment-jsdom": "^29.2.1",
48
49
  "js-cookie": "^3.0.1",
49
50
  "jshashes": "^1.0.8",
50
- "node-cache": "^5.1.2",
51
51
  "np": "*",
52
52
  "prettier": "^2.2.1"
53
53
  },
package/public/sigma.js CHANGED
@@ -2230,9 +2230,9 @@ var require_lib2 = __commonJS({
2230
2230
  throw new TypeError(`${value} is not a legal HTTP header value`);
2231
2231
  }
2232
2232
  }
2233
- function find(map3, name) {
2233
+ function find(map, name) {
2234
2234
  name = name.toLowerCase();
2235
- for (const key in map3) {
2235
+ for (const key in map) {
2236
2236
  if (key.toLowerCase() === name) {
2237
2237
  return key;
2238
2238
  }
@@ -4243,7 +4243,7 @@ var require_hashes = __commonJS({
4243
4243
  1541459225
4244
4244
  ];
4245
4245
  var W = new Array(64);
4246
- var a, b, c, d, e, f2, g, h;
4246
+ var a, b, c, d, e, f, g, h;
4247
4247
  var i, j, T1, T2;
4248
4248
  m[l >> 5] |= 128 << 24 - l % 32;
4249
4249
  m[(l + 64 >> 9 << 4) + 15] = l;
@@ -4253,7 +4253,7 @@ var require_hashes = __commonJS({
4253
4253
  c = HASH[2];
4254
4254
  d = HASH[3];
4255
4255
  e = HASH[4];
4256
- f2 = HASH[5];
4256
+ f = HASH[5];
4257
4257
  g = HASH[6];
4258
4258
  h = HASH[7];
4259
4259
  for (j = 0; j < 64; j += 1) {
@@ -4266,13 +4266,13 @@ var require_hashes = __commonJS({
4266
4266
  ), W[j - 16]);
4267
4267
  }
4268
4268
  T1 = safe_add(safe_add(
4269
- safe_add(safe_add(h, sha256_Sigma1256(e)), sha256_Ch(e, f2, g)),
4269
+ safe_add(safe_add(h, sha256_Sigma1256(e)), sha256_Ch(e, f, g)),
4270
4270
  sha256_K[j]
4271
4271
  ), W[j]);
4272
4272
  T2 = safe_add(sha256_Sigma0256(a), sha256_Maj(a, b, c));
4273
4273
  h = g;
4274
- g = f2;
4275
- f2 = e;
4274
+ g = f;
4275
+ f = e;
4276
4276
  e = safe_add(d, T1);
4277
4277
  d = c;
4278
4278
  c = b;
@@ -4284,7 +4284,7 @@ var require_hashes = __commonJS({
4284
4284
  HASH[2] = safe_add(c, HASH[2]);
4285
4285
  HASH[3] = safe_add(d, HASH[3]);
4286
4286
  HASH[4] = safe_add(e, HASH[4]);
4287
- HASH[5] = safe_add(f2, HASH[5]);
4287
+ HASH[5] = safe_add(f, HASH[5]);
4288
4288
  HASH[6] = safe_add(g, HASH[6]);
4289
4289
  HASH[7] = safe_add(h, HASH[7]);
4290
4290
  }
@@ -4361,7 +4361,7 @@ var require_hashes = __commonJS({
4361
4361
  new int64(-1694144372, 725511199),
4362
4362
  new int64(528734635, -79577749),
4363
4363
  new int64(1541459225, 327033209)
4364
- ], T1 = new int64(0, 0), T2 = new int64(0, 0), a = new int64(0, 0), b = new int64(0, 0), c = new int64(0, 0), d = new int64(0, 0), e = new int64(0, 0), f2 = new int64(0, 0), g = new int64(0, 0), h = new int64(0, 0), s0 = new int64(0, 0), s1 = new int64(0, 0), Ch = new int64(0, 0), Maj = new int64(0, 0), r1 = new int64(0, 0), r2 = new int64(0, 0), r3 = new int64(0, 0);
4364
+ ], T1 = new int64(0, 0), T2 = new int64(0, 0), a = new int64(0, 0), b = new int64(0, 0), c = new int64(0, 0), d = new int64(0, 0), e = new int64(0, 0), f = new int64(0, 0), g = new int64(0, 0), h = new int64(0, 0), s0 = new int64(0, 0), s1 = new int64(0, 0), Ch = new int64(0, 0), Maj = new int64(0, 0), r1 = new int64(0, 0), r2 = new int64(0, 0), r3 = new int64(0, 0);
4365
4365
  if (sha512_k === void 0) {
4366
4366
  sha512_k = [
4367
4367
  new int64(1116352408, -685199838),
@@ -4458,7 +4458,7 @@ var require_hashes = __commonJS({
4458
4458
  int64copy(c, H[2]);
4459
4459
  int64copy(d, H[3]);
4460
4460
  int64copy(e, H[4]);
4461
- int64copy(f2, H[5]);
4461
+ int64copy(f, H[5]);
4462
4462
  int64copy(g, H[6]);
4463
4463
  int64copy(h, H[7]);
4464
4464
  for (j = 0; j < 16; j += 1) {
@@ -4479,8 +4479,8 @@ var require_hashes = __commonJS({
4479
4479
  int64add4(W[j], s1, W[j - 7], s0, W[j - 16]);
4480
4480
  }
4481
4481
  for (j = 0; j < 80; j += 1) {
4482
- Ch.l = e.l & f2.l ^ ~e.l & g.l;
4483
- Ch.h = e.h & f2.h ^ ~e.h & g.h;
4482
+ Ch.l = e.l & f.l ^ ~e.l & g.l;
4483
+ Ch.h = e.h & f.h ^ ~e.h & g.h;
4484
4484
  int64rrot(r1, e, 14);
4485
4485
  int64rrot(r2, e, 18);
4486
4486
  int64revrrot(r3, e, 9);
@@ -4496,8 +4496,8 @@ var require_hashes = __commonJS({
4496
4496
  int64add5(T1, h, s1, Ch, sha512_k[j], W[j]);
4497
4497
  int64add(T2, s0, Maj);
4498
4498
  int64copy(h, g);
4499
- int64copy(g, f2);
4500
- int64copy(f2, e);
4499
+ int64copy(g, f);
4500
+ int64copy(f, e);
4501
4501
  int64add(e, d, T1);
4502
4502
  int64copy(d, c);
4503
4503
  int64copy(c, b);
@@ -4509,7 +4509,7 @@ var require_hashes = __commonJS({
4509
4509
  int64add(H[2], H[2], c);
4510
4510
  int64add(H[3], H[3], d);
4511
4511
  int64add(H[4], H[4], e);
4512
- int64add(H[5], H[5], f2);
4512
+ int64add(H[5], H[5], f);
4513
4513
  int64add(H[6], H[6], g);
4514
4514
  int64add(H[7], H[7], h);
4515
4515
  }
@@ -5005,12 +5005,12 @@ var require_hashes = __commonJS({
5005
5005
  }
5006
5006
  }
5007
5007
  };
5008
- (function(window2, undefined2) {
5008
+ (function(window, undefined2) {
5009
5009
  var freeExports = false;
5010
5010
  if (typeof exports === "object") {
5011
5011
  freeExports = exports;
5012
5012
  if (exports && typeof global === "object" && global && global === global.global) {
5013
- window2 = global;
5013
+ window = global;
5014
5014
  }
5015
5015
  }
5016
5016
  if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
@@ -5024,7 +5024,7 @@ var require_hashes = __commonJS({
5024
5024
  freeExports.Hashes = Hashes2;
5025
5025
  }
5026
5026
  } else {
5027
- window2.Hashes = Hashes2;
5027
+ window.Hashes = Hashes2;
5028
5028
  }
5029
5029
  })(this);
5030
5030
  })();
@@ -5039,537 +5039,6 @@ __export(sigma_exports, {
5039
5039
  module.exports = __toCommonJS(sigma_exports);
5040
5040
  var import_node_fetch = __toESM(require_lib2());
5041
5041
 
5042
- // src/modules/browser-detect.es5.js
5043
- var __assign = Object.assign || function __assign2(t) {
5044
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5045
- s = arguments[i];
5046
- for (var p in s)
5047
- if (Object.prototype.hasOwnProperty.call(s, p))
5048
- t[p] = s[p];
5049
- }
5050
- return t;
5051
- };
5052
- var browsers = [
5053
- ["firefox", /Firefox\/([0-9\.]+)(?:\s|$)/],
5054
- ["opera", /Opera\/([0-9\.]+)(?:\s|$)/],
5055
- ["opera", /OPR\/([0-9\.]+)(?:\s|$)/],
5056
- ["edge", /Edge\/([0-9\._]+)/],
5057
- ["ie", /Trident\/7\.0.*rv\:([0-9\.]+)\).*Gecko$/],
5058
- ["ie", /MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],
5059
- ["ie", /MSIE\s(7\.0)/],
5060
- ["safari", /Version\/([0-9\._]+).*Safari/],
5061
- ["chrome", /(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],
5062
- ["bb10", /BB10;\sTouch.*Version\/([0-9\.]+)/],
5063
- ["android", /Android\s([0-9\.]+)/],
5064
- ["ios", /Version\/([0-9\._]+).*Mobile.*Safari.*/],
5065
- ["yandexbrowser", /YaBrowser\/([0-9\._]+)/],
5066
- ["crios", /CriOS\/([0-9\.]+)(:?\s|$)/]
5067
- ];
5068
- var os = [
5069
- "Windows Phone",
5070
- "Android",
5071
- "CentOS",
5072
- { name: "Chrome OS", pattern: "CrOS" },
5073
- "Debian",
5074
- "Fedora",
5075
- "FreeBSD",
5076
- "Gentoo",
5077
- "Haiku",
5078
- "Kubuntu",
5079
- "Linux Mint",
5080
- "OpenBSD",
5081
- "Red Hat",
5082
- "SuSE",
5083
- "Ubuntu",
5084
- "Xubuntu",
5085
- "Cygwin",
5086
- "Symbian OS",
5087
- "hpwOS",
5088
- "webOS ",
5089
- "webOS",
5090
- "Tablet OS",
5091
- "Tizen",
5092
- "Linux",
5093
- "Mac OS X",
5094
- "Macintosh",
5095
- "Mac",
5096
- "Windows 98;",
5097
- "Windows "
5098
- ];
5099
- var osVersions = {
5100
- "10.0": "10",
5101
- "6.4": "10 Technical Preview",
5102
- "6.3": "8.1",
5103
- "6.2": "8",
5104
- "6.1": "Server 2008 R2 / 7",
5105
- "6.0": "Server 2008 / Vista",
5106
- "5.2": "Server 2003 / XP 64-bit",
5107
- "5.1": "XP",
5108
- "5.01": "2000 SP1",
5109
- "5.0": "2000",
5110
- "4.0": "NT",
5111
- "4.90": "ME"
5112
- };
5113
- var mobileRegExp = new RegExp([
5114
- "(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|",
5115
- "compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|",
5116
- "midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)",
5117
- "\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|",
5118
- "wap|windows ce|xda|xiino"
5119
- ].join(""), "i");
5120
- var mobilePrefixRegExp = new RegExp([
5121
- "1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|",
5122
- "ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|",
5123
- "avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|",
5124
- "cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|",
5125
- "ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|",
5126
- "g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|",
5127
- "hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|",
5128
- "i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|",
5129
- "kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])",
5130
- "|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|",
5131
- "mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|",
5132
- "n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|",
5133
- "op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|",
5134
- "po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|",
5135
- "raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|",
5136
- "se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|k\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|",
5137
- "so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|",
5138
- "tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|",
5139
- "veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|",
5140
- "w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-"
5141
- ].join(""), "i");
5142
- var Detector = function() {
5143
- function Detector2(userAgent, navigator, process2) {
5144
- this.navigator = navigator;
5145
- this.process = process2;
5146
- this.userAgent = userAgent ? userAgent : this.navigator ? navigator.userAgent || navigator.vendor : "";
5147
- }
5148
- Detector2.prototype.detect = function() {
5149
- if (this.process && !this.userAgent) {
5150
- var version = this.process.version.slice(1).split(".").slice(0, 3);
5151
- var versionTail = Array.prototype.slice.call(version, 1).join("") || "0";
5152
- return {
5153
- name: "node",
5154
- version: version.join("."),
5155
- versionNumber: parseFloat(version[0] + "." + versionTail),
5156
- mobile: false,
5157
- os: this.process.platform
5158
- };
5159
- }
5160
- if (!this.userAgent)
5161
- this.handleMissingError();
5162
- return __assign({}, this.checkBrowser(), this.checkMobile(), this.checkOs());
5163
- };
5164
- Detector2.prototype.checkBrowser = function() {
5165
- var _this = this;
5166
- return browsers.filter(function(definition) {
5167
- return definition[1].test(_this.userAgent);
5168
- }).map(function(definition) {
5169
- var match = definition[1].exec(_this.userAgent);
5170
- var version = match && match[1].split(/[._]/).slice(0, 3);
5171
- var versionTails = Array.prototype.slice.call(version, 1).join("") || "0";
5172
- if (version && version.length < 3)
5173
- Array.prototype.push.apply(version, version.length === 1 ? [0, 0] : [0]);
5174
- return {
5175
- name: String(definition[0]),
5176
- version: version.join("."),
5177
- versionNumber: Number(version[0] + "." + versionTails)
5178
- };
5179
- }).shift();
5180
- };
5181
- Detector2.prototype.checkMobile = function() {
5182
- var agentPrefix = this.userAgent.substr(0, 4);
5183
- var mobile = mobileRegExp.test(this.userAgent) || mobilePrefixRegExp.test(agentPrefix);
5184
- return { mobile };
5185
- };
5186
- Detector2.prototype.checkOs = function() {
5187
- var _this = this;
5188
- return os.map(function(definition) {
5189
- var name = definition.name || definition;
5190
- var pattern = _this.getOsPattern(definition);
5191
- return {
5192
- name,
5193
- pattern,
5194
- value: RegExp("\\b" + pattern.replace(/([ -])(?!$)/g, "$1?") + "(?:x?[\\d._]+|[ \\w.]*)", "i").exec(_this.userAgent)
5195
- };
5196
- }).filter(function(definition) {
5197
- return definition.value;
5198
- }).map(function(definition) {
5199
- var os$$1 = definition.value[0] || "";
5200
- var osSuffix;
5201
- if (definition.pattern && definition.name && /^Win/i.test(os$$1) && !/^Windows Phone /i.test(os$$1) && (osSuffix = osVersions[os$$1.replace(/[^\d.]/g, "")]))
5202
- os$$1 = "Windows " + osSuffix;
5203
- if (definition.pattern && definition.name)
5204
- os$$1 = os$$1.replace(RegExp(definition.pattern, "i"), definition.name);
5205
- os$$1 = os$$1.replace(/ ce$/i, " CE").replace(/\bhpw/i, "web").replace(/\bMacintosh\b/, "Mac OS").replace(/_PowerPC\b/i, " OS").replace(/\b(OS X) [^ \d]+/i, "$1").replace(/\bMac (OS X)\b/, "$1").replace(/\/(\d)/, " $1").replace(/_/g, ".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i, "").replace(/\bx86\.64\b/gi, "x86_64").replace(/\b(Windows Phone) OS\b/, "$1").replace(/\b(Chrome OS \w+) [\d.]+\b/, "$1").split(" on ")[0].trim();
5206
- os$$1 = /^(?:webOS|i(?:OS|P))/.test(os$$1) ? os$$1 : os$$1.charAt(0).toUpperCase() + os$$1.slice(1);
5207
- return { os: os$$1 };
5208
- }).shift();
5209
- };
5210
- Detector2.prototype.getOsPattern = function(definition) {
5211
- var definitionInterface = definition;
5212
- return (typeof definition === "string" ? definition : void 0) || definitionInterface.pattern || definitionInterface.name;
5213
- };
5214
- Detector2.prototype.handleMissingError = function() {
5215
- throw new Error("Please give user-agent.\n> browser(navigator.userAgent or res.headers['user-agent']).");
5216
- };
5217
- return Detector2;
5218
- }();
5219
- function createCommonjsModule(fn, module2) {
5220
- return module2 = { exports: {} }, fn(module2, module2.exports), module2.exports;
5221
- }
5222
- var _global = createCommonjsModule(function(module2) {
5223
- var global2 = window;
5224
- if (typeof __g == "number")
5225
- __g = global2;
5226
- });
5227
- var _core = createCommonjsModule(function(module2) {
5228
- var core = module2.exports = { version: "2.5.7" };
5229
- if (typeof __e == "number")
5230
- __e = core;
5231
- });
5232
- var _core_1 = _core.version;
5233
- var _isObject = function(it) {
5234
- return typeof it === "object" ? it !== null : typeof it === "function";
5235
- };
5236
- var _anObject = function(it) {
5237
- if (!_isObject(it))
5238
- throw TypeError(it + " is not an object!");
5239
- return it;
5240
- };
5241
- var _fails = function(exec) {
5242
- try {
5243
- return !!exec();
5244
- } catch (e) {
5245
- return true;
5246
- }
5247
- };
5248
- var _descriptors = !_fails(function() {
5249
- return Object.defineProperty({}, "a", { get: function() {
5250
- return 7;
5251
- } }).a != 7;
5252
- });
5253
- var document2 = _global.document;
5254
- var is = _isObject(document2) && _isObject(document2.createElement);
5255
- var _domCreate = function(it) {
5256
- return is ? document2.createElement(it) : {};
5257
- };
5258
- var _ie8DomDefine = !_descriptors && !_fails(function() {
5259
- return Object.defineProperty(_domCreate("div"), "a", { get: function() {
5260
- return 7;
5261
- } }).a != 7;
5262
- });
5263
- var _toPrimitive = function(it, S) {
5264
- if (!_isObject(it))
5265
- return it;
5266
- var fn, val;
5267
- if (S && typeof (fn = it.toString) == "function" && !_isObject(val = fn.call(it)))
5268
- return val;
5269
- if (typeof (fn = it.valueOf) == "function" && !_isObject(val = fn.call(it)))
5270
- return val;
5271
- if (!S && typeof (fn = it.toString) == "function" && !_isObject(val = fn.call(it)))
5272
- return val;
5273
- throw TypeError("Can't convert object to primitive value");
5274
- };
5275
- var dP = Object.defineProperty;
5276
- var f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
5277
- _anObject(O);
5278
- P = _toPrimitive(P, true);
5279
- _anObject(Attributes);
5280
- if (_ie8DomDefine)
5281
- try {
5282
- return dP(O, P, Attributes);
5283
- } catch (e) {
5284
- }
5285
- if ("get" in Attributes || "set" in Attributes)
5286
- throw TypeError("Accessors not supported!");
5287
- if ("value" in Attributes)
5288
- O[P] = Attributes.value;
5289
- return O;
5290
- };
5291
- var _objectDp = {
5292
- f
5293
- };
5294
- var _propertyDesc = function(bitmap, value) {
5295
- return {
5296
- enumerable: !(bitmap & 1),
5297
- configurable: !(bitmap & 2),
5298
- writable: !(bitmap & 4),
5299
- value
5300
- };
5301
- };
5302
- var _hide = _descriptors ? function(object, key, value) {
5303
- return _objectDp.f(object, key, _propertyDesc(1, value));
5304
- } : function(object, key, value) {
5305
- object[key] = value;
5306
- return object;
5307
- };
5308
- var hasOwnProperty = {}.hasOwnProperty;
5309
- var _has = function(it, key) {
5310
- return hasOwnProperty.call(it, key);
5311
- };
5312
- var id = 0;
5313
- var px = Math.random();
5314
- var _uid = function(key) {
5315
- return "Symbol(".concat(key === void 0 ? "" : key, ")_", (++id + px).toString(36));
5316
- };
5317
- var _redefine = createCommonjsModule(function(module2) {
5318
- var SRC = _uid("src");
5319
- var TO_STRING = "toString";
5320
- var $toString = Function[TO_STRING];
5321
- var TPL = ("" + $toString).split(TO_STRING);
5322
- _core.inspectSource = function(it) {
5323
- return $toString.call(it);
5324
- };
5325
- (module2.exports = function(O, key, val, safe) {
5326
- var isFunction = typeof val == "function";
5327
- if (isFunction)
5328
- _has(val, "name") || _hide(val, "name", key);
5329
- if (O[key] === val)
5330
- return;
5331
- if (isFunction)
5332
- _has(val, SRC) || _hide(val, SRC, O[key] ? "" + O[key] : TPL.join(String(key)));
5333
- if (O === _global) {
5334
- O[key] = val;
5335
- } else if (!safe) {
5336
- delete O[key];
5337
- _hide(O, key, val);
5338
- } else if (O[key]) {
5339
- O[key] = val;
5340
- } else {
5341
- _hide(O, key, val);
5342
- }
5343
- })(Function.prototype, TO_STRING, function toString2() {
5344
- return typeof this == "function" && this[SRC] || $toString.call(this);
5345
- });
5346
- });
5347
- var _aFunction = function(it) {
5348
- if (typeof it != "function")
5349
- throw TypeError(it + " is not a function!");
5350
- return it;
5351
- };
5352
- var _ctx = function(fn, that, length) {
5353
- _aFunction(fn);
5354
- if (that === void 0)
5355
- return fn;
5356
- switch (length) {
5357
- case 1:
5358
- return function(a) {
5359
- return fn.call(that, a);
5360
- };
5361
- case 2:
5362
- return function(a, b) {
5363
- return fn.call(that, a, b);
5364
- };
5365
- case 3:
5366
- return function(a, b, c) {
5367
- return fn.call(that, a, b, c);
5368
- };
5369
- }
5370
- return function() {
5371
- return fn.apply(that, arguments);
5372
- };
5373
- };
5374
- var PROTOTYPE = "prototype";
5375
- var $export = function(type, name, source) {
5376
- var IS_FORCED = type & $export.F;
5377
- var IS_GLOBAL = type & $export.G;
5378
- var IS_STATIC = type & $export.S;
5379
- var IS_PROTO = type & $export.P;
5380
- var IS_BIND = type & $export.B;
5381
- var target = IS_GLOBAL ? _global : IS_STATIC ? _global[name] || (_global[name] = {}) : (_global[name] || {})[PROTOTYPE];
5382
- var exports = IS_GLOBAL ? _core : _core[name] || (_core[name] = {});
5383
- var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
5384
- var key, own, out, exp;
5385
- if (IS_GLOBAL)
5386
- source = name;
5387
- for (key in source) {
5388
- own = !IS_FORCED && target && target[key] !== void 0;
5389
- out = (own ? target : source)[key];
5390
- exp = IS_BIND && own ? _ctx(out, _global) : IS_PROTO && typeof out == "function" ? _ctx(Function.call, out) : out;
5391
- if (target)
5392
- _redefine(target, key, out, type & $export.U);
5393
- if (exports[key] != out)
5394
- _hide(exports, key, exp);
5395
- if (IS_PROTO && expProto[key] != out)
5396
- expProto[key] = out;
5397
- }
5398
- };
5399
- _global.core = _core;
5400
- $export.F = 1;
5401
- $export.G = 2;
5402
- $export.S = 4;
5403
- $export.P = 8;
5404
- $export.B = 16;
5405
- $export.W = 32;
5406
- $export.U = 64;
5407
- $export.R = 128;
5408
- var _export = $export;
5409
- var toString = {}.toString;
5410
- var _cof = function(it) {
5411
- return toString.call(it).slice(8, -1);
5412
- };
5413
- var _iobject = Object("z").propertyIsEnumerable(0) ? Object : function(it) {
5414
- return _cof(it) == "String" ? it.split("") : Object(it);
5415
- };
5416
- var _defined = function(it) {
5417
- if (it == void 0)
5418
- throw TypeError("Can't call method on " + it);
5419
- return it;
5420
- };
5421
- var _toObject = function(it) {
5422
- return Object(_defined(it));
5423
- };
5424
- var ceil = Math.ceil;
5425
- var floor = Math.floor;
5426
- var _toInteger = function(it) {
5427
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
5428
- };
5429
- var min = Math.min;
5430
- var _toLength = function(it) {
5431
- return it > 0 ? min(_toInteger(it), 9007199254740991) : 0;
5432
- };
5433
- var _isArray = Array.isArray || function isArray(arg) {
5434
- return _cof(arg) == "Array";
5435
- };
5436
- var _shared = createCommonjsModule(function(module2) {
5437
- var SHARED = "__core-js_shared__";
5438
- var store = _global[SHARED] || (_global[SHARED] = {});
5439
- (module2.exports = function(key, value) {
5440
- return store[key] || (store[key] = value !== void 0 ? value : {});
5441
- })("versions", []).push({
5442
- version: _core.version,
5443
- mode: "global",
5444
- copyright: "\xA9 2018 Denis Pushkarev (zloirock.ru)"
5445
- });
5446
- });
5447
- var _wks = createCommonjsModule(function(module2) {
5448
- var store = _shared("wks");
5449
- var Symbol2 = _global.Symbol;
5450
- var USE_SYMBOL = typeof Symbol2 == "function";
5451
- var $exports = module2.exports = function(name) {
5452
- return store[name] || (store[name] = USE_SYMBOL && Symbol2[name] || (USE_SYMBOL ? Symbol2 : _uid)("Symbol." + name));
5453
- };
5454
- $exports.store = store;
5455
- });
5456
- var SPECIES = _wks("species");
5457
- var _arraySpeciesConstructor = function(original) {
5458
- var C;
5459
- if (_isArray(original)) {
5460
- C = original.constructor;
5461
- if (typeof C == "function" && (C === Array || _isArray(C.prototype)))
5462
- C = void 0;
5463
- if (_isObject(C)) {
5464
- C = C[SPECIES];
5465
- if (C === null)
5466
- C = void 0;
5467
- }
5468
- }
5469
- return C === void 0 ? Array : C;
5470
- };
5471
- var _arraySpeciesCreate = function(original, length) {
5472
- return new (_arraySpeciesConstructor(original))(length);
5473
- };
5474
- var _arrayMethods = function(TYPE, $create) {
5475
- var IS_MAP = TYPE == 1;
5476
- var IS_FILTER = TYPE == 2;
5477
- var IS_SOME = TYPE == 3;
5478
- var IS_EVERY = TYPE == 4;
5479
- var IS_FIND_INDEX = TYPE == 6;
5480
- var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
5481
- var create = $create || _arraySpeciesCreate;
5482
- return function($this, callbackfn, that) {
5483
- var O = _toObject($this);
5484
- var self = _iobject(O);
5485
- var f2 = _ctx(callbackfn, that, 3);
5486
- var length = _toLength(self.length);
5487
- var index = 0;
5488
- var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : void 0;
5489
- var val, res;
5490
- for (; length > index; index++)
5491
- if (NO_HOLES || index in self) {
5492
- val = self[index];
5493
- res = f2(val, index, O);
5494
- if (TYPE) {
5495
- if (IS_MAP)
5496
- result[index] = res;
5497
- else if (res)
5498
- switch (TYPE) {
5499
- case 3:
5500
- return true;
5501
- case 5:
5502
- return val;
5503
- case 6:
5504
- return index;
5505
- case 2:
5506
- result.push(val);
5507
- }
5508
- else if (IS_EVERY)
5509
- return false;
5510
- }
5511
- }
5512
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
5513
- };
5514
- };
5515
- var _strictMethod = function(method, arg) {
5516
- return !!method && _fails(function() {
5517
- arg ? method.call(null, function() {
5518
- }, 1) : method.call(null);
5519
- });
5520
- };
5521
- var $filter = _arrayMethods(2);
5522
- _export(_export.P + _export.F * !_strictMethod([].filter, true), "Array", {
5523
- filter: function filter(callbackfn) {
5524
- return $filter(this, callbackfn, arguments[1]);
5525
- }
5526
- });
5527
- var filter2 = _core.Array.filter;
5528
- var $map = _arrayMethods(1);
5529
- _export(_export.P + _export.F * !_strictMethod([].map, true), "Array", {
5530
- map: function map(callbackfn) {
5531
- return $map(this, callbackfn, arguments[1]);
5532
- }
5533
- });
5534
- var map2 = _core.Array.map;
5535
- var _stringWs = " \n\v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF";
5536
- var space = "[" + _stringWs + "]";
5537
- var non = "\u200B\x85";
5538
- var ltrim = RegExp("^" + space + space + "*");
5539
- var rtrim = RegExp(space + space + "*$");
5540
- var exporter = function(KEY, exec, ALIAS) {
5541
- var exp = {};
5542
- var FORCE = _fails(function() {
5543
- return !!_stringWs[KEY]() || non[KEY]() != non;
5544
- });
5545
- var fn = exp[KEY] = FORCE ? exec(trim) : _stringWs[KEY];
5546
- if (ALIAS)
5547
- exp[ALIAS] = fn;
5548
- _export(_export.P + _export.F * FORCE, "String", exp);
5549
- };
5550
- var trim = exporter.trim = function(string, TYPE) {
5551
- string = String(_defined(string));
5552
- if (TYPE & 1)
5553
- string = string.replace(ltrim, "");
5554
- if (TYPE & 2)
5555
- string = string.replace(rtrim, "");
5556
- return string;
5557
- };
5558
- var _stringTrim = exporter;
5559
- _stringTrim("trim", function($trim) {
5560
- return function trim2() {
5561
- return $trim(this, 3);
5562
- };
5563
- });
5564
- var trim$1 = _core.String.trim;
5565
- var injectableNavigator = typeof window !== "undefined" ? window.navigator : void 0;
5566
- var injectableProcess = typeof process !== "undefined" ? process : void 0;
5567
- function browserDetect(userAgent) {
5568
- var detector = new Detector(userAgent, injectableNavigator, injectableProcess);
5569
- return detector.detect();
5570
- }
5571
- var browser_detect_es5_default = browserDetect;
5572
-
5573
5042
  // src/modules/sigmaUserData.js
5574
5043
  var SigmaUserData = class {
5575
5044
  constructor() {
@@ -5618,19 +5087,8 @@ var SigmaUserData = class {
5618
5087
  this.user.time = new Date().getTime() / (1e3 * 60 * 60);
5619
5088
  this.user.date = Math.floor(new Date().getTime() / (1e3 * 60 * 60 * 24));
5620
5089
  this.user.deviceCategory = deviceCategory;
5621
- this.getUserNavigator();
5622
5090
  }
5623
5091
  getUserNavigator() {
5624
- const userNavigator = browser_detect_es5_default();
5625
- const { user } = this;
5626
- let userOs;
5627
- if (userNavigator.os) {
5628
- userOs = userNavigator.os.split(" ");
5629
- }
5630
- user.browser.name = userNavigator.name ? userNavigator.name : void 0;
5631
- user.browser.version = userNavigator.version ? userNavigator.version : void 0;
5632
- user.os.name = userOs ? userOs[0] : void 0;
5633
- user.os.version = userOs ? userOs[1] : void 0;
5634
5092
  }
5635
5093
  setUserId(userId) {
5636
5094
  this.user.userId = userId;
@@ -5679,7 +5137,7 @@ var SigmaCache = class {
5679
5137
  }
5680
5138
  parse(data) {
5681
5139
  if (!this.get(data)) {
5682
- throw new Error(`${data} not found in local storage`);
5140
+ throw new Error(`${data} not found in cache`);
5683
5141
  }
5684
5142
  return JSON.parse(this.get(data));
5685
5143
  }
@@ -5797,8 +5255,8 @@ function checkBoolValue(value) {
5797
5255
  // src/helpers/checkForcedList.js
5798
5256
  function checkForcedList(usersList, data) {
5799
5257
  if (usersList.length) {
5800
- for (let id2 in usersList) {
5801
- if (usersList[id2] == data) {
5258
+ for (let id in usersList) {
5259
+ if (usersList[id] == data) {
5802
5260
  return true;
5803
5261
  }
5804
5262
  }