@braze/web-sdk 4.9.0 → 5.0.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 (111) hide show
  1. package/index.d.ts +2204 -2230
  2. package/package.json +1 -1
  3. package/shared-lib/braze-shared-lib.js +1 -1
  4. package/shared-lib/event-types.js +9 -9
  5. package/shared-lib/indexed-db-adapter.js +13 -13
  6. package/shared-lib/logger.js +2 -2
  7. package/shared-lib/supported-options.js +8 -8
  8. package/src/Card/models/captioned-image.js +19 -19
  9. package/src/Card/models/card.js +95 -94
  10. package/src/Card/models/classic-card.js +19 -19
  11. package/src/Card/models/control-card.js +9 -9
  12. package/src/Card/models/image-only.js +21 -22
  13. package/src/Card/models/index.js +0 -1
  14. package/src/Card/util/card-factory.js +39 -39
  15. package/src/ContentCards/content-cards-provider.js +114 -114
  16. package/src/ContentCards/get-cached-content-cards.js +1 -1
  17. package/src/ContentCards/index.js +0 -1
  18. package/src/ContentCards/request-content-cards-refresh.js +1 -1
  19. package/src/ContentCards/subscribe-to-content-cards-updates.js +3 -3
  20. package/src/ContentCards/ui/hide-content-cards.js +2 -2
  21. package/src/ContentCards/ui/show-content-cards.js +14 -14
  22. package/src/Core/add-sdk-metadata.js +2 -2
  23. package/src/Core/change-user.js +2 -2
  24. package/src/Core/disable-sdk.js +4 -4
  25. package/src/Core/enable-sdk.js +4 -4
  26. package/src/Core/get-device-id.js +9 -7
  27. package/src/Core/handle-braze-action.js +14 -14
  28. package/src/Core/is-disabled.js +2 -2
  29. package/src/Core/open-session.js +5 -5
  30. package/src/Core/set-sdk-authentication-signature.js +2 -2
  31. package/src/Core/wipe-data.js +4 -4
  32. package/src/FeatureFlags/feature-flag-factory.js +10 -10
  33. package/src/FeatureFlags/feature-flag.js +7 -7
  34. package/src/FeatureFlags/feature-flags-provider.js +50 -50
  35. package/src/FeatureFlags/get-all-feature-flags.js +1 -1
  36. package/src/FeatureFlags/get-feature-flag.js +3 -5
  37. package/src/Feed/feed-provider-factory.js +8 -8
  38. package/src/Feed/feed-provider.js +15 -15
  39. package/src/Feed/get-cached-feed.js +2 -2
  40. package/src/Feed/request-feed-refresh.js +2 -2
  41. package/src/Feed/subscribe-to-feed-updates.js +2 -2
  42. package/src/Feed/ui/hide-feed.js +2 -2
  43. package/src/Feed/ui/show-feed.js +13 -13
  44. package/src/InAppMessage/display/html-message-to-html.js +11 -12
  45. package/src/InAppMessage/display/in-app-message-to-html.js +15 -15
  46. package/src/InAppMessage/display/modal-utils.js +8 -8
  47. package/src/InAppMessage/in-app-message-factory.js +4 -4
  48. package/src/InAppMessage/in-app-message-manager.js +38 -38
  49. package/src/InAppMessage/models/full-screen-message.js +31 -31
  50. package/src/InAppMessage/models/html-message.js +16 -16
  51. package/src/InAppMessage/models/in-app-message-button.js +5 -5
  52. package/src/InAppMessage/models/in-app-message.js +46 -46
  53. package/src/InAppMessage/models/modal-message.js +30 -30
  54. package/src/InAppMessage/models/slide-up-message.js +26 -26
  55. package/src/InAppMessage/ui/show-in-app-message.js +9 -9
  56. package/src/Push/is-push-blocked.js +2 -2
  57. package/src/Push/is-push-permission-granted.js +2 -2
  58. package/src/Push/is-push-supported.js +2 -2
  59. package/src/Push/push-manager.js +31 -31
  60. package/src/Push/utils/push-utils.js +9 -9
  61. package/src/User/user-manager.js +8 -8
  62. package/src/User/user.js +38 -37
  63. package/src/common/base-feed.js +15 -14
  64. package/src/common/base-provider.js +1 -1
  65. package/src/common/event-logger.js +2 -2
  66. package/src/common/feed-display.js +32 -32
  67. package/src/l10n/l10n-manager-factory.js +9 -9
  68. package/src/managers/auth-manager.js +6 -6
  69. package/src/managers/braze-instance.js +84 -92
  70. package/src/managers/device-manager.js +9 -9
  71. package/src/managers/network-manager.js +72 -69
  72. package/src/managers/server-config-manager.js +13 -13
  73. package/src/managers/session-manager.js +9 -9
  74. package/src/managers/storage-manager-factory.js +11 -11
  75. package/src/managers/storage-manager.js +110 -110
  76. package/src/managers/subscription-manager.js +3 -3
  77. package/src/models/backend-errors.js +5 -5
  78. package/src/models/braze-event.js +7 -7
  79. package/src/models/identifier.js +1 -1
  80. package/src/models/push-token.js +1 -1
  81. package/src/models/server-config.js +6 -6
  82. package/src/request-controller.js +129 -125
  83. package/src/triggers/models/custom-event-data.js +1 -1
  84. package/src/triggers/models/custom-event-property-data.js +6 -6
  85. package/src/triggers/models/filter-set.js +8 -8
  86. package/src/triggers/models/filter.js +31 -31
  87. package/src/triggers/models/in-app-message-click-data.js +1 -1
  88. package/src/triggers/models/purchase-data.js +1 -1
  89. package/src/triggers/models/purchase-property-data.js +4 -4
  90. package/src/triggers/models/push-click-data.js +3 -3
  91. package/src/triggers/models/trigger-condition.js +30 -30
  92. package/src/triggers/models/trigger-events.js +1 -1
  93. package/src/triggers/models/trigger.js +32 -32
  94. package/src/triggers/triggers-provider.js +55 -55
  95. package/src/ui/js/attach-css.js +1 -1
  96. package/src/ui/js/feed-css.js +5 -5
  97. package/src/ui/js/iam-css.js +4 -4
  98. package/src/ui/js/load-font-awesome.js +1 -1
  99. package/src/util/braze-actions.js +4 -4
  100. package/src/util/browser-detector.js +11 -11
  101. package/src/util/client-hints-parser.js +5 -5
  102. package/src/util/component-utils.js +2 -2
  103. package/src/util/date-utils.js +2 -2
  104. package/src/util/device-constants.js +4 -5
  105. package/src/util/dom-utils.js +5 -5
  106. package/src/util/net.js +1 -1
  107. package/src/util/request-header-utils.js +17 -17
  108. package/src/util/user-agent-parser.js +11 -16
  109. package/src/util/validation-utils.js +9 -9
  110. package/src/Card/models/banner.js +0 -31
  111. package/src/ContentCards/log-content-cards-displayed.js +0 -5
