@braze/web-sdk 4.3.0 → 4.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 (178) hide show
  1. package/index.d.ts +68 -6
  2. package/package.json +1 -1
  3. package/shared-lib/braze-shared-lib.js +8 -1
  4. package/shared-lib/encoding-utils.js +12 -1
  5. package/shared-lib/event-types.js +32 -1
  6. package/shared-lib/guid.js +10 -1
  7. package/shared-lib/indexed-db-adapter.js +315 -1
  8. package/shared-lib/logger.js +38 -1
  9. package/shared-lib/supported-options.js +26 -1
  10. package/src/Card/card-manager-factory.js +14 -1
  11. package/src/Card/card-manager.js +72 -1
  12. package/src/Card/display/card-display.js +134 -1
  13. package/src/Card/index.js +5 -1
  14. package/src/Card/log-card-click.js +11 -1
  15. package/src/Card/log-card-dismissal.js +11 -1
  16. package/src/Card/log-card-impressions.js +13 -1
  17. package/src/Card/log-content-card-impressions.js +4 -1
  18. package/src/Card/models/banner.js +30 -1
  19. package/src/Card/models/captioned-image.js +32 -1
  20. package/src/Card/models/card.js +175 -1
  21. package/src/Card/models/classic-card.js +32 -1
  22. package/src/Card/models/control-card.js +39 -1
  23. package/src/Card/models/index.js +5 -1
  24. package/src/Card/util/card-factory.js +104 -1
  25. package/src/ContentCards/content-cards-provider-factory.js +20 -1
  26. package/src/ContentCards/content-cards-provider.js +283 -1
  27. package/src/ContentCards/content-cards.js +24 -1
  28. package/src/ContentCards/get-cached-content-cards.js +5 -1
  29. package/src/ContentCards/index.js +8 -1
  30. package/src/ContentCards/log-content-cards-displayed.js +5 -1
  31. package/src/ContentCards/request-content-cards-refresh.js +5 -1
  32. package/src/ContentCards/subscribe-to-content-cards-updates.js +14 -1
  33. package/src/ContentCards/ui/hide-content-cards.js +8 -1
  34. package/src/ContentCards/ui/show-content-cards.js +72 -1
  35. package/src/ContentCards/ui/toggle-content-cards.js +8 -1
  36. package/src/Core/add-sdk-metadata.js +27 -1
  37. package/src/Core/braze-sdk-metadata.js +10 -1
  38. package/src/Core/change-user.js +19 -1
  39. package/src/Core/destroy.js +5 -1
  40. package/src/Core/device-properties.js +9 -1
  41. package/src/Core/disable-sdk.js +10 -1
  42. package/src/Core/enable-sdk.js +8 -1
  43. package/src/Core/get-device-id.js +10 -1
  44. package/src/Core/get-user.js +4 -1
  45. package/src/Core/handle-braze-action.js +64 -1
  46. package/src/Core/index.js +23 -1
  47. package/src/Core/initialize.js +4 -1
  48. package/src/Core/is-disabled.js +4 -1
  49. package/src/Core/log-custom-event.js +36 -1
  50. package/src/Core/log-purchase.js +245 -1
  51. package/src/Core/open-session.js +23 -1
  52. package/src/Core/remove-all-subscriptions.js +4 -1
  53. package/src/Core/remove-subscription.js +4 -1
  54. package/src/Core/request-immediate-data-flush.js +4 -1
  55. package/src/Core/set-logger.js +4 -1
  56. package/src/Core/set-sdk-authentication-signature.js +9 -1
  57. package/src/Core/subscribe-to-sdk-authentication-failures.js +4 -1
  58. package/src/Core/toggle-logging.js +4 -1
  59. package/src/Core/wipe-data.js +15 -1
  60. package/src/FeatureFlags/feature-flag-factory.js +14 -0
  61. package/src/FeatureFlags/feature-flag.js +16 -0
  62. package/src/FeatureFlags/feature-flags-provider-factory.js +19 -0
  63. package/src/FeatureFlags/feature-flags-provider.js +94 -0
  64. package/src/FeatureFlags/get-all-feature-flags.js +12 -0
  65. package/src/FeatureFlags/get-feature-flag.js +12 -0
  66. package/src/FeatureFlags/index.js +4 -0
  67. package/src/FeatureFlags/refresh-feature-flags.js +9 -0
  68. package/src/FeatureFlags/subscribe-to-feature-flags-updates.js +6 -0
  69. package/src/Feed/feed-provider-factory.js +18 -1
  70. package/src/Feed/feed-provider.js +79 -1
  71. package/src/Feed/feed.js +20 -1
  72. package/src/Feed/get-cached-feed.js +5 -1
  73. package/src/Feed/index.js +8 -1
  74. package/src/Feed/log-feed-displayed.js +5 -1
  75. package/src/Feed/request-feed-refresh.js +5 -1
  76. package/src/Feed/subscribe-to-feed-updates.js +5 -1
  77. package/src/Feed/ui/hide-feed.js +7 -1
  78. package/src/Feed/ui/show-feed.js +89 -1
  79. package/src/Feed/ui/toggle-feed.js +8 -1
  80. package/src/InAppMessage/display/get-animation-effect.js +19 -1
  81. package/src/InAppMessage/display/html-message-to-html.js +223 -1
  82. package/src/InAppMessage/display/in-app-message-to-html.js +152 -1
  83. package/src/InAppMessage/display/modal-utils.js +68 -1
  84. package/src/InAppMessage/in-app-message-factory.js +145 -1
  85. package/src/InAppMessage/in-app-message-manager-factory.js +16 -1
  86. package/src/InAppMessage/in-app-message-manager.js +189 -1
  87. package/src/InAppMessage/index.js +14 -1
  88. package/src/InAppMessage/log-in-app-message-button-click.js +19 -1
  89. package/src/InAppMessage/log-in-app-message-click.js +19 -1
  90. package/src/InAppMessage/log-in-app-message-html-click.js +23 -1
  91. package/src/InAppMessage/log-in-app-message-impression.js +13 -1
  92. package/src/InAppMessage/models/control-message.js +8 -1
  93. package/src/InAppMessage/models/full-screen-message.js +71 -1
  94. package/src/InAppMessage/models/html-message.js +54 -1
  95. package/src/InAppMessage/models/in-app-message-button.js +40 -1
  96. package/src/InAppMessage/models/in-app-message.js +271 -1
  97. package/src/InAppMessage/models/modal-message.js +68 -1
  98. package/src/InAppMessage/models/slide-up-message.js +58 -1
  99. package/src/InAppMessage/models/templated-in-app-message.js +14 -1
  100. package/src/InAppMessage/subscribe-to-in-app-message.js +10 -1
  101. package/src/InAppMessage/ui/automatically-show-in-app-messages.js +15 -1
  102. package/src/InAppMessage/ui/show-in-app-message.js +170 -1
  103. package/src/Push/index.js +5 -1
  104. package/src/Push/is-push-blocked.js +5 -1
  105. package/src/Push/is-push-permission-granted.js +5 -1
  106. package/src/Push/is-push-supported.js +5 -1
  107. package/src/Push/push-manager-factory.js +30 -1
  108. package/src/Push/push-manager.js +360 -1
  109. package/src/Push/request-push-permission.js +8 -1
  110. package/src/Push/unregister-push.js +5 -1
  111. package/src/Push/utils/push-utils.js +34 -1
  112. package/src/User/index.js +1 -1
  113. package/src/User/user-manager.js +70 -1
  114. package/src/User/user.js +278 -1
  115. package/src/common/base-feed.js +25 -1
  116. package/src/common/base-provider.js +6 -1
  117. package/src/common/constants.js +5 -1
  118. package/src/common/event-logger.js +24 -1
  119. package/src/common/feed-display.js +200 -1
  120. package/src/common/translations.js +148 -1
  121. package/src/index.js +9 -1
  122. package/src/l10n/l10n-manager-factory.js +22 -1
  123. package/src/l10n/l10n-manager.js +21 -1
  124. package/src/managers/auth-manager.js +48 -1
  125. package/src/managers/braze-instance.js +307 -1
  126. package/src/managers/device-manager.js +80 -1
  127. package/src/managers/network-manager.js +219 -1
  128. package/src/managers/server-config-manager.js +88 -1
  129. package/src/managers/session-manager.js +68 -1
  130. package/src/managers/storage-manager-factory.js +35 -1
  131. package/src/managers/storage-manager.js +394 -1
  132. package/src/managers/subscription-manager.js +25 -1
  133. package/src/models/backend-errors.js +8 -1
  134. package/src/models/braze-event.js +41 -1
  135. package/src/models/braze-sdk-metadata.js +10 -1
  136. package/src/models/device.js +26 -1
  137. package/src/models/identifier.js +20 -1
  138. package/src/models/push-token.js +22 -1
  139. package/src/models/request-result.js +8 -1
  140. package/src/models/server-config.js +32 -1
  141. package/src/request-controller.js +288 -1
  142. package/src/triggers/models/custom-event-data.js +14 -1
  143. package/src/triggers/models/custom-event-property-data.js +21 -1
  144. package/src/triggers/models/filter-set.js +55 -1
  145. package/src/triggers/models/filter.js +98 -1
  146. package/src/triggers/models/in-app-message-click-data.js +25 -1
  147. package/src/triggers/models/purchase-data.js +14 -1
  148. package/src/triggers/models/purchase-property-data.js +21 -1
  149. package/src/triggers/models/push-click-data.js +15 -1
  150. package/src/triggers/models/trigger-condition.js +109 -1
  151. package/src/triggers/models/trigger-events.js +8 -1
  152. package/src/triggers/models/trigger.js +110 -1
  153. package/src/triggers/triggers-provider-factory.js +30 -1
  154. package/src/triggers/triggers-provider.js +307 -1
  155. package/src/ui/js/attach-css.js +12 -1
  156. package/src/ui/js/feed-css.js +12 -1
  157. package/src/ui/js/iam-css.js +12 -1
  158. package/src/ui/js/index.js +3 -1
  159. package/src/ui/js/load-font-awesome.js +13 -1
  160. package/src/util/base-device-parser.js +14 -1
  161. package/src/util/braze-actions.js +79 -1
  162. package/src/util/browser-detector.js +85 -1
  163. package/src/util/client-hints-parser.js +60 -1
  164. package/src/util/code-utils.js +92 -1
  165. package/src/util/color-utils.js +23 -1
  166. package/src/util/component-utils.js +26 -1
  167. package/src/util/date-utils.js +27 -1
  168. package/src/util/deprecation-utils.js +5 -1
  169. package/src/util/device-constants.js +14 -1
  170. package/src/util/dom-utils.js +87 -1
  171. package/src/util/key-codes.js +1 -1
  172. package/src/util/math.js +5 -1
  173. package/src/util/net.js +75 -1
  174. package/src/util/string-utils.js +22 -1
  175. package/src/util/url-utils.js +23 -1
  176. package/src/util/user-agent-parser.js +85 -1
  177. package/src/util/validation-utils.js +136 -1
  178. package/src/util/window-utils.js +35 -1
