@braze/web-sdk 5.8.0 → 5.8.1
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.
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/shared-lib/encoding-utils.js +1 -1
- package/shared-lib/event-types.js +22 -22
- package/shared-lib/guid.js +1 -1
- package/shared-lib/indexed-db-adapter.js +18 -18
- package/shared-lib/logger.js +2 -2
- package/shared-lib/supported-options.js +16 -16
- package/src/Banner/banner-provider.js +79 -79
- package/src/Banner/banner.js +9 -9
- package/src/Banner/display/banner-to-html.js +2 -2
- package/src/Banner/get-all-banners.js +2 -2
- package/src/Banner/get-banner.js +2 -2
- package/src/Banner/log-banner-click.js +2 -2
- package/src/Banner/log-banner-impressions.js +4 -4
- package/src/Banner/request-banners-refresh.js +1 -1
- package/src/Banner/subscribe-to-banners-updates.js +5 -5
- package/src/Card/card-manager.js +35 -35
- package/src/Card/display/card-display.js +8 -8
- package/src/Card/log-card-click.js +1 -1
- package/src/Card/log-card-dismissal.js +1 -1
- package/src/Card/log-card-impressions.js +1 -1
- package/src/Card/models/captioned-image.js +21 -21
- package/src/Card/models/card.js +92 -92
- package/src/Card/models/classic-card.js +21 -21
- package/src/Card/models/control-card.js +11 -11
- package/src/Card/models/image-only.js +19 -19
- package/src/Card/util/card-factory.js +39 -39
- package/src/ContentCards/content-cards-provider.js +142 -142
- package/src/ContentCards/get-cached-content-cards.js +1 -1
- package/src/ContentCards/request-content-cards-refresh.js +1 -1
- package/src/ContentCards/subscribe-to-content-cards-updates.js +4 -4
- package/src/ContentCards/ui/show-content-cards.js +3 -3
- package/src/Core/disable-sdk.js +6 -6
- package/src/Core/enable-sdk.js +5 -5
- package/src/Core/get-device-id.js +2 -2
- package/src/Core/handle-braze-action.js +2 -2
- package/src/Core/is-disabled.js +2 -2
- package/src/Core/is-initialized.js +1 -1
- package/src/Core/log-custom-event.js +5 -5
- package/src/Core/log-purchase.js +4 -4
- package/src/Core/open-session.js +5 -5
- package/src/Core/wipe-data.js +2 -2
- package/src/FeatureFlags/feature-flag-factory.js +10 -10
- package/src/FeatureFlags/feature-flag.js +15 -15
- package/src/FeatureFlags/feature-flags-provider.js +61 -61
- package/src/FeatureFlags/get-all-feature-flags.js +2 -2
- package/src/FeatureFlags/get-feature-flag.js +2 -2
- package/src/FeatureFlags/log-feature-flag-impression.js +4 -4
- package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +2 -2
- package/src/Feed/feed-provider.js +41 -41
- package/src/Feed/get-cached-feed.js +1 -1
- package/src/Feed/log-feed-displayed.js +1 -1
- package/src/Feed/request-feed-refresh.js +1 -1
- package/src/Feed/subscribe-to-feed-updates.js +1 -1
- package/src/Feed/ui/show-feed.js +1 -1
- package/src/InAppMessage/defer-in-app-message.js +1 -1
- package/src/InAppMessage/display/html-message-to-html.js +6 -6
- package/src/InAppMessage/display/in-app-message-to-html.js +20 -20
- package/src/InAppMessage/display/modal-utils.js +4 -4
- package/src/InAppMessage/in-app-message-factory.js +7 -7
- package/src/InAppMessage/in-app-message-manager.js +89 -89
- package/src/InAppMessage/log-in-app-message-button-click.js +6 -6
- package/src/InAppMessage/log-in-app-message-click.js +5 -5
- package/src/InAppMessage/log-in-app-message-html-click.js +7 -7
- package/src/InAppMessage/log-in-app-message-impression.js +2 -2
- package/src/InAppMessage/models/control-message.js +5 -5
- package/src/InAppMessage/models/full-screen-message.js +34 -34
- package/src/InAppMessage/models/html-message.js +20 -20
- package/src/InAppMessage/models/in-app-message-button.js +8 -8
- package/src/InAppMessage/models/in-app-message.js +80 -80
- package/src/InAppMessage/models/modal-message.js +33 -33
- package/src/InAppMessage/models/slide-up-message.js +29 -29
- package/src/InAppMessage/models/templated-in-app-message.js +8 -8
- package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
- package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
- package/src/InAppMessage/ui/show-in-app-message.js +12 -12
- package/src/Push/push-manager-factory.js +1 -1
- package/src/Push/push-manager.js +94 -94
- package/src/Push/utils/push-utils.js +4 -4
- package/src/User/user-manager.js +17 -17
- package/src/User/user.js +38 -38
- package/src/common/base-feed.js +1 -1
- package/src/common/base-provider.js +1 -1
- package/src/common/event-logger.js +5 -5
- package/src/common/feed-display.js +6 -6
- package/src/l10n/l10n-manager-factory.js +1 -1
- package/src/l10n/l10n-manager.js +1 -1
- package/src/managers/auth-manager.js +31 -31
- package/src/managers/braze-instance.js +125 -125
- package/src/managers/device-manager.js +24 -24
- package/src/managers/network-manager.js +149 -149
- package/src/managers/server-config-manager.js +84 -84
- package/src/managers/session-manager.js +27 -27
- package/src/managers/storage-manager-factory.js +12 -12
- package/src/managers/storage-manager.js +83 -83
- package/src/managers/subscription-manager.js +10 -10
- package/src/managers/utils.js +4 -4
- package/src/models/backend-errors.js +5 -5
- package/src/models/braze-event.js +4 -4
- package/src/models/device.js +2 -2
- package/src/models/identifier.js +3 -3
- package/src/models/push-token.js +8 -8
- package/src/models/request-result.js +3 -3
- package/src/models/server-config.js +31 -31
- package/src/request-controller.js +148 -148
- package/src/triggers/models/custom-event-data.js +1 -1
- package/src/triggers/models/custom-event-property-data.js +2 -2
- package/src/triggers/models/filter-set.js +4 -4
- package/src/triggers/models/filter.js +2 -2
- package/src/triggers/models/in-app-message-click-data.js +1 -1
- package/src/triggers/models/purchase-data.js +1 -1
- package/src/triggers/models/purchase-property-data.js +2 -2
- package/src/triggers/models/push-click-data.js +1 -1
- package/src/triggers/models/trigger-condition.js +32 -32
- package/src/triggers/models/trigger-events.js +2 -2
- package/src/triggers/models/trigger.js +11 -11
- package/src/triggers/triggers-provider-factory.js +2 -2
- package/src/triggers/triggers-provider.js +72 -72
- package/src/ui/js/attach-css.js +1 -1
- package/src/ui/js/load-font-awesome.js +1 -1
- package/src/util/base-device-parser.js +1 -1
- package/src/util/braze-actions.js +4 -4
- package/src/util/browser-detector.js +5 -5
- package/src/util/client-hints-parser.js +1 -1
- package/src/util/component-utils.js +1 -1
- package/src/util/dom-utils.js +4 -4
- package/src/util/html-display-utils.js +6 -6
- package/src/util/key-codes.js +1 -1
- package/src/util/net.js +6 -6
- package/src/util/request-header-utils.js +21 -21
- package/src/util/user-agent-parser.js +1 -1
- package/src/util/window-utils.js +1 -1
package/src/User/user.js
CHANGED
|
@@ -18,10 +18,10 @@ import { SET_CUSTOM_USER_ATTRIBUTE_STRING as Dt } from "../common/constants.js";
|
|
|
18
18
|
import { toValidBackendTimeString as Ft } from "../util/date-utils.js";
|
|
19
19
|
export default class User {
|
|
20
20
|
constructor(t, e) {
|
|
21
|
-
(this.
|
|
21
|
+
(this.Cs = t), (this.Fi = e), (this.Cs = t), (this.Fi = e);
|
|
22
22
|
}
|
|
23
23
|
getUserId(t) {
|
|
24
|
-
const e = this.
|
|
24
|
+
const e = this.Cs.getUserId();
|
|
25
25
|
if ("function" != typeof t) return e;
|
|
26
26
|
N.warn(
|
|
27
27
|
"The callback for getUserId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getUser().getUserId()`)",
|
|
@@ -33,22 +33,22 @@ export default class User {
|
|
|
33
33
|
? (N.error("addAlias requires a non-empty alias"), !1)
|
|
34
34
|
: !ir(e, "add alias", "the label", !1) || e.length <= 0
|
|
35
35
|
? (N.error("addAlias requires a non-empty label"), !1)
|
|
36
|
-
: this.
|
|
36
|
+
: this.Fi.Cn(t, e).tt;
|
|
37
37
|
}
|
|
38
38
|
setFirstName(t) {
|
|
39
39
|
return (
|
|
40
40
|
!!ir(t, "set first name", "the firstName", !0) &&
|
|
41
|
-
this.
|
|
41
|
+
this.Cs.nu("first_name", t)
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
setLastName(t) {
|
|
45
45
|
return (
|
|
46
|
-
!!ir(t, "set last name", "the lastName", !0) && this.
|
|
46
|
+
!!ir(t, "set last name", "the lastName", !0) && this.Cs.nu("last_name", t)
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
49
|
setEmail(t) {
|
|
50
50
|
return null === t || Ct(t)
|
|
51
|
-
? this.
|
|
51
|
+
? this.Cs.nu("email", t)
|
|
52
52
|
: (N.error(
|
|
53
53
|
`Cannot set email address - "${t}" did not pass RFC-5322 validation.`,
|
|
54
54
|
),
|
|
@@ -65,12 +65,12 @@ export default class User {
|
|
|
65
65
|
`Gender "${t}" is not a valid gender.`,
|
|
66
66
|
"User.Genders",
|
|
67
67
|
)
|
|
68
|
-
) && this.
|
|
68
|
+
) && this.Cs.nu("gender", t)
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
71
|
setDateOfBirth(t, e, r) {
|
|
72
72
|
return null === t && null === e && null === r
|
|
73
|
-
? this.
|
|
73
|
+
? this.Cs.nu("dob", null)
|
|
74
74
|
: ((t = null != t ? parseInt(t.toString()) : null),
|
|
75
75
|
(e = null != e ? parseInt(e.toString()) : null),
|
|
76
76
|
(r = null != r ? parseInt(r.toString()) : null),
|
|
@@ -88,21 +88,21 @@ 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.
|
|
91
|
+
: this.Cs.nu("dob", `${t}-${e}-${r}`));
|
|
92
92
|
}
|
|
93
93
|
setCountry(t) {
|
|
94
94
|
return (
|
|
95
|
-
!!ir(t, "set country", "the country", !0) && this.
|
|
95
|
+
!!ir(t, "set country", "the country", !0) && this.Cs.nu("country", t)
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
98
|
setHomeCity(t) {
|
|
99
99
|
return (
|
|
100
|
-
!!ir(t, "set home city", "the homeCity", !0) && this.
|
|
100
|
+
!!ir(t, "set home city", "the homeCity", !0) && this.Cs.nu("home_city", t)
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
103
|
setLanguage(t) {
|
|
104
104
|
return (
|
|
105
|
-
!!ir(t, "set language", "the language", !0) && this.
|
|
105
|
+
!!ir(t, "set language", "the language", !0) && this.Cs.nu("language", t)
|
|
106
106
|
);
|
|
107
107
|
}
|
|
108
108
|
setEmailNotificationSubscriptionType(t) {
|
|
@@ -112,7 +112,7 @@ export default class User {
|
|
|
112
112
|
t,
|
|
113
113
|
`Email notification setting "${t}" is not a valid subscription type.`,
|
|
114
114
|
"User.NotificationSubscriptionTypes",
|
|
115
|
-
) && this.
|
|
115
|
+
) && this.Cs.nu("email_subscribe", t)
|
|
116
116
|
);
|
|
117
117
|
}
|
|
118
118
|
setPushNotificationSubscriptionType(t) {
|
|
@@ -122,14 +122,14 @@ export default class User {
|
|
|
122
122
|
t,
|
|
123
123
|
`Push notification setting "${t}" is not a valid subscription type.`,
|
|
124
124
|
"User.NotificationSubscriptionTypes",
|
|
125
|
-
) && this.
|
|
125
|
+
) && this.Cs.nu("push_subscribe", t)
|
|
126
126
|
);
|
|
127
127
|
}
|
|
128
128
|
setPhoneNumber(t) {
|
|
129
129
|
return (
|
|
130
130
|
!!ir(t, "set phone number", "the phoneNumber", !0) &&
|
|
131
|
-
(null === t || t.match(User
|
|
132
|
-
? this.
|
|
131
|
+
(null === t || t.match(User.Fn)
|
|
132
|
+
? this.Cs.nu("phone", t)
|
|
133
133
|
: (N.error(`Cannot set phone number - "${t}" did not pass validation.`),
|
|
134
134
|
!1))
|
|
135
135
|
);
|
|
@@ -164,8 +164,8 @@ 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.
|
|
168
|
-
.
|
|
167
|
+
: this.Fi.setLastKnownLocation(this.Cs.getUserId(), t, e, s, r, n)
|
|
168
|
+
.tt);
|
|
169
169
|
}
|
|
170
170
|
setCustomUserAttribute(t, e, r) {
|
|
171
171
|
if (!At(t)) return !1;
|
|
@@ -182,11 +182,11 @@ export default class User {
|
|
|
182
182
|
if (z(e)) {
|
|
183
183
|
const [r, n] = St(t, e);
|
|
184
184
|
if (!r && !n && 0 !== e.length) return !1;
|
|
185
|
-
if (r || 0 === e.length) return this.
|
|
185
|
+
if (r || 0 === e.length) return this.Fi.Ln(d.$n, t, e).tt;
|
|
186
186
|
for (const t of e) if (!s(t)) return !1;
|
|
187
187
|
} else if (yt(e)) {
|
|
188
188
|
if (!s(e)) return !1;
|
|
189
|
-
if (r) return this.
|
|
189
|
+
if (r) return this.Fi.Ln(d.Bn, t, e).tt;
|
|
190
190
|
} else {
|
|
191
191
|
if (!(void 0 !== e && Ut(e))) return !1;
|
|
192
192
|
if (
|
|
@@ -200,7 +200,7 @@ export default class User {
|
|
|
200
200
|
)
|
|
201
201
|
return !1;
|
|
202
202
|
}
|
|
203
|
-
return this.
|
|
203
|
+
return this.Cs.setCustomUserAttribute(t, e);
|
|
204
204
|
}
|
|
205
205
|
addToCustomAttributeArray(t, e) {
|
|
206
206
|
return (
|
|
@@ -209,7 +209,7 @@ export default class User {
|
|
|
209
209
|
null != e &&
|
|
210
210
|
!nt(e, "add to custom user attribute array", "the given value")
|
|
211
211
|
) &&
|
|
212
|
-
this.
|
|
212
|
+
this.Fi.Ln(d.Rn, t, e).tt
|
|
213
213
|
);
|
|
214
214
|
}
|
|
215
215
|
removeFromCustomAttributeArray(t, e) {
|
|
@@ -219,7 +219,7 @@ export default class User {
|
|
|
219
219
|
null != e &&
|
|
220
220
|
!nt(e, "remove from custom user attribute array", "the given value")
|
|
221
221
|
) &&
|
|
222
|
-
this.
|
|
222
|
+
this.Fi.Ln(d.On, t, e).tt
|
|
223
223
|
);
|
|
224
224
|
}
|
|
225
225
|
incrementCustomUserAttribute(t, e) {
|
|
@@ -231,7 +231,7 @@ export default class User {
|
|
|
231
231
|
`Cannot increment custom user attribute because the given incrementValue "${e}" is not an integer.`,
|
|
232
232
|
),
|
|
233
233
|
!1)
|
|
234
|
-
: this.
|
|
234
|
+
: this.Fi.Ln(d.Gn, t, r).tt;
|
|
235
235
|
}
|
|
236
236
|
setCustomLocationAttribute(t, e, r) {
|
|
237
237
|
return (
|
|
@@ -247,7 +247,7 @@ export default class User {
|
|
|
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)
|
|
250
|
-
: this.
|
|
250
|
+
: this.Fi.Hn(t, e, r).tt)
|
|
251
251
|
);
|
|
252
252
|
}
|
|
253
253
|
addToSubscriptionGroup(t) {
|
|
@@ -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.
|
|
264
|
+
: this.Fi.Kn(t, User.Mn.SUBSCRIBED).tt;
|
|
265
265
|
}
|
|
266
266
|
removeFromSubscriptionGroup(t) {
|
|
267
267
|
return !ir(
|
|
@@ -274,24 +274,24 @@ export default class User {
|
|
|
274
274
|
"removeFromSubscriptionGroup requires a non-empty subscription group ID",
|
|
275
275
|
),
|
|
276
276
|
!1)
|
|
277
|
-
: this.
|
|
277
|
+
: this.Fi.Kn(t, User.Mn.UNSUBSCRIBED).tt;
|
|
278
278
|
}
|
|
279
279
|
setLineId(t) {
|
|
280
280
|
return ir(t, "set LINE user ID", "the ID", !0) &&
|
|
281
281
|
0 !== (null == t ? void 0 : t.length)
|
|
282
|
-
? t && t.length > User.
|
|
282
|
+
? t && t.length > User.Yn
|
|
283
283
|
? (N.error(
|
|
284
|
-
`Rejected LINE user ID ${t} because it is longer than ${User.
|
|
284
|
+
`Rejected LINE user ID ${t} because it is longer than ${User.Yn} characters.`,
|
|
285
285
|
),
|
|
286
286
|
!1)
|
|
287
|
-
: this.
|
|
287
|
+
: this.Cs.nu("native_line_id", t)
|
|
288
288
|
: (N.error("setLineId requires a non-empty ID"), !1);
|
|
289
289
|
}
|
|
290
|
-
|
|
291
|
-
this.
|
|
290
|
+
Sn(t, e, r, s, n) {
|
|
291
|
+
this.Cs.Sn(t, e, r, s, n), this.Fi.Jn();
|
|
292
292
|
}
|
|
293
|
-
|
|
294
|
-
this.
|
|
293
|
+
jn(t) {
|
|
294
|
+
this.Cs.jn(t);
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
(User.Genders = {
|
|
@@ -307,9 +307,9 @@ export default class User {
|
|
|
307
307
|
SUBSCRIBED: "subscribed",
|
|
308
308
|
UNSUBSCRIBED: "unsubscribed",
|
|
309
309
|
}),
|
|
310
|
-
(User
|
|
311
|
-
(User.
|
|
312
|
-
(User.
|
|
310
|
+
(User.Fn = /^[0-9 .\\(\\)\\+\\-]+$/),
|
|
311
|
+
(User.Mn = { SUBSCRIBED: "subscribed", UNSUBSCRIBED: "unsubscribed" }),
|
|
312
|
+
(User.Qn = "user_id"),
|
|
313
313
|
(User.lu = "custom"),
|
|
314
314
|
(User.ur = 997),
|
|
315
|
-
(User.
|
|
315
|
+
(User.Yn = 33);
|
package/src/common/base-feed.js
CHANGED
|
@@ -3,7 +3,7 @@ import r from "../managers/braze-instance.js";
|
|
|
3
3
|
import ve from "../models/braze-event.js";
|
|
4
4
|
import E from "../models/request-result.js";
|
|
5
5
|
const c = {
|
|
6
|
-
|
|
6
|
+
ut: (e, o, t) => {
|
|
7
7
|
var n, s;
|
|
8
8
|
const i = new E(),
|
|
9
9
|
l = r.P();
|
|
@@ -14,9 +14,9 @@ const c = {
|
|
|
14
14
|
),
|
|
15
15
|
i
|
|
16
16
|
);
|
|
17
|
-
const d = l.
|
|
17
|
+
const d = l.Qo();
|
|
18
18
|
return (
|
|
19
|
-
i.
|
|
19
|
+
i.$e.push(
|
|
20
20
|
new ve(
|
|
21
21
|
t || (null === (n = r.ir()) || void 0 === n ? void 0 : n.getUserId()),
|
|
22
22
|
e,
|
|
@@ -25,8 +25,8 @@ const c = {
|
|
|
25
25
|
o,
|
|
26
26
|
),
|
|
27
27
|
),
|
|
28
|
-
(i.
|
|
29
|
-
(null === (s = r.j()) || void 0 === s ? void 0 : s.
|
|
28
|
+
(i.tt =
|
|
29
|
+
(null === (s = r.j()) || void 0 === s ? void 0 : s.Vo(i.$e)) || !1),
|
|
30
30
|
i
|
|
31
31
|
);
|
|
32
32
|
},
|
|
@@ -63,7 +63,7 @@ export function generateFeedBody(e, t) {
|
|
|
63
63
|
for (const r of e.cards) {
|
|
64
64
|
const i = r instanceof ControlCard;
|
|
65
65
|
!i || e.nr()
|
|
66
|
-
? (s.appendChild(Fe(r, logCardClick, t, o.
|
|
66
|
+
? (s.appendChild(Fe(r, logCardClick, t, o.Oo())), (n = n || !i))
|
|
67
67
|
: N.error(
|
|
68
68
|
"Received a control card for a legacy news feed. Control cards are only supported with content cards.",
|
|
69
69
|
);
|
|
@@ -131,7 +131,7 @@ export function refreshFeed(e, t) {
|
|
|
131
131
|
"true" === t.getAttribute("aria-busy") &&
|
|
132
132
|
t.setAttribute("aria-busy", "false");
|
|
133
133
|
}
|
|
134
|
-
}, rr.
|
|
134
|
+
}, rr.Ro),
|
|
135
135
|
e.sr();
|
|
136
136
|
}
|
|
137
137
|
export function feedToHtml(e, t, o) {
|
|
@@ -153,7 +153,7 @@ export function feedToHtml(e, t, o) {
|
|
|
153
153
|
destroyFeedHtml(s), e.stopPropagation();
|
|
154
154
|
};
|
|
155
155
|
r.addEventListener("keydown", (e) => {
|
|
156
|
-
(e.keyCode !== mt.
|
|
156
|
+
(e.keyCode !== mt.Wo && e.keyCode !== mt.Xo) || i(e);
|
|
157
157
|
}),
|
|
158
158
|
(r.onclick = i);
|
|
159
159
|
const a = document.createElement("i");
|
|
@@ -166,7 +166,7 @@ export function feedToHtml(e, t, o) {
|
|
|
166
166
|
refreshFeed(e, s), t.stopPropagation();
|
|
167
167
|
};
|
|
168
168
|
a.addEventListener("keydown", (e) => {
|
|
169
|
-
(e.keyCode !== mt.
|
|
169
|
+
(e.keyCode !== mt.Wo && e.keyCode !== mt.Xo) || d(e);
|
|
170
170
|
}),
|
|
171
171
|
(a.onclick = d),
|
|
172
172
|
n.appendChild(a),
|
|
@@ -175,7 +175,7 @@ export function feedToHtml(e, t, o) {
|
|
|
175
175
|
const l = () => detectFeedImpressions(e, s);
|
|
176
176
|
if ((s.addEventListener("scroll", l), !o)) {
|
|
177
177
|
window.addEventListener("scroll", l);
|
|
178
|
-
const e = G.
|
|
178
|
+
const e = G.ce();
|
|
179
179
|
(scrollListeners[e] = l), s.setAttribute("data-listener-id", e);
|
|
180
180
|
}
|
|
181
181
|
return s;
|
|
@@ -188,7 +188,7 @@ export function updateFeedCards(e, t, o, s, n) {
|
|
|
188
188
|
if (e.url && to.test(e.url)) {
|
|
189
189
|
const t = eo(e.url);
|
|
190
190
|
if (ft(t)) {
|
|
191
|
-
N.error(dt(jt.
|
|
191
|
+
N.error(dt(jt.Tr, "Content Card"));
|
|
192
192
|
continue;
|
|
193
193
|
}
|
|
194
194
|
}
|
package/src/l10n/l10n-manager.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { STORAGE_KEYS as
|
|
1
|
+
import { STORAGE_KEYS as s } from "./storage-manager.js";
|
|
2
2
|
import u from "./subscription-manager.js";
|
|
3
3
|
import { logger as N, IndexedDBAdapter as tt } from "../../shared-lib/index.js";
|
|
4
4
|
export default class kt {
|
|
5
5
|
constructor(t, i, s) {
|
|
6
6
|
(this.C = t),
|
|
7
|
-
(this.
|
|
8
|
-
(this.
|
|
7
|
+
(this.Zn = i),
|
|
8
|
+
(this.gh = s),
|
|
9
9
|
(this.C = t),
|
|
10
|
-
(this.
|
|
11
|
-
(this.
|
|
12
|
-
(this.
|
|
13
|
-
(this.
|
|
14
|
-
(this.
|
|
10
|
+
(this.Zn = i || !1),
|
|
11
|
+
(this.gh = s),
|
|
12
|
+
(this.Fh = new u()),
|
|
13
|
+
(this.kh = 0),
|
|
14
|
+
(this.fh = 1);
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
return this.
|
|
16
|
+
wh() {
|
|
17
|
+
return this.Zn;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
return this.C.
|
|
19
|
+
jh() {
|
|
20
|
+
return this.C.ft(s.gt.xh);
|
|
21
21
|
}
|
|
22
|
-
setSdkAuthenticationSignature(
|
|
23
|
-
const
|
|
24
|
-
this.C.
|
|
25
|
-
const e = tt.
|
|
26
|
-
new tt(e, N).setItem(e.
|
|
22
|
+
setSdkAuthenticationSignature(t) {
|
|
23
|
+
const i = this.jh();
|
|
24
|
+
this.C.Bt(s.gt.xh, t);
|
|
25
|
+
const e = tt.Ls.Fs;
|
|
26
|
+
new tt(e, N).setItem(e.Ms.qh, this.fh, t), i !== t && this.it();
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
this.C.
|
|
30
|
-
const
|
|
31
|
-
new tt(
|
|
28
|
+
yh() {
|
|
29
|
+
this.C.Ut(s.gt.xh);
|
|
30
|
+
const t = tt.Ls.Fs;
|
|
31
|
+
new tt(t, N).ge(t.Ms.qh, this.fh);
|
|
32
32
|
}
|
|
33
33
|
subscribeToSdkAuthenticationFailures(t) {
|
|
34
|
-
return this.
|
|
34
|
+
return this.gh.Ft(t);
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
this.
|
|
36
|
+
Bh(t) {
|
|
37
|
+
this.gh.X(t);
|
|
38
|
+
}
|
|
39
|
+
Gh() {
|
|
40
|
+
this.Fh.removeAllSubscriptions();
|
|
38
41
|
}
|
|
39
42
|
Hh() {
|
|
40
|
-
this.kh
|
|
43
|
+
this.kh += 1;
|
|
41
44
|
}
|
|
42
45
|
Jh() {
|
|
43
|
-
this.
|
|
44
|
-
}
|
|
45
|
-
Kh() {
|
|
46
|
-
return this.fh;
|
|
46
|
+
return this.kh;
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
this.
|
|
48
|
+
it() {
|
|
49
|
+
this.kh = 0;
|
|
50
50
|
}
|
|
51
51
|
}
|