diff --git a/dist/BrazeKit.common.js b/dist/BrazeKit.common.js index 924b1ac..a262863 100644 --- a/dist/BrazeKit.common.js +++ b/dist/BrazeKit.common.js @@ -21,47 +21,47 @@ function getAugmentedNamespace(n) { return a; } -const r = { +const E = { init: function (n) { - (void 0 === n && void 0 !== r.zg) || (r.zg = !!n), r.t || (r.t = !0); + (void 0 === n && void 0 !== E.zg) || (E.zg = !!n), E.i || (E.i = !0); }, destroy: function () { - (r.t = !1), (r.zg = void 0), (r.vd = void 0); + (E.i = !1), (E.zg = void 0), (E.Rd = void 0); }, setLogger: function (n) { "function" == typeof n - ? (r.init(), (r.vd = n)) - : r.info("Ignoring setLogger call since logger is not a function"); + ? (E.init(), (E.Rd = n)) + : E.info("Ignoring setLogger call since logger is not a function"); }, toggleLogging: function () { - r.init(), - r.zg - ? (console.log("Disabling Braze logging"), (r.zg = !1)) - : (console.log("Enabled Braze logging"), (r.zg = !0)); + E.init(), + E.zg + ? (console.log("Disabling Braze logging"), (E.zg = !1)) + : (console.log("Enabled Braze logging"), (E.zg = !0)); }, info: function (n) { - if (r.zg) { + if (E.zg) { const o = "Braze: " + n; - null != r.vd ? r.vd(o) : console.log(o); + null != E.Rd ? E.Rd(o) : console.log(o); } }, warn: function (n) { - if (r.zg) { - const o = "Braze SDK Warning: " + n + " (v5.5.0)"; - null != r.vd ? r.vd(o) : console.warn(o); + if (E.zg) { + const o = "Braze SDK Warning: " + n + " (v6.5.0)"; + null != E.Rd ? E.Rd(o) : console.warn(o); } }, error: function (n) { - if (r.zg) { - const o = "Braze SDK Error: " + n + " (v5.5.0)"; - null != r.vd ? r.vd(o) : console.error(o); + if (E.zg) { + const o = "Braze SDK Error: " + n + " (v6.5.0)"; + null != E.Rd ? E.Rd(o) : console.error(o); } }, }; -var r$1 = r; +var E$1 = E; -const ei = { - Tn: function (t) { +const ui = { + Nu: function (t) { const r = (t + "=".repeat((4 - (t.length % 4)) % 4)) .replace(/\-/g, "+") .replace(/_/g, "/"), @@ -72,69 +72,87 @@ const ei = { }, }; -const i = { +const f = { CustomEvent: "ce", Pr: "p", - Ku: "pc", - vc: "ca", - Ua: "i", - Ls: "ie", - M: "cci", - R: "ccic", - k: "ccc", - F: "ccd", - ql: "ss", - xl: "se", - Xi: "si", - $i: "sc", - Oi: "sbc", - Cc: "sfe", - mo: "iec", - Ju: "lr", - Eu: "uae", - O: "ci", - D: "cc", - Xu: "lcaa", - Gu: "lcar", - On: "inc", - Ln: "add", - Rn: "rem", - $n: "set", - Bn: "ncam", - Hu: "sgu", - Fr: "ffi", - }, - or = { Ar: "feed_displayed", Ec: "content_cards_displayed" }; + jd: "pc", + ev: "ca", + Fl: "i", + wl: "ie", + Xt: "cci", + Zt: "ccic", + Lt: "ccc", + Qt: "ccd", + Sm: "ss", + hm: "se", + wn: "si", + zn: "sc", + Sn: "sbc", + tv: "sfe", + om: "iec", + yd: "lr", + kd: "uae", + Dd: "lcaa", + Ad: "lcar", + Zu: "inc", + Qu: "add", + Xu: "rem", + Yu: "set", + Vu: "ncam", + $d: "sgu", + xo: "ffi", + ro: "bi", + ut: "bc", + }; -const p = { - W: function () { - const t = (t = !1) => { - const n = (Math.random().toString(16) + "000000000").substr(2, 8); - return t ? "-" + n.substr(0, 4) + "-" + n.substr(4, 4) : n; +const P = { + se: function () { + if ("undefined" != typeof window && window.crypto) { + if ("function" == typeof window.crypto.randomUUID) + return window.crypto.randomUUID(); + if ("function" == typeof window.crypto.getRandomValues) + try { + const n = new Uint8Array(16); + window.crypto.getRandomValues(n), + (n[6] = (15 & n[6]) | 64), + (n[8] = (63 & n[8]) | 128); + const t = Array.from(n, (n) => ("0" + n.toString(16)).slice(-2)); + return [ + t.slice(0, 4).join(""), + t.slice(4, 6).join(""), + t.slice(6, 8).join(""), + t.slice(8, 10).join(""), + t.slice(10, 16).join(""), + ].join("-"); + } catch (n) {} + } + const n = (n = !1) => { + const t = (Math.random().toString(16) + "000000000").substr(2, 8); + return n ? "-" + t.substr(0, 4) + "-" + t.substr(4, 4) : t; }; - return t() + t(!0) + t(!0) + t(); + return n() + n(!0) + n(!0) + n(); }, }; -var p$1 = p; +var P$1 = P; -class A { +class et { constructor(t, e) { (this.database = t), - (this.vd = e), + (this.Rd = e), (this.parent = "undefined" == typeof window ? self : window), (this.database = t), - (this.vd = e); + (this.Rd = e); } - Dd() { + Ud() { if ("indexedDB" in this.parent) return this.parent.indexedDB; } isSupported() { var t; try { - if (null == this.Dd()) return !1; + if (null == this.Ud()) return !1; { const e = - null === (t = this.Dd()) || void 0 === t + null === (t = this.Ud()) || void 0 === t ? void 0 : t.open("Braze IndexedDB Support Test"); if ( @@ -144,10 +162,10 @@ class A { "undefined" != typeof window) ) { const t = window, - e = t.chrome || t.browser || t.pd; + e = t.chrome || t.browser || t.Od; if (e && e.runtime && e.runtime.id) return ( - this.vd.info( + this.Rd.info( "Not using IndexedDB for storage because we are running inside an extension", ), !1 @@ -157,37 +175,37 @@ class A { } } catch (t) { return ( - this.vd.info( + this.Rd.info( "Not using IndexedDB for storage due to following error: " + t, ), !1 ); } } - Bd(t, e) { + Kd(t, e) { var n; const o = - null === (n = this.Dd()) || void 0 === n + null === (n = this.Ud()) || void 0 === n ? void 0 - : n.open(this.database.Sd, this.database.VERSION); + : n.open(this.database.Ld, this.database.VERSION); if (null == o) return "function" == typeof e && e(), !1; const i = this; return ( (o.onupgradeneeded = (t) => { var e; - i.vd.info( + i.Rd.info( "Upgrading indexedDB " + - i.database.Sd + + i.database.Ld + " to v" + i.database.VERSION + "...", ); const n = null === (e = t.target) || void 0 === e ? void 0 : e.result; - for (const t in i.database.hs) { + for (const t in i.database.Fs) { const e = t; - i.database.hs.hasOwnProperty(t) && - !n.objectStoreNames.contains(i.database.hs[e]) && - n.createObjectStore(i.database.hs[e]); + i.database.Fs.hasOwnProperty(t) && + !n.objectStoreNames.contains(i.database.Fs[e]) && + n.createObjectStore(i.database.Fs[e]); } }), (o.onsuccess = (n) => { @@ -196,7 +214,7 @@ class A { (r.onversionchange = () => { r.close(), "function" == typeof e && e(), - i.vd.error( + i.Rd.error( "Needed to close the database unexpectedly because of an upgrade in another tab", ); }), @@ -206,9 +224,9 @@ class A { var n; const o = t; return ( - i.vd.info( + i.Rd.info( "Could not open indexedDB " + - i.database.Sd + + i.database.Ld + " v" + i.database.VERSION + ": " + @@ -224,16 +242,16 @@ class A { setItem(t, e, n, o, i) { if (!this.isSupported()) return "function" == typeof i && i(), !1; const r = this; - return this.Bd((d) => { + return this.Kd((d) => { if (!d.objectStoreNames.contains(t)) return ( - r.vd.error( + r.Rd.error( "Could not store object " + e + " in " + t + " on indexedDB " + - r.database.Sd + + r.database.Ld + " - " + t + " is not a valid objectStore", @@ -245,13 +263,13 @@ class A { s.oncomplete = () => d.close(); const u = s.objectStore(t).put(n, e); (u.onerror = () => { - r.vd.error( + r.Rd.error( "Could not store object " + e + " in " + t + " on indexedDB " + - r.database.Sd, + r.database.Ld, ), "function" == typeof i && i(); }), @@ -263,16 +281,16 @@ class A { getItem(t, e, n) { if (!this.isSupported()) return !1; const o = this; - return this.Bd((i) => { + return this.Kd((i) => { if (!i.objectStoreNames.contains(t)) return ( - o.vd.error( + o.Rd.error( "Could not retrieve object " + e + " in " + t + " on indexedDB " + - o.database.Sd + + o.database.Ld + " - " + t + " is not a valid objectStore", @@ -283,13 +301,13 @@ class A { r.oncomplete = () => i.close(); const d = r.objectStore(t).get(e); (d.onerror = () => { - o.vd.error( + o.Rd.error( "Could not retrieve object " + e + " in " + t + " on indexedDB " + - o.database.Sd, + o.database.Ld, ); }), (d.onsuccess = (t) => { @@ -299,17 +317,17 @@ class A { }); }); } - jr(t, e, n) { + kr(t, e, n) { if (!this.isSupported()) return "function" == typeof n && n(), !1; const o = this; - return this.Bd((i) => { + return this.Kd((i) => { if (!i.objectStoreNames.contains(t)) return ( - o.vd.error( + o.Rd.error( "Could not retrieve last record from " + t + " on indexedDB " + - o.database.Sd + + o.database.Ld + " - " + t + " is not a valid objectStore", @@ -321,8 +339,8 @@ class A { r.oncomplete = () => i.close(); const d = r.objectStore(t).openCursor(null, "prev"); (d.onerror = () => { - o.vd.error( - "Could not open cursor for " + t + " on indexedDB " + o.database.Sd, + o.Rd.error( + "Could not open cursor for " + t + " on indexedDB " + o.database.Ld, ), "function" == typeof n && n(); }), @@ -335,19 +353,19 @@ class A { }); }, n); } - re(t, e) { + je(t, e) { if (!this.isSupported()) return !1; const n = this; - return this.Bd((o) => { + return this.Kd((o) => { if (!o.objectStoreNames.contains(t)) return ( - n.vd.error( + n.Rd.error( "Could not delete record " + e + " from " + t + " on indexedDB " + - n.database.Sd + + n.database.Ld + " - " + t + " is not a valid objectStore", @@ -357,28 +375,28 @@ class A { const i = o.transaction([t], "readwrite"); i.oncomplete = () => o.close(); i.objectStore(t).delete(e).onerror = () => { - n.vd.error( + n.Rd.error( "Could not delete record " + e + " from " + t + " on indexedDB " + - n.database.Sd, + n.database.Ld, ); }; }); } - ss(t, e) { + Ds(t, e) { if (!this.isSupported()) return !1; const n = this; - return this.Bd((o) => { + return this.Kd((o) => { if (!o.objectStoreNames.contains(t)) return ( - n.vd.error( + n.Rd.error( "Could not retrieve objects from " + t + " on indexedDB " + - n.database.Sd + + n.database.Ld + " - " + t + " is not a valid objectStore", @@ -392,18 +410,18 @@ class A { s = []; (d.onerror = () => { s.length > 0 - ? (n.vd.info( + ? (n.Rd.info( "Cursor closed midway through for " + t + " on indexedDB " + - n.database.Sd, + n.database.Ld, ), e(s)) - : n.vd.error( + : n.Rd.error( "Could not open cursor for " + t + " on indexedDB " + - n.database.Sd, + n.database.Ld, ); }), (d.onsuccess = (t) => { @@ -423,79 +441,79 @@ class A { clearData() { if (!this.isSupported()) return !1; const t = []; - for (const e in this.database.hs) { + for (const e in this.database.Fs) { const n = e; - this.database.hs.hasOwnProperty(e) && - this.database.hs[n] !== this.database.hs.ae && - t.push(this.database.hs[n]); + this.database.Fs.hasOwnProperty(e) && + this.database.Fs[n] !== this.database.Fs.be && + t.push(this.database.Fs[n]); } const e = this; - return this.Bd(function (n) { + return this.Kd(function (n) { const o = n.transaction(t, "readwrite"); o.oncomplete = () => n.close(); for (let n = 0; n < t.length; n++) { const i = t[n]; o.objectStore(i).clear().onerror = function () { - e.vd.error( + e.Rd.error( "Could not clear " + this.source.name + " on indexedDB " + - e.database.Sd, + e.database.Ld, ); }; } o.onerror = function () { - e.vd.error( - "Could not clear object stores on indexedDB " + e.database.Sd, + e.Rd.error( + "Could not clear object stores on indexedDB " + e.database.Ld, ); }; }); } } -A.ts = { - Zt: { - Sd: "AppboyServiceWorkerAsyncStorage", +et.Us = { + Rs: { + Ld: "AppboyServiceWorkerAsyncStorage", VERSION: 6, - hs: { - Ka: "data", - hr: "pushClicks", - cu: "pushSubscribed", - Cd: "fallbackDevice", - es: "cardUpdates", - ae: "optOut", - wr: "pendingData", - jh: "sdkAuthenticationSignature", + Fs: { + Ze: "data", + vr: "pushClicks", + Fu: "pushSubscribed", + Gd: "fallbackDevice", + As: "cardUpdates", + be: "optOut", + zr: "pendingData", + qh: "sdkAuthenticationSignature", }, - ie: 1, + fe: 1, }, }; -var zt = { - Eo: "allowCrawlerActivity", - _o: "baseUrl", - Io: "noCookies", - So: "devicePropertyAllowlist", - Aa: "disablePushTokenMaintenance", - Ao: "enableLogging", - No: "enableSdkAuthentication", - qa: "manageServiceWorkerExternally", - Oo: "minimumIntervalBetweenTriggerActionsInSeconds", - Ro: "sessionTimeoutInSeconds", - Po: "appVersion", - Lo: "appVersionNumber", - Ma: "serviceWorkerLocation", - ka: "safariWebsitePushId", - zn: "localization", - bo: "contentSecurityNonce", - Do: "allowUserSuppliedJavascript", - jo: "inAppMessageZIndex", - ho: "openInAppMessagesInNewTab", - en: "openNewsFeedCardsInNewTab", - Lh: "requireExplicitInAppMessageDismissal", - Mo: "doNotLoadFontAwesome", - Uo: "deviceId", - _a: "serviceWorkerScope", - Wo: "sdkFlavor", +var $t = { + Ph: "allowCrawlerActivity", + Wh: "baseUrl", + Vh: "noCookies", + Kh: "devicePropertyAllowlist", + La: "disablePushTokenMaintenance", + $h: "enableLogging", + Yh: "enableSdkAuthentication", + Ka: "manageServiceWorkerExternally", + Xh: "minimumIntervalBetweenTriggerActionsInSeconds", + Zh: "sessionTimeoutInSeconds", + Qh: "appVersion", + Xa: "appVersionNumber", + Ga: "serviceWorkerLocation", + Ia: "safariWebsitePushId", + Wa: "localization", + er: "contentSecurityNonce", + te: "allowUserSuppliedJavascript", + $a: "inAppMessageZIndex", + Ja: "openInAppMessagesInNewTab", + Oh: "requireExplicitInAppMessageDismissal", + Za: "doNotLoadFontAwesome", + tl: "deviceId", + Ha: "serviceWorkerScope", + Ne: "dustHost", + il: "sdkFlavor", tn: "openCardsInNewTab", }; @@ -509,11 +527,11 @@ function values(t) { e.push(t[r]); return e; } -function validateValueIsFromEnum(t, e, n, o) { - const c = values(t); +function validateValueIsFromEnum(t, e, r, n) { + const o = values(t); return ( - -1 !== c.indexOf(e) || - (r$1.error(`${n} Valid values from ${o} are "${c.join('"/"')}".`), !1) + -1 !== o.indexOf(e) || + (E$1.error(`${r} Valid values from ${n} are "${o.join('"/"')}".`), !1) ); } function isArray(t) { @@ -527,19 +545,6 @@ function isDate(t) { function isObject$1(t) { return "[object Object]" === Object.prototype.toString.call(t); } -function intersection(t, ...e) { - null == t && (t = []); - const r = [], - n = arguments.length; - for (let e = 0, o = t.length; e < o; e++) { - const o = t[e]; - if (-1 !== r.indexOf(o)) continue; - let c = 1; - for (c = 1; c < n && -1 !== arguments[c].indexOf(o); c++); - c === n && r.push(o); - } - return r; -} function keys(t) { const e = []; for (const r in t) Object.prototype.hasOwnProperty.call(t, r) && e.push(r); @@ -628,42 +633,43 @@ function secondsInTheFuture(e) { } const MAX_PURCHASE_QUANTITY = 100; -const MUST_BE_IN_APP_MESSAGE_WARNING = - "inAppMessage must be an InAppMessage object"; -const MUST_BE_CARD_WARNING_SUFFIX = "must be a Card object"; const FEED_ANIMATION_DURATION = 500; -const LOG_CUSTOM_EVENT_STRING = "logCustomEvent"; -const SET_CUSTOM_USER_ATTRIBUTE_STRING = "setCustomUserAttribute"; -const BRAZE_MUST_BE_INITIALIZED_ERROR = - "Braze must be initialized before calling methods."; const GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT = 30; const GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT = 30; const LAST_REQUEST_TO_ENDPOINT_MS_AGO_DEFAULT = 72e5; -const MAX_ERROR_RETRIES_CONTENT_CARDS = 3; +const MAX_RETRY_COUNT_PER_REQUEST = 15; const REQUEST_ATTEMPT_DEFAULT = 1; +const REQUEST_BACKOFF_MIN_SLEEP_MS_DEFAULT = 1e4; +const REQUEST_BACKOFF_SCALE_FACTOR_DEFAULT = 3; +const REQUEST_BACKOFF_MAX_SLEEP_MS_DEFAULT = 3e5; +const CoreStrings = { + ee: "Braze must be initialized before calling methods.", + $e: "logCustomEvent", + Ku: "setCustomUserAttribute", +}; -class T { +class m { constructor() { - this._e = {}; + this.jn = {}; } - Nt(t) { + Rt(t) { if ("function" != typeof t) return null; - const i = p$1.W(); - return (this._e[i] = t), i; + const i = P$1.se(); + return (this.jn[i] = t), i; } removeSubscription(t) { - delete this._e[t]; + delete this.jn[t]; } removeAllSubscriptions() { - this._e = {}; + this.jn = {}; } - ic() { - return Object.keys(this._e).length; + De() { + return Object.keys(this.jn).length; } - Rt(t) { + L(t) { const i = []; - for (const s in this._e) { - const r = this._e[s]; + for (const s in this.jn) { + const r = this.jn[s]; i.push(r(t)); } return i; @@ -671,65 +677,65 @@ class T { } class Card { - constructor(t, i, s, h, n, l, e, r, u, E, o, T, I, a, c, N) { + constructor(t, i, s, h, l, n, e, r, u, E, T, o, a, I, N, A) { (this.id = t), (this.viewed = i), (this.title = s), (this.imageUrl = h), - (this.description = n), - (this.created = l), - (this.updated = e), - (this.categories = r), - (this.expiresAt = u), - (this.url = E), - (this.linkText = o), - (this.aspectRatio = T), - (this.extras = I), - (this.pinned = a), - (this.dismissible = c), - (this.clicked = N), + (this.description = l), + (this.updated = n), + (this.expiresAt = e), + (this.url = r), + (this.linkText = u), + (this.aspectRatio = E), + (this.extras = T), + (this.pinned = o), + (this.dismissible = a), + (this.clicked = I), + (this.language = N), + (this.altImageText = A), (this.id = t), (this.viewed = i || !1), (this.title = s || ""), (this.imageUrl = h), - (this.description = n || ""), - (this.created = l || null), - (this.updated = e || null), - (this.categories = r || []), - (this.expiresAt = u || null), - (this.url = E), - (this.linkText = o), - null == T + (this.description = l || ""), + (this.updated = n || null), + (this.expiresAt = e || null), + (this.url = r), + (this.linkText = u), + null == E ? (this.aspectRatio = null) - : ((T = parseFloat(T.toString())), - (this.aspectRatio = isNaN(T) ? null : T)), - (this.extras = I || {}), - (this.pinned = a || !1), - (this.dismissible = c || !1), + : ((E = parseFloat(E.toString())), + (this.aspectRatio = isNaN(E) ? null : E)), + (this.extras = T || {}), + (this.pinned = o || !1), + (this.dismissible = a || !1), (this.dismissed = !1), - (this.clicked = N || !1), + (this.clicked = I || !1), (this.isControl = !1), + (this.language = N || null), + (this.altImageText = A || null), (this.test = !1), - (this.Et = null), - (this.Tt = null), - (this.It = null); + (this.ti = null), + (this.ii = null), + (this.si = null); } subscribeToClickedEvent(t) { - return this.St().Nt(t); + return this.hi().Rt(t); } subscribeToDismissedEvent(t) { - return this.At().Nt(t); + return this.li().Rt(t); } removeSubscription(t) { - this.St().removeSubscription(t), this.At().removeSubscription(t); + this.hi().removeSubscription(t), this.li().removeSubscription(t); } removeAllSubscriptions() { - this.St().removeAllSubscriptions(), this.At().removeAllSubscriptions(); + this.hi().removeAllSubscriptions(), this.li().removeAllSubscriptions(); } dismissCard() { if (!this.dismissible || this.dismissed) return; "function" == typeof this.logCardDismissal && this.logCardDismissal(); - let t = this.T; + let t = this.ae; !t && this.id && (t = document.getElementById(this.id)), t && ((t.style.height = t.offsetHeight + "px"), @@ -741,158 +747,163 @@ class Card { (t.style.margin = "0"), setTimeout(function () { t && t.parentNode && t.parentNode.removeChild(t); - }, Card.Dt)); + }, Card.ni)); }, FEED_ANIMATION_DURATION)); } - St() { - return null == this.Et && (this.Et = new T()), this.Et; + hi() { + return null == this.ti && (this.ti = new m()), this.ti; } - At() { - return null == this.Tt && (this.Tt = new T()), this.Tt; + li() { + return null == this.ii && (this.ii = new m()), this.ii; } - K() { + Wt() { const t = new Date().valueOf(); return ( - !(null != this.It && t - this.It < Card.Ct) && - ((this.It = t), (this.viewed = !0), !0) + !(null != this.si && t - this.si < Card.ei) && + ((this.si = t), (this.viewed = !0), !0) ); } - p() { - (this.viewed = !0), (this.clicked = !0), this.St().Rt(); + $t() { + (this.viewed = !0), (this.clicked = !0), this.hi().L(); } - N() { + Ot() { return ( !(!this.dismissible || this.dismissed) && - ((this.dismissed = !0), this.At().Rt(), !0) + ((this.dismissed = !0), this.li().L(), !0) ); } - Lt(t) { - if (null == t || t[Card._t.ht] !== this.id) return !0; - if (t[Card._t.Ot]) return !1; + ri(t) { + if (null == t || t[Card.ui.rs] !== this.id) return !0; + if (t[Card.ui.Ei]) return !1; if ( - null != t[Card._t.nt] && + null != t[Card.ui.ps] && null != this.updated && - parseInt(t[Card._t.nt]) < convertMsToSeconds(this.updated.valueOf()) + parseInt(t[Card.ui.ps]) < convertMsToSeconds(this.updated.valueOf()) ) return !0; if ( - (t[Card._t.et] && !this.viewed && (this.viewed = !0), - t[Card._t.zt] && !this.clicked && (this.clicked = t[Card._t.zt]), - null != t[Card._t.rt] && (this.title = t[Card._t.rt]), - null != t[Card._t.ot] && (this.imageUrl = t[Card._t.ot]), - null != t[Card._t.ct] && (this.description = t[Card._t.ct]), - null != t[Card._t.nt]) + (t[Card.ui.os] && !this.viewed && (this.viewed = !0), + t[Card.ui.js] && !this.clicked && (this.clicked = t[Card.ui.js]), + null != t[Card.ui.cs] && (this.title = t[Card.ui.cs]), + null != t[Card.ui.ns] && (this.imageUrl = t[Card.ui.ns]), + null != t[Card.ui.ds] && (this.description = t[Card.ui.ds]), + null != t[Card.ui.ps]) ) { - const i = dateFromUnixTimestamp(t[Card._t.nt]); + const i = dateFromUnixTimestamp(t[Card.ui.ps]); null != i && (this.updated = i); } - if (null != t[Card._t.lt]) { + if (null != t[Card.ui.us]) { let i; - (i = t[Card._t.lt] === Card.Mt ? null : dateFromUnixTimestamp(t[Card._t.lt])), + (i = t[Card.ui.us] === Card.Ti ? null : dateFromUnixTimestamp(t[Card.ui.us])), (this.expiresAt = i); } if ( - (null != t[Card._t.URL] && (this.url = t[Card._t.URL]), - null != t[Card._t.ft] && (this.linkText = t[Card._t.ft]), - null != t[Card._t.xt]) + (null != t[Card.ui.URL] && (this.url = t[Card.ui.URL]), + null != t[Card.ui.ls] && (this.linkText = t[Card.ui.ls]), + null != t[Card.ui.fs]) ) { - const i = parseFloat(t[Card._t.xt].toString()); + const i = parseFloat(t[Card.ui.fs].toString()); this.aspectRatio = isNaN(i) ? null : i; } return ( - null != t[Card._t.bt] && (this.extras = t[Card._t.bt]), - null != t[Card._t.gt] && (this.pinned = t[Card._t.gt]), - null != t[Card._t.jt] && (this.dismissible = t[Card._t.jt]), - null != t[Card._t.kt] && (this.test = t[Card._t.kt]), + null != t[Card.ui.xs] && (this.extras = t[Card.ui.xs]), + null != t[Card.ui.bs] && (this.pinned = t[Card.ui.bs]), + null != t[Card.ui.gs] && (this.dismissible = t[Card.ui.gs]), + null != t[Card.ui.zs] && (this.language = t[Card.ui.zs]), + null != t[Card.ui.ks] && (this.altImageText = t[Card.ui.ks]), + null != t[Card.ui.qs] && (this.test = t[Card.ui.qs]), !0 ); } - Y() { - r$1.error("Must be implemented in a subclass"); - } -} -(Card.Mt = -1), - (Card._t = { - ht: "id", - et: "v", - jt: "db", - Ot: "r", - nt: "ca", - gt: "p", - lt: "ea", - bt: "e", - Z: "tp", - ot: "i", - rt: "tt", - ct: "ds", + gt() { + E$1.error("Must be implemented in a subclass"); + } +} +(Card.Ti = -1), + (Card.ui = { + rs: "id", + os: "v", + gs: "db", + Ei: "r", + ps: "ca", + bs: "p", + us: "ea", + xs: "e", + ts: "tp", + ns: "i", + cs: "tt", + ds: "ds", URL: "u", - ft: "dm", - xt: "ar", - zt: "cl", - kt: "t", + ls: "dm", + fs: "ar", + js: "cl", + qs: "t", + zs: "language", + ks: "image_alt", }), - (Card.it = { - st: "captioned_image", - Pt: "text_announcement", - Ut: "short_news", - Gt: "banner_image", - Xt: "control", + (Card.es = { + hs: "captioned_image", + oi: "text_announcement", + ai: "short_news", + Ii: "banner_image", + Ni: "control", }), - (Card.tt = { - ht: "id", - et: "v", - jt: "db", - dt: "cr", - nt: "ca", - gt: "p", - ut: "t", - lt: "ea", - bt: "e", - Z: "tp", - ot: "i", - rt: "tt", - ct: "ds", + (Card.ss = { + rs: "id", + os: "v", + gs: "db", + Ai: "cr", + ps: "ca", + bs: "p", + ci: "t", + us: "ea", + xs: "e", + ts: "tp", + ns: "i", + cs: "tt", + ds: "ds", URL: "u", - ft: "dm", - xt: "ar", - zt: "cl", - kt: "s", + ls: "dm", + fs: "ar", + js: "cl", + qs: "s", + zs: "l", + ks: "ia", }), - (Card.vt = { - Vt: "ADVERTISING", - Wt: "ANNOUNCEMENTS", - wt: "NEWS", - Ft: "SOCIAL", + (Card.mi = { + Si: "ADVERTISING", + Di: "ANNOUNCEMENTS", + pi: "NEWS", + di: "SOCIAL", }), - (Card.Dt = 400), - (Card.Ct = 1e4); + (Card.ni = 400), + (Card.ei = 1e4); class ImageOnly extends Card { - constructor(s, t, i, h, r, e, l, n, o, a, u, c, d, m) { - super(s, t, null, i, null, h, r, e, l, n, o, a, u, c, d, m), - (this._ = "ab-image-only"), - (this.S = !1), + constructor(s, t, i, h, l, r, e, n, o, u, a, c, d) { + super(s, t, null, i, null, h, l, r, null, e, n, o, u, a, c, d), + (this.ie = "ab-image-only"), + (this.ne = !1), (this.test = !1); } - Y() { + gt() { const s = {}; return ( - (s[Card.tt.Z] = Card.it.Gt), - (s[Card.tt.ht] = this.id), - (s[Card.tt.et] = this.viewed), - (s[Card.tt.ot] = this.imageUrl), - (s[Card.tt.nt] = this.updated), - (s[Card.tt.dt] = this.created), - (s[Card.tt.ut] = this.categories), - (s[Card.tt.lt] = this.expiresAt), - (s[Card.tt.URL] = this.url), - (s[Card.tt.ft] = this.linkText), - (s[Card.tt.xt] = this.aspectRatio), - (s[Card.tt.bt] = this.extras), - (s[Card.tt.gt] = this.pinned), - (s[Card.tt.jt] = this.dismissible), - (s[Card.tt.zt] = this.clicked), - (s[Card.tt.kt] = this.test), + (s[Card.ss.ts] = Card.es.Ii), + (s[Card.ss.rs] = this.id), + (s[Card.ss.os] = this.viewed), + (s[Card.ss.ns] = this.imageUrl), + (s[Card.ss.ps] = this.updated), + (s[Card.ss.us] = this.expiresAt), + (s[Card.ss.URL] = this.url), + (s[Card.ss.fs] = this.aspectRatio), + (s[Card.ss.xs] = this.extras), + (s[Card.ss.bs] = this.pinned), + (s[Card.ss.gs] = this.dismissible), + (s[Card.ss.js] = this.clicked), + (s[Card.ss.zs] = this.language), + (s[Card.ss.ks] = this.altImageText), + (s[Card.ss.qs] = this.test), s ); } @@ -901,31 +912,31 @@ class ImageOnly extends Card { class CaptionedImage extends Card { constructor(t, s, i, h, e, r, a, o, c, n, d, p, u, l, m, f) { super(t, s, i, h, e, r, a, o, c, n, d, p, u, l, m, f), - (this._ = "ab-captioned-image"), - (this.S = !0), + (this.ie = "ab-captioned-image"), + (this.ne = !0), (this.test = !1); } - Y() { + gt() { const t = {}; return ( - (t[Card.tt.Z] = Card.it.st), - (t[Card.tt.ht] = this.id), - (t[Card.tt.et] = this.viewed), - (t[Card.tt.rt] = this.title), - (t[Card.tt.ot] = this.imageUrl), - (t[Card.tt.ct] = this.description), - (t[Card.tt.nt] = this.updated), - (t[Card.tt.dt] = this.created), - (t[Card.tt.ut] = this.categories), - (t[Card.tt.lt] = this.expiresAt), - (t[Card.tt.URL] = this.url), - (t[Card.tt.ft] = this.linkText), - (t[Card.tt.xt] = this.aspectRatio), - (t[Card.tt.bt] = this.extras), - (t[Card.tt.gt] = this.pinned), - (t[Card.tt.jt] = this.dismissible), - (t[Card.tt.zt] = this.clicked), - (t[Card.tt.kt] = this.test), + (t[Card.ss.ts] = Card.es.hs), + (t[Card.ss.rs] = this.id), + (t[Card.ss.os] = this.viewed), + (t[Card.ss.cs] = this.title), + (t[Card.ss.ns] = this.imageUrl), + (t[Card.ss.ds] = this.description), + (t[Card.ss.ps] = this.updated), + (t[Card.ss.us] = this.expiresAt), + (t[Card.ss.URL] = this.url), + (t[Card.ss.ls] = this.linkText), + (t[Card.ss.fs] = this.aspectRatio), + (t[Card.ss.xs] = this.extras), + (t[Card.ss.bs] = this.pinned), + (t[Card.ss.gs] = this.dismissible), + (t[Card.ss.js] = this.clicked), + (t[Card.ss.zs] = this.language), + (t[Card.ss.ks] = this.altImageText), + (t[Card.ss.qs] = this.test), t ); } @@ -934,65 +945,65 @@ class CaptionedImage extends Card { class ClassicCard extends Card { constructor(s, t, i, h, r, c, e, a, o, d, l, n, u, p, f, m) { super(s, t, i, h, r, c, e, a, o, d, l, n, u, p, f, m), - (this._ = "ab-classic-card"), - (this.S = !0); + (this.ie = "ab-classic-card"), + (this.ne = !0); } - Y() { + gt() { const s = {}; return ( - (s[Card.tt.Z] = Card.it.Ut), - (s[Card.tt.ht] = this.id), - (s[Card.tt.et] = this.viewed), - (s[Card.tt.rt] = this.title), - (s[Card.tt.ot] = this.imageUrl), - (s[Card.tt.ct] = this.description), - (s[Card.tt.nt] = this.updated), - (s[Card.tt.dt] = this.created), - (s[Card.tt.ut] = this.categories), - (s[Card.tt.lt] = this.expiresAt), - (s[Card.tt.URL] = this.url), - (s[Card.tt.ft] = this.linkText), - (s[Card.tt.xt] = this.aspectRatio), - (s[Card.tt.bt] = this.extras), - (s[Card.tt.gt] = this.pinned), - (s[Card.tt.jt] = this.dismissible), - (s[Card.tt.zt] = this.clicked), - (s[Card.tt.kt] = this.test), + (s[Card.ss.ts] = Card.es.ai), + (s[Card.ss.rs] = this.id), + (s[Card.ss.os] = this.viewed), + (s[Card.ss.cs] = this.title), + (s[Card.ss.ns] = this.imageUrl), + (s[Card.ss.ds] = this.description), + (s[Card.ss.ps] = this.updated), + (s[Card.ss.us] = this.expiresAt), + (s[Card.ss.URL] = this.url), + (s[Card.ss.ls] = this.linkText), + (s[Card.ss.fs] = this.aspectRatio), + (s[Card.ss.xs] = this.extras), + (s[Card.ss.bs] = this.pinned), + (s[Card.ss.gs] = this.dismissible), + (s[Card.ss.js] = this.clicked), + (s[Card.ss.zs] = this.language), + (s[Card.ss.ks] = this.altImageText), + (s[Card.ss.qs] = this.test), s ); } } class ControlCard extends Card { - constructor(l, t, s, i, n, r) { - super(l, t, null, null, null, null, s, null, i, null, null, null, n, r), + constructor(t, s, l, i, r, n) { + super(t, s, null, null, null, l, i, null, null, null, r, n), (this.isControl = !0), - (this._ = "ab-control-card"), - (this.S = !1); + (this.ie = "ab-control-card"), + (this.ne = !1); } - Y() { - const l = {}; + gt() { + const t = {}; return ( - (l[Card.tt.Z] = Card.it.Xt), - (l[Card.tt.ht] = this.id), - (l[Card.tt.et] = this.viewed), - (l[Card.tt.nt] = this.updated), - (l[Card.tt.lt] = this.expiresAt), - (l[Card.tt.bt] = this.extras), - (l[Card.tt.gt] = this.pinned), - (l[Card.tt.kt] = this.test), - l + (t[Card.ss.ts] = Card.es.Ni), + (t[Card.ss.rs] = this.id), + (t[Card.ss.os] = this.viewed), + (t[Card.ss.ps] = this.updated), + (t[Card.ss.us] = this.expiresAt), + (t[Card.ss.xs] = this.extras), + (t[Card.ss.bs] = this.pinned), + (t[Card.ss.qs] = this.test), + t ); } } function getAlias(e) { - const t = null == e ? void 0 : e.j(STORAGE_KEYS.C._E); + const t = null == e ? void 0 : e.dt(STORAGE_KEYS.ft.uE); let n; return t && (n = { label: t.l, name: t.a }), n; } -class ve { +class De { constructor(t, s, i, r, e) { (this.userId = t), (this.type = s), @@ -1005,7 +1016,7 @@ class ve { (this.sessionId = r), (this.data = e); } - Mr() { + Hn() { var t; const s = { name: this.type, @@ -1014,14 +1025,14 @@ class ve { session_id: this.sessionId, }; null != this.userId && (s.user_id = this.userId); - const i = (null === (t = e.Sr()) || void 0 === t ? void 0 : t.Fh()) || !1; + const i = (null === (t = r.Sr()) || void 0 === t ? void 0 : t.wh()) || !1; if (!s.user_id && !i) { - const t = getAlias(e.l()); + const t = getAlias(r.p()); t && (s.alias = t); } return s; } - Y() { + gt() { return { u: this.userId, t: this.type, @@ -1031,13 +1042,13 @@ class ve { }; } static fromJson(t) { - return new ve(t.user_id, t.name, t.time, t.session_id, t.data); + return new De(t.user_id, t.name, t.time, t.session_id, t.data); } - static RE(t) { + static gE(t) { return null != t && isObject$1(t) && null != t.t && "" !== t.t; } - static qn(t) { - return new ve(t.u, t.t, t.ts, t.s, t.d); + static _u(t) { + return new De(t.u, t.t, t.ts, t.s, t.d); } } @@ -1046,19 +1057,19 @@ const getErrorMessage = (r) => class _t { constructor(t, e, i) { - (this.eu = t), - null == t && (t = p$1.W()), - !i || isNaN(i) ? (this.Dl = new Date().valueOf()) : (this.Dl = i), - (this.eu = t), - (this.Wl = new Date().valueOf()), - (this.Hl = e); - } - Y() { - return `g:${encodeURIComponent(this.eu)}|e:${this.Hl}|c:${this.Dl}|l:${ - this.Wl + (this.Tu = t), + null == t && (t = P$1.se()), + !i || isNaN(i) ? (this.lm = new Date().valueOf()) : (this.lm = i), + (this.Tu = t), + (this.gm = new Date().valueOf()), + (this.pm = e); + } + gt() { + return `g:${encodeURIComponent(this.Tu)}|e:${this.pm}|c:${this.lm}|l:${ + this.gm }`; } - static hE(t) { + static AE(t) { if ("string" != typeof t) return null; const e = t.lastIndexOf("|e:"), i = t.substring(0, e), @@ -1069,7 +1080,7 @@ class _t { (t = t.replace(i, `g:${n}`)) ); } - static qn(t) { + static _u(t) { let e; if ("string" == typeof t) try { @@ -1081,15 +1092,15 @@ class _t { if (!isNaN(e)) return e; }; (e = new _t(decodeURIComponent(r(i[0])), n(i[1]), n(i[2]))), - (e.Wl = n(i[3])); + (e.gm = n(i[3])); } catch (e) { - r$1.info( + E$1.info( `Unable to parse cookie string ${t}, failed with error: ${getErrorMessage(e)}`, ); } else { if (null == t || null == t.g) return null; - (e = new _t(t.g, t.e, t.c)), (e.Wl = t.l); + (e = new _t(t.g, t.e, t.c)), (e.gm = t.l); } return e; } @@ -1113,13 +1124,13 @@ function decodeBrazeActions(t) { const r = new Uint16Array(n.buffer); return String.fromCharCode(...r); } catch (t) { - return r$1.error("Unable to decode Base64: " + t), null; + return E$1.error("Unable to decode Base64: " + t), null; } } const BRAZE_ACTIONS = { types: { - ro: "container", + io: "container", logCustomEvent: "logCustomEvent", setEmailNotificationSubscriptionType: "setEmailNotificationSubscriptionType", @@ -1130,55 +1141,49 @@ const BRAZE_ACTIONS = { removeFromSubscriptionGroup: "removeFromSubscriptionGroup", addToCustomAttributeArray: "addToCustomAttributeArray", removeFromCustomAttributeArray: "removeFromCustomAttributeArray", - no: "openLink", - ao: "openLinkInWebView", + mo: "openLink", + uo: "openLinkInWebView", }, - properties: { type: "type", oo: "steps", eo: "args" }, + properties: { type: "type", eo: "steps", so: "args" }, }; const INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES = { - Vi: "unknownBrazeAction", - Yi: "noPushPrompt", -}; -const ineligibleBrazeActionURLErrorMessage = (t, o) => { - switch (t) { - case INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Vi: - return `${o} contains an unknown braze action type and will not be displayed.`; - case INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Yi: - return `${o} contains a push prompt braze action, but is not eligible for a push prompt. Ignoring.`; - default: - return ""; - } + Pn: "unknownBrazeAction", + cp: "noPushPrompt", }; +const ineligibleBrazeActionURLErrorMessage = (t, o) => + t === INELIGIBLE_BRAZE_ACTION_URL_ERROR_TYPES.Pn + ? `${o} contains an unknown braze action type and will not be displayed.` + : ""; function getDecodedBrazeAction(t) { try { const o = t.match(BRAZE_ACTION_URI_REGEX), - n = o ? o[0].length : null, - e = n ? t.substring(n) : null; - if (null == n || n > t.length - 1 || !e) - return void r$1.error( + r = o ? o[0].length : null, + n = r ? t.substring(r) : null; + if (null == r || r > t.length - 1 || !n) + return void E$1.error( `Did not find base64 encoded brazeAction in url to process : ${t}`, ); - const i = decodeBrazeActions(e); - return i - ? JSON.parse(i) - : void r$1.error(`Failed to decode base64 encoded brazeAction: ${e}`); + const e = decodeBrazeActions(n); + return e + ? JSON.parse(e) + : void E$1.error(`Failed to decode base64 encoded brazeAction: ${n}`); } catch (o) { - return void r$1.error(`Failed to process brazeAction URL ${t} : ${getErrorMessage(o)}`); + return void E$1.error(`Failed to process brazeAction URL ${t} : ${getErrorMessage(o)}`); } } -function so(t, o) { +function po(t, o) { let r = !1; if (o) for (const n of o) if (((r = r || t(n)), r)) return !0; return !1; } function containsUnknownBrazeAction(t) { const o = BRAZE_ACTIONS.properties.type, - r = BRAZE_ACTIONS.properties.oo; + r = BRAZE_ACTIONS.properties.eo; try { if (null == t) return !0; const n = t[o]; - return n === BRAZE_ACTIONS.types.ro - ? so(containsUnknownBrazeAction, t[r]) + return n === BRAZE_ACTIONS.types.io + ? po(containsUnknownBrazeAction, t[r]) : !isValidBrazeActionType(n); } catch (t) { return !0; @@ -1187,10 +1192,10 @@ function containsUnknownBrazeAction(t) { function containsPushPrimerBrazeAction(t) { if (!t || !isValidBrazeActionJson(t)) return !1; const o = BRAZE_ACTIONS.properties.type, - r = BRAZE_ACTIONS.properties.oo, + r = BRAZE_ACTIONS.properties.eo, n = t[o]; - return n === BRAZE_ACTIONS.types.ro - ? so(containsPushPrimerBrazeAction, t[r]) + return n === BRAZE_ACTIONS.types.io + ? po(containsPushPrimerBrazeAction, t[r]) : n === BRAZE_ACTIONS.types.requestPushPermission; } @@ -1207,21 +1212,22 @@ const CUSTOM_ATTRIBUTE_RESERVED_OPERATORS = [ "$google_ad_personalization", "$google_ad_user_data", ]; -const EMAIL_ADDRESS_REGEX = new RegExp(/^.+@.+\..+$/); +const EMAIL_ADDRESS_REGEX = /^[^@\s]+@[^@\s]+\.[^@\s]+$/; const BRAZE_ACTION_URI_REGEX = /^brazeActions:\/\/v\d+\//; -function validateCustomString(t, e, n) { - const o = +const VALID_UTF8_STRING_NO_WHITESPACES_REGEX = /^[^\s]+$/; +function validateCustomString(t, e, r) { + const n = null != t && "string" == typeof t && ("" === t || null != t.match(CUSTOM_DATA_REGEX)); - return o || r$1.error(`Cannot ${e} because ${n} "${t}" is invalid.`), o; + return n || E$1.error(`Cannot ${e} because ${r} "${t}" is invalid.`), n; } function validateCustomAttributeKey(t) { return ( null != t && t.match(CUSTOM_ATTRIBUTE_SPECIAL_CHARS_REGEX) && -1 === CUSTOM_ATTRIBUTE_RESERVED_OPERATORS.indexOf(t) && - r$1.warn("Custom attribute keys cannot contain '$' or '.'"), + E$1.warn("Custom attribute keys cannot contain '$' or '.'"), validateCustomString(t, "set custom user attribute", "the given key") ); } @@ -1231,141 +1237,141 @@ function validatePropertyType(t) { null == t || "number" === e || "boolean" === e || isDate(t) || "string" === e ); } -function _validateNestedProperties(t, e, n) { - const o = -1 !== n; - if (o && n > 50) - return r$1.error("Nested attributes cannot be more than 50 levels deep."), !1; - const i = o ? n + 1 : -1; +function _validateNestedProperties(t, e, r) { + const n = -1 !== r; + if (n && r > 50) + return E$1.error("Nested attributes cannot be more than 50 levels deep."), !1; + const o = n ? r + 1 : -1; if (isArray(t) && isArray(e)) { for (let r = 0; r < t.length && r < e.length; r++) if ( (isDate(t[r]) && (e[r] = toValidBackendTimeString(t[r])), - !_validateNestedProperties(t[r], e[r], i)) + !_validateNestedProperties(t[r], e[r], o)) ) return !1; } else { if (!isObject$1(t)) return validatePropertyType(t); for (const r of keys(t)) { - const n = t[r]; - if (o && !validateCustomAttributeKey(r)) return !1; - if (isDate(n)) { - e[r] = toValidBackendTimeString(n); + const i = t[r]; + if (n && !validateCustomAttributeKey(r)) return !1; + if (isDate(i)) { + e[r] = toValidBackendTimeString(i); } - if (!_validateNestedProperties(n, e[r], i)) return !1; + if (!_validateNestedProperties(i, e[r], o)) return !1; } } return !0; } -function _validateEventPropertyValue(t, e, n, o, i) { - let a; +function _validateEventPropertyValue(t, e, r, n, o) { + let i; return ( - (a = + (i = isObject$1(t) || isArray(t) - ? _validateNestedProperties(t, e, i ? 1 : -1) + ? _validateNestedProperties(t, e, o ? 1 : -1) : validatePropertyType(t)), - a || r$1.error(`Cannot ${n} because ${o} "${t}" is invalid.`), - a + i || E$1.error(`Cannot ${r} because ${n} "${t}" is invalid.`), + i ); } -function validateStandardString(t, e, n, o = !1) { - const i = "string" == typeof t || (null === t && o); - return i || r$1.error(`Cannot ${e} because ${n} "${t}" is invalid.`), i; +function validateStandardString(t, e, r, n = !1) { + const o = "string" == typeof t || (null === t && n); + return o || E$1.error(`Cannot ${e} because ${r} "${t}" is invalid.`), o; } -function validateCustomProperties(t, e, n, o, i) { +function validateCustomProperties(t, e, r, n, o) { if ((null == t && (t = {}), "object" != typeof t || isArray(t))) return ( - r$1.error(`${e} requires that ${n} be an object. Ignoring ${i}.`), + E$1.error(`${e} requires that ${r} be an object. Ignoring ${o}.`), [!1, null] ); - let a, s; - e === SET_CUSTOM_USER_ATTRIBUTE_STRING ? ((a = 76800), (s = "75KB")) : ((a = 51200), (s = "50KB")); - const u = JSON.stringify(t); - if (getByteLength(u) > a) + let i, a; + e === CoreStrings.Ku ? ((i = 76800), (a = "75KB")) : ((i = 51200), (a = "50KB")); + const s = JSON.stringify(t); + if (getByteLength(s) > i) return ( - r$1.error( - `Could not ${o} because ${n} was greater than the max size of ${s}.`, + E$1.error( + `Could not ${n} because ${r} was greater than the max size of ${a}.`, ), [!1, null] ); - let l; + let u; try { - l = JSON.parse(u); + u = JSON.parse(s); } catch (t) { return ( - r$1.error(`Could not ${o} because ${n} did not contain valid JSON.`), + E$1.error(`Could not ${n} because ${r} did not contain valid JSON.`), [!1, null] ); } for (const r in t) { - if (e === SET_CUSTOM_USER_ATTRIBUTE_STRING && !validateCustomAttributeKey(r)) return [!1, null]; - if (!validateCustomString(r, o, `the ${i} property name`)) + if (e === CoreStrings.Ku && !validateCustomAttributeKey(r)) return [!1, null]; + if (!validateCustomString(r, n, `the ${o} property name`)) return [!1, null]; - const n = t[r]; - if (e !== SET_CUSTOM_USER_ATTRIBUTE_STRING && null == n) { - delete t[r], delete l[r]; + const i = t[r]; + if (e !== CoreStrings.Ku && null == i) { + delete t[r], delete u[r]; continue; } - isDate(n) && (l[r] = toValidBackendTimeString(n)); + isDate(i) && (u[r] = toValidBackendTimeString(i)); if ( !_validateEventPropertyValue( + i, + u[r], n, - l[r], - o, - `the ${i} property "${r}"`, - e === SET_CUSTOM_USER_ATTRIBUTE_STRING, + `the ${o} property "${r}"`, + e === CoreStrings.Ku, ) ) return [!1, null]; } - return [!0, l]; + return [!0, u]; } function validateCustomAttributeArrayType(t, e) { - let n = !1, - o = !1; - const i = () => { - r$1.error( + let r = !1, + n = !1; + const o = () => { + E$1.error( "Custom attribute arrays must be either string arrays or object arrays.", ); }; - for (const r of e) - if ("string" == typeof r) { - if (o) return i(), [!1, !1]; + for (const i of e) + if ("string" == typeof i) { + if (n) return o(), [!1, !1]; if ( !validateCustomString( - r, + i, `set custom user attribute "${t}"`, "the element in the given array", ) ) return [!1, !1]; - n = !0; + r = !0; } else { - if (!isObject$1(r)) return i(), [!1, !1]; - if (n) return i(), [!1, !1]; + if (!isObject$1(i)) return o(), [!1, !1]; + if (r) return o(), [!1, !1]; if ( !validateCustomProperties( - r, - SET_CUSTOM_USER_ATTRIBUTE_STRING, + i, + CoreStrings.Ku, "attribute value", `set custom user attribute "${t}"`, "custom user attribute", ) ) return [!1, !1]; - o = !0; + n = !0; } - return [n, o]; + return [r, n]; } function isValidEmail(t) { - return ( - "string" == typeof t && null != t.toLowerCase().match(EMAIL_ADDRESS_REGEX) - ); + if ("string" != typeof t) return !1; + const e = t.length; + return !(0 === e || e > 256) && EMAIL_ADDRESS_REGEX.test(t.toLowerCase()); } function isValidBrazeActionJson(t) { if (!(BRAZE_ACTIONS.properties.type in t)) return !1; switch (t[BRAZE_ACTIONS.properties.type]) { - case BRAZE_ACTIONS.types.ro: - if (BRAZE_ACTIONS.properties.oo in t) return !0; + case BRAZE_ACTIONS.types.io: + if (BRAZE_ACTIONS.properties.eo in t) return !0; break; case BRAZE_ACTIONS.types.logCustomEvent: case BRAZE_ACTIONS.types.setEmailNotificationSubscriptionType: @@ -1375,9 +1381,9 @@ function isValidBrazeActionJson(t) { case BRAZE_ACTIONS.types.removeFromSubscriptionGroup: case BRAZE_ACTIONS.types.addToCustomAttributeArray: case BRAZE_ACTIONS.types.removeFromCustomAttributeArray: - case BRAZE_ACTIONS.types.no: - case BRAZE_ACTIONS.types.ao: - if (BRAZE_ACTIONS.properties.eo in t) return !0; + case BRAZE_ACTIONS.types.mo: + case BRAZE_ACTIONS.types.uo: + if (BRAZE_ACTIONS.properties.so in t) return !0; break; case BRAZE_ACTIONS.types.requestPushPermission: return !0; @@ -1395,41 +1401,44 @@ function isValidBrazeActionType(t) { e ); } +function isValidBannerPlacementId(t) { + return VALID_UTF8_STRING_NO_WHITESPACES_REGEX.test(t); +} class User { constructor(t, e) { - (this.yt = t), (this.Ui = e), (this.yt = t), (this.Ui = e); + (this.vs = t), (this.Ru = e), (this.vs = t), (this.Ru = e); } getUserId(t) { - const e = this.yt.getUserId(); + const e = this.vs.getUserId(); if ("function" != typeof t) return e; - r$1.warn( + E$1.warn( "The callback for getUserId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getUser().getUserId()`)", ), t(e); } addAlias(t, e) { return !validateStandardString(t, "add alias", "the alias", !1) || t.length <= 0 - ? (r$1.error("addAlias requires a non-empty alias"), !1) + ? (E$1.error("addAlias requires a non-empty alias"), !1) : !validateStandardString(e, "add alias", "the label", !1) || e.length <= 0 - ? (r$1.error("addAlias requires a non-empty label"), !1) - : this.Ui.Cn(t, e).L; + ? (E$1.error("addAlias requires a non-empty label"), !1) + : this.Ru.Gu(t, e).W; } setFirstName(t) { return ( !!validateStandardString(t, "set first name", "the firstName", !0) && - this.yt.nu("first_name", t) + this.vs.zu("first_name", t) ); } setLastName(t) { return ( - !!validateStandardString(t, "set last name", "the lastName", !0) && this.yt.nu("last_name", t) + !!validateStandardString(t, "set last name", "the lastName", !0) && this.vs.zu("last_name", t) ); } setEmail(t) { return null === t || isValidEmail(t) - ? this.yt.nu("email", t) - : (r$1.error( + ? this.vs.zu("email", t) + : (E$1.error( `Cannot set email address - "${t}" did not pass RFC-5322 validation.`, ), !1); @@ -1445,42 +1454,44 @@ class User { `Gender "${t}" is not a valid gender.`, "User.Genders", ) - ) && this.yt.nu("gender", t) + ) && this.vs.zu("gender", t) ); } - setDateOfBirth(t, e, s) { - return null === t && null === e && null === s - ? this.yt.nu("dob", null) + setDateOfBirth(t, e, r) { + return null === t && null === e && null === r + ? this.vs.zu("dob", null) : ((t = null != t ? parseInt(t.toString()) : null), (e = null != e ? parseInt(e.toString()) : null), - (s = null != s ? parseInt(s.toString()) : null), + (r = null != r ? parseInt(r.toString()) : null), null == t || null == e || - null == s || + null == r || isNaN(t) || isNaN(e) || - isNaN(s) || + isNaN(r) || e > 12 || e < 1 || - s > 31 || - s < 1 - ? (r$1.error( + r > 31 || + r < 1 + ? (E$1.error( "Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);", ), !1) - : this.yt.nu("dob", `${t}-${e}-${s}`)); + : this.vs.zu("dob", `${t}-${e}-${r}`)); } setCountry(t) { - return !!validateStandardString(t, "set country", "the country", !0) && this.yt.nu("country", t); + return ( + !!validateStandardString(t, "set country", "the country", !0) && this.vs.zu("country", t) + ); } setHomeCity(t) { return ( - !!validateStandardString(t, "set home city", "the homeCity", !0) && this.yt.nu("home_city", t) + !!validateStandardString(t, "set home city", "the homeCity", !0) && this.vs.zu("home_city", t) ); } setLanguage(t) { return ( - !!validateStandardString(t, "set language", "the language", !0) && this.yt.nu("language", t) + !!validateStandardString(t, "set language", "the language", !0) && this.vs.zu("language", t) ); } setEmailNotificationSubscriptionType(t) { @@ -1490,7 +1501,7 @@ class User { t, `Email notification setting "${t}" is not a valid subscription type.`, "User.NotificationSubscriptionTypes", - ) && this.yt.nu("email_subscribe", t) + ) && this.vs.zu("email_subscribe", t) ); } setPushNotificationSubscriptionType(t) { @@ -1500,56 +1511,56 @@ class User { t, `Push notification setting "${t}" is not a valid subscription type.`, "User.NotificationSubscriptionTypes", - ) && this.yt.nu("push_subscribe", t) + ) && this.vs.zu("push_subscribe", t) ); } setPhoneNumber(t) { return ( !!validateStandardString(t, "set phone number", "the phoneNumber", !0) && - (null === t || t.match(User.En) - ? this.yt.nu("phone", t) - : (r$1.error(`Cannot set phone number - "${t}" did not pass validation.`), + (null === t || t.match(User.Hu) + ? this.vs.zu("phone", t) + : (E$1.error(`Cannot set phone number - "${t}" did not pass validation.`), !1)) ); } - setLastKnownLocation(t, e, s, n, i) { + setLastKnownLocation(t, e, r, s, n) { return null == t || null == e - ? (r$1.error( + ? (E$1.error( "Cannot set last-known location - latitude and longitude are required.", ), !1) : ((t = parseFloat(t.toString())), (e = parseFloat(e.toString())), + null != r && (r = parseFloat(r.toString())), null != s && (s = parseFloat(s.toString())), null != n && (n = parseFloat(n.toString())), - null != i && (i = parseFloat(i.toString())), isNaN(t) || isNaN(e) || + (null != r && isNaN(r)) || (null != s && isNaN(s)) || - (null != n && isNaN(n)) || - (null != i && isNaN(i)) - ? (r$1.error( + (null != n && isNaN(n)) + ? (E$1.error( "Cannot set last-known location - all supplied parameters must be numeric.", ), !1) : t > 90 || t < -90 || e > 180 || e < -180 - ? (r$1.error( + ? (E$1.error( "Cannot set last-known location - latitude and longitude are bounded by ±90 and ±180 respectively.", ), !1) - : (null != s && s < 0) || (null != i && i < 0) - ? (r$1.error( + : (null != r && r < 0) || (null != n && n < 0) + ? (E$1.error( "Cannot set last-known location - accuracy and altitudeAccuracy may not be negative.", ), !1) - : this.Ui.setLastKnownLocation(this.yt.getUserId(), t, e, n, s, i).L); + : this.Ru.setLastKnownLocation(this.vs.getUserId(), t, e, s, r, n).W); } setCustomUserAttribute(t, e, r) { if (!validateCustomAttributeKey(t)) return !1; const s = (e) => { const [r] = validateCustomProperties( e, - SET_CUSTOM_USER_ATTRIBUTE_STRING, + CoreStrings.Ku, "attribute value", `set custom user attribute "${t}"`, "custom user attribute", @@ -1559,11 +1570,11 @@ class User { if (isArray(e)) { const [r, n] = validateCustomAttributeArrayType(t, e); if (!r && !n && 0 !== e.length) return !1; - if (r || 0 === e.length) return this.Ui.Fn(i.$n, t, e).L; + if (r || 0 === e.length) return this.Ru.Mu(f.Yu, t, e).W; for (const t of e) if (!s(t)) return !1; } else if (isObject$1(e)) { if (!s(e)) return !1; - if (r) return this.Ui.Fn(i.Bn, t, e).L; + if (r) return this.Ru.Mu(f.Vu, t, e).W; } else { if (!(void 0 !== e && validatePropertyType(e))) return !1; if ( @@ -1577,7 +1588,7 @@ class User { ) return !1; } - return this.yt.setCustomUserAttribute(t, e); + return this.vs.setCustomUserAttribute(t, e); } addToCustomAttributeArray(t, e) { return ( @@ -1586,7 +1597,7 @@ class User { null != e && !validateCustomString(e, "add to custom user attribute array", "the given value") ) && - this.Ui.Fn(i.Ln, t, e).L + this.Ru.Mu(f.Qu, t, e).W ); } removeFromCustomAttributeArray(t, e) { @@ -1596,35 +1607,35 @@ class User { null != e && !validateCustomString(e, "remove from custom user attribute array", "the given value") ) && - this.Ui.Fn(i.Rn, t, e).L + this.Ru.Mu(f.Xu, t, e).W ); } incrementCustomUserAttribute(t, e) { if (!validateCustomString(t, "increment custom user attribute", "the given key")) return !1; null == e && (e = 1); - const s = parseInt(e.toString()); - return isNaN(s) || s !== parseFloat(e.toString()) - ? (r$1.error( + const r = parseInt(e.toString()); + return isNaN(r) || r !== parseFloat(e.toString()) + ? (E$1.error( `Cannot increment custom user attribute because the given incrementValue "${e}" is not an integer.`, ), !1) - : this.Ui.Fn(i.On, t, s).L; + : this.Ru.Mu(f.Zu, t, r).W; } - setCustomLocationAttribute(t, e, s) { + setCustomLocationAttribute(t, e, r) { return ( !!validateCustomString(t, "set custom location attribute", "the given key") && - ((null !== e || null !== s) && + ((null !== e || null !== r) && ((e = null != e ? parseFloat(e.toString()) : null), - (s = null != s ? parseFloat(s.toString()) : null), - (null == e && null != s) || - (null != e && null == s) || + (r = null != r ? parseFloat(r.toString()) : null), + (null == e && null != r) || + (null != e && null == r) || (null != e && (isNaN(e) || e > 90 || e < -90)) || - (null != s && (isNaN(s) || s > 180 || s < -180))) - ? (r$1.error( + (null != r && (isNaN(r) || r > 180 || r < -180))) + ? (E$1.error( "Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by ±90 and ±180 respectively, or must both be null for removal.", ), !1) - : this.Ui.Gn(t, e, s).L) + : this.Ru.Na(t, e, r).W) ); } addToSubscriptionGroup(t) { @@ -1634,11 +1645,11 @@ class User { "subscription group ID", !1, ) || t.length <= 0 - ? (r$1.error( + ? (E$1.error( "addToSubscriptionGroup requires a non-empty subscription group ID", ), !1) - : this.Ui.Hn(t, User.Kn.SUBSCRIBED).L; + : this.Ru.Ra(t, User.Pa.SUBSCRIBED).W; } removeFromSubscriptionGroup(t) { return !validateStandardString( @@ -1647,17 +1658,28 @@ class User { "subscription group ID", !1, ) || t.length <= 0 - ? (r$1.error( + ? (E$1.error( "removeFromSubscriptionGroup requires a non-empty subscription group ID", ), !1) - : this.Ui.Hn(t, User.Kn.UNSUBSCRIBED).L; + : this.Ru.Ra(t, User.Pa.UNSUBSCRIBED).W; + } + setLineId(t) { + return validateStandardString(t, "set LINE user ID", "the ID", !0) && + 0 !== (null == t ? void 0 : t.length) + ? t && t.length > User.Oa + ? (E$1.error( + `Rejected LINE user ID ${t} because it is longer than ${User.Oa} characters.`, + ), + !1) + : this.vs.zu("native_line_id", t) + : (E$1.error("setLineId requires a non-empty ID"), !1); } - Pn(t, e, r, s, n) { - this.yt.Pn(t, e, r, s, n), this.Ui.Mn(); + gu(t, e, r, s, n) { + this.vs.gu(t, e, r, s, n), this.Ru.Ya(); } - Sn(t) { - this.yt.Sn(t); + wu(t) { + this.vs.wu(t); } } (User.Genders = { @@ -1673,23 +1695,24 @@ class User { SUBSCRIBED: "subscribed", UNSUBSCRIBED: "unsubscribed", }), - (User.En = /^[0-9 .\\(\\)\\+\\-]+$/), - (User.Kn = { SUBSCRIBED: "subscribed", UNSUBSCRIBED: "unsubscribed" }), - (User.Yn = "user_id"), - (User.lu = "custom"), - (User.lr = 997); - -class ge { + (User.Hu = /^[0-9 .\\(\\)\\+\\-]+$/), + (User.Pa = { SUBSCRIBED: "subscribed", UNSUBSCRIBED: "unsubscribed" }), + (User.Va = "user_id"), + (User.Bu = "custom"), + (User.mr = 997), + (User.Oa = 33); + +class Oe { constructor() {} - ef() {} - sf() {} - Da(t) {} - static ff(t, e) { + ff() {} + cf() {} + rc(t) {} + static lf(t, e) { if (t && e) - if (((t = t.toLowerCase()), isArray(e.nf))) { - for (let r = 0; r < e.nf.length; r++) - if (-1 !== t.indexOf(e.nf[r].toLowerCase())) return e.identity; - } else if (-1 !== t.indexOf(e.nf.toLowerCase())) return e.identity; + if (((t = t.toLowerCase()), isArray(e.uf))) { + for (let r = 0; r < e.uf.length; r++) + if (-1 !== t.indexOf(e.uf[r].toLowerCase())) return e.identity; + } else if (-1 !== t.indexOf(e.uf.toLowerCase())) return e.identity; } } @@ -1699,15 +1722,16 @@ const Browsers = { oO: "Opera", Bg: "Safari", OO: "Firefox", + Sg: "ChatGPTBrowser", }; const OperatingSystems = { - xg: "Android", - io: "iOS", + Dg: "Android", + co: "iOS", Pg: "Mac", - Og: "Windows", + kg: "Windows", }; -class ai extends ge { +class gi extends Oe { constructor() { if ( (super(), @@ -1716,23 +1740,23 @@ class ai extends ge { (this.version = null), this.userAgentData) ) { - const t = this.hc(); + const t = this.hf(); (this.browser = t.browser || "Unknown Browser"), (this.version = t.version || "Unknown Version"); } this.OS = null; } - ef() { + ff() { return this.browser; } - sf() { + cf() { return this.version; } - Da(t) { + rc(t) { if (this.OS) return Promise.resolve(this.OS); const s = (s) => { for (let r = 0; r < t.length; r++) { - const i = ai.ff(s, t[r]); + const i = gi.lf(s, t[r]); if (i) return (this.OS = i), this.OS; } return s; @@ -1743,12 +1767,12 @@ class ai extends ge { .then((t) => (t.platform ? s(t.platform) : navigator.platform)) .catch(() => navigator.platform); } - hc() { + hf() { const t = {}, s = this.userAgentData.brands; if (s && s.length) for (const r of s) { - const s = this.uc(Browsers), + const s = this.af(Browsers), i = r.brand.match(s); if (i && i.length > 0) { (t.browser = i[0]), (t.version = r.version); @@ -1757,7 +1781,7 @@ class ai extends ge { } return t; } - uc(t) { + af(t) { const s = []; for (const r in t) { const i = r; @@ -1772,33 +1796,33 @@ class ai extends ge { } } -class oi extends ge { +class Si extends Oe { constructor() { - super(), (this.fd = oi.hc(navigator.userAgent || "")); + super(), (this.Vd = Si.hf(navigator.userAgent || "")); } - ef() { - return this.fd[0] || "Unknown Browser"; + ff() { + return this.Vd[0] || "Unknown Browser"; } - sf() { - return this.fd[1] || "Unknown Version"; + cf() { + return this.Vd[1] || "Unknown Version"; } - Da(r) { + rc(r) { for (let n = 0; n < r.length; n++) { const e = r[n].string; - let i = oi.ff(e, r[n]); + let i = Si.lf(e, r[n]); if (i) return ( - i === OperatingSystems.Pg && navigator.maxTouchPoints > 1 && (i = OperatingSystems.io), + i === OperatingSystems.Pg && navigator.maxTouchPoints > 1 && (i = OperatingSystems.co), Promise.resolve(i) ); } return Promise.resolve(navigator.platform); } - static hc(r) { + static hf(r) { let n, e = r.match( - /(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i, + /(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chatgptbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i, ) || []; if (-1 !== r.indexOf("(Web0S; Linux/SmartTV)")) return ["LG Smart TV", null]; @@ -1812,18 +1836,20 @@ class oi extends ge { if (-1 !== r.indexOf("PhilipsTV")) return ["Philips Smart TV", null]; if (r.match(/\b(Roku)\b/)) return ["Roku", null]; if (r.match(/\bAFTM\b/)) return ["Amazon Fire Stick", null]; - if ( - e[1] === Browsers.rO && - ((n = r.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/)), - null != n) - ) - return ( - (n = n.slice(1)), - (n[0] = n[0].replace("OPR", Browsers.oO)), - (n[0] = n[0].replace("EdgA", Browsers.eO)), - "Edg" === n[0] && (n[0] = Browsers.eO), - [n[0], n[1]] - ); + if (e[1] === Browsers.rO) { + if (r.includes(Browsers.Sg)) return [Browsers.Sg, e[2]]; + if ( + ((n = r.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/)), + null != n) + ) + return ( + (n = n.slice(1)), + (n[0] = n[0].replace("OPR", Browsers.oO)), + (n[0] = n[0].replace("EdgA", Browsers.eO)), + "Edg" === n[0] && (n[0] = Browsers.eO), + [n[0], n[1]] + ); + } if ( e[1] === Browsers.Bg && ((n = r.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/)), null != n) @@ -1851,15 +1877,20 @@ class oi extends ge { } } -class ui { +class vi { constructor() { - const t = navigator.userAgentData ? ai : oi; - (this.Sg = new t()), + let t; + (t = + navigator.userAgent.toLowerCase().includes(Browsers.Sg.toLowerCase()) || + !navigator.userAgentData + ? Si + : gi), + (this.vg = new t()), (this.userAgent = navigator.userAgent), - (this.browser = this.Sg.ef()), - (this.version = this.Sg.sf()), + (this.browser = this.vg.ff()), + (this.version = this.vg.cf()), (this.OS = null), - this.Da().then((t) => (this.OS = t)); + this.rc().then((t) => (this.OS = t)); const i = navigator; (this.language = ( i.userLanguage || @@ -1868,26 +1899,24 @@ class ui { i.systemLanguage || "" ).toLowerCase()), - (this.Qo = ui.vg(this.userAgent)); + (this.Il = vi.xg(this.userAgent)); } - IE() { + fE() { return this.browser === Browsers.Bg; } - Ca() { + nc() { return this.OS || null; } - Da() { + rc() { return this.OS ? Promise.resolve(this.OS) - : this.Sg.Da(ui.kg).then((t) => ((this.OS = t), t)); + : this.vg.rc(vi.Og).then((t) => ((this.OS = t), t)); } - static vg(t) { + static xg(t) { t = t.toLowerCase(); const i = [ - "googlebot", - "bingbot", + "bot", "slurp", - "duckduckbot", "baiduspider", "yandex", "facebookexternalhit", @@ -1896,111 +1925,122 @@ class ui { "https://github.com/prerender/prerender", "aolbuild", "bingpreview", - "msnbot", - "adsbot", "mediapartners-google", "teoma", "taiko", + "facebookexternalhit", + "facebookcatalog", + "meta-webindexer", + "meta-externalads", + "meta-externalagent", + "meta-externalfetcher", ]; for (let n = 0; n < i.length; n++) if (-1 !== t.indexOf(i[n])) return !0; return !1; } } -ui.kg = [ - { string: navigator.platform, nf: "Win", identity: OperatingSystems.Og }, - { string: navigator.platform, nf: "Mac", identity: OperatingSystems.Pg }, - { string: navigator.platform, nf: "BlackBerry", identity: "BlackBerry" }, - { string: navigator.platform, nf: "FreeBSD", identity: "FreeBSD" }, - { string: navigator.platform, nf: "OpenBSD", identity: "OpenBSD" }, - { string: navigator.platform, nf: "Nintendo", identity: "Nintendo" }, - { string: navigator.platform, nf: "SunOS", identity: "SunOS" }, - { string: navigator.platform, nf: "PlayStation", identity: "PlayStation" }, - { string: navigator.platform, nf: "X11", identity: "X11" }, +vi.Og = [ + { string: navigator.platform, uf: "Win", identity: OperatingSystems.kg }, + { string: navigator.platform, uf: "Mac", identity: OperatingSystems.Pg }, + { string: navigator.platform, uf: "BlackBerry", identity: "BlackBerry" }, + { string: navigator.platform, uf: "FreeBSD", identity: "FreeBSD" }, + { string: navigator.platform, uf: "OpenBSD", identity: "OpenBSD" }, + { string: navigator.platform, uf: "Nintendo", identity: "Nintendo" }, + { string: navigator.platform, uf: "SunOS", identity: "SunOS" }, + { string: navigator.platform, uf: "PlayStation", identity: "PlayStation" }, + { string: navigator.platform, uf: "X11", identity: "X11" }, { string: navigator.userAgent, - nf: ["iPhone", "iPad", "iPod"], - identity: OperatingSystems.io, + uf: ["iPhone", "iPad", "iPod"], + identity: OperatingSystems.co, }, - { string: navigator.platform, nf: "Pike v", identity: OperatingSystems.io }, - { string: navigator.userAgent, nf: ["Web0S"], identity: "WebOS" }, + { string: navigator.platform, uf: "Pike v", identity: OperatingSystems.co }, + { string: navigator.userAgent, uf: ["Web0S"], identity: "WebOS" }, + { string: navigator.userAgent, uf: "Tizen", identity: "Tizen" }, + { string: navigator.userAgent, uf: "Coolita", identity: "Other Smart TV" }, + { string: navigator.userAgent, uf: "WhaleTV", identity: "Other Smart TV" }, { string: navigator.platform, - nf: ["Linux armv7l", "Android"], - identity: OperatingSystems.xg, + uf: ["Linux armv7l", "Android"], + identity: OperatingSystems.Dg, }, - { string: navigator.userAgent, nf: ["Android"], identity: OperatingSystems.xg }, - { string: navigator.platform, nf: "Linux", identity: "Linux" }, + { string: navigator.userAgent, uf: ["Android"], identity: OperatingSystems.Dg }, + { string: navigator.platform, uf: "Linux", identity: "Linux" }, ]; -const X = new ui(); +const ro = new vi(); const STORAGE_KEYS = { - iu: { - su: "ab.storage.userId", - Uo: "ab.storage.deviceId", - El: "ab.storage.sessionId", + Ou: { + Cu: "ab.storage.userId", + tl: "ab.storage.deviceId", + um: "ab.storage.sessionId", }, - C: { - ec: "ab.test", + ft: { + Qc: "ab.test", tE: "ab.storage.events", eE: "ab.storage.attributes", sE: "ab.storage.attributes.anonymous_user", - Fa: "ab.storage.device", - Jh: "ab.storage.sdk_metadata", - Qh: "ab.storage.session_id_for_cached_metadata", - In: "ab.storage.pushToken", - Ai: "ab.storage.newsFeed", - Bi: "ab.storage.lastNewsFeedRefresh", - J: "ab.storage.cardImpressions", - ul: "ab.storage.serverConfig", - rE: "ab.storage.triggers", - oE: "ab.storage.triggers.ts", - Nl: "ab.storage.messagingSessionStart", - bs: "ab.storage.cc", - js: "ab.storage.ccLastFullSync", - Rs: "ab.storage.ccLastCardUpdated", - nE: "ab.storage.ccRateLimitCurrentTokenCount", - Ru: "ab.storage.globalRateLimitCurrentTokenCount", - bu: "ab.storage.dynamicRateLimitCurrentTokenCount", - v: "ab.storage.ccClicks", - H: "ab.storage.ccImpressions", - A: "ab.storage.ccDismissals", + ac: "ab.storage.device", + Dl: "ab.storage.sdk_metadata", + Tl: "ab.storage.session_id_for_cached_metadata", + Uu: "ab.storage.pushToken", + rE: "ab.storage.cardImpressions", + jc: "ab.storage.serverConfig", + oE: "ab.storage.triggers", + nE: "ab.storage.triggers.ts", + dm: "ab.storage.messagingSessionStart", + Ps: "ab.storage.cc", + Gs: "ab.storage.ccLastFullSync", + Hs: "ab.storage.ccLastCardUpdated", + uc: "ab.storage.globalRateLimitCurrentTokenCount", + fc: "ab.storage.dynamicRateLimitCurrentTokenCount", + Jt: "ab.storage.ccClicks", + Vt: "ab.storage.ccImpressions", + Pt: "ab.storage.ccDismissals", aE: "ab.storage.lastDisplayedTriggerTimesById", iE: "ab.storage.lastDisplayedTriggerTime", EE: "ab.storage.triggerFireInstancesById", - wh: "ab.storage.signature", - xs: "ab.storage.brazeSyncRetryCount", - Us: "ab.storage.sdkVersion", - vi: "ab.storage.ff", - wi: "ab.storage.ffImpressions", - zi: "ab.storage.ffLastRefreshAt", - Si: "ab.storage.ff.sessionId", + xh: "ab.storage.signature", + SE: "ab.storage.brazeSyncRetryCount", + Qs: "ab.storage.sdkVersion", + lo: "ab.storage.ff", + vo: "ab.storage.ffImpressions", + Do: "ab.storage.ffLastRefreshAt", + Co: "ab.storage.ff.sessionId", lE: "ab.storage.lastReqToEndpoint", - SE: "ab.storage.requestAttempts", - Xr: "ab.storage.deferredIam", - du: "ab.storage.lastSdkReq", - _E: "ab.storage.alias", + _E: "ab.storage.requestAttempts", + Wn: "ab.storage.deferredIam", + Jl: "ab.storage.lastSdkReq", + uE: "ab.storage.alias", + vt: "ab.storage.banners", + Dt: "ab.storage.banners.impressions", + Bt: "ab.storage.banners.sessionId", + Ue: "ab.storage.dust.mite", + Ne: "ab.storage.dust.host", + Te: "ab.storage.dust.auth", + ze: "ab.storage.dust.expiration", }, - se: "ab.optOut", + pe: "ab.optOut", }; -class Q { +class ee { constructor(t, e) { - (this.uE = t), (this.TE = e), (this.uE = t), (this.TE = e); + (this.TE = t), (this.cE = e), (this.TE = t), (this.cE = e); } - Vh(t) { - const e = keys(STORAGE_KEYS.iu), - s = new Q.ee(t); - for (const t of e) s.remove(STORAGE_KEYS.iu[t]); + Sl(t) { + const e = keys(STORAGE_KEYS.Ou), + s = new ee.le(t); + for (const t of e) s.remove(STORAGE_KEYS.Ou[t]); } - uu(t, e) { + Iu(t, e) { let s = null; - null != e && e instanceof _t && (s = e.Y()), this.uE.store(t, s); + null != e && e instanceof _t && (s = e.gt()), this.TE.store(t, s); } - cE(t) { - const e = this.tu(t); - null != e && ((e.Wl = new Date().valueOf()), this.uu(t, e)); + hE(t) { + const e = this.$u(t); + null != e && ((e.gm = new Date().valueOf()), this.Iu(t, e)); } - tu(t) { - const e = this.uE.br(t), + $u(t) { + const e = this.TE.jr(t), s = ((t) => { let e; try { @@ -2011,44 +2051,44 @@ class Q { return e; })(e); let r; - if (s) (r = _t.qn(s) || null), r && this.uu(t, r); + if (s) (r = _t._u(s) || null), r && this.Iu(t, r); else { - const s = _t.hE(e); - (r = _t.qn(s) || null), s !== e && r && this.uu(t, r); + const s = _t.AE(e); + (r = _t._u(s) || null), s !== e && r && this.Iu(t, r); } return r; } - Al(t) { - this.uE.remove(t); + xm(t) { + this.TE.remove(t); } - Kh() { - const t = keys(STORAGE_KEYS.iu); + Al() { + const t = keys(STORAGE_KEYS.Ou); let e; for (const s of t) - (e = this.tu(STORAGE_KEYS.iu[s])), - null != e && this.uu(STORAGE_KEYS.iu[s], e); + (e = this.$u(STORAGE_KEYS.Ou[s])), + null != e && this.Iu(STORAGE_KEYS.Ou[s], e); } - zo(t) { + ol(t) { let e; if (null == t || 0 === t.length) return !1; e = isArray(t) ? t : [t]; - let s = this.TE.br(STORAGE_KEYS.C.tE); + let s = this.cE.jr(STORAGE_KEYS.ft.tE); (null != s && isArray(s)) || (s = []); - for (let t = 0; t < e.length; t++) s.push(e[t].Y()); - return this.TE.store(STORAGE_KEYS.C.tE, s); + for (let t = 0; t < e.length; t++) s.push(e[t].gt()); + return this.cE.store(STORAGE_KEYS.ft.tE, s); } - kl(t) { - return null != t && this.zo([t]); + wm(t) { + return null != t && this.ol([t]); } - AE() { - let t = this.TE.br(STORAGE_KEYS.C.tE); - this.TE.remove(STORAGE_KEYS.C.tE), null == t && (t = []); + RE() { + let t = this.cE.jr(STORAGE_KEYS.ft.tE); + this.cE.remove(STORAGE_KEYS.ft.tE), null == t && (t = []); const e = []; let s = !1, r = null; if (isArray(t)) for (let s = 0; s < t.length; s++) - ve.RE(t[s]) ? e.push(ve.qn(t[s])) : (r = s); + De.gE(t[s]) ? e.push(De._u(t[s])) : (r = s); else s = !0; if (s || null != r) { let o = "Stored events could not be deserialized as Events"; @@ -2061,160 +2101,160 @@ class Q { typeof t + ": " + JSON.stringify(t)), - e.push(new ve(null, i.Ls, new Date().valueOf(), null, { e: o })); + e.push(new De(null, f.wl, new Date().valueOf(), null, { e: o })); } return e; } - I(t, e) { + bt(t, e) { return ( !!validateValueIsFromEnum( - STORAGE_KEYS.C, + STORAGE_KEYS.ft, t, "StorageManager cannot store object.", "STORAGE_KEYS.OBJECTS", - ) && this.TE.store(t, e) + ) && this.cE.store(t, e) ); } - j(t) { + dt(t) { return ( !!validateValueIsFromEnum( - STORAGE_KEYS.C, + STORAGE_KEYS.ft, t, "StorageManager cannot retrieve object.", "STORAGE_KEYS.OBJECTS", - ) && this.TE.br(t) + ) && this.cE.jr(t) ); } - ii(t) { + zt(t) { return ( !!validateValueIsFromEnum( - STORAGE_KEYS.C, + STORAGE_KEYS.ft, t, "StorageManager cannot remove object.", "STORAGE_KEYS.OBJECTS", - ) && (this.TE.remove(t), !0) + ) && (this.cE.remove(t), !0) ); } clearData() { - const t = keys(STORAGE_KEYS.iu), - e = keys(STORAGE_KEYS.C); + const t = keys(STORAGE_KEYS.Ou), + e = keys(STORAGE_KEYS.ft); for (let e = 0; e < t.length; e++) { const s = t[e]; - this.uE.remove(STORAGE_KEYS.iu[s]); + this.TE.remove(STORAGE_KEYS.Ou[s]); } for (let t = 0; t < e.length; t++) { const s = e[t]; - this.TE.remove(STORAGE_KEYS.C[s]); + this.cE.remove(STORAGE_KEYS.ft[s]); } } - gE(t) { - return t || STORAGE_KEYS.C.sE; + OE(t) { + return t || STORAGE_KEYS.ft.sE; } - Pa(t) { - let e = this.TE.br(STORAGE_KEYS.C.eE); + Xl(t) { + let e = this.cE.jr(STORAGE_KEYS.ft.eE); null == e && (e = {}); - const s = this.gE(t[User.Yn]), + const s = this.OE(t[User.Va]), r = e[s]; for (const o in t) - o !== User.Yn && + o !== User.Va && (null == e[s] || (r && null == r[o])) && - this.mu(t[User.Yn], o, t[o]); + this.Eu(t[User.Va], o, t[o]); } - mu(t, e, s) { - let r = this.TE.br(STORAGE_KEYS.C.eE); + Eu(t, e, s) { + let r = this.cE.jr(STORAGE_KEYS.ft.eE); null == r && (r = {}); - const o = this.gE(t); + const o = this.OE(t); let n = r[o]; if ( - (null == n && ((n = {}), null != t && (n[User.Yn] = t)), e === User.lu) + (null == n && ((n = {}), null != t && (n[User.Va] = t)), e === User.Bu) ) { null == n[e] && (n[e] = {}); for (const t in s) n[e][t] = s[t]; } else n[e] = s; - return (r[o] = n), this.TE.store(STORAGE_KEYS.C.eE, r); + return (r[o] = n), this.cE.store(STORAGE_KEYS.ft.eE, r); } - OE() { - const t = this.TE.br(STORAGE_KEYS.C.eE); - this.TE.remove(STORAGE_KEYS.C.eE); + IE() { + const t = this.cE.jr(STORAGE_KEYS.ft.eE); + this.cE.remove(STORAGE_KEYS.ft.eE); const e = []; for (const s in t) null != t[s] && e.push(t[s]); return e; } - ru(t) { - const e = this.TE.br(STORAGE_KEYS.C.eE); + Lu(t) { + const e = this.cE.jr(STORAGE_KEYS.ft.eE); if (null != e) { - const s = this.gE(null), + const s = this.OE(null), r = e[s]; null != r && ((e[s] = void 0), - this.TE.store(STORAGE_KEYS.C.eE, e), - (r[User.Yn] = t), - this.Pa(r)); + this.cE.store(STORAGE_KEYS.ft.eE, e), + (r[User.Va] = t), + this.Xl(r)); } - const s = this.tu(STORAGE_KEYS.iu.El); + const s = this.$u(STORAGE_KEYS.Ou.um); let r = null; - null != s && (r = s.eu); - const o = this.AE(); + null != s && (r = s.Tu); + const o = this.RE(); if (null != o) for (let e = 0; e < o.length; e++) { const s = o[e]; - null == s.userId && s.sessionId == r && (s.userId = t), this.kl(s); + null == s.userId && s.sessionId == r && (s.userId = t), this.wm(s); } } dE() { - return this.TE.fE; + return this.cE.bE; } } -(Q.rc = class { +(ee.Wc = class { constructor(t) { - (this.rn = t), (this.rn = t), (this.fE = X.IE() ? 3 : 10); + (this.tu = t), (this.tu = t), (this.bE = ro.fE() ? 3 : 10); } - bE(t) { - return t + "." + this.rn; + mE(t) { + return t + "." + this.tu; } store(t, e) { const s = { v: e }; try { - return localStorage.setItem(this.bE(t), JSON.stringify(s)), !0; + return localStorage.setItem(this.mE(t), JSON.stringify(s)), !0; } catch (t) { - return r$1.info("Storage failure: " + getErrorMessage(t)), !1; + return E$1.info("Storage failure: " + getErrorMessage(t)), !1; } } - br(t) { + jr(t) { try { let e = null; - const s = localStorage.getItem(this.bE(t)); + const s = localStorage.getItem(this.mE(t)); return null != s && (e = JSON.parse(s)), null == e ? null : e.v; } catch (t) { - return r$1.info("Storage retrieval failure: " + getErrorMessage(t)), null; + return E$1.info("Storage retrieval failure: " + getErrorMessage(t)), null; } } remove(t) { try { - localStorage.removeItem(this.bE(t)); + localStorage.removeItem(this.mE(t)); } catch (t) { - return r$1.info("Storage removal failure: " + getErrorMessage(t)), !1; + return E$1.info("Storage removal failure: " + getErrorMessage(t)), !1; } } }), - (Q.ac = class { + (ee.Xc = class { constructor() { - (this.mE = {}), (this.KE = 5242880), (this.fE = 3); + (this.KE = {}), (this.YE = 5242880), (this.bE = 3); } store(t, e) { const s = { value: e }, - o = this.YE(e); - return o > this.KE - ? (r$1.info( + r = this.NE(e); + return r > this.YE + ? (E$1.info( "Storage failure: object is ≈" + - o + + r + " bytes which is greater than the max of " + - this.KE, + this.YE, ), !1) - : ((this.mE[t] = s), !0); + : ((this.KE[t] = s), !0); } - YE(t) { + NE(t) { const e = [], s = [t]; let r = 0; @@ -2231,27 +2271,27 @@ class Q { } return r; } - br(t) { - const e = this.mE[t]; + jr(t) { + const e = this.KE[t]; return null == e ? null : e.value; } remove(t) { - this.mE[t] = null; + this.KE[t] = null; } }), - (Q.ee = class { + (ee.le = class { constructor(t, e) { - (this.rn = t), - (this.NE = e), - (this.rn = t), - (this.CE = this.GE()), - (this.DE = 576e3), - (this.NE = !!e); + (this.tu = t), + (this.DE = e), + (this.tu = t), + (this.GE = this.CE()), + (this.ME = 576e3), + (this.DE = !!e); } - bE(t) { - return null != this.rn ? t + "." + this.rn : t; + mE(t) { + return null != this.tu ? t + "." + this.tu : t; } - GE() { + CE() { let t = 0, e = document.location.hostname; const s = e.split("."), @@ -2266,12 +2306,12 @@ class Q { e ); } - ne() { + me() { const t = new Date(); - return t.setTime(t.getTime() + 60 * this.DE * 1e3), t.getFullYear(); + return t.setTime(t.getTime() + 60 * this.ME * 1e3), t.getFullYear(); } - ME() { - const t = values(STORAGE_KEYS.iu), + pE() { + const t = values(STORAGE_KEYS.Ou), e = document.cookie.split(";"); for (let s = 0; s < e.length; s++) { let r = e[s]; @@ -2284,45 +2324,45 @@ class Q { } if (o) { const t = r.split("=")[0]; - -1 === t.indexOf("." + this.rn) && this.pE(t); + -1 === t.indexOf("." + this.tu) && this.UE(t); } } } store(t, e) { - this.ME(); + this.pE(); const s = new Date(); - s.setTime(s.getTime() + 60 * this.DE * 1e3); - const o = "expires=" + s.toUTCString(), - n = "domain=" + this.CE; - let a; - a = this.NE ? e : encodeURIComponent(e); - const i = this.bE(t) + "=" + a + ";" + o + ";" + n + ";path=/"; - return i.length >= 4093 - ? (r$1.info( + s.setTime(s.getTime() + 60 * this.ME * 1e3); + const r = "expires=" + s.toUTCString(), + o = "domain=" + this.GE; + let n; + n = this.DE ? e : encodeURIComponent(e); + const a = this.mE(t) + "=" + n + ";" + r + ";" + o + ";path=/"; + return a.length >= 4093 + ? (E$1.info( "Storage failure: string is " + - i.length + + a.length + " chars which is too large to store as a cookie.", ), !1) - : ((document.cookie = i), !0); + : ((document.cookie = a), !0); } - br(t) { + jr(t) { const e = [], - s = this.bE(t) + "=", - o = document.cookie.split(";"); - for (let n = 0; n < o.length; n++) { - let a = o[n]; - for (; " " === a.charAt(0); ) a = a.substring(1); - if (0 === a.indexOf(s)) + s = this.mE(t) + "=", + r = document.cookie.split(";"); + for (let o = 0; o < r.length; o++) { + let n = r[o]; + for (; " " === n.charAt(0); ) n = n.substring(1); + if (0 === n.indexOf(s)) try { let t; - (t = this.NE - ? a.substring(s.length, a.length) - : decodeURIComponent(a.substring(s.length, a.length))), + (t = this.DE + ? n.substring(s.length, n.length) + : decodeURIComponent(n.substring(s.length, n.length))), e.push(t); } catch (e) { return ( - r$1.info("Storage retrieval failure: " + getErrorMessage(e)), + E$1.info("Storage retrieval failure: " + getErrorMessage(e)), this.remove(t), null ); @@ -2331,106 +2371,106 @@ class Q { return e.length > 0 ? e[e.length - 1] : null; } remove(t) { - this.pE(this.bE(t)); + this.UE(this.mE(t)); } - pE(t) { + UE(t) { const e = t + "=;expires=" + new Date(0).toUTCString(); (document.cookie = e), (document.cookie = e + ";path=/"); - const s = e + ";domain=" + this.CE; + const s = e + ";domain=" + this.GE; (document.cookie = s), (document.cookie = s + ";path=/"); } }), - (Q.tc = class { + (ee.Jc = class { constructor(t, e, s) { - (this.rn = t), + (this.tu = t), (this.vE = []), - e && this.vE.push(new Q.ee(t)), - s && this.vE.push(new Q.rc(t)), - this.vE.push(new Q.ac()); + e && this.vE.push(new ee.le(t)), + s && this.vE.push(new ee.Wc(t)), + this.vE.push(new ee.Xc()); } store(t, e) { let s = !0; for (let r = 0; r < this.vE.length; r++) s = this.vE[r].store(t, e) && s; return s; } - br(t) { + jr(t) { for (let e = 0; e < this.vE.length; e++) { - const s = this.vE[e].br(t); + const s = this.vE[e].jr(t); if (null != s) return s; } return null; } remove(t) { - new Q.ee(this.rn).remove(t); + new ee.le(this.tu).remove(t); for (let e = 0; e < this.vE.length; e++) this.vE[e].remove(t); } }); -class qt { +class kt { constructor(t, i, s) { - (this.u = t), - (this.Jn = i), - (this.Qn = s), - (this.u = t), - (this.Jn = i || !1), - (this.Qn = s), - (this.Xn = new T()), - (this.Zn = 0), - (this.gh = 1); - } - Fh() { - return this.Jn; - } - kh() { - return this.u.j(STORAGE_KEYS.C.wh); + (this.B = t), + (this.gh = i), + (this.ph = s), + (this.B = t), + (this.gh = i || !1), + (this.ph = s), + (this.Fh = new m()), + (this.kh = 0), + (this.fh = 1); + } + wh() { + return this.gh; + } + jh() { + return this.B.dt(STORAGE_KEYS.ft.xh); } setSdkAuthenticationSignature(t) { - const i = this.kh(); - this.u.I(STORAGE_KEYS.C.wh, t); - const s = A.ts.Zt; - new A(s, r$1).setItem(s.hs.jh, this.gh, t), i !== t && this.Vs(); + const i = this.jh(); + this.B.bt(STORAGE_KEYS.ft.xh, t); + const e = et.Us.Rs; + new et(e, E$1).setItem(e.Fs.qh, this.fh, t), i !== t && this.Z(); } - xh() { - this.u.ii(STORAGE_KEYS.C.wh); - const t = A.ts.Zt; - new A(t, r$1).re(t.hs.jh, this.gh); + yh() { + this.B.zt(STORAGE_KEYS.ft.xh); + const t = et.Us.Rs; + new et(t, E$1).je(t.Fs.qh, this.fh); } subscribeToSdkAuthenticationFailures(t) { - return this.Qn.Nt(t); + return this.ph.Rt(t); } - qh(t) { - this.Qn.Rt(t); + Bh(t) { + this.ph.L(t); } - yh() { - this.Xn.removeAllSubscriptions(); + Gh() { + this.Fh.removeAllSubscriptions(); } - Bh() { - this.Zn += 1; + Hh() { + this.kh += 1; } - Gh() { - return this.Zn; + Jh() { + return this.kh; } - Vs() { - this.Zn = 0; + Z() { + this.kh = 0; } } -class y { +class t { constructor() {} - Ss(a) {} + N(a) {} changeUser(a = !1) {} clearData(a = !1) {} } -class Gt { +class Jt { constructor(s) { (this.id = s), (this.id = s); } - Mr() { + Hn() { const s = {}; return ( null != this.browser && (s.browser = this.browser), - null != this.Ta && (s.browser_version = this.Ta), + null != this.ec && (s.browser_version = this.ec), null != this.os && (s.os_version = this.os), null != this.resolution && (s.resolution = this.resolution), null != this.language && (s.locale = this.language), @@ -2453,48 +2493,48 @@ var DeviceProperties = { class Ot { constructor(t, e) { - (this.u = t), - (this.Ia = e), - (this.u = t), + (this.B = t), + (this.tc = e), + (this.B = t), null == e && (e = values(DeviceProperties)), - (this.Ia = e); - } - ce(t = !0) { - let e = this.u.tu(STORAGE_KEYS.iu.Uo); - null == e && ((e = new _t(p$1.W())), t && this.u.uu(STORAGE_KEYS.iu.Uo, e)); - const r = new Gt(e.eu); - for (let t = 0; t < this.Ia.length; t++) { - switch (this.Ia[t]) { + (this.tc = e); + } + ve(t = !0) { + let e = this.B.$u(STORAGE_KEYS.Ou.tl); + null == e && ((e = new _t(P$1.se())), t && this.B.Iu(STORAGE_KEYS.Ou.tl, e)); + const r = new Jt(e.Tu); + for (let t = 0; t < this.tc.length; t++) { + switch (this.tc[t]) { case DeviceProperties.BROWSER: - r.browser = X.browser; + r.browser = ro.browser; break; case DeviceProperties.BROWSER_VERSION: - r.Ta = X.version; + r.ec = ro.version; break; case DeviceProperties.OS: - r.os = this.Da(); + r.os = this.rc(); break; case DeviceProperties.RESOLUTION: - r.Sa = screen.width + "x" + screen.height; + r.sc = screen.width + "x" + screen.height; break; case DeviceProperties.LANGUAGE: - r.language = X.language; + r.language = ro.language; break; case DeviceProperties.TIME_ZONE: - r.timeZone = this.Oa(new Date()); + r.timeZone = this.oc(new Date()); break; case DeviceProperties.USER_AGENT: - r.userAgent = X.userAgent; + r.userAgent = ro.userAgent; } } return r; } - Da() { - if (X.Ca()) return X.Ca(); - const t = this.u.j(STORAGE_KEYS.C.Fa); - return t && t.os_version ? t.os_version : X.Da(); + rc() { + if (ro.nc()) return ro.nc(); + const t = this.B.dt(STORAGE_KEYS.ft.ac); + return t && t.os_version ? t.os_version : ro.rc(); } - Oa(t) { + oc(t) { let e = !1; if ("undefined" != typeof Intl && "function" == typeof Intl.DateTimeFormat) try { @@ -2503,17 +2543,17 @@ class Ot { if (null != t && "" !== t) return t; } } catch (t) { - r$1.info( + E$1.info( "Intl.DateTimeFormat threw an error, cannot detect user's time zone:" + getErrorMessage(t), ), (e = !0); } if (e) return ""; - const s = t.getTimezoneOffset(); - return this.Ga(s); + const r = t.getTimezoneOffset(); + return this.cc(r); } - Ga(t) { + cc(t) { const e = Math.trunc(t / 60), r = Math.trunc(t % 60); let s = "GMT"; @@ -2530,197 +2570,264 @@ class Ot { } var Xt = { - Na: "invalid_api_key", - Xa: "blacklisted", - $a: "no_device_identifier", - Ba: "invalid_json_response", - Ra: "empty_response", + Bl: "invalid_api_key", + zl: "blacklisted", + jl: "no_device_identifier", + Cl: "invalid_json_response", + yl: "empty_response", __: "sdk_auth_error", }; -const D = { - _s: { - Ka: "data", - Xs: "content_cards/sync", - Ri: "feature_flags/sync", - Tr: "template", +const h = { + H: { + Ze: "data", + vi: "content_cards/sync", + wo: "feature_flags/sync", + On: "template", + G: "banners/sync", }, - ku: (t) => (null == t ? void 0 : t.j(STORAGE_KEYS.C.lE)), - sm: (t) => (null == t ? void 0 : t.j(STORAGE_KEYS.C.SE)), - nm: (t, e) => { - null == t || t.I(STORAGE_KEYS.C.lE, e); + bc: (t) => (null == t ? void 0 : t.dt(STORAGE_KEYS.ft.lE)), + Am: (t) => (null == t ? void 0 : t.dt(STORAGE_KEYS.ft._E)), + Rm: (t, e) => { + null == t || t.bt(STORAGE_KEYS.ft.lE, e); }, - um: (t, e) => { - null == t || t.I(STORAGE_KEYS.C.SE, e); + qm: (t, e) => { + null == t || t.bt(STORAGE_KEYS.ft._E, e); }, - Wa: (t, e) => { + Pl: (t, e) => { if (!t || !e) return -1; - const s = D.ku(t); + const s = h.bc(t); if (null == s) return -1; const n = s[e]; return null == n || isNaN(n) ? -1 : n; }, - Ya: (t, e) => { + Ul: (t, e) => { let s = REQUEST_ATTEMPT_DEFAULT; if (!t || !e) return s; - const n = D.sm(t); + const n = h.Am(t); return null == n ? s : ((s = n[e]), null == s || isNaN(s) ? REQUEST_ATTEMPT_DEFAULT : s); }, - Hs: (t, e, s) => { + K: (t, e, s) => { if (!t || !e) return; - let n = D.ku(t); - null == n && (n = {}), (n[e] = s), D.nm(t, n); + let n = h.bc(t); + null == n && (n = {}), (n[e] = s), h.Rm(t, n); }, - Ws: (t, e, s) => { + xl: (t, e, s) => { if (!t || !e) return; - let n = D.sm(t); - null == n && (n = {}), (n[e] = s), D.um(t, n); + let n = h.Am(t); + null == n && (n = {}), (n[e] = s), h.qm(t, n); }, - ti: (t, e) => { + fi: (t, e) => { + t && e && h.xl(t, e, REQUEST_ATTEMPT_DEFAULT); + }, + Zl: (t, e) => { if (!t || !e) return; - const s = D.Ya(t, e); - D.Ws(t, e, s + 1); + const s = h.Ul(t, e); + h.xl(t, e, s + 1); + }, +}; + +const l = { + O: (t) => { + let e, o; + try { + const r = () => { + E$1.error("This browser does not have any supported ajax options!"); + }; + let n = !1; + if ((window.XMLHttpRequest && (n = !0), !n)) return void r(); + e = new XMLHttpRequest(); + const s = (o) => { + "function" == typeof t.error && t.error(e.status), + "function" == typeof t.tt && t.tt(!1, o); + }; + (e.onload = () => { + let o = !1; + if (4 !== e.readyState) return; + o = (e.status >= 200 && e.status < 300) || 304 === e.status; + const r = e.getAllResponseHeaders(); + if (o) { + if ("function" == typeof t.W) { + let o; + try { + o = JSON.parse(e.responseText); + } catch (o) { + const n = { + error: "" === e.responseText ? Xt.yl : Xt.Cl, + response: e.responseText, + }; + (0, t.W)(n, r); + } + o && t.W(o, r); + } + "function" == typeof t.tt && t.tt(!0, r); + } else s(r); + }), + (e.onerror = () => { + s(e.getAllResponseHeaders()); + }), + (e.ontimeout = () => { + s(); + }), + (o = JSON.stringify(t.data)), + e.open("POST", t.url, !0), + e.setRequestHeader("Content-type", "application/json"), + e.setRequestHeader("X-Requested-With", "XMLHttpRequest"); + const i = t.headers || []; + for (const t of i) e.setRequestHeader(t[0], t[1]); + e.send(o); + } catch (t) { + E$1.error(`Network request error: ${getErrorMessage(t)}`); + } }, }; +const readResponseHeaders = (t) => { + const e = {}, + o = t.toString().split("\r\n"); + if (!o) return e; + let r, n; + for (const t of o) + t && + ((r = t.slice(0, t.indexOf(":")).toLowerCase().trim()), + (n = t.slice(t.indexOf(":") + 1).trim()), + (e[r] = n)); + return e; +}; -class Pt { - constructor(t, e, i, s, r, n, o, h, a, u, l, c) { - (this.on = t), - (this.u = e), - (this.Ko = i), - (this.yt = s), - (this.oi = r), - (this.qt = n), - (this.rn = o), - (this.Go = h), - (this.Bo = a), - (this.Vo = u), +class Mt { + constructor(t, e, i, s, r, n, o, a, h, u, l, c) { + (this.eu = t), + (this.B = e), + (this.hl = i), + (this.vs = s), + (this.C = r), + (this.h = n), + (this.tu = o), + (this.al = a), + (this.sl = h), + (this.rl = u), (this.appVersion = l), - (this.Xh = c), - (this.Hh = (t) => (null == t ? "" : `${t} `)), - (this.on = t), - (this.u = e), - (this.Ko = i), - (this.yt = s), - (this.oi = r), - (this.qt = n), - (this.rn = o), - (this.Go = h), - (this.Bo = a), - (this.Vo = u), + (this.vl = c), + (this.Rl = (t) => (null == t ? "" : `${t} `)), + (this.eu = t), + (this.B = e), + (this.hl = i), + (this.vs = s), + (this.C = r), + (this.h = n), + (this.tu = o), + (this.al = a), + (this.sl = h), + (this.rl = u), (this.appVersion = l), - (this.Xh = c), - (this.Yh = ["npm"]); - } - $s(t, e = !1, i = !1) { - const s = this.on.ce(!i), - r = s.Mr(), - n = this.u.j(STORAGE_KEYS.C.Fa); - isEqual(n, r) || (t.device = r), - (t.api_key = this.rn), + (this.vl = c), + (this.bl = ["npm"]), + (this.ql = {}); + } + $(t, e = !1, i = !1) { + const r = this.eu.ve(!i), + n = r.Hn(), + o = this.B.dt(STORAGE_KEYS.ft.ac); + isEqual(o, n) || (t.device = n), + (t.api_key = this.tu), (t.time = convertMsToSeconds(new Date().valueOf(), !0)); - const a = this.u.j(STORAGE_KEYS.C.Jh) || [], - u = this.u.j(STORAGE_KEYS.C.Qh) || ""; - if ( - (this.Yh.length > 0 && - (!isEqual(a, this.Yh) || u !== this.oi.xi()) && - (t.sdk_metadata = this.Yh), - (t.sdk_version = this.Bo), - this.Vo && (t.sdk_flavor = this.Vo), + const a = this.B.dt(STORAGE_KEYS.ft.Dl) || [], + h = this.B.dt(STORAGE_KEYS.ft.Tl) || ""; + this.bl.length > 0 && + (!isEqual(a, this.bl) || h !== this.C.yt()) && + (t.sdk_metadata = this.bl), + (t.sdk_version = this.sl), + this.rl && (t.sdk_flavor = this.rl), (t.app_version = this.appVersion), - (t.app_version_code = this.Xh), - (t.device_id = s.id), - e) - ) { - const e = this.yt.getUserId(); - null != e && (t.user_id = e); - } - if (!t.user_id && !this.Ko.Fh()) { - const e = getAlias(this.u); + (t.app_version_code = this.vl), + (t.device_id = r.id); + const u = this.vs.getUserId(); + if ((e && null !== u && (t.user_id = u), !u && !this.hl.wh())) { + const e = getAlias(this.B); e && (t.alias = e); } return t; } - Qs(e, s, n) { - const o = s.auth_error, - h = s.error; - if (!o && !h) return !0; - if (o) { - let t; - this.Ko.Bh(); - const i = { errorCode: o.error_code }; - for (const t of n) - isArray(t) && "X-Braze-Auth-Signature" === t[0] && (i.signature = t[1]); - e.respond_with && e.respond_with.user_id - ? (i.userId = e.respond_with.user_id) - : e.user_id && (i.userId = e.user_id); - const s = o.reason; + Y(t, e, i) { + const s = e.auth_error, + r = e.error; + if (!s && !r) return !0; + if (s) { + let e; + this.hl.Hh(); + const r = { errorCode: s.error_code }; + for (const t of i) + isArray(t) && "X-Braze-Auth-Signature" === t[0] && (r.signature = t[1]); + t.respond_with && t.respond_with.user_id + ? (r.userId = t.respond_with.user_id) + : t.user_id && (r.userId = t.user_id); + const n = s.reason; return ( - s - ? ((i.reason = s), (t = `due to ${s}`)) - : (t = `with error code ${o.error_code}.`), - this.Ko.Fh() || - (t += + n + ? ((r.reason = n), (e = `due to ${n}`)) + : (e = `with error code ${s.error_code}.`), + this.hl.wh() || + (e += ' Please use the "enableSdkAuthentication" initialization option to enable authentication.'), - r$1.error(`SDK Authentication failed ${t}`), - this.Zh(e.events || [], e.attributes || []), - this.Ko.qh(i), + E$1.error(`SDK Authentication failed ${e}`), + this.kl(t.events || [], t.attributes || []), + this.hl.Bh(r), !1 ); } - if (h) { - let n, - o = h; - switch (o) { - case Xt.Ra: + if (r) { + let i, + s = r; + switch (s) { + case Xt.yl: return ( - (n = "Received successful response with empty body."), - t$1.q(i.Ls, { e: n }), - r$1.info(n), + (i = "Received successful response with empty body."), + v$1.lt(f.wl, { e: i }), + E$1.info(i), !1 ); - case Xt.Ba: + case Xt.Cl: return ( - (n = "Received successful response with invalid JSON"), - t$1.q(i.Ls, { e: n + ": " + s.response }), - r$1.info(n), + (i = "Received successful response with invalid JSON"), + v$1.lt(f.wl, { e: i + ": " + e.response }), + E$1.info(i), !1 ); - case Xt.Na: - o = `The API key "${e.api_key}" is invalid for the baseUrl ${this.Go}`; + case Xt.Bl: + s = `The API key "${t.api_key}" is invalid for the baseUrl ${this.al}`; break; - case Xt.Xa: - o = + case Xt.zl: + s = "Sorry, we are not currently accepting your requests. If you think this is in error, please contact us."; break; - case Xt.$a: - o = "No device identifier. Please contact support@braze.com"; + case Xt.jl: + s = "No device identifier. Please contact support@braze.com"; } - r$1.error("Backend error: " + o); + E$1.error("Backend error: " + s); } return !1; } - La(t, e, i, s) { - return !!((t && 0 !== t.length) || (e && 0 !== e.length) || i || s); + Ml(t, e, i) { + return !!((t && 0 !== t.length) || (e && 0 !== e.length) || i); } - Ea(t, e, i, s, r = !1) { - const n = [], - o = (t) => t || "", - h = o(this.yt.getUserId()); - let a = this.Ir(t, e); + $l(t, e, i, s = !1) { + const r = [], + n = (t) => t || "", + o = n(this.vs.getUserId()); + let a = this.Xn(t); const u = [], l = []; let c, d = null; - if (i.length > 0) { + if (e.length > 0) { const t = []; - for (const e of i) { - if (((c = e.Mr()), this.Ko.Fh())) { - if (h && !c.user_id) { + for (const i of e) { + if (((c = i.Hn()), this.hl.wh())) { + if (o && !c.user_id) { d || (d = {}), d.events || (d.events = []), d.events.push(c); continue; } - if (o(c.user_id) !== h) { + if (n(c.user_id) !== o) { l.push(c); continue; } @@ -2729,890 +2836,1003 @@ class Pt { } t.length > 0 && (a.events = t); } - if (s.length > 0) { + if (i.length > 0) { const t = []; - for (const e of s) - e && (this.Ko.Fh() && o(e.user_id) !== h ? u.push(e) : t.push(e)); + for (const e of i) + e && (this.hl.wh() && n(e.user_id) !== o ? u.push(e) : t.push(e)); t.length > 0 && (a.attributes = t); } - if ((this.Zh(l, u), (a = this.$s(a, !0, r)), d)) { - d = this.$s(d, !1, r); - const t = { requestData: d, headers: this.Ps(d, D._s.Ka) }; - n.push(t); + if ((this.kl(l, u), (a = this.$(a, !1, s)), d)) { + d = this.$(d, !1, s); + const t = { requestData: d, headers: this.A(d, h.H.Ze) }; + r.push(t); } - if (a && !this.La(a.events, a.attributes, t, e)) return d ? n : null; - const f = { requestData: a, headers: this.Ps(a, D._s.Ka) }; - return n.push(f), n; + if (a && !this.Ml(a.events, a.attributes, t)) return d ? r : null; + const f = { requestData: a, headers: this.A(a, h.H.Ze) }; + return r.push(f), r; } - Zh(t, e) { + kl(t, e) { if (t) { const e = []; for (const i of t) { - const t = ve.fromJson(i); + const t = De.fromJson(i); (t.time = convertSecondsToMs(t.time)), e.push(t); } - this.u.zo(e); + this.B.ol(e); } - if (e) for (const t of e) this.u.Pa(t); + if (e) for (const t of e) this.B.Xl(t); } - Ys(t, e) { + _(t, e) { let i = "HTTP error "; - null != t && (i += t + " "), (i += e), r$1.error(i); + null != t && (i += t + " "), (i += e), E$1.error(i); } - qr(e) { - return t$1.q(i.Ua, { n: e }); + Ll(t) { + return v$1.lt(f.Fl, { n: t }); } - Ir(t, e, i) { - const s = {}; - t && (s.feed = !0), e && (s.triggers = !0); - const r = null != i ? i : this.yt.getUserId(); - if ((r && (s.user_id = r), !s.user_id && !this.Ko.Fh())) { - const t = getAlias(this.u); - t && (s.alias = t); + Xn(t, e) { + const i = {}; + t && (i.triggers = !0); + const s = null != e ? e : this.vs.getUserId(); + if ((s && (i.user_id = s), !i.user_id && !this.hl.wh())) { + const t = getAlias(this.B); + t && (i.alias = t); } - return (s.config = { config_time: this.qt.hi() }), { respond_with: s }; + return (i.config = { config_time: this.h.xt() }), { respond_with: i }; } - Ha(t) { + Kl(t) { const e = new Date().valueOf(); let i = LAST_REQUEST_TO_ENDPOINT_MS_AGO_DEFAULT.toString(); - const s = D.Wa(this.u, t); + const s = h.Pl(this.B, t); if (-1 !== s) { i = (e - s).toString(); } return i; } - Ps(t, e, i = !1) { - const s = [["X-Braze-Api-Key", this.rn]], - r = this.Ha(e); + A(t, e, i = !1) { + const s = [["X-Braze-Api-Key", this.tu]], + r = this.Kl(e); s.push(["X-Braze-Last-Req-Ms-Ago", r]); - const n = D.Ya(this.u, e).toString(); + const n = h.Ul(this.B, e).toString(); s.push(["X-Braze-Req-Attempt", n]); - let h = !1; + let o = !1; if ( (null != t.respond_with && t.respond_with.triggers && - (s.push(["X-Braze-TriggersRequest", "true"]), (h = !0)), - null != t.respond_with && - t.respond_with.feed && - (s.push(["X-Braze-FeedRequest", "true"]), (h = !0)), - e === D._s.Xs) + (s.push(["X-Braze-TriggersRequest", "true"]), (o = !0)), + e === h.H.vi) ) { s.push(["X-Braze-ContentCardsRequest", "true"]); - let t = this.u.j(STORAGE_KEYS.C.xs); - (t && i) || ((t = 0), this.u.I(STORAGE_KEYS.C.xs, t)), - s.push(["BRAZE-SYNC-RETRY-COUNT", t.toString()]), - (h = !0); + let t = h.Ul(this.B, h.H.vi); + (t && !i) || ((t = 1), h.xl(this.B, h.H.vi, t)); + const e = Math.max(0, t - 1); + s.push(["BRAZE-SYNC-RETRY-COUNT", e.toString()]), (o = !0); } if ( - (e === D._s.Ri && - (s.push(["X-Braze-FeatureFlagsRequest", "true"]), (h = !0)), - h && s.push(["X-Braze-DataRequest", "true"]), - this.Ko.Fh()) + (e === h.H.wo && + (s.push(["X-Braze-FeatureFlagsRequest", "true"]), (o = !0)), + o && s.push(["X-Braze-DataRequest", "true"]), + this.hl.wh()) ) { - const t = this.Ko.kh(); + const t = this.hl.jh(); null != t && s.push(["X-Braze-Auth-Signature", t]); } return s; } - Ja(t, e, i, s) { - window.setTimeout(() => { - r$1.info(`Retrying rate limited ${this.Hh(s)}SDK request.`), - this.Gs(e, i, s); + Hl(t, e, i, s) { + if (this.ql[s]) return; + const r = window.setTimeout(() => { + E$1.info(`Retrying rate limited ${this.Rl(s)}SDK request.`), + this.J(e, i, s); }, t); + this.ql[s] = r; + } + fo() { + for (const t in this.ql) { + const e = this.ql[t]; + window.clearTimeout(e); + } + this.ql = {}; } - Gs(t, e, i, s) { - if (!this.Qa(i)) + J(t, e, i, r) { + if (!this.Ol(i)) return ( - r$1.info(`${this.Hh(i)}SDK request being rate limited.`), - void ("function" == typeof s && s()) + E$1.info(`${this.Rl(i)}SDK request being rate limited.`), + void ("function" == typeof r && r()) ); - const n = this.Va(); - if (!n.Za) + const n = this.Gl(); + if (!n.Wl) return ( - r$1.info( - `${this.Hh( + this.Hl(n.Yl, t, e, i), + void E$1.info( + `${this.Rl( i, )}SDK request being rate limited. Request will be retried in ${Math.trunc( - n.au / 1e3, + n.Yl / 1e3, )} seconds.`, - ), - void this.Ja(n.au, t, e, i) + ) ); - this.u.I(STORAGE_KEYS.C.du, new Date().valueOf()); - const h = t.device; - h && h.os_version instanceof Promise - ? h.os_version.then((i) => { - (t.device.os_version = i), e(n.fu); + this.B.bt(STORAGE_KEYS.ft.Jl, new Date().valueOf()); + const o = t.device; + o && o.os_version instanceof Promise + ? o.os_version.then((i) => { + (t.device.os_version = i), e(n.Ql); }) - : e(n.fu); + : e(n.Ql); + } + Vl(t) { + const e = t ? readResponseHeaders(t) : null; + if (!e || !e["retry-after"]) return null; + const i = e["retry-after"]; + if (isNaN(i) && !isNaN(Date.parse(i))) + return { type: "date", value: Date.parse(i) }; + if (!isNaN(parseFloat(i.toString()))) + return { type: "timestamp", value: 1e3 * parseFloat(i.toString()) }; + { + const t = + "Received unexpected value for retry-after header in /sync response"; + v$1.lt(f.wl, { e: t + ": " + i }); + } + return null; + } + et(t, e, i, s, r, n) { + if (h.Ul(this.B, i) >= MAX_RETRY_COUNT_PER_REQUEST) return; + let o; + n = n || 0; + const a = this.Vl(t); + r(); + const u = (t) => { + const r = window.setTimeout(() => { + e(); + }, t); + s(r), h.Zl(this.B, i); + }; + if (a && !isNaN(a.value)) { + switch (a.type) { + case "date": + (o = a.value - new Date().getTime() + n), o < 0 && e(); + break; + case "timestamp": + o = a.value + n; + } + u(o); + } else n ? u(n) : h.fi(this.B, i); } - vu(t) { + hc(t) { var e; - null === (e = this.u) || void 0 === e || e.I(STORAGE_KEYS.C.Ru, t); + null === (e = this.B) || void 0 === e || e.bt(STORAGE_KEYS.ft.uc, t); } - gu(t, e) { - let i = this.pu(); - null == i && (i = {}), (i[t] = e), this.u.I(STORAGE_KEYS.C.bu, i); + lc(t, e) { + let i = this.dc(); + null == i && (i = {}), (i[t] = e), this.B.bt(STORAGE_KEYS.ft.fc, i); } - qu() { + mc() { var t; - return null === (t = this.u) || void 0 === t ? void 0 : t.j(STORAGE_KEYS.C.Ru); + return null === (t = this.B) || void 0 === t ? void 0 : t.dt(STORAGE_KEYS.ft.uc); } - pu() { + dc() { var t; - return null === (t = this.u) || void 0 === t ? void 0 : t.j(STORAGE_KEYS.C.bu); + return null === (t = this.B) || void 0 === t ? void 0 : t.dt(STORAGE_KEYS.ft.fc); } - Au(t, e, i, s, r = "") { + vc(t, e, i, s, r = "") { let n; if (r) { - const t = this.pu(); + const t = this.dc(); n = null == t || isNaN(t[r]) ? e : t[r]; - } else (n = this.qu()), (null == n || isNaN(n)) && (n = e); + } else (n = this.mc()), (null == n || isNaN(n)) && (n = e); const o = (t - s) / 1e3; return (n = Math.min(n + o / i, e)), n; } - Du(t, e) { + Rc(t, e) { return Math.max(0, (1 - t) * e * 1e3); } - Tu(t, e = "") { - var i, s, r, n, h; - const a = { Za: !0, fu: -1, au: 0 }; - if ((null == t && (t = !0), !t && !e)) return a; - let u, - l, - c = null; - if (t) c = null === (i = this.u) || void 0 === i ? void 0 : i.j(STORAGE_KEYS.C.du); + gc(t, e = "") { + var i, r, n, o, a; + const u = { Wl: !0, Ql: -1, Yl: 0 }; + if ((null == t && (t = !0), !t && !e)) return u; + let l, + c, + d = null; + if (t) d = null === (i = this.B) || void 0 === i ? void 0 : i.dt(STORAGE_KEYS.ft.Jl); else { - const t = D.ku(this.u); - if (null == t || null == t[e]) return a; - c = t[e]; + const t = h.bc(this.B); + if (null == t || null == t[e]) return u; + d = t[e]; } - if (null == c || isNaN(c)) return a; + if (null == d || isNaN(d)) return u; if ( (t - ? ((u = - (null === (s = this.qt) || void 0 === s ? void 0 : s.Cu()) || -1), - (l = - (null === (r = this.qt) || void 0 === r ? void 0 : r.Su()) || -1)) - : ((u = - (null === (n = this.qt) || void 0 === n ? void 0 : n.Bu(e)) || -1), - (l = - (null === (h = this.qt) || void 0 === h ? void 0 : h.wu(e)) || -1)), - -1 === u || -1 === l) + ? ((l = + (null === (r = this.h) || void 0 === r ? void 0 : r.qc()) || -1), + (c = (null === (n = this.h) || void 0 === n ? void 0 : n.Ac()) || -1)) + : ((l = + (null === (o = this.h) || void 0 === o ? void 0 : o.Dc(e)) || -1), + (c = + (null === (a = this.h) || void 0 === a ? void 0 : a.Tc(e)) || -1)), + -1 === l || -1 === c) ) - return a; - const d = new Date().valueOf(); - let f = this.Au(d, u, l, c, e); - return f < 1 - ? ((a.Za = !1), (a.au = this.Du(f, l)), a) - : ((f = Math.trunc(f) - 1), - (a.fu = f), - t ? this.vu(f) : this.gu(e, f), - a); - } - Va() { - return this.Tu(!0); - } - Qa(t) { - const e = this.Tu(!1, t); - return !(e && !e.Za); + return u; + const f = new Date().valueOf(); + let m = this.vc(f, l, c, d, e); + return m < 1 + ? ((u.Wl = !1), (u.Yl = this.Rc(m, c)), u) + : ((m = Math.trunc(m) - 1), + (u.Ql = m), + t ? this.hc(m) : this.lc(e, m), + u); } - Vs() { - this.Ko.Vs(); + Gl() { + return this.gc(!0); } - Os() { - return this.Go; + Ol(t) { + const e = this.gc(!1, t); + return !(e && !e.Wl); + } + Z() { + this.hl.Z(); + } + V() { + return this.al; } addSdkMetadata(t) { - for (const e of t) -1 === this.Yh.indexOf(e) && this.Yh.push(e); + for (const e of t) -1 === this.bl.indexOf(e) && this.bl.push(e); } } -const C = { - Ks: (t) => { - let e, o; - try { - const n = () => { - r$1.error("This browser does not have any supported ajax options!"); - }; - let s = !1; - if ((window.XMLHttpRequest && (s = !0), !s)) return void n(); - e = new XMLHttpRequest(); - const i = () => { - "function" == typeof t.error && t.error(e.status), - "function" == typeof t.Zs && t.Zs(!1); - }; - (e.onload = () => { - let o = !1; - if (4 === e.readyState) - if ( - ((o = (e.status >= 200 && e.status < 300) || 304 === e.status), o) - ) { - if ("function" == typeof t.L) { - let o, r; - try { - (o = JSON.parse(e.responseText)), - (r = e.getAllResponseHeaders()); - } catch (o) { - const n = { - error: "" === e.responseText ? Xt.Ra : Xt.Ba, - response: e.responseText, - }; - (0, t.L)(n, r); - } - o && t.L(o, r); - } - "function" == typeof t.Zs && t.Zs(!0); - } else i(); - }), - (e.onerror = () => { - i(); - }), - (e.ontimeout = () => { - i(); - }), - (o = JSON.stringify(t.data)), - e.open("POST", t.url, !0), - e.setRequestHeader("Content-type", "application/json"), - e.setRequestHeader("X-Requested-With", "XMLHttpRequest"); - const f = t.headers || []; - for (const t of f) e.setRequestHeader(t[0], t[1]); - e.send(o); - } catch (t) { - r$1.error(`Network request error: ${getErrorMessage(t)}`); - } - }, -}; -const readResponseHeaders = (t) => { - const e = {}, - o = t.toString().split("\r\n"); - if (!o) return e; - let r, n; - for (const t of o) - t && - ((r = t.slice(0, t.indexOf(":")).toLowerCase().trim()), - (n = t.slice(t.indexOf(":") + 1).trim()), - (e[r] = n)); - return e; -}; - const randomInclusive = (t, a) => ( (t = Math.ceil(t)), (a = Math.floor(a)), Math.floor(Math.random() * (a - t + 1)) + t ); -class s { +class H { constructor(t = !1, s = []) { - (this.L = t), (this.ge = s), (this.L = t), (this.ge = s); + (this.W = t), (this.Ee = s), (this.W = t), (this.Ee = s); } - P(t) { - (this.L = this.L && t.L), this.ge.push(...t.ge); + Yt(t) { + (this.W = this.W && t.W), this.Ee.push(...t.Ee); } } -const yt = { - pn: () => +const vt = { + cu: () => "serviceWorker" in navigator && "undefined" != typeof ServiceWorkerRegistration && "showNotification" in ServiceWorkerRegistration.prototype && "PushManager" in window, - yn: () => + lu: () => "safari" in window && "pushNotification" in window.safari && "function" == typeof window.safari.pushNotification.permission && "function" == typeof window.safari.pushNotification.requestPermission, - isPushSupported: () => yt.pn() || yt.yn(), + isPushSupported: () => vt.cu() || vt.lu(), isPushBlocked: () => { - const i = - yt.isPushSupported() && + const o = + vt.isPushSupported() && "Notification" in window && null != window.Notification && null != window.Notification.permission && "denied" === window.Notification.permission, - n = - yt.isPushSupported() && + i = + vt.isPushSupported() && (!("Notification" in window) || null == window.Notification); - return i || n; + return o || i; }, isPushPermissionGranted: () => - yt.isPushSupported() && + vt.isPushSupported() && "Notification" in window && null != window.Notification && null != window.Notification.permission && "granted" === window.Notification.permission, - Wi: () => - !yt.isPushBlocked() && - yt.isPushSupported() && - !yt.isPushPermissionGranted(), + En: () => + vt.isPushBlocked() + ? { Gn: !1, reason: "blocked" } + : vt.isPushSupported() + ? vt.isPushPermissionGranted() + ? { Gn: !1, reason: "permissionGranted" } + : { Gn: !0 } + : { Gn: !1, reason: "unsupported" }, + Nn: (o, i) => + "blocked" === o + ? `${i} containing a push prompt is not being shown because the user has already declined push permission prompt.` + : "unsupported" === o + ? `${i} containing a push prompt is not being shown because the browser doesn't support push notifications.` + : `${i} containing a push prompt is not being shown because the user has already accepted the permission prompt.`, +}; +var vt$1 = vt; + +const IamStrings = { + sS: "inAppMessage must be an InAppMessage object", + eS: "ab-pause-scrolling", }; -var yt$1 = yt; -class Lt { - constructor(t, i, s, e, h, o, n, r, u, l) { - (this.rn = t), +function removeAllVisibleInAppMessages() { + const o = document.querySelectorAll(".ab-iam-root"); + for (let t = 0; t < o.length; t++) { + const s = o[t]; + if (s.id) { + const o = s.id + "-css", + t = document.getElementById(o); + t && t.parentNode && t.parentNode.removeChild(t); + } + s.parentNode && s.parentNode.removeChild(s); + } + const t = document.getElementsByClassName(IamStrings.eS); + for (let o = 0; o < t.length; o++) { + const s = t[o].classList; + s.contains(IamStrings.eS) && s.remove(IamStrings.eS); + } +} + +class Wt { + constructor(t, i, s, e, h, n, o, r, l, u) { + (this.tu = t), (this.baseUrl = i), - (this.oi = s), - (this.on = e), - (this.yt = h), - (this.qt = o), - (this.u = n), - (this.yu = r), - (this.Ko = u), - (this.$t = l), - (this.rn = t), + (this.C = s), + (this.eu = e), + (this.vs = h), + (this.h = n), + (this.B = o), + (this.$c = r), + (this.hl = l), + (this.j = u), + (this.tu = t), (this.baseUrl = i), - (this.ju = 0), - (this.fE = n.dE() || 0), - (this.$u = null), - (this.oi = s), - (this.on = e), - (this.yt = h), - (this.qt = o), - (this.u = n), - (this.Ko = u), - (this.$t = l), - (this.yu = r), - (this.Fu = new T()), - (this.Lu = null), - (this.Mu = 50), - (this.Pu = !1); - } - xu(t, i) { - return !t && !i && this.Ko.Gh() >= this.Mu; - } - Iu(t) { - let s = this.oi.Gl(); + (this.Zc = 0), + (this.bE = o.dE() || 0), + (this.sd = null), + (this.C = s), + (this.eu = e), + (this.vs = h), + (this.h = n), + (this.B = o), + (this.hl = l), + (this.j = u), + (this.$c = r), + (this.hd = new m()), + (this.nd = null), + (this.rd = 50), + (this.ld = !1), + (this.ud = !1); + } + ad(t, i) { + return !t && !i && this.hl.Jh() >= this.rd; + } + md(t) { + let i = this.C.am(); if (t.length > 0) { - const e = this.yt.getUserId(); - for (const h of t) { - const t = (!h.userId && !e) || h.userId === e; - h.type === i.ql && t && (s = !0); + const s = this.vs.getUserId(); + for (const e of t) { + const t = (!e.userId && !s) || e.userId === s; + e.type === f.Sm && t && (i = !0); } } - return s; + return i; } - Nu(t = !1, i = !1, s = !0, e, h, n, u = !1, l = !1) { - s && this.Ou(); - const a = this.u.AE(), - c = this.u.OE(); - let d = !1; - const m = (t, i, r = -1) => { - let u = !1; - const l = new Date().valueOf(); - D.Hs(this.u, D._s.Ka, l), - -1 !== r && i.push(["X-Braze-Req-Tokens-Remaining", r.toString()]), - C.Ks({ - url: this.baseUrl + "/data/", - data: t, - headers: i, - L: (s) => { - null != t.respond_with && - t.respond_with.triggers && - (this.ju = Math.max(this.ju - 1, 0)), - this.$t.Qs(t, s, i) - ? (this.Ko.Vs(), - this.qt.al(s), - (null != t.respond_with && - t.respond_with.user_id != this.yt.getUserId()) || - (null != t.device && this.u.I(STORAGE_KEYS.C.Fa, t.device), - null != t.sdk_metadata && - (this.u.I(STORAGE_KEYS.C.Jh, t.sdk_metadata), - this.u.I(STORAGE_KEYS.C.Qh, this.oi.xi())), - this.yu(s), - D.Ws(this.u, D._s.Ka, 1), - "function" == typeof e && e())) - : s.auth_error && (u = !0); - }, - error: () => { + fd(t = !1, i = !0, e, n, o, r = !1, u = !1) { + i && this.gd(); + const c = this.B.RE(), + d = this.B.IE(); + let m = !1; + const f = (t, r, u = -1) => { + const c = new Date().valueOf(); + h.K(this.B, h.H.Ze, c), + -1 !== u && r.push(["X-Braze-Req-Tokens-Remaining", u.toString()]); + let d = !1; + l.O({ + url: this.baseUrl + "/data/", + data: t, + headers: r, + W: (i) => { + null != t.respond_with && + t.respond_with.triggers && + (this.Zc = Math.max(this.Zc - 1, 0)), + this.j.Y(t, i, r) + ? (this.hl.Z(), + this.h.Sc(i), + (null != t.respond_with && + t.respond_with.user_id != this.vs.getUserId()) || + (null != t.device && this.B.bt(STORAGE_KEYS.ft.ac, t.device), + null != t.sdk_metadata && + (this.B.bt(STORAGE_KEYS.ft.Dl, t.sdk_metadata), + this.B.bt(STORAGE_KEYS.ft.Tl, this.C.yt())), + this.$c(i), + h.xl(this.B, h.H.Ze, 1), + "function" == typeof e && e())) + : i.auth_error && (d = !0); + }, + error: () => { + (d = !0), null != t.respond_with && t.respond_with.triggers && - (this.ju = Math.max(this.ju - 1, 0)), - this.$t.Zh(t.events, t.attributes), - "function" == typeof h && h(); - }, - Zs: (t) => { - if (("function" == typeof n && n(t), s && !d)) { - if (t && !u) this.zu(); - else { - D.ti(this.u, D._s.Ka); - let t = this.$u; - (null == t || t < 1e3 * this.fE) && (t = 1e3 * this.fE), - this.zu(Math.min(3e5, randomInclusive(1e3 * this.fE, 3 * t))); - } - d = !0; + (this.Zc = Math.max(this.Zc - 1, 0)), + this.j.kl(t.events, t.attributes), + "function" == typeof n && n(); + }, + tt: (t, s) => { + "function" == typeof o && o(!d); + const e = this.j.Vl(s); + let n = 0; + if (e) + switch (e.type) { + case "date": + n = Math.max(e.value - new Date().valueOf(), 0); + break; + case "timestamp": + n = e.value; } - }, - }); + if (i && !m) { + if (d) { + h.Zl(this.B, h.H.Ze); + const t = this.h.st(), + i = this.h.it(), + s = this.h.nt(); + let e = this.sd; + (null == e || e < t) && (e = t); + const o = Math.min(s, randomInclusive(t, e * i)) + n; + this.pd(o); + } else this.pd(Math.max(1e3 * this.bE, n)); + m = !0; + } + }, + }); }, - f = this.Iu(a), - g = i || f; - if (this.xu(u, f)) - return void r$1.info( + g = this.md(c), + p = t || g; + if (this.ad(r, g)) + return void E$1.info( "Declining to flush data due to 50 consecutive authentication failures", ); - if (s && !this.$t.La(a, c, t, g)) - return this.zu(), void ("function" == typeof n && n(!0)); - const v = this.$t.Ea(t, g, a, c, l); - g && this.ju++; - let p = !1; + if (i && !this.j.Ml(c, d, p)) + return this.pd(), void ("function" == typeof o && o(!0)); + const v = this.j.$l(p, c, d, u); + p && this.Zc++; + let b = !1; if (v) for (const t of v) - this.$t.Gs( + this.j.J( t.requestData, - (i) => m(t.requestData, t.headers, i), - D._s.Ka, - h, + (i) => f(t.requestData, t.headers, i), + h.H.Ze, + n, ), - (p = !0); - this.Ko.Fh() && s && !p - ? this.zu() - : f && (r$1.info("Invoking new session subscriptions"), this.Fu.Rt()); - } - Uu() { - return this.ju > 0; - } - zu(t = 1e3 * this.fE) { - this.Pu || - (this.Ou(), - (this.Lu = window.setTimeout(() => { + (b = !0); + this.hl.wh() && i && !b + ? this.pd() + : g && + (E$1.info("Invoking new session subscriptions"), + this.hd.L(), + (this.ud = !0)); + } + vd() { + return this.Zc > 0; + } + pd(t = 1e3 * this.bE) { + this.ld || + (this.gd(), + (this.nd = window.setTimeout(() => { if (document.hidden) { const t = "visibilitychange", i = () => { document.hidden || - (document.removeEventListener(t, i, !1), this.Nu()); + (document.removeEventListener(t, i, !1), this.fd()); }; document.addEventListener(t, i, !1); - } else this.Nu(); + } else this.fd(); }, t)), - (this.$u = t)); + (this.sd = t)); } - Ou() { - null != this.Lu && (clearTimeout(this.Lu), (this.Lu = null)); + gd() { + null != this.nd && (clearTimeout(this.nd), (this.nd = null)); } initialize() { - (this.Pu = !1), this.zu(); + (this.ld = !1), this.pd(); } destroy() { - this.Fu.removeAllSubscriptions(), - this.Ko.yh(), - this.Ou(), - (this.Pu = !0), - this.Nu(void 0, void 0, !1, void 0, void 0, void 0, void 0, !0), - (this.Lu = null); + this.hd.removeAllSubscriptions(), + this.hl.Gh(), + this.gd(), + (this.ld = !0), + this.fd(void 0, !1, void 0, void 0, void 0, void 0, !0), + (this.nd = null), + (this.ud = !1); } - mr(t) { - return this.Fu.Nt(t); + rn(t) { + return this.ud ? (t(), null) : this.hd.Rt(t); } openSession() { - const t = this.oi.xi() !== this.oi.xo(); - t && (this.u.cE(STORAGE_KEYS.iu.Uo), this.u.cE(STORAGE_KEYS.iu.su)), - this.Nu(void 0, !1, void 0, () => { - this.u.ii(STORAGE_KEYS.C.wi); + const t = this.C.yt() !== this.C.el(); + t && (this.B.hE(STORAGE_KEYS.Ou.tl), this.B.hE(STORAGE_KEYS.Ou.Cu)), + this.fd(!1, void 0, () => { + t && (this.B.zt(STORAGE_KEYS.ft.vo), this.B.zt(STORAGE_KEYS.ft.Dt)); }), - this.Mn(), + this.Ya(), t && Promise.resolve().then(function () { return pushManagerFactory; }).then((t) => { - if (this.Pu) return; - const i = t.default.m(); + if (this.ld) return; + const i = t.default.ra(); if ( null != i && - (yt$1.isPushPermissionGranted() || yt$1.isPushBlocked()) + (vt$1.isPushPermissionGranted() || vt$1.isPushBlocked()) ) { const t = () => { - i.mn() - ? r$1.info( + i.du() + ? E$1.info( "Push token maintenance is disabled, not refreshing token for backend.", ) : i.subscribe(); }, - s = (i, s) => { + e = (i, s) => { s && t(); }, - e = () => { - const i = this.u.j(STORAGE_KEYS.C.In); + h = () => { + const i = this.B.dt(STORAGE_KEYS.ft.Uu); (null == i || i) && t(); }, - h = A.ts.Zt; - new A(h, r$1).jr(h.hs.cu, s, e); + n = et.Us.Rs; + new et(n, E$1).kr(n.Fs.Fu, e, h); } }); } - _u() { - this.u.ii(STORAGE_KEYS.C.vi), this.u.ii(STORAGE_KEYS.C.bs), this.u.ii(STORAGE_KEYS.C.Xr); - } - changeUser(t, i, s) { - const e = this.yt.getUserId(); - if (e !== t) { - this.oi.yl(), - this._u(), - null != e && this.Nu(void 0, !1, void 0, void 0, void 0), - this.yt.ou(t), - s ? this.Ko.setSdkAuthenticationSignature(s) : this.Ko.xh(); - for (let t = 0; t < i.length; t++) i[t].changeUser(null == e); - null != e && this.u.ii(STORAGE_KEYS.C.J), - this.u.ii(STORAGE_KEYS.C.Fa), - this.u.ii(STORAGE_KEYS.C.nE), - this.u.ii(STORAGE_KEYS.C._E), + bd() { + this.B.zt(STORAGE_KEYS.ft.lo), this.B.zt(STORAGE_KEYS.ft.Ps), this.B.zt(STORAGE_KEYS.ft.Wn); + } + wd() { + var t, i; + this.B.zt(STORAGE_KEYS.ft.Jl), this.B.zt(STORAGE_KEYS.ft.lE); + const e = h.H; + for (const i in e) { + const s = e[i]; + this.j.lc(s, null === (t = this.h) || void 0 === t ? void 0 : t.Dc(s)); + } + this.j.hc(null === (i = this.h) || void 0 === i ? void 0 : i.qc()); + } + changeUser(t, i, e) { + const h = this.vs.getUserId(); + if (h !== t) { + this.C.jm(), + this.bd(), + removeAllVisibleInAppMessages(), + null != h && this.fd(void 0, !1, void 0, void 0, void 0), + this.vs.Ju(t), + e ? this.hl.setSdkAuthenticationSignature(e) : this.hl.yh(); + for (let t = 0; t < i.length; t++) i[t].changeUser(null == h); + this.j.fo(), + null != h && this.B.zt(STORAGE_KEYS.ft.rE), + this.B.zt(STORAGE_KEYS.ft.ac), + this.B.zt(STORAGE_KEYS.ft.uE), + this.wd(), this.openSession(), - r$1.info('Changed user to "' + t + '".'); + E$1.info('Changed user to "' + t + '".'); } else { let i = "Doing nothing."; - s && - this.Ko.kh() !== s && - (this.Ko.setSdkAuthenticationSignature(s), + e && + this.hl.jh() !== e && + (this.hl.setSdkAuthenticationSignature(e), (i = "Updated SDK authentication signature")), - r$1.info(`Current user is already ${t}. ${i}`); + E$1.info(`Current user is already ${t}. ${i}`); } } requestImmediateDataFlush(t) { - this.Ou(), this.oi.xo(); - this.Nu( - void 0, + this.gd(), this.C.el(); + this.fd( void 0, void 0, void 0, () => { - r$1.error("Failed to flush data, request will be retried automatically."); + E$1.error("Failed to flush data, request will be retried automatically."); }, t, !0, ); } - requestFeedRefresh() { - this.oi.xo(), this.Nu(!0); + yr(t, i) { + this.C.el(), + E$1.info("Requesting explicit trigger refresh."), + this.fd(!0, void 0, t, i); } - $r(t, i) { - this.oi.xo(), - r$1.info("Requesting explicit trigger refresh."), - this.Nu(void 0, !0, void 0, t, i); - } - Cn(s, e) { - const h = i.Eu, - n = { a: s, l: e }, - u = t$1.q(h, n); + Gu(t, i) { + const e = f.kd, + h = { a: t, l: i }, + n = v$1.lt(e, h); return ( - u && (r$1.info(`Logged alias ${s} with label ${e}`), this.u.I(STORAGE_KEYS.C._E, n)), u + n && (E$1.info(`Logged alias ${t} with label ${i}`), this.B.bt(STORAGE_KEYS.ft.uE, h)), + n ); } - Fn(i, e, h) { - if (this.qt.hu(e)) + Mu(t, i, s) { + if (this.h.qu(i)) return ( - r$1.info(`Custom Attribute "${e}" is blocklisted, ignoring.`), new s() + E$1.info(`Custom Attribute "${i}" is blocklisted, ignoring.`), new H() ); - const o = { key: e, value: h }, - n = t$1.q(i, o); - if (n) { - const t = "object" == typeof h ? JSON.stringify(h, null, 2) : h; - r$1.info(`Logged custom attribute: ${e} with value: ${t}`); + const e = { key: i, value: s }, + h = v$1.lt(t, e); + if (h) { + const t = "object" == typeof s ? JSON.stringify(s, null, 2) : s; + E$1.info(`Logged custom attribute: ${i} with value: ${t}`); } - return n; + return h; } - setLastKnownLocation(s, e, h, o, n, u) { - const l = { latitude: e, longitude: h }; - null != o && (l.altitude = o), - null != n && (l.ll_accuracy = n), - null != u && (l.alt_accuracy = u); - const a = t$1.q(i.Ju, l, s || void 0); + setLastKnownLocation(t, i, s, e, h, n) { + const o = { latitude: i, longitude: s }; + null != e && (o.altitude = e), + null != h && (o.ll_accuracy = h), + null != n && (o.alt_accuracy = n); + const r = v$1.lt(f.yd, o, t || void 0); return ( - a && - r$1.info(`Set user last known location as ${JSON.stringify(l, null, 2)}`), - a + r && + E$1.info(`Set user last known location as ${JSON.stringify(o, null, 2)}`), + r ); } - kr(t, s) { - const e = this.oi.xo(); - return new ve(this.yt.getUserId(), i.Ku, t, e, { cid: s }); + $r(t, i) { + const s = this.C.el(); + return new De(this.vs.getUserId(), f.jd, t, s, { cid: i }); } - Wu(t, i) { - return new A(t, i); + Sd(t, i) { + return new et(t, i); } - Mn() { - const t = A.ts.Zt; - this.Wu(t, r$1).setItem(t.hs.Ka, 1, { + Ya() { + const t = et.Us.Rs; + this.Sd(t, E$1).setItem(t.Fs.Ze, 1, { baseUrl: this.baseUrl, - data: { api_key: this.rn, device_id: this.on.ce().id }, - userId: this.yt.getUserId(), - sdkAuthEnabled: this.Ko.Fh(), + data: { api_key: this.tu, device_id: this.eu.ve().id }, + userId: this.vs.getUserId(), + sdkAuthEnabled: this.hl.wh(), }); } - yr(t) { + Fr(t) { for (const i of t) - if (i.api_key === this.rn) this.$t.Zh(i.events, i.attributes); + if (i.api_key === this.tu) this.j.kl(i.events, i.attributes); else { - const t = A.ts.Zt; - new A(t, r$1).setItem(t.hs.wr, p$1.W(), i); + const t = et.Us.Rs; + new et(t, E$1).setItem(t.Fs.zr, P$1.se(), i); } } - Gn(e, h, o) { - if (this.qt.hu(e)) + Na(t, i, s) { + if (this.h.qu(t)) return ( - r$1.info(`Custom Attribute "${e}" is blocklisted, ignoring.`), new s() + E$1.info(`Custom Attribute "${t}" is blocklisted, ignoring.`), new H() ); - let n, u; + let e, h; return ( - null === h && null === o - ? ((n = i.Gu), (u = { key: e })) - : ((n = i.Xu), (u = { key: e, latitude: h, longitude: o })), - t$1.q(n, u) + null === i && null === s + ? ((e = f.Ad), (h = { key: t })) + : ((e = f.Dd), (h = { key: t, latitude: i, longitude: s })), + v$1.lt(e, h) ); } - Hn(s, e) { - const h = { group_id: s, status: e }; - return t$1.q(i.Hu, h); + Ra(t, i) { + const s = { group_id: t, status: i }; + return v$1.lt(f.$d, s); } } -class Jt { +class li { constructor( t = 0, i = [], s = [], h = [], e = null, - r = null, - l = { enabled: !1 }, - a = { enabled: !1, refresh_rate_limit: void 0 }, - n = { enabled: !0, capacity: GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT, refill_rate: GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT, endpoint_overrides: {} }, + l = null, + r = { enabled: !1 }, + n = { enabled: !1, refresh_rate_limit: void 0 }, + a = { enabled: !0, capacity: GLOBAL_RATE_LIMIT_CAPACITY_DEFAULT, refill_rate: GLOBAL_RATE_LIMIT_REFILL_RATE_DEFAULT, endpoint_overrides: {} }, + o = null, + u = null, + c = null, ) { - (this.hl = t), - (this.gl = i), - (this.fl = s), - (this.bl = h), - (this.Rl = e), - (this.cl = r), - (this.ml = l), - (this.ai = a), - (this.ol = n), - (this.hl = t), - (this.gl = i), - (this.fl = s), - (this.bl = h), - (this.Rl = e), - (this.cl = r), - (this.ml = l), - (this.ai = a), - (this.ol = n); - } - Y() { + (this.kc = t), + (this.Ic = i), + (this.Kc = s), + (this.Pc = h), + (this.Oc = e), + (this.xc = l), + (this.Gc = r), + (this.Xr = n), + (this.Nc = a), + (this.banners = o), + (this.dust = u), + (this.Hc = c), + (this.kc = t), + (this.Ic = i), + (this.Kc = s), + (this.Pc = h), + (this.Oc = e), + (this.xc = l), + (this.Gc = r), + (this.Xr = n), + (this.Nc = a), + (this.banners = o), + (this.dust = u), + (this.Hc = c); + } + gt() { return { - s: "5.5.0", - l: this.hl, - e: this.gl, - a: this.fl, - p: this.bl, - m: this.Rl, - v: this.cl, - c: this.ml, - f: this.ai, - grl: this.ol, + s: "6.5.0", + l: this.kc, + e: this.Ic, + a: this.Kc, + p: this.Pc, + m: this.Oc, + v: this.xc, + c: this.Gc, + f: this.Xr, + grl: this.Nc, + b: this.banners, + d: this.dust, + rb: this.Hc, }; } - static qn(t) { + static _u(t) { let i = t.l; return ( - "5.5.0" !== t.s && (i = 0), - new Jt(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f, t.grl) + "6.5.0" !== t.s && (i = 0), + new li(i, t.e, t.a, t.p, t.m, t.v, t.c, t.f, t.grl, t.b, t.d, t.rb) ); } } -class Dt { +class Bt { constructor(t) { - (this.u = t), - (this.u = t), - (this.tl = new T()), - (this.el = new T()), - (this.il = new T()), - (this.sl = null), - (this.rl = null); - } - ll() { - if (null == this.rl) { - const t = this.u.j(STORAGE_KEYS.C.ul); - this.rl = null != t ? Jt.qn(t) : new Jt(); - } - return this.rl; - } - hi() { - return this.ll().hl; - } - al(t) { + (this.B = t), + (this.B = t), + (this.Ec = new m()), + (this.Bc = new m()), + (this.wc = new m()), + (this.Cc = new m()), + (this.yc = new m()), + (this.Fc = null), + (this.Lc = null); + } + Mc() { + if (null == this.Lc) { + const t = this.B.dt(STORAGE_KEYS.ft.jc); + this.Lc = null != t ? li._u(t) : new li(); + } + return this.Lc; + } + xt() { + return this.Mc().kc; + } + Sc(t) { + var i, e, n, r; if (null != t && null != t.config) { - const e = t.config; - if (e.time > this.ll().hl) { - const t = (t) => (null == t ? this.ll().ol : t), - i = new Jt( - e.time, - e.events_blacklist, - e.attributes_blacklist, - e.purchases_blacklist, - e.messaging_session_timeout, - e.vapid_public_key, - e.content_cards, - e.feature_flags, - t(e.global_request_rate_limit), + const l = t.config; + if (l.time > this.Mc().kc) { + const t = (t) => (null == t ? this.Mc().Nc : t), + u = new li( + l.time, + l.events_blacklist, + l.attributes_blacklist, + l.purchases_blacklist, + l.messaging_session_timeout, + l.vapid_public_key, + l.content_cards, + l.feature_flags, + t(l.global_request_rate_limit), + l.banners, + l.dust, + l.request_backoff, ); - let s = !1; - null != i.cl && this.Wn() !== i.cl && (s = !0); - let r = !1; - null != i.ml.enabled && this.ei() !== i.ml.enabled && (r = !0); - let n = !1; - null != i.ai.enabled && this.mi() !== i.ai.enabled && (n = !0), - (this.rl = i), - this.u.I(STORAGE_KEYS.C.ul, i.Y()), - s && this.tl.Rt(), - r && this.el.Rt(), - n && this.il.Rt(); + let o = !1; + null != u.xc && this.ju() !== u.xc && (o = !0); + let a = !1; + null != u.Gc.enabled && this.wi() !== u.Gc.enabled && (a = !0); + let h = !1; + null != u.Xr.enabled && this.Yr() !== u.Xr.enabled && (h = !0); + let c = !1; + null != + (null === (i = u.banners) || void 0 === i ? void 0 : i.enabled) && + this.kt() !== + (null === (e = u.banners) || void 0 === e ? void 0 : e.enabled) && + (c = !0); + let d = !1; + null != (null === (n = u.dust) || void 0 === n ? void 0 : n.enabled) && + this.Ye() !== + (null === (r = u.dust) || void 0 === r ? void 0 : r.enabled) && + (d = !0), + (this.Lc = u), + this.B.bt(STORAGE_KEYS.ft.jc, u.gt()), + o && this.Ec.L(), + a && this.Bc.L(), + h && this.wc.L(), + c && this.Cc.L(), + d && this.yc.L(); } } } - _n(t) { - const e = this.tl.Nt(t); - return this.sl && this.tl.removeSubscription(this.sl), (this.sl = e), e; + xu(t) { + const i = this.Ec.Rt(t); + return this.Fc && this.Ec.removeSubscription(this.Fc), (this.Fc = i), i; + } + Ci(t) { + return this.Bc.Rt(t); + } + jo(t) { + return this.wc.Rt(t); } - Ms(t) { - return this.el.Nt(t); + P(t) { + return this.Cc.Rt(t); } - bi(t) { - return this.il.Nt(t); + Tr(t) { + return this.yc.Rt(t); } - me(t) { - return -1 !== this.ll().gl.indexOf(t); + Ce(t) { + return -1 !== this.Mc().Ic.indexOf(t); } - hu(t) { - return -1 !== this.ll().fl.indexOf(t); + qu(t) { + return -1 !== this.Mc().Kc.indexOf(t); } Dr(t) { - return -1 !== this.ll().bl.indexOf(t); + return -1 !== this.Mc().Pc.indexOf(t); } - dl() { - return this.ll().Rl; + _c() { + return this.Mc().Oc; } - Wn() { - return this.ll().cl; + ju() { + return this.Mc().xc; } - ei() { - return this.ll().ml.enabled || !1; + wi() { + return this.Mc().Gc.enabled || !1; } - Cl() { - const t = this.ll().ol; + Vc() { + const t = this.Mc().Nc; return !(!t || null == t.enabled) && t.enabled; } - Cu() { - if (!this.Cl()) return -1; - const t = this.ll().ol; + qc() { + if (!this.Vc()) return -1; + const t = this.Mc().Nc; return null == t.capacity || t.capacity < 10 ? -1 : t.capacity; } - Su() { - if (!this.Cl()) return -1; - const t = this.ll().ol; + Ac() { + if (!this.Vc()) return -1; + const t = this.Mc().Nc; return null == t.refill_rate || t.refill_rate <= 0 ? -1 : t.refill_rate; } - vl(t) { - const e = this.ll().ol.endpoint_overrides; - return null == e ? null : e[t]; + zc(t) { + const i = this.Mc().Nc.endpoint_overrides; + return null == i ? null : i[t]; } - Bu(t) { - const e = this.vl(t); - return null == e || isNaN(e.capacity) || e.capacity <= 0 ? -1 : e.capacity; + Dc(t) { + const i = this.zc(t); + return null == i || isNaN(i.capacity) || i.capacity <= 0 ? -1 : i.capacity; } - wu(t) { - const e = this.vl(t); - return null == e || isNaN(e.refill_rate) || e.refill_rate <= 0 + Tc(t) { + const i = this.zc(t); + return null == i || isNaN(i.refill_rate) || i.refill_rate <= 0 ? -1 - : e.refill_rate; + : i.refill_rate; + } + Yr() { + return this.Mc().Xr.enabled && null == this.yo() + ? (v$1.lt(f.wl, { e: "Missing feature flag refresh_rate_limit." }), !1) + : this.Mc().Xr.enabled || !1; + } + yo() { + return this.Mc().Xr.refresh_rate_limit; + } + kt() { + var t; + return ( + (null === (t = this.Mc().banners) || void 0 === t ? void 0 : t.enabled) || + null + ); + } + oe() { + var t; + return ( + (null === (t = this.Mc().banners) || void 0 === t + ? void 0 + : t.max_placements) || 0 + ); + } + Ye() { + var t; + return ( + (null === (t = this.Mc().dust) || void 0 === t ? void 0 : t.enabled) || !1 + ); + } + st() { + var t; + const i = + null === (t = this.Mc().Hc) || void 0 === t + ? void 0 + : t.min_sleep_duration_ms; + return null != i ? i : REQUEST_BACKOFF_MIN_SLEEP_MS_DEFAULT; } - mi() { - return this.ll().ai.enabled && null == this.Di() - ? (t$1.q(i.Ls, { e: "Missing feature flag refresh_rate_limit." }), !1) - : this.ll().ai.enabled || !1; + it() { + var t; + const i = + null === (t = this.Mc().Hc) || void 0 === t ? void 0 : t.scale_factor; + return null != i ? i : REQUEST_BACKOFF_SCALE_FACTOR_DEFAULT; } - Di() { - return this.ll().ai.refresh_rate_limit; + nt() { + var t; + const i = + null === (t = this.Mc().Hc) || void 0 === t + ? void 0 + : t.max_sleep_duration_ms; + return null != i ? i : REQUEST_BACKOFF_MAX_SLEEP_MS_DEFAULT; } } -class Mt { +class Vt { constructor(s, t, i, e) { - (this.u = s), - (this.yt = t), - (this.qt = i), - (this.wl = e), - (this.u = s), - (this.yt = t), - (this.qt = i), - (this.Sl = 1e3), + (this.B = s), + (this.vs = t), + (this.h = i), + (this.tm = e), + (this.B = s), + (this.vs = t), + (this.h = i), + (this.im = 1e3), (null == e || isNaN(e)) && (e = 1800), - e < this.Sl / 1e3 && - (r$1.info( + e < this.im / 1e3 && + (E$1.info( "Specified session timeout of " + e + "s is too small, using the minimum session timeout of " + - this.Sl / 1e3 + + this.im / 1e3 + "s instead.", ), - (e = this.Sl / 1e3)), - (this.wl = e); - } - jl(s, t) { - return new ve(this.yt.getUserId(), i.xl, s, t.eu, { d: convertMsToSeconds(s - t.Dl) }); - } - xi() { - const s = this.u.tu(STORAGE_KEYS.iu.El); - return null == s ? null : s.eu; - } - Gl() { - const s = new Date().valueOf(), - t = this.qt.dl(), - i = this.u.j(STORAGE_KEYS.C.Nl); - if (null != i && null == t) return !1; - let e = !1; - return ( - null == i ? (e = !0) : null != t && (e = s - i > 1e3 * t), - e && this.u.I(STORAGE_KEYS.C.Nl, s), - e - ); - } - zl(s, t) { - return null == t || null == t.Hl || (!(s - t.Dl < this.Sl) && t.Hl < s); - } - xo() { - const s = new Date().valueOf(), - t = s + 1e3 * this.wl, - e = this.u.tu(STORAGE_KEYS.iu.El); - if (this.zl(s, e)) { - let n = "Generating session start event with time " + s; + (e = this.im / 1e3)), + (this.tm = e); + } + nm(s, t) { + return new De(this.vs.getUserId(), f.hm, s, t.Tu, { d: convertMsToSeconds(s - t.lm) }); + } + yt() { + const t = this.B.$u(STORAGE_KEYS.Ou.um); + return null == t ? null : t.Tu; + } + am() { + const t = new Date().valueOf(), + i = this.h._c(); + if (null == i) return !1; + const e = this.B.dt(STORAGE_KEYS.ft.dm), + n = null == e || t - e > 1e3 * i; + return n && this.B.bt(STORAGE_KEYS.ft.dm, t), n; + } + fm(s, t) { + return null == t || null == t.pm || (!(s - t.lm < this.im) && t.pm < s); + } + el() { + const t = new Date().valueOf(), + i = t + 1e3 * this.tm, + e = this.B.$u(STORAGE_KEYS.Ou.um); + if (this.fm(t, e)) { + let n = "Generating session start event with time " + t; if (null != e) { - let s = e.Wl; - s - e.Dl < this.Sl && (s = e.Dl + this.Sl), - this.u.kl(this.jl(s, e)), + let s = e.gm; + s - e.lm < this.im && (s = e.lm + this.im), + this.B.wm(this.nm(s, e)), (n += " (old session ended " + s + ")"); } - (n += ". Will expire " + t.valueOf()), r$1.info(n); - const l = new _t(p$1.W(), t); - this.u.kl(new ve(this.yt.getUserId(), i.ql, s, l.eu)), - this.u.uu(STORAGE_KEYS.iu.El, l); - return null == this.u.j(STORAGE_KEYS.C.Nl) && this.u.I(STORAGE_KEYS.C.Nl, s), l.eu; + (n += ". Will expire " + i.valueOf()), E$1.info(n); + const o = new _t(P$1.se(), i); + this.B.wm(new De(this.vs.getUserId(), f.Sm, t, o.Tu)), + this.B.Iu(STORAGE_KEYS.Ou.um, o); + return null == this.B.dt(STORAGE_KEYS.ft.dm) && this.B.bt(STORAGE_KEYS.ft.dm, t), o.Tu; } - if (null != e) return (e.Wl = s), (e.Hl = t), this.u.uu(STORAGE_KEYS.iu.El, e), e.eu; + if (null != e) return (e.gm = t), (e.pm = i), this.B.Iu(STORAGE_KEYS.Ou.um, e), e.Tu; } - yl() { - const s = this.u.tu(STORAGE_KEYS.iu.El); - null != s && - (this.u.Al(STORAGE_KEYS.iu.El), this.u.kl(this.jl(new Date().valueOf(), s))); + jm() { + const t = this.B.$u(STORAGE_KEYS.Ou.um); + null != t && + (this.B.xm(STORAGE_KEYS.Ou.um), this.B.wm(this.nm(new Date().valueOf(), t))); } } -const Wt = { - Wh: function (e, t = !1) { - let a = !1; +const Kt = { + _l: function (e, o = !1) { + let t = !1; try { if (localStorage && localStorage.getItem) try { - localStorage.setItem(STORAGE_KEYS.C.ec, "true"), - localStorage.getItem(STORAGE_KEYS.C.ec) && - (localStorage.removeItem(STORAGE_KEYS.C.ec), (a = !0)); + localStorage.setItem(STORAGE_KEYS.ft.Qc, "true"), + localStorage.getItem(STORAGE_KEYS.ft.Qc) && + (localStorage.removeItem(STORAGE_KEYS.ft.Qc), (t = !0)); } catch (e) { if ( !( @@ -3623,17 +3843,17 @@ const Wt = { ) ) throw e; - a = !0; + t = !0; } } catch (e) { - r$1.info("Local Storage not supported!"); + E$1.info("Local Storage not supported!"); } - const n = Wt.oc(), - c = new Q.tc(e, n && !t, a); - let l; - return (l = a ? new Q.rc(e) : new Q.ac()), new Q(c, l); + const r = Kt.Uc(), + a = new ee.Jc(e, r && !o, t); + let n; + return (n = t ? new ee.Wc(e) : new ee.Xc()), new ee(a, n); }, - oc: function () { + Uc: function () { return ( navigator.cookieEnabled || ("cookie" in document && @@ -3645,16 +3865,23 @@ const Wt = { }; class ControlMessage { - constructor(t, s) { - (this.triggerId = t), - (this.messageExtras = s), - (this.triggerId = t), - (this.messageExtras = s), + constructor(s, t) { + (this.triggerId = s), + (this.messageExtras = t), + (this.triggerId = s), + (this.messageExtras = t), (this.extras = {}), - (this.isControl = !0); + (this.isControl = !0), + (this.Gt = !1); } - static fromJson(t) { - return new ControlMessage(t.trigger_id, t.message_extras); + static fromJson(s) { + return new ControlMessage(s.trigger_id, s.message_extras); + } + Wt() { + return !this.Gt && ((this.Gt = !0), !0); + } + sm() { + return this.Gt; } } @@ -3676,33 +3903,33 @@ function _isInView(t, n = !1, e = !1, s = !1) { !s) ); } -const DOMUtils = { dc: null, po: _isInView }; -const DIRECTIONS = { Oe: "up", Qe: "down", U: "left", V: "right" }; +const DOMUtils = { lp: null, td: _isInView }; +const DIRECTIONS = { Uo: "up", Vo: "down", de: "left", ce: "right" }; function supportsPassive() { - if (null == DOMUtils.dc) { - DOMUtils.dc = !1; + if (null == DOMUtils.lp) { + DOMUtils.lp = !1; try { const t = Object.defineProperty({}, "passive", { get: () => { - DOMUtils.dc = !0; + DOMUtils.lp = !0; }, }); window.addEventListener("testPassive", () => {}, t), window.removeEventListener("testPassive", () => {}, t); } catch (t) { - r$1.error(getErrorMessage(t)); + E$1.error(getErrorMessage(t)); } } - return DOMUtils.dc; + return DOMUtils.lp; } function addPassiveEventListener(t, n, e = () => {}) { t.addEventListener(n, e, !!supportsPassive() && { passive: !0 }); } function topIsInView(t) { - return DOMUtils.po(t, !0, !1, !1); + return DOMUtils.td(t, !0, !1, !1); } function bottomIsInView(t) { - return DOMUtils.po(t, !1, !0, !1); + return DOMUtils.td(t, !1, !0, !1); } function clickElement(t) { if (t.onclick) { @@ -3721,15 +3948,15 @@ function detectSwipe(t, n, e) { const l = s - o.touches[0].clientX, u = i - o.touches[0].clientY; Math.abs(l) > Math.abs(u) && Math.abs(l) >= 25 - ? (((l > 0 && n === DIRECTIONS.U) || (l < 0 && n === DIRECTIONS.V)) && + ? (((l > 0 && n === DIRECTIONS.de) || (l < 0 && n === DIRECTIONS.ce)) && e(o), (s = null), (i = null)) : Math.abs(u) >= 25 && (((u > 0 && - n === DIRECTIONS.Oe && + n === DIRECTIONS.Uo && t.scrollTop === t.scrollHeight - t.offsetHeight) || - (u < 0 && n === DIRECTIONS.Qe && 0 === t.scrollTop)) && + (u < 0 && n === DIRECTIONS.Vo && 0 === t.scrollTop)) && e(o), (s = null), (i = null)); @@ -3748,7 +3975,7 @@ function buildSvg(t, n, e) { ); } -const KeyCodes = { Fo: 32, lo: 9, To: 13, mh: 27 }; +const KeyCodes = { Ho: 32, Wo: 9, Go: 13, Ih: 27 }; const isIFrame = (e) => null !== e && "IFRAME" === e.tagName; @@ -3761,21 +3988,21 @@ class InAppMessage { e, E, n, + T, o, r, l, u, a, + A, I, c, - A, O, - _, - m, L, + _, N, - S, R, + S, M, D, C, @@ -3784,6 +4011,8 @@ class InAppMessage { b, P, p, + f, + G, ) { (this.message = t), (this.messageAlignment = s), @@ -3792,21 +4021,21 @@ class InAppMessage { (this.triggerId = e), (this.clickAction = E), (this.uri = n), - (this.openTarget = o), - (this.dismissType = r), - (this.duration = l), - (this.icon = u), - (this.imageUrl = a), - (this.imageStyle = I), - (this.iconColor = c), - (this.iconBackgroundColor = A), - (this.backgroundColor = O), - (this.textColor = _), - (this.closeButtonColor = m), - (this.animateIn = L), + (this.openTarget = T), + (this.dismissType = o), + (this.duration = r), + (this.icon = l), + (this.imageUrl = u), + (this.imageStyle = a), + (this.iconColor = A), + (this.iconBackgroundColor = I), + (this.backgroundColor = c), + (this.textColor = O), + (this.closeButtonColor = L), + (this.animateIn = _), (this.animateOut = N), - (this.header = S), - (this.headerAlignment = R), + (this.header = R), + (this.headerAlignment = S), (this.headerTextColor = M), (this.frameColor = D), (this.buttons = C), @@ -3815,30 +4044,32 @@ class InAppMessage { (this.htmlId = b), (this.css = P), (this.messageExtras = p), + (this.language = f), + (this.altImageText = G), (this.message = t), (this.messageAlignment = s || InAppMessage.TextAlignment.CENTER), - (this.duration = l || 5e3), + (this.duration = r || 5e3), (this.slideFrom = i || InAppMessage.SlideFrom.BOTTOM), (this.extras = h || {}), (this.triggerId = e), (this.clickAction = E || InAppMessage.ClickAction.NONE), (this.uri = n), - (this.openTarget = o || InAppMessage.OpenTarget.NONE), - (this.dismissType = r || InAppMessage.DismissType.AUTO_DISMISS), - (this.icon = u), - (this.imageUrl = a), - (this.imageStyle = I || InAppMessage.ImageStyle.TOP), - (this.iconColor = c || InAppMessage.th.ih), - (this.iconBackgroundColor = A || InAppMessage.th.sh), - (this.backgroundColor = O || InAppMessage.th.ih), - (this.textColor = _ || InAppMessage.th.hh), - (this.closeButtonColor = m || InAppMessage.th.eh), - (this.animateIn = L), + (this.openTarget = T || InAppMessage.OpenTarget.NONE), + (this.dismissType = o || InAppMessage.DismissType.AUTO_DISMISS), + (this.icon = l), + (this.imageUrl = u), + (this.imageStyle = a || InAppMessage.ImageStyle.TOP), + (this.iconColor = A || InAppMessage.th.ih), + (this.iconBackgroundColor = I || InAppMessage.th.sh), + (this.backgroundColor = c || InAppMessage.th.ih), + (this.textColor = O || InAppMessage.th.hh), + (this.closeButtonColor = L || InAppMessage.th.eh), + (this.animateIn = _), null == this.animateIn && (this.animateIn = !0), (this.animateOut = N), null == this.animateOut && (this.animateOut = !0), - (this.header = S), - (this.headerAlignment = R || InAppMessage.TextAlignment.CENTER), + (this.header = R), + (this.headerAlignment = S || InAppMessage.TextAlignment.CENTER), (this.headerTextColor = M || InAppMessage.th.hh), (this.frameColor = D || InAppMessage.th.Eh), (this.buttons = C || []), @@ -3848,74 +4079,76 @@ class InAppMessage { (this.css = P), (this.isControl = !1), (this.messageExtras = p), + (this.language = f), + (this.altImageText = G), (this.nh = !1), + (this.Gt = !1), + (this.dd = !1), (this.Th = !1), - (this.vo = !1), - (this.oh = !1), - (this.Re = null), - (this.ke = null), - (this.Et = new T()), - (this.rh = new T()), - (this.qe = InAppMessage.TextAlignment.CENTER); + (this.qo = null), + (this.$o = null), + (this.ti = new m()), + (this.oh = new m()), + (this.Io = InAppMessage.TextAlignment.CENTER); } subscribeToClickedEvent(t) { - return this.Et.Nt(t); + return this.ti.Rt(t); } subscribeToDismissedEvent(t) { - return this.rh.Nt(t); + return this.oh.Rt(t); } removeSubscription(t) { - this.Et.removeSubscription(t), this.rh.removeSubscription(t); + this.ti.removeSubscription(t), this.oh.removeSubscription(t); } removeAllSubscriptions() { - this.Et.removeAllSubscriptions(), this.rh.removeAllSubscriptions(); + this.ti.removeAllSubscriptions(), this.oh.removeAllSubscriptions(); } closeMessage() { - this.Cr(this.Re); + this.ll(this.qo); } - $e() { + zo() { return !0; } - do() { - return this.$e(); + od() { + return this.zo(); } - Ce() { + _o() { return null != this.htmlId && this.htmlId.length > 4; } - ve() { - return this.Ce() && null != this.css && this.css.length > 0; + Mo() { + return this._o() && null != this.css && this.css.length > 0; } - we() { - if (this.Ce() && this.ve()) return this.htmlId + "-css"; + Oo() { + if (this._o() && this.Mo()) return this.htmlId + "-css"; } - K() { - return !this.Th && ((this.Th = !0), !0); + Wt() { + return !this.Gt && ((this.Gt = !0), !0); } - Wr() { - return this.Th; + sm() { + return this.Gt; } - p(t) { - return !this.vo && ((this.vo = !0), this.Et.Rt(), !0); + $t(t) { + return !this.dd && ((this.dd = !0), this.ti.L(), !0); } - N() { - return !this.oh && ((this.oh = !0), this.rh.Rt(), !0); + Ot() { + return !this.Th && ((this.Th = !0), this.oh.L(), !0); } hide(t) { if (t && t.parentNode) { let s = t.closest(".ab-iam-root"); - if ((null == s && (s = t), this.$e() && null != s.parentNode)) { + if ((null == s && (s = t), this.zo() && null != s.parentNode)) { const t = s.parentNode.classList; - t && t.contains(InAppMessage.lh) && t.remove(InAppMessage.lh), - document.body.removeEventListener("touchmove", InAppMessage.uh); + t && t.contains(IamStrings.eS) && t.remove(IamStrings.eS), + document.body.removeEventListener("touchmove", InAppMessage.rh); } - s.className = s.className.replace(InAppMessage.ah, InAppMessage.Ih); + s.className = s.className.replace(InAppMessage.lh, InAppMessage.uh); } return this.animateOut || !1; } - Cr(t, s) { + ll(t, s) { if (null == t) return; let i; - (this.Re = null), + (this.qo = null), (i = -1 === t.className.indexOf("ab-in-app-message") ? t.getElementsByClassName("ab-in-app-message")[0] @@ -3930,52 +4163,50 @@ class InAppMessage { let s = t.closest(".ab-iam-root"); null == s && (s = t), s.parentNode && s.parentNode.removeChild(s); } - const i = this.we(); + const i = this.Oo(); if (null != i) { const t = document.getElementById(i); t && t.parentNode && t.parentNode.removeChild(t); } - null != e && "Safari" === X.browser && (e.scrollTop = E), - s ? s() : this.N(); + null != e && "Safari" === ro.browser && (e.scrollTop = E), + s ? s() : this.Ot(); }; - h ? setTimeout(n, InAppMessage.Ah) : n(), this.ke && this.ke.focus(); + h ? setTimeout(n, InAppMessage.hr) : n(), this.$o && this.$o.focus(); } - Ge() { + No() { return document.createTextNode(this.message || ""); } - Ae(t) { - let s = ""; - this.message || this.header || !this.$e() || (s = "Modal Image"), - t.setAttribute("alt", s); + Jo(t) { + t.setAttribute("alt", this.altImageText || ""); } - static uh(t) { + static rh(t) { if (t.targetTouches && t.targetTouches.length > 1) return; const s = t.target; (s && s.classList && s.classList.contains("ab-message-text") && s.scrollHeight > s.clientHeight) || - (document.querySelector(`.${InAppMessage.lh}`) && + (document.querySelector(`.${IamStrings.eS}`) && t.cancelable && t.preventDefault()); } - Oh(t) { + ah(t) { const s = t.parentNode; - this.$e() && + this.zo() && null != s && this.orientation !== InAppMessage.Orientation.LANDSCAPE && - (null != s.classList && s.classList.add(InAppMessage.lh), + (null != s.classList && s.classList.add(IamStrings.eS), document.body.addEventListener( "touchmove", - InAppMessage.uh, + InAppMessage.rh, !!supportsPassive() && { passive: !1 }, )), - (t.className += " " + InAppMessage.ah); + (t.className += " " + InAppMessage.lh); } - static _h(t) { + static Ah(t) { if ( - t.keyCode === KeyCodes.mh && - !e.nn(L.Lh) && + t.keyCode === KeyCodes.Ih && + !r.re(D.Oh) && document.querySelectorAll(".ab-modal-interactions").length > 0 ) { const t = document.getElementsByClassName("ab-html-message"); @@ -3997,49 +4228,51 @@ class InAppMessage { } } } - Nh() { + Lh() { this.nh || - e.nn(L.Lh) || - (document.addEventListener("keydown", InAppMessage._h, !1), - e.Sh(() => { - document.removeEventListener("keydown", InAppMessage._h); + r.re(D.Oh) || + (document.addEventListener("keydown", InAppMessage.Ah, !1), + r.mh(() => { + document.removeEventListener("keydown", InAppMessage.Ah); }), (this.nh = !0)); } - Y(t) { + gt(t) { const s = {}; return t - ? ((s[InAppMessage.tt.Yr] = this.message), - (s[InAppMessage.tt.Zr] = this.messageAlignment), - (s[InAppMessage.tt.Rh] = this.slideFrom), - (s[InAppMessage.tt.bt] = this.extras), - (s[InAppMessage.tt.ea] = this.triggerId), - (s[InAppMessage.tt.ra] = this.clickAction), - (s[InAppMessage.tt.URI] = this.uri), - (s[InAppMessage.tt.sa] = this.openTarget), - (s[InAppMessage.tt.ta] = this.dismissType), - (s[InAppMessage.tt.ia] = this.duration), - (s[InAppMessage.tt.aa] = this.icon), - (s[InAppMessage.tt.ot] = this.imageUrl), - (s[InAppMessage.tt.oa] = this.imageStyle), - (s[InAppMessage.tt.pa] = this.iconColor), - (s[InAppMessage.tt.ma] = this.iconBackgroundColor), - (s[InAppMessage.tt.na] = this.backgroundColor), - (s[InAppMessage.tt.ua] = this.textColor), - (s[InAppMessage.tt.ca] = this.closeButtonColor), - (s[InAppMessage.tt.fa] = this.animateIn), - (s[InAppMessage.tt.da] = this.animateOut), - (s[InAppMessage.tt.la] = this.header), - (s[InAppMessage.tt.ga] = this.headerAlignment), - (s[InAppMessage.tt.ja] = this.headerTextColor), - (s[InAppMessage.tt.xa] = this.frameColor), - (s[InAppMessage.tt.za] = this.buttons), - (s[InAppMessage.tt.ha] = this.cropType), - (s[InAppMessage.tt.va] = this.orientation), - (s[InAppMessage.tt.wa] = this.htmlId), - (s[InAppMessage.tt.CSS] = this.css), - (s[InAppMessage.tt.Z] = t), - (s[InAppMessage.tt.ya] = this.messageExtras), + ? ((s[InAppMessage.ss.pa] = this.message), + (s[InAppMessage.ss.ma] = this.messageAlignment), + (s[InAppMessage.ss._h] = this.slideFrom), + (s[InAppMessage.ss.xs] = this.extras), + (s[InAppMessage.ss.ua] = this.triggerId), + (s[InAppMessage.ss.ca] = this.clickAction), + (s[InAppMessage.ss.URI] = this.uri), + (s[InAppMessage.ss.fa] = this.openTarget), + (s[InAppMessage.ss.da] = this.dismissType), + (s[InAppMessage.ss.la] = this.duration), + (s[InAppMessage.ss.ga] = this.icon), + (s[InAppMessage.ss.ns] = this.imageUrl), + (s[InAppMessage.ss.ja] = this.imageStyle), + (s[InAppMessage.ss.xa] = this.iconColor), + (s[InAppMessage.ss.za] = this.iconBackgroundColor), + (s[InAppMessage.ss.ha] = this.backgroundColor), + (s[InAppMessage.ss.va] = this.textColor), + (s[InAppMessage.ss.wa] = this.closeButtonColor), + (s[InAppMessage.ss.ya] = this.animateIn), + (s[InAppMessage.ss.Sa] = this.animateOut), + (s[InAppMessage.ss.ba] = this.header), + (s[InAppMessage.ss.ka] = this.headerAlignment), + (s[InAppMessage.ss.qa] = this.headerTextColor), + (s[InAppMessage.ss.Aa] = this.frameColor), + (s[InAppMessage.ss.Ba] = this.buttons), + (s[InAppMessage.ss.Ca] = this.cropType), + (s[InAppMessage.ss.Da] = this.orientation), + (s[InAppMessage.ss.Ea] = this.htmlId), + (s[InAppMessage.ss.CSS] = this.css), + (s[InAppMessage.ss.ts] = t), + (s[InAppMessage.ss.Fa] = this.messageExtras), + (s[InAppMessage.ss.LANGUAGE] = this.language), + (s[InAppMessage.ss.ks] = this.altImageText), s) : s; } @@ -4048,26 +4281,22 @@ class InAppMessage { hh: 4281545523, ih: 4294967295, sh: 4278219733, - Mh: 4293914607, - Dh: 4283782485, + Nh: 4293914607, + Rh: 4283782485, Eh: 3224580915, eh: 4288387995, }), - (InAppMessage.Le = { - Ch: "hd", - ze: "ias", - dh: "of", - Uh: "do", - bh: "umt", - Ph: "tf", - ph: "te", + (InAppMessage.Ao = { + Sh: "hd", + Lo: "ias", + Mh: "of", + Dh: "do", + Ch: "umt", + dh: "tf", + Uh: "te", }), (InAppMessage.SlideFrom = { TOP: "TOP", BOTTOM: "BOTTOM" }), - (InAppMessage.ClickAction = { - NEWS_FEED: "NEWS_FEED", - URI: "URI", - NONE: "NONE", - }), + (InAppMessage.ClickAction = { URI: "URI", NONE: "NONE" }), (InAppMessage.DismissType = { AUTO_DISMISS: "AUTO_DISMISS", MANUAL: "SWIPE", @@ -4084,68 +4313,69 @@ class InAppMessage { CENTER_CROP: "CENTER_CROP", FIT_CENTER: "FIT_CENTER", }), - (InAppMessage.Be = { - Qr: "SLIDEUP", - Lr: "MODAL", - Ue: "MODAL_STYLED", - Hr: "FULL", - Kr: "WEB_HTML", - Me: "HTML", - Ve: "HTML_FULL", + (InAppMessage.Eo = { + ia: "SLIDEUP", + ta: "MODAL", + Xo: "MODAL_STYLED", + Yn: "FULL", + Zo: "WEB_HTML", + Bo: "HTML", + Yo: "HTML_FULL", }), - (InAppMessage.Ah = 500), - (InAppMessage.fh = 200), - (InAppMessage.ah = "ab-show"), - (InAppMessage.Ih = "ab-hide"), - (InAppMessage.lh = "ab-pause-scrolling"), - (InAppMessage.tt = { - Yr: "m", - Zr: "ma", - Rh: "sf", - bt: "e", - ea: "ti", - ra: "ca", + (InAppMessage.hr = 500), + (InAppMessage.bh = 200), + (InAppMessage.lh = "ab-show"), + (InAppMessage.uh = "ab-hide"), + (InAppMessage.ss = { + pa: "m", + ma: "ma", + _h: "sf", + xs: "e", + ua: "ti", + ca: "ca", URI: "u", - sa: "oa", - ta: "dt", - ia: "d", - aa: "i", - ot: "iu", - oa: "is", - pa: "ic", - ma: "ibc", - na: "bc", - ua: "tc", - ca: "cbc", - fa: "ai", - da: "ao", - la: "h", - ga: "ha", - ja: "htc", - xa: "fc", - za: "b", - ha: "ct", - va: "o", - wa: "hi", + fa: "oa", + da: "dt", + la: "d", + ga: "i", + ns: "iu", + ja: "is", + xa: "ic", + za: "ibc", + ha: "bc", + va: "tc", + wa: "cbc", + ya: "ai", + Sa: "ao", + ba: "h", + ka: "ha", + qa: "htc", + Aa: "fc", + Ba: "b", + Ca: "ct", + Da: "o", + Ea: "hi", CSS: "css", - Z: "type", - uo: "messageFields", - ya: "me", + ts: "type", + ed: "messageFields", + Fa: "me", + LANGUAGE: "l", + ks: "ia", }); class HtmlMessage extends InAppMessage { - constructor(i, o, e, r, d, t, s, v, n, u, a, c) { + constructor(i, o, d, e, r, t, s, v, n, u, a, c) { super( i, void 0, void 0, o, - e, + d, void 0, void 0, void 0, - (r = r || InAppMessage.DismissType.MANUAL), - d, + (e = e || InAppMessage.DismissType.MANUAL), + r, void 0, void 0, void 0, @@ -4166,42 +4396,44 @@ class HtmlMessage extends InAppMessage { n, u, c, + void 0, + void 0, ), (this.messageFields = a), (this.messageFields = a); } - do() { + od() { return !1; } - p(i) { - if (this.xe === InAppMessage.Be.Kr) { - if (this.vo) return !1; - this.vo = !0; + $t(i) { + if (this.ko === InAppMessage.Eo.Zo) { + if (this.dd) return !1; + this.dd = !0; } - return this.Et.Rt(i), !0; + return this.ti.L(i), !0; } - Y() { - const i = super.Y(HtmlMessage.it); - return (i[InAppMessage.tt.uo] = this.messageFields), i; + gt() { + const i = super.gt(HtmlMessage.es); + return (i[InAppMessage.ss.ed] = this.messageFields), i; } - static Jr(i) { + static Zn(i) { return new HtmlMessage( - i[InAppMessage.tt.Yr], - i[InAppMessage.tt.bt], - i[InAppMessage.tt.ea], - i[InAppMessage.tt.ta], - i[InAppMessage.tt.ia], - i[InAppMessage.tt.fa], - i[InAppMessage.tt.da], - i[InAppMessage.tt.xa], - i[InAppMessage.tt.wa], - i[InAppMessage.tt.CSS], - i[InAppMessage.tt.uo], - i[InAppMessage.tt.ya], + i[InAppMessage.ss.pa], + i[InAppMessage.ss.xs], + i[InAppMessage.ss.ua], + i[InAppMessage.ss.da], + i[InAppMessage.ss.la], + i[InAppMessage.ss.ya], + i[InAppMessage.ss.Sa], + i[InAppMessage.ss.Aa], + i[InAppMessage.ss.Ea], + i[InAppMessage.ss.CSS], + i[InAppMessage.ss.ed], + i[InAppMessage.ss.Fa], ); } } -HtmlMessage.it = InAppMessage.Be.Kr; +HtmlMessage.es = InAppMessage.Eo.Zo; class InAppMessageButton { constructor(s, t, i, r, h, e, n) { @@ -4218,22 +4450,22 @@ class InAppMessageButton { (this.borderColor = r || this.backgroundColor), (this.clickAction = h || InAppMessage.ClickAction.NONE), (this.uri = e), - null == n && (n = InAppMessageButton.Ki), + null == n && (n = InAppMessageButton._n), (this.id = n), - (this.vo = !1), - (this.Et = new T()); + (this.dd = !1), + (this.ti = new m()); } subscribeToClickedEvent(s) { - return this.Et.Nt(s); + return this.ti.Rt(s); } removeSubscription(s) { - this.Et.removeSubscription(s); + this.ti.removeSubscription(s); } removeAllSubscriptions() { - this.Et.removeAllSubscriptions(); + this.ti.removeAllSubscriptions(); } - p() { - return !this.vo && ((this.vo = !0), this.Et.Rt(), !0); + $t() { + return !this.dd && ((this.dd = !0), this.ti.L(), !0); } static fromJson(s) { return new InAppMessageButton( @@ -4247,7 +4479,7 @@ class InAppMessageButton { ); } } -InAppMessageButton.Ki = -1; +InAppMessageButton._n = -1; class FullScreenMessage extends InAppMessage { constructor( @@ -4280,6 +4512,8 @@ class FullScreenMessage extends InAppMessage { q, A, B, + C, + D, ) { (p = p || InAppMessage.DismissType.MANUAL), (k = k || InAppMessage.Orientation.PORTRAIT), @@ -4314,47 +4548,51 @@ class FullScreenMessage extends InAppMessage { q, A, B, + C, + D, ), - (this.qe = InAppMessage.TextAlignment.CENTER); + (this.Io = InAppMessage.TextAlignment.CENTER); } - Y() { - return super.Y(FullScreenMessage.it); + gt() { + return super.gt(FullScreenMessage.es); } - static Jr(e) { + static Zn(e) { return new FullScreenMessage( - e[InAppMessage.tt.Yr], - e[InAppMessage.tt.Zr], - e[InAppMessage.tt.bt], - e[InAppMessage.tt.ea], - e[InAppMessage.tt.ra], - e[InAppMessage.tt.URI], - e[InAppMessage.tt.sa], - e[InAppMessage.tt.ta], - e[InAppMessage.tt.ia], - e[InAppMessage.tt.aa], - e[InAppMessage.tt.ot], - e[InAppMessage.tt.oa], - e[InAppMessage.tt.pa], - e[InAppMessage.tt.ma], - e[InAppMessage.tt.na], - e[InAppMessage.tt.ua], - e[InAppMessage.tt.ca], - e[InAppMessage.tt.fa], - e[InAppMessage.tt.da], - e[InAppMessage.tt.la], - e[InAppMessage.tt.ga], - e[InAppMessage.tt.ja], - e[InAppMessage.tt.xa], - buttonsFromSerializedInAppMessage(e[InAppMessage.tt.za]), - e[InAppMessage.tt.ha], - e[InAppMessage.tt.va], - e[InAppMessage.tt.wa], - e[InAppMessage.tt.CSS], - e[InAppMessage.tt.ya], + e[InAppMessage.ss.pa], + e[InAppMessage.ss.ma], + e[InAppMessage.ss.xs], + e[InAppMessage.ss.ua], + e[InAppMessage.ss.ca], + e[InAppMessage.ss.URI], + e[InAppMessage.ss.fa], + e[InAppMessage.ss.da], + e[InAppMessage.ss.la], + e[InAppMessage.ss.ga], + e[InAppMessage.ss.ns], + e[InAppMessage.ss.ja], + e[InAppMessage.ss.xa], + e[InAppMessage.ss.za], + e[InAppMessage.ss.ha], + e[InAppMessage.ss.va], + e[InAppMessage.ss.wa], + e[InAppMessage.ss.ya], + e[InAppMessage.ss.Sa], + e[InAppMessage.ss.ba], + e[InAppMessage.ss.ka], + e[InAppMessage.ss.qa], + e[InAppMessage.ss.Aa], + buttonsFromSerializedInAppMessage(e[InAppMessage.ss.Ba]), + e[InAppMessage.ss.Ca], + e[InAppMessage.ss.Da], + e[InAppMessage.ss.Ea], + e[InAppMessage.ss.CSS], + e[InAppMessage.ss.Fa], + e[InAppMessage.ss.LANGUAGE], + e[InAppMessage.ss.ks], ); } } -FullScreenMessage.it = InAppMessage.Be.Hr; +FullScreenMessage.es = InAppMessage.Eo.Yn; class ModalMessage extends InAppMessage { constructor( @@ -4386,6 +4624,8 @@ class ModalMessage extends InAppMessage { k, q, A, + B, + C, ) { super( e, @@ -4418,46 +4658,50 @@ class ModalMessage extends InAppMessage { k, q, A, + B, + C, ), - (this.qe = InAppMessage.TextAlignment.CENTER); + (this.Io = InAppMessage.TextAlignment.CENTER); } - Y() { - return super.Y(ModalMessage.it); + gt() { + return super.gt(ModalMessage.es); } - static Jr(e) { + static Zn(e) { return new ModalMessage( - e[InAppMessage.tt.Yr], - e[InAppMessage.tt.Zr], - e[InAppMessage.tt.bt], - e[InAppMessage.tt.ea], - e[InAppMessage.tt.ra], - e[InAppMessage.tt.URI], - e[InAppMessage.tt.sa], - e[InAppMessage.tt.ta], - e[InAppMessage.tt.ia], - e[InAppMessage.tt.aa], - e[InAppMessage.tt.ot], - e[InAppMessage.tt.oa], - e[InAppMessage.tt.pa], - e[InAppMessage.tt.ma], - e[InAppMessage.tt.na], - e[InAppMessage.tt.ua], - e[InAppMessage.tt.ca], - e[InAppMessage.tt.fa], - e[InAppMessage.tt.da], - e[InAppMessage.tt.la], - e[InAppMessage.tt.ga], - e[InAppMessage.tt.ja], - e[InAppMessage.tt.xa], - buttonsFromSerializedInAppMessage(e[InAppMessage.tt.za]), - e[InAppMessage.tt.ha], - e[InAppMessage.tt.wa], - e[InAppMessage.tt.CSS], - e[InAppMessage.tt.ya], + e[InAppMessage.ss.pa], + e[InAppMessage.ss.ma], + e[InAppMessage.ss.xs], + e[InAppMessage.ss.ua], + e[InAppMessage.ss.ca], + e[InAppMessage.ss.URI], + e[InAppMessage.ss.fa], + e[InAppMessage.ss.da], + e[InAppMessage.ss.la], + e[InAppMessage.ss.ga], + e[InAppMessage.ss.ns], + e[InAppMessage.ss.ja], + e[InAppMessage.ss.xa], + e[InAppMessage.ss.za], + e[InAppMessage.ss.ha], + e[InAppMessage.ss.va], + e[InAppMessage.ss.wa], + e[InAppMessage.ss.ya], + e[InAppMessage.ss.Sa], + e[InAppMessage.ss.ba], + e[InAppMessage.ss.ka], + e[InAppMessage.ss.qa], + e[InAppMessage.ss.Aa], + buttonsFromSerializedInAppMessage(e[InAppMessage.ss.Ba]), + e[InAppMessage.ss.Ca], + e[InAppMessage.ss.Ea], + e[InAppMessage.ss.CSS], + e[InAppMessage.ss.Fa], + e[InAppMessage.ss.LANGUAGE], + e[InAppMessage.ss.ks], ); } } -ModalMessage.it = InAppMessage.Be.Lr; +ModalMessage.es = InAppMessage.Eo.ta; class SlideUpMessage extends InAppMessage { constructor( @@ -4483,9 +4727,11 @@ class SlideUpMessage extends InAppMessage { I, M, b, + j, + z, ) { - (x = x || InAppMessage.th.Dh), - (v = v || InAppMessage.th.Mh), + (x = x || InAppMessage.th.Rh), + (v = v || InAppMessage.th.Nh), super( e, (t = t || InAppMessage.TextAlignment.START), @@ -4517,55 +4763,59 @@ class SlideUpMessage extends InAppMessage { I, M, b, + j, + z, ), - (this.qe = InAppMessage.TextAlignment.START); + (this.Io = InAppMessage.TextAlignment.START); } - $e() { + zo() { return !1; } - Ge() { + No() { const e = document.createElement("span"); return e.appendChild(document.createTextNode(this.message || "")), e; } - Oh(e) { + ah(e) { const t = e.getElementsByClassName("ab-in-app-message")[0]; - DOMUtils.po(t, !0, !0) || + DOMUtils.td(t, !0, !0) || (this.slideFrom === InAppMessage.SlideFrom.TOP ? (t.style.top = "0px") : (t.style.bottom = "0px")), - super.Oh(e); + super.ah(e); } - Y() { - return super.Y(SlideUpMessage.it); + gt() { + return super.gt(SlideUpMessage.es); } - static Jr(e) { + static Zn(e) { return new SlideUpMessage( - e[InAppMessage.tt.Yr], - e[InAppMessage.tt.Zr], - e[InAppMessage.tt.Rh], - e[InAppMessage.tt.bt], - e[InAppMessage.tt.ea], - e[InAppMessage.tt.ra], - e[InAppMessage.tt.URI], - e[InAppMessage.tt.sa], - e[InAppMessage.tt.ta], - e[InAppMessage.tt.ia], - e[InAppMessage.tt.aa], - e[InAppMessage.tt.ot], - e[InAppMessage.tt.pa], - e[InAppMessage.tt.ma], - e[InAppMessage.tt.na], - e[InAppMessage.tt.ua], - e[InAppMessage.tt.ca], - e[InAppMessage.tt.fa], - e[InAppMessage.tt.da], - e[InAppMessage.tt.wa], - e[InAppMessage.tt.CSS], - e[InAppMessage.tt.ya], + e[InAppMessage.ss.pa], + e[InAppMessage.ss.ma], + e[InAppMessage.ss._h], + e[InAppMessage.ss.xs], + e[InAppMessage.ss.ua], + e[InAppMessage.ss.ca], + e[InAppMessage.ss.URI], + e[InAppMessage.ss.fa], + e[InAppMessage.ss.da], + e[InAppMessage.ss.la], + e[InAppMessage.ss.ga], + e[InAppMessage.ss.ns], + e[InAppMessage.ss.xa], + e[InAppMessage.ss.za], + e[InAppMessage.ss.ha], + e[InAppMessage.ss.va], + e[InAppMessage.ss.wa], + e[InAppMessage.ss.ya], + e[InAppMessage.ss.Sa], + e[InAppMessage.ss.Ea], + e[InAppMessage.ss.CSS], + e[InAppMessage.ss.Fa], + e[InAppMessage.ss.LANGUAGE], + e[InAppMessage.ss.ks], ); } } -SlideUpMessage.it = InAppMessage.Be.Qr; +SlideUpMessage.es = InAppMessage.Eo.ia; function newInAppMessageFromJson(e) { if (!e) return null; @@ -4574,44 +4824,47 @@ function newInAppMessageFromJson(e) { null != o && (o = o.toUpperCase()); const s = e.message, n = e.text_align_message, - t = e.slide_from, - m = e.extras, - l = e.trigger_id, - i = e.click_action, - f = e.uri, - p = e.open_target, - u = e.message_close, - a = e.duration, - d = e.icon, - g = e.image_url, - c = e.image_style, - j = e.icon_color, - w = e.icon_bg_color, - b = e.bg_color, - h = e.text_color, - v = e.close_btn_color, - x = e.header, - I = e.text_align_header, - A = e.header_text_color, - F = e.frame_color, - M = []; - let k = e.btns; - null == k && (k = []); - for (let e = 0; e < k.length; e++) M.push(InAppMessageButton.fromJson(k[e])); - const y = e.crop_type, - z = e.orientation, - J = e.animate_in, - S = e.animate_out; - let q = e.html_id, - B = e.css; - (null != q && "" !== q && null != B && "" !== B) || - ((q = void 0), (B = void 0)); - const C = e.message_extras; - let D; - if (o === ModalMessage.it || o === InAppMessage.Be.Ue) - D = new ModalMessage( + r = e.slide_from, + t = e.extras, + m = e.trigger_id, + l = e.click_action, + i = e.uri, + f = e.open_target, + p = e.message_close, + u = e.duration, + a = e.icon, + d = e.image_url, + g = e.image_style, + c = e.icon_color, + j = e.icon_bg_color, + w = e.bg_color, + b = e.text_color, + h = e.close_btn_color, + v = e.header, + x = e.text_align_header, + I = e.header_text_color, + A = e.frame_color, + F = []; + let M = e.btns; + null == M && (M = []); + for (let e = 0; e < M.length; e++) F.push(InAppMessageButton.fromJson(M[e])); + const k = e.crop_type, + y = e.orientation, + z = e.animate_in, + J = e.animate_out; + let S = e.html_id, + q = e.css; + (null != S && "" !== S && null != q && "" !== q) || + ((S = void 0), (q = void 0)); + const B = e.message_extras, + C = e.language, + D = e.image_alt; + let G; + if (o === ModalMessage.es || o === InAppMessage.Eo.Xo) + G = new ModalMessage( s, n, + t, m, l, i, @@ -4626,23 +4879,25 @@ function newInAppMessageFromJson(e) { w, b, h, - v, + z, J, - S, + v, x, I, A, F, - M, - y, + k, + S, q, B, C, + D, ); - else if (o === FullScreenMessage.it) - D = new FullScreenMessage( + else if (o === FullScreenMessage.es) + G = new FullScreenMessage( s, n, + t, m, l, i, @@ -4657,24 +4912,26 @@ function newInAppMessageFromJson(e) { w, b, h, - v, + z, J, - S, + v, x, I, A, F, - M, + k, y, - z, + S, q, B, C, + D, ); - else if (o === SlideUpMessage.it) - D = new SlideUpMessage( + else if (o === SlideUpMessage.es) + G = new SlideUpMessage( s, n, + r, t, m, l, @@ -4684,32 +4941,33 @@ function newInAppMessageFromJson(e) { u, a, d, - g, + c, j, w, b, h, - v, + z, J, S, q, B, C, + D, ); else { if ( - o !== HtmlMessage.it && - o !== InAppMessage.Be.Me && - o !== InAppMessage.Be.Ve + o !== HtmlMessage.es && + o !== InAppMessage.Eo.Bo && + o !== InAppMessage.Eo.Yo ) - return void r$1.error("Ignoring message with unknown type " + o); + return void E$1.error("Ignoring message with unknown type " + o); { const o = e.message_fields; - (D = new HtmlMessage(s, m, l, u, a, J, S, F, q, B, o, C)), - (D.trusted = e.trusted || !1); + (G = new HtmlMessage(s, t, m, p, u, z, J, A, S, q, o, B)), + (G.trusted = e.trusted || !1); } } - return (D.xe = o), D; + return (G.ko = o), G; } function buttonsFromSerializedInAppMessage(e) { const o = []; @@ -4728,128 +4986,128 @@ function buttonsFromSerializedInAppMessage(e) { return o; } -class ts { +class rs { constructor(t) { - (this.Bl = t), (this.Bl = t); + (this.tf = t), (this.tf = t); } - Jl(t) { - return null == this.Bl || this.Bl === t[0]; + sf(t) { + return null == this.tf || this.tf === t[0]; } static fromJson(t) { - return new ts(t ? t.event_name : null); + return new rs(t ? t.event_name : null); } - Y() { - return this.Bl; + gt() { + return this.tf; } } -class lr { +class cr { constructor(t, s, e, i) { - (this.Tl = t), - (this._l = s), + (this.yE = t), + (this.HE = s), (this.comparator = e), - (this.Ll = i), - (this.Tl = t), - (this._l = s), + (this.LE = i), + (this.yE = t), + (this.HE = s), (this.comparator = e), - (this.Ll = i), - this._l === lr.Ol.Il && - this.comparator !== lr.Ql.Ul && - this.comparator !== lr.Ql.Xl && - this.comparator !== lr.Ql.Fl && - this.comparator !== lr.Ql.Kl && - (this.Ll = dateFromUnixTimestamp(this.Ll)); - } - Jl(t) { + (this.LE = i), + this.HE === cr.XE.QE && + this.comparator !== cr.BE.wE && + this.comparator !== cr.BE.jE && + this.comparator !== cr.BE.zE && + this.comparator !== cr.BE.FE && + (this.LE = dateFromUnixTimestamp(this.LE)); + } + sf(t) { let s = null; - switch ((null != t && (s = t[this.Tl]), this.comparator)) { - case lr.Ql.Pl: - return null != s && s.valueOf() === this.Ll.valueOf(); - case lr.Ql.Yl: - return null == s || s.valueOf() !== this.Ll.valueOf(); - case lr.Ql.Zl: - return null != s && typeof s == typeof this.Ll && s > this.Ll; - case lr.Ql.Ul: - return this._l === lr.Ol.Il - ? null != s && isDate(s) && secondsAgo(s) <= this.Ll.valueOf() - : null != s && typeof s == typeof this.Ll && s >= this.Ll; - case lr.Ql.$l: - return null != s && typeof s == typeof this.Ll && s < this.Ll; - case lr.Ql.Xl: - return this._l === lr.Ol.Il - ? null != s && isDate(s) && secondsAgo(s) >= this.Ll.valueOf() - : null != s && typeof s == typeof this.Ll && s <= this.Ll; - case lr.Ql.Qu: + switch ((null != t && (s = t[this.yE]), this.comparator)) { + case cr.BE.kE: + return null != s && s.valueOf() === this.LE.valueOf(); + case cr.BE.xE: + return null == s || s.valueOf() !== this.LE.valueOf(); + case cr.BE.JE: + return null != s && typeof s == typeof this.LE && s > this.LE; + case cr.BE.wE: + return this.HE === cr.XE.QE + ? null != s && isDate(s) && secondsAgo(s) <= this.LE.valueOf() + : null != s && typeof s == typeof this.LE && s >= this.LE; + case cr.BE.VE: + return null != s && typeof s == typeof this.LE && s < this.LE; + case cr.BE.jE: + return this.HE === cr.XE.QE + ? null != s && isDate(s) && secondsAgo(s) >= this.LE.valueOf() + : null != s && typeof s == typeof this.LE && s <= this.LE; + case cr.BE.qE: return ( null != s && "string" == typeof s && - typeof s == typeof this.Ll && - null != s.match(this.Ll) + typeof s == typeof this.LE && + null != s.match(this.LE) ); - case lr.Ql.Vu: + case cr.BE.PE: return null != s; - case lr.Ql.Yu: + case cr.BE.WE: return null == s; - case lr.Ql.Fl: - return null != s && isDate(s) && secondsInTheFuture(s) < this.Ll; - case lr.Ql.Kl: - return null != s && isDate(s) && secondsInTheFuture(s) > this.Ll; - case lr.Ql.Zu: + case cr.BE.zE: + return null != s && isDate(s) && secondsInTheFuture(s) < this.LE; + case cr.BE.FE: + return null != s && isDate(s) && secondsInTheFuture(s) > this.LE; + case cr.BE.ZE: return ( null == s || - typeof s != typeof this.Ll || + typeof s != typeof this.LE || "string" != typeof s || - null == s.match(this.Ll) + null == s.match(this.LE) ); } return !1; } static fromJson(t) { - return new lr( + return new cr( t.property_key, t.property_type, t.comparator, t.property_value, ); } - Y() { - let t = this.Ll; + gt() { + let t = this.LE; return ( - isDate(this.Ll) && (t = convertMsToSeconds(t.valueOf())), - { k: this.Tl, t: this._l, c: this.comparator, v: t } + isDate(this.LE) && (t = convertMsToSeconds(t.valueOf())), + { k: this.yE, t: this.HE, c: this.comparator, v: t } ); } - static qn(t) { - return new lr(t.k, t.t, t.c, t.v); - } -} -(lr.Ol = { yE: "boolean", HE: "number", LE: "string", Il: "date" }), - (lr.Ql = { - Pl: 1, - Yl: 2, - Zl: 3, - Ul: 4, - $l: 5, - Xl: 6, - Qu: 10, - Vu: 11, - Yu: 12, - Fl: 15, - Kl: 16, - Zu: 17, + static _u(t) { + return new cr(t.k, t.t, t.c, t.v); + } +} +(cr.XE = { $E: "boolean", tT: "number", sT: "string", QE: "date" }), + (cr.BE = { + kE: 1, + xE: 2, + JE: 3, + wE: 4, + VE: 5, + jE: 6, + qE: 10, + PE: 11, + WE: 12, + zE: 15, + FE: 16, + ZE: 17, }); class is { constructor(t) { (this.filters = t), (this.filters = t); } - Jl(t) { + sf(t) { let r = !0; for (let e = 0; e < this.filters.length; e++) { const o = this.filters[e]; let s = !1; for (let r = 0; r < o.length; r++) - if (o[r].Jl(t)) { + if (o[r].sf(t)) { s = !0; break; } @@ -4866,76 +5124,76 @@ class is { for (let e = 0; e < t.length; e++) { const o = [], s = t[e]; - for (let t = 0; t < s.length; t++) o.push(lr.fromJson(s[t])); + for (let t = 0; t < s.length; t++) o.push(cr.fromJson(s[t])); r.push(o); } return new is(r); } - Y() { + gt() { const t = []; for (let r = 0; r < this.filters.length; r++) { const e = this.filters[r], o = []; - for (let t = 0; t < e.length; t++) o.push(e[t].Y()); + for (let t = 0; t < e.length; t++) o.push(e[t].gt()); t.push(o); } return t; } - static qn(t) { + static _u(t) { const r = []; for (let e = 0; e < t.length; e++) { const o = [], s = t[e]; - for (let t = 0; t < s.length; t++) o.push(lr.qn(s[t])); + for (let t = 0; t < s.length; t++) o.push(cr._u(s[t])); r.push(o); } return new is(r); } } -class rs { +class ls { constructor(t, s) { - (this.Bl = t), (this.Ml = s), (this.Bl = t), (this.Ml = s); + (this.tf = t), (this.if = s), (this.tf = t), (this.if = s); } - Jl(t) { - if (null == this.Bl || null == this.Ml) return !1; + sf(t) { + if (null == this.tf || null == this.if) return !1; const s = t[0], i = t[1]; - return s === this.Bl && this.Ml.Jl(i); + return s === this.tf && this.if.sf(i); } static fromJson(t) { - return new rs( + return new ls( t ? t.event_name : null, t ? is.fromJson(t.property_filters) : null, ); } - Y() { - return { e: this.Bl, pf: this.Ml ? this.Ml.Y() : null }; + gt() { + return { e: this.tf, pf: this.if ? this.if.gt() : null }; } } -class ni { +class mi { constructor(t, i) { - (this.tf = t), (this.if = i), (this.tf = t), (this.if = i); + (this.rf = t), (this.nf = i), (this.rf = t), (this.nf = i); } - Jl(t) { - if (null == this.tf) return !1; - const i = ri.rf(t[0], this.tf); + sf(t) { + if (null == this.rf) return !1; + const i = fi.ef(t[0], this.rf); if (!i) return !1; - let r = null == this.if || 0 === this.if.length; - if (null != this.if) - for (let i = 0; i < this.if.length; i++) - if (this.if[i] === t[1]) { + let r = null == this.nf || 0 === this.nf.length; + if (null != this.nf) + for (let i = 0; i < this.nf.length; i++) + if (this.nf[i] === t[1]) { r = !0; break; } return i && r; } static fromJson(t) { - return new ni(t ? t.id : null, t ? t.buttons : null); + return new mi(t ? t.id : null, t ? t.buttons : null); } - Y() { - return this.tf; + gt() { + return this.rf; } } @@ -4943,205 +5201,205 @@ class ns { constructor(t) { (this.productId = t), (this.productId = t); } - Jl(t) { + sf(t) { return null == this.productId || t[0] === this.productId; } static fromJson(t) { return new ns(t ? t.product_id : null); } - Y() { + gt() { return this.productId; } } -class hs { +class us { constructor(t, s) { - (this.productId = t), (this.Ml = s), (this.productId = t), (this.Ml = s); + (this.productId = t), (this.if = s), (this.productId = t), (this.if = s); } - Jl(t) { - if (null == this.productId || null == this.Ml) return !1; + sf(t) { + if (null == this.productId || null == this.if) return !1; const s = t[0], i = t[1]; - return s === this.productId && this.Ml.Jl(i); + return s === this.productId && this.if.sf(i); } static fromJson(t) { - return new hs( + return new us( t ? t.product_id : null, t ? is.fromJson(t.property_filters) : null, ); } - Y() { - return { id: this.productId, pf: this.Ml ? this.Ml.Y() : null }; + gt() { + return { id: this.productId, pf: this.if ? this.if.gt() : null }; } } class ur { constructor(t) { - (this.tf = t), (this.tf = t); + (this.rf = t), (this.rf = t); } - Jl(t) { - return null == this.tf || ri.rf(t[0], this.tf); + sf(t) { + return null == this.rf || fi.ef(t[0], this.rf); } static fromJson(t) { return new ur(t ? t.campaign_id : null); } - Y() { - return this.tf; + gt() { + return this.rf; } } -var tt = { +var ot = { OPEN: "open", Rr: "purchase", - vr: "push_click", - ue: "custom_event", - Vr: "iam_click", - kt: "test", + wr: "push_click", + xe: "custom_event", + rm: "iam_click", + qs: "test", }; -class ri { +class fi { constructor(e, t) { (this.type = e), (this.data = t), (this.type = e), (this.data = t); } - sc(e, t) { - return ri.cc[this.type] === e && (null == this.data || this.data.Jl(t)); + km(e, t) { + return fi._m[this.type] === e && (null == this.data || this.data.sf(t)); } - static rf(e, t) { - let s = null; + static ef(e, t) { + let r = null; try { - s = window.atob(e); + r = window.atob(e); } catch (t) { - return r$1.info("Failed to unencode analytics id " + e + ": " + getErrorMessage(t)), !1; + return E$1.info("Failed to unencode analytics id " + e + ": " + getErrorMessage(t)), !1; } - return t === s.split("_")[0]; + return t === r.split("_")[0]; } static fromJson(e) { const t = e.type; let r = null; switch (t) { - case ri.Er.OPEN: - case ri.Er.kt: + case fi.Ln.OPEN: + case fi.Ln.qs: break; - case ri.Er.Rr: + case fi.Ln.Rr: r = ns.fromJson(e.data); break; - case ri.Er.nc: - r = hs.fromJson(e.data); + case fi.Ln.bm: + r = us.fromJson(e.data); break; - case ri.Er.vr: + case fi.Ln.wr: r = ur.fromJson(e.data); break; - case ri.Er.ue: - r = ts.fromJson(e.data); - break; - case ri.Er.lc: + case fi.Ln.xe: r = rs.fromJson(e.data); break; - case ri.Er.Vr: - r = ni.fromJson(e.data); + case fi.Ln.Em: + r = ls.fromJson(e.data); + break; + case fi.Ln.rm: + r = mi.fromJson(e.data); } - return new ri(t, r); + return new fi(t, r); } - Y() { - return { t: this.type, d: this.data ? this.data.Y() : null }; + gt() { + return { t: this.type, d: this.data ? this.data.gt() : null }; } - static qn(e) { + static _u(e) { let t, r = null; switch (e.t) { - case ri.Er.OPEN: - case ri.Er.kt: + case fi.Ln.OPEN: + case fi.Ln.qs: break; - case ri.Er.Rr: + case fi.Ln.Rr: r = new ns(e.d); break; - case ri.Er.nc: - (t = e.d || {}), (r = new hs(t.id, is.qn(t.pf || []))); + case fi.Ln.bm: + (t = e.d || {}), (r = new us(t.id, is._u(t.pf || []))); break; - case ri.Er.vr: + case fi.Ln.wr: r = new ur(e.d); break; - case ri.Er.ue: - r = new ts(e.d); + case fi.Ln.xe: + r = new rs(e.d); break; - case ri.Er.lc: - (t = e.d || {}), (r = new rs(t.e, is.qn(t.pf || []))); + case fi.Ln.Em: + (t = e.d || {}), (r = new ls(t.e, is._u(t.pf || []))); break; - case ri.Er.Vr: - r = new ni(e.d); + case fi.Ln.rm: + r = new mi(e.d); } - return new ri(e.t, r); + return new fi(e.t, r); } } -(ri.Er = { +(fi.Ln = { OPEN: "open", Rr: "purchase", - nc: "purchase_property", - vr: "push_click", - ue: "custom_event", - lc: "custom_event_property", - Vr: "iam_click", - kt: "test", + bm: "purchase_property", + wr: "push_click", + xe: "custom_event", + Em: "custom_event_property", + rm: "iam_click", + qs: "test", }), - (ri.cc = {}), - (ri.cc[ri.Er.OPEN] = tt.OPEN), - (ri.cc[ri.Er.Rr] = tt.Rr), - (ri.cc[ri.Er.nc] = tt.Rr), - (ri.cc[ri.Er.vr] = tt.vr), - (ri.cc[ri.Er.ue] = tt.ue), - (ri.cc[ri.Er.lc] = tt.ue), - (ri.cc[ri.Er.Vr] = tt.Vr), - (ri.cc[ri.Er.kt] = tt.kt); - -class gt { - constructor(t, i = [], s, e, r = 0, h, l, o = 0, n = gt.td, a, u, d) { + (fi._m = {}), + (fi._m[fi.Ln.OPEN] = ot.OPEN), + (fi._m[fi.Ln.Rr] = ot.Rr), + (fi._m[fi.Ln.bm] = ot.Rr), + (fi._m[fi.Ln.wr] = ot.wr), + (fi._m[fi.Ln.xe] = ot.xe), + (fi._m[fi.Ln.Em] = ot.xe), + (fi._m[fi.Ln.rm] = ot.rm), + (fi._m[fi.Ln.qs] = ot.qs); + +class pt { + constructor(t, i = [], s, e, r = 0, h, l, o = 0, n = pt.Td, a, u, d) { (this.id = t), - (this.sd = i), + (this.Pd = i), (this.startTime = s), (this.endTime = e), (this.priority = r), (this.type = h), (this.data = l), - (this.ed = o), - (this.rd = n), - (this.Or = a), - (this.hd = u), - (this.od = d), + (this.Ed = o), + (this.Nd = n), + (this.Vn = a), + (this._d = u), + (this.Id = d), (this.id = t), - (this.sd = i || []), + (this.Pd = i || []), void 0 === s && (s = null), (this.startTime = s), void 0 === e && (e = null), (this.endTime = e), (this.priority = r || 0), (this.type = h), - (this.ed = o || 0), - null == a && (a = 1e3 * (this.ed + 30)), - (this.Or = a), + (this.Ed = o || 0), + null == a && (a = 1e3 * (this.Ed + 30)), + (this.Vn = a), (this.data = l), - null != n && (this.rd = n), - (this.hd = u), - (this.od = d || null); + null != n && (this.Nd = n), + (this._d = u), + (this.Id = d || null); } - nd(t) { + xd(t) { return ( - null == this.od || (this.rd !== gt.td && t - this.od >= 1e3 * this.rd) + null == this.Id || (this.Nd !== pt.Td && t - this.Id >= 1e3 * this.Nd) ); } - ad(t) { - this.od = t; + zd(t) { + this.Id = t; } - ud(t) { - const i = t + 1e3 * this.ed; + Md(t) { + const i = t + 1e3 * this.Ed; return Math.max(i - new Date().valueOf(), 0); } - dd(t) { + Bd(t) { const i = new Date().valueOf() - t, - s = null == t || isNaN(i) || null == this.Or || i < this.Or; + s = null == t || isNaN(i) || null == this.Vn || i < this.Vn; return ( s || - r$1.info( - `Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.Or}ms.`, + E$1.info( + `Trigger action ${this.type} is no longer eligible for display - fired ${i}ms ago and has a timeout of ${this.Vn}ms.`, ), !s ); @@ -5150,28 +5408,28 @@ class gt { const i = t.id, s = []; for (let i = 0; i < t.trigger_condition.length; i++) - s.push(ri.fromJson(t.trigger_condition[i])); + s.push(fi.fromJson(t.trigger_condition[i])); const e = dateFromUnixTimestamp(t.start_time), r = dateFromUnixTimestamp(t.end_time), h = t.priority, - o = t.type, - n = t.delay, - a = t.re_eligibility, - u = t.timeout, - d = t.data, - m = t.min_seconds_since_last_trigger; + l = t.type, + o = t.delay, + n = t.re_eligibility, + a = t.timeout, + u = t.data, + d = t.min_seconds_since_last_trigger; return validateValueIsFromEnum( - gt.Er, - o, + pt.Ln, + l, "Could not construct Trigger from server data", "Trigger.Types", ) - ? new gt(i, s, e, r, h, o, d, n, a, u, m) + ? new pt(i, s, e, r, h, l, u, o, n, a, d) : null; } - Y() { + gt() { const t = []; - for (let i = 0; i < this.sd.length; i++) t.push(this.sd[i].Y()); + for (let i = 0; i < this.Pd.length; i++) t.push(this.Pd[i].gt()); return { i: this.id, c: t, @@ -5180,18 +5438,18 @@ class gt { p: this.priority, t: this.type, da: this.data, - d: this.ed, - r: this.rd, - tm: this.Or, - ss: this.hd, - ld: this.od, + d: this.Ed, + r: this.Nd, + tm: this.Vn, + ss: this._d, + ld: this.Id, }; } - static qn(t) { + static _u(t) { const i = [], s = t.c || []; - for (let t = 0; t < s.length; t++) i.push(ri.qn(s[t])); - return new gt( + for (let t = 0; t < s.length; t++) i.push(fi._u(s[t])); + return new pt( t.i, i, rehydrateDateAfterJsonization(t.s), @@ -5207,31 +5465,31 @@ class gt { ); } } -(gt.Er = { _r: "inapp", md: "templated_iam" }), (gt.td = -1); +(pt.Ln = { Kn: "inapp", Cd: "templated_iam" }), (pt.Td = -1); function attachCSS(n, t, o) { const c = n || document.querySelector("head"), - s = `ab-${t}-css-definitions-${"5.5.0".replace(/\./g, "-")}`; + e = `ab-${t}-css-definitions-${"6.5.0".replace(/\./g, "-")}`; if (!c) return; - const a = c.ownerDocument || document; - if (null == a.getElementById(s)) { - const n = a.createElement("style"); - (n.innerHTML = o || ""), (n.id = s); - const t = e.nn(L.bo); + const s = c.ownerDocument || document; + if (null == s.getElementById(e)) { + const n = s.createElement("style"); + (n.innerHTML = o || ""), (n.id = e); + const t = r.re(D.er); null != t && n.setAttribute("nonce", t), c.appendChild(n); } } function loadFontAwesome() { - if (e.nn(L.Mo)) return; - const t = "https://use.fontawesome.com/7f85a56ba4.css"; + if (r.re(D.Za)) return; + const e = "https://use.fontawesome.com/7f85a56ba4.css"; if ( - !(null !== document.querySelector('link[rel=stylesheet][href="' + t + '"]')) + !(null !== document.querySelector('link[rel=stylesheet][href="' + e + '"]')) ) { - const e = document.createElement("link"); - e.setAttribute("rel", "stylesheet"), - e.setAttribute("href", t), - document.getElementsByTagName("head")[0].appendChild(e); + const t = document.createElement("link"); + t.setAttribute("rel", "stylesheet"), + t.setAttribute("href", e), + document.getElementsByTagName("head")[0].appendChild(t); } } @@ -5250,14 +5508,25 @@ function attachInAppMessageCSS(t) { attachCSS( t, "iam", - ".ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9011;-webkit-tap-highlight-color:transparent}.ab-iam-root.v3:focus{outline:0}.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-show,.ab-iam-root.v3.ab-effect-html.ab-show,.ab-iam-root.v3.ab-effect-modal.ab-show{opacity:1}.ab-iam-root.v3.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-html.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-modal.ab-show.ab-animate-in{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide,.ab-iam-root.v3.ab-effect-html.ab-hide,.ab-iam-root.v3.ab-effect-modal.ab-hide{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-html.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-modal.ab-hide.ab-animate-out{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-slide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-show .ab-in-app-message{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-iam-root.v3.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left{-webkit-transform:translateX(-535px);-moz-transform:translateX(-535px);-ms-transform:translateX(-535px);transform:translateX(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up{-webkit-transform:translateY(-535px);-moz-transform:translateY(-535px);-ms-transform:translateY(-535px);transform:translateY(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down{-webkit-transform:translateY(535px);-moz-transform:translateY(535px);-ms-transform:translateY(535px);transform:translateY(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3 .ab-ios-scroll-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;pointer-events:all;touch-action:auto;-webkit-overflow-scrolling:touch}.ab-iam-root.v3 .ab-in-app-message{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;text-align:center;-webkit-box-shadow:0 0 4px rgba(0,0,0,.3);-moz-box-shadow:0 0 4px rgba(0,0,0,.3);box-shadow:0 0 4px rgba(0,0,0,.3);line-height:normal;letter-spacing:normal;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;z-index:9011;max-width:100%;overflow:hidden;display:inline-block;pointer-events:all;color:#333;color-scheme:normal}.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-text{float:none;line-height:1.5;margin:20px 25px;max-width:100%;overflow:hidden;overflow-y:auto;vertical-align:text-bottom;word-wrap:break-word;white-space:pre-wrap;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb{-webkit-appearance:none;border:4px solid transparent;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background-color:rgba(0,0,0,.2)}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-header{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;font-size:20px;margin-bottom:10px;line-height:1.3}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:14px;font-weight:700;margin:20px;margin-top:calc(constant(safe-area-inset-top,0) + 20px);margin-right:calc(constant(safe-area-inset-right,0) + 20px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 20px);margin-left:calc(constant(safe-area-inset-left,0) + 20px);margin-top:calc(env(safe-area-inset-top,0) + 20px);margin-right:calc(env(safe-area-inset-right,0) + 20px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 20px);margin-left:calc(env(safe-area-inset-left,0) + 20px);max-height:150px;padding:10px;right:0;background-color:#efefef}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text{opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 25px 5px 10px;max-width:430px;vertical-align:middle;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text[dir=rtl]{border-width:5px 10px 5px 25px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{display:block;max-height:150px;overflow:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:365px;border-top:0;border-bottom:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{float:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;vertical-align:top;width:60px;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{float:none;position:relative;display:block;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img{background-size:cover;background-repeat:no-repeat;background-position:50% 50%;position:absolute;top:0;right:0;bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-icon{margin-top:20px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{padding:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-text{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-buttons{bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{float:none;height:auto;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{display:block;top:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none}.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{width:auto;max-height:720px;max-width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-html-message{background-color:transparent;border:none;height:100%;overflow:auto;position:relative;touch-action:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-message-buttons{position:absolute;bottom:0;width:100%;padding:17px 25px 30px 25px;z-index:inherit;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ab-iam-root.v3 .ab-in-app-message .ab-message-button{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;height:44px;line-height:normal;letter-spacing:normal;margin:0;max-width:100%;min-width:80px;padding:0 12px;position:relative;text-transform:none;width:48%;width:calc(50% - 5px);border:1px solid #1b78cf;-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;word-wrap:normal;white-space:nowrap}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:active:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.08)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:focus:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.15)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-iam-root.v3 .ab-in-app-message .ab-icon{float:none;display:inline-block;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-iam-root.v3 .ab-centered{margin:auto;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-iam-root.v3 .ab-page-blocker{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9001;pointer-events:all;background-color:rgba(51,51,51,.75)}@media (max-width:600px){.ab-iam-root.v3 .ab-in-app-message.ab-slideup{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-close-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic),.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-message-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:480px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}}@media (max-height:750px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-height:91vh;max-height:calc(100vh - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text{max-height:65vh;max-height:calc(100vh - 30px - 60px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image{max-height:45vh;max-height:calc(100vh - 30px - 155.17241379310346px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon{max-height:45vh;max-height:calc(100vh - 30px - 70px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons{max-height:50vh;max-height:calc(100vh - 30px - 93px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image{max-height:30vh;max-height:calc(100vh - 30px - 155.17241379310346px - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon{max-height:30vh;max-height:calc(100vh - 30px - 70px - 93px - 20px)}}@media (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area img{max-height:100%;max-width:100%}}@media (max-height:750px) and (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important;width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-height:480px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:750px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}", + ".ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9011;-webkit-tap-highlight-color:transparent}.ab-iam-root.v3:focus{outline:0}.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-show,.ab-iam-root.v3.ab-effect-html.ab-show,.ab-iam-root.v3.ab-effect-modal.ab-show{opacity:1}.ab-iam-root.v3.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-html.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-modal.ab-show.ab-animate-in{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide,.ab-iam-root.v3.ab-effect-html.ab-hide,.ab-iam-root.v3.ab-effect-modal.ab-hide{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-html.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-modal.ab-hide.ab-animate-out{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-slide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-show .ab-in-app-message{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-iam-root.v3.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left{-webkit-transform:translateX(-535px);-moz-transform:translateX(-535px);-ms-transform:translateX(-535px);transform:translateX(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up{-webkit-transform:translateY(-535px);-moz-transform:translateY(-535px);-ms-transform:translateY(-535px);transform:translateY(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down{-webkit-transform:translateY(535px);-moz-transform:translateY(535px);-ms-transform:translateY(535px);transform:translateY(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3 .ab-ios-scroll-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;pointer-events:all;touch-action:auto;-webkit-overflow-scrolling:touch}.ab-iam-root.v3 .ab-in-app-message{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;text-align:center;-webkit-box-shadow:0 0 4px rgba(0,0,0,.3);-moz-box-shadow:0 0 4px rgba(0,0,0,.3);box-shadow:0 0 4px rgba(0,0,0,.3);line-height:normal;letter-spacing:normal;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;z-index:9011;max-width:100%;overflow:hidden;display:inline-block;pointer-events:all;color:#333;color-scheme:normal}.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-text{float:none;line-height:1.5;margin:20px 25px;max-width:100%;overflow:hidden;overflow-y:auto;vertical-align:text-bottom;word-wrap:break-word;white-space:pre-wrap;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb{-webkit-appearance:none;border:4px solid transparent;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background-color:rgba(0,0,0,.2)}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-header{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;font-size:20px;margin-bottom:10px;line-height:1.3}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:14px;font-weight:700;margin:20px;margin-top:calc(constant(safe-area-inset-top,0) + 20px);margin-right:calc(constant(safe-area-inset-right,0) + 20px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 20px);margin-left:calc(constant(safe-area-inset-left,0) + 20px);margin-top:calc(env(safe-area-inset-top,0) + 20px);margin-right:calc(env(safe-area-inset-right,0) + 20px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 20px);margin-left:calc(env(safe-area-inset-left,0) + 20px);max-height:150px;padding:10px;right:0;background-color:#efefef}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron.rtl{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text{opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 25px 5px 10px;max-width:430px;vertical-align:middle;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text[dir=rtl]{border-width:5px 10px 5px 25px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{display:block;max-height:150px;overflow:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:365px;border-top:0;border-bottom:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=rtl]{left:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button[dir=ltr]{right:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{float:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;vertical-align:top;width:60px;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{float:none;position:relative;display:block;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img{position:absolute;top:0;right:0;bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img img{width:100%;height:100%;object-fit:cover;object-position:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-icon{margin-top:20px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{padding:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-text{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-buttons{bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{float:none;height:auto;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{display:block;top:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none}.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{width:auto;max-height:720px;max-width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-html-message{background-color:transparent;border:none;height:100%;overflow:auto;position:relative;touch-action:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-message-buttons{position:absolute;bottom:0;width:100%;padding:17px 25px 30px 25px;z-index:inherit;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ab-iam-root.v3 .ab-in-app-message .ab-message-button{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;height:44px;line-height:normal;letter-spacing:normal;margin:0;max-width:100%;min-width:80px;padding:0 12px;position:relative;text-transform:none;width:48%;width:calc(50% - 5px);border:1px solid #1b78cf;-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;word-wrap:normal;white-space:nowrap}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:active:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.08)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:focus:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.15)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-iam-root.v3 .ab-in-app-message .ab-icon{float:none;display:inline-block;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-iam-root.v3 .ab-centered{margin:auto;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-iam-root.v3 .ab-page-blocker{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9001;pointer-events:all;background-color:rgba(51,51,51,.75)}@media (max-width:600px){.ab-iam-root.v3 .ab-in-app-message.ab-slideup{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron.rtl{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-close-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic),.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-message-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:480px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}}@media (max-height:750px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-height:91vh;max-height:calc(100vh - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text{max-height:65vh;max-height:calc(100vh - 30px - 60px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image{max-height:45vh;max-height:calc(100vh - 30px - 155.17241379310346px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon{max-height:45vh;max-height:calc(100vh - 30px - 70px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons{max-height:50vh;max-height:calc(100vh - 30px - 93px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image{max-height:30vh;max-height:calc(100vh - 30px - 155.17241379310346px - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon{max-height:30vh;max-height:calc(100vh - 30px - 70px - 93px - 20px)}}@media (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area img{max-height:100%;max-width:100%}}@media (max-height:750px) and (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important;width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-height:480px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:750px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}", ); } function setupInAppMessageUI() { attachInAppMessageCSS(), loadFontAwesome(); } -function me(e) { +function attachBannerCSS(n) { + attachCSS( + n, + "banner", + ".ab-html-banner{width:100%;height:100%;border:none;display:block}.ab-html-control-banner{width:0;height:0;margin:0;border:none}", + ); +} +function setupBannerUI() { + attachBannerCSS(); +} + +function be(e) { let s = ""; return ( e.animateIn && (s += " ab-animate-in"), @@ -5273,29 +5542,29 @@ function me(e) { ); } -function createCloseButton(t, o, e, n = "ltr") { - const r = document.createElement("button"); - r.setAttribute("aria-label", t), - r.setAttribute("tabindex", "0"), - r.setAttribute("role", "button"), - (r.dir = n), - addPassiveEventListener(r, "touchstart"), - (r.className = "ab-close-button"); +function createCloseButton(t, o, e, r = "ltr") { + const n = document.createElement("button"); + n.setAttribute("aria-label", t), + n.setAttribute("role", "button"), + (n.dir = r), + addPassiveEventListener(n, "touchstart"), + (n.className = "ab-close-button"); const l = buildSvg( "0 0 15 15", "M15 1.5L13.5 0l-6 6-6-6L0 1.5l6 6-6 6L1.5 15l6-6 6 6 1.5-1.5-6-6 6-6z", o, ); return ( - r.appendChild(l), - r.addEventListener("keydown", (t) => { - (t.keyCode !== KeyCodes.Fo && t.keyCode !== KeyCodes.To) || + n.appendChild(l), + l.setAttribute("aria-hidden", "true"), + n.addEventListener("keydown", (t) => { + (t.keyCode !== KeyCodes.Ho && t.keyCode !== KeyCodes.Go) || (e(), t.stopPropagation()); }), - (r.onclick = (t) => { + (n.onclick = (t) => { e(), t.stopPropagation(); }), - r + n ); } @@ -5321,24 +5590,24 @@ function toRgba(r, n) { ); } -function logInAppMessageImpression(o) { - if (!e.X()) return !1; - if (!(o instanceof InAppMessage || o instanceof ControlMessage)) - return r$1.error(MUST_BE_IN_APP_MESSAGE_WARNING), !1; - const s = o instanceof ControlMessage ? i.mo : i.Xi; - return se$1.m().q(o, s).L; +function logInAppMessageImpression(s) { + if (!r.rr()) return !1; + if (!(s instanceof InAppMessage || s instanceof ControlMessage)) + return E$1.error(IamStrings.sS), !1; + const o = s instanceof ControlMessage ? f.om : f.wn; + return je$1.ra().lt(s, o).W; } -function logInAppMessageClick(o) { - if (!e.X()) return !1; - if (!(o instanceof InAppMessage)) return r$1.error(MUST_BE_IN_APP_MESSAGE_WARNING), !1; - const s = se$1.m().q(o, i.$i); - if (s) { - o.Wr() || logInAppMessageImpression(o); - for (let r = 0; r < s.ge.length; r++) - TriggersProviderFactory.rr().fe(tt.Vr, [o.triggerId], s.ge[r]); +function logInAppMessageClick(s) { + if (!r.rr()) return !1; + if (!(s instanceof InAppMessage)) return E$1.error(IamStrings.sS), !1; + const e = je$1.ra().lt(s, f.zn); + if (e) { + s.sm() || logInAppMessageImpression(s); + for (let r = 0; r < e.Ee.length; r++) + TriggersProviderFactory.o().he(ot.rm, [s.triggerId], e.Ee[r]); } - return s.L; + return e.W; } const ORIENTATION = { PORTRAIT: 0, LANDSCAPE: 1 }; @@ -5371,58 +5640,58 @@ function _getCurrentUrl() { } const WindowUtils = { openUri: _openUri, - fo: _isPhone, - co: _getOrientation, - Zo: _getCurrentUrl, + Ua: _isPhone, + Ma: _getOrientation, + gl: _getCurrentUrl, }; function getUser() { - if (e.X()) return e.pr(); + if (r.rr()) return r.br(); } -function _handleBrazeAction(o, s, t) { - if (e.X()) +function _handleBrazeAction(o, e, s) { + if (r.rr()) if (BRAZE_ACTION_URI_REGEX.test(o)) { - const s = getDecodedBrazeAction(o); - if (!s) return; - const t = (o) => { + const e = getDecodedBrazeAction(o); + if (!e) return; + const s = (o) => { if (!isValidBrazeActionJson(o)) - return void r$1.error( + return void E$1.error( `Decoded Braze Action json is invalid: ${JSON.stringify( o, null, 2, )}`, ); - const s = BRAZE_ACTIONS.properties.type, - i = BRAZE_ACTIONS.properties.oo, - n = BRAZE_ACTIONS.properties.eo, - a = o[s]; - if (a === BRAZE_ACTIONS.types.ro) { - const e = o[i]; - for (const o of e) t(o); + const e = BRAZE_ACTIONS.properties.type, + t = BRAZE_ACTIONS.properties.eo, + i = BRAZE_ACTIONS.properties.so, + n = o[e]; + if (n === BRAZE_ACTIONS.types.io) { + const e = o[t]; + for (const o of e) s(o); } else { - const s = o[n]; - let t, i; - switch (a) { + const e = o[i]; + let s, t; + switch (n) { case BRAZE_ACTIONS.types.logCustomEvent: Promise.resolve().then(function () { return logCustomEvent$1; }).then( ({ logCustomEvent: logCustomEvent }) => { - e.so() - ? ((i = Array.prototype.slice.call(s)), - logCustomEvent(...i)) - : r$1.error(BRAZE_MUST_BE_INITIALIZED_ERROR); + r.ao() + ? ((t = Array.prototype.slice.call(e)), + logCustomEvent(...t)) + : E$1.error(CoreStrings.ee); }, ); break; case BRAZE_ACTIONS.types.requestPushPermission: Promise.resolve().then(function () { return requestPushPermission$1; }).then( ({ requestPushPermission: requestPushPermission }) => { - e.so() - ? "Safari" === X.browser && X.OS === OperatingSystems.io + r.ao() + ? "Safari" === ro.browser && ro.OS === OperatingSystems.co ? window.navigator.standalone && requestPushPermission() : requestPushPermission() - : r$1.error(BRAZE_MUST_BE_INITIALIZED_ERROR); + : E$1.error(CoreStrings.ee); }, ); break; @@ -5433,21 +5702,21 @@ function _handleBrazeAction(o, s, t) { case BRAZE_ACTIONS.types.removeFromSubscriptionGroup: case BRAZE_ACTIONS.types.addToCustomAttributeArray: case BRAZE_ACTIONS.types.removeFromCustomAttributeArray: - if (((t = getUser()), t)) { - t[a](...Array.prototype.slice.call(s)); + if (((s = getUser()), s)) { + s[n](...Array.prototype.slice.call(e)); } break; - case BRAZE_ACTIONS.types.no: - case BRAZE_ACTIONS.types.ao: - (i = Array.prototype.slice.call(s)), WindowUtils.openUri(...i); + case BRAZE_ACTIONS.types.mo: + case BRAZE_ACTIONS.types.uo: + (t = Array.prototype.slice.call(e)), WindowUtils.openUri(...t); break; default: - r$1.info(`Ignoring unknown Braze Action: ${a}`); + E$1.info(`Ignoring unknown Braze Action: ${n}`); } } }; - t(s); - } else WindowUtils.openUri(o, s, t); + s(e); + } else WindowUtils.openUri(o, e, s); } function handleBrazeAction(o, e) { _handleBrazeAction(o, e); @@ -5474,86 +5743,67 @@ function isURIJavascriptOrData(t) { ); } -function logInAppMessageHtmlClick(t, s, o) { - if (!e.X()) return !1; - if (!(t instanceof HtmlMessage)) +function logInAppMessageHtmlClick(e, t, s) { + if (!r.rr()) return !1; + if (!(e instanceof HtmlMessage)) return ( - r$1.error( + E$1.error( "inAppMessage argument to logInAppMessageHtmlClick must be an HtmlMessage object.", ), !1 ); - let m = i.$i; - null != s && (m = i.Oi); - const n = se$1.m().q(t, m, s, o); - if (n.L) - for (let e = 0; e < n.ge.length; e++) - TriggersProviderFactory.rr().fe(tt.Vr, [t.triggerId, s], n.ge[e]); - return n.L; -} - -const buildHtmlClickHandler = (t, r, e, o) => { - const s = e.getAttribute("href"), - n = e.onclick; - return (i) => { - if (null != n && "function" == typeof n && !1 === n.bind(e)(i)) return; - let u = parseQueryStringKeyValues(s).abButtonId; + let o = f.zn; + null != t && (o = f.Sn); + const m = je$1.ra().lt(e, o, t, s); + if (m.W) + for (let r = 0; r < m.Ee.length; r++) + TriggersProviderFactory.o().he(ot.rm, [e.triggerId, t], m.Ee[r]); + return m.W; +} + +const buildHtmlClickHandler = (l, t, i, o) => { + const r = i.getAttribute("href"), + e = i.onclick; + return (n) => { + if (null != e && "function" == typeof e && !1 === e.bind(i)(n)) return; + let s = parseQueryStringKeyValues(r).abButtonId; if ( - ((null != u && "" !== u) || (u = e.getAttribute("id") || void 0), - null != s && "" !== s && 0 !== s.indexOf("#")) + ((null != s && "" !== s) || (s = i.getAttribute("id") || void 0), + null != r && "" !== r && 0 !== r.indexOf("#")) ) { - const n = + const e = "blank" === - (e.getAttribute("target") || "").toLowerCase().replace("_", ""), - c = o || t.openTarget === InAppMessage.OpenTarget.BLANK || n, - a = () => { - logInAppMessageHtmlClick(t, u, s), WindowUtils.openUri(s, c, i); + (i.getAttribute("target") || "").toLowerCase().replace("_", ""), + m = o || l.openTarget === InAppMessage.OpenTarget.BLANK || e, + u = () => { + logInAppMessageHtmlClick(l, s, r), WindowUtils.openUri(r, m, n); }; - c ? a() : t.Cr(r, a); - } else logInAppMessageHtmlClick(t, u, s || void 0); - return i.stopPropagation(), !1; + m ? u() : l.ll(t, u); + } else logInAppMessageHtmlClick(l, s, r || void 0); + return n.stopPropagation(), !1; }; }; -const applyNonceToDynamicallyCreatedTags = (t, r, e) => { - const o = `([\\w]+)\\s*=\\s*document.createElement\\(['"]${e}['"]\\)`, - s = t.match(new RegExp(o)); - if (s) { - const e = `${s[1]}.setAttribute("nonce", "${r}")`; - return `${t.slice(0, s.index + s[0].length)};${e};${t.slice( - s.index + s[0].length, - )}`; - } - return null; -}; -const buildBrazeBridge = (t, o, s) => { - const n = { - closeMessage: function () { - t.Cr(o); - }, - logClick: function () { - logInAppMessageHtmlClick(t, ...arguments); - }, - display: {}, - web: {}, - }, + +const buildBrazeBridge = (t, e) => { + const o = { display: {}, web: {} }, requestPushPermission = function () { return function () { const t = arguments; - Promise.resolve().then(function () { return requestPushPermission$1; }).then((o) => { - e.so() - ? o.requestPushPermission(...Array.prototype.slice.call(t)) - : r$1.error(BRAZE_MUST_BE_INITIALIZED_ERROR); + Promise.resolve().then(function () { return requestPushPermission$1; }).then((e) => { + r.ao() + ? e.requestPushPermission(...Array.prototype.slice.call(t)) + : E$1.error(CoreStrings.ee); }); }; }, - i = { + n = { requestImmediateDataFlush: function () { const t = arguments; Promise.resolve().then(function () { return requestImmediateDataFlush$1; }).then( ({ requestImmediateDataFlush: requestImmediateDataFlush }) => { - e.so() + r.ao() ? requestImmediateDataFlush(...Array.prototype.slice.call(t)) - : r$1.error(BRAZE_MUST_BE_INITIALIZED_ERROR); + : E$1.error(CoreStrings.ee); }, ); }, @@ -5561,7 +5811,7 @@ const buildBrazeBridge = (t, o, s) => { const t = arguments; Promise.resolve().then(function () { return logCustomEvent$1; }).then( ({ logCustomEvent: logCustomEvent }) => { - if (!e.so()) return void r$1.error(BRAZE_MUST_BE_INITIALIZED_ERROR); + if (!r.ao()) return void E$1.error(CoreStrings.ee); logCustomEvent(...Array.prototype.slice.call(t)); }, ); @@ -5570,7 +5820,7 @@ const buildBrazeBridge = (t, o, s) => { const t = arguments; Promise.resolve().then(function () { return logPurchase$1; }).then( ({ logPurchase: logPurchase }) => { - if (!e.so()) return void r$1.error(BRAZE_MUST_BE_INITIALIZED_ERROR); + if (!r.ao()) return void E$1.error(CoreStrings.ee); logPurchase(...Array.prototype.slice.call(t)); }, ); @@ -5579,30 +5829,28 @@ const buildBrazeBridge = (t, o, s) => { const t = arguments; Promise.resolve().then(function () { return unregisterPush$1; }).then( ({ unregisterPush: unregisterPush }) => { - e.so() + r.ao() ? unregisterPush(...Array.prototype.slice.call(t)) - : r$1.error(BRAZE_MUST_BE_INITIALIZED_ERROR); + : E$1.error(CoreStrings.ee); }, ); }, requestPushPermission: requestPushPermission(), changeUser: function () { const t = arguments; - Promise.resolve().then(function () { return changeUser$1; }).then( - ({ changeUser: changeUser }) => { - if (!e.so()) return void r$1.error(BRAZE_MUST_BE_INITIALIZED_ERROR); - changeUser(...Array.prototype.slice.call(t)); - }, - ); + Promise.resolve().then(function () { return changeUser$1; }).then(({ changeUser: changeUser }) => { + if (!r.ao()) return void E$1.error(CoreStrings.ee); + changeUser(...Array.prototype.slice.call(t)); + }); }, }, - u = function (t) { + s = function (t) { return function () { - i[t](...Array.prototype.slice.call(arguments)); + n[t](...Array.prototype.slice.call(arguments)); }; }; - for (const t of keys(i)) n[t] = u(t); - const c = [ + for (const t of keys(n)) o[t] = s(t); + const i = [ "setFirstName", "setLastName", "setEmail", @@ -5622,139 +5870,169 @@ const buildBrazeBridge = (t, o, s) => { "setCustomLocationAttribute", "addToSubscriptionGroup", "removeFromSubscriptionGroup", + "setLineId", ], - a = function (t) { + u = function (t) { return function () { - const r = getUser(); - r && r[t](...Array.prototype.slice.call(arguments)); + const e = getUser(); + e && e[t](...Array.prototype.slice.call(arguments)); }; }, - m = {}; - for (let t = 0; t < c.length; t++) m[c[t]] = a(c[t]); - n.getUser = function () { - return m; + c = {}; + for (let t = 0; t < i.length; t++) c[i[t]] = u(i[t]); + o.getUser = function () { + return c; }; - const l = { showFeed: s }, - f = function (r) { + const a = {}, + m = function (r) { return function () { - const e = arguments; - t.Cr(o, function () { - l[r](...Array.prototype.slice.call(e)); - }); + const o = arguments; + "function" != typeof e + ? a[r](...Array.prototype.slice.call(o)) + : e(t, function () { + a[r](...Array.prototype.slice.call(o)); + }); }; }, - p = n.display; - for (const t of keys(l)) p[t] = f(t); - const d = { registerAppboyPushMessages: requestPushPermission() }, - g = function (t) { + f = o.display; + for (const t of keys(a)) f[t] = m(t); + const l = { registerAppboyPushMessages: requestPushPermission() }, + p = function (t) { return function () { - d[t](...Array.prototype.slice.call(arguments)); + l[t](...Array.prototype.slice.call(arguments)); }; }, - h = n.web; - for (const t of keys(d)) h[t] = g(t); - return n; + y = o.web; + for (const t of keys(l)) y[t] = p(t); + return ( + (o.NotificationSubscriptionTypes = User.NotificationSubscriptionTypes), o + ); }; - -function dt(t, e, n, o, s, l) { - const c = document.createElement("iframe"); - c.setAttribute("title", "Modal Message"), - s && (c.style.zIndex = (s + 1).toString()); - let r = null; - if (null != l) { - (r = document.createElement("html")), (r.innerHTML = t.message || ""); - const e = r.getElementsByTagName("style"); - for (let t = 0; t < e.length; t++) e[t].setAttribute("nonce", l); - const n = r.getElementsByTagName("script"); +const applyNonceToDynamicallyCreatedTags = (t, e, r) => { + const o = `([\\w]+)\\s*=\\s*document.createElement\\(['"]${r}['"]\\)`, + n = t.match(new RegExp(o)); + if (n) { + const r = `${n[1]}.setAttribute("nonce", "${e}")`; + return `${t.slice(0, n.index + n[0].length)};${r};${t.slice( + n.index + n[0].length, + )}`; + } + return null; +}; +const attachHtmlToIframeWithNonce = (t, e, r) => { + let o = null; + if (null != r) { + (o = document.createElement("html")), (o.innerHTML = e || ""); + const t = o.getElementsByTagName("style"); + for (let e = 0; e < t.length; e++) t[e].setAttribute("nonce", r); + const n = o.getElementsByTagName("script"); for (let t = 0; t < n.length; t++) { - n[t].setAttribute("nonce", l), + n[t].setAttribute("nonce", r), (n[t].innerHTML = n[t].innerHTML.replace( /