package/src/User/user.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  isArray as p,
3
- isDate as Nt,
4
- isObject as yt,
5
- validateValueIsFromEnum as H,
3
+ isDate as yt,
4
+ isObject as Nt,
5
+ validateValueIsFromEnum as G,
6
6
  } from "../util/code-utils.js";
7
7
  import r from "../../shared-lib/braze-shared-lib.js";
8
8
  import {
@@ -12,42 +12,43 @@ import {
12
12
  validateCustomProperties as rt,
13
13
  validateCustomString as ot,
14
14
  validatePropertyType as Ut,
15
- validateStandardString as J,
15
+ validateStandardString as H,
16
16
  } from "../util/validation-utils.js";
17
17
  import { SET_CUSTOM_USER_ATTRIBUTE_STRING as Ft } from "../common/constants.js";
18
18
  import { toValidBackendTimeString as $t } from "../util/date-utils.js";
19
19
  export default class User {
20
20
  constructor(t, e) {
21
- (this.ft = t), (this.ki = e), (this.ft = t), (this.ki = e);
21
+ (this.wt = t), (this.ki = e), (this.wt = t), (this.ki = e);
22
22
  }
23
23
  getUserId(t) {
24
- null == t &&
25
- r.j.error(
26
- "getUserId must be supplied with a callback. e.g., braze.getUser().getUserId(function(userId) {console.log('the user id is ' + userId)})",
27
- ),
28
- "function" == typeof t && t(this.ft.getUserId());
24
+ const e = this.wt.getUserId();
25
+ if ("function" != typeof t) return e;
26
+ r.j.warn(
27
+ "The callback for getUserId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getUser().getUserId()`)",
28
+ ),
29
+ t(e);
29
30
  }
30
31
  addAlias(t, e) {
31
- return !J(t, "add alias", "the alias", !1) || t.length <= 0
32
+ return !H(t, "add alias", "the alias", !1) || t.length <= 0
32
33
  ? (r.j.error("addAlias requires a non-empty alias"), !1)
33
- : !J(e, "add alias", "the label", !1) || e.length <= 0
34
+ : !H(e, "add alias", "the label", !1) || e.length <= 0
34
35
  ? (r.j.error("addAlias requires a non-empty label"), !1)
35
36
  : this.ki.$n(t, e).O;
36
37
  }
37
38
  setFirstName(t) {
38
39
  return (
39
- !!J(t, "set first name", "the firstName", !0) &&
40
- this.ft.nu("first_name", t)
40
+ !!H(t, "set first name", "the firstName", !0) &&
41
+ this.wt.nu("first_name", t)
41
42
  );
42
43
  }
43
44
  setLastName(t) {
44
45
  return (
45
- !!J(t, "set last name", "the lastName", !0) && this.ft.nu("last_name", t)
46
+ !!H(t, "set last name", "the lastName", !0) && this.wt.nu("last_name", t)
46
47
  );
47
48
  }
48
49
  setEmail(t) {
49
50
  return null === t || Ct(t)
50
- ? this.ft.nu("email", t)
51
+ ? this.wt.nu("email", t)
51
52
  : (r.j.error(
52
53
  `Cannot set email address - "${t}" did not pass RFC-5322 validation.`,
53
54
  ),
@@ -58,18 +59,18 @@ export default class User {
58
59
  "string" == typeof t && (t = t.toLowerCase()),
59
60
  !(
60
61
  null !== t &&
61
- !H(
62
+ !G(
62
63
  User.Genders,
63
64
  t,
64
65
  `Gender "${t}" is not a valid gender.`,
65
66
  "User.Genders",
66
67
  )
67
- ) && this.ft.nu("gender", t)
68
+ ) && this.wt.nu("gender", t)
68
69
  );
69
70
  }
70
71
  setDateOfBirth(t, e, s) {
71
72
  return null === t && null === e && null === s
72
- ? this.ft.nu("dob", null)
73
+ ? this.wt.nu("dob", null)
73
74
  : ((t = null != t ? parseInt(t.toString()) : null),
74
75
  (e = null != e ? parseInt(e.toString()) : null),
75
76
  (s = null != s ? parseInt(s.toString()) : null),
@@ -87,46 +88,46 @@ export default class User {
87
88
  "Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);",
88
89
  ),
89
90
  !1)
90
- : this.ft.nu("dob", `${t}-${e}-${s}`));
91
+ : this.wt.nu("dob", `${t}-${e}-${s}`));
91
92
  }
92
93
  setCountry(t) {
93
- return !!J(t, "set country", "the country", !0) && this.ft.nu("country", t);
94
+ return !!H(t, "set country", "the country", !0) && this.wt.nu("country", t);
94
95
  }
95
96
  setHomeCity(t) {
96
97
  return (
97
- !!J(t, "set home city", "the homeCity", !0) && this.ft.nu("home_city", t)
98
+ !!H(t, "set home city", "the homeCity", !0) && this.wt.nu("home_city", t)
98
99
  );
99
100
  }
100
101
  setLanguage(t) {
101
102
  return (
102
- !!J(t, "set language", "the language", !0) && this.ft.nu("language", t)
103
+ !!H(t, "set language", "the language", !0) && this.wt.nu("language", t)
103
104
  );
104
105
  }
105
106
  setEmailNotificationSubscriptionType(t) {
106
107
  return (
107
- !!H(
108
+ !!G(
108
109
  User.NotificationSubscriptionTypes,
109
110
  t,
110
111
  `Email notification setting "${t}" is not a valid subscription type.`,
111
112
  "User.NotificationSubscriptionTypes",
112
- ) && this.ft.nu("email_subscribe", t)
113
+ ) && this.wt.nu("email_subscribe", t)
113
114
  );
114
115
  }
115
116
  setPushNotificationSubscriptionType(t) {
116
117
  return (
117
- !!H(
118
+ !!G(
118
119
  User.NotificationSubscriptionTypes,
119
120
  t,
120
121
  `Push notification setting "${t}" is not a valid subscription type.`,
121
122
  "User.NotificationSubscriptionTypes",
122
- ) && this.ft.nu("push_subscribe", t)
123
+ ) && this.wt.nu("push_subscribe", t)
123
124
  );
124
125
  }
125
126
  setPhoneNumber(t) {
126
127
  return (
127
- !!J(t, "set phone number", "the phoneNumber", !0) &&
128
+ !!H(t, "set phone number", "the phoneNumber", !0) &&
128
129
  (null === t || t.match(User.Ln)
129
- ? this.ft.nu("phone", t)
130
+ ? this.wt.nu("phone", t)
130
131
  : (r.j.error(
131
132
  `Cannot set phone number - "${t}" did not pass validation.`,
132
133
  ),
@@ -163,7 +164,7 @@ export default class User {
163
164
  "Cannot set last-known location - accuracy and altitudeAccuracy may not be negative.",
164
165
  ),
165
166
  !1)
166
- : this.ki.setLastKnownLocation(this.ft.getUserId(), t, e, i, s, n).O);
167
+ : this.ki.setLastKnownLocation(this.wt.getUserId(), t, e, i, s, n).O);
167
168
  }
168
169
  setCustomUserAttribute(t, e, s) {
169
170
  if (!At(t)) return !1;
@@ -182,13 +183,13 @@ export default class User {
182
183
  if (!s && !n && 0 !== e.length) return !1;
183
184
  if (s || 0 === e.length) return this.ki.Gn(r.q.Hn, t, e).O;
184
185
  for (const t of e) if (!i(t)) return !1;
185
- } else if (yt(e)) {
186
+ } else if (Nt(e)) {
186
187
  if (!i(e)) return !1;
187
188
  if (s) return this.ki.Gn(r.q.Kn, t, e).O;
188
189
  } else {
189
190
  if (!(void 0 !== e && Ut(e))) return !1;
190
191
  if (
191
- (Nt(e) && (e = $t(e)),
192
+ (yt(e) && (e = $t(e)),
192
193
  "string" == typeof e &&
193
194
  !ot(
194
195
  e,
@@ -198,7 +199,7 @@ export default class User {
198
199
  )
199
200
  return !1;
200
201
  }
201
- return this.ft.setCustomUserAttribute(t, e);
202
+ return this.wt.setCustomUserAttribute(t, e);
202
203
  }
203
204
  addToCustomAttributeArray(t, e) {
204
205
  return (
@@ -249,7 +250,7 @@ export default class User {
249
250
  );
250
251
  }
251
252
  addToSubscriptionGroup(t) {
252
- return !J(
253
+ return !H(
253
254
  t,
254
255
  "add user to subscription group",
255
256
  "subscription group ID",
@@ -262,7 +263,7 @@ export default class User {
262
263
  : this.ki.au(t, User.du.SUBSCRIBED).O;
263
264
  }
264
265
  removeFromSubscriptionGroup(t) {
265
- return !J(
266
+ return !H(
266
267
  t,
267
268
  "remove user from subscription group",
268
269
  "subscription group ID",
@@ -275,10 +276,10 @@ export default class User {
275
276
  : this.ki.au(t, User.du.UNSUBSCRIBED).O;
276
277
  }
277
278
  _n(t, e, r, s, i) {
278
- this.ft._n(t, e, r, s, i), this.ki.pu();
279
+ this.wt._n(t, e, r, s, i), this.ki.pu();
279
280
  }
280
281
  Nn(t) {
281
- this.ft.Nn(t);
282
+ this.wt.Nn(t);
282
283
  }
283
284
  }
284
285
  (User.Genders = {
@@ -1,28 +1,29 @@
1
+ import r from "../../shared-lib/braze-shared-lib.js";
1
2
  import { ControlCard } from "../Card/index.js";
2
3
  export const FEED_ANIMATION_DURATION = 500;
3
4
  export default class x {
4
- constructor(e, s) {
5
- (this.cards = e),
6
- (this.lastUpdated = s),
7
- (this.cards = e),
8
- (this.lastUpdated = s);
5
+ constructor(s, e) {
6
+ (this.cards = s),
7
+ (this.lastUpdated = e),
8
+ (this.cards = s),
9
+ (this.lastUpdated = e);
9
10
  }
10
11
  getUnreadCardCount() {
11
- let e = 0;
12
- for (const s of this.cards) s.viewed || s instanceof ControlCard || e++;
13
- return e;
12
+ let s = 0;
13
+ for (const e of this.cards) e.viewed || e instanceof ControlCard || s++;
14
+ return s;
14
15
  }
15
16
  ur() {
16
- throw new Error("Must be implemented in a subclass");
17
+ r.j.error("Must be implemented in a subclass");
17
18
  }
18
- logCardImpressions(e) {
19
- throw new Error("Must be implemented in a subclass");
19
+ logCardImpressions(s) {
20
+ r.j.error("Must be implemented in a subclass");
20
21
  }
21
- logCardClick(e) {
22
- throw new Error("Must be implemented in a subclass");
22
+ logCardClick(s) {
23
+ r.j.error("Must be implemented in a subclass");
23
24
  }
24
25
  sr() {
25
- throw new Error("Must be implemented in a subclass");
26
+ r.j.error("Must be implemented in a subclass");
26
27
  }
27
28
  }
28
29
  (x.mr = 6e4), (x.Oh = 500), (x.uo = 1e4);
@@ -1,6 +1,6 @@
1
1
  export default class y {
2
2
  constructor() {}
3
- Ts(a) {}
3
+ Ss(a) {}
4
4
  changeUser(a = !1) {}
5
5
  clearData(a = !1) {}
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import r from "../../shared-lib/braze-shared-lib.js";
2
2
  import e from "../managers/braze-instance.js";
3
- import be from "../models/braze-event.js";
3
+ import ue from "../models/braze-event.js";
4
4
  import t from "../models/request-result.js";
5
5
  const s = {
6
6
  N: (o, n, s) => {
@@ -16,7 +16,7 @@ const s = {
16
16
  );
17
17
  const m = l.co();
18
18
  a.ve.push(
19
- new be(
19
+ new ue(
20
20
  s || (null === (i = e.ir()) || void 0 === i ? void 0 : i.getUserId()),
21
21
  o,
22
22
  new Date().valueOf(),
@@ -1,26 +1,26 @@
1
1
  import x from "./base-feed.js";
2
2
  import {
3
- bottomHadImpression as ye,
4
- getCardId as Fe,
5
- impressOnBottom as Te,
6
- impressOnTop as xe,
7
- markCardAsRead as Ee,
8
- topHadImpression as he,
3
+ bottomHadImpression as be,
4
+ getCardId as ye,
5
+ impressOnBottom as Fe,
6
+ impressOnTop as Te,
7
+ markCardAsRead as xe,
8
+ topHadImpression as Ee,
9
9
  } from "../Card/display/card-display.js";
10
- import { bottomIsInView as Se, topIsInView as _e } from "../util/dom-utils.js";
10
+ import { bottomIsInView as he, topIsInView as Se } from "../util/dom-utils.js";
11
11
  import { Card, ControlCard } from "../Card/index.js";
12
- import { cardToHtml as je } from "../Card/display/card-display.js";
12
+ import { cardToHtml as _e } from "../Card/display/card-display.js";
13
13
  import { isArray as p } from "../util/code-utils.js";
14
- import { KeyCodes as lt } from "../util/key-codes.js";
15
- import Ce from "../l10n/l10n-manager-factory.js";
14
+ import { KeyCodes as at } from "../util/key-codes.js";
15
+ import je from "../l10n/l10n-manager-factory.js";
16
16
  import { removeSubscription } from "../Core/remove-subscription.js";
17
17
  import r from "../../shared-lib/braze-shared-lib.js";
18
- import { BRAZE_ACTION_URI_REGEX as X } from "../util/validation-utils.js";
18
+ import { BRAZE_ACTION_URI_REGEX as W } from "../util/validation-utils.js";
19
19
  import {
20
- INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as vt,
21
- ineligibleBrazeActionURLErrorMessage as dt,
22
- getDecodedBrazeAction as Q,
23
- containsUnknownBrazeAction as ft,
20
+ INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as dt,
21
+ ineligibleBrazeActionURLErrorMessage as ft,
22
+ getDecodedBrazeAction as O,
23
+ containsUnknownBrazeAction as gt,
24
24
  } from "../util/braze-actions.js";
25
25
  export const LAST_REQUESTED_REFRESH_DATA_ATTRIBUTE =
26
26
  "data-last-requested-refresh";
@@ -60,7 +60,7 @@ export function generateFeedBody(e, t) {
60
60
  for (const n of e.cards) {
61
61
  const i = n instanceof ControlCard;
62
62
  !i || e.ur()
63
- ? (o.appendChild(je(n, logCardClick, t)), (s = s || !i))
63
+ ? (o.appendChild(_e(n, logCardClick, t)), (s = s || !i))
64
64
  : r.j.error(
65
65
  "Received a control card for a legacy news feed. Control cards are only supported with content cards.",
66
66
  );
@@ -68,7 +68,7 @@ export function generateFeedBody(e, t) {
68
68
  if (!s) {
69
69
  const e = document.createElement("div");
70
70
  (e.className = "ab-no-cards-message"),
71
- (e.innerHTML = Ce.m().get("NO_CARDS_MESSAGE") || ""),
71
+ (e.innerHTML = je.m().get("NO_CARDS_MESSAGE") || ""),
72
72
  e.setAttribute("role", "article"),
73
73
  o.appendChild(e);
74
74
  }
@@ -81,20 +81,20 @@ export function detectFeedImpressions(e, t) {
81
81
  s = t.querySelectorAll(".ab-card");
82
82
  e.yo || (e.yo = {});
83
83
  for (let t = 0; t < s.length; t++) {
84
- const n = Fe(s[t]),
85
- r = _e(s[t]),
86
- i = Se(s[t]);
84
+ const n = ye(s[t]),
85
+ r = Se(s[t]),
86
+ i = he(s[t]);
87
87
  if (e.yo[n]) {
88
- r || i || Ee(s[t]);
88
+ r || i || xe(s[t]);
89
89
  continue;
90
90
  }
91
- let a = he(s[t]),
92
- d = ye(s[t]);
91
+ let a = Ee(s[t]),
92
+ d = be(s[t]);
93
93
  const l = a,
94
94
  c = d;
95
95
  if (
96
- (!a && r && ((a = !0), xe(s[t])),
97
- !d && i && ((d = !0), Te(s[t])),
96
+ (!a && r && ((a = !0), Te(s[t])),
97
+ !d && i && ((d = !0), Fe(s[t])),
98
98
  a && d)
99
99
  ) {
100
100
  if (l && c) continue;
@@ -123,7 +123,7 @@ export function refreshFeed(e, t) {
123
123
  const o = t.querySelectorAll(".ab-initial-spinner")[0];
124
124
  if (null != o) {
125
125
  const e = document.createElement("span");
126
- (e.innerHTML = Ce.m().get("FEED_TIMEOUT_MESSAGE") || ""),
126
+ (e.innerHTML = je.m().get("FEED_TIMEOUT_MESSAGE") || ""),
127
127
  null != o.parentNode &&
128
128
  (o.parentNode.appendChild(e), o.parentNode.removeChild(o));
129
129
  }
@@ -152,7 +152,7 @@ export function feedToHtml(e, t, o) {
152
152
  destroyFeedHtml(s), e.stopPropagation();
153
153
  };
154
154
  i.addEventListener("keydown", (e) => {
155
- (e.keyCode !== lt.Fo && e.keyCode !== lt.To) || a(e);
155
+ (e.keyCode !== at.Fo && e.keyCode !== at.To) || a(e);
156
156
  }),
157
157
  (i.onclick = a);
158
158
  const d = document.createElement("i");
@@ -165,7 +165,7 @@ export function feedToHtml(e, t, o) {
165
165
  refreshFeed(e, s), t.stopPropagation();
166
166
  };
167
167
  d.addEventListener("keydown", (e) => {
168
- (e.keyCode !== lt.Fo && e.keyCode !== lt.To) || l(e);
168
+ (e.keyCode !== at.Fo && e.keyCode !== at.To) || l(e);
169
169
  }),
170
170
  (d.onclick = l),
171
171
  n.appendChild(d),
@@ -184,10 +184,10 @@ export function updateFeedCards(e, t, o, s, n) {
184
184
  const i = [];
185
185
  for (const e of t)
186
186
  if (e instanceof Card) {
187
- if (e.url && X.test(e.url)) {
188
- const t = Q(e.url);
189
- if (ft(t)) {
190
- r.j.error(dt(vt._r, "Content Card"));
187
+ if (e.url && W.test(e.url)) {
188
+ const t = O(e.url);
189
+ if (gt(t)) {
190
+ r.j.error(ft(dt._r, "Content Card"));
191
191
  continue;
192
192
  }
193
193
  }
@@ -1,22 +1,22 @@
1
1
  import e, { OPTIONS as L } from "../managers/braze-instance.js";
2
- import V from "../util/browser-detector.js";
2
+ import Q from "../util/browser-detector.js";
3
3
  import nr from "./l10n-manager.js";
4
- const Ce = {
4
+ const je = {
5
5
  t: !1,
6
6
  i: null,
7
7
  m: () => {
8
- if ((Ce.o(), !Ce.i)) {
9
- let r = V.language,
8
+ if ((je.o(), !je.i)) {
9
+ let r = Q.language,
10
10
  t = !1;
11
- e.nn(L.Ba) && ((r = e.nn(L.Ba)), (t = !0)), (Ce.i = new nr(r, t));
11
+ e.nn(L.Ba) && ((r = e.nn(L.Ba)), (t = !0)), (je.i = new nr(r, t));
12
12
  }
13
- return Ce.i;
13
+ return je.i;
14
14
  },
15
15
  o: () => {
16
- Ce.t || (e.g(Ce), (Ce.t = !0));
16
+ je.t || (e.g(je), (je.t = !0));
17
17
  },
18
18
  destroy: () => {
19
- (Ce.i = null), (Ce.t = !1);
19
+ (je.i = null), (je.t = !1);
20
20
  },
21
21
  };
22
- export default Ce;
22
+ export default je;
@@ -22,19 +22,19 @@ export default class kt {
22
22
  setSdkAuthenticationSignature(t) {
23
23
  const s = this.jh();
24
24
  this.u.D(i.k.xh, t);
25
- const e = r.zt.Ft;
26
- new r.xt(e, r.j).setItem(e.Jt.qh, this.fh, t), s !== t && this.ti();
25
+ const e = r.ts.Zt;
26
+ new r.es(e, r.j).setItem(e.rs.qh, this.fh, t), s !== t && this.ti();
27
27
  }
28
28
  yh() {
29
29
  this.u.ni(i.k.xh);
30
- const t = r.zt.Ft;
31
- new r.xt(t, r.j).oe(t.Jt.qh, this.fh);
30
+ const t = r.ts.Zt;
31
+ new r.es(t, r.j).oe(t.rs.qh, this.fh);
32
32
  }
33
33
  subscribeToSdkAuthenticationFailures(t) {
34
- return this.ph.lt(t);
34
+ return this.ph.It(t);
35
35
  }
36
36
  Bh(t) {
37
- this.ph.Et(t);
37
+ this.ph.Dt(t);
38
38
  }
39
39
  Gh() {
40
40
  this.Fh.removeAllSubscriptions();