@braze/web-sdk 6.3.0 → 6.4.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 (132) hide show
  1. package/index.d.ts +35 -3
  2. package/package.json +1 -1
  3. package/shared-lib/encoding-utils.js +1 -1
  4. package/shared-lib/event-types.js +23 -23
  5. package/shared-lib/guid.js +25 -6
  6. package/shared-lib/indexed-db-adapter.js +7 -7
  7. package/shared-lib/logger.js +2 -2
  8. package/shared-lib/supported-options.js +22 -21
  9. package/src/Banner/display/banner-to-html.js +2 -2
  10. package/src/Banner/display/detect-banner-impressions.js +7 -7
  11. package/src/Banner/index.js +2 -0
  12. package/src/Banner/request-banners-refresh.js +6 -6
  13. package/src/Banner/ui/insert-banner.js +4 -4
  14. package/src/Card/card-manager-factory.js +5 -5
  15. package/src/Card/card-manager.js +4 -4
  16. package/src/Card/display/card-display.js +7 -7
  17. package/src/Card/log-card-dismissal.js +3 -3
  18. package/src/Card/log-content-card-click.js +3 -3
  19. package/src/Card/log-content-card-impressions.js +6 -6
  20. package/src/Card/models/card.js +7 -7
  21. package/src/Card/util/card-factory.js +6 -6
  22. package/src/ContentCards/content-cards-provider-factory.js +14 -10
  23. package/src/ContentCards/content-cards-provider.js +28 -28
  24. package/src/ContentCards/content-cards.js +4 -4
  25. package/src/ContentCards/get-cached-content-cards.js +2 -2
  26. package/src/ContentCards/request-content-cards-refresh.js +2 -2
  27. package/src/ContentCards/subscribe-to-content-cards-updates.js +3 -3
  28. package/src/ContentCards/ui/show-content-cards.js +8 -8
  29. package/src/Core/add-sdk-metadata.js +2 -2
  30. package/src/Core/change-user.js +5 -5
  31. package/src/Core/disable-sdk.js +3 -3
  32. package/src/Core/enable-sdk.js +3 -3
  33. package/src/Core/get-user.js +1 -1
  34. package/src/Core/is-disabled.js +1 -1
  35. package/src/Core/log-custom-event.js +9 -9
  36. package/src/Core/log-purchase.js +7 -7
  37. package/src/Core/open-session.js +11 -11
  38. package/src/Core/set-sdk-authentication-signature.js +2 -2
  39. package/src/Core/wipe-data.js +5 -5
  40. package/src/DUST/dust-provider-factory.js +20 -0
  41. package/src/DUST/dust-provider.js +288 -0
  42. package/src/DUST/index.js +3 -0
  43. package/src/DUST/subscribe-to-dust.js +24 -0
  44. package/src/DUST/types.js +1 -0
  45. package/src/FeatureFlags/feature-flags-provider-factory.js +9 -9
  46. package/src/FeatureFlags/feature-flags-provider.js +38 -38
  47. package/src/FeatureFlags/get-all-feature-flags.js +3 -3
  48. package/src/FeatureFlags/get-feature-flag.js +3 -3
  49. package/src/FeatureFlags/log-feature-flag-impression.js +5 -5
  50. package/src/FeatureFlags/refresh-feature-flags.js +5 -5
  51. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +3 -3
  52. package/src/InAppMessage/defer-in-app-message.js +1 -1
  53. package/src/InAppMessage/display/html-message-to-html.js +5 -5
  54. package/src/InAppMessage/display/in-app-message-to-html.js +22 -22
  55. package/src/InAppMessage/display/modal-utils.js +5 -5
  56. package/src/InAppMessage/get-deferred-in-app-message.js +1 -1
  57. package/src/InAppMessage/in-app-message-factory.js +4 -4
  58. package/src/InAppMessage/in-app-message-manager.js +80 -80
  59. package/src/InAppMessage/log-in-app-message-button-click.js +5 -5
  60. package/src/InAppMessage/log-in-app-message-click.js +5 -5
  61. package/src/InAppMessage/log-in-app-message-html-click.js +5 -5
  62. package/src/InAppMessage/log-in-app-message-impression.js +1 -1
  63. package/src/InAppMessage/models/control-message.js +1 -1
  64. package/src/InAppMessage/models/full-screen-message.js +12 -12
  65. package/src/InAppMessage/models/html-message.js +14 -14
  66. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  67. package/src/InAppMessage/models/in-app-message.js +119 -121
  68. package/src/InAppMessage/models/modal-message.js +12 -12
  69. package/src/InAppMessage/models/slide-up-message.js +21 -21
  70. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  71. package/src/InAppMessage/subscribe-to-in-app-message.js +1 -1
  72. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +3 -3
  73. package/src/InAppMessage/ui/remove-all-visible-in-app-messages.js +18 -0
  74. package/src/InAppMessage/ui/show-in-app-message.js +24 -24
  75. package/src/Push/is-push-blocked.js +2 -2
  76. package/src/Push/is-push-permission-granted.js +2 -2
  77. package/src/Push/is-push-supported.js +2 -2
  78. package/src/Push/push-manager-factory.js +8 -8
  79. package/src/Push/push-manager.js +90 -90
  80. package/src/Push/utils/push-utils.js +17 -17
  81. package/src/User/user-manager.js +12 -12
  82. package/src/User/user.js +48 -48
  83. package/src/common/constants.js +1 -0
  84. package/src/common/content-cards-display.js +20 -20
  85. package/src/common/event-logger.js +4 -4
  86. package/src/common/properties-base.js +16 -16
  87. package/src/l10n/l10n-manager-factory.js +2 -2
  88. package/src/l10n/l10n-manager.js +1 -1
  89. package/src/managers/auth-manager.js +29 -29
  90. package/src/managers/braze-instance.js +141 -133
  91. package/src/managers/device-manager.js +18 -18
  92. package/src/managers/network-manager.js +139 -139
  93. package/src/managers/server-config-manager.js +99 -82
  94. package/src/managers/session-manager.js +32 -32
  95. package/src/managers/storage-manager-factory.js +8 -8
  96. package/src/managers/storage-manager.js +76 -74
  97. package/src/managers/subscription-manager.js +10 -10
  98. package/src/models/backend-errors.js +5 -5
  99. package/src/models/braze-event.js +9 -9
  100. package/src/models/device.js +2 -2
  101. package/src/models/identifier.js +12 -12
  102. package/src/models/push-token.js +12 -12
  103. package/src/models/request-result.js +1 -1
  104. package/src/models/server-config.js +38 -34
  105. package/src/request-controller.js +136 -134
  106. package/src/triggers/models/custom-event-data.js +4 -4
  107. package/src/triggers/models/custom-event-property-data.js +5 -5
  108. package/src/triggers/models/filter-set.js +8 -8
  109. package/src/triggers/models/filter.js +30 -30
  110. package/src/triggers/models/in-app-message-click-data.js +1 -1
  111. package/src/triggers/models/purchase-data.js +1 -1
  112. package/src/triggers/models/purchase-property-data.js +2 -2
  113. package/src/triggers/models/push-click-data.js +1 -1
  114. package/src/triggers/models/trigger-condition.js +36 -36
  115. package/src/triggers/models/trigger-events.js +2 -2
  116. package/src/triggers/models/trigger.js +15 -15
  117. package/src/triggers/triggers-provider-factory.js +3 -3
  118. package/src/triggers/triggers-provider.js +25 -25
  119. package/src/ui/js/attach-css.js +3 -3
  120. package/src/ui/js/load-font-awesome.js +2 -2
  121. package/src/util/base-device-parser.js +3 -3
  122. package/src/util/braze-actions.js +3 -3
  123. package/src/util/browser-detector.js +13 -13
  124. package/src/util/client-hints-parser.js +6 -6
  125. package/src/util/component-utils.js +1 -1
  126. package/src/util/dom-utils.js +10 -10
  127. package/src/util/key-codes.js +1 -1
  128. package/src/util/net.js +1 -1
  129. package/src/util/request-header-utils.js +22 -22
  130. package/src/util/user-agent-parser.js +14 -14
  131. package/src/util/validation-utils.js +14 -13
  132. package/src/util/window-utils.js +1 -1
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  addPassiveEventListener as J,
3
3
  buildSvg as oe,
