@braze/service-worker 4.6.3 → 4.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/service-worker.js +17 -16
package/package.json
CHANGED
package/service-worker.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Braze Web SDK v4.
|
|
2
|
+
* Braze Web SDK v4.7.1
|
|
3
3
|
* (c) Braze, Inc. 2023 - http://braze.com
|
|
4
4
|
* License available at https://github.com/braze-inc/braze-web-sdk/blob/master/LICENSE
|
|
5
|
-
* Compiled on 2023-
|
|
5
|
+
* Compiled on 2023-05-11
|
|
6
6
|
*/
|
|
7
7
|
"use strict";
|
|
8
8
|
const k = {
|
|
@@ -34,7 +34,7 @@ function r(a) {
|
|
|
34
34
|
b.onupgradeneeded = () => b.result.close();
|
|
35
35
|
b.onsuccess = () => b.result.close();
|
|
36
36
|
if ("undefined" !== typeof window) {
|
|
37
|
-
const c = window.
|
|
37
|
+
const c = window.ra || window.qa || window.ta;
|
|
38
38
|
if (c && c.O && c.O.id)
|
|
39
39
|
return (
|
|
40
40
|
a.j.info(
|
|
@@ -238,17 +238,17 @@ const y = {
|
|
|
238
238
|
if (void 0 !== a || void 0 === y.o) y.o = !!a;
|
|
239
239
|
y.F || (y.F = !0);
|
|
240
240
|
},
|
|
241
|
-
|
|
241
|
+
sa: function() {
|
|
242
242
|
y.F = !1;
|
|
243
243
|
y.o = void 0;
|
|
244
244
|
y.j = void 0;
|
|
245
245
|
},
|
|
246
|
-
|
|
246
|
+
ua: function(a) {
|
|
247
247
|
"function" !== typeof a
|
|
248
248
|
? y.info("Ignoring setLogger call since logger is not a function")
|
|
249
249
|
: (y.B(), (y.j = a));
|
|
250
250
|
},
|
|
251
|
-
|
|
251
|
+
va: function() {
|
|
252
252
|
y.B();
|
|
253
253
|
y.o
|
|
254
254
|
? (console.log("Disabling Braze logging"), (y.o = !1))
|
|
@@ -259,12 +259,12 @@ const y = {
|
|
|
259
259
|
},
|
|
260
260
|
warn: function(a) {
|
|
261
261
|
y.o &&
|
|
262
|
-
((a = "Braze SDK Warning: " + a + " (v4.
|
|
262
|
+
((a = "Braze SDK Warning: " + a + " (v4.7.1)"),
|
|
263
263
|
null != y.j ? y.j(a) : console.warn(a));
|
|
264
264
|
},
|
|
265
265
|
error: function(a) {
|
|
266
266
|
y.o &&
|
|
267
|
-
((a = "Braze SDK Error: " + a + " (v4.
|
|
267
|
+
((a = "Braze SDK Error: " + a + " (v4.7.1)"),
|
|
268
268
|
null != y.j ? y.j(a) : console.error(a));
|
|
269
269
|
}
|
|
270
270
|
};
|
|
@@ -279,8 +279,8 @@ var z = {
|
|
|
279
279
|
X: "ccic",
|
|
280
280
|
U: "ccc",
|
|
281
281
|
V: "ccd",
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
oa: "ss",
|
|
283
|
+
na: "se",
|
|
284
284
|
fa: "si",
|
|
285
285
|
da: "sc",
|
|
286
286
|
ca: "sbc",
|
|
@@ -296,7 +296,8 @@ var z = {
|
|
|
296
296
|
Z: "add",
|
|
297
297
|
aa: "rem",
|
|
298
298
|
ba: "set",
|
|
299
|
-
|
|
299
|
+
ma: "ncam",
|
|
300
|
+
pa: "sgu"
|
|
300
301
|
},
|
|
301
302
|
A = x,
|
|
302
303
|
B = {
|
|
@@ -351,7 +352,7 @@ function I(a, b, c) {
|
|
|
351
352
|
d.time = Math.floor(new Date().valueOf() / 1e3);
|
|
352
353
|
d.device_id = c;
|
|
353
354
|
d.api_key = a;
|
|
354
|
-
d.sdk_version = "4.
|
|
355
|
+
d.sdk_version = "4.7.1";
|
|
355
356
|
d.sdk_flavor = "amp";
|
|
356
357
|
d.respond_with = { config: { config_time: 0 } };
|
|
357
358
|
fetch(b + "/data/", {
|
|
@@ -391,7 +392,7 @@ function J(a, b, c, f, e, d, g, h, m) {
|
|
|
391
392
|
const u = {};
|
|
392
393
|
u.device_id = c;
|
|
393
394
|
u.api_key = a;
|
|
394
|
-
u.sdk_version = "4.
|
|
395
|
+
u.sdk_version = "4.7.1";
|
|
395
396
|
null != d && (u.sdk_flavor = d);
|
|
396
397
|
var v = null;
|
|
397
398
|
let K = null,
|
|
@@ -457,7 +458,7 @@ function M(a, b) {
|
|
|
457
458
|
a.time = e;
|
|
458
459
|
a.user_id = d.userId;
|
|
459
460
|
g.events = [a];
|
|
460
|
-
g.sdk_version = "4.
|
|
461
|
+
g.sdk_version = "4.7.1";
|
|
461
462
|
e = {
|
|
462
463
|
"Content-Type": "application/json",
|
|
463
464
|
"X-Braze-Api-Key": g.api_key
|
|
@@ -701,7 +702,7 @@ function V(a) {
|
|
|
701
702
|
d = { url: a.u, ab_ids: { cid: a.cid }, extra: a.e },
|
|
702
703
|
g = a.ri;
|
|
703
704
|
a.ab_push_fetch_test_triggers_key &&
|
|
704
|
-
(E.info("Service worker 4.
|
|
705
|
+
(E.info("Service worker 4.7.1 found trigger fetch key in push payload."),
|
|
705
706
|
(d.fetchTriggers = !0));
|
|
706
707
|
var h = a.ab_cd;
|
|
707
708
|
if (null != h) {
|
|
@@ -747,7 +748,7 @@ self.addEventListener("activate", function() {
|
|
|
747
748
|
return self.clients.claim();
|
|
748
749
|
});
|
|
749
750
|
self.addEventListener("push", function(a) {
|
|
750
|
-
E.info("Service worker 4.
|
|
751
|
+
E.info("Service worker 4.7.1 received push");
|
|
751
752
|
null != a.data && null != a.data.json
|
|
752
753
|
? U(a, V(a.data.json()))
|
|
753
754
|
: U(
|