@braze/web-sdk 6.7.1 → 6.8.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 (97) hide show
  1. package/index.d.ts +74 -27
  2. package/package.json +1 -1
  3. package/shared-lib/encoding-utils.js +2 -2
  4. package/shared-lib/event-types.js +13 -13
  5. package/shared-lib/indexed-db-adapter.js +3 -3
  6. package/shared-lib/logger.js +2 -2
  7. package/shared-lib/supported-options.js +8 -8
  8. package/src/Banner/log-banner-impressions.js +20 -11
  9. package/src/ContentCards/content-cards-provider-factory.js +13 -11
  10. package/src/ContentCards/content-cards-provider.js +4 -4
  11. package/src/ContentCards/get-cached-content-cards.js +2 -2
  12. package/src/ContentCards/request-content-cards-refresh.js +2 -2
  13. package/src/ContentCards/subscribe-to-content-cards-updates.js +10 -10
  14. package/src/ContentCards/ui/show-content-cards.js +3 -3
  15. package/src/Core/change-user.js +2 -2
  16. package/src/Core/index.js +1 -0
  17. package/src/Core/log-ecommerce-event.js +29 -0
  18. package/src/Core/log-purchase.js +17 -192
  19. package/src/Core/open-session.js +6 -6
  20. package/src/Core/set-sdk-authentication-signature.js +1 -1
  21. package/src/Core/subscribe-to-sdk-authentication-failures.js +1 -1
  22. package/src/DUST/dust-connection-core.js +1 -0
  23. package/src/DUST/dust-provider-factory.js +10 -10
  24. package/src/DUST/dust-provider.js +181 -158
  25. package/src/DUST/dust-shared-worker-code.js +1 -1
  26. package/src/DUST/dust-shared-worker-impl.js +93 -100
  27. package/src/DUST/dust-worker-bridge.js +27 -27
  28. package/src/DUST/subscribe-to-dust.js +7 -7
  29. package/src/InAppMessage/defer-in-app-message.js +1 -1
  30. package/src/InAppMessage/display/in-app-message-to-html.js +16 -16
  31. package/src/InAppMessage/display/modal-utils.js +2 -2
  32. package/src/InAppMessage/in-app-message-manager.js +64 -64
  33. package/src/InAppMessage/log-in-app-message-button-click.js +1 -1
  34. package/src/InAppMessage/log-in-app-message-click.js +1 -1
  35. package/src/InAppMessage/log-in-app-message-html-click.js +2 -2
  36. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  37. package/src/InAppMessage/models/full-screen-message.js +7 -7
  38. package/src/InAppMessage/models/html-message.js +1 -1
  39. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  40. package/src/InAppMessage/models/in-app-message.js +22 -22
  41. package/src/InAppMessage/models/modal-message.js +5 -5
  42. package/src/InAppMessage/models/slide-up-message.js +6 -6
  43. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  44. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  45. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  46. package/src/InAppMessage/ui/show-in-app-message.js +20 -20
  47. package/src/Push/push-manager-factory.js +2 -2
  48. package/src/Push/push-manager.js +8 -8
  49. package/src/Push/utils/push-utils.js +6 -6
  50. package/src/User/user-manager.js +5 -5
  51. package/src/User/user.js +8 -8
  52. package/src/common/constants.js +1 -0
  53. package/src/common/content-cards-display.js +2 -2
  54. package/src/l10n/l10n-manager-factory.js +1 -1
  55. package/src/l10n/l10n-manager.js +1 -1
  56. package/src/managers/braze-instance.js +21 -21
  57. package/src/managers/device-manager.js +6 -6
  58. package/src/managers/network-manager.js +93 -92
  59. package/src/managers/server-config-manager.js +68 -68
  60. package/src/managers/session-manager.js +2 -2
  61. package/src/managers/storage-manager-factory.js +4 -4
  62. package/src/managers/storage-manager.js +120 -120
  63. package/src/managers/subscription-manager.js +1 -1
  64. package/src/managers/utils.js +1 -1
  65. package/src/models/backend-errors.js +5 -5
  66. package/src/models/braze-event.js +3 -3
  67. package/src/models/device.js +1 -1
  68. package/src/models/identifier.js +3 -3
  69. package/src/models/push-token.js +5 -5
  70. package/src/models/server-config.js +27 -27
  71. package/src/request-controller.js +99 -99
  72. package/src/triggers/models/custom-event-data.js +4 -4
  73. package/src/triggers/models/custom-event-property-data.js +5 -5
  74. package/src/triggers/models/filter-set.js +2 -2
  75. package/src/triggers/models/filter.js +1 -1
  76. package/src/triggers/models/in-app-message-click-data.js +5 -5
  77. package/src/triggers/models/purchase-data.js +1 -1
  78. package/src/triggers/models/purchase-property-data.js +2 -2
  79. package/src/triggers/models/push-click-data.js +5 -5
  80. package/src/triggers/models/trigger-condition.js +42 -42
  81. package/src/triggers/models/trigger-events.js +2 -2
  82. package/src/triggers/models/trigger.js +10 -10
  83. package/src/triggers/triggers-provider-factory.js +1 -1
  84. package/src/triggers/triggers-provider.js +30 -30
  85. package/src/types.js +5 -1
  86. package/src/ui/js/attach-css.js +1 -1
  87. package/src/util/braze-actions.js +5 -5
  88. package/src/util/browser-detector.js +13 -13
  89. package/src/util/client-hints-parser.js +2 -2
  90. package/src/util/dom-utils.js +2 -2
  91. package/src/util/ecommerce-event-validation.js +326 -0
  92. package/src/util/iso-4217-currency-codes.js +176 -0
  93. package/src/util/net.js +3 -3
  94. package/src/util/request-header-utils.js +18 -18
  95. package/src/util/user-agent-parser.js +14 -14
  96. package/src/util/validation-utils.js +2 -2
  97. package/src/util/window-utils.js +2 -2
@@ -4,7 +4,7 @@ import HtmlMessage from "../models/html-message.js";
4
4
  import InAppMessage from "../models/in-app-message.js";
5
5
  import SlideUpMessage from "../models/slide-up-message.js";
6
6
  import be from "../display/get-animation-effect.js";
7
- import Fe from "../display/in-app-message-to-html.js";
7
+ import Ge from "../display/in-app-message-to-html.js";
8
8
  import { logInAppMessageImpression } from "../log-in-app-message-impression.js";
9
9
  import {
10
10
  ORIENTATION as Ue,
@@ -19,10 +19,10 @@ import { isIFrame as St } from "../utils/in-app-message-utils.js";
19
19
  import Je from "../../l10n/l10n-manager-factory.js";
20
20
  import {
21
21
  IamTiming as Et,
22
- IamClickAction as $e,
22
+ IamClickAction as Le,
23
23
  IamDismissType as pr,
24
- IamOrientation as Ae,
25
- IamSlideFrom as De,
24
+ IamOrientation as De,
25
+ IamSlideFrom as Ee,
26
26
  } from "../constants.js";
27
27
  export function showInAppMessage(e, t, s) {
28
28
  if (!r.rr()) return;
@@ -39,7 +39,7 @@ export function showInAppMessage(e, t, s) {
39
39
  if (e.constructor === InAppMessage) return !1;
40
40
  e.lh();
41
41
  const o = e instanceof HtmlMessage;
42
- if (o && !e.trusted && !r.ar())
42
+ if (o && !e.trusted && !r.dr())
43
43
  return (
44
44
  E.error(
45
45
  'HTML in-app messages are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these messages.',
@@ -55,14 +55,14 @@ export function showInAppMessage(e, t, s) {
55
55
  !1
56
56
  );
57
57
  }
58
- if (no.da()) {
59
- const t = no.ga();
58
+ if (no.ja()) {
59
+ const t = no.ba();
60
60
  if (
61
- (t === Ue.PORTRAIT && e.orientation === Ae.LANDSCAPE) ||
62
- (t === Ue.LANDSCAPE && e.orientation === Ae.PORTRAIT)
61
+ (t === Ue.PORTRAIT && e.orientation === De.LANDSCAPE) ||
62
+ (t === Ue.LANDSCAPE && e.orientation === De.PORTRAIT)
63
63
  ) {
64
64
  const s = t === Ue.PORTRAIT ? "portrait" : "landscape",
65
- o = e.orientation === Ae.PORTRAIT ? "portrait" : "landscape";
65
+ o = e.orientation === De.PORTRAIT ? "portrait" : "landscape";
66
66
  return (
67
67
  E.info(
68
68
  `Not showing ${o} in-app message ${e.message} because the screen is currently ${s}`,
@@ -71,16 +71,16 @@ export function showInAppMessage(e, t, s) {
71
71
  );
72
72
  }
73
73
  }
74
- if (!r.ar()) {
74
+ if (!r.dr()) {
75
75
  let t = !1;
76
76
  if (e.buttons && e.buttons.length > 0) {
77
77
  const s = e.buttons;
78
78
  for (let e = 0; e < s.length; e++)
79
- if (s[e].clickAction === $e.URI) {
79
+ if (s[e].clickAction === Le.URI) {
80
80
  const o = s[e].uri;
81
81
  t = tt(o);
82
82
  }
83
- } else e.clickAction === $e.URI && (t = tt(e.uri));
83
+ } else e.clickAction === Le.URI && (t = tt(e.uri));
84
84
  if (t)
85
85
  return (
86
86
  E.error(
@@ -95,7 +95,7 @@ export function showInAppMessage(e, t, s) {
95
95
  (i.className += be(e)),
96
96
  e.language && !o && (i.lang = e.language),
97
97
  e.Bo() && (i.id = e.htmlId),
98
- r.er(U.ja) && (i.style.zIndex = (r.er(U.ja) + 1).toString()),
98
+ r.er(U.wa) && (i.style.zIndex = (r.er(U.wa) + 1).toString()),
99
99
  t.appendChild(i),
100
100
  e.Mo())
101
101
  ) {
@@ -106,7 +106,7 @@ export function showInAppMessage(e, t, s) {
106
106
  document.getElementsByTagName("head")[0].appendChild(t);
107
107
  }
108
108
  const n = e instanceof SlideUpMessage,
109
- a = Fe(
109
+ a = Ge(
110
110
  e,
111
111
  (t) => {
112
112
  if (e.zo() && e.od()) {
@@ -114,7 +114,7 @@ export function showInAppMessage(e, t, s) {
114
114
  if (
115
115
  ((s.className = "ab-page-blocker"),
116
116
  e.Mo() || (s.style.backgroundColor = ke(e.frameColor)),
117
- r.er(U.ja) && (s.style.zIndex = r.er(U.ja).toString()),
117
+ r.er(U.wa) && (s.style.zIndex = r.er(U.wa).toString()),
118
118
  i.appendChild(s),
119
119
  !r.er(U.oh))
120
120
  ) {
@@ -133,7 +133,7 @@ export function showInAppMessage(e, t, s) {
133
133
  o = s[e];
134
134
  break;
135
135
  }
136
- if (e.slideFrom === De.TOP) {
136
+ if (e.slideFrom === Ee.TOP) {
137
137
  let e = 0;
138
138
  null != o && (e = o.offsetTop + o.offsetHeight),
139
139
  (t.style.top = Math.max(e, 0) + "px");
@@ -163,11 +163,11 @@ export function showInAppMessage(e, t, s) {
163
163
  (e) => {
164
164
  E.info(e);
165
165
  },
166
- r.er(U.ba),
167
- r.er(U.ja),
166
+ r.er(U.va),
167
+ r.er(U.wa),
168
168
  r.er(U.sr),
169
169
  t,
170
- Je.ra().wa(),
170
+ Je.ra().ya(),
171
171
  );
172
172
  return (o || n) && (i.appendChild(a), e.eh(i)), !0;
173
173
  }
@@ -12,11 +12,11 @@ const ra = {
12
12
  r.ue(),
13
13
  r.ht(),
14
14
  r.er(U.xa),
15
- r.er(U.ya),
16
15
  r.er(U.Ma),
17
- r.l(),
18
16
  r.er(U._a),
17
+ r.l(),
19
18
  r.er(U.ka),
19
+ r.er(U.qa),
20
20
  r.p(),
21
21
  )),
22
22
  ra.na
@@ -1,10 +1,10 @@
1
- import { isArray as g, isEqual as ni } from "../util/code-utils.js";
2
- import oi from "../models/push-token.js";
3
- import { logger as E, EncodingUtils as ui } from "../../shared-lib/index.js";
1
+ import { isArray as g, isEqual as oi } from "../util/code-utils.js";
2
+ import ui from "../models/push-token.js";
3
+ import { logger as E, EncodingUtils as ai } from "../../shared-lib/index.js";
4
4
  import { STORAGE_KEYS as s } from "../managers/storage-manager.js";
5
5
  import { User } from "../User/index.js";
6
6
  import It from "./utils/push-utils.js";
7
- import { getErrorMessage as ai } from "../util/error-utils.js";
7
+ import { getErrorMessage as hi } from "../util/error-utils.js";
8
8
  export default class na {
9
9
  constructor(i, t, e, s, r, n, o, u, a, h, c) {
10
10
  (this.iu = i),
@@ -71,7 +71,7 @@ export default class na {
71
71
  (n = btoa(String.fromCharCode.apply(null, i))),
72
72
  (o = btoa(String.fromCharCode.apply(null, t)));
73
73
  } catch (i) {
74
- E.error(ai(i));
74
+ E.error(hi(i));
75
75
  }
76
76
  const a = ((i) => {
77
77
  let t;
@@ -258,7 +258,7 @@ export default class na {
258
258
  (null !=
259
259
  (null === (n = this.h) || void 0 === n
260
260
  ? void 0
261
- : n.ju()) && (o = ui.Nu(this.h.ju())),
261
+ : n.ju()) && (o = ai.Nu(this.h.ju())),
262
262
  r)
263
263
  ) {
264
264
  let n,
@@ -267,7 +267,7 @@ export default class na {
267
267
  if ((this.C && (n = this.C.Rt(s.Tt.Uu)), n && !g(n))) {
268
268
  let i;
269
269
  try {
270
- i = oi._u(n).Wu;
270
+ i = ui._u(n).Wu;
271
271
  } catch (t) {
272
272
  i = null;
273
273
  }
@@ -283,7 +283,7 @@ export default class na {
283
283
  r.options.applicationServerKey &&
284
284
  r.options.applicationServerKey.byteLength &&
285
285
  r.options.applicationServerKey.byteLength > 0 &&
286
- !ni(o, new Uint8Array(r.options.applicationServerKey))
286
+ !oi(o, new Uint8Array(r.options.applicationServerKey))
287
287
  ? (r.options.applicationServerKey.byteLength > 12
288
288
  ? E.info(
289
289
  "Device was already subscribed to push using a different VAPID provider, creating new subscription.",
@@ -28,15 +28,15 @@ const It = {
28
28
  null != window.Notification &&
29
29
  null != window.Notification.permission &&
30
30
  "granted" === window.Notification.permission,
31
- Vn: () =>
31
+ Yn: () =>
32
32
  It.isPushBlocked()
33
- ? { Wn: !1, reason: "blocked" }
33
+ ? { Zn: !1, reason: "blocked" }
34
34
  : It.isPushSupported()
35
35
  ? It.isPushPermissionGranted()
36
- ? { Wn: !1, reason: "permissionGranted" }
37
- : { Wn: !0 }
38
- : { Wn: !1, reason: "unsupported" },
39
- Yn: (o, i) =>
36
+ ? { Zn: !1, reason: "permissionGranted" }
37
+ : { Zn: !0 }
38
+ : { Zn: !1, reason: "unsupported" },
39
+ _o: (o, i) =>
40
40
  "blocked" === o
41
41
  ? `${i} containing a push prompt is not being shown because the user has already declined push permission prompt.`
42
42
  : "unsupported" === o
@@ -1,6 +1,6 @@
1
1
  import _t from "../models/identifier.js";
2
- import { getByteLength as ir } from "../util/string-utils.js";
3
- import oi from "../models/push-token.js";
2
+ import { getByteLength as er } from "../util/string-utils.js";
3
+ import ui from "../models/push-token.js";
4
4
  import { logger as E, IndexedDBAdapter as et } from "../../shared-lib/index.js";
5
5
  import { STORAGE_KEYS as s } from "../managers/storage-manager.js";
6
6
  import { User } from "../User/index.js";
@@ -12,9 +12,9 @@ export default class Ut {
12
12
  const t = this.C.$u(s.Ou.Cu);
13
13
  if (null == t) return null;
14
14
  let i = t.Tu,
15
- e = ir(i);
15
+ e = er(i);
16
16
  if (e > User.br) {
17
- for (; e > User.br; ) (i = i.slice(0, i.length - 1)), (e = ir(i));
17
+ for (; e > User.br; ) (i = i.slice(0, i.length - 1)), (e = er(i));
18
18
  (t.Tu = i), this.C.Iu(s.Ou.Cu, t);
19
19
  }
20
20
  return i;
@@ -54,7 +54,7 @@ export default class Ut {
54
54
  this.zu("custom_push_vapid_public_key", o, !1, !0);
55
55
  const r = et.Ps.$s,
56
56
  h = new et(r, E),
57
- n = new oi(t, i, e, u, o);
57
+ n = new ui(t, i, e, u, o);
58
58
  this.C.It(s.Tt.Uu, n.qt()), h.setItem(r.Os.Fu, r.be, !0);
59
59
  }
60
60
  wu(t) {
package/src/User/user.js CHANGED
@@ -261,7 +261,7 @@ export default class User {
261
261
  "addToSubscriptionGroup requires a non-empty subscription group ID",
262
262
  ),
263
263
  !1)
264
- : this.Ru.va(t, User.Ia.SUBSCRIBED).lt;
264
+ : this.Ru.Ia(t, User.Ca.SUBSCRIBED).lt;
265
265
  }
266
266
  removeFromSubscriptionGroup(t) {
267
267
  return !tr(
@@ -274,21 +274,21 @@ export default class User {
274
274
  "removeFromSubscriptionGroup requires a non-empty subscription group ID",
275
275
  ),
276
276
  !1)
277
- : this.Ru.va(t, User.Ia.UNSUBSCRIBED).lt;
277
+ : this.Ru.Ia(t, User.Ca.UNSUBSCRIBED).lt;
278
278
  }
279
279
  setLineId(t) {
280
280
  return tr(t, "set LINE user ID", "the ID", !0) &&
281
281
  0 !== (null == t ? void 0 : t.length)
282
- ? t && t.length > User.Ca
282
+ ? t && t.length > User.Ea
283
283
  ? (E.error(
284
- `Rejected LINE user ID ${t} because it is longer than ${User.Ca} characters.`,
284
+ `Rejected LINE user ID ${t} because it is longer than ${User.Ea} characters.`,
285
285
  ),
286
286
  !1)
287
287
  : this.Ss.zu("native_line_id", t)
288
288
  : (E.error("setLineId requires a non-empty ID"), !1);
289
289
  }
290
290
  gu(t, e, r, s, n) {
291
- this.Ss.gu(t, e, r, s, n), this.Ru.Ea();
291
+ this.Ss.gu(t, e, r, s, n), this.Ru.Sa();
292
292
  }
293
293
  wu(t) {
294
294
  this.Ss.wu(t);
@@ -308,8 +308,8 @@ export default class User {
308
308
  UNSUBSCRIBED: "unsubscribed",
309
309
  }),
310
310
  (User.Hu = /^[0-9 .\\(\\)\\+\\-]+$/),
311
- (User.Ia = { SUBSCRIBED: "subscribed", UNSUBSCRIBED: "unsubscribed" }),
312
- (User.Sa = "user_id"),
311
+ (User.Ca = { SUBSCRIBED: "subscribed", UNSUBSCRIBED: "unsubscribed" }),
312
+ (User.Aa = "user_id"),
313
313
  (User.Bu = "custom"),
314
314
  (User.br = 997),
315
- (User.Ca = 33);
315
+ (User.Ea = 33);
@@ -12,5 +12,6 @@ export const REQUEST_BACKOFF_MAX_SLEEP_MS_DEFAULT = 3e5;
12
12
  export const CoreStrings = {
13
13
  ee: "Braze must be initialized before calling methods.",
14
14
  je: "logCustomEvent",
15
+ QE: "logEcommerceEvent",
15
16
  Ku: "setCustomUserAttribute",
16
17
  };
@@ -63,7 +63,7 @@ export function generateContentCardsUI(t, e) {
63
63
  for (const a of t.cards) {
64
64
  const i = a instanceof ControlCard;
65
65
  !i || t.hr()
66
- ? (o.appendChild(qt(a, r, e, n.wa())), (s = s || !i))
66
+ ? (o.appendChild(qt(a, r, e, n.ya())), (s = s || !i))
67
67
  : E.error(
68
68
  "Received a control card for a legacy news feed. Control cards are only supported with content cards.",
69
69
  );
@@ -188,7 +188,7 @@ export function updateContentCards(t, e, n, o, s) {
188
188
  if (t.url && to.test(t.url)) {
189
189
  const e = eo(t.url);
190
190
  if (vt(e)) {
191
- E.error(yt(bt.Un, "Content Card"));
191
+ E.error(yt(bt.Wn, "Content Card"));
192
192
  continue;
193
193
  }
194
194
  }
@@ -8,7 +8,7 @@ const Je = {
8
8
  if ((Je.t(), !Je.na)) {
9
9
  let e = ro.language,
10
10
  t = !1;
11
- r.er(U.qa) && ((e = r.er(U.qa)), (t = !0)), (Je.na = new gr(e, t));
11
+ r.er(U.Ba) && ((e = r.er(U.Ba)), (t = !0)), (Je.na = new gr(e, t));
12
12
  }
13
13
  return Je.na;
14
14
  },
@@ -22,7 +22,7 @@ export default class gr {
22
22
  get(t) {
23
23
  return zt[this.language][t];
24
24
  }
25
- wa() {
25
+ ya() {
26
26
  switch (this.language) {
27
27
  case "ar":
28
28
  case "he":
@@ -17,14 +17,14 @@ import ne, { STORAGE_KEYS as s } from "./storage-manager.js";
17
17
  import Zt from "./storage-manager-factory.js";
18
18
  import f from "./subscription-manager.js";
19
19
  import { TriggersProviderFactory as rt } from "../triggers/triggers-provider-factory.js";
20
- import sr from "../DUST/dust-provider-factory.js";
20
+ import dr from "../DUST/dust-provider-factory.js";
21
21
  import { subscribeToDust as Qt } from "../DUST/subscribe-to-dust.js";
22
22
  import Ut from "../User/user-manager.js";
23
23
  import { User } from "../User/index.js";
24
24
  import { parseQueryStringKeyValues as lt } from "../util/url-utils.js";
25
25
  import { WindowUtils as no } from "../util/window-utils.js";
26
26
  import { CoreStrings as R } from "../common/constants.js";
27
- import { SupportedOptions as hi, logger as E } from "../../shared-lib/index.js";
27
+ import { SupportedOptions as li, logger as E } from "../../shared-lib/index.js";
28
28
  import _t from "../models/identifier.js";
29
29
  const U = {
30
30
  _h: "allowCrawlerActivity",
@@ -32,30 +32,30 @@ const U = {
32
32
  se: "cookieExpiryInDays",
33
33
  Oh: "noCookies",
34
34
  Th: "devicePropertyAllowlist",
35
- ka: "disablePushTokenMaintenance",
35
+ qa: "disablePushTokenMaintenance",
36
36
  Rh: "enableLogging",
37
37
  Ph: "enableSdkAuthentication",
38
- _a: "manageServiceWorkerExternally",
38
+ ka: "manageServiceWorkerExternally",
39
39
  Dh: "minimumIntervalBetweenTriggerActionsInSeconds",
40
40
  Lh: "sessionTimeoutInSeconds",
41
41
  yh: "appVersion",
42
42
  Mh: "appVersionNumber",
43
43
  xa: "serviceWorkerLocation",
44
- Ma: "safariWebsitePushId",
45
- qa: "localization",
44
+ _a: "safariWebsitePushId",
45
+ Ba: "localization",
46
46
  sr: "contentSecurityNonce",
47
47
  nr: "allowUserSuppliedJavascript",
48
- ja: "inAppMessageZIndex",
49
- ba: "openInAppMessagesInNewTab",
48
+ wa: "inAppMessageZIndex",
49
+ va: "openInAppMessagesInNewTab",
50
50
  tn: "openCardsInNewTab",
51
51
  oh: "requireExplicitInAppMessageDismissal",
52
52
  Uh: "doNotLoadFontAwesome",
53
53
  Wh: "deviceId",
54
- ya: "serviceWorkerScope",
55
- Qe: "dustHost",
54
+ Ma: "serviceWorkerScope",
55
+ Xe: "dustHost",
56
56
  Bh: "sdkFlavor",
57
57
  };
58
- class li {
58
+ class ci {
59
59
  constructor() {
60
60
  (this.tu = ""),
61
61
  (this.Vh = ""),
@@ -77,7 +77,7 @@ class li {
77
77
  (this.Jh = []),
78
78
  (this.Xh = []),
79
79
  (this.In = []),
80
- (this.Vh = "6.7.1");
80
+ (this.Vh = "6.8.0");
81
81
  }
82
82
  Zh(t) {
83
83
  this.qh.Kt(t);
@@ -133,7 +133,7 @@ class li {
133
133
  !1
134
134
  );
135
135
  for (const t of D(this.options))
136
- -1 === Wt(hi).indexOf(t) &&
136
+ -1 === Wt(li).indexOf(t) &&
137
137
  E.warn(`Ignoring unknown initialization option '${t}'.`);
138
138
  const p = ["mparticle", "wordpress", "tealium"];
139
139
  if (null != this.er(U.Bh)) {
@@ -142,7 +142,7 @@ class li {
142
142
  ? (this.Kh = t)
143
143
  : E.error("Invalid sdk flavor passed: " + t);
144
144
  }
145
- let d = this.er(hi.Th);
145
+ let d = this.er(li.Th);
146
146
  if (null != d)
147
147
  if (g(d)) {
148
148
  const t = [];
@@ -238,7 +238,7 @@ class li {
238
238
  : r.ul(new Date().valueOf(), S)) ||
239
239
  null === (o = this.Ru) ||
240
240
  void 0 === o ||
241
- o.Sr(),
241
+ o.Ar(),
242
242
  !0
243
243
  );
244
244
  }
@@ -273,7 +273,7 @@ class li {
273
273
  za() {
274
274
  return this.tu;
275
275
  }
276
- Br() {
276
+ Er() {
277
277
  return this.Gh;
278
278
  }
279
279
  ht() {
@@ -309,7 +309,7 @@ class li {
309
309
  ir() {
310
310
  return this.Ss;
311
311
  }
312
- ar() {
312
+ dr() {
313
313
  return !0 === this.er(U.nr);
314
314
  }
315
315
  g(t) {
@@ -340,13 +340,13 @@ class li {
340
340
  cl() {
341
341
  return this.$h;
342
342
  }
343
- dr(t, i) {
343
+ ar(t, i) {
344
344
  if (!this.rr()) return null;
345
- return sr.o().Ze(t, i);
345
+ return dr.o().en(t, i);
346
346
  }
347
347
  zi() {
348
348
  return this.Vh;
349
349
  }
350
350
  }
351
- const r = new li();
352
- export { r as default, li as BrazeSdkInstance, U as OPTIONS };
351
+ const r = new ci();
352
+ export { r as default, ci as BrazeSdkInstance, U as OPTIONS };
@@ -5,7 +5,7 @@ import _t from "../models/identifier.js";
5
5
  import { logger as E, Guid as V } from "../../shared-lib/index.js";
6
6
  import { STORAGE_KEYS as s } from "../managers/storage-manager.js";
7
7
  import { values as Wt } from "../util/code-utils.js";
8
- import { getErrorMessage as ai } from "../util/error-utils.js";
8
+ import { getErrorMessage as hi } from "../util/error-utils.js";
9
9
  export default class Pt {
10
10
  constructor(t, e) {
11
11
  (this.C = t),
@@ -45,8 +45,8 @@ export default class Pt {
45
45
  return r;
46
46
  }
47
47
  Fa() {
48
- if (ro.Aa()) return ro.Aa();
49
- const t = this.C.Rt(s.Tt.Ba);
48
+ if (ro.Ha()) return ro.Ha();
49
+ const t = this.C.Rt(s.Tt.Ka);
50
50
  return t && t.os_version ? t.os_version : ro.Fa();
51
51
  }
52
52
  Ja(t) {
@@ -60,15 +60,15 @@ export default class Pt {
60
60
  } catch (t) {
61
61
  E.info(
62
62
  "Intl.DateTimeFormat threw an error, cannot detect user's time zone:" +
63
- ai(t),
63
+ hi(t),
64
64
  ),
65
65
  (e = !0);
66
66
  }
67
67
  if (e) return "";
68
68
  const r = t.getTimezoneOffset();
69
- return this.Ha(r);
69
+ return this.La(r);
70
70
  }
71
- Ha(t) {
71
+ La(t) {
72
72
  const e = Math.trunc(t / 60),
73
73
  r = Math.trunc(t % 60);
74
74
  let s = "GMT";