@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.
- package/index.d.ts +19 -106
- package/package.json +1 -1
- package/shared-lib/braze-shared-lib.js +1 -1
- package/shared-lib/indexed-db-adapter.js +12 -12
- package/shared-lib/logger.js +2 -2
- package/shared-lib/supported-options.js +7 -8
- package/src/Card/models/captioned-image.js +19 -19
- package/src/Card/models/card.js +95 -94
- package/src/Card/models/classic-card.js +19 -19
- package/src/Card/models/control-card.js +9 -9
- package/src/Card/models/image-only.js +21 -22
- package/src/Card/models/index.js +0 -1
- package/src/Card/util/card-factory.js +39 -39
- package/src/ContentCards/content-cards-provider.js +114 -114
- package/src/ContentCards/get-cached-content-cards.js +1 -1
- package/src/ContentCards/index.js +0 -1
- package/src/ContentCards/request-content-cards-refresh.js +1 -1
- package/src/ContentCards/subscribe-to-content-cards-updates.js +3 -3
- package/src/ContentCards/ui/hide-content-cards.js +2 -2
- package/src/ContentCards/ui/show-content-cards.js +14 -14
- package/src/Core/add-sdk-metadata.js +2 -2
- package/src/Core/change-user.js +2 -2
- package/src/Core/disable-sdk.js +4 -4
- package/src/Core/enable-sdk.js +4 -4
- package/src/Core/handle-braze-action.js +14 -14
- package/src/Core/is-disabled.js +2 -2
- package/src/Core/open-session.js +5 -5
- package/src/Core/set-sdk-authentication-signature.js +2 -2
- package/src/Core/wipe-data.js +4 -4
- package/src/FeatureFlags/feature-flag-factory.js +10 -10
- package/src/FeatureFlags/feature-flag.js +7 -7
- package/src/FeatureFlags/feature-flags-provider.js +50 -50
- package/src/FeatureFlags/get-all-feature-flags.js +1 -1
- package/src/FeatureFlags/get-feature-flag.js +3 -5
- package/src/Feed/feed-provider-factory.js +8 -8
- package/src/Feed/feed-provider.js +15 -15
- package/src/Feed/get-cached-feed.js +2 -2
- package/src/Feed/request-feed-refresh.js +2 -2
- package/src/Feed/subscribe-to-feed-updates.js +2 -2
- package/src/Feed/ui/hide-feed.js +2 -2
- package/src/Feed/ui/show-feed.js +13 -13
- package/src/InAppMessage/display/html-message-to-html.js +11 -12
- package/src/InAppMessage/display/in-app-message-to-html.js +15 -15
- package/src/InAppMessage/display/modal-utils.js +8 -8
- package/src/InAppMessage/in-app-message-factory.js +4 -4
- package/src/InAppMessage/in-app-message-manager.js +38 -38
- package/src/InAppMessage/models/full-screen-message.js +31 -31
- package/src/InAppMessage/models/html-message.js +16 -16
- package/src/InAppMessage/models/in-app-message-button.js +5 -5
- package/src/InAppMessage/models/in-app-message.js +46 -46
- package/src/InAppMessage/models/modal-message.js +30 -30
- package/src/InAppMessage/models/slide-up-message.js +26 -26
- package/src/InAppMessage/ui/show-in-app-message.js +9 -9
- package/src/Push/is-push-blocked.js +2 -2
- package/src/Push/is-push-permission-granted.js +2 -2
- package/src/Push/is-push-supported.js +2 -2
- package/src/Push/push-manager.js +31 -31
- package/src/Push/utils/push-utils.js +9 -9
- package/src/User/user-manager.js +8 -8
- package/src/User/user.js +29 -29
- package/src/common/base-feed.js +15 -14
- package/src/common/base-provider.js +1 -1
- package/src/common/event-logger.js +2 -2
- package/src/common/feed-display.js +32 -32
- package/src/l10n/l10n-manager-factory.js +9 -9
- package/src/managers/auth-manager.js +6 -6
- package/src/managers/braze-instance.js +96 -106
- package/src/managers/device-manager.js +17 -17
- package/src/managers/network-manager.js +27 -27
- package/src/managers/server-config-manager.js +13 -13
- package/src/managers/session-manager.js +8 -8
- package/src/managers/storage-manager-factory.js +7 -7
- package/src/managers/storage-manager.js +104 -104
- package/src/managers/subscription-manager.js +2 -2
- package/src/models/braze-event.js +5 -5
- package/src/models/device.js +1 -1
- package/src/models/identifier.js +1 -1
- package/src/models/push-token.js +1 -1
- package/src/models/server-config.js +6 -6
- package/src/request-controller.js +52 -52
- package/src/triggers/models/custom-event-data.js +1 -1
- package/src/triggers/models/custom-event-property-data.js +6 -6
- package/src/triggers/models/filter-set.js +8 -8
- package/src/triggers/models/filter.js +25 -25
- 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 +4 -4
- package/src/triggers/models/push-click-data.js +3 -3
- package/src/triggers/models/trigger-condition.js +14 -14
- package/src/triggers/models/trigger-events.js +1 -1
- package/src/triggers/models/trigger.js +11 -11
- package/src/triggers/triggers-provider.js +38 -38
- package/src/ui/js/attach-css.js +1 -1
- package/src/ui/js/feed-css.js +5 -5
- package/src/ui/js/iam-css.js +4 -4
- 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 +14 -14
- package/src/util/client-hints-parser.js +2 -2
- package/src/util/component-utils.js +2 -2
- package/src/util/device-constants.js +4 -5
- package/src/util/dom-utils.js +5 -5
- package/src/util/request-header-utils.js +4 -4
- package/src/util/user-agent-parser.js +10 -15
- package/src/Card/models/banner.js +0 -31
- 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
|
|
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
|
|
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.
|
|
21
|
+
(this.wt = t), (this.ki = e), (this.wt = t), (this.ki = e);
|
|
22
22
|
}
|
|
23
23
|
getUserId(t) {
|
|
24
|
-
const e = this.
|
|
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 !
|
|
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
|
-
: !
|
|
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
|
-
!!
|
|
41
|
-
this.
|
|
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
|
-
!!
|
|
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.
|
|
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
|
-
!
|
|
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.
|
|
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.
|
|
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.
|
|
91
|
+
: this.wt.nu("dob", `${t}-${e}-${s}`));
|
|
92
92
|
}
|
|
93
93
|
setCountry(t) {
|
|
94
|
-
return !!
|
|
94
|
+
return !!H(t, "set country", "the country", !0) && this.wt.nu("country", t);
|
|
95
95
|
}
|
|
96
96
|
setHomeCity(t) {
|
|
97
97
|
return (
|
|
98
|
-
!!
|
|
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
|
-
!!
|
|
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
|
-
!!
|
|
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.
|
|
113
|
+
) && this.wt.nu("email_subscribe", t)
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
116
|
setPushNotificationSubscriptionType(t) {
|
|
117
117
|
return (
|
|
118
|
-
!!
|
|
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.
|
|
123
|
+
) && this.wt.nu("push_subscribe", t)
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
126
|
setPhoneNumber(t) {
|
|
127
127
|
return (
|
|
128
|
-
!!
|
|
128
|
+
!!H(t, "set phone number", "the phoneNumber", !0) &&
|
|
129
129
|
(null === t || t.match(User.Ln)
|
|
130
|
-
? this.
|
|
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.
|
|
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.
|
|
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 !
|
|
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 !
|
|
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.
|
|
279
|
+
this.wt._n(t, e, r, s, i), this.ki.pu();
|
|
280
280
|
}
|
|
281
281
|
Nn(t) {
|
|
282
|
-
this.
|
|
282
|
+
this.wt.Nn(t);
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
(User.Genders = {
|
package/src/common/base-feed.js
CHANGED
|
@@ -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(
|
|
5
|
-
(this.cards =
|
|
6
|
-
(this.lastUpdated =
|
|
7
|
-
(this.cards =
|
|
8
|
-
(this.lastUpdated =
|
|
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
|
|
12
|
-
for (const
|
|
13
|
-
return
|
|
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
|
-
|
|
17
|
+
r.j.error("Must be implemented in a subclass");
|
|
17
18
|
}
|
|
18
|
-
logCardImpressions(
|
|
19
|
-
|
|
19
|
+
logCardImpressions(s) {
|
|
20
|
+
r.j.error("Must be implemented in a subclass");
|
|
20
21
|
}
|
|
21
|
-
logCardClick(
|
|
22
|
-
|
|
22
|
+
logCardClick(s) {
|
|
23
|
+
r.j.error("Must be implemented in a subclass");
|
|
23
24
|
}
|
|
24
25
|
sr() {
|
|
25
|
-
|
|
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
|
import r from "../../shared-lib/braze-shared-lib.js";
|
|
2
2
|
import e from "../managers/braze-instance.js";
|
|
3
|
-
import
|
|
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
|
|
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
|
|
4
|
-
getCardId as
|
|
5
|
-
impressOnBottom as
|
|
6
|
-
impressOnTop as
|
|
7
|
-
markCardAsRead as
|
|
8
|
-
topHadImpression as
|
|
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
|
|
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
|
|
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
|
|
15
|
-
import
|
|
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
|
|
18
|
+
import { BRAZE_ACTION_URI_REGEX as W } from "../util/validation-utils.js";
|
|
19
19
|
import {
|
|
20
|
-
INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as
|
|
21
|
-
ineligibleBrazeActionURLErrorMessage as
|
|
22
|
-
getDecodedBrazeAction as
|
|
23
|
-
containsUnknownBrazeAction as
|
|
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(
|
|
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 =
|
|
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 =
|
|
85
|
-
r =
|
|
86
|
-
i =
|
|
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 ||
|
|
88
|
+
r || i || xe(s[t]);
|
|
89
89
|
continue;
|
|
90
90
|
}
|
|
91
|
-
let a =
|
|
92
|
-
d =
|
|
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),
|
|
97
|
-
!d && i && ((d = !0),
|
|
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 =
|
|
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 !==
|
|
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 !==
|
|
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 &&
|
|
188
|
-
const t =
|
|
189
|
-
if (
|
|
190
|
-
r.j.error(dt
|
|
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
|
|
2
|
+
import Q from "../util/browser-detector.js";
|
|
3
3
|
import nr from "./l10n-manager.js";
|
|
4
|
-
const
|
|
4
|
+
const je = {
|
|
5
5
|
t: !1,
|
|
6
6
|
i: null,
|
|
7
7
|
m: () => {
|
|
8
|
-
if ((
|
|
9
|
-
let r =
|
|
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)), (
|
|
11
|
+
e.nn(L.Ba) && ((r = e.nn(L.Ba)), (t = !0)), (je.i = new nr(r, t));
|
|
12
12
|
}
|
|
13
|
-
return
|
|
13
|
+
return je.i;
|
|
14
14
|
},
|
|
15
15
|
o: () => {
|
|
16
|
-
|
|
16
|
+
je.t || (e.g(je), (je.t = !0));
|
|
17
17
|
},
|
|
18
18
|
destroy: () => {
|
|
19
|
-
(
|
|
19
|
+
(je.i = null), (je.t = !1);
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
|
-
export default
|
|
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.
|
|
26
|
-
new r.
|
|
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.
|
|
31
|
-
new r.
|
|
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.
|
|
34
|
+
return this.ph.It(t);
|
|
35
35
|
}
|
|
36
36
|
Bh(t) {
|
|
37
|
-
this.ph.
|
|
37
|
+
this.ph.Dt(t);
|
|
38
38
|
}
|
|
39
39
|
Gh() {
|
|
40
40
|
this.Fh.removeAllSubscriptions();
|