@braze/web-sdk 6.10.2 → 6.12.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 (109) hide show
  1. package/index.d.ts +61 -6
  2. package/package.json +1 -1
  3. package/shared-lib/encoding-utils.js +3 -3
  4. package/shared-lib/event-types.js +12 -12
  5. package/shared-lib/indexed-db-adapter.js +52 -52
  6. package/shared-lib/logger.js +7 -7
  7. package/shared-lib/supported-options.js +10 -10
  8. package/src/Core/logout.js +2 -2
  9. package/src/DUST/dust-config-store.js +89 -0
  10. package/src/DUST/dust-connection-core.js +7 -21
  11. package/src/DUST/dust-message-dedup.js +33 -0
  12. package/src/DUST/dust-provider.js +367 -397
  13. package/src/DUST/dust-tab-identity.js +30 -0
  14. package/src/DUST/index.js +7 -9
  15. package/src/DUST/subscribe-to-dust.js +5 -5
  16. package/src/FeatureFlags/feature-flag-factory.js +4 -4
  17. package/src/FeatureFlags/feature-flag.js +5 -5
  18. package/src/FeatureFlags/feature-flags-provider-factory.js +8 -1
  19. package/src/FeatureFlags/feature-flags-provider.js +74 -74
  20. package/src/FeatureFlags/get-all-feature-flags.js +2 -2
  21. package/src/FeatureFlags/get-feature-flag.js +2 -2
  22. package/src/FeatureFlags/log-feature-flag-impression.js +3 -3
  23. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +1 -1
  24. package/src/InAppMessage/constants.js +39 -47
  25. package/src/InAppMessage/defer-in-app-message.js +2 -2
  26. package/src/InAppMessage/display/get-animation-effect.js +1 -1
  27. package/src/InAppMessage/display/html-message-display-utils.js +4 -4
  28. package/src/InAppMessage/display/html-message-to-html.js +10 -10
  29. package/src/InAppMessage/display/in-app-message-to-html.js +68 -66
  30. package/src/InAppMessage/display/modal-utils.js +14 -14
  31. package/src/InAppMessage/get-deferred-in-app-message.js +2 -2
  32. package/src/InAppMessage/in-app-message-factory.js +6 -6
  33. package/src/InAppMessage/in-app-message-manager-factory.js +5 -5
  34. package/src/InAppMessage/in-app-message-manager.js +101 -80
  35. package/src/InAppMessage/log-in-app-message-button-click.js +2 -2
  36. package/src/InAppMessage/log-in-app-message-click.js +2 -2
  37. package/src/InAppMessage/log-in-app-message-html-click.js +4 -4
  38. package/src/InAppMessage/log-in-app-message-impression.js +3 -3
  39. package/src/InAppMessage/models/full-screen-message.js +25 -25
  40. package/src/InAppMessage/models/html-message.js +14 -14
  41. package/src/InAppMessage/models/in-app-message-button.js +4 -4
  42. package/src/InAppMessage/models/in-app-message.js +100 -98
  43. package/src/InAppMessage/models/modal-message.js +23 -23
  44. package/src/InAppMessage/models/slide-up-message.js +29 -29
  45. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  46. package/src/InAppMessage/subscribe-to-in-app-message.js +2 -2
  47. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +2 -2
  48. package/src/InAppMessage/ui/show-in-app-message.js +42 -40
  49. package/src/Push/index.js +1 -0
  50. package/src/Push/is-push-blocked.js +2 -2
  51. package/src/Push/is-push-permission-granted.js +2 -2
  52. package/src/Push/is-push-supported.js +2 -2
  53. package/src/Push/push-manager-factory.js +6 -6
  54. package/src/Push/push-manager.js +228 -185
  55. package/src/Push/register-push.js +9 -0
  56. package/src/Push/unregister-push-token-on-server.js +4 -4
  57. package/src/Push/utils/push-utils.js +16 -16
  58. package/src/User/user-manager.js +19 -19
  59. package/src/User/user.js +36 -36
  60. package/src/common/constants.js +1 -1
  61. package/src/common/content-cards-display.js +21 -21
  62. package/src/common/event-logger.js +2 -2
  63. package/src/l10n/l10n-manager-factory.js +7 -7
  64. package/src/l10n/l10n-manager.js +5 -5
  65. package/src/managers/auth-manager.js +1 -1
  66. package/src/managers/braze-instance.js +70 -66
  67. package/src/managers/device-manager.js +12 -12
  68. package/src/managers/network-manager.js +118 -118
  69. package/src/managers/server-config-manager.js +84 -84
  70. package/src/managers/session-manager.js +10 -10
  71. package/src/managers/storage-manager-factory.js +4 -4
  72. package/src/managers/storage-manager.js +138 -136
  73. package/src/managers/subscription-manager.js +1 -1
  74. package/src/managers/utils.js +1 -1
  75. package/src/models/backend-errors.js +5 -5
  76. package/src/models/braze-event.js +7 -7
  77. package/src/models/device.js +2 -2
  78. package/src/models/identifier.js +6 -6
  79. package/src/models/push-token.js +6 -6
  80. package/src/models/server-config.js +31 -31
  81. package/src/request-controller.js +91 -91
  82. package/src/triggers/models/filter.js +58 -58
  83. package/src/triggers/models/in-app-message-click-data.js +4 -4
  84. package/src/triggers/models/push-click-data.js +2 -2
  85. package/src/triggers/models/trigger-condition.js +35 -35
  86. package/src/triggers/models/trigger.js +37 -37
  87. package/src/triggers/triggers-provider-factory.js +3 -3
  88. package/src/triggers/triggers-provider.js +61 -53
  89. package/src/types.js +1 -1
  90. package/src/ui/js/attach-css.js +1 -1
  91. package/src/ui/js/feed-css.js +2 -2
  92. package/src/ui/js/iam-css.js +2 -2
  93. package/src/util/base-device-parser.js +1 -1
  94. package/src/util/braze-actions.js +4 -4
  95. package/src/util/browser-detector.js +13 -13
  96. package/src/util/client-hints-parser.js +4 -4
  97. package/src/util/component-utils.js +4 -4
  98. package/src/util/dom-utils.js +5 -5
  99. package/src/util/ecommerce-event-validation.js +77 -48
  100. package/src/util/key-codes.js +1 -1
  101. package/src/util/net.js +4 -4
  102. package/src/util/request-header-utils.js +20 -20
  103. package/src/util/string-utils.js +5 -0
  104. package/src/util/user-agent-parser.js +15 -15
  105. package/src/util/validation-utils.js +9 -9
  106. package/src/util/window-utils.js +2 -2
  107. package/src/DUST/dust-shared-worker-code.js +0 -2
  108. package/src/DUST/dust-shared-worker-impl.js +0 -234
  109. package/src/DUST/dust-worker-bridge.js +0 -151
