@braze/web-sdk 4.8.0 → 4.8.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 (72) hide show
  1. package/index.d.ts +6 -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 +11 -11
  6. package/shared-lib/indexed-db-adapter.js +67 -67
  7. package/shared-lib/logger.js +7 -7
  8. package/src/Card/card-manager.js +1 -1
  9. package/src/ContentCards/ui/show-content-cards.js +1 -1
  10. package/src/Core/disable-sdk.js +5 -4
  11. package/src/Core/enable-sdk.js +1 -1
  12. package/src/Core/is-disabled.js +1 -1
  13. package/src/FeatureFlags/feature-flags-provider.js +12 -12
  14. package/src/Feed/ui/show-feed.js +1 -1
  15. package/src/InAppMessage/in-app-message-manager.js +40 -34
  16. package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
  17. package/src/InAppMessage/log-in-app-message-click.js +2 -2
  18. package/src/InAppMessage/log-in-app-message-html-click.js +1 -1
  19. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  20. package/src/InAppMessage/models/in-app-message.js +13 -13
  21. package/src/InAppMessage/models/slide-up-message.js +2 -2
  22. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  23. package/src/InAppMessage/ui/show-in-app-message.js +2 -2
  24. package/src/Push/push-manager.js +82 -81
  25. package/src/Push/utils/push-utils.js +4 -4
  26. package/src/User/user-manager.js +4 -4
  27. package/src/User/user.js +5 -5
  28. package/src/common/feed-display.js +82 -72
  29. package/src/l10n/l10n-manager-factory.js +7 -7
  30. package/src/managers/auth-manager.js +18 -15
  31. package/src/managers/braze-instance.js +125 -109
  32. package/src/managers/device-manager.js +40 -35
  33. package/src/managers/network-manager.js +90 -81
  34. package/src/managers/server-config-manager.js +36 -34
  35. package/src/managers/session-manager.js +44 -37
  36. package/src/managers/storage-manager-factory.js +23 -16
  37. package/src/managers/storage-manager.js +251 -239
  38. package/src/managers/subscription-manager.js +10 -7
  39. package/src/managers/types.js +1 -0
  40. package/src/models/backend-errors.js +5 -5
  41. package/src/models/braze-event.js +10 -4
  42. package/src/models/device.js +10 -18
  43. package/src/models/identifier.js +10 -11
  44. package/src/models/push-token.js +14 -9
  45. package/src/models/request-result.js +2 -2
  46. package/src/models/server-config.js +32 -16
  47. package/src/models/types.js +1 -0
  48. package/src/request-controller.js +109 -109
  49. package/src/triggers/models/custom-event-data.js +6 -6
  50. package/src/triggers/models/custom-event-property-data.js +9 -9
  51. package/src/triggers/models/filter-set.js +9 -9
  52. package/src/triggers/models/filter.js +60 -60
  53. package/src/triggers/models/in-app-message-click-data.js +9 -9
  54. package/src/triggers/models/purchase-data.js +3 -3
  55. package/src/triggers/models/purchase-property-data.js +7 -7
  56. package/src/triggers/models/push-click-data.js +6 -6
  57. package/src/triggers/models/trigger-condition.js +46 -46
  58. package/src/triggers/models/trigger-events.js +1 -1
  59. package/src/triggers/models/trigger.js +27 -27
  60. package/src/triggers/triggers-provider.js +126 -126
  61. package/src/ui/js/attach-css.js +1 -1
  62. package/src/util/base-device-parser.js +2 -2
  63. package/src/util/braze-actions.js +4 -4
  64. package/src/util/browser-detector.js +18 -18
  65. package/src/util/client-hints-parser.js +6 -6
  66. package/src/util/device-constants.js +6 -6
  67. package/src/util/dom-utils.js +5 -5
  68. package/src/util/error-utils.js +2 -0
  69. package/src/util/net.js +1 -1
  70. package/src/util/request-header-utils.js +9 -9
  71. package/src/util/user-agent-parser.js +21 -21
  72. package/src/util/window-utils.js +1 -1
@@ -1,8 +1,8 @@
1
1
  export default {
2
- Da: "invalid_api_key",
3
- Sa: "blacklisted",
4
- va: "no_device_identifier",
5
- Ba: "invalid_json_response",
6
- za: "empty_response",
2
+ ba: "invalid_api_key",
3
+ Aa: "blacklisted",
4
+ za: "no_device_identifier",
5
+ qa: "invalid_json_response",
6
+ ga: "empty_response",
7
7
  __: "sdk_auth_error"
8
8
  };
@@ -6,17 +6,23 @@ import {
6
6
  export default class ue {
7
7
  constructor(t, i, s, r, e) {
8
8
  (this.userId = t),
9
+ (this.type = i),
10
+ (this.time = s),
11
+ (this.sessionId = r),
12
+ (this.data = e),
13
+ (this.userId = t),
9
14
  (this.type = i),
10
15
  (this.time = Jt(s)),
11
16
  (this.sessionId = r),
12
17
  (this.data = e);
13
18
  }
14
- Wi() {
19
+ Xi() {
15
20
  const t = {
16
21
  name: this.type,
17
22
  time: h(this.time),
18
23
  data: this.data || {},
19
- session_id: this.sessionId
24
+ session_id: this.sessionId,
25
+ user_id: void 0
20
26
  };
21
27
  return null != this.userId && (t.user_id = this.userId), t;
22
28
  }
@@ -32,10 +38,10 @@ export default class ue {
32
38
  static fromJson(t) {
33
39
  return new ue(t.user_id, t.name, t.time, t.session_id, t.data);
34
40
  }
35
- static Za(t) {
41
+ static Qa(t) {
36
42
  return null != t && Ct(t) && null != t.t && "" !== t.t;
37
43
  }
38
- static Tn(t) {
44
+ static zn(t) {
39
45
  return new ue(t.u, t.t, t.ts, t.s, t.d);
40
46
  }
41
47
  }
@@ -1,25 +1,17 @@
1
- import DeviceProperties from "../Core/device-properties.js";
2
- export default class ge {
1
+ export default class xt {
3
2
  constructor(s) {
4
- this.id = s;
3
+ (this.id = s), (this.id = s);
5
4
  }
6
- Wi() {
5
+ Xi() {
7
6
  const s = {};
8
7
  return (
9
- null != this[DeviceProperties.BROWSER] &&
10
- (s.browser = this[DeviceProperties.BROWSER]),
11
- null != this[DeviceProperties.BROWSER_VERSION] &&
12
- (s.browser_version = this[DeviceProperties.BROWSER_VERSION]),
13
- null != this[DeviceProperties.OS] &&
14
- (s.os_version = this[DeviceProperties.OS]),
15
- null != this[DeviceProperties.RESOLUTION] &&
16
- (s.resolution = this[DeviceProperties.RESOLUTION]),
17
- null != this[DeviceProperties.LANGUAGE] &&
18
- (s.locale = this[DeviceProperties.LANGUAGE]),
19
- null != this[DeviceProperties.TIME_ZONE] &&
20
- (s.time_zone = this[DeviceProperties.TIME_ZONE]),
21
- null != this[DeviceProperties.USER_AGENT] &&
22
- (s.user_agent = this[DeviceProperties.USER_AGENT]),
8
+ null != this.browser && (s.browser = this.browser),
9
+ null != this.Yo && (s.browser_version = this.Yo),
10
+ null != this.os && (s.os_version = this.os),
11
+ null != this.resolution && (s.resolution = this.resolution),
12
+ null != this.language && (s.locale = this.language),
13
+ null != this.timeZone && (s.time_zone = this.timeZone),
14
+ null != this.userAgent && (s.user_agent = this.userAgent),
23
15
  s
24
16
  );
25
17
  }
@@ -1,20 +1,19 @@
1
1
  import r from "../../shared-lib/braze-shared-lib.js";
2
2
  export default class _t {
3
- constructor(t, e, s) {
4
- null == t && (t = r.Z.Y()),
5
- (s = parseInt(s)),
6
- (isNaN(s) || 0 === s) && (s = new Date().valueOf()),
3
+ constructor(t, i, s) {
4
+ (this.iu = t),
5
+ null == t && (t = r.Z.Y()),
6
+ !s || isNaN(s) ? (this.vl = new Date().valueOf()) : (this.vl = s),
7
7
  (this.iu = t),
8
- (this.Hh = s),
9
- (this.Jh = new Date().valueOf()),
10
- (this.Bh = e);
8
+ (this.Nl = new Date().valueOf()),
9
+ (this.Gl = i);
11
10
  }
12
11
  ss() {
13
- return { g: this.iu, e: this.Bh, c: this.Hh, l: this.Jh };
12
+ return { g: this.iu, e: this.Gl, c: this.vl, l: this.Nl };
14
13
  }
15
- static Tn(t) {
14
+ static zn(t) {
16
15
  if (null == t || null == t.g) return null;
17
- const e = new _t(t.g, t.e, t.c);
18
- return (e.Jh = t.l), e;
16
+ const i = new _t(t.g, t.e, t.c);
17
+ return (i.Nl = t.l), i;
19
18
  }
20
19
  }
@@ -1,22 +1,27 @@
1
1
  import { rehydrateDateAfterJsonization as w } from "../util/date-utils.js";
2
2
  export default class ti {
3
- constructor(t, i, l, s, u) {
4
- (this.endpoint = t || null),
5
- (this.Nn = i || null),
6
- (this.publicKey = l || null),
7
- (this.zl = s || null),
8
- (this.al = u || null);
3
+ constructor(t, i, s, l, h) {
4
+ (this.endpoint = t),
5
+ (this.Tn = i),
6
+ (this.publicKey = s),
7
+ (this.Vl = l),
8
+ (this.al = h),
9
+ (this.endpoint = t || null),
10
+ (this.Tn = i || null),
11
+ (this.publicKey = s || null),
12
+ (this.Vl = l || null),
13
+ (this.al = h || null);
9
14
  }
10
15
  ss() {
11
16
  return {
12
17
  e: this.endpoint,
13
- c: this.Nn,
18
+ c: this.Tn,
14
19
  p: this.publicKey,
15
- u: this.zl,
20
+ u: this.Vl,
16
21
  v: this.al
17
22
  };
18
23
  }
19
- static Tn(t) {
24
+ static zn(t) {
20
25
  return new ti(t.e, w(t.c), t.p, t.u, t.v);
21
26
  }
22
27
  }
@@ -1,6 +1,6 @@
1
1
  export default class t {
2
- constructor(t, s) {
3
- (this.O = !!t), (this.ve = s || []);
2
+ constructor(t = !1, s = []) {
3
+ (this.O = t), (this.ve = s), (this.O = t), (this.ve = s);
4
4
  }
5
5
  S(t) {
6
6
  (this.O = this.O && t.O), this.ve.push(...t.ve);
@@ -1,32 +1,48 @@
1
1
  export default class Kt {
2
- constructor(t, s, i, h, l, e, r, u) {
3
- (this.hl = t || 0),
4
- (this.cl = s || []),
5
- (this.gl = i || []),
6
- (this.fl = h || []),
7
- (this.bl = l),
8
- (null != l && "" !== l) || (this.bl = null),
9
- (this.al = e || null),
10
- (this.ul = r || {}),
11
- (this.mi = u || {});
2
+ constructor(
3
+ t = 0,
4
+ i = [],
5
+ s = [],
6
+ h = [],
7
+ e = null,
8
+ l = null,
9
+ r = { enabled: !1 },
10
+ a = { enabled: !1, refresh_rate_limit: -1 }
11
+ ) {
12
+ (this.ol = t),
13
+ (this.cl = i),
14
+ (this.gl = s),
15
+ (this.fl = h),
16
+ (this.bl = e),
17
+ (this.al = l),
18
+ (this.ml = r),
19
+ (this.mi = a),
20
+ (this.ol = t),
21
+ (this.cl = i),
22
+ (this.gl = s),
23
+ (this.fl = h),
24
+ (this.bl = e),
25
+ (this.al = l),
26
+ (this.ml = r),
27
+ (this.mi = a);
12
28
  }
13
29
  ss() {
14
30
  return {
15
- s: "4.8.0",
16
- l: this.hl,
31
+ s: "4.8.1",
32
+ l: this.ol,
17
33
  e: this.cl,
18
34
  a: this.gl,
19
35
  p: this.fl,
20
36
  m: this.bl,
21
37
  v: this.al,
22
- c: this.ul,
38
+ c: this.ml,
23
39
  f: this.mi
24
40
  };
25
41
  }
26
- static Tn(t) {
27
- let s = t.l;
42
+ static zn(t) {
43
+ let i = t.l;
28
44
  return (
29
- "4.8.0" !== t.s && (s = 0), new Kt(s, t.e, t.a, t.p, t.m, t.v, t.c, t.f)
45
+ "4.8.1" !== t.s && (i = 0), new Kt(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f)
30
46
  );
31
47
  }
32
48
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -10,154 +10,154 @@ import yt from "./Push/utils/push-utils.js";
10
10
  import T from "./util/request-header-utils.js";
11
11
  export default class Rt {
12
12
  constructor(t, s, i, e, n, l, h, o, r, u) {
13
- (this.Ko = t),
14
- (this.Ho = s),
15
- (this.wl = 0),
16
- (this.kl = h.eE()),
17
- (this.yl = null),
18
- (this.fh = i),
19
- (this.Xo = e),
20
- (this.Qo = n),
21
- (this.Zo = l),
22
- (this.Jn = h),
23
- (this.gh = r),
24
- (this.wh = u),
25
- (this.vl = o),
26
- (this.jl = new E()),
27
- (this.Sl = 50);
13
+ (this.$l = t),
14
+ (this.Fl = s),
15
+ (this.Ll = 0),
16
+ (this.Pl = h.Wa()),
17
+ (this.Jl = null),
18
+ (this.Bl = i),
19
+ (this.Ql = e),
20
+ (this.Xl = n),
21
+ (this.Zl = l),
22
+ (this.yh = h),
23
+ (this.$h = r),
24
+ (this.qh = u),
25
+ (this.Ph = o),
26
+ (this.Jh = new E()),
27
+ (this.Kh = 50);
28
28
  }
29
- $l(t, s) {
30
- return !t && !s && this.gh.Fu() >= this.Sl;
29
+ Wh(t, s) {
30
+ return !t && !s && this.$h.xh() >= this.Kh;
31
31
  }
32
- ql(t) {
33
- let s = this.fh.kh();
32
+ Bh(t) {
33
+ let s = this.Bl.El();
34
34
  if (t.length > 0) {
35
- const i = this.Qo.getUserId();
35
+ const i = this.Xl.getUserId();
36
36
  for (const e of t) {
37
37
  const t = (!e.userId && !i) || e.userId === i;
38
- e.type === r.q.Vh && t && (s = !0);
38
+ e.type === r.q.Wl && t && (s = !0);
39
39
  }
40
40
  }
41
41
  return s;
42
42
  }
43
- Al(t, s, e, n, l, h, o) {
44
- null == e && (e = !0), e && this.Cl();
45
- const u = this.Jn.Wa(),
46
- a = this.Jn.tE();
43
+ Gh(t, s, e, n, l, h, o) {
44
+ null == e && (e = !0), e && this.Hh();
45
+ const u = this.yh.Ja(),
46
+ a = this.yh.Ha();
47
47
  let c = !1;
48
48
  const m = (t, s) => {
49
49
  let o = !1;
50
- T.Xs(this.Jn, T.Qs.Xa, new Date().valueOf()),
50
+ T.Xs(this.yh, T.Qs.Sa, new Date().valueOf()),
51
51
  C.Ys({
52
- url: this.Ho + "/data/",
52
+ url: this.Fl + "/data/",
53
53
  data: t,
54
54
  headers: s,
55
55
  O: e => {
56
56
  null != t.respond_with &&
57
57
  t.respond_with.triggers &&
58
- (this.wl = Math.max(this.wl - 1, 0)),
59
- this.wh.ti(t, e, s)
60
- ? (this.gh.si(),
61
- this.Zo.ol(e),
58
+ (this.Ll = Math.max(this.Ll - 1, 0)),
59
+ this.qh.ti(t, e, s)
60
+ ? (this.$h.si(),
61
+ this.Zl.ul(e),
62
62
  (null != t.respond_with &&
63
- t.respond_with.user_id != this.Qo.getUserId()) ||
64
- (null != t.device && this.Jn.D(i.k.ma, t.device),
63
+ t.respond_with.user_id != this.Xl.getUserId()) ||
64
+ (null != t.device && this.yh.D(i.k.la, t.device),
65
65
  null != t.sdk_metadata &&
66
- (this.Jn.D(i.k.ga, t.sdk_metadata),
67
- this.Jn.D(i.k.qa, this.fh.ba())),
68
- this.vl(e),
66
+ (this.yh.D(i.k.ua, t.sdk_metadata),
67
+ this.yh.D(i.k.ma, this.Bl.pa())),
68
+ this.Ph(e),
69
69
  "function" == typeof n && n()))
70
70
  : e.auth_error && (o = !0);
71
71
  },
72
72
  error: () => {
73
73
  null != t.respond_with &&
74
74
  t.respond_with.triggers &&
75
- (this.wl = Math.max(this.wl - 1, 0)),
76
- this.wh.Aa(t.events, t.attributes),
75
+ (this.Ll = Math.max(this.Ll - 1, 0)),
76
+ this.qh.Ra(t.events, t.attributes),
77
77
  "function" == typeof l && l();
78
78
  },
79
79
  ei: t => {
80
80
  if (("function" == typeof h && h(t), e && !c)) {
81
- if (t && !o) this.Tl();
81
+ if (t && !o) this.Qh();
82
82
  else {
83
- let t = this.yl;
84
- (null == t || t < 1e3 * this.kl) && (t = 1e3 * this.kl),
85
- this.Tl(Math.min(3e5, D(1e3 * this.kl, 3 * t)));
83
+ let t = this.Jl;
84
+ (null == t || t < 1e3 * this.Pl) && (t = 1e3 * this.Pl),
85
+ this.Qh(Math.min(3e5, D(1e3 * this.Pl, 3 * t)));
86
86
  }
87
87
  c = !0;
88
88
  }
89
89
  }
90
90
  });
91
91
  },
92
- d = this.ql(u),
92
+ d = this.Bh(u),
93
93
  f = s || d;
94
- if (this.$l(o, d))
94
+ if (this.Wh(o, d))
95
95
  return void r.j.info(
96
96
  "Declining to flush data due to 50 consecutive authentication failures"
97
97
  );
98
- if (e && !this.wh.ka(u, a, t, f))
99
- return this.Tl(), void ("function" == typeof h && h(!0));
100
- const g = this.wh.Ta(t, f, u, a);
101
- f && this.wl++;
98
+ if (e && !this.qh.Ba(u, a, t, f))
99
+ return this.Qh(), void ("function" == typeof h && h(!0));
100
+ const g = this.qh.Da(t, f, u, a);
101
+ f && this.Ll++;
102
102
  let p = !1;
103
103
  if (g)
104
104
  for (const t of g)
105
- this.wh.Vs(t.requestData, () => m(t.requestData, t.headers)), (p = !0);
106
- this.gh.Zn() && e && !p
107
- ? this.Tl()
108
- : d && (r.j.info("Invoking new session subscriptions"), this.jl.Et());
105
+ this.qh.Vs(t.requestData, () => m(t.requestData, t.headers)), (p = !0);
106
+ this.$h.Zn() && e && !p
107
+ ? this.Qh()
108
+ : d && (r.j.info("Invoking new session subscriptions"), this.Jh.Et());
109
109
  }
110
- _l() {
111
- return this.wl > 0;
110
+ Vh() {
111
+ return this.Ll > 0;
112
112
  }
113
- Tl(t) {
114
- this.Dl ||
115
- (null == t && (t = 1e3 * this.kl),
116
- this.Cl(),
117
- (this.Fl = setTimeout(() => {
113
+ Qh(t) {
114
+ this.Xh ||
115
+ (null == t && (t = 1e3 * this.Pl),
116
+ this.Hh(),
117
+ (this.Yh = setTimeout(() => {
118
118
  if (document.hidden) {
119
119
  const t = "visibilitychange",
120
120
  s = () => {
121
121
  document.hidden ||
122
- (document.removeEventListener(t, s, !1), this.Al());
122
+ (document.removeEventListener(t, s, !1), this.Gh());
123
123
  };
124
124
  document.addEventListener(t, s, !1);
125
- } else this.Al();
125
+ } else this.Gh();
126
126
  }, t)),
127
- (this.yl = t));
127
+ (this.Jl = t));
128
128
  }
129
- Cl() {
130
- null != this.Fl && (clearTimeout(this.Fl), (this.Fl = null));
129
+ Hh() {
130
+ null != this.Yh && (clearTimeout(this.Yh), (this.Yh = null));
131
131
  }
132
132
  initialize() {
133
- (this.Dl = !1), this.Tl();
133
+ (this.Xh = !1), this.Qh();
134
134
  }
135
135
  destroy() {
136
- this.jl.removeAllSubscriptions(),
137
- this.gh.Au(),
138
- this.Cl(),
139
- (this.Dl = !0),
140
- this.Al(null, null, !1),
141
- (this.Fl = null);
136
+ this.Jh.removeAllSubscriptions(),
137
+ this.$h.jh(),
138
+ this.Hh(),
139
+ (this.Xh = !0),
140
+ this.Gh(null, null, !1),
141
+ (this.Yh = null);
142
142
  }
143
143
  pr(t) {
144
- return this.jl.lt(t);
144
+ return this.Jh.lt(t);
145
145
  }
146
146
  openSession() {
147
- const t = this.fh.ba() !== this.fh.bo();
148
- t && (this.Jn.Ha(i.eu.oa), this.Jn.Ha(i.eu.su)),
149
- this.Al(null, !1, null, null, null),
150
- this.zn(),
147
+ const t = this.Bl.pa() !== this.Bl.bo();
148
+ t && (this.yh.Pa(i.eu.Xo), this.yh.Pa(i.eu.su)),
149
+ this.Gh(null, !1, null, null, null),
150
+ this.Hn(),
151
151
  t &&
152
152
  import("./Push/push-manager-factory.js").then(t => {
153
- if (this.Dl) return;
153
+ if (this.Xh) return;
154
154
  const s = t.default.m();
155
155
  if (
156
156
  null != s &&
157
157
  (yt.isPushPermissionGranted() || yt.isPushBlocked())
158
158
  ) {
159
159
  const t = () => {
160
- s.ln()
160
+ s.dn()
161
161
  ? r.j.info(
162
162
  "Push token maintenance is disabled, not refreshing token for backend."
163
163
  )
@@ -167,7 +167,7 @@ export default class Rt {
167
167
  i && t();
168
168
  },
169
169
  n = () => {
170
- const s = this.Jn.v(i.k.xn);
170
+ const s = this.yh.v(i.k.Nn);
171
171
  (null == s || s) && t();
172
172
  },
173
173
  l = r.zt.Ft;
@@ -176,29 +176,29 @@ export default class Rt {
176
176
  });
177
177
  }
178
178
  changeUser(t, s, e) {
179
- const n = this.Qo.getUserId();
179
+ const n = this.Xl.getUserId();
180
180
  if (n !== t) {
181
- this.fh.Xh(),
182
- null != n && this.Al(null, !1, null, null, null),
183
- this.Qo.ru(t),
184
- e ? this.gh.setSdkAuthenticationSignature(e) : this.gh.du();
181
+ this.Bl.kl(),
182
+ null != n && this.Gh(null, !1, null, null, null),
183
+ this.Xl.ru(t),
184
+ e ? this.$h.setSdkAuthenticationSignature(e) : this.$h.fh();
185
185
  for (let t = 0; t < s.length; t++) s[t].changeUser(null == n);
186
- null != n && this.Jn.ri(i.k.L),
187
- this.Jn.ri(i.k.ma),
186
+ null != n && this.yh.ri(i.k.L),
187
+ this.yh.ri(i.k.la),
188
188
  this.openSession(),
189
189
  r.j.info('Changed user to "' + t + '".');
190
190
  } else {
191
191
  let s = "Doing nothing.";
192
192
  e &&
193
- this.gh.au() !== e &&
194
- (this.gh.setSdkAuthenticationSignature(e),
193
+ this.$h.gh() !== e &&
194
+ (this.$h.setSdkAuthenticationSignature(e),
195
195
  (s = "Updated SDK authentication signature")),
196
196
  r.j.info(`Current user is already ${t}. ${s}`);
197
197
  }
198
198
  }
199
199
  requestImmediateDataFlush(t) {
200
- this.Cl(), this.fh.bo();
201
- this.Al(
200
+ this.Hh(), this.Bl.bo();
201
+ this.Gh(
202
202
  null,
203
203
  null,
204
204
  null,
@@ -213,21 +213,21 @@ export default class Rt {
213
213
  );
214
214
  }
215
215
  requestFeedRefresh() {
216
- this.fh.bo(), this.Al(!0);
216
+ this.Bl.bo(), this.Gh(!0);
217
217
  }
218
218
  $r(t, s) {
219
- this.fh.bo(),
219
+ this.Bl.bo(),
220
220
  r.j.info("Requesting explicit trigger refresh."),
221
- this.Al(null, !0, null, t, s);
221
+ this.Gh(null, !0, null, t, s);
222
222
  }
223
223
  Cn(t, i) {
224
- const e = r.q.Ll,
224
+ const e = r.q.Zh,
225
225
  n = { a: t, l: i },
226
226
  l = s.N(e, n);
227
227
  return l && r.j.info(`Logged alias ${t} with label ${i}`), l;
228
228
  }
229
229
  En(i, e, n) {
230
- if (this.Zo.hu(e))
230
+ if (this.Zl.hu(e))
231
231
  return (
232
232
  r.j.info(`Custom Attribute "${e}" is blocklisted, ignoring.`), new t()
233
233
  );
@@ -244,7 +244,7 @@ export default class Rt {
244
244
  null != n && (o.altitude = n),
245
245
  null != l && (o.ll_accuracy = l),
246
246
  null != h && (o.alt_accuracy = h);
247
- const u = s.N(r.q.Pl, o, t);
247
+ const u = s.N(r.q.au, o, t);
248
248
  return (
249
249
  u &&
250
250
  r.j.info(
@@ -254,41 +254,41 @@ export default class Rt {
254
254
  );
255
255
  }
256
256
  vr(t, s) {
257
- const i = this.fh.bo();
258
- return new ue(this.Qo.getUserId(), r.q.Rl, t, i, { cid: s });
257
+ const i = this.Bl.bo();
258
+ return new ue(this.Xl.getUserId(), r.q.du, t, i, { cid: s });
259
259
  }
260
- zn() {
260
+ Hn() {
261
261
  const t = r.zt.Ft;
262
- new r.xt(t, r.j).setItem(t.Jt.Xa, 1, {
263
- baseUrl: this.Ho,
264
- data: { api_key: this.Ko, device_id: this.Xo.te().id },
265
- userId: this.Qo.getUserId(),
266
- sdkAuthEnabled: this.gh.Zn()
262
+ new r.xt(t, r.j).setItem(t.Jt.Sa, 1, {
263
+ baseUrl: this.Fl,
264
+ data: { api_key: this.$l, device_id: this.Ql.te().id },
265
+ userId: this.Xl.getUserId(),
266
+ sdkAuthEnabled: this.$h.Zn()
267
267
  });
268
268
  }
269
269
  Fr(t) {
270
270
  for (const s of t)
271
- if (s.api_key === this.Ko) this.wh.Aa(s.events, s.attributes);
271
+ if (s.api_key === this.$l) this.qh.Ra(s.events, s.attributes);
272
272
  else {
273
273
  const t = r.zt.Ft;
274
274
  new r.xt(t, r.j).setItem(t.Jt.yr, r.Z.Y(), s);
275
275
  }
276
276
  }
277
277
  On(i, e, n) {
278
- if (this.Zo.hu(i))
278
+ if (this.Zl.hu(i))
279
279
  return (
280
280
  r.j.info(`Custom Attribute "${i}" is blocklisted, ignoring.`), new t()
281
281
  );
282
282
  let l, h;
283
283
  return (
284
284
  null === e && null === n
285
- ? ((l = r.q.Ml), (h = { key: i }))
286
- : ((l = r.q.Nl), (h = { key: i, latitude: e, longitude: n })),
285
+ ? ((l = r.q.fu), (h = { key: i }))
286
+ : ((l = r.q.gu), (h = { key: i, latitude: e, longitude: n })),
287
287
  s.N(l, h)
288
288
  );
289
289
  }
290
290
  Gn(t, i) {
291
291
  const e = { group_id: t, status: i };
292
- return s.N(r.q.Ol, e);
292
+ return s.N(r.q.pu, e);
293
293
  }
294
294
  }
@@ -1,14 +1,14 @@
1
- export default class Gt {
1
+ export default class Qt {
2
2
  constructor(t) {
3
- this.xl = t;
3
+ this.wu = t;
4
4
  }
5
- Bl(t) {
6
- return null == this.xl || this.xl === t[0];
5
+ xu(t) {
6
+ return null == this.wu || this.wu === t[0];
7
7
  }
8
8
  static fromJson(t) {
9
- return new Gt(t ? t.event_name : null);
9
+ return new Qt(t ? t.event_name : null);
10
10
  }
11
11
  ss() {
12
- return this.xl;
12
+ return this.wu;
13
13
  }
14
14
  }
@@ -1,21 +1,21 @@
1
- import Qt from "./filter-set.js";
2
- export default class Yt {
1
+ import Yt from "./filter-set.js";
2
+ export default class Zt {
3
3
  constructor(t, s) {
4
- (this.xl = t), (this.Jl = s);
4
+ (this.wu = t), (this.ju = s);
5
5
  }
6
- Bl(t) {
7
- if (null == this.xl || null == this.Jl) return !1;
6
+ xu(t) {
7
+ if (null == this.wu || null == this.ju) return !1;
8
8
  const s = t[0],
9
9
  r = t[1];
10
- return s === this.xl && this.Jl.Bl(r);
10
+ return s === this.wu && this.ju.xu(r);
11
11
  }
12
12
  static fromJson(t) {
13
- return new Yt(
13
+ return new Zt(
14
14
  t ? t.event_name : null,
15
- t ? Qt.fromJson(t.property_filters) : null
15
+ t ? Yt.fromJson(t.property_filters) : null
16
16
  );
17
17
  }
18
18
  ss() {
19
- return { e: this.xl, pf: this.Jl.ss() };
19
+ return { e: this.wu, pf: this.ju.ss() };
20
20
  }
21
21
  }