@braze/web-sdk 6.3.1 → 6.5.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 (159) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +38 -5
  3. package/package.json +1 -1
  4. package/shared-lib/encoding-utils.js +3 -3
  5. package/shared-lib/event-types.js +30 -30
  6. package/shared-lib/guid.js +1 -1
  7. package/shared-lib/indexed-db-adapter.js +60 -60
  8. package/shared-lib/logger.js +7 -7
  9. package/shared-lib/supported-options.js +24 -23
  10. package/src/Banner/banner-provider.js +95 -81
  11. package/src/Banner/banner.js +9 -9
  12. package/src/Banner/constants.js +4 -0
  13. package/src/Banner/display/banner-to-html.js +3 -3
  14. package/src/Banner/display/destroy-banner-html.js +3 -3
  15. package/src/Banner/display/detect-banner-impressions.js +16 -16
  16. package/src/Banner/get-all-banners.js +4 -4
  17. package/src/Banner/get-banner.js +5 -4
  18. package/src/Banner/index.js +2 -0
  19. package/src/Banner/log-banner-click.js +2 -2
  20. package/src/Banner/log-banner-impressions.js +6 -6
  21. package/src/Banner/request-banners-refresh.js +18 -20
  22. package/src/Banner/subscribe-to-banners-updates.js +5 -5
  23. package/src/Banner/ui/insert-banner.js +17 -14
  24. package/src/Card/card-manager-factory.js +6 -6
  25. package/src/Card/card-manager.js +28 -28
  26. package/src/Card/constants.js +1 -0
  27. package/src/Card/display/card-display.js +7 -7
  28. package/src/Card/log-card-dismissal.js +3 -3
  29. package/src/Card/log-content-card-click.js +3 -3
  30. package/src/Card/log-content-card-impressions.js +6 -6
  31. package/src/Card/models/captioned-image.js +3 -3
  32. package/src/Card/models/card.js +9 -9
  33. package/src/Card/models/classic-card.js +3 -3
  34. package/src/Card/models/control-card.js +3 -3
  35. package/src/Card/models/image-only.js +3 -3
  36. package/src/ContentCards/content-cards-provider-factory.js +6 -2
  37. package/src/ContentCards/content-cards-provider.js +101 -87
  38. package/src/ContentCards/content-cards.js +4 -4
  39. package/src/ContentCards/request-content-cards-refresh.js +1 -1
  40. package/src/ContentCards/subscribe-to-content-cards-updates.js +4 -4
  41. package/src/ContentCards/ui/show-content-cards.js +5 -5
  42. package/src/Core/add-sdk-metadata.js +2 -2
  43. package/src/Core/change-user.js +1 -1
  44. package/src/Core/disable-sdk.js +5 -5
  45. package/src/Core/enable-sdk.js +3 -3
  46. package/src/Core/get-device-id.js +2 -2
  47. package/src/Core/get-user.js +1 -1
  48. package/src/Core/handle-braze-action.js +3 -3
  49. package/src/Core/is-disabled.js +1 -1
  50. package/src/Core/log-custom-event.js +7 -7
  51. package/src/Core/log-purchase.js +4 -4
  52. package/src/Core/open-session.js +6 -6
  53. package/src/Core/wipe-data.js +3 -3
  54. package/src/DUST/dust-connection-core.js +23 -0
  55. package/src/DUST/dust-provider-factory.js +22 -0
  56. package/src/DUST/dust-provider.js +520 -0
  57. package/src/DUST/dust-shared-worker-code.js +2 -0
  58. package/src/DUST/dust-shared-worker-impl.js +240 -0
  59. package/src/DUST/dust-worker-bridge.js +136 -0
  60. package/src/DUST/index.js +13 -0
  61. package/src/DUST/subscribe-to-dust.js +24 -0
  62. package/src/DUST/types.js +1 -0
  63. package/src/FeatureFlags/feature-flag-factory.js +8 -8
  64. package/src/FeatureFlags/feature-flag.js +6 -6
  65. package/src/FeatureFlags/feature-flags-provider-factory.js +9 -9
  66. package/src/FeatureFlags/feature-flags-provider.js +98 -84
  67. package/src/FeatureFlags/get-all-feature-flags.js +3 -3
  68. package/src/FeatureFlags/get-feature-flag.js +3 -3
  69. package/src/FeatureFlags/log-feature-flag-impression.js +7 -7
  70. package/src/FeatureFlags/refresh-feature-flags.js +5 -5
  71. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +4 -4
  72. package/src/InAppMessage/constants.js +4 -0
  73. package/src/InAppMessage/defer-in-app-message.js +2 -2
  74. package/src/InAppMessage/display/get-animation-effect.js +1 -1
  75. package/src/InAppMessage/display/html-message-to-html.js +6 -6
  76. package/src/InAppMessage/display/in-app-message-to-html.js +34 -34
  77. package/src/InAppMessage/display/modal-utils.js +14 -14
  78. package/src/InAppMessage/get-deferred-in-app-message.js +2 -2
  79. package/src/InAppMessage/in-app-message-factory.js +4 -4
  80. package/src/InAppMessage/in-app-message-manager-factory.js +7 -7
  81. package/src/InAppMessage/in-app-message-manager.js +98 -98
  82. package/src/InAppMessage/log-in-app-message-button-click.js +12 -12
  83. package/src/InAppMessage/log-in-app-message-click.js +11 -11
  84. package/src/InAppMessage/log-in-app-message-html-click.js +9 -9
  85. package/src/InAppMessage/log-in-app-message-impression.js +8 -8
  86. package/src/InAppMessage/models/control-message.js +5 -5
  87. package/src/InAppMessage/models/full-screen-message.js +21 -21
  88. package/src/InAppMessage/models/html-message.js +18 -18
  89. package/src/InAppMessage/models/in-app-message-button.js +7 -7
  90. package/src/InAppMessage/models/in-app-message.js +145 -145
  91. package/src/InAppMessage/models/modal-message.js +21 -21
  92. package/src/InAppMessage/models/slide-up-message.js +27 -27
  93. package/src/InAppMessage/models/templated-in-app-message.js +8 -8
  94. package/src/InAppMessage/subscribe-to-in-app-message.js +2 -2
  95. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +5 -5
  96. package/src/InAppMessage/ui/remove-all-visible-in-app-messages.js +18 -0
  97. package/src/InAppMessage/ui/show-in-app-message.js +36 -36
  98. package/src/Push/is-push-blocked.js +2 -2
  99. package/src/Push/is-push-permission-granted.js +2 -2
  100. package/src/Push/is-push-supported.js +2 -2
  101. package/src/Push/push-manager-factory.js +15 -15
  102. package/src/Push/push-manager.js +97 -97
  103. package/src/Push/request-push-permission.js +1 -1
  104. package/src/Push/unregister-push.js +1 -1
  105. package/src/Push/utils/push-utils.js +17 -17
  106. package/src/User/user-manager.js +24 -24
  107. package/src/User/user.js +55 -55
  108. package/src/common/constants.js +8 -10
  109. package/src/common/content-cards-display.js +40 -40
  110. package/src/common/event-logger.js +8 -8
  111. package/src/common/properties-base.js +16 -16
  112. package/src/l10n/l10n-manager-factory.js +11 -11
  113. package/src/l10n/l10n-manager.js +2 -2
  114. package/src/managers/auth-manager.js +30 -30
  115. package/src/managers/braze-instance.js +170 -162
  116. package/src/managers/device-manager.js +24 -24
  117. package/src/managers/network-manager.js +149 -149
  118. package/src/managers/server-config-manager.js +140 -95
  119. package/src/managers/session-manager.js +39 -39
  120. package/src/managers/storage-manager-factory.js +10 -10
  121. package/src/managers/storage-manager.js +145 -141
  122. package/src/managers/subscription-manager.js +11 -11
  123. package/src/managers/utils.js +1 -1
  124. package/src/models/backend-errors.js +5 -5
  125. package/src/models/braze-event.js +11 -11
  126. package/src/models/device.js +3 -3
  127. package/src/models/identifier.js +16 -16
  128. package/src/models/push-token.js +13 -13
  129. package/src/models/request-result.js +3 -3
  130. package/src/models/server-config.js +45 -37
  131. package/src/request-controller.js +163 -158
  132. package/src/triggers/models/custom-event-data.js +5 -5
  133. package/src/triggers/models/custom-event-property-data.js +6 -6
  134. package/src/triggers/models/filter-set.js +10 -10
  135. package/src/triggers/models/filter.js +27 -27
  136. package/src/triggers/models/in-app-message-click-data.js +13 -13
  137. package/src/triggers/models/purchase-data.js +2 -2
  138. package/src/triggers/models/purchase-property-data.js +6 -6
  139. package/src/triggers/models/push-click-data.js +6 -6
  140. package/src/triggers/models/trigger-condition.js +47 -47
  141. package/src/triggers/models/trigger-events.js +3 -3
  142. package/src/triggers/models/trigger.js +36 -36
  143. package/src/triggers/triggers-provider-factory.js +5 -5
  144. package/src/triggers/triggers-provider.js +63 -63
  145. package/src/ui/js/attach-css.js +3 -3
  146. package/src/ui/js/load-font-awesome.js +2 -2
  147. package/src/util/base-device-parser.js +9 -9
  148. package/src/util/braze-actions.js +5 -5
  149. package/src/util/browser-detector.js +37 -37
  150. package/src/util/client-hints-parser.js +11 -11
  151. package/src/util/component-utils.js +5 -5
  152. package/src/util/dom-utils.js +13 -13
  153. package/src/util/html-display-utils.js +7 -7
  154. package/src/util/key-codes.js +1 -1
  155. package/src/util/net.js +5 -5
  156. package/src/util/request-header-utils.js +27 -27
  157. package/src/util/user-agent-parser.js +21 -21
  158. package/src/util/validation-utils.js +17 -17
  159. package/src/util/window-utils.js +3 -3
