@braze/web-sdk 4.8.0 → 4.8.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.
Files changed (72) hide show
  1. package/index.d.ts +6 -3
  2. package/package.json +1 -1
  3. package/shared-lib/braze-shared-lib.js +1 -1
  4. package/shared-lib/encoding-utils.js +1 -1
  5. package/shared-lib/event-types.js +11 -11
  6. package/shared-lib/indexed-db-adapter.js +67 -67
  7. package/shared-lib/logger.js +7 -7
  8. package/src/Card/card-manager.js +1 -1
  9. package/src/ContentCards/ui/show-content-cards.js +1 -1
  10. package/src/Core/disable-sdk.js +5 -4
  11. package/src/Core/enable-sdk.js +1 -1
  12. package/src/Core/is-disabled.js +1 -1
  13. package/src/FeatureFlags/feature-flags-provider.js +12 -12
  14. package/src/Feed/ui/show-feed.js +1 -1
  15. package/src/InAppMessage/in-app-message-manager.js +40 -34
  16. package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
  17. package/src/InAppMessage/log-in-app-message-click.js +2 -2
  18. package/src/InAppMessage/log-in-app-message-html-click.js +1 -1
  19. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  20. package/src/InAppMessage/models/in-app-message.js +13 -13
  21. package/src/InAppMessage/models/slide-up-message.js +2 -2
  22. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  23. package/src/InAppMessage/ui/show-in-app-message.js +2 -2
  24. package/src/Push/push-manager.js +82 -81
  25. package/src/Push/utils/push-utils.js +4 -4
  26. package/src/User/user-manager.js +4 -4
  27. package/src/User/user.js +5 -5
  28. package/src/common/feed-display.js +82 -72
  29. package/src/l10n/l10n-manager-factory.js +7 -7
  30. package/src/managers/auth-manager.js +18 -15
  31. package/src/managers/braze-instance.js +125 -109
  32. package/src/managers/device-manager.js +40 -35
  33. package/src/managers/network-manager.js +90 -81
  34. package/src/managers/server-config-manager.js +36 -34
  35. package/src/managers/session-manager.js +44 -37
  36. package/src/managers/storage-manager-factory.js +23 -16
  37. package/src/managers/storage-manager.js +251 -239
  38. package/src/managers/subscription-manager.js +10 -7
  39. package/src/managers/types.js +1 -0
  40. package/src/models/backend-errors.js +5 -5
  41. package/src/models/braze-event.js +10 -4
  42. package/src/models/device.js +10 -18
  43. package/src/models/identifier.js +10 -11
  44. package/src/models/push-token.js +14 -9
  45. package/src/models/request-result.js +2 -2
  46. package/src/models/server-config.js +32 -16
  47. package/src/models/types.js +1 -0
  48. package/src/request-controller.js +109 -109
  49. package/src/triggers/models/custom-event-data.js +6 -6
  50. package/src/triggers/models/custom-event-property-data.js +9 -9
  51. package/src/triggers/models/filter-set.js +9 -9
  52. package/src/triggers/models/filter.js +60 -60
  53. package/src/triggers/models/in-app-message-click-data.js +9 -9
  54. package/src/triggers/models/purchase-data.js +3 -3
  55. package/src/triggers/models/purchase-property-data.js +7 -7
  56. package/src/triggers/models/push-click-data.js +6 -6
  57. package/src/triggers/models/trigger-condition.js +46 -46
  58. package/src/triggers/models/trigger-events.js +1 -1
  59. package/src/triggers/models/trigger.js +27 -27
  60. package/src/triggers/triggers-provider.js +126 -126
  61. package/src/ui/js/attach-css.js +1 -1
  62. package/src/util/base-device-parser.js +2 -2
  63. package/src/util/braze-actions.js +4 -4
  64. package/src/util/browser-detector.js +18 -18
  65. package/src/util/client-hints-parser.js +6 -6
  66. package/src/util/device-constants.js +6 -6
  67. package/src/util/dom-utils.js +5 -5
  68. package/src/util/error-utils.js +2 -0
  69. package/src/util/net.js +1 -1
  70. package/src/util/request-header-utils.js +9 -9
  71. package/src/util/user-agent-parser.js +21 -21
  72. package/src/util/window-utils.js +1 -1
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Type definitions for @braze/web-sdk v4.8.0
2
+ * Type definitions for @braze/web-sdk v4.8.1
3
3
  * Project: https://github.com/braze-inc/braze-web-sdk