@@ -5,25 +5,29 @@ import HtmlMessage from "./models/html-message.js";
5
5
  import InAppMessage from "./models/in-app-message.js";
6
6
  import InAppMessageButton from "./models/in-app-message-button.js";
7
7
  import v from "../common/event-logger.js";
8
- import { newInAppMessageFromJson as pt } from "./in-app-message-factory.js";
8
+ import { newInAppMessageFromJson as yt } from "./in-app-message-factory.js";
9
9
  import { randomInclusive as a } from "../util/math.js";
10
10
  import L from "../models/request-result.js";
11
11
  import { logger as b, EventTypes as p } from "../../shared-lib/index.js";
12
12
  import f from "../managers/subscription-manager.js";
13
- import gt from "../triggers/models/trigger.js";
13
+ import vt from "../triggers/models/trigger.js";
14
14
  import { BRAZE_ACTION_URI_REGEX as to } from "../util/validation-utils.js";
15
15
  import {
16
- containsPushPrimerBrazeAction as jt,
17
- containsUnknownBrazeAction as vt,
16
+ containsPushPrimerBrazeAction as It,
17
+ containsUnknownBrazeAction as At,
18
18
  getDecodedBrazeAction as eo,
19
- ineligibleBrazeActionURLErrorMessage as yt,
20
- INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as bt,
19
+ ineligibleBrazeActionURLErrorMessage as Mt,
20
+ INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES as Tt,
21
21
  } from "../util/braze-actions.js";
