@braze/web-sdk 4.10.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 (107) hide show
  1. package/index.d.ts +19 -106
  2. package/package.json +1 -1
  3. package/shared-lib/braze-shared-lib.js +1 -1
  4. package/shared-lib/indexed-db-adapter.js +12 -12
  5. package/shared-lib/logger.js +2 -2
  6. package/shared-lib/supported-options.js +7 -8
  7. package/src/Card/models/captioned-image.js +19 -19
  8. package/src/Card/models/card.js +95 -94
  9. package/src/Card/models/classic-card.js +19 -19
  10. package/src/Card/models/control-card.js +9 -9
  11. package/src/Card/models/image-only.js +21 -22
  12. package/src/Card/models/index.js +0 -1
  13. package/src/Card/util/card-factory.js +39 -39
  14. package/src/ContentCards/content-cards-provider.js +114 -114
  15. package/src/ContentCards/get-cached-content-cards.js +1 -1
  16. package/src/ContentCards/index.js +0 -1
  17. package/src/ContentCards/request-content-cards-refresh.js +1 -1
  18. package/src/ContentCards/subscribe-to-content-cards-updates.js +3 -3
  19. package/src/ContentCards/ui/hide-content-cards.js +2 -2
  20. package/src/ContentCards/ui/show-content-cards.js +14 -14
  21. package/src/Core/add-sdk-metadata.js +2 -2
  22. package/src/Core/change-user.js +2 -2
  23. package/src/Core/disable-sdk.js +4 -4
  24. package/src/Core/enable-sdk.js +4 -4
  25. package/src/Core/handle-braze-action.js +14 -14
  26. package/src/Core/is-disabled.js +2 -2
  27. package/src/Core/open-session.js +5 -5
  28. package/src/Core/set-sdk-authentication-signature.js +2 -2
  29. package/src/Core/wipe-data.js +4 -4
  30. package/src/FeatureFlags/feature-flag-factory.js +10 -10
  31. package/src/FeatureFlags/feature-flag.js +7 -7
  32. package/src/FeatureFlags/feature-flags-provider.js +50 -50
  33. package/src/FeatureFlags/get-all-feature-flags.js +1 -1
  34. package/src/FeatureFlags/get-feature-flag.js +3 -5
  35. package/src/Feed/feed-provider-factory.js +8 -8
  36. package/src/Feed/feed-provider.js +15 -15
  37. package/src/Feed/get-cached-feed.js +2 -2
  38. package/src/Feed/request-feed-refresh.js +2 -2
  39. package/src/Feed/subscribe-to-feed-updates.js +2 -2
  40. package/src/Feed/ui/hide-feed.js +2 -2
  41. package/src/Feed/ui/show-feed.js +13 -13
  42. package/src/InAppMessage/display/html-message-to-html.js +11 -12
  43. package/src/InAppMessage/display/in-app-message-to-html.js +15 -15
  44. package/src/InAppMessage/display/modal-utils.js +8 -8
  45. package/src/InAppMessage/in-app-message-factory.js +4 -4
  46. package/src/InAppMessage/in-app-message-manager.js +38 -38
  47. package/src/InAppMessage/models/full-screen-message.js +31 -31
  48. package/src/InAppMessage/models/html-message.js +16 -16
  49. package/src/InAppMessage/models/in-app-message-button.js +5 -5
  50. package/src/InAppMessage/models/in-app-message.js +46 -46
  51. package/src/InAppMessage/models/modal-message.js +30 -30
  52. package/src/InAppMessage/models/slide-up-message.js +26 -26
  53. package/src/InAppMessage/ui/show-in-app-message.js +9 -9
  54. package/src/Push/is-push-blocked.js +2 -2
  55. package/src/Push/is-push-permission-granted.js +2 -2
  56. package/src/Push/is-push-supported.js +2 -2
  57. package/src/Push/push-manager.js +31 -31
  58. package/src/Push/utils/push-utils.js +9 -9
  59. package/src/User/user-manager.js +8 -8
  60. package/src/User/user.js +29 -29
  61. package/src/common/base-feed.js +15 -14
  62. package/src/common/base-provider.js +1 -1
  63. package/src/common/event-logger.js +2 -2
  64. package/src/common/feed-display.js +32 -32
  65. package/src/l10n/l10n-manager-factory.js +9 -9
  66. package/src/managers/auth-manager.js +6 -6
  67. package/src/managers/braze-instance.js +96 -106
  68. package/src/managers/device-manager.js +17 -17
  69. package/src/managers/network-manager.js +27 -27
  70. package/src/managers/server-config-manager.js +13 -13
  71. package/src/managers/session-manager.js +8 -8
  72. package/src/managers/storage-manager-factory.js +7 -7
  73. package/src/managers/storage-manager.js +104 -104
  74. package/src/managers/subscription-manager.js +2 -2
  75. package/src/models/braze-event.js +5 -5
  76. package/src/models/device.js +1 -1
  77. package/src/models/identifier.js +1 -1
  78. package/src/models/push-token.js +1 -1
  79. package/src/models/server-config.js +6 -6
  80. package/src/request-controller.js +52 -52
  81. package/src/triggers/models/custom-event-data.js +1 -1
  82. package/src/triggers/models/custom-event-property-data.js +6 -6
  83. package/src/triggers/models/filter-set.js +8 -8
  84. package/src/triggers/models/filter.js +25 -25
  85. package/src/triggers/models/in-app-message-click-data.js +1 -1
  86. package/src/triggers/models/purchase-data.js +1 -1
  87. package/src/triggers/models/purchase-property-data.js +4 -4
  88. package/src/triggers/models/push-click-data.js +3 -3
  89. package/src/triggers/models/trigger-condition.js +14 -14
  90. package/src/triggers/models/trigger-events.js +1 -1
  91. package/src/triggers/models/trigger.js +11 -11
  92. package/src/triggers/triggers-provider.js +38 -38
  93. package/src/ui/js/attach-css.js +1 -1
  94. package/src/ui/js/feed-css.js +5 -5
  95. package/src/ui/js/iam-css.js +4 -4
  96. package/src/ui/js/load-font-awesome.js +1 -1
  97. package/src/util/base-device-parser.js +1 -1
  98. package/src/util/braze-actions.js +4 -4
  99. package/src/util/browser-detector.js +14 -14
  100. package/src/util/client-hints-parser.js +2 -2
  101. package/src/util/component-utils.js +2 -2
  102. package/src/util/device-constants.js +4 -5
  103. package/src/util/dom-utils.js +5 -5
  104. package/src/util/request-header-utils.js +4 -4
  105. package/src/util/user-agent-parser.js +10 -15
  106. package/src/Card/models/banner.js +0 -31
  107. package/src/ContentCards/log-content-cards-displayed.js +0 -5
