@braze/web-sdk 4.4.0 → 4.5.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 (53) hide show
  1. package/index.d.ts +15 -3
  2. package/package.json +1 -1
  3. package/shared-lib/braze-shared-lib.js +1 -1
  4. package/shared-lib/encoding-utils.js +1 -1
  5. package/shared-lib/event-types.js +7 -7
  6. package/shared-lib/indexed-db-adapter.js +1 -1
  7. package/shared-lib/logger.js +2 -2
  8. package/shared-lib/supported-options.js +13 -13
  9. package/src/Card/models/card.js +1 -0
  10. package/src/Card/models/control-card.js +3 -2
  11. package/src/InAppMessage/log-in-app-message-click.js +4 -1
  12. package/src/InAppMessage/models/control-message.js +1 -1
  13. package/src/InAppMessage/models/in-app-message.js +8 -4
  14. package/src/Push/push-manager.js +54 -54
  15. package/src/Push/utils/push-utils.js +3 -3
  16. package/src/User/user-manager.js +4 -4
  17. package/src/User/user.js +8 -8
  18. package/src/managers/auth-manager.js +4 -4
  19. package/src/managers/braze-instance.js +81 -81
  20. package/src/managers/device-manager.js +7 -7
  21. package/src/managers/network-manager.js +39 -39
  22. package/src/managers/server-config-manager.js +4 -4
  23. package/src/managers/session-manager.js +1 -1
  24. package/src/managers/storage-manager-factory.js +1 -1
  25. package/src/managers/storage-manager.js +40 -40
  26. package/src/models/backend-errors.js +5 -5
  27. package/src/models/braze-event.js +1 -1
  28. package/src/models/identifier.js +1 -1
  29. package/src/models/push-token.js +3 -3
  30. package/src/models/server-config.js +3 -3
  31. package/src/request-controller.js +64 -64
  32. package/src/triggers/models/custom-event-data.js +1 -1
  33. package/src/triggers/models/custom-event-property-data.js +5 -5
  34. package/src/triggers/models/filter-set.js +4 -4
  35. package/src/triggers/models/filter.js +57 -57
  36. package/src/triggers/models/in-app-message-click-data.js +1 -1
  37. package/src/triggers/models/purchase-data.js +1 -1
  38. package/src/triggers/models/purchase-property-data.js +5 -5
  39. package/src/triggers/models/push-click-data.js +1 -1
  40. package/src/triggers/models/trigger-condition.js +4 -4
  41. package/src/triggers/models/trigger.js +16 -16
  42. package/src/triggers/triggers-provider-factory.js +1 -1
  43. package/src/triggers/triggers-provider.js +14 -14
  44. package/src/ui/js/attach-css.js +1 -1
  45. package/src/ui/js/feed-css.js +1 -1
  46. package/src/ui/js/iam-css.js +1 -1
  47. package/src/ui/js/load-font-awesome.js +1 -1
  48. package/src/util/base-device-parser.js +1 -1
  49. package/src/util/browser-detector.js +5 -5
  50. package/src/util/client-hints-parser.js +1 -1
  51. package/src/util/net.js +3 -3
  52. package/src/util/user-agent-parser.js +1 -1
  53. package/src/util/window-utils.js +1 -1
