@braze/web-sdk 5.7.0 → 5.8.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 (98) hide show
  1. package/index.d.ts +4 -4
  2. package/package.json +1 -1
  3. package/shared-lib/encoding-utils.js +1 -1
  4. package/shared-lib/event-types.js +8 -8
  5. package/shared-lib/indexed-db-adapter.js +7 -7
  6. package/shared-lib/logger.js +2 -2
  7. package/shared-lib/supported-options.js +17 -17
  8. package/src/Banner/get-all-banners.js +2 -3
  9. package/src/Banner/get-banner.js +11 -11
  10. package/src/Banner/request-banners-refresh.js +20 -12
  11. package/src/Banner/subscribe-to-banners-updates.js +14 -13
  12. package/src/Banner/ui/insert-banner.js +11 -9
  13. package/src/Card/log-card-impressions.js +2 -2
  14. package/src/ContentCards/content-cards-provider-factory.js +1 -1
  15. package/src/ContentCards/content-cards.js +3 -3
  16. package/src/ContentCards/ui/show-content-cards.js +5 -5
  17. package/src/Core/add-sdk-metadata.js +2 -2
  18. package/src/Core/change-user.js +3 -3
  19. package/src/Core/disable-sdk.js +5 -5
  20. package/src/Core/enable-sdk.js +3 -3
  21. package/src/Core/get-device-id.js +2 -2
  22. package/src/Core/get-user.js +1 -1
  23. package/src/Core/is-disabled.js +1 -1
  24. package/src/Core/open-session.js +6 -6
  25. package/src/Core/wipe-data.js +1 -1
  26. package/src/FeatureFlags/feature-flag-factory.js +4 -4
  27. package/src/FeatureFlags/feature-flag.js +17 -17
  28. package/src/FeatureFlags/feature-flags-provider.js +37 -37
  29. package/src/FeatureFlags/get-all-feature-flags.js +6 -7
  30. package/src/FeatureFlags/get-feature-flag.js +5 -6
  31. package/src/FeatureFlags/log-feature-flag-impression.js +3 -3
  32. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +1 -1
  33. package/src/Feed/feed.js +2 -2
  34. package/src/Feed/ui/show-feed.js +4 -4
  35. package/src/InAppMessage/defer-in-app-message.js +1 -1
  36. package/src/InAppMessage/display/html-message-to-html.js +6 -6
  37. package/src/InAppMessage/display/in-app-message-to-html.js +18 -18
  38. package/src/InAppMessage/display/modal-utils.js +4 -4
  39. package/src/InAppMessage/in-app-message-factory.js +4 -4
  40. package/src/InAppMessage/in-app-message-manager-factory.js +1 -1
  41. package/src/InAppMessage/in-app-message-manager.js +49 -49
  42. package/src/InAppMessage/log-in-app-message-button-click.js +1 -1
  43. package/src/InAppMessage/log-in-app-message-click.js +1 -1
  44. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  45. package/src/InAppMessage/models/control-message.js +1 -1
  46. package/src/InAppMessage/models/full-screen-message.js +3 -3
  47. package/src/InAppMessage/models/html-message.js +5 -5
  48. package/src/InAppMessage/models/in-app-message-button.js +2 -2
  49. package/src/InAppMessage/models/in-app-message.js +32 -32
  50. package/src/InAppMessage/models/modal-message.js +3 -3
  51. package/src/InAppMessage/models/slide-up-message.js +6 -6
  52. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  53. package/src/InAppMessage/ui/show-in-app-message.js +18 -18
  54. package/src/Push/push-manager-factory.js +8 -8
  55. package/src/Push/push-manager.js +83 -83
  56. package/src/Push/utils/push-utils.js +4 -4
  57. package/src/User/user-manager.js +6 -6
  58. package/src/User/user.js +18 -18
  59. package/src/common/base-feed.js +3 -3
  60. package/src/common/event-logger.js +1 -1
  61. package/src/common/feed-display.js +8 -8
  62. package/src/l10n/l10n-manager-factory.js +2 -2
  63. package/src/l10n/l10n-manager.js +1 -1
  64. package/src/managers/braze-instance.js +107 -107
  65. package/src/managers/device-manager.js +18 -18
  66. package/src/managers/network-manager.js +117 -117
  67. package/src/managers/server-config-manager.js +61 -61
  68. package/src/managers/session-manager.js +25 -25
  69. package/src/managers/storage-manager-factory.js +8 -8
  70. package/src/managers/storage-manager.js +57 -57
  71. package/src/models/backend-errors.js +5 -5
  72. package/src/models/braze-event.js +2 -2
  73. package/src/models/device.js +2 -2
  74. package/src/models/identifier.js +10 -10
  75. package/src/models/push-token.js +7 -7
  76. package/src/models/server-config.js +30 -30
  77. package/src/request-controller.js +93 -93
  78. package/src/triggers/models/filter-set.js +4 -4
  79. package/src/triggers/models/filter.js +1 -1
  80. package/src/triggers/models/trigger-condition.js +29 -29
  81. package/src/triggers/models/trigger-events.js +1 -1
  82. package/src/triggers/models/trigger.js +9 -9
  83. package/src/triggers/triggers-provider-factory.js +2 -2
  84. package/src/triggers/triggers-provider.js +15 -15
  85. package/src/ui/js/attach-css.js +3 -3
  86. package/src/ui/js/load-font-awesome.js +2 -2
  87. package/src/util/base-device-parser.js +3 -3
  88. package/src/util/braze-actions.js +4 -4
  89. package/src/util/browser-detector.js +5 -5
  90. package/src/util/client-hints-parser.js +1 -1
  91. package/src/util/component-utils.js +1 -1
  92. package/src/util/dom-utils.js +6 -6
  93. package/src/util/key-codes.js +1 -1
  94. package/src/util/net.js +1 -1
  95. package/src/util/request-header-utils.js +13 -13
  96. package/src/util/user-agent-parser.js +1 -1
  97. package/src/util/validation-utils.js +4 -4
  98. package/src/util/window-utils.js +1 -1