package/src/User/user.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  isArray as p,
3
3
  isDate as yt,
4
4
  isObject as Nt,
5
- validateValueIsFromEnum as H,
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,16 +12,16 @@ 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
- const e = this.ft.getUserId();
24
+ const e = this.wt.getUserId();
25
25
  if ("function" != typeof t) return e;
26
26
  r.j.warn(
27
27
  "The callback for getUserId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getUser().getUserId()`)",
@@ -29,26 +29,26 @@ export default class User {
29
29
  t(e);
30
30
  }
31
31
  addAlias(t, e) {
32
- return !J(t, "add alias", "the alias", !1) || t.length <= 0
32
+ return !H(t, "add alias", "the alias", !1) || t.length <= 0
33
33
  ? (r.j.error("addAlias requires a non-empty alias"), !1)
34
- : !J(e, "add alias", "the label", !1) || e.length <= 0
34
+ : !H(e, "add alias", "the label", !1) || e.length <= 0
35
35
  ? (r.j.error("addAlias requires a non-empty label"), !1)
36
36
  : this.ki.$n(t, e).O;
37
37
  }
38
38
  setFirstName(t) {
39
39
  return (
40
- !!J(t, "set first name", "the firstName", !0) &&
41
- this.ft.nu("first_name", t)
40
+ !!H(t, "set first name", "the firstName", !0) &&
41
+ this.wt.nu("first_name", t)
42
42
  );
43
43
  }
44
44
  setLastName(t) {
45
45
  return (
46
- !!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)
47
47
  );
48
48
  }
