@stytch/vanilla-js 4.7.4 → 4.7.6
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/CHANGELOG.md +13 -0
- package/dist/b2b/index.esm.js +12 -11
- package/dist/b2b/index.headless.esm.js +12 -11
- package/dist/b2b/index.headless.js +12 -11
- package/dist/b2b/index.js +12 -11
- package/dist/index.esm.js +12 -11
- package/dist/index.headless.esm.js +32 -31
- package/dist/index.headless.js +12 -11
- package/dist/index.js +12 -11
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @stytch/vanilla-js
|
|
2
2
|
|
|
3
|
+
## 4.7.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [bf6f8f6]
|
|
8
|
+
- @stytch/core@2.10.2
|
|
9
|
+
|
|
10
|
+
## 4.7.5
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 7bce4c1: Fix race condition that could lead to high CPU usage with multiple tabs open
|
|
15
|
+
|
|
3
16
|
## 4.7.4
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/b2b/index.esm.js
CHANGED
|
@@ -1523,8 +1523,8 @@ var Ue,
|
|
|
1523
1523
|
executeRecaptcha: i
|
|
1524
1524
|
});
|
|
1525
1525
|
case 2:
|
|
1526
|
-
return r.next = 4,
|
|
1527
|
-
return window;
|
|
1526
|
+
return r.next = 4, ze("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
|
|
1527
|
+
return window.GetTelemetryID;
|
|
1528
1528
|
});
|
|
1529
1529
|
case 4:
|
|
1530
1530
|
return r.abrupt("return", {
|
|
@@ -4125,7 +4125,7 @@ var wt = /*#__PURE__*/function () {
|
|
|
4125
4125
|
},
|
|
4126
4126
|
sdk: {
|
|
4127
4127
|
identifier: "Stytch.js Javascript SDK",
|
|
4128
|
-
version: "4.7.
|
|
4128
|
+
version: "4.7.6"
|
|
4129
4129
|
}
|
|
4130
4130
|
});
|
|
4131
4131
|
}
|
|
@@ -4615,7 +4615,7 @@ var Ft = /*#__PURE__*/function () {
|
|
|
4615
4615
|
this._publicToken = e, this._datalayer = t, this._listen = function (e) {
|
|
4616
4616
|
if (e.key !== Pt(_this7._publicToken)) return;
|
|
4617
4617
|
var t = null === e.newValue || "null" === e.newValue ? null : JSON.parse(e.newValue);
|
|
4618
|
-
_this7.updateState(t);
|
|
4618
|
+
_this7.updateState(t, !0);
|
|
4619
4619
|
}, window.addEventListener("storage", this._listen);
|
|
4620
4620
|
var _this$_datalayer$read = this._datalayer.readSessionCookie(),
|
|
4621
4621
|
n = _this$_datalayer$read.session_token;
|
|
@@ -4669,13 +4669,14 @@ var Ft = /*#__PURE__*/function () {
|
|
|
4669
4669
|
}, {
|
|
4670
4670
|
key: "updateState",
|
|
4671
4671
|
value: function updateState(e) {
|
|
4672
|
-
var t =
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
i =
|
|
4678
|
-
|
|
4672
|
+
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
4673
|
+
var n = this._datalayer.state,
|
|
4674
|
+
r = null === e ? null : Object.assign(Object.assign({}, this._datalayer.state), e);
|
|
4675
|
+
this._datalayer.state = r;
|
|
4676
|
+
var o = e ? Object.keys(e) : [],
|
|
4677
|
+
i = this._datalayer.markStateKeysUpdated(o),
|
|
4678
|
+
a = !zt(n, r);
|
|
4679
|
+
(i || a) && (Lt(this._datalayer.subscriptions, r), a && !t && this._datalayer.syncToLocalStorage());
|
|
4679
4680
|
}
|
|
4680
4681
|
}, {
|
|
4681
4682
|
key: "updateTokens",
|
|
@@ -1399,8 +1399,8 @@ var Ne,
|
|
|
1399
1399
|
executeRecaptcha: o
|
|
1400
1400
|
});
|
|
1401
1401
|
case 2:
|
|
1402
|
-
return n.next = 4,
|
|
1403
|
-
return window;
|
|
1402
|
+
return n.next = 4, Be("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
|
|
1403
|
+
return window.GetTelemetryID;
|
|
1404
1404
|
});
|
|
1405
1405
|
case 4:
|
|
1406
1406
|
return n.abrupt("return", {
|
|
@@ -4001,7 +4001,7 @@ var yt = /*#__PURE__*/function () {
|
|
|
4001
4001
|
},
|
|
4002
4002
|
sdk: {
|
|
4003
4003
|
identifier: "Stytch.js Javascript SDK",
|
|
4004
|
-
version: "4.7.
|
|
4004
|
+
version: "4.7.6"
|
|
4005
4005
|
}
|
|
4006
4006
|
});
|
|
4007
4007
|
}
|
|
@@ -4490,7 +4490,7 @@ var Mt = /*#__PURE__*/function () {
|
|
|
4490
4490
|
this._publicToken = e, this._datalayer = t, this._listen = function (e) {
|
|
4491
4491
|
if (e.key !== Ot(_this7._publicToken)) return;
|
|
4492
4492
|
var t = null === e.newValue || "null" === e.newValue ? null : JSON.parse(e.newValue);
|
|
4493
|
-
_this7.updateState(t);
|
|
4493
|
+
_this7.updateState(t, !0);
|
|
4494
4494
|
}, window.addEventListener("storage", this._listen);
|
|
4495
4495
|
var _this$_datalayer$read = this._datalayer.readSessionCookie(),
|
|
4496
4496
|
r = _this$_datalayer$read.session_token;
|
|
@@ -4544,13 +4544,14 @@ var Mt = /*#__PURE__*/function () {
|
|
|
4544
4544
|
}, {
|
|
4545
4545
|
key: "updateState",
|
|
4546
4546
|
value: function updateState(e) {
|
|
4547
|
-
var t =
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
o =
|
|
4553
|
-
|
|
4547
|
+
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
4548
|
+
var r = this._datalayer.state,
|
|
4549
|
+
n = null === e ? null : Object.assign(Object.assign({}, this._datalayer.state), e);
|
|
4550
|
+
this._datalayer.state = n;
|
|
4551
|
+
var i = e ? Object.keys(e) : [],
|
|
4552
|
+
o = this._datalayer.markStateKeysUpdated(i),
|
|
4553
|
+
s = !Lt(r, n);
|
|
4554
|
+
(o || s) && (Ft(this._datalayer.subscriptions, n), s && !t && this._datalayer.syncToLocalStorage());
|
|
4554
4555
|
}
|
|
4555
4556
|
}, {
|
|
4556
4557
|
key: "updateTokens",
|
|
@@ -1310,8 +1310,8 @@ var Ne,
|
|
|
1310
1310
|
executeRecaptcha: o
|
|
1311
1311
|
});
|
|
1312
1312
|
case 2:
|
|
1313
|
-
return n.next = 4,
|
|
1314
|
-
return window;
|
|
1313
|
+
return n.next = 4, je("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
|
|
1314
|
+
return window.GetTelemetryID;
|
|
1315
1315
|
});
|
|
1316
1316
|
case 4:
|
|
1317
1317
|
return n.abrupt("return", {
|
|
@@ -3912,7 +3912,7 @@ var yt = /*#__PURE__*/function () {
|
|
|
3912
3912
|
},
|
|
3913
3913
|
sdk: {
|
|
3914
3914
|
identifier: "Stytch.js Javascript SDK",
|
|
3915
|
-
version: "4.7.
|
|
3915
|
+
version: "4.7.6"
|
|
3916
3916
|
}
|
|
3917
3917
|
});
|
|
3918
3918
|
}
|
|
@@ -4401,7 +4401,7 @@ var Ft = /*#__PURE__*/function () {
|
|
|
4401
4401
|
this._publicToken = e, this._datalayer = t, this._listen = function (e) {
|
|
4402
4402
|
if (e.key !== Ct(_this7._publicToken)) return;
|
|
4403
4403
|
var t = null === e.newValue || "null" === e.newValue ? null : JSON.parse(e.newValue);
|
|
4404
|
-
_this7.updateState(t);
|
|
4404
|
+
_this7.updateState(t, !0);
|
|
4405
4405
|
}, window.addEventListener("storage", this._listen);
|
|
4406
4406
|
var _this$_datalayer$read = this._datalayer.readSessionCookie(),
|
|
4407
4407
|
r = _this$_datalayer$read.session_token;
|
|
@@ -4455,13 +4455,14 @@ var Ft = /*#__PURE__*/function () {
|
|
|
4455
4455
|
}, {
|
|
4456
4456
|
key: "updateState",
|
|
4457
4457
|
value: function updateState(e) {
|
|
4458
|
-
var t =
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
o =
|
|
4464
|
-
|
|
4458
|
+
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
4459
|
+
var r = this._datalayer.state,
|
|
4460
|
+
n = null === e ? null : Object.assign(Object.assign({}, this._datalayer.state), e);
|
|
4461
|
+
this._datalayer.state = n;
|
|
4462
|
+
var i = e ? Object.keys(e) : [],
|
|
4463
|
+
o = this._datalayer.markStateKeysUpdated(i),
|
|
4464
|
+
s = !Mt(r, n);
|
|
4465
|
+
(o || s) && (Bt(this._datalayer.subscriptions, n), s && !t && this._datalayer.syncToLocalStorage());
|
|
4465
4466
|
}
|
|
4466
4467
|
}, {
|
|
4467
4468
|
key: "updateTokens",
|
package/dist/b2b/index.js
CHANGED
|
@@ -1434,8 +1434,8 @@ var Ne,
|
|
|
1434
1434
|
executeRecaptcha: i
|
|
1435
1435
|
});
|
|
1436
1436
|
case 2:
|
|
1437
|
-
return r.next = 4,
|
|
1438
|
-
return window;
|
|
1437
|
+
return r.next = 4, Le("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
|
|
1438
|
+
return window.GetTelemetryID;
|
|
1439
1439
|
});
|
|
1440
1440
|
case 4:
|
|
1441
1441
|
return r.abrupt("return", {
|
|
@@ -4036,7 +4036,7 @@ var bt = /*#__PURE__*/function () {
|
|
|
4036
4036
|
},
|
|
4037
4037
|
sdk: {
|
|
4038
4038
|
identifier: "Stytch.js Javascript SDK",
|
|
4039
|
-
version: "4.7.
|
|
4039
|
+
version: "4.7.6"
|
|
4040
4040
|
}
|
|
4041
4041
|
});
|
|
4042
4042
|
}
|
|
@@ -4526,7 +4526,7 @@ var zt = /*#__PURE__*/function () {
|
|
|
4526
4526
|
this._publicToken = e, this._datalayer = t, this._listen = function (e) {
|
|
4527
4527
|
if (e.key !== Ot(_this7._publicToken)) return;
|
|
4528
4528
|
var t = null === e.newValue || "null" === e.newValue ? null : JSON.parse(e.newValue);
|
|
4529
|
-
_this7.updateState(t);
|
|
4529
|
+
_this7.updateState(t, !0);
|
|
4530
4530
|
}, window.addEventListener("storage", this._listen);
|
|
4531
4531
|
var _this$_datalayer$read = this._datalayer.readSessionCookie(),
|
|
4532
4532
|
n = _this$_datalayer$read.session_token;
|
|
@@ -4580,13 +4580,14 @@ var zt = /*#__PURE__*/function () {
|
|
|
4580
4580
|
}, {
|
|
4581
4581
|
key: "updateState",
|
|
4582
4582
|
value: function updateState(e) {
|
|
4583
|
-
var t =
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
i =
|
|
4589
|
-
|
|
4583
|
+
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
4584
|
+
var n = this._datalayer.state,
|
|
4585
|
+
r = null === e ? null : Object.assign(Object.assign({}, this._datalayer.state), e);
|
|
4586
|
+
this._datalayer.state = r;
|
|
4587
|
+
var o = e ? Object.keys(e) : [],
|
|
4588
|
+
i = this._datalayer.markStateKeysUpdated(o),
|
|
4589
|
+
s = !Lt(n, r);
|
|
4590
|
+
(i || s) && (Dt(this._datalayer.subscriptions, r), s && !t && this._datalayer.syncToLocalStorage());
|
|
4590
4591
|
}
|
|
4591
4592
|
}, {
|
|
4592
4593
|
key: "updateTokens",
|
package/dist/index.esm.js
CHANGED
|
@@ -1546,8 +1546,8 @@ var Ve,
|
|
|
1546
1546
|
executeRecaptcha: i
|
|
1547
1547
|
});
|
|
1548
1548
|
case 2:
|
|
1549
|
-
return r.next = 4,
|
|
1550
|
-
return window;
|
|
1549
|
+
return r.next = 4, He("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
|
|
1550
|
+
return window.GetTelemetryID;
|
|
1551
1551
|
});
|
|
1552
1552
|
case 4:
|
|
1553
1553
|
return r.abrupt("return", {
|
|
@@ -3927,7 +3927,7 @@ var qt = /*#__PURE__*/function () {
|
|
|
3927
3927
|
},
|
|
3928
3928
|
sdk: {
|
|
3929
3929
|
identifier: "Stytch.js Javascript SDK",
|
|
3930
|
-
version: "4.7.
|
|
3930
|
+
version: "4.7.6"
|
|
3931
3931
|
}
|
|
3932
3932
|
});
|
|
3933
3933
|
}
|
|
@@ -4655,7 +4655,7 @@ var yn = /*#__PURE__*/function () {
|
|
|
4655
4655
|
this._publicToken = e, this._datalayer = t, this._listen = function (e) {
|
|
4656
4656
|
if (e.key !== cn(_this10._publicToken)) return;
|
|
4657
4657
|
var t = null === e.newValue || "null" === e.newValue ? null : JSON.parse(e.newValue);
|
|
4658
|
-
_this10.updateState(t);
|
|
4658
|
+
_this10.updateState(t, !0);
|
|
4659
4659
|
}, window.addEventListener("storage", this._listen);
|
|
4660
4660
|
var _this$_datalayer$read = this._datalayer.readSessionCookie(),
|
|
4661
4661
|
n = _this$_datalayer$read.session_token;
|
|
@@ -4709,13 +4709,14 @@ var yn = /*#__PURE__*/function () {
|
|
|
4709
4709
|
}, {
|
|
4710
4710
|
key: "updateState",
|
|
4711
4711
|
value: function updateState(e) {
|
|
4712
|
-
var t =
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
i =
|
|
4718
|
-
|
|
4712
|
+
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
4713
|
+
var n = this._datalayer.state,
|
|
4714
|
+
r = null === e ? null : Object.assign(Object.assign({}, this._datalayer.state), e);
|
|
4715
|
+
this._datalayer.state = r;
|
|
4716
|
+
var o = e ? Object.keys(e) : [],
|
|
4717
|
+
i = this._datalayer.markStateKeysUpdated(o),
|
|
4718
|
+
a = !An(n, r);
|
|
4719
|
+
(i || a) && (gn(this._datalayer.subscriptions, r), a && !t && this._datalayer.syncToLocalStorage());
|
|
4719
4720
|
}
|
|
4720
4721
|
}, {
|
|
4721
4722
|
key: "updateTokens",
|
|
@@ -302,13 +302,13 @@ var g,
|
|
|
302
302
|
}
|
|
303
303
|
return a(t, R), r(t);
|
|
304
304
|
}(),
|
|
305
|
-
|
|
305
|
+
G = function (e) {
|
|
306
306
|
function t() {
|
|
307
307
|
return i(this, t), s(this, t, ["MissingPKCEError", "Make sure this flow is completed on the same device on which it was started."]);
|
|
308
308
|
}
|
|
309
309
|
return a(t, R), r(t);
|
|
310
310
|
}(),
|
|
311
|
-
|
|
311
|
+
H = function (e) {
|
|
312
312
|
function t() {
|
|
313
313
|
return i(this, t), s(this, t, ["MissingAuthorizationCredentialIDTokenError", "The authorization credential is missing an ID token."]);
|
|
314
314
|
}
|
|
@@ -450,7 +450,7 @@ function le(e) {
|
|
|
450
450
|
case "google_onetap_missing_id_token":
|
|
451
451
|
case "oauth_apple_missing_id_token":
|
|
452
452
|
case "missing_authorization_credential_id_token":
|
|
453
|
-
return new
|
|
453
|
+
return new H();
|
|
454
454
|
case "google_onetap_missing_member":
|
|
455
455
|
case "oauth_apple_credential_invalid":
|
|
456
456
|
case "invalid_authorization_credential":
|
|
@@ -1183,7 +1183,7 @@ function qe(e, t) {
|
|
|
1183
1183
|
function We(e, t) {
|
|
1184
1184
|
return new Promise(function (r, n) {
|
|
1185
1185
|
var i = function (e) {
|
|
1186
|
-
var t =
|
|
1186
|
+
var t = Ge(e);
|
|
1187
1187
|
if (t[0]) return t[0];
|
|
1188
1188
|
}(e);
|
|
1189
1189
|
if (i && "true" === i.dataset.loaded) try {
|
|
@@ -1207,10 +1207,10 @@ function We(e, t) {
|
|
|
1207
1207
|
});
|
|
1208
1208
|
});
|
|
1209
1209
|
}
|
|
1210
|
-
var
|
|
1210
|
+
var Ge = function Ge(e) {
|
|
1211
1211
|
return document.querySelectorAll('script[src="'.concat(e, '"]'));
|
|
1212
1212
|
};
|
|
1213
|
-
var
|
|
1213
|
+
var He,
|
|
1214
1214
|
ze = ["[Stytch]"],
|
|
1215
1215
|
Ve = function Ve() {
|
|
1216
1216
|
for (var e, t = arguments.length, r = new Array(t), n = 0; n < t; n++) r[n] = arguments[n];
|
|
@@ -1414,8 +1414,8 @@ var Ge,
|
|
|
1414
1414
|
executeRecaptcha: s
|
|
1415
1415
|
});
|
|
1416
1416
|
case 2:
|
|
1417
|
-
return n.next = 4,
|
|
1418
|
-
return window;
|
|
1417
|
+
return n.next = 4, qe("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
|
|
1418
|
+
return window.GetTelemetryID;
|
|
1419
1419
|
});
|
|
1420
1420
|
case 4:
|
|
1421
1421
|
return n.abrupt("return", {
|
|
@@ -1594,7 +1594,7 @@ var Ge,
|
|
|
1594
1594
|
}();
|
|
1595
1595
|
!function (e) {
|
|
1596
1596
|
e.LoginOrCreateEML = "login_or_create_eml", e.LoginOrCreateOTP = "login_or_create_otp", e.ResetPassword = "reset_password";
|
|
1597
|
-
}(
|
|
1597
|
+
}(He || (He = {}));
|
|
1598
1598
|
var nt = ye(function e(t, r) {
|
|
1599
1599
|
var n = this;
|
|
1600
1600
|
be(this, e), this._networkClient = t, this._subscriptionService = r, this.get = function () {
|
|
@@ -3744,9 +3744,9 @@ var Wt = /*#__PURE__*/function (_ct) {
|
|
|
3744
3744
|
}
|
|
3745
3745
|
return _createClass(Wt);
|
|
3746
3746
|
}(ct);
|
|
3747
|
-
var
|
|
3748
|
-
function
|
|
3749
|
-
_classCallCheck(this,
|
|
3747
|
+
var Gt = /*#__PURE__*/function () {
|
|
3748
|
+
function Gt(e, t, r, n) {
|
|
3749
|
+
_classCallCheck(this, Gt);
|
|
3750
3750
|
this._publicToken = e, this._subscriptionDataLayer = t, this.baseURL = r, this.additionalTelemetryDataFn = n, this.updateSessionToken = function () {
|
|
3751
3751
|
return null;
|
|
3752
3752
|
}, this.eventLogger = new rt({
|
|
@@ -3755,7 +3755,7 @@ var Ht = /*#__PURE__*/function () {
|
|
|
3755
3755
|
logEventURL: this.buildSDKUrl("/events")
|
|
3756
3756
|
});
|
|
3757
3757
|
}
|
|
3758
|
-
_createClass(
|
|
3758
|
+
_createClass(Gt, [{
|
|
3759
3759
|
key: "logEvent",
|
|
3760
3760
|
value: function logEvent(_ref) {
|
|
3761
3761
|
var e = _ref.name,
|
|
@@ -3786,7 +3786,7 @@ var Ht = /*#__PURE__*/function () {
|
|
|
3786
3786
|
},
|
|
3787
3787
|
sdk: {
|
|
3788
3788
|
identifier: "Stytch.js Javascript SDK",
|
|
3789
|
-
version: "4.7.
|
|
3789
|
+
version: "4.7.6"
|
|
3790
3790
|
}
|
|
3791
3791
|
});
|
|
3792
3792
|
}
|
|
@@ -3898,14 +3898,14 @@ var Ht = /*#__PURE__*/function () {
|
|
|
3898
3898
|
return "".concat(this.baseURL, "/sdk/v1").concat(e);
|
|
3899
3899
|
}
|
|
3900
3900
|
}]);
|
|
3901
|
-
return
|
|
3901
|
+
return Gt;
|
|
3902
3902
|
}();
|
|
3903
|
-
var
|
|
3904
|
-
function
|
|
3905
|
-
_classCallCheck(this,
|
|
3903
|
+
var Ht = /*#__PURE__*/function () {
|
|
3904
|
+
function Ht(e, t, r) {
|
|
3905
|
+
_classCallCheck(this, Ht);
|
|
3906
3906
|
this._googleClient = e, this._publicToken = t, this._clientId = r;
|
|
3907
3907
|
}
|
|
3908
|
-
_createClass(
|
|
3908
|
+
_createClass(Ht, [{
|
|
3909
3909
|
key: "cancel",
|
|
3910
3910
|
value: function cancel() {
|
|
3911
3911
|
this._googleClient.cancel();
|
|
@@ -3958,7 +3958,7 @@ var Gt = /*#__PURE__*/function () {
|
|
|
3958
3958
|
});
|
|
3959
3959
|
}
|
|
3960
3960
|
}]);
|
|
3961
|
-
return
|
|
3961
|
+
return Ht;
|
|
3962
3962
|
}();
|
|
3963
3963
|
var zt = /*#__PURE__*/function () {
|
|
3964
3964
|
function zt(e, t) {
|
|
@@ -4030,7 +4030,7 @@ var zt = /*#__PURE__*/function () {
|
|
|
4030
4030
|
});
|
|
4031
4031
|
case 12:
|
|
4032
4032
|
_context8.t1 = !0;
|
|
4033
|
-
_context8.t2 =
|
|
4033
|
+
_context8.t2 = Ht;
|
|
4034
4034
|
_context8.next = 16;
|
|
4035
4035
|
return qe(Ae, function () {
|
|
4036
4036
|
return window.google.accounts.id;
|
|
@@ -4481,7 +4481,7 @@ var cr = /*#__PURE__*/function () {
|
|
|
4481
4481
|
this._publicToken = e, this._datalayer = t, this._listen = function (e) {
|
|
4482
4482
|
if (e.key !== Zt(_this10._publicToken)) return;
|
|
4483
4483
|
var t = null === e.newValue || "null" === e.newValue ? null : JSON.parse(e.newValue);
|
|
4484
|
-
_this10.updateState(t);
|
|
4484
|
+
_this10.updateState(t, !0);
|
|
4485
4485
|
}, window.addEventListener("storage", this._listen);
|
|
4486
4486
|
var _this$_datalayer$read = this._datalayer.readSessionCookie(),
|
|
4487
4487
|
r = _this$_datalayer$read.session_token;
|
|
@@ -4535,13 +4535,14 @@ var cr = /*#__PURE__*/function () {
|
|
|
4535
4535
|
}, {
|
|
4536
4536
|
key: "updateState",
|
|
4537
4537
|
value: function updateState(e) {
|
|
4538
|
-
var t =
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
s =
|
|
4544
|
-
|
|
4538
|
+
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
4539
|
+
var r = this._datalayer.state,
|
|
4540
|
+
n = null === e ? null : Object.assign(Object.assign({}, this._datalayer.state), e);
|
|
4541
|
+
this._datalayer.state = n;
|
|
4542
|
+
var i = e ? Object.keys(e) : [],
|
|
4543
|
+
s = this._datalayer.markStateKeysUpdated(i),
|
|
4544
|
+
o = !ar(r, n);
|
|
4545
|
+
(s || o) && (or(this._datalayer.subscriptions, n), o && !t && this._datalayer.syncToLocalStorage());
|
|
4545
4546
|
}
|
|
4546
4547
|
}, {
|
|
4547
4548
|
key: "updateTokens",
|
|
@@ -4626,7 +4627,7 @@ var dr = /*#__PURE__*/_createClass(function dr(e, t) {
|
|
|
4626
4627
|
var s, o, a, c, u, l, d, h, p, f, _;
|
|
4627
4628
|
this._dataLayer = sr(e, n), this._subscriptionService = new ur(e, this._dataLayer);
|
|
4628
4629
|
var m = new Yt(this._dataLayer, "passwords");
|
|
4629
|
-
this._networkClient = new
|
|
4630
|
+
this._networkClient = new Gt(e, this._dataLayer, i.endpoints.sdkBackendURL, function () {
|
|
4630
4631
|
var e, t, r, n;
|
|
4631
4632
|
return {
|
|
4632
4633
|
stytch_user_id: null === (t = null === (e = _this12._dataLayer.state) || void 0 === e ? void 0 : e.user) || void 0 === t ? void 0 : t.user_id,
|
|
@@ -4662,4 +4663,4 @@ var dr = /*#__PURE__*/_createClass(function dr(e, t) {
|
|
|
4662
4663
|
networkClient: this._networkClient
|
|
4663
4664
|
}, Object.assign(S, _defineProperty({}, lr, C));
|
|
4664
4665
|
});
|
|
4665
|
-
export { b as AuthFlowType, k as B2BMFAProducts, w as B2BOAuthProviders, g as B2BProducts, Q as BiometricsFailedError, L as BiometricsUnavailableError, Y as ChallengeSigningFailedError, q as DeviceCredentialsNotAllowedError, $ as FailedCodeChallengeError, Z as FailedToDecryptDataError, F as InternalError, z as InvalidAuthorizationCredentialError, ne as InvalidCredentialTypeError, te as InvalidRedirectSchemeError, ee as InvalidStartUrlError, se as JSONDataNotConvertibleToStringError, B as KeyInvalidatedError, M as KeystoreUnavailableError, ie as MissingAttestationObjectError,
|
|
4666
|
+
export { b as AuthFlowType, k as B2BMFAProducts, w as B2BOAuthProviders, g as B2BProducts, Q as BiometricsFailedError, L as BiometricsUnavailableError, Y as ChallengeSigningFailedError, q as DeviceCredentialsNotAllowedError, $ as FailedCodeChallengeError, Z as FailedToDecryptDataError, F as InternalError, z as InvalidAuthorizationCredentialError, ne as InvalidCredentialTypeError, te as InvalidRedirectSchemeError, ee as InvalidStartUrlError, se as JSONDataNotConvertibleToStringError, B as KeyInvalidatedError, M as KeystoreUnavailableError, ie as MissingAttestationObjectError, H as MissingAuthorizationCredentialIDTokenError, W as MissingGoogleClientIDError, G as MissingPKCEError, V as MissingPublicKeyError, re as MissingUrlError, N as NoBiometricsEnrolledError, j as NoBiometricsRegistrationError, I as NoCurrentSessionError, p as OAuthProviders, m as OTPMethods, _ as OneTapPositions, ae as PasskeysInvalidEncoding, ce as PasskeysMisconfigured, X as PasskeysUnsupportedError, h as Products, y as RNUIProducts, oe as RandomNumberGenerationFailed, S as SDKAPIUnreachableError, J as SDKNotConfiguredError, ue as SignInWithAppleMisconfigured, D as StytchAPIError, E as StytchAPISchemaError, x as StytchAPIUnreachableError, A as StytchError, v as StytchEventType, dr as StytchHeadlessClient, O as StytchSDKAPIError, R as StytchSDKError, T as StytchSDKSchemaError, C as StytchSDKUsageError, P as UNRECOVERABLE_ERROR_TYPES, U as UserCancellationError, K as UserLockedOutError, f as Wallets, le as errorToStytchError };
|
package/dist/index.headless.js
CHANGED
|
@@ -1325,8 +1325,8 @@ var Ge,
|
|
|
1325
1325
|
executeRecaptcha: s
|
|
1326
1326
|
});
|
|
1327
1327
|
case 2:
|
|
1328
|
-
return n.next = 4,
|
|
1329
|
-
return window;
|
|
1328
|
+
return n.next = 4, Ke("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
|
|
1329
|
+
return window.GetTelemetryID;
|
|
1330
1330
|
});
|
|
1331
1331
|
case 4:
|
|
1332
1332
|
return n.abrupt("return", {
|
|
@@ -3697,7 +3697,7 @@ var Wt = /*#__PURE__*/function () {
|
|
|
3697
3697
|
},
|
|
3698
3698
|
sdk: {
|
|
3699
3699
|
identifier: "Stytch.js Javascript SDK",
|
|
3700
|
-
version: "4.7.
|
|
3700
|
+
version: "4.7.6"
|
|
3701
3701
|
}
|
|
3702
3702
|
});
|
|
3703
3703
|
}
|
|
@@ -4392,7 +4392,7 @@ var ar = /*#__PURE__*/function () {
|
|
|
4392
4392
|
this._publicToken = e, this._datalayer = t, this._listen = function (e) {
|
|
4393
4393
|
if (e.key !== Xt(_this10._publicToken)) return;
|
|
4394
4394
|
var t = null === e.newValue || "null" === e.newValue ? null : JSON.parse(e.newValue);
|
|
4395
|
-
_this10.updateState(t);
|
|
4395
|
+
_this10.updateState(t, !0);
|
|
4396
4396
|
}, window.addEventListener("storage", this._listen);
|
|
4397
4397
|
var _this$_datalayer$read = this._datalayer.readSessionCookie(),
|
|
4398
4398
|
r = _this$_datalayer$read.session_token;
|
|
@@ -4446,13 +4446,14 @@ var ar = /*#__PURE__*/function () {
|
|
|
4446
4446
|
}, {
|
|
4447
4447
|
key: "updateState",
|
|
4448
4448
|
value: function updateState(e) {
|
|
4449
|
-
var t =
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
s =
|
|
4455
|
-
|
|
4449
|
+
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
4450
|
+
var r = this._datalayer.state,
|
|
4451
|
+
n = null === e ? null : Object.assign(Object.assign({}, this._datalayer.state), e);
|
|
4452
|
+
this._datalayer.state = n;
|
|
4453
|
+
var i = e ? Object.keys(e) : [],
|
|
4454
|
+
s = this._datalayer.markStateKeysUpdated(i),
|
|
4455
|
+
o = !or(r, n);
|
|
4456
|
+
(s || o) && (sr(this._datalayer.subscriptions, n), o && !t && this._datalayer.syncToLocalStorage());
|
|
4456
4457
|
}
|
|
4457
4458
|
}, {
|
|
4458
4459
|
key: "updateTokens",
|
package/dist/index.js
CHANGED
|
@@ -1457,8 +1457,8 @@ var Ze,
|
|
|
1457
1457
|
executeRecaptcha: i
|
|
1458
1458
|
});
|
|
1459
1459
|
case 2:
|
|
1460
|
-
return r.next = 4,
|
|
1461
|
-
return window;
|
|
1460
|
+
return r.next = 4, Qe("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
|
|
1461
|
+
return window.GetTelemetryID;
|
|
1462
1462
|
});
|
|
1463
1463
|
case 4:
|
|
1464
1464
|
return r.abrupt("return", {
|
|
@@ -3838,7 +3838,7 @@ var Kt = /*#__PURE__*/function () {
|
|
|
3838
3838
|
},
|
|
3839
3839
|
sdk: {
|
|
3840
3840
|
identifier: "Stytch.js Javascript SDK",
|
|
3841
|
-
version: "4.7.
|
|
3841
|
+
version: "4.7.6"
|
|
3842
3842
|
}
|
|
3843
3843
|
});
|
|
3844
3844
|
}
|
|
@@ -4566,7 +4566,7 @@ var An = /*#__PURE__*/function () {
|
|
|
4566
4566
|
this._publicToken = e, this._datalayer = t, this._listen = function (e) {
|
|
4567
4567
|
if (e.key !== sn(_this10._publicToken)) return;
|
|
4568
4568
|
var t = null === e.newValue || "null" === e.newValue ? null : JSON.parse(e.newValue);
|
|
4569
|
-
_this10.updateState(t);
|
|
4569
|
+
_this10.updateState(t, !0);
|
|
4570
4570
|
}, window.addEventListener("storage", this._listen);
|
|
4571
4571
|
var _this$_datalayer$read = this._datalayer.readSessionCookie(),
|
|
4572
4572
|
n = _this$_datalayer$read.session_token;
|
|
@@ -4620,13 +4620,14 @@ var An = /*#__PURE__*/function () {
|
|
|
4620
4620
|
}, {
|
|
4621
4621
|
key: "updateState",
|
|
4622
4622
|
value: function updateState(e) {
|
|
4623
|
-
var t =
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
i =
|
|
4629
|
-
|
|
4623
|
+
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
4624
|
+
var n = this._datalayer.state,
|
|
4625
|
+
r = null === e ? null : Object.assign(Object.assign({}, this._datalayer.state), e);
|
|
4626
|
+
this._datalayer.state = r;
|
|
4627
|
+
var o = e ? Object.keys(e) : [],
|
|
4628
|
+
i = this._datalayer.markStateKeysUpdated(o),
|
|
4629
|
+
a = !gn(n, r);
|
|
4630
|
+
(i || a) && (mn(this._datalayer.subscriptions, r), a && !t && this._datalayer.syncToLocalStorage());
|
|
4630
4631
|
}
|
|
4631
4632
|
}, {
|
|
4632
4633
|
key: "updateTokens",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stytch/vanilla-js",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.6",
|
|
4
4
|
"description": "Stytch's official Javascript Client Library",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"hoistingLimits": "workspaces"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@stytch/core": "2.10.
|
|
40
|
+
"@stytch/core": "2.10.2",
|
|
41
41
|
"@types/google-one-tap": "^1.2.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|