@stytch/vanilla-js 3.0.1 → 3.0.3

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.
@@ -3,7 +3,7 @@
3
3
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
4
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
5
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
7
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
8
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
9
9
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -18,22 +18,22 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
18
18
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
19
19
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
20
20
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
21
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
21
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
22
22
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
23
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
24
24
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
25
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
26
26
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
27
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
27
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
28
28
  function e(e, t) {
29
29
  var _n = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
30
30
  if (!_n) {
31
31
  if (Array.isArray(e) || (_n = r(e)) || t && e && "number" == typeof e.length) {
32
32
  _n && (e = _n);
33
33
  var i = 0,
34
- o = function o() {};
34
+ s = function s() {};
35
35
  return {
36
- s: o,
36
+ s: s,
37
37
  n: function n() {
38
38
  return i >= e.length ? {
39
39
  done: !0
@@ -45,12 +45,12 @@ function e(e, t) {
45
45
  e: function e(_e2) {
46
46
  throw _e2;
47
47
  },
48
- f: o
48
+ f: s
49
49
  };
50
50
  }
51
51
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
52
52
  }
53
- var s,
53
+ var o,
54
54
  a = !0,
55
55
  c = !1;
56
56
  return {
@@ -62,13 +62,13 @@ function e(e, t) {
62
62
  return a = e.done, e;
63
63
  },
64
64
  e: function e(_e3) {
65
- c = !0, s = _e3;
65
+ c = !0, o = _e3;
66
66
  },
67
67
  f: function f() {
68
68
  try {
69
69
  a || null == _n["return"] || _n["return"]();
70
70
  } finally {
71
- if (c) throw s;
71
+ if (c) throw o;
72
72
  }
73
73
  }
74
74
  };
@@ -81,21 +81,21 @@ function t(e, t) {
81
81
  if (null != r) {
82
82
  var n,
83
83
  i,
84
- o,
85
84
  s,
85
+ o,
86
86
  a = [],
87
87
  c = !0,
88
88
  u = !1;
89
89
  try {
90
- if (o = (r = r.call(e)).next, 0 === t) {
90
+ if (s = (r = r.call(e)).next, 0 === t) {
91
91
  if (Object(r) !== r) return;
92
92
  c = !1;
93
- } else for (; !(c = (n = o.call(r)).done) && (a.push(n.value), a.length !== t); c = !0);
93
+ } else for (; !(c = (n = s.call(r)).done) && (a.push(n.value), a.length !== t); c = !0);
94
94
  } catch (e) {
95
95
  u = !0, i = e;
96
96
  } finally {
97
97
  try {
98
- if (!c && null != r["return"] && (s = r["return"](), Object(s) !== s)) return;
98
+ if (!c && null != r["return"] && (o = r["return"](), Object(o) !== o)) return;
99
99
  } finally {
100
100
  if (u) throw i;
101
101
  }
@@ -125,22 +125,23 @@ function i(e) {
125
125
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof(e);
126
126
  }, i(e);
127
127
  }
128
- function o() {
128
+ function s() {
129
129
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
130
- o = function o() {
131
- return e;
130
+ s = function s() {
131
+ return t;
132
132
  };
133
- var e = {},
134
- t = Object.prototype,
135
- r = t.hasOwnProperty,
136
- n = Object.defineProperty || function (e, t, r) {
133
+ var e,
134
+ t = {},
135
+ r = Object.prototype,
136
+ n = r.hasOwnProperty,
137
+ o = Object.defineProperty || function (e, t, r) {
137
138
  e[t] = r.value;
138
139
  },
139
- s = "function" == typeof Symbol ? Symbol : {},
140
- a = s.iterator || "@@iterator",
141
- c = s.asyncIterator || "@@asyncIterator",
142
- u = s.toStringTag || "@@toStringTag";
143
- function l(e, t, r) {
140
+ a = "function" == typeof Symbol ? Symbol : {},
141
+ c = a.iterator || "@@iterator",
142
+ u = a.asyncIterator || "@@asyncIterator",
143
+ l = a.toStringTag || "@@toStringTag";
144
+ function d(e, t, r) {
144
145
  return Object.defineProperty(e, t, {
145
146
  value: r,
146
147
  enumerable: !0,
@@ -149,21 +150,21 @@ function o() {
149
150
  }), e[t];
150
151
  }
151
152
  try {
152
- l({}, "");
153
+ d({}, "");
153
154
  } catch (e) {
154
- l = function l(e, t, r) {
155
+ d = function d(e, t, r) {
155
156
  return e[t] = r;
156
157
  };
157
158
  }
158
- function d(e, t, r, i) {
159
- var o = t && t.prototype instanceof f ? t : f,
160
- s = Object.create(o.prototype),
161
- a = new A(i || []);
162
- return n(s, "_invoke", {
163
- value: S(e, r, a)
159
+ function h(e, t, r, n) {
160
+ var i = t && t.prototype instanceof g ? t : g,
161
+ s = Object.create(i.prototype),
162
+ a = new D(n || []);
163
+ return o(s, "_invoke", {
164
+ value: E(e, r, a)
164
165
  }), s;
165
166
  }
166
- function h(e, t, r) {
167
+ function p(e, t, r) {
167
168
  try {
168
169
  return {
169
170
  type: "normal",
@@ -176,166 +177,165 @@ function o() {
176
177
  };
177
178
  }
178
179
  }
179
- e.wrap = d;
180
- var p = {};
181
- function f() {}
182
- function _() {}
183
- function m() {}
184
- var v = {};
185
- l(v, a, function () {
180
+ t.wrap = h;
181
+ var f = "suspendedStart",
182
+ _ = "suspendedYield",
183
+ m = "executing",
184
+ v = "completed",
185
+ y = {};
186
+ function g() {}
187
+ function b() {}
188
+ function k() {}
189
+ var w = {};
190
+ d(w, c, function () {
186
191
  return this;
187
192
  });
188
- var y = Object.getPrototypeOf,
189
- g = y && y(y(E([])));
190
- g && g !== t && r.call(g, a) && (v = g);
191
- var b = m.prototype = f.prototype = Object.create(v);
192
- function k(e) {
193
+ var S = Object.getPrototypeOf,
194
+ T = S && S(S(B([])));
195
+ T && T !== r && n.call(T, c) && (w = T);
196
+ var O = k.prototype = g.prototype = Object.create(w);
197
+ function C(e) {
193
198
  ["next", "throw", "return"].forEach(function (t) {
194
- l(e, t, function (e) {
199
+ d(e, t, function (e) {
195
200
  return this._invoke(t, e);
196
201
  });
197
202
  });
198
203
  }
199
- function w(e, t) {
200
- function o(n, s, a, c) {
201
- var u = h(e[n], e, s);
204
+ function A(e, t) {
205
+ function r(s, o, a, c) {
206
+ var u = p(e[s], e, o);
202
207
  if ("throw" !== u.type) {
203
208
  var l = u.arg,
204
209
  d = l.value;
205
- return d && "object" == i(d) && r.call(d, "__await") ? t.resolve(d.__await).then(function (e) {
206
- o("next", e, a, c);
210
+ return d && "object" == i(d) && n.call(d, "__await") ? t.resolve(d.__await).then(function (e) {
211
+ r("next", e, a, c);
207
212
  }, function (e) {
208
- o("throw", e, a, c);
213
+ r("throw", e, a, c);
209
214
  }) : t.resolve(d).then(function (e) {
210
215
  l.value = e, a(l);
211
216
  }, function (e) {
212
- return o("throw", e, a, c);
217
+ return r("throw", e, a, c);
213
218
  });
214
219
  }
215
220
  c(u.arg);
216
221
  }
217
222
  var s;
218
- n(this, "_invoke", {
219
- value: function value(e, r) {
220
- function n() {
221
- return new t(function (t, n) {
222
- o(e, r, t, n);
223
+ o(this, "_invoke", {
224
+ value: function value(e, n) {
225
+ function i() {
226
+ return new t(function (t, i) {
227
+ r(e, n, t, i);
223
228
  });
224
229
  }
225
- return s = s ? s.then(n, n) : n();
230
+ return s = s ? s.then(i, i) : i();
226
231
  }
227
232
  });
228
233
  }
229
- function S(e, t, r) {
230
- var n = "suspendedStart";
231
- return function (i, o) {
232
- if ("executing" === n) throw new Error("Generator is already running");
233
- if ("completed" === n) {
234
- if ("throw" === i) throw o;
235
- return P();
234
+ function E(t, r, n) {
235
+ var i = f;
236
+ return function (s, o) {
237
+ if (i === m) throw new Error("Generator is already running");
238
+ if (i === v) {
239
+ if ("throw" === s) throw o;
240
+ return {
241
+ value: e,
242
+ done: !0
243
+ };
236
244
  }
237
- for (r.method = i, r.arg = o;;) {
238
- var s = r.delegate;
239
- if (s) {
240
- var a = T(s, r);
241
- if (a) {
242
- if (a === p) continue;
243
- return a;
245
+ for (n.method = s, n.arg = o;;) {
246
+ var a = n.delegate;
247
+ if (a) {
248
+ var c = P(a, n);
249
+ if (c) {
250
+ if (c === y) continue;
251
+ return c;
244
252
  }
245
253
  }
246
- if ("next" === r.method) r.sent = r._sent = r.arg;else if ("throw" === r.method) {
247
- if ("suspendedStart" === n) throw n = "completed", r.arg;
248
- r.dispatchException(r.arg);
249
- } else "return" === r.method && r.abrupt("return", r.arg);
250
- n = "executing";
251
- var c = h(e, t, r);
252
- if ("normal" === c.type) {
253
- if (n = r.done ? "completed" : "suspendedYield", c.arg === p) continue;
254
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
255
+ if (i === f) throw i = v, n.arg;
256
+ n.dispatchException(n.arg);
257
+ } else "return" === n.method && n.abrupt("return", n.arg);
258
+ i = m;
259
+ var u = p(t, r, n);
260
+ if ("normal" === u.type) {
261
+ if (i = n.done ? v : _, u.arg === y) continue;
254
262
  return {
255
- value: c.arg,
256
- done: r.done
263
+ value: u.arg,
264
+ done: n.done
257
265
  };
258
266
  }
259
- "throw" === c.type && (n = "completed", r.method = "throw", r.arg = c.arg);
267
+ "throw" === u.type && (i = v, n.method = "throw", n.arg = u.arg);
260
268
  }
261
269
  };
262
270
  }
263
- function T(e, t) {
264
- var r = t.method,
265
- n = e.iterator[r];
266
- if (void 0 === n) return t.delegate = null, "throw" === r && e.iterator["return"] && (t.method = "return", t.arg = void 0, T(e, t), "throw" === t.method) || "return" !== r && (t.method = "throw", t.arg = new TypeError("The iterator does not provide a '" + r + "' method")), p;
267
- var i = h(n, e.iterator, t.arg);
268
- if ("throw" === i.type) return t.method = "throw", t.arg = i.arg, t.delegate = null, p;
269
- var o = i.arg;
270
- return o ? o.done ? (t[e.resultName] = o.value, t.next = e.nextLoc, "return" !== t.method && (t.method = "next", t.arg = void 0), t.delegate = null, p) : o : (t.method = "throw", t.arg = new TypeError("iterator result is not an object"), t.delegate = null, p);
271
+ function P(t, r) {
272
+ var n = r.method,
273
+ i = t.iterator[n];
274
+ if (i === e) return r.delegate = null, "throw" === n && t.iterator["return"] && (r.method = "return", r.arg = e, P(t, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
275
+ var s = p(i, t.iterator, r.arg);
276
+ if ("throw" === s.type) return r.method = "throw", r.arg = s.arg, r.delegate = null, y;
277
+ var o = s.arg;
278
+ return o ? o.done ? (r[t.resultName] = o.value, r.next = t.nextLoc, "return" !== r.method && (r.method = "next", r.arg = e), r.delegate = null, y) : o : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
271
279
  }
272
- function C(e) {
280
+ function x(e) {
273
281
  var t = {
274
282
  tryLoc: e[0]
275
283
  };
276
284
  1 in e && (t.catchLoc = e[1]), 2 in e && (t.finallyLoc = e[2], t.afterLoc = e[3]), this.tryEntries.push(t);
277
285
  }
278
- function O(e) {
286
+ function R(e) {
279
287
  var t = e.completion || {};
280
288
  t.type = "normal", delete t.arg, e.completion = t;
281
289
  }
282
- function A(e) {
290
+ function D(e) {
283
291
  this.tryEntries = [{
284
292
  tryLoc: "root"
285
- }], e.forEach(C, this), this.reset(!0);
293
+ }], e.forEach(x, this), this.reset(!0);
286
294
  }
287
- function E(e) {
288
- if (e) {
289
- var t = e[a];
290
- if (t) return t.call(e);
291
- if ("function" == typeof e.next) return e;
292
- if (!isNaN(e.length)) {
293
- var n = -1,
294
- i = function t() {
295
- for (; ++n < e.length;) if (r.call(e, n)) return t.value = e[n], t.done = !1, t;
296
- return t.value = void 0, t.done = !0, t;
295
+ function B(t) {
296
+ if (t || "" === t) {
297
+ var r = t[c];
298
+ if (r) return r.call(t);
299
+ if ("function" == typeof t.next) return t;
300
+ if (!isNaN(t.length)) {
301
+ var s = -1,
302
+ o = function r() {
303
+ for (; ++s < t.length;) if (n.call(t, s)) return r.value = t[s], r.done = !1, r;
304
+ return r.value = e, r.done = !0, r;
297
305
  };
298
- return i.next = i;
306
+ return o.next = o;
299
307
  }
300
308
  }
301
- return {
302
- next: P
303
- };
309
+ throw new TypeError(i(t) + " is not iterable");
304
310
  }
305
- function P() {
306
- return {
307
- value: void 0,
308
- done: !0
309
- };
310
- }
311
- return _.prototype = m, n(b, "constructor", {
312
- value: m,
311
+ return b.prototype = k, o(O, "constructor", {
312
+ value: k,
313
313
  configurable: !0
314
- }), n(m, "constructor", {
315
- value: _,
314
+ }), o(k, "constructor", {
315
+ value: b,
316
316
  configurable: !0
317
- }), _.displayName = l(m, u, "GeneratorFunction"), e.isGeneratorFunction = function (e) {
317
+ }), b.displayName = d(k, l, "GeneratorFunction"), t.isGeneratorFunction = function (e) {
318
318
  var t = "function" == typeof e && e.constructor;
319
- return !!t && (t === _ || "GeneratorFunction" === (t.displayName || t.name));
320
- }, e.mark = function (e) {
321
- return Object.setPrototypeOf ? Object.setPrototypeOf(e, m) : (e.__proto__ = m, l(e, u, "GeneratorFunction")), e.prototype = Object.create(b), e;
322
- }, e.awrap = function (e) {
319
+ return !!t && (t === b || "GeneratorFunction" === (t.displayName || t.name));
320
+ }, t.mark = function (e) {
321
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, k) : (e.__proto__ = k, d(e, l, "GeneratorFunction")), e.prototype = Object.create(O), e;
322
+ }, t.awrap = function (e) {
323
323
  return {
324
324
  __await: e
325
325
  };
326
- }, k(w.prototype), l(w.prototype, c, function () {
326
+ }, C(A.prototype), d(A.prototype, u, function () {
327
327
  return this;
328
- }), e.AsyncIterator = w, e.async = function (t, r, n, i, o) {
329
- void 0 === o && (o = Promise);
330
- var s = new w(d(t, r, n, i), o);
331
- return e.isGeneratorFunction(r) ? s : s.next().then(function (e) {
332
- return e.done ? e.value : s.next();
328
+ }), t.AsyncIterator = A, t.async = function (e, r, n, i, s) {
329
+ void 0 === s && (s = Promise);
330
+ var o = new A(h(e, r, n, i), s);
331
+ return t.isGeneratorFunction(r) ? o : o.next().then(function (e) {
332
+ return e.done ? e.value : o.next();
333
333
  });
334
- }, k(b), l(b, u, "Generator"), l(b, a, function () {
334
+ }, C(O), d(O, l, "Generator"), d(O, c, function () {
335
335
  return this;
336
- }), l(b, "toString", function () {
336
+ }), d(O, "toString", function () {
337
337
  return "[object Generator]";
338
- }), e.keys = function (e) {
338
+ }), t.keys = function (e) {
339
339
  var t = Object(e),
340
340
  r = [];
341
341
  for (var n in t) r.push(n);
@@ -346,10 +346,10 @@ function o() {
346
346
  }
347
347
  return e.done = !0, e;
348
348
  };
349
- }, e.values = E, A.prototype = {
350
- constructor: A,
351
- reset: function reset(e) {
352
- if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = !1, this.delegate = null, this.method = "next", this.arg = void 0, this.tryEntries.forEach(O), !e) for (var t in this) "t" === t.charAt(0) && r.call(this, t) && !isNaN(+t.slice(1)) && (this[t] = void 0);
349
+ }, t.values = B, D.prototype = {
350
+ constructor: D,
351
+ reset: function reset(t) {
352
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = e, this.done = !1, this.delegate = null, this.method = "next", this.arg = e, this.tryEntries.forEach(R), !t) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = e);
353
353
  },
354
354
  stop: function stop() {
355
355
  this.done = !0;
@@ -357,51 +357,51 @@ function o() {
357
357
  if ("throw" === e.type) throw e.arg;
358
358
  return this.rval;
359
359
  },
360
- dispatchException: function dispatchException(e) {
361
- if (this.done) throw e;
362
- var t = this;
363
- function n(r, n) {
364
- return s.type = "throw", s.arg = e, t.next = r, n && (t.method = "next", t.arg = void 0), !!n;
360
+ dispatchException: function dispatchException(t) {
361
+ if (this.done) throw t;
362
+ var r = this;
363
+ function i(n, i) {
364
+ return a.type = "throw", a.arg = t, r.next = n, i && (r.method = "next", r.arg = e), !!i;
365
365
  }
366
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
367
- var o = this.tryEntries[i],
368
- s = o.completion;
369
- if ("root" === o.tryLoc) return n("end");
366
+ for (var s = this.tryEntries.length - 1; s >= 0; --s) {
367
+ var o = this.tryEntries[s],
368
+ a = o.completion;
369
+ if ("root" === o.tryLoc) return i("end");
370
370
  if (o.tryLoc <= this.prev) {
371
- var a = r.call(o, "catchLoc"),
372
- c = r.call(o, "finallyLoc");
373
- if (a && c) {
374
- if (this.prev < o.catchLoc) return n(o.catchLoc, !0);
375
- if (this.prev < o.finallyLoc) return n(o.finallyLoc);
376
- } else if (a) {
377
- if (this.prev < o.catchLoc) return n(o.catchLoc, !0);
371
+ var c = n.call(o, "catchLoc"),
372
+ u = n.call(o, "finallyLoc");
373
+ if (c && u) {
374
+ if (this.prev < o.catchLoc) return i(o.catchLoc, !0);
375
+ if (this.prev < o.finallyLoc) return i(o.finallyLoc);
376
+ } else if (c) {
377
+ if (this.prev < o.catchLoc) return i(o.catchLoc, !0);
378
378
  } else {
379
- if (!c) throw new Error("try statement without catch or finally");
380
- if (this.prev < o.finallyLoc) return n(o.finallyLoc);
379
+ if (!u) throw new Error("try statement without catch or finally");
380
+ if (this.prev < o.finallyLoc) return i(o.finallyLoc);
381
381
  }
382
382
  }
383
383
  }
384
384
  },
385
385
  abrupt: function abrupt(e, t) {
386
- for (var n = this.tryEntries.length - 1; n >= 0; --n) {
387
- var i = this.tryEntries[n];
388
- if (i.tryLoc <= this.prev && r.call(i, "finallyLoc") && this.prev < i.finallyLoc) {
389
- var o = i;
386
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
387
+ var i = this.tryEntries[r];
388
+ if (i.tryLoc <= this.prev && n.call(i, "finallyLoc") && this.prev < i.finallyLoc) {
389
+ var s = i;
390
390
  break;
391
391
  }
392
392
  }
393
- o && ("break" === e || "continue" === e) && o.tryLoc <= t && t <= o.finallyLoc && (o = null);
394
- var s = o ? o.completion : {};
395
- return s.type = e, s.arg = t, o ? (this.method = "next", this.next = o.finallyLoc, p) : this.complete(s);
393
+ s && ("break" === e || "continue" === e) && s.tryLoc <= t && t <= s.finallyLoc && (s = null);
394
+ var o = s ? s.completion : {};
395
+ return o.type = e, o.arg = t, s ? (this.method = "next", this.next = s.finallyLoc, y) : this.complete(o);
396
396
  },
397
397
  complete: function complete(e, t) {
398
398
  if ("throw" === e.type) throw e.arg;
399
- return "break" === e.type || "continue" === e.type ? this.next = e.arg : "return" === e.type ? (this.rval = this.arg = e.arg, this.method = "return", this.next = "end") : "normal" === e.type && t && (this.next = t), p;
399
+ return "break" === e.type || "continue" === e.type ? this.next = e.arg : "return" === e.type ? (this.rval = this.arg = e.arg, this.method = "return", this.next = "end") : "normal" === e.type && t && (this.next = t), y;
400
400
  },
401
401
  finish: function finish(e) {
402
402
  for (var t = this.tryEntries.length - 1; t >= 0; --t) {
403
403
  var r = this.tryEntries[t];
404
- if (r.finallyLoc === e) return this.complete(r.completion, r.afterLoc), O(r), p;
404
+ if (r.finallyLoc === e) return this.complete(r.completion, r.afterLoc), R(r), y;
405
405
  }
406
406
  },
407
407
  "catch": function _catch(e) {
@@ -411,26 +411,26 @@ function o() {
411
411
  var n = r.completion;
412
412
  if ("throw" === n.type) {
413
413
  var i = n.arg;
414
- O(r);
414
+ R(r);
415
415
  }
416
416
  return i;
417
417
  }
418
418
  }
419
419
  throw new Error("illegal catch attempt");
420
420
  },
421
- delegateYield: function delegateYield(e, t, r) {
421
+ delegateYield: function delegateYield(t, r, n) {
422
422
  return this.delegate = {
423
- iterator: E(e),
424
- resultName: t,
425
- nextLoc: r
426
- }, "next" === this.method && (this.arg = void 0), p;
423
+ iterator: B(t),
424
+ resultName: r,
425
+ nextLoc: n
426
+ }, "next" === this.method && (this.arg = e), y;
427
427
  }
428
- }, e;
428
+ }, t;
429
429
  }
430
- function s(e, t) {
430
+ function o(e, t) {
431
431
  for (var r = 0; r < t.length; r++) {
432
432
  var n = t[r];
433
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, (o = n.key, s = void 0, s = function (e, t) {
433
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, (s = n.key, o = void 0, o = function (e, t) {
434
434
  if ("object" !== i(e) || null === e) return e;
435
435
  var r = e[Symbol.toPrimitive];
436
436
  if (void 0 !== r) {
@@ -439,12 +439,12 @@ function s(e, t) {
439
439
  throw new TypeError("@@toPrimitive must return a primitive value.");
440
440
  }
441
441
  return ("string" === t ? String : Number)(e);
442
- }(o, "string"), "symbol" === i(s) ? s : String(s)), n);
442
+ }(s, "string"), "symbol" === i(o) ? o : String(o)), n);
443
443
  }
444
- var o, s;
444
+ var s, o;
445
445
  }
446
446
  function a(e, t, r) {
447
- return t && s(e.prototype, t), r && s(e, r), Object.defineProperty(e, "prototype", {
447
+ return t && o(e.prototype, t), r && o(e, r), Object.defineProperty(e, "prototype", {
448
448
  writable: !1
449
449
  }), e;
450
450
  }
@@ -469,8 +469,8 @@ function l(e) {
469
469
  var r,
470
470
  n = m(e);
471
471
  if (t) {
472
- var o = m(this).constructor;
473
- r = Reflect.construct(n, arguments, o);
472
+ var s = m(this).constructor;
473
+ r = Reflect.construct(n, arguments, s);
474
474
  } else r = n.apply(this, arguments);
475
475
  return function (e, t) {
476
476
  if (t && ("object" === i(t) || "function" == typeof t)) return t;
@@ -545,7 +545,7 @@ var v,
545
545
  w,
546
546
  S = "https://accounts.google.com/gsi",
547
547
  T = "".concat(S, "/client");
548
- function C(e, t) {
548
+ function O(e, t) {
549
549
  var r = {};
550
550
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
551
551
  if (null != e && "function" == typeof Object.getOwnPropertySymbols) {
@@ -554,32 +554,32 @@ function C(e, t) {
554
554
  }
555
555
  return r;
556
556
  }
557
- function O(e, t, r, n) {
558
- return new (r || (r = Promise))(function (i, o) {
559
- function s(e) {
557
+ function C(e, t, r, n) {
558
+ return new (r || (r = Promise))(function (i, s) {
559
+ function o(e) {
560
560
  try {
561
561
  c(n.next(e));
562
562
  } catch (e) {
563
- o(e);
563
+ s(e);
564
564
  }
565
565
  }
566
566
  function a(e) {
567
567
  try {
568
568
  c(n["throw"](e));
569
569
  } catch (e) {
570
- o(e);
570
+ s(e);
571
571
  }
572
572
  }
573
573
  function c(e) {
574
574
  var t;
575
575
  e.done ? i(e.value) : (t = e.value, t instanceof r ? t : new r(function (e) {
576
576
  e(t);
577
- })).then(s, a);
577
+ })).then(o, a);
578
578
  }
579
579
  c((n = n.apply(e, t || [])).next());
580
580
  });
581
581
  }
582
- !function (e) {
582
+ "function" == typeof SuppressedError && SuppressedError, function (e) {
583
583
  e.emailMagicLinks = "emailMagicLinks", e.oauth = "oauth", e.otp = "otp", e.crypto = "crypto", e.passwords = "passwords";
584
584
  }(v || (v = {})), function (e) {
585
585
  e.Google = "google", e.Microsoft = "microsoft", e.Apple = "apple", e.Github = "github", e.GitLab = "gitlab", e.Facebook = "facebook", e.Discord = "discord", e.Salesforce = "salesforce", e.Slack = "slack", e.Amazon = "amazon", e.Bitbucket = "bitbucket", e.LinkedIn = "linkedin", e.Coinbase = "coinbase", e.Twitch = "twitch", e.Twitter = "twitter", e.TikTok = "tiktok", e.Snapchat = "snapchat", e.Figma = "figma", e.Yahoo = "yahoo";
@@ -621,10 +621,10 @@ var A,
621
621
  function r(e) {
622
622
  var n, i;
623
623
  c(this, r), (n = t.call(this)).name = "StytchSDKSchemaError";
624
- var o = null === (i = e.body) || void 0 === i ? void 0 : i.map(function (e) {
624
+ var s = null === (i = e.body) || void 0 === i ? void 0 : i.map(function (e) {
625
625
  return "".concat(e.dataPath, ": ").concat(e.message);
626
626
  }).join("\n");
627
- return n.message = "[400] Request does not match expected schema\n".concat(o), n;
627
+ return n.message = "[400] Request does not match expected schema\n".concat(s), n;
628
628
  }
629
629
  return a(r);
630
630
  }(),
@@ -635,11 +635,11 @@ var A,
635
635
  var n;
636
636
  c(this, r), (n = t.call(this)).name = "StytchSDKAPIError";
637
637
  var i = e.status_code,
638
- o = e.error_type,
639
- s = e.error_message,
638
+ s = e.error_type,
639
+ o = e.error_message,
640
640
  a = e.error_url,
641
641
  u = e.request_id;
642
- return n.error_type = o, n.error_message = s, n.error_url = a, n.request_id = u, n.status_code = i, n.message = "[".concat(i, "] ").concat(o, "\n") + "".concat(s, "\n") + "See ".concat(a, " for more information.\n") + (u ? "request_id: ".concat(u, "\n") : ""), n;
642
+ return n.error_type = s, n.error_message = o, n.error_url = a, n.request_id = u, n.status_code = i, n.message = "[".concat(i, "] ").concat(s, "\n") + "".concat(o, "\n") + "See ".concat(a, " for more information.\n") + (u ? "request_id: ".concat(u, "\n") : ""), n;
643
643
  }
644
644
  return a(r);
645
645
  }(),
@@ -670,18 +670,18 @@ function N(e) {
670
670
  r = e.errorMessage,
671
671
  n = e.finalURL,
672
672
  i = e.basicAuthHeader,
673
- s = e.xSDKClientHeader,
673
+ o = e.xSDKClientHeader,
674
674
  a = e.xSDKParentHostHeader,
675
675
  c = e.body;
676
- return O(this, void 0, void 0, o().mark(function e() {
676
+ return C(this, void 0, void 0, s().mark(function e() {
677
677
  var u, l, d, h, p, f;
678
- return o().wrap(function (e) {
678
+ return s().wrap(function (e) {
679
679
  for (;;) switch (e.prev = e.next) {
680
680
  case 0:
681
681
  return u = {
682
682
  Authorization: i,
683
683
  "Content-Type": "application/json",
684
- "X-SDK-Client": s
684
+ "X-SDK-Client": o
685
685
  }, a && (u["X-SDK-Parent-Host"] = a), l = {
686
686
  method: t,
687
687
  headers: u,
@@ -775,8 +775,8 @@ function z(e, t, r) {
775
775
  }
776
776
  var Y = {};
777
777
  function V(e, t) {
778
- return O(this, void 0, void 0, o().mark(function r() {
779
- return o().wrap(function (r) {
778
+ return C(this, void 0, void 0, s().mark(function r() {
779
+ return s().wrap(function (r) {
780
780
  for (;;) switch (r.prev = r.next) {
781
781
  case 0:
782
782
  if (void 0 === Y[e]) {
@@ -804,18 +804,18 @@ function J(e, t) {
804
804
  } catch (t) {
805
805
  return n(new Error("".concat(e, " already loaded, but module was not found in global scope: ").concat(t)));
806
806
  }
807
- var o = function (e) {
807
+ var s = function (e) {
808
808
  var t = document.createElement("script");
809
809
  return t.setAttribute("src", e), t.setAttribute("async", "true"), t.setAttribute("defer", "true"), document.head.appendChild(t), t;
810
810
  }(e);
811
- o.addEventListener("load", function () {
812
- o.dataset.loaded = "true";
811
+ s.addEventListener("load", function () {
812
+ s.dataset.loaded = "true";
813
813
  try {
814
814
  r(t());
815
815
  } catch (t) {
816
816
  n(new Error("".concat(e, " was loaded, but module was not found in global scope: ").concat(t)));
817
817
  }
818
- }), o.addEventListener("error", function (t) {
818
+ }), s.addEventListener("error", function (t) {
819
819
  n(new Error("".concat(e, " could not be loaded: ").concat(t)));
820
820
  });
821
821
  });
@@ -837,8 +837,8 @@ var X,
837
837
  re = function re(t) {
838
838
  var r = {
839
839
  isObject: function isObject(e, n) {
840
- var o = "object" === i(n) && !Array.isArray(n) && null !== n;
841
- if (!o) throw new B(t, e + " must be an object.");
840
+ var s = "object" === i(n) && !Array.isArray(n) && null !== n;
841
+ if (!s) throw new B(t, e + " must be an object.");
842
842
  return r;
843
843
  },
844
844
  isOptionalObject: function isOptionalObject(e, t) {
@@ -853,16 +853,16 @@ var X,
853
853
  },
854
854
  isStringArray: function isStringArray(n, i) {
855
855
  if (!Array.isArray(i)) throw new B(t, n + " must be an array of strings.");
856
- var o,
857
- s = e(i);
856
+ var s,
857
+ o = e(i);
858
858
  try {
859
- for (s.s(); !(o = s.n()).done;) {
860
- if ("string" != typeof o.value) throw new B(t, n + " must be an array of strings.");
859
+ for (o.s(); !(s = o.n()).done;) {
860
+ if ("string" != typeof s.value) throw new B(t, n + " must be an array of strings.");
861
861
  }
862
862
  } catch (e) {
863
- s.e(e);
863
+ o.e(e);
864
864
  } finally {
865
- s.f();
865
+ o.f();
866
866
  }
867
867
  return r;
868
868
  },
@@ -887,19 +887,19 @@ var X,
887
887
  return r;
888
888
  },
889
889
  ne = function ne(e) {
890
- return C(e, ["request_id", "status_code"]);
890
+ return O(e, ["request_id", "status_code"]);
891
891
  },
892
892
  ie = function ie(e) {
893
- return C(e, ["__user"]);
893
+ return O(e, ["__user"]);
894
894
  },
895
- oe = a(function e(t, r, n) {
895
+ se = a(function e(t, r, n) {
896
896
  var i = this,
897
- s = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : function () {
897
+ o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : function () {
898
898
  return Promise.resolve(void 0);
899
899
  };
900
900
  c(this, e), this.bootstrapPromise = n, this.isEnabled = function () {
901
- return O(i, void 0, void 0, o().mark(function e() {
902
- return o().wrap(function (e) {
901
+ return C(i, void 0, void 0, s().mark(function e() {
902
+ return s().wrap(function (e) {
903
903
  for (;;) switch (e.prev = e.next) {
904
904
  case 0:
905
905
  return e.abrupt("return", this.state.then(function (e) {
@@ -912,9 +912,9 @@ var X,
912
912
  }, e, this);
913
913
  }));
914
914
  }, this.getTelemetryID = function () {
915
- return O(i, void 0, void 0, o().mark(function e() {
915
+ return C(i, void 0, void 0, s().mark(function e() {
916
916
  var t, r, n, i;
917
- return o().wrap(function (e) {
917
+ return s().wrap(function (e) {
918
918
  for (;;) switch (e.prev = e.next) {
919
919
  case 0:
920
920
  return e.next = 2, this.state;
@@ -935,14 +935,14 @@ var X,
935
935
  }, e, this);
936
936
  }));
937
937
  }, this.getDFPTelemetryIDAndCaptcha = function () {
938
- return O(i, void 0, void 0, o().mark(function e() {
939
- var t, r, n, i, s, a;
940
- return o().wrap(function (e) {
938
+ return C(i, void 0, void 0, s().mark(function e() {
939
+ var t, r, n, i, o, a;
940
+ return s().wrap(function (e) {
941
941
  for (;;) switch (e.prev = e.next) {
942
942
  case 0:
943
943
  return e.next = 2, this.state;
944
944
  case 2:
945
- if (t = e.sent, r = t.enabled, n = t.executeRecaptcha, i = t.mode, s = void 0, a = void 0, r) {
945
+ if (t = e.sent, r = t.enabled, n = t.executeRecaptcha, i = t.mode, o = void 0, a = void 0, r) {
946
946
  e.next = 12;
947
947
  break;
948
948
  }
@@ -956,7 +956,7 @@ var X,
956
956
  }
957
957
  return e.next = 15, this.getTelemetryID();
958
958
  case 15:
959
- s = e.sent, e.next = 25;
959
+ o = e.sent, e.next = 25;
960
960
  break;
961
961
  case 18:
962
962
  if ("OBSERVATION" !== i) {
@@ -965,12 +965,12 @@ var X,
965
965
  }
966
966
  return e.next = 21, this.getTelemetryID();
967
967
  case 21:
968
- return s = e.sent, e.next = 24, n();
968
+ return o = e.sent, e.next = 24, n();
969
969
  case 24:
970
970
  a = e.sent;
971
971
  case 25:
972
972
  return e.abrupt("return", {
973
- dfp_telemetry_id: s,
973
+ dfp_telemetry_id: o,
974
974
  captcha_token: a
975
975
  });
976
976
  case 26:
@@ -980,14 +980,14 @@ var X,
980
980
  }, e, this);
981
981
  }));
982
982
  }, this.retryWithCaptchaAndDFP = function (e, t) {
983
- return O(i, void 0, void 0, o().mark(function r() {
984
- var n, i, s;
985
- return o().wrap(function (r) {
983
+ return C(i, void 0, void 0, s().mark(function r() {
984
+ var n, i, o;
985
+ return s().wrap(function (r) {
986
986
  for (;;) switch (r.prev = r.next) {
987
987
  case 0:
988
988
  return r.next = 2, this.state;
989
989
  case 2:
990
- if (n = r.sent, i = n.enabled, s = n.executeRecaptcha, e.type !== R.RequiredCatcha || !i) {
990
+ if (n = r.sent, i = n.enabled, o = n.executeRecaptcha, e.type !== R.RequiredCatcha || !i) {
991
991
  r.next = 14;
992
992
  break;
993
993
  }
@@ -997,7 +997,7 @@ var X,
997
997
  }
998
998
  return r.next = 9, this.getTelemetryID();
999
999
  case 9:
1000
- return t.body.dfp_telemetry_id = r.sent, r.next = 12, s();
1000
+ return t.body.dfp_telemetry_id = r.sent, r.next = 12, o();
1001
1001
  case 12:
1002
1002
  t.body.captcha_token = r.sent;
1003
1003
  case 13:
@@ -1011,8 +1011,8 @@ var X,
1011
1011
  }, r, this);
1012
1012
  }));
1013
1013
  }, this.state = n.then(function (e) {
1014
- return O(i, void 0, void 0, o().mark(function n() {
1015
- return o().wrap(function (n) {
1014
+ return C(i, void 0, void 0, s().mark(function n() {
1015
+ return s().wrap(function (n) {
1016
1016
  for (;;) switch (n.prev = n.next) {
1017
1017
  case 0:
1018
1018
  if (e.runDFPProtectedAuth) {
@@ -1024,7 +1024,7 @@ var X,
1024
1024
  dfpBackendURL: r,
1025
1025
  enabled: !1,
1026
1026
  loaded: !1,
1027
- executeRecaptcha: s
1027
+ executeRecaptcha: o
1028
1028
  });
1029
1029
  case 2:
1030
1030
  return n.next = 4, void V("".concat("https://elements.stytch.com", "/telemetry.js"), function () {
@@ -1037,7 +1037,7 @@ var X,
1037
1037
  enabled: !0,
1038
1038
  mode: e.dfpProtectedAuthMode || "OBSERVATION",
1039
1039
  loaded: !0,
1040
- executeRecaptcha: s
1040
+ executeRecaptcha: o
1041
1041
  });
1042
1042
  case 5:
1043
1043
  case "end":
@@ -1047,11 +1047,11 @@ var X,
1047
1047
  }));
1048
1048
  });
1049
1049
  }),
1050
- se = function se() {
1050
+ oe = function oe() {
1051
1051
  return {
1052
1052
  isEnabled: function isEnabled() {
1053
- return O(void 0, void 0, void 0, o().mark(function e() {
1054
- return o().wrap(function (e) {
1053
+ return C(void 0, void 0, void 0, s().mark(function e() {
1054
+ return s().wrap(function (e) {
1055
1055
  for (;;) switch (e.prev = e.next) {
1056
1056
  case 0:
1057
1057
  return e.abrupt("return", !1);
@@ -1063,8 +1063,8 @@ var X,
1063
1063
  }));
1064
1064
  },
1065
1065
  getTelemetryID: function getTelemetryID() {
1066
- return O(void 0, void 0, void 0, o().mark(function e() {
1067
- return o().wrap(function (e) {
1066
+ return C(void 0, void 0, void 0, s().mark(function e() {
1067
+ return s().wrap(function (e) {
1068
1068
  for (;;) switch (e.prev = e.next) {
1069
1069
  case 0:
1070
1070
  return e.abrupt("return", void 0);
@@ -1076,8 +1076,8 @@ var X,
1076
1076
  }));
1077
1077
  },
1078
1078
  getDFPTelemetryIDAndCaptcha: function getDFPTelemetryIDAndCaptcha() {
1079
- return O(void 0, void 0, void 0, o().mark(function e() {
1080
- return o().wrap(function (e) {
1079
+ return C(void 0, void 0, void 0, s().mark(function e() {
1080
+ return s().wrap(function (e) {
1081
1081
  for (;;) switch (e.prev = e.next) {
1082
1082
  case 0:
1083
1083
  return e.abrupt("return", {
@@ -1092,8 +1092,8 @@ var X,
1092
1092
  }));
1093
1093
  },
1094
1094
  retryWithCaptchaAndDFP: function retryWithCaptchaAndDFP() {
1095
- return O(void 0, void 0, void 0, o().mark(function e() {
1096
- return o().wrap(function (e) {
1095
+ return C(void 0, void 0, void 0, s().mark(function e() {
1096
+ return s().wrap(function (e) {
1097
1097
  for (;;) switch (e.prev = e.next) {
1098
1098
  case 0:
1099
1099
  throw new Error("DFP protected auth is disabled");
@@ -1167,9 +1167,9 @@ var X,
1167
1167
  }, {
1168
1168
  key: "flush",
1169
1169
  value: function value() {
1170
- return O(this, void 0, void 0, o().mark(function e() {
1170
+ return C(this, void 0, void 0, s().mark(function e() {
1171
1171
  var t;
1172
- return o().wrap(function (e) {
1172
+ return s().wrap(function (e) {
1173
1173
  for (;;) switch (e.prev = e.next) {
1174
1174
  case 0:
1175
1175
  if (this.batch.length) {
@@ -1205,9 +1205,9 @@ var X,
1205
1205
  var ue = a(function e(t, r) {
1206
1206
  var n = this;
1207
1207
  c(this, e), this._networkClient = t, this._subscriptionService = r, this.get = function () {
1208
- return O(n, void 0, void 0, o().mark(function e() {
1208
+ return C(n, void 0, void 0, s().mark(function e() {
1209
1209
  var t, r;
1210
- return o().wrap(function (e) {
1210
+ return s().wrap(function (e) {
1211
1211
  for (;;) switch (e.prev = e.next) {
1212
1212
  case 0:
1213
1213
  return e.next = 2, this._networkClient.fetchSDK({
@@ -1226,9 +1226,9 @@ var ue = a(function e(t, r) {
1226
1226
  }, this.getSync = function () {
1227
1227
  return n._subscriptionService.getUser();
1228
1228
  }, this.update = function (e) {
1229
- return O(n, void 0, void 0, o().mark(function t() {
1229
+ return C(n, void 0, void 0, s().mark(function t() {
1230
1230
  var r, n;
1231
- return o().wrap(function (t) {
1231
+ return s().wrap(function (t) {
1232
1232
  for (;;) switch (t.prev = t.next) {
1233
1233
  case 0:
1234
1234
  return re("stytch.user.update").isOptionalObject("untrusted_metadata", e.untrusted_metadata), t.next = 3, this._networkClient.fetchSDK({
@@ -1246,9 +1246,9 @@ var ue = a(function e(t, r) {
1246
1246
  }, t, this);
1247
1247
  }));
1248
1248
  }, this.deleteEmail = function (e) {
1249
- return O(n, void 0, void 0, o().mark(function t() {
1249
+ return C(n, void 0, void 0, s().mark(function t() {
1250
1250
  var r, n;
1251
- return o().wrap(function (t) {
1251
+ return s().wrap(function (t) {
1252
1252
  for (;;) switch (t.prev = t.next) {
1253
1253
  case 0:
1254
1254
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1265,9 +1265,9 @@ var ue = a(function e(t, r) {
1265
1265
  }, t, this);
1266
1266
  }));
1267
1267
  }, this.deletePhoneNumber = function (e) {
1268
- return O(n, void 0, void 0, o().mark(function t() {
1268
+ return C(n, void 0, void 0, s().mark(function t() {
1269
1269
  var r, n;
1270
- return o().wrap(function (t) {
1270
+ return s().wrap(function (t) {
1271
1271
  for (;;) switch (t.prev = t.next) {
1272
1272
  case 0:
1273
1273
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1284,9 +1284,9 @@ var ue = a(function e(t, r) {
1284
1284
  }, t, this);
1285
1285
  }));
1286
1286
  }, this.deleteTOTP = function (e) {
1287
- return O(n, void 0, void 0, o().mark(function t() {
1287
+ return C(n, void 0, void 0, s().mark(function t() {
1288
1288
  var r, n;
1289
- return o().wrap(function (t) {
1289
+ return s().wrap(function (t) {
1290
1290
  for (;;) switch (t.prev = t.next) {
1291
1291
  case 0:
1292
1292
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1303,9 +1303,9 @@ var ue = a(function e(t, r) {
1303
1303
  }, t, this);
1304
1304
  }));
1305
1305
  }, this.deleteOAuthRegistration = function (e) {
1306
- return O(n, void 0, void 0, o().mark(function t() {
1306
+ return C(n, void 0, void 0, s().mark(function t() {
1307
1307
  var r, n;
1308
- return o().wrap(function (t) {
1308
+ return s().wrap(function (t) {
1309
1309
  for (;;) switch (t.prev = t.next) {
1310
1310
  case 0:
1311
1311
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1322,9 +1322,9 @@ var ue = a(function e(t, r) {
1322
1322
  }, t, this);
1323
1323
  }));
1324
1324
  }, this.deleteWebauthnRegistration = function (e) {
1325
- return O(n, void 0, void 0, o().mark(function t() {
1325
+ return C(n, void 0, void 0, s().mark(function t() {
1326
1326
  var r, n;
1327
- return o().wrap(function (t) {
1327
+ return s().wrap(function (t) {
1328
1328
  for (;;) switch (t.prev = t.next) {
1329
1329
  case 0:
1330
1330
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1341,9 +1341,9 @@ var ue = a(function e(t, r) {
1341
1341
  }, t, this);
1342
1342
  }));
1343
1343
  }, this.deleteBiometricRegistration = function (e) {
1344
- return O(n, void 0, void 0, o().mark(function t() {
1344
+ return C(n, void 0, void 0, s().mark(function t() {
1345
1345
  var r, n;
1346
- return o().wrap(function (t) {
1346
+ return s().wrap(function (t) {
1347
1347
  for (;;) switch (t.prev = t.next) {
1348
1348
  case 0:
1349
1349
  return t.next = 2, this._networkClient.fetchSDK({
@@ -1379,9 +1379,9 @@ var ue = a(function e(t, r) {
1379
1379
  (null == r ? void 0 : r.session) !== t && (t = null !== (n = null == r ? void 0 : r.session) && void 0 !== n ? n : null, e(t));
1380
1380
  });
1381
1381
  }, this.revoke = function (e) {
1382
- return O(n, void 0, void 0, o().mark(function t() {
1382
+ return C(n, void 0, void 0, s().mark(function t() {
1383
1383
  var r;
1384
- return o().wrap(function (t) {
1384
+ return s().wrap(function (t) {
1385
1385
  for (;;) switch (t.prev = t.next) {
1386
1386
  case 0:
1387
1387
  return t.prev = 0, t.next = 3, this._networkClient.fetchSDK({
@@ -1400,9 +1400,9 @@ var ue = a(function e(t, r) {
1400
1400
  }, t, this, [[0, 8]]);
1401
1401
  }));
1402
1402
  }, this.authenticate = function (e) {
1403
- return O(n, void 0, void 0, o().mark(function t() {
1403
+ return C(n, void 0, void 0, s().mark(function t() {
1404
1404
  var r, n;
1405
- return o().wrap(function (t) {
1405
+ return s().wrap(function (t) {
1406
1406
  for (;;) switch (t.prev = t.next) {
1407
1407
  case 0:
1408
1408
  return t.prev = 0, r = {
@@ -1450,32 +1450,32 @@ var ue = a(function e(t, r) {
1450
1450
  }),
1451
1451
  he = function () {
1452
1452
  function e(t, r, n, i) {
1453
- var s = this,
1453
+ var o = this,
1454
1454
  a = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : de,
1455
- u = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : se();
1455
+ u = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : oe();
1456
1456
  c(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._passwordResetPKCEManager = i, this._config = a, this.dfpProtectedAuth = u, this.email = {
1457
1457
  loginOrCreate: function loginOrCreate(e) {
1458
1458
  var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
1459
- return O(s, void 0, void 0, o().mark(function r() {
1460
- var n, i, s, a, c, u, l;
1461
- return o().wrap(function (r) {
1459
+ return C(o, void 0, void 0, s().mark(function r() {
1460
+ var n, i, o, a, c, u, l;
1461
+ return s().wrap(function (r) {
1462
1462
  for (;;) switch (r.prev = r.next) {
1463
1463
  case 0:
1464
1464
  return r.next = 2, this._config;
1465
1465
  case 2:
1466
- if (n = r.sent, i = n.pkceRequiredForEmailMagicLinks, s = void 0, !i) {
1466
+ if (n = r.sent, i = n.pkceRequiredForEmailMagicLinks, o = void 0, !i) {
1467
1467
  r.next = 9;
1468
1468
  break;
1469
1469
  }
1470
1470
  return r.next = 8, this.getCodeChallenge();
1471
1471
  case 8:
1472
- s = r.sent;
1472
+ o = r.sent;
1473
1473
  case 9:
1474
1474
  return r.next = 11, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1475
1475
  case 11:
1476
1476
  return a = r.sent, c = a.dfp_telemetry_id, u = a.captcha_token, l = Object.assign(Object.assign({}, t), {
1477
1477
  email: e,
1478
- code_challenge: s,
1478
+ code_challenge: o,
1479
1479
  captcha_token: u,
1480
1480
  dfp_telemetry_id: c
1481
1481
  }), r.abrupt("return", this._networkClient.retriableFetchSDK({
@@ -1494,26 +1494,26 @@ var ue = a(function e(t, r) {
1494
1494
  },
1495
1495
  send: function send(e) {
1496
1496
  var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
1497
- return O(s, void 0, void 0, o().mark(function r() {
1498
- var n, i, s, a, c, u, l, d, h;
1499
- return o().wrap(function (r) {
1497
+ return C(o, void 0, void 0, s().mark(function r() {
1498
+ var n, i, o, a, c, u, l, d, h;
1499
+ return s().wrap(function (r) {
1500
1500
  for (;;) switch (r.prev = r.next) {
1501
1501
  case 0:
1502
1502
  return r.next = 2, this._config;
1503
1503
  case 2:
1504
- if (n = r.sent, i = n.pkceRequiredForEmailMagicLinks, s = void 0, !i) {
1504
+ if (n = r.sent, i = n.pkceRequiredForEmailMagicLinks, o = void 0, !i) {
1505
1505
  r.next = 9;
1506
1506
  break;
1507
1507
  }
1508
1508
  return r.next = 8, this.getCodeChallenge();
1509
1509
  case 8:
1510
- s = r.sent;
1510
+ o = r.sent;
1511
1511
  case 9:
1512
1512
  return r.next = 11, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1513
1513
  case 11:
1514
1514
  return a = r.sent, c = a.dfp_telemetry_id, u = a.captcha_token, l = Object.assign(Object.assign({}, t), {
1515
1515
  email: e,
1516
- code_challenge: s,
1516
+ code_challenge: o,
1517
1517
  captcha_token: u,
1518
1518
  dfp_telemetry_id: c
1519
1519
  }), d = !!this._subscriptionService.getSession(), h = d ? "/magic_links/email/send/secondary" : "/magic_links/email/send/primary", r.abrupt("return", this._networkClient.retriableFetchSDK({
@@ -1531,9 +1531,9 @@ var ue = a(function e(t, r) {
1531
1531
  }));
1532
1532
  }
1533
1533
  }, this.authenticate = function (e, t) {
1534
- return O(s, void 0, void 0, o().mark(function r() {
1534
+ return C(o, void 0, void 0, s().mark(function r() {
1535
1535
  var n, i;
1536
- return o().wrap(function (r) {
1536
+ return s().wrap(function (r) {
1537
1537
  for (;;) switch (r.prev = r.next) {
1538
1538
  case 0:
1539
1539
  return re("stytch.magicLinks.authenticate").isString("Token", e).isNumber("session_duration_minutes", t.session_duration_minutes), r.next = 3, this._passwordResetPKCEManager.getPKPair();
@@ -1588,9 +1588,9 @@ var ue = a(function e(t, r) {
1588
1588
  return a(e, [{
1589
1589
  key: "getCodeChallenge",
1590
1590
  value: function value() {
1591
- return O(this, void 0, void 0, o().mark(function e() {
1591
+ return C(this, void 0, void 0, s().mark(function e() {
1592
1592
  var t;
1593
- return o().wrap(function (e) {
1593
+ return s().wrap(function (e) {
1594
1594
  for (;;) switch (e.prev = e.next) {
1595
1595
  case 0:
1596
1596
  return e.next = 2, this._pkceManager.getPKPair();
@@ -1614,9 +1614,9 @@ var ue = a(function e(t, r) {
1614
1614
  }, {
1615
1615
  key: "handlePKCEForAuthenticate",
1616
1616
  value: function value(e, t) {
1617
- return O(this, void 0, void 0, o().mark(function r() {
1618
- var n, i, s;
1619
- return o().wrap(function (r) {
1617
+ return C(this, void 0, void 0, s().mark(function r() {
1618
+ var n, i, o;
1619
+ return s().wrap(function (r) {
1620
1620
  for (;;) switch (r.prev = r.next) {
1621
1621
  case 0:
1622
1622
  return r.next = 2, e.getPKPair();
@@ -1630,7 +1630,7 @@ var ue = a(function e(t, r) {
1630
1630
  method: "POST"
1631
1631
  });
1632
1632
  case 6:
1633
- return s = r.sent, e.clearPKPair(), r.abrupt("return", s);
1633
+ return o = r.sent, e.clearPKPair(), r.abrupt("return", o);
1634
1634
  case 9:
1635
1635
  case "end":
1636
1636
  return r.stop();
@@ -1645,19 +1645,19 @@ var ue = a(function e(t, r) {
1645
1645
  i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function () {
1646
1646
  return Promise.resolve(void 0);
1647
1647
  },
1648
- s = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : se();
1649
- c(this, e), this._networkClient = t, this._subscriptionService = r, this.executeRecaptcha = i, this.dfpProtectedAuth = s, this.sms = {
1648
+ o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : oe();
1649
+ c(this, e), this._networkClient = t, this._subscriptionService = r, this.executeRecaptcha = i, this.dfpProtectedAuth = o, this.sms = {
1650
1650
  loginOrCreate: function loginOrCreate(e, t) {
1651
- return O(n, void 0, void 0, o().mark(function r() {
1652
- var n, i, s, a;
1653
- return o().wrap(function (r) {
1651
+ return C(n, void 0, void 0, s().mark(function r() {
1652
+ var n, i, o, a;
1653
+ return s().wrap(function (r) {
1654
1654
  for (;;) switch (r.prev = r.next) {
1655
1655
  case 0:
1656
1656
  return r.next = 2, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1657
1657
  case 2:
1658
- return n = r.sent, i = n.dfp_telemetry_id, s = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1658
+ return n = r.sent, i = n.dfp_telemetry_id, o = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1659
1659
  phone_number: e,
1660
- captcha_token: s,
1660
+ captcha_token: o,
1661
1661
  dfp_telemetry_id: i
1662
1662
  }), r.abrupt("return", this._networkClient.retriableFetchSDK({
1663
1663
  url: "/otps/sms/login_or_create",
@@ -1674,16 +1674,16 @@ var ue = a(function e(t, r) {
1674
1674
  }));
1675
1675
  },
1676
1676
  send: function send(e, t) {
1677
- return O(n, void 0, void 0, o().mark(function r() {
1678
- var n, i, s, a, c, u;
1679
- return o().wrap(function (r) {
1677
+ return C(n, void 0, void 0, s().mark(function r() {
1678
+ var n, i, o, a, c, u;
1679
+ return s().wrap(function (r) {
1680
1680
  for (;;) switch (r.prev = r.next) {
1681
1681
  case 0:
1682
1682
  return r.next = 2, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1683
1683
  case 2:
1684
- return n = r.sent, i = n.dfp_telemetry_id, s = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1684
+ return n = r.sent, i = n.dfp_telemetry_id, o = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1685
1685
  phone_number: e,
1686
- captcha_token: s,
1686
+ captcha_token: o,
1687
1687
  dfp_telemetry_id: i
1688
1688
  }), c = !!this._subscriptionService.getSession(), u = c ? "/otps/sms/send/secondary" : "/otps/sms/send/primary", r.abrupt("return", this._networkClient.retriableFetchSDK({
1689
1689
  url: u,
@@ -1701,17 +1701,17 @@ var ue = a(function e(t, r) {
1701
1701
  }
1702
1702
  }, this.whatsapp = {
1703
1703
  loginOrCreate: function loginOrCreate(e, t) {
1704
- return O(n, void 0, void 0, o().mark(function r() {
1705
- var n, i, s, a;
1706
- return o().wrap(function (r) {
1704
+ return C(n, void 0, void 0, s().mark(function r() {
1705
+ var n, i, o, a;
1706
+ return s().wrap(function (r) {
1707
1707
  for (;;) switch (r.prev = r.next) {
1708
1708
  case 0:
1709
1709
  return r.next = 2, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1710
1710
  case 2:
1711
- return n = r.sent, i = n.dfp_telemetry_id, s = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1711
+ return n = r.sent, i = n.dfp_telemetry_id, o = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1712
1712
  phone_number: e,
1713
1713
  dfp_telemetry_id: i,
1714
- captcha_token: s
1714
+ captcha_token: o
1715
1715
  }), r.abrupt("return", this._networkClient.retriableFetchSDK({
1716
1716
  url: "/otps/whatsapp/login_or_create",
1717
1717
  body: a,
@@ -1727,16 +1727,16 @@ var ue = a(function e(t, r) {
1727
1727
  }));
1728
1728
  },
1729
1729
  send: function send(e, t) {
1730
- return O(n, void 0, void 0, o().mark(function r() {
1731
- var n, i, s, a, c, u;
1732
- return o().wrap(function (r) {
1730
+ return C(n, void 0, void 0, s().mark(function r() {
1731
+ var n, i, o, a, c, u;
1732
+ return s().wrap(function (r) {
1733
1733
  for (;;) switch (r.prev = r.next) {
1734
1734
  case 0:
1735
1735
  return r.next = 2, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1736
1736
  case 2:
1737
- return n = r.sent, i = n.dfp_telemetry_id, s = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1737
+ return n = r.sent, i = n.dfp_telemetry_id, o = n.captcha_token, a = Object.assign(Object.assign({}, t), {
1738
1738
  phone_number: e,
1739
- captcha_token: s,
1739
+ captcha_token: o,
1740
1740
  dfp_telemetry_id: i
1741
1741
  }), c = !!this._subscriptionService.getSession(), u = c ? "/otps/whatsapp/send/secondary" : "/otps/whatsapp/send/primary", r.abrupt("return", this._networkClient.retriableFetchSDK({
1742
1742
  url: u,
@@ -1754,9 +1754,9 @@ var ue = a(function e(t, r) {
1754
1754
  }
1755
1755
  }, this.email = {
1756
1756
  loginOrCreate: function loginOrCreate(e, t) {
1757
- return O(n, void 0, void 0, o().mark(function r() {
1757
+ return C(n, void 0, void 0, s().mark(function r() {
1758
1758
  var n, i;
1759
- return o().wrap(function (r) {
1759
+ return s().wrap(function (r) {
1760
1760
  for (;;) switch (r.prev = r.next) {
1761
1761
  case 0:
1762
1762
  return r.next = 2, this.executeRecaptcha();
@@ -1778,9 +1778,9 @@ var ue = a(function e(t, r) {
1778
1778
  }));
1779
1779
  },
1780
1780
  send: function send(e, t) {
1781
- return O(n, void 0, void 0, o().mark(function r() {
1782
- var n, i, s, a;
1783
- return o().wrap(function (r) {
1781
+ return C(n, void 0, void 0, s().mark(function r() {
1782
+ var n, i, o, a;
1783
+ return s().wrap(function (r) {
1784
1784
  for (;;) switch (r.prev = r.next) {
1785
1785
  case 0:
1786
1786
  return r.next = 2, this.executeRecaptcha();
@@ -1788,7 +1788,7 @@ var ue = a(function e(t, r) {
1788
1788
  return n = r.sent, i = Object.assign(Object.assign({}, t), {
1789
1789
  email: e,
1790
1790
  captcha_token: n
1791
- }), s = !!this._subscriptionService.getSession(), a = s ? "/otps/email/send/secondary" : "/otps/email/send/primary", r.abrupt("return", this._networkClient.fetchSDK({
1791
+ }), o = !!this._subscriptionService.getSession(), a = o ? "/otps/email/send/secondary" : "/otps/email/send/primary", r.abrupt("return", this._networkClient.fetchSDK({
1792
1792
  url: a,
1793
1793
  body: i,
1794
1794
  errorMessage: "Failed to send one time passcode",
@@ -1802,17 +1802,17 @@ var ue = a(function e(t, r) {
1802
1802
  }));
1803
1803
  }
1804
1804
  }, this.authenticate = function (e, t, r) {
1805
- return O(n, void 0, void 0, o().mark(function n() {
1806
- var i, s, a, c, u;
1807
- return o().wrap(function (n) {
1805
+ return C(n, void 0, void 0, s().mark(function n() {
1806
+ var i, o, a, c, u;
1807
+ return s().wrap(function (n) {
1808
1808
  for (;;) switch (n.prev = n.next) {
1809
1809
  case 0:
1810
1810
  return re("stytch.otps.authenticate").isString("Code", e).isNumber("session_duration_minutes", r.session_duration_minutes), n.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
1811
1811
  case 3:
1812
- return i = n.sent, s = i.dfp_telemetry_id, a = i.captcha_token, c = Object.assign({
1812
+ return i = n.sent, o = i.dfp_telemetry_id, a = i.captcha_token, c = Object.assign({
1813
1813
  token: e,
1814
1814
  method_id: t,
1815
- dfp_telemetry_id: s,
1815
+ dfp_telemetry_id: o,
1816
1816
  captcha_token: a
1817
1817
  }, r), n.next = 9, this._networkClient.retriableFetchSDK({
1818
1818
  url: "/otps/authenticate",
@@ -1840,8 +1840,8 @@ var ue = a(function e(t, r) {
1840
1840
  };
1841
1841
  }),
1842
1842
  fe = function () {
1843
- function e(t, r, n, i, o) {
1844
- c(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._dynamicConfig = i, this._config = o, this.google = {
1843
+ function e(t, r, n, i, s) {
1844
+ c(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._dynamicConfig = i, this._config = s, this.google = {
1845
1845
  start: this.startOAuthFlow(y.Google)
1846
1846
  }, this.apple = {
1847
1847
  start: this.startOAuthFlow(y.Apple)
@@ -1884,9 +1884,9 @@ var ue = a(function e(t, r) {
1884
1884
  return a(e, [{
1885
1885
  key: "authenticate",
1886
1886
  value: function value(e, t) {
1887
- return O(this, void 0, void 0, o().mark(function r() {
1887
+ return C(this, void 0, void 0, s().mark(function r() {
1888
1888
  var n, i;
1889
- return o().wrap(function (r) {
1889
+ return s().wrap(function (r) {
1890
1890
  for (;;) switch (r.prev = r.next) {
1891
1891
  case 0:
1892
1892
  return re("stytch.oauth.authenticate").isString("Token", e).isNumber("session_duration_minutes", t.session_duration_minutes), r.next = 3, this._pkceManager.getPKPair();
@@ -1920,9 +1920,9 @@ var ue = a(function e(t, r) {
1920
1920
  }, {
1921
1921
  key: "getBaseApiUrl",
1922
1922
  value: function value() {
1923
- return O(this, void 0, void 0, o().mark(function e() {
1923
+ return C(this, void 0, void 0, s().mark(function e() {
1924
1924
  var t, r;
1925
- return o().wrap(function (e) {
1925
+ return s().wrap(function (e) {
1926
1926
  for (;;) switch (e.prev = e.next) {
1927
1927
  case 0:
1928
1928
  return e.next = 2, this._dynamicConfig;
@@ -1955,37 +1955,40 @@ var ue = a(function e(t, r) {
1955
1955
  var r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {},
1956
1956
  n = r.login_redirect_url,
1957
1957
  i = r.signup_redirect_url,
1958
- s = r.custom_scopes;
1959
- return O(t, void 0, void 0, o().mark(function t() {
1960
- var r, a, c, u, l, d;
1961
- return o().wrap(function (t) {
1958
+ o = r.custom_scopes,
1959
+ a = r.provider_params;
1960
+ return C(t, void 0, void 0, s().mark(function t() {
1961
+ var r, c, u, l, d, h, p;
1962
+ return s().wrap(function (t) {
1962
1963
  for (;;) switch (t.prev = t.next) {
1963
1964
  case 0:
1964
1965
  return t.next = 2, this._dynamicConfig;
1965
1966
  case 2:
1966
- return r = t.sent, a = r.cnameDomain, c = r.pkceRequiredForOAuth, t.next = 7, this.getBaseApiUrl();
1967
+ return r = t.sent, c = r.cnameDomain, u = r.pkceRequiredForOAuth, t.next = 7, this.getBaseApiUrl();
1967
1968
  case 7:
1968
- if (u = t.sent, this._networkClient.logEvent({
1969
+ if (l = t.sent, this._networkClient.logEvent({
1969
1970
  name: "start_oauth_flow",
1970
1971
  details: {
1971
1972
  provider_type: e,
1972
- custom_scopes: s,
1973
- cname_domain: a,
1974
- pkce: c
1973
+ custom_scopes: o,
1974
+ cname_domain: c,
1975
+ pkce: u,
1976
+ provider_params: a
1975
1977
  }
1976
- }), (l = new URL("".concat(u, "/v1/public/oauth/").concat(e, "/start"))).searchParams.set("public_token", this._config.publicToken), !c) {
1978
+ }), (d = new URL("".concat(l, "/v1/public/oauth/").concat(e, "/start"))).searchParams.set("public_token", this._config.publicToken), !u) {
1977
1979
  t.next = 18;
1978
1980
  break;
1979
1981
  }
1980
1982
  return t.next = 14, this._pkceManager.startPKCETransaction();
1981
1983
  case 14:
1982
- d = t.sent, l.searchParams.set("code_challenge", d.code_challenge), t.next = 19;
1984
+ h = t.sent, d.searchParams.set("code_challenge", h.code_challenge), t.next = 19;
1983
1985
  break;
1984
1986
  case 18:
1985
1987
  this._pkceManager.clearPKPair();
1986
1988
  case 19:
1987
- s && (re("startOAuthFlow").isStringArray("custom_scopes", s), l.searchParams.set("custom_scopes", s.join(" "))), n && l.searchParams.set("login_redirect_url", n), i && l.searchParams.set("signup_redirect_url", i), window.location.href = l.toString();
1988
- case 23:
1989
+ if (o && (re("startOAuthFlow").isStringArray("custom_scopes", o), d.searchParams.set("custom_scopes", o.join(" "))), a) for (p in re("startOAuthFlow").isOptionalObject("provider_params", a), a) d.searchParams.set("provider_" + p, a[p]);
1990
+ n && d.searchParams.set("login_redirect_url", n), i && d.searchParams.set("signup_redirect_url", i), window.location.href = d.toString();
1991
+ case 24:
1989
1992
  case "end":
1990
1993
  return t.stop();
1991
1994
  }
@@ -2000,15 +2003,15 @@ var ue = a(function e(t, r) {
2000
2003
  var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : function () {
2001
2004
  return Promise.resolve(void 0);
2002
2005
  },
2003
- i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : se();
2006
+ i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : oe();
2004
2007
  c(this, e), this._networkClient = t, this._subscriptionService = r, this.executeRecaptcha = n, this.dfpProtectedAuth = i;
2005
2008
  }
2006
2009
  return a(e, [{
2007
2010
  key: "authenticateStart",
2008
2011
  value: function value(e) {
2009
- return O(this, void 0, void 0, o().mark(function t() {
2012
+ return C(this, void 0, void 0, s().mark(function t() {
2010
2013
  var r, n, i;
2011
- return o().wrap(function (t) {
2014
+ return s().wrap(function (t) {
2012
2015
  for (;;) switch (t.prev = t.next) {
2013
2016
  case 0:
2014
2017
  return re("stytch.cryptoWallets.authenticateStart").isString("crypto_wallet_address", e.crypto_wallet_address).isString("crypto_wallet_type", e.crypto_wallet_type), r = !!this._subscriptionService.getSession(), t.next = 4, this.executeRecaptcha();
@@ -2033,9 +2036,9 @@ var ue = a(function e(t, r) {
2033
2036
  }, {
2034
2037
  key: "authenticate",
2035
2038
  value: function value(e) {
2036
- return O(this, void 0, void 0, o().mark(function t() {
2037
- var r, n, i, s;
2038
- return o().wrap(function (t) {
2039
+ return C(this, void 0, void 0, s().mark(function t() {
2040
+ var r, n, i, o;
2041
+ return s().wrap(function (t) {
2039
2042
  for (;;) switch (t.prev = t.next) {
2040
2043
  case 0:
2041
2044
  return re("stytch.cryptoWallets.authenticate").isString("signature", e.signature).isString("crypto_wallet_address", e.crypto_wallet_address).isString("crypto_wallet_type", e.crypto_wallet_type).isNumber("session_duration_minutes", e.session_duration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2055,15 +2058,15 @@ var ue = a(function e(t, r) {
2055
2058
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2056
2059
  });
2057
2060
  case 8:
2058
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2061
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2059
2062
  state: {
2060
- session: s.session,
2061
- user: ne(s.__user)
2063
+ session: o.session,
2064
+ user: ne(o.__user)
2062
2065
  },
2063
- session_token: s.session_token,
2064
- session_jwt: s.session_jwt,
2066
+ session_token: o.session_token,
2067
+ session_jwt: o.session_jwt,
2065
2068
  intermediate_session_token: null
2066
- }), t.abrupt("return", ie(s));
2069
+ }), t.abrupt("return", ie(o));
2067
2070
  case 11:
2068
2071
  case "end":
2069
2072
  return t.stop();
@@ -2080,9 +2083,9 @@ var ue = a(function e(t, r) {
2080
2083
  return a(e, [{
2081
2084
  key: "create",
2082
2085
  value: function value(e) {
2083
- return O(this, void 0, void 0, o().mark(function t() {
2086
+ return C(this, void 0, void 0, s().mark(function t() {
2084
2087
  var r;
2085
- return o().wrap(function (t) {
2088
+ return s().wrap(function (t) {
2086
2089
  for (;;) switch (t.prev = t.next) {
2087
2090
  case 0:
2088
2091
  return re("stytch.totps.create").isNumber("expiration_minutes", e.expiration_minutes), t.next = 3, this._networkClient.fetchSDK({
@@ -2105,9 +2108,9 @@ var ue = a(function e(t, r) {
2105
2108
  }, {
2106
2109
  key: "authenticate",
2107
2110
  value: function value(e) {
2108
- return O(this, void 0, void 0, o().mark(function t() {
2109
- var r, n, i, s;
2110
- return o().wrap(function (t) {
2111
+ return C(this, void 0, void 0, s().mark(function t() {
2112
+ var r, n, i, o;
2113
+ return s().wrap(function (t) {
2111
2114
  for (;;) switch (t.prev = t.next) {
2112
2115
  case 0:
2113
2116
  return re("stytch.totps.authenticate").isNumber("session_duration_minutes", e.session_duration_minutes).isString("totp_code", e.totp_code), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2125,15 +2128,15 @@ var ue = a(function e(t, r) {
2125
2128
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2126
2129
  });
2127
2130
  case 8:
2128
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2131
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2129
2132
  state: {
2130
- session: s.session,
2131
- user: s.__user
2133
+ session: o.session,
2134
+ user: o.__user
2132
2135
  },
2133
- session_token: s.session_token,
2134
- session_jwt: s.session_jwt,
2136
+ session_token: o.session_token,
2137
+ session_jwt: o.session_jwt,
2135
2138
  intermediate_session_token: null
2136
- }), t.abrupt("return", ie(s));
2139
+ }), t.abrupt("return", ie(o));
2137
2140
  case 11:
2138
2141
  case "end":
2139
2142
  return t.stop();
@@ -2144,8 +2147,8 @@ var ue = a(function e(t, r) {
2144
2147
  }, {
2145
2148
  key: "recoveryCodes",
2146
2149
  value: function value() {
2147
- return O(this, void 0, void 0, o().mark(function e() {
2148
- return o().wrap(function (e) {
2150
+ return C(this, void 0, void 0, s().mark(function e() {
2151
+ return s().wrap(function (e) {
2149
2152
  for (;;) switch (e.prev = e.next) {
2150
2153
  case 0:
2151
2154
  return e.abrupt("return", this._networkClient.fetchSDK({
@@ -2163,9 +2166,9 @@ var ue = a(function e(t, r) {
2163
2166
  }, {
2164
2167
  key: "recover",
2165
2168
  value: function value(e) {
2166
- return O(this, void 0, void 0, o().mark(function t() {
2167
- var r, n, i, s;
2168
- return o().wrap(function (t) {
2169
+ return C(this, void 0, void 0, s().mark(function t() {
2170
+ var r, n, i, o;
2171
+ return s().wrap(function (t) {
2169
2172
  for (;;) switch (t.prev = t.next) {
2170
2173
  case 0:
2171
2174
  return re("stytch.totps.recover").isNumber("session_duration_minutes", e.session_duration_minutes).isString("recovery_code", e.recovery_code), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2183,15 +2186,15 @@ var ue = a(function e(t, r) {
2183
2186
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2184
2187
  });
2185
2188
  case 8:
2186
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2189
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2187
2190
  state: {
2188
- session: s.session,
2189
- user: s.__user
2191
+ session: o.session,
2192
+ user: o.__user
2190
2193
  },
2191
- session_token: s.session_token,
2192
- session_jwt: s.session_jwt,
2194
+ session_token: o.session_token,
2195
+ session_jwt: o.session_jwt,
2193
2196
  intermediate_session_token: null
2194
- }), t.abrupt("return", ie(s));
2197
+ }), t.abrupt("return", ie(o));
2195
2198
  case 11:
2196
2199
  case "end":
2197
2200
  return t.stop();
@@ -2202,7 +2205,7 @@ var ue = a(function e(t, r) {
2202
2205
  }]), e;
2203
2206
  }();
2204
2207
  function ve(e) {
2205
- for (var t = "==".slice(0, (4 - e.length % 4) % 4), r = e.replace(/-/g, "+").replace(/_/g, "/") + t, n = atob(r), i = new ArrayBuffer(n.length), o = new Uint8Array(i), s = 0; s < n.length; s++) o[s] = n.charCodeAt(s);
2208
+ for (var t = "==".slice(0, (4 - e.length % 4) % 4), r = e.replace(/-/g, "+").replace(/_/g, "/") + t, n = atob(r), i = new ArrayBuffer(n.length), s = new Uint8Array(i), o = 0; o < n.length; o++) s[o] = n.charCodeAt(o);
2206
2209
  return i;
2207
2210
  }
2208
2211
  function ye(t) {
@@ -2211,8 +2214,8 @@ function ye(t) {
2211
2214
  i = e(new Uint8Array(t));
2212
2215
  try {
2213
2216
  for (i.s(); !(r = i.n()).done;) {
2214
- var o = r.value;
2215
- n += String.fromCharCode(o);
2217
+ var s = r.value;
2218
+ n += String.fromCharCode(s);
2216
2219
  }
2217
2220
  } catch (e) {
2218
2221
  i.e(e);
@@ -2230,8 +2233,8 @@ function ke(e, r, n) {
2230
2233
  return ke(e, r[0], t);
2231
2234
  });
2232
2235
  if (r instanceof Object) {
2233
- for (var i = {}, o = 0, s = Object.entries(r); o < s.length; o++) {
2234
- var a = t(s[o], 2),
2236
+ for (var i = {}, s = 0, o = Object.entries(r); s < o.length; s++) {
2237
+ var a = t(o[s], 2),
2235
2238
  c = a[0],
2236
2239
  u = a[1];
2237
2240
  if (u.derive) {
@@ -2262,12 +2265,12 @@ function Te(e) {
2262
2265
  schema: e
2263
2266
  };
2264
2267
  }
2265
- var Ce = {
2268
+ var Oe = {
2266
2269
  type: Se(ge),
2267
2270
  id: Se(be),
2268
2271
  transports: Te(ge)
2269
2272
  },
2270
- Oe = {
2273
+ Ce = {
2271
2274
  appid: Te(ge),
2272
2275
  appidExclude: Te(ge),
2273
2276
  credProps: Te(ge)
@@ -2288,10 +2291,10 @@ var Ce = {
2288
2291
  challenge: Se(be),
2289
2292
  pubKeyCredParams: Se(ge),
2290
2293
  timeout: Te(ge),
2291
- excludeCredentials: Te([Ce]),
2294
+ excludeCredentials: Te([Oe]),
2292
2295
  authenticatorSelection: Te(ge),
2293
2296
  attestation: Te(ge),
2294
- extensions: Te(Oe)
2297
+ extensions: Te(Ce)
2295
2298
  }),
2296
2299
  signal: Te(ge)
2297
2300
  },
@@ -2318,9 +2321,9 @@ var Ce = {
2318
2321
  challenge: Se(be),
2319
2322
  timeout: Te(ge),
2320
2323
  rpId: Te(ge),
2321
- allowCredentials: Te([Ce]),
2324
+ allowCredentials: Te([Oe]),
2322
2325
  userVerification: Te(ge),
2323
- extensions: Te(Oe)
2326
+ extensions: Te(Ce)
2324
2327
  }),
2325
2328
  signal: Te(ge)
2326
2329
  },
@@ -2346,9 +2349,9 @@ function Be(e) {
2346
2349
  return ke(ye, Pe, e);
2347
2350
  }
2348
2351
  function Ie(e) {
2349
- return O(this, void 0, void 0, o().mark(function t() {
2352
+ return C(this, void 0, void 0, s().mark(function t() {
2350
2353
  var r;
2351
- return o().wrap(function (t) {
2354
+ return s().wrap(function (t) {
2352
2355
  for (;;) switch (t.prev = t.next) {
2353
2356
  case 0:
2354
2357
  return t.next = 2, navigator.credentials.create(De(e));
@@ -2368,9 +2371,9 @@ function Fe(e) {
2368
2371
  return ke(ye, Re, e);
2369
2372
  }
2370
2373
  function je(e) {
2371
- return O(this, void 0, void 0, o().mark(function t() {
2374
+ return C(this, void 0, void 0, s().mark(function t() {
2372
2375
  var r;
2373
- return o().wrap(function (t) {
2376
+ return s().wrap(function (t) {
2374
2377
  for (;;) switch (t.prev = t.next) {
2375
2378
  case 0:
2376
2379
  return t.next = 2, navigator.credentials.get(Le(e));
@@ -2391,9 +2394,9 @@ var Me = function () {
2391
2394
  key: "register",
2392
2395
  value: function value(e) {
2393
2396
  var t;
2394
- return O(this, void 0, void 0, o().mark(function r() {
2395
- var n, i, s, a;
2396
- return o().wrap(function (r) {
2397
+ return C(this, void 0, void 0, s().mark(function r() {
2398
+ var n, i, o, a;
2399
+ return s().wrap(function (r) {
2397
2400
  for (;;) switch (r.prev = r.next) {
2398
2401
  case 0:
2399
2402
  return re("stytch.webauthn.register").isOptionalString("domain", null == e ? void 0 : e.domain).isOptionalString("authenticator_type", null == e ? void 0 : e.authenticator_type), r.next = 3, this._networkClient.fetchSDK({
@@ -2410,12 +2413,12 @@ var Me = function () {
2410
2413
  publicKey: JSON.parse(i)
2411
2414
  });
2412
2415
  case 7:
2413
- return s = r.sent, r.next = 10, this._networkClient.fetchSDK({
2416
+ return o = r.sent, r.next = 10, this._networkClient.fetchSDK({
2414
2417
  url: "/webauthn/register",
2415
2418
  method: "POST",
2416
2419
  errorMessage: "Failed to register WebAuthn device",
2417
2420
  body: {
2418
- public_key_credential: JSON.stringify(s)
2421
+ public_key_credential: JSON.stringify(o)
2419
2422
  }
2420
2423
  });
2421
2424
  case 10:
@@ -2431,14 +2434,14 @@ var Me = function () {
2431
2434
  key: "authenticate",
2432
2435
  value: function value(e) {
2433
2436
  var t;
2434
- return O(this, void 0, void 0, o().mark(function r() {
2435
- var n, i, s, a, c, u, l;
2436
- return o().wrap(function (r) {
2437
+ return C(this, void 0, void 0, s().mark(function r() {
2438
+ var n, i, o, a, c, u, l;
2439
+ return s().wrap(function (r) {
2437
2440
  for (;;) switch (r.prev = r.next) {
2438
2441
  case 0:
2439
2442
  return re("stytch.webauthn.register").isOptionalString("domain", e.domain).isNumber("session_duration_minutes", e.session_duration_minutes), r.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2440
2443
  case 3:
2441
- return n = r.sent, i = n.dfp_telemetry_id, s = n.captcha_token, r.next = 8, this._networkClient.fetchSDK({
2444
+ return n = r.sent, i = n.dfp_telemetry_id, o = n.captcha_token, r.next = 8, this._networkClient.fetchSDK({
2442
2445
  url: "/webauthn/authenticate/start",
2443
2446
  method: "POST",
2444
2447
  errorMessage: "Failed to start WebAuthn authentication",
@@ -2459,7 +2462,7 @@ var Me = function () {
2459
2462
  public_key_credential: JSON.stringify(u),
2460
2463
  session_duration_minutes: e.session_duration_minutes,
2461
2464
  dfp_telemetry_id: i,
2462
- captcha_token: s
2465
+ captcha_token: o
2463
2466
  },
2464
2467
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2465
2468
  });
@@ -2488,15 +2491,15 @@ var Me = function () {
2488
2491
  Ue = function () {
2489
2492
  function e(t, r, n) {
2490
2493
  var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : Ne,
2491
- o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : se();
2492
- c(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._config = i, this.dfpProtectedAuth = o;
2494
+ s = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : oe();
2495
+ c(this, e), this._networkClient = t, this._subscriptionService = r, this._pkceManager = n, this._config = i, this.dfpProtectedAuth = s;
2493
2496
  }
2494
2497
  return a(e, [{
2495
2498
  key: "getCodeChallenge",
2496
2499
  value: function value() {
2497
- return O(this, void 0, void 0, o().mark(function e() {
2500
+ return C(this, void 0, void 0, s().mark(function e() {
2498
2501
  var t, r;
2499
- return o().wrap(function (e) {
2502
+ return s().wrap(function (e) {
2500
2503
  for (;;) switch (e.prev = e.next) {
2501
2504
  case 0:
2502
2505
  return e.next = 2, this._config;
@@ -2528,9 +2531,9 @@ var Me = function () {
2528
2531
  }, {
2529
2532
  key: "create",
2530
2533
  value: function value(e) {
2531
- return O(this, void 0, void 0, o().mark(function t() {
2532
- var r, n, i, s;
2533
- return o().wrap(function (t) {
2534
+ return C(this, void 0, void 0, s().mark(function t() {
2535
+ var r, n, i, o;
2536
+ return s().wrap(function (t) {
2534
2537
  for (;;) switch (t.prev = t.next) {
2535
2538
  case 0:
2536
2539
  return re("stytch.passwords.create").isString("password", e.password).isString("email", e.email).isNumber("session_duration_minutes", e.session_duration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2549,15 +2552,15 @@ var Me = function () {
2549
2552
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2550
2553
  });
2551
2554
  case 8:
2552
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2555
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2553
2556
  state: {
2554
- session: s.session,
2555
- user: s.user
2557
+ session: o.session,
2558
+ user: o.user
2556
2559
  },
2557
- session_token: s.session_token,
2558
- session_jwt: s.session_jwt,
2560
+ session_token: o.session_token,
2561
+ session_jwt: o.session_jwt,
2559
2562
  intermediate_session_token: null
2560
- }), t.abrupt("return", ie(s));
2563
+ }), t.abrupt("return", ie(o));
2561
2564
  case 11:
2562
2565
  case "end":
2563
2566
  return t.stop();
@@ -2568,9 +2571,9 @@ var Me = function () {
2568
2571
  }, {
2569
2572
  key: "authenticate",
2570
2573
  value: function value(e) {
2571
- return O(this, void 0, void 0, o().mark(function t() {
2572
- var r, n, i, s;
2573
- return o().wrap(function (t) {
2574
+ return C(this, void 0, void 0, s().mark(function t() {
2575
+ var r, n, i, o;
2576
+ return s().wrap(function (t) {
2574
2577
  for (;;) switch (t.prev = t.next) {
2575
2578
  case 0:
2576
2579
  return re("stytch.passwords.authenticate").isString("password", e.password).isString("email", e.email).isNumber("session_duration_minutes", e.session_duration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2589,15 +2592,15 @@ var Me = function () {
2589
2592
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2590
2593
  });
2591
2594
  case 8:
2592
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2595
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2593
2596
  state: {
2594
- session: s.session,
2595
- user: s.user
2597
+ session: o.session,
2598
+ user: o.user
2596
2599
  },
2597
- session_token: s.session_token,
2598
- session_jwt: s.session_jwt,
2600
+ session_token: o.session_token,
2601
+ session_jwt: o.session_jwt,
2599
2602
  intermediate_session_token: null
2600
- }), t.abrupt("return", ie(s));
2603
+ }), t.abrupt("return", ie(o));
2601
2604
  case 11:
2602
2605
  case "end":
2603
2606
  return t.stop();
@@ -2608,16 +2611,16 @@ var Me = function () {
2608
2611
  }, {
2609
2612
  key: "resetByEmailStart",
2610
2613
  value: function value(e) {
2611
- return O(this, void 0, void 0, o().mark(function t() {
2612
- var r, n, i, s;
2613
- return o().wrap(function (t) {
2614
+ return C(this, void 0, void 0, s().mark(function t() {
2615
+ var r, n, i, o;
2616
+ return s().wrap(function (t) {
2614
2617
  for (;;) switch (t.prev = t.next) {
2615
2618
  case 0:
2616
2619
  return re("stytch.passwords.resetByEmailStart").isString("email", e.email).isOptionalString("login_redirect_url", e.login_redirect_url).isOptionalString("reset_password_redirect_url", e.reset_password_redirect_url).isOptionalString("reset_password_template_id", e.reset_password_template_id).isOptionalNumber("reset_password_expiration_minutes", e.reset_password_expiration_minutes), t.next = 3, this.getCodeChallenge();
2617
2620
  case 3:
2618
2621
  return r = t.sent, t.next = 6, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2619
2622
  case 6:
2620
- return n = t.sent, i = n.dfp_telemetry_id, s = n.captcha_token, t.abrupt("return", this._networkClient.retriableFetchSDK({
2623
+ return n = t.sent, i = n.dfp_telemetry_id, o = n.captcha_token, t.abrupt("return", this._networkClient.retriableFetchSDK({
2621
2624
  url: "/passwords/email/reset/start",
2622
2625
  method: "POST",
2623
2626
  errorMessage: "Failed to start password reset flow.",
@@ -2628,7 +2631,7 @@ var Me = function () {
2628
2631
  reset_password_expiration_minutes: e.reset_password_expiration_minutes,
2629
2632
  reset_password_template_id: e.reset_password_template_id,
2630
2633
  code_challenge: r,
2631
- captcha_token: s,
2634
+ captcha_token: o,
2632
2635
  dfp_telemetry_id: i
2633
2636
  },
2634
2637
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
@@ -2643,16 +2646,16 @@ var Me = function () {
2643
2646
  }, {
2644
2647
  key: "resetByEmail",
2645
2648
  value: function value(e) {
2646
- return O(this, void 0, void 0, o().mark(function t() {
2647
- var r, n, i, s, a, c;
2648
- return o().wrap(function (t) {
2649
+ return C(this, void 0, void 0, s().mark(function t() {
2650
+ var r, n, i, o, a, c;
2651
+ return s().wrap(function (t) {
2649
2652
  for (;;) switch (t.prev = t.next) {
2650
2653
  case 0:
2651
2654
  return re("stytch.passwords.resetByEmail").isString("token", e.token).isString("password", e.password).isNumber("session_duration_minutes", e.session_duration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
2652
2655
  case 3:
2653
2656
  return r = t.sent, n = r.dfp_telemetry_id, i = r.captcha_token, t.next = 8, this._pkceManager.getPKPair();
2654
2657
  case 8:
2655
- return s = t.sent, a = null == s ? void 0 : s.code_verifier, t.next = 12, this._networkClient.retriableFetchSDK({
2658
+ return o = t.sent, a = null == o ? void 0 : o.code_verifier, t.next = 12, this._networkClient.retriableFetchSDK({
2656
2659
  url: "/passwords/email/reset",
2657
2660
  method: "POST",
2658
2661
  errorMessage: "Failed to reset password.",
@@ -2686,9 +2689,9 @@ var Me = function () {
2686
2689
  }, {
2687
2690
  key: "resetByExistingPassword",
2688
2691
  value: function value(e) {
2689
- return O(this, void 0, void 0, o().mark(function t() {
2690
- var r, n, i, s;
2691
- return o().wrap(function (t) {
2692
+ return C(this, void 0, void 0, s().mark(function t() {
2693
+ var r, n, i, o;
2694
+ return s().wrap(function (t) {
2692
2695
  for (;;) switch (t.prev = t.next) {
2693
2696
  case 0:
2694
2697
  return re("stytch.passwords.resetByExistingPassword").isString("email", e.email).isString("existing_password", e.existing_password).isString("new_password", e.new_password).isNumber("session_duration_minutes", e.session_duration_minutes), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2708,15 +2711,15 @@ var Me = function () {
2708
2711
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2709
2712
  });
2710
2713
  case 8:
2711
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2714
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2712
2715
  state: {
2713
- session: s.session,
2714
- user: s.user
2716
+ session: o.session,
2717
+ user: o.user
2715
2718
  },
2716
- session_token: s.session_token,
2717
- session_jwt: s.session_jwt,
2719
+ session_token: o.session_token,
2720
+ session_jwt: o.session_jwt,
2718
2721
  intermediate_session_token: null
2719
- }), t.abrupt("return", ie(s));
2722
+ }), t.abrupt("return", ie(o));
2720
2723
  case 11:
2721
2724
  case "end":
2722
2725
  return t.stop();
@@ -2727,9 +2730,9 @@ var Me = function () {
2727
2730
  }, {
2728
2731
  key: "resetBySession",
2729
2732
  value: function value(e) {
2730
- return O(this, void 0, void 0, o().mark(function t() {
2731
- var r, n, i, s;
2732
- return o().wrap(function (t) {
2733
+ return C(this, void 0, void 0, s().mark(function t() {
2734
+ var r, n, i, o;
2735
+ return s().wrap(function (t) {
2733
2736
  for (;;) switch (t.prev = t.next) {
2734
2737
  case 0:
2735
2738
  return re("stytch.passwords.resetBySession").isString("password", e.password), t.next = 3, this.dfpProtectedAuth.getDFPTelemetryIDAndCaptcha();
@@ -2737,7 +2740,7 @@ var Me = function () {
2737
2740
  return r = t.sent, n = r.dfp_telemetry_id, i = r.captcha_token, t.next = 8, this._networkClient.retriableFetchSDK({
2738
2741
  url: "/passwords/session/reset",
2739
2742
  method: "POST",
2740
- errorMessage: "Failed to reset session.",
2743
+ errorMessage: "Failed to reset by session.",
2741
2744
  body: {
2742
2745
  password: e.password,
2743
2746
  session_duration_minutes: e.session_duration_minutes,
@@ -2747,15 +2750,15 @@ var Me = function () {
2747
2750
  retryCallback: this.dfpProtectedAuth.retryWithCaptchaAndDFP
2748
2751
  });
2749
2752
  case 8:
2750
- return s = t.sent, this._subscriptionService.updateStateAndTokens({
2753
+ return o = t.sent, this._subscriptionService.updateStateAndTokens({
2751
2754
  state: {
2752
- session: s.session,
2753
- user: s.user
2755
+ session: o.session,
2756
+ user: o.user
2754
2757
  },
2755
- session_token: s.session_token,
2756
- session_jwt: s.session_jwt,
2758
+ session_token: o.session_token,
2759
+ session_jwt: o.session_jwt,
2757
2760
  intermediate_session_token: null
2758
- }), t.abrupt("return", s);
2761
+ }), t.abrupt("return", o);
2759
2762
  case 11:
2760
2763
  case "end":
2761
2764
  return t.stop();
@@ -2766,8 +2769,8 @@ var Me = function () {
2766
2769
  }, {
2767
2770
  key: "strengthCheck",
2768
2771
  value: function value(e) {
2769
- return O(this, void 0, void 0, o().mark(function t() {
2770
- return o().wrap(function (t) {
2772
+ return C(this, void 0, void 0, s().mark(function t() {
2773
+ return s().wrap(function (t) {
2771
2774
  for (;;) switch (t.prev = t.next) {
2772
2775
  case 0:
2773
2776
  return re("stytch.passwords.strengthCheck").isOptionalString("email", e.email).isString("password", e.password), t.abrupt("return", this._networkClient.fetchSDK({
@@ -2812,26 +2815,26 @@ var Ke = function () {
2812
2815
  }, {
2813
2816
  key: "call",
2814
2817
  value: function value(e, t) {
2815
- return O(this, void 0, void 0, o().mark(function r() {
2818
+ return C(this, void 0, void 0, s().mark(function r() {
2816
2819
  var n,
2817
2820
  i,
2818
- s = this;
2819
- return o().wrap(function (r) {
2821
+ o = this;
2822
+ return s().wrap(function (r) {
2820
2823
  for (;;) switch (r.prev = r.next) {
2821
2824
  case 0:
2822
2825
  return r.next = 2, this.frame;
2823
2826
  case 2:
2824
- return n = r.sent, i = new MessageChannel(), r.abrupt("return", new Promise(function (r, o) {
2827
+ return n = r.sent, i = new MessageChannel(), r.abrupt("return", new Promise(function (r, s) {
2825
2828
  var a;
2826
2829
  i.port1.onmessage = function (e) {
2827
2830
  var t = e.data;
2828
- i.port1.close(), t.success ? r(t.payload) : o(ae.unmarshall(t.error));
2831
+ i.port1.close(), t.success ? r(t.payload) : s(ae.unmarshall(t.error));
2829
2832
  };
2830
2833
  var c = {
2831
2834
  method: e,
2832
2835
  args: t
2833
2836
  };
2834
- null === (a = n.contentWindow) || void 0 === a || a.postMessage(c, s.iframeURL, [i.port2]);
2837
+ null === (a = n.contentWindow) || void 0 === a || a.postMessage(c, o.iframeURL, [i.port2]);
2835
2838
  }));
2836
2839
  case 5:
2837
2840
  case "end":
@@ -2848,9 +2851,9 @@ var Ke = function () {
2848
2851
  c(this, e), this._subscriptionService = t, this._headlessSessionClient = r, this._onDataChange = function (e) {
2849
2852
  (null == e ? void 0 : e.session) ? n.scheduleBackgroundRefresh() : n.cancelBackgroundRefresh();
2850
2853
  }, this._reauthenticateWithBackoff = function () {
2851
- return O(n, void 0, void 0, o().mark(function t() {
2854
+ return C(n, void 0, void 0, s().mark(function t() {
2852
2855
  var r;
2853
- return o().wrap(function (t) {
2856
+ return s().wrap(function (t) {
2854
2857
  for (;;) switch (t.prev = t.next) {
2855
2858
  case 0:
2856
2859
  r = 0;
@@ -3021,30 +3024,31 @@ var Ge = /*#__PURE__*/function () {
3021
3024
  return Ge;
3022
3025
  }();
3023
3026
  function He(e, t, r, n) {
3024
- return new (r || (r = Promise))(function (i, o) {
3025
- function s(e) {
3027
+ return new (r || (r = Promise))(function (i, s) {
3028
+ function o(e) {
3026
3029
  try {
3027
3030
  c(n.next(e));
3028
3031
  } catch (e) {
3029
- o(e);
3032
+ s(e);
3030
3033
  }
3031
3034
  }
3032
3035
  function a(e) {
3033
3036
  try {
3034
3037
  c(n["throw"](e));
3035
3038
  } catch (e) {
3036
- o(e);
3039
+ s(e);
3037
3040
  }
3038
3041
  }
3039
3042
  function c(e) {
3040
3043
  var t;
3041
3044
  e.done ? i(e.value) : (t = e.value, t instanceof r ? t : new r(function (e) {
3042
3045
  e(t);
3043
- })).then(s, a);
3046
+ })).then(o, a);
3044
3047
  }
3045
3048
  c((n = n.apply(e, t || [])).next());
3046
3049
  });
3047
3050
  }
3051
+ "function" == typeof SuppressedError && SuppressedError;
3048
3052
  var ze = /*#__PURE__*/_createClass(function ze(e) {
3049
3053
  var _this2 = this;
3050
3054
  _classCallCheck(this, ze);
@@ -3152,7 +3156,7 @@ function Ve(e) {
3152
3156
  function Je(e, t) {
3153
3157
  for (var r = 0; r < t.length; r++) {
3154
3158
  var n = t[r];
3155
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, (i = n.key, o = void 0, o = function (e, t) {
3159
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, (i = n.key, s = void 0, s = function (e, t) {
3156
3160
  if ("object" !== Ve(e) || null === e) return e;
3157
3161
  var r = e[Symbol.toPrimitive];
3158
3162
  if (void 0 !== r) {
@@ -3161,9 +3165,9 @@ function Je(e, t) {
3161
3165
  throw new TypeError("@@toPrimitive must return a primitive value.");
3162
3166
  }
3163
3167
  return ("string" === t ? String : Number)(e);
3164
- }(i, "string"), "symbol" === Ve(o) ? o : String(o)), n);
3168
+ }(i, "string"), "symbol" === Ve(s) ? s : String(s)), n);
3165
3169
  }
3166
- var i, o;
3170
+ var i, s;
3167
3171
  }
3168
3172
  function $e(e, t, r) {
3169
3173
  return t && Je(e.prototype, t), r && Je(e, r), Object.defineProperty(e, "prototype", {
@@ -3189,9 +3193,9 @@ function Qe(e) {
3189
3193
  var t = nt();
3190
3194
  return function () {
3191
3195
  var r,
3192
- n = ot(e);
3196
+ n = st(e);
3193
3197
  if (t) {
3194
- var i = ot(this).constructor;
3198
+ var i = st(this).constructor;
3195
3199
  r = Reflect.construct(n, arguments, i);
3196
3200
  } else r = n.apply(this, arguments);
3197
3201
  return function (e, t) {
@@ -3216,7 +3220,7 @@ function tt(e) {
3216
3220
  t.set(e, n);
3217
3221
  }
3218
3222
  function n() {
3219
- return rt(e, arguments, ot(this).constructor);
3223
+ return rt(e, arguments, st(this).constructor);
3220
3224
  }
3221
3225
  return n.prototype = Object.create(e.prototype, {
3222
3226
  constructor: {
@@ -3251,10 +3255,10 @@ function it(e, t) {
3251
3255
  return e.__proto__ = t, e;
3252
3256
  }, it(e, t);
3253
3257
  }
3254
- function ot(e) {
3255
- return ot = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (e) {
3258
+ function st(e) {
3259
+ return st = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (e) {
3256
3260
  return e.__proto__ || Object.getPrototypeOf(e);
3257
- }, ot(e);
3261
+ }, st(e);
3258
3262
  }
3259
3263
  exports.Products = void 0, function (e) {
3260
3264
  e.emailMagicLinks = "emailMagicLinks", e.oauth = "oauth", e.otp = "otp", e.crypto = "crypto", e.passwords = "passwords";
@@ -3269,7 +3273,7 @@ exports.Products = void 0, function (e) {
3269
3273
  }(exports.OTPMethods || (exports.OTPMethods = {})), exports.StytchEventType = void 0, function (e) {
3270
3274
  e.MagicLinkLoginOrCreateEvent = "MAGIC_LINK_LOGIN_OR_CREATE", e.OTPsLoginOrCreateEvent = "OTP_LOGIN_OR_CREATE", e.OTPsAuthenticate = "OTP_AUTHENTICATE", e.CryptoWalletAuthenticateStart = "CRYPTO_WALLET_AUTHENTICATE_START", e.CryptoWalletAuthenticate = "CRYPTO_WALLET_AUTHENTICATE", e.PasswordCreate = "PASSWORD_CREATE", e.PasswordAuthenticate = "PASSWORD_AUTHENTICATE", e.PasswordResetByEmailStart = "PASSWORD_RESET_BY_EMAIL_START", e.PasswordResetByEmail = "PASSWORD_RESET_BY_EMAIL", e.B2BMagicLinkEmailLoginOrSignup = "B2B_MAGIC_LINK_EMAIL_LOGIN_OR_SIGNUP", e.B2BMagicLinkAuthenticate = "B2B_MAGIC_LINK_AUTHENTICATE", e.B2BMagicLinkEmailDiscoverySend = "B2B_MAGIC_LINK_EMAIL_DISCOVERY_SEND", e.B2BMagicLinkDiscoveryAuthenticate = "B2B_MAGIC_LINK_DISCOVERY_AUTHENTICATE", e.B2BSSOStart = "B2B_SSO_START", e.B2BSSOAuthenticate = "B2B_SSO_AUTHENTICATE", e.B2BOAuthAuthenticate = "B2B_SSO_AUTHENTICATE", e.B2BOAuthDiscoveryAuthenticate = "B2B_OAUTH_DISCOVERY_AUTHENTICATE", e.B2BDiscoveryOrganizationsCreate = "B2B_DISCOVERY_ORGANIZATIONS_CREATE", e.B2BDiscoveryIntermediateSessionExchange = "B2B_DISCOVERY_INTERMEDIATE_SESSION_EXCHANGE", e.B2BPasswordAuthenticate = "B2B_PASSWORD_AUTHENTICATE", e.B2BPasswordResetByEmailStart = "B2B_PASSWORD_RESET_BY_EMAIL_START", e.B2BPasswordResetByEmail = "B2B_PASSWORD_RESET_BY_EMAIL", e.B2BPasswordResetBySession = "B2B_PASSWORD_RESET_BY_SESSION";
3271
3275
  }(exports.StytchEventType || (exports.StytchEventType = {}));
3272
- var st = function (e) {
3276
+ var ot = function (e) {
3273
3277
  Ze(r, tt(Error));
3274
3278
  var t = Qe(r);
3275
3279
  function r(e, n) {
@@ -3293,10 +3297,10 @@ var st = function (e) {
3293
3297
  function r(e) {
3294
3298
  var n, i;
3295
3299
  Xe(this, r), (n = t.call(this)).name = "StytchSDKSchemaError";
3296
- var o = null === (i = e.body) || void 0 === i ? void 0 : i.map(function (e) {
3300
+ var s = null === (i = e.body) || void 0 === i ? void 0 : i.map(function (e) {
3297
3301
  return "".concat(e.dataPath, ": ").concat(e.message);
3298
3302
  }).join("\n");
3299
- return n.message = "[400] Request does not match expected schema\n".concat(o), n;
3303
+ return n.message = "[400] Request does not match expected schema\n".concat(s), n;
3300
3304
  }
3301
3305
  return $e(r);
3302
3306
  }(),
@@ -3307,11 +3311,11 @@ var st = function (e) {
3307
3311
  var n;
3308
3312
  Xe(this, r), (n = t.call(this)).name = "StytchSDKAPIError";
3309
3313
  var i = e.status_code,
3310
- o = e.error_type,
3311
- s = e.error_message,
3314
+ s = e.error_type,
3315
+ o = e.error_message,
3312
3316
  a = e.error_url,
3313
3317
  c = e.request_id;
3314
- return n.error_type = o, n.error_message = s, n.error_url = a, n.request_id = c, n.status_code = i, n.message = "[".concat(i, "] ").concat(o, "\n") + "".concat(s, "\n") + "See ".concat(a, " for more information.\n") + (c ? "request_id: ".concat(c, "\n") : ""), n;
3318
+ return n.error_type = s, n.error_message = o, n.error_url = a, n.request_id = c, n.status_code = i, n.message = "[".concat(i, "] ").concat(s, "\n") + "".concat(o, "\n") + "See ".concat(a, " for more information.\n") + (c ? "request_id: ".concat(c, "\n") : ""), n;
3315
3319
  }
3316
3320
  return $e(r);
3317
3321
  }(),
@@ -3336,10 +3340,10 @@ exports.BiometricsErrors = void 0, function (e) {
3336
3340
  var dt = /*#__PURE__*/function (_fe) {
3337
3341
  _inherits(dt, _fe);
3338
3342
  var _super = _createSuper(dt);
3339
- function dt(e, t, r, n, i, o) {
3343
+ function dt(e, t, r, n, i, s) {
3340
3344
  var _this4;
3341
3345
  _classCallCheck(this, dt);
3342
- _this4 = _super.call(this, e, t, r, n, i), _this4._oneTap = o, _this4.startOneTap = function (e) {
3346
+ _this4 = _super.call(this, e, t, r, n, i), _this4._oneTap = s, _this4.startOneTap = function (e) {
3343
3347
  return He(_assertThisInitialized(_this4), void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3344
3348
  var t, r, n;
3345
3349
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
@@ -3422,7 +3426,7 @@ var ht = /*#__PURE__*/function () {
3422
3426
  },
3423
3427
  sdk: {
3424
3428
  identifier: "Stytch.js Javascript SDK",
3425
- version: "3.0.1"
3429
+ version: "3.0.3"
3426
3430
  }
3427
3431
  });
3428
3432
  }
@@ -3434,18 +3438,18 @@ var ht = /*#__PURE__*/function () {
3434
3438
  r = _ref2.errorMessage,
3435
3439
  n = _ref2.method;
3436
3440
  return He(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3437
- var i, o, s, a;
3441
+ var i, s, o, a;
3438
3442
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3439
3443
  while (1) switch (_context4.prev = _context4.next) {
3440
3444
  case 0:
3441
- i = this._subscriptionDataLayer.readSessionCookie().session_token, o = "Basic " + window.btoa(this._publicToken + ":" + (i || this._publicToken)), s = window.btoa(JSON.stringify(this.createTelemetryBlob())), a = window.location.origin;
3445
+ i = this._subscriptionDataLayer.readSessionCookie().session_token, s = "Basic " + window.btoa(this._publicToken + ":" + (i || this._publicToken)), o = window.btoa(JSON.stringify(this.createTelemetryBlob())), a = window.location.origin;
3442
3446
  return _context4.abrupt("return", N({
3443
- basicAuthHeader: o,
3447
+ basicAuthHeader: s,
3444
3448
  body: t,
3445
3449
  errorMessage: r,
3446
3450
  finalURL: this.buildSDKUrl(e),
3447
3451
  method: n,
3448
- xSDKClientHeader: s,
3452
+ xSDKClientHeader: o,
3449
3453
  xSDKParentHostHeader: a
3450
3454
  }));
3451
3455
  case 2:
@@ -3464,23 +3468,23 @@ var ht = /*#__PURE__*/function () {
3464
3468
  n = _ref3.method,
3465
3469
  i = _ref3.retryCallback;
3466
3470
  return He(this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
3467
- var s, a, c, u;
3471
+ var o, a, c, u;
3468
3472
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
3469
3473
  while (1) switch (_context5.prev = _context5.next) {
3470
3474
  case 0:
3471
- s = this._subscriptionDataLayer.readSessionCookie().session_token, a = "Basic " + window.btoa(this._publicToken + ":" + (s || this._publicToken)), c = window.btoa(JSON.stringify(this.createTelemetryBlob())), u = window.location.origin;
3475
+ o = this._subscriptionDataLayer.readSessionCookie().session_token, a = "Basic " + window.btoa(this._publicToken + ":" + (o || this._publicToken)), c = window.btoa(JSON.stringify(this.createTelemetryBlob())), u = window.location.origin;
3472
3476
  return _context5.abrupt("return", function (e) {
3473
3477
  var t = e.method,
3474
3478
  r = e.errorMessage,
3475
3479
  n = e.finalURL,
3476
3480
  i = e.basicAuthHeader,
3477
- s = e.xSDKClientHeader,
3481
+ o = e.xSDKClientHeader,
3478
3482
  a = e.xSDKParentHostHeader,
3479
3483
  c = e.body,
3480
3484
  u = e.retryCallback;
3481
- return O(this, void 0, void 0, o().mark(function e() {
3485
+ return C(this, void 0, void 0, s().mark(function e() {
3482
3486
  var l;
3483
- return o().wrap(function (e) {
3487
+ return s().wrap(function (e) {
3484
3488
  for (;;) switch (e.prev = e.next) {
3485
3489
  case 0:
3486
3490
  return l = {
@@ -3488,7 +3492,7 @@ var ht = /*#__PURE__*/function () {
3488
3492
  errorMessage: r,
3489
3493
  finalURL: n,
3490
3494
  basicAuthHeader: i,
3491
- xSDKClientHeader: s,
3495
+ xSDKClientHeader: o,
3492
3496
  xSDKParentHostHeader: a,
3493
3497
  body: c
3494
3498
  }, e.prev = 1, e.next = 4, N(l);
@@ -3605,7 +3609,7 @@ var ft = /*#__PURE__*/function () {
3605
3609
  r = _ref5.onSuccess;
3606
3610
  return function (n) {
3607
3611
  return He(_this6, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
3608
- var i, _yield$this$submitGoo, o;
3612
+ var i, _yield$this$submitGoo, s;
3609
3613
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
3610
3614
  while (1) switch (_context7.prev = _context7.next) {
3611
3615
  case 0:
@@ -3618,8 +3622,8 @@ var ft = /*#__PURE__*/function () {
3618
3622
  });
3619
3623
  case 3:
3620
3624
  _yield$this$submitGoo = _context7.sent;
3621
- o = _yield$this$submitGoo.redirect_url;
3622
- r(o);
3625
+ s = _yield$this$submitGoo.redirect_url;
3626
+ r(s);
3623
3627
  case 6:
3624
3628
  case "end":
3625
3629
  return _context7.stop();
@@ -3885,9 +3889,9 @@ var bt = function e(t, r) {
3885
3889
  function n(e, n, i) {
3886
3890
  if ("undefined" != typeof document) {
3887
3891
  "number" == typeof (i = gt({}, r, i)).expires && (i.expires = new Date(Date.now() + 864e5 * i.expires)), i.expires && (i.expires = i.expires.toUTCString()), e = encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
3888
- var o = "";
3889
- for (var s in i) i[s] && (o += "; " + s, !0 !== i[s] && (o += "=" + i[s].split(";")[0]));
3890
- return document.cookie = e + "=" + t.write(n, e) + o;
3892
+ var s = "";
3893
+ for (var o in i) i[o] && (s += "; " + o, !0 !== i[o] && (s += "=" + i[o].split(";")[0]));
3894
+ return document.cookie = e + "=" + t.write(n, e) + s;
3891
3895
  }
3892
3896
  }
3893
3897
  return Object.create({
@@ -3895,11 +3899,11 @@ var bt = function e(t, r) {
3895
3899
  get: function get(e) {
3896
3900
  if ("undefined" != typeof document && (!arguments.length || e)) {
3897
3901
  for (var r = document.cookie ? document.cookie.split("; ") : [], n = {}, i = 0; i < r.length; i++) {
3898
- var o = r[i].split("="),
3899
- s = o.slice(1).join("=");
3902
+ var s = r[i].split("="),
3903
+ o = s.slice(1).join("=");
3900
3904
  try {
3901
- var a = decodeURIComponent(o[0]);
3902
- if (n[a] = t.read(s, a), e === a) break;
3905
+ var a = decodeURIComponent(s[0]);
3906
+ if (n[a] = t.read(o, a), e === a) break;
3903
3907
  } catch (e) {}
3904
3908
  }
3905
3909
  return e ? n[e] : n;
@@ -3998,18 +4002,18 @@ var wt = /*#__PURE__*/function () {
3998
4002
  key: "writeSessionCookie",
3999
4003
  value: function writeSessionCookie(e) {
4000
4004
  var t, r, n, i;
4001
- var o = e.state,
4002
- s = e.session_token,
4005
+ var s = e.state,
4006
+ o = e.session_token,
4003
4007
  a = e.session_jwt,
4004
4008
  c = wt.generateCookieOpts({
4005
- expiresAt: null !== (r = null === (t = null == o ? void 0 : o.session) || void 0 === t ? void 0 : t.expires_at) && void 0 !== r ? r : "",
4009
+ expiresAt: null !== (r = null === (t = null == s ? void 0 : s.session) || void 0 === t ? void 0 : t.expires_at) && void 0 !== r ? r : "",
4006
4010
  availableToSubdomains: this._cookieAvailableToSubdomains,
4007
4011
  path: this._cookiePath,
4008
4012
  domain: this._domain
4009
4013
  });
4010
- bt.set(this.opaqueTokenCookieName, s, c), bt.set(this.jwtCookieName, a, c);
4014
+ bt.set(this.opaqueTokenCookieName, o, c), bt.set(this.jwtCookieName, a, c);
4011
4015
  var u = wt.generateCookieOpts({
4012
- expiresAt: null !== (i = null === (n = null == o ? void 0 : o.session) || void 0 === n ? void 0 : n.expires_at) && void 0 !== i ? i : "",
4016
+ expiresAt: null !== (i = null === (n = null == s ? void 0 : s.session) || void 0 === n ? void 0 : n.expires_at) && void 0 !== i ? i : "",
4013
4017
  availableToSubdomains: !this._cookieAvailableToSubdomains,
4014
4018
  path: this._cookiePath,
4015
4019
  domain: this._domain
@@ -4104,14 +4108,14 @@ var St = /*#__PURE__*/function (_wt) {
4104
4108
  return _createClass(St);
4105
4109
  }(wt);
4106
4110
  var Tt = Symbol["for"]("__stytch_DataLayer"),
4107
- Ct = function Ct(e, t) {
4111
+ Ot = function Ot(e, t) {
4108
4112
  var r = function () {
4109
4113
  var e = window;
4110
4114
  return e[Tt] || (e[Tt] = {}), e[Tt];
4111
4115
  }();
4112
4116
  return r[e] || (r[e] = new St(e, t)), r[e];
4113
4117
  },
4114
- Ot = function Ot(e, t) {
4118
+ Ct = function Ct(e, t) {
4115
4119
  Object.values(e).forEach(function (e) {
4116
4120
  return e(t);
4117
4121
  });
@@ -4119,18 +4123,18 @@ var Tt = Symbol["for"]("__stytch_DataLayer"),
4119
4123
  At = function () {
4120
4124
  var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).KEYS_TO_EXCLUDE,
4121
4125
  r = void 0 === e ? [] : e;
4122
- return function e(n, o) {
4123
- return i(n) === i(o) && (null === n || null === o ? n === o : "object" === i(n) ? Object.keys(n).length === Object.keys(o).length && !Object.keys(n).some(function (e) {
4124
- return !(e in o);
4126
+ return function e(n, s) {
4127
+ return i(n) === i(s) && (null === n || null === s ? n === s : "object" === i(n) ? Object.keys(n).length === Object.keys(s).length && !Object.keys(n).some(function (e) {
4128
+ return !(e in s);
4125
4129
  }) && Object.entries(n).filter(function (e) {
4126
4130
  var n = t(e, 1)[0];
4127
4131
  return !r.includes(n);
4128
4132
  }).every(function (r) {
4129
4133
  var n = t(r, 2),
4130
4134
  i = n[0],
4131
- s = n[1];
4132
- return e(s, o[i]);
4133
- }) : n === o);
4135
+ o = n[1];
4136
+ return e(o, s[i]);
4137
+ }) : n === s);
4134
4138
  };
4135
4139
  }({
4136
4140
  KEYS_TO_EXCLUDE: ["last_accessed_at"]
@@ -4180,7 +4184,7 @@ var Et = /*#__PURE__*/function () {
4180
4184
  value: function _updateStateAndTokensInternal(e) {
4181
4185
  var t = this._datalayer.state,
4182
4186
  r = null === e.state ? null : Object.assign(Object.assign({}, this._datalayer.state), e.state);
4183
- this._datalayer.state = r, At(t, r) || Ot(this._datalayer.subscriptions, r);
4187
+ this._datalayer.state = r, At(t, r) || Ct(this._datalayer.subscriptions, r);
4184
4188
  }
4185
4189
  }, {
4186
4190
  key: "updateStateAndTokens",
@@ -4192,7 +4196,7 @@ var Et = /*#__PURE__*/function () {
4192
4196
  value: function updateState(e) {
4193
4197
  var t = this._datalayer.state,
4194
4198
  r = null === e ? null : Object.assign(Object.assign({}, this._datalayer.state), e);
4195
- this._datalayer.state = r, At(t, r) || (Ot(this._datalayer.subscriptions, r), this._datalayer.syncToLocalStorage());
4199
+ this._datalayer.state = r, At(t, r) || (Ct(this._datalayer.subscriptions, r), this._datalayer.syncToLocalStorage());
4196
4200
  }
4197
4201
  }, {
4198
4202
  key: "updateTokens",
@@ -4256,7 +4260,7 @@ var Pt = /*#__PURE__*/function (_Et) {
4256
4260
  return _createClass(Pt);
4257
4261
  }(Et);
4258
4262
  var xt = Symbol["for"]("stytch__internal_b2c");
4259
- exports.SDKAPIUnreachableError = st, exports.StytchHeadlessClient = /*#__PURE__*/function () {
4263
+ exports.SDKAPIUnreachableError = ot, exports.StytchHeadlessClient = /*#__PURE__*/function () {
4260
4264
  function _class(e, t) {
4261
4265
  var _this11 = this;
4262
4266
  _classCallCheck(this, _class);
@@ -4266,20 +4270,20 @@ exports.SDKAPIUnreachableError = st, exports.StytchHeadlessClient = /*#__PURE__*
4266
4270
  if ("undefined" == typeof window) throw new Error("The ".concat(e, " is not compatible with server-side environments.\nIf using nextjs, use the create").concat(e, " method instead.\n```\n").concat(t, "\n```\n"));
4267
4271
  }("StytchHeadlessClient"), "string" != typeof (r = e) ? Q("Public token is malformed. Expected a string, got ".concat(i(r), ".").concat(te)) : "" === r ? Q('Public token is malformed. Expected "public-token-...", got an empty string.'.concat(te)) : r.startsWith("public-token-") || Q('Public token is malformed. Expected "public-token-...", got '.concat(r, ".").concat(te));
4268
4272
  var n = t,
4269
- o = {
4270
- cookieOptions: null == (s = n) ? void 0 : s.cookieOptions,
4273
+ s = {
4274
+ cookieOptions: null == (o = n) ? void 0 : o.cookieOptions,
4271
4275
  endpoints: {
4272
- sdkBackendURL: null !== (c = null === (a = null == s ? void 0 : s.endpoints) || void 0 === a ? void 0 : a.sdkBackendURL) && void 0 !== c ? c : "https://web.stytch.com",
4273
- testAPIURL: null !== (l = null === (u = null == s ? void 0 : s.endpoints) || void 0 === u ? void 0 : u.testAPIURL) && void 0 !== l ? l : "https://test.stytch.com",
4274
- liveAPIURL: null !== (h = null === (d = null == s ? void 0 : s.endpoints) || void 0 === d ? void 0 : d.liveAPIURL) && void 0 !== h ? h : "https://api.stytch.com",
4275
- dfpBackendURL: null !== (f = null === (p = null == s ? void 0 : s.endpoints) || void 0 === p ? void 0 : p.dfpBackendURL) && void 0 !== f ? f : "https://telemetry.stytch.com",
4276
- clientsideServicesIframeURL: null !== (m = null === (_ = null == s ? void 0 : s.endpoints) || void 0 === _ ? void 0 : _.clientsideServicesIframeURL) && void 0 !== m ? m : "https://js.stytch.com/clientside-services/index.html"
4276
+ sdkBackendURL: null !== (c = null === (a = null == o ? void 0 : o.endpoints) || void 0 === a ? void 0 : a.sdkBackendURL) && void 0 !== c ? c : "https://web.stytch.com",
4277
+ testAPIURL: null !== (l = null === (u = null == o ? void 0 : o.endpoints) || void 0 === u ? void 0 : u.testAPIURL) && void 0 !== l ? l : "https://test.stytch.com",
4278
+ liveAPIURL: null !== (h = null === (d = null == o ? void 0 : o.endpoints) || void 0 === d ? void 0 : d.liveAPIURL) && void 0 !== h ? h : "https://api.stytch.com",
4279
+ dfpBackendURL: null !== (f = null === (p = null == o ? void 0 : o.endpoints) || void 0 === p ? void 0 : p.dfpBackendURL) && void 0 !== f ? f : "https://telemetry.stytch.com",
4280
+ clientsideServicesIframeURL: null !== (m = null === (_ = null == o ? void 0 : o.endpoints) || void 0 === _ ? void 0 : _.clientsideServicesIframeURL) && void 0 !== m ? m : "https://js.stytch.com/clientside-services/index.html"
4277
4281
  }
4278
4282
  };
4279
- var s, a, c, u, l, d, h, p, f, _, m;
4280
- this._dataLayer = Ct(e, n), this._subscriptionService = new Pt(e, this._dataLayer);
4283
+ var o, a, c, u, l, d, h, p, f, _, m;
4284
+ this._dataLayer = Ot(e, n), this._subscriptionService = new Pt(e, this._dataLayer);
4281
4285
  var v = new mt(this._dataLayer, "passwords");
4282
- this._networkClient = new ht(e, this._dataLayer, o.endpoints.sdkBackendURL, function () {
4286
+ this._networkClient = new ht(e, this._dataLayer, s.endpoints.sdkBackendURL, function () {
4283
4287
  var e, t, r, n;
4284
4288
  return {
4285
4289
  stytch_user_id: null === (t = null === (e = _this11._dataLayer.state) || void 0 === e ? void 0 : e.user) || void 0 === t ? void 0 : t.user_id,
@@ -4288,15 +4292,15 @@ exports.SDKAPIUnreachableError = st, exports.StytchHeadlessClient = /*#__PURE__*
4288
4292
  });
4289
4293
  var y = new Ge(e, this._networkClient, this._dataLayer),
4290
4294
  g = new ze(y.getAsync()),
4291
- b = new oe(e, o.endpoints.dfpBackendURL, y.getAsync(), g.executeRecaptcha),
4292
- k = new Ye(o.endpoints.clientsideServicesIframeURL),
4295
+ b = new se(e, s.endpoints.dfpBackendURL, y.getAsync(), g.executeRecaptcha),
4296
+ k = new Ye(s.endpoints.clientsideServicesIframeURL),
4293
4297
  w = new ft(e, k),
4294
4298
  S = new vt(this._networkClient);
4295
- var T, C;
4299
+ var T, O;
4296
4300
  this.user = new ue(this._networkClient, this._subscriptionService), this.session = new le(this._networkClient, this._subscriptionService), this.magicLinks = new he(this._networkClient, this._subscriptionService, new mt(this._dataLayer, "magic_links"), v, y.getAsync(), b), this.otps = new pe(this._networkClient, this._subscriptionService, g.executeRecaptcha, b), this.oauth = new dt(this._networkClient, this._subscriptionService, new mt(this._dataLayer, "oauth"), y.getAsync(), {
4297
4301
  publicToken: e,
4298
- testAPIURL: o.endpoints.testAPIURL,
4299
- liveAPIURL: o.endpoints.liveAPIURL
4302
+ testAPIURL: s.endpoints.testAPIURL,
4303
+ liveAPIURL: s.endpoints.liveAPIURL
4300
4304
  }, w), this.cryptoWallets = new _e(this._networkClient, this._subscriptionService, g.executeRecaptcha, b), this.totps = new me(this._networkClient, this._subscriptionService, b), this.webauthn = new Me(this._networkClient, this._subscriptionService, b), this.passwords = new Ue(this._networkClient, this._subscriptionService, v, y.getAsync(), b), this._sessionManager = new We(this._subscriptionService, this.session), this._dataLayer.readSessionCookie().session_token && this._sessionManager.performBackgroundRefresh(), this._networkClient.logEvent({
4301
4305
  name: "sdk_instance_instantiated",
4302
4306
  details: {
@@ -4304,7 +4308,7 @@ exports.SDKAPIUnreachableError = st, exports.StytchHeadlessClient = /*#__PURE__*
4304
4308
  error_callback_registered: !1,
4305
4309
  success_callback_registered: !1
4306
4310
  }
4307
- }), T = this, C = {
4311
+ }), T = this, O = {
4308
4312
  bootstrap: y,
4309
4313
  clientsideServices: k,
4310
4314
  captcha: g,
@@ -4313,7 +4317,7 @@ exports.SDKAPIUnreachableError = st, exports.StytchHeadlessClient = /*#__PURE__*
4313
4317
  publicToken: e,
4314
4318
  dataLayer: this._dataLayer,
4315
4319
  networkClient: this._networkClient
4316
- }, Object.assign(T, _defineProperty({}, xt, C));
4320
+ }, Object.assign(T, _defineProperty({}, xt, O));
4317
4321
  }
4318
4322
  return _createClass(_class);
4319
4323
  }(), exports.StytchSDKAPIError = ut, exports.StytchSDKNativeError = lt, exports.StytchSDKSchemaError = ct, exports.StytchSDKUsageError = at, exports.UNRECOVERABLE_ERROR_TYPES = ["unauthorized_credentials", "user_unauthenticated", "invalid_secret_authentication", "session_not_found"];