@braze/web-sdk 5.9.0 → 6.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 +109 -253
- package/package.json +1 -1
- package/shared-lib/encoding-utils.js +1 -1
- package/shared-lib/event-types.js +24 -26
- package/shared-lib/guid.js +2 -2
- package/shared-lib/indexed-db-adapter.js +19 -19
- package/shared-lib/logger.js +2 -2
- package/shared-lib/supported-options.js +21 -22
- package/src/Banner/display/banner-to-html.js +13 -25
- package/src/Banner/display/destroy-banner-html.js +2 -2
- package/src/Banner/display/detect-banner-impressions.js +11 -11
- package/src/Banner/index.js +0 -1
- package/src/Banner/request-banners-refresh.js +8 -8
- package/src/Banner/subscribe-to-banners-updates.js +2 -2
- package/src/Banner/ui/insert-banner.js +7 -7
- package/src/Card/card-manager.js +35 -37
- package/src/Card/display/card-display.js +76 -74
- package/src/Card/index.js +0 -2
- package/src/Card/log-card-dismissal.js +2 -2
- package/src/Card/log-content-card-click.js +9 -2
- package/src/Card/log-content-card-impressions.js +11 -2
- package/src/Card/models/captioned-image.js +20 -20
- package/src/Card/models/card.js +110 -104
- package/src/Card/models/classic-card.js +20 -20
- package/src/Card/models/control-card.js +14 -14
- package/src/Card/models/image-only.js +19 -20
- package/src/Card/util/card-factory.js +57 -78
- package/src/ContentCards/content-cards-provider-factory.js +10 -10
- package/src/ContentCards/content-cards-provider.js +109 -109
- package/src/ContentCards/content-cards.js +21 -13
- package/src/ContentCards/get-cached-content-cards.js +2 -2
- package/src/ContentCards/request-content-cards-refresh.js +2 -2
- package/src/ContentCards/subscribe-to-content-cards-updates.js +5 -5
- package/src/ContentCards/ui/hide-content-cards.js +5 -5
- package/src/ContentCards/ui/show-content-cards.js +34 -34
- package/src/Core/add-sdk-metadata.js +2 -2
- package/src/Core/change-user.js +7 -7
- package/src/Core/disable-sdk.js +6 -6
- package/src/Core/enable-sdk.js +5 -5
- package/src/Core/get-user.js +1 -1
- package/src/Core/handle-braze-action.js +7 -7
- package/src/Core/is-disabled.js +2 -2
- package/src/Core/is-initialized.js +1 -1
- package/src/Core/log-custom-event.js +9 -9
- package/src/Core/log-purchase.js +7 -7
- package/src/Core/open-session.js +12 -12
- package/src/Core/request-immediate-data-flush.js +1 -1
- package/src/Core/set-sdk-authentication-signature.js +2 -2
- package/src/Core/wipe-data.js +7 -7
- package/src/FeatureFlags/feature-flag-factory.js +7 -7
- package/src/FeatureFlags/feature-flag.js +6 -6
- package/src/FeatureFlags/feature-flags-provider-factory.js +9 -9
- package/src/FeatureFlags/feature-flags-provider.js +1 -1
- 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/refresh-feature-flags.js +2 -2
- package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +2 -2
- package/src/InAppMessage/defer-in-app-message.js +1 -1
- package/src/InAppMessage/display/html-message-to-html.js +37 -37
- package/src/InAppMessage/display/in-app-message-to-html.js +139 -133
- package/src/InAppMessage/display/modal-utils.js +39 -41
- package/src/InAppMessage/get-deferred-in-app-message.js +1 -1
- package/src/InAppMessage/in-app-message-factory.js +22 -14
- package/src/InAppMessage/in-app-message-manager.js +90 -88
- package/src/InAppMessage/log-in-app-message-button-click.js +5 -5
- package/src/InAppMessage/log-in-app-message-click.js +5 -5
- package/src/InAppMessage/log-in-app-message-html-click.js +5 -5
- package/src/InAppMessage/log-in-app-message-impression.js +1 -1
- package/src/InAppMessage/models/control-message.js +2 -2
- package/src/InAppMessage/models/full-screen-message.js +40 -34
- package/src/InAppMessage/models/html-message.js +23 -21
- package/src/InAppMessage/models/in-app-message-button.js +2 -2
- package/src/InAppMessage/models/in-app-message.js +137 -133
- package/src/InAppMessage/models/modal-message.js +39 -33
- package/src/InAppMessage/models/slide-up-message.js +36 -30
- 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 +56 -62
- 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 +8 -8
- package/src/Push/push-manager.js +90 -90
- package/src/Push/request-push-permission.js +1 -1
- package/src/Push/utils/push-utils.js +25 -15
- package/src/User/user-manager.js +14 -14
- package/src/User/user.js +55 -55
- package/src/common/content-cards-display.js +211 -0
- package/src/common/event-logger.js +6 -6
- package/src/index.js +0 -1
- package/src/l10n/l10n-manager-factory.js +9 -9
- package/src/l10n/l10n-manager.js +6 -6
- package/src/managers/auth-manager.js +27 -27
- package/src/managers/braze-instance.js +136 -137
- package/src/managers/device-manager.js +22 -22
- package/src/managers/network-manager.js +180 -183
- package/src/managers/server-config-manager.js +63 -63
- package/src/managers/session-manager.js +34 -34
- package/src/managers/storage-manager-factory.js +11 -11
- package/src/managers/storage-manager.js +139 -141
- package/src/managers/subscription-manager.js +3 -3
- package/src/managers/utils.js +1 -1
- package/src/models/backend-errors.js +5 -5
- package/src/models/braze-event.js +15 -15
- package/src/models/device.js +3 -3
- package/src/models/identifier.js +13 -13
- package/src/models/push-token.js +12 -12
- package/src/models/request-result.js +2 -2
- package/src/models/server-config.js +29 -29
- package/src/request-controller.js +181 -169
- package/src/triggers/models/custom-event-data.js +6 -6
- package/src/triggers/models/custom-event-property-data.js +7 -7
- package/src/triggers/models/filter-set.js +8 -8
- package/src/triggers/models/filter.js +45 -45
- package/src/triggers/models/in-app-message-click-data.js +3 -3
- 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 +1 -1
- package/src/triggers/models/trigger-condition.js +47 -47
- package/src/triggers/models/trigger-events.js +3 -3
- package/src/triggers/models/trigger.js +15 -15
- package/src/triggers/triggers-provider-factory.js +4 -4
- package/src/triggers/triggers-provider.js +44 -44
- package/src/ui/js/attach-css.js +3 -3
- package/src/ui/js/banner-css.js +1 -1
- package/src/ui/js/iam-css.js +1 -1
- package/src/ui/js/load-font-awesome.js +2 -2
- package/src/util/base-device-parser.js +4 -4
- package/src/util/braze-actions.js +8 -14
- package/src/util/browser-detector.js +12 -12
- package/src/util/client-hints-parser.js +3 -3
- package/src/util/component-utils.js +14 -14
- package/src/util/device-constants.js +1 -1
- package/src/util/dom-utils.js +6 -6
- package/src/util/html-display-utils.js +37 -37
- package/src/util/key-codes.js +1 -1
- package/src/util/net.js +1 -1
- package/src/util/request-header-utils.js +17 -17
- package/src/util/user-agent-parser.js +4 -4
- package/src/util/validation-utils.js +20 -20
- package/src/util/window-utils.js +1 -1
- package/src/Card/log-card-click.js +0 -11
- package/src/Card/log-card-impressions.js +0 -13
- package/src/Feed/feed-provider-factory.js +0 -18
- package/src/Feed/feed-provider.js +0 -90
- package/src/Feed/feed.js +0 -20
- package/src/Feed/get-cached-feed.js +0 -5
- package/src/Feed/index.js +0 -8
- package/src/Feed/log-feed-displayed.js +0 -7
- package/src/Feed/request-feed-refresh.js +0 -5
- package/src/Feed/subscribe-to-feed-updates.js +0 -5
- package/src/Feed/types.js +0 -1
- package/src/Feed/ui/hide-feed.js +0 -7
- package/src/Feed/ui/show-feed.js +0 -96
- package/src/Feed/ui/toggle-feed.js +0 -8
- package/src/common/base-feed.js +0 -29
- package/src/common/feed-display.js +0 -211
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { STORAGE_KEYS as s } from "./storage-manager.js";
|
|
2
2
|
import u from "./subscription-manager.js";
|
|
3
|
-
import
|
|
3
|
+
import ni from "../models/server-config.js";
|
|
4
4
|
import c from "../common/event-logger.js";
|
|
5
5
|
import { EventTypes as d } from "../../shared-lib/index.js";
|
|
6
|
-
export default class
|
|
6
|
+
export default class Vt {
|
|
7
7
|
constructor(t) {
|
|
8
8
|
(this.C = t),
|
|
9
9
|
(this.C = t),
|
|
10
|
-
(this.
|
|
11
|
-
(this.
|
|
12
|
-
(this.
|
|
13
|
-
(this.
|
|
14
|
-
(this.
|
|
15
|
-
(this.
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (null == this.
|
|
19
|
-
const t = this.C.ft(s.gt.
|
|
20
|
-
this.
|
|
10
|
+
(this.Vl = new u()),
|
|
11
|
+
(this.Jl = new u()),
|
|
12
|
+
(this.Ql = new u()),
|
|
13
|
+
(this.Yl = new u()),
|
|
14
|
+
(this.Zl = null),
|
|
15
|
+
(this.au = null);
|
|
16
|
+
}
|
|
17
|
+
du() {
|
|
18
|
+
if (null == this.au) {
|
|
19
|
+
const t = this.C.ft(s.gt.gu);
|
|
20
|
+
this.au = null != t ? ni.zn(t) : new ni();
|
|
21
21
|
}
|
|
22
|
-
return this.
|
|
22
|
+
return this.au;
|
|
23
23
|
}
|
|
24
24
|
Et() {
|
|
25
|
-
return this.
|
|
25
|
+
return this.du().bu;
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
fu(t) {
|
|
28
28
|
var i, e;
|
|
29
29
|
if (null != t && null != t.config) {
|
|
30
30
|
const n = t.config;
|
|
31
|
-
if (n.time > this.
|
|
32
|
-
const t = (t) => (null == t ? this.
|
|
33
|
-
r = new
|
|
31
|
+
if (n.time > this.du().bu) {
|
|
32
|
+
const t = (t) => (null == t ? this.du().vu : t),
|
|
33
|
+
r = new ni(
|
|
34
34
|
n.time,
|
|
35
35
|
n.events_blacklist,
|
|
36
36
|
n.attributes_blacklist,
|
|
@@ -43,9 +43,9 @@ export default class Mt {
|
|
|
43
43
|
n.banners,
|
|
44
44
|
);
|
|
45
45
|
let l = !1;
|
|
46
|
-
null != r.
|
|
46
|
+
null != r.pu && this._n() !== r.pu && (l = !0);
|
|
47
47
|
let u = !1;
|
|
48
|
-
null != r.
|
|
48
|
+
null != r.Ru.enabled && this.ji() !== r.Ru.enabled && (u = !0);
|
|
49
49
|
let a = !1;
|
|
50
50
|
null != r.De.enabled && this.ke() !== r.De.enabled && (a = !0);
|
|
51
51
|
let h = !1;
|
|
@@ -54,93 +54,93 @@ export default class Mt {
|
|
|
54
54
|
this.zt() !==
|
|
55
55
|
(null === (e = r.banners) || void 0 === e ? void 0 : e.enabled) &&
|
|
56
56
|
(h = !0),
|
|
57
|
-
(this.
|
|
58
|
-
this.C.Bt(s.gt.
|
|
59
|
-
l && this.
|
|
60
|
-
u && this.
|
|
61
|
-
a && this.
|
|
62
|
-
h && this.
|
|
57
|
+
(this.au = r),
|
|
58
|
+
this.C.Bt(s.gt.gu, r.bt()),
|
|
59
|
+
l && this.Vl.X(),
|
|
60
|
+
u && this.Jl.X(),
|
|
61
|
+
a && this.Ql.X(),
|
|
62
|
+
h && this.Yl.X();
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
const i = this.
|
|
68
|
-
return this.
|
|
66
|
+
Tn(t) {
|
|
67
|
+
const i = this.Vl.Dt(t);
|
|
68
|
+
return this.Zl && this.Vl.removeSubscription(this.Zl), (this.Zl = i), i;
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
return this.
|
|
70
|
+
wi(t) {
|
|
71
|
+
return this.Jl.Dt(t);
|
|
72
72
|
}
|
|
73
73
|
Ke(t) {
|
|
74
|
-
return this.
|
|
74
|
+
return this.Ql.Dt(t);
|
|
75
75
|
}
|
|
76
76
|
A(t) {
|
|
77
|
-
return this.
|
|
77
|
+
return this.Yl.Dt(t);
|
|
78
78
|
}
|
|
79
79
|
je(t) {
|
|
80
|
-
return -1 !== this.
|
|
80
|
+
return -1 !== this.du().Cu.indexOf(t);
|
|
81
81
|
}
|
|
82
82
|
hu(t) {
|
|
83
|
-
return -1 !== this.
|
|
83
|
+
return -1 !== this.du().Eu.indexOf(t);
|
|
84
84
|
}
|
|
85
85
|
Dr(t) {
|
|
86
|
-
return -1 !== this.
|
|
86
|
+
return -1 !== this.du().wu.indexOf(t);
|
|
87
87
|
}
|
|
88
|
-
|
|
89
|
-
return this.
|
|
88
|
+
yu() {
|
|
89
|
+
return this.du().Lu;
|
|
90
90
|
}
|
|
91
|
-
|
|
92
|
-
return this.
|
|
91
|
+
_n() {
|
|
92
|
+
return this.du().pu;
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
return this.
|
|
94
|
+
ji() {
|
|
95
|
+
return this.du().Ru.enabled || !1;
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
const t = this.
|
|
97
|
+
Bu() {
|
|
98
|
+
const t = this.du().vu;
|
|
99
99
|
return !(!t || null == t.enabled) && t.enabled;
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
if (!this.
|
|
103
|
-
const t = this.
|
|
101
|
+
Ol() {
|
|
102
|
+
if (!this.Bu()) return -1;
|
|
103
|
+
const t = this.du().vu;
|
|
104
104
|
return null == t.capacity || t.capacity < 10 ? -1 : t.capacity;
|
|
105
105
|
}
|
|
106
|
-
|
|
107
|
-
if (!this.
|
|
108
|
-
const t = this.
|
|
106
|
+
Gl() {
|
|
107
|
+
if (!this.Bu()) return -1;
|
|
108
|
+
const t = this.du().vu;
|
|
109
109
|
return null == t.refill_rate || t.refill_rate <= 0 ? -1 : t.refill_rate;
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
const i = this.
|
|
111
|
+
Fu(t) {
|
|
112
|
+
const i = this.du().vu.endpoint_overrides;
|
|
113
113
|
return null == i ? null : i[t];
|
|
114
114
|
}
|
|
115
|
-
|
|
116
|
-
const i = this.
|
|
115
|
+
_l(t) {
|
|
116
|
+
const i = this.Fu(t);
|
|
117
117
|
return null == i || isNaN(i.capacity) || i.capacity <= 0 ? -1 : i.capacity;
|
|
118
118
|
}
|
|
119
|
-
|
|
120
|
-
const i = this.
|
|
119
|
+
Wl(t) {
|
|
120
|
+
const i = this.Fu(t);
|
|
121
121
|
return null == i || isNaN(i.refill_rate) || i.refill_rate <= 0
|
|
122
122
|
? -1
|
|
123
123
|
: i.refill_rate;
|
|
124
124
|
}
|
|
125
125
|
ke() {
|
|
126
|
-
return this.
|
|
127
|
-
? (c.ut(d.
|
|
128
|
-
: this.
|
|
126
|
+
return this.du().De.enabled && null == this.Oe()
|
|
127
|
+
? (c.ut(d.ul, { e: "Missing feature flag refresh_rate_limit." }), !1)
|
|
128
|
+
: this.du().De.enabled || !1;
|
|
129
129
|
}
|
|
130
130
|
Oe() {
|
|
131
|
-
return this.
|
|
131
|
+
return this.du().De.refresh_rate_limit;
|
|
132
132
|
}
|
|
133
133
|
zt() {
|
|
134
134
|
var t;
|
|
135
135
|
return (
|
|
136
|
-
(null === (t = this.
|
|
136
|
+
(null === (t = this.du().banners) || void 0 === t ? void 0 : t.enabled) ||
|
|
137
137
|
null
|
|
138
138
|
);
|
|
139
139
|
}
|
|
140
140
|
ne() {
|
|
141
141
|
var t;
|
|
142
142
|
return (
|
|
143
|
-
(null === (t = this.
|
|
143
|
+
(null === (t = this.du().banners) || void 0 === t
|
|
144
144
|
? void 0
|
|
145
145
|
: t.max_placements) || 0
|
|
146
146
|
);
|
|
@@ -1,75 +1,75 @@
|
|
|
1
1
|
import { STORAGE_KEYS as s } from "../managers/storage-manager.js";
|
|
2
|
-
import
|
|
2
|
+
import ue from "../models/braze-event.js";
|
|
3
3
|
import _t from "../models/identifier.js";
|
|
4
|
-
import { convertMsToSeconds as
|
|
4
|
+
import { convertMsToSeconds as X } from "../util/date-utils.js";
|
|
5
5
|
import {
|
|
6
6
|
logger as N,
|
|
7
|
-
Guid as
|
|
7
|
+
Guid as O,
|
|
8
8
|
EventTypes as d,
|
|
9
9
|
} from "../../shared-lib/index.js";
|
|
10
|
-
export default class
|
|
10
|
+
export default class Kt {
|
|
11
11
|
constructor(s, t, i, e) {
|
|
12
12
|
(this.C = s),
|
|
13
13
|
(this.Cs = t),
|
|
14
14
|
(this.B = i),
|
|
15
|
-
(this.
|
|
15
|
+
(this.Su = e),
|
|
16
16
|
(this.C = s),
|
|
17
17
|
(this.Cs = t),
|
|
18
18
|
(this.B = i),
|
|
19
|
-
(this.
|
|
19
|
+
(this.ju = 1e3),
|
|
20
20
|
(null == e || isNaN(e)) && (e = 1800),
|
|
21
|
-
e < this.
|
|
21
|
+
e < this.ju / 1e3 &&
|
|
22
22
|
(N.info(
|
|
23
23
|
"Specified session timeout of " +
|
|
24
24
|
e +
|
|
25
25
|
"s is too small, using the minimum session timeout of " +
|
|
26
|
-
this.
|
|
26
|
+
this.ju / 1e3 +
|
|
27
27
|
"s instead.",
|
|
28
28
|
),
|
|
29
|
-
(e = this.
|
|
30
|
-
(this.
|
|
29
|
+
(e = this.ju / 1e3)),
|
|
30
|
+
(this.Su = e);
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
return new
|
|
32
|
+
xu(s, t) {
|
|
33
|
+
return new ue(this.Cs.getUserId(), d.Du, s, t.eu, { d: X(s - t.Gu) });
|
|
34
34
|
}
|
|
35
35
|
St() {
|
|
36
|
-
const t = this.C.tu(s.iu.
|
|
36
|
+
const t = this.C.tu(s.iu.Nu);
|
|
37
37
|
return null == t ? null : t.eu;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
zu() {
|
|
40
40
|
const t = new Date().valueOf(),
|
|
41
|
-
i = this.B.
|
|
41
|
+
i = this.B.yu();
|
|
42
42
|
if (null == i) return !1;
|
|
43
|
-
const e = this.C.ft(s.gt.
|
|
43
|
+
const e = this.C.ft(s.gt.Hu),
|
|
44
44
|
n = null == e || t - e > 1e3 * i;
|
|
45
|
-
return n && this.C.Bt(s.gt.
|
|
45
|
+
return n && this.C.Bt(s.gt.Hu, t), n;
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
return null == t || null == t.
|
|
47
|
+
Wu(s, t) {
|
|
48
|
+
return null == t || null == t.ku || (!(s - t.Gu < this.ju) && t.ku < s);
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
Vo() {
|
|
51
51
|
const t = new Date().valueOf(),
|
|
52
|
-
i = t + 1e3 * this.
|
|
53
|
-
e = this.C.tu(s.iu.
|
|
54
|
-
if (this.
|
|
52
|
+
i = t + 1e3 * this.Su,
|
|
53
|
+
e = this.C.tu(s.iu.Nu);
|
|
54
|
+
if (this.Wu(t, e)) {
|
|
55
55
|
let n = "Generating session start event with time " + t;
|
|
56
56
|
if (null != e) {
|
|
57
|
-
let s = e.
|
|
58
|
-
s - e.
|
|
59
|
-
this.C.
|
|
57
|
+
let s = e.qu;
|
|
58
|
+
s - e.Gu < this.ju && (s = e.Gu + this.ju),
|
|
59
|
+
this.C.Au(this.xu(s, e)),
|
|
60
60
|
(n += " (old session ended " + s + ")");
|
|
61
61
|
}
|
|
62
62
|
(n += ". Will expire " + i.valueOf()), N.info(n);
|
|
63
|
-
const o = new _t(
|
|
64
|
-
this.C.
|
|
65
|
-
this.C.uu(s.iu.
|
|
66
|
-
return null == this.C.ft(s.gt.
|
|
63
|
+
const o = new _t(O.ce(), i);
|
|
64
|
+
this.C.Au(new ue(this.Cs.getUserId(), d.Iu, t, o.eu)),
|
|
65
|
+
this.C.uu(s.iu.Nu, o);
|
|
66
|
+
return null == this.C.ft(s.gt.Hu) && this.C.Bt(s.gt.Hu, t), o.eu;
|
|
67
67
|
}
|
|
68
|
-
if (null != e) return (e.
|
|
68
|
+
if (null != e) return (e.qu = t), (e.ku = i), this.C.uu(s.iu.Nu, e), e.eu;
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
const t = this.C.tu(s.iu.
|
|
70
|
+
Ju() {
|
|
71
|
+
const t = this.C.tu(s.iu.Nu);
|
|
72
72
|
null != t &&
|
|
73
|
-
(this.C.
|
|
73
|
+
(this.C.Ku(s.iu.Nu), this.C.Au(this.xu(new Date().valueOf(), t)));
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ee, { STORAGE_KEYS as s } from "./storage-manager.js";
|
|
2
2
|
import { logger as N } from "../../shared-lib/index.js";
|
|
3
|
-
const
|
|
4
|
-
|
|
3
|
+
const Gt = {
|
|
4
|
+
Ba: function (e, o = !1) {
|
|
5
5
|
let t = !1;
|
|
6
6
|
try {
|
|
7
7
|
if (localStorage && localStorage.getItem)
|
|
8
8
|
try {
|
|
9
|
-
localStorage.setItem(s.gt.
|
|
10
|
-
localStorage.getItem(s.gt.
|
|
11
|
-
(localStorage.removeItem(s.gt.
|
|
9
|
+
localStorage.setItem(s.gt.ec, "true"),
|
|
10
|
+
localStorage.getItem(s.gt.ec) &&
|
|
11
|
+
(localStorage.removeItem(s.gt.ec), (t = !0));
|
|
12
12
|
} catch (e) {
|
|
13
13
|
if (
|
|
14
14
|
!(
|
|
@@ -24,12 +24,12 @@ const Bt = {
|
|
|
24
24
|
} catch (e) {
|
|
25
25
|
N.info("Local Storage not supported!");
|
|
26
26
|
}
|
|
27
|
-
const r =
|
|
28
|
-
a = new
|
|
27
|
+
const r = Gt.oc(),
|
|
28
|
+
a = new ee.tc(e, r && !o, t);
|
|
29
29
|
let n;
|
|
30
|
-
return (n = t ? new
|
|
30
|
+
return (n = t ? new ee.rc(e) : new ee.ac()), new ee(a, n);
|
|
31
31
|
},
|
|
32
|
-
|
|
32
|
+
oc: function () {
|
|
33
33
|
return (
|
|
34
34
|
navigator.cookieEnabled ||
|
|
35
35
|
("cookie" in document &&
|
|
@@ -39,4 +39,4 @@ const Bt = {
|
|
|
39
39
|
);
|
|
40
40
|
},
|
|
41
41
|
};
|
|
42
|
-
export default
|
|
42
|
+
export default Gt;
|