@braze/web-sdk 6.5.0 → 6.6.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 (59) hide show
  1. package/index.d.ts +8 -3
  2. package/package.json +1 -1
  3. package/shared-lib/event-types.js +11 -11
  4. package/shared-lib/indexed-db-adapter.js +4 -4
  5. package/shared-lib/logger.js +2 -2
  6. package/shared-lib/supported-options.js +14 -13
  7. package/src/Core/disable-sdk.js +8 -7
  8. package/src/Core/enable-sdk.js +3 -3
  9. package/src/Core/is-disabled.js +1 -1
  10. package/src/DUST/dust-provider.js +100 -100
  11. package/src/DUST/dust-shared-worker-impl.js +12 -12
  12. package/src/DUST/dust-worker-bridge.js +11 -11
  13. package/src/DUST/subscribe-to-dust.js +5 -5
  14. package/src/InAppMessage/defer-in-app-message.js +1 -1
  15. package/src/InAppMessage/in-app-message-manager.js +68 -68
  16. package/src/InAppMessage/log-in-app-message-button-click.js +1 -1
  17. package/src/InAppMessage/log-in-app-message-click.js +1 -1
  18. package/src/InAppMessage/log-in-app-message-html-click.js +2 -2
  19. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  20. package/src/InAppMessage/models/full-screen-message.js +7 -7
  21. package/src/InAppMessage/models/html-message.js +8 -8
  22. package/src/InAppMessage/models/in-app-message-button.js +2 -2
  23. package/src/InAppMessage/models/in-app-message.js +42 -42
  24. package/src/InAppMessage/models/modal-message.js +8 -8
  25. package/src/InAppMessage/models/slide-up-message.js +6 -6
  26. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  27. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  28. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  29. package/src/Push/push-manager-factory.js +2 -2
  30. package/src/Push/utils/push-utils.js +6 -6
  31. package/src/User/user-manager.js +2 -2
  32. package/src/User/user.js +9 -9
  33. package/src/common/content-cards-display.js +1 -1
  34. package/src/l10n/l10n-manager-factory.js +1 -1
  35. package/src/managers/braze-instance.js +99 -95
  36. package/src/managers/device-manager.js +2 -2
  37. package/src/managers/network-manager.js +116 -116
  38. package/src/managers/server-config-manager.js +33 -33
  39. package/src/managers/session-manager.js +1 -1
  40. package/src/managers/storage-manager-factory.js +8 -8
  41. package/src/managers/storage-manager.js +45 -48
  42. package/src/managers/subscription-manager.js +8 -8
  43. package/src/models/backend-errors.js +5 -5
  44. package/src/models/braze-event.js +1 -1
  45. package/src/models/device.js +1 -1
  46. package/src/models/push-token.js +6 -6
  47. package/src/models/server-config.js +29 -29
  48. package/src/request-controller.js +91 -91
  49. package/src/triggers/models/trigger-condition.js +25 -25
  50. package/src/triggers/models/trigger.js +7 -7
  51. package/src/triggers/triggers-provider-factory.js +1 -1
  52. package/src/triggers/triggers-provider.js +12 -12
  53. package/src/ui/js/attach-css.js +1 -1
  54. package/src/ui/js/load-font-awesome.js +1 -1
  55. package/src/util/braze-actions.js +2 -2
  56. package/src/util/browser-detector.js +1 -1
  57. package/src/util/net.js +2 -2
  58. package/src/util/request-header-utils.js +12 -12
  59. package/src/util/window-utils.js +1 -1
@@ -24,31 +24,31 @@ export default class Wt {
24
24
  (this.h = n),
25
25
  (this.B = o),
26
26
  (this.$c = r),
27
- (this.hl = l),
27
+ (this.al = l),
28
28
  (this.j = u),
29
29
  (this.tu = t),
30
30
  (this.baseUrl = i),
31
- (this.Zc = 0),
31
+ (this.sd = 0),
32
32
  (this.bE = o.dE() || 0),
33
- (this.sd = null),
33
+ (this.hd = null),
34
34
  (this.C = s),
35
35
  (this.eu = e),
36
36
  (this.vs = h),
37
37
  (this.h = n),
38
38
  (this.B = o),
39
- (this.hl = l),
39
+ (this.al = l),
40
40
  (this.j = u),
41
41
  (this.$c = r),
42
- (this.hd = new m()),
43
- (this.nd = null),
44
- (this.rd = 50),
45
- (this.ld = !1),
46
- (this.ud = !1);
42
+ (this.nd = new m()),
43
+ (this.rd = null),
44
+ (this.ld = 50),
45
+ (this.ud = !1),
46
+ (this.ad = !1);
47
47
  }
48
- ad(t, i) {
49
- return !t && !i && this.hl.Jh() >= this.rd;
48
+ md(t, i) {
49
+ return !t && !i && this.al.Jh() >= this.ld;
50
50
  }
51
- md(t) {
51
+ fd(t) {
52
52
  let i = this.C.am();
53
53
  if (t.length > 0) {
54
54
  const s = this.vs.getUserId();
@@ -59,14 +59,14 @@ export default class Wt {
59
59
  }
60
60
  return i;
61
61
  }
62
- fd(t = !1, i = !0, e, n, o, r = !1, u = !1) {
63
- i && this.gd();
62
+ gd(t = !1, i = !0, e, n, o, r = !1, u = !1) {
63
+ i && this.pd();
64
64
  const c = this.B.RE(),
65
65
  d = this.B.IE();
66
66
  let m = !1;
67
67
  const f = (t, r, u = -1) => {
68
68
  const c = new Date().valueOf();
69
- h.K(this.B, h.H.Ze, c),
69
+ h.K(this.B, h.H._e, c),
70
70
  -1 !== u && r.push(["X-Braze-Req-Tokens-Remaining", u.toString()]);
71
71
  let d = !1;
72
72
  l.O({
@@ -76,18 +76,18 @@ export default class Wt {
76
76
  W: (i) => {
77
77
  null != t.respond_with &&
78
78
  t.respond_with.triggers &&
79
- (this.Zc = Math.max(this.Zc - 1, 0)),
79
+ (this.sd = Math.max(this.sd - 1, 0)),
80
80
  this.j.Y(t, i, r)
81
- ? (this.hl.Z(),
82
- this.h.Sc(i),
81
+ ? (this.al.Z(),
82
+ this.h.Nc(i),
83
83
  (null != t.respond_with &&
84
84
  t.respond_with.user_id != this.vs.getUserId()) ||
85
85
  (null != t.device && this.B.bt(s.ft.ac, t.device),
86
86
  null != t.sdk_metadata &&
87
- (this.B.bt(s.ft.Dl, t.sdk_metadata),
88
- this.B.bt(s.ft.Tl, this.C.yt())),
87
+ (this.B.bt(s.ft.Tl, t.sdk_metadata),
88
+ this.B.bt(s.ft.kl, this.C.yt())),
89
89
  this.$c(i),
90
- h.xl(this.B, h.H.Ze, 1),
90
+ h.Hl(this.B, h.H._e, 1),
91
91
  "function" == typeof e && e()))
92
92
  : i.auth_error && (d = !0);
93
93
  },
@@ -95,13 +95,13 @@ export default class Wt {
95
95
  (d = !0),
96
96
  null != t.respond_with &&
97
97
  t.respond_with.triggers &&
98
- (this.Zc = Math.max(this.Zc - 1, 0)),
99
- this.j.kl(t.events, t.attributes),
98
+ (this.sd = Math.max(this.sd - 1, 0)),
99
+ this.j.yl(t.events, t.attributes),
100
100
  "function" == typeof n && n();
101
101
  },
102
102
  tt: (t, s) => {
103
103
  "function" == typeof o && o(!d);
104
- const e = this.j.Vl(s);
104
+ const e = this.j.Zl(s);
105
105
  let n = 0;
106
106
  if (e)
107
107
  switch (e.type) {
@@ -113,93 +113,93 @@ export default class Wt {
113
113
  }
114
114
  if (i && !m) {
115
115
  if (d) {
116
- h.Zl(this.B, h.H.Ze);
116
+ h.hc(this.B, h.H._e);
117
117
  const t = this.h.st(),
118
118
  i = this.h.it(),
119
119
  s = this.h.nt();
120
- let e = this.sd;
120
+ let e = this.hd;
121
121
  (null == e || e < t) && (e = t);
122
122
  const o = Math.min(s, a(t, e * i)) + n;
123
- this.pd(o);
124
- } else this.pd(Math.max(1e3 * this.bE, n));
123
+ this.vd(o);
124
+ } else this.vd(Math.max(1e3 * this.bE, n));
125
125
  m = !0;
126
126
  }
127
127
  },
128
128
  });
129
129
  },
130
- g = this.md(c),
130
+ g = this.fd(c),
131
131
  p = t || g;
132
- if (this.ad(r, g))
132
+ if (this.md(r, g))
133
133
  return void E.info(
134
134
  "Declining to flush data due to 50 consecutive authentication failures",
135
135
  );
136
- if (i && !this.j.Ml(c, d, p))
137
- return this.pd(), void ("function" == typeof o && o(!0));
138
- const v = this.j.$l(p, c, d, u);
139
- p && this.Zc++;
136
+ if (i && !this.j.$l(c, d, p))
137
+ return this.vd(), void ("function" == typeof o && o(!0));
138
+ const v = this.j.Xl(p, c, d, u);
139
+ p && this.sd++;
140
140
  let b = !1;
141
141
  if (v)
142
142
  for (const t of v)
143
143
  this.j.J(
144
144
  t.requestData,
145
145
  (i) => f(t.requestData, t.headers, i),
146
- h.H.Ze,
146
+ h.H._e,
147
147
  n,
148
148
  ),
149
149
  (b = !0);
150
- this.hl.wh() && i && !b
151
- ? this.pd()
150
+ this.al.wh() && i && !b
151
+ ? this.vd()
152
152
  : g &&
153
153
  (E.info("Invoking new session subscriptions"),
154
- this.hd.L(),
155
- (this.ud = !0));
154
+ this.nd.L(),
155
+ (this.ad = !0));
156
156
  }
157
- vd() {
158
- return this.Zc > 0;
157
+ bd() {
158
+ return this.sd > 0;
159
159
  }
160
- pd(t = 1e3 * this.bE) {
161
- this.ld ||
162
- (this.gd(),
163
- (this.nd = window.setTimeout(() => {
160
+ vd(t = 1e3 * this.bE) {
161
+ this.ud ||
162
+ (this.pd(),
163
+ (this.rd = 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.fd());
168
+ (document.removeEventListener(t, i, !1), this.gd());
169
169
  };
170
170
  document.addEventListener(t, i, !1);
171
- } else this.fd();
171
+ } else this.gd();
172
172
  }, t)),
173
- (this.sd = t));
173
+ (this.hd = t));
174
174
  }
175
- gd() {
176
- null != this.nd && (clearTimeout(this.nd), (this.nd = null));
175
+ pd() {
176
+ null != this.rd && (clearTimeout(this.rd), (this.rd = null));
177
177
  }
178
178
  initialize() {
179
- (this.ld = !1), this.pd();
179
+ (this.ud = !1), this.vd();
180
180
  }
181
181
  destroy() {
182
- this.hd.removeAllSubscriptions(),
183
- this.hl.Gh(),
184
- this.gd(),
185
- (this.ld = !0),
186
- this.fd(void 0, !1, void 0, void 0, void 0, void 0, !0),
187
- (this.nd = null),
188
- (this.ud = !1);
182
+ this.nd.removeAllSubscriptions(),
183
+ this.al.Gh(),
184
+ this.pd(),
185
+ (this.ud = !0),
186
+ this.gd(void 0, !1, void 0, void 0, void 0, void 0, !0),
187
+ (this.rd = null),
188
+ (this.ad = !1);
189
189
  }
190
190
  rn(t) {
191
- return this.ud ? (t(), null) : this.hd.Rt(t);
191
+ return this.ad ? (t(), null) : this.nd.Rt(t);
192
192
  }
193
193
  openSession() {
194
194
  const t = this.C.yt() !== this.C.el();
195
- t && (this.B.hE(s.Ou.tl), this.B.hE(s.Ou.Cu)),
196
- this.fd(!1, void 0, () => {
195
+ t && (this.B.hE(s.Ou.il), this.B.hE(s.Ou.Cu)),
196
+ this.gd(!1, void 0, () => {
197
197
  t && (this.B.zt(s.ft.vo), this.B.zt(s.ft.Dt));
198
198
  }),
199
- this.Ya(),
199
+ this.Va(),
200
200
  t &&
201
201
  import("./Push/push-manager-factory.js").then((t) => {
202
- if (this.ld) return;
202
+ if (this.ud) return;
203
203
  const i = t.default.ra();
204
204
  if (
205
205
  null != i &&
@@ -224,48 +224,48 @@ export default class Wt {
224
224
  }
225
225
  });
226
226
  }
227
- bd() {
228
- this.B.zt(s.ft.lo), this.B.zt(s.ft.Ps), this.B.zt(s.ft.Wn);
229
- }
230
227
  wd() {
228
+ this.B.zt(s.ft.lo), this.B.zt(s.ft.Ps), this.B.zt(s.ft.Yn);
229
+ }
230
+ kd() {
231
231
  var t, i;
232
- this.B.zt(s.ft.Jl), this.B.zt(s.ft.lE);
232
+ this.B.zt(s.ft.Ql), this.B.zt(s.ft.lE);
233
233
  const e = h.H;
234
234
  for (const i in e) {
235
235
  const s = e[i];
236
- this.j.lc(s, null === (t = this.h) || void 0 === t ? void 0 : t.Dc(s));
236
+ this.j.dc(s, null === (t = this.h) || void 0 === t ? void 0 : t.Tc(s));
237
237
  }
238
- this.j.hc(null === (i = this.h) || void 0 === i ? void 0 : i.qc());
238
+ this.j.uc(null === (i = this.h) || void 0 === i ? void 0 : i.Ac());
239
239
  }
240
240
  changeUser(t, i, e) {
241
241
  const h = this.vs.getUserId();
242
242
  if (h !== t) {
243
243
  this.C.jm(),
244
- this.bd(),
244
+ this.wd(),
245
245
  di(),
246
- null != h && this.fd(void 0, !1, void 0, void 0, void 0),
246
+ null != h && this.gd(void 0, !1, void 0, void 0, void 0),
247
247
  this.vs.Ju(t),
248
- e ? this.hl.setSdkAuthenticationSignature(e) : this.hl.yh();
248
+ e ? this.al.setSdkAuthenticationSignature(e) : this.al.yh();
249
249
  for (let t = 0; t < i.length; t++) i[t].changeUser(null == h);
250
250
  this.j.fo(),
251
251
  null != h && this.B.zt(s.ft.rE),
252
252
  this.B.zt(s.ft.ac),
253
253
  this.B.zt(s.ft.uE),
254
- this.wd(),
254
+ this.kd(),
255
255
  this.openSession(),
256
256
  E.info('Changed user to "' + t + '".');
257
257
  } else {
258
258
  let i = "Doing nothing.";
259
259
  e &&
260
- this.hl.jh() !== e &&
261
- (this.hl.setSdkAuthenticationSignature(e),
260
+ this.al.jh() !== e &&
261
+ (this.al.setSdkAuthenticationSignature(e),
262
262
  (i = "Updated SDK authentication signature")),
263
263
  E.info(`Current user is already ${t}. ${i}`);
264
264
  }
265
265
  }
266
266
  requestImmediateDataFlush(t) {
267
- this.gd(), this.C.el();
268
- this.fd(
267
+ this.pd(), this.C.el();
268
+ this.gd(
269
269
  void 0,
270
270
  void 0,
271
271
  void 0,
@@ -279,10 +279,10 @@ export default class Wt {
279
279
  yr(t, i) {
280
280
  this.C.el(),
281
281
  E.info("Requesting explicit trigger refresh."),
282
- this.fd(!0, void 0, t, i);
282
+ this.gd(!0, void 0, t, i);
283
283
  }
284
284
  Gu(t, i) {
285
- const e = f.kd,
285
+ const e = f.yd,
286
286
  h = { a: t, l: i },
287
287
  n = v.lt(e, h);
288
288
  return (
@@ -308,7 +308,7 @@ export default class Wt {
308
308
  null != e && (o.altitude = e),
309
309
  null != h && (o.ll_accuracy = h),
310
310
  null != n && (o.alt_accuracy = n);
311
- const r = v.lt(f.yd, o, t || void 0);
311
+ const r = v.lt(f.jd, o, t || void 0);
312
312
  return (
313
313
  r &&
314
314
  E.info(`Set user last known location as ${JSON.stringify(o, null, 2)}`),
@@ -317,29 +317,29 @@ export default class Wt {
317
317
  }
318
318
  $r(t, i) {
319
319
  const s = this.C.el();
320
- return new De(this.vs.getUserId(), f.jd, t, s, { cid: i });
320
+ return new De(this.vs.getUserId(), f.Sd, t, s, { cid: i });
321
321
  }
322
- Sd(t, i) {
322
+ Ad(t, i) {
323
323
  return new et(t, i);
324
324
  }
325
- Ya() {
325
+ Va() {
326
326
  const t = et.Us.Rs;
327
- this.Sd(t, E).setItem(t.Fs.Ze, 1, {
327
+ this.Ad(t, E).setItem(t.Fs._e, 1, {
328
328
  baseUrl: this.baseUrl,
329
329
  data: { api_key: this.tu, device_id: this.eu.ve().id },
330
330
  userId: this.vs.getUserId(),
331
- sdkAuthEnabled: this.hl.wh(),
331
+ sdkAuthEnabled: this.al.wh(),
332
332
  });
333
333
  }
334
334
  Fr(t) {
335
335
  for (const i of t)
336
- if (i.api_key === this.tu) this.j.kl(i.events, i.attributes);
336
+ if (i.api_key === this.tu) this.j.yl(i.events, i.attributes);
337
337
  else {
338
338
  const t = et.Us.Rs;
339
339
  new et(t, E).setItem(t.Fs.zr, P.se(), i);
340
340
  }
341
341
  }
342
- Na(t, i, s) {
342
+ Ra(t, i, s) {
343
343
  if (this.h.qu(t))
344
344
  return (
345
345
  E.info(`Custom Attribute "${t}" is blocklisted, ignoring.`), new H()
@@ -347,13 +347,13 @@ export default class Wt {
347
347
  let e, h;
348
348
  return (
349
349
  null === i && null === s
350
- ? ((e = f.Ad), (h = { key: t }))
351
- : ((e = f.Dd), (h = { key: t, latitude: i, longitude: s })),
350
+ ? ((e = f.Dd), (h = { key: t }))
351
+ : ((e = f.$d), (h = { key: t, latitude: i, longitude: s })),
352
352
  v.lt(e, h)
353
353
  );
354
354
  }
355
- Ra(t, i) {
355
+ Pa(t, i) {
356
356
  const s = { group_id: t, status: i };
357
- return v.lt(f.$d, s);
357
+ return v.lt(f.qd, s);
358
358
  }
359
359
  }
@@ -28,25 +28,25 @@ export default class fi {
28
28
  const t = e.type;
29
29
  let r = null;
30
30
  switch (t) {
31
- case fi.Ln.OPEN:
32
- case fi.Ln.qs:
31
+ case fi.Qn.OPEN:
32
+ case fi.Qn.qs:
33
33
  break;
34
- case fi.Ln.Rr:
34
+ case fi.Qn.Rr:
35
35
  r = ns.fromJson(e.data);
36
36
  break;
37
- case fi.Ln.bm:
37
+ case fi.Qn.bm:
38
38
  r = us.fromJson(e.data);
39
39
  break;
40
- case fi.Ln.wr:
40
+ case fi.Qn.wr:
41
41
  r = ur.fromJson(e.data);
42
42
  break;
43
- case fi.Ln.xe:
43
+ case fi.Qn.xe:
44
44
  r = rs.fromJson(e.data);
45
45
  break;
46
- case fi.Ln.Em:
46
+ case fi.Qn.Em:
47
47
  r = ls.fromJson(e.data);
48
48
  break;
49
- case fi.Ln.rm:
49
+ case fi.Qn.rm:
50
50
  r = mi.fromJson(e.data);
51
51
  }
52
52
  return new fi(t, r);
@@ -58,31 +58,31 @@ export default class fi {
58
58
  let t,
59
59
  r = null;
60
60
  switch (e.t) {
61
- case fi.Ln.OPEN:
62
- case fi.Ln.qs:
61
+ case fi.Qn.OPEN:
62
+ case fi.Qn.qs:
63
63
  break;
64
- case fi.Ln.Rr:
64
+ case fi.Qn.Rr:
65
65
  r = new ns(e.d);
66
66
  break;
67
- case fi.Ln.bm:
67
+ case fi.Qn.bm:
68
68
  (t = e.d || {}), (r = new us(t.id, is._u(t.pf || [])));
69
69
  break;
70
- case fi.Ln.wr:
70
+ case fi.Qn.wr:
71
71
  r = new ur(e.d);
72
72
  break;
73
- case fi.Ln.xe:
73
+ case fi.Qn.xe:
74
74
  r = new rs(e.d);
75
75
  break;
76
- case fi.Ln.Em:
76
+ case fi.Qn.Em:
77
77
  (t = e.d || {}), (r = new ls(t.e, is._u(t.pf || [])));
78
78
  break;
79
- case fi.Ln.rm:
79
+ case fi.Qn.rm:
80
80
  r = new mi(e.d);
81
81
  }
82
82
  return new fi(e.t, r);
83
83
  }
84
84
  }
85
- (fi.Ln = {
85
+ (fi.Qn = {
86
86
  OPEN: "open",
87
87
  Rr: "purchase",
88
88
  bm: "purchase_property",
@@ -93,11 +93,11 @@ export default class fi {
93
93
  qs: "test",
94
94
  }),
95
95
  (fi._m = {}),
96
- (fi._m[fi.Ln.OPEN] = ot.OPEN),
97
- (fi._m[fi.Ln.Rr] = ot.Rr),
98
- (fi._m[fi.Ln.bm] = ot.Rr),
99
- (fi._m[fi.Ln.wr] = ot.wr),
100
- (fi._m[fi.Ln.xe] = ot.xe),
101
- (fi._m[fi.Ln.Em] = ot.xe),
102
- (fi._m[fi.Ln.rm] = ot.rm),
103
- (fi._m[fi.Ln.qs] = ot.qs);
96
+ (fi._m[fi.Qn.OPEN] = ot.OPEN),
97
+ (fi._m[fi.Qn.Rr] = ot.Rr),
98
+ (fi._m[fi.Qn.bm] = ot.Rr),
99
+ (fi._m[fi.Qn.wr] = ot.wr),
100
+ (fi._m[fi.Qn.xe] = ot.xe),
101
+ (fi._m[fi.Qn.Em] = ot.xe),
102
+ (fi._m[fi.Qn.rm] = ot.rm),
103
+ (fi._m[fi.Qn.qs] = ot.qs);
@@ -16,7 +16,7 @@ export default class pt {
16
16
  (this.data = l),
17
17
  (this.Ed = o),
18
18
  (this.Nd = n),
19
- (this.Vn = a),
19
+ (this.Wn = a),
20
20
  (this._d = u),
21
21
  (this.Id = d),
22
22
  (this.id = t),
@@ -29,7 +29,7 @@ export default class pt {
29
29
  (this.type = h),
30
30
  (this.Ed = o || 0),
31
31
  null == a && (a = 1e3 * (this.Ed + 30)),
32
- (this.Vn = a),
32
+ (this.Wn = a),
33
33
  (this.data = l),
34
34
  null != n && (this.Nd = n),
35
35
  (this._d = u),
@@ -49,11 +49,11 @@ export default class pt {
49
49
  }
50
50
  Bd(t) {
51
51
  const i = new Date().valueOf() - t,
52
- s = null == t || isNaN(i) || null == this.Vn || i < this.Vn;
52
+ s = null == t || isNaN(i) || null == this.Wn || i < this.Wn;
53
53
  return (
54
54
  s ||
55
55
  E.info(
56
- `Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.Vn}ms.`,
56
+ `Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.Wn}ms.`,
57
57
  ),
58
58
  !s
59
59
  );
@@ -73,7 +73,7 @@ export default class pt {
73
73
  u = t.data,
74
74
  d = t.min_seconds_since_last_trigger;
75
75
  return ta(
76
- pt.Ln,
76
+ pt.Qn,
77
77
  l,
78
78
  "Could not construct Trigger from server data",
79
79
  "Trigger.Types",
@@ -94,7 +94,7 @@ export default class pt {
94
94
  da: this.data,
95
95
  d: this.Ed,
96
96
  r: this.Nd,
97
- tm: this.Vn,
97
+ tm: this.Wn,
98
98
  ss: this._d,
99
99
  ld: this.Id,
100
100
  };
@@ -119,4 +119,4 @@ export default class pt {
119
119
  );
120
120
  }
121
121
  }
122
- (pt.Ln = { Kn: "inapp", Cd: "templated_iam" }), (pt.Td = -1);
122
+ (pt.Qn = { Ln: "inapp", Cd: "templated_iam" }), (pt.Td = -1);
@@ -14,7 +14,7 @@ export const TriggersProviderFactory = {
14
14
  const i = r.re(D.Xh);
15
15
  (TriggersProviderFactory.provider = new gr(
16
16
  null != i ? i : 30,
17
- je.ra().An(),
17
+ je.ra().Tn(),
18
18
  r.p(),
19
19
  r.nn(),
20
20
  je.ra(),
@@ -70,7 +70,7 @@ export default class gr extends t {
70
70
  h = [];
71
71
  for (let r = 0; r < t.length; r++) {
72
72
  const n = t[r],
73
- o = s.Md(n.Un || 0);
73
+ o = s.Md(n.Vn || 0);
74
74
  if (o > 0) {
75
75
  let t, r;
76
76
  h.push(n),
@@ -82,7 +82,7 @@ export default class gr extends t {
82
82
  const i = e[n.pg[t]];
83
83
  null != i && l.push(i);
84
84
  }
85
- this.eg.push(window.setTimeout(i(s, n.Un || 0, t, r, l), o));
85
+ this.eg.push(window.setTimeout(i(s, n.Vn || 0, t, r, l), o));
86
86
  }
87
87
  }
88
88
  this.ng[s.id].length > h.length &&
@@ -109,7 +109,7 @@ export default class gr extends t {
109
109
  N(t) {
110
110
  let i = !1;
111
111
  if (null != t && t.triggers) {
112
- this.ig.oa(), this.fg();
112
+ this.ig.la(), this.fg();
113
113
  const e = {},
114
114
  r = {};
115
115
  this.triggers = [];
@@ -148,12 +148,12 @@ export default class gr extends t {
148
148
  this.fg();
149
149
  const r = new Date().valueOf();
150
150
  t.Bd(i) ||
151
- (!1 === navigator.onLine && t.type === pt.Ln.Kn && e.imageUrl
151
+ (!1 === navigator.onLine && t.type === pt.Qn.Ln && e.imageUrl
152
152
  ? E.info(
153
153
  `Not showing ${t.type} trigger action ${t.id} due to offline state.`,
154
154
  )
155
155
  : t.xd(r) && this.wg(t, r, s)
156
- ? 0 === this.ws.De()
156
+ ? 0 === this.ws.We()
157
157
  ? E.info(
158
158
  `Not displaying trigger ${t.id} because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called.`,
159
159
  )
@@ -185,27 +185,27 @@ export default class gr extends t {
185
185
  };
186
186
  let o, l, a;
187
187
  switch (t.type) {
188
- case pt.Ln.Kn:
188
+ case pt.Qn.Ln:
189
189
  if (((o = ut(t.data)), null == o)) {
190
190
  E.error(
191
191
  `Could not parse trigger data for trigger ${t.id}, ignoring.`,
192
192
  );
193
193
  break;
194
194
  }
195
- if (((l = this.ig.xn(o)), l)) {
195
+ if (((l = this.ig.Pn(o)), l)) {
196
196
  E.error(l), n();
197
197
  break;
198
198
  }
199
199
  h(o);
200
200
  break;
201
- case pt.Ln.Cd:
202
- if (((a = wt.fromJson(t.data, h, n, i, t.Vn || 0)), null == a)) {
201
+ case pt.Qn.Cd:
202
+ if (((a = wt.fromJson(t.data, h, n, i, t.Wn || 0)), null == a)) {
203
203
  E.error(
204
204
  `Could not parse trigger data for trigger ${t.id}, ignoring.`,
205
205
  );
206
206
  break;
207
207
  }
208
- this.ig.Fn(a, s, e);
208
+ this.ig.On(a, s, e);
209
209
  break;
210
210
  default:
211
211
  E.error(`Trigger ${t.id} was of unexpected type ${t.type}, ignoring.`);
@@ -213,7 +213,7 @@ export default class gr extends t {
213
213
  }
214
214
  he(t, i = null, s) {
215
215
  if (!ta(ot, t, "Cannot fire trigger action.", "TriggerEvents")) return;
216
- if (this.Ru && this.Ru.vd())
216
+ if (this.Ru && this.Ru.bd())
217
217
  return (
218
218
  E.info(
219
219
  "Trigger sync is currently in progress, awaiting sync completion before firing trigger event.",
@@ -297,7 +297,7 @@ export default class gr extends t {
297
297
  this.fg(), t.id && (this.ng[t.id] = this.ng[t.id] || []);
298
298
  const n = {};
299
299
  let o;
300
- (n.Un = i), (n.ug = e), null != r && (o = r.gt()), (n.dg = o);
300
+ (n.Vn = i), (n.ug = e), null != r && (o = r.gt()), (n.dg = o);
301
301
  const l = [];
302
302
  for (const t of h) t.id && l.push(t.id);
303
303
  (n.pg = l),
@@ -1,7 +1,7 @@
1
1
  import r, { OPTIONS as D } from "../../managers/braze-instance.js";
2
2
  export function attachCSS(n, t, o) {
3
3
  const c = n || document.querySelector("head"),
4
- e = `ab-${t}-css-definitions-${"6.5.0".replace(/\./g, "-")}`;
4
+ e = `ab-${t}-css-definitions-${"6.6.0".replace(/\./g, "-")}`;
5
5
  if (!c) return;
6
6
  const s = c.ownerDocument || document;
7
7
  if (null == s.getElementById(e)) {
@@ -1,6 +1,6 @@
1
1
  import r, { OPTIONS as D } from "../../managers/braze-instance.js";
2
2
  export function loadFontAwesome() {
3
- if (r.re(D.Za)) return;
3
+ if (r.re(D.tl)) return;
4
4
  const e = "https://use.fontawesome.com/7f85a56ba4.css";
5
5
  if (
6
6
  !(null !== document.querySelector('link[rel=stylesheet][href="' + e + '"]'))
@@ -25,11 +25,11 @@ export const BRAZE_ACTIONS = {
25
25
  properties: { type: "type", eo: "steps", so: "args" },
26
26
  };
27
27
  export const INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES = {
28
- Pn: "unknownBrazeAction",
28
+ En: "unknownBrazeAction",
29
29
  cp: "noPushPrompt",
30
30
  };
31
31
  export const ineligibleBrazeActionURLErrorMessage = (t, o) =>
32
- t === INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Pn
32
+ t === INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.En
33
33
  ? `${o} contains an unknown braze action type and will not be displayed.`
34
34
  : "";
35
35
  export function getDecodedBrazeAction(t) {
@@ -23,7 +23,7 @@ class vi {
23
23
  i.systemLanguage ||
24
24
  ""
25
25
  ).toLowerCase()),
26
- (this.Il = vi.xg(this.userAgent));
26
+ (this.gl = vi.xg(this.userAgent));
27
27
  }
28
28
  fE() {
29
29
  return this.browser === bi.Bg;