@braze/web-sdk 5.4.0 → 5.5.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.
Files changed (77) hide show
  1. package/index.d.ts +3 -3
  2. package/package.json +1 -1
  3. package/shared-lib/event-types.js +12 -12
  4. package/shared-lib/indexed-db-adapter.js +14 -14
  5. package/shared-lib/logger.js +2 -2
  6. package/shared-lib/supported-options.js +5 -5
  7. package/src/Card/card-manager.js +46 -42
  8. package/src/Card/models/card.js +61 -55
  9. package/src/Card/models/classic-card.js +1 -1
  10. package/src/Card/models/control-card.js +1 -1
  11. package/src/Card/models/image-only.js +1 -1
  12. package/src/Card/util/card-factory.js +20 -20
  13. package/src/ContentCards/content-cards-provider.js +140 -140
  14. package/src/ContentCards/get-cached-content-cards.js +1 -1
  15. package/src/ContentCards/request-content-cards-refresh.js +1 -1
  16. package/src/ContentCards/subscribe-to-content-cards-updates.js +4 -4
  17. package/src/ContentCards/ui/show-content-cards.js +3 -3
  18. package/src/Core/disable-sdk.js +2 -2
  19. package/src/Core/enable-sdk.js +2 -2
  20. package/src/Core/log-custom-event.js +14 -14
  21. package/src/Core/log-purchase.js +8 -8
  22. package/src/Core/open-session.js +4 -4
  23. package/src/Core/wipe-data.js +2 -2
  24. package/src/FeatureFlags/feature-flag-factory.js +5 -5
  25. package/src/FeatureFlags/feature-flag.js +1 -1
  26. package/src/FeatureFlags/feature-flags-provider.js +74 -74
  27. package/src/FeatureFlags/get-all-feature-flags.js +2 -2
  28. package/src/FeatureFlags/get-feature-flag.js +2 -2
  29. package/src/FeatureFlags/log-feature-flag-impression.js +12 -12
  30. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +2 -2
  31. package/src/Feed/feed-provider.js +29 -29
  32. package/src/Feed/get-cached-feed.js +1 -1
  33. package/src/Feed/request-feed-refresh.js +1 -1
  34. package/src/Feed/subscribe-to-feed-updates.js +1 -1
  35. package/src/Feed/ui/show-feed.js +1 -1
  36. package/src/InAppMessage/in-app-message-manager.js +63 -63
  37. package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
  38. package/src/InAppMessage/log-in-app-message-click.js +2 -2
  39. package/src/InAppMessage/log-in-app-message-html-click.js +2 -2
  40. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  41. package/src/InAppMessage/models/full-screen-message.js +10 -10
  42. package/src/InAppMessage/models/html-message.js +13 -13
  43. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  44. package/src/InAppMessage/models/in-app-message.js +59 -59
  45. package/src/InAppMessage/models/modal-message.js +9 -9
  46. package/src/InAppMessage/models/slide-up-message.js +11 -11
  47. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  48. package/src/Push/push-manager-factory.js +4 -4
  49. package/src/Push/push-manager.js +6 -6
  50. package/src/Push/utils/push-utils.js +1 -1
  51. package/src/User/user-manager.js +6 -6
  52. package/src/User/user.js +27 -27
  53. package/src/common/base-provider.js +1 -1
  54. package/src/common/event-logger.js +7 -7
  55. package/src/common/feed-display.js +1 -1
  56. package/src/managers/auth-manager.js +9 -9
  57. package/src/managers/braze-instance.js +44 -44
  58. package/src/managers/network-manager.js +100 -100
  59. package/src/managers/server-config-manager.js +24 -24
  60. package/src/managers/session-manager.js +10 -10
  61. package/src/managers/storage-manager.js +20 -20
  62. package/src/managers/subscription-manager.js +2 -2
  63. package/src/models/backend-errors.js +4 -4
  64. package/src/models/braze-event.js +1 -1
  65. package/src/models/device.js +1 -1
  66. package/src/models/request-result.js +1 -1
  67. package/src/models/server-config.js +5 -5
  68. package/src/request-controller.js +121 -121
  69. package/src/triggers/models/filter.js +9 -9
  70. package/src/triggers/models/trigger-condition.js +26 -26
  71. package/src/triggers/models/trigger-events.js +1 -1
  72. package/src/triggers/models/trigger.js +7 -7
  73. package/src/triggers/triggers-provider.js +27 -27
  74. package/src/ui/js/attach-css.js +1 -1
  75. package/src/util/braze-actions.js +4 -4
  76. package/src/util/net.js +4 -4
  77. package/src/util/request-header-utils.js +17 -17
