@braze/web-sdk 5.8.0 → 5.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 (133) hide show
  1. package/index.d.ts +1 -1
  2. package/package.json +1 -1
  3. package/shared-lib/encoding-utils.js +1 -1
  4. package/shared-lib/event-types.js +22 -22
  5. package/shared-lib/guid.js +1 -1
  6. package/shared-lib/indexed-db-adapter.js +18 -18
  7. package/shared-lib/logger.js +2 -2
  8. package/shared-lib/supported-options.js +16 -16
  9. package/src/Banner/banner-provider.js +79 -79
  10. package/src/Banner/banner.js +9 -9
  11. package/src/Banner/display/banner-to-html.js +2 -2
  12. package/src/Banner/get-all-banners.js +2 -2
  13. package/src/Banner/get-banner.js +2 -2
  14. package/src/Banner/log-banner-click.js +2 -2
  15. package/src/Banner/log-banner-impressions.js +4 -4
  16. package/src/Banner/request-banners-refresh.js +1 -1
  17. package/src/Banner/subscribe-to-banners-updates.js +5 -5
  18. package/src/Card/card-manager.js +35 -35
  19. package/src/Card/display/card-display.js +8 -8
  20. package/src/Card/log-card-click.js +1 -1
  21. package/src/Card/log-card-dismissal.js +1 -1
  22. package/src/Card/log-card-impressions.js +1 -1
  23. package/src/Card/models/captioned-image.js +21 -21
  24. package/src/Card/models/card.js +92 -92
  25. package/src/Card/models/classic-card.js +21 -21
  26. package/src/Card/models/control-card.js +11 -11
  27. package/src/Card/models/image-only.js +19 -19
  28. package/src/Card/util/card-factory.js +39 -39
  29. package/src/ContentCards/content-cards-provider.js +142 -142
  30. package/src/ContentCards/get-cached-content-cards.js +1 -1
  31. package/src/ContentCards/request-content-cards-refresh.js +1 -1
  32. package/src/ContentCards/subscribe-to-content-cards-updates.js +4 -4
  33. package/src/ContentCards/ui/show-content-cards.js +3 -3
  34. package/src/Core/disable-sdk.js +6 -6
  35. package/src/Core/enable-sdk.js +5 -5
  36. package/src/Core/get-device-id.js +2 -2
  37. package/src/Core/handle-braze-action.js +2 -2
  38. package/src/Core/is-disabled.js +2 -2
  39. package/src/Core/is-initialized.js +1 -1
  40. package/src/Core/log-custom-event.js +5 -5
  41. package/src/Core/log-purchase.js +4 -4
  42. package/src/Core/open-session.js +5 -5
  43. package/src/Core/wipe-data.js +2 -2
  44. package/src/FeatureFlags/feature-flag-factory.js +10 -10
  45. package/src/FeatureFlags/feature-flag.js +15 -15
  46. package/src/FeatureFlags/feature-flags-provider.js +61 -61
  47. package/src/FeatureFlags/get-all-feature-flags.js +2 -2
  48. package/src/FeatureFlags/get-feature-flag.js +2 -2
  49. package/src/FeatureFlags/log-feature-flag-impression.js +4 -4
  50. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +2 -2
  51. package/src/Feed/feed-provider.js +41 -41
  52. package/src/Feed/get-cached-feed.js +1 -1
  53. package/src/Feed/log-feed-displayed.js +1 -1
  54. package/src/Feed/request-feed-refresh.js +1 -1
  55. package/src/Feed/subscribe-to-feed-updates.js +1 -1
  56. package/src/Feed/ui/show-feed.js +1 -1
  57. package/src/InAppMessage/defer-in-app-message.js +1 -1
  58. package/src/InAppMessage/display/html-message-to-html.js +6 -6
  59. package/src/InAppMessage/display/in-app-message-to-html.js +20 -20
  60. package/src/InAppMessage/display/modal-utils.js +4 -4
  61. package/src/InAppMessage/in-app-message-factory.js +7 -7
  62. package/src/InAppMessage/in-app-message-manager.js +89 -89
  63. package/src/InAppMessage/log-in-app-message-button-click.js +6 -6
  64. package/src/InAppMessage/log-in-app-message-click.js +5 -5
  65. package/src/InAppMessage/log-in-app-message-html-click.js +7 -7
  66. package/src/InAppMessage/log-in-app-message-impression.js +2 -2
  67. package/src/InAppMessage/models/control-message.js +5 -5
  68. package/src/InAppMessage/models/full-screen-message.js +34 -34
  69. package/src/InAppMessage/models/html-message.js +20 -20
  70. package/src/InAppMessage/models/in-app-message-button.js +8 -8
  71. package/src/InAppMessage/models/in-app-message.js +80 -80
  72. package/src/InAppMessage/models/modal-message.js +33 -33
  73. package/src/InAppMessage/models/slide-up-message.js +29 -29
  74. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  75. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  76. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  77. package/src/InAppMessage/ui/show-in-app-message.js +12 -12
  78. package/src/Push/push-manager-factory.js +1 -1
  79. package/src/Push/push-manager.js +94 -94
  80. package/src/Push/utils/push-utils.js +4 -4
  81. package/src/User/user-manager.js +17 -17
  82. package/src/User/user.js +38 -38
  83. package/src/common/base-feed.js +1 -1
  84. package/src/common/base-provider.js +1 -1
  85. package/src/common/event-logger.js +5 -5
  86. package/src/common/feed-display.js +6 -6
  87. package/src/l10n/l10n-manager-factory.js +1 -1
  88. package/src/l10n/l10n-manager.js +1 -1
  89. package/src/managers/auth-manager.js +31 -31
  90. package/src/managers/braze-instance.js +125 -125
  91. package/src/managers/device-manager.js +24 -24
  92. package/src/managers/network-manager.js +149 -149
  93. package/src/managers/server-config-manager.js +84 -84
  94. package/src/managers/session-manager.js +27 -27
  95. package/src/managers/storage-manager-factory.js +12 -12
  96. package/src/managers/storage-manager.js +83 -83
  97. package/src/managers/subscription-manager.js +10 -10
  98. package/src/managers/utils.js +4 -4
  99. package/src/models/backend-errors.js +5 -5
  100. package/src/models/braze-event.js +4 -4
  101. package/src/models/device.js +2 -2
  102. package/src/models/identifier.js +3 -3
  103. package/src/models/push-token.js +8 -8
  104. package/src/models/request-result.js +3 -3
  105. package/src/models/server-config.js +31 -31
  106. package/src/request-controller.js +148 -148
  107. package/src/triggers/models/custom-event-data.js +1 -1
  108. package/src/triggers/models/custom-event-property-data.js +2 -2
  109. package/src/triggers/models/filter-set.js +4 -4
  110. package/src/triggers/models/filter.js +2 -2
  111. package/src/triggers/models/in-app-message-click-data.js +1 -1
  112. package/src/triggers/models/purchase-data.js +1 -1
  113. package/src/triggers/models/purchase-property-data.js +2 -2
  114. package/src/triggers/models/push-click-data.js +1 -1
  115. package/src/triggers/models/trigger-condition.js +32 -32
  116. package/src/triggers/models/trigger-events.js +2 -2
  117. package/src/triggers/models/trigger.js +11 -11
  118. package/src/triggers/triggers-provider-factory.js +2 -2
  119. package/src/triggers/triggers-provider.js +72 -72
  120. package/src/ui/js/attach-css.js +1 -1
  121. package/src/ui/js/load-font-awesome.js +1 -1
  122. package/src/util/base-device-parser.js +1 -1
  123. package/src/util/braze-actions.js +4 -4
  124. package/src/util/browser-detector.js +5 -5
  125. package/src/util/client-hints-parser.js +1 -1
  126. package/src/util/component-utils.js +1 -1
  127. package/src/util/dom-utils.js +4 -4
  128. package/src/util/html-display-utils.js +6 -6
  129. package/src/util/key-codes.js +1 -1
  130. package/src/util/net.js +6 -6
  131. package/src/util/request-header-utils.js +21 -21
  132. package/src/util/user-agent-parser.js +1 -1
  133. package/src/util/window-utils.js +1 -1