@@ -20,10 +20,10 @@ export const STORAGE_KEYS = {
20
20
  Ta: "ab.storage.events",
21
21
  Ia: "ab.storage.attributes",
22
22
  Ka: "ab.storage.attributes.anonymous_user",
23
- Xo: "ab.storage.device",
24
- oa: "ab.storage.sdk_metadata",
25
- ua: "ab.storage.session_id_for_cached_metadata",
26
- kn: "ab.storage.pushToken",
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",
27
27
  ei: "ab.storage.newsFeed",
28
28
  hi: "ab.storage.lastNewsFeedRefresh",
29
29
  P: "ab.storage.cardImpressions",
@@ -61,7 +61,7 @@ export default class G {
61
61
  null != e && ((e.bh = new Date().valueOf()), this.ru(t, e));
62
62
  }
63
63
  tu(t) {
64
- return _t.Dn(this.Ma.lr(t));
64
+ return _t.Sn(this.Ma.lr(t));
65
65
  }
66
66
  Nh(t) {
67
67
  this.Ma.remove(t);
@@ -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.Dn(t[s])) : (o = s);
88
+ ue.Fa(t[s]) ? e.push(ue.Sn(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
- qa(t) {
150
+ Aa(t) {
151
151
  let e = this.Ca.lr(STORAGE_KEYS.q.Ia);
152
152
  null == e && (e = {});
153
- const s = this.La(t[User.Ln]);
153
+ const s = this.La(t[User.Rn]);
154
154
  for (let r in t)
155
- r === User.Ln ||
155
+ r === User.Rn ||
156
156
  (null != e[s] && null != e[s][r]) ||
157
- this.mu(t[User.Ln], r, t[r]);
157
+ this.mu(t[User.Rn], r, t[r]);
158
158
  }
159
159
  mu(t, e, s) {
160
160
  let r = this.Ca.lr(STORAGE_KEYS.q.Ia);
@@ -162,7 +162,7 @@ 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.Ln] = t)), e === User.lu)
165
+ (null == n && ((n = {}), null != t && (n[User.Rn] = 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];
@@ -184,8 +184,8 @@ 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.Ln] = t),
188
- this.qa(r));
187
+ (r[User.Rn] = t),
188
+ this.Aa(r));
189
189
  }
190
190
  const s = this.tu(STORAGE_KEYS.eu.ph);
191
191
  let r = null;
@@ -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.za()), (this.Qa = 576e3), (this.Ha = !!e);
237
+ (this._r = t), (this.Va = this.Qa()), (this.Ha = 576e3), (this.Wa = !!e);
238
238
  }
239
239
  ka(t) {
240
240
  return null != this._r ? t + "." + this._r : t;
241
241
  }
242
- za() {
242
+ Qa() {
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.Qa * 1e3), t.getFullYear();
259
+ return t.setTime(t.getTime() + 60 * this.Ha * 1e3), t.getFullYear();
260
260
  }
261
- Wa() {
261
+ Xa() {
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,18 +272,18 @@ G.ne = class {
272
272
  }
273
273
  if (o) {
274
274
  const t = r.split("=")[0];
275
- -1 === t.indexOf("." + this._r) && this.Xa(t);
275
+ -1 === t.indexOf("." + this._r) && this.Za(t);
276
276
  }
277
277
  }
278
278
  }