@@ -1,8 +1,8 @@
1
1
  import C from "./util/net.js";
2
2
  import ve from "./models/braze-event.js";
3
- import s from "./common/event-logger.js";
3
+ import t from "./common/event-logger.js";
4
4
  import { randomInclusive as U } from "./util/math.js";
5
- import t from "./models/request-result.js";
5
+ import s from "./models/request-result.js";
6
6
  import {
7
7
  logger as r,
8
8
  IndexedDBAdapter as A,
@@ -17,39 +17,39 @@ export default class Lt {
17
17
  constructor(t, i, s, e, h, o, n, r, u, l) {
18
18
  (this.rn = t),
19
19
  (this.baseUrl = i),
20
- (this.ri = s),
20
+ (this.oi = s),
21
21
  (this.on = e),
22
- (this.wt = h),
23
- (this.yt = o),
22
+ (this.yt = h),
23
+ (this.qt = o),
24
24
  (this.u = n),
25
- (this.wu = r),
25
+ (this.yu = r),
26
26
  (this.Ko = u),
27
- (this.qt = l),
27
+ (this.$t = l),
28
28
  (this.rn = t),
29
29
  (this.baseUrl = i),
30
- (this.yu = 0),
30
+ (this.ju = 0),
31
31
  (this.fE = n.dE() || 0),
32
- (this.ju = null),
33
- (this.ri = s),
32
+ (this.$u = null),
33
+ (this.oi = s),
34
34
  (this.on = e),
35
- (this.wt = h),
36
- (this.yt = o),
35
+ (this.yt = h),
36
+ (this.qt = o),
37
37
  (this.u = n),
38
38
  (this.Ko = u),
39
- (this.qt = l),
40
- (this.wu = r),
41
- (this.$u = new T()),
42
- (this.Fu = null),
43
- (this.Lu = 50),
44
- (this.Mu = !1);
39
+ (this.$t = l),
40
+ (this.yu = r),
41
+ (this.Fu = new T()),
42
+ (this.Lu = null),
43
+ (this.Mu = 50),
44
+ (this.Pu = !1);
45
45
  }
46
- Pu(t, i) {
47
- return !t && !i && this.Ko.Gh() >= this.Lu;
46
+ xu(t, i) {
47
+ return !t && !i && this.Ko.Gh() >= this.Mu;
48
48
  }
49
- xu(t) {
50
- let s = this.ri.Gl();
49
+ Iu(t) {
50
+ let s = this.oi.Gl();
51
51
  if (t.length > 0) {
52
- const e = this.wt.getUserId();
52
+ const e = this.yt.getUserId();
53
53
  for (const h of t) {
54
54
  const t = (!h.userId && !e) || h.userId === e;
55
55
  h.type === i.ql && t && (s = !0);
@@ -57,128 +57,128 @@ export default class Lt {
57
57
  }
58
58
  return s;
59
59
  }
60
- Iu(t = !1, i = !1, s = !0, e, h, n, u = !1, l = !1) {
61
- s && this.Nu();
60
+ Nu(t = !1, i = !1, s = !0, e, h, n, u = !1, l = !1) {
61
+ s && this.Ou();
62
62
  const a = this.u.AE(),
63
63
  c = this.u.OE();
64
64
  let d = !1;
65
65
  const m = (t, i, r = -1) => {
66
66
  let u = !1;
67
67
  const l = new Date().valueOf();
68
- D._s(this.u, D.Ps.La, l),
68
+ D.Hs(this.u, D._s.Ka, l),
69
69
  -1 !== r && i.push(["X-Braze-Req-Tokens-Remaining", r.toString()]),
70
- C.Gs({
70
+ C.Ks({
71
71
  url: this.baseUrl + "/data/",
72
72
  data: t,
73
73
  headers: i,
74
74
  L: (s) => {
75
75
  null != t.respond_with &&
76
76
  t.respond_with.triggers &&
77
- (this.yu = Math.max(this.yu - 1, 0)),
78
- this.qt.Ks(t, s, i)
79
- ? (this.Ko.Os(),
80
- this.yt.al(s),
77
+ (this.ju = Math.max(this.ju - 1, 0)),
78
+ this.$t.Qs(t, s, i)
79
+ ? (this.Ko.Vs(),
80
+ this.qt.al(s),
81
81
  (null != t.respond_with &&
82
- t.respond_with.user_id != this.wt.getUserId()) ||
83
- (null != t.device && this.u.k(o.C.Fa, t.device),
82
+ t.respond_with.user_id != this.yt.getUserId()) ||
83
+ (null != t.device && this.u.I(o.C.Fa, t.device),
84
84
  null != t.sdk_metadata &&
85
- (this.u.k(o.C.Jh, t.sdk_metadata),
86
- this.u.k(o.C.Qh, this.ri.Si())),
87
- this.wu(s),
88
- D.Qs(this.u, D.Ps.La, 1),
85
+ (this.u.I(o.C.Jh, t.sdk_metadata),
86
+ this.u.I(o.C.Qh, this.oi.xi())),
87
+ this.yu(s),
88
+ D.Ws(this.u, D._s.Ka, 1),
89
89
  "function" == typeof e && e()))
90
90
  : s.auth_error && (u = !0);
91
91
  },
92
92
  error: () => {
93
93
  null != t.respond_with &&
94
94
  t.respond_with.triggers &&
95
- (this.yu = Math.max(this.yu - 1, 0)),
96
- this.qt.Zh(t.events, t.attributes),
95
+ (this.ju = Math.max(this.ju - 1, 0)),
96
+ this.$t.Zh(t.events, t.attributes),
97
97
  "function" == typeof h && h();
98
98
  },
99
- Ws: (t) => {
99
+ Zs: (t) => {
100
100
  if (("function" == typeof n && n(t), s && !d)) {
101
- if (t && !u) this.Ou();
101
+ if (t && !u) this.zu();
102
102
  else {
103
- D.Ys(this.u, D.Ps.La);
104
- let t = this.ju;
103
+ D.ti(this.u, D._s.Ka);
104
+ let t = this.$u;
105
105
  (null == t || t < 1e3 * this.fE) && (t = 1e3 * this.fE),
106
- this.Ou(Math.min(3e5, U(1e3 * this.fE, 3 * t)));
106
+ this.zu(Math.min(3e5, U(1e3 * this.fE, 3 * t)));
107
107
  }
108
108
  d = !0;
109
109
  }
110
110
  },
111
111
  });
112
112
  },
113
- f = this.xu(a),
113
+ f = this.Iu(a),
114
114
  g = i || f;
115
- if (this.Pu(u, f))
115
+ if (this.xu(u, f))
116
116
  return void r.info(
117
117
  "Declining to flush data due to 50 consecutive authentication failures",
118
118
  );
119
- if (s && !this.qt.Xa(a, c, t, g))
120
- return this.Ou(), void ("function" == typeof n && n(!0));
121
- const v = this.qt.$a(t, g, a, c, l);
122
- g && this.yu++;
119
+ if (s && !this.$t.La(a, c, t, g))
120
+ return this.zu(), void ("function" == typeof n && n(!0));
121
+ const v = this.$t.Ea(t, g, a, c, l);
122
+ g && this.ju++;
123
123
  let p = !1;
124
124
  if (v)
125
125
  for (const t of v)
126
- this.qt.Xs(
126
+ this.$t.Gs(
127
127
  t.requestData,
128
128
  (i) => m(t.requestData, t.headers, i),
129
- D.Ps.La,
129
+ D._s.Ka,
130
130
  h,
131
131
  ),
132
132
  (p = !0);
133
133
  this.Ko.Fh() && s && !p
134
- ? this.Ou()
135
- : f && (r.info("Invoking new session subscriptions"), this.$u.Dt());
134
+ ? this.zu()
135
+ : f && (r.info("Invoking new session subscriptions"), this.Fu.Rt());
136
136
  }
137
- zu() {
138
- return this.yu > 0;
137
+ Uu() {
138
+ return this.ju > 0;
139
139
  }
140
- Ou(t = 1e3 * this.fE) {
141
- this.Mu ||
142
- (this.Nu(),
143
- (this.Fu = window.setTimeout(() => {
140
+ zu(t = 1e3 * this.fE) {
141
+ this.Pu ||
142
+ (this.Ou(),
143
+ (this.Lu = window.setTimeout(() => {
144
144
  if (document.hidden) {
145
145
  const t = "visibilitychange",
146
146
  i = () => {
147
147
  document.hidden ||
148
- (document.removeEventListener(t, i, !1), this.Iu());
148
+ (document.removeEventListener(t, i, !1), this.Nu());
149
149
  };
150
150
  document.addEventListener(t, i, !1);
151
- } else this.Iu();
151
+ } else this.Nu();
152
152
  }, t)),
153
- (this.ju = t));
153
+ (this.$u = t));
154
154
  }
155
- Nu() {
156
- null != this.Fu && (clearTimeout(this.Fu), (this.Fu = null));
155
+ Ou() {
156
+ null != this.Lu && (clearTimeout(this.Lu), (this.Lu = null));
157
157
  }
158
158
  initialize() {
159
- (this.Mu = !1), this.Ou();
159
+ (this.Pu = !1), this.zu();
160
160
  }
161
161
  destroy() {
162
- this.$u.removeAllSubscriptions(),
162
+ this.Fu.removeAllSubscriptions(),
163
163
  this.Ko.yh(),
164
- this.Nu(),
165
- (this.Mu = !0),
166
- this.Iu(void 0, void 0, !1, void 0, void 0, void 0, void 0, !0),
167
- (this.Fu = null);
164
+ this.Ou(),
165
+ (this.Pu = !0),
166
+ this.Nu(void 0, void 0, !1, void 0, void 0, void 0, void 0, !0),
167
+ (this.Lu = null);
168
168
  }
169
169
  mr(t) {
170
- return this.$u.It(t);
170
+ return this.Fu.Nt(t);
171
171
  }
172
172
  openSession() {
173
- const t = this.ri.Si() !== this.ri.xo();
173
+ const t = this.oi.xi() !== this.oi.xo();
174
174
  t && (this.u.cE(o.iu.Uo), this.u.cE(o.iu.su)),
175
- this.Iu(void 0, !1, void 0, () => {
176
- this.u.ti(o.C.vi);
175
+ this.Nu(void 0, !1, void 0, () => {
176
+ this.u.ii(o.C.wi);
177
177
  }),
178
178
  this.Mn(),
179
179
  t &&
180
180
  import("./Push/push-manager-factory.js").then((t) => {
181
- if (this.Mu) return;
181
+ if (this.Pu) return;
182
182
  const i = t.default.m();
183
183
  if (
184
184
  null != i &&
@@ -198,27 +198,27 @@ export default class Lt {
198
198
  const i = this.u.j(o.C.In);
199
199
  (null == i || i) && t();
200
200
  },
201
- h = A.Yt.Qt;
202
- new A(h, r).jr(h.ss.cu, s, e);
201
+ h = A.ts.Zt;
202
+ new A(h, r).jr(h.hs.cu, s, e);
203
203
  }
204
204
  });
205
205
  }
206
- Uu() {
207
- this.u.ti(o.C.gi), this.u.ti(o.C.ws), this.u.ti(o.C.Nr);
206
+ _u() {
207
+ this.u.ii(o.C.vi), this.u.ii(o.C.bs), this.u.ii(o.C.Xr);
208
208
  }
209
209
  changeUser(t, i, s) {
210
- const e = this.wt.getUserId();
210
+ const e = this.yt.getUserId();
211
211
  if (e !== t) {
212
- this.ri.yl(),
213
- this.Uu(),
214
- null != e && this.Iu(void 0, !1, void 0, void 0, void 0),
215
- this.wt.ou(t),
212
+ this.oi.yl(),
213
+ this._u(),
214
+ null != e && this.Nu(void 0, !1, void 0, void 0, void 0),
215
+ this.yt.ou(t),
216
216
  s ? this.Ko.setSdkAuthenticationSignature(s) : this.Ko.xh();
217
217
  for (let t = 0; t < i.length; t++) i[t].changeUser(null == e);
218
- null != e && this.u.ti(o.C.J),
219
- this.u.ti(o.C.Fa),
220
- this.u.ti(o.C.nE),
221
- this.u.ti(o.C._E),
218
+ null != e && this.u.ii(o.C.J),
219
+ this.u.ii(o.C.Fa),
220
+ this.u.ii(o.C.nE),
221
+ this.u.ii(o.C._E),
222
222
  this.openSession(),
223
223
  r.info('Changed user to "' + t + '".');
224
224
  } else {
@@ -231,8 +231,8 @@ export default class Lt {
231
231
  }
232
232
  }
233
233
  requestImmediateDataFlush(t) {
234
- this.Nu(), this.ri.xo();
235
- this.Iu(
234
+ this.Ou(), this.oi.xo();
235
+ this.Nu(
236
236
  void 0,
237
237
  void 0,
238
238
  void 0,
@@ -245,40 +245,40 @@ export default class Lt {
245
245
  );
246
246
  }
247
247
  requestFeedRefresh() {
248
- this.ri.xo(), this.Iu(!0);
248
+ this.oi.xo(), this.Nu(!0);
249
249
  }
250
250
  $r(t, i) {
251
- this.ri.xo(),
251
+ this.oi.xo(),
252
252
  r.info("Requesting explicit trigger refresh."),
253
- this.Iu(void 0, !0, void 0, t, i);
253
+ this.Nu(void 0, !0, void 0, t, i);
254
254
  }
255
- Cn(t, e) {
256
- const h = i._u,
257
- n = { a: t, l: e },
258
- u = s.q(h, n);
255
+ Cn(s, e) {
256
+ const h = i.Eu,
257
+ n = { a: s, l: e },
258
+ u = t.q(h, n);
259
259
  return (
260
- u && (r.info(`Logged alias ${t} with label ${e}`), this.u.k(o.C._E, n)), u
260
+ u && (r.info(`Logged alias ${s} with label ${e}`), this.u.I(o.C._E, n)), u
261
261
  );
262
262
  }
263
263
  Fn(i, e, h) {
264
- if (this.yt.hu(e))
264
+ if (this.qt.hu(e))
265
265
  return (
266
- r.info(`Custom Attribute "${e}" is blocklisted, ignoring.`), new t()
266
+ r.info(`Custom Attribute "${e}" is blocklisted, ignoring.`), new s()
267
267
  );
268
268
  const o = { key: e, value: h },
269
- n = s.q(i, o);
269
+ n = t.q(i, o);
270
270
  if (n) {
271
271
  const t = "object" == typeof h ? JSON.stringify(h, null, 2) : h;
272
272
  r.info(`Logged custom attribute: ${e} with value: ${t}`);
273
273
  }
274
274
  return n;
275
275
  }
276
- setLastKnownLocation(t, e, h, o, n, u) {
276
+ setLastKnownLocation(s, e, h, o, n, u) {
277
277
  const l = { latitude: e, longitude: h };
278
278
  null != o && (l.altitude = o),
279
279
  null != n && (l.ll_accuracy = n),
280
280
  null != u && (l.alt_accuracy = u);
281
- const a = s.q(i.Bu, l, t || void 0);
281
+ const a = t.q(i.Ju, l, s || void 0);
282
282
  return (
283
283
  a &&
284
284
  r.info(`Set user last known location as ${JSON.stringify(l, null, 2)}`),
@@ -286,44 +286,44 @@ export default class Lt {
286
286
  );
287
287
  }
288
288
  kr(t, s) {
289
- const e = this.ri.xo();
290
- return new ve(this.wt.getUserId(), i.Eu, t, e, { cid: s });
289
+ const e = this.oi.xo();
290
+ return new ve(this.yt.getUserId(), i.Ku, t, e, { cid: s });
291
291
  }
292
- Ju(t, i) {
292
+ Wu(t, i) {
293
293
  return new A(t, i);
294
294
  }
295
295
  Mn() {
296
- const t = A.Yt.Qt;
297
- this.Ju(t, r).setItem(t.ss.La, 1, {
296
+ const t = A.ts.Zt;
297
+ this.Wu(t, r).setItem(t.hs.Ka, 1, {
298
298
  baseUrl: this.baseUrl,
299
299
  data: { api_key: this.rn, device_id: this.on.ce().id },
300
- userId: this.wt.getUserId(),
300
+ userId: this.yt.getUserId(),
301
301
  sdkAuthEnabled: this.Ko.Fh(),
302
302
  });
303
303
  }
304
304
  yr(t) {
305
305
  for (const i of t)
306
- if (i.api_key === this.rn) this.qt.Zh(i.events, i.attributes);
306
+ if (i.api_key === this.rn) this.$t.Zh(i.events, i.attributes);
307
307
  else {
308
- const t = A.Yt.Qt;
309
- new A(t, r).setItem(t.ss.wr, p.W(), i);
308
+ const t = A.ts.Zt;
309
+ new A(t, r).setItem(t.hs.wr, p.W(), i);
310
310
  }
311
311
  }
312
312
  Gn(e, h, o) {
313
- if (this.yt.hu(e))
313
+ if (this.qt.hu(e))
314
314
  return (
315
- r.info(`Custom Attribute "${e}" is blocklisted, ignoring.`), new t()
315
+ r.info(`Custom Attribute "${e}" is blocklisted, ignoring.`), new s()
316
316
  );
317
317
  let n, u;
318
318
  return (
319
319
  null === h && null === o
320
- ? ((n = i.Ku), (u = { key: e }))
321
- : ((n = i.Wu), (u = { key: e, latitude: h, longitude: o })),
322
- s.q(n, u)
320
+ ? ((n = i.Gu), (u = { key: e }))
321
+ : ((n = i.Xu), (u = { key: e, latitude: h, longitude: o })),
322
+ t.q(n, u)
323
323
  );
324
324
  }
325
- Hn(t, e) {
326
- const h = { group_id: t, status: e };
327
- return s.q(i.Gu, h);
325
+ Hn(s, e) {
326
+ const h = { group_id: s, status: e };
327
+ return t.q(i.Hu, h);
328
328
  }
329
329
  }
@@ -41,22 +41,22 @@ export default class lr {
41
41
  return this._l === lr.Ol.Il
42
42
  ? null != s && Nt(s) && es(s) >= this.Ll.valueOf()
43
43
  : null != s && typeof s == typeof this.Ll && s <= this.Ll;
44
- case lr.Ql.Hu:
44
+ case lr.Ql.Qu:
45
45
  return (
46
46
  null != s &&
47
47
  "string" == typeof s &&
48
48
  typeof s == typeof this.Ll &&
49
49
  null != s.match(this.Ll)
50
50
  );
51
- case lr.Ql.Qu:
51
+ case lr.Ql.Vu:
52
52
  return null != s;
53
- case lr.Ql.Xu:
53
+ case lr.Ql.Yu:
54
54
  return null == s;
55
55
  case lr.Ql.Fl:
56
56
  return null != s && Nt(s) && ls(s) < this.Ll;
57
57
  case lr.Ql.Kl:
58
58
  return null != s && Nt(s) && ls(s) > this.Ll;
59
- case lr.Ql.Vu:
59
+ case lr.Ql.Zu:
60
60
  return (
61
61
  null == s ||
62
62
  typeof s != typeof this.Ll ||
@@ -85,7 +85,7 @@ export default class lr {
85
85
  return new lr(t.k, t.t, t.c, t.v);
86
86
  }
87
87
  }
88
- (lr.Ol = { Yu: "boolean", Zu: "number", yE: "string", Il: "date" }),
88
+ (lr.Ol = { yE: "boolean", HE: "number", LE: "string", Il: "date" }),
89
89
  (lr.Ql = {
90
90
  Pl: 1,
91
91
  Yl: 2,
@@ -93,10 +93,10 @@ export default class lr {
93
93
  Ul: 4,
94
94
  $l: 5,
95
95
  Xl: 6,
96
- Hu: 10,
97
- Qu: 11,
98
- Xu: 12,
96
+ Qu: 10,
97
+ Vu: 11,
98
+ Yu: 12,
99
99
  Fl: 15,
100
100
  Kl: 16,
101
- Vu: 17,
101
+ Zu: 17,
102
102
  });
@@ -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.Br.OPEN:
32
- case ri.Br.kt:
31
+ case ri.Er.OPEN:
32
+ case ri.Er.kt:
33
33
  break;
34
- case ri.Br.Rr:
34
+ case ri.Er.Rr:
35
35
  r = ns.fromJson(e.data);
36
36
  break;
37
- case ri.Br.nc:
37
+ case ri.Er.nc:
38
38
  r = hs.fromJson(e.data);
39
39
  break;
40
- case ri.Br.vr:
40
+ case ri.Er.vr:
41
41
  r = ur.fromJson(e.data);
42
42
  break;
43
- case ri.Br.ue:
43
+ case ri.Er.ue:
44
44
  r = ts.fromJson(e.data);
45
45
  break;
46
- case ri.Br.lc:
46
+ case ri.Er.lc:
47
47
  r = rs.fromJson(e.data);
48
48
  break;
49
- case ri.Br.Qr:
49
+ case ri.Er.Vr:
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.Br.OPEN:
62
- case ri.Br.kt:
61
+ case ri.Er.OPEN:
62
+ case ri.Er.kt:
63
63
  break;
64
- case ri.Br.Rr:
64
+ case ri.Er.Rr:
65
65
  r = new ns(e.d);
66
66
  break;
67
- case ri.Br.nc:
67
+ case ri.Er.nc:
68
68
  (t = e.d || {}), (r = new hs(t.id, is.qn(t.pf || [])));
69
69
  break;
70
- case ri.Br.vr:
70
+ case ri.Er.vr:
71
71
  r = new ur(e.d);
72
72
  break;
73
- case ri.Br.ue:
73
+ case ri.Er.ue:
74
74
  r = new ts(e.d);
75
75
  break;
76
- case ri.Br.lc:
76
+ case ri.Er.lc:
77
77
  (t = e.d || {}), (r = new rs(t.e, is.qn(t.pf || [])));
78
78
  break;
79
- case ri.Br.Qr:
79
+ case ri.Er.Vr:
80
80
  r = new ni(e.d);
81
81
  }
82
82
  return new ri(e.t, r);
83
83
  }
84
84
  }
85
- (ri.Br = {
85
+ (ri.Er = {
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
- Qr: "iam_click",
92
+ Vr: "iam_click",
93
93
  kt: "test",
94
94
  }),
95
95
  (ri.cc = {}),
96
- (ri.cc[ri.Br.OPEN] = tt.OPEN),
97
- (ri.cc[ri.Br.Rr] = tt.Rr),
98
- (ri.cc[ri.Br.nc] = tt.Rr),
99
- (ri.cc[ri.Br.vr] = tt.vr),
100
- (ri.cc[ri.Br.ue] = tt.ue),
101
- (ri.cc[ri.Br.lc] = tt.ue),
102
- (ri.cc[ri.Br.Qr] = tt.Qr),
103
- (ri.cc[ri.Br.kt] = tt.kt);
96
+ (ri.cc[ri.Er.OPEN] = tt.OPEN),
97
+ (ri.cc[ri.Er.Rr] = tt.Rr),
98
+ (ri.cc[ri.Er.nc] = tt.Rr),
99
+ (ri.cc[ri.Er.vr] = tt.vr),
100
+ (ri.cc[ri.Er.ue] = tt.ue),
101
+ (ri.cc[ri.Er.lc] = tt.ue),
102
+ (ri.cc[ri.Er.Vr] = tt.Vr),
103
+ (ri.cc[ri.Er.kt] = tt.kt);
@@ -3,6 +3,6 @@ export default {
3
3
  Rr: "purchase",
4
4
  vr: "push_click",
5
5
  ue: "custom_event",
6
- Qr: "iam_click",
6
+ Vr: "iam_click",
7
7
  kt: "test",
8
8
  };
@@ -16,7 +16,7 @@ export default class gt {
16
16
  (this.data = l),
17
17
  (this.ed = o),
18
18
  (this.rd = n),
19
- (this.Gr = a),
19
+ (this.Or = a),
20
20
  (this.hd = u),
21
21
  (this.od = d),
22
22
  (this.id = t),
@@ -29,7 +29,7 @@ export default class gt {
29
29
  (this.type = h),
30
30
  (this.ed = o || 0),
31
31
  null == a && (a = 1e3 * (this.ed + 30)),
32
- (this.Gr = a),
32
+ (this.Or = a),
33
33
  (this.data = l),
34
34
  null != n && (this.rd = n),
35
35
  (this.hd = u),
@@ -49,11 +49,11 @@ export default class gt {
49
49
  }
50
50
  dd(t) {
51
51
  const i = new Date().valueOf() - t,
52
- s = null == t || isNaN(i) || null == this.Gr || i < this.Gr;
52
+ s = null == t || isNaN(i) || null == this.Or || i < this.Or;
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.Gr}ms.`,
56
+ `Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.Or}ms.`,
57
57
  ),
58
58
  !s
59
59
  );
@@ -73,7 +73,7 @@ export default class gt {
73
73
  d = t.data,
74
74
  m = t.min_seconds_since_last_trigger;
75
75
  return J(
76
- gt.Br,
76
+ gt.Er,
77
77
  o,
78
78
  "Could not construct Trigger from server data",
79
79
  "Trigger.Types",
@@ -94,7 +94,7 @@ export default class gt {
94
94
  da: this.data,
95
95
  d: this.ed,
96
96
  r: this.rd,
97
- tm: this.Gr,
97
+ tm: this.Or,
98
98
  ss: this.hd,
99
99
  ld: this.od,
100
100
  };
@@ -119,4 +119,4 @@ export default class gt {
119
119
  );
120
120
  }
121
121
  }
122
- (gt.Br = { Tr: "inapp", md: "templated_iam" }), (gt.td = -1);
122
+ (gt.Er = { _r: "inapp", md: "templated_iam" }), (gt.td = -1);