4
- detectSwipe as K,
5
- DIRECTIONS as L,
4
+ detectSwipe as H,
5
+ DIRECTIONS as R,
6
6
  } from "../../util/dom-utils.js";
7
7
  import { createCloseButton as T } from "../../util/component-utils.js";
8
8
  import { isTransparent as te, toRgba as ae } from "../../util/color-utils.js";
@@ -12,13 +12,13 @@ import InAppMessage from "../models/in-app-message.js";
12
12
  import ModalMessage from "../models/modal-message.js";
13
13
  import SlideUpMessage from "../models/slide-up-message.js";
14
14
  import { logInAppMessageClick } from "../log-in-app-message-click.js";
15
- import { _handleBrazeAction as O } from "../../Core/handle-braze-action.js";
15
+ import { _handleBrazeAction as K } from "../../Core/handle-braze-action.js";
16
16
  import ct from "./html-message-to-html.js";
17
17
  import ne from "./modal-utils.js";
18
- import { logger as E, Guid as P } from "../../../shared-lib/index.js";
18
+ import { logger as E, Guid as L } from "../../../shared-lib/index.js";
19
19
  import { KeyCodes as ie } from "../../util/key-codes.js";
20
20
  export default function le(e, o, t, a, n, i, s = document.body, m = "ltr") {
21
- if (((e.Qe = document.activeElement), e instanceof HtmlMessage))
21
+ if (((e.Ve = document.activeElement), e instanceof HtmlMessage))
22
22
  return ct(e, o, a, n, i);
23
23
  const l = (function (e, o, t, a, n, i = document.body, s = "ltr") {
24
24
  let m = null;
@@ -26,7 +26,7 @@ export default function le(e, o, t, a, n, i, s = document.body, m = "ltr") {
26
26
  (l.dir = s),
27
27
  (l.className = "ab-in-app-message ab-start-hidden ab-background"),
28
28
  n && (l.style.zIndex = (n + 1).toString()),
29
- e.Ve() &&
29
+ e.We() &&
30
30
  ((l.className += " ab-modal-interactions"),
31
31
  l.setAttribute("tabindex", "-1")),
32
32
  e.Oe() ||
@@ -39,7 +39,7 @@ export default function le(e, o, t, a, n, i, s = document.body, m = "ltr") {
39
39
  document.querySelectorAll(".ab-iam-img-loading").length > 0
40
40
  ? t(
41
41
  `Cannot show in-app message ${e.message} because another message is being shown.`,
42
- InAppMessage.Ye.We,
42
+ InAppMessage.Ze.Ye,
43
43
  )
44
44
  : o(l));
45
45
  },
@@ -69,7 +69,7 @@ export default function le(e, o, t, a, n, i, s = document.body, m = "ltr") {
69
69
  e.ll(l, () => {
70
70
  logInAppMessageClick(e),
71
71
  e.clickAction === InAppMessage.ClickAction.URI &&
72
- O(
72
+ K(
73
73
  e.uri || "",
74
74
  a || e.openTarget === InAppMessage.OpenTarget.BLANK,
75
75
  o,
@@ -80,7 +80,7 @@ export default function le(e, o, t, a, n, i, s = document.body, m = "ltr") {
80
80
  );
81
81
  (l.onclick = o),
82
82
  l.addEventListener("keydown", (e) => {
83
- if (e.keyCode === ie.Ze || e.keyCode === ie.lo) return o(e);
83
+ if (e.keyCode === ie.lo || e.keyCode === ie.do) return o(e);
84
84
  });
85
85
  }
86
86
  const d = T(
@@ -96,7 +96,7 @@ export default function le(e, o, t, a, n, i, s = document.body, m = "ltr") {
96
96
  (u.className = "ab-message-text"),
97
97
  (u.dir = s),
98
98
  u.setAttribute("role", "article");
99
- const b = (e.messageAlignment || e.do).toLowerCase();
99
+ const b = (e.messageAlignment || e.bo).toLowerCase();
100
100
  u.className += " " + b + "-aligned";
101
101
  let f = !1;
102
102
  const p = document.createElement("div");
@@ -104,7 +104,7 @@ export default function le(e, o, t, a, n, i, s = document.body, m = "ltr") {
104
104
  const o = document.createElement("img");
105
105
  if (
106
106
  (o.setAttribute("src", e.imageUrl),
107
- e.bo(o),
107
+ e.po(o),
108
108
  0 === document.querySelectorAll(".ab-iam-img-loading").length)
109
109
  ) {
110
110
  f = !0;
@@ -145,7 +145,7 @@ export default function le(e, o, t, a, n, i, s = document.body, m = "ltr") {
145
145
  }
146
146
  if ((J(u, "touchstart"), e.header && e.header.length > 0)) {
147
147
  const o = document.createElement("h1");
148
- (o.className = "ab-message-header"), (e.po = P.oe()), (o.id = e.po);
148
+ (o.className = "ab-message-header"), (e.ho = L.oe()), (o.id = e.ho);
149
149
  const t = (
150
150
  e.headerAlignment || InAppMessage.TextAlignment.CENTER
151
151
  ).toLowerCase();
@@ -154,15 +154,15 @@ export default function le(e, o, t, a, n, i, s = document.body, m = "ltr") {
154
154
  o.appendChild(document.createTextNode(e.header)),
155
155
  u.appendChild(o);
156
156
  }
157
- const g = e.ho();
158
- return u.appendChild(g), l.appendChild(u), f || c(), (e.Pe = l), l;
157
+ const g = e.jo();
158
+ return u.appendChild(g), l.appendChild(u), f || c(), (e.Qe = l), l;
159
159
  })(e, o, t, a, n, s, m);
160
160
  if (e instanceof FullScreenMessage || e instanceof ModalMessage) {
161
161
  const o = e instanceof FullScreenMessage ? "ab-fullscreen" : "ab-modal";
162
162
  (l.className += ` ${o} ab-centered`),
163
- ne.jo(e, l, a),
164
- ne.wo(l),
165
- ne.vo(e.po, l);
163
+ ne.wo(e, l, a),
164
+ ne.vo(l),
165
+ ne.ko(e.ho, l);
166
166
  } else if (e instanceof SlideUpMessage) {
167
167
  (l.className += " ab-slideup"),
168
168
  l.setAttribute("tabindex", "0"),
@@ -177,18 +177,18 @@ export default function le(e, o, t, a, n, i, s = document.body, m = "ltr") {
177
177
  t.setAttribute("class", `ab-chevron ${m}`), o.appendChild(t);
178
178
  }
179
179
  let t, a;
180
- K(l, L.Zt, (e) => {
180
+ H(l, R.Zt, (e) => {
181
181
  (l.className += " ab-swiped-left"),
182
182
  null != o && null != o.onclick && o.onclick(e);
183
183
  }),
184
- K(l, L.ae, (e) => {
184
+ H(l, R.ae, (e) => {
185
185
  (l.className += " ab-swiped-right"),
186
186
  null != o && null != o.onclick && o.onclick(e);
187
187
  }),
188
188
  e.slideFrom === InAppMessage.SlideFrom.TOP
189
- ? ((t = L.ko), (a = " ab-swiped-up"))
190
- : ((t = L.xo), (a = " ab-swiped-down")),
191
- K(l, t, (e) => {
189
+ ? ((t = R.xo), (a = " ab-swiped-up"))
190
+ : ((t = R.Co), (a = " ab-swiped-down")),
191
+ H(l, t, (e) => {
192
192
  (l.className += a), null != o && null != o.onclick && o.onclick(e);
193
193
  });
194
194
  }
@@ -1,11 +1,11 @@
1
1
  import InAppMessage from "../models/in-app-message.js";
2
- import { _handleBrazeAction as O } from "../../Core/handle-braze-action.js";
2
+ import { _handleBrazeAction as K } from "../../Core/handle-braze-action.js";
3
3
  import { logInAppMessageButtonClick } from "../log-in-app-message-button-click.js";
4
4
  import { toRgba as ae } from "../../util/color-utils.js";
5
5
  import { addPassiveEventListener as J } from "../../util/dom-utils.js";
6
6
  import { KeyCodes as ie } from "../../util/key-codes.js";
7
7
  const ne = {
8
- wo: (t) => {
8
+ vo: (t) => {
9
9
  const o = t.querySelectorAll(".ab-close-button, .ab-message-button");
10
10
  let e;
11
11
  for (let t = 0; t < o.length; t++) (e = o[t]), (e.tabIndex = 0);
@@ -23,14 +23,14 @@ const ne = {
23
23
  });
24
24
  }
25
25
  },
26
- vo: (t, o) => {
26
+ ko: (t, o) => {
27
27
  o.setAttribute("role", "dialog"),
28
28
  o.setAttribute("aria-modal", "true"),
29
29
  t
30
30
  ? o.setAttribute("aria-labelledby", t)
31
31
  : o.setAttribute("aria-label", "Modal Message");
32
32
  },
33
- jo: (t, o, e) => {
33
+ wo: (t, o, e) => {
34
34
  if (t.buttons && t.buttons.length > 0) {
35
35
  const s = document.createElement("div");
36
36
  (s.className = "ab-message-buttons"), o.appendChild(s);
@@ -40,7 +40,7 @@ const ne = {
40
40
  t.ll(o, () => {
41
41
  logInAppMessageButtonClick(s, t),
42
42
  s.clickAction === InAppMessage.ClickAction.URI &&
43
- O(
43
+ K(
44
44
  s.uri || "",
45
45
  e || t.openTarget === InAppMessage.OpenTarget.BLANK,
46
46
  a,
@@ -1,5 +1,5 @@
1
1
  import r from "../managers/braze-instance.js";
2
2
  import se from "./in-app-message-manager-factory.js";
3
3
  export function getDeferredInAppMessage() {
4
- if (r.rr()) return se.ea().zr();
4
+ if (r.rr()) return se.ea().Ar();
5
5
  }
@@ -49,7 +49,7 @@ export function newInAppMessageFromJson(e) {
49
49
  C = e.language,
50
50
  D = e.image_alt;
51
51
  let G;
52
- if (o === ModalMessage.es || o === InAppMessage.Ke.Io)
52
+ if (o === ModalMessage.es || o === InAppMessage.Le.Io)
53
53
  G = new ModalMessage(
54
54
  s,
55
55
  n,
@@ -146,8 +146,8 @@ export function newInAppMessageFromJson(e) {
146
146
  else {
147
147
  if (
148
148
  o !== HtmlMessage.es &&
149
- o !== InAppMessage.Ke.Je &&
150
- o !== InAppMessage.Ke.Ao
149
+ o !== InAppMessage.Le.Ke &&
150
+ o !== InAppMessage.Le.Ao
151
151
  )
152
152
  return void E.error("Ignoring message with unknown type " + o);
153
153
  {
@@ -156,7 +156,7 @@ export function newInAppMessageFromJson(e) {
156
156
  (G.trusted = e.trusted || !1);
157
157
  }
158
158
  }
159
- return (G.He = o), G;
159
+ return (G.Je = o), G;
160
160
  }
161
161
  export function buttonsFromSerializedInAppMessage(e) {
162
162
  const o = [];
@@ -7,19 +7,19 @@ import InAppMessageButton from "./models/in-app-message-button.js";
7
7
  import c from "../common/event-logger.js";
8
8
  import { newInAppMessageFromJson as ut } from "./in-app-message-factory.js";
9
9
  import { randomInclusive as l } from "../util/math.js";
10
- import H from "../models/request-result.js";
10
+ import G from "../models/request-result.js";
11
11
  import { logger as E, EventTypes as m } from "../../shared-lib/index.js";
12
12
  import u from "../managers/subscription-manager.js";
13
13
  import pt from "../triggers/models/trigger.js";
14
14
  import { BRAZE_ACTION_URI_REGEX as to } from "../util/validation-utils.js";
15
15
  import {
16
16
  containsPushPrimerBrazeAction as ft,
17
- containsUnknownBrazeAction as dt,
17
+ containsUnknownBrazeAction as gt,
18
18
  getDecodedBrazeAction as eo,
19
- ineligibleBrazeActionURLErrorMessage as jt,
20
- INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as vt,
19
+ ineligibleBrazeActionURLErrorMessage as dt,
20
+ INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as jt,
21
21
  } from "../util/braze-actions.js";
22
- import yt from "../Push/utils/push-utils.js";
22
+ import vt from "../Push/utils/push-utils.js";
23
23
  import h from "../util/request-header-utils.js";
24
24
  import { STORAGE_KEYS as s } from "../managers/storage-manager.js";
25
25
  import { FullScreenMessage, ModalMessage, SlideUpMessage } from "./index.js";
@@ -33,30 +33,30 @@ export default class ea {
33
33
  (this.C = e),
34
34
  (this.j = s),
35
35
  (this.Cs = i),
36
- (this.yi = new u()),
37
- r.q(this.yi),
38
- (this.Mi = 1e3),
39
- (this.ki = 6e4),
40
- (this.zi = null),
41
- (this.Bi = null),
42
- (this.Ri = null);
36
+ (this.Mr = new u()),
37
+ r.q(this.Mr),
38
+ (this.Br = 1e3),
39
+ (this._r = 6e4),
40
+ (this.qr = null),
41
+ (this.Er = null),
42
+ (this.Gr = null);
43
43
  }
44
- _i() {
45
- return this.yi;
44
+ Nr() {
45
+ return this.Mr;
46
46
  }
47
- qi(t) {
48
- return this.yi.wt(t);
47
+ Or(t) {
48
+ return this.Mr.wt(t);
49
49
  }
50
- xi() {
51
- return this.zi;
50
+ Xr() {
51
+ return this.qr;
52
52
  }
53
- Pi(t) {
54
- this.zi = t;
53
+ Hr(t) {
54
+ this.qr = t;
55
55
  }
56
56
  rt(t, e, s, i) {
57
- const r = new H();
57
+ const r = new G();
58
58
  let n;
59
- if (e === m.Gi || t instanceof ControlMessage) {
59
+ if (e === m.Jr || t instanceof ControlMessage) {
60
60
  if (!t.Qt())
61
61
  return (
62
62
  E.info(
@@ -64,7 +64,7 @@ export default class ea {
64
64
  ),
65
65
  r
66
66
  );
67
- } else if (e === m.$i || (t instanceof HtmlMessage && e === m.Fi)) {
67
+ } else if (e === m.Kr || (t instanceof HtmlMessage && e === m.Lr)) {
68
68
  if (!t.$t(i))
69
69
  return (
70
70
  E.info(
@@ -77,7 +77,7 @@ export default class ea {
77
77
  (n =
78
78
  t instanceof ControlMessage
79
79
  ? { trigger_ids: [t.triggerId] }
80
- : this.Oi(t)),
80
+ : this.Qr(t)),
81
81
  null == n
82
82
  ? r
83
83
  : (t.messageExtras && (n.message_extras = t.messageExtras),
@@ -85,8 +85,8 @@ export default class ea {
85
85
  c.rt(e, n))
86
86
  );
87
87
  }
88
- Xi(t, e) {
89
- const s = new H();
88
+ Ur(t, e) {
89
+ const s = new G();
90
90
  if (!t.$t())
91
91
  return (
92
92
  E.info(
@@ -94,34 +94,34 @@ export default class ea {
94
94
  ),
95
95
  s
96
96
  );
97
- const i = this.Oi(e);
97
+ const i = this.Qr(e);
98
98
  return null == i
99
99
  ? s
100
- : t.id === InAppMessageButton.Hi
100
+ : t.id === InAppMessageButton.Vr
101
101
  ? (E.info(
102
102
  "This in-app message button does not have a tracking id. Not logging event to Braze servers.",
103
103
  ),
104
104
  s)
105
- : (null != t.id && (i.bid = t.id), c.rt(m.Fi, i));
105
+ : (null != t.id && (i.bid = t.id), c.rt(m.Lr, i));
106
106
  }
107
- Ji(t) {
107
+ Wr(t) {
108
108
  const e = t.messageFields;
109
109
  return (null != e && e.is_push_primer) || !1;
110
110
  }
111
- Ki(t) {
111
+ Yr(t) {
112
112
  if (!(t instanceof InAppMessage)) return;
113
113
  const e = (t) => {
114
114
  if (!t) return;
115
115
  const e = eo(t);
116
- if (dt(e)) return jt(vt.Li, "In-App Message");
116
+ if (gt(e)) return dt(jt.Zr, "In-App Message");
117
117
  if (ft(e)) {
118
- const t = yt.Qi();
119
- if (!t.Ui) return yt.Vi(t.reason, "In-App Message");
118
+ const t = vt.en();
119
+ if (!t.sn) return vt.on(t.reason, "In-App Message");
120
120
  }
121
121
  };
122
- if (this.Ji(t)) {
123
- const t = yt.Qi();
124
- if (!t.Ui) return yt.Vi(t.reason, "In-App Message");
122
+ if (this.Wr(t)) {
123
+ const t = vt.en();
124
+ if (!t.sn) return vt.on(t.reason, "In-App Message");
125
125
  }
126
126
  const s = t.buttons || [];
127
127
  let i;
@@ -139,29 +139,29 @@ export default class ea {
139
139
  ? e(t.uri)
140
140
  : void 0;
141
141
  }
142
- Wi(t, e) {
143
- e !== this.Ri && this.Yi(), (this.Bi = t), (this.Ri = e);
142
+ an(t, e) {
143
+ e !== this.Gr && this.ln(), (this.Er = t), (this.Gr = e);
144
144
  }
145
- Yi() {
146
- null != this.Bi &&
147
- (clearTimeout(this.Bi), (this.Bi = null), (this.Ri = null));
145
+ ln() {
146
+ null != this.Er &&
147
+ (clearTimeout(this.Er), (this.Er = null), (this.Gr = null));
148
148
  }
149
- Zi(t, e, s, i) {
149
+ un(t, e, s, i) {
150
150
  const r = this.B;
151
151
  if (!r) return;
152
- this.Ri && t.triggerId !== this.Ri && (this.Yi(), h.Ci(this.j, h.H.Ir));
153
- const n = r.Mr(!1),
152
+ this.Gr && t.triggerId !== this.Gr && (this.ln(), h.fi(this.j, h.H.mn));
153
+ const n = r.cn(!1),
154
154
  o = r.$(n);
155
155
  (o.template = { trigger_id: t.triggerId, trigger_event_type: e }),
156
- null != s && (o.template.data = s.Ar());
157
- const u = r.A(o, h.H.Ir);
156
+ null != s && (o.template.data = s.pn());
157
+ const u = r.A(o, h.H.mn);
158
158
  r.J(
159
159
  o,
160
160
  (r = -1) => {
161
161
  const n = this.B;
162
162
  if (!n) return;
163
163
  const m = new Date().valueOf();
164
- h.K(this.j, h.H.Ir, m),
164
+ h.K(this.j, h.H.mn, m),
165
165
  -1 !== r && u.push(["X-Braze-Req-Tokens-Remaining", r.toString()]);
166
166
  let c,
167
167
  p,
@@ -172,16 +172,16 @@ export default class ea {
172
172
  headers: u,
173
173
  W: (e) => {
174
174
  if (!n.Y(o, e, u))
175
- return void ("function" == typeof t.Tr && t.Tr());
175
+ return void ("function" == typeof t.hn && t.hn());
176
176
  if ((n.Z(), null == e || null == e.templated_message)) return;
177
177
  const s = e.templated_message;
178
- if (s.type !== pt._r.Br) return;
178
+ if (s.type !== pt.gn.fn) return;
179
179
  const i = ut(s.data);
180
180
  if (null == i) return;
181
- const r = this.Ki(i);
181
+ const r = this.Yr(i);
182
182
  if (r)
183
- return E.error(r), void ("function" == typeof t.Tr && t.Tr());
184
- "function" == typeof t.qr && t.qr(i);
183
+ return E.error(r), void ("function" == typeof t.hn && t.hn());
184
+ "function" == typeof t.dn && t.dn(i);
185
185
  },
186
186
  error: (e) => {
187
187
  (f = !0),
@@ -189,21 +189,21 @@ export default class ea {
189
189
  (p = `getting user personalization for message ${t.triggerId}.`);
190
190
  },
191
191
  tt: (r, o) => {
192
- if (new Date().valueOf() - t.Er < t.Gr) {
192
+ if (new Date().valueOf() - t.jn < t.vn) {
193
193
  let r = 0;
194
194
  if (f) {
195
- const e = Math.min(t.Gr, this.ki),
196
- s = this.Mi;
195
+ const e = Math.min(t.vn, this._r),
196
+ s = this.Br;
197
197
  null == i && (i = s), (r = Math.min(e, l(s, 3 * i)));
198
198
  }
199
199
  n.st(
200
200
  o,
201
201
  () => {
202
- this.Zi(t, e, s, r);
202
+ this.un(t, e, s, r);
203
203
  },
204
- h.H.Ir,
205
- (e) => this.Wi(e, t.triggerId),
206
- () => this.Yi(),
204
+ h.H.mn,
205
+ (e) => this.an(e, t.triggerId),
206
+ () => this.ln(),
207
207
  r,
208
208
  );
209
209
  }
@@ -211,10 +211,10 @@ export default class ea {
211
211
  },
212
212
  });
213
213
  },
214
- h.H.Ir,
214
+ h.H.mn,
215
215
  );
216
216
  }
217
- Oi(t) {
217
+ Qr(t) {
218
218
  if (null == t.triggerId)
219
219
  return (
220
220
  E.info(
@@ -225,40 +225,40 @@ export default class ea {
225
225
  const e = {};
226
226
  return null != t.triggerId && (e.trigger_ids = [t.triggerId]), e;
227
227
  }
228
- Ee(t) {
228
+ Ge(t) {
229
229
  return (
230
230
  !!this.j &&
231
231
  !(
232
232
  !(t && t instanceof InAppMessage && t.constructor !== InAppMessage) ||
233
233
  t instanceof ControlMessage
234
234
  ) &&
235
- this.j.ft(s.ct.Nr, t.dt())
235
+ this.j.ft(s.ct.yn, t.dt())
236
236
  );
237
237
  }
238
- zr() {
238
+ Ar() {
239
239
  if (!this.j) return null;
240
- const t = this.j.lt(s.ct.Nr);
240
+ const t = this.j.lt(s.ct.yn);
241
241
  if (!t) return null;
242
242
  let e;
243
243
  switch (t.type) {
244
- case InAppMessage.Ke.Or:
245
- e = FullScreenMessage.Xr(t);
244
+ case InAppMessage.Le.bn:
245
+ e = FullScreenMessage.In(t);
246
246
  break;
247
- case InAppMessage.Ke.Hr:
248
- case InAppMessage.Ke.Je:
249
- case InAppMessage.Ke.Ao:
250
- e = HtmlMessage.Xr(t);
247
+ case InAppMessage.Le.Mn:
248
+ case InAppMessage.Le.Ke:
249
+ case InAppMessage.Le.Ao:
250
+ e = HtmlMessage.In(t);
251
251
  break;
252
- case InAppMessage.Ke.Jr:
253
- case InAppMessage.Ke.Io:
254
- e = ModalMessage.Xr(t);
252
+ case InAppMessage.Le.An:
253
+ case InAppMessage.Le.Io:
254
+ e = ModalMessage.In(t);
255
255
  break;
256
- case InAppMessage.Ke.Kr:
257
- e = SlideUpMessage.Xr(t);
256
+ case InAppMessage.Le.Tn:
257
+ e = SlideUpMessage.In(t);
258
258
  }
259
- return e && this.Lr(), e;
259
+ return e && this.kn(), e;
260
260
  }
261
- Lr() {
262
- this.j && this.j.Nt(s.ct.Nr);
261
+ kn() {
262
+ this.j && this.j.Nt(s.ct.yn);
263
263
  }
264
264
  }
@@ -4,19 +4,19 @@ import InAppMessage from "./models/in-app-message.js";
4
4
  import InAppMessageButton from "./models/in-app-message-button.js";
5
5
  import se from "./in-app-message-manager-factory.js";
6
6
  import { logger as E } from "../../shared-lib/index.js";
7
- import ot from "../triggers/models/trigger-events.js";
8
- import { TriggersProviderFactory as rt } from "../triggers/triggers-provider-factory.js";
7
+ import et from "../triggers/models/trigger-events.js";
8
+ import { TriggersProviderFactory as ot } from "../triggers/triggers-provider-factory.js";
9
9
  export function logInAppMessageButtonClick(o, t) {
10
10
  var e;
11
11
  if (!r.rr()) return !1;
12
12
  if (!(o instanceof InAppMessageButton))
13
13
  return E.error("button must be an InAppMessageButton object"), !1;
14
14
  if (!(t instanceof InAppMessage)) return E.error(sr), !1;
15
- const s = se.ea().Xi(o, t);
15
+ const s = se.ea().Ur(o, t);
16
16
  if (s.W)
17
17
  for (let r = 0; r < s.ue.length; r++)
18
- rt.o().ve(
19
- ot.Qr,
18
+ ot.o().ve(
19
+ et.Bo,
20
20
  [
21
21
  t.triggerId,
22
22
  null === (e = o.id) || void 0 === e ? void 0 : e.toString(),
@@ -4,16 +4,16 @@ import se from "./in-app-message-manager-factory.js";
4
4
  import { logInAppMessageImpression } from "./log-in-app-message-impression.js";
5
5
  import { MUST_BE_IN_APP_MESSAGE_WARNING as sr } from "../common/constants.js";
6
6
  import { logger as E, EventTypes as m } from "../../shared-lib/index.js";
7
- import ot from "../triggers/models/trigger-events.js";
8
- import { TriggersProviderFactory as rt } from "../triggers/triggers-provider-factory.js";
7
+ import et from "../triggers/models/trigger-events.js";
8
+ import { TriggersProviderFactory as ot } from "../triggers/triggers-provider-factory.js";
9
9
  export function logInAppMessageClick(o) {
10
10
  if (!r.rr()) return !1;
11
11
  if (!(o instanceof InAppMessage)) return E.error(sr), !1;
12
- const s = se.ea().rt(o, m.$i);
12
+ const s = se.ea().rt(o, m.Kr);
13
13
  if (s) {
14
- o.Ur() || logInAppMessageImpression(o);
14
+ o.zo() || logInAppMessageImpression(o);
15
15
  for (let r = 0; r < s.ue.length; r++)
16
- rt.o().ve(ot.Qr, [o.triggerId], s.ue[r]);
16
+ ot.o().ve(et.Bo, [o.triggerId], s.ue[r]);
17
17
  }
18
18
  return s.W;
19
19
  }
@@ -2,8 +2,8 @@ import r from "../managers/braze-instance.js";
2
2
  import HtmlMessage from "./models/html-message.js";
3
3
  import se from "./in-app-message-manager-factory.js";
4
4
  import { logger as E, EventTypes as m } from "../../shared-lib/index.js";
5
- import ot from "../triggers/models/trigger-events.js";
6
- import { TriggersProviderFactory as rt } from "../triggers/triggers-provider-factory.js";
5
+ import et from "../triggers/models/trigger-events.js";
6
+ import { TriggersProviderFactory as ot } from "../triggers/triggers-provider-factory.js";
7
7
  export function logInAppMessageHtmlClick(e, t, s) {
8
8
  if (!r.rr()) return !1;
9
9
  if (!(e instanceof HtmlMessage))
@@ -13,11 +13,11 @@ export function logInAppMessageHtmlClick(e, t, s) {
13
13
  ),
14
14
  !1
15
15
  );
16
- let o = m.$i;
17
- null != t && (o = m.Fi);
16
+ let o = m.Kr;
17
+ null != t && (o = m.Lr);
18
18
  const i = se.ea().rt(e, o, t, s);
19
19
  if (i.W)
20
20
  for (let r = 0; r < i.ue.length; r++)
21
- rt.o().ve(ot.Qr, [e.triggerId, t], i.ue[r]);
21
+ ot.o().ve(et.Bo, [e.triggerId, t], i.ue[r]);
22
22
  return i.W;
23
23
  }
@@ -8,6 +8,6 @@ export function logInAppMessageImpression(o) {
8
8
  if (!r.rr()) return !1;
9
9
  if (!(o instanceof InAppMessage || o instanceof ControlMessage))
10
10
  return E.error(sr), !1;
11
- const s = o instanceof ControlMessage ? m.zo : m.Gi;
11
+ const s = o instanceof ControlMessage ? m.Mo : m.Jr;
12
12
  return se.ea().rt(o, s).W;
13
13
  }
@@ -14,7 +14,7 @@ export default class ControlMessage {
14
14
  Qt() {
15
15
  return !this.kt && ((this.kt = !0), !0);
16
16
  }
17
- Ur() {
17
+ zo() {
18
18
  return this.kt;
19
19
  }
20
20
  }
@@ -70,28 +70,24 @@ export default class FullScreenMessage extends InAppMessage {
70
70
  C,
71
71
  D,
72
72
  ),
73
- (this.do = InAppMessage.TextAlignment.CENTER);
73
+ (this.bo = InAppMessage.TextAlignment.CENTER);
74
74
  }
75
75
  dt() {
76
76
  return super.dt(FullScreenMessage.es);
77
77
  }
78
- static Xr(e) {
78
+ static In(e) {
79
79
  return new FullScreenMessage(
80
- e[InAppMessage.ss.Vr],
81
- e[InAppMessage.ss.Wr],
82
- e[InAppMessage.ss.xs],
83
- e[InAppMessage.ss.Yr],
84
- e[InAppMessage.ss.Zr],
85
- e[InAppMessage.ss.URI],
86
80
  e[InAppMessage.ss.ra],
87
81
  e[InAppMessage.ss.sa],
82
+ e[InAppMessage.ss.xs],
88
83
  e[InAppMessage.ss.ta],
89
84
  e[InAppMessage.ss.ia],
90
- e[InAppMessage.ss.ns],
85
+ e[InAppMessage.ss.URI],
91
86
  e[InAppMessage.ss.oa],
92
87
  e[InAppMessage.ss.pa],
93
88
  e[InAppMessage.ss.ma],
94
89
  e[InAppMessage.ss.na],
90
+ e[InAppMessage.ss.ns],
95
91
  e[InAppMessage.ss.ua],
96
92
  e[InAppMessage.ss.ca],
97
93
  e[InAppMessage.ss.fa],
@@ -100,15 +96,19 @@ export default class FullScreenMessage extends InAppMessage {
100
96
  e[InAppMessage.ss.ga],
101
97
  e[InAppMessage.ss.ja],
102
98
  e[InAppMessage.ss.xa],
103
- re(e[InAppMessage.ss.za]),
99
+ e[InAppMessage.ss.za],
104
100
  e[InAppMessage.ss.ha],
105
101
  e[InAppMessage.ss.va],
106
102
  e[InAppMessage.ss.wa],
103
+ re(e[InAppMessage.ss.ya]),
104
+ e[InAppMessage.ss.Sa],
105
+ e[InAppMessage.ss.ba],
106
+ e[InAppMessage.ss.ka],
107
107
  e[InAppMessage.ss.CSS],
108
- e[InAppMessage.ss.ya],
108
+ e[InAppMessage.ss.qa],
109
109
  e[InAppMessage.ss.LANGUAGE],
110
110
  e[InAppMessage.ss.ks],
111
111
  );
112
112
  }
113
113
  }
114
- FullScreenMessage.es = InAppMessage.Ke.Or;
114
+ FullScreenMessage.es = InAppMessage.Le.bn;