@braze/web-sdk 6.8.0 → 6.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.
Files changed (137) hide show
  1. package/index.d.ts +99 -19
  2. package/package.json +1 -1
  3. package/shared-lib/event-types.js +20 -20
  4. package/shared-lib/indexed-db-adapter.js +64 -64
  5. package/shared-lib/logger.js +18 -18
  6. package/shared-lib/supported-options.js +8 -8
  7. package/src/Banner/banner-provider.js +67 -59
  8. package/src/Banner/banner.js +40 -19
  9. package/src/Banner/dismiss-banner.js +4 -0
  10. package/src/Banner/display/banner-to-html.js +10 -10
  11. package/src/Banner/display/destroy-banner-html.js +2 -2
  12. package/src/Banner/get-all-banners.js +6 -6
  13. package/src/Banner/get-banner.js +6 -6
  14. package/src/Banner/index.js +1 -0
  15. package/src/Banner/log-banner-click.js +7 -7
  16. package/src/Banner/log-banner-dismissal.js +7 -7
  17. package/src/Banner/log-banner-impressions.js +10 -10
  18. package/src/Banner/request-banners-refresh.js +8 -8
  19. package/src/Banner/subscribe-to-banners-updates.js +5 -5
  20. package/src/Banner/ui/insert-banner.js +8 -8
  21. package/src/Card/card-manager.js +31 -31
  22. package/src/Card/log-card-dismissal.js +2 -2
  23. package/src/Card/log-content-card-click.js +2 -2
  24. package/src/Card/log-content-card-impressions.js +4 -4
  25. package/src/Card/models/captioned-image.js +15 -15
  26. package/src/Card/models/card.js +89 -89
  27. package/src/Card/models/classic-card.js +16 -16
  28. package/src/Card/models/control-card.js +7 -7
  29. package/src/Card/models/image-only.js +13 -13
  30. package/src/Card/util/card-factory.js +32 -32
  31. package/src/ContentCards/content-cards-provider.js +102 -102
  32. package/src/ContentCards/get-cached-content-cards.js +1 -1
  33. package/src/ContentCards/subscribe-to-content-cards-updates.js +3 -3
  34. package/src/ContentCards/ui/show-content-cards.js +5 -5
  35. package/src/Core/add-sdk-metadata.js +2 -2
  36. package/src/Core/change-user.js +3 -3
  37. package/src/Core/destroy.js +2 -2
  38. package/src/Core/disable-sdk.js +4 -4
  39. package/src/Core/enable-sdk.js +4 -4
  40. package/src/Core/get-device-id.js +2 -2
  41. package/src/Core/handle-braze-action.js +5 -5
  42. package/src/Core/log-custom-event.js +5 -5
  43. package/src/Core/log-ecommerce-event.js +5 -5
  44. package/src/Core/log-purchase.js +9 -9
  45. package/src/Core/open-session.js +7 -7
  46. package/src/Core/set-logger.js +2 -2
  47. package/src/Core/toggle-logging.js +2 -2
  48. package/src/Core/wipe-data.js +6 -6
  49. package/src/DUST/dust-provider.js +249 -240
  50. package/src/DUST/dust-shared-worker-code.js +1 -1
  51. package/src/DUST/dust-shared-worker-impl.js +15 -14
  52. package/src/DUST/dust-worker-bridge.js +50 -35
  53. package/src/DUST/subscribe-to-dust.js +7 -7
  54. package/src/FeatureFlags/feature-flag-factory.js +8 -8
  55. package/src/FeatureFlags/feature-flag.js +3 -3
  56. package/src/FeatureFlags/feature-flags-provider.js +21 -21
  57. package/src/FeatureFlags/log-feature-flag-impression.js +5 -5
  58. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +1 -1
  59. package/src/InAppMessage/constants.js +3 -3
  60. package/src/InAppMessage/defer-in-app-message.js +4 -4
  61. package/src/InAppMessage/display/html-message-to-html.js +4 -4
  62. package/src/InAppMessage/display/in-app-message-to-html.js +16 -16
  63. package/src/InAppMessage/in-app-message-factory.js +36 -36
  64. package/src/InAppMessage/in-app-message-manager.js +78 -78
  65. package/src/InAppMessage/log-in-app-message-button-click.js +4 -4
  66. package/src/InAppMessage/log-in-app-message-click.js +3 -3
  67. package/src/InAppMessage/log-in-app-message-html-click.js +5 -5
  68. package/src/InAppMessage/log-in-app-message-impression.js +4 -4
  69. package/src/InAppMessage/models/control-message.js +4 -4
  70. package/src/InAppMessage/models/full-screen-message.js +4 -4
  71. package/src/InAppMessage/models/html-message.js +3 -3
  72. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  73. package/src/InAppMessage/models/in-app-message.js +12 -12
  74. package/src/InAppMessage/models/modal-message.js +4 -4
  75. package/src/InAppMessage/models/slide-up-message.js +4 -4
  76. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  77. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  78. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  79. package/src/InAppMessage/ui/show-in-app-message.js +14 -14
  80. package/src/Push/push-manager-factory.js +2 -2
  81. package/src/Push/push-manager.js +38 -38
  82. package/src/Push/utils/push-utils.js +6 -6
  83. package/src/User/user-manager.js +14 -14
  84. package/src/User/user.js +25 -25
  85. package/src/common/base-provider.js +1 -1
  86. package/src/common/content-cards-display.js +7 -7
  87. package/src/common/event-logger.js +3 -3
  88. package/src/common/properties-base.js +3 -3
  89. package/src/l10n/l10n-manager-factory.js +1 -1
  90. package/src/l10n/l10n-manager.js +3 -3
  91. package/src/managers/auth-manager.js +11 -11
  92. package/src/managers/braze-instance.js +56 -56
  93. package/src/managers/device-manager.js +10 -10
  94. package/src/managers/network-manager.js +102 -101
  95. package/src/managers/server-config-manager.js +115 -98
  96. package/src/managers/session-manager.js +20 -20
  97. package/src/managers/storage-manager-factory.js +9 -9
  98. package/src/managers/storage-manager.js +74 -74
  99. package/src/managers/subscription-manager.js +2 -2
  100. package/src/managers/utils.js +1 -1
  101. package/src/models/backend-errors.js +5 -5
  102. package/src/models/braze-event.js +1 -1
  103. package/src/models/device.js +1 -1
  104. package/src/models/identifier.js +2 -2
  105. package/src/models/push-token.js +6 -6
  106. package/src/models/request-result.js +1 -1
  107. package/src/models/server-config.js +42 -24
  108. package/src/request-controller.js +126 -126
  109. package/src/triggers/models/custom-event-data.js +4 -4
  110. package/src/triggers/models/custom-event-property-data.js +5 -5
  111. package/src/triggers/models/filter-set.js +2 -2
  112. package/src/triggers/models/filter.js +1 -1
  113. package/src/triggers/models/in-app-message-click-data.js +1 -1
  114. package/src/triggers/models/purchase-data.js +1 -1
  115. package/src/triggers/models/purchase-property-data.js +2 -2
  116. package/src/triggers/models/push-click-data.js +1 -1
  117. package/src/triggers/models/trigger-condition.js +33 -33
  118. package/src/triggers/models/trigger-events.js +1 -1
  119. package/src/triggers/models/trigger.js +33 -33
  120. package/src/triggers/triggers-provider-factory.js +1 -1
  121. package/src/triggers/triggers-provider.js +68 -68
  122. package/src/types.js +2 -2
  123. package/src/ui/js/attach-css.js +1 -1
  124. package/src/util/braze-actions.js +7 -7
  125. package/src/util/browser-detector.js +2 -2
  126. package/src/util/client-hints-parser.js +4 -4
  127. package/src/util/code-utils.js +2 -2
  128. package/src/util/deprecation-utils.js +2 -2
  129. package/src/util/dom-utils.js +7 -7
  130. package/src/util/ecommerce-event-validation.js +52 -35
  131. package/src/util/html-display-utils.js +11 -11
  132. package/src/util/net.js +4 -4
  133. package/src/util/request-header-utils.js +17 -17
  134. package/src/util/string-utils.js +2 -2
  135. package/src/util/user-agent-parser.js +2 -2
  136. package/src/util/validation-utils.js +12 -12
  137. package/src/util/window-utils.js +2 -2
