@braze/web-sdk 6.8.0 → 6.10.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 (141) hide show
  1. package/index.d.ts +113 -21
  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/index.js +1 -0
  43. package/src/Core/log-custom-event.js +5 -5
  44. package/src/Core/log-ecommerce-event.js +5 -5
  45. package/src/Core/log-purchase.js +9 -9
  46. package/src/Core/logout.js +22 -0
  47. package/src/Core/open-session.js +7 -7
  48. package/src/Core/set-logger.js +2 -2
  49. package/src/Core/toggle-logging.js +2 -2
  50. package/src/Core/wipe-data.js +6 -6
  51. package/src/DUST/dust-provider.js +249 -240
  52. package/src/DUST/dust-shared-worker-code.js +1 -1
  53. package/src/DUST/dust-shared-worker-impl.js +15 -14
  54. package/src/DUST/dust-worker-bridge.js +50 -35
  55. package/src/DUST/subscribe-to-dust.js +7 -7
  56. package/src/FeatureFlags/feature-flag-factory.js +8 -8
  57. package/src/FeatureFlags/feature-flag.js +3 -3
  58. package/src/FeatureFlags/feature-flags-provider.js +21 -21
  59. package/src/FeatureFlags/log-feature-flag-impression.js +5 -5
  60. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +1 -1
  61. package/src/InAppMessage/constants.js +3 -3
  62. package/src/InAppMessage/defer-in-app-message.js +4 -4
  63. package/src/InAppMessage/display/html-message-to-html.js +4 -4
  64. package/src/InAppMessage/display/in-app-message-to-html.js +16 -16
  65. package/src/InAppMessage/in-app-message-factory.js +36 -36
  66. package/src/InAppMessage/in-app-message-manager.js +78 -78
  67. package/src/InAppMessage/log-in-app-message-button-click.js +4 -4
  68. package/src/InAppMessage/log-in-app-message-click.js +3 -3
  69. package/src/InAppMessage/log-in-app-message-html-click.js +5 -5
  70. package/src/InAppMessage/log-in-app-message-impression.js +4 -4
  71. package/src/InAppMessage/models/control-message.js +4 -4
  72. package/src/InAppMessage/models/full-screen-message.js +4 -4
  73. package/src/InAppMessage/models/html-message.js +3 -3
  74. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  75. package/src/InAppMessage/models/in-app-message.js +12 -12
  76. package/src/InAppMessage/models/modal-message.js +4 -4
  77. package/src/InAppMessage/models/slide-up-message.js +4 -4
  78. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  79. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  80. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  81. package/src/InAppMessage/ui/show-in-app-message.js +14 -14
  82. package/src/Push/push-manager-factory.js +2 -2
  83. package/src/Push/push-manager.js +38 -38
  84. package/src/Push/unregister-push-token-on-server.js +35 -0
  85. package/src/Push/unregister-push.js +2 -1
  86. package/src/Push/utils/push-utils.js +6 -6
  87. package/src/User/user-manager.js +14 -14
  88. package/src/User/user.js +25 -25
  89. package/src/common/base-provider.js +1 -1
  90. package/src/common/content-cards-display.js +7 -7
  91. package/src/common/event-logger.js +3 -3
  92. package/src/common/properties-base.js +3 -3
  93. package/src/l10n/l10n-manager-factory.js +2 -2
  94. package/src/l10n/l10n-manager.js +4 -4
  95. package/src/managers/auth-manager.js +11 -11
  96. package/src/managers/braze-instance.js +56 -56
  97. package/src/managers/device-manager.js +10 -10
  98. package/src/managers/network-manager.js +103 -102
  99. package/src/managers/server-config-manager.js +112 -95
  100. package/src/managers/session-manager.js +20 -20
  101. package/src/managers/storage-manager-factory.js +9 -9
  102. package/src/managers/storage-manager.js +73 -73
  103. package/src/managers/subscription-manager.js +2 -2
  104. package/src/managers/utils.js +1 -1
  105. package/src/models/backend-errors.js +5 -5
  106. package/src/models/braze-event.js +1 -1
  107. package/src/models/device.js +1 -1
  108. package/src/models/identifier.js +2 -2
  109. package/src/models/push-token.js +6 -6
  110. package/src/models/request-result.js +1 -1
  111. package/src/models/server-config.js +42 -24
  112. package/src/request-controller.js +126 -126
  113. package/src/triggers/models/custom-event-data.js +4 -4
  114. package/src/triggers/models/custom-event-property-data.js +5 -5
  115. package/src/triggers/models/filter-set.js +2 -2
  116. package/src/triggers/models/filter.js +1 -1
  117. package/src/triggers/models/in-app-message-click-data.js +1 -1
  118. package/src/triggers/models/purchase-data.js +1 -1
  119. package/src/triggers/models/purchase-property-data.js +2 -2
  120. package/src/triggers/models/push-click-data.js +3 -3
  121. package/src/triggers/models/trigger-condition.js +36 -36
  122. package/src/triggers/models/trigger-events.js +1 -1
  123. package/src/triggers/models/trigger.js +33 -33
  124. package/src/triggers/triggers-provider-factory.js +1 -1
  125. package/src/triggers/triggers-provider.js +68 -68
  126. package/src/types.js +2 -2
  127. package/src/ui/js/attach-css.js +1 -1
  128. package/src/util/braze-actions.js +7 -7
  129. package/src/util/browser-detector.js +2 -2
  130. package/src/util/client-hints-parser.js +4 -4
  131. package/src/util/code-utils.js +2 -2
  132. package/src/util/deprecation-utils.js +2 -2
  133. package/src/util/dom-utils.js +7 -7
  134. package/src/util/ecommerce-event-validation.js +52 -35
  135. package/src/util/html-display-utils.js +11 -11
  136. package/src/util/net.js +4 -4
  137. package/src/util/request-header-utils.js +36 -35
  138. package/src/util/string-utils.js +2 -2
  139. package/src/util/user-agent-parser.js +2 -2
  140. package/src/util/validation-utils.js +12 -12
  141. package/src/util/window-utils.js +2 -2