@@ -1,4 +1,4 @@
1
- import { buttonsFromSerializedInAppMessage as re } from "../in-app-message-factory.js";
1
+ import { buttonsFromSerializedInAppMessage as ye } from "../in-app-message-factory.js";
2
2
  import InAppMessage from "./in-app-message.js";
3
3
  export default class FullScreenMessage extends InAppMessage {
4
4
  constructor(
@@ -70,45 +70,45 @@ export default class FullScreenMessage extends InAppMessage {
70
70
  C,
71
71
  D,
72
72
  ),
73
- (this.do = InAppMessage.TextAlignment.CENTER);
73
+ (this.Io = InAppMessage.TextAlignment.CENTER);
74
74
  }
75
- dt() {
76
- return super.dt(FullScreenMessage.es);
75
+ gt() {
76
+ return super.gt(FullScreenMessage.es);
77
77
  }
78
- static Xr(e) {
78
+ static Zn(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
- e[InAppMessage.ss.ra],
87
- e[InAppMessage.ss.sa],
88
- e[InAppMessage.ss.ta],
89
- e[InAppMessage.ss.ia],
90
- e[InAppMessage.ss.ns],
91
- e[InAppMessage.ss.oa],
92
80
  e[InAppMessage.ss.pa],
93
81
  e[InAppMessage.ss.ma],
94
- e[InAppMessage.ss.na],
82
+ e[InAppMessage.ss.xs],
95
83
  e[InAppMessage.ss.ua],
96
84
  e[InAppMessage.ss.ca],
85
+ e[InAppMessage.ss.URI],
97
86
  e[InAppMessage.ss.fa],
98
87
  e[InAppMessage.ss.da],
99
88
  e[InAppMessage.ss.la],
100
89
  e[InAppMessage.ss.ga],
90
+ e[InAppMessage.ss.ns],
101
91
  e[InAppMessage.ss.ja],
102
92
  e[InAppMessage.ss.xa],
103
- re(e[InAppMessage.ss.za]),
93
+ e[InAppMessage.ss.za],
104
94
  e[InAppMessage.ss.ha],
105
95
  e[InAppMessage.ss.va],
106
96
  e[InAppMessage.ss.wa],
107
- e[InAppMessage.ss.CSS],
108
97
  e[InAppMessage.ss.ya],
98
+ e[InAppMessage.ss.Sa],
99
+ e[InAppMessage.ss.ba],
100
+ e[InAppMessage.ss.ka],
101
+ e[InAppMessage.ss.qa],
102
+ e[InAppMessage.ss.Aa],
103
+ ye(e[InAppMessage.ss.Ba]),
104
+ e[InAppMessage.ss.Ca],
105
+ e[InAppMessage.ss.Da],
106
+ e[InAppMessage.ss.Ea],
107
+ e[InAppMessage.ss.CSS],
108
+ e[InAppMessage.ss.Fa],
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.Eo.Yn;
@@ -38,35 +38,35 @@ export default class HtmlMessage extends InAppMessage {
38
38
  (this.messageFields = a),
39
39
  (this.messageFields = a);
40
40
  }
41
- Bo() {
41
+ od() {
42
42
  return !1;
43
43
  }
44
44
  $t(i) {
45
- if (this.He === InAppMessage.Ke.Hr) {
46
- if (this.Co) return !1;
47
- this.Co = !0;
45
+ if (this.ko === InAppMessage.Eo.Zo) {
46
+ if (this.dd) return !1;
47
+ this.dd = !0;
48
48
  }
49
49
  return this.ti.L(i), !0;
50
50
  }
51
- dt() {
52
- const i = super.dt(HtmlMessage.es);
53
- return (i[InAppMessage.ss.Po] = this.messageFields), i;
51
+ gt() {
52
+ const i = super.gt(HtmlMessage.es);
53
+ return (i[InAppMessage.ss.ed] = this.messageFields), i;
54
54
  }
55
- static Xr(i) {
55
+ static Zn(i) {
56
56
  return new HtmlMessage(
57
- i[InAppMessage.ss.Vr],
57
+ i[InAppMessage.ss.pa],
58
58
  i[InAppMessage.ss.xs],
59
- i[InAppMessage.ss.Yr],
60
- i[InAppMessage.ss.sa],
61
- i[InAppMessage.ss.ta],
62
- i[InAppMessage.ss.fa],
59
+ i[InAppMessage.ss.ua],
63
60
  i[InAppMessage.ss.da],
64
- i[InAppMessage.ss.xa],
65
- i[InAppMessage.ss.wa],
66
- i[InAppMessage.ss.CSS],
67
- i[InAppMessage.ss.Po],
61
+ i[InAppMessage.ss.la],
68
62
  i[InAppMessage.ss.ya],
63
+ i[InAppMessage.ss.Sa],
64
+ i[InAppMessage.ss.Aa],
65
+ i[InAppMessage.ss.Ea],
66
+ i[InAppMessage.ss.CSS],
67
+ i[InAppMessage.ss.ed],
68
+ i[InAppMessage.ss.Fa],
69
69
  );
70
70
  }
71
71
  }
72
- HtmlMessage.es = InAppMessage.Ke.Hr;
72
+ HtmlMessage.es = InAppMessage.Eo.Zo;
@@ -1,5 +1,5 @@
1
1
  import InAppMessage from "./in-app-message.js";
2
- import u from "../../managers/subscription-manager.js";
2
+ import m from "../../managers/subscription-manager.js";
3
3
  export default class InAppMessageButton {
4
4
  constructor(s, t, i, r, h, e, n) {
5
5
  (this.text = s),
@@ -15,13 +15,13 @@ export default class InAppMessageButton {
15
15
  (this.borderColor = r || this.backgroundColor),
16
16
  (this.clickAction = h || InAppMessage.ClickAction.NONE),
17
17
  (this.uri = e),
18
- null == n && (n = InAppMessageButton.Hi),
18
+ null == n && (n = InAppMessageButton._n),
19
19
  (this.id = n),
20
- (this.Co = !1),
21
- (this.ti = new u());
20
+ (this.dd = !1),
21
+ (this.ti = new m());
22
22
  }
23
23
  subscribeToClickedEvent(s) {
24
- return this.ti.wt(s);
24
+ return this.ti.Rt(s);
25
25
  }
26
26
  removeSubscription(s) {
27
27
  this.ti.removeSubscription(s);
@@ -30,7 +30,7 @@ export default class InAppMessageButton {
30
30
  this.ti.removeAllSubscriptions();
31
31
  }
32
32
  $t() {
33
- return !this.Co && ((this.Co = !0), this.ti.L(), !0);
33
+ return !this.dd && ((this.dd = !0), this.ti.L(), !0);
34
34
  }
35
35
  static fromJson(s) {
36
36
  return new InAppMessageButton(
@@ -44,4 +44,4 @@ export default class InAppMessageButton {
44
44
  );
45
45
  }
46
46
  }
47
- InAppMessageButton.Hi = -1;
47
+ InAppMessageButton._n = -1;
@@ -1,12 +1,13 @@
1
- import r, { OPTIONS as z } from "../../managers/braze-instance.js";
1
+ import r, { OPTIONS as D } from "../../managers/braze-instance.js";
2
2
  import ro from "../../util/browser-detector.js";
3
3
  import {
4
4
  clickElement as Et,
5
5
  supportsPassive as Tt,
6
6
  } from "../../util/dom-utils.js";
7
- import { KeyCodes as ie } from "../../util/key-codes.js";
8
- import u from "../../managers/subscription-manager.js";
7
+ import { KeyCodes as Ce } from "../../util/key-codes.js";
8
+ import m from "../../managers/subscription-manager.js";
9
9
  import { isIFrame as At } from "../utils/in-app-message-utils.js";
10
+ import { IamStrings as sr } from "../constants.js";
10
11
  export default class InAppMessage {
11
12
  constructor(
12
13
  t,
@@ -20,6 +21,7 @@ export default class InAppMessage {
20
21
  o,
21
22
  r,
22
23
  l,
24
+ u,
23
25
  a,
24
26
  A,
25
27
  I,
@@ -27,7 +29,6 @@ export default class InAppMessage {
27
29
  O,
28
30
  L,
29
31
  _,
30
- m,
31
32
  N,
32
33
  R,
33
34
  S,
@@ -53,14 +54,14 @@ export default class InAppMessage {
53
54
  (this.dismissType = o),
54
55
  (this.duration = r),
55
56
  (this.icon = l),
56
- (this.imageUrl = a),
57
- (this.imageStyle = A),
58
- (this.iconColor = I),
59
- (this.iconBackgroundColor = c),
60
- (this.backgroundColor = O),
61
- (this.textColor = L),
62
- (this.closeButtonColor = _),
63
- (this.animateIn = m),
57
+ (this.imageUrl = u),
58
+ (this.imageStyle = a),
59
+ (this.iconColor = A),
60
+ (this.iconBackgroundColor = I),
61
+ (this.backgroundColor = c),
62
+ (this.textColor = O),
63
+ (this.closeButtonColor = L),
64
+ (this.animateIn = _),
64
65
  (this.animateOut = N),
65
66
  (this.header = R),
66
67
  (this.headerAlignment = S),
@@ -85,14 +86,14 @@ export default class InAppMessage {
85
86
  (this.openTarget = T || InAppMessage.OpenTarget.NONE),
86
87
  (this.dismissType = o || InAppMessage.DismissType.AUTO_DISMISS),
87
88
  (this.icon = l),
88
- (this.imageUrl = a),
89
- (this.imageStyle = A || InAppMessage.ImageStyle.TOP),
90
- (this.iconColor = I || InAppMessage.th.ih),
91
- (this.iconBackgroundColor = c || InAppMessage.th.sh),
92
- (this.backgroundColor = O || InAppMessage.th.ih),
93
- (this.textColor = L || InAppMessage.th.hh),
94
- (this.closeButtonColor = _ || InAppMessage.th.eh),
95
- (this.animateIn = m),
89
+ (this.imageUrl = u),
90
+ (this.imageStyle = a || InAppMessage.ImageStyle.TOP),
91
+ (this.iconColor = A || InAppMessage.th.ih),
92
+ (this.iconBackgroundColor = I || InAppMessage.th.sh),
93
+ (this.backgroundColor = c || InAppMessage.th.ih),
94
+ (this.textColor = O || InAppMessage.th.hh),
95
+ (this.closeButtonColor = L || InAppMessage.th.eh),
96
+ (this.animateIn = _),
96
97
  null == this.animateIn && (this.animateIn = !0),
97
98
  (this.animateOut = N),
98
99
  null == this.animateOut && (this.animateOut = !0),
@@ -110,20 +111,20 @@ export default class InAppMessage {
110
111
  (this.language = f),
111
112
  (this.altImageText = G),
112
113
  (this.nh = !1),
113
- (this.kt = !1),
114
- (this.Co = !1),
114
+ (this.Gt = !1),
115
+ (this.dd = !1),
115
116
  (this.Th = !1),
116
- (this.Pe = null),
117
- (this.Qe = null),
118
- (this.ti = new u()),
119
- (this.oh = new u()),
120
- (this.do = InAppMessage.TextAlignment.CENTER);
117
+ (this.qo = null),
118
+ (this.$o = null),
119
+ (this.ti = new m()),
120
+ (this.oh = new m()),
121
+ (this.Io = InAppMessage.TextAlignment.CENTER);
121
122
  }
122
123
  subscribeToClickedEvent(t) {
123
- return this.ti.wt(t);
124
+ return this.ti.Rt(t);
124
125
  }
125
126
  subscribeToDismissedEvent(t) {
126
- return this.oh.wt(t);
127
+ return this.oh.Rt(t);
127
128
  }
128
129
  removeSubscription(t) {
129
130
  this.ti.removeSubscription(t), this.oh.removeSubscription(t);
@@ -132,51 +133,51 @@ export default class InAppMessage {
132
133
  this.ti.removeAllSubscriptions(), this.oh.removeAllSubscriptions();
133
134
  }
134
135
  closeMessage() {
135
- this.ll(this.Pe);
136
+ this.ll(this.qo);
136
137
  }
137
- Ve() {
138
+ zo() {
138
139
  return !0;
139
140
  }
140
- Bo() {
141
- return this.Ve();
141
+ od() {
142
+ return this.zo();
142
143
  }
143
- Le() {
144
+ _o() {
144
145
  return null != this.htmlId && this.htmlId.length > 4;
145
146
  }
146
- Oe() {
147
- return this.Le() && null != this.css && this.css.length > 0;
147
+ Mo() {
148
+ return this._o() && null != this.css && this.css.length > 0;
148
149
  }
149
- Ge() {
150
- if (this.Le() && this.Oe()) return this.htmlId + "-css";
150
+ Oo() {
151
+ if (this._o() && this.Mo()) return this.htmlId + "-css";
151
152
  }
152
- Qt() {
153
- return !this.kt && ((this.kt = !0), !0);
153
+ Wt() {
154
+ return !this.Gt && ((this.Gt = !0), !0);
154
155
  }
155
- Ur() {
156
- return this.kt;
156
+ sm() {
157
+ return this.Gt;
157
158
  }
158
159
  $t(t) {
159
- return !this.Co && ((this.Co = !0), this.ti.L(), !0);
160
+ return !this.dd && ((this.dd = !0), this.ti.L(), !0);
160
161
  }
161
- Kt() {
162
+ Ot() {
162
163
  return !this.Th && ((this.Th = !0), this.oh.L(), !0);
163
164
  }
164
165
  hide(t) {
165
166
  if (t && t.parentNode) {
166
167
  let s = t.closest(".ab-iam-root");
167
- if ((null == s && (s = t), this.Ve() && null != s.parentNode)) {
168
+ if ((null == s && (s = t), this.zo() && null != s.parentNode)) {
168
169
  const t = s.parentNode.classList;
169
- t && t.contains(InAppMessage.rh) && t.remove(InAppMessage.rh),
170
- document.body.removeEventListener("touchmove", InAppMessage.lh);
170
+ t && t.contains(sr.eS) && t.remove(sr.eS),
171
+ document.body.removeEventListener("touchmove", InAppMessage.rh);
171
172
  }
172
- s.className = s.className.replace(InAppMessage.uh, InAppMessage.ah);
173
+ s.className = s.className.replace(InAppMessage.lh, InAppMessage.uh);
173
174
  }
174
175
  return this.animateOut || !1;
175
176
  }
176
177
  ll(t, s) {
177
178
  if (null == t) return;
178
179
  let i;
179
- (this.Pe = null),
180
+ (this.qo = null),
180
181
  (i =
181
182
  -1 === t.className.indexOf("ab-in-app-message")
182
183
  ? t.getElementsByClassName("ab-in-app-message")[0]
@@ -191,50 +192,50 @@ export default class InAppMessage {
191
192
  let s = t.closest(".ab-iam-root");
192
193
  null == s && (s = t), s.parentNode && s.parentNode.removeChild(s);
193
194
  }
194
- const i = this.Ge();
195
+ const i = this.Oo();
195
196
  if (null != i) {
196
197
  const t = document.getElementById(i);
197
198
  t && t.parentNode && t.parentNode.removeChild(t);
198
199
  }
199
200
  null != e && "Safari" === ro.browser && (e.scrollTop = E),
200
- s ? s() : this.Kt();
201
+ s ? s() : this.Ot();
201
202
  };
202
- h ? setTimeout(n, InAppMessage.cr) : n(), this.Qe && this.Qe.focus();
203
+ h ? setTimeout(n, InAppMessage.hr) : n(), this.$o && this.$o.focus();
203
204
  }
204
- ho() {
205
+ No() {
205
206
  return document.createTextNode(this.message || "");
206
207
  }
207
- bo(t) {
208
+ Jo(t) {
208
209
  t.setAttribute("alt", this.altImageText || "");
209
210
  }
210
- static lh(t) {
211
+ static rh(t) {
211
212
  if (t.targetTouches && t.targetTouches.length > 1) return;
212
213
  const s = t.target;
213
214
  (s &&
214
215
  s.classList &&
215
216
  s.classList.contains("ab-message-text") &&
216
217
  s.scrollHeight > s.clientHeight) ||
217
- (document.querySelector(`.${InAppMessage.rh}`) &&
218
+ (document.querySelector(`.${sr.eS}`) &&
218
219
  t.cancelable &&
219
220
  t.preventDefault());
220
221
  }
221
- Ah(t) {
222
+ ah(t) {
222
223
  const s = t.parentNode;
223
- this.Ve() &&
224
+ this.zo() &&
224
225
  null != s &&
225
226
  this.orientation !== InAppMessage.Orientation.LANDSCAPE &&
226
- (null != s.classList && s.classList.add(InAppMessage.rh),
227
+ (null != s.classList && s.classList.add(sr.eS),
227
228
  document.body.addEventListener(
228
229
  "touchmove",
229
- InAppMessage.lh,
230
+ InAppMessage.rh,
230
231
  !!Tt() && { passive: !1 },
231
232
  )),
232
- (t.className += " " + InAppMessage.uh);
233
+ (t.className += " " + InAppMessage.lh);
233
234
  }
234
- static Ih(t) {
235
+ static Ah(t) {
235
236
  if (
236
- t.keyCode === ie.Oh &&
237
- !r.ee(z.Lh) &&
237
+ t.keyCode === Ce.Ih &&
238
+ !r.re(D.Oh) &&
238
239
  document.querySelectorAll(".ab-modal-interactions").length > 0
239
240
  ) {
240
241
  const t = document.getElementsByClassName("ab-html-message");
@@ -256,49 +257,49 @@ export default class InAppMessage {
256
257
  }
257
258
  }
258
259
  }
259
- _h() {
260
+ Lh() {
260
261
  this.nh ||
261
- r.ee(z.Lh) ||
262
- (document.addEventListener("keydown", InAppMessage.Ih, !1),
262
+ r.re(D.Oh) ||
263
+ (document.addEventListener("keydown", InAppMessage.Ah, !1),
263
264
  r.mh(() => {
264
- document.removeEventListener("keydown", InAppMessage.Ih);
265
+ document.removeEventListener("keydown", InAppMessage.Ah);
265
266
  }),
266
267
  (this.nh = !0));
267
268
  }
268
- dt(t) {
269
+ gt(t) {
269
270
  const s = {};
270
271
  return t
271
- ? ((s[InAppMessage.ss.Vr] = this.message),
272
- (s[InAppMessage.ss.Wr] = this.messageAlignment),
273
- (s[InAppMessage.ss.Nh] = this.slideFrom),
272
+ ? ((s[InAppMessage.ss.pa] = this.message),
273
+ (s[InAppMessage.ss.ma] = this.messageAlignment),
274
+ (s[InAppMessage.ss._h] = this.slideFrom),
274
275
  (s[InAppMessage.ss.xs] = this.extras),
275
- (s[InAppMessage.ss.Yr] = this.triggerId),
276
- (s[InAppMessage.ss.Zr] = this.clickAction),
276
+ (s[InAppMessage.ss.ua] = this.triggerId),
277
+ (s[InAppMessage.ss.ca] = this.clickAction),
277
278
  (s[InAppMessage.ss.URI] = this.uri),
278
- (s[InAppMessage.ss.ra] = this.openTarget),
279
- (s[InAppMessage.ss.sa] = this.dismissType),
280
- (s[InAppMessage.ss.ta] = this.duration),
281
- (s[InAppMessage.ss.ia] = this.icon),
279
+ (s[InAppMessage.ss.fa] = this.openTarget),
280
+ (s[InAppMessage.ss.da] = this.dismissType),
281
+ (s[InAppMessage.ss.la] = this.duration),
282
+ (s[InAppMessage.ss.ga] = this.icon),
282
283
  (s[InAppMessage.ss.ns] = this.imageUrl),
283
- (s[InAppMessage.ss.oa] = this.imageStyle),
284
- (s[InAppMessage.ss.pa] = this.iconColor),
285
- (s[InAppMessage.ss.ma] = this.iconBackgroundColor),
286
- (s[InAppMessage.ss.na] = this.backgroundColor),
287
- (s[InAppMessage.ss.ua] = this.textColor),
288
- (s[InAppMessage.ss.ca] = this.closeButtonColor),
289
- (s[InAppMessage.ss.fa] = this.animateIn),
290
- (s[InAppMessage.ss.da] = this.animateOut),
291
- (s[InAppMessage.ss.la] = this.header),
292
- (s[InAppMessage.ss.ga] = this.headerAlignment),
293
- (s[InAppMessage.ss.ja] = this.headerTextColor),
294
- (s[InAppMessage.ss.xa] = this.frameColor),
295
- (s[InAppMessage.ss.za] = this.buttons),
296
- (s[InAppMessage.ss.ha] = this.cropType),
297
- (s[InAppMessage.ss.va] = this.orientation),
298
- (s[InAppMessage.ss.wa] = this.htmlId),
284
+ (s[InAppMessage.ss.ja] = this.imageStyle),
285
+ (s[InAppMessage.ss.xa] = this.iconColor),
286
+ (s[InAppMessage.ss.za] = this.iconBackgroundColor),
287
+ (s[InAppMessage.ss.ha] = this.backgroundColor),
288
+ (s[InAppMessage.ss.va] = this.textColor),
289
+ (s[InAppMessage.ss.wa] = this.closeButtonColor),
290
+ (s[InAppMessage.ss.ya] = this.animateIn),
291
+ (s[InAppMessage.ss.Sa] = this.animateOut),
292
+ (s[InAppMessage.ss.ba] = this.header),
293
+ (s[InAppMessage.ss.ka] = this.headerAlignment),
294
+ (s[InAppMessage.ss.qa] = this.headerTextColor),
295
+ (s[InAppMessage.ss.Aa] = this.frameColor),
296
+ (s[InAppMessage.ss.Ba] = this.buttons),
297
+ (s[InAppMessage.ss.Ca] = this.cropType),
298
+ (s[InAppMessage.ss.Da] = this.orientation),
299
+ (s[InAppMessage.ss.Ea] = this.htmlId),
299
300
  (s[InAppMessage.ss.CSS] = this.css),
300
301
  (s[InAppMessage.ss.ts] = t),
301
- (s[InAppMessage.ss.ya] = this.messageExtras),
302
+ (s[InAppMessage.ss.Fa] = this.messageExtras),
302
303
  (s[InAppMessage.ss.LANGUAGE] = this.language),
303
304
  (s[InAppMessage.ss.ks] = this.altImageText),
304
305
  s)
@@ -309,19 +310,19 @@ export default class InAppMessage {
309
310
  hh: 4281545523,
310
311
  ih: 4294967295,
311
312
  sh: 4278219733,
312
- Rh: 4293914607,
313
- Sh: 4283782485,
313
+ Nh: 4293914607,
314
+ Rh: 4283782485,
314
315
  Eh: 3224580915,
315
316
  eh: 4288387995,
316
317
  }),
317
- (InAppMessage.Ye = {
318
- Mh: "hd",
319
- We: "ias",
320
- Dh: "of",
321
- Ch: "do",
322
- dh: "umt",
323
- Uh: "tf",
324
- bh: "te",
318
+ (InAppMessage.Ao = {
319
+ Sh: "hd",
320
+ Lo: "ias",
321
+ Mh: "of",
322
+ Dh: "do",
323
+ Ch: "umt",
324
+ dh: "tf",
325
+ Uh: "te",
325
326
  }),
326
327
  (InAppMessage.SlideFrom = { TOP: "TOP", BOTTOM: "BOTTOM" }),
327
328
  (InAppMessage.ClickAction = { URI: "URI", NONE: "NONE" }),
@@ -341,53 +342,52 @@ export default class InAppMessage {
341
342
  CENTER_CROP: "CENTER_CROP",
342
343
  FIT_CENTER: "FIT_CENTER",
343
344
  }),
344
- (InAppMessage.Ke = {
345
- Kr: "SLIDEUP",
346
- Jr: "MODAL",
347
- Io: "MODAL_STYLED",
348
- Or: "FULL",
349
- Hr: "WEB_HTML",
350
- Je: "HTML",
351
- Ao: "HTML_FULL",
345
+ (InAppMessage.Eo = {
346
+ ia: "SLIDEUP",
347
+ ta: "MODAL",
348
+ Xo: "MODAL_STYLED",
349
+ Yn: "FULL",
350
+ Zo: "WEB_HTML",
351
+ Bo: "HTML",
352
+ Yo: "HTML_FULL",
352
353
  }),
353
- (InAppMessage.cr = 500),
354
- (InAppMessage.Ph = 200),
355
- (InAppMessage.uh = "ab-show"),
356
- (InAppMessage.ah = "ab-hide"),
357
- (InAppMessage.rh = "ab-pause-scrolling"),
354
+ (InAppMessage.hr = 500),
355
+ (InAppMessage.bh = 200),
356
+ (InAppMessage.lh = "ab-show"),
357
+ (InAppMessage.uh = "ab-hide"),
358
358
  (InAppMessage.ss = {
359
- Vr: "m",
360
- Wr: "ma",
361
- Nh: "sf",
359
+ pa: "m",
360
+ ma: "ma",
361
+ _h: "sf",
362
362
  xs: "e",
363
- Yr: "ti",
364
- Zr: "ca",
363
+ ua: "ti",
364
+ ca: "ca",
365
365
  URI: "u",
366
- ra: "oa",
367
- sa: "dt",
368
- ta: "d",
369
- ia: "i",
366
+ fa: "oa",
367
+ da: "dt",
368
+ la: "d",
369
+ ga: "i",
370
370
  ns: "iu",
371
- oa: "is",
372
- pa: "ic",
373
- ma: "ibc",
374
- na: "bc",
375
- ua: "tc",
376
- ca: "cbc",
377
- fa: "ai",
378
- da: "ao",
379
- la: "h",
380
- ga: "ha",
381
- ja: "htc",
382
- xa: "fc",
383
- za: "b",
384
- ha: "ct",
385
- va: "o",
386
- wa: "hi",
371
+ ja: "is",
372
+ xa: "ic",
373
+ za: "ibc",
374
+ ha: "bc",
375
+ va: "tc",
376
+ wa: "cbc",
377
+ ya: "ai",
378
+ Sa: "ao",
379
+ ba: "h",
380
+ ka: "ha",
381
+ qa: "htc",
382
+ Aa: "fc",
383
+ Ba: "b",
384
+ Ca: "ct",
385
+ Da: "o",
386
+ Ea: "hi",
387
387
  CSS: "css",
388
388
  ts: "type",
389
- Po: "messageFields",
390
- ya: "me",
389
+ ed: "messageFields",
390
+ Fa: "me",
391
391
  LANGUAGE: "l",
392
392
  ks: "ia",
393
393
  });