49
49
  setEmail(t) {
50
50
  return null === t || Ct(t)
51
- ? this.ft.nu("email", t)
51
+ ? this.wt.nu("email", t)
52
52
  : (r.j.error(
53
53
  `Cannot set email address - "${t}" did not pass RFC-5322 validation.`,
54
54
  ),
@@ -59,18 +59,18 @@ export default class User {
59
59
  "string" == typeof t && (t = t.toLowerCase()),
60
60
  !(
61
61
  null !== t &&
62
- !H(
62
+ !G(
63
63
  User.Genders,
64
64
  t,
65
65
  `Gender "${t}" is not a valid gender.`,
66
66
  "User.Genders",
67
67
  )
68
- ) && this.ft.nu("gender", t)
68
+ ) && this.wt.nu("gender", t)
69
69
  );
70
70
  }
71
71
  setDateOfBirth(t, e, s) {
72
72
  return null === t && null === e && null === s
73
- ? this.ft.nu("dob", null)
73
+ ? this.wt.nu("dob", null)
74
74
  : ((t = null != t ? parseInt(t.toString()) : null),
75
75
  (e = null != e ? parseInt(e.toString()) : null),
76
76
  (s = null != s ? parseInt(s.toString()) : null),
@@ -88,46 +88,46 @@ export default class User {
88
88
  "Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);",
89
89
  ),
90
90
  !1)
91
- : this.ft.nu("dob", `${t}-${e}-${s}`));
91
+ : this.wt.nu("dob", `${t}-${e}-${s}`));
92
92
  }
93
93
  setCountry(t) {
94
- 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);
95
95
  }
96
96
  setHomeCity(t) {
97
97
  return (
98
- !!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)
99
99
  );
100
100
  }
101
101
  setLanguage(t) {
102
102
  return (
103
- !!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)
104
104
  );
105
105
  }
106
106
  setEmailNotificationSubscriptionType(t) {
107
107
  return (
108
- !!H(
108
+ !!G(
109
109
  User.NotificationSubscriptionTypes,
110
110
  t,
111
111
  `Email notification setting "${t}" is not a valid subscription type.`,
112
112
  "User.NotificationSubscriptionTypes",
113
- ) && this.ft.nu("email_subscribe", t)
113
+ ) && this.wt.nu("email_subscribe", t)
114
114
  );
115
115
  }
116
116
  setPushNotificationSubscriptionType(t) {
117
117
  return (
118
- !!H(
118
+ !!G(
119
119
  User.NotificationSubscriptionTypes,
120
120
  t,
121
121
  `Push notification setting "${t}" is not a valid subscription type.`,
122
122
  "User.NotificationSubscriptionTypes",
123
- ) && this.ft.nu("push_subscribe", t)
123
+ ) && this.wt.nu("push_subscribe", t)
124
124
  );
125
125
  }
126
126
  setPhoneNumber(t) {
127
127
  return (
128
- !!J(t, "set phone number", "the phoneNumber", !0) &&
128
+ !!H(t, "set phone number", "the phoneNumber", !0) &&
129
129
  (null === t || t.match(User.Ln)
130
- ? this.ft.nu("phone", t)
130
+ ? this.wt.nu("phone", t)
131
131
  : (r.j.error(
132
132
  `Cannot set phone number - "${t}" did not pass validation.`,
133
133
  ),
@@ -164,7 +164,7 @@ export default class User {
164
164
  "Cannot set last-known location - accuracy and altitudeAccuracy may not be negative.",
165
165
  ),
166
166
  !1)
167
- : 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);
168
168
  }
169
169
  setCustomUserAttribute(t, e, s) {
170
170
  if (!At(t)) return !1;
@@ -199,7 +199,7 @@ export default class User {
199
199
  )
200
200
  return !1;
201
201
  }
202
- return this.ft.setCustomUserAttribute(t, e);
202
+ return this.wt.setCustomUserAttribute(t, e);
203
203
  }
204
204
  addToCustomAttributeArray(t, e) {
205
205
  return (
@@ -250,7 +250,7 @@ export default class User {
250
250
  );
251
251
  }
252
252
  addToSubscriptionGroup(t) {
253
- return !J(
253
+ return !H(
254
254
  t,
255
255
  "add user to subscription group",
256
256
  "subscription group ID",
@@ -263,7 +263,7 @@ export default class User {
263
263
  : this.ki.au(t, User.du.SUBSCRIBED).O;
264
264
  }
265
265
  removeFromSubscriptionGroup(t) {
266
- return !J(
266
+ return !H(
267
267
  t,
268
268
  "remove user from subscription group",
269
269
  "subscription group ID",
@@ -276,10 +276,10 @@ export default class User {
276
276
  : this.ki.au(t, User.du.UNSUBSCRIBED).O;
277
277
  }
278
278
  _n(t, e, r, s, i) {
279
- this.ft._n(t, e, r, s, i), this.ki.pu();
279
+ this.wt._n(t, e, r, s, i), this.ki.pu();
280
280
  }
281
281
  Nn(t) {
282
- this.ft.Nn(t);
282
+ this.wt.Nn(t);
283
283
  }
284
284
  }
285
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();