@braze/web-sdk 4.8.3 → 4.9.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 +121 -6
- package/package.json +1 -1
- package/shared-lib/braze-shared-lib.js +7 -7
- package/shared-lib/encoding-utils.js +4 -4
- package/shared-lib/event-types.js +22 -21
- package/shared-lib/guid.js +7 -7
- package/shared-lib/indexed-db-adapter.js +172 -135
- package/shared-lib/logger.js +26 -26
- package/shared-lib/supported-options.js +15 -15
- package/shared-lib/types.js +1 -0
- package/src/Card/card-manager-factory.js +1 -1
- package/src/Card/card-manager.js +2 -2
- package/src/Card/display/card-display.js +5 -4
- package/src/Card/models/banner.js +10 -10
- package/src/Card/models/captioned-image.js +7 -7
- package/src/Card/models/card.js +37 -36
- package/src/Card/models/classic-card.js +7 -7
- package/src/Card/models/control-card.js +3 -3
- package/src/Card/models/image-only.js +32 -0
- package/src/Card/models/index.js +1 -0
- package/src/Card/util/card-factory.js +16 -16
- package/src/ContentCards/content-cards-provider-factory.js +1 -1
- package/src/ContentCards/content-cards-provider.js +102 -102
- 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 +15 -12
- package/src/Core/add-sdk-metadata.js +2 -2
- package/src/Core/braze-sdk-metadata.js +1 -1
- package/src/Core/change-user.js +1 -1
- package/src/Core/device-properties.js +1 -1
- package/src/Core/disable-sdk.js +10 -7
- package/src/Core/enable-sdk.js +5 -2
- package/src/Core/get-device-id.js +3 -3
- package/src/Core/get-user.js +1 -1
- package/src/Core/handle-braze-action.js +14 -14
- package/src/Core/is-disabled.js +1 -1
- package/src/Core/log-custom-event.js +4 -4
- package/src/Core/log-purchase.js +9 -9
- package/src/Core/open-session.js +10 -10
- package/src/FeatureFlags/feature-flag-factory.js +5 -3
- package/src/FeatureFlags/feature-flag.js +17 -14
- package/src/FeatureFlags/feature-flags-provider-factory.js +1 -1
- package/src/FeatureFlags/feature-flags-provider.js +56 -43
- package/src/FeatureFlags/get-all-feature-flags.js +2 -2
- package/src/FeatureFlags/get-feature-flag.js +2 -2
- package/src/FeatureFlags/index.js +1 -0
- package/src/FeatureFlags/log-feature-flag-impression.js +23 -0
- package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +1 -1
- package/src/Feed/feed-provider-factory.js +1 -1
- package/src/Feed/feed-provider.js +20 -20
- 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 +13 -10
- package/src/InAppMessage/defer-in-app-message.js +13 -0
- package/src/InAppMessage/display/get-animation-effect.js +1 -1
- package/src/InAppMessage/display/html-message-to-html.js +47 -47
- package/src/InAppMessage/display/in-app-message-to-html.js +92 -91
- package/src/InAppMessage/display/modal-utils.js +16 -16
- package/src/InAppMessage/get-deferred-in-app-message.js +5 -0
- package/src/InAppMessage/in-app-message-factory.js +77 -57
- package/src/InAppMessage/in-app-message-manager-factory.js +6 -6
- package/src/InAppMessage/in-app-message-manager.js +121 -82
- package/src/InAppMessage/index.js +2 -0
- package/src/InAppMessage/log-in-app-message-button-click.js +17 -9
- package/src/InAppMessage/log-in-app-message-click.js +4 -4
- package/src/InAppMessage/log-in-app-message-html-click.js +6 -6
- package/src/InAppMessage/log-in-app-message-impression.js +3 -3
- package/src/InAppMessage/models/full-screen-message.js +65 -29
- package/src/InAppMessage/models/html-message.js +32 -13
- package/src/InAppMessage/models/in-app-message-button.js +7 -7
- package/src/InAppMessage/models/in-app-message.js +203 -134
- package/src/InAppMessage/models/modal-message.js +64 -29
- package/src/InAppMessage/models/slide-up-message.js +52 -24
- package/src/InAppMessage/models/templated-in-app-message.js +8 -8
- package/src/InAppMessage/subscribe-to-in-app-message.js +2 -2
- package/src/InAppMessage/ui/automatically-show-in-app-messages.js +6 -6
- package/src/InAppMessage/ui/show-in-app-message.js +49 -47
- package/src/InAppMessage/utils/in-app-message-utils.js +1 -1
- 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-factory.js +19 -19
- package/src/Push/push-manager.js +131 -131
- package/src/Push/request-push-permission.js +2 -2
- package/src/Push/unregister-push.js +2 -2
- package/src/Push/utils/push-utils.js +12 -10
- package/src/User/user-manager.js +4 -4
- package/src/User/user.js +57 -57
- package/src/common/base-feed.js +1 -1
- package/src/common/constants.js +1 -0
- package/src/common/event-logger.js +6 -6
- package/src/common/feed-display.js +34 -34
- package/src/common/translations.js +33 -33
- package/src/l10n/l10n-manager-factory.js +8 -8
- package/src/l10n/l10n-manager.js +6 -2
- package/src/l10n/types.js +1 -0
- package/src/managers/auth-manager.js +29 -29
- package/src/managers/braze-instance.js +125 -125
- package/src/managers/device-manager.js +20 -20
- package/src/managers/network-manager.js +100 -98
- package/src/managers/server-config-manager.js +23 -23
- package/src/managers/session-manager.js +5 -5
- package/src/managers/storage-manager-factory.js +9 -9
- package/src/managers/storage-manager.js +132 -129
- package/src/managers/subscription-manager.js +8 -8
- package/src/models/backend-errors.js +6 -6
- package/src/models/braze-event.js +11 -11
- package/src/models/braze-sdk-metadata.js +1 -1
- package/src/models/device.js +2 -2
- package/src/models/identifier.js +1 -1
- package/src/models/push-token.js +5 -5
- package/src/models/server-config.js +7 -7
- package/src/request-controller.js +191 -178
- package/src/triggers/models/custom-event-data.js +4 -4
- package/src/triggers/models/custom-event-property-data.js +7 -7
- package/src/triggers/models/filter-set.js +5 -5
- package/src/triggers/models/filter.js +64 -60
- package/src/triggers/models/in-app-message-click-data.js +9 -9
- package/src/triggers/models/purchase-data.js +4 -4
- package/src/triggers/models/purchase-property-data.js +6 -6
- package/src/triggers/models/push-click-data.js +6 -6
- package/src/triggers/models/trigger-condition.js +55 -59
- package/src/triggers/models/trigger-events.js +3 -3
- package/src/triggers/models/trigger.js +47 -35
- package/src/triggers/triggers-provider-factory.js +10 -6
- package/src/triggers/triggers-provider.js +203 -185
- package/src/triggers/types.js +1 -0
- package/src/ui/js/attach-css.js +5 -4
- package/src/ui/js/feed-css.js +5 -5
- package/src/ui/js/iam-css.js +5 -5
- 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 +35 -30
- package/src/util/browser-detector.js +30 -31
- package/src/util/client-hints-parser.js +30 -24
- package/src/util/code-utils.js +22 -21
- package/src/util/color-utils.js +19 -13
- package/src/util/component-utils.js +4 -4
- package/src/util/date-utils.js +4 -3
- package/src/util/device-constants.js +10 -10
- package/src/util/dom-utils.js +32 -28
- package/src/util/error-utils.js +1 -1
- package/src/util/key-codes.js +1 -1
- package/src/util/net.js +53 -57
- package/src/util/request-header-utils.js +34 -11
- package/src/util/string-utils.js +14 -14
- package/src/util/types.js +1 -0
- package/src/util/url-utils.js +1 -4
- package/src/util/user-agent-parser.js +39 -39
- package/src/util/validation-utils.js +32 -32
- package/src/util/window-utils.js +11 -12
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import y from "../common/base-provider.js";
|
|
2
2
|
import { newInAppMessageFromJson as pt } from "../InAppMessage/in-app-message-factory.js";
|
|
3
|
-
import
|
|
3
|
+
import be from "../models/braze-event.js";
|
|
4
4
|
import { InAppMessage } from "../InAppMessage/index.js";
|
|
5
5
|
import {
|
|
6
6
|
isArray as p,
|
|
7
7
|
isEqual as ii,
|
|
8
|
-
validateValueIsFromEnum as H
|
|
8
|
+
validateValueIsFromEnum as H,
|
|
9
9
|
} from "../util/code-utils.js";
|
|
10
10
|
import { STORAGE_KEYS as i } from "../managers/storage-manager.js";
|
|
11
11
|
import wt from "../InAppMessage/models/templated-in-app-message.js";
|
|
@@ -16,293 +16,311 @@ export default class gr extends y {
|
|
|
16
16
|
constructor(t, i, s, e, r) {
|
|
17
17
|
super(),
|
|
18
18
|
(this.tg = t),
|
|
19
|
-
(this.
|
|
20
|
-
(this.
|
|
21
|
-
(this.
|
|
22
|
-
(this.
|
|
23
|
-
(this.
|
|
24
|
-
(this.
|
|
25
|
-
(this.
|
|
26
|
-
(this.
|
|
27
|
-
(this.
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
19
|
+
(this.yt = i),
|
|
20
|
+
(this.u = s),
|
|
21
|
+
(this.ki = e),
|
|
22
|
+
(this.ig = r),
|
|
23
|
+
(this.tg = t),
|
|
24
|
+
(this.yt = i),
|
|
25
|
+
(this.u = s),
|
|
26
|
+
(this.ki = e),
|
|
27
|
+
(this.ig = r),
|
|
28
|
+
(this.sg = []),
|
|
29
|
+
(this.eg = []),
|
|
30
|
+
(this.hg = null),
|
|
31
|
+
(this.ng = {}),
|
|
32
|
+
(this.og = {}),
|
|
33
|
+
(this.triggers = []),
|
|
34
|
+
(this.ag = 0),
|
|
35
|
+
this.lg(),
|
|
36
|
+
this.gg();
|
|
30
37
|
}
|
|
31
|
-
|
|
32
|
-
(this.
|
|
33
|
-
(this.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
fg() {
|
|
39
|
+
if (this.u) {
|
|
40
|
+
(this.hg = this.u.v(i.k.iE) || this.hg),
|
|
41
|
+
(this.ng = this.u.v(i.k.aE) || this.ng),
|
|
42
|
+
(this.og = this.u.v(i.k.nE) || this.og);
|
|
43
|
+
for (let t = 0; t < this.triggers.length; t++) {
|
|
44
|
+
const i = this.triggers[t];
|
|
45
|
+
i.id && null != this.og[i.id] && i.Lu(this.og[i.id]);
|
|
46
|
+
}
|
|
38
47
|
}
|
|
39
48
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
lg() {
|
|
50
|
+
if (!this.u) return;
|
|
51
|
+
this.ag = this.u.v(i.k.oE) || 0;
|
|
52
|
+
const t = this.u.v(i.k.rE) || [],
|
|
43
53
|
s = [];
|
|
44
|
-
for (let i = 0; i < t.length; i++) s.push(mt.
|
|
45
|
-
(this.
|
|
54
|
+
for (let i = 0; i < t.length; i++) s.push(mt.Yn(t[i]));
|
|
55
|
+
(this.triggers = s), this.fg();
|
|
46
56
|
}
|
|
47
|
-
|
|
57
|
+
gg() {
|
|
48
58
|
const t = this,
|
|
49
|
-
s = function(i, s, e, r, h) {
|
|
50
|
-
return function() {
|
|
51
|
-
t.
|
|
59
|
+
s = function (i, s, e, r, h) {
|
|
60
|
+
return function () {
|
|
61
|
+
t.cg(i, s, e, r, h);
|
|
52
62
|
};
|
|
53
63
|
},
|
|
54
64
|
e = {};
|
|
55
|
-
for (
|
|
65
|
+
for (const t of this.triggers) t.id && (e[t.id] = t);
|
|
56
66
|
let r = !1;
|
|
57
|
-
for (let t = 0; t < this.
|
|
58
|
-
const i = this.
|
|
59
|
-
if (null != this.
|
|
60
|
-
const t = this.
|
|
67
|
+
for (let t = 0; t < this.triggers.length; t++) {
|
|
68
|
+
const i = this.triggers[t];
|
|
69
|
+
if (i.id && null != this.ng[i.id]) {
|
|
70
|
+
const t = this.ng[i.id],
|
|
61
71
|
h = [];
|
|
62
72
|
for (let r = 0; r < t.length; r++) {
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
if (
|
|
73
|
+
const n = t[r],
|
|
74
|
+
o = i.Ru(n.Zr || 0);
|
|
75
|
+
if (o > 0) {
|
|
66
76
|
let t, r;
|
|
67
|
-
h.push(
|
|
68
|
-
null !=
|
|
69
|
-
null !=
|
|
70
|
-
const
|
|
71
|
-
if (p(
|
|
72
|
-
for (let t = 0; t <
|
|
73
|
-
const i = e[
|
|
74
|
-
null != i &&
|
|
77
|
+
h.push(n),
|
|
78
|
+
null != n.ug && (t = n.ug),
|
|
79
|
+
null != n.dg && be.TE(n.dg) && (r = be.Yn(n.dg));
|
|
80
|
+
const a = [];
|
|
81
|
+
if (n.pg && p(n.pg))
|
|
82
|
+
for (let t = 0; t < n.pg.length; t++) {
|
|
83
|
+
const i = e[n.pg[t]];
|
|
84
|
+
null != i && a.push(i);
|
|
75
85
|
}
|
|
76
|
-
this.
|
|
86
|
+
this.eg.push(window.setTimeout(s(i, n.Zr || 0, t, r, a), o));
|
|
77
87
|
}
|
|
78
88
|
}
|
|
79
|
-
this.
|
|
80
|
-
((this.
|
|
89
|
+
this.ng[i.id].length > h.length &&
|
|
90
|
+
((this.ng[i.id] = h),
|
|
81
91
|
(r = !0),
|
|
82
|
-
0 === this.
|
|
92
|
+
0 === this.ng[i.id].length && delete this.ng[i.id]);
|
|
83
93
|
}
|
|
84
94
|
}
|
|
85
|
-
r && this.
|
|
95
|
+
r && this.u && this.u.D(i.k.aE, this.ng);
|
|
86
96
|
}
|
|
87
|
-
|
|
97
|
+
mg() {
|
|
98
|
+
if (!this.u) return;
|
|
88
99
|
const t = [];
|
|
89
|
-
for (let i = 0; i < this.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
this.
|
|
100
|
+
for (let i = 0; i < this.triggers.length; i++)
|
|
101
|
+
t.push(this.triggers[i].ss());
|
|
102
|
+
(this.ag = new Date().valueOf()),
|
|
103
|
+
this.u.D(i.k.rE, t),
|
|
104
|
+
this.u.D(i.k.oE, this.ag);
|
|
93
105
|
}
|
|
94
|
-
|
|
95
|
-
(this.
|
|
106
|
+
bg() {
|
|
107
|
+
if (!this.u) return;
|
|
108
|
+
(this.u.v(i.k.oE) || 0) > this.ag ? this.lg() : this.fg();
|
|
96
109
|
}
|
|
97
110
|
Ts(t) {
|
|
98
111
|
let s = !1;
|
|
99
112
|
if (null != t && t.triggers) {
|
|
100
|
-
this.
|
|
113
|
+
this.ig.mn(), this.fg();
|
|
101
114
|
const e = {},
|
|
102
115
|
h = {};
|
|
103
|
-
this.
|
|
116
|
+
this.triggers = [];
|
|
104
117
|
for (let i = 0; i < t.triggers.length; i++) {
|
|
105
118
|
const r = mt.fromJson(t.triggers[i]);
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
119
|
+
if (r) {
|
|
120
|
+
r.id &&
|
|
121
|
+
null != this.og[r.id] &&
|
|
122
|
+
(r.Lu(this.og[r.id]), (e[r.id] = this.og[r.id])),
|
|
123
|
+
r.id && null != this.ng[r.id] && (h[r.id] = this.ng[r.id]);
|
|
124
|
+
for (let t = 0; t < r.Pu.length; t++)
|
|
125
|
+
if (r.Pu[t].sc(tt.zs, null)) {
|
|
126
|
+
s = !0;
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
this.triggers.push(r);
|
|
130
|
+
}
|
|
115
131
|
}
|
|
116
|
-
ii(this.
|
|
117
|
-
ii(this.
|
|
118
|
-
this.
|
|
132
|
+
ii(this.og, e) || ((this.og = e), this.u && this.u.D(i.k.nE, this.og)),
|
|
133
|
+
ii(this.ng, h) || ((this.ng = h), this.u && this.u.D(i.k.aE, this.ng)),
|
|
134
|
+
this.mg(),
|
|
119
135
|
s &&
|
|
120
136
|
(r.j.info("Trigger with test condition found, firing test."),
|
|
121
|
-
this.
|
|
122
|
-
this.
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
137
|
+
this.be(tt.zs)),
|
|
138
|
+
this.be(tt.OPEN);
|
|
139
|
+
const n = this.sg;
|
|
140
|
+
let o;
|
|
141
|
+
this.sg = [];
|
|
142
|
+
for (let t = 0; t < n.length; t++)
|
|
143
|
+
(o = Array.prototype.slice.call(n[t])), this.be(...o);
|
|
126
144
|
}
|
|
127
145
|
}
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
this.
|
|
146
|
+
cg(t, i, s, e, h) {
|
|
147
|
+
const n = (e) => {
|
|
148
|
+
this.fg();
|
|
131
149
|
const h = new Date().valueOf();
|
|
132
|
-
if (!t.
|
|
133
|
-
return !1 === navigator.onLine && t.type === mt.
|
|
150
|
+
if (!t.Vu(i))
|
|
151
|
+
return !1 === navigator.onLine && t.type === mt.Wr.Vr && e.imageUrl
|
|
134
152
|
? (r.j.info(
|
|
135
|
-
`Not showing ${t.type} trigger action ${t.id} due to offline state
|
|
153
|
+
`Not showing ${t.type} trigger action ${t.id} due to offline state.`,
|
|
136
154
|
),
|
|
137
|
-
void this.
|
|
138
|
-
: void (t.
|
|
139
|
-
? 0 === this.
|
|
155
|
+
void this.ig.Ji(t.id, InAppMessage.Ie.Uh))
|
|
156
|
+
: void (t.Ju(h) && this.wg(t, h, s)
|
|
157
|
+
? 0 === this.yt.ic()
|
|
140
158
|
? r.j.info(
|
|
141
|
-
`Not displaying trigger ${t.id} because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called
|
|
159
|
+
`Not displaying trigger ${t.id} because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called.`,
|
|
142
160
|
)
|
|
143
|
-
: (this.
|
|
161
|
+
: (this.yt.Et([e]), this.yg(t, h))
|
|
144
162
|
: r.j.info(
|
|
145
|
-
`Not displaying trigger ${t.id} because display time fell outside of the acceptable time window
|
|
163
|
+
`Not displaying trigger ${t.id} because display time fell outside of the acceptable time window.`,
|
|
146
164
|
));
|
|
147
|
-
t.type === mt.
|
|
148
|
-
? this.
|
|
149
|
-
: this.
|
|
165
|
+
t.type === mt.Wr.Gu
|
|
166
|
+
? this.ig.Ji(t.id, InAppMessage.Ie.Qr)
|
|
167
|
+
: this.ig.Ji(t.id, InAppMessage.Ie.bh);
|
|
150
168
|
},
|
|
151
|
-
|
|
152
|
-
this.
|
|
153
|
-
const
|
|
154
|
-
if (null !=
|
|
155
|
-
if ((this.
|
|
156
|
-
let t = `Server aborted in-app message display, but the timeout on fallback trigger ${
|
|
169
|
+
o = () => {
|
|
170
|
+
this.fg();
|
|
171
|
+
const n = h.pop();
|
|
172
|
+
if (null != n)
|
|
173
|
+
if ((this.Tg(n, i, s, e, h), n.Vu(i))) {
|
|
174
|
+
let t = `Server aborted in-app message display, but the timeout on fallback trigger ${n.id} has already elapsed.`;
|
|
157
175
|
h.length > 0 && (t += " Continuing to fall back."),
|
|
158
176
|
r.j.info(t),
|
|
159
|
-
this.
|
|
160
|
-
|
|
177
|
+
this.ig.Ji(n.id, InAppMessage.Ie.bh),
|
|
178
|
+
o();
|
|
161
179
|
} else {
|
|
162
180
|
r.j.info(
|
|
163
|
-
`Server aborted in-app message display. Falling back to lower priority ${
|
|
181
|
+
`Server aborted in-app message display. Falling back to lower priority ${n.type} trigger action ${t.id}.`,
|
|
164
182
|
);
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
? this.
|
|
168
|
-
setTimeout(() => {
|
|
169
|
-
this.
|
|
170
|
-
},
|
|
183
|
+
const o = 1e3 * n.Iu - (new Date().valueOf() - i);
|
|
184
|
+
o > 0
|
|
185
|
+
? this.eg.push(
|
|
186
|
+
window.setTimeout(() => {
|
|
187
|
+
this.cg(n, i, s, e, h);
|
|
188
|
+
}, o),
|
|
171
189
|
)
|
|
172
|
-
: this.
|
|
190
|
+
: this.cg(n, i, s, e, h);
|
|
173
191
|
}
|
|
174
192
|
};
|
|
175
|
-
let
|
|
193
|
+
let a, l, g;
|
|
176
194
|
switch (t.type) {
|
|
177
|
-
case mt.
|
|
178
|
-
if (((
|
|
195
|
+
case mt.Wr.Vr:
|
|
196
|
+
if (((a = pt(t.data)), null == a)) {
|
|
179
197
|
r.j.error(
|
|
180
|
-
`Could not parse trigger data for trigger ${t.id}, ignoring
|
|
198
|
+
`Could not parse trigger data for trigger ${t.id}, ignoring.`,
|
|
181
199
|
),
|
|
182
|
-
this.
|
|
200
|
+
this.ig.Ji(t.id, InAppMessage.Ie.Xr);
|
|
183
201
|
break;
|
|
184
202
|
}
|
|
185
|
-
if (((
|
|
186
|
-
r.j.error(
|
|
203
|
+
if (((l = this.ig.Mr(a)), l)) {
|
|
204
|
+
r.j.error(l), o();
|
|
187
205
|
break;
|
|
188
206
|
}
|
|
189
|
-
|
|
207
|
+
n(a);
|
|
190
208
|
break;
|
|
191
|
-
case mt.
|
|
192
|
-
if (((g = wt.fromJson(t.data,
|
|
209
|
+
case mt.Wr.Gu:
|
|
210
|
+
if (((g = wt.fromJson(t.data, n, o, i, t.sn || 0)), null == g)) {
|
|
193
211
|
r.j.error(
|
|
194
|
-
`Could not parse trigger data for trigger ${t.id}, ignoring
|
|
212
|
+
`Could not parse trigger data for trigger ${t.id}, ignoring.`,
|
|
195
213
|
),
|
|
196
|
-
this.
|
|
214
|
+
this.ig.Ji(t.id, InAppMessage.Ie.Xr);
|
|
197
215
|
break;
|
|
198
216
|
}
|
|
199
|
-
this.
|
|
217
|
+
this.ig.Hr(g, s, e);
|
|
200
218
|
break;
|
|
201
219
|
default:
|
|
202
220
|
r.j.error(
|
|
203
|
-
`Trigger ${t.id} was of unexpected type ${t.type}, ignoring
|
|
221
|
+
`Trigger ${t.id} was of unexpected type ${t.type}, ignoring.`,
|
|
204
222
|
),
|
|
205
|
-
this.
|
|
223
|
+
this.ig.Ji(t.id, InAppMessage.Ie.Xr);
|
|
206
224
|
}
|
|
207
225
|
}
|
|
208
|
-
|
|
226
|
+
be(t, i = null, s) {
|
|
209
227
|
if (!H(tt, t, "Cannot fire trigger action.", "TriggerEvents")) return;
|
|
210
|
-
if (this.
|
|
228
|
+
if (this.ki && this.ki.yu())
|
|
211
229
|
return (
|
|
212
230
|
r.j.info(
|
|
213
|
-
"Trigger sync is currently in progress, awaiting sync completion before firing trigger event."
|
|
231
|
+
"Trigger sync is currently in progress, awaiting sync completion before firing trigger event.",
|
|
214
232
|
),
|
|
215
|
-
void this.
|
|
233
|
+
void this.sg.push(arguments)
|
|
216
234
|
);
|
|
217
|
-
this.
|
|
235
|
+
this.bg();
|
|
218
236
|
const e = new Date().valueOf(),
|
|
219
|
-
h = e - this.
|
|
220
|
-
let
|
|
221
|
-
|
|
222
|
-
const
|
|
223
|
-
for (let s = 0; s < this.
|
|
224
|
-
const r = this.
|
|
225
|
-
h = e + 1e3 * r.
|
|
237
|
+
h = e - (this.hg || 0);
|
|
238
|
+
let n = !0,
|
|
239
|
+
o = !0;
|
|
240
|
+
const a = [];
|
|
241
|
+
for (let s = 0; s < this.triggers.length; s++) {
|
|
242
|
+
const r = this.triggers[s],
|
|
243
|
+
h = e + 1e3 * r.Iu;
|
|
226
244
|
if (
|
|
227
|
-
r.
|
|
228
|
-
(null == r.startTime || r.startTime <= e) &&
|
|
229
|
-
(null == r.endTime || r.endTime >= e)
|
|
245
|
+
r.Ju(h) &&
|
|
246
|
+
(null == r.startTime || r.startTime.valueOf() <= e) &&
|
|
247
|
+
(null == r.endTime || r.endTime.valueOf() >= e)
|
|
230
248
|
) {
|
|
231
249
|
let s = !1;
|
|
232
250
|
for (let e = 0; e < r.Pu.length; e++)
|
|
233
|
-
if (r.Pu[e].
|
|
251
|
+
if (r.Pu[e].sc(t, i)) {
|
|
234
252
|
s = !0;
|
|
235
253
|
break;
|
|
236
254
|
}
|
|
237
|
-
s && ((
|
|
255
|
+
s && ((n = !1), this.wg(r, h, t) && ((o = !1), a.push(r)));
|
|
238
256
|
}
|
|
239
257
|
}
|
|
240
|
-
if (
|
|
258
|
+
if (n)
|
|
241
259
|
return void r.j.info(
|
|
242
|
-
`Trigger event ${t} did not match any trigger conditions
|
|
260
|
+
`Trigger event ${t} did not match any trigger conditions.`,
|
|
243
261
|
);
|
|
244
|
-
if (
|
|
262
|
+
if (o)
|
|
245
263
|
return void r.j.info(
|
|
246
|
-
`Ignoring ${t} trigger event because a trigger was displayed ${
|
|
247
|
-
1e3
|
|
264
|
+
`Ignoring ${t} trigger event because a trigger was displayed ${
|
|
265
|
+
h / 1e3
|
|
266
|
+
}s ago.`,
|
|
248
267
|
);
|
|
249
|
-
|
|
250
|
-
const
|
|
251
|
-
null !=
|
|
268
|
+
a.sort((t, i) => t.priority - i.priority);
|
|
269
|
+
const l = a.pop();
|
|
270
|
+
null != l &&
|
|
252
271
|
(r.j.info(
|
|
253
|
-
`Firing ${
|
|
272
|
+
`Firing ${l.type} trigger action ${l.id} from trigger event ${t}.`,
|
|
254
273
|
),
|
|
255
|
-
this.
|
|
256
|
-
0 ===
|
|
257
|
-
? this.
|
|
258
|
-
: this.
|
|
259
|
-
setTimeout(() => {
|
|
260
|
-
this.
|
|
261
|
-
}, 1e3 *
|
|
274
|
+
this.Tg(l, e, t, s, a),
|
|
275
|
+
0 === l.Iu
|
|
276
|
+
? this.cg(l, e, t, s, a)
|
|
277
|
+
: this.eg.push(
|
|
278
|
+
window.setTimeout(() => {
|
|
279
|
+
this.cg(l, e, t, s, a);
|
|
280
|
+
}, 1e3 * l.Iu),
|
|
262
281
|
));
|
|
263
282
|
}
|
|
264
|
-
changeUser(t) {
|
|
265
|
-
if (((this.
|
|
266
|
-
(this.
|
|
267
|
-
for (let t = 0; t < this.
|
|
268
|
-
(this.
|
|
269
|
-
this.
|
|
270
|
-
this.yh.ri(i.k.Ga),
|
|
271
|
-
this.yh.ri(i.k.ya);
|
|
283
|
+
changeUser(t = !1) {
|
|
284
|
+
if (((this.triggers = []), this.u && this.u.ni(i.k.rE), !t)) {
|
|
285
|
+
(this.sg = []), (this.hg = null), (this.og = {}), (this.ng = {});
|
|
286
|
+
for (let t = 0; t < this.eg.length; t++) clearTimeout(this.eg[t]);
|
|
287
|
+
(this.eg = []),
|
|
288
|
+
this.u && (this.u.ni(i.k.iE), this.u.ni(i.k.nE), this.u.ni(i.k.aE));
|
|
272
289
|
}
|
|
273
290
|
}
|
|
274
291
|
clearData() {
|
|
275
|
-
(this.
|
|
276
|
-
for (let t = 0; t < this.
|
|
277
|
-
this.
|
|
292
|
+
(this.triggers = []), (this.hg = null), (this.og = {}), (this.ng = {});
|
|
293
|
+
for (let t = 0; t < this.eg.length; t++) clearTimeout(this.eg[t]);
|
|
294
|
+
this.eg = [];
|
|
278
295
|
}
|
|
279
296
|
wg(t, i, s) {
|
|
280
|
-
if (null == this.
|
|
281
|
-
if (s === tt.
|
|
297
|
+
if (null == this.hg) return !0;
|
|
298
|
+
if (s === tt.zs)
|
|
282
299
|
return (
|
|
283
300
|
r.j.info(
|
|
284
|
-
"Ignoring minimum interval between trigger because it is a test type."
|
|
301
|
+
"Ignoring minimum interval between trigger because it is a test type.",
|
|
285
302
|
),
|
|
286
303
|
!0
|
|
287
304
|
);
|
|
288
305
|
let e = t.Fu;
|
|
289
|
-
return null == e && (e = this.tg), i - this.
|
|
306
|
+
return null == e && (e = this.tg), i - this.hg >= 1e3 * e;
|
|
290
307
|
}
|
|
291
|
-
|
|
292
|
-
this.
|
|
293
|
-
const
|
|
294
|
-
let
|
|
295
|
-
(
|
|
296
|
-
const
|
|
297
|
-
for (
|
|
298
|
-
(
|
|
308
|
+
Tg(t, s, e, r, h) {
|
|
309
|
+
this.fg(), t.id && (this.ng[t.id] = this.ng[t.id] || []);
|
|
310
|
+
const n = {};
|
|
311
|
+
let o;
|
|
312
|
+
(n.Zr = s), (n.ug = e), null != r && (o = r.ss()), (n.dg = o);
|
|
313
|
+
const a = [];
|
|
314
|
+
for (const t of h) t.id && a.push(t.id);
|
|
315
|
+
(n.pg = a),
|
|
316
|
+
t.id && this.ng[t.id].push(n),
|
|
317
|
+
this.u && this.u.D(i.k.aE, this.ng);
|
|
299
318
|
}
|
|
300
|
-
|
|
301
|
-
this.
|
|
302
|
-
t.
|
|
303
|
-
(this.
|
|
304
|
-
|
|
305
|
-
(this.
|
|
306
|
-
this.yh.D(i.k.Ga, this.ag);
|
|
319
|
+
yg(t, s) {
|
|
320
|
+
this.fg(),
|
|
321
|
+
t.Lu(s),
|
|
322
|
+
(this.hg = s),
|
|
323
|
+
t.id && (this.og[t.id] = s),
|
|
324
|
+
this.u && (this.u.D(i.k.iE, s), this.u.D(i.k.nE, this.og));
|
|
307
325
|
}
|
|
308
326
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/src/ui/js/attach-css.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import e, { OPTIONS as L } from "../../managers/braze-instance.js";
|
|
2
2
|
export function attachCSS(n, t, o) {
|
|
3
3
|
const c = n || document.querySelector("head"),
|
|
4
|
-
s = `ab-${t}-css-definitions-${"4.
|
|
5
|
-
|
|
4
|
+
s = `ab-${t}-css-definitions-${"4.9.0".replace(/\./g, "-")}`;
|
|
5
|
+
if (!c) return;
|
|
6
|
+
const a = c.ownerDocument || document;
|
|
6
7
|
if (null == a.getElementById(s)) {
|
|
7
8
|
const n = a.createElement("style");
|
|
8
|
-
(n.innerHTML = o), (n.id = s);
|
|
9
|
-
const t = e.nn(L.
|
|
9
|
+
(n.innerHTML = o || ""), (n.id = s);
|
|
10
|
+
const t = e.nn(L.po);
|
|
10
11
|
null != t && n.setAttribute("nonce", t), c.appendChild(n);
|
|
11
12
|
}
|
|
12
13
|
}
|
package/src/ui/js/feed-css.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { attachCSS as
|
|
2
|
-
import { loadFontAwesome as
|
|
1
|
+
import { attachCSS as Ie } from "./attach-css.js";
|
|
2
|
+
import { loadFontAwesome as Ne } from "./load-font-awesome.js";
|
|
3
3
|
export function attachFeedCSS(t) {
|
|
4
|
-
|
|
4
|
+
Ie(
|
|
5
5
|
t,
|
|
6
6
|
"feed",
|
|
7
|
-
"body>.ab-feed{position:fixed;top:0;right:0;bottom:0;width:421px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}body>.ab-feed .ab-feed-body{position:absolute;top:0;left:0;right:0;border:none;border-left:1px solid #d0d0d0;padding-top:70px;min-height:100%}body>.ab-feed .ab-initial-spinner{float:none}body>.ab-feed .ab-no-cards-message{position:absolute;width:100%;margin-left:-20px;top:40%}.ab-feed{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);-moz-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);box-shadow:0 1px 7px 1px rgba(66,82,113,.15);width:402px;background-color:#eee;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:13px;line-height:130%;letter-spacing:normal;overflow-y:auto;overflow-x:visible;z-index:9011;-webkit-overflow-scrolling:touch}.ab-feed :focus,.ab-feed:focus{outline:0}.ab-feed .ab-feed-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d0d0d0;border-top:none;padding:20px 20px 0 20px}.ab-feed.ab-effect-slide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px);-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-feed.ab-effect-slide.ab-show{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-feed.ab-effect-slide.ab-hide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card{position:relative;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100%;border:1px solid #d0d0d0;margin-bottom:20px;overflow:hidden;background-color:#fff;-webkit-transition:height .4s ease-in-out,margin .4s ease-in-out;-moz-transition:height .4s ease-in-out,margin .4s ease-in-out;-o-transition:height .4s ease-in-out,margin .4s ease-in-out;transition:height .4s ease-in-out,margin .4s ease-in-out}.ab-feed .ab-card .ab-pinned-indicator{position:absolute;right:0;top:0;margin-right:-1px;width:0;height:0;border-style:solid;border-width:0 24px 24px 0;border-color:transparent #1676d0 transparent transparent}.ab-feed .ab-card .ab-pinned-indicator .fa-star{position:absolute;right:-21px;top:2px;font-size:9px;color:#fff}.ab-feed .ab-card.ab-effect-card.ab-hide{-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-left{-webkit-transform:translateX(-450px);-moz-transform:translateX(-450px);-ms-transform:translateX(-450px);transform:translateX(-450px)}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-right{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card.ab-effect-card.ab-hide:not(.ab-swiped-left):not(.ab-swiped-right){opacity:0}.ab-feed .ab-card .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021;opacity:0;-webkit-transition:.5s;-moz-transition:.5s;-o-transition:.5s;transition:.5s}.ab-feed .ab-card .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-feed .ab-card .ab-close-button svg.ab-chevron{display:none}.ab-feed .ab-card .ab-close-button:active{background-color:transparent}.ab-feed .ab-card .ab-close-button:focus{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover svg{fill-opacity:.8}.ab-feed .ab-card .ab-close-button:hover{opacity:1}.ab-feed .ab-card .ab-close-button:focus{opacity:1}.ab-feed .ab-card a{float:none;color:inherit;text-decoration:none}.ab-feed .ab-card a:hover{text-decoration:underline}.ab-feed .ab-card .ab-image-area{float:none;display:inline-block;vertical-align:top;line-height:0;overflow:hidden;width:100%;-webkit-box-sizing:initial;-moz-box-sizing:initial;box-sizing:initial}.ab-feed .ab-card .ab-image-area img{float:none;height:auto;width:100%}.ab-feed .ab-card.ab-banner .ab-card-body{display:none}.ab-feed .ab-card .ab-card-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:100%;position:relative}.ab-feed .ab-card .ab-unread-indicator{position:absolute;bottom:0;margin-right:-1px;width:100%;height:5px;background-color:#1676d0}.ab-feed .ab-card .ab-unread-indicator.read{background-color:transparent}.ab-feed .ab-card .ab-title{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:18px;line-height:130%;padding:20px 25px 0 25px}.ab-feed .ab-card .ab-description{float:none;color:#545454;padding:15px 25px 20px 25px;word-wrap:break-word;white-space:pre-wrap}.ab-feed .ab-card .ab-description.ab-no-title{padding-top:20px}.ab-feed .ab-card .ab-url-area{float:none;color:#1676d0;margin-top:12px;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-feed .ab-card.ab-classic-card .ab-card-body{min-height:40px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body{min-height:100px;padding-left:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area{width:60px;height:60px;padding:20px 0 25px 25px;position:absolute}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;max-width:100%;max-height:100%;width:auto;height:auto}.ab-feed .ab-card.ab-classic-card.with-image .ab-title{background-color:transparent;font-size:16px}.ab-feed .ab-card.ab-classic-card.with-image .ab-description{padding-top:10px}.ab-feed .ab-card.ab-control-card{height:0;width:0;margin:0;border:0}.ab-feed .ab-feed-buttons-wrapper{float:none;position:relative;background-color:#282828;height:50px;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);z-index:1}.ab-feed .ab-feed-buttons-wrapper .ab-close-button,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{float:none;cursor:pointer;color:#fff;font-size:18px;padding:16px;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{font-size:22px}.ab-feed .ab-feed-buttons-wrapper .ab-close-button{float:right}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover{padding-top:12px;padding-right:14px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{padding-left:17px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{padding-top:13px;padding-left:14px}.ab-feed .ab-no-cards-message{text-align:center;margin-bottom:20px}@media (max-width:600px){body>.ab-feed{width:100%}}"
|
|
7
|
+
"body>.ab-feed{position:fixed;top:0;right:0;bottom:0;width:421px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}body>.ab-feed .ab-feed-body{position:absolute;top:0;left:0;right:0;border:none;border-left:1px solid #d0d0d0;padding-top:70px;min-height:100%}body>.ab-feed .ab-initial-spinner{float:none}body>.ab-feed .ab-no-cards-message{position:absolute;width:100%;margin-left:-20px;top:40%}.ab-feed{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);-moz-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);box-shadow:0 1px 7px 1px rgba(66,82,113,.15);width:402px;background-color:#eee;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:13px;line-height:130%;letter-spacing:normal;overflow-y:auto;overflow-x:visible;z-index:9011;-webkit-overflow-scrolling:touch}.ab-feed :focus,.ab-feed:focus{outline:0}.ab-feed .ab-feed-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d0d0d0;border-top:none;padding:20px 20px 0 20px}.ab-feed.ab-effect-slide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px);-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-feed.ab-effect-slide.ab-show{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-feed.ab-effect-slide.ab-hide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card{position:relative;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100%;border:1px solid #d0d0d0;margin-bottom:20px;overflow:hidden;background-color:#fff;-webkit-transition:height .4s ease-in-out,margin .4s ease-in-out;-moz-transition:height .4s ease-in-out,margin .4s ease-in-out;-o-transition:height .4s ease-in-out,margin .4s ease-in-out;transition:height .4s ease-in-out,margin .4s ease-in-out}.ab-feed .ab-card .ab-pinned-indicator{position:absolute;right:0;top:0;margin-right:-1px;width:0;height:0;border-style:solid;border-width:0 24px 24px 0;border-color:transparent #1676d0 transparent transparent}.ab-feed .ab-card .ab-pinned-indicator .fa-star{position:absolute;right:-21px;top:2px;font-size:9px;color:#fff}.ab-feed .ab-card.ab-effect-card.ab-hide{-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-left{-webkit-transform:translateX(-450px);-moz-transform:translateX(-450px);-ms-transform:translateX(-450px);transform:translateX(-450px)}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-right{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card.ab-effect-card.ab-hide:not(.ab-swiped-left):not(.ab-swiped-right){opacity:0}.ab-feed .ab-card .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021;opacity:0;-webkit-transition:.5s;-moz-transition:.5s;-o-transition:.5s;transition:.5s}.ab-feed .ab-card .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-feed .ab-card .ab-close-button svg.ab-chevron{display:none}.ab-feed .ab-card .ab-close-button:active{background-color:transparent}.ab-feed .ab-card .ab-close-button:focus{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover svg{fill-opacity:.8}.ab-feed .ab-card .ab-close-button:hover{opacity:1}.ab-feed .ab-card .ab-close-button:focus{opacity:1}.ab-feed .ab-card a{float:none;color:inherit;text-decoration:none}.ab-feed .ab-card a:hover{text-decoration:underline}.ab-feed .ab-card .ab-image-area{float:none;display:inline-block;vertical-align:top;line-height:0;overflow:hidden;width:100%;-webkit-box-sizing:initial;-moz-box-sizing:initial;box-sizing:initial}.ab-feed .ab-card .ab-image-area img{float:none;height:auto;width:100%}.ab-feed .ab-card.ab-banner .ab-card-body{display:none}.ab-feed .ab-card.ab-image-only .ab-card-body{display:none}.ab-feed .ab-card .ab-card-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:100%;position:relative}.ab-feed .ab-card .ab-unread-indicator{position:absolute;bottom:0;margin-right:-1px;width:100%;height:5px;background-color:#1676d0}.ab-feed .ab-card .ab-unread-indicator.read{background-color:transparent}.ab-feed .ab-card .ab-title{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:18px;line-height:130%;padding:20px 25px 0 25px}.ab-feed .ab-card .ab-description{float:none;color:#545454;padding:15px 25px 20px 25px;word-wrap:break-word;white-space:pre-wrap}.ab-feed .ab-card .ab-description.ab-no-title{padding-top:20px}.ab-feed .ab-card .ab-url-area{float:none;color:#1676d0;margin-top:12px;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-feed .ab-card.ab-classic-card .ab-card-body{min-height:40px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body{min-height:100px;padding-left:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area{width:60px;height:60px;padding:20px 0 25px 25px;position:absolute}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;max-width:100%;max-height:100%;width:auto;height:auto}.ab-feed .ab-card.ab-classic-card.with-image .ab-title{background-color:transparent;font-size:16px}.ab-feed .ab-card.ab-classic-card.with-image .ab-description{padding-top:10px}.ab-feed .ab-card.ab-control-card{height:0;width:0;margin:0;border:0}.ab-feed .ab-feed-buttons-wrapper{float:none;position:relative;background-color:#282828;height:50px;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);z-index:1}.ab-feed .ab-feed-buttons-wrapper .ab-close-button,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{float:none;cursor:pointer;color:#fff;font-size:18px;padding:16px;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{font-size:22px}.ab-feed .ab-feed-buttons-wrapper .ab-close-button{float:right}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover{padding-top:12px;padding-right:14px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{padding-left:17px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{padding-top:13px;padding-left:14px}.ab-feed .ab-no-cards-message{text-align:center;margin-bottom:20px}@media (max-width:600px){body>.ab-feed{width:100%}}",
|
|
8
8
|
);
|
|
9
9
|
}
|
|
10
10
|
export function setupFeedUI() {
|
|
11
|
-
attachFeedCSS(),
|
|
11
|
+
attachFeedCSS(), Ne();
|
|
12
12
|
}
|