4
4
  * (c) Braze, Inc. 2023 - http://braze.com
5
5
  * License available at https://github.com/braze-inc/braze-web-sdk/blob/master/LICENSE
@@ -390,6 +390,9 @@
390
390
  extras?: Record<string, string>,
391
391
  pinned?: boolean
392
392
  );
393
+
394
+ /** Whether this card is a ControlCard. */
395
+ isControl: true;
393
396
  }
394
397
 
395
398
  export class ContentCards {
@@ -476,7 +479,7 @@
476
479
  extras: Record<string, string>;
477
480
 
478
481
  /** Whether this message is a ControlMessage. */
479
- isControl: boolean;
482
+ isControl: true;
480
483
  }
481
484
 
482
485
 
@@ -598,7 +601,7 @@
598
601
  css?: string;
599
602
 
600
603
  /** Whether this message is a ControlMessage. */
601
- isControl: boolean;
604
+ isControl: false;
602
605
 
603
606
  /**
604
607
  * Call this method if you wish to programmatically remove the message from the DOM. This method will only
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@braze/web-sdk",
3
- "version": "4.8.0",
3
+ "version": "4.8.1",
4
4
  "description": "Braze SDK for web sites and other JS platforms.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -4,5 +4,5 @@ import Ie from "./guid.js";
4
4
  import Be from "./indexed-db-adapter.js";
5
5
  import Ae from "./logger.js";
6
6
  import Ge from "./supported-options.js";
7
- const r = { _n: je, q: ve, Cr: De, Z: Ie, xt: Be, zt: Be.ep, j: Ae, Jo: Ge };
7
+ const r = { xn: je, q: ve, Cr: De, Z: Ie, xt: Be, zt: Be.ep, j: Ae, xo: Ge };
8
8
  export default r;
@@ -1,5 +1,5 @@
1
1
  const je = {
2
- Wn: function(t) {
2
+ _n: function(t) {
3
3
  const r = (t + "=".repeat((4 - (t.length % 4)) % 4))
4
4
  .replace(/\-/g, "+")
5
5
  .replace(/_/g, "/"),
@@ -1,33 +1,33 @@
1
1
  const ve = {
2
2
  CustomEvent: "ce",
3
3
  Pr: "p",
4
- Rl: "pc",
5
- cc: "ca",
6
- ya: "i",
4
+ du: "pc",
5
+ dc: "ca",
6
+ ka: "i",
7
7
  Is: "ie",
8
8
  P: "cci",
9
9
  T: "ccic",
10
10
  $: "ccc",
11
11
  H: "ccd",
12
- Vh: "ss",
13
- Fh: "se",
12
+ Wl: "ss",
13
+ xl: "se",
14
14
  _i: "si",
15
15
  Ii: "sc",
16
16
  Mi: "sbc",
17
17
  Ze: "sfe",
18
18
  ro: "iec",
19
- Pl: "lr",
20
- Ll: "uae",
19
+ au: "lr",
20
+ Zh: "uae",
21
21
  R: "ci",
22
22
  B: "cc",
23
- Nl: "lcaa",
24
- Ml: "lcar",
23
+ gu: "lcaa",
24
+ fu: "lcar",
25
25
  Rn: "inc",
26
26
  Bn: "add",
27
27
  Ln: "rem",
28
28
  Fn: "set",
29
29
  $n: "ncam",
30
- Ol: "sgu"
30
+ pu: "sgu"
31
31
  },
32
- De = { Ar: "feed_displayed", dc: "content_cards_displayed" };
32
+ De = { Ar: "feed_displayed", Cc: "content_cards_displayed" };
33
33
  export { ve as EventTypes, De as InternalEventTypes };
@@ -1,17 +1,17 @@
1
1
  export default class Be {
2
2
  constructor(t, e) {
3
- (this.td = "undefined" == typeof window ? self : window),
4
- (this.ed = t),
5
- (this.nd = e);
3
+ (this.nd = "undefined" == typeof window ? self : window),
4
+ (this.od = t),
5
+ (this.sd = e);
6
6
  }
7
- od() {
8
- if ("indexedDB" in this.td) return this.td.indexedDB;
7
+ dd() {
8
+ if ("indexedDB" in this.nd) return this.nd.indexedDB;
9
9
  }
10
- rd() {
10
+ ud() {
11
11
  try {
12
- if (null == this.od()) return !1;
12
+ if (null == this.dd()) return !1;
13
13
  {
14
- const t = this.od().open("Braze IndexedDB Support Test");
14
+ const t = this.dd().open("Braze IndexedDB Support Test");
15
15
  if (
16
16
  ((t.onupgradeneeded = () => t.result.close()),
17
17
  (t.onsuccess = () => t.result.close()),
@@ -20,7 +20,7 @@ export default class Be {
20
20
  const t = window.chrome || window.browser || window.msBrowser;
21
21
  if (t && t.runtime && t.runtime.id)
22
22
  return (
23
- this.nd.info(
23
+ this.sd.info(
24
24
  "Not using IndexedDB for storage because we are running inside an extension"
25
25
  ),
26
26
  !1
@@ -30,45 +30,45 @@ export default class Be {
30
30
  }
31
31
  } catch (t) {
32
32
  return (
33
- this.nd.info(
33
+ this.sd.info(
34
34
  "Not using IndexedDB for storage due to following error: " + t
35
35
  ),
36
36
  !1
37
37
  );
38
38
  }
39
39
  }
40
- sd(t, e) {
41
- const n = this.od().open(this.ed.dd, this.ed.VERSION);
40
+ fd(t, e) {
41
+ const n = this.dd().open(this.od.ad, this.od.VERSION);
42
42
  if (null == n) return "function" == typeof e && e(), !1;
43
43
  const o = this;
44
44
  return (
45
45
  (n.onupgradeneeded = t => {
46
- o.nd.info(
47
- "Upgrading indexedDB " + o.ed.dd + " to v" + o.ed.VERSION + "..."
46
+ o.sd.info(
47
+ "Upgrading indexedDB " + o.od.ad + " to v" + o.od.VERSION + "..."
48
48
  );
49
49
  const e = t.target.result;
50
- for (const t in o.ed.Jt)
51
- o.ed.Jt.hasOwnProperty(t) &&
52
- !e.objectStoreNames.contains(o.ed.Jt[t]) &&
53
- e.createObjectStore(o.ed.Jt[t]);
50
+ for (const t in o.od.Jt)
51
+ o.od.Jt.hasOwnProperty(t) &&
52
+ !e.objectStoreNames.contains(o.od.Jt[t]) &&
53
+ e.createObjectStore(o.od.Jt[t]);
54
54
  }),
55
55
  (n.onsuccess = n => {
56
56
  const i = n.target.result;
57
57
  (i.onversionchange = () => {
58
58
  i.close(),
59
59
  "function" == typeof e && e(),
60
- o.nd.error(
60
+ o.sd.error(
61
61
  "Needed to close the database unexpectedly because of an upgrade in another tab"
62
62
  );
63
63
  }),
64
64
  t(i);
65
65
  }),
66
66
  (n.onerror = t => (
67
- o.nd.info(
67
+ o.sd.info(
68
68
  "Could not open indexedDB " +
69
- o.ed.dd +
69
+ o.od.ad +
70
70
  " v" +
71
- o.ed.VERSION +
71
+ o.od.VERSION +
72
72
  ": " +
73
73
  t.target.errorCode
74
74
  ),
@@ -79,18 +79,18 @@ export default class Be {
79
79
  );
80
80
  }
81
81
  setItem(t, e, n, o, i) {
82
- if (!this.rd()) return "function" == typeof i && i(), !1;
82
+ if (!this.ud()) return "function" == typeof i && i(), !1;
83
83
  const r = this;
84
- return this.sd(s => {
84
+ return this.fd(s => {
85
85
  if (!s.objectStoreNames.contains(t))
86
86
  return (
87
- r.nd.error(
87
+ r.sd.error(
88
88
  "Could not store object " +
89
89
  e +
90
90
  " in " +
91
91
  t +
92
92
  " on indexedDB " +
93
- r.ed.dd +
93
+ r.od.ad +
94
94
  " - " +
95
95
  t +
96
96
  " is not a valid objectStore"
@@ -102,13 +102,13 @@ export default class Be {
102
102
  d.oncomplete = () => s.close();
103
103
  const u = d.objectStore(t).put(n, e);
104
104
  (u.onerror = () => {
105
- r.nd.error(
105
+ r.sd.error(
106
106
  "Could not store object " +
107
107
  e +
108
108
  " in " +
109
109
  t +
110
110
  " on indexedDB " +
111
- r.ed.dd
111
+ r.od.ad
112
112
  ),
113
113
  "function" == typeof i && i();
114
114
  }),
@@ -118,18 +118,18 @@ export default class Be {
118
118
  }, i);
119
119
  }
120
120
  getItem(t, e, n) {
121
- if (!this.rd()) return !1;
121
+ if (!this.ud()) return !1;
122
122
  const o = this;
123
- return this.sd(i => {
123
+ return this.fd(i => {
124
124
  if (!i.objectStoreNames.contains(t))
125
125
  return (
126
- o.nd.error(
126
+ o.sd.error(
127
127
  "Could not retrieve object " +
128
128
  e +
129
129
  " in " +
130
130
  t +
131
131
  " on indexedDB " +
132
- o.ed.dd +
132
+ o.od.ad +
133
133
  " - " +
134
134
  t +
135
135
  " is not a valid objectStore"
@@ -140,13 +140,13 @@ export default class Be {
140
140
  r.oncomplete = () => i.close();
141
141
  const s = r.objectStore(t).get(e);
142
142
  (s.onerror = () => {
143
- o.nd.error(
143
+ o.sd.error(
144
144
  "Could not retrieve object " +
145
145
  e +
146
146
  " in " +
147
147
  t +
148
148
  " on indexedDB " +
149
- o.ed.dd
149
+ o.od.ad
150
150
  );
151
151
  }),
152
152
  (s.onsuccess = t => {
@@ -156,16 +156,16 @@ export default class Be {
156
156
  });
157
157
  }
158
158
  hr(t, e, n) {
159
- if (!this.rd()) return "function" == typeof n && n(), !1;
159
+ if (!this.ud()) return "function" == typeof n && n(), !1;
160
160
  const o = this;
161
- return this.sd(i => {
161
+ return this.fd(i => {
162
162
  if (!i.objectStoreNames.contains(t))
163
163
  return (
164
- o.nd.error(
164
+ o.sd.error(
165
165
  "Could not retrieve last record from " +
166
166
  t +
167
167
  " on indexedDB " +
168
- o.ed.dd +
168
+ o.od.ad +
169
169
  " - " +
170
170
  t +
171
171
  " is not a valid objectStore"
@@ -177,8 +177,8 @@ export default class Be {
177
177
  r.oncomplete = () => i.close();
178
178
  const s = r.objectStore(t).openCursor(null, "prev");
179
179
  (s.onerror = () => {
180
- o.nd.error(
181
- "Could not open cursor for " + t + " on indexedDB " + o.ed.dd
180
+ o.sd.error(
181
+ "Could not open cursor for " + t + " on indexedDB " + o.od.ad
182
182
  ),
183
183
  "function" == typeof n && n();
184
184
  }),
@@ -191,18 +191,18 @@ export default class Be {
191
191
  }, n);
192
192
  }
193
193
  br(t, e) {
194
- if (!this.rd()) return !1;
194
+ if (!this.ud()) return !1;
195
195
  const n = this;
196
- return this.sd(o => {
196
+ return this.fd(o => {
197
197
  if (!o.objectStoreNames.contains(t))
198
198
  return (
199
- n.nd.error(
199
+ n.sd.error(
200
200
  "Could not delete record " +
201
201
  e +
202
202
  " from " +
203
203
  t +
204
204
  " on indexedDB " +
205
- n.ed.dd +
205
+ n.od.ad +
206
206
  " - " +
207
207
  t +
208
208
  " is not a valid objectStore"
@@ -212,28 +212,28 @@ export default class Be {
212
212
  const i = o.transaction([t], "readwrite");
213
213
  i.oncomplete = () => o.close();
214
214
  i.objectStore(t).delete(e).onerror = () => {
215
- n.nd.error(
215
+ n.sd.error(
216
216
  "Could not delete record " +
217
217
  e +
218
218
  " from " +
219
219
  t +
220
220
  " on indexedDB " +
221
- n.ed.dd
221
+ n.od.ad
222
222
  );
223
223
  };
224
224
  });
225
225
  }
226
226
  Mt(t, e) {
227
- if (!this.rd()) return !1;
227
+ if (!this.ud()) return !1;
228
228
  const n = this;
229
- return this.sd(o => {
229
+ return this.fd(o => {
230
230
  if (!o.objectStoreNames.contains(t))
231
231
  return (
232
- n.nd.error(
232
+ n.sd.error(
233
233
  "Could not retrieve objects from " +
234
234
  t +
235
235
  " on indexedDB " +
236
- n.ed.dd +
236
+ n.od.ad +
237
237
  " - " +
238
238
  t +
239
239
  " is not a valid objectStore"
@@ -247,15 +247,15 @@ export default class Be {
247
247
  d = [];
248
248
  (s.onerror = () => {
249
249
  d.length > 0
250
- ? (n.nd.info(
250
+ ? (n.sd.info(
251
251
  "Cursor closed midway through for " +
252
252
  t +
253
253
  " on indexedDB " +
254
- n.ed.dd
254
+ n.od.ad
255
255
  ),
256
256
  e(d))
257
- : n.nd.error(
258
- "Could not open cursor for " + t + " on indexedDB " + n.ed.dd
257
+ : n.sd.error(
258
+ "Could not open cursor for " + t + " on indexedDB " + n.od.ad
259
259
  );
260
260
  }),
261
261
  (s.onsuccess = t => {
@@ -272,43 +272,43 @@ export default class Be {
272
272
  });
273
273
  }
274
274
  clearData() {
275
- if (!this.rd()) return !1;
275
+ if (!this.ud()) return !1;
276
276
  const t = [];
277
- for (const e in this.ed.Jt)
278
- this.ed.Jt.hasOwnProperty(e) &&
279
- this.ed.Jt[e] !== this.ed.Jt.oe &&
280
- t.push(this.ed.Jt[e]);
277
+ for (const e in this.od.Jt)
278
+ this.od.Jt.hasOwnProperty(e) &&
279
+ this.od.Jt[e] !== this.od.Jt.oe &&
280
+ t.push(this.od.Jt[e]);
281
281
  const e = this;
282
- return this.sd(function(n) {
282
+ return this.fd(function(n) {
283
283
  const o = n.transaction(t, "readwrite");
284
284
  o.oncomplete = () => n.close();
285
285
  for (let n = 0; n < t.length; n++) {
286
286
  const i = t[n];
287
287
  o.objectStore(i).clear().onerror = function() {
288
- e.nd.error(
289
- "Could not clear " + this.source.name + " on indexedDB " + e.ed.dd
288
+ e.sd.error(
289
+ "Could not clear " + this.source.name + " on indexedDB " + e.od.ad
290
290
  );
291
291
  };
292
292
  }
293
293
  o.onerror = function() {
294
- e.nd.error("Could not clear object stores on indexedDB " + e.ed.dd);
294
+ e.sd.error("Could not clear object stores on indexedDB " + e.od.ad);
295
295
  };
296
296
  });
297
297
  }
298
298
  }
299
299
  Be.ep = {
300
300
  Ft: {
301
- dd: "AppboyServiceWorkerAsyncStorage",
301
+ ad: "AppboyServiceWorkerAsyncStorage",
302
302
  VERSION: 6,
303
303
  Jt: {
304
- Xa: "data",
304
+ Sa: "data",
305
305
  kr: "pushClicks",
306
306
  cu: "pushSubscribed",
307
- ud: "fallbackDevice",
307
+ hd: "fallbackDevice",
308
308
  qt: "cardUpdates",
309
309
  oe: "optOut",
310
310
  yr: "pendingData",
311
- gu: "sdkAuthenticationSignature"
311
+ kh: "sdkAuthenticationSignature"
312
312
  },
313
313
  se: 1
314
314
  }
@@ -3,11 +3,11 @@ const Ae = {
3
3
  (void 0 === n && void 0 !== Ae.zg) || (Ae.zg = !!n), Ae.Eg || (Ae.Eg = !0);
4
4
  },
5
5
  destroy: function() {
6
- (Ae.Eg = !1), (Ae.zg = void 0), (Ae.nd = void 0);
6
+ (Ae.Eg = !1), (Ae.zg = void 0), (Ae.sd = void 0);
7
7
  },
8
8
  setLogger: function(n) {
9
9
  "function" == typeof n
10
- ? (Ae.init(), (Ae.nd = n))
10
+ ? (Ae.init(), (Ae.sd = n))
11
11
  : Ae.info("Ignoring setLogger call since logger is not a function");
12
12
  },
13
13
  toggleLogging: function() {
@@ -19,19 +19,19 @@ const Ae = {
19
19
  info: function(n) {
20
20
  if (Ae.zg) {
21
21
  const o = "Braze: " + n;
22
- null != Ae.nd ? Ae.nd(o) : console.log(o);
22
+ null != Ae.sd ? Ae.sd(o) : console.log(o);
23
23
  }
24
24
  },
25
25
  warn: function(n) {
26
26
  if (Ae.zg) {
27
- const o = "Braze SDK Warning: " + n + " (v4.8.0)";
28
- null != Ae.nd ? Ae.nd(o) : console.warn(o);
27
+ const o = "Braze SDK Warning: " + n + " (v4.8.1)";
28
+ null != Ae.sd ? Ae.sd(o) : console.warn(o);
29
29
  }
30
30
  },
31
31
  error: function(n) {
32
32
  if (Ae.zg) {
33
- const o = "Braze SDK Error: " + n + " (v4.8.0)";
34
- null != Ae.nd ? Ae.nd(o) : console.error(o);
33
+ const o = "Braze SDK Error: " + n + " (v4.8.1)";
34
+ null != Ae.sd ? Ae.sd(o) : console.error(o);
35
35
  }
36
36
  }
37
37
  };
@@ -45,7 +45,7 @@ export default class a {
45
45
  const e = new t(!0),
46
46
  l = [],
47
47
  u = [];
48
- let a;
48
+ let a = {};
49
49
  this.u && (a = o ? this.u.v(i.k.K) || {} : this.u.v(i.k.L) || {});
50
50
  for (const s of n)
51
51
  s.M(),
@@ -21,7 +21,7 @@ export function showContentCards(n, t) {
21
21
  const a = e.nn(L.tn) || e.nn(L.en) || !1,
22
22
  i = g.er().As(!1);
23
23
  "function" == typeof t && B(i, t(i.cards.slice()), i.lastUpdated, null, a);
24
- const s = I(i, a),
24
+ const s = I(i, a, o),
25
25
  l = g.er(),
26
26
  f = l.Vt();
27
27
  (null == i.lastUpdated ||
@@ -4,8 +4,9 @@ import O, { STORAGE_KEYS as i } from "../managers/storage-manager.js";
4
4
  export function disableSDK() {
5
5
  const n = e.cr();
6
6
  n && n.requestImmediateDataFlush();
7
- const o = new O.ee(null, !0);
8
- o.store(i.re, "This-cookie-will-expire-in-" + o.ne());
9
- const s = r.zt.Ft;
10
- new r.xt(s, r.j).setItem(s.Jt.oe, s.se, !0), e.destroy(!1), e.ae(!0);
7
+ const o = new O.ee(null, !0),
8
+ s = "This-cookie-will-expire-in-" + o.re();
9
+ o.store(i.ne, s);
10
+ const a = r.zt.Ft;
11
+ new r.xt(a, r.j).setItem(a.Jt.oe, a.se, !0), e.destroy(!1), e.ae(!0);
11
12
  }
@@ -2,7 +2,7 @@ import e from "../managers/braze-instance.js";
2
2
  import r from "../../shared-lib/braze-shared-lib.js";
3
3
  import O, { STORAGE_KEYS as i } from "../managers/storage-manager.js";
4
4
  export function enableSDK() {
5
- new O.ee(null, !0).remove(i.re);
5
+ new O.ee(null, !0).remove(i.ne);
6
6
  const a = r.zt.Ft;
7
7
  new r.xt(a, r.j).br(a.Jt.oe, a.se), e.destroy(!1), e.ae(!1);
8
8
  }
@@ -1,4 +1,4 @@
1
1
  import O, { STORAGE_KEYS as i } from "../managers/storage-manager.js";
2
2
  export function isDisabled() {
3
- return !!new O.ee(null, !0).wr(i.re);
3
+ return !!new O.ee(null, !0).wr(i.ne);
4
4
  }
@@ -22,11 +22,11 @@ export default class er extends y {
22
22
  (this.gt = s),
23
23
  (this.u = i),
24
24
  (this.gi = null),
25
- (this.Fi = new E()),
26
- (this.wi = 10),
27
- (this.yi = null),
25
+ (this.wi = new E()),
26
+ (this.yi = 10),
27
+ (this.Fi = null),
28
28
  (this.ji = null),
29
- e.jt(this.Fi);
29
+ e.jt(this.wi);
30
30
  }
31
31
  Ts(t) {
32
32
  if ((!this.wt || this.wt.bi()) && null != t && t.feature_flags) {
@@ -35,7 +35,7 @@ export default class er extends y {
35
35
  const t = st(s);
36
36
  t && this.mi.push(t);
37
37
  }
38
- (this.pi = new Date().getTime()), this.vi(), this.Fi.Et(this.mi);
38
+ (this.pi = new Date().getTime()), this.vi(), this.wi.Et(this.mi);
39
39
  }
40
40
  }
41
41
  Ti() {
@@ -49,7 +49,7 @@ export default class er extends y {
49
49
  return s;
50
50
  }
51
51
  hi(t) {
52
- return this.Fi.lt(t);
52
+ return this.wi.lt(t);
53
53
  }
54
54
  refreshFeatureFlags(t, s, i = !1, e = !0) {
55
55
  if (!this.Ri(i))
@@ -84,9 +84,9 @@ export default class er extends y {
84
84
  },
85
85
  ei: () => {
86
86
  if (e && o && !this.ji) {
87
- let e = this.yi;
88
- (null == e || e < 1e3 * this.wi) && (e = 1e3 * this.wi),
89
- this.zi(Math.min(3e5, D(1e3 * this.wi, 3 * e)), t, s, i);
87
+ let e = this.Fi;
88
+ (null == e || e < 1e3 * this.yi) && (e = 1e3 * this.yi),
89
+ this.zi(Math.min(3e5, D(1e3 * this.yi, 3 * e)), t, s, i);
90
90
  }
91
91
  }
92
92
  }))
@@ -96,17 +96,17 @@ export default class er extends y {
96
96
  qi() {
97
97
  null != this.ji && (clearTimeout(this.ji), (this.ji = null));
98
98
  }
99
- zi(t = 1e3 * this.wi, s, i, e) {
99
+ zi(t = 1e3 * this.yi, s, i, e) {
100
100
  this.qi(),
101
101
  (this.ji = window.setTimeout(() => {
102
102
  this.refreshFeatureFlags(s, i, e);
103
103
  }, t)),
104
- (this.yi = t);
104
+ (this.Fi = t);
105
105
  }
106
106
  Ri(t) {
107
107
  if (!this.wt) return !1;
108
108
  if (!t) {
109
- const t = parseFloat(this.wt.Si());
109
+ const t = this.wt.Si();
110
110
  let s = !1;
111
111
  if (!isNaN(t)) {
112
112
  if (-1 === t) return r.j.info("Feature flag refreshes not allowed"), !1;
@@ -40,7 +40,7 @@ export function showFeed(t, n, o) {
40
40
  B(f, s(f.cards, o), f.lastUpdated, null, i),
41
41
  (a = !0))
42
42
  : (f = new Feed(s(n, o), new Date()));
43
- const u = I(f, i);
43
+ const u = I(f, i, l);
44
44
  if (a) {
45
45
  (null == f.lastUpdated ||
46
46
  new Date().valueOf() - f.lastUpdated.valueOf() > Feed.mr) &&