@@ -2,74 +2,74 @@ import { ControlCard } from "./models/index.js";
2
2
  import c from "../common/event-logger.js";
3
3
  import E from "../models/request-result.js";
4
4
  import { logger as N, EventTypes as d } from "../../shared-lib/index.js";
5
- import { STORAGE_KEYS as t } from "../managers/storage-manager.js";
5
+ import { STORAGE_KEYS as s } from "../managers/storage-manager.js";
6
6
  export default class M {
7
7
  constructor(t) {
8
8
  (this.C = t), (this.C = t);
9
9
  }
10
- logClick(s, n) {
10
+ logClick(t, n) {
11
11
  const r = new E();
12
- if ((s.rt(), null == s.url || "" === s.url))
12
+ if ((t.$t(), null == t.url || "" === t.url))
13
13
  return (
14
- N.info(`Card ${s.id} has no url. Not logging click to Braze servers.`),
14
+ N.info(`Card ${t.id} has no url. Not logging click to Braze servers.`),
15
15
  r
16
16
  );
17
- if (n && s.id && this.C) {
18
- const n = this.C.vs(t.gs.ot) || {};
19
- (n[s.id] = !0), this.C.Bs(t.gs.ot, n);
17
+ if (n && t.id && this.C) {
18
+ const n = this.C.ft(s.gt.Kt) || {};
19
+ (n[t.id] = !0), this.C.Bt(s.gt.Kt, n);
20
20
  }
21
- const i = this.et([s]);
21
+ const i = this.Lt([t]);
22
22
  if (null == i) return r;
23
- const o = n ? d.lt : d.ut;
24
- return c.cs(o, i);
23
+ const o = n ? d.Mt : d.Ot;
24
+ return c.ut(o, i);
25
25
  }
26
- ct(s) {
26
+ Pt(t) {
27
27
  const n = new E();
28
- if (!s.ft())
28
+ if (!t.Qt())
29
29
  return (
30
30
  N.info(
31
- `Card ${s.id} refused this dismissal. Ignoring analytics event.`,
31
+ `Card ${t.id} refused this dismissal. Ignoring analytics event.`,
32
32
  ),
33
33
  n
34
34
  );
35
- if (s.id && this.C) {
36
- const n = this.C.vs(t.gs.gt) || {};
37
- (n[s.id] = !0), this.C.Bs(t.gs.gt, n);
35
+ if (t.id && this.C) {
36
+ const n = this.C.ft(s.gt.Vt) || {};
37
+ (n[t.id] = !0), this.C.Bt(s.gt.Vt, n);
38
38
  }
39
- const r = this.et([s]);
40
- return null == r ? n : c.cs(d.dt, r);
39
+ const r = this.Lt([t]);
40
+ return null == r ? n : c.ut(d.Wt, r);
41
41
  }
42
- jt(s, n) {
42
+ Xt(t, n) {
43
43
  const r = new E(!0),
44
44
  i = [],
45
45
  o = [];
46
46
  let e = {};
47
- this.C && (e = n ? this.C.vs(t.gs.vt) || {} : this.C.vs(t.gs.Ct) || {});
48
- for (const t of s) {
49
- t.wt()
50
- ? (t instanceof ControlCard ? o.push(t) : i.push(t),
51
- t.id && (e[t.id] = !0))
47
+ this.C && (e = n ? this.C.ft(s.gt.Yt) || {} : this.C.ft(s.gt.Zt) || {});
48
+ for (const s of t) {
49
+ s.ts()
50
+ ? (s instanceof ControlCard ? o.push(s) : i.push(s),
51
+ s.id && (e[s.id] = !0))
52
52
  : N.info(
53
- `Card ${t.id} logged an impression too recently. Ignoring analytics event.`,
53
+ `Card ${s.id} logged an impression too recently. Ignoring analytics event.`,
54
54
  );
55
55
  }
56
- const l = this.et(i),
57
- a = this.et(o);
58
- if (null == l && null == a) return (r.ss = !1), r;
56
+ const l = this.Lt(i),
57
+ a = this.Lt(o);
58
+ if (null == l && null == a) return (r.tt = !1), r;
59
59
  if (
60
- (this.C && (n ? this.C.Bs(t.gs.vt, e) : this.C.Bs(t.gs.Ct, e)), null != l)
60
+ (this.C && (n ? this.C.Bt(s.gt.Yt, e) : this.C.Bt(s.gt.Zt, e)), null != l)
61
61
  ) {
62
- const t = n ? d.xt : d.yt,
63
- s = c.cs(t, l);
64
- r.It(s);
62
+ const t = n ? d.ss : d.ns,
63
+ s = c.ut(t, l);
64
+ r.rs(s);
65
65
  }
66
66
  if (null != a && n) {
67
- const t = c.cs(d.$t, a);
68
- r.It(t);
67
+ const t = c.ut(d.os, a);
68
+ r.rs(t);
69
69
  }
70
70
  return r;
71
71
  }
72
- et(t) {
72
+ Lt(t) {
73
73
  let s,
74
74
  n = null;
75
75
  for (let r = 0; r < t.length; r++)
@@ -22,7 +22,7 @@ export function setCardHeight(t, e) {
22
22
  i = 0;
23
23
  o.length > 0 && (i = o[0].offsetWidth);
24
24
  for (const e of t)
25
- if (((a = e.bt), a && e.imageUrl && "number" == typeof e.aspectRatio)) {
25
+ if (((a = e.te), a && e.imageUrl && "number" == typeof e.aspectRatio)) {
26
26
  const t = i / e.aspectRatio;
27
27
  t && (a.style.height = `${t}px`);
28
28
  }
@@ -30,7 +30,7 @@ export function setCardHeight(t, e) {
30
30
  export function cardToHtml(t, logCardClick, e, o = "ltr") {
31
31
  const a = document.createElement("div");
32
32
  (a.dir = o),
33
- (a.className = "ab-card ab-effect-card " + t.At),
33
+ (a.className = "ab-card ab-effect-card " + t.oe),
34
34
  t.id &&
35
35
  (a.setAttribute("data-ab-card-id", t.id), a.setAttribute("id", t.id)),
36
36
  a.setAttribute("role", "article"),
@@ -57,7 +57,7 @@ export function cardToHtml(t, logCardClick, e, o = "ltr") {
57
57
  _setImageAltText(t, r),
58
58
  e.appendChild(r),
59
59
  (a.className += " with-image"),
60
- n && !t.Tt)
60
+ n && !t.ae)
61
61
  ) {
62
62
  const t = document.createElement("a");
63
63
  t.setAttribute("href", i),
@@ -71,10 +71,10 @@ export function cardToHtml(t, logCardClick, e, o = "ltr") {
71
71
  t.logCardDismissal = () => logCardDismissal(t);
72
72
  const e = T("Dismiss Card", void 0, t.dismissCard.bind(t), o);
73
73
  a.appendChild(e),
74
- H(r, R.kt, (t) => {
74
+ H(r, R.ie, (t) => {
75
75
  (a.className += " ab-swiped-left"), e.onclick(t);
76
76
  }),
77
- H(r, R.Ht, (t) => {
77
+ H(r, R.de, (t) => {
78
78
  (a.className += " ab-swiped-right"), e.onclick(t);
79
79
  });
80
80
  }
@@ -84,7 +84,7 @@ export function cardToHtml(t, logCardClick, e, o = "ltr") {
84
84
  const t = document.createElement("h1");
85
85
  if (
86
86
  ((t.className = "ab-title"),
87
- (t.id = G.Rt()),
87
+ (t.id = G.ce()),
88
88
  a.setAttribute("aria-labelledby", t.id),
89
89
  n)
90
90
  ) {
@@ -99,7 +99,7 @@ export function cardToHtml(t, logCardClick, e, o = "ltr") {
99
99
  const m = document.createElement("div");
100
100
  if (
101
101
  ((m.className = s ? "ab-description" : "ab-description ab-no-title"),
102
- (m.id = G.Rt()),
102
+ (m.id = G.ce()),
103
103
  a.setAttribute("aria-describedby", m.id),
104
104
  t.description && m.appendChild(document.createTextNode(t.description)),
105
105
  n)
@@ -119,7 +119,7 @@ export function cardToHtml(t, logCardClick, e, o = "ltr") {
119
119
  (u.className = "ab-unread-indicator"),
120
120
  t.viewed && (u.className += " read"),
121
121
  a.appendChild(u),
122
- (t.bt = a),
122
+ (t.te = a),
123
123
  a
124
124
  );
125
125
  }
@@ -6,6 +6,6 @@ import { logger as N } from "../../shared-lib/index.js";
6
6
  export function logCardClick(o, m) {
7
7
  return (
8
8
  !!r.rr() &&
9
- (o instanceof Card ? _.ea().logClick(o, m).ss : (N.error("card " + K), !1))
9
+ (o instanceof Card ? _.ea().logClick(o, m).tt : (N.error("card " + K), !1))
10
10
  );
11
11
  }
@@ -6,6 +6,6 @@ import { logger as N } from "../../shared-lib/index.js";
6
6
  export function logCardDismissal(o) {
7
7
  return (
8
8
  !!r.rr() &&
9
- (o instanceof Card ? _.ea().ct(o).ss : (N.error("card " + K), !1))
9
+ (o instanceof Card ? _.ea().Pt(o).tt : (N.error("card " + K), !1))
10
10
  );
11
11
  }
@@ -9,5 +9,5 @@ export function logCardImpressions(o, n) {
9
9
  if (!z(o)) return N.error("cards must be an array"), !1;
10
10
  for (const r of o)
11
11
  if (!(r instanceof Card)) return N.error(`Each card in cards ${K}`), !1;
12
- return _.ea().jt(o, n).ss;
12
+ return _.ea().Xt(o, n).tt;
13
13
  }
@@ -2,31 +2,31 @@ import Card from "./card.js";
2
2
  export default class CaptionedImage extends Card {
3
3
  constructor(t, s, i, h, e, r, a, o, c, n, d, p, u, l, m, f) {
4
4
  super(t, s, i, h, e, r, a, o, c, n, d, p, u, l, m, f),
5
- (this.At = "ab-captioned-image"),
6
- (this.Tt = !0),
5
+ (this.oe = "ab-captioned-image"),
6
+ (this.ae = !0),
7
7
  (this.test = !1);
8
8
  }
9
- bs() {
9
+ bt() {
10
10
  const t = {};
11
11
  return (
12
- (t[Card.qt.zt] = Card.Dt.Bt),
13
- (t[Card.qt.Et] = this.id),
14
- (t[Card.qt.Ft] = this.viewed),
15
- (t[Card.qt.Gt] = this.title),
16
- (t[Card.qt.Jt] = this.imageUrl),
17
- (t[Card.qt.Kt] = this.description),
18
- (t[Card.qt.Lt] = this.updated),
19
- (t[Card.qt.Mt] = this.created),
20
- (t[Card.qt.Nt] = this.categories),
21
- (t[Card.qt.Ot] = this.expiresAt),
22
- (t[Card.qt.URL] = this.url),
23
- (t[Card.qt.Pt] = this.linkText),
24
- (t[Card.qt.Qt] = this.aspectRatio),
25
- (t[Card.qt.St] = this.extras),
26
- (t[Card.qt.Ut] = this.pinned),
27
- (t[Card.qt.Vt] = this.dismissible),
28
- (t[Card.qt.Wt] = this.clicked),
29
- (t[Card.qt.Xt] = this.test),
12
+ (t[Card.es.hs] = Card.ds.cs),
13
+ (t[Card.es.ps] = this.id),
14
+ (t[Card.es.us] = this.viewed),
15
+ (t[Card.es.ls] = this.title),
16
+ (t[Card.es.fs] = this.imageUrl),
17
+ (t[Card.es.xs] = this.description),
18
+ (t[Card.es.bs] = this.updated),
19
+ (t[Card.es.gs] = this.created),
20
+ (t[Card.es.js] = this.categories),
21
+ (t[Card.es.zs] = this.expiresAt),
22
+ (t[Card.es.URL] = this.url),
23
+ (t[Card.es.ks] = this.linkText),
24
+ (t[Card.es.qs] = this.aspectRatio),
25
+ (t[Card.es.vs] = this.extras),
26
+ (t[Card.es.ws] = this.pinned),
27
+ (t[Card.es.ys] = this.dismissible),
28
+ (t[Card.es.As] = this.clicked),
29
+ (t[Card.es.Bs] = this.test),
30
30
  t
31
31
  );
32
32
  }
@@ -45,26 +45,26 @@ export default class Card {
45
45
  (this.clicked = N || !1),
46
46
  (this.isControl = !1),
47
47
  (this.test = !1),
48
- (this._t = null),
49
- (this.Yt = null),
50
- (this.Zt = null);
48
+ (this.ti = null),
49
+ (this.ii = null),
50
+ (this.si = null);
51
51
  }
52
52
  subscribeToClickedEvent(t) {
53
- return this.ti().Fs(t);
53
+ return this.hi().Ft(t);
54
54
  }
55
55
  subscribeToDismissedEvent(t) {
56
- return this.ii().Fs(t);
56
+ return this.ni().Ft(t);
57
57
  }
58
58
  removeSubscription(t) {
59
- this.ti().removeSubscription(t), this.ii().removeSubscription(t);
59
+ this.hi().removeSubscription(t), this.ni().removeSubscription(t);
60
60
  }
61
61
  removeAllSubscriptions() {
62
- this.ti().removeAllSubscriptions(), this.ii().removeAllSubscriptions();
62
+ this.hi().removeAllSubscriptions(), this.ni().removeAllSubscriptions();
63
63
  }
64
64
  dismissCard() {
65
65
  if (!this.dismissible || this.dismissed) return;
66
66
  "function" == typeof this.logCardDismissal && this.logCardDismissal();
67
- let t = this.bt;
67
+ let t = this.te;
68
68
  !t && this.id && (t = document.getElementById(this.id)),
69
69
  t &&
70
70
  ((t.style.height = t.offsetHeight + "px"),
@@ -76,128 +76,128 @@ export default class Card {
76
76
  (t.style.margin = "0"),
77
77
  setTimeout(function () {
78
78
  t && t.parentNode && t.parentNode.removeChild(t);
79
- }, Card.si));
79
+ }, Card.li));
80
80
  }, P));
81
81
  }
82
- ti() {
83
- return null == this._t && (this._t = new u()), this._t;
82
+ hi() {
83
+ return null == this.ti && (this.ti = new u()), this.ti;
84
84
  }
85
- ii() {
86
- return null == this.Yt && (this.Yt = new u()), this.Yt;
85
+ ni() {
86
+ return null == this.ii && (this.ii = new u()), this.ii;
87
87
  }
88
- wt() {
88
+ ts() {
89
89
  const t = new Date().valueOf();
90
90
  return (
91
- !(null != this.Zt && t - this.Zt < Card.hi) &&
92
- ((this.Zt = t), (this.viewed = !0), !0)
91
+ !(null != this.si && t - this.si < Card.ei) &&
92
+ ((this.si = t), (this.viewed = !0), !0)
93
93
  );
94
94
  }
95
- rt() {
96
- (this.viewed = !0), (this.clicked = !0), this.ti().X();
95
+ $t() {
96
+ (this.viewed = !0), (this.clicked = !0), this.hi().X();
97
97
  }
98
- ft() {
98
+ Qt() {
99
99
  return (
100
100
  !(!this.dismissible || this.dismissed) &&
101
- ((this.dismissed = !0), this.ii().X(), !0)
101
+ ((this.dismissed = !0), this.ni().X(), !0)
102
102
  );
103
103
  }
104
- ni(t) {
105
- if (null == t || t[Card.li.Et] !== this.id) return !0;
106
- if (t[Card.li.ei]) return !1;
104
+ ri(t) {
105
+ if (null == t || t[Card.ui.ps] !== this.id) return !0;
106
+ if (t[Card.ui.Ei]) return !1;
107
107
  if (
108
- null != t[Card.li.Lt] &&
108
+ null != t[Card.ui.bs] &&
109
109
  null != this.updated &&
110
- parseInt(t[Card.li.Lt]) < L(this.updated.valueOf())
110
+ parseInt(t[Card.ui.bs]) < L(this.updated.valueOf())
111
111
  )
112
112
  return !0;
113
113
  if (
114
- (t[Card.li.Ft] && !this.viewed && (this.viewed = !0),
115
- t[Card.li.Wt] && !this.clicked && (this.clicked = t[Card.li.Wt]),
116
- null != t[Card.li.Gt] && (this.title = t[Card.li.Gt]),
117
- null != t[Card.li.Jt] && (this.imageUrl = t[Card.li.Jt]),
118
- null != t[Card.li.Kt] && (this.description = t[Card.li.Kt]),
119
- null != t[Card.li.Lt])
114
+ (t[Card.ui.us] && !this.viewed && (this.viewed = !0),
115
+ t[Card.ui.As] && !this.clicked && (this.clicked = t[Card.ui.As]),
116
+ null != t[Card.ui.ls] && (this.title = t[Card.ui.ls]),
117
+ null != t[Card.ui.fs] && (this.imageUrl = t[Card.ui.fs]),
118
+ null != t[Card.ui.xs] && (this.description = t[Card.ui.xs]),
119
+ null != t[Card.ui.bs])
120
120
  ) {
121
- const i = O(t[Card.li.Lt]);
121
+ const i = O(t[Card.ui.bs]);
122
122
  null != i && (this.updated = i);
123
123
  }
124
- if (null != t[Card.li.Ot]) {
124
+ if (null != t[Card.ui.zs]) {
125
125
  let i;
126
- (i = t[Card.li.Ot] === Card.ri ? null : O(t[Card.li.Ot])),
126
+ (i = t[Card.ui.zs] === Card.oi ? null : O(t[Card.ui.zs])),
127
127
  (this.expiresAt = i);
128
128
  }
129
129
  if (
130
- (null != t[Card.li.URL] && (this.url = t[Card.li.URL]),
131
- null != t[Card.li.Pt] && (this.linkText = t[Card.li.Pt]),
132
- null != t[Card.li.Qt])
130
+ (null != t[Card.ui.URL] && (this.url = t[Card.ui.URL]),
131
+ null != t[Card.ui.ks] && (this.linkText = t[Card.ui.ks]),
132
+ null != t[Card.ui.qs])
133
133
  ) {
134
- const i = parseFloat(t[Card.li.Qt].toString());
134
+ const i = parseFloat(t[Card.ui.qs].toString());
135
135
  this.aspectRatio = isNaN(i) ? null : i;
136
136
  }
137
137
  return (
138
- null != t[Card.li.St] && (this.extras = t[Card.li.St]),
139
- null != t[Card.li.Ut] && (this.pinned = t[Card.li.Ut]),
140
- null != t[Card.li.Vt] && (this.dismissible = t[Card.li.Vt]),
141
- null != t[Card.li.Xt] && (this.test = t[Card.li.Xt]),
138
+ null != t[Card.ui.vs] && (this.extras = t[Card.ui.vs]),
139
+ null != t[Card.ui.ws] && (this.pinned = t[Card.ui.ws]),
140
+ null != t[Card.ui.ys] && (this.dismissible = t[Card.ui.ys]),
141
+ null != t[Card.ui.Bs] && (this.test = t[Card.ui.Bs]),
142
142
  !0
143
143
  );
144
144
  }
145
- bs() {
145
+ bt() {
146
146
  N.error("Must be implemented in a subclass");
147
147
  }
148
148
  }
149
- (Card.ri = -1),
150
- (Card.li = {
151
- Et: "id",
152
- Ft: "v",
153
- Vt: "db",
154
- ei: "r",
155
- Lt: "ca",
156
- Ut: "p",
157
- Ot: "ea",
158
- St: "e",
159
- zt: "tp",
160
- Jt: "i",
161
- Gt: "tt",
162
- Kt: "ds",
149
+ (Card.oi = -1),
150
+ (Card.ui = {
151
+ ps: "id",
152
+ us: "v",
153
+ ys: "db",
154
+ Ei: "r",
155
+ bs: "ca",
156
+ ws: "p",
157
+ zs: "ea",
158
+ vs: "e",
159
+ hs: "tp",
160
+ fs: "i",
161
+ ls: "tt",
162
+ xs: "ds",
163
163
  URL: "u",
164
- Pt: "dm",
165
- Qt: "ar",
166
- Wt: "cl",
167
- Xt: "t",
164
+ ks: "dm",
165
+ qs: "ar",
166
+ As: "cl",
167
+ Bs: "t",
168
168
  }),
169
- (Card.Dt = {
170
- Bt: "captioned_image",
171
- ui: "text_announcement",
172
- Ei: "short_news",
173
- oi: "banner_image",
174
- Ti: "control",
169
+ (Card.ds = {
170
+ cs: "captioned_image",
171
+ Ti: "text_announcement",
172
+ Ii: "short_news",
173
+ ai: "banner_image",
174
+ ci: "control",
175
175
  }),
176
- (Card.qt = {
177
- Et: "id",
178
- Ft: "v",
179
- Vt: "db",
180
- Mt: "cr",
181
- Lt: "ca",
182
- Ut: "p",
183
- Nt: "t",
184
- Ot: "ea",
185
- St: "e",
186
- zt: "tp",
187
- Jt: "i",
188
- Gt: "tt",
189
- Kt: "ds",
176
+ (Card.es = {
177
+ ps: "id",
178
+ us: "v",
179
+ ys: "db",
180
+ gs: "cr",
181
+ bs: "ca",
182
+ ws: "p",
183
+ js: "t",
184
+ zs: "ea",
185
+ vs: "e",
186
+ hs: "tp",
187
+ fs: "i",
188
+ ls: "tt",
189
+ xs: "ds",
190
190
  URL: "u",
191
- Pt: "dm",
192
- Qt: "ar",
193
- Wt: "cl",
194
- Xt: "s",
191
+ ks: "dm",
192
+ qs: "ar",
193
+ As: "cl",
194
+ Bs: "s",
195
195
  }),
196
- (Card.Ii = {
197
- ai: "ADVERTISING",
198
- ci: "ANNOUNCEMENTS",
199
- Ni: "NEWS",
200
- mi: "SOCIAL",
196
+ (Card.Ni = {
197
+ mi: "ADVERTISING",
198
+ Si: "ANNOUNCEMENTS",
199
+ Ai: "NEWS",
200
+ Di: "SOCIAL",
201
201
  }),
202
- (Card.si = 400),
203
- (Card.hi = 1e4);
202
+ (Card.li = 400),
203
+ (Card.ei = 1e4);
@@ -2,30 +2,30 @@ import Card from "./card.js";
2
2
  export default class ClassicCard extends Card {
3
3
  constructor(s, t, i, h, r, c, e, a, o, d, l, n, u, p, f, m) {
4
4
  super(s, t, i, h, r, c, e, a, o, d, l, n, u, p, f, m),
5
- (this.At = "ab-classic-card"),
6
- (this.Tt = !0);
5
+ (this.oe = "ab-classic-card"),
6
+ (this.ae = !0);
7
7
  }
8
- bs() {
8
+ bt() {
9
9
  const s = {};
10
10
  return (
11
- (s[Card.qt.zt] = Card.Dt.Ei),
12
- (s[Card.qt.Et] = this.id),
13
- (s[Card.qt.Ft] = this.viewed),
14
- (s[Card.qt.Gt] = this.title),
15
- (s[Card.qt.Jt] = this.imageUrl),
16
- (s[Card.qt.Kt] = this.description),
17
- (s[Card.qt.Lt] = this.updated),
18
- (s[Card.qt.Mt] = this.created),
19
- (s[Card.qt.Nt] = this.categories),
20
- (s[Card.qt.Ot] = this.expiresAt),
21
- (s[Card.qt.URL] = this.url),
22
- (s[Card.qt.Pt] = this.linkText),
23
- (s[Card.qt.Qt] = this.aspectRatio),
24
- (s[Card.qt.St] = this.extras),
25
- (s[Card.qt.Ut] = this.pinned),
26
- (s[Card.qt.Vt] = this.dismissible),
27
- (s[Card.qt.Wt] = this.clicked),
28
- (s[Card.qt.Xt] = this.test),
11
+ (s[Card.es.hs] = Card.ds.Ii),
12
+ (s[Card.es.ps] = this.id),
13
+ (s[Card.es.us] = this.viewed),
14
+ (s[Card.es.ls] = this.title),
15
+ (s[Card.es.fs] = this.imageUrl),
16
+ (s[Card.es.xs] = this.description),
17
+ (s[Card.es.bs] = this.updated),
18
+ (s[Card.es.gs] = this.created),
19
+ (s[Card.es.js] = this.categories),
20
+ (s[Card.es.zs] = this.expiresAt),
21
+ (s[Card.es.URL] = this.url),
22
+ (s[Card.es.ks] = this.linkText),
23
+ (s[Card.es.qs] = this.aspectRatio),
24
+ (s[Card.es.vs] = this.extras),
25
+ (s[Card.es.ws] = this.pinned),
26
+ (s[Card.es.ys] = this.dismissible),
27
+ (s[Card.es.As] = this.clicked),
28
+ (s[Card.es.Bs] = this.test),
29
29
  s
30
30
  );
31
31
  }
@@ -3,20 +3,20 @@ export default class ControlCard extends Card {
3
3
  constructor(l, t, s, i, n, r) {
4
4
  super(l, t, null, null, null, null, s, null, i, null, null, null, n, r),
5
5
  (this.isControl = !0),
6
- (this.At = "ab-control-card"),
7
- (this.Tt = !1);
6
+ (this.oe = "ab-control-card"),
7
+ (this.ae = !1);
8
8
  }
9
- bs() {
9
+ bt() {
10
10
  const l = {};
11
11
  return (
12
- (l[Card.qt.zt] = Card.Dt.Ti),
13
- (l[Card.qt.Et] = this.id),
14
- (l[Card.qt.Ft] = this.viewed),
15
- (l[Card.qt.Lt] = this.updated),
16
- (l[Card.qt.Ot] = this.expiresAt),
17
- (l[Card.qt.St] = this.extras),
18
- (l[Card.qt.Ut] = this.pinned),
19
- (l[Card.qt.Xt] = this.test),
12
+ (l[Card.es.hs] = Card.ds.ci),
13
+ (l[Card.es.ps] = this.id),
14
+ (l[Card.es.us] = this.viewed),
15
+ (l[Card.es.bs] = this.updated),
16
+ (l[Card.es.zs] = this.expiresAt),
17
+ (l[Card.es.vs] = this.extras),
18
+ (l[Card.es.ws] = this.pinned),
19
+ (l[Card.es.Bs] = this.test),
20
20
  l
21
21
  );
22
22
  }
@@ -2,29 +2,29 @@ import Card from "./card.js";
2
2
  export default class ImageOnly extends Card {
3
3
  constructor(s, t, i, h, r, e, l, n, o, a, u, c, d, m) {
4
4
  super(s, t, null, i, null, h, r, e, l, n, o, a, u, c, d, m),
5
- (this.At = "ab-image-only"),
6
- (this.Tt = !1),
5
+ (this.oe = "ab-image-only"),
6
+ (this.ae = !1),
7
7
  (this.test = !1);
8
8
  }
9
- bs() {
9
+ bt() {
10
10
  const s = {};
11
11
  return (
12
- (s[Card.qt.zt] = Card.Dt.oi),
13
- (s[Card.qt.Et] = this.id),
14
- (s[Card.qt.Ft] = this.viewed),
15
- (s[Card.qt.Jt] = this.imageUrl),
16
- (s[Card.qt.Lt] = this.updated),
17
- (s[Card.qt.Mt] = this.created),
18
- (s[Card.qt.Nt] = this.categories),
19
- (s[Card.qt.Ot] = this.expiresAt),
20
- (s[Card.qt.URL] = this.url),
21
- (s[Card.qt.Pt] = this.linkText),
22
- (s[Card.qt.Qt] = this.aspectRatio),
23
- (s[Card.qt.St] = this.extras),
24
- (s[Card.qt.Ut] = this.pinned),
25
- (s[Card.qt.Vt] = this.dismissible),
26
- (s[Card.qt.Wt] = this.clicked),
27
- (s[Card.qt.Xt] = this.test),
12
+ (s[Card.es.hs] = Card.ds.ai),
13
+ (s[Card.es.ps] = this.id),
14
+ (s[Card.es.us] = this.viewed),
15
+ (s[Card.es.fs] = this.imageUrl),
16
+ (s[Card.es.bs] = this.updated),
17
+ (s[Card.es.gs] = this.created),
18
+ (s[Card.es.js] = this.categories),
19
+ (s[Card.es.zs] = this.expiresAt),
20
+ (s[Card.es.URL] = this.url),
21
+ (s[Card.es.ks] = this.linkText),
22
+ (s[Card.es.qs] = this.aspectRatio),
23
+ (s[Card.es.vs] = this.extras),
24
+ (s[Card.es.ws] = this.pinned),
25
+ (s[Card.es.ys] = this.dismissible),
26
+ (s[Card.es.As] = this.clicked),
27
+ (s[Card.es.Bs] = this.test),
28
28
  s
29
29
  );
30
30
  }