22
- import It from "../Push/utils/push-utils.js";
22
+ import Dt 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";
26
- import { IamClickAction as Le, IamServerTypes as dt } from "./constants.js";
26
+ import {
27
+ IamClickAction as ce,
28
+ IamServerTypes as gt,
29
+ IamTiming as kt,
30
+ } from "./constants.js";
27
31
  export default class ea {
28
32
  constructor(t, e, s, i) {
29
33
  (this.B = t),
@@ -36,11 +40,12 @@ export default class ea {
36
40
  (this.Ss = i),
37
41
  (this.In = new f()),
38
42
  r.S(this.In),
39
- (this.An = 1e3),
43
+ (this.Tn = 1e3),
40
44
  (this.Dn = 6e4),
45
+ (this.zn = null),
46
+ (this.Bn = null),
41
47
  (this._n = null),
42
- (this.qn = null),
43
- (this.xn = null);
48
+ (this.qn = {});
44
49
  }
45
50
  Pn() {
46
51
  return this.In;
@@ -49,15 +54,15 @@ export default class ea {
49
54
  return this.In.Ut(t);
50
55
  }
51
56
  Gn() {
52
- return this._n;
57
+ return this.zn;
53
58
  }
54
59
  Nn(t) {
55
- this._n = t;
60
+ this.zn = t;
56
61
  }
57
62
  Dt(t, e, s, i) {
58
63
  const r = new L();
59
64
  let n;
60
- if (e === p.Fn || t instanceof ControlMessage) {
65
+ if (e === p.On || t instanceof ControlMessage) {
61
66
  if (!t.js())
62
67
  return (
63
68
  b.info(
@@ -65,7 +70,14 @@ export default class ea {
65
70
  ),
66
71
  r
67
72
  );
68
- } else if (e === p.On || (t instanceof HtmlMessage && e === p.Xn)) {
73
+ if (this.Xn(t.triggerId))
74
+ return (
75
+ b.info(
76
+ "An impression for this in-app message trigger has already been logged. Ignoring analytics event.",
77
+ ),
78
+ r
79
+ );
80
+ } else if (e === p.Hn || (t instanceof HtmlMessage && e === p.Jn)) {
69
81
  if (!t.Yt(i))
70
82
  return (
71
83
  b.info(
@@ -78,7 +90,7 @@ export default class ea {
78
90
  (n =
79
91
  t instanceof ControlMessage
80
92
  ? { trigger_ids: [t.triggerId] }
81
- : this.Hn(t)),
93
+ : this.Kn(t)),
82
94
  null == n
83
95
  ? r
84
96
  : (t.messageExtras && (n.message_extras = t.messageExtras),
@@ -86,7 +98,7 @@ export default class ea {
86
98
  v.Dt(e, n))
87
99
  );
88
100
  }
89
- Jn(t, e) {
101
+ Ln(t, e) {
90
102
  const s = new L();
91
103
  if (!t.Yt())
92
104
  return (
@@ -95,125 +107,134 @@ export default class ea {
95
107
  ),
96
108
  s
97
109
  );
98
- const i = this.Hn(e);
110
+ const i = this.Kn(e);
99
111
  return null == i
100
112
  ? s
101
- : t.id === InAppMessageButton.Kn
113
+ : t.id === InAppMessageButton.Qn
102
114
  ? (b.info(
103
115
  "This in-app message button does not have a tracking id. Not logging event to Braze servers.",
104
116
  ),
105
117
  s)
106
- : (null != t.id && (i.bid = t.id), v.Dt(p.Xn, i));
118
+ : (null != t.id && (i.bid = t.id), v.Dt(p.Jn, i));
107
119
  }
108
- Ln(t) {
120
+ Un(t) {
109
121
  const e = t.messageFields;
110
122
  return (null != e && e.is_push_primer) || !1;
111
123
  }
112
- Qn(t) {
124
+ Vn(t) {
113
125
  if (!(t instanceof InAppMessage)) return;
114
126
  const e = (t) => {
115
127
  if (!t) return;
116
128
  const e = eo(t);
117
- if (vt(e)) return yt(bt.Un, "In-App Message");
118
- if (jt(e)) {
119
- const t = It.Vn();
120
- if (!t.Wn) return It.Yn(t.reason, "In-App Message");
129
+ if (At(e)) return Mt(Tt.Wn, "In-App Message");
130
+ if (It(e)) {
131
+ const t = Dt.Yn();
132
+ if (!t.Zn) return Dt.So(t.reason, "In-App Message");
121
133
  }
122
134
  };
123
- if (this.Ln(t)) {
124
- const t = It.Vn();
125
- if (!t.Wn) return It.Yn(t.reason, "In-App Message");
135
+ if (this.Un(t)) {
136
+ const t = Dt.Yn();
137
+ if (!t.Zn) return Dt.So(t.reason, "In-App Message");
126
138
  }
127
139
  const s = t.buttons || [];
128
140
  let i;
129
141
  for (const t of s)
130
142
  if (
131
- t.clickAction === Le.URI &&
143
+ t.clickAction === ce.URI &&
132
144
  t.uri &&
133
145
  to.test(t.uri) &&
134
146
  ((i = e(t.uri)), i)
135
147
  )
136
148
  return i;
137
- return t.clickAction === Le.URI && t.uri && to.test(t.uri)
149
+ return t.clickAction === ce.URI && t.uri && to.test(t.uri)
138
150
  ? e(t.uri)
139
151
  : void 0;
140
152
  }
141
- Zn(t, e) {
142
- e !== this.xn && this._o(), (this.qn = t), (this.xn = e);
153
+ Ro(t, e) {
154
+ e !== this._n && this._o(), (this.Bn = t), (this._n = e);
143
155
  }
144
156
  _o() {
145
- null != this.qn &&
146
- (clearTimeout(this.qn), (this.qn = null), (this.xn = null));
157
+ null != this.Bn &&
158
+ (clearTimeout(this.Bn), (this.Bn = null), (this._n = null));
147
159
  }
148
- Xo(t, e, s, i) {
160
+ Po(t, e, s, i) {
149
161
  const r = this.B;
150
162
  if (!r) return;
151
- this.xn && t.triggerId !== this.xn && (this._o(), h.Ji(this.j, h.it.Yo));
152
- const n = r.Zo(!1),
163
+ this._n && t.triggerId !== this._n && (this._o(), h.Ji(this.j, h.it.Xo));
164
+ const n = r.Qo(!1),
153
165
  o = r.Z(n);
154
166
  (o.template = { trigger_id: t.triggerId, trigger_event_type: e }),
155
- null != s && (o.template.data = s.ta());
156
- const u = r.tt(o, h.it.Yo);
167
+ null != s && (o.template.data = s.Uo());
168
+ const u = r.tt(o, h.it.Xo);
157
169
  r.et(
158
170
  o,
159
171
  (r = -1) => {
160
172
  const n = this.B;
161
173
  if (!n) return;
162
174
  const m = new Date().valueOf();
163
- h.nt(this.j, h.it.Yo, m),
175
+ h.nt(this.j, h.it.Xo, m),
164
176
  -1 !== r && u.push(["X-Braze-Req-Tokens-Remaining", r.toString()]);
165
- let c,
166
- p,
167
- f = !1;
177
+ let p,
178
+ c,
179
+ g = !1;
168
180
  l.ot({
169
181
  url: `${n.ht()}/template/`,
170
182
  data: o,
171
183
  headers: u,
172
184
  lt: (e) => {
173
185
  if (!n.ut(o, e, u))
174
- return void ("function" == typeof t.ia && t.ia());
186
+ return void ("function" == typeof t.Vo && t.Vo());
175
187
  if ((n.ct(), null == e || null == e.templated_message)) return;
176
188
  const s = e.templated_message;
177
- if (s.type !== gt.la.oa) return;
178
- const i = pt(s.data);
189
+ if (s.type !== vt.Yo.Wo) return;
190
+ const i = yt(s.data);
179
191
  if (null == i) return;
180
- const r = this.Qn(i);
192
+ const r = this.Vn(i);
181
193
  if (r)
182
- return b.error(r), void ("function" == typeof t.ia && t.ia());
183
- "function" == typeof t.ua && t.ua(i);
194
+ return b.error(r), void ("function" == typeof t.Vo && t.Vo());
195
+ "function" == typeof t.Zo && t.Zo(i);
184
196
  },
185
197
  error: (e) => {
186
- (f = !0),
187
- (c = e),
188
- (p = `getting user personalization for message ${t.triggerId}.`);
198
+ (g = !0),
199
+ (p = e),
200
+ (c = `getting user personalization for message ${t.triggerId}.`);
189
201
  },
190
202
  ft: (r, o) => {
191
- if (new Date().valueOf() - t.ma < t.ca) {
203
+ if (new Date().valueOf() - t.ta < t.ia) {
192
204
  let r = 0;
193
- if (f) {
194
- const e = Math.min(t.ca, this.Dn),
195
- s = this.An;
205
+ if (g) {
206
+ const e = Math.min(t.ia, this.Dn),
207
+ s = this.Tn;
196
208
  null == i && (i = s), (r = Math.min(e, a(s, 3 * i)));
197
209
  }
198
210
  n.yt(
199
211
  o,
200
212
  () => {
201
- this.Xo(t, e, s, r);
213
+ this.Po(t, e, s, r);
202
214
  },
203
- h.it.Yo,
204
- (e) => this.Zn(e, t.triggerId),
215
+ h.it.Xo,
216
+ (e) => this.Ro(e, t.triggerId),
205
217
  () => this._o(),
206
218
  r,
207
219
  );
208
220
  }
209
- f && n.dt(c, p);
221
+ g && n.dt(p, c);
210
222
  },
211
223
  });
212
224
  },
213
- h.it.Yo,
225
+ h.it.Xo,
214
226
  );
215
227
  }
216
- Hn(t) {
228
+ Xn(t) {
229
+ if (null == t || "" === t) return !1;
230
+ const e = new Date().valueOf(),
231
+ s = this.qn[t];
232
+ return (null != s && e - s < kt.aE) || ((this.qn[t] = e), !1);
233
+ }
234
+ oa() {
235
+ this.qn = {};
236
+ }
237
+ Kn(t) {
217
238
  if (null == t.triggerId)
218
239
  return (
219
240
  b.info(
@@ -224,40 +245,40 @@ export default class ea {
224
245
  const e = {};
225
246
  return null != t.triggerId && (e.trigger_ids = [t.triggerId]), e;
226
247
  }
227
- jn(t) {
248
+ An(t) {
228
249
  return (
229
250
  !!this.j &&
230
251
  !(
231
252
  !(t && t instanceof InAppMessage && t.constructor !== InAppMessage) ||
232
253
  t instanceof ControlMessage
233
254
  ) &&
234
- this.j.Pt(s.It.pa, t.qt())
255
+ this.j.Pt(s.It.la, t.qt())
235
256
  );
236
257
  }
237
258
  sa() {
238
259
  if (!this.j) return null;
239
- const t = this.j.St(s.It.pa);
260
+ const t = this.j.St(s.It.la);
240
261
  if (!t) return null;
241
262
  let e;
242
263
  switch (t.type) {
243
- case dt.cE:
244
- e = FullScreenMessage.ha(t);
264
+ case gt.oE:
265
+ e = FullScreenMessage.ua(t);
245
266
  break;
246
- case dt.iE:
247
- case dt.PE:
248
- case dt.nE:
249
- e = HtmlMessage.ha(t);
267
+ case gt.ME:
268
+ case gt.CE:
269
+ case gt.DE:
270
+ e = HtmlMessage.ua(t);
250
271
  break;
251
- case dt.aE:
252
- case dt.UE:
253
- e = ModalMessage.ha(t);
272
+ case gt.tE:
273
+ case gt.eE:
274
+ e = ModalMessage.ua(t);
254
275
  break;
255
- case dt.sE:
256
- e = SlideUpMessage.ha(t);
276
+ case gt.RE:
277
+ e = SlideUpMessage.ua(t);
257
278
  }
258
- return e && this.fa(), e;
279
+ return e && this.ma(), e;
259
280
  }
260
- fa() {
261
- this.j && this.j.Vt(s.It.pa);
281
+ ma() {
282
+ this.j && this.j.Vt(s.It.la);
262
283
  }
263
284
  }
@@ -2,7 +2,7 @@ import r from "../managers/braze-instance.js";
2
2
  import { IamStrings as mr } from "./constants.js";
3
3
  import InAppMessage from "./models/in-app-message.js";
4
4
  import InAppMessageButton from "./models/in-app-message-button.js";
5
- import je from "./in-app-message-manager-factory.js";
5
+ import se from "./in-app-message-manager-factory.js";
6
6
  import { logger as b } from "../../shared-lib/index.js";
7
7
  import ot from "../triggers/models/trigger-events.js";
8
8
  import { TriggersProviderFactory as rt } from "../triggers/triggers-provider-factory.js";
@@ -12,7 +12,7 @@ export function logInAppMessageButtonClick(t, o) {
12
12
  if (!(t instanceof InAppMessageButton))
13
13
  return b.error("button must be an InAppMessageButton object"), !1;
14
14
  if (!(o instanceof InAppMessage)) return b.error(mr.EE), !1;
15
- const s = je.ra().Jn(t, o);
15
+ const s = se.ra().Ln(t, o);
16
16
  if (s.lt)
17
17
  for (let r = 0; r < s.Ce.length; r++)
18
18
  rt.o().Ee(
@@ -1,6 +1,6 @@
1
1
  import r from "../managers/braze-instance.js";
2
2
  import InAppMessage from "./models/in-app-message.js";
3
- import je from "./in-app-message-manager-factory.js";
3
+ import se from "./in-app-message-manager-factory.js";
4
4
  import { logInAppMessageImpression } from "./log-in-app-message-impression.js";
5
5
  import { IamStrings as mr } from "./constants.js";
6
6
  import { logger as b, EventTypes as p } from "../../shared-lib/index.js";
@@ -9,7 +9,7 @@ import { TriggersProviderFactory as rt } from "../triggers/triggers-provider-fac
9
9
  export function logInAppMessageClick(s) {
10
10
  if (!r.rr()) return !1;
11
11
  if (!(s instanceof InAppMessage)) return b.error(mr.EE), !1;
12
- const e = je.ra().Dt(s, p.On);
12
+ const e = se.ra().Dt(s, p.Hn);
13
13
  if (e) {
14
14
  s.sm() || logInAppMessageImpression(s);
15
15
  for (let r = 0; r < e.Ce.length; r++)
@@ -1,6 +1,6 @@
1
1
  import r from "../managers/braze-instance.js";
2
2
  import HtmlMessage from "./models/html-message.js";
3
- import je from "./in-app-message-manager-factory.js";
3
+ import se from "./in-app-message-manager-factory.js";
4
4
  import { logger as b, EventTypes as p } from "../../shared-lib/index.js";
5
5
  import ot from "../triggers/models/trigger-events.js";
6
6
  import { TriggersProviderFactory as rt } from "../triggers/triggers-provider-factory.js";
@@ -13,9 +13,9 @@ export function logInAppMessageHtmlClick(e, t, s) {
13
13
  ),
14
14
  !1
15
15
  );
16
- let o = p.On;
17
- null != t && (o = p.Xn);
18
- const m = je.ra().Dt(e, o, t, s);
16
+ let o = p.Hn;
17
+ null != t && (o = p.Jn);
18
+ const m = se.ra().Dt(e, o, t, s);
19
19
  if (m.lt)
20
20
  for (let r = 0; r < m.Ce.length; r++)
21
21
  rt.o().Ee(ot.rm, [e.triggerId, t], m.Ce[r]);
@@ -1,13 +1,13 @@
1
1
  import r from "../managers/braze-instance.js";
2
2
  import ControlMessage from "./models/control-message.js";
3
3
  import InAppMessage from "./models/in-app-message.js";
4
- import je from "./in-app-message-manager-factory.js";
4
+ import se from "./in-app-message-manager-factory.js";
5
5
  import { IamStrings as mr } from "./constants.js";
6
6
  import { logger as b, EventTypes as p } from "../../shared-lib/index.js";
7
7
  export function logInAppMessageImpression(s) {
8
8
  if (!r.rr()) return !1;
9
9
  if (!(s instanceof InAppMessage || s instanceof ControlMessage))
10
10
  return b.error(mr.EE), !1;
11
- const o = s instanceof ControlMessage ? p.om : p.Fn;
12
- return je.ra().Dt(s, o).lt;
11
+ const o = s instanceof ControlMessage ? p.om : p.On;
12
+ return se.ra().Dt(s, o).lt;
13
13
  }
@@ -1,10 +1,10 @@
1
1
  import {
2
- IamCropType as Me,
2
+ IamCropType as de,
3
3
  IamDismissType as pr,
4
- IamOrientation as De,
4
+ IamOrientation as be,
5
5
  IamSerializationKeys as cr,
6
- IamServerTypes as dt,
7
- IamTextAlignment as Fe,
6
+ IamServerTypes as gt,
7
+ IamTextAlignment as pe,
8
8
  } from "../constants.js";
9
9
  import { buttonsFromSerializedInAppMessage as ur } from "../in-app-message-factory.js";
10
10
  import InAppMessage from "./in-app-message.js";
@@ -43,7 +43,7 @@ export default class FullScreenMessage extends InAppMessage {
43
43
  D,
44
44
  ) {
45
45
  (p = p || pr.MANUAL),
46
- (k = k || De.PORTRAIT),
46
+ (k = k || be.PORTRAIT),
47
47
  super(
48
48
  r,
49
49
  s,
@@ -70,7 +70,7 @@ export default class FullScreenMessage extends InAppMessage {
70
70
  w,
71
71
  y,
72
72
  S,
73
- (b = b || Me.CENTER_CROP),
73
+ (b = b || de.CENTER_CROP),
74
74
  k,
75
75
  q,
76
76
  A,
@@ -78,42 +78,42 @@ export default class FullScreenMessage extends InAppMessage {
78
78
  C,
79
79
  D,
80
80
  ),
81
- (this.Go = Fe.CENTER);
81
+ (this.qo = pe.CENTER);
82
82
  }
83
83
  qt() {
84
- return super.qt(dt.cE);
84
+ return super.qt(gt.oE);
85
85
  }
86
- static ha(r) {
86
+ static ua(r) {
87
87
  return new FullScreenMessage(
88
- r[cr.rE],
89
- r[cr.mE],
88
+ r[cr.UE],
89
+ r[cr.cE],
90
90
  r[cr.Is],
91
- r[cr.FE],
92
- r[cr.HE],
91
+ r[cr.PE],
92
+ r[cr.iE],
93
93
  r[cr.URI],
94
+ r[cr.pE],
95
+ r[cr.rE],
96
+ r[cr.mE],
97
+ r[cr.GE],
98
+ r[cr.Bs],
94
99
  r[cr.xE],
100
+ r[cr.HE],
101
+ r[cr.FE],
95
102
  r[cr.BE],
96
- r[cr.lE],
97
103
  r[cr.bE],
98
- r[cr.Bs],
99
104
  r[cr.gE],
105
+ r[cr.lE],
100
106
  r[cr.YE],
107
+ r[cr.hE],
101
108
  r[cr.KE],
109
+ r[cr.WE],
102
110
  r[cr.XE],
111
+ ur(r[cr.yE]),
103
112
  r[cr.dE],
104
- r[cr.hE],
105
- r[cr.yE],
106
113
  r[cr.uE],
107
- r[cr.WE],
108
114
  r[cr.fE],
109
- r[cr.jE],
110
- r[cr.kE],
111
- ur(r[cr.vE]),
112
- r[cr.wE],
113
- r[cr.zE],
114
- r[cr.VE],
115
115
  r[cr.CSS],
116
- r[cr.JE],
116
+ r[cr.jE],
117
117
  r[cr.LANGUAGE],
118
118
  r[cr.Ns],
119
119
  );
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  IamDismissType as pr,
3
3
  IamSerializationKeys as cr,
4
- IamServerTypes as dt,
4
+ IamServerTypes as gt,
5
5
  } from "../constants.js";
6
6
  import InAppMessage from "./in-app-message.js";
7
7
  export default class HtmlMessage extends InAppMessage {
@@ -47,30 +47,30 @@ export default class HtmlMessage extends InAppMessage {
47
47
  return !1;
48
48
  }
49
49
  Yt(i) {
50
- if (this.ko === dt.iE) {
50
+ if (this.Oo === gt.ME) {
51
51
  if (this.rd) return !1;
52
52
  this.rd = !0;
53
53
  }
54
54
  return this.ti.A(i), !0;
55
55
  }
56
56
  qt() {
57
- const i = super.qt(dt.iE);
58
- return (i[cr.qE] = this.messageFields), i;
57
+ const i = super.qt(gt.ME);
58
+ return (i[cr.wE] = this.messageFields), i;
59
59
  }
60
- static ha(i) {
60
+ static ua(i) {
61
61
  return new HtmlMessage(
62
- i[cr.rE],
62
+ i[cr.UE],
63
63
  i[cr.Is],
64
- i[cr.FE],
65
- i[cr.BE],
64
+ i[cr.PE],
65
+ i[cr.rE],
66
+ i[cr.mE],
66
67
  i[cr.lE],
67
- i[cr.yE],
68
- i[cr.uE],
69
- i[cr.kE],
70
- i[cr.VE],
68
+ i[cr.YE],
69
+ i[cr.XE],
70
+ i[cr.fE],
71
71
  i[cr.CSS],
72
- i[cr.qE],
73
- i[cr.JE],
72
+ i[cr.wE],
73
+ i[cr.jE],
74
74
  );
75
75
  }
76
76
  }
@@ -1,5 +1,5 @@
1
1
  import f from "../../managers/subscription-manager.js";
2
- import { IamColors as ss, IamClickAction as Le } from "../constants.js";
2
+ import { IamColors as ss, IamClickAction as ce } from "../constants.js";
3
3
  export default class InAppMessageButton {
4
4
  constructor(s, t, i, r, h, e, n) {
5
5
  (this.text = s),
@@ -13,9 +13,9 @@ export default class InAppMessageButton {
13
13
  (this.backgroundColor = t || ss._E),
14
14
  (this.textColor = i || ss.AE),
15
15
  (this.borderColor = r || this.backgroundColor),
16
- (this.clickAction = h || Le.NONE),
16
+ (this.clickAction = h || ce.NONE),
17
17
  (this.uri = e),
18
- null == n && (n = InAppMessageButton.Kn),
18
+ null == n && (n = InAppMessageButton.Qn),
19
19
  (this.id = n),
20
20
  (this.rd = !1),
21
21
  (this.ti = new f());
@@ -44,4 +44,4 @@ export default class InAppMessageButton {
44
44
  );
45
45
  }
46
46
  }
47
- InAppMessageButton.Kn = -1;
47
+ InAppMessageButton.Qn = -1;