@braze/web-sdk 5.2.0 → 5.3.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 +54 -5
- package/package.json +1 -1
- package/shared-lib/event-types.js +14 -14
- package/shared-lib/indexed-db-adapter.js +51 -51
- package/shared-lib/logger.js +7 -7
- package/shared-lib/supported-options.js +7 -7
- package/src/ContentCards/content-cards-provider.js +107 -135
- 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 +2 -2
- package/src/ContentCards/ui/show-content-cards.js +1 -1
- package/src/FeatureFlags/feature-flag.js +41 -30
- package/src/FeatureFlags/feature-flags-provider.js +88 -84
- 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 +3 -3
- package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +2 -2
- package/src/Feed/feed-provider.js +24 -24
- 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 +9 -9
- package/src/InAppMessage/display/in-app-message-to-html.js +20 -20
- package/src/InAppMessage/display/modal-utils.js +5 -5
- package/src/InAppMessage/get-deferred-in-app-message.js +1 -1
- package/src/InAppMessage/in-app-message-factory.js +4 -4
- package/src/InAppMessage/in-app-message-manager.js +78 -75
- package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
- package/src/InAppMessage/log-in-app-message-click.js +3 -3
- package/src/InAppMessage/log-in-app-message-html-click.js +3 -3
- package/src/InAppMessage/log-in-app-message-impression.js +1 -1
- package/src/InAppMessage/models/full-screen-message.js +12 -12
- package/src/InAppMessage/models/html-message.js +9 -9
- package/src/InAppMessage/models/in-app-message-button.js +2 -2
- package/src/InAppMessage/models/in-app-message.js +84 -82
- package/src/InAppMessage/models/modal-message.js +12 -12
- package/src/InAppMessage/models/slide-up-message.js +17 -17
- 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 +17 -17
- package/src/Push/push-manager-factory.js +6 -6
- package/src/Push/push-manager.js +2 -2
- package/src/Push/utils/push-utils.js +1 -1
- package/src/User/user.js +12 -12
- package/src/common/base-provider.js +1 -1
- package/src/common/constants.js +0 -2
- package/src/common/event-logger.js +2 -2
- package/src/common/feed-display.js +1 -1
- package/src/managers/auth-manager.js +3 -3
- package/src/managers/braze-instance.js +73 -73
- package/src/managers/device-manager.js +15 -15
- package/src/managers/network-manager.js +190 -145
- package/src/managers/server-config-manager.js +43 -47
- package/src/managers/session-manager.js +21 -21
- package/src/managers/storage-manager-factory.js +1 -1
- package/src/managers/storage-manager.js +107 -107
- package/src/managers/utils.js +1 -1
- package/src/models/backend-errors.js +5 -5
- package/src/models/braze-event.js +6 -6
- package/src/models/device.js +2 -2
- package/src/models/identifier.js +8 -8
- package/src/models/server-config.js +25 -25
- package/src/request-controller.js +115 -108
- package/src/triggers/models/custom-event-data.js +2 -2
- package/src/triggers/models/custom-event-property-data.js +4 -4
- package/src/triggers/models/filter-set.js +3 -3
- package/src/triggers/models/filter.js +55 -55
- package/src/triggers/models/in-app-message-click-data.js +8 -8
- package/src/triggers/models/purchase-data.js +2 -2
- 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 +40 -40
- package/src/triggers/models/trigger-events.js +1 -1
- package/src/triggers/models/trigger.js +31 -31
- package/src/triggers/triggers-provider-factory.js +1 -1
- package/src/triggers/triggers-provider.js +40 -40
- package/src/ui/js/attach-css.js +2 -2
- package/src/util/base-device-parser.js +7 -7
- package/src/util/braze-actions.js +4 -4
- package/src/util/browser-detector.js +23 -23
- package/src/util/client-hints-parser.js +4 -4
- package/src/util/dom-utils.js +6 -6
- package/src/util/net.js +4 -4
- package/src/util/request-header-utils.js +36 -37
- package/src/util/user-agent-parser.js +7 -7
- package/src/util/window-utils.js +1 -1
|
@@ -8,60 +8,60 @@ import {
|
|
|
8
8
|
export default class lr {
|
|
9
9
|
constructor(t, s, e, i) {
|
|
10
10
|
(this.Tl = t),
|
|
11
|
-
(this.
|
|
11
|
+
(this._l = s),
|
|
12
12
|
(this.comparator = e),
|
|
13
|
-
(this.
|
|
13
|
+
(this.Ll = i),
|
|
14
14
|
(this.Tl = t),
|
|
15
|
-
(this.
|
|
15
|
+
(this._l = s),
|
|
16
16
|
(this.comparator = e),
|
|
17
|
-
(this.
|
|
18
|
-
this.
|
|
19
|
-
this.comparator !== lr.Ul
|
|
20
|
-
this.comparator !== lr.
|
|
21
|
-
this.comparator !== lr.
|
|
22
|
-
this.comparator !== lr.
|
|
23
|
-
(this.
|
|
17
|
+
(this.Ll = i),
|
|
18
|
+
this._l === lr.Ol.Il &&
|
|
19
|
+
this.comparator !== lr.Ql.Ul &&
|
|
20
|
+
this.comparator !== lr.Ql.Xl &&
|
|
21
|
+
this.comparator !== lr.Ql.Fl &&
|
|
22
|
+
this.comparator !== lr.Ql.Kl &&
|
|
23
|
+
(this.Ll = l(this.Ll));
|
|
24
24
|
}
|
|
25
25
|
Jl(t) {
|
|
26
26
|
let s = null;
|
|
27
27
|
switch ((null != t && (s = t[this.Tl]), this.comparator)) {
|
|
28
|
-
case lr.
|
|
29
|
-
return null != s && s.valueOf() === this.
|
|
30
|
-
case lr.
|
|
31
|
-
return null == s || s.valueOf() !== this.
|
|
32
|
-
case lr.
|
|
33
|
-
return null != s && typeof s == typeof this.
|
|
34
|
-
case lr.Ul
|
|
35
|
-
return this.
|
|
36
|
-
? null != s && yt(s) && es(s) <= this.
|
|
37
|
-
: null != s && typeof s == typeof this.
|
|
38
|
-
case lr.
|
|
39
|
-
return null != s && typeof s == typeof this.
|
|
40
|
-
case lr.
|
|
41
|
-
return this.
|
|
42
|
-
? null != s && yt(s) && es(s) >= this.
|
|
43
|
-
: null != s && typeof s == typeof this.
|
|
44
|
-
case lr.
|
|
28
|
+
case lr.Ql.Pl:
|
|
29
|
+
return null != s && s.valueOf() === this.Ll.valueOf();
|
|
30
|
+
case lr.Ql.Yl:
|
|
31
|
+
return null == s || s.valueOf() !== this.Ll.valueOf();
|
|
32
|
+
case lr.Ql.Zl:
|
|
33
|
+
return null != s && typeof s == typeof this.Ll && s > this.Ll;
|
|
34
|
+
case lr.Ql.Ul:
|
|
35
|
+
return this._l === lr.Ol.Il
|
|
36
|
+
? null != s && yt(s) && es(s) <= this.Ll.valueOf()
|
|
37
|
+
: null != s && typeof s == typeof this.Ll && s >= this.Ll;
|
|
38
|
+
case lr.Ql.$l:
|
|
39
|
+
return null != s && typeof s == typeof this.Ll && s < this.Ll;
|
|
40
|
+
case lr.Ql.Xl:
|
|
41
|
+
return this._l === lr.Ol.Il
|
|
42
|
+
? null != s && yt(s) && es(s) >= this.Ll.valueOf()
|
|
43
|
+
: null != s && typeof s == typeof this.Ll && s <= this.Ll;
|
|
44
|
+
case lr.Ql.Hu:
|
|
45
45
|
return (
|
|
46
46
|
null != s &&
|
|
47
47
|
"string" == typeof s &&
|
|
48
|
-
typeof s == typeof this.
|
|
49
|
-
null != s.match(this.
|
|
48
|
+
typeof s == typeof this.Ll &&
|
|
49
|
+
null != s.match(this.Ll)
|
|
50
50
|
);
|
|
51
|
-
case lr.
|
|
51
|
+
case lr.Ql.Qu:
|
|
52
52
|
return null != s;
|
|
53
|
-
case lr.
|
|
53
|
+
case lr.Ql.Xu:
|
|
54
54
|
return null == s;
|
|
55
|
-
case lr.
|
|
56
|
-
return null != s && yt(s) && ls(s) < this.
|
|
57
|
-
case lr.
|
|
58
|
-
return null != s && yt(s) && ls(s) > this.
|
|
59
|
-
case lr.
|
|
55
|
+
case lr.Ql.Fl:
|
|
56
|
+
return null != s && yt(s) && ls(s) < this.Ll;
|
|
57
|
+
case lr.Ql.Kl:
|
|
58
|
+
return null != s && yt(s) && ls(s) > this.Ll;
|
|
59
|
+
case lr.Ql.Gu:
|
|
60
60
|
return (
|
|
61
61
|
null == s ||
|
|
62
|
-
typeof s != typeof this.
|
|
62
|
+
typeof s != typeof this.Ll ||
|
|
63
63
|
"string" != typeof s ||
|
|
64
|
-
null == s.match(this.
|
|
64
|
+
null == s.match(this.Ll)
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
return !1;
|
|
@@ -75,28 +75,28 @@ export default class lr {
|
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
Y() {
|
|
78
|
-
let t = this.
|
|
78
|
+
let t = this.Ll;
|
|
79
79
|
return (
|
|
80
|
-
yt(this.
|
|
81
|
-
{ k: this.Tl, t: this.
|
|
80
|
+
yt(this.Ll) && (t = h(t.valueOf())),
|
|
81
|
+
{ k: this.Tl, t: this._l, c: this.comparator, v: t }
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
84
|
static qn(t) {
|
|
85
85
|
return new lr(t.k, t.t, t.c, t.v);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
(lr.
|
|
89
|
-
(lr.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
88
|
+
(lr.Ol = { Vu: "boolean", Wu: "number", Yu: "string", Il: "date" }),
|
|
89
|
+
(lr.Ql = {
|
|
90
|
+
Pl: 1,
|
|
91
|
+
Yl: 2,
|
|
92
|
+
Zl: 3,
|
|
93
|
+
Ul: 4,
|
|
94
|
+
$l: 5,
|
|
95
|
+
Xl: 6,
|
|
96
|
+
Hu: 10,
|
|
97
|
+
Qu: 11,
|
|
98
|
+
Xu: 12,
|
|
99
|
+
Fl: 15,
|
|
100
|
+
Kl: 16,
|
|
101
|
+
Gu: 17,
|
|
102
102
|
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import ri from "./trigger-condition.js";
|
|
2
2
|
export default class ni {
|
|
3
3
|
constructor(t, i) {
|
|
4
|
-
(this.
|
|
4
|
+
(this.Zu = t), (this.tf = i), (this.Zu = t), (this.tf = i);
|
|
5
5
|
}
|
|
6
6
|
Jl(t) {
|
|
7
|
-
if (null == this.
|
|
8
|
-
const i = ri.
|
|
7
|
+
if (null == this.Zu) return !1;
|
|
8
|
+
const i = ri.if(t[0], this.Zu);
|
|
9
9
|
if (!i) return !1;
|
|
10
|
-
let r = null == this.
|
|
11
|
-
if (null != this.
|
|
12
|
-
for (let i = 0; i < this.
|
|
13
|
-
if (this.
|
|
10
|
+
let r = null == this.tf || 0 === this.tf.length;
|
|
11
|
+
if (null != this.tf)
|
|
12
|
+
for (let i = 0; i < this.tf.length; i++)
|
|
13
|
+
if (this.tf[i] === t[1]) {
|
|
14
14
|
r = !0;
|
|
15
15
|
break;
|
|
16
16
|
}
|
|
@@ -20,6 +20,6 @@ export default class ni {
|
|
|
20
20
|
return new ni(t ? t.id : null, t ? t.buttons : null);
|
|
21
21
|
}
|
|
22
22
|
Y() {
|
|
23
|
-
return this.
|
|
23
|
+
return this.Zu;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default class
|
|
1
|
+
export default class rs {
|
|
2
2
|
constructor(t) {
|
|
3
3
|
(this.productId = t), (this.productId = t);
|
|
4
4
|
}
|
|
@@ -6,7 +6,7 @@ export default class ns {
|
|
|
6
6
|
return null == this.productId || t[0] === this.productId;
|
|
7
7
|
}
|
|
8
8
|
static fromJson(t) {
|
|
9
|
-
return new
|
|
9
|
+
return new rs(t ? t.product_id : null);
|
|
10
10
|
}
|
|
11
11
|
Y() {
|
|
12
12
|
return this.productId;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class
|
|
1
|
+
import ts from "./filter-set.js";
|
|
2
|
+
export default class ns {
|
|
3
3
|
constructor(t, s) {
|
|
4
4
|
(this.productId = t), (this.Ml = s), (this.productId = t), (this.Ml = s);
|
|
5
5
|
}
|
|
@@ -10,9 +10,9 @@ export default class hs {
|
|
|
10
10
|
return s === this.productId && this.Ml.Jl(i);
|
|
11
11
|
}
|
|
12
12
|
static fromJson(t) {
|
|
13
|
-
return new
|
|
13
|
+
return new ns(
|
|
14
14
|
t ? t.product_id : null,
|
|
15
|
-
t ?
|
|
15
|
+
t ? ts.fromJson(t.property_filters) : null,
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
18
|
Y() {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import ri from "./trigger-condition.js";
|
|
2
2
|
export default class ur {
|
|
3
3
|
constructor(t) {
|
|
4
|
-
(this.
|
|
4
|
+
(this.Zu = t), (this.Zu = t);
|
|
5
5
|
}
|
|
6
6
|
Jl(t) {
|
|
7
|
-
return null == this.
|
|
7
|
+
return null == this.Zu || ri.if(t[0], this.Zu);
|
|
8
8
|
}
|
|
9
9
|
static fromJson(t) {
|
|
10
10
|
return new ur(t ? t.campaign_id : null);
|
|
11
11
|
}
|
|
12
12
|
Y() {
|
|
13
|
-
return this.
|
|
13
|
+
return this.Zu;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import Zt from "./custom-event-data.js";
|
|
2
|
+
import is from "./custom-event-property-data.js";
|
|
3
|
+
import ts from "./filter-set.js";
|
|
4
4
|
import ni from "./in-app-message-click-data.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import rs from "./purchase-data.js";
|
|
6
|
+
import ns from "./purchase-property-data.js";
|
|
7
7
|
import ur from "./push-click-data.js";
|
|
8
8
|
import tt from "./trigger-events.js";
|
|
9
9
|
import { logger as r } from "../../../shared-lib/index.js";
|
|
@@ -15,7 +15,7 @@ export default class ri {
|
|
|
15
15
|
sc(e, t) {
|
|
16
16
|
return ri.cc[this.type] === e && (null == this.data || this.data.Jl(t));
|
|
17
17
|
}
|
|
18
|
-
static
|
|
18
|
+
static if(e, t) {
|
|
19
19
|
let s = null;
|
|
20
20
|
try {
|
|
21
21
|
s = window.atob(e);
|
|
@@ -28,25 +28,25 @@ export default class ri {
|
|
|
28
28
|
const t = e.type;
|
|
29
29
|
let r = null;
|
|
30
30
|
switch (t) {
|
|
31
|
-
case ri.
|
|
32
|
-
case ri.
|
|
31
|
+
case ri._r.OPEN:
|
|
32
|
+
case ri._r.kt:
|
|
33
33
|
break;
|
|
34
|
-
case ri.
|
|
35
|
-
r =
|
|
34
|
+
case ri._r.Rr:
|
|
35
|
+
r = rs.fromJson(e.data);
|
|
36
36
|
break;
|
|
37
|
-
case ri.
|
|
38
|
-
r =
|
|
37
|
+
case ri._r.nc:
|
|
38
|
+
r = ns.fromJson(e.data);
|
|
39
39
|
break;
|
|
40
|
-
case ri.
|
|
40
|
+
case ri._r.vr:
|
|
41
41
|
r = ur.fromJson(e.data);
|
|
42
42
|
break;
|
|
43
|
-
case ri.
|
|
44
|
-
r =
|
|
43
|
+
case ri._r.ue:
|
|
44
|
+
r = Zt.fromJson(e.data);
|
|
45
45
|
break;
|
|
46
|
-
case ri.
|
|
47
|
-
r =
|
|
46
|
+
case ri._r.lc:
|
|
47
|
+
r = is.fromJson(e.data);
|
|
48
48
|
break;
|
|
49
|
-
case ri.
|
|
49
|
+
case ri._r.Qr:
|
|
50
50
|
r = ni.fromJson(e.data);
|
|
51
51
|
}
|
|
52
52
|
return new ri(t, r);
|
|
@@ -58,46 +58,46 @@ export default class ri {
|
|
|
58
58
|
let t,
|
|
59
59
|
r = null;
|
|
60
60
|
switch (e.t) {
|
|
61
|
-
case ri.
|
|
62
|
-
case ri.
|
|
61
|
+
case ri._r.OPEN:
|
|
62
|
+
case ri._r.kt:
|
|
63
63
|
break;
|
|
64
|
-
case ri.
|
|
65
|
-
r = new
|
|
64
|
+
case ri._r.Rr:
|
|
65
|
+
r = new rs(e.d);
|
|
66
66
|
break;
|
|
67
|
-
case ri.
|
|
68
|
-
(t = e.d || {}), (r = new
|
|
67
|
+
case ri._r.nc:
|
|
68
|
+
(t = e.d || {}), (r = new ns(t.id, ts.qn(t.pf || [])));
|
|
69
69
|
break;
|
|
70
|
-
case ri.
|
|
70
|
+
case ri._r.vr:
|
|
71
71
|
r = new ur(e.d);
|
|
72
72
|
break;
|
|
73
|
-
case ri.
|
|
74
|
-
r = new
|
|
73
|
+
case ri._r.ue:
|
|
74
|
+
r = new Zt(e.d);
|
|
75
75
|
break;
|
|
76
|
-
case ri.
|
|
77
|
-
(t = e.d || {}), (r = new
|
|
76
|
+
case ri._r.lc:
|
|
77
|
+
(t = e.d || {}), (r = new is(t.e, ts.qn(t.pf || [])));
|
|
78
78
|
break;
|
|
79
|
-
case ri.
|
|
79
|
+
case ri._r.Qr:
|
|
80
80
|
r = new ni(e.d);
|
|
81
81
|
}
|
|
82
82
|
return new ri(e.t, r);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
(ri.
|
|
85
|
+
(ri._r = {
|
|
86
86
|
OPEN: "open",
|
|
87
87
|
Rr: "purchase",
|
|
88
88
|
nc: "purchase_property",
|
|
89
89
|
vr: "push_click",
|
|
90
90
|
ue: "custom_event",
|
|
91
91
|
lc: "custom_event_property",
|
|
92
|
-
|
|
92
|
+
Qr: "iam_click",
|
|
93
93
|
kt: "test",
|
|
94
94
|
}),
|
|
95
95
|
(ri.cc = {}),
|
|
96
|
-
(ri.cc[ri.
|
|
97
|
-
(ri.cc[ri.
|
|
98
|
-
(ri.cc[ri.
|
|
99
|
-
(ri.cc[ri.
|
|
100
|
-
(ri.cc[ri.
|
|
101
|
-
(ri.cc[ri.
|
|
102
|
-
(ri.cc[ri.
|
|
103
|
-
(ri.cc[ri.
|
|
96
|
+
(ri.cc[ri._r.OPEN] = tt.OPEN),
|
|
97
|
+
(ri.cc[ri._r.Rr] = tt.Rr),
|
|
98
|
+
(ri.cc[ri._r.nc] = tt.Rr),
|
|
99
|
+
(ri.cc[ri._r.vr] = tt.vr),
|
|
100
|
+
(ri.cc[ri._r.ue] = tt.ue),
|
|
101
|
+
(ri.cc[ri._r.lc] = tt.ue),
|
|
102
|
+
(ri.cc[ri._r.Qr] = tt.Qr),
|
|
103
|
+
(ri.cc[ri._r.kt] = tt.kt);
|
|
@@ -6,54 +6,54 @@ import { logger as r } from "../../../shared-lib/index.js";
|
|
|
6
6
|
import ri from "./trigger-condition.js";
|
|
7
7
|
import { validateValueIsFromEnum as J } from "../../util/code-utils.js";
|
|
8
8
|
export default class mt {
|
|
9
|
-
constructor(t, i = [], s, e, r = 0, h, l, o = 0, n = mt.
|
|
9
|
+
constructor(t, i = [], s, e, r = 0, h, l, o = 0, n = mt.td, a, u, d) {
|
|
10
10
|
(this.id = t),
|
|
11
|
-
(this.
|
|
11
|
+
(this.sd = i),
|
|
12
12
|
(this.startTime = s),
|
|
13
13
|
(this.endTime = e),
|
|
14
14
|
(this.priority = r),
|
|
15
15
|
(this.type = h),
|
|
16
16
|
(this.data = l),
|
|
17
|
-
(this.
|
|
18
|
-
(this.
|
|
19
|
-
(this.
|
|
20
|
-
(this.
|
|
21
|
-
(this.
|
|
17
|
+
(this.ed = o),
|
|
18
|
+
(this.rd = n),
|
|
19
|
+
(this.Nr = a),
|
|
20
|
+
(this.hd = u),
|
|
21
|
+
(this.od = d),
|
|
22
22
|
(this.id = t),
|
|
23
|
-
(this.
|
|
23
|
+
(this.sd = i || []),
|
|
24
24
|
void 0 === s && (s = null),
|
|
25
25
|
(this.startTime = s),
|
|
26
26
|
void 0 === e && (e = null),
|
|
27
27
|
(this.endTime = e),
|
|
28
28
|
(this.priority = r || 0),
|
|
29
29
|
(this.type = h),
|
|
30
|
-
(this.
|
|
31
|
-
null == a && (a = 1e3 * (this.
|
|
32
|
-
(this.
|
|
30
|
+
(this.ed = o || 0),
|
|
31
|
+
null == a && (a = 1e3 * (this.ed + 30)),
|
|
32
|
+
(this.Nr = a),
|
|
33
33
|
(this.data = l),
|
|
34
|
-
null != n && (this.
|
|
35
|
-
(this.
|
|
36
|
-
(this.
|
|
34
|
+
null != n && (this.rd = n),
|
|
35
|
+
(this.hd = u),
|
|
36
|
+
(this.od = d || null);
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
nd(t) {
|
|
39
39
|
return (
|
|
40
|
-
null == this.
|
|
40
|
+
null == this.od || (this.rd !== mt.td && t - this.od >= 1e3 * this.rd)
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
this.
|
|
43
|
+
ad(t) {
|
|
44
|
+
this.od = t;
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
const i = t + 1e3 * this.
|
|
46
|
+
ud(t) {
|
|
47
|
+
const i = t + 1e3 * this.ed;
|
|
48
48
|
return Math.max(i - new Date().valueOf(), 0);
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
dd(t) {
|
|
51
51
|
const i = new Date().valueOf() - t,
|
|
52
|
-
s = null == t || isNaN(i) || null == this.
|
|
52
|
+
s = null == t || isNaN(i) || null == this.Nr || i < this.Nr;
|
|
53
53
|
return (
|
|
54
54
|
s ||
|
|
55
55
|
r.info(
|
|
56
|
-
`Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.
|
|
56
|
+
`Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.Nr}ms.`,
|
|
57
57
|
),
|
|
58
58
|
!s
|
|
59
59
|
);
|
|
@@ -73,7 +73,7 @@ export default class mt {
|
|
|
73
73
|
d = t.data,
|
|
74
74
|
m = t.min_seconds_since_last_trigger;
|
|
75
75
|
return J(
|
|
76
|
-
mt.
|
|
76
|
+
mt._r,
|
|
77
77
|
o,
|
|
78
78
|
"Could not construct Trigger from server data",
|
|
79
79
|
"Trigger.Types",
|
|
@@ -83,7 +83,7 @@ export default class mt {
|
|
|
83
83
|
}
|
|
84
84
|
Y() {
|
|
85
85
|
const t = [];
|
|
86
|
-
for (let i = 0; i < this.
|
|
86
|
+
for (let i = 0; i < this.sd.length; i++) t.push(this.sd[i].Y());
|
|
87
87
|
return {
|
|
88
88
|
i: this.id,
|
|
89
89
|
c: t,
|
|
@@ -92,11 +92,11 @@ export default class mt {
|
|
|
92
92
|
p: this.priority,
|
|
93
93
|
t: this.type,
|
|
94
94
|
da: this.data,
|
|
95
|
-
d: this.
|
|
96
|
-
r: this.
|
|
97
|
-
tm: this.
|
|
98
|
-
ss: this.
|
|
99
|
-
ld: this.
|
|
95
|
+
d: this.ed,
|
|
96
|
+
r: this.rd,
|
|
97
|
+
tm: this.Nr,
|
|
98
|
+
ss: this.hd,
|
|
99
|
+
ld: this.od,
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
static qn(t) {
|
|
@@ -119,4 +119,4 @@ export default class mt {
|
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
(mt.
|
|
122
|
+
(mt._r = { Br: "inapp", md: "templated_iam" }), (mt.td = -1);
|