@braze/web-sdk 4.5.1 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +65 -9
  3. package/package.json +1 -1
  4. package/shared-lib/braze-shared-lib.js +7 -7
  5. package/shared-lib/encoding-utils.js +3 -3
  6. package/shared-lib/event-types.js +14 -14
  7. package/shared-lib/guid.js +2 -2
  8. package/shared-lib/indexed-db-adapter.js +3 -3
  9. package/shared-lib/logger.js +18 -18
  10. package/shared-lib/supported-options.js +15 -15
  11. package/src/Card/index.js +1 -0
  12. package/src/Card/log-content-card-click.js +4 -0
  13. package/src/FeatureFlags/feature-flag-factory.js +13 -5
  14. package/src/FeatureFlags/feature-flag.js +36 -8
  15. package/src/FeatureFlags/feature-flags-provider.js +58 -33
  16. package/src/FeatureFlags/get-all-feature-flags.js +3 -3
  17. package/src/FeatureFlags/get-feature-flag.js +5 -5
  18. package/src/FeatureFlags/index.js +1 -0
  19. package/src/Feed/feed-provider-factory.js +8 -8
  20. package/src/Feed/feed-provider.js +3 -3
  21. package/src/Feed/get-cached-feed.js +2 -2
  22. package/src/Feed/log-feed-displayed.js +1 -1
  23. package/src/Feed/request-feed-refresh.js +2 -2
  24. package/src/Feed/subscribe-to-feed-updates.js +2 -2
  25. package/src/Feed/ui/show-feed.js +2 -2
  26. package/src/InAppMessage/display/html-message-to-html.js +3 -3
  27. package/src/InAppMessage/display/in-app-message-to-html.js +101 -86
  28. package/src/InAppMessage/display/modal-utils.js +9 -9
  29. package/src/InAppMessage/in-app-message-factory.js +1 -1
  30. package/src/InAppMessage/in-app-message-manager-factory.js +3 -3
  31. package/src/InAppMessage/in-app-message-manager.js +52 -52
  32. package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
  33. package/src/InAppMessage/log-in-app-message-click.js +2 -2
  34. package/src/InAppMessage/log-in-app-message-html-click.js +3 -3
  35. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  36. package/src/InAppMessage/models/full-screen-message.js +1 -1
  37. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  38. package/src/InAppMessage/models/in-app-message.js +68 -68
  39. package/src/InAppMessage/models/modal-message.js +2 -2
  40. package/src/InAppMessage/models/slide-up-message.js +8 -8
  41. package/src/InAppMessage/models/templated-in-app-message.js +4 -4
  42. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  43. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  44. package/src/InAppMessage/ui/show-in-app-message.js +24 -21
  45. package/src/Push/push-manager.js +54 -54
  46. package/src/Push/utils/push-utils.js +4 -4
  47. package/src/User/user-manager.js +4 -4
  48. package/src/User/user.js +13 -13
  49. package/src/common/base-feed.js +1 -1
  50. package/src/common/feed-display.js +22 -22
  51. package/src/l10n/l10n-manager-factory.js +7 -7
  52. package/src/managers/auth-manager.js +23 -23
  53. package/src/managers/braze-instance.js +93 -93
  54. package/src/managers/device-manager.js +2 -2
  55. package/src/managers/network-manager.js +42 -42
  56. package/src/managers/server-config-manager.js +9 -9
  57. package/src/managers/session-manager.js +27 -27
  58. package/src/managers/storage-manager-factory.js +1 -1
  59. package/src/managers/storage-manager.js +61 -61
  60. package/src/managers/subscription-manager.js +6 -6
  61. package/src/models/backend-errors.js +5 -5
  62. package/src/models/braze-event.js +2 -2
  63. package/src/models/device.js +1 -1
  64. package/src/models/identifier.js +6 -6
  65. package/src/models/push-token.js +3 -3
  66. package/src/models/server-config.js +3 -3
  67. package/src/request-controller.js +52 -52
  68. package/src/triggers/models/filter-set.js +2 -2
  69. package/src/triggers/models/filter.js +34 -34
  70. package/src/triggers/models/in-app-message-click-data.js +6 -6
  71. package/src/triggers/models/push-click-data.js +1 -1
  72. package/src/triggers/models/trigger-condition.js +8 -8
  73. package/src/triggers/models/trigger-events.js +1 -1
  74. package/src/triggers/models/trigger.js +30 -30
  75. package/src/triggers/triggers-provider-factory.js +2 -2
  76. package/src/triggers/triggers-provider.js +37 -37
  77. package/src/ui/js/attach-css.js +1 -1
  78. package/src/ui/js/load-font-awesome.js +1 -1
  79. package/src/util/braze-actions.js +4 -4
  80. package/src/util/browser-detector.js +2 -2
  81. package/src/util/dom-utils.js +8 -8
  82. package/src/util/key-codes.js +1 -1
  83. package/src/util/net.js +3 -3
  84. package/src/util/window-utils.js +1 -1