279
279
  store(t, e) {
280
- this.Wa();
280
+ this.Xa();
281
281
  const s = new Date();
282
- s.setTime(s.getTime() + 60 * this.Qa * 1e3);
282
+ s.setTime(s.getTime() + 60 * this.Ha * 1e3);
283
283
  const o = "expires=" + s.toUTCString(),
284
284
  n = "domain=" + this.Va;
285
285
  let i;
286
- i = this.Ha ? e : encodeURIComponent(JSON.stringify(e));
286
+ i = this.Wa ? e : encodeURIComponent(JSON.stringify(e));
287
287
  const a = this.ka(t) + "=" + i + ";" + o + ";" + n + ";path=/";
288
288
  return a.length >= 4093
289
289
  ? (r.D.info(
@@ -304,7 +304,7 @@ G.ne = class {
304
304
  if (0 === i.indexOf(s))
305
305
  try {
306
306
  let t;
307
- (t = this.Ha
307
+ (t = this.Wa
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,9 +319,9 @@ G.ne = class {
319
319
  return e.length > 0 ? e[e.length - 1] : null;
320
320
  }
321
321
  remove(t) {
322
- this.Xa(this.ka(t));
322
+ this.Za(this.ka(t));
323
323
  }
324
- Xa(t) {
324
+ Za(t) {
325
325
  const e = t + "=;expires=" + new Date(0).toGMTString();
326
326
  (document.cookie = e), (document.cookie = e + ";path=/");
327
327
  const s = e + ";domain=" + this.Va;
@@ -330,22 +330,22 @@ G.ne = class {
330
330
  };
331
331
  G.Oa = class {
332
332
  constructor() {
333
- (this.Za = {}), (this.$a = 5242880), (this.xa = 3);
333
+ (this.$a = {}), (this.El = 5242880), (this.xa = 3);
334
334
  }
335
335
  store(t, e) {
336
336
  const s = { value: e },
337
- o = this.El(e);
338
- return o > this.$a
337
+ o = this.Sl(e);
338
+ return o > this.El
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.$a
343
+ this.El
344
344
  ),
345
345
  !1)
346
- : ((this.Za[t] = s), !0);
346
+ : ((this.$a[t] = s), !0);
347
347
  }
348
- El(t) {
348
+ Sl(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.Za[t];
365
+ const e = this.$a[t];
366
366
  return null == e ? null : e.value;
367
367
  }
368
368
  remove(t) {
369
- this.Za[t] = null;
369
+ this.$a[t] = null;
370
370
  }
371
371
  };
372
372
  G.wa = class {
373
373
  constructor(t, e, s) {
374
- (this.Sl = []),
375
- e && this.Sl.push(new G.ne(t)),
376
- s && this.Sl.push(new G._a(t)),
377
- this.Sl.push(new G.Oa(t));
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));
378
378
  }
379
379
  store(t, e) {
380
380
  let s = !0;
381
- for (let r = 0; r < this.Sl.length; r++) s = this.Sl[r].store(t, e) && s;
381
+ for (let r = 0; r < this._l.length; r++) s = this._l[r].store(t, e) && s;
382
382
  return s;
383
383
  }
384
384
  lr(t) {
385
- for (let e = 0; e < this.Sl.length; e++) {
386
- const s = this.Sl[e].lr(t);
385
+ for (let e = 0; e < this._l.length; e++) {
386
+ const s = this._l[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.Sl.length; e++) this.Sl[e].remove(t);
392
+ for (let e = 0; e < this._l.length; e++) this._l[e].remove(t);
393
393
  }
394
394
  };
@@ -1,8 +1,8 @@
1
1
  export default {
2
- ma: "invalid_api_key",
3
- pa: "blacklisted",
4
- Ra: "no_device_identifier",
5
- fa: "invalid_json_response",
6
- la: "empty_response",
2
+ pa: "invalid_api_key",
3
+ Ra: "blacklisted",
4
+ ba: "no_device_identifier",
5
+ ma: "invalid_json_response",
6
+ fa: "empty_response",
7
7
  __: "sdk_auth_error"
8
8
  };
@@ -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 Dn(t) {
38
+ static Sn(t) {
39
39
  return new ue(t.u, t.t, t.ts, t.s, t.d);
40
40
  }
41
41
  }
@@ -12,7 +12,7 @@ export default class _t {
12
12
  ss() {
13
13
  return { g: this.iu, e: this.jh, c: this.fh, l: this.bh };
14
14
  }
15
- static Dn(t) {
15
+ static Sn(t) {
16
16
  if (null == t || null == t.g) return null;
17
17
  const e = new _t(t.g, t.e, t.c);
18
18
  return (e.bh = t.l), e;
@@ -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.Pn = i || null),
5
+ (this.Dn = 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.Pn,
13
+ c: this.Dn,
14
14
  p: this.publicKey,
15
15
  u: this.zl,
16
16
  v: this.gl
17
17
  };
18
18
  }
19
- static Dn(t) {
19
+ static Sn(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.4.0",
15
+ s: "4.5.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 Dn(t) {
26
+ static Sn(t) {
27
27
  let s = t.l;
28
28
  return (
29
- "4.4.0" !== t.s && (s = 0), new Ft(s, t.e, t.a, t.p, t.m, t.v, t.c, t.f)
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)
30
30
  );
31
31
  }
32
32
  }
@@ -10,7 +10,7 @@ import dt from "./Push/utils/push-utils.js";
10
10
  export default class Lt {
11
11
  constructor(t, s, i, e, n, l, h, o, r, a) {
12
12
  (this._r = t),
13
- (this.zo = s),
13
+ (this.Bo = s),
14
14
  (this.kl = 0),
15
15
  (this.yl = h.Pa()),
16
16
  (this.jl = null),
@@ -19,16 +19,16 @@ export default class Lt {
19
19
  (this.v = n),
20
20
  (this.gt = l),
21
21
  (this.h = h),
22
- (this.Go = r),
22
+ (this.Ko = r),
23
23
  (this.vt = a),
24
24
  (this.$l = o),
25
25
  (this.Al = new u()),
26
26
  (this.Tl = 50);
27
27
  }
28
- _l(t, s) {
29
- return !t && !s && this.Go.Xn() >= this.Tl;
28
+ ql(t, s) {
29
+ return !t && !s && this.Ko.Yn() >= this.Tl;
30
30
  }
31
- ql(t) {
31
+ Fl(t) {
32
32
  let s = this.j.gh();
33
33
  if (t.length > 0) {
34
34
  const i = this.v.getUserId();
@@ -39,15 +39,15 @@ export default class Lt {
39
39
  }
40
40
  return s;
41
41
  }
42
- Fl(t, s, i, e, n, l, h) {
43
- null == i && (i = !0), i && this.Dl();
42
+ Dl(t, s, i, e, n, l, h) {
43
+ null == i && (i = !0), i && this.Ll();
44
44
  const u = this.h.Ua(),
45
45
  a = this.h.Ba();
46
46
  let c = !1;
47
47
  const d = (t, s) => {
48
48
  let h = !1;
49
49
  b.Hs({
50
- url: this.zo + "/data/",
50
+ url: this.Bo + "/data/",
51
51
  data: t,
52
52
  headers: s,
53
53
  S: i => {
@@ -55,14 +55,14 @@ export default class Lt {
55
55
  t.respond_with.triggers &&
56
56
  (this.kl = Math.max(this.kl - 1, 0)),
57
57
  this.vt.Os(t, i, s)
58
- ? (this.Go.Qs(),
58
+ ? (this.Ko.Qs(),
59
59
  this.gt.al(i),
60
60
  (null != t.respond_with &&
61
61
  t.respond_with.user_id != this.v.getUserId()) ||
62
- (null != t.device && this.h.B(o.q.Xo, t.device),
62
+ (null != t.device && this.h.B(o.q.Yo, t.device),
63
63
  null != t.sdk_metadata &&
64
- (this.h.B(o.q.oa, t.sdk_metadata),
65
- this.h.B(o.q.ua, this.j.ha())),
64
+ (this.h.B(o.q.ua, t.sdk_metadata),
65
+ this.h.B(o.q.ha, this.j.ca())),
66
66
  this.$l(i),
67
67
  "function" == typeof e && e()))
68
68
  : i.auth_error && (h = !0);
@@ -71,91 +71,91 @@ export default class Lt {
71
71
  null != t.respond_with &&
72
72
  t.respond_with.triggers &&
73
73
  (this.kl = Math.max(this.kl - 1, 0)),
74
- this.vt.ca(t.events, t.attributes),
74
+ this.vt.la(t.events, t.attributes),
75
75
  "function" == typeof n && n();
76
76
  },
77
- Ll: t => {
77
+ Pl: t => {
78
78
  if (("function" == typeof l && l(t), i && !c)) {
79
- if (t && !h) this.Pl();
79
+ if (t && !h) this.Rl();
80
80
  else {
81
81
  let t = this.jl;
82
82
  (null == t || t < 1e3 * this.yl) && (t = 1e3 * this.yl),
83
- this.Pl(Math.min(3e5, pt(1e3 * this.yl, 3 * t)));
83
+ this.Rl(Math.min(3e5, pt(1e3 * this.yl, 3 * t)));
84
84
  }
85
85
  c = !0;
86
86
  }
87
87
  }
88
88
  });
89
89
  },
90
- m = this.ql(u),
90
+ m = this.Fl(u),
91
91
  f = s || m;
92
- if (this._l(h, m))
92
+ if (this.ql(h, m))
93
93
  return void r.D.info(
94
94
  "Declining to flush data due to 50 consecutive authentication failures"
95
95
  );
96
- if (i && !this.vt.ba(u, a, t, f))
97
- return this.Pl(), void ("function" == typeof l && l(!0));
98
- const g = this.vt.ga(t, f, u, a);
96
+ if (i && !this.vt.ga(u, a, t, f))
97
+ return this.Rl(), void ("function" == typeof l && l(!0));
98
+ const g = this.vt.qa(t, f, u, a);
99
99
  f && this.kl++;
100
100
  let p = !1;
101
101
  if (g)
102
102
  for (const t of g)
103
103
  this.vt.Gs(t.requestData, () => d(t.requestData, t.headers)), (p = !0);
104
- this.Go.Jn() && i && !p
105
- ? this.Pl()
104
+ this.Ko.Jn() && i && !p
105
+ ? this.Rl()
106
106
  : m && (r.D.info("Invoking new session subscriptions"), this.Al.St());
107
107
  }
108
- Rl() {
108
+ Ml() {
109
109
  return this.kl > 0;
110
110
  }
111
- Pl(t) {
112
- this.Ml ||
111
+ Rl(t) {
112
+ this.Il ||
113
113
  (null == t && (t = 1e3 * this.yl),
114
- this.Dl(),
115
- (this.Il = setTimeout(() => {
114
+ this.Ll(),
115
+ (this.Nl = setTimeout(() => {
116
116
  if (document.hidden) {
117
117
  const t = "visibilitychange",
118
118
  s = () => {
119
119
  document.hidden ||
120
- (document.removeEventListener(t, s, !1), this.Fl());
120
+ (document.removeEventListener(t, s, !1), this.Dl());
121
121
  };
122
122
  document.addEventListener(t, s, !1);
123
- } else this.Fl();
123
+ } else this.Dl();
124
124
  }, t)),
125
125
  (this.jl = t));
126
126
  }
127
- Dl() {
128
- null != this.Il && (clearTimeout(this.Il), (this.Il = null));
127
+ Ll() {
128
+ null != this.Nl && (clearTimeout(this.Nl), (this.Nl = null));
129
129
  }
130
130
  initialize() {
131
- (this.Ml = !1), this.Pl();
131
+ (this.Il = !1), this.Rl();
132
132
  }
133
133
  destroy() {
134
134
  this.Al.removeAllSubscriptions(),
135
- this.Go.Vn(),
136
- this.Dl(),
137
- (this.Ml = !0),
138
- this.Fl(null, null, !1),
139
- (this.Il = null);
135
+ this.Ko.Wn(),
136
+ this.Ll(),
137
+ (this.Il = !0),
138
+ this.Dl(null, null, !1),
139
+ (this.Nl = null);
140
140
  }
141
141
  cr(t) {
142
142
  return this.Al.ut(t);
143
143
  }
144
144
  openSession() {
145
- const t = this.j.ha() !== this.j.mo();
145
+ const t = this.j.ca() !== this.j.mo();
146
146
  t && (this.h.ya(o.eu.Jo), this.h.ya(o.eu.su)),
147
- this.Fl(null, !1, null, null, null),
148
- this.Bn(),
147
+ this.Dl(null, !1, null, null, null),
148
+ this.Ln(),
149
149
  t &&
150
150
  import("./Push/push-manager-factory.js").then(t => {
151
- if (this.Ml) return;
151
+ if (this.Il) return;
152
152
  const s = t.default.aa();
153
153
  if (
154
154
  null != s &&
155
155
  (dt.isPushPermissionGranted() || dt.isPushBlocked())
156
156
  ) {
157
157
  const t = () => {
158
- s.Yr()
158
+ s.Gr()
159
159
  ? r.D.info(
160
160
  "Push token maintenance is disabled, not refreshing token for backend."
161
161
  )
@@ -165,7 +165,7 @@ export default class Lt {
165
165
  i && t();
166
166
  },
167
167
  e = () => {
168
- const s = this.h.I(o.q.kn);
168
+ const s = this.h.I(o.q.Pn);
169
169
  (null == s || s) && t();
170
170
  },
171
171
  n = r.xt.Ft;
@@ -177,26 +177,26 @@ export default class Lt {
177
177
  const e = this.v.getUserId();
178
178
  if (e !== t) {
179
179
  this.j.Gh(),
180
- null != e && this.Fl(null, !1, null, null, null),
180
+ null != e && this.Dl(null, !1, null, null, null),
181
181
  this.v.uu(t),
182
- i ? this.Go.setSdkAuthenticationSignature(i) : this.Go.Qn();
182
+ i ? this.Ko.setSdkAuthenticationSignature(i) : this.Ko.Qn();
183
183
  for (let t = 0; t < s.length; t++) s[t].changeUser(null == e);
184
184
  null != e && this.h.Xs(o.q.P),
185
- this.h.Xs(o.q.Xo),
185
+ this.h.Xs(o.q.Yo),
186
186
  this.openSession(),
187
187
  r.D.info('Changed user to "' + t + '".');
188
188
  } else {
189
189
  let s = "Doing nothing.";
190
190
  i &&
191
- this.Go.Kn() !== i &&
192
- (this.Go.setSdkAuthenticationSignature(i),
191
+ this.Ko.Kn() !== i &&
192
+ (this.Ko.setSdkAuthenticationSignature(i),
193
193
  (s = "Updated SDK authentication signature")),
194
194
  r.D.info(`Current user is already ${t}. ${s}`);
195
195
  }
196
196
  }
197
197
  requestImmediateDataFlush(t) {
198
- this.Dl(), this.j.mo();
199
- this.Fl(
198
+ this.Ll(), this.j.mo();
199
+ this.Dl(
200
200
  null,
201
201
  null,
202
202
  null,
@@ -211,15 +211,15 @@ export default class Lt {
211
211
  );
212
212
  }
213
213
  requestFeedRefresh() {
214
- this.j.mo(), this.Fl(!0);
214
+ this.j.mo(), this.Dl(!0);
215
215
  }
216
216
  zr(t, s) {
217
217
  this.j.mo(),
218
218
  r.D.info("Requesting explicit trigger refresh."),
219
- this.Fl(null, !0, null, t, s);
219
+ this.Dl(null, !0, null, t, s);
220
220
  }
221
221
  Nn(t, i) {
222
- const e = r.A.Nl,
222
+ const e = r.A.Ol,
223
223
  n = { a: t, l: i },
224
224
  l = s.G(e, n);
225
225
  return l && r.D.info(`Logged alias ${t} with label ${i}`), l;
@@ -238,7 +238,7 @@ export default class Lt {
238
238
  null != n && (o.altitude = n),
239
239
  null != l && (o.ll_accuracy = l),
240
240
  null != h && (o.alt_accuracy = h);
241
- const u = s.G(r.A.Ol, o, t);
241
+ const u = s.G(r.A.Ul, o, t);
242
242
  return (
243
243
  u &&
244
244
  r.D.info(
@@ -249,20 +249,20 @@ export default class Lt {
249
249
  }
250
250
  kr(t, s) {
251
251
  const i = this.j.mo();
252
- return new ue(this.v.getUserId(), r.A.Ul, t, i, { cid: s });
252
+ return new ue(this.v.getUserId(), r.A.xl, t, i, { cid: s });
253
253
  }
254
- Bn() {
254
+ Ln() {
255
255
  const t = r.xt.Ft;
256
- new r.qt(t, r.D).setItem(t.$t.xl, 1, {
257
- baseUrl: this.zo,
256
+ new r.qt(t, r.D).setItem(t.$t.Kl, 1, {
257
+ baseUrl: this.Bo,
258
258
  data: { api_key: this._r, device_id: this.Ur.te().id },
259
259
  userId: this.v.getUserId(),
260
- sdkAuthEnabled: this.Go.Jn()
260
+ sdkAuthEnabled: this.Ko.Jn()
261
261
  });
262
262
  }
263
263
  wr(t) {
264
264
  for (const s of t)
265
- if (s.api_key === this._r) this.vt.ca(s.events, s.attributes);
265
+ if (s.api_key === this._r) this.vt.la(s.events, s.attributes);
266
266
  else {
267
267
  const t = r.xt.Ft;
268
268
  new r.qt(t, r.D).setItem(t.$t.$r, r.it.nt(), s);
@@ -276,13 +276,13 @@ export default class Lt {
276
276
  let l, h;
277
277
  return (
278
278
  null === e && null === n
279
- ? ((l = r.A.Kl), (h = { key: i }))
280
- : ((l = r.A.Wl), (h = { key: i, latitude: e, longitude: n })),
279
+ ? ((l = r.A.Wl), (h = { key: i }))
280
+ : ((l = r.A.Bl), (h = { key: i, latitude: e, longitude: n })),
281
281
  s.G(l, h)
282
282
  );
283
283
  }
284
284
  $n(t, i) {
285
285
  const e = { group_id: t, status: i };
286
- return s.G(r.A.Bl, e);
286
+ return s.G(r.A.Gl, e);
287
287
  }
288
288
  }
@@ -2,7 +2,7 @@ export default class xt {
2
2
  constructor(t) {
3
3
  this.Jl = t;
4
4
  }
5
- Gl(t) {
5
+ Hl(t) {
6
6
  return null == this.Jl || this.Jl === t[0];
7
7
  }
8
8
  static fromJson(t) {
@@ -1,13 +1,13 @@
1
1
  import kt from "./filter-set.js";
2
2
  export default class Dt {
3
3
  constructor(t, s) {
4
- (this.Jl = t), (this.Hl = s);
4
+ (this.Jl = t), (this.Ql = s);
5
5
  }
6
- Gl(t) {
7
- if (null == this.Jl || null == this.Hl) return !1;
6
+ Hl(t) {
7
+ if (null == this.Jl || null == this.Ql) return !1;
8
8
  const s = t[0],
9
9
  r = t[1];
10
- return s === this.Jl && this.Hl.Gl(r);
10
+ return s === this.Jl && this.Ql.Hl(r);
11
11
  }
12
12
  static fromJson(t) {
13
13
  return new Dt(
@@ -16,6 +16,6 @@ export default class Dt {
16
16
  );
17
17
  }
18
18
  ss() {
19
- return { e: this.Jl, pf: this.Hl.ss() };
19
+ return { e: this.Jl, pf: this.Ql.ss() };
20
20
  }
21
21
  }
@@ -4,13 +4,13 @@ export default class kt {
4
4
  constructor(t) {
5
5
  this.filters = t;
6
6
  }
7
- Gl(t) {
7
+ Hl(t) {
8
8
  let r = !0;
9
9
  for (let e = 0; e < this.filters.length; e++) {
10
10
  const o = this.filters[e];
11
11
  let s = !1;
12
12
  for (let r = 0; r < o.length; r++)
13
- if (o[r].Gl(t)) {
13
+ if (o[r].Hl(t)) {
14
14
  s = !0;
15
15
  break;
16
16
  }
@@ -42,12 +42,12 @@ export default class kt {
42
42
  }
43
43
  return t;
44
44
  }
45
- static Dn(t) {
45
+ static Sn(t) {
46
46
  const r = [];
47
47
  for (let e = 0; e < t.length; e++) {
48
48
  const o = [],
49
49
  s = t[e];
50
- for (let t = 0; t < s.length; t++) o.push(Gt.Dn(s[t]));
50
+ for (let t = 0; t < s.length; t++) o.push(Gt.Sn(s[t]));
51
51
  r.push(o);
52
52
  }
53
53
  return new kt(r);