@@ -6,7 +6,7 @@ import {
6
6
  } from "../util/date-utils.js";
7
7
  import v from "../common/event-logger.js";
8
8
  import { isArray as g, isEqual as oi } from "../util/code-utils.js";
9
- import { logger as E, EventTypes as p } from "../../shared-lib/index.js";
9
+ import { logger as b, EventTypes as p } from "../../shared-lib/index.js";
10
10
  import { STORAGE_KEYS as s } from "./storage-manager.js";
11
11
  import h from "../util/request-header-utils.js";
12
12
  import {
@@ -18,10 +18,10 @@ import { readResponseHeaders as Oe } from "../util/net.js";
18
18
  export default class Vt {
19
19
  constructor(t, e, i, s, r, n, o, a, h, u, l, c) {
20
20
  (this.eu = t),
21
- (this.C = e),
21
+ (this.j = e),
22
22
  (this.Gh = i),
23
23
  (this.Ss = s),
24
- (this.j = r),
24
+ (this.C = r),
25
25
  (this.h = n),
26
26
  (this.tu = o),
27
27
  (this.Yh = a),
@@ -31,10 +31,10 @@ export default class Vt {
31
31
  (this.Ra = c),
32
32
  (this.Xa = (t) => (null == t ? "" : `${t} `)),
33
33
  (this.eu = t),
34
- (this.C = e),
34
+ (this.j = e),
35
35
  (this.Gh = i),
36
36
  (this.Ss = s),
37
- (this.j = r),
37
+ (this.C = r),
38
38
  (this.h = n),
39
39
  (this.tu = o),
40
40
  (this.Yh = a),
@@ -43,19 +43,19 @@ export default class Vt {
43
43
  (this.appVersion = l),
44
44
  (this.Ra = c),
45
45
  (this.$a = ["npm"]),
46
- (this.Pa = {});
46
+ (this.La = {});
47
47
  }
48
48
  Z(t, e = !1, i = !1) {
49
49
  const r = this.eu.ve(!i),
50
- n = r.oa(),
51
- o = this.C.Rt(s.Tt.Ka);
50
+ n = r.ta(),
51
+ o = this.j.St(s.It.Ba);
52
52
  oi(o, n) || (t.device = n),
53
53
  (t.api_key = this.tu),
54
54
  (t.time = X(new Date().valueOf(), !0));
55
- const a = this.C.Rt(s.Tt.Ua) || [],
56
- h = this.C.Rt(s.Tt.Wa) || "";
55
+ const a = this.j.St(s.It.Ka) || [],
56
+ h = this.j.St(s.It.Pa) || "";
57
57
  this.$a.length > 0 &&
58
- (!oi(a, this.$a) || h !== this.j.kt()) &&
58
+ (!oi(a, this.$a) || h !== this.C.$t()) &&
59
59
  (t.sdk_metadata = this.$a),
60
60
  (t.sdk_version = this.Vh),
61
61
  this.Kh && (t.sdk_flavor = this.Kh),
@@ -64,7 +64,7 @@ export default class Vt {
64
64
  (t.device_id = r.id);
65
65
  const u = this.Ss.getUserId();
66
66
  if ((e && null !== u && (t.user_id = u), !u && !this.Gh.Fh())) {
67
- const e = He(this.C);
67
+ const e = He(this.j);
68
68
  e && (t.alias = e);
69
69
  }
70
70
  return t;
@@ -90,8 +90,8 @@ export default class Vt {
90
90
  this.Gh.Fh() ||
91
91
  (e +=
92
92
  ' Please use the "enableSdkAuthentication" initialization option to enable authentication.'),
93
- E.error(`SDK Authentication failed ${e}`),
94
- this.Ya(t.events || [], t.attributes || []),
93
+ b.error(`SDK Authentication failed ${e}`),
94
+ this.Ua(t.events || [], t.attributes || []),
95
95
  this.Gh.Ch(r),
96
96
  !1
97
97
  );
@@ -100,42 +100,43 @@ export default class Vt {
100
100
  let i,
101
101
  s = r;
102
102
  switch (s) {
103
- case Ne.Qa:
103
+ case Ne.Wa:
104
104
  return (
105
105
  (i = "Received successful response with empty body."),
106
- v.wt(p.Va, { e: i }),
107
- E.info(i),
106
+ v.Dt(p.Ya, { e: i }),
107
+ b.info(i),
108
108
  !1
109
109
  );
110
- case Ne.Za:
110
+ case Ne.Qa:
111
111
  return (
112
112
  (i = "Received successful response with invalid JSON"),
113
- v.wt(p.Va, { e: i + ": " + e.response }),
114
- E.info(i),
113
+ v.Dt(p.Ya, { e: i + ": " + e.response }),
114
+ b.info(i),
115
115
  !1
116
116
  );
117
- case Ne.dl:
117
+ case Ne.Va:
118
118
  s = `The API key "${t.api_key}" is invalid for the baseUrl ${this.Yh}`;
119
119
  break;
120
- case Ne.fl:
120
+ case Ne.Za:
121
121
  s =
122
122
  "Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.";
123
123
  break;
124
- case Ne.ml:
125
- s = "No device identifier. Please contact support@braze.com";
124
+ case Ne.dl:
125
+ s =
126
+ "No device identifier. Please contact Braze Technical Support for assistance.";
126
127
  }
127
- E.error("Backend error: " + s);
128
+ b.error("Backend error: " + s);
128
129
  }
129
130
  return !1;
130
131
  }
131
- vl(t, e, i) {
132
+ fl(t, e, i) {
132
133
  return !!((t && 0 !== t.length) || (e && 0 !== e.length) || i);
133
134
  }
134
- Rl(t, e, i, s = !1) {
135
+ ml(t, e, i, s = !1) {
135
136
  const r = [],
136
137
  n = (t) => t || "",
137
138
  o = n(this.Ss.getUserId());
138
- let a = this.ia(t);
139
+ let a = this.Zo(t);
139
140
  const u = [],
140
141
  l = [];
141
142
  let c,
@@ -143,7 +144,7 @@ export default class Vt {
143
144
  if (e.length > 0) {
144
145
  const t = [];
145
146
  for (const i of e) {
146
- if (((c = i.oa()), this.Gh.Fh())) {
147
+ if (((c = i.ta()), this.Gh.Fh())) {
147
148
  if (o && !c.user_id) {
148
149
  d || (d = {}), d.events || (d.events = []), d.events.push(c);
149
150
  continue;
@@ -163,47 +164,47 @@ export default class Vt {
163
164
  e && (this.Gh.Fh() && n(e.user_id) !== o ? u.push(e) : t.push(e));
164
165
  t.length > 0 && (a.attributes = t);
165
166
  }
166
- if ((this.Ya(l, u), (a = this.Z(a, !1, s)), d)) {
167
+ if ((this.Ua(l, u), (a = this.Z(a, !1, s)), d)) {
167
168
  d = this.Z(d, !1, s);
168
- const t = { requestData: d, headers: this.tt(d, h.it.wn) };
169
+ const t = { requestData: d, headers: this.tt(d, h.it.pn) };
169
170
  r.push(t);
170
171
  }
171
- if (a && !this.vl(a.events, a.attributes, t)) return d ? r : null;
172
- const f = { requestData: a, headers: this.tt(a, h.it.wn) };
172
+ if (a && !this.fl(a.events, a.attributes, t)) return d ? r : null;
173
+ const f = { requestData: a, headers: this.tt(a, h.it.pn) };
173
174
  return r.push(f), r;
174
175
  }
175
- Ya(t, e) {
176
+ Ua(t, e) {
176
177
  if (t) {
177
178
  const e = [];
178
179
  for (const i of t) {
179
180
  const t = Ie.fromJson(i);
180
181
  (t.time = Xe(t.time)), e.push(t);
181
182
  }
182
- this.C.ol(e);
183
+ this.j.ol(e);
183
184
  }
184
- if (e) for (const t of e) this.C.gl(t);
185
+ if (e) for (const t of e) this.j.vl(t);
185
186
  }
186
187
  dt(t, e) {
187
188
  let i = "HTTP error ";
188
- null != t && (i += t + " "), (i += e), E.error(i);
189
+ null != t && (i += t + " "), (i += e), b.error(i);
189
190
  }
190
- bl(t) {
191
- return v.wt(p.ql, { n: t });
191
+ Rl(t) {
192
+ return v.Dt(p.gl, { n: t });
192
193
  }
193
- ia(t, e) {
194
+ Zo(t, e) {
194
195
  const i = {};
195
196
  t && (i.triggers = !0);
196
197
  const s = null != e ? e : this.Ss.getUserId();
197
198
  if ((s && (i.user_id = s), !i.user_id && !this.Gh.Fh())) {
198
- const t = He(this.C);
199
+ const t = He(this.j);
199
200
  t && (i.alias = t);
200
201
  }
201
- return (i.config = { config_time: this.h.Ot() }), { respond_with: i };
202
+ return (i.config = { config_time: this.h.Qt() }), { respond_with: i };
202
203
  }
203
- Al(t) {
204
+ bl(t) {
204
205
  const e = new Date().valueOf();
205
206
  let i = Ke.toString();
206
- const s = h.Dl(this.C, t);
207
+ const s = h.ql(this.j, t);
207
208
  if (-1 !== s) {
208
209
  i = (e - s).toString();
209
210
  }
@@ -211,20 +212,20 @@ export default class Vt {
211
212
  }
212
213
  tt(t, e, i = "sdk") {
213
214
  const s = [["X-Braze-Api-Key", this.tu]],
214
- r = this.Al(e);
215
+ r = this.bl(e);
215
216
  s.push(["X-Braze-Last-Req-Ms-Ago", r]);
216
- const n = h.kl(this.C, e).toString();
217
+ const n = h.Al(this.j, e).toString();
217
218
  s.push(["X-Braze-Req-Attempt", n]);
218
219
  let o = !1;
219
220
  if (
220
221
  (null != t.respond_with &&
221
222
  t.respond_with.triggers &&
222
223
  (s.push(["X-Braze-TriggersRequest", "true"]), (o = !0)),
223
- e === h.it.Ji)
224
+ e === h.it.Mi)
224
225
  ) {
225
226
  s.push(["X-Braze-ContentCardsRequest", "true"]);
226
- let t = h.kl(this.C, h.it.Ji);
227
- (t && "client" !== i) || ((t = 1), h.yl(this.C, h.it.Ji, t));
227
+ let t = h.Al(this.j, h.it.Mi);
228
+ (t && "client" !== i) || ((t = 1), h.Dl(this.j, h.it.Mi, t));
228
229
  const e = Math.max(0, t - 1);
229
230
  s.push(["BRAZE-SYNC-RETRY-COUNT", e.toString()]), (o = !0);
230
231
  }
@@ -241,47 +242,47 @@ export default class Vt {
241
242
  return s;
242
243
  }
243
244
  Tl(t, e, i, s) {
244
- if (this.Pa[s]) return;
245
+ if (this.La[s]) return;
245
246
  const r = window.setTimeout(() => {
246
- E.info(`Retrying rate limited ${this.Xa(s)}SDK request.`),
247
+ b.info(`Retrying rate limited ${this.Xa(s)}SDK request.`),
247
248
  this.et(e, i, s);
248
249
  }, t);
249
- this.Pa[s] = r;
250
+ this.La[s] = r;
250
251
  }
251
252
  fo() {
252
- for (const t in this.Pa) {
253
- const e = this.Pa[t];
253
+ for (const t in this.La) {
254
+ const e = this.La[t];
254
255
  window.clearTimeout(e);
255
256
  }
256
- this.Pa = {};
257
+ this.La = {};
257
258
  }
258
259
  et(t, e, i, r) {
259
- if (!this.wl(i))
260
+ if (!this.kl(i))
260
261
  return (
261
- E.info(`${this.Xa(i)}SDK request being rate limited.`),
262
+ b.info(`${this.Xa(i)}SDK request being rate limited.`),
262
263
  void ("function" == typeof r && r())
263
264
  );
264
- const n = this.Nl();
265
- if (!n.Bl)
265
+ const n = this.yl();
266
+ if (!n.wl)
266
267
  return (
267
- this.Tl(n.Cl, t, e, i),
268
- void E.info(
268
+ this.Tl(n.Nl, t, e, i),
269
+ void b.info(
269
270
  `${this.Xa(
270
271
  i,
271
272
  )}SDK request being rate limited. Request will be retried in ${Math.trunc(
272
- n.Cl / 1e3,
273
+ n.Nl / 1e3,
273
274
  )} seconds.`,
274
275
  )
275
276
  );
276
- this.C.It(s.Tt.Sl, new Date().valueOf());
277
+ this.j.Pt(s.It.Bl, new Date().valueOf());
277
278
  const o = t.device;
278
279
  o && o.os_version instanceof Promise
279
280
  ? o.os_version.then((i) => {
280
- (t.device.os_version = i), e(n.zl);
281
+ (t.device.os_version = i), e(n.Sl);
281
282
  })
282
- : e(n.zl);
283
+ : e(n.Sl);
283
284
  }
284
- jl(t) {
285
+ Cl(t) {
285
286
  const e = t ? Oe(t) : null;
286
287
  if (!e || !e["retry-after"]) return null;
287
288
  const i = e["retry-after"];
@@ -292,21 +293,21 @@ export default class Vt {
292
293
  {
293
294
  const t =
294
295
  "Received unexpected value for retry-after header in /sync response";
295
- v.wt(p.Va, { e: t + ": " + i });
296
+ v.Dt(p.Ya, { e: t + ": " + i });
296
297
  }
297
298
  return null;
298
299
  }
299
300
  yt(t, e, i, s, r, n) {
300
- if (h.kl(this.C, i) >= Pe) return;
301
+ if (h.Al(this.j, i) >= Pe) return;
301
302
  let o;
302
303
  n = n || 0;
303
- const a = this.jl(t);
304
+ const a = this.Cl(t);
304
305
  r();
305
306
  const u = (t) => {
306
307
  const r = window.setTimeout(() => {
307
308
  e();
308
309
  }, t);
309
- s(r), h.Ml(this.C, i);
310
+ s(r), h.zl(this.j, i);
310
311
  };
311
312
  if (a && !isNaN(a.value)) {
312
313
  switch (a.type) {
@@ -317,46 +318,46 @@ export default class Vt {
317
318
  o = a.value + n;
318
319
  }
319
320
  u(o);
320
- } else n ? u(n) : h.Li(this.C, i);
321
+ } else n ? u(n) : h.Ji(this.j, i);
321
322
  }
322
- Xl(t) {
323
+ jl(t) {
323
324
  var e;
324
- null === (e = this.C) || void 0 === e || e.It(s.Tt.$l, t);
325
+ null === (e = this.j) || void 0 === e || e.Pt(s.It.Ml, t);
325
326
  }
326
- Ll(t, e) {
327
- let i = this.El();
328
- null == i && (i = {}), (i[t] = e), this.C.It(s.Tt.Fl, i);
327
+ Xl(t, e) {
328
+ let i = this.$l();
329
+ null == i && (i = {}), (i[t] = e), this.j.Pt(s.It.Ll, i);
329
330
  }
330
- Il() {
331
+ El() {
331
332
  var t;
332
- return null === (t = this.C) || void 0 === t ? void 0 : t.Rt(s.Tt.$l);
333
+ return null === (t = this.j) || void 0 === t ? void 0 : t.St(s.It.Ml);
333
334
  }
334
- El() {
335
+ $l() {
335
336
  var t;
336
- return null === (t = this.C) || void 0 === t ? void 0 : t.Rt(s.Tt.Fl);
337
+ return null === (t = this.j) || void 0 === t ? void 0 : t.St(s.It.Ll);
337
338
  }
338
- Kl(t, e, i, s, r = "") {
339
+ Fl(t, e, i, s, r = "") {
339
340
  let n;
340
341
  if (r) {
341
- const t = this.El();
342
+ const t = this.$l();
342
343
  n = null == t || isNaN(t[r]) ? e : t[r];
343
- } else (n = this.Il()), (null == n || isNaN(n)) && (n = e);
344
+ } else (n = this.El()), (null == n || isNaN(n)) && (n = e);
344
345
  const o = (t - s) / 1e3;
345
346
  return (n = Math.min(n + o / i, e)), n;
346
347
  }
347
- Pl(t, e) {
348
+ Il(t, e) {
348
349
  return Math.max(0, (1 - t) * e * 1e3);
349
350
  }
350
- Ul(t, e = "") {
351
+ Kl(t, e = "") {
351
352
  var i, r, n, o, a;
352
- const u = { Bl: !0, zl: -1, Cl: 0 };
353
+ const u = { wl: !0, Sl: -1, Nl: 0 };
353
354
  if ((null == t && (t = !0), !t && !e)) return u;
354
355
  let l,
355
356
  c,
356
357
  d = null;
357
- if (t) d = null === (i = this.C) || void 0 === i ? void 0 : i.Rt(s.Tt.Sl);
358
+ if (t) d = null === (i = this.j) || void 0 === i ? void 0 : i.St(s.It.Bl);
358
359
  else {
359
- const t = h.xl(this.C);
360
+ const t = h.Pl(this.j);
360
361
  if (null == t || null == t[e]) return u;
361
362
  d = t[e];
362
363
  }
@@ -364,30 +365,30 @@ export default class Vt {
364
365
  if (
365
366
  (t
366
367
  ? ((l =
367
- (null === (r = this.h) || void 0 === r ? void 0 : r.Hl()) || -1),
368
- (c = (null === (n = this.h) || void 0 === n ? void 0 : n.Ol()) || -1))
368
+ (null === (r = this.h) || void 0 === r ? void 0 : r.Ul()) || -1),
369
+ (c = (null === (n = this.h) || void 0 === n ? void 0 : n.xl()) || -1))
369
370
  : ((l =
370
- (null === (o = this.h) || void 0 === o ? void 0 : o.Gl(e)) || -1),
371
+ (null === (o = this.h) || void 0 === o ? void 0 : o.Hl(e)) || -1),
371
372
  (c =
372
- (null === (a = this.h) || void 0 === a ? void 0 : a._l(e)) || -1)),
373
+ (null === (a = this.h) || void 0 === a ? void 0 : a.Ol(e)) || -1)),
373
374
  -1 === l || -1 === c)
374
375
  )
375
376
  return u;
376
377
  const f = new Date().valueOf();
377
- let m = this.Kl(f, l, c, d, e);
378
+ let m = this.Fl(f, l, c, d, e);
378
379
  return m < 1
379
- ? ((u.Bl = !1), (u.Cl = this.Pl(m, c)), u)
380
+ ? ((u.wl = !1), (u.Nl = this.Il(m, c)), u)
380
381
  : ((m = Math.trunc(m) - 1),
381
- (u.zl = m),
382
- t ? this.Xl(m) : this.Ll(e, m),
382
+ (u.Sl = m),
383
+ t ? this.jl(m) : this.Xl(e, m),
383
384
  u);
384
385
  }
385
- Nl() {
386
- return this.Ul(!0);
386
+ yl() {
387
+ return this.Kl(!0);
387
388
  }
388
- wl(t) {
389
- const e = this.Ul(!1, t);
390
- return !(e && !e.Bl);
389
+ kl(t) {
390
+ const e = this.Kl(!1, t);
391
+ return !(e && !e.wl);
391
392
  }
392
393
  ct() {
393
394
  this.Gh.ct();