@@ -15,30 +15,30 @@ export default class FeatureFlag {
15
15
  return null == i ? (this.ye(t), null) : e(i) ? i.value : (this.Pe(r), null);
16
16
  }
17
17
  getStringProperty(t) {
18
- return this.he(t, this.be, "string");
18
+ return this.he(t, this.Ie, "string");
19
19
  }
20
20
  getNumberProperty(t) {
21
- return this.he(t, this.Ie, "number");
21
+ return this.he(t, this.Te, "number");
22
22
  }
23
23
  getBooleanProperty(t) {
24
- return this.he(t, this.de, "boolean");
24
+ return this.he(t, this.Ee, "boolean");
25
25
  }
26
26
  getImageProperty(t) {
27
- return this.he(t, this.Te, "image");
27
+ return this.he(t, this.Ne, "image");
28
28
  }
29
29
  getJsonProperty(t) {
30
- return this.he(t, this.Ee, "jsonobject");
30
+ return this.he(t, this.Re, "jsonobject");
31
31
  }
32
32
  getTimestampProperty(t) {
33
- return this.he(t, this.Ne, "datetime");
33
+ return this.he(t, this.je, "datetime");
34
34
  }
35
35
  bs() {
36
36
  const t = {};
37
37
  return (
38
38
  (t[FeatureFlag.qt.Et] = this.id),
39
- (t[FeatureFlag.qt.le] = this.enabled),
40
- (t[FeatureFlag.qt.pe] = this.properties),
41
- (t[FeatureFlag.qt.Fe] = this.trackingString),
39
+ (t[FeatureFlag.qt.pe] = this.enabled),
40
+ (t[FeatureFlag.qt.Fe] = this.properties),
41
+ (t[FeatureFlag.qt.be] = this.trackingString),
42
42
  t
43
43
  );
44
44
  }