@@ -1 +1,271 @@
1
- import e,{OPTIONS as T}from"../../managers/braze-instance.js";import et from"../../util/browser-detector.js";import{clickElement as Et,supportsPassive as Tt}from"../../util/dom-utils.js";import{KeyCodes as at}from"../../util/key-codes.js";import u from"../../managers/subscription-manager.js";export default class InAppMessage{constructor(t,s,i,e,h,n,r,o,l,E,T,a,m,c,I,A,N,_,L,d,O,S,D,M,R,b,P,C,U){this.message=t,this.messageAlignment=s||InAppMessage.TextAlignment.CENTER,this.duration=E||5e3,this.slideFrom=i||InAppMessage.SlideFrom.BOTTOM,this.extras=e||{},this.triggerId=h,this.clickAction=n||InAppMessage.ClickAction.NONE,this.uri=r,this.openTarget=o||InAppMessage.OpenTarget.NONE,this.dismissType=l||InAppMessage.DismissType.AUTO_DISMISS,this.icon=T,this.imageUrl=a,this.imageStyle=m||InAppMessage.ImageStyle.TOP,this.iconColor=c||InAppMessage.ji.ki,this.iconBackgroundColor=I||InAppMessage.ji.bi,this.backgroundColor=A||InAppMessage.ji.ki,this.textColor=N||InAppMessage.ji.Ei,this.closeButtonColor=_||InAppMessage.ji.Ti,this.animateIn=L,null==this.animateIn&&(this.animateIn=!0),this.animateOut=d,null==this.animateOut&&(this.animateOut=!0),this.header=O,this.headerAlignment=S||InAppMessage.TextAlignment.CENTER,this.headerTextColor=D||InAppMessage.ji.Ei,this.frameColor=M||InAppMessage.ji.Ii,this.buttons=R||[],this.cropType=b||InAppMessage.CropType.FIT_CENTER,this.orientation=P,this.htmlId=C,this.css=U,this.Ai=!1,this.nl=!1,this.Ni=!1,this.lt=new u,this._i=new u}subscribeToClickedEvent(t){return this.lt.ut(t)}subscribeToDismissedEvent(t){return this._i.ut(t)}removeSubscription(t){this.lt.removeSubscription(t),this._i.removeSubscription(t)}removeAllSubscriptions(){this.lt.removeAllSubscriptions(),this._i.removeAllSubscriptions()}closeMessage(){this.on(this.mn)}we(){return!0}ll(){return this.we()}an(){return null!=this.htmlId&&this.htmlId.length>4}sn(){return this.an()&&null!=this.css&&this.css.length>0}rn(){if(this.an()&&this.sn())return this.htmlId+"-css"}R(){return!this.Ai&&(this.Ai=!0,!0)}k(){return!this.nl&&(this.nl=!0,this.lt.St(),!0)}J(){return!this.Ni&&(this.Ni=!0,this._i.St(),!0)}Li(t){if(t&&t.parentNode){let s=t.closest(".ab-iam-root");if(null==s&&(s=t),this.we()&&null!=s.parentNode){const t=s.parentNode.classList;t&&t.contains(InAppMessage.Oi)&&t.remove(InAppMessage.Oi),document.body.removeEventListener("touchmove",InAppMessage.Si)}s.className=s.className.replace(InAppMessage.Di,InAppMessage._)}return this.animateOut}on(t,s){if(null==t)return;let i;this.mn=null,i=-1===t.className.indexOf("ab-in-app-message")?t.getElementsByClassName("ab-in-app-message")[0]:t;let e=!1;i&&(e=this.Li(i));const h=document.body;if(null!=h)var n=h.scrollTop;const r=()=>{if(t&&t.parentNode){let s=t.closest(".ab-iam-root");null==s&&(s=t),s.parentNode&&s.parentNode.removeChild(s)}if(null!=this.rn()){const t=document.getElementById(this.rn());t&&t.parentNode&&t.parentNode.removeChild(t)}null!=h&&"Safari"===et.browser&&(h.scrollTop=n),s?s():this.J()};e?setTimeout(r,InAppMessage.Mi):r(),this.he&&this.he.focus()}Me(){return document.createTextNode(this.message)}xe(t){let s="";this.message||this.header||!this.we()||(s="Modal Image"),t.setAttribute("alt",s)}static Si(t){t.targetTouches&&t.targetTouches.length>1||t.target.classList&&t.target.classList.contains("ab-message-text")&&t.target.scrollHeight>t.target.clientHeight||document.querySelector(`.${InAppMessage.Oi}`)&&t.preventDefault()}Ri(t){this.we()&&null!=t.parentNode&&this.orientation!==InAppMessage.Orientation.LANDSCAPE&&(null!=t.parentNode.classList&&t.parentNode.classList.add(InAppMessage.Oi),document.body.addEventListener("touchmove",InAppMessage.Si,!!Tt()&&{passive:!1})),t.className+=" "+InAppMessage.Di}static Pi(t){if(t.keyCode===at.Ci&&!e.nn(T.Ui)&&document.querySelectorAll(".ab-modal-interactions").length>0){const t=document.getElementsByClassName("ab-html-message");let s=!1;for(let i=0;i<t.length;i++){const e=t[i].contentWindow.document.getElementsByClassName("ab-programmatic-close-button")[0];null!=e&&(Et(e),s=!0)}if(!s){const t=document.querySelectorAll(".ab-modal-interactions > .ab-close-button")[0];null!=t&&Et(t)}}}Hi(){this.Fi||e.nn(T.Ui)||(document.addEventListener("keydown",InAppMessage.Pi,!1),e.Bi((()=>{document.removeEventListener("keydown",InAppMessage.Pi)})),this.Fi=!0)}}InAppMessage.ji={Ei:4281545523,ki:4294967295,bi:4278219733,Gi:4293914607,Wi:4283782485,Ii:3224580915,Ti:4288387995},InAppMessage.Oe={wi:"hd",yi:"ias",xi:"of",Ki:"do",ci:"umt",ui:"tf",Yi:"te"},InAppMessage.SlideFrom={TOP:"TOP",BOTTOM:"BOTTOM"},InAppMessage.ClickAction={NEWS_FEED:"NEWS_FEED",URI:"URI",NONE:"NONE"},InAppMessage.DismissType={AUTO_DISMISS:"AUTO_DISMISS",MANUAL:"SWIPE"},InAppMessage.OpenTarget={NONE:"NONE",BLANK:"BLANK"},InAppMessage.ImageStyle={TOP:"TOP",GRAPHIC:"GRAPHIC"},InAppMessage.Orientation={PORTRAIT:"PORTRAIT",LANDSCAPE:"LANDSCAPE"},InAppMessage.TextAlignment={START:"START",CENTER:"CENTER",END:"END"},InAppMessage.CropType={CENTER_CROP:"CENTER_CROP",FIT_CENTER:"FIT_CENTER"},InAppMessage.es={Xi:"SLIDEUP",zi:"MODAL",ye:"MODAL_STYLED",Tr:"FULL",el:"WEB_HTML",cn:"HTML"},InAppMessage.Mi=500,InAppMessage.Vi=200,InAppMessage.Di="ab-show",InAppMessage.$i="ab-hide",InAppMessage.Oi="ab-pause-scrolling";
1
+ import e, { OPTIONS as T } from "../../managers/braze-instance.js";
2
+ import ot from "../../util/browser-detector.js";
3
+ import {
4
+ clickElement as Et,
5
+ supportsPassive as Tt
6
+ } from "../../util/dom-utils.js";
7
+ import { KeyCodes as at } from "../../util/key-codes.js";
8
+ import u from "../../managers/subscription-manager.js";
9
+ export default class InAppMessage {
10
+ constructor(
11
+ t,
12
+ s,
13
+ i,
14
+ e,
15
+ h,
16
+ n,
17
+ r,
18
+ o,
19
+ l,
20
+ E,
21
+ T,
22
+ a,
23
+ m,
24
+ c,
25
+ I,
26
+ A,
27
+ N,
28
+ _,
29
+ L,
30
+ d,
31
+ O,
32
+ S,
33
+ D,
34
+ M,
35
+ R,
36
+ b,
37
+ P,
38
+ p,
39
+ C
40
+ ) {
41
+ (this.message = t),
42
+ (this.messageAlignment = s || InAppMessage.TextAlignment.CENTER),
43
+ (this.duration = E || 5e3),
44
+ (this.slideFrom = i || InAppMessage.SlideFrom.BOTTOM),
45
+ (this.extras = e || {}),
46
+ (this.triggerId = h),
47
+ (this.clickAction = n || InAppMessage.ClickAction.NONE),
48
+ (this.uri = r),
49
+ (this.openTarget = o || InAppMessage.OpenTarget.NONE),
50
+ (this.dismissType = l || InAppMessage.DismissType.AUTO_DISMISS),
51
+ (this.icon = T),
52
+ (this.imageUrl = a),
53
+ (this.imageStyle = m || InAppMessage.ImageStyle.TOP),
54
+ (this.iconColor = c || InAppMessage.xi.Ei),
55
+ (this.iconBackgroundColor = I || InAppMessage.xi.Ci),
56
+ (this.backgroundColor = A || InAppMessage.xi.Ei),
57
+ (this.textColor = N || InAppMessage.xi.Ni),
58
+ (this.closeButtonColor = _ || InAppMessage.xi.Li),
59
+ (this.animateIn = L),
60
+ null == this.animateIn && (this.animateIn = !0),
61
+ (this.animateOut = d),
62
+ null == this.animateOut && (this.animateOut = !0),
63
+ (this.header = O),
64
+ (this.headerAlignment = S || InAppMessage.TextAlignment.CENTER),
65
+ (this.headerTextColor = D || InAppMessage.xi.Ni),
66
+ (this.frameColor = M || InAppMessage.xi.Oi),
67
+ (this.buttons = R || []),
68
+ (this.cropType = b || InAppMessage.CropType.FIT_CENTER),
69
+ (this.orientation = P),
70
+ (this.htmlId = p),
71
+ (this.css = C),
72
+ (this.isControl = !1),
73
+ (this.Ri = !1),
74
+ (this.nl = !1),
75
+ (this.Pi = !1),
76
+ (this.lt = new u()),
77
+ (this.Ui = new u());
78
+ }
79
+ subscribeToClickedEvent(t) {
80
+ return this.lt.ut(t);
81
+ }
82
+ subscribeToDismissedEvent(t) {
83
+ return this.Ui.ut(t);
84
+ }
85
+ removeSubscription(t) {
86
+ this.lt.removeSubscription(t), this.Ui.removeSubscription(t);
87
+ }
88
+ removeAllSubscriptions() {
89
+ this.lt.removeAllSubscriptions(), this.Ui.removeAllSubscriptions();
90
+ }
91
+ closeMessage() {
92
+ this.on(this.mn);
93
+ }
94
+ Me() {
95
+ return !0;
96
+ }
97
+ ll() {
98
+ return this.Me();
99
+ }
100
+ an() {
101
+ return null != this.htmlId && this.htmlId.length > 4;
102
+ }
103
+ sn() {
104
+ return this.an() && null != this.css && this.css.length > 0;
105
+ }
106
+ rn() {
107
+ if (this.an() && this.sn()) return this.htmlId + "-css";
108
+ }
109
+ R() {
110
+ return !this.Ri && ((this.Ri = !0), !0);
111
+ }
112
+ Cr() {
113
+ return this.Ri;
114
+ }
115
+ k() {
116
+ return !this.nl && ((this.nl = !0), this.lt.St(), !0);
117
+ }
118
+ J() {
119
+ return !this.Pi && ((this.Pi = !0), this.Ui.St(), !0);
120
+ }
121
+ Hi(t) {
122
+ if (t && t.parentNode) {
123
+ let s = t.closest(".ab-iam-root");
124
+ if ((null == s && (s = t), this.Me() && null != s.parentNode)) {
125
+ const t = s.parentNode.classList;
126
+ t && t.contains(InAppMessage.Fi) && t.remove(InAppMessage.Fi),
127
+ document.body.removeEventListener("touchmove", InAppMessage.Bi);
128
+ }
129
+ s.className = s.className.replace(InAppMessage.Gi, InAppMessage.Wi);
130
+ }
131
+ return this.animateOut;
132
+ }
133
+ on(t, s) {
134
+ if (null == t) return;
135
+ let i;
136
+ (this.mn = null),
137
+ (i =
138
+ -1 === t.className.indexOf("ab-in-app-message")
139
+ ? t.getElementsByClassName("ab-in-app-message")[0]
140
+ : t);
141
+ let e = !1;
142
+ i && (e = this.Hi(i));
143
+ const h = document.body;
144
+ if (null != h) var n = h.scrollTop;
145
+ const r = () => {
146
+ if (t && t.parentNode) {
147
+ let s = t.closest(".ab-iam-root");
148
+ null == s && (s = t), s.parentNode && s.parentNode.removeChild(s);
149
+ }
150
+ if (null != this.rn()) {
151
+ const t = document.getElementById(this.rn());
152
+ t && t.parentNode && t.parentNode.removeChild(t);
153
+ }
154
+ null != h && "Safari" === ot.browser && (h.scrollTop = n),
155
+ s ? s() : this.J();
156
+ };
157
+ e ? setTimeout(r, InAppMessage.Ki) : r(), this.ke && this.ke.focus();
158
+ }
159
+ Ae() {
160
+ return document.createTextNode(this.message);
161
+ }
162
+ Le(t) {
163
+ let s = "";
164
+ this.message || this.header || !this.Me() || (s = "Modal Image"),
165
+ t.setAttribute("alt", s);
166
+ }
167
+ static Bi(t) {
168
+ (t.targetTouches && t.targetTouches.length > 1) ||
169
+ (t.target.classList &&
170
+ t.target.classList.contains("ab-message-text") &&
171
+ t.target.scrollHeight > t.target.clientHeight) ||
172
+ (document.querySelector(`.${InAppMessage.Fi}`) && t.preventDefault());
173
+ }
174
+ Yi(t) {
175
+ this.Me() &&
176
+ null != t.parentNode &&
177
+ this.orientation !== InAppMessage.Orientation.LANDSCAPE &&
178
+ (null != t.parentNode.classList &&
179
+ t.parentNode.classList.add(InAppMessage.Fi),
180
+ document.body.addEventListener(
181
+ "touchmove",
182
+ InAppMessage.Bi,
183
+ !!Tt() && { passive: !1 }
184
+ )),
185
+ (t.className += " " + InAppMessage.Gi);
186
+ }
187
+ static Xi(t) {
188
+ if (
189
+ t.keyCode === at.Vi &&
190
+ !e.nn(T.qi) &&
191
+ document.querySelectorAll(".ab-modal-interactions").length > 0
192
+ ) {
193
+ const t = document.getElementsByClassName("ab-html-message");
194
+ let s = !1;
195
+ for (let i = 0; i < t.length; i++) {
196
+ const e = t[i].contentWindow.document.getElementsByClassName(
197
+ "ab-programmatic-close-button"
198
+ )[0];
199
+ null != e && (Et(e), (s = !0));
200
+ }
201
+ if (!s) {
202
+ const t = document.querySelectorAll(
203
+ ".ab-modal-interactions > .ab-close-button"
204
+ )[0];
205
+ null != t && Et(t);
206
+ }
207
+ }
208
+ }
209
+ Ji() {
210
+ this.Qi ||
211
+ e.nn(T.qi) ||
212
+ (document.addEventListener("keydown", InAppMessage.Xi, !1),
213
+ e.Zi(() => {
214
+ document.removeEventListener("keydown", InAppMessage.Xi);
215
+ }),
216
+ (this.Qi = !0));
217
+ }
218
+ }
219
+ (InAppMessage.xi = {
220
+ Ni: 4281545523,
221
+ Ei: 4294967295,
222
+ Ci: 4278219733,
223
+ th: 4293914607,
224
+ sh: 4283782485,
225
+ Oi: 3224580915,
226
+ Li: 4288387995
227
+ }),
228
+ (InAppMessage.li = {
229
+ ih: "hd",
230
+ eh: "ias",
231
+ hh: "of",
232
+ nh: "do",
233
+ ki: "umt",
234
+ zi: "tf",
235
+ rh: "te"
236
+ }),
237
+ (InAppMessage.SlideFrom = { TOP: "TOP", BOTTOM: "BOTTOM" }),
238
+ (InAppMessage.ClickAction = {
239
+ NEWS_FEED: "NEWS_FEED",
240
+ URI: "URI",
241
+ NONE: "NONE"
242
+ }),
243
+ (InAppMessage.DismissType = {
244
+ AUTO_DISMISS: "AUTO_DISMISS",
245
+ MANUAL: "SWIPE"
246
+ }),
247
+ (InAppMessage.OpenTarget = { NONE: "NONE", BLANK: "BLANK" }),
248
+ (InAppMessage.ImageStyle = { TOP: "TOP", GRAPHIC: "GRAPHIC" }),
249
+ (InAppMessage.Orientation = { PORTRAIT: "PORTRAIT", LANDSCAPE: "LANDSCAPE" }),
250
+ (InAppMessage.TextAlignment = {
251
+ START: "START",
252
+ CENTER: "CENTER",
253
+ END: "END"
254
+ }),
255
+ (InAppMessage.CropType = {
256
+ CENTER_CROP: "CENTER_CROP",
257
+ FIT_CENTER: "FIT_CENTER"
258
+ }),
259
+ (InAppMessage.es = {
260
+ oh: "SLIDEUP",
261
+ lh: "MODAL",
262
+ Ke: "MODAL_STYLED",
263
+ Tr: "FULL",
264
+ el: "WEB_HTML",
265
+ cn: "HTML"
266
+ }),
267
+ (InAppMessage.Ki = 500),
268
+ (InAppMessage.Eh = 200),
269
+ (InAppMessage.Gi = "ab-show"),
270
+ (InAppMessage.Wi = "ab-hide"),
271
+ (InAppMessage.Fi = "ab-pause-scrolling");
@@ -1 +1,68 @@
1
- import InAppMessage from"./in-app-message.js";export default class ModalMessage extends InAppMessage{constructor(e,t,r,s,n,l,o,u,a,p,d,i,m,c,f,g,x,j,v,A,T,b,h,k,q,w,y){super(e,t,null,r,s,n,l,o,u=u||InAppMessage.DismissType.MANUAL,a,p,d,i,m,c,f,g,x,j,v,A,T,b,h,k,q=q||InAppMessage.CropType.FIT_CENTER,void 0,w,y)}get ke(){return InAppMessage.TextAlignment.CENTER}}ModalMessage.es=InAppMessage.es.zi;
1
+ import InAppMessage from "./in-app-message.js";
2
+ export default class ModalMessage extends InAppMessage {
3
+ constructor(
4
+ e,
5
+ t,
6
+ r,
7
+ s,
8
+ n,
9
+ l,
10
+ o,
11
+ u,
12
+ a,
13
+ p,
14
+ d,
15
+ i,
16
+ m,
17
+ c,
18
+ f,
19
+ g,
20
+ x,
21
+ j,
22
+ v,
23
+ A,
24
+ T,
25
+ b,
26
+ h,
27
+ k,
28
+ q,
29
+ w,
30
+ y
31
+ ) {
32
+ super(
33
+ e,
34
+ t,
35
+ null,
36
+ r,
37
+ s,
38
+ n,
39
+ l,
40
+ o,
41
+ (u = u || InAppMessage.DismissType.MANUAL),
42
+ a,
43
+ p,
44
+ d,
45
+ i,
46
+ m,
47
+ c,
48
+ f,
49
+ g,
50
+ x,
51
+ j,
52
+ v,
53
+ A,
54
+ T,
55
+ b,
56
+ h,
57
+ k,
58
+ (q = q || InAppMessage.CropType.FIT_CENTER),
59
+ void 0,
60
+ w,
61
+ y
62
+ );
63
+ }
64
+ get Ce() {
65
+ return InAppMessage.TextAlignment.CENTER;
66
+ }
67
+ }
68
+ ModalMessage.es = InAppMessage.es.lh;
@@ -1 +1,58 @@
1
- import InAppMessage from"./in-app-message.js";import{DOMUtils as dt}from"../../util/dom-utils.js";export default class SlideUpMessage extends InAppMessage{constructor(t,e,o,s,n,i,r,d,u,a,p,l,m,c,v,x,g,f,h,I,M){x=x||InAppMessage.ji.Wi,v=v||InAppMessage.ji.Gi,super(t,e=e||InAppMessage.TextAlignment.START,o,s,n,i,r,d,u,a,p,l,null,m,c,v,x,g,f,h,void 0,void 0,void 0,void 0,void 0,void 0,void 0,I,M)}we(){return!1}get ke(){return InAppMessage.TextAlignment.START}Me(){const t=document.createElement("span");return t.appendChild(document.createTextNode(this.message)),t}Ri(t){const e=t.getElementsByClassName("ab-in-app-message")[0];dt.eo(e,!0,!0)||(this.slideFrom===InAppMessage.SlideFrom.TOP?e.style.top="0px":e.style.bottom="0px"),super.Ri(t)}}SlideUpMessage.es=InAppMessage.es.Xi;
1
+ import InAppMessage from "./in-app-message.js";
2
+ import { DOMUtils as vt } from "../../util/dom-utils.js";
3
+ export default class SlideUpMessage extends InAppMessage {
4
+ constructor(t, e, o, s, n, i, r, d, u, a, p, l, m, c, v, x, g, f, h, I, M) {
5
+ (x = x || InAppMessage.xi.sh),
6
+ (v = v || InAppMessage.xi.th),
7
+ super(
8
+ t,
9
+ (e = e || InAppMessage.TextAlignment.START),
10
+ o,
11
+ s,
12
+ n,
13
+ i,
14
+ r,
15
+ d,
16
+ u,
17
+ a,
18
+ p,
19
+ l,
20
+ null,
21
+ m,
22
+ c,
23
+ v,
24
+ x,
25
+ g,
26
+ f,
27
+ h,
28
+ void 0,
29
+ void 0,
30
+ void 0,
31
+ void 0,
32
+ void 0,
33
+ void 0,
34
+ void 0,
35
+ I,
36
+ M
37
+ );
38
+ }
39
+ Me() {
40
+ return !1;
41
+ }
42
+ get Ce() {
43
+ return InAppMessage.TextAlignment.START;
44
+ }
45
+ Ae() {
46
+ const t = document.createElement("span");
47
+ return t.appendChild(document.createTextNode(this.message)), t;
48
+ }
49
+ Yi(t) {
50
+ const e = t.getElementsByClassName("ab-in-app-message")[0];
51
+ vt.eo(e, !0, !0) ||
52
+ (this.slideFrom === InAppMessage.SlideFrom.TOP
53
+ ? (e.style.top = "0px")
54
+ : (e.style.bottom = "0px")),
55
+ super.Yi(t);
56
+ }
57
+ }
58
+ SlideUpMessage.es = InAppMessage.es.oh;
@@ -1 +1,14 @@
1
- export default class ft{constructor(t,s,l,n,i){this.triggerId=t,this.fi=s,this.pi=l,this.di=n,this.vi=i}static fromJson(t,s,l,n,i){return null==t||null==t.trigger_id?null:new ft(t.trigger_id,s,l,n,i)}}
1
+ export default class wt {
2
+ constructor(t, s, l, n, i) {
3
+ (this.triggerId = t),
4
+ (this.wi = s),
5
+ (this.Di = l),
6
+ (this.Si = n),
7
+ (this.$i = i);
8
+ }
9
+ static fromJson(t, s, l, n, i) {
10
+ return null == t || null == t.trigger_id
11
+ ? null
12
+ : new wt(t.trigger_id, s, l, n, i);
13
+ }
14
+ }
@@ -1 +1,10 @@
1
- import e from"../managers/braze-instance.js";import pe from"./in-app-message-manager-factory.js";export function subscribeToInAppMessage(n){if(e.rr())return"function"!=typeof n?null:pe.m().Ee((function(r){return n(r[0]),r.slice(1)}))}
1
+ import e from "../managers/braze-instance.js";
2
+ import pe from "./in-app-message-manager-factory.js";
3
+ export function subscribeToInAppMessage(n) {
4
+ if (e.rr())
5
+ return "function" != typeof n
6
+ ? null
7
+ : pe.m().We(function(r) {
8
+ return n(r[0]), r.slice(1);
9
+ });
10
+ }
@@ -1 +1,15 @@
1
- import pe from"../in-app-message-manager-factory.js";import e from"../../managers/braze-instance.js";import{setupInAppMessageUI as ss}from"../../ui/js/index.js";import{showInAppMessage}from"./show-in-app-message.js";import{subscribeToInAppMessage}from"../subscribe-to-in-app-message.js";export function automaticallyShowInAppMessages(){if(!e.rr())return;ss();const s=pe.m();if(null==s.Fe()){const r=subscribeToInAppMessage((s=>showInAppMessage(s)));s.Ne(r)}return s.Fe()}
1
+ import pe from "../in-app-message-manager-factory.js";
2
+ import e from "../../managers/braze-instance.js";
3
+ import { setupInAppMessageUI as ss } from "../../ui/js/index.js";
4
+ import { showInAppMessage } from "./show-in-app-message.js";
5
+ import { subscribeToInAppMessage } from "../subscribe-to-in-app-message.js";
6
+ export function automaticallyShowInAppMessages() {
7
+ if (!e.rr()) return;
8
+ ss();
9
+ const s = pe.m();
10
+ if (null == s.Xe()) {
11
+ const r = subscribeToInAppMessage(s => showInAppMessage(s));
12
+ s.Ze(r);
13
+ }
14
+ return s.Xe();
15
+ }
@@ -1 +1,170 @@
1
- import e,{OPTIONS as T}from"../../managers/braze-instance.js";import ControlMessage from"../models/control-message.js";import HtmlMessage from"../models/html-message.js";import InAppMessage from"../models/in-app-message.js";import SlideUpMessage from"../models/slide-up-message.js";import pe from"../in-app-message-manager-factory.js";import se from"../display/get-animation-effect.js";import ce from"../display/in-app-message-to-html.js";import{logInAppMessageImpression}from"../log-in-app-message-impression.js";import{ORIENTATION as le,WindowUtils as H}from"../../util/window-utils.js";import{isURIJavascriptOrData as j}from"../../util/url-utils.js";import{KeyCodes as at}from"../../util/key-codes.js";import{setupInAppMessageUI as ss}from"../../ui/js/index.js";import r from"../../../shared-lib/braze-shared-lib.js";import{toRgba as ne}from"../../util/color-utils.js";export function showInAppMessage(t,s,o){if(!e.rr())return;if(ss(),null==t)return!1;if(t instanceof ControlMessage)return r.D.info("User received control for a multivariate test, logging to Braze servers."),logInAppMessageImpression(t),!0;if(!(t instanceof InAppMessage))return!1;const i=pe.m();t.Hi();const n=t instanceof HtmlMessage;if(n&&!t.trusted&&!e.tr())return r.D.error('HTML in-app messages are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these messages.'),i.qe(t.triggerId,InAppMessage.Oe.wi),!1;if(null==s&&(s=document.body),t.we()){if(s.querySelectorAll(".ab-modal-interactions").length>0)return r.D.info(`Cannot show in-app message ${t.message} because another message is being shown.`),i.qe(t.triggerId,InAppMessage.Oe.yi),!1}if(H.so()){const e=H.io();if(e===le.PORTRAIT&&t.orientation===InAppMessage.Orientation.LANDSCAPE||e===le.LANDSCAPE&&t.orientation===InAppMessage.Orientation.PORTRAIT){const s=e===le.PORTRAIT?"portrait":"landscape",o=t.orientation===InAppMessage.Orientation.PORTRAIT?"portrait":"landscape";return r.D.info(`Not showing ${o} in-app message ${t.message} because the screen is currently ${s}`),i.qe(t.triggerId,InAppMessage.Oe.xi),!1}}if(!e.tr()){let e=!1;if(t.buttons&&t.buttons.length>0){const s=t.buttons;for(let t=0;t<s.length;t++)if(s[t].clickAction===InAppMessage.ClickAction.URI){const o=s[t].uri;e=j(o)}}else t.clickAction===InAppMessage.ClickAction.URI&&(e=j(t.uri));if(e)return r.D.error('Javascript click actions are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these actions.'),i.qe(t.triggerId,InAppMessage.Oe.wi),!1}const a=document.createElement("div");if(a.className="ab-iam-root v3",a.className+=se(t),a.setAttribute("role","complementary"),t.an()&&(a.id=t.htmlId),e.nn(T.no)&&(a.style.zIndex=e.nn(T.no)+1),s.appendChild(a),t.sn()){const s=document.createElement("style");s.innerHTML=t.css,s.id=t.rn(),null!=e.nn(T.ao)&&s.setAttribute("nonce",e.nn(T.ao)),document.getElementsByTagName("head")[0].appendChild(s)}const l=t instanceof SlideUpMessage,m=ce(t,(()=>{import("../../Feed/ui/show-feed.js").then((e=>e.showFeed()))}),(s=>{if(t.we()&&t.ll()){const o=document.createElement("div");if(o.className="ab-page-blocker",t.sn()||(o.style.backgroundColor=ne(t.frameColor)),e.nn(T.no)&&(o.style.zIndex=e.nn(T.no)),a.appendChild(o),!e.nn(T.Ui)){const e=(new Date).valueOf();o.onclick=o=>{(new Date).valueOf()-e>InAppMessage.Vi&&(t.on(s),o.stopPropagation())}}a.appendChild(s),s.focus(),t.Ri(a)}else if(l){const e=document.querySelectorAll(".ab-slideup");let o=null;for(let t=e.length-1;t>=0;t--)if(e[t]!==s){o=e[t];break}if(t.slideFrom===InAppMessage.SlideFrom.TOP){let e=0;null!=o&&(e=o.offsetTop+o.offsetHeight),s.style.top=Math.max(e,0)+"px"}else{let e=0;null!=o&&(e=(window.innerHeight||document.documentElement.clientHeight)-o.offsetTop),s.style.bottom=Math.max(e,0)+"px"}}else if(n&&!e.nn(T.Ui)){const e=t;s.contentWindow.addEventListener("keydown",(function(t){t.keyCode===at.Ci&&e.closeMessage()}))}logInAppMessageImpression(t),t.dismissType===InAppMessage.DismissType.AUTO_DISMISS&&setTimeout((()=>{a.contains(s)&&t.on(s)}),t.duration),"function"==typeof o&&o()}),e.nn(T.lo),e.nn(T.no),e.nn(T.ao));return(n||l)&&(a.appendChild(m),t.Ri(a)),!0}
1
+ import e, { OPTIONS as T } from "../../managers/braze-instance.js";
2
+ import ControlMessage from "../models/control-message.js";
3
+ import HtmlMessage from "../models/html-message.js";
4
+ import InAppMessage from "../models/in-app-message.js";
5
+ import SlideUpMessage from "../models/slide-up-message.js";
6
+ import pe from "../in-app-message-manager-factory.js";
7
+ import se from "../display/get-animation-effect.js";
8
+ import le from "../display/in-app-message-to-html.js";
9
+ import { logInAppMessageImpression } from "../log-in-app-message-impression.js";
10
+ import {
11
+ ORIENTATION as fe,
12
+ WindowUtils as H
13
+ } from "../../util/window-utils.js";
14
+ import { isURIJavascriptOrData as j } from "../../util/url-utils.js";
15
+ import { KeyCodes as at } from "../../util/key-codes.js";
16
+ import { setupInAppMessageUI as ss } from "../../ui/js/index.js";
17
+ import r from "../../../shared-lib/braze-shared-lib.js";
18
+ import { toRgba as me } from "../../util/color-utils.js";
19
+ export function showInAppMessage(t, s, o) {
20
+ if (!e.rr()) return;
21
+ if ((ss(), null == t)) return !1;
22
+ if (t instanceof ControlMessage)
23
+ return (
24
+ r.D.info(
25
+ "User received control for a multivariate test, logging to Braze servers."
26
+ ),
27
+ logInAppMessageImpression(t),
28
+ !0
29
+ );
30
+ if (!(t instanceof InAppMessage)) return !1;
31
+ const i = pe.m();
32
+ t.Ji();
33
+ const n = t instanceof HtmlMessage;
34
+ if (n && !t.trusted && !e.tr())
35
+ return (
36
+ r.D.error(
37
+ 'HTML in-app messages are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these messages.'
38
+ ),
39
+ i.ni(t.triggerId, InAppMessage.li.ih),
40
+ !1
41
+ );
42
+ if ((null == s && (s = document.body), t.Me())) {
43
+ if (s.querySelectorAll(".ab-modal-interactions").length > 0)
44
+ return (
45
+ r.D.info(
46
+ `Cannot show in-app message ${t.message} because another message is being shown.`
47
+ ),
48
+ i.ni(t.triggerId, InAppMessage.li.eh),
49
+ !1
50
+ );
51
+ }
52
+ if (H.so()) {
53
+ const e = H.io();
54
+ if (
55
+ (e === fe.PORTRAIT &&
56
+ t.orientation === InAppMessage.Orientation.LANDSCAPE) ||
57
+ (e === fe.LANDSCAPE &&
58
+ t.orientation === InAppMessage.Orientation.PORTRAIT)
59
+ ) {
60
+ const s = e === fe.PORTRAIT ? "portrait" : "landscape",
61
+ o =
62
+ t.orientation === InAppMessage.Orientation.PORTRAIT
63
+ ? "portrait"
64
+ : "landscape";
65
+ return (
66
+ r.D.info(
67
+ `Not showing ${o} in-app message ${t.message} because the screen is currently ${s}`
68
+ ),
69
+ i.ni(t.triggerId, InAppMessage.li.hh),
70
+ !1
71
+ );
72
+ }
73
+ }
74
+ if (!e.tr()) {
75
+ let e = !1;
76
+ if (t.buttons && t.buttons.length > 0) {
77
+ const s = t.buttons;
78
+ for (let t = 0; t < s.length; t++)
79
+ if (s[t].clickAction === InAppMessage.ClickAction.URI) {
80
+ const o = s[t].uri;
81
+ e = j(o);
82
+ }
83
+ } else t.clickAction === InAppMessage.ClickAction.URI && (e = j(t.uri));
84
+ if (e)
85
+ return (
86
+ r.D.error(
87
+ 'Javascript click actions are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these actions.'
88
+ ),
89
+ i.ni(t.triggerId, InAppMessage.li.ih),
90
+ !1
91
+ );
92
+ }
93
+ const a = document.createElement("div");
94
+ if (
95
+ ((a.className = "ab-iam-root v3"),
96
+ (a.className += se(t)),
97
+ a.setAttribute("role", "complementary"),
98
+ t.an() && (a.id = t.htmlId),
99
+ e.nn(T.no) && (a.style.zIndex = e.nn(T.no) + 1),
100
+ s.appendChild(a),
101
+ t.sn())
102
+ ) {
103
+ const s = document.createElement("style");
104
+ (s.innerHTML = t.css),
105
+ (s.id = t.rn()),
106
+ null != e.nn(T.ao) && s.setAttribute("nonce", e.nn(T.ao)),
107
+ document.getElementsByTagName("head")[0].appendChild(s);
108
+ }
109
+ const l = t instanceof SlideUpMessage,
110
+ m = le(
111
+ t,
112
+ () => {
113
+ import("../../Feed/ui/show-feed.js").then(e => e.showFeed());
114
+ },
115
+ s => {
116
+ if (t.Me() && t.ll()) {
117
+ const o = document.createElement("div");
118
+ if (
119
+ ((o.className = "ab-page-blocker"),
120
+ t.sn() || (o.style.backgroundColor = me(t.frameColor)),
121
+ e.nn(T.no) && (o.style.zIndex = e.nn(T.no)),
122
+ a.appendChild(o),
123
+ !e.nn(T.qi))
124
+ ) {
125
+ const e = new Date().valueOf();
126
+ o.onclick = o => {
127
+ new Date().valueOf() - e > InAppMessage.Eh &&
128
+ (t.on(s), o.stopPropagation());
129
+ };
130
+ }
131
+ a.appendChild(s), s.focus(), t.Yi(a);
132
+ } else if (l) {
133
+ const e = document.querySelectorAll(".ab-slideup");
134
+ let o = null;
135
+ for (let t = e.length - 1; t >= 0; t--)
136
+ if (e[t] !== s) {
137
+ o = e[t];
138
+ break;
139
+ }
140
+ if (t.slideFrom === InAppMessage.SlideFrom.TOP) {
141
+ let e = 0;
142
+ null != o && (e = o.offsetTop + o.offsetHeight),
143
+ (s.style.top = Math.max(e, 0) + "px");
144
+ } else {
145
+ let e = 0;
146
+ null != o &&
147
+ (e =
148
+ (window.innerHeight || document.documentElement.clientHeight) -
149
+ o.offsetTop),
150
+ (s.style.bottom = Math.max(e, 0) + "px");
151
+ }
152
+ } else if (n && !e.nn(T.qi)) {
153
+ const e = t;
154
+ s.contentWindow.addEventListener("keydown", function(t) {
155
+ t.keyCode === at.Vi && e.closeMessage();
156
+ });
157
+ }
158
+ logInAppMessageImpression(t),
159
+ t.dismissType === InAppMessage.DismissType.AUTO_DISMISS &&
160
+ setTimeout(() => {
161
+ a.contains(s) && t.on(s);
162
+ }, t.duration),
163
+ "function" == typeof o && o();
164
+ },
165
+ e.nn(T.lo),
166
+ e.nn(T.no),
167
+ e.nn(T.ao)
168
+ );
169
+ return (n || l) && (a.appendChild(m), t.Yi(a)), !0;
170
+ }
package/src/Push/index.js CHANGED
@@ -1 +1,5 @@
1
- export{isPushBlocked}from"./is-push-blocked.js";export{isPushPermissionGranted}from"./is-push-permission-granted.js";export{isPushSupported}from"./is-push-supported.js";export{requestPushPermission}from"./request-push-permission.js";export{unregisterPush}from"./unregister-push.js";
1
+ export { isPushBlocked } from "./is-push-blocked.js";
2
+ export { isPushPermissionGranted } from "./is-push-permission-granted.js";
3
+ export { isPushSupported } from "./is-push-supported.js";
4
+ export { requestPushPermission } from "./request-push-permission.js";
5
+ export { unregisterPush } from "./unregister-push.js";
@@ -1 +1,5 @@
1
- import e from"../managers/braze-instance.js";import ht from"./utils/push-utils.js";export function isPushBlocked(){if(e.rr())return ht.isPushBlocked()}
1
+ import e from "../managers/braze-instance.js";
2
+ import dt from "./utils/push-utils.js";
3
+ export function isPushBlocked() {
4
+ if (e.rr()) return dt.isPushBlocked();
5
+ }
@@ -1 +1,5 @@
1
- import e from"../managers/braze-instance.js";import ht from"./utils/push-utils.js";export function isPushPermissionGranted(){if(e.rr())return ht.isPushPermissionGranted()}
1
+ import e from "../managers/braze-instance.js";
2
+ import dt from "./utils/push-utils.js";
3
+ export function isPushPermissionGranted() {
4
+ if (e.rr()) return dt.isPushPermissionGranted();
5
+ }
@@ -1 +1,5 @@
1
- import e from"../managers/braze-instance.js";import ht from"./utils/push-utils.js";export function isPushSupported(){if(e.rr())return ht.isPushSupported()}
1
+ import e from "../managers/braze-instance.js";
2
+ import dt from "./utils/push-utils.js";
3
+ export function isPushSupported() {
4
+ if (e.rr()) return dt.isPushSupported();
5
+ }