@@ -8,61 +8,61 @@ export default class Rt {
8
8
  (this.h = s),
9
9
  (this.v = t),
10
10
  (this.gt = e),
11
- (this.uh = 1e3),
11
+ (this.dh = 1e3),
12
12
  (i = parseFloat(i)),
13
13
  isNaN(i) && (i = 1800),
14
- i < this.uh / 1e3 &&
14
+ i < this.dh / 1e3 &&
15
15
  (r.D.info(
16
16
  "Specified session timeout of " +
17
17
  i +
18
18
  "s is too small, using the minimum session timeout of " +
19
- this.uh / 1e3 +
19
+ this.dh / 1e3 +
20
20
  "s instead."
21
21
  ),
22
- (i = this.uh / 1e3)),
23
- (this.ah = i);
22
+ (i = this.dh / 1e3)),
23
+ (this.fh = i);
24
24
  }
25
- mh(s, t) {
26
- return new ue(this.v.getUserId(), r.A.dh, s, t.iu, { d: l(s - t.fh) });
25
+ ph(s, t) {
26
+ return new ue(this.v.getUserId(), r.A.gh, s, t.iu, { d: l(s - t.wh) });
27
27
  }
28
- ca() {
29
- const s = this.h.tu(o.eu.ph);
28
+ la() {
29
+ const s = this.h.tu(o.eu.Sh);
30
30
  return null == s ? null : s.iu;
31
31
  }
32
- gh() {
32
+ jh() {
33
33
  const s = new Date().valueOf(),
34
34
  t = this.gt.wl(),
35
- e = this.h.I(o.q.wh);
35
+ e = this.h.I(o.q.bh);
36
36
  if (null != e && null == t) return !1;
37
37
  const i = null == e || s - e > 1e3 * t;
38
- return i && this.h.B(o.q.wh, s), i;
38
+ return i && this.h.B(o.q.bh, s), i;
39
39
  }
40
- Sh(s, t) {
41
- return null == t || (!(s - t.fh < this.uh) && t.jh < s);
40
+ xh(s, t) {
41
+ return null == t || (!(s - t.wh < this.dh) && t.Dh < s);
42
42
  }
43
43
  mo() {
44
44
  const s = new Date().valueOf(),
45
- t = s + 1e3 * this.ah,
46
- e = this.h.tu(o.eu.ph);
47
- if (this.Sh(s, e)) {
45
+ t = s + 1e3 * this.fh,
46
+ e = this.h.tu(o.eu.Sh);
47
+ if (this.xh(s, e)) {
48
48
  let i = "Generating session start event with time " + s;
49
49
  if (null != e) {
50
- let s = e.bh;
51
- s - e.fh < this.uh && (s = e.fh + this.xh),
52
- this.h.Dh(this.mh(s, e)),
50
+ let s = e.Ch;
51
+ s - e.wh < this.dh && (s = e.wh + this.Gh),
52
+ this.h.Nh(this.ph(s, e)),
53
53
  (i += " (old session ended " + s + ")");
54
54
  }
55
55
  (i += ". Will expire " + t.valueOf()), r.D.info(i);
56
56
  const n = new _t(r.it.nt(), t);
57
- this.h.Dh(new ue(this.v.getUserId(), r.A.Ch, s, n.iu)),
58
- this.h.ru(o.eu.ph, n);
59
- return null == this.h.I(o.q.wh) && this.h.B(o.q.wh, s), n.iu;
57
+ this.h.Nh(new ue(this.v.getUserId(), r.A._h, s, n.iu)),
58
+ this.h.ru(o.eu.Sh, n);
59
+ return null == this.h.I(o.q.bh) && this.h.B(o.q.bh, s), n.iu;
60
60
  }
61
- return (e.bh = s), (e.jh = t), this.h.ru(o.eu.ph, e), e.iu;
61
+ return (e.Ch = s), (e.Dh = t), this.h.ru(o.eu.Sh, e), e.iu;
62
62
  }
63
- Gh() {
64
- const s = this.h.tu(o.eu.ph);
63
+ Fh() {
64
+ const s = this.h.tu(o.eu.Sh);
65
65
  null != s &&
66
- (this.h.Nh(o.eu.ph), this.h.Dh(this.mh(new Date().valueOf(), s)));
66
+ (this.h.Hh(o.eu.Sh), this.h.Nh(this.ph(new Date().valueOf(), s)));
67
67
  }
68
68
  }
@@ -1,7 +1,7 @@
1
1
  import G, { STORAGE_KEYS as o } from "./storage-manager.js";
2
2
  import r from "../../shared-lib/braze-shared-lib.js";
3
3
  const Mt = {
4
- Fo: (e, t) => {
4
+ Vo: (e, t) => {
5
5
  let a = !1;
6
6
  try {
7
7
  if (localStorage && localStorage.getItem)
@@ -13,7 +13,7 @@ export const STORAGE_KEYS = {
13
13
  eu: {
14
14
  su: "ab.storage.userId",
15
15
  Jo: "ab.storage.deviceId",
16
- ph: "ab.storage.sessionId"
16
+ Sh: "ab.storage.sessionId"
17
17
  },
18
18
  q: {
19
19
  Sa: "ab.test",
@@ -21,16 +21,16 @@ export const STORAGE_KEYS = {
21
21
  Ia: "ab.storage.attributes",
22
22
  Ka: "ab.storage.attributes.anonymous_user",
23
23
  Yo: "ab.storage.device",
24
- ua: "ab.storage.sdk_metadata",
25
- ha: "ab.storage.session_id_for_cached_metadata",
26
- Pn: "ab.storage.pushToken",
24
+ ha: "ab.storage.sdk_metadata",
25
+ ca: "ab.storage.session_id_for_cached_metadata",
26
+ Sn: "ab.storage.pushToken",
27
27
  ei: "ab.storage.newsFeed",
28
28
  hi: "ab.storage.lastNewsFeedRefresh",
29
29
  P: "ab.storage.cardImpressions",
30
30
  ol: "ab.storage.serverConfig",
31
31
  Ya: "ab.storage.triggers",
32
32
  Da: "ab.storage.triggers.ts",
33
- wh: "ab.storage.messagingSessionStart",
33
+ bh: "ab.storage.messagingSessionStart",
34
34
  Yt: "ab.storage.cc",
35
35
  vs: "ab.storage.ccLastFullSync",
36
36
  ys: "ab.storage.ccLastCardUpdated",
@@ -40,11 +40,11 @@ export const STORAGE_KEYS = {
40
40
  Ga: "ab.storage.lastDisplayedTriggerTimesById",
41
41
  Na: "ab.storage.lastDisplayedTriggerTime",
42
42
  va: "ab.storage.triggerFireInstancesById",
43
- Mn: "ab.storage.signature",
43
+ Qn: "ab.storage.signature",
44
44
  As: "ab.storage.brazeSyncRetryCount",
45
45
  _s: "ab.storage.sdkVersion",
46
46
  ze: "ab.storage.ff",
47
- qe: "ab.storage.ffLastRefreshAt"
47
+ Ce: "ab.storage.ffLastRefreshAt"
48
48
  },
49
49
  ae: "ab.optOut"
50
50
  };
@@ -58,12 +58,12 @@ export default class G {
58
58
  }
59
59
  ya(t) {
60
60
  const e = this.tu(t);
61
- null != e && ((e.bh = new Date().valueOf()), this.ru(t, e));
61
+ null != e && ((e.Ch = new Date().valueOf()), this.ru(t, e));
62
62
  }
63
63
  tu(t) {
64
- return _t.Sn(this.Ma.lr(t));
64
+ return _t.jn(this.Ma.lr(t));
65
65
  }
66
- Nh(t) {
66
+ Hh(t) {
67
67
  this.Ma.remove(t);
68
68
  }
69
69
  bo(t) {
@@ -74,7 +74,7 @@ export default class G {
74
74
  for (let s = 0; s < t.length; s++) e.push(t[s].ss());
75
75
  return this.Ca.store(STORAGE_KEYS.q.Ta, e);
76
76
  }
77
- Dh(t) {
77
+ Nh(t) {
78
78
  return null != t && this.bo([t]);
79
79
  }
80
80
  Ua() {
@@ -85,7 +85,7 @@ export default class G {
85
85
  o = null;
86
86
  if (p(t))
87
87
  for (let s = 0; s < t.length; s++)
88
- ue.Fa(t[s]) ? e.push(ue.Sn(t[s])) : (o = s);
88
+ ue.Fa(t[s]) ? e.push(ue.jn(t[s])) : (o = s);
89
89
  else s = !0;
90
90
  if (s || null != o) {
91
91
  let n = "Stored events could not be deserialized as Events";
@@ -147,14 +147,14 @@ export default class G {
147
147
  La(t) {
148
148
  return t || STORAGE_KEYS.q.Ka;
149
149
  }
150
- Aa(t) {
150
+ za(t) {
151
151
  let e = this.Ca.lr(STORAGE_KEYS.q.Ia);
152
152
  null == e && (e = {});
153
- const s = this.La(t[User.Rn]);
153
+ const s = this.La(t[User.On]);
154
154
  for (let r in t)
155
- r === User.Rn ||
155
+ r === User.On ||
156
156
  (null != e[s] && null != e[s][r]) ||
157
- this.mu(t[User.Rn], r, t[r]);
157
+ this.mu(t[User.On], r, t[r]);
158
158
  }
159
159
  mu(t, e, s) {
160
160
  let r = this.Ca.lr(STORAGE_KEYS.q.Ia);
@@ -162,14 +162,14 @@ export default class G {
162
162
  const o = this.La(t);
163
163
  let n = r[o];
164
164
  if (
165
- (null == n && ((n = {}), null != t && (n[User.Rn] = t)), e === User.lu)
165
+ (null == n && ((n = {}), null != t && (n[User.On] = t)), e === User.lu)
166
166
  ) {
167
167
  null == n[e] && (n[e] = {});
168
168
  for (let t in s) n[e][t] = s[t];
169
169
  } else n[e] = s;
170
170
  return (r[o] = n), this.Ca.store(STORAGE_KEYS.q.Ia, r);
171
171
  }
172
- Ba() {
172
+ Pa() {
173
173
  const t = this.Ca.lr(STORAGE_KEYS.q.Ia);
174
174
  this.Ca.remove(STORAGE_KEYS.q.Ia);
175
175
  const e = [];
@@ -184,41 +184,41 @@ export default class G {
184
184
  null != r &&
185
185
  ((e[s] = void 0),
186
186
  this.Ca.store(STORAGE_KEYS.q.Ia, e),
187
- (r[User.Rn] = t),
188
- this.Aa(r));
187
+ (r[User.On] = t),
188
+ this.za(r));
189
189
  }
190
- const s = this.tu(STORAGE_KEYS.eu.ph);
190
+ const s = this.tu(STORAGE_KEYS.eu.Sh);
191
191
  let r = null;
192
192
  null != s && (r = s.iu);
193
193
  const o = this.Ua();
194
194
  if (null != o)
195
195
  for (let e = 0; e < o.length; e++) {
196
196
  const s = o[e];
197
- null == s.userId && s.sessionId == r && (s.userId = t), this.Dh(s);
197
+ null == s.userId && s.sessionId == r && (s.userId = t), this.Nh(s);
198
198
  }
199
199
  }
200
- Pa() {
201
- return this.Ca.xa;
200
+ xa() {
201
+ return this.Ca.Ja;
202
202
  }
203
203
  }
204
204
  G._a = class {
205
205
  constructor(t) {
206
- (this._r = t), (this.xa = ot.Ja() ? 3 : 10);
206
+ (this._r = t), (this.Ja = ot.ka() ? 3 : 10);
207
207
  }
208
- ka(t) {
208
+ Va(t) {
209
209
  return t + "." + this._r;
210
210
  }
211
211
  store(t, e) {
212
212
  const s = { v: e };
213
213
  try {
214
- return localStorage.setItem(this.ka(t), JSON.stringify(s)), !0;
214
+ return localStorage.setItem(this.Va(t), JSON.stringify(s)), !0;
215
215
  } catch (t) {
216
216
  return r.D.info("Storage failure: " + t.message), !1;
217
217
  }
218
218
  }
219
219
  lr(t) {
220
220
  try {
221
- const e = JSON.parse(localStorage.getItem(this.ka(t)));
221
+ const e = JSON.parse(localStorage.getItem(this.Va(t)));
222
222
  return null == e ? null : e.v;
223
223
  } catch (t) {
224
224
  return r.D.info("Storage retrieval failure: " + t.message), null;
@@ -226,7 +226,7 @@ G._a = class {
226
226
  }
227
227
  remove(t) {
228
228
  try {
229
- localStorage.removeItem(this.ka(t));
229
+ localStorage.removeItem(this.Va(t));
230
230
  } catch (t) {
231
231
  return r.D.info("Storage removal failure: " + t.message), !1;
232
232
  }
@@ -234,12 +234,12 @@ G._a = class {
234
234
  };
235
235
  G.ne = class {
236
236
  constructor(t, e) {
237
- (this._r = t), (this.Va = this.Qa()), (this.Ha = 576e3), (this.Wa = !!e);
237
+ (this._r = t), (this.Qa = this.Ha()), (this.Wa = 576e3), (this.Xa = !!e);
238
238
  }
239
- ka(t) {
239
+ Va(t) {
240
240
  return null != this._r ? t + "." + this._r : t;
241
241
  }
242
- Qa() {
242
+ Ha() {
243
243
  let t = 0,
244
244
  e = document.location.hostname;
245
245
  const s = e.split("."),
@@ -256,9 +256,9 @@ G.ne = class {
256
256
  }
257
257
  ie() {
258
258
  const t = new Date();
259
- return t.setTime(t.getTime() + 60 * this.Ha * 1e3), t.getFullYear();
259
+ return t.setTime(t.getTime() + 60 * this.Wa * 1e3), t.getFullYear();
260
260
  }
261
- Xa() {
261
+ Za() {
262
262
  const t = At(STORAGE_KEYS.eu),
263
263
  e = document.cookie.split(";");
264
264
  for (let s = 0; s < e.length; s++) {
@@ -272,19 +272,19 @@ G.ne = class {
272
272
  }
273
273
  if (o) {
274
274
  const t = r.split("=")[0];
275
- -1 === t.indexOf("." + this._r) && this.Za(t);
275
+ -1 === t.indexOf("." + this._r) && this.$a(t);
276
276
  }
277
277
  }
278
278
  }
279
279
  store(t, e) {
280
- this.Xa();
280
+ this.Za();
281
281
  const s = new Date();
282
- s.setTime(s.getTime() + 60 * this.Ha * 1e3);
282
+ s.setTime(s.getTime() + 60 * this.Wa * 1e3);
283
283
  const o = "expires=" + s.toUTCString(),
284
- n = "domain=" + this.Va;
284
+ n = "domain=" + this.Qa;
285
285
  let i;
286
- i = this.Wa ? e : encodeURIComponent(JSON.stringify(e));
287
- const a = this.ka(t) + "=" + i + ";" + o + ";" + n + ";path=/";
286
+ i = this.Xa ? e : encodeURIComponent(JSON.stringify(e));
287
+ const a = this.Va(t) + "=" + i + ";" + o + ";" + n + ";path=/";
288
288
  return a.length >= 4093
289
289
  ? (r.D.info(
290
290
  "Storage failure: string is " +
@@ -296,7 +296,7 @@ G.ne = class {
296
296
  }
297
297
  lr(t) {
298
298
  const e = [],
299
- s = this.ka(t) + "=",
299
+ s = this.Va(t) + "=",
300
300
  o = document.cookie.split(";");
301
301
  for (let n = 0; n < o.length; n++) {
302
302
  let i = o[n];
@@ -304,7 +304,7 @@ G.ne = class {
304
304
  if (0 === i.indexOf(s))
305
305
  try {
306
306
  let t;
307
- (t = this.Wa
307
+ (t = this.Xa
308
308
  ? i.substring(s.length, i.length)
309
309
  : JSON.parse(decodeURIComponent(i.substring(s.length, i.length)))),
310
310
  e.push(t);
@@ -319,33 +319,33 @@ G.ne = class {
319
319
  return e.length > 0 ? e[e.length - 1] : null;
320
320
  }
321
321
  remove(t) {
322
- this.Za(this.ka(t));
322
+ this.$a(this.Va(t));
323
323
  }
324
- Za(t) {
324
+ $a(t) {
325
325
  const e = t + "=;expires=" + new Date(0).toGMTString();
326
326
  (document.cookie = e), (document.cookie = e + ";path=/");
327
- const s = e + ";domain=" + this.Va;
327
+ const s = e + ";domain=" + this.Qa;
328
328
  (document.cookie = s), (document.cookie = s + ";path=/");
329
329
  }
330
330
  };
331
331
  G.Oa = class {
332
332
  constructor() {
333
- (this.$a = {}), (this.El = 5242880), (this.xa = 3);
333
+ (this.El = {}), (this.Sl = 5242880), (this.Ja = 3);
334
334
  }
335
335
  store(t, e) {
336
336
  const s = { value: e },
337
- o = this.Sl(e);
338
- return o > this.El
337
+ o = this._l(e);
338
+ return o > this.Sl
339
339
  ? (r.D.info(
340
340
  "Storage failure: object is ≈" +
341
341
  o +
342
342
  " bytes which is greater than the max of " +
343
- this.El
343
+ this.Sl
344
344
  ),
345
345
  !1)
346
- : ((this.$a[t] = s), !0);
346
+ : ((this.El[t] = s), !0);
347
347
  }
348
- Sl(t) {
348
+ _l(t) {
349
349
  const e = [],
350
350
  s = [t];
351
351
  let r = 0;
@@ -362,33 +362,33 @@ G.Oa = class {
362
362
  return r;
363
363
  }
364
364
  lr(t) {
365
- const e = this.$a[t];
365
+ const e = this.El[t];
366
366
  return null == e ? null : e.value;
367
367
  }
368
368
  remove(t) {
369
- this.$a[t] = null;
369
+ this.El[t] = null;
370
370
  }
371
371
  };
372
372
  G.wa = class {
373
373
  constructor(t, e, s) {
374
- (this._l = []),
375
- e && this._l.push(new G.ne(t)),
376
- s && this._l.push(new G._a(t)),
377
- this._l.push(new G.Oa(t));
374
+ (this.Tl = []),
375
+ e && this.Tl.push(new G.ne(t)),
376
+ s && this.Tl.push(new G._a(t)),
377
+ this.Tl.push(new G.Oa(t));
378
378
  }
379
379
  store(t, e) {
380
380
  let s = !0;
381
- for (let r = 0; r < this._l.length; r++) s = this._l[r].store(t, e) && s;
381
+ for (let r = 0; r < this.Tl.length; r++) s = this.Tl[r].store(t, e) && s;
382
382
  return s;
383
383
  }
384
384
  lr(t) {
385
- for (let e = 0; e < this._l.length; e++) {
386
- const s = this._l[e].lr(t);
385
+ for (let e = 0; e < this.Tl.length; e++) {
386
+ const s = this.Tl[e].lr(t);
387
387
  if (null != s) return s;
388
388
  }
389
389
  return null;
390
390
  }
391
391
  remove(t) {
392
- for (let e = 0; e < this._l.length; e++) this._l[e].remove(t);
392
+ for (let e = 0; e < this.Tl.length; e++) this.Tl[e].remove(t);
393
393
  }
394
394
  };
@@ -1,25 +1,25 @@
1
1
  import r from "../../shared-lib/braze-shared-lib.js";
2
2
  export default class u {
3
3
  constructor() {
4
- this.Pe = {};
4
+ this.ni = {};
5
5
  }
6
6
  ut(t) {
7
7
  if ("function" != typeof t) return null;
8
8
  const i = r.it.nt();
9
- return (this.Pe[i] = t), i;
9
+ return (this.ni[i] = t), i;
10
10
  }
11
11
  removeSubscription(t) {
12
- delete this.Pe[t];
12
+ delete this.ni[t];
13
13
  }
14
14
  removeAllSubscriptions() {
15
- this.Pe = {};
15
+ this.ni = {};
16
16
  }
17
17
  bu() {
18
- return Object.keys(this.Pe).length;
18
+ return Object.keys(this.ni).length;
19
19
  }
20
20
  St(t) {
21
21
  const i = [];
22
- for (let r in this.Pe) i.push(this.Pe[r](t));
22
+ for (let r in this.ni) i.push(this.ni[r](t));
23
23
  return i;
24
24
  }
25
25
  }
@@ -1,8 +1,8 @@
1
1
  export default {
2
- pa: "invalid_api_key",
3
- Ra: "blacklisted",
4
- ba: "no_device_identifier",
5
- ma: "invalid_json_response",
6
- fa: "empty_response",
2
+ Ra: "invalid_api_key",
3
+ ba: "blacklisted",
4
+ ga: "no_device_identifier",
5
+ pa: "invalid_json_response",
6
+ ma: "empty_response",
7
7
  __: "sdk_auth_error"
8
8
  };
@@ -11,7 +11,7 @@ export default class ue {
11
11
  (this.sessionId = r),
12
12
  (this.data = e);
13
13
  }
14
- Mi() {
14
+ Si() {
15
15
  const t = {
16
16
  name: this.type,
17
17
  time: l(this.time),
@@ -35,7 +35,7 @@ export default class ue {
35
35
  static Fa(t) {
36
36
  return null != t && Jt(t) && null != t.t && "" !== t.t;
37
37
  }
38
- static Sn(t) {
38
+ static jn(t) {
39
39
  return new ue(t.u, t.t, t.ts, t.s, t.d);
40
40
  }
41
41
  }
@@ -3,7 +3,7 @@ export default class Ie {
3
3
  constructor(s) {
4
4
  this.id = s;
5
5
  }
6
- Mi() {
6
+ Si() {
7
7
  const s = {};
8
8
  return (
9
9
  null != this[DeviceProperties.BROWSER] &&
@@ -5,16 +5,16 @@ export default class _t {
5
5
  (s = parseInt(s)),
6
6
  (isNaN(s) || 0 === s) && (s = new Date().valueOf()),
7
7
  (this.iu = t),
8
- (this.fh = s),
9
- (this.bh = new Date().valueOf()),
10
- (this.jh = e);
8
+ (this.wh = s),
9
+ (this.Ch = new Date().valueOf()),
10
+ (this.Dh = e);
11
11
  }
12
12
  ss() {
13
- return { g: this.iu, e: this.jh, c: this.fh, l: this.bh };
13
+ return { g: this.iu, e: this.Dh, c: this.wh, l: this.Ch };
14
14
  }
15
- static Sn(t) {
15
+ static jn(t) {
16
16
  if (null == t || null == t.g) return null;
17
17
  const e = new _t(t.g, t.e, t.c);
18
- return (e.bh = t.l), e;
18
+ return (e.Ch = t.l), e;
19
19
  }
20
20
  }
@@ -2,7 +2,7 @@ import { rehydrateDateAfterJsonization as w } from "../util/date-utils.js";
2
2
  export default class ei {
3
3
  constructor(t, i, l, s, u) {
4
4
  (this.endpoint = t || null),
5
- (this.Dn = i || null),
5
+ (this._n = i || null),
6
6
  (this.publicKey = l || null),
7
7
  (this.zl = s || null),
8
8
  (this.gl = u || null);
@@ -10,13 +10,13 @@ export default class ei {
10
10
  ss() {
11
11
  return {
12
12
  e: this.endpoint,
13
- c: this.Dn,
13
+ c: this._n,
14
14
  p: this.publicKey,
15
15
  u: this.zl,
16
16
  v: this.gl
17
17
  };
18
18
  }
19
- static Sn(t) {
19
+ static jn(t) {
20
20
  return new ei(t.e, w(t.c), t.p, t.u, t.v);
21
21
  }
22
22
  }
@@ -12,7 +12,7 @@ export default class Ft {
12
12
  }
13
13
  ss() {
14
14
  return {
15
- s: "4.5.1",
15
+ s: "4.6.1",
16
16
  l: this.ul,
17
17
  e: this.bl,
18
18
  a: this.dl,
@@ -23,10 +23,10 @@ export default class Ft {
23
23
  f: this.cl
24
24
  };
25
25
  }
26
- static Sn(t) {
26
+ static jn(t) {
27
27
  let s = t.l;
28
28
  return (
29
- "4.5.1" !== t.s && (s = 0), new Ft(s, t.e, t.a, t.p, t.m, t.v, t.c, t.f)
29
+ "4.6.1" !== t.s && (s = 0), new Ft(s, t.e, t.a, t.p, t.m, t.v, t.c, t.f)
30
30
  );
31
31
  }
32
32
  }