@@ -48,28 +48,28 @@ export default class FeatureFlag {
48
48
  ye(t) {
49
49
  N.info(`${t} not found in feature flag properties.`);
50
50
  }
51
- be(t) {
51
+ Ie(t) {
52
52
  return "string" === t.type && "string" == typeof t.value;
53
53
  }
54
- Ie(t) {
54
+ Te(t) {
55
55
  return "number" === t.type && "number" == typeof t.value;
56
56
  }
57
- de(t) {
57
+ Ee(t) {
58
58
  return "boolean" === t.type && "boolean" == typeof t.value;
59
59
  }
60
- Te(t) {
60
+ Ne(t) {
61
61
  return "image" === t.type && "string" == typeof t.value;
62
62
  }
63
- Ee(t) {
63
+ Re(t) {
64
64
  return (
65
65
  "jsonobject" === t.type &&
66
66
  "object" == typeof t.value &&
67
67
  t.value.constructor == Object
68
68
  );
69
69
  }
70
- Ne(t) {
70
+ je(t) {
71
71
  return "datetime" === t.type && "number" == typeof t.value;
72
72
  }
73
73
  }
74
- (FeatureFlag.qt = { Et: "id", le: "e", pe: "pr", Fe: "fts" }),
75
- (FeatureFlag.li = { Et: "id", le: "enabled", pe: "properties", Fe: "fts" });
74
+ (FeatureFlag.qt = { Et: "id", pe: "e", Fe: "pr", be: "fts" }),
75
+ (FeatureFlag.li = { Et: "id", pe: "enabled", Fe: "properties", be: "fts" });
@@ -17,37 +17,37 @@ export default class tr extends s {
17
17
  (this.S = s),
18
18
  (this.C = e),
19
19
  (this.T = i),
20
- (this.je = []),
21
- (this.we = 0),
20
+ (this.we = []),
21
+ (this.Ce = 0),
22
22
  (this.B = t),
23
23
  (this.S = s),
24
24
  (this.C = e),
25
25
  (this.T = i),
26
- (this.Ce = null),
27
- (this.Re = new u()),
26
+ (this.De = null),
27
+ (this.Se = new u()),
28
28
  (this.R = 10),
29
29
  (this.I = null),
30
30
  (this.q = null),
31
- r.N(this.Re);
31
+ r.N(this.Se);
32
32
  }
33
33
  U(t) {
34
34
  var s;
35
35
  if (
36
- (null === (s = this.B) || void 0 === s ? void 0 : s.De()) &&
36
+ (null === (s = this.B) || void 0 === s ? void 0 : s.qe()) &&
37
37
  null != t &&
38
38
  t.feature_flags
39
39
  ) {
40
- this.je = [];
40
+ this.we = [];
41
41
  for (const s of t.feature_flags) {
42
42
  const t = st(s);
43
- t && this.je.push(t);
43
+ t && this.we.push(t);
44
44
  }
45
- (this.we = new Date().getTime()), this.Se(), this.Re.X(this.je);
45
+ (this.Ce = new Date().getTime()), this.xe(), this.Se.X(this.we);
46
46
  }
47
47
  }
48
- qe() {
48
+ ze() {
49
49
  let s = {};
50
- this.C && (s = this.C.vs(t.gs.xe));
50
+ this.C && (s = this.C.vs(t.gs.$e));
51
51
  const e = {};
52
52
  for (const t in s) {
53
53
  const i = ht(s[t]);
@@ -55,27 +55,27 @@ export default class tr extends s {
55
55
  }
56
56
  return e;
57
57
  }
58
- ze() {
58
+ ke() {
59
59
  var s;
60
60
  return (
61
- (null === (s = this.C) || void 0 === s ? void 0 : s.vs(t.gs.$e)) || {}
61
+ (null === (s = this.C) || void 0 === s ? void 0 : s.vs(t.gs.Be)) || {}
62
62
  );
63
63
  }
64
- ke(s) {
65
- this.C && this.C.Bs(t.gs.$e, s);
64
+ Me(s) {
65
+ this.C && this.C.Bs(t.gs.Be, s);
66
66
  }
67
67
  qs(t) {
68
- return this.Re.Fs(t);
68
+ return this.Se.Fs(t);
69
69
  }
70
70
  refreshFeatureFlags(t, s, e = !1, i = !0) {
71
71
  const r = () => {
72
- "function" == typeof s && s(), this.Re.X(this.je);
72
+ "function" == typeof s && s(), this.Se.X(this.we);
73
73
  };
74
- if (!this.Be(e))
74
+ if (!this.Ue(e))
75
75
  return (
76
- !this.Ce &&
76
+ !this.De &&
77
77
  this.B &&
78
- (this.Ce = this.B.Me(() => {
78
+ (this.De = this.B.Xe(() => {
79
79
  this.refreshFeatureFlags(t, s);
80
80
  })),
81
81
  void r()
@@ -84,7 +84,7 @@ export default class tr extends s {
84
84
  if (!o) return void r();
85
85
  i && this.G();
86
86
  const n = o.H({}, !0),
87
- u = o.J(n, h.O.Ue);
87
+ u = o.J(n, h.O._e);
88
88
  let f = !1;
89
89
  o.V(
90
90
  n,
@@ -92,7 +92,7 @@ export default class tr extends s {
92
92
  const o = this.S;
93
93
  if (!o) return void r();
94
94
  const c = new Date().valueOf();
95
- h.W(this.C, h.O.Ue, c),
95
+ h.W(this.C, h.O._e, c),
96
96
  -1 !== i && u.push(["X-Braze-Req-Tokens-Remaining", i.toString()]),
97
97
  l.Y({
98
98
  url: `${o.Z()}/feature_flags/sync`,
@@ -117,7 +117,7 @@ export default class tr extends s {
117
117
  () => {
118
118
  this.refreshFeatureFlags(t, s, e, !0);
119
119
  },
120
- h.O.Ue,
120
+ h.O._e,
121
121
  (t) => this.hs(t),
122
122
  () => this.G(),
123
123
  n,
@@ -125,7 +125,7 @@ export default class tr extends s {
125
125
  },
126
126
  });
127
127
  },
128
- h.O.Ue,
128
+ h.O._e,
129
129
  s,
130
130
  );
131
131
  }
@@ -135,48 +135,48 @@ export default class tr extends s {
135
135
  hs(t) {
136
136
  this.G(), (this.q = t);
137
137
  }
138
- Be(t) {
138
+ Ue(t) {
139
139
  if (!this.B) return !1;
140
140
  if (!t) {
141
- const t = this.B.Xe();
141
+ const t = this.B.Ae();
142
142
  if (null == t) return !1;
143
143
  let s = !1;
144
144
  if (!isNaN(t)) {
145
145
  if (-1 === t) return N.info("Feature flag refreshes not allowed"), !1;
146
- s = new Date().getTime() >= (this.we || 0) + 1e3 * t;
146
+ s = new Date().getTime() >= (this.Ce || 0) + 1e3 * t;
147
147
  }
148
148
  if (!s)
149
149
  return (
150
150
  N.info(`Feature flag refreshes were rate limited to ${t} seconds`), !1
151
151
  );
152
152
  }
153
- return this.B.De();
153
+ return this.B.qe();
154
154
  }
155
- _e() {
155
+ Ge() {
156
156
  var s;
157
157
  return (
158
- (null === (s = this.C) || void 0 === s ? void 0 : s.vs(t.gs.Ae)) || null
158
+ (null === (s = this.C) || void 0 === s ? void 0 : s.vs(t.gs.He)) || null
159
159
  );
160
160
  }
161
- Ge() {
161
+ Je() {
162
162
  var s, e;
163
163
  null === (s = this.C) ||
164
164
  void 0 === s ||
165
- s.Bs(t.gs.Ae, null === (e = this.T) || void 0 === e ? void 0 : e.Ss());
165
+ s.Bs(t.gs.He, null === (e = this.T) || void 0 === e ? void 0 : e.Ss());
166
166
  }
167
- He() {
167
+ Ke() {
168
168
  var t;
169
169
  const s = null === (t = this.T) || void 0 === t ? void 0 : t.Ss(),
170
- e = this._e();
170
+ e = this.Ge();
171
171
  return null == e || s === e;
172
172
  }
173
- Se() {
173
+ xe() {
174
174
  if (!this.C) return;
175
175
  const s = {};
176
- for (const t of this.je) {
176
+ for (const t of this.we) {
177
177
  const e = t.bs();
178
178
  s[t.id] = e;
179
179
  }
180
- this.C.Bs(t.gs.xe, s), this.C.Bs(t.gs.Je, this.we), this.Ge();
180
+ this.C.Bs(t.gs.$e, s), this.C.Bs(t.gs.Le, this.Ce), this.Je();
181
181
  }
182
182
  }
@@ -1,12 +1,11 @@
1
- import { logger as N } from "../../shared-lib/index.js";
2
1
  import r from "../managers/braze-instance.js";
3
2
  import nr from "./feature-flags-provider-factory.js";
4
3
  export function getAllFeatureFlags() {
5
4
  if (!r.rr()) return;
6
- const e = [],
7
- t = r.v();
8
- if (t && !t.De()) return N.info("Feature flags are not enabled."), e;
9
- const n = nr.m().qe();
10
- for (const r in n) e.push(n[r]);
11
- return e;
5
+ const t = [],
6
+ e = r.v();
7
+ if (e && !e.qe()) return t;
8
+ const n = nr.m().ze();
9
+ for (const r in n) t.push(n[r]);
10
+ return t;
12
11
  }
@@ -1,10 +1,9 @@
1
- import { logger as N } from "../../shared-lib/index.js";
2
1
  import r from "../managers/braze-instance.js";
3
2
  import nr from "./feature-flags-provider-factory.js";
4
- export function getFeatureFlag(e) {
3
+ export function getFeatureFlag(t) {
5
4
  if (!r.rr()) return;
6
- const t = r.v();
7
- if (t && !t.De()) return N.info("Feature flags are not enabled."), null;
8
- const n = nr.m().qe();
9
- return n[e] ? n[e] : null;
5
+ const e = r.v();
6
+ if (e && !e.qe()) return null;
7
+ const n = nr.m().ze();
8
+ return n[t] ? n[t] : null;
10
9
  }
@@ -7,11 +7,11 @@ export function logFeatureFlagImpression(e) {
7
7
  if (!e) return !1;
8
8
  const t =
9
9
  "Not logging a feature flag impression. The feature flag was not part of any matching experiment.",
10
- o = nr.m().qe();
10
+ o = nr.m().ze();
11
11
  if (!o[e]) return N.info(t), !1;
12
12
  const n = o[e].trackingString;
13
13
  if (!n) return N.info(t), !1;
14
- const i = nr.m().ze();
14
+ const i = nr.m().ke();
15
15
  if (i[n])
16
16
  return (
17
17
  N.info(
@@ -19,7 +19,7 @@ export function logFeatureFlagImpression(e) {
19
19
  ),
20
20
  !1
21
21
  );
22
- (i[n] = !0), nr.m().ke(i);
22
+ (i[n] = !0), nr.m().Me(i);
23
23
  const s = { fid: e, fts: n };
24
24
  return c.cs(d.yr, s).ss;
25
25
  }
@@ -4,7 +4,7 @@ import { getAllFeatureFlags } from "./get-all-feature-flags.js";
4
4
  export function subscribeToFeatureFlagsUpdates(t) {
5
5
  if (!r.rr()) return;
6
6
  const e = nr.m();
7
- if (e.He()) {
7
+ if (e.Ke()) {
8
8
  const r = getAllFeatureFlags();
9
9
  r && "function" == typeof t && t(r);
10
10
  }
package/src/Feed/feed.js CHANGED
@@ -11,10 +11,10 @@ export default class Feed extends rr {
11
11
  logCardClick(r) {
12
12
  return logCardClick(r, !1);
13
13
  }
14
- dr() {
14
+ sr() {
15
15
  requestFeedRefresh();
16
16
  }
17
- ur() {
17
+ nr() {
18
18
  return !1;
19
19
  }
20
20
  }
@@ -1,4 +1,4 @@
1
- import r, { OPTIONS as z } from "../../managers/braze-instance.js";
1
+ import r, { OPTIONS as w } from "../../managers/braze-instance.js";
2
2
  import {
3
3
  destroyFeedHtml as ee,
4
4
  detectFeedImpressions as nn,
@@ -30,7 +30,7 @@ export function showFeed(e, t, n) {
30
30
  }
31
31
  return o;
32
32
  },
33
- i = r.sr(z.tn) || r.sr(z.en) || !1;
33
+ i = r.ee(w.tn) || r.ee(w.en) || !1;
34
34
  let s = !1;
35
35
  null == e && ((e = document.body), (s = !0));
36
36
  let l,
@@ -43,9 +43,9 @@ export function showFeed(e, t, n) {
43
43
  const a = tn(l, i, s);
44
44
  if (f) {
45
45
  (null == l.lastUpdated ||
46
- new Date().valueOf() - l.lastUpdated.valueOf() > Feed.ar) &&
46
+ new Date().valueOf() - l.lastUpdated.valueOf() > Feed.dr) &&
47
47
  (N.info(
48
- `Cached feed was older than max TTL of ${Feed.ar} ms, requesting an update from the server.`,
48
+ `Cached feed was older than max TTL of ${Feed.dr} ms, requesting an update from the server.`,
49
49
  ),
50
50
  on(l, a));
51
51
  const e = new Date().valueOf(),
@@ -8,6 +8,6 @@ export function deferInAppMessage(e) {
8
8
  return e instanceof ControlMessage
9
9
  ? (N.info("Not deferring since this is a ControlMessage."), !1)
10
10
  : e instanceof InAppMessage
11
- ? se.ea().Ke(e)
11
+ ? se.ea().Oe(e)
12
12
  : (N.info("Not an instance of InAppMessage, ignoring."), !1);
13
13
  }
@@ -15,10 +15,10 @@ export default function ct(t, e, o, s, n, i) {
15
15
  n.focus();
16
16
  const a = n.document.getElementsByTagName("head")[0];
17
17
  if (null != a) {
18
- if (t.Oe()) {
18
+ if (t.Qe()) {
19
19
  const e = document.createElement("style");
20
20
  (e.innerHTML = t.css || ""),
21
- (e.id = t.Le() || ""),
21
+ (e.id = t.Ve() || ""),
22
22
  null != i && e.setAttribute("nonce", i),
23
23
  a.appendChild(e);
24
24
  }
@@ -42,7 +42,7 @@ export default function ct(t, e, o, s, n, i) {
42
42
  },
43
43
  );
44
44
  if (
45
- ((n.appboyBridge = c), (n.brazeBridge = c), t.Qe !== InAppMessage.We.Ve)
45
+ ((n.appboyBridge = c), (n.brazeBridge = c), t.We !== InAppMessage.Ze.Ye)
46
46
  ) {
47
47
  const e = n.document.getElementsByTagName("a");
48
48
  for (let o = 0; o < e.length; o++) e[o].onclick = lt(t, l, e[o], s);
@@ -51,7 +51,7 @@ export default function ct(t, e, o, s, n, i) {
51
51
  }
52
52
  const m = n.document.body;
53
53
  if (null != m) {
54
- t.Ye() && (m.id = t.htmlId || "");
54
+ t.lo() && (m.id = t.htmlId || "");
55
55
  const e = document.createElement("hidden");
56
56
  (e.onclick = c.closeMessage),
57
57
  (e.className = "ab-programmatic-close-button"),
@@ -67,8 +67,8 @@ export default function ct(t, e, o, s, n, i) {
67
67
  ) {
68
68
  const e = document.createElement("div");
69
69
  return (
70
- (e.className = "ab-ios-scroll-wrapper"), e.appendChild(l), (t.Ze = e), e
70
+ (e.className = "ab-ios-scroll-wrapper"), e.appendChild(l), (t.do = e), e
71
71
  );
72
72
  }
73
- return (t.Ze = l), l;
73
+ return (t.do = l), l;
74
74
  }
@@ -17,7 +17,7 @@ import ct from "./html-message-to-html.js";
17
17
  import ce from "./modal-utils.js";
18
18
  import { logger as N, Guid as G } from "../../../shared-lib/index.js";
19
19
  export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
20
- if (((e.lo = document.activeElement), e instanceof HtmlMessage))
20
+ if (((e.uo = document.activeElement), e instanceof HtmlMessage))
21
21
  return ct(e, o, a, n, s, i);
22
22
  const c = (function (e, o, a, t, n, s, i = document.body, m = "ltr") {
23
23
  let l = null;
@@ -25,10 +25,10 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
25
25
  (c.dir = m),
26
26
  (c.className = "ab-in-app-message ab-start-hidden ab-background"),
27
27
  s && (c.style.zIndex = (s + 1).toString()),
28
- e.do() &&
28
+ e.bo() &&
29
29
  ((c.className += " ab-modal-interactions"),
30
30
  c.setAttribute("tabindex", "-1")),
31
- e.Oe() ||
31
+ e.Qe() ||
32
32
  ((c.style.color = le(e.textColor)),
33
33
  (c.style.backgroundColor = le(e.backgroundColor)),
34
34
  ae(e.backgroundColor) && (c.className += " ab-no-shadow"));
@@ -38,7 +38,7 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
38
38
  document.querySelectorAll(".ab-iam-img-loading").length > 0
39
39
  ? t(
40
40
  `Cannot show in-app message ${e.message} because another message is being shown.`,
41
- InAppMessage.bo.uo,
41
+ InAppMessage.fo.po,
42
42
  )
43
43
  : a(c));
44
44
  },
@@ -79,7 +79,7 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
79
79
  )));
80
80
  const u = T(
81
81
  "Close Message",
82
- e.Oe() ? void 0 : le(e.closeButtonColor),
82
+ e.Qe() ? void 0 : le(e.closeButtonColor),
83
83
  () => {
84
84
  e.ll(c);
85
85
  },
@@ -88,7 +88,7 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
88
88
  c.appendChild(u), s && (u.style.zIndex = (s + 2).toString());
89
89
  const b = document.createElement("div");
90
90
  (b.className = "ab-message-text"), (b.dir = m);
91
- const p = (e.messageAlignment || e.po).toLowerCase();
91
+ const p = (e.messageAlignment || e.ho).toLowerCase();
92
92
  b.className += " " + p + "-aligned";
93
93
  let g = !1;
94
94
  const f = document.createElement("div");
@@ -99,13 +99,13 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
99
99
  (o.style.backgroundImage = "url(" + e.imageUrl + ")"),
100
100
  o.setAttribute("role", "img"),
101
101
  o.setAttribute("aria-label", "Modal Image"),
102
- e.fo(o),
102
+ e.jo(o),
103
103
  f.appendChild(o);
104
104
  } else {
105
105
  const o = document.createElement("img");
106
106
  if (
107
107
  (o.setAttribute("src", e.imageUrl),
108
- e.fo(o),
108
+ e.jo(o),
109
109
  0 === document.querySelectorAll(".ab-iam-img-loading").length)
110
110
  ) {
111
111
  g = !0;
@@ -128,7 +128,7 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
128
128
  f.className += " ab-icon-area";
129
129
  const o = document.createElement("span");
130
130
  (o.className = "ab-icon"),
131
- e.Oe() ||
131
+ e.Qe() ||
132
132
  ((o.style.backgroundColor = le(e.iconBackgroundColor)),
133
133
  (o.style.color = le(e.iconColor)));
134
134
  const a = document.createElement("i");
@@ -142,23 +142,23 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
142
142
  }
143
143
  if ((J(b, "touchstart"), e.header && e.header.length > 0)) {
144
144
  const o = document.createElement("h1");
145
- (o.className = "ab-message-header"), (e.ho = G.Rt()), (o.id = e.ho);
145
+ (o.className = "ab-message-header"), (e.wo = G.Rt()), (o.id = e.wo);
146
146
  const a = (
147
147
  e.headerAlignment || InAppMessage.TextAlignment.CENTER
148
148
  ).toLowerCase();
149
149
  (o.className += " " + a + "-aligned"),
150
- e.Oe() || (o.style.color = le(e.headerTextColor)),
150
+ e.Qe() || (o.style.color = le(e.headerTextColor)),
151
151
  o.appendChild(document.createTextNode(e.header)),
152
152
  b.appendChild(o);
153
153
  }
154
- return b.appendChild(e.jo()), c.appendChild(b), g || d(), (e.Ze = c), c;
154
+ return b.appendChild(e.vo()), c.appendChild(b), g || d(), (e.do = c), c;
155
155
  })(e, o, a, t, n, s, m, l);
156
156
  if (e instanceof FullScreenMessage || e instanceof ModalMessage) {
157
157
  const a = e instanceof FullScreenMessage ? "ab-fullscreen" : "ab-modal";
158
158
  (c.className += ` ${a} ab-centered`),
159
- ce.wo(e, o, c, n),
160
- ce.vo(c),
161
- ce.xo(e.ho, c);
159
+ ce.xo(e, o, c, n),
160
+ ce.Co(c),
161
+ ce.$o(e.wo, c);
162
162
  } else if (e instanceof SlideUpMessage) {
163
163
  c.className += " ab-slideup";
164
164
  const o = c.getElementsByClassName("ab-close-button")[0];
@@ -166,7 +166,7 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
166
166
  const a = oe(
167
167
  "0 0 11.38 19.44",
168
168
  "M11.38 9.72l-9.33 9.72L0 17.3l7.27-7.58L0 2.14 2.05 0l9.33 9.72z",
169
- e.Oe() ? void 0 : le(e.closeButtonColor),
169
+ e.Qe() ? void 0 : le(e.closeButtonColor),
170
170
  );
171
171
  a.setAttribute("class", `ab-chevron ${l}`), o.appendChild(a);
172
172
  }
@@ -180,8 +180,8 @@ export default function de(e, o, a, t, n, s, i, m = document.body, l = "ltr") {
180
180
  null != o && null != o.onclick && o.onclick(e);
181
181
  }),
182
182
  e.slideFrom === InAppMessage.SlideFrom.TOP
183
- ? ((a = R.Co), (t = " ab-swiped-up"))
184
- : ((a = R.$o), (t = " ab-swiped-down")),
183
+ ? ((a = R.ko), (t = " ab-swiped-up"))
184
+ : ((a = R.Mo), (t = " ab-swiped-down")),
185
185
  H(c, a, (e) => {
186
186
  (c.className += t), null != o && null != o.onclick && o.onclick(e);
187
187
  });
@@ -5,7 +5,7 @@ import { toRgba as le } from "../../util/color-utils.js";
5
5
  import { addPassiveEventListener as J } from "../../util/dom-utils.js";
6
6
  import { KeyCodes as mt } from "../../util/key-codes.js";
7
7
  const ce = {
8
- vo: (t) => {
8
+ Co: (t) => {
9
9
  const o = t.querySelectorAll(
10
10
  ".ab-close-button, .ab-message-text, .ab-message-button",
11
11
  );
@@ -25,13 +25,13 @@ const ce = {
25
25
  });
26
26
  }
27
27
  },
28
- xo: (t, o) => {
28
+ $o: (t, o) => {
29
29
  o.setAttribute("role", "dialog"),
30
30
  o.setAttribute("aria-modal", "true"),
31
31
  o.setAttribute("aria-label", "Modal Message"),
32
32
  t && o.setAttribute("aria-labelledby", t);
33
33
  },
34
- wo: (t, o, e, s) => {
34
+ xo: (t, o, e, s) => {
35
35
  if (t.buttons && t.buttons.length > 0) {
36
36
  const a = document.createElement("div");
37
37
  (a.className = "ab-message-buttons"), e.appendChild(a);
@@ -60,7 +60,7 @@ const ce = {
60
60
  let l = e.text;
61
61
  "" === e.text && (l = " "),
62
62
  s.appendChild(document.createTextNode(l)),
63
- t.Oe() ||
63
+ t.Qe() ||
64
64
  ((s.style.backgroundColor = le(e.backgroundColor)),
65
65
  (s.style.color = le(e.textColor)),
66
66
  (s.style.borderColor = le(e.borderColor))),
@@ -47,7 +47,7 @@ export function newInAppMessageFromJson(e) {
47
47
  ((S = void 0), (q = void 0));
48
48
  const B = e.message_extras;
49
49
  let C;
50
- if (o === ModalMessage.Dt || o === InAppMessage.We.Io)
50
+ if (o === ModalMessage.Dt || o === InAppMessage.Ze.Io)
51
51
  C = new ModalMessage(
52
52
  s,
53
53
  n,
@@ -138,8 +138,8 @@ export function newInAppMessageFromJson(e) {
138
138
  else {
139
139
  if (
140
140
  o !== HtmlMessage.Dt &&
141
- o !== InAppMessage.We.Ve &&
142
- o !== InAppMessage.We.Ao
141
+ o !== InAppMessage.Ze.Ye &&
142
+ o !== InAppMessage.Ze.Ao
143
143
  )
144
144
  return void N.error("Ignoring message with unknown type " + o);
145
145
  {
@@ -148,7 +148,7 @@ export function newInAppMessageFromJson(e) {
148
148
  (C.trusted = e.trusted || !1);
149
149
  }
150
150
  }
151
- return (C.Qe = o), C;
151
+ return (C.We = o), C;
152
152
  }
153
153
  export function buttonsFromSerializedInAppMessage(e) {
154
154
  const o = [];
@@ -4,7 +4,7 @@ const se = {
4
4
  aa: null,
5
5
  l: !1,
6
6
  ea: () => (
7
- se.p(), se.aa || (se.aa = new ea(r.g(), r.P(), r.j(), r.tr())), se.aa
7
+ se.p(), se.aa || (se.aa = new ea(r.g(), r.P(), r.j(), r.ir())), se.aa
8
8
  ),
9
9
  p: () => {
10
10
  se.l || (r.h(se), (se.l = !0));