@braze/web-sdk 6.8.0 → 6.9.0

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 (137) hide show
  1. package/index.d.ts +99 -19
  2. package/package.json +1 -1
  3. package/shared-lib/event-types.js +20 -20
  4. package/shared-lib/indexed-db-adapter.js +64 -64
  5. package/shared-lib/logger.js +18 -18
  6. package/shared-lib/supported-options.js +8 -8
  7. package/src/Banner/banner-provider.js +67 -59
  8. package/src/Banner/banner.js +40 -19
  9. package/src/Banner/dismiss-banner.js +4 -0
  10. package/src/Banner/display/banner-to-html.js +10 -10
  11. package/src/Banner/display/destroy-banner-html.js +2 -2
  12. package/src/Banner/get-all-banners.js +6 -6
  13. package/src/Banner/get-banner.js +6 -6
  14. package/src/Banner/index.js +1 -0
  15. package/src/Banner/log-banner-click.js +7 -7
  16. package/src/Banner/log-banner-dismissal.js +7 -7
  17. package/src/Banner/log-banner-impressions.js +10 -10
  18. package/src/Banner/request-banners-refresh.js +8 -8
  19. package/src/Banner/subscribe-to-banners-updates.js +5 -5
  20. package/src/Banner/ui/insert-banner.js +8 -8
  21. package/src/Card/card-manager.js +31 -31
  22. package/src/Card/log-card-dismissal.js +2 -2
  23. package/src/Card/log-content-card-click.js +2 -2
  24. package/src/Card/log-content-card-impressions.js +4 -4
  25. package/src/Card/models/captioned-image.js +15 -15
  26. package/src/Card/models/card.js +89 -89
  27. package/src/Card/models/classic-card.js +16 -16
  28. package/src/Card/models/control-card.js +7 -7
  29. package/src/Card/models/image-only.js +13 -13
  30. package/src/Card/util/card-factory.js +32 -32
  31. package/src/ContentCards/content-cards-provider.js +102 -102
  32. package/src/ContentCards/get-cached-content-cards.js +1 -1
  33. package/src/ContentCards/subscribe-to-content-cards-updates.js +3 -3
  34. package/src/ContentCards/ui/show-content-cards.js +5 -5
  35. package/src/Core/add-sdk-metadata.js +2 -2
  36. package/src/Core/change-user.js +3 -3
  37. package/src/Core/destroy.js +2 -2
  38. package/src/Core/disable-sdk.js +4 -4
  39. package/src/Core/enable-sdk.js +4 -4
  40. package/src/Core/get-device-id.js +2 -2
  41. package/src/Core/handle-braze-action.js +5 -5
  42. package/src/Core/log-custom-event.js +5 -5
  43. package/src/Core/log-ecommerce-event.js +5 -5
  44. package/src/Core/log-purchase.js +9 -9
  45. package/src/Core/open-session.js +7 -7
  46. package/src/Core/set-logger.js +2 -2
  47. package/src/Core/toggle-logging.js +2 -2
  48. package/src/Core/wipe-data.js +6 -6
  49. package/src/DUST/dust-provider.js +249 -240
  50. package/src/DUST/dust-shared-worker-code.js +1 -1
  51. package/src/DUST/dust-shared-worker-impl.js +15 -14
  52. package/src/DUST/dust-worker-bridge.js +50 -35
  53. package/src/DUST/subscribe-to-dust.js +7 -7
  54. package/src/FeatureFlags/feature-flag-factory.js +8 -8
  55. package/src/FeatureFlags/feature-flag.js +3 -3
  56. package/src/FeatureFlags/feature-flags-provider.js +21 -21
  57. package/src/FeatureFlags/log-feature-flag-impression.js +5 -5
  58. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +1 -1
  59. package/src/InAppMessage/constants.js +3 -3
  60. package/src/InAppMessage/defer-in-app-message.js +4 -4
  61. package/src/InAppMessage/display/html-message-to-html.js +4 -4
  62. package/src/InAppMessage/display/in-app-message-to-html.js +16 -16
  63. package/src/InAppMessage/in-app-message-factory.js +36 -36
  64. package/src/InAppMessage/in-app-message-manager.js +78 -78
  65. package/src/InAppMessage/log-in-app-message-button-click.js +4 -4
  66. package/src/InAppMessage/log-in-app-message-click.js +3 -3
  67. package/src/InAppMessage/log-in-app-message-html-click.js +5 -5
  68. package/src/InAppMessage/log-in-app-message-impression.js +4 -4
  69. package/src/InAppMessage/models/control-message.js +4 -4
  70. package/src/InAppMessage/models/full-screen-message.js +4 -4
  71. package/src/InAppMessage/models/html-message.js +3 -3
  72. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  73. package/src/InAppMessage/models/in-app-message.js +12 -12
  74. package/src/InAppMessage/models/modal-message.js +4 -4
  75. package/src/InAppMessage/models/slide-up-message.js +4 -4
  76. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  77. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  78. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  79. package/src/InAppMessage/ui/show-in-app-message.js +14 -14
  80. package/src/Push/push-manager-factory.js +2 -2
  81. package/src/Push/push-manager.js +38 -38
  82. package/src/Push/utils/push-utils.js +6 -6
  83. package/src/User/user-manager.js +14 -14
  84. package/src/User/user.js +25 -25
  85. package/src/common/base-provider.js +1 -1
  86. package/src/common/content-cards-display.js +7 -7
  87. package/src/common/event-logger.js +3 -3
  88. package/src/common/properties-base.js +3 -3
  89. package/src/l10n/l10n-manager-factory.js +1 -1
  90. package/src/l10n/l10n-manager.js +3 -3
  91. package/src/managers/auth-manager.js +11 -11
  92. package/src/managers/braze-instance.js +56 -56
  93. package/src/managers/device-manager.js +10 -10
  94. package/src/managers/network-manager.js +102 -101
  95. package/src/managers/server-config-manager.js +115 -98
  96. package/src/managers/session-manager.js +20 -20
  97. package/src/managers/storage-manager-factory.js +9 -9
  98. package/src/managers/storage-manager.js +74 -74
  99. package/src/managers/subscription-manager.js +2 -2
  100. package/src/managers/utils.js +1 -1
  101. package/src/models/backend-errors.js +5 -5
  102. package/src/models/braze-event.js +1 -1
  103. package/src/models/device.js +1 -1
  104. package/src/models/identifier.js +2 -2
  105. package/src/models/push-token.js +6 -6
  106. package/src/models/request-result.js +1 -1
  107. package/src/models/server-config.js +42 -24
  108. package/src/request-controller.js +126 -126
  109. package/src/triggers/models/custom-event-data.js +4 -4
  110. package/src/triggers/models/custom-event-property-data.js +5 -5
  111. package/src/triggers/models/filter-set.js +2 -2
  112. package/src/triggers/models/filter.js +1 -1
  113. package/src/triggers/models/in-app-message-click-data.js +1 -1
  114. package/src/triggers/models/purchase-data.js +1 -1
  115. package/src/triggers/models/purchase-property-data.js +2 -2
  116. package/src/triggers/models/push-click-data.js +1 -1
  117. package/src/triggers/models/trigger-condition.js +33 -33
  118. package/src/triggers/models/trigger-events.js +1 -1
  119. package/src/triggers/models/trigger.js +33 -33
  120. package/src/triggers/triggers-provider-factory.js +1 -1
  121. package/src/triggers/triggers-provider.js +68 -68
  122. package/src/types.js +2 -2
  123. package/src/ui/js/attach-css.js +1 -1
  124. package/src/util/braze-actions.js +7 -7
  125. package/src/util/browser-detector.js +2 -2
  126. package/src/util/client-hints-parser.js +4 -4
  127. package/src/util/code-utils.js +2 -2
  128. package/src/util/deprecation-utils.js +2 -2
  129. package/src/util/dom-utils.js +7 -7
  130. package/src/util/ecommerce-event-validation.js +52 -35
  131. package/src/util/html-display-utils.js +11 -11
  132. package/src/util/net.js +4 -4
  133. package/src/util/request-header-utils.js +17 -17
  134. package/src/util/string-utils.js +2 -2
  135. package/src/util/user-agent-parser.js +2 -2
  136. package/src/util/validation-utils.js +12 -12
  137. package/src/util/window-utils.js +2 -2
@@ -2,7 +2,7 @@ import {
2
2
  EventTypes as p,
3
3
  Guid as V,
4
4
  IndexedDBAdapter as et,
5
- logger as E,
5
+ logger as b,
6
6
  } from "../shared-lib/index.js";
7
7
  import v from "./common/event-logger.js";
8
8
  import { removeAllVisibleInAppMessages as gi } from "./InAppMessage/ui/remove-all-visible-in-app-messages.js";
@@ -18,38 +18,38 @@ export default class Kt {
18
18
  constructor(t, i, s, e, h, n, o, r, l, u) {
19
19
  (this.tu = t),
20
20
  (this.baseUrl = i),
21
- (this.j = s),
21
+ (this.C = s),
22
22
  (this.eu = e),
23
23
  (this.Ss = h),
24
24
  (this.h = n),
25
- (this.C = o),
26
- (this.kc = r),
25
+ (this.j = o),
26
+ (this.hc = r),
27
27
  (this.Gh = l),
28
28
  (this.B = u),
29
29
  (this.tu = t),
30
30
  (this.baseUrl = i),
31
- (this.yc = 0),
31
+ (this.nc = 0),
32
32
  (this.IS = o.dS() || 0),
33
- (this.jc = null),
34
- (this.j = s),
33
+ (this.lc = null),
34
+ (this.C = s),
35
35
  (this.eu = e),
36
36
  (this.Ss = h),
37
37
  (this.h = n),
38
- (this.C = o),
38
+ (this.j = o),
39
39
  (this.Gh = l),
40
40
  (this.B = u),
41
- (this.kc = r),
42
- (this.Ac = new f()),
43
- (this.Dc = null),
44
- (this.$c = 50),
45
- (this.qc = !1),
46
- (this.Cc = !1);
41
+ (this.hc = r),
42
+ (this.uc = new f()),
43
+ (this.cc = null),
44
+ (this.dc = 50),
45
+ (this.mc = !1),
46
+ (this.fc = !1);
47
47
  }
48
- Mc(t, i) {
49
- return !t && !i && this.Gh.Ih() >= this.$c;
48
+ gc(t, i) {
49
+ return !t && !i && this.Gh.Ih() >= this.dc;
50
50
  }
51
- Tc(t) {
52
- let i = this.j.am();
51
+ vc(t) {
52
+ let i = this.C.am();
53
53
  if (t.length > 0) {
54
54
  const s = this.Ss.getUserId();
55
55
  for (const e of t) {
@@ -59,14 +59,14 @@ export default class Kt {
59
59
  }
60
60
  return i;
61
61
  }
62
- Lc(t = !1, i = !0, e, n, o, r = !1, u = !1) {
63
- i && this.Fc();
64
- const c = this.C.hS(),
65
- d = this.C.RS();
62
+ bc(t = !1, i = !0, e, n, o, r = !1, u = !1) {
63
+ i && this.wc();
64
+ const c = this.j.hS(),
65
+ d = this.j.RS();
66
66
  let m = !1;
67
67
  const f = (t, r, u = -1) => {
68
68
  const c = new Date().valueOf();
69
- h.nt(this.C, h.it.wn, c),
69
+ h.nt(this.j, h.it.pn, c),
70
70
  -1 !== u && r.push(["X-Braze-Req-Tokens-Remaining", u.toString()]);
71
71
  let d = !1;
72
72
  l.ot({
@@ -76,18 +76,18 @@ export default class Kt {
76
76
  lt: (i) => {
77
77
  null != t.respond_with &&
78
78
  t.respond_with.triggers &&
79
- (this.yc = Math.max(this.yc - 1, 0)),
79
+ (this.nc = Math.max(this.nc - 1, 0)),
80
80
  this.B.ut(t, i, r)
81
81
  ? (this.Gh.ct(),
82
- this.h.rc(i),
82
+ this.h.ld(i),
83
83
  (null != t.respond_with &&
84
84
  t.respond_with.user_id != this.Ss.getUserId()) ||
85
- (null != t.device && this.C.It(s.Tt.Ka, t.device),
85
+ (null != t.device && this.j.Pt(s.It.Ba, t.device),
86
86
  null != t.sdk_metadata &&
87
- (this.C.It(s.Tt.Ua, t.sdk_metadata),
88
- this.C.It(s.Tt.Wa, this.j.kt())),
89
- this.kc(i),
90
- h.yl(this.C, h.it.wn, 1),
87
+ (this.j.Pt(s.It.Ka, t.sdk_metadata),
88
+ this.j.Pt(s.It.Pa, this.C.$t())),
89
+ this.hc(i),
90
+ h.Dl(this.j, h.it.pn, 1),
91
91
  "function" == typeof e && e()))
92
92
  : i.auth_error && (d = !0);
93
93
  },
@@ -95,13 +95,13 @@ export default class Kt {
95
95
  (d = !0),
96
96
  null != t.respond_with &&
97
97
  t.respond_with.triggers &&
98
- (this.yc = Math.max(this.yc - 1, 0)),
99
- this.B.Ya(t.events, t.attributes),
98
+ (this.nc = Math.max(this.nc - 1, 0)),
99
+ this.B.Ua(t.events, t.attributes),
100
100
  "function" == typeof n && n();
101
101
  },
102
102
  ft: (t, s) => {
103
103
  "function" == typeof o && o(!d);
104
- const e = this.B.jl(s);
104
+ const e = this.B.Cl(s);
105
105
  let n = 0;
106
106
  if (e)
107
107
  switch (e.type) {
@@ -113,93 +113,93 @@ export default class Kt {
113
113
  }
114
114
  if (i && !m) {
115
115
  if (d) {
116
- h.Ml(this.C, h.it.wn);
116
+ h.zl(this.j, h.it.pn);
117
117
  const t = this.h.vt(),
118
118
  i = this.h.gt(),
119
119
  s = this.h.bt();
120
- let e = this.jc;
120
+ let e = this.lc;
121
121
  (null == e || e < t) && (e = t);
122
122
  const o = Math.min(s, a(t, e * i)) + n;
123
- this.Ic(o);
124
- } else this.Ic(Math.max(1e3 * this.IS, n));
123
+ this.kc(o);
124
+ } else this.kc(Math.max(1e3 * this.IS, n));
125
125
  m = !0;
126
126
  }
127
127
  },
128
128
  });
129
129
  },
130
- g = this.Tc(c),
130
+ g = this.vc(c),
131
131
  p = t || g;
132
- if (this.Mc(r, g))
133
- return void E.info(
132
+ if (this.gc(r, g))
133
+ return void b.info(
134
134
  "Declining to flush data due to 50 consecutive authentication failures",
135
135
  );
136
- if (i && !this.B.vl(c, d, p))
137
- return this.Ic(), void ("function" == typeof o && o(!0));
138
- const v = this.B.Rl(p, c, d, u);
139
- p && this.yc++;
140
- let b = !1;
136
+ if (i && !this.B.fl(c, d, p))
137
+ return this.kc(), void ("function" == typeof o && o(!0));
138
+ const v = this.B.ml(p, c, d, u);
139
+ p && this.nc++;
140
+ let w = !1;
141
141
  if (v)
142
142
  for (const t of v)
143
143
  this.B.et(
144
144
  t.requestData,
145
145
  (i) => f(t.requestData, t.headers, i),
146
- h.it.wn,
146
+ h.it.pn,
147
147
  n,
148
148
  ),
149
- (b = !0);
150
- this.Gh.Fh() && i && !b
151
- ? this.Ic()
149
+ (w = !0);
150
+ this.Gh.Fh() && i && !w
151
+ ? this.kc()
152
152
  : g &&
153
- (E.info("Invoking new session subscriptions"),
154
- this.Ac.A(),
155
- (this.Cc = !0));
153
+ (b.info("Invoking new session subscriptions"),
154
+ this.uc.A(),
155
+ (this.fc = !0));
156
156
  }
157
- Pc() {
158
- return this.yc > 0;
157
+ yc() {
158
+ return this.nc > 0;
159
159
  }
160
- Ic(t = 1e3 * this.IS) {
161
- this.qc ||
162
- (this.Fc(),
163
- (this.Dc = window.setTimeout(() => {
160
+ kc(t = 1e3 * this.IS) {
161
+ this.mc ||
162
+ (this.wc(),
163
+ (this.cc = window.setTimeout(() => {
164
164
  if (document.hidden) {
165
165
  const t = "visibilitychange",
166
166
  i = () => {
167
167
  document.hidden ||
168
- (document.removeEventListener(t, i, !1), this.Lc());
168
+ (document.removeEventListener(t, i, !1), this.bc());
169
169
  };
170
170
  document.addEventListener(t, i, !1);
171
- } else this.Lc();
171
+ } else this.bc();
172
172
  }, t)),
173
- (this.jc = t));
173
+ (this.lc = t));
174
174
  }
175
- Fc() {
176
- null != this.Dc && (clearTimeout(this.Dc), (this.Dc = null));
175
+ wc() {
176
+ null != this.cc && (clearTimeout(this.cc), (this.cc = null));
177
177
  }
178
178
  initialize() {
179
- (this.qc = !1), this.Ic();
179
+ (this.mc = !1), this.kc();
180
180
  }
181
181
  destroy() {
182
- this.Ac.removeAllSubscriptions(),
182
+ this.uc.removeAllSubscriptions(),
183
183
  this.Gh.xh(),
184
- this.Fc(),
185
- (this.qc = !0),
186
- this.Lc(void 0, !1, void 0, void 0, void 0, void 0, !0),
187
- (this.Dc = null),
188
- (this.Cc = !1);
184
+ this.wc(),
185
+ (this.mc = !0),
186
+ this.bc(void 0, !1, void 0, void 0, void 0, void 0, !0),
187
+ (this.cc = null),
188
+ (this.fc = !1);
189
189
  }
190
190
  rn(t) {
191
- return this.Cc ? (t(), null) : this.Ac.Kt(t);
191
+ return this.fc ? (t(), null) : this.uc.Ut(t);
192
192
  }
193
193
  openSession() {
194
- const t = this.j.kt() !== this.j.el();
195
- t && (this.C.cS(s.Ou.Wh), this.C.cS(s.Ou.Cu)),
196
- this.Lc(!1, void 0, () => {
197
- t && (this.C.Qt(s.Tt.jo), this.C.Qt(s.Tt.Wt));
194
+ const t = this.C.$t() !== this.C.el();
195
+ t && (this.j.cS(s.Ou.Wh), this.j.cS(s.Ou.Cu)),
196
+ this.bc(!1, void 0, () => {
197
+ t && (this.j.Vt(s.It.jo), this.j.Vt(s.It.At));
198
198
  }),
199
- this.Sa(),
199
+ this.Ea(),
200
200
  t &&
201
201
  import("./Push/push-manager-factory.js").then((t) => {
202
- if (this.qc) return;
202
+ if (this.mc) return;
203
203
  const i = t.default.ra();
204
204
  if (
205
205
  null != i &&
@@ -207,7 +207,7 @@ export default class Kt {
207
207
  ) {
208
208
  const t = () => {
209
209
  i.du()
210
- ? E.info(
210
+ ? b.info(
211
211
  "Push token maintenance is disabled, not refreshing token for backend.",
212
212
  )
213
213
  : i.subscribe();
@@ -216,86 +216,86 @@ export default class Kt {
216
216
  s && t();
217
217
  },
218
218
  h = () => {
219
- const i = this.C.Rt(s.Tt.Uu);
219
+ const i = this.j.St(s.It.Uu);
220
220
  (null == i || i) && t();
221
221
  },
222
- n = et.Ps.$s;
223
- new et(n, E).kr(n.Os.Fu, e, h);
222
+ n = et._s.Xs;
223
+ new et(n, b).kr(n.Ws.Fu, e, h);
224
224
  }
225
225
  });
226
226
  }
227
- Nc() {
228
- this.C.Qt(s.Tt.Fo), this.C.Qt(s.Tt.Ci), this.C.Qt(s.Tt.fa);
227
+ jc() {
228
+ this.j.Vt(s.It.Fo), this.j.Vt(s.It.bi), this.j.Vt(s.It.pa);
229
229
  }
230
- Oc() {
231
- this.C.Qt(s.Tt.Sl),
232
- this.C.Qt(s.Tt.ES),
233
- this.C.Qt(s.Tt.$l),
234
- this.C.Qt(s.Tt.Fl);
230
+ Sc() {
231
+ this.j.Vt(s.It.Bl),
232
+ this.j.Vt(s.It.ES),
233
+ this.j.Vt(s.It.Ml),
234
+ this.j.Vt(s.It.Ll);
235
235
  }
236
236
  changeUser(t, i, e) {
237
237
  const h = this.Ss.getUserId();
238
238
  if (h !== t) {
239
- this.j.Sm(),
240
- this.Nc(),
239
+ this.C.Sm(),
240
+ this.jc(),
241
241
  gi(),
242
- null != h && this.Lc(void 0, !1, void 0, void 0, void 0),
242
+ null != h && this.bc(void 0, !1, void 0, void 0, void 0),
243
243
  this.Ss.Ju(t),
244
244
  e ? this.Gh.setSdkAuthenticationSignature(e) : this.Gh.jh();
245
245
  for (let t = 0; t < i.length; t++) i[t].changeUser(null == h);
246
246
  this.B.fo(),
247
- null != h && this.C.Qt(s.Tt.eS),
248
- this.C.Qt(s.Tt.Ka),
249
- this.C.Qt(s.Tt.lS),
250
- this.Oc(),
247
+ null != h && this.j.Vt(s.It.eS),
248
+ this.j.Vt(s.It.Ba),
249
+ this.j.Vt(s.It.lS),
250
+ this.Sc(),
251
251
  this.openSession(),
252
- E.info('Changed user to "' + t + '".');
252
+ b.info('Changed user to "' + t + '".');
253
253
  } else {
254
254
  let i = "Doing nothing.";
255
255
  e &&
256
256
  this.Gh.kh() !== e &&
257
257
  (this.Gh.setSdkAuthenticationSignature(e),
258
258
  (i = "Updated SDK authentication signature")),
259
- E.info(`Current user is already ${t}. ${i}`);
259
+ b.info(`Current user is already ${t}. ${i}`);
260
260
  }
261
261
  }
262
262
  requestImmediateDataFlush(t) {
263
- this.Fc(), this.j.el();
264
- this.Lc(
263
+ this.wc(), this.C.el();
264
+ this.bc(
265
265
  void 0,
266
266
  void 0,
267
267
  void 0,
268
268
  () => {
269
- E.error("Failed to flush data, request will be retried automatically.");
269
+ b.error("Failed to flush data, request will be retried automatically.");
270
270
  },
271
271
  t,
272
272
  !0,
273
273
  );
274
274
  }
275
275
  Ar(t, i) {
276
- this.j.el(),
277
- E.info("Requesting explicit trigger refresh."),
278
- this.Lc(!0, void 0, t, i);
276
+ this.C.el(),
277
+ b.info("Requesting explicit trigger refresh."),
278
+ this.bc(!0, void 0, t, i);
279
279
  }
280
280
  Gu(t, i) {
281
- const e = p.Uc,
281
+ const e = p.Ac,
282
282
  h = { a: t, l: i },
283
- n = v.wt(e, h);
283
+ n = v.Dt(e, h);
284
284
  return (
285
- n && (E.info(`Logged alias ${t} with label ${i}`), this.C.It(s.Tt.lS, h)),
285
+ n && (b.info(`Logged alias ${t} with label ${i}`), this.j.Pt(s.It.lS, h)),
286
286
  n
287
287
  );
288
288
  }
289
289
  Mu(t, i, s) {
290
290
  if (this.h.qu(i))
291
291
  return (
292
- E.info(`Custom Attribute "${i}" is blocklisted, ignoring.`), new L()
292
+ b.info(`Custom Attribute "${i}" is blocklisted, ignoring.`), new L()
293
293
  );
294
294
  const e = { key: i, value: s },
295
- h = v.wt(t, e);
295
+ h = v.Dt(t, e);
296
296
  if (h) {
297
297
  const t = "object" == typeof s ? JSON.stringify(s, null, 2) : s;
298
- E.info(`Logged custom attribute: ${i} with value: ${t}`);
298
+ b.info(`Logged custom attribute: ${i} with value: ${t}`);
299
299
  }
300
300
  return h;
301
301
  }
@@ -304,23 +304,23 @@ export default class Kt {
304
304
  null != e && (o.altitude = e),
305
305
  null != h && (o.ll_accuracy = h),
306
306
  null != n && (o.alt_accuracy = n);
307
- const r = v.wt(p.Bc, o, t || void 0);
307
+ const r = v.Dt(p.Dc, o, t || void 0);
308
308
  return (
309
309
  r &&
310
- E.info(`Set user last known location as ${JSON.stringify(o, null, 2)}`),
310
+ b.info(`Set user last known location as ${JSON.stringify(o, null, 2)}`),
311
311
  r
312
312
  );
313
313
  }
314
314
  Fr(t, i) {
315
- const s = this.j.el();
316
- return new Ie(this.Ss.getUserId(), p.Jc, t, s, { cid: i });
315
+ const s = this.C.el();
316
+ return new Ie(this.Ss.getUserId(), p.$c, t, s, { cid: i });
317
317
  }
318
- Kc(t, i) {
318
+ qc(t, i) {
319
319
  return new et(t, i);
320
320
  }
321
- Sa() {
322
- const t = et.Ps.$s;
323
- this.Kc(t, E).setItem(t.Os.wn, 1, {
321
+ Ea() {
322
+ const t = et._s.Xs;
323
+ this.qc(t, b).setItem(t.Ws.pn, 1, {
324
324
  baseUrl: this.baseUrl,
325
325
  data: { api_key: this.tu, device_id: this.eu.ve().id },
326
326
  userId: this.Ss.getUserId(),
@@ -329,27 +329,27 @@ export default class Kt {
329
329
  }
330
330
  Dr(t) {
331
331
  for (const i of t)
332
- if (i.api_key === this.tu) this.B.Ya(i.events, i.attributes);
332
+ if (i.api_key === this.tu) this.B.Ua(i.events, i.attributes);
333
333
  else {
334
- const t = et.Ps.$s;
335
- new et(t, E).setItem(t.Os.Br, V.de(), i);
334
+ const t = et._s.Xs;
335
+ new et(t, b).setItem(t.Ws.Br, V.de(), i);
336
336
  }
337
337
  }
338
338
  Na(t, i, s) {
339
339
  if (this.h.qu(t))
340
340
  return (
341
- E.info(`Custom Attribute "${t}" is blocklisted, ignoring.`), new L()
341
+ b.info(`Custom Attribute "${t}" is blocklisted, ignoring.`), new L()
342
342
  );
343
343
  let e, h;
344
344
  return (
345
345
  null === i && null === s
346
- ? ((e = p.Wc), (h = { key: t }))
347
- : ((e = p.Gc), (h = { key: t, latitude: i, longitude: s })),
348
- v.wt(e, h)
346
+ ? ((e = p.Cc), (h = { key: t }))
347
+ : ((e = p.Mc), (h = { key: t, latitude: i, longitude: s })),
348
+ v.Dt(e, h)
349
349
  );
350
350
  }
351
- Ia(t, i) {
351
+ va(t, i) {
352
352
  const s = { group_id: t, status: i };
353
- return v.wt(p.Xc, s);
353
+ return v.Dt(p.Tc, s);
354
354
  }
355
355
  }
@@ -1,14 +1,14 @@
1
1
  export default class es {
2
2
  constructor(t) {
3
- (this.Hc = t), (this.Hc = t);
3
+ (this.xc = t), (this.xc = t);
4
4
  }
5
- Qc(t) {
6
- return null == this.Hc || this.Hc === t[0];
5
+ zc(t) {
6
+ return null == this.xc || this.xc === t[0];
7
7
  }
8
8
  static fromJson(t) {
9
9
  return new es(t ? t.event_name : null);
10
10
  }
11
11
  qt() {
12
- return this.Hc;
12
+ return this.xc;
13
13
  }
14
14
  }
@@ -1,13 +1,13 @@
1
1
  import ls from "./filter-set.js";
2
2
  export default class ns {
3
3
  constructor(t, s) {
4
- (this.Hc = t), (this.tf = s), (this.Hc = t), (this.tf = s);
4
+ (this.xc = t), (this.tf = s), (this.xc = t), (this.tf = s);
5
5
  }
6
- Qc(t) {
7
- if (null == this.Hc || null == this.tf) return !1;
6
+ zc(t) {
7
+ if (null == this.xc || null == this.tf) return !1;
8
8
  const s = t[0],
9
9
  i = t[1];
10
- return s === this.Hc && this.tf.Qc(i);
10
+ return s === this.xc && this.tf.zc(i);
11
11
  }
12
12
  static fromJson(t) {
13
13
  return new ns(
@@ -16,6 +16,6 @@ export default class ns {
16
16
  );
17
17
  }
18
18
  qt() {
19
- return { e: this.Hc, pf: this.tf ? this.tf.qt() : null };
19
+ return { e: this.xc, pf: this.tf ? this.tf.qt() : null };
20
20
  }
21
21
  }
@@ -4,13 +4,13 @@ export default class ls {
4
4
  constructor(t) {
5
5
  (this.filters = t), (this.filters = t);
6
6
  }
7
- Qc(t) {
7
+ zc(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].Qc(t)) {
13
+ if (o[r].zc(t)) {
14
14
  s = !0;
15
15
  break;
16
16
  }
@@ -22,7 +22,7 @@ export default class hr {
22
22
  this.comparator !== hr.hT.oT &&
23
23
  (this.eT = Y(this.eT));
24
24
  }
25
- Qc(t) {
25
+ zc(t) {
26
26
  let s = null;
27
27
  switch ((null != t && (s = t[this.tT]), this.comparator)) {
28
28
  case hr.hT.ET:
@@ -3,7 +3,7 @@ export default class bi {
3
3
  constructor(t, i) {
4
4
  (this.if = t), (this.rf = i), (this.if = t), (this.rf = i);
5
5
  }
6
- Qc(t) {
6
+ zc(t) {
7
7
  if (null == this.if) return !1;
8
8
  const i = pi.sf(t[0], this.if);
9
9
  if (!i) return !1;
@@ -2,7 +2,7 @@ export default class os {
2
2
  constructor(t) {
3
3
  (this.productId = t), (this.productId = t);
4
4
  }
5
- Qc(t) {
5
+ zc(t) {
6
6
  return null == this.productId || t[0] === this.productId;
7
7
  }
8
8
  static fromJson(t) {
@@ -3,11 +3,11 @@ export default class fs {
3
3
  constructor(t, s) {
4
4
  (this.productId = t), (this.tf = s), (this.productId = t), (this.tf = s);
5
5
  }
6
- Qc(t) {
6
+ zc(t) {
7
7
  if (null == this.productId || null == this.tf) return !1;
8
8
  const s = t[0],
9
9
  i = t[1];
10
- return s === this.productId && this.tf.Qc(i);
10
+ return s === this.productId && this.tf.zc(i);
11
11
  }
12
12
  static fromJson(t) {
13
13
  return new fs(
@@ -3,7 +3,7 @@ export default class jr {
3
3
  constructor(t) {
4
4
  (this.if = t), (this.if = t);
5
5
  }
6
- Qc(t) {
6
+ zc(t) {
7
7
  return null == this.if || pi.sf(t[0], this.if);
8
8
  }
9
9
  static fromJson(t) {