@@ -28,15 +28,15 @@ const It = {
28
28
  null != window.Notification &&
29
29
  null != window.Notification.permission &&
30
30
  "granted" === window.Notification.permission,
31
- Yn: () =>
31
+ Vn: () =>
32
32
  It.isPushBlocked()
33
- ? { Zn: !1, reason: "blocked" }
33
+ ? { Wn: !1, reason: "blocked" }
34
34
  : It.isPushSupported()
35
35
  ? It.isPushPermissionGranted()
36
- ? { Zn: !1, reason: "permissionGranted" }
37
- : { Zn: !0 }
38
- : { Zn: !1, reason: "unsupported" },
39
- _o: (o, i) =>
36
+ ? { Wn: !1, reason: "permissionGranted" }
37
+ : { Wn: !0 }
38
+ : { Wn: !1, reason: "unsupported" },
39
+ Yn: (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,38 +1,38 @@
1
1
  import _t from "../models/identifier.js";
2
2
  import { getByteLength as er } from "../util/string-utils.js";
3
3
  import ui from "../models/push-token.js";
4
- import { logger as E, IndexedDBAdapter as et } from "../../shared-lib/index.js";
4
+ import { logger as b, 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";
7
7
  export default class Ut {
8
8
  constructor(t, s) {
9
- (this.h = t), (this.C = s), (this.h = t), (this.C = s);
9
+ (this.h = t), (this.j = s), (this.h = t), (this.j = s);
10
10
  }
11
11
  getUserId() {
12
- const t = this.C.$u(s.Ou.Cu);
12
+ const t = this.j.$u(s.Ou.Cu);
13
13
  if (null == t) return null;
14
14
  let i = t.Tu,
15
15
  e = er(i);
16
16
  if (e > User.br) {
17
17
  for (; e > User.br; ) (i = i.slice(0, i.length - 1)), (e = er(i));
18
- (t.Tu = i), this.C.Iu(s.Ou.Cu, t);
18
+ (t.Tu = i), this.j.Iu(s.Ou.Cu, t);
19
19
  }
20
20
  return i;
21
21
  }
22
22
  Ju(t) {
23
23
  const i = null == this.getUserId();
24
- this.C.Iu(s.Ou.Cu, new _t(t)), i && this.C.Lu(t);
24
+ this.j.Iu(s.Ou.Cu, new _t(t)), i && this.j.Lu(t);
25
25
  }
26
26
  setCustomUserAttribute(t, s) {
27
27
  if (this.h.qu(t))
28
28
  return (
29
- E.info('Custom Attribute "' + t + '" is blocklisted, ignoring.'), !1
29
+ b.info('Custom Attribute "' + t + '" is blocklisted, ignoring.'), !1
30
30
  );
31
31
  const i = {};
32
32
  return (i[t] = s), this.zu(User.Bu, i, !0);
33
33
  }
34
34
  zu(t, s, i = !1, e = !1) {
35
- const u = this.C.Eu(this.getUserId(), t, s);
35
+ const u = this.j.Eu(this.getUserId(), t, s);
36
36
  let o = "",
37
37
  r = t,
38
38
  h = s;
@@ -43,7 +43,7 @@ export default class Ut {
43
43
  ((r = Object.keys(s)[0]),
44
44
  (h = s[r]),
45
45
  "object" == typeof h && (h = JSON.stringify(h, null, 2)))),
46
- !e && u && E.info(`Logged${o} attribute ${r} with value ${h}`),
46
+ !e && u && b.info(`Logged${o} attribute ${r} with value ${h}`),
47
47
  u
48
48
  );
49
49
  }
@@ -52,10 +52,10 @@ export default class Ut {
52
52
  this.zu("custom_push_public_key", e, !1, !0),
53
53
  this.zu("custom_push_user_auth", u, !1, !0),
54
54
  this.zu("custom_push_vapid_public_key", o, !1, !0);
55
- const r = et.Ps.$s,
56
- h = new et(r, E),
55
+ const r = et._s.Xs,
56
+ h = new et(r, b),
57
57
  n = new ui(t, i, e, u, o);
58
- this.C.It(s.Tt.Uu, n.qt()), h.setItem(r.Os.Fu, r.be, !0);
58
+ this.j.Pt(s.It.Uu, n.qt()), h.setItem(r.Ws.Fu, r.be, !0);
59
59
  }
60
60
  wu(t) {
61
61
  if (
@@ -65,9 +65,9 @@ export default class Ut {
65
65
  this.zu("custom_push_vapid_public_key", null, !1, !0),
66
66
  t)
67
67
  ) {
68
- const t = et.Ps.$s,
69
- i = new et(t, E);
70
- this.C.It(s.Tt.Uu, !1), i.setItem(t.Os.Fu, t.be, !1);
68
+ const t = et._s.Xs,
69
+ i = new et(t, b);
70
+ this.j.Pt(s.It.Uu, !1), i.setItem(t.Ws.Fu, t.be, !1);
71
71
  }
72
72
  }
73
73
  }
package/src/User/user.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  isObject as Ct,
5
5
  validateValueIsFromEnum as ta,
6
6
  } from "../util/code-utils.js";
7
- import { logger as E, EventTypes as p } from "../../shared-lib/index.js";
7
+ import { logger as b, EventTypes as p } from "../../shared-lib/index.js";
8
8
  import {
9
9
  isValidEmail as At,
10
10
  validateCustomAttributeArrayType as Dt,
@@ -23,16 +23,16 @@ export default class User {
23
23
  getUserId(t) {
24
24
  const e = this.Ss.getUserId();
25
25
  if ("function" != typeof t) return e;
26
- E.warn(
26
+ b.warn(
27
27
  "The callback for getUserId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getUser().getUserId()`)",
28
28
  ),
29
29
  t(e);
30
30
  }
31
31
  addAlias(t, e) {
32
32
  return !tr(t, "add alias", "the alias", !1) || t.length <= 0
33
- ? (E.error("addAlias requires a non-empty alias"), !1)
33
+ ? (b.error("addAlias requires a non-empty alias"), !1)
34
34
  : !tr(e, "add alias", "the label", !1) || e.length <= 0
35
- ? (E.error("addAlias requires a non-empty label"), !1)
35
+ ? (b.error("addAlias requires a non-empty label"), !1)
36
36
  : this.Ru.Gu(t, e).lt;
37
37
  }
38
38
  setFirstName(t) {
@@ -49,7 +49,7 @@ export default class User {
49
49
  setEmail(t) {
50
50
  return null === t || At(t)
51
51
  ? this.Ss.zu("email", t)
52
- : (E.error(
52
+ : (b.error(
53
53
  `Cannot set email address - "${t}" did not pass RFC-5322 validation.`,
54
54
  ),
55
55
  !1);
@@ -84,7 +84,7 @@ export default class User {
84
84
  e < 1 ||
85
85
  r > 31 ||
86
86
  r < 1
87
- ? (E.error(
87
+ ? (b.error(
88
88
  "Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);",
89
89
  ),
90
90
  !1)
@@ -130,13 +130,13 @@ export default class User {
130
130
  !!tr(t, "set phone number", "the phoneNumber", !0) &&
131
131
  (null === t || t.match(User.Hu)
132
132
  ? this.Ss.zu("phone", t)
133
- : (E.error(`Cannot set phone number - "${t}" did not pass validation.`),
133
+ : (b.error(`Cannot set phone number - "${t}" did not pass validation.`),
134
134
  !1))
135
135
  );
136
136
  }
137
137
  setLastKnownLocation(t, e, r, s, n) {
138
138
  return null == t || null == e
139
- ? (E.error(
139
+ ? (b.error(
140
140
  "Cannot set last-known location - latitude and longitude are required.",
141
141
  ),
142
142
  !1)
@@ -150,17 +150,17 @@ export default class User {
150
150
  (null != r && isNaN(r)) ||
151
151
  (null != s && isNaN(s)) ||
152
152
  (null != n && isNaN(n))
153
- ? (E.error(
153
+ ? (b.error(
154
154
  "Cannot set last-known location - all supplied parameters must be numeric.",
155
155
  ),
156
156
  !1)
157
157
  : t > 90 || t < -90 || e > 180 || e < -180
158
- ? (E.error(
158
+ ? (b.error(
159
159
  "Cannot set last-known location - latitude and longitude are bounded by ±90 and ±180 respectively.",
160
160
  ),
161
161
  !1)
162
162
  : (null != r && r < 0) || (null != n && n < 0)
163
- ? (E.error(
163
+ ? (b.error(
164
164
  "Cannot set last-known location - accuracy and altitudeAccuracy may not be negative.",
165
165
  ),
166
166
  !1)
@@ -227,7 +227,7 @@ export default class User {
227
227
  null == e && (e = 1);
228
228
  const r = parseInt(e.toString());
229
229
  return isNaN(r) || r !== parseFloat(e.toString())
230
- ? (E.error(
230
+ ? (b.error(
231
231
  `Cannot increment custom user attribute because the given incrementValue "${e}" is not an integer.`,
232
232
  ),
233
233
  !1)
@@ -243,7 +243,7 @@ export default class User {
243
243
  (null != e && null == r) ||
244
244
  (null != e && (isNaN(e) || e > 90 || e < -90)) ||
245
245
  (null != r && (isNaN(r) || r > 180 || r < -180)))
246
- ? (E.error(
246
+ ? (b.error(
247
247
  "Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by ±90 and ±180 respectively, or must both be null for removal.",
248
248
  ),
249
249
  !1)
@@ -257,11 +257,11 @@ export default class User {
257
257
  "subscription group ID",
258
258
  !1,
259
259
  ) || t.length <= 0
260
- ? (E.error(
260
+ ? (b.error(
261
261
  "addToSubscriptionGroup requires a non-empty subscription group ID",
262
262
  ),
263
263
  !1)
264
- : this.Ru.Ia(t, User.Ca.SUBSCRIBED).lt;
264
+ : this.Ru.va(t, User.Ia.SUBSCRIBED).lt;
265
265
  }
266
266
  removeFromSubscriptionGroup(t) {
267
267
  return !tr(
@@ -270,25 +270,25 @@ export default class User {
270
270
  "subscription group ID",
271
271
  !1,
272
272
  ) || t.length <= 0
273
- ? (E.error(
273
+ ? (b.error(
274
274
  "removeFromSubscriptionGroup requires a non-empty subscription group ID",
275
275
  ),
276
276
  !1)
277
- : this.Ru.Ia(t, User.Ca.UNSUBSCRIBED).lt;
277
+ : this.Ru.va(t, User.Ia.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.Ea
283
- ? (E.error(
284
- `Rejected LINE user ID ${t} because it is longer than ${User.Ea} characters.`,
282
+ ? t && t.length > User.Ca
283
+ ? (b.error(
284
+ `Rejected LINE user ID ${t} because it is longer than ${User.Ca} characters.`,
285
285
  ),
286
286
  !1)
287
287
  : this.Ss.zu("native_line_id", t)
288
- : (E.error("setLineId requires a non-empty ID"), !1);
288
+ : (b.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.Sa();
291
+ this.Ss.gu(t, e, r, s, n), this.Ru.Ea();
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.Ca = { SUBSCRIBED: "subscribed", UNSUBSCRIBED: "unsubscribed" }),
312
- (User.Aa = "user_id"),
311
+ (User.Ia = { SUBSCRIBED: "subscribed", UNSUBSCRIBED: "unsubscribed" }),
312
+ (User.Sa = "user_id"),
313
313
  (User.Bu = "custom"),
314
314
  (User.br = 997),
315
- (User.Ea = 33);
315
+ (User.Ca = 33);
@@ -1,6 +1,6 @@
1
1
  export default class t {
2
2
  constructor() {}
3
- I(a) {}
3
+ q(a) {}
4
4
  changeUser(a = !1) {}
5
5
  clearData(a = !1) {}
6
6
  }
@@ -9,7 +9,7 @@ import { isArray as g } from "../util/code-utils.js";
9
9
  import { KeyCodes as Ce } from "../util/key-codes.js";
10
10
  import Je from "../l10n/l10n-manager-factory.js";
11
11
  import { removeSubscription } from "../Core/remove-subscription.js";
12
- import { logger as E, Guid as V } from "../../shared-lib/index.js";
12
+ import { logger as b, Guid as V } from "../../shared-lib/index.js";
13
13
  import { BRAZE_ACTION_URI_REGEX as to } from "../util/validation-utils.js";
14
14
  import {
15
15
  INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as bt,
@@ -23,7 +23,7 @@ import {
23
23
  impressOnTop as B,
24
24
  topHadImpression as Bt,
25
25
  } from "./detect-impression.js";
26
- import { BannerStrings as j } from "../Banner/constants.js";
26
+ import { BannerStrings as x } from "../Banner/constants.js";
27
27
  import ContentCards from "../ContentCards/content-cards.js";
28
28
  export const LAST_REQUESTED_REFRESH_DATA_ATTRIBUTE =
29
29
  "data-last-requested-refresh";
@@ -35,7 +35,7 @@ export function destroyContentCardsHtml(t) {
35
35
  setTimeout(() => {
36
36
  t && t.parentNode && t.parentNode.removeChild(t);
37
37
  }, ContentCards.gr));
38
- const e = t.getAttribute(j.ea);
38
+ const e = t.getAttribute(x.ea);
39
39
  null != e && removeSubscription(e);
40
40
  const n = t.getAttribute("data-listener-id");
41
41
  null != n &&
@@ -63,8 +63,8 @@ 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.ya())), (s = s || !i))
67
- : E.error(
66
+ ? (o.appendChild(qt(a, r, e, n.wa())), (s = s || !i))
67
+ : b.error(
68
68
  "Received a control card for a legacy news feed. Control cards are only supported with content cards.",
69
69
  );
70
70
  }
@@ -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.Wn, "Content Card"));
191
+ b.error(yt(bt.Un, "Content Card"));
192
192
  continue;
193
193
  }
194
194
  }
@@ -207,5 +207,5 @@ export function updateContentCards(t, e, n, o, s) {
207
207
  }
208
208
  }
209
209
  export function registerContentCardsSubscriptionId(t, e) {
210
- t && e.setAttribute(j.ea, t);
210
+ t && e.setAttribute(x.ea, t);
211
211
  }
@@ -1,15 +1,15 @@
1
- import { logger as E } from "../../shared-lib/index.js";
1
+ import { logger as b } from "../../shared-lib/index.js";
2
2
  import r from "../managers/braze-instance.js";
3
3
  import Ie from "../models/braze-event.js";
4
4
  import L from "../models/request-result.js";
5
5
  const v = {
6
- wt: (e, o, t) => {
6
+ Dt: (e, o, t) => {
7
7
  var n, s;
8
8
  const i = new L(),
9
9
  l = r.u();
10
10
  if (!l)
11
11
  return (
12
- E.info(
12
+ b.info(
13
13
  `Not logging event with type "${e}" because the current session ID could not be found.`,
14
14
  ),
15
15
  i
@@ -1,4 +1,4 @@
1
- import { logger as E } from "../../shared-lib/index.js";
1
+ import { logger as b } from "../../shared-lib/index.js";
2
2
  export class PropertiesBase {
3
3
  constructor(t) {
4
4
  (this.properties = t), (this.properties = t || {});
@@ -26,10 +26,10 @@ export class PropertiesBase {
26
26
  return this.tp(t, this.up, "datetime");
27
27
  }
28
28
  ep(t) {
29
- E.info(`Property is not of type ${t}.`);
29
+ b.info(`Property is not of type ${t}.`);
30
30
  }
31
31
  rp(t) {
32
- E.info(`${t} not found in properties.`);
32
+ b.info(`${t} not found in properties.`);
33
33
  }
34
34
  op(t) {
35
35
  return "string" === t.type && "string" == typeof t.value;
@@ -1,6 +1,6 @@
1
1
  import r, { OPTIONS as U } from "../managers/braze-instance.js";
2
2
  import ro from "../util/browser-detector.js";
3
- import gr from "./l10n-manager.js";
3
+ import jr from "./l10n-manager.js";
4
4
  const Je = {
5
5
  i: !1,
6
6
  na: null,
@@ -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.Ba) && ((e = r.er(U.Ba)), (t = !0)), (Je.na = new gr(e, t));
11
+ r.er(U.Aa) && ((e = r.er(U.Aa)), (t = !0)), (Je.na = new jr(e, t));
12
12
  }
13
13
  return Je.na;
14
14
  },
@@ -1,6 +1,6 @@
1
- import { logger as E } from "../../shared-lib/index.js";
1
+ import { logger as b } from "../../shared-lib/index.js";
2
2
  import zt from "../common/translations.js";
3
- export default class gr {
3
+ export default class jr {
4
4
  constructor(t, e = !1) {
5
5
  if (
6
6
  ((this.language = t),
@@ -15,14 +15,14 @@ export default class gr {
15
15
  "Braze does not yet have a localization for language " +
16
16
  t +
17
17
  ", defaulting to English. Please contact us if you are willing and able to help us translate our SDK into this language.";
18
- e ? E.error(a) : E.info(a), (t = "en");
18
+ e ? b.error(a) : b.info(a), (t = "en");
19
19
  }
20
20
  this.language = t;
21
21
  }
22
22
  get(t) {
23
23
  return zt[this.language][t];
24
24
  }
25
- ya() {
25
+ wa() {
26
26
  switch (this.language) {
27
27
  case "ar":
28
28
  case "he":
@@ -1,12 +1,12 @@
1
1
  import { STORAGE_KEYS as s } from "./storage-manager.js";
2
2
  import f from "./subscription-manager.js";
3
- import { logger as E, IndexedDBAdapter as et } from "../../shared-lib/index.js";
3
+ import { logger as b, IndexedDBAdapter as et } from "../../shared-lib/index.js";
4
4
  export default class Gt {
5
5
  constructor(t, i, s) {
6
- (this.C = t),
6
+ (this.j = t),
7
7
  (this.gh = i),
8
8
  (this.bh = s),
9
- (this.C = t),
9
+ (this.j = t),
10
10
  (this.gh = i || !1),
11
11
  (this.bh = s),
12
12
  (this.Sh = new f()),
@@ -17,21 +17,21 @@ export default class Gt {
17
17
  return this.gh;
18
18
  }
19
19
  kh() {
20
- return this.C.Rt(s.Tt.fh);
20
+ return this.j.St(s.It.fh);
21
21
  }
22
22
  setSdkAuthenticationSignature(t) {
23
23
  const i = this.kh();
24
- this.C.It(s.Tt.fh, t);
25
- const e = et.Ps.$s;
26
- new et(e, E).setItem(e.Os.wh, this.ph, t), i !== t && this.ct();
24
+ this.j.Pt(s.It.fh, t);
25
+ const e = et._s.Xs;
26
+ new et(e, b).setItem(e.Ws.wh, this.ph, t), i !== t && this.ct();
27
27
  }
28
28
  jh() {
29
- this.C.Qt(s.Tt.fh);
30
- const t = et.Ps.$s;
31
- new et(t, E).ge(t.Os.wh, this.ph);
29
+ this.j.Vt(s.It.fh);
30
+ const t = et._s.Xs;
31
+ new et(t, b).ge(t.Ws.wh, this.ph);
32
32
  }
33
33
  subscribeToSdkAuthenticationFailures(t) {
34
- return this.bh.Kt(t);
34
+ return this.bh.Ut(t);
35
35
  }
36
36
  Ch(t) {
37
37
  this.bh.A(t);