@stytch/vanilla-js 5.3.1 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist/adminPortal/components/DeleteConnection.d.ts +5 -2
- package/dist/adminPortal/components/Select.d.ts +2 -0
- package/dist/adminPortal/index.esm.js +2 -2
- package/dist/adminPortal/index.js +2 -2
- package/dist/adminPortal/scim/AdminPortalSCIM.d.ts +11 -1
- package/dist/adminPortal/scim/SCIMConnectionDangerZoneSection.d.ts +5 -0
- package/dist/adminPortal/scim/SCIMConnectionDetailsSection.d.ts +5 -0
- package/dist/adminPortal/scim/SCIMConnectionRoleAssignmentsSection.d.ts +7 -0
- package/dist/adminPortal/scim/SCIMConnectionTokenRotationSection.d.ts +5 -0
- package/dist/adminPortal/scim/mountAdminPortalSCIM.d.ts +1 -1
- package/dist/adminPortal/sso/AdminPortalSSO.d.ts +2 -2
- package/dist/adminPortal/sso/IdpInfo.d.ts +6 -2
- package/dist/adminPortal/sso/RoleAssignmentsSection.d.ts +2 -2
- package/dist/adminPortal/sso/SSONewConnectionConfigureScreen.d.ts +3 -3
- package/dist/adminPortal/sso/SSORouter.d.ts +7 -7
- package/dist/adminPortal/sso/TaggedConnection.d.ts +5 -2
- package/dist/adminPortal/utils/Connection.d.ts +1 -1
- package/dist/adminPortal/utils/ConnectionType.d.ts +1 -1
- package/dist/adminPortal/utils/FeatureStateComponent.d.ts +10 -0
- package/dist/adminPortal/utils/getFeatureState.d.ts +9 -0
- package/dist/adminPortal/utils/getSsoRoleAssignments.d.ts +8 -0
- package/dist/adminPortal/utils/prependAsterisks.d.ts +1 -0
- package/dist/adminPortal/utils/useAdminPortalConfig.d.ts +4 -3
- package/dist/adminPortal/utils/useMutateScimConnection.d.ts +1 -1
- package/dist/adminPortal/utils/useMutateSsoConnection.d.ts +2 -5
- package/dist/b2b/index.esm.js +979 -1137
- package/dist/b2b/index.headless.esm.js +3 -3
- package/dist/b2b/index.headless.js +2 -2
- package/dist/b2b/index.js +971 -1129
- package/dist/{extractErrorMessage-Ch-qCHrd.js → extractErrorMessage-CW4Nxx1B.js} +1 -1
- package/dist/{extractErrorMessage-m6TJ9iVT.js → extractErrorMessage-Ca4zQC5N.js} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.headless.esm.js +28 -28
- package/dist/index.headless.js +28 -28
- package/dist/index.js +1 -1
- package/dist/{internal-DA5LySQi.js → internal-2fj7jjLQ.js} +746 -702
- package/dist/{internal-k7t3AQud.js → internal-C29Dtv6A.js} +746 -702
- package/package.json +15 -16
package/dist/b2b/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58;
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59, _templateObject60, _templateObject61, _templateObject62, _templateObject63, _templateObject64, _templateObject65, _templateObject66, _templateObject67, _templateObject68, _templateObject69, _templateObject70, _templateObject71;
|
|
4
4
|
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); } }
|
|
5
5
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
6
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -11,27 +11,29 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
11
11
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12
12
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
13
13
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
14
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
15
|
-
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."); }
|
|
16
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
17
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
18
14
|
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; }
|
|
19
15
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
20
16
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
17
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
18
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
22
19
|
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."); }
|
|
23
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
24
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
25
20
|
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; } }
|
|
26
21
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
27
|
-
function
|
|
22
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
23
|
+
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."); }
|
|
24
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
26
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
27
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
28
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28
30
|
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; }
|
|
29
31
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
30
32
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
31
33
|
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); }
|
|
32
34
|
var b2b_index_headless = require('./index.headless.js');
|
|
33
|
-
var extractErrorMessage = require('../extractErrorMessage-
|
|
34
|
-
var internal = require('../internal-
|
|
35
|
+
var extractErrorMessage = require('../extractErrorMessage-Ca4zQC5N.js');
|
|
36
|
+
var internal = require('../internal-C29Dtv6A.js');
|
|
35
37
|
var DEFAULT_MFA_STATE = {
|
|
36
38
|
primaryInfo: null,
|
|
37
39
|
isEnrolling: false,
|
|
@@ -54,10 +56,10 @@ var getAuthMethodsForMember = function getAuthMethodsForMember(authMethods, memb
|
|
|
54
56
|
return method !== 'password';
|
|
55
57
|
});
|
|
56
58
|
};
|
|
57
|
-
var getEnabledMethods = function getEnabledMethods(
|
|
58
|
-
var allMethods =
|
|
59
|
-
orgSupportedMethods =
|
|
60
|
-
uiIncludedMethods =
|
|
59
|
+
var getEnabledMethods = function getEnabledMethods(_ref) {
|
|
60
|
+
var allMethods = _ref.allMethods,
|
|
61
|
+
orgSupportedMethods = _ref.orgSupportedMethods,
|
|
62
|
+
uiIncludedMethods = _ref.uiIncludedMethods;
|
|
61
63
|
if (orgSupportedMethods === null || orgSupportedMethods === void 0 ? void 0 : orgSupportedMethods.length) {
|
|
62
64
|
return new Set(orgSupportedMethods);
|
|
63
65
|
}
|
|
@@ -337,7 +339,7 @@ var mfaReducer = function mfaReducer(state, action) {
|
|
|
337
339
|
return state;
|
|
338
340
|
}
|
|
339
341
|
};
|
|
340
|
-
var reducer
|
|
342
|
+
var reducer = function reducer(state, action) {
|
|
341
343
|
var _a, _b, _c;
|
|
342
344
|
switch (action.type) {
|
|
343
345
|
case 'transition':
|
|
@@ -495,13 +497,13 @@ var GlobalContext = /*#__PURE__*/extractErrorMessage.wn.createContext({
|
|
|
495
497
|
return null;
|
|
496
498
|
}]
|
|
497
499
|
});
|
|
498
|
-
var GlobalContextProvider = function GlobalContextProvider(
|
|
499
|
-
var children =
|
|
500
|
-
client =
|
|
501
|
-
config =
|
|
502
|
-
callbacks =
|
|
503
|
-
initialState =
|
|
504
|
-
var state = extractErrorMessage.wn.useReducer(reducer
|
|
500
|
+
var GlobalContextProvider = function GlobalContextProvider(_ref2) {
|
|
501
|
+
var children = _ref2.children,
|
|
502
|
+
client = _ref2.client,
|
|
503
|
+
config = _ref2.config,
|
|
504
|
+
callbacks = _ref2.callbacks,
|
|
505
|
+
initialState = _ref2.initialState;
|
|
506
|
+
var state = extractErrorMessage.wn.useReducer(reducer, initialState !== null && initialState !== void 0 ? initialState : DEFAULT_STATE);
|
|
505
507
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(GlobalContext.Provider, {
|
|
506
508
|
value: {
|
|
507
509
|
client: client,
|
|
@@ -709,9 +711,9 @@ var createTheme = function createTheme(styles) {
|
|
|
709
711
|
}
|
|
710
712
|
};
|
|
711
713
|
};
|
|
712
|
-
var useTheme = function useTheme(
|
|
713
|
-
var styles =
|
|
714
|
-
displayWatermark =
|
|
714
|
+
var useTheme = function useTheme(_ref3) {
|
|
715
|
+
var styles = _ref3.styles,
|
|
716
|
+
displayWatermark = _ref3.displayWatermark;
|
|
715
717
|
return extractErrorMessage.F(function () {
|
|
716
718
|
return createTheme(styles, displayWatermark);
|
|
717
719
|
}, [styles, displayWatermark]);
|
|
@@ -727,7 +729,7 @@ var e = {
|
|
|
727
729
|
},
|
|
728
730
|
l = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,
|
|
729
731
|
a = /\/\*[^]*?\*\/| +/g,
|
|
730
|
-
n = /\n+/g,
|
|
732
|
+
n$1 = /\n+/g,
|
|
731
733
|
o = function o(e, t) {
|
|
732
734
|
var r = "",
|
|
733
735
|
l = "",
|
|
@@ -767,7 +769,7 @@ var e = {
|
|
|
767
769
|
var t,
|
|
768
770
|
r,
|
|
769
771
|
o = [{}];
|
|
770
|
-
for (; t = l.exec(e.replace(a, ""));) t[4] ? o.shift() : t[3] ? (r = t[3].replace(n, " ").trim(), o.unshift(o[0][r] = o[0][r] || {})) : o[0][t[1]] = t[2].replace(n, " ").trim();
|
|
772
|
+
for (; t = l.exec(e.replace(a, ""));) t[4] ? o.shift() : t[3] ? (r = t[3].replace(n$1, " ").trim(), o.unshift(o[0][r] = o[0][r] || {})) : o[0][t[1]] = t[2].replace(n$1, " ").trim();
|
|
771
773
|
return o[0];
|
|
772
774
|
}(e);
|
|
773
775
|
c[d] = o(p ? _defineProperty({}, "@keyframes " + d, _t4) : _t4, r ? "" : "." + d);
|
|
@@ -788,7 +790,7 @@ var e = {
|
|
|
788
790
|
return e + l + (null == n ? "" : n);
|
|
789
791
|
}, "");
|
|
790
792
|
};
|
|
791
|
-
function u(e) {
|
|
793
|
+
function u$1(e) {
|
|
792
794
|
var r = this || {},
|
|
793
795
|
l = e.call ? e(r.p) : e;
|
|
794
796
|
return i(l.unshift ? l.raw ? p(l, [].slice.call(arguments, 1), r.p) : l.reduce(function (e, t) {
|
|
@@ -796,10 +798,10 @@ function u(e) {
|
|
|
796
798
|
}, {}) : l, t(r.target), r.g, r.o, r.k);
|
|
797
799
|
}
|
|
798
800
|
var d, f, g;
|
|
799
|
-
u.bind({
|
|
801
|
+
u$1.bind({
|
|
800
802
|
g: 1
|
|
801
803
|
});
|
|
802
|
-
var h = u.bind({
|
|
804
|
+
var h$1 = u$1.bind({
|
|
803
805
|
k: 1
|
|
804
806
|
});
|
|
805
807
|
function m(e, t, r, l) {
|
|
@@ -814,624 +816,452 @@ function j(e, t) {
|
|
|
814
816
|
s = c.className || a.className;
|
|
815
817
|
r.p = Object.assign({
|
|
816
818
|
theme: f && f()
|
|
817
|
-
}, c), r.o = / *go\d+/.test(s), c.className = u.apply(r, l) + (s ? " " + s : "")
|
|
819
|
+
}, c), r.o = / *go\d+/.test(s), c.className = u$1.apply(r, l) + (s ? " " + s : "");
|
|
818
820
|
var i = e;
|
|
819
821
|
return e[0] && (i = c.as || e, delete c.as), g && i[0] && g(c), d(i, c);
|
|
820
822
|
}
|
|
821
|
-
return
|
|
822
|
-
};
|
|
823
|
-
}
|
|
824
|
-
function _extends() {
|
|
825
|
-
_extends = Object.assign || function (target) {
|
|
826
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
827
|
-
var source = arguments[i];
|
|
828
|
-
for (var key in source) {
|
|
829
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
830
|
-
target[key] = source[key];
|
|
831
|
-
}
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
return target;
|
|
823
|
+
return a;
|
|
835
824
|
};
|
|
836
|
-
return _extends.apply(this, arguments);
|
|
837
|
-
}
|
|
838
|
-
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
839
|
-
if (!raw) {
|
|
840
|
-
raw = strings.slice(0);
|
|
841
|
-
}
|
|
842
|
-
strings.raw = raw;
|
|
843
|
-
return strings;
|
|
844
825
|
}
|
|
845
|
-
var
|
|
846
|
-
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
};
|
|
851
|
-
var genId = /*#__PURE__*/function () {
|
|
852
|
-
var count = 0;
|
|
853
|
-
return function () {
|
|
854
|
-
return (++count).toString();
|
|
855
|
-
};
|
|
856
|
-
}();
|
|
857
|
-
var createRectRef = function createRectRef(onRect) {
|
|
858
|
-
return function (el) {
|
|
859
|
-
if (el) {
|
|
860
|
-
setTimeout(function () {
|
|
861
|
-
var boundingRect = el.getBoundingClientRect();
|
|
862
|
-
onRect(boundingRect);
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
};
|
|
866
|
-
};
|
|
867
|
-
var prefersReducedMotion = /*#__PURE__*/function () {
|
|
868
|
-
var shouldReduceMotion = undefined;
|
|
869
|
-
return function () {
|
|
870
|
-
if (shouldReduceMotion === undefined && typeof window !== 'undefined') {
|
|
871
|
-
var mediaQuery = matchMedia('(prefers-reduced-motion: reduce)');
|
|
872
|
-
shouldReduceMotion = !mediaQuery || mediaQuery.matches;
|
|
873
|
-
}
|
|
874
|
-
return shouldReduceMotion;
|
|
826
|
+
var W = function W(e) {
|
|
827
|
+
return typeof e == "function";
|
|
828
|
+
},
|
|
829
|
+
T = function T(e, t) {
|
|
830
|
+
return W(e) ? e(t) : e;
|
|
875
831
|
};
|
|
876
|
-
|
|
877
|
-
var
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
var toastTimeouts = /*#__PURE__*/new Map();
|
|
889
|
-
var addToRemoveQueue = function addToRemoveQueue(toastId) {
|
|
890
|
-
if (toastTimeouts.has(toastId)) {
|
|
891
|
-
return;
|
|
892
|
-
}
|
|
893
|
-
var timeout = setTimeout(function () {
|
|
894
|
-
toastTimeouts["delete"](toastId);
|
|
895
|
-
dispatch({
|
|
896
|
-
type: ActionType.REMOVE_TOAST,
|
|
897
|
-
toastId: toastId
|
|
898
|
-
});
|
|
899
|
-
}, 1000);
|
|
900
|
-
toastTimeouts.set(toastId, timeout);
|
|
901
|
-
};
|
|
902
|
-
var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
903
|
-
var timeout = toastTimeouts.get(toastId);
|
|
904
|
-
if (timeout) {
|
|
905
|
-
clearTimeout(timeout);
|
|
906
|
-
}
|
|
907
|
-
};
|
|
908
|
-
var reducer = function reducer(state, action) {
|
|
909
|
-
switch (action.type) {
|
|
910
|
-
case ActionType.ADD_TOAST:
|
|
911
|
-
return _extends({}, state, {
|
|
912
|
-
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
913
|
-
});
|
|
914
|
-
case ActionType.UPDATE_TOAST:
|
|
915
|
-
if (action.toast.id) {
|
|
916
|
-
clearFromRemoveQueue(action.toast.id);
|
|
832
|
+
var U = function () {
|
|
833
|
+
var e = 0;
|
|
834
|
+
return function () {
|
|
835
|
+
return (++e).toString();
|
|
836
|
+
};
|
|
837
|
+
}(),
|
|
838
|
+
b = function () {
|
|
839
|
+
var e;
|
|
840
|
+
return function () {
|
|
841
|
+
if (e === void 0 && (typeof window === "undefined" ? "undefined" : _typeof(window)) < "u") {
|
|
842
|
+
var _t6 = matchMedia("(prefers-reduced-motion: reduce)");
|
|
843
|
+
e = !_t6 || _t6.matches;
|
|
917
844
|
}
|
|
918
|
-
return
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
type:
|
|
929
|
-
|
|
930
|
-
}) : reducer(state, {
|
|
931
|
-
type: ActionType.ADD_TOAST,
|
|
932
|
-
toast: toast
|
|
845
|
+
return e;
|
|
846
|
+
};
|
|
847
|
+
}();
|
|
848
|
+
var Q = 20;
|
|
849
|
+
var S = new Map(),
|
|
850
|
+
X = 1e3,
|
|
851
|
+
$ = function $(e) {
|
|
852
|
+
if (S.has(e)) return;
|
|
853
|
+
var t = setTimeout(function () {
|
|
854
|
+
S["delete"](e), u({
|
|
855
|
+
type: 4,
|
|
856
|
+
toastId: e
|
|
933
857
|
});
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
858
|
+
}, X);
|
|
859
|
+
S.set(e, t);
|
|
860
|
+
},
|
|
861
|
+
J = function J(e) {
|
|
862
|
+
var t = S.get(e);
|
|
863
|
+
t && clearTimeout(t);
|
|
864
|
+
},
|
|
865
|
+
v = function v(e, t) {
|
|
866
|
+
switch (t.type) {
|
|
867
|
+
case 0:
|
|
868
|
+
return _objectSpread(_objectSpread({}, e), {}, {
|
|
869
|
+
toasts: [t.toast].concat(_toConsumableArray(e.toasts)).slice(0, Q)
|
|
941
870
|
});
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
871
|
+
case 1:
|
|
872
|
+
return t.toast.id && J(t.toast.id), _objectSpread(_objectSpread({}, e), {}, {
|
|
873
|
+
toasts: e.toasts.map(function (r) {
|
|
874
|
+
return r.id === t.toast.id ? _objectSpread(_objectSpread({}, r), t.toast) : r;
|
|
875
|
+
})
|
|
876
|
+
});
|
|
877
|
+
case 2:
|
|
878
|
+
var _o2 = t.toast;
|
|
879
|
+
return e.toasts.find(function (r) {
|
|
880
|
+
return r.id === _o2.id;
|
|
881
|
+
}) ? v(e, {
|
|
882
|
+
type: 1,
|
|
883
|
+
toast: _o2
|
|
884
|
+
}) : v(e, {
|
|
885
|
+
type: 0,
|
|
886
|
+
toast: _o2
|
|
887
|
+
});
|
|
888
|
+
case 3:
|
|
889
|
+
var _s2 = t.toastId;
|
|
890
|
+
return _s2 ? $(_s2) : e.toasts.forEach(function (r) {
|
|
891
|
+
$(r.id);
|
|
892
|
+
}), _objectSpread(_objectSpread({}, e), {}, {
|
|
893
|
+
toasts: e.toasts.map(function (r) {
|
|
894
|
+
return r.id === _s2 || _s2 === void 0 ? _objectSpread(_objectSpread({}, r), {}, {
|
|
895
|
+
visible: !1
|
|
896
|
+
}) : r;
|
|
897
|
+
})
|
|
898
|
+
});
|
|
899
|
+
case 4:
|
|
900
|
+
return t.toastId === void 0 ? _objectSpread(_objectSpread({}, e), {}, {
|
|
953
901
|
toasts: []
|
|
902
|
+
}) : _objectSpread(_objectSpread({}, e), {}, {
|
|
903
|
+
toasts: e.toasts.filter(function (r) {
|
|
904
|
+
return r.id !== t.toastId;
|
|
905
|
+
})
|
|
954
906
|
});
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
907
|
+
case 5:
|
|
908
|
+
return _objectSpread(_objectSpread({}, e), {}, {
|
|
909
|
+
pausedAt: t.time
|
|
910
|
+
});
|
|
911
|
+
case 6:
|
|
912
|
+
var _a2 = t.time - (e.pausedAt || 0);
|
|
913
|
+
return _objectSpread(_objectSpread({}, e), {}, {
|
|
914
|
+
pausedAt: void 0,
|
|
915
|
+
toasts: e.toasts.map(function (r) {
|
|
916
|
+
return _objectSpread(_objectSpread({}, r), {}, {
|
|
917
|
+
pauseDuration: r.pauseDuration + _a2
|
|
918
|
+
});
|
|
919
|
+
})
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
A = [],
|
|
924
|
+
P = {
|
|
925
|
+
toasts: [],
|
|
926
|
+
pausedAt: void 0
|
|
927
|
+
},
|
|
928
|
+
u = function u(e) {
|
|
929
|
+
P = v(P, e), A.forEach(function (t) {
|
|
930
|
+
t(P);
|
|
931
|
+
});
|
|
932
|
+
},
|
|
933
|
+
Y = {
|
|
934
|
+
blank: 4e3,
|
|
935
|
+
error: 4e3,
|
|
936
|
+
success: 2e3,
|
|
937
|
+
loading: 1 / 0,
|
|
938
|
+
custom: 4e3
|
|
939
|
+
},
|
|
940
|
+
I = function I() {
|
|
941
|
+
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
942
|
+
var _extractErrorMessage$ = extractErrorMessage.h(P),
|
|
943
|
+
_extractErrorMessage$2 = _slicedToArray(_extractErrorMessage$, 2),
|
|
944
|
+
t = _extractErrorMessage$2[0],
|
|
945
|
+
o = _extractErrorMessage$2[1];
|
|
946
|
+
extractErrorMessage.p(function () {
|
|
947
|
+
return A.push(o), function () {
|
|
948
|
+
var a = A.indexOf(o);
|
|
949
|
+
a > -1 && A.splice(a, 1);
|
|
950
|
+
};
|
|
951
|
+
}, [t]);
|
|
952
|
+
var s = t.toasts.map(function (a) {
|
|
953
|
+
var r, c;
|
|
954
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, e), e[a.type]), a), {}, {
|
|
955
|
+
duration: a.duration || ((r = e[a.type]) == null ? void 0 : r.duration) || (e == null ? void 0 : e.duration) || Y[a.type],
|
|
956
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, e.style), (c = e[a.type]) == null ? void 0 : c.style), a.style)
|
|
974
957
|
});
|
|
975
|
-
}
|
|
976
|
-
};
|
|
977
|
-
var listeners = [];
|
|
978
|
-
var memoryState = {
|
|
979
|
-
toasts: [],
|
|
980
|
-
pausedAt: undefined
|
|
981
|
-
};
|
|
982
|
-
var dispatch = function dispatch(action) {
|
|
983
|
-
memoryState = reducer(memoryState, action);
|
|
984
|
-
listeners.forEach(function (listener) {
|
|
985
|
-
listener(memoryState);
|
|
986
|
-
});
|
|
987
|
-
};
|
|
988
|
-
var defaultTimeouts = {
|
|
989
|
-
blank: 4000,
|
|
990
|
-
error: 4000,
|
|
991
|
-
success: 2000,
|
|
992
|
-
loading: Infinity,
|
|
993
|
-
custom: 4000
|
|
994
|
-
};
|
|
995
|
-
var useStore = function useStore(toastOptions) {
|
|
996
|
-
if (toastOptions === void 0) {
|
|
997
|
-
toastOptions = {};
|
|
998
|
-
}
|
|
999
|
-
var _useState = extractErrorMessage.h(memoryState),
|
|
1000
|
-
state = _useState[0],
|
|
1001
|
-
setState = _useState[1];
|
|
1002
|
-
extractErrorMessage.p(function () {
|
|
1003
|
-
listeners.push(setState);
|
|
1004
|
-
return function () {
|
|
1005
|
-
var index = listeners.indexOf(setState);
|
|
1006
|
-
if (index > -1) {
|
|
1007
|
-
listeners.splice(index, 1);
|
|
1008
|
-
}
|
|
1009
|
-
};
|
|
1010
|
-
}, [state]);
|
|
1011
|
-
var mergedToasts = state.toasts.map(function (t) {
|
|
1012
|
-
var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
|
|
1013
|
-
return _extends({}, toastOptions, toastOptions[t.type], t, {
|
|
1014
|
-
duration: t.duration || ((_toastOptions$t$type = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type.duration) || ((_toastOptions = toastOptions) == null ? void 0 : _toastOptions.duration) || defaultTimeouts[t.type],
|
|
1015
|
-
style: _extends({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
|
|
1016
958
|
});
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
toasts: mergedToasts
|
|
1020
|
-
});
|
|
1021
|
-
};
|
|
1022
|
-
var createToast = function createToast(message, type, opts) {
|
|
1023
|
-
if (type === void 0) {
|
|
1024
|
-
type = 'blank';
|
|
1025
|
-
}
|
|
1026
|
-
return _extends({
|
|
1027
|
-
createdAt: Date.now(),
|
|
1028
|
-
visible: true,
|
|
1029
|
-
type: type,
|
|
1030
|
-
ariaProps: {
|
|
1031
|
-
role: 'status',
|
|
1032
|
-
'aria-live': 'polite'
|
|
1033
|
-
},
|
|
1034
|
-
message: message,
|
|
1035
|
-
pauseDuration: 0
|
|
1036
|
-
}, opts, {
|
|
1037
|
-
id: (opts == null ? void 0 : opts.id) || genId()
|
|
1038
|
-
});
|
|
1039
|
-
};
|
|
1040
|
-
var createHandler = function createHandler(type) {
|
|
1041
|
-
return function (message, options) {
|
|
1042
|
-
var toast = createToast(message, type, options);
|
|
1043
|
-
dispatch({
|
|
1044
|
-
type: ActionType.UPSERT_TOAST,
|
|
1045
|
-
toast: toast
|
|
959
|
+
return _objectSpread(_objectSpread({}, t), {}, {
|
|
960
|
+
toasts: s
|
|
1046
961
|
});
|
|
1047
|
-
return toast.id;
|
|
1048
962
|
};
|
|
1049
|
-
|
|
1050
|
-
var
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
963
|
+
var G = function G(e) {
|
|
964
|
+
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "blank";
|
|
965
|
+
var o = arguments.length > 2 ? arguments[2] : undefined;
|
|
966
|
+
return _objectSpread(_objectSpread({
|
|
967
|
+
createdAt: Date.now(),
|
|
968
|
+
visible: !0,
|
|
969
|
+
type: t,
|
|
970
|
+
ariaProps: {
|
|
971
|
+
role: "status",
|
|
972
|
+
"aria-live": "polite"
|
|
973
|
+
},
|
|
974
|
+
message: e,
|
|
975
|
+
pauseDuration: 0
|
|
976
|
+
}, o), {}, {
|
|
977
|
+
id: (o == null ? void 0 : o.id) || U()
|
|
978
|
+
});
|
|
979
|
+
},
|
|
980
|
+
h = function h(e) {
|
|
981
|
+
return function (t, o) {
|
|
982
|
+
var s = G(t, e, o);
|
|
983
|
+
return u({
|
|
984
|
+
type: 2,
|
|
985
|
+
toast: s
|
|
986
|
+
}), s.id;
|
|
987
|
+
};
|
|
988
|
+
},
|
|
989
|
+
n = function n(e, t) {
|
|
990
|
+
return h("blank")(e, t);
|
|
991
|
+
};
|
|
992
|
+
n.error = h("error");
|
|
993
|
+
n.success = h("success");
|
|
994
|
+
n.loading = h("loading");
|
|
995
|
+
n.custom = h("custom");
|
|
996
|
+
n.dismiss = function (e) {
|
|
997
|
+
u({
|
|
998
|
+
type: 3,
|
|
999
|
+
toastId: e
|
|
1067
1000
|
});
|
|
1068
1001
|
};
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
id: id
|
|
1074
|
-
}, opts, opts == null ? void 0 : opts.success));
|
|
1075
|
-
return p;
|
|
1076
|
-
})["catch"](function (e) {
|
|
1077
|
-
toast.error(resolveValue(msgs.error, e), _extends({
|
|
1078
|
-
id: id
|
|
1079
|
-
}, opts, opts == null ? void 0 : opts.error));
|
|
1002
|
+
n.remove = function (e) {
|
|
1003
|
+
return u({
|
|
1004
|
+
type: 4,
|
|
1005
|
+
toastId: e
|
|
1080
1006
|
});
|
|
1081
|
-
return promise;
|
|
1082
1007
|
};
|
|
1083
|
-
|
|
1084
|
-
var
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
return;
|
|
1008
|
+
n.promise = function (e, t, o) {
|
|
1009
|
+
var s = n.loading(t.loading, _objectSpread(_objectSpread({}, o), o == null ? void 0 : o.loading));
|
|
1010
|
+
return e.then(function (a) {
|
|
1011
|
+
return n.success(T(t.success, a), _objectSpread(_objectSpread({
|
|
1012
|
+
id: s
|
|
1013
|
+
}, o), o == null ? void 0 : o.success)), a;
|
|
1014
|
+
})["catch"](function (a) {
|
|
1015
|
+
n.error(T(t.error, a), _objectSpread(_objectSpread({
|
|
1016
|
+
id: s
|
|
1017
|
+
}, o), o == null ? void 0 : o.error));
|
|
1018
|
+
}), e;
|
|
1019
|
+
};
|
|
1020
|
+
var Z = function Z(e, t) {
|
|
1021
|
+
u({
|
|
1022
|
+
type: 1,
|
|
1023
|
+
toast: {
|
|
1024
|
+
id: e,
|
|
1025
|
+
height: t
|
|
1102
1026
|
}
|
|
1103
|
-
return setTimeout(function () {
|
|
1104
|
-
return toast.dismiss(t.id);
|
|
1105
|
-
}, durationLeft);
|
|
1106
1027
|
});
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
}
|
|
1128
|
-
},
|
|
1129
|
-
updateHeight: function updateHeight(toastId, height) {
|
|
1130
|
-
return dispatch({
|
|
1131
|
-
type: ActionType.UPDATE_TOAST,
|
|
1132
|
-
toast: {
|
|
1133
|
-
id: toastId,
|
|
1134
|
-
height: height
|
|
1028
|
+
},
|
|
1029
|
+
ee = function ee() {
|
|
1030
|
+
u({
|
|
1031
|
+
type: 5,
|
|
1032
|
+
time: Date.now()
|
|
1033
|
+
});
|
|
1034
|
+
},
|
|
1035
|
+
D = function D(e) {
|
|
1036
|
+
var _I = I(e),
|
|
1037
|
+
t = _I.toasts,
|
|
1038
|
+
o = _I.pausedAt;
|
|
1039
|
+
extractErrorMessage.p(function () {
|
|
1040
|
+
if (o) return;
|
|
1041
|
+
var r = Date.now(),
|
|
1042
|
+
c = t.map(function (i) {
|
|
1043
|
+
if (i.duration === 1 / 0) return;
|
|
1044
|
+
var d = (i.duration || 0) + i.pauseDuration - (r - i.createdAt);
|
|
1045
|
+
if (d < 0) {
|
|
1046
|
+
i.visible && n.dismiss(i.id);
|
|
1047
|
+
return;
|
|
1135
1048
|
}
|
|
1049
|
+
return setTimeout(function () {
|
|
1050
|
+
return n.dismiss(i.id);
|
|
1051
|
+
}, d);
|
|
1136
1052
|
});
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
var _ref = opts || {},
|
|
1141
|
-
_ref$reverseOrder = _ref.reverseOrder,
|
|
1142
|
-
reverseOrder = _ref$reverseOrder === void 0 ? false : _ref$reverseOrder,
|
|
1143
|
-
_ref$gutter = _ref.gutter,
|
|
1144
|
-
gutter = _ref$gutter === void 0 ? 8 : _ref$gutter,
|
|
1145
|
-
defaultPosition = _ref.defaultPosition;
|
|
1146
|
-
var relevantToasts = toasts.filter(function (t) {
|
|
1147
|
-
return (t.position || defaultPosition) === (toast.position || defaultPosition) && t.height;
|
|
1053
|
+
return function () {
|
|
1054
|
+
c.forEach(function (i) {
|
|
1055
|
+
return i && clearTimeout(i);
|
|
1148
1056
|
});
|
|
1149
|
-
|
|
1150
|
-
|
|
1057
|
+
};
|
|
1058
|
+
}, [t, o]);
|
|
1059
|
+
var s = extractErrorMessage.T(function () {
|
|
1060
|
+
o && u({
|
|
1061
|
+
type: 6,
|
|
1062
|
+
time: Date.now()
|
|
1151
1063
|
});
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
var
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1064
|
+
}, [o]),
|
|
1065
|
+
a = extractErrorMessage.T(function (r, c) {
|
|
1066
|
+
var _g$filter;
|
|
1067
|
+
var _ref5 = c || {},
|
|
1068
|
+
_ref5$reverseOrder = _ref5.reverseOrder,
|
|
1069
|
+
i = _ref5$reverseOrder === void 0 ? !1 : _ref5$reverseOrder,
|
|
1070
|
+
_ref5$gutter = _ref5.gutter,
|
|
1071
|
+
d = _ref5$gutter === void 0 ? 8 : _ref5$gutter,
|
|
1072
|
+
p = _ref5.defaultPosition,
|
|
1073
|
+
g = t.filter(function (m) {
|
|
1074
|
+
return (m.position || p) === (r.position || p) && m.height;
|
|
1075
|
+
}),
|
|
1076
|
+
E = g.findIndex(function (m) {
|
|
1077
|
+
return m.id === r.id;
|
|
1078
|
+
}),
|
|
1079
|
+
x = g.filter(function (m, R) {
|
|
1080
|
+
return R < E && m.visible;
|
|
1081
|
+
}).length;
|
|
1082
|
+
return (_g$filter = g.filter(function (m) {
|
|
1083
|
+
return m.visible;
|
|
1084
|
+
})).slice.apply(_g$filter, _toConsumableArray(i ? [x + 1] : [0, x])).reduce(function (m, R) {
|
|
1085
|
+
return m + (R.height || 0) + d;
|
|
1159
1086
|
}, 0);
|
|
1160
|
-
|
|
1087
|
+
}, [t]);
|
|
1088
|
+
return {
|
|
1089
|
+
toasts: t,
|
|
1090
|
+
handlers: {
|
|
1091
|
+
updateHeight: Z,
|
|
1092
|
+
startPause: ee,
|
|
1093
|
+
endPause: s,
|
|
1094
|
+
calculateOffset: a
|
|
1161
1095
|
}
|
|
1162
1096
|
};
|
|
1163
|
-
}, [toasts, pausedAt]);
|
|
1164
|
-
return {
|
|
1165
|
-
toasts: toasts,
|
|
1166
|
-
handlers: handlers
|
|
1167
|
-
};
|
|
1168
|
-
};
|
|
1169
|
-
function _templateObject4() {
|
|
1170
|
-
var data = _taggedTemplateLiteralLoose(["\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ", ";\n position: relative;\n transform: rotate(45deg);\n\n animation: ", " 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n\n &:after,\n &:before {\n content: '';\n animation: ", " 0.15s ease-out forwards;\n animation-delay: 150ms;\n position: absolute;\n border-radius: 3px;\n opacity: 0;\n background: ", ";\n bottom: 9px;\n left: 4px;\n height: 2px;\n width: 12px;\n }\n\n &:before {\n animation: ", " 0.15s ease-out forwards;\n animation-delay: 180ms;\n transform: rotate(90deg);\n }\n"]);
|
|
1171
|
-
_templateObject4 = function _templateObject4() {
|
|
1172
|
-
return data;
|
|
1173
|
-
};
|
|
1174
|
-
return data;
|
|
1175
|
-
}
|
|
1176
|
-
function _templateObject3() {
|
|
1177
|
-
var data = _taggedTemplateLiteralLoose(["\nfrom {\n transform: scale(0) rotate(90deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(90deg);\n\topacity: 1;\n}"]);
|
|
1178
|
-
_templateObject3 = function _templateObject3() {
|
|
1179
|
-
return data;
|
|
1180
|
-
};
|
|
1181
|
-
return data;
|
|
1182
|
-
}
|
|
1183
|
-
function _templateObject2() {
|
|
1184
|
-
var data = _taggedTemplateLiteralLoose(["\nfrom {\n transform: scale(0);\n opacity: 0;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}"]);
|
|
1185
|
-
_templateObject2 = function _templateObject2() {
|
|
1186
|
-
return data;
|
|
1187
1097
|
};
|
|
1188
|
-
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
},
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
return data;
|
|
1209
|
-
};
|
|
1210
|
-
return data;
|
|
1211
|
-
}
|
|
1212
|
-
function _templateObject$1() {
|
|
1213
|
-
var data = _taggedTemplateLiteralLoose(["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"]);
|
|
1214
|
-
_templateObject$1 = function _templateObject() {
|
|
1215
|
-
return data;
|
|
1216
|
-
};
|
|
1217
|
-
return data;
|
|
1218
|
-
}
|
|
1219
|
-
var rotate = /*#__PURE__*/h( /*#__PURE__*/_templateObject$1());
|
|
1220
|
-
var LoaderIcon = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject2$1(), function (p) {
|
|
1221
|
-
return p.secondary || '#e0e0e0';
|
|
1222
|
-
}, function (p) {
|
|
1223
|
-
return p.primary || '#616161';
|
|
1224
|
-
}, rotate);
|
|
1225
|
-
function _templateObject3$1() {
|
|
1226
|
-
var data = _taggedTemplateLiteralLoose(["\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ", ";\n position: relative;\n transform: rotate(45deg);\n\n animation: ", " 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n &:after {\n content: '';\n box-sizing: border-box;\n animation: ", " 0.2s ease-out forwards;\n opacity: 0;\n animation-delay: 200ms;\n position: absolute;\n border-right: 2px solid;\n border-bottom: 2px solid;\n border-color: ", ";\n bottom: 6px;\n left: 6px;\n height: 10px;\n width: 6px;\n }\n"]);
|
|
1227
|
-
_templateObject3$1 = function _templateObject3() {
|
|
1228
|
-
return data;
|
|
1229
|
-
};
|
|
1230
|
-
return data;
|
|
1231
|
-
}
|
|
1232
|
-
function _templateObject2$2() {
|
|
1233
|
-
var data = _taggedTemplateLiteralLoose(["\n0% {\n\theight: 0;\n\twidth: 0;\n\topacity: 0;\n}\n40% {\n height: 0;\n\twidth: 6px;\n\topacity: 1;\n}\n100% {\n opacity: 1;\n height: 10px;\n}"]);
|
|
1234
|
-
_templateObject2$2 = function _templateObject2() {
|
|
1235
|
-
return data;
|
|
1236
|
-
};
|
|
1237
|
-
return data;
|
|
1238
|
-
}
|
|
1239
|
-
function _templateObject$2() {
|
|
1240
|
-
var data = _taggedTemplateLiteralLoose(["\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n\topacity: 1;\n}"]);
|
|
1241
|
-
_templateObject$2 = function _templateObject() {
|
|
1242
|
-
return data;
|
|
1243
|
-
};
|
|
1244
|
-
return data;
|
|
1245
|
-
}
|
|
1246
|
-
var circleAnimation$1 = /*#__PURE__*/h( /*#__PURE__*/_templateObject$2());
|
|
1247
|
-
var checkmarkAnimation = /*#__PURE__*/h( /*#__PURE__*/_templateObject2$2());
|
|
1248
|
-
var CheckmarkIcon = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject3$1(), function (p) {
|
|
1249
|
-
return p.primary || '#61d345';
|
|
1250
|
-
}, circleAnimation$1, checkmarkAnimation, function (p) {
|
|
1251
|
-
return p.secondary || '#fff';
|
|
1252
|
-
});
|
|
1253
|
-
function _templateObject4$1() {
|
|
1254
|
-
var data = _taggedTemplateLiteralLoose(["\n position: relative;\n transform: scale(0.6);\n opacity: 0.4;\n min-width: 20px;\n animation: ", " 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n"]);
|
|
1255
|
-
_templateObject4$1 = function _templateObject4() {
|
|
1256
|
-
return data;
|
|
1257
|
-
};
|
|
1258
|
-
return data;
|
|
1259
|
-
}
|
|
1260
|
-
function _templateObject3$2() {
|
|
1261
|
-
var data = _taggedTemplateLiteralLoose(["\nfrom {\n transform: scale(0.6);\n opacity: 0.4;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}"]);
|
|
1262
|
-
_templateObject3$2 = function _templateObject3() {
|
|
1263
|
-
return data;
|
|
1264
|
-
};
|
|
1265
|
-
return data;
|
|
1266
|
-
}
|
|
1267
|
-
function _templateObject2$3() {
|
|
1268
|
-
var data = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 20px;\n min-height: 20px;\n"]);
|
|
1269
|
-
_templateObject2$3 = function _templateObject2() {
|
|
1270
|
-
return data;
|
|
1271
|
-
};
|
|
1272
|
-
return data;
|
|
1273
|
-
}
|
|
1274
|
-
function _templateObject$3() {
|
|
1275
|
-
var data = _taggedTemplateLiteralLoose(["\n position: absolute;\n"]);
|
|
1276
|
-
_templateObject$3 = function _templateObject() {
|
|
1277
|
-
return data;
|
|
1278
|
-
};
|
|
1279
|
-
return data;
|
|
1280
|
-
}
|
|
1281
|
-
var StatusWrapper = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject$3());
|
|
1282
|
-
var IndicatorWrapper = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject2$3());
|
|
1283
|
-
var enter = /*#__PURE__*/h( /*#__PURE__*/_templateObject3$2());
|
|
1284
|
-
var AnimatedIconWrapper = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject4$1(), enter);
|
|
1285
|
-
var ToastIcon = function ToastIcon(_ref) {
|
|
1286
|
-
var toast = _ref.toast;
|
|
1287
|
-
var icon = toast.icon,
|
|
1288
|
-
type = toast.type,
|
|
1289
|
-
iconTheme = toast.iconTheme;
|
|
1290
|
-
if (icon !== undefined) {
|
|
1291
|
-
if (typeof icon === 'string') {
|
|
1292
|
-
return /*#__PURE__*/extractErrorMessage.y(AnimatedIconWrapper, null, icon);
|
|
1293
|
-
} else {
|
|
1294
|
-
return icon;
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
if (type === 'blank') {
|
|
1298
|
-
return null;
|
|
1299
|
-
}
|
|
1300
|
-
return /*#__PURE__*/extractErrorMessage.y(IndicatorWrapper, null, /*#__PURE__*/extractErrorMessage.y(LoaderIcon, Object.assign({}, iconTheme)), type !== 'loading' && /*#__PURE__*/extractErrorMessage.y(StatusWrapper, null, type === 'error' ? /*#__PURE__*/extractErrorMessage.y(ErrorIcon$1, Object.assign({}, iconTheme)) : /*#__PURE__*/extractErrorMessage.y(CheckmarkIcon, Object.assign({}, iconTheme))));
|
|
1301
|
-
};
|
|
1302
|
-
function _templateObject2$4() {
|
|
1303
|
-
var data = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n margin: 4px 10px;\n color: inherit;\n flex: 1 1 auto;\n white-space: pre-line;\n"]);
|
|
1304
|
-
_templateObject2$4 = function _templateObject2() {
|
|
1305
|
-
return data;
|
|
1306
|
-
};
|
|
1307
|
-
return data;
|
|
1308
|
-
}
|
|
1309
|
-
function _templateObject$4() {
|
|
1310
|
-
var data = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n background: #fff;\n color: #363636;\n line-height: 1.3;\n will-change: transform;\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);\n max-width: 350px;\n pointer-events: auto;\n padding: 8px 10px;\n border-radius: 8px;\n"]);
|
|
1311
|
-
_templateObject$4 = function _templateObject() {
|
|
1312
|
-
return data;
|
|
1313
|
-
};
|
|
1314
|
-
return data;
|
|
1315
|
-
}
|
|
1316
|
-
var enterAnimation = function enterAnimation(factor) {
|
|
1317
|
-
return "\n0% {transform: translate3d(0," + factor * -200 + "%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n";
|
|
1318
|
-
};
|
|
1319
|
-
var exitAnimation = function exitAnimation(factor) {
|
|
1320
|
-
return "\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0," + factor * -150 + "%,-1px) scale(.6); opacity:0;}\n";
|
|
1321
|
-
};
|
|
1322
|
-
var fadeInAnimation = "0%{opacity:0;} 100%{opacity:1;}";
|
|
1323
|
-
var fadeOutAnimation = "0%{opacity:1;} 100%{opacity:0;}";
|
|
1324
|
-
var ToastBarBase = /*#__PURE__*/j('div', extractErrorMessage.N)( /*#__PURE__*/_templateObject$4());
|
|
1325
|
-
var Message = /*#__PURE__*/j('div')( /*#__PURE__*/_templateObject2$4());
|
|
1326
|
-
var getAnimationStyle = function getAnimationStyle(position, visible) {
|
|
1327
|
-
var top = position.includes('top');
|
|
1328
|
-
var factor = top ? 1 : -1;
|
|
1329
|
-
var _ref = prefersReducedMotion() ? [fadeInAnimation, fadeOutAnimation] : [enterAnimation(factor), exitAnimation(factor)],
|
|
1330
|
-
enter = _ref[0],
|
|
1331
|
-
exit = _ref[1];
|
|
1332
|
-
return {
|
|
1333
|
-
animation: visible ? h(enter) + " 0.35s cubic-bezier(.21,1.02,.73,1) forwards" : h(exit) + " 0.4s forwards cubic-bezier(.06,.71,.55,1)"
|
|
1334
|
-
};
|
|
1335
|
-
};
|
|
1336
|
-
var ToastBar = /*#__PURE__*/extractErrorMessage.w(function (_ref2) {
|
|
1337
|
-
var toast = _ref2.toast,
|
|
1338
|
-
position = _ref2.position,
|
|
1339
|
-
style = _ref2.style,
|
|
1340
|
-
children = _ref2.children;
|
|
1341
|
-
var animationStyle = toast != null && toast.height ? getAnimationStyle(toast.position || position || 'top-center', toast.visible) : {
|
|
1342
|
-
opacity: 0
|
|
1343
|
-
};
|
|
1344
|
-
var icon = /*#__PURE__*/extractErrorMessage.y(ToastIcon, {
|
|
1345
|
-
toast: toast
|
|
1098
|
+
var oe = h$1(_templateObject || (_templateObject = _taggedTemplateLiteral(["\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n opacity: 1;\n}"]))),
|
|
1099
|
+
re = h$1(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\nfrom {\n transform: scale(0);\n opacity: 0;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}"]))),
|
|
1100
|
+
se = h$1(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\nfrom {\n transform: scale(0) rotate(90deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(90deg);\n\topacity: 1;\n}"]))),
|
|
1101
|
+
_ = j("div")(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ", ";\n position: relative;\n transform: rotate(45deg);\n\n animation: ", " 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n\n &:after,\n &:before {\n content: '';\n animation: ", " 0.15s ease-out forwards;\n animation-delay: 150ms;\n position: absolute;\n border-radius: 3px;\n opacity: 0;\n background: ", ";\n bottom: 9px;\n left: 4px;\n height: 2px;\n width: 12px;\n }\n\n &:before {\n animation: ", " 0.15s ease-out forwards;\n animation-delay: 180ms;\n transform: rotate(90deg);\n }\n"])), function (e) {
|
|
1102
|
+
return e.primary || "#ff4b4b";
|
|
1103
|
+
}, oe, re, function (e) {
|
|
1104
|
+
return e.secondary || "#fff";
|
|
1105
|
+
}, se);
|
|
1106
|
+
var ne = h$1(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"]))),
|
|
1107
|
+
V = j("div")(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 12px;\n height: 12px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: ", ";\n border-right-color: ", ";\n animation: ", " 1s linear infinite;\n"])), function (e) {
|
|
1108
|
+
return e.secondary || "#e0e0e0";
|
|
1109
|
+
}, function (e) {
|
|
1110
|
+
return e.primary || "#616161";
|
|
1111
|
+
}, ne);
|
|
1112
|
+
var pe = h$1(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n\topacity: 1;\n}"]))),
|
|
1113
|
+
de = h$1(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n0% {\n\theight: 0;\n\twidth: 0;\n\topacity: 0;\n}\n40% {\n height: 0;\n\twidth: 6px;\n\topacity: 1;\n}\n100% {\n opacity: 1;\n height: 10px;\n}"]))),
|
|
1114
|
+
w = j("div")(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ", ";\n position: relative;\n transform: rotate(45deg);\n\n animation: ", " 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n &:after {\n content: '';\n box-sizing: border-box;\n animation: ", " 0.2s ease-out forwards;\n opacity: 0;\n animation-delay: 200ms;\n position: absolute;\n border-right: 2px solid;\n border-bottom: 2px solid;\n border-color: ", ";\n bottom: 6px;\n left: 6px;\n height: 10px;\n width: 6px;\n }\n"])), function (e) {
|
|
1115
|
+
return e.primary || "#61d345";
|
|
1116
|
+
}, pe, de, function (e) {
|
|
1117
|
+
return e.secondary || "#fff";
|
|
1346
1118
|
});
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
var data = _taggedTemplateLiteralLoose(["\n z-index: 9999;\n > * {\n pointer-events: auto;\n }\n"]);
|
|
1358
|
-
_templateObject$5 = function _templateObject() {
|
|
1359
|
-
return data;
|
|
1119
|
+
var ue = j("div")(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n position: absolute;\n"]))),
|
|
1120
|
+
le = j("div")(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 20px;\n min-height: 20px;\n"]))),
|
|
1121
|
+
Te = h$1(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\nfrom {\n transform: scale(0.6);\n opacity: 0.4;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}"]))),
|
|
1122
|
+
fe = j("div")(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n position: relative;\n transform: scale(0.6);\n opacity: 0.4;\n min-width: 20px;\n animation: ", " 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n"])), Te),
|
|
1123
|
+
M = function M(_ref6) {
|
|
1124
|
+
var e = _ref6.toast;
|
|
1125
|
+
var t = e.icon,
|
|
1126
|
+
o = e.type,
|
|
1127
|
+
s = e.iconTheme;
|
|
1128
|
+
return t !== void 0 ? typeof t == "string" ? extractErrorMessage.y(fe, null, t) : t : o === "blank" ? null : extractErrorMessage.y(le, null, extractErrorMessage.y(V, _objectSpread({}, s)), o !== "loading" && extractErrorMessage.y(ue, null, o === "error" ? extractErrorMessage.y(_, _objectSpread({}, s)) : extractErrorMessage.y(w, _objectSpread({}, s))));
|
|
1360
1129
|
};
|
|
1361
|
-
|
|
1362
|
-
}
|
|
1130
|
+
var ye = function ye(e) {
|
|
1131
|
+
return "\n0% {transform: translate3d(0,".concat(e * -200, "%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n");
|
|
1132
|
+
},
|
|
1133
|
+
ge = function ge(e) {
|
|
1134
|
+
return "\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,".concat(e * -150, "%,-1px) scale(.6); opacity:0;}\n");
|
|
1135
|
+
},
|
|
1136
|
+
he = "0%{opacity:0;} 100%{opacity:1;}",
|
|
1137
|
+
xe = "0%{opacity:1;} 100%{opacity:0;}",
|
|
1138
|
+
be = j("div")(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n background: #fff;\n color: #363636;\n line-height: 1.3;\n will-change: transform;\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);\n max-width: 350px;\n pointer-events: auto;\n padding: 8px 10px;\n border-radius: 8px;\n"]))),
|
|
1139
|
+
Se = j("div")(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n margin: 4px 10px;\n color: inherit;\n flex: 1 1 auto;\n white-space: pre-line;\n"]))),
|
|
1140
|
+
Ae = function Ae(e, t) {
|
|
1141
|
+
var s = e.includes("top") ? 1 : -1,
|
|
1142
|
+
_ref7 = b() ? [he, xe] : [ye(s), ge(s)],
|
|
1143
|
+
_ref8 = _slicedToArray(_ref7, 2),
|
|
1144
|
+
a = _ref8[0],
|
|
1145
|
+
r = _ref8[1];
|
|
1146
|
+
return {
|
|
1147
|
+
animation: t ? "".concat(h$1(a), " 0.35s cubic-bezier(.21,1.02,.73,1) forwards") : "".concat(h$1(r), " 0.4s forwards cubic-bezier(.06,.71,.55,1)")
|
|
1148
|
+
};
|
|
1149
|
+
},
|
|
1150
|
+
F = extractErrorMessage.w(function (_ref9) {
|
|
1151
|
+
var e = _ref9.toast,
|
|
1152
|
+
t = _ref9.position,
|
|
1153
|
+
o = _ref9.style,
|
|
1154
|
+
s = _ref9.children;
|
|
1155
|
+
var a = e.height ? Ae(e.position || t || "top-center", e.visible) : {
|
|
1156
|
+
opacity: 0
|
|
1157
|
+
},
|
|
1158
|
+
r = extractErrorMessage.y(M, {
|
|
1159
|
+
toast: e
|
|
1160
|
+
}),
|
|
1161
|
+
c = extractErrorMessage.y(Se, _objectSpread({}, e.ariaProps), T(e.message, e));
|
|
1162
|
+
return extractErrorMessage.y(be, {
|
|
1163
|
+
className: e.className,
|
|
1164
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, a), o), e.style)
|
|
1165
|
+
}, typeof s == "function" ? s({
|
|
1166
|
+
icon: r,
|
|
1167
|
+
message: c
|
|
1168
|
+
}) : extractErrorMessage.y(extractErrorMessage.g, null, r, c));
|
|
1169
|
+
});
|
|
1363
1170
|
m(extractErrorMessage.y);
|
|
1364
|
-
var
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
},
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
var
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1171
|
+
var Ee = function Ee(_ref10) {
|
|
1172
|
+
var e = _ref10.id,
|
|
1173
|
+
t = _ref10.className,
|
|
1174
|
+
o = _ref10.style,
|
|
1175
|
+
s = _ref10.onHeightUpdate,
|
|
1176
|
+
a = _ref10.children;
|
|
1177
|
+
var r = extractErrorMessage.T(function (c) {
|
|
1178
|
+
if (c) {
|
|
1179
|
+
var _i2 = function _i2() {
|
|
1180
|
+
var d = c.getBoundingClientRect().height;
|
|
1181
|
+
s(e, d);
|
|
1182
|
+
};
|
|
1183
|
+
_i2(), new MutationObserver(_i2).observe(c, {
|
|
1184
|
+
subtree: !0,
|
|
1185
|
+
childList: !0,
|
|
1186
|
+
characterData: !0
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
}, [e, s]);
|
|
1190
|
+
return extractErrorMessage.y("div", {
|
|
1191
|
+
ref: r,
|
|
1192
|
+
className: t,
|
|
1193
|
+
style: o
|
|
1194
|
+
}, a);
|
|
1195
|
+
},
|
|
1196
|
+
Re = function Re(e, t) {
|
|
1197
|
+
var o = e.includes("top"),
|
|
1198
|
+
s = o ? {
|
|
1199
|
+
top: 0
|
|
1200
|
+
} : {
|
|
1201
|
+
bottom: 0
|
|
1202
|
+
},
|
|
1203
|
+
a = e.includes("center") ? {
|
|
1204
|
+
justifyContent: "center"
|
|
1205
|
+
} : e.includes("right") ? {
|
|
1206
|
+
justifyContent: "flex-end"
|
|
1207
|
+
} : {};
|
|
1208
|
+
return _objectSpread(_objectSpread({
|
|
1209
|
+
left: 0,
|
|
1210
|
+
right: 0,
|
|
1211
|
+
display: "flex",
|
|
1212
|
+
position: "absolute",
|
|
1213
|
+
transition: b() ? void 0 : "all 230ms cubic-bezier(.21,1.02,.73,1)",
|
|
1214
|
+
transform: "translateY(".concat(t * (o ? 1 : -1), "px)")
|
|
1215
|
+
}, s), a);
|
|
1216
|
+
},
|
|
1217
|
+
ve = u$1(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n z-index: 9999;\n > * {\n pointer-events: auto;\n }\n"]))),
|
|
1218
|
+
O = 16,
|
|
1219
|
+
Ie = function Ie(_ref11) {
|
|
1220
|
+
var e = _ref11.reverseOrder,
|
|
1221
|
+
_ref11$position = _ref11.position,
|
|
1222
|
+
t = _ref11$position === void 0 ? "top-center" : _ref11$position,
|
|
1223
|
+
o = _ref11.toastOptions,
|
|
1224
|
+
s = _ref11.gutter,
|
|
1225
|
+
a = _ref11.children,
|
|
1226
|
+
r = _ref11.containerStyle,
|
|
1227
|
+
c = _ref11.containerClassName;
|
|
1228
|
+
var _D = D(o),
|
|
1229
|
+
i = _D.toasts,
|
|
1230
|
+
d = _D.handlers;
|
|
1231
|
+
return extractErrorMessage.y("div", {
|
|
1232
|
+
style: _objectSpread({
|
|
1233
|
+
position: "fixed",
|
|
1234
|
+
zIndex: 9999,
|
|
1235
|
+
top: O,
|
|
1236
|
+
left: O,
|
|
1237
|
+
right: O,
|
|
1238
|
+
bottom: O,
|
|
1239
|
+
pointerEvents: "none"
|
|
1240
|
+
}, r),
|
|
1241
|
+
className: c,
|
|
1242
|
+
onMouseEnter: d.startPause,
|
|
1243
|
+
onMouseLeave: d.endPause
|
|
1244
|
+
}, i.map(function (p) {
|
|
1245
|
+
var g = p.position || t,
|
|
1246
|
+
E = d.calculateOffset(p, {
|
|
1247
|
+
reverseOrder: e,
|
|
1248
|
+
gutter: s,
|
|
1249
|
+
defaultPosition: t
|
|
1250
|
+
}),
|
|
1251
|
+
x = Re(g, E);
|
|
1252
|
+
return extractErrorMessage.y(Ee, {
|
|
1253
|
+
id: p.id,
|
|
1254
|
+
key: p.id,
|
|
1255
|
+
onHeightUpdate: d.updateHeight,
|
|
1256
|
+
className: p.visible ? ve : "",
|
|
1257
|
+
style: x
|
|
1258
|
+
}, p.type === "custom" ? T(p.message, p) : a ? a(p) : extractErrorMessage.y(F, {
|
|
1259
|
+
toast: p,
|
|
1260
|
+
position: g
|
|
1261
|
+
}));
|
|
1431
1262
|
}));
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
var toast$1 = toast;
|
|
1263
|
+
};
|
|
1264
|
+
var _t = n;
|
|
1435
1265
|
var SuccessIcon = function SuccessIcon() {
|
|
1436
1266
|
return /*#__PURE__*/extractErrorMessage.y("svg", {
|
|
1437
1267
|
width: "20",
|
|
@@ -1474,7 +1304,7 @@ var errorStyles = Object.assign(Object.assign({}, baseStyles), {
|
|
|
1474
1304
|
color: '#590607'
|
|
1475
1305
|
});
|
|
1476
1306
|
var Snackbar = function Snackbar() {
|
|
1477
|
-
return /*#__PURE__*/extractErrorMessage.wn.createElement(
|
|
1307
|
+
return /*#__PURE__*/extractErrorMessage.wn.createElement(Ie, {
|
|
1478
1308
|
containerStyle: {
|
|
1479
1309
|
position: 'sticky',
|
|
1480
1310
|
marginTop: '4px',
|
|
@@ -1498,91 +1328,91 @@ var itemOrNone = function itemOrNone(item) {
|
|
|
1498
1328
|
var spaceOrNone = function spaceOrNone(space) {
|
|
1499
1329
|
return space ? "".concat(space, "px") : undefined;
|
|
1500
1330
|
};
|
|
1501
|
-
var Flex = extractErrorMessage.He.div(
|
|
1502
|
-
var inline =
|
|
1331
|
+
var Flex = extractErrorMessage.He.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: ", ";\n\n flex-direction: ", ";\n justify-content: ", ";\n align-items: ", ";\n flex-grow: ", ";\n flex-shrink: ", ";\n order: ", ";\n align-self: ", ";\n flex-flow: ", ";\n flex-wrap: ", ";\n\n width: ", ";\n height: ", ";\n max-width: ", ";\n max-height: ", ";\n min-width: ", ";\n min-height: ", ";\n padding: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n padding-top: ", ";\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n\n gap: ", ";\n"])), function (_ref12) {
|
|
1332
|
+
var inline = _ref12.inline;
|
|
1503
1333
|
return inline ? 'inline-flex' : 'flex';
|
|
1504
|
-
}, function (
|
|
1505
|
-
var direction =
|
|
1334
|
+
}, function (_ref13) {
|
|
1335
|
+
var direction = _ref13.direction;
|
|
1506
1336
|
return itemOrNone(direction);
|
|
1507
|
-
}, function (
|
|
1508
|
-
var justifyContent =
|
|
1509
|
-
center =
|
|
1337
|
+
}, function (_ref14) {
|
|
1338
|
+
var justifyContent = _ref14.justifyContent,
|
|
1339
|
+
center = _ref14.center;
|
|
1510
1340
|
return center ? 'center' : itemOrNone(justifyContent);
|
|
1511
|
-
}, function (
|
|
1512
|
-
var alignItems =
|
|
1513
|
-
center =
|
|
1341
|
+
}, function (_ref15) {
|
|
1342
|
+
var alignItems = _ref15.alignItems,
|
|
1343
|
+
center = _ref15.center;
|
|
1514
1344
|
return center ? 'center' : itemOrNone(alignItems);
|
|
1515
|
-
}, function (
|
|
1516
|
-
var grow =
|
|
1345
|
+
}, function (_ref16) {
|
|
1346
|
+
var grow = _ref16.grow;
|
|
1517
1347
|
return itemOrNone(grow);
|
|
1518
|
-
}, function (
|
|
1519
|
-
var shrink =
|
|
1348
|
+
}, function (_ref17) {
|
|
1349
|
+
var shrink = _ref17.shrink;
|
|
1520
1350
|
return itemOrNone(shrink);
|
|
1521
|
-
}, function (
|
|
1522
|
-
var order =
|
|
1351
|
+
}, function (_ref18) {
|
|
1352
|
+
var order = _ref18.order;
|
|
1523
1353
|
return itemOrNone(order);
|
|
1524
|
-
}, function (
|
|
1525
|
-
var alignSelf =
|
|
1354
|
+
}, function (_ref19) {
|
|
1355
|
+
var alignSelf = _ref19.alignSelf;
|
|
1526
1356
|
return itemOrNone(alignSelf);
|
|
1527
|
-
}, function (
|
|
1528
|
-
var flow =
|
|
1357
|
+
}, function (_ref20) {
|
|
1358
|
+
var flow = _ref20.flow;
|
|
1529
1359
|
return itemOrNone(flow);
|
|
1530
|
-
}, function (
|
|
1531
|
-
var wrap =
|
|
1360
|
+
}, function (_ref21) {
|
|
1361
|
+
var wrap = _ref21.wrap;
|
|
1532
1362
|
return itemOrNone(wrap);
|
|
1533
|
-
}, function (
|
|
1534
|
-
var width =
|
|
1363
|
+
}, function (_ref22) {
|
|
1364
|
+
var width = _ref22.width;
|
|
1535
1365
|
return typeof width === 'string' ? width : spaceOrNone(width);
|
|
1536
|
-
}, function (
|
|
1537
|
-
var height =
|
|
1366
|
+
}, function (_ref23) {
|
|
1367
|
+
var height = _ref23.height;
|
|
1538
1368
|
return typeof height === 'string' ? height : spaceOrNone(height);
|
|
1539
|
-
}, function (
|
|
1540
|
-
var maxWidth =
|
|
1369
|
+
}, function (_ref24) {
|
|
1370
|
+
var maxWidth = _ref24.maxWidth;
|
|
1541
1371
|
return typeof maxWidth === 'string' ? maxWidth : spaceOrNone(maxWidth);
|
|
1542
|
-
}, function (
|
|
1543
|
-
var maxHeight =
|
|
1372
|
+
}, function (_ref25) {
|
|
1373
|
+
var maxHeight = _ref25.maxHeight;
|
|
1544
1374
|
return typeof maxHeight === 'string' ? maxHeight : spaceOrNone(maxHeight);
|
|
1545
|
-
}, function (
|
|
1546
|
-
var minWidth =
|
|
1375
|
+
}, function (_ref26) {
|
|
1376
|
+
var minWidth = _ref26.minWidth;
|
|
1547
1377
|
return typeof minWidth === 'string' ? minWidth : spaceOrNone(minWidth);
|
|
1548
|
-
}, function (
|
|
1549
|
-
var minHeight =
|
|
1378
|
+
}, function (_ref27) {
|
|
1379
|
+
var minHeight = _ref27.minHeight;
|
|
1550
1380
|
return typeof minHeight === 'string' ? minHeight : spaceOrNone(minHeight);
|
|
1551
|
-
}, function (
|
|
1552
|
-
var padding =
|
|
1381
|
+
}, function (_ref28) {
|
|
1382
|
+
var padding = _ref28.padding;
|
|
1553
1383
|
return spaceOrNone(padding);
|
|
1554
|
-
}, function (
|
|
1555
|
-
var margin =
|
|
1384
|
+
}, function (_ref29) {
|
|
1385
|
+
var margin = _ref29.margin;
|
|
1556
1386
|
return spaceOrNone(margin);
|
|
1557
|
-
}, function (
|
|
1558
|
-
var marginTop =
|
|
1387
|
+
}, function (_ref30) {
|
|
1388
|
+
var marginTop = _ref30.marginTop;
|
|
1559
1389
|
return spaceOrNone(marginTop);
|
|
1560
|
-
}, function (
|
|
1561
|
-
var marginRight =
|
|
1390
|
+
}, function (_ref31) {
|
|
1391
|
+
var marginRight = _ref31.marginRight;
|
|
1562
1392
|
return spaceOrNone(marginRight);
|
|
1563
|
-
}, function (
|
|
1564
|
-
var marginBottom =
|
|
1393
|
+
}, function (_ref32) {
|
|
1394
|
+
var marginBottom = _ref32.marginBottom;
|
|
1565
1395
|
return spaceOrNone(marginBottom);
|
|
1566
|
-
}, function (
|
|
1567
|
-
var marginLeft =
|
|
1396
|
+
}, function (_ref33) {
|
|
1397
|
+
var marginLeft = _ref33.marginLeft;
|
|
1568
1398
|
return spaceOrNone(marginLeft);
|
|
1569
|
-
}, function (
|
|
1570
|
-
var paddingTop =
|
|
1399
|
+
}, function (_ref34) {
|
|
1400
|
+
var paddingTop = _ref34.paddingTop;
|
|
1571
1401
|
return spaceOrNone(paddingTop);
|
|
1572
|
-
}, function (
|
|
1573
|
-
var paddingRight =
|
|
1402
|
+
}, function (_ref35) {
|
|
1403
|
+
var paddingRight = _ref35.paddingRight;
|
|
1574
1404
|
return spaceOrNone(paddingRight);
|
|
1575
|
-
}, function (
|
|
1576
|
-
var paddingBottom =
|
|
1405
|
+
}, function (_ref36) {
|
|
1406
|
+
var paddingBottom = _ref36.paddingBottom;
|
|
1577
1407
|
return spaceOrNone(paddingBottom);
|
|
1578
|
-
}, function (
|
|
1579
|
-
var paddingLeft =
|
|
1408
|
+
}, function (_ref37) {
|
|
1409
|
+
var paddingLeft = _ref37.paddingLeft;
|
|
1580
1410
|
return spaceOrNone(paddingLeft);
|
|
1581
|
-
}, function (
|
|
1582
|
-
var gap =
|
|
1411
|
+
}, function (_ref38) {
|
|
1412
|
+
var gap = _ref38.gap;
|
|
1583
1413
|
return spaceOrNone(gap);
|
|
1584
1414
|
});
|
|
1585
|
-
var Text = extractErrorMessage.He.div(
|
|
1415
|
+
var Text = extractErrorMessage.He.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n color: ", ";\n text-align: ", ";\n ", ";\n"])), function (props) {
|
|
1586
1416
|
return props.color && props.theme.colors[props.color];
|
|
1587
1417
|
}, function (props) {
|
|
1588
1418
|
return props.align;
|
|
@@ -1664,7 +1494,7 @@ var ErrorSVG = function ErrorSVG() {
|
|
|
1664
1494
|
stopColor: "#E4C7C7"
|
|
1665
1495
|
}))));
|
|
1666
1496
|
};
|
|
1667
|
-
var ErrorHeader = extractErrorMessage.He(Text)(
|
|
1497
|
+
var ErrorHeader = extractErrorMessage.He(Text)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n text-align: center;\n"])));
|
|
1668
1498
|
var ErrorScreen = function ErrorScreen() {
|
|
1669
1499
|
var _a, _b;
|
|
1670
1500
|
var _useGlobalReducer = useGlobalReducer(),
|
|
@@ -1683,29 +1513,29 @@ var ErrorScreen = function ErrorScreen() {
|
|
|
1683
1513
|
var mutation = function mutation() {
|
|
1684
1514
|
return function (key, fetcher) {
|
|
1685
1515
|
var config = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1686
|
-
var _extractErrorMessage$ = extractErrorMessage.useSWRConfig(),
|
|
1687
|
-
mutate = _extractErrorMessage
|
|
1516
|
+
var _extractErrorMessage$3 = extractErrorMessage.useSWRConfig(),
|
|
1517
|
+
mutate = _extractErrorMessage$3.mutate;
|
|
1688
1518
|
var keyRef = extractErrorMessage._(key);
|
|
1689
1519
|
var fetcherRef = extractErrorMessage._(fetcher);
|
|
1690
1520
|
var configRef = extractErrorMessage._(config);
|
|
1691
1521
|
var ditchMutationsUntilRef = extractErrorMessage._(0);
|
|
1692
|
-
var _extractErrorMessage$
|
|
1522
|
+
var _extractErrorMessage$4 = extractErrorMessage.useStateWithDeps({
|
|
1693
1523
|
data: extractErrorMessage.UNDEFINED,
|
|
1694
1524
|
error: extractErrorMessage.UNDEFINED,
|
|
1695
1525
|
isMutating: false
|
|
1696
1526
|
}),
|
|
1697
|
-
_extractErrorMessage$
|
|
1698
|
-
stateRef = _extractErrorMessage$
|
|
1699
|
-
stateDependencies = _extractErrorMessage$
|
|
1700
|
-
setState = _extractErrorMessage$
|
|
1527
|
+
_extractErrorMessage$5 = _slicedToArray(_extractErrorMessage$4, 3),
|
|
1528
|
+
stateRef = _extractErrorMessage$5[0],
|
|
1529
|
+
stateDependencies = _extractErrorMessage$5[1],
|
|
1530
|
+
setState = _extractErrorMessage$5[2];
|
|
1701
1531
|
var currentState = stateRef.current;
|
|
1702
1532
|
var trigger = extractErrorMessage.T( /*#__PURE__*/function () {
|
|
1703
|
-
var
|
|
1704
|
-
var _extractErrorMessage$
|
|
1533
|
+
var _ref39 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(arg, opts) {
|
|
1534
|
+
var _extractErrorMessage$6, _extractErrorMessage$7, serializedKey, resolvedKey, options, mutationStartedAt, data;
|
|
1705
1535
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1706
1536
|
while (1) switch (_context.prev = _context.next) {
|
|
1707
1537
|
case 0:
|
|
1708
|
-
_extractErrorMessage$
|
|
1538
|
+
_extractErrorMessage$6 = extractErrorMessage.serialize(keyRef.current), _extractErrorMessage$7 = _slicedToArray(_extractErrorMessage$6, 2), serializedKey = _extractErrorMessage$7[0], resolvedKey = _extractErrorMessage$7[1];
|
|
1709
1539
|
if (fetcherRef.current) {
|
|
1710
1540
|
_context.next = 3;
|
|
1711
1541
|
break;
|
|
@@ -1769,7 +1599,7 @@ var mutation = function mutation() {
|
|
|
1769
1599
|
}, _callee, null, [[9, 17]]);
|
|
1770
1600
|
}));
|
|
1771
1601
|
return function (_x, _x2) {
|
|
1772
|
-
return
|
|
1602
|
+
return _ref39.apply(this, arguments);
|
|
1773
1603
|
};
|
|
1774
1604
|
}(), []);
|
|
1775
1605
|
var reset = extractErrorMessage.T(function () {
|
|
@@ -1846,20 +1676,20 @@ var useExtractSlug = function useExtractSlug() {
|
|
|
1846
1676
|
_useGlobalReducer4 = _slicedToArray(_useGlobalReducer3, 2),
|
|
1847
1677
|
state = _useGlobalReducer4[0],
|
|
1848
1678
|
dispatch = _useGlobalReducer4[1];
|
|
1849
|
-
var _extractErrorMessage$
|
|
1850
|
-
_extractErrorMessage$
|
|
1851
|
-
pattern = _extractErrorMessage$
|
|
1852
|
-
setPattern = _extractErrorMessage$
|
|
1679
|
+
var _extractErrorMessage$8 = extractErrorMessage.h(),
|
|
1680
|
+
_extractErrorMessage$9 = _slicedToArray(_extractErrorMessage$8, 2),
|
|
1681
|
+
pattern = _extractErrorMessage$9[0],
|
|
1682
|
+
setPattern = _extractErrorMessage$9[1];
|
|
1853
1683
|
var stytchClient = useStytch();
|
|
1854
1684
|
var slug = extractFromPattern(pattern || null);
|
|
1855
|
-
var _useMutate = useMutate('stytchClient.organization.getBySlug', function (_,
|
|
1856
|
-
var slug =
|
|
1685
|
+
var _useMutate = useMutate('stytchClient.organization.getBySlug', function (_, _ref40) {
|
|
1686
|
+
var slug = _ref40.arg.slug;
|
|
1857
1687
|
return stytchClient.organization.getBySlug({
|
|
1858
1688
|
organization_slug: slug
|
|
1859
1689
|
});
|
|
1860
1690
|
}, {
|
|
1861
|
-
onSuccess: function onSuccess(
|
|
1862
|
-
var organization =
|
|
1691
|
+
onSuccess: function onSuccess(_ref41) {
|
|
1692
|
+
var organization = _ref41.organization;
|
|
1863
1693
|
if (organization === null) {
|
|
1864
1694
|
dispatch({
|
|
1865
1695
|
type: 'set_error_message_and_transition',
|
|
@@ -1876,8 +1706,8 @@ var useExtractSlug = function useExtractSlug() {
|
|
|
1876
1706
|
trigger = _useMutate.trigger,
|
|
1877
1707
|
isSearching = _useMutate.isMutating;
|
|
1878
1708
|
extractErrorMessage.p(function () {
|
|
1879
|
-
internal.readB2BInternals(stytchClient).bootstrap.getAsync().then(function (
|
|
1880
|
-
var slugPattern =
|
|
1709
|
+
internal.readB2BInternals(stytchClient).bootstrap.getAsync().then(function (_ref42) {
|
|
1710
|
+
var slugPattern = _ref42.slugPattern;
|
|
1881
1711
|
setPattern(slugPattern);
|
|
1882
1712
|
});
|
|
1883
1713
|
}, [stytchClient]);
|
|
@@ -1896,10 +1726,10 @@ var useExtractSlug = function useExtractSlug() {
|
|
|
1896
1726
|
};
|
|
1897
1727
|
var useBootstrap = function useBootstrap() {
|
|
1898
1728
|
var stytchClient = useStytch();
|
|
1899
|
-
var _extractErrorMessage$
|
|
1900
|
-
_extractErrorMessage$
|
|
1901
|
-
boostrap = _extractErrorMessage$
|
|
1902
|
-
setBootstrap = _extractErrorMessage$
|
|
1729
|
+
var _extractErrorMessage$10 = extractErrorMessage.h(internal.readB2BInternals(stytchClient).bootstrap.getSync()),
|
|
1730
|
+
_extractErrorMessage$11 = _slicedToArray(_extractErrorMessage$10, 2),
|
|
1731
|
+
boostrap = _extractErrorMessage$11[0],
|
|
1732
|
+
setBootstrap = _extractErrorMessage$11[1];
|
|
1903
1733
|
extractErrorMessage.p(function () {
|
|
1904
1734
|
internal.readB2BInternals(stytchClient).bootstrap.getAsync().then(function (data) {
|
|
1905
1735
|
setBootstrap(data);
|
|
@@ -1923,22 +1753,22 @@ var usePasswordInput = function usePasswordInput() {
|
|
|
1923
1753
|
var stytch = useStytch();
|
|
1924
1754
|
var onEvent = useEventCallback();
|
|
1925
1755
|
var onError = useErrorCallback();
|
|
1926
|
-
var _extractErrorMessage$
|
|
1927
|
-
_extractErrorMessage$11 = _slicedToArray(_extractErrorMessage$10, 2),
|
|
1928
|
-
email = _extractErrorMessage$11[0],
|
|
1929
|
-
setEmail = _extractErrorMessage$11[1];
|
|
1930
|
-
var _extractErrorMessage$12 = extractErrorMessage.h(''),
|
|
1756
|
+
var _extractErrorMessage$12 = extractErrorMessage.h(state.formState.passwordState.email),
|
|
1931
1757
|
_extractErrorMessage$13 = _slicedToArray(_extractErrorMessage$12, 2),
|
|
1932
|
-
|
|
1933
|
-
|
|
1758
|
+
email = _extractErrorMessage$13[0],
|
|
1759
|
+
setEmail = _extractErrorMessage$13[1];
|
|
1934
1760
|
var _extractErrorMessage$14 = extractErrorMessage.h(''),
|
|
1935
1761
|
_extractErrorMessage$15 = _slicedToArray(_extractErrorMessage$14, 2),
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
var _extractErrorMessage$16 = extractErrorMessage.h(
|
|
1762
|
+
password = _extractErrorMessage$15[0],
|
|
1763
|
+
setPassword = _extractErrorMessage$15[1];
|
|
1764
|
+
var _extractErrorMessage$16 = extractErrorMessage.h(''),
|
|
1939
1765
|
_extractErrorMessage$17 = _slicedToArray(_extractErrorMessage$16, 2),
|
|
1940
|
-
|
|
1941
|
-
|
|
1766
|
+
errorMessage = _extractErrorMessage$17[0],
|
|
1767
|
+
setErrorMessage = _extractErrorMessage$17[1];
|
|
1768
|
+
var _extractErrorMessage$18 = extractErrorMessage.h(false),
|
|
1769
|
+
_extractErrorMessage$19 = _slicedToArray(_extractErrorMessage$18, 2),
|
|
1770
|
+
isSubmitting = _extractErrorMessage$19[0],
|
|
1771
|
+
setIsSubmitting = _extractErrorMessage$19[1];
|
|
1942
1772
|
var organization = state.flowState.organization;
|
|
1943
1773
|
var submitPassword = function submitPassword(organization_id) {
|
|
1944
1774
|
var _a, _b;
|
|
@@ -2028,7 +1858,7 @@ var extractFromPattern = function extractFromPattern(pattern) {
|
|
|
2028
1858
|
}
|
|
2029
1859
|
return null;
|
|
2030
1860
|
};
|
|
2031
|
-
var Button = extractErrorMessage.He.button(
|
|
1861
|
+
var Button = extractErrorMessage.He.button(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n all: unset;\n width: 100%;\n height: 45px;\n border-radius: 4px;\n cursor: pointer;\n font-size: 18px;\n text-transform: none;\n font-family: ", ";\n box-shadow: none;\n text-align: center;\n\n ", "\n\n &:disabled {\n background-color: ", ";\n color: ", ";\n border: ", ";\n border-radius: ", ";\n cursor: not-allowed;\n }\n"])), function (props) {
|
|
2032
1862
|
return props.theme.typography.fontFamily;
|
|
2033
1863
|
}, function (props) {
|
|
2034
1864
|
switch (props.variant) {
|
|
@@ -2051,20 +1881,20 @@ var Button = extractErrorMessage.He.button(_templateObject8 || (_templateObject8
|
|
|
2051
1881
|
Button.defaultProps = {
|
|
2052
1882
|
variant: 'primary'
|
|
2053
1883
|
};
|
|
2054
|
-
var circularRotateKeyframe = extractErrorMessage.Ue(
|
|
2055
|
-
var circularDashKeyframe = extractErrorMessage.Ue(
|
|
2056
|
-
var AnimatedCircle = extractErrorMessage.He.circle(
|
|
1884
|
+
var circularRotateKeyframe = extractErrorMessage.Ue(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"])));
|
|
1885
|
+
var circularDashKeyframe = extractErrorMessage.Ue(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n"])));
|
|
1886
|
+
var AnimatedCircle = extractErrorMessage.He.circle(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n stroke-dasharray: 80px, 200px;\n stroke-dashoffset: 0;\n animation: ", " 1.4s ease-in-out infinite;\n stroke: ", ";\n fill: none;\n"])), circularDashKeyframe, function (props) {
|
|
2057
1887
|
return props.theme.colors.primary;
|
|
2058
1888
|
});
|
|
2059
|
-
var CircularProgressRoot = extractErrorMessage.He.div(
|
|
1889
|
+
var CircularProgressRoot = extractErrorMessage.He.div(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n animation: ", " 1.4s ease-in-out infinite;\n"])), function (props) {
|
|
2060
1890
|
return props.size;
|
|
2061
1891
|
}, function (props) {
|
|
2062
1892
|
return props.size;
|
|
2063
1893
|
}, circularRotateKeyframe);
|
|
2064
|
-
var CircularProgressSVG = extractErrorMessage.He.svg(
|
|
2065
|
-
var CircularProgress = function CircularProgress(
|
|
2066
|
-
var size =
|
|
2067
|
-
thickness =
|
|
1894
|
+
var CircularProgressSVG = extractErrorMessage.He.svg(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n display: block;\n"])));
|
|
1895
|
+
var CircularProgress = function CircularProgress(_ref43) {
|
|
1896
|
+
var size = _ref43.size,
|
|
1897
|
+
thickness = _ref43.thickness;
|
|
2068
1898
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(CircularProgressRoot, {
|
|
2069
1899
|
size: size
|
|
2070
1900
|
}, /*#__PURE__*/extractErrorMessage.wn.createElement(CircularProgressSVG, {
|
|
@@ -2092,7 +1922,7 @@ var SubmitButton = function SubmitButton(props) {
|
|
|
2092
1922
|
"data-testid": "loading-icon"
|
|
2093
1923
|
}))) : props.text);
|
|
2094
1924
|
};
|
|
2095
|
-
var Input = extractErrorMessage.He.input(
|
|
1925
|
+
var Input = extractErrorMessage.He.input(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n background-color: ", ";\n height: 47px;\n padding: 0 8px;\n box-sizing: border-box;\n border: 1px solid ", ";\n border-radius: ", ";\n color: ", ";\n font-family: ", ";\n font-size: 18px;\n &::placeholder {\n color: ", ";\n }\n\n &:disabled {\n border: 1px solid ", ";\n color: ", ";\n background-color: ", ";\n }\n"])), function (props) {
|
|
2096
1926
|
return props.theme.inputs.backgroundColor;
|
|
2097
1927
|
}, function (props) {
|
|
2098
1928
|
return props.theme.inputs.borderColor;
|
|
@@ -2111,13 +1941,13 @@ var Input = extractErrorMessage.He.input(_templateObject14 || (_templateObject14
|
|
|
2111
1941
|
}, function (props) {
|
|
2112
1942
|
return props.theme.colors.disabled;
|
|
2113
1943
|
});
|
|
2114
|
-
var EmailInput = function EmailInput(
|
|
2115
|
-
var email =
|
|
2116
|
-
setEmail =
|
|
2117
|
-
|
|
2118
|
-
disableInput =
|
|
2119
|
-
|
|
2120
|
-
hasPasskeys =
|
|
1944
|
+
var EmailInput = function EmailInput(_ref44) {
|
|
1945
|
+
var email = _ref44.email,
|
|
1946
|
+
setEmail = _ref44.setEmail,
|
|
1947
|
+
_ref44$disableInput = _ref44.disableInput,
|
|
1948
|
+
disableInput = _ref44$disableInput === void 0 ? false : _ref44$disableInput,
|
|
1949
|
+
_ref44$hasPasskeys = _ref44.hasPasskeys,
|
|
1950
|
+
hasPasskeys = _ref44$hasPasskeys === void 0 ? false : _ref44$hasPasskeys;
|
|
2121
1951
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(Input, Object.assign({
|
|
2122
1952
|
placeholder: "example@email.com",
|
|
2123
1953
|
name: "email",
|
|
@@ -2155,8 +1985,8 @@ var mapURLsToLinks = function mapURLsToLinks(str) {
|
|
|
2155
1985
|
}
|
|
2156
1986
|
return chunkResults;
|
|
2157
1987
|
};
|
|
2158
|
-
var ErrorText = function ErrorText(
|
|
2159
|
-
var errorMessage =
|
|
1988
|
+
var ErrorText = function ErrorText(_ref45) {
|
|
1989
|
+
var errorMessage = _ref45.errorMessage;
|
|
2160
1990
|
var tokens = extractErrorMessage.F(function () {
|
|
2161
1991
|
return mapURLsToLinks(errorMessage);
|
|
2162
1992
|
}, [errorMessage]);
|
|
@@ -2166,9 +1996,9 @@ var ErrorText = function ErrorText(_ref40) {
|
|
|
2166
1996
|
}, tokens);
|
|
2167
1997
|
};
|
|
2168
1998
|
var JIT_PROVISIONING_ERRORS = ['email_jit_provisioning_not_allowed', 'invalid_email_for_jit_provisioning'];
|
|
2169
|
-
var parseErrorMessage = function parseErrorMessage(error,
|
|
2170
|
-
var email =
|
|
2171
|
-
org =
|
|
1999
|
+
var parseErrorMessage = function parseErrorMessage(error, _ref46) {
|
|
2000
|
+
var email = _ref46.email,
|
|
2001
|
+
org = _ref46.org;
|
|
2172
2002
|
if (JIT_PROVISIONING_ERRORS.includes(error.error_type)) {
|
|
2173
2003
|
return "".concat(email, " does not have access to ").concat(org, ". If you think this is a mistake, contact your admin");
|
|
2174
2004
|
} else {
|
|
@@ -2182,14 +2012,14 @@ var MagicLinkEmailForm = function MagicLinkEmailForm() {
|
|
|
2182
2012
|
dispatch = _useGlobalReducer8[1];
|
|
2183
2013
|
var stytchClient = useStytch();
|
|
2184
2014
|
var config = useConfig();
|
|
2185
|
-
var _extractErrorMessage$
|
|
2186
|
-
_extractErrorMessage$
|
|
2187
|
-
emailInput = _extractErrorMessage$
|
|
2188
|
-
setEmailInput = _extractErrorMessage$
|
|
2015
|
+
var _extractErrorMessage$20 = extractErrorMessage.h(''),
|
|
2016
|
+
_extractErrorMessage$21 = _slicedToArray(_extractErrorMessage$20, 2),
|
|
2017
|
+
emailInput = _extractErrorMessage$21[0],
|
|
2018
|
+
setEmailInput = _extractErrorMessage$21[1];
|
|
2189
2019
|
var providedEmail = state.primary.email;
|
|
2190
2020
|
var email = providedEmail || emailInput;
|
|
2191
|
-
var _useMutate2 = useMutate('stytch.magicLinks.email.loginOrSignup', function (_,
|
|
2192
|
-
var organization_id =
|
|
2021
|
+
var _useMutate2 = useMutate('stytch.magicLinks.email.loginOrSignup', function (_, _ref47) {
|
|
2022
|
+
var organization_id = _ref47.arg.organization_id;
|
|
2193
2023
|
var _a, _b, _c, _d;
|
|
2194
2024
|
return stytchClient.magicLinks.email.loginOrSignup({
|
|
2195
2025
|
email_address: email,
|
|
@@ -2263,10 +2093,10 @@ var MagicLinkEmailDiscoveryForm = function MagicLinkEmailDiscoveryForm() {
|
|
|
2263
2093
|
dispatch = _useGlobalReducer10[1];
|
|
2264
2094
|
var stytchClient = useStytch();
|
|
2265
2095
|
var config = useConfig();
|
|
2266
|
-
var _extractErrorMessage$
|
|
2267
|
-
_extractErrorMessage$
|
|
2268
|
-
email = _extractErrorMessage$
|
|
2269
|
-
setEmail = _extractErrorMessage$
|
|
2096
|
+
var _extractErrorMessage$22 = extractErrorMessage.h(''),
|
|
2097
|
+
_extractErrorMessage$23 = _slicedToArray(_extractErrorMessage$22, 2),
|
|
2098
|
+
email = _extractErrorMessage$23[0],
|
|
2099
|
+
setEmail = _extractErrorMessage$23[1];
|
|
2270
2100
|
var _useMutate3 = useMutate('stytch.magicLinks.discovery.send', function () {
|
|
2271
2101
|
var _a, _b;
|
|
2272
2102
|
return stytchClient.magicLinks.email.discovery.send({
|
|
@@ -2321,9 +2151,9 @@ var MagicLinkEmailDiscoveryForm = function MagicLinkEmailDiscoveryForm() {
|
|
|
2321
2151
|
text: 'Continue with email'
|
|
2322
2152
|
})));
|
|
2323
2153
|
};
|
|
2324
|
-
var SSOButton = function SSOButton(
|
|
2325
|
-
var display_name =
|
|
2326
|
-
connection_id =
|
|
2154
|
+
var SSOButton = function SSOButton(_ref48) {
|
|
2155
|
+
var display_name = _ref48.display_name,
|
|
2156
|
+
connection_id = _ref48.connection_id;
|
|
2327
2157
|
var stytchClient = useStytch();
|
|
2328
2158
|
var config = useConfig();
|
|
2329
2159
|
var onButtonClick = function onButtonClick() {
|
|
@@ -2366,17 +2196,17 @@ var SSOButtons = function SSOButtons() {
|
|
|
2366
2196
|
});
|
|
2367
2197
|
}));
|
|
2368
2198
|
};
|
|
2369
|
-
var DividerContainer = extractErrorMessage.He(Flex)(
|
|
2199
|
+
var DividerContainer = extractErrorMessage.He(Flex)(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n color: ", ";\n"])), function (props) {
|
|
2370
2200
|
return props.theme.colors.secondary;
|
|
2371
2201
|
});
|
|
2372
|
-
var DividerBar = extractErrorMessage.He.div(
|
|
2202
|
+
var DividerBar = extractErrorMessage.He.div(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n ", "\n ", "\n border-bottom: 1px solid ", ";\n flex-grow: 1;\n"])), function (props) {
|
|
2373
2203
|
return props.$placement === 'left' && 'margin-right: 6px;';
|
|
2374
2204
|
}, function (props) {
|
|
2375
2205
|
return props.$placement === 'right' && 'margin-left: 6px;';
|
|
2376
2206
|
}, function (props) {
|
|
2377
2207
|
return props.theme.colors.secondary;
|
|
2378
2208
|
});
|
|
2379
|
-
var StyledText = extractErrorMessage.He(Text)(
|
|
2209
|
+
var StyledText = extractErrorMessage.He(Text)(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n color: ", ";\n"])), function (props) {
|
|
2380
2210
|
return props.theme.colors.secondary;
|
|
2381
2211
|
});
|
|
2382
2212
|
var Divider = function Divider() {
|
|
@@ -2388,9 +2218,9 @@ var Divider = function Divider() {
|
|
|
2388
2218
|
"$placement": "right"
|
|
2389
2219
|
}));
|
|
2390
2220
|
};
|
|
2391
|
-
var PasswordIconSvg = function PasswordIconSvg(
|
|
2392
|
-
var
|
|
2393
|
-
enabled =
|
|
2221
|
+
var PasswordIconSvg = function PasswordIconSvg(_ref49) {
|
|
2222
|
+
var _ref49$enabled = _ref49.enabled,
|
|
2223
|
+
enabled = _ref49$enabled === void 0 ? false : _ref49$enabled;
|
|
2394
2224
|
return /*#__PURE__*/extractErrorMessage.wn.createElement("svg", {
|
|
2395
2225
|
width: "20",
|
|
2396
2226
|
height: "14",
|
|
@@ -2414,7 +2244,7 @@ var PasswordIconVisibleSvg = function PasswordIconVisibleSvg() {
|
|
|
2414
2244
|
fill: "#19303D"
|
|
2415
2245
|
}));
|
|
2416
2246
|
};
|
|
2417
|
-
var BaseInput = extractErrorMessage.He.input(
|
|
2247
|
+
var BaseInput = extractErrorMessage.He.input(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n border: 0;\n padding: 0;\n width: 100%;\n\n background-color: transparent;\n height: 45px;\n color: ", ";\n font-family: ", ";\n font-size: 18px;\n\n &::placeholder: {\n color: ", ";\n }\n\n &:disabled {\n color: ", ";\n background-color: ", ";\n }\n\n &:focus {\n outline: none;\n }\n"])), function (props) {
|
|
2418
2248
|
return props.theme.inputs.textColor;
|
|
2419
2249
|
}, function (props) {
|
|
2420
2250
|
return props.theme.typography.fontFamily;
|
|
@@ -2425,7 +2255,7 @@ var BaseInput = extractErrorMessage.He.input(_templateObject18 || (_templateObje
|
|
|
2425
2255
|
}, function (props) {
|
|
2426
2256
|
return props.theme.colors.disabled;
|
|
2427
2257
|
});
|
|
2428
|
-
var InputContainer = extractErrorMessage.He(Flex)(
|
|
2258
|
+
var InputContainer = extractErrorMessage.He(Flex)(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n background-color: ", ";\n height: 45px;\n padding-left: 8px;\n padding-right: 8px;\n border: 1px solid ", ";\n border-radius: ", ";\n color: ", ";\n font-family: ", ";\n font-size: 18px;\n width: calc(100% - 18px);\n & input::placeholder: {\n color: ", ";\n }\n"])), function (props) {
|
|
2429
2259
|
return props.theme.inputs.backgroundColor;
|
|
2430
2260
|
}, function (props) {
|
|
2431
2261
|
return props.theme.inputs.borderColor;
|
|
@@ -2438,11 +2268,11 @@ var InputContainer = extractErrorMessage.He(Flex)(_templateObject19 || (_templat
|
|
|
2438
2268
|
}, function (props) {
|
|
2439
2269
|
return props.theme.inputs.placeholderColor;
|
|
2440
2270
|
});
|
|
2441
|
-
var PasswordIconButton = extractErrorMessage.He.button(
|
|
2442
|
-
var PasswordIcon = function PasswordIcon(
|
|
2443
|
-
var onClick =
|
|
2444
|
-
enabled =
|
|
2445
|
-
visible =
|
|
2271
|
+
var PasswordIconButton = extractErrorMessage.He.button(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n"])));
|
|
2272
|
+
var PasswordIcon = function PasswordIcon(_ref50) {
|
|
2273
|
+
var onClick = _ref50.onClick,
|
|
2274
|
+
enabled = _ref50.enabled,
|
|
2275
|
+
visible = _ref50.visible;
|
|
2446
2276
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordIconButton, {
|
|
2447
2277
|
onClick: onClick,
|
|
2448
2278
|
type: "button"
|
|
@@ -2450,14 +2280,14 @@ var PasswordIcon = function PasswordIcon(_ref45) {
|
|
|
2450
2280
|
enabled: enabled
|
|
2451
2281
|
}));
|
|
2452
2282
|
};
|
|
2453
|
-
var PasswordInput = function PasswordInput(
|
|
2454
|
-
var password =
|
|
2455
|
-
setPassword =
|
|
2456
|
-
type =
|
|
2457
|
-
var _extractErrorMessage$
|
|
2458
|
-
_extractErrorMessage$
|
|
2459
|
-
visible = _extractErrorMessage$
|
|
2460
|
-
setVisible = _extractErrorMessage$
|
|
2283
|
+
var PasswordInput = function PasswordInput(_ref51) {
|
|
2284
|
+
var password = _ref51.password,
|
|
2285
|
+
setPassword = _ref51.setPassword,
|
|
2286
|
+
type = _ref51.type;
|
|
2287
|
+
var _extractErrorMessage$24 = extractErrorMessage.h(false),
|
|
2288
|
+
_extractErrorMessage$25 = _slicedToArray(_extractErrorMessage$24, 2),
|
|
2289
|
+
visible = _extractErrorMessage$25[0],
|
|
2290
|
+
setVisible = _extractErrorMessage$25[1];
|
|
2461
2291
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(InputContainer, {
|
|
2462
2292
|
gap: 2,
|
|
2463
2293
|
alignItems: "center"
|
|
@@ -2482,9 +2312,9 @@ var PasswordInput = function PasswordInput(_ref46) {
|
|
|
2482
2312
|
visible: visible
|
|
2483
2313
|
}));
|
|
2484
2314
|
};
|
|
2485
|
-
var BackButton = extractErrorMessage.He.button(
|
|
2486
|
-
var BackArrowSvg = function BackArrowSvg(
|
|
2487
|
-
var color =
|
|
2315
|
+
var BackButton = extractErrorMessage.He.button(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n"])));
|
|
2316
|
+
var BackArrowSvg = function BackArrowSvg(_ref52) {
|
|
2317
|
+
var color = _ref52.color;
|
|
2488
2318
|
return /*#__PURE__*/extractErrorMessage.wn.createElement("svg", {
|
|
2489
2319
|
width: "24",
|
|
2490
2320
|
height: "24",
|
|
@@ -2496,8 +2326,8 @@ var BackArrowSvg = function BackArrowSvg(_ref47) {
|
|
|
2496
2326
|
fill: color
|
|
2497
2327
|
}));
|
|
2498
2328
|
};
|
|
2499
|
-
var BackArrow = function BackArrow(
|
|
2500
|
-
var onClick =
|
|
2329
|
+
var BackArrow = function BackArrow(_ref53) {
|
|
2330
|
+
var onClick = _ref53.onClick;
|
|
2501
2331
|
var theme = extractErrorMessage.Ze();
|
|
2502
2332
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(BackButton, {
|
|
2503
2333
|
type: "button",
|
|
@@ -2507,7 +2337,7 @@ var BackArrow = function BackArrow(_ref48) {
|
|
|
2507
2337
|
color: theme.colors.primary
|
|
2508
2338
|
}));
|
|
2509
2339
|
};
|
|
2510
|
-
var GetHelpText = extractErrorMessage.He(Text)(
|
|
2340
|
+
var GetHelpText = extractErrorMessage.He(Text)(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n font-weight: bold !important;\n cursor: pointer;\n"])));
|
|
2511
2341
|
var PasswordsAuthenticate = function PasswordsAuthenticate() {
|
|
2512
2342
|
var _useGlobalReducer13 = useGlobalReducer(),
|
|
2513
2343
|
_useGlobalReducer14 = _slicedToArray(_useGlobalReducer13, 2),
|
|
@@ -2629,10 +2459,10 @@ var PasswordsEmailForm = function PasswordsEmailForm() {
|
|
|
2629
2459
|
setIsSubmitting = _usePasswordInput2.setIsSubmitting,
|
|
2630
2460
|
submitPassword = _usePasswordInput2.submitPassword,
|
|
2631
2461
|
handleNonMemberReset = _usePasswordInput2.handleNonMemberReset;
|
|
2632
|
-
var _extractErrorMessage$
|
|
2633
|
-
_extractErrorMessage$
|
|
2634
|
-
hideInput = _extractErrorMessage$
|
|
2635
|
-
setHideInput = _extractErrorMessage$
|
|
2462
|
+
var _extractErrorMessage$26 = extractErrorMessage.h(!email),
|
|
2463
|
+
_extractErrorMessage$27 = _slicedToArray(_extractErrorMessage$26, 2),
|
|
2464
|
+
hideInput = _extractErrorMessage$27[0],
|
|
2465
|
+
setHideInput = _extractErrorMessage$27[1];
|
|
2636
2466
|
if (!passwordOptions) return /*#__PURE__*/extractErrorMessage.wn.createElement(extractErrorMessage.wn.Fragment, null);
|
|
2637
2467
|
if (!organization) return /*#__PURE__*/extractErrorMessage.wn.createElement(extractErrorMessage.wn.Fragment, null);
|
|
2638
2468
|
var handleSubmit = function handleSubmit(e) {
|
|
@@ -2659,8 +2489,8 @@ var PasswordsEmailForm = function PasswordsEmailForm() {
|
|
|
2659
2489
|
case 8:
|
|
2660
2490
|
setErrorMessage('');
|
|
2661
2491
|
setIsSubmitting(true);
|
|
2662
|
-
internal.readB2BInternals(stytch).searchManager.searchMember(email, organization.organization_id).then(function (
|
|
2663
|
-
var member =
|
|
2492
|
+
internal.readB2BInternals(stytch).searchManager.searchMember(email, organization.organization_id).then(function (_ref54) {
|
|
2493
|
+
var member = _ref54.member;
|
|
2664
2494
|
if (member === null || member === void 0 ? void 0 : member.member_password_id) {
|
|
2665
2495
|
setHideInput(false);
|
|
2666
2496
|
setIsSubmitting(false);
|
|
@@ -2912,8 +2742,8 @@ var OAuthB2BButton = function OAuthB2BButton(props) {
|
|
|
2912
2742
|
}
|
|
2913
2743
|
}, "Continue with ", props.providerTypeTitle)));
|
|
2914
2744
|
};
|
|
2915
|
-
var OAuthErrorMessage = function OAuthErrorMessage(
|
|
2916
|
-
var children =
|
|
2745
|
+
var OAuthErrorMessage = function OAuthErrorMessage(_ref55) {
|
|
2746
|
+
var children = _ref55.children;
|
|
2917
2747
|
return /*#__PURE__*/extractErrorMessage.wn.createElement("div", {
|
|
2918
2748
|
key: "oauth-error-message"
|
|
2919
2749
|
}, /*#__PURE__*/extractErrorMessage.wn.createElement(Text, {
|
|
@@ -2925,9 +2755,9 @@ var OneTapNoConfiguredClientsErrorMessage = function OneTapNoConfiguredClientsEr
|
|
|
2925
2755
|
href: "https://stytch.com/dashboard/oauth"
|
|
2926
2756
|
}, "dashboard."));
|
|
2927
2757
|
};
|
|
2928
|
-
var RedirectUrlsErrorMessage = function RedirectUrlsErrorMessage(
|
|
2929
|
-
var niceName =
|
|
2930
|
-
variableName =
|
|
2758
|
+
var RedirectUrlsErrorMessage = function RedirectUrlsErrorMessage(_ref56) {
|
|
2759
|
+
var niceName = _ref56.niceName,
|
|
2760
|
+
variableName = _ref56.variableName;
|
|
2931
2761
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(OAuthErrorMessage, null, "One Tap cannot render because there are no ", niceName, " set for this project so we are unable to verify the", ' ', /*#__PURE__*/extractErrorMessage.wn.createElement("code", null, variableName), "\xA0 provided in the configuration. To set ", niceName, " for this project please visit\xA0", /*#__PURE__*/extractErrorMessage.wn.createElement("a", {
|
|
2932
2762
|
href: "https://stytch.com/docs/javascript-sdk"
|
|
2933
2763
|
}, "the Stytch dashboard."), "\xA0 For more information on why this validation is necessary please visit\xA0", /*#__PURE__*/extractErrorMessage.wn.createElement("a", {
|
|
@@ -2972,7 +2802,7 @@ var OneTapErrors;
|
|
|
2972
2802
|
OneTapErrors["DefaultProviderNotAllowed"] = "default_provider_not_allowed";
|
|
2973
2803
|
})(OneTapErrors || (OneTapErrors = {}));
|
|
2974
2804
|
var ErrorMessages = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, OneTapErrors.None, /*#__PURE__*/extractErrorMessage.wn.createElement(extractErrorMessage.wn.Fragment, null)), OneTapErrors.OriginNotAllowedForClient, /*#__PURE__*/extractErrorMessage.wn.createElement(OneTapJSOriginErrorMessage, null)), OneTapErrors.InvalidOAuthClient, /*#__PURE__*/extractErrorMessage.wn.createElement(OneTapInvalidOAuthClient, null)), OneTapErrors.NoConfiguredOAuthClient, /*#__PURE__*/extractErrorMessage.wn.createElement(OneTapNoConfiguredClientsErrorMessage, null)), OneTapErrors.NoConfiguredLoginRedirectUrls, /*#__PURE__*/extractErrorMessage.wn.createElement(OneTapNoConfiguredLoginRedirectUrlsErrorMessage, null)), OneTapErrors.NoConfiguredSignupRedirectUrls, /*#__PURE__*/extractErrorMessage.wn.createElement(OneTapNoConfiguredSignupRedirectUrlsErrorMessage, null)), OneTapErrors.DefaultProviderNotAllowed, /*#__PURE__*/extractErrorMessage.wn.createElement(OneTapNoDefaultProviderAllowedErrorMessage, null));
|
|
2975
|
-
extractErrorMessage.He.div(
|
|
2805
|
+
extractErrorMessage.He.div(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n height: ", ";\n display: ", ";\n transition: all 0.5s ease-out;\n justify-content: center;\n align-items: center;\n"])), function (props) {
|
|
2976
2806
|
return "".concat(props.$height, "px");
|
|
2977
2807
|
}, function (props) {
|
|
2978
2808
|
return props.pending ? 'flex' : 'block';
|
|
@@ -2982,10 +2812,10 @@ var B2BGoogleOneTap = function B2BGoogleOneTap() {
|
|
|
2982
2812
|
var stytch = useStytch();
|
|
2983
2813
|
var config = useConfig();
|
|
2984
2814
|
var isOnlyFloatingOneTap = useIsOnlyFloatingOneTap();
|
|
2985
|
-
var _extractErrorMessage$
|
|
2986
|
-
_extractErrorMessage$
|
|
2987
|
-
oneTapError = _extractErrorMessage$
|
|
2988
|
-
setOneTapError = _extractErrorMessage$
|
|
2815
|
+
var _extractErrorMessage$28 = extractErrorMessage.h(OneTapErrors.None),
|
|
2816
|
+
_extractErrorMessage$29 = _slicedToArray(_extractErrorMessage$28, 2),
|
|
2817
|
+
oneTapError = _extractErrorMessage$29[0],
|
|
2818
|
+
setOneTapError = _extractErrorMessage$29[1];
|
|
2989
2819
|
var isUnmounted = useIsUnmounted();
|
|
2990
2820
|
var _useGlobalReducer19 = useGlobalReducer(),
|
|
2991
2821
|
_useGlobalReducer20 = _slicedToArray(_useGlobalReducer19, 2),
|
|
@@ -3112,19 +2942,19 @@ var B2BGoogleOneTap = function B2BGoogleOneTap() {
|
|
|
3112
2942
|
};
|
|
3113
2943
|
var productsToAuthMethods = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, internal.B2BProducts.oauth, undefined), internal.B2BProducts.sso, 'sso'), internal.B2BProducts.emailMagicLinks, 'magic_link'), internal.B2BProducts.passwords, 'password');
|
|
3114
2944
|
var oauthProvidersToAuthMethods = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, internal.B2BOAuthProviders.Google, 'google_oauth'), internal.B2BOAuthProviders.Microsoft, 'microsoft_oauth'), internal.B2BOAuthProviders.HubSpot, 'hubspot_oauth'), internal.B2BOAuthProviders.Slack, 'slack_oauth');
|
|
3115
|
-
var authMethodsToProducts = Object.entries(productsToAuthMethods).reduce(function (acc,
|
|
3116
|
-
var
|
|
3117
|
-
product =
|
|
3118
|
-
method =
|
|
2945
|
+
var authMethodsToProducts = Object.entries(productsToAuthMethods).reduce(function (acc, _ref57) {
|
|
2946
|
+
var _ref58 = _slicedToArray(_ref57, 2),
|
|
2947
|
+
product = _ref58[0],
|
|
2948
|
+
method = _ref58[1];
|
|
3119
2949
|
if (method) {
|
|
3120
2950
|
acc[method] = product;
|
|
3121
2951
|
}
|
|
3122
2952
|
return acc;
|
|
3123
2953
|
}, {});
|
|
3124
|
-
var oauthMethodsToOauthProviders = Object.entries(oauthProvidersToAuthMethods).reduce(function (acc,
|
|
3125
|
-
var
|
|
3126
|
-
provider =
|
|
3127
|
-
method =
|
|
2954
|
+
var oauthMethodsToOauthProviders = Object.entries(oauthProvidersToAuthMethods).reduce(function (acc, _ref59) {
|
|
2955
|
+
var _ref60 = _slicedToArray(_ref59, 2),
|
|
2956
|
+
provider = _ref60[0],
|
|
2957
|
+
method = _ref60[1];
|
|
3128
2958
|
acc[method] = provider;
|
|
3129
2959
|
return acc;
|
|
3130
2960
|
}, {});
|
|
@@ -3301,12 +3131,12 @@ var OAuthButtons = function OAuthButtons() {
|
|
|
3301
3131
|
var _useEffectiveAuthConf = useEffectiveAuthConfig(),
|
|
3302
3132
|
oauthProviderSettings = _useEffectiveAuthConf.oauthProviderSettings;
|
|
3303
3133
|
var config = useConfig();
|
|
3304
|
-
var
|
|
3305
|
-
loginRedirectURL =
|
|
3306
|
-
signupRedirectURL =
|
|
3307
|
-
discoveryRedirectURL =
|
|
3308
|
-
customScopes =
|
|
3309
|
-
providerParams =
|
|
3134
|
+
var _ref61 = (_a = config.oauthOptions) !== null && _a !== void 0 ? _a : {},
|
|
3135
|
+
loginRedirectURL = _ref61.loginRedirectURL,
|
|
3136
|
+
signupRedirectURL = _ref61.signupRedirectURL,
|
|
3137
|
+
discoveryRedirectURL = _ref61.discoveryRedirectURL,
|
|
3138
|
+
customScopes = _ref61.customScopes,
|
|
3139
|
+
providerParams = _ref61.providerParams;
|
|
3310
3140
|
var mappedProviders = oauthProviderSettings.map(function (provider) {
|
|
3311
3141
|
var oauthProvider = getParamsFromB2BOAuthProviderConfig(provider);
|
|
3312
3142
|
var _getProviderInfo = getProviderInfo(oauthProvider.type),
|
|
@@ -3335,7 +3165,7 @@ var OAuthButtons = function OAuthButtons() {
|
|
|
3335
3165
|
className: "oauth-buttons"
|
|
3336
3166
|
}, mappedProviders);
|
|
3337
3167
|
};
|
|
3338
|
-
var UsePasswordText = extractErrorMessage.He(Text)(
|
|
3168
|
+
var UsePasswordText = extractErrorMessage.He(Text)(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n font-weight: bold !important;\n cursor: pointer;\n"])));
|
|
3339
3169
|
var PasswordUseButton = function PasswordUseButton() {
|
|
3340
3170
|
var _useGlobalReducer27 = useGlobalReducer(),
|
|
3341
3171
|
_useGlobalReducer28 = _slicedToArray(_useGlobalReducer27, 2),
|
|
@@ -3398,12 +3228,12 @@ var generateProductComponentsOrdering = function generateProductComponentsOrderi
|
|
|
3398
3228
|
}
|
|
3399
3229
|
return ProductComponents;
|
|
3400
3230
|
};
|
|
3401
|
-
var Container$1 = extractErrorMessage.He(Flex)(
|
|
3402
|
-
var LogoImage$1 = extractErrorMessage.He.img(
|
|
3403
|
-
var Header = extractErrorMessage.He(Text)(
|
|
3404
|
-
var Logo$1 = function Logo$1(
|
|
3405
|
-
var orgLogo =
|
|
3406
|
-
appLogo =
|
|
3231
|
+
var Container$1 = extractErrorMessage.He(Flex)(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n > * + * {\n margin-top: 24px;\n }\n"])));
|
|
3232
|
+
var LogoImage$1 = extractErrorMessage.He.img(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n max-height: 50px;\n max-width: 100px;\n"])));
|
|
3233
|
+
var Header = extractErrorMessage.He(Text)(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\n text-align: center;\n"])));
|
|
3234
|
+
var Logo$1 = function Logo$1(_ref62) {
|
|
3235
|
+
var orgLogo = _ref62.orgLogo,
|
|
3236
|
+
appLogo = _ref62.appLogo;
|
|
3407
3237
|
if (orgLogo !== '' && appLogo !== '') return /*#__PURE__*/extractErrorMessage.wn.createElement(extractErrorMessage.wn.Fragment, null);
|
|
3408
3238
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(Flex, {
|
|
3409
3239
|
justifyContent: "center",
|
|
@@ -3414,8 +3244,8 @@ var Logo$1 = function Logo$1(_ref57) {
|
|
|
3414
3244
|
src: appLogo
|
|
3415
3245
|
}));
|
|
3416
3246
|
};
|
|
3417
|
-
var ProductComponents = function ProductComponents(
|
|
3418
|
-
var components =
|
|
3247
|
+
var ProductComponents = function ProductComponents(_ref63) {
|
|
3248
|
+
var components = _ref63.components;
|
|
3419
3249
|
var renderedComponents = components.map(function (component) {
|
|
3420
3250
|
switch (component) {
|
|
3421
3251
|
case Component.MagicLinkEmailForm:
|
|
@@ -3458,9 +3288,9 @@ var ProductComponents = function ProductComponents(_ref58) {
|
|
|
3458
3288
|
};
|
|
3459
3289
|
var MainScreen = function MainScreen() {
|
|
3460
3290
|
var _a, _b, _c, _d;
|
|
3461
|
-
var _extractErrorMessage$
|
|
3462
|
-
displayHeader = _extractErrorMessage$
|
|
3463
|
-
logo = _extractErrorMessage$
|
|
3291
|
+
var _extractErrorMessage$30 = extractErrorMessage.Ze(),
|
|
3292
|
+
displayHeader = _extractErrorMessage$30.displayHeader,
|
|
3293
|
+
logo = _extractErrorMessage$30.logo;
|
|
3464
3294
|
var _useGlobalReducer29 = useGlobalReducer(),
|
|
3465
3295
|
_useGlobalReducer30 = _slicedToArray(_useGlobalReducer29, 1),
|
|
3466
3296
|
state = _useGlobalReducer30[0];
|
|
@@ -3603,13 +3433,13 @@ var inboxLinks$1 = function inboxLinks$1(emailDomain) {
|
|
|
3603
3433
|
YAHOO: "https://mail.yahoo.com/d/search/keyword=".concat(emailDomain)
|
|
3604
3434
|
};
|
|
3605
3435
|
};
|
|
3606
|
-
var Link$1 = extractErrorMessage.He.a(
|
|
3436
|
+
var Link$1 = extractErrorMessage.He.a(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n text-decoration-color: ", ";\n }\n"])), function (props) {
|
|
3607
3437
|
return props.theme.colors.primary;
|
|
3608
3438
|
});
|
|
3609
|
-
var EmailProviderLink$1 = function EmailProviderLink$1(
|
|
3610
|
-
var label =
|
|
3611
|
-
href =
|
|
3612
|
-
Icon =
|
|
3439
|
+
var EmailProviderLink$1 = function EmailProviderLink$1(_ref64) {
|
|
3440
|
+
var label = _ref64.label,
|
|
3441
|
+
href = _ref64.href,
|
|
3442
|
+
Icon = _ref64.Icon;
|
|
3613
3443
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(Flex, {
|
|
3614
3444
|
gap: 4
|
|
3615
3445
|
}, Icon, /*#__PURE__*/extractErrorMessage.wn.createElement(Link$1, {
|
|
@@ -3618,10 +3448,10 @@ var EmailProviderLink$1 = function EmailProviderLink$1(_ref59) {
|
|
|
3618
3448
|
rel: "noopener noreferrer"
|
|
3619
3449
|
}, /*#__PURE__*/extractErrorMessage.wn.createElement(Text, null, "Open in ", label)));
|
|
3620
3450
|
};
|
|
3621
|
-
var EmailConfirmation$1 = function EmailConfirmation$1(
|
|
3622
|
-
var emailDomain =
|
|
3623
|
-
reset =
|
|
3624
|
-
email =
|
|
3451
|
+
var EmailConfirmation$1 = function EmailConfirmation$1(_ref65) {
|
|
3452
|
+
var emailDomain = _ref65.emailDomain,
|
|
3453
|
+
reset = _ref65.reset,
|
|
3454
|
+
email = _ref65.email;
|
|
3625
3455
|
var _inboxLinks$ = inboxLinks$1(emailDomain),
|
|
3626
3456
|
GMAIL = _inboxLinks$.GMAIL,
|
|
3627
3457
|
YAHOO = _inboxLinks$.YAHOO,
|
|
@@ -3658,17 +3488,17 @@ var useEmailDomain$1 = function useEmailDomain$1() {
|
|
|
3658
3488
|
var _a, _b;
|
|
3659
3489
|
var stytch = useStytch();
|
|
3660
3490
|
var config = useConfig();
|
|
3661
|
-
var _extractErrorMessage$
|
|
3491
|
+
var _extractErrorMessage$31 = extractErrorMessage.h(function () {
|
|
3662
3492
|
var _internal$readB2BInte3 = internal.readB2BInternals(stytch).bootstrap.getSync(),
|
|
3663
3493
|
emailDomains = _internal$readB2BInte3.emailDomains;
|
|
3664
3494
|
return emailDomains;
|
|
3665
3495
|
}),
|
|
3666
|
-
_extractErrorMessage$
|
|
3667
|
-
emailDomains = _extractErrorMessage$
|
|
3668
|
-
setEmailDomains = _extractErrorMessage$
|
|
3496
|
+
_extractErrorMessage$32 = _slicedToArray(_extractErrorMessage$31, 2),
|
|
3497
|
+
emailDomains = _extractErrorMessage$32[0],
|
|
3498
|
+
setEmailDomains = _extractErrorMessage$32[1];
|
|
3669
3499
|
extractErrorMessage.p(function () {
|
|
3670
|
-
internal.readB2BInternals(stytch).bootstrap.getAsync().then(function (
|
|
3671
|
-
var emailDomains =
|
|
3500
|
+
internal.readB2BInternals(stytch).bootstrap.getAsync().then(function (_ref66) {
|
|
3501
|
+
var emailDomains = _ref66.emailDomains;
|
|
3672
3502
|
setEmailDomains(emailDomains);
|
|
3673
3503
|
});
|
|
3674
3504
|
}, [stytch]);
|
|
@@ -3727,27 +3557,28 @@ var LoadingScreen = function LoadingScreen() {
|
|
|
3727
3557
|
var isJoinViaJitType = function isJoinViaJitType(type) {
|
|
3728
3558
|
return type === 'eligible_to_join_by_email_domain' || type === 'eligible_to_join_by_oauth_tenant';
|
|
3729
3559
|
};
|
|
3730
|
-
var OrganizationsContainer = extractErrorMessage.He(Flex)(
|
|
3731
|
-
var theme =
|
|
3560
|
+
var OrganizationsContainer = extractErrorMessage.He(Flex)(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n border: ", ";\n border-radius: ", ";\n > div + div {\n border-top: ", ";\n }\n"])), function (_ref67) {
|
|
3561
|
+
var theme = _ref67.theme;
|
|
3732
3562
|
return theme.container.border;
|
|
3733
|
-
}, function (
|
|
3734
|
-
var theme =
|
|
3563
|
+
}, function (_ref68) {
|
|
3564
|
+
var theme = _ref68.theme;
|
|
3735
3565
|
return theme.container.borderRadius;
|
|
3736
|
-
}, function (
|
|
3737
|
-
var theme =
|
|
3566
|
+
}, function (_ref69) {
|
|
3567
|
+
var theme = _ref69.theme;
|
|
3738
3568
|
return theme.container.border;
|
|
3739
3569
|
});
|
|
3740
|
-
var OrganizationsRow = extractErrorMessage.He(Flex)(
|
|
3741
|
-
var LogoImage = extractErrorMessage.He.img(
|
|
3742
|
-
var LogoText = extractErrorMessage.He(Flex)(
|
|
3743
|
-
var theme =
|
|
3570
|
+
var OrganizationsRow = extractErrorMessage.He(Flex)(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n cursor: pointer;\n gap: 8px;\n"])));
|
|
3571
|
+
var LogoImage = extractErrorMessage.He.img(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n height: 40px;\n width: 40px;\n flex-shrink: 0;\n border-radius: 4px;\n"])));
|
|
3572
|
+
var LogoText = extractErrorMessage.He(Flex)(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n height: 40px;\n width: 40px;\n flex-shrink: 0;\n background-color: ", ";\n color: ", ";\n border-radius: 4px;\n\n font-style: normal;\n font-weight: 400;\n font-size: 18px;\n line-height: 25px;\n"])), function (_ref70) {
|
|
3573
|
+
var theme = _ref70.theme;
|
|
3744
3574
|
return theme.buttons.primary.backgroundColor;
|
|
3745
|
-
}, function (
|
|
3746
|
-
var theme =
|
|
3575
|
+
}, function (_ref71) {
|
|
3576
|
+
var theme = _ref71.theme;
|
|
3747
3577
|
return theme.buttons.primary.textColor;
|
|
3748
3578
|
});
|
|
3579
|
+
var SvgNoShrink = extractErrorMessage.He.svg(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n flex-shrink: 0;\n"])));
|
|
3749
3580
|
var RightArrowSVG = function RightArrowSVG() {
|
|
3750
|
-
return /*#__PURE__*/extractErrorMessage.y(
|
|
3581
|
+
return /*#__PURE__*/extractErrorMessage.y(SvgNoShrink, {
|
|
3751
3582
|
width: "14",
|
|
3752
3583
|
height: "14",
|
|
3753
3584
|
viewBox: "0 0 14 14",
|
|
@@ -3758,9 +3589,9 @@ var RightArrowSVG = function RightArrowSVG() {
|
|
|
3758
3589
|
fill: "#19303D"
|
|
3759
3590
|
}));
|
|
3760
3591
|
};
|
|
3761
|
-
var Logo = function Logo(
|
|
3762
|
-
var name =
|
|
3763
|
-
logo =
|
|
3592
|
+
var Logo = function Logo(_ref72) {
|
|
3593
|
+
var name = _ref72.name,
|
|
3594
|
+
logo = _ref72.logo;
|
|
3764
3595
|
if (logo !== '') {
|
|
3765
3596
|
return /*#__PURE__*/extractErrorMessage.y(LogoImage, {
|
|
3766
3597
|
src: logo
|
|
@@ -3771,10 +3602,14 @@ var Logo = function Logo(_ref67) {
|
|
|
3771
3602
|
justifyContent: "center"
|
|
3772
3603
|
}, name[0]);
|
|
3773
3604
|
};
|
|
3774
|
-
var ArrowText = function ArrowText(
|
|
3775
|
-
var type =
|
|
3776
|
-
if (isJoinViaJitType(type) || type === 'pending_member') return /*#__PURE__*/extractErrorMessage.y(Text,
|
|
3777
|
-
|
|
3605
|
+
var ArrowText = function ArrowText(_ref73) {
|
|
3606
|
+
var type = _ref73.type;
|
|
3607
|
+
if (isJoinViaJitType(type) || type === 'pending_member') return /*#__PURE__*/extractErrorMessage.y(Text, {
|
|
3608
|
+
align: "right"
|
|
3609
|
+
}, "Join");
|
|
3610
|
+
if (type === 'invited_member') return /*#__PURE__*/extractErrorMessage.y(Text, {
|
|
3611
|
+
align: "right"
|
|
3612
|
+
}, "Accept Invite");
|
|
3778
3613
|
return /*#__PURE__*/extractErrorMessage.y(extractErrorMessage.g, null);
|
|
3779
3614
|
};
|
|
3780
3615
|
var DiscoverNoOrganizations = function DiscoverNoOrganizations() {
|
|
@@ -3892,8 +3727,8 @@ var Discovery = function Discovery() {
|
|
|
3892
3727
|
connection_id: connectionId
|
|
3893
3728
|
});
|
|
3894
3729
|
}, [stytchClient]);
|
|
3895
|
-
var _useMutate5 = useMutate("stytch.discovery.intermediateSessions.exchange", function (_,
|
|
3896
|
-
var organizationId =
|
|
3730
|
+
var _useMutate5 = useMutate("stytch.discovery.intermediateSessions.exchange", function (_, _ref74) {
|
|
3731
|
+
var organizationId = _ref74.arg.organizationId;
|
|
3897
3732
|
return stytchClient.discovery.intermediateSessions.exchange({
|
|
3898
3733
|
organization_id: organizationId,
|
|
3899
3734
|
session_duration_minutes: config.sessionOptions.sessionDurationMinutes
|
|
@@ -4113,14 +3948,14 @@ var Chevron = function Chevron() {
|
|
|
4113
3948
|
}));
|
|
4114
3949
|
};
|
|
4115
3950
|
var Chevron$1 = CreateIcon(Chevron);
|
|
4116
|
-
var StyledButton = extractErrorMessage.He.button(
|
|
3951
|
+
var StyledButton = extractErrorMessage.He.button(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n all: unset;\n color: ", ";\n cursor: pointer;\n padding: 20px 0;\n border-bottom: 1px solid #e5e8eb;\n font-weight: 500;\n display: flex;\n align-items: center;\n justify-content: space-between;\n"])), function (props) {
|
|
4117
3952
|
return props.theme.colors.primary;
|
|
4118
3953
|
});
|
|
4119
|
-
var MenuText = extractErrorMessage.He.div(
|
|
4120
|
-
var ChevronContainer = extractErrorMessage.He.span(
|
|
4121
|
-
var MenuButton = function MenuButton(
|
|
4122
|
-
var children =
|
|
4123
|
-
onClick =
|
|
3954
|
+
var MenuText = extractErrorMessage.He.div(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n"])));
|
|
3955
|
+
var ChevronContainer = extractErrorMessage.He.span(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n flex: 0 0 auto;\n"])));
|
|
3956
|
+
var MenuButton = function MenuButton(_ref75) {
|
|
3957
|
+
var children = _ref75.children,
|
|
3958
|
+
onClick = _ref75.onClick;
|
|
4124
3959
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(StyledButton, {
|
|
4125
3960
|
type: "button",
|
|
4126
3961
|
onClick: onClick
|
|
@@ -4179,9 +4014,9 @@ var MFAEnrollmentSelectionScreen = function MFAEnrollmentSelectionScreen() {
|
|
|
4179
4014
|
size: "header"
|
|
4180
4015
|
}, "Set up Multi-Factor Authentication"), /*#__PURE__*/extractErrorMessage.wn.createElement(Text, null, "Your organization requires an additional form of verification to make your account more secure."), /*#__PURE__*/extractErrorMessage.wn.createElement(Flex, {
|
|
4181
4016
|
direction: "column"
|
|
4182
|
-
}, displayOptions.map(function (
|
|
4183
|
-
var option =
|
|
4184
|
-
label =
|
|
4017
|
+
}, displayOptions.map(function (_ref76) {
|
|
4018
|
+
var option = _ref76.option,
|
|
4019
|
+
label = _ref76.label;
|
|
4185
4020
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(MenuButton, {
|
|
4186
4021
|
key: option,
|
|
4187
4022
|
onClick: function onClick() {
|
|
@@ -4203,13 +4038,13 @@ var inboxLinks = function inboxLinks(emailDomain) {
|
|
|
4203
4038
|
OUTLOOK: 'https://outlook.office.com/mail/0/inbox'
|
|
4204
4039
|
};
|
|
4205
4040
|
};
|
|
4206
|
-
var Link = extractErrorMessage.He.a(
|
|
4041
|
+
var Link = extractErrorMessage.He.a(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n all: unset;\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n text-decoration-color: ", ";\n }\n"])), function (props) {
|
|
4207
4042
|
return props.theme.colors.primary;
|
|
4208
4043
|
});
|
|
4209
|
-
var EmailProviderLink = function EmailProviderLink(
|
|
4210
|
-
var label =
|
|
4211
|
-
href =
|
|
4212
|
-
Icon =
|
|
4044
|
+
var EmailProviderLink = function EmailProviderLink(_ref77) {
|
|
4045
|
+
var label = _ref77.label,
|
|
4046
|
+
href = _ref77.href,
|
|
4047
|
+
Icon = _ref77.Icon;
|
|
4213
4048
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(Flex, {
|
|
4214
4049
|
gap: 4
|
|
4215
4050
|
}, Icon, /*#__PURE__*/extractErrorMessage.wn.createElement(Link, {
|
|
@@ -4218,10 +4053,10 @@ var EmailProviderLink = function EmailProviderLink(_ref72) {
|
|
|
4218
4053
|
rel: "noopener noreferrer"
|
|
4219
4054
|
}, /*#__PURE__*/extractErrorMessage.wn.createElement(Text, null, "Open in ", label)));
|
|
4220
4055
|
};
|
|
4221
|
-
var VerifyEmailConfirmation = function VerifyEmailConfirmation(
|
|
4222
|
-
var emailDomain =
|
|
4223
|
-
reset =
|
|
4224
|
-
email =
|
|
4056
|
+
var VerifyEmailConfirmation = function VerifyEmailConfirmation(_ref78) {
|
|
4057
|
+
var emailDomain = _ref78.emailDomain,
|
|
4058
|
+
reset = _ref78.reset,
|
|
4059
|
+
email = _ref78.email;
|
|
4225
4060
|
var _inboxLinks = inboxLinks(emailDomain),
|
|
4226
4061
|
GMAIL = _inboxLinks.GMAIL,
|
|
4227
4062
|
OUTLOOK = _inboxLinks.OUTLOOK;
|
|
@@ -4267,17 +4102,17 @@ var useEmailDomain = function useEmailDomain() {
|
|
|
4267
4102
|
var _a, _b;
|
|
4268
4103
|
var stytch = useStytch();
|
|
4269
4104
|
var config = useConfig();
|
|
4270
|
-
var _extractErrorMessage$
|
|
4105
|
+
var _extractErrorMessage$33 = extractErrorMessage.h(function () {
|
|
4271
4106
|
var _internal$readB2BInte4 = internal.readB2BInternals(stytch).bootstrap.getSync(),
|
|
4272
4107
|
emailDomains = _internal$readB2BInte4.emailDomains;
|
|
4273
4108
|
return emailDomains;
|
|
4274
4109
|
}),
|
|
4275
|
-
_extractErrorMessage$
|
|
4276
|
-
emailDomains = _extractErrorMessage$
|
|
4277
|
-
setEmailDomains = _extractErrorMessage$
|
|
4110
|
+
_extractErrorMessage$34 = _slicedToArray(_extractErrorMessage$33, 2),
|
|
4111
|
+
emailDomains = _extractErrorMessage$34[0],
|
|
4112
|
+
setEmailDomains = _extractErrorMessage$34[1];
|
|
4278
4113
|
extractErrorMessage.p(function () {
|
|
4279
|
-
internal.readB2BInternals(stytch).bootstrap.getAsync().then(function (
|
|
4280
|
-
var emailDomains =
|
|
4114
|
+
internal.readB2BInternals(stytch).bootstrap.getAsync().then(function (_ref79) {
|
|
4115
|
+
var emailDomains = _ref79.emailDomains;
|
|
4281
4116
|
setEmailDomains(emailDomains);
|
|
4282
4117
|
});
|
|
4283
4118
|
}, [stytch]);
|
|
@@ -4311,11 +4146,11 @@ var PasswordResetConfirmation = function PasswordResetConfirmation() {
|
|
|
4311
4146
|
email: state.formState.passwordState.email
|
|
4312
4147
|
});
|
|
4313
4148
|
};
|
|
4314
|
-
var Block = extractErrorMessage.He.div(
|
|
4149
|
+
var Block = extractErrorMessage.He.div(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["\n height: 4px;\n width: 25%;\n background-color: ", ";\n"])), function (props) {
|
|
4315
4150
|
return props.$bgColor;
|
|
4316
4151
|
});
|
|
4317
|
-
var PasswordStrengthCheck = function PasswordStrengthCheck(
|
|
4318
|
-
var score =
|
|
4152
|
+
var PasswordStrengthCheck = function PasswordStrengthCheck(_ref80) {
|
|
4153
|
+
var score = _ref80.score;
|
|
4319
4154
|
var blocks = [];
|
|
4320
4155
|
switch (score) {
|
|
4321
4156
|
case 0:
|
|
@@ -4420,7 +4255,7 @@ var removeStytchParams = function removeStytchParams(value) {
|
|
|
4420
4255
|
params["delete"]('stytch_token_type');
|
|
4421
4256
|
return url;
|
|
4422
4257
|
};
|
|
4423
|
-
var Form = extractErrorMessage.He.form(
|
|
4258
|
+
var Form = extractErrorMessage.He.form(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["\n width: 100%;\n"])));
|
|
4424
4259
|
var PasswordResetForm = function PasswordResetForm() {
|
|
4425
4260
|
var stytchClient = useStytch();
|
|
4426
4261
|
var config = useConfig();
|
|
@@ -4429,67 +4264,67 @@ var PasswordResetForm = function PasswordResetForm() {
|
|
|
4429
4264
|
dispatch = _useGlobalReducer44[1];
|
|
4430
4265
|
var onEvent = useEventCallback();
|
|
4431
4266
|
var onError = useErrorCallback();
|
|
4432
|
-
var _extractErrorMessage$33 = extractErrorMessage.h(''),
|
|
4433
|
-
_extractErrorMessage$34 = _slicedToArray(_extractErrorMessage$33, 2),
|
|
4434
|
-
resetTokenType = _extractErrorMessage$34[0],
|
|
4435
|
-
setResetTokenType = _extractErrorMessage$34[1];
|
|
4436
4267
|
var _extractErrorMessage$35 = extractErrorMessage.h(''),
|
|
4437
4268
|
_extractErrorMessage$36 = _slicedToArray(_extractErrorMessage$35, 2),
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
var dataLayer = internal.readB2BInternals(stytchClient).dataLayer;
|
|
4441
|
-
var email = dataLayer.getItem('reset-email-value');
|
|
4269
|
+
resetTokenType = _extractErrorMessage$36[0],
|
|
4270
|
+
setResetTokenType = _extractErrorMessage$36[1];
|
|
4442
4271
|
var _extractErrorMessage$37 = extractErrorMessage.h(''),
|
|
4443
4272
|
_extractErrorMessage$38 = _slicedToArray(_extractErrorMessage$37, 2),
|
|
4444
|
-
|
|
4445
|
-
|
|
4273
|
+
resetToken = _extractErrorMessage$38[0],
|
|
4274
|
+
setResetToken = _extractErrorMessage$38[1];
|
|
4275
|
+
var dataLayer = internal.readB2BInternals(stytchClient).dataLayer;
|
|
4276
|
+
var email = dataLayer.getItem('reset-email-value');
|
|
4446
4277
|
var _extractErrorMessage$39 = extractErrorMessage.h(''),
|
|
4447
4278
|
_extractErrorMessage$40 = _slicedToArray(_extractErrorMessage$39, 2),
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
var _extractErrorMessage$41 = extractErrorMessage.h(
|
|
4279
|
+
password = _extractErrorMessage$40[0],
|
|
4280
|
+
setPassword = _extractErrorMessage$40[1];
|
|
4281
|
+
var _extractErrorMessage$41 = extractErrorMessage.h(''),
|
|
4451
4282
|
_extractErrorMessage$42 = _slicedToArray(_extractErrorMessage$41, 2),
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
var _extractErrorMessage$43 = extractErrorMessage.h(
|
|
4283
|
+
errorMessage = _extractErrorMessage$42[0],
|
|
4284
|
+
setErrorMessage = _extractErrorMessage$42[1];
|
|
4285
|
+
var _extractErrorMessage$43 = extractErrorMessage.h(0),
|
|
4455
4286
|
_extractErrorMessage$44 = _slicedToArray(_extractErrorMessage$43, 2),
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
var _extractErrorMessage$45 = extractErrorMessage.h(
|
|
4287
|
+
passwordScore = _extractErrorMessage$44[0],
|
|
4288
|
+
setPasswordScore = _extractErrorMessage$44[1];
|
|
4289
|
+
var _extractErrorMessage$45 = extractErrorMessage.h(''),
|
|
4459
4290
|
_extractErrorMessage$46 = _slicedToArray(_extractErrorMessage$45, 2),
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
var _extractErrorMessage$47 = extractErrorMessage.h(
|
|
4291
|
+
passwordFeedback = _extractErrorMessage$46[0],
|
|
4292
|
+
setPasswordFeedback = _extractErrorMessage$46[1];
|
|
4293
|
+
var _extractErrorMessage$47 = extractErrorMessage.h(true),
|
|
4463
4294
|
_extractErrorMessage$48 = _slicedToArray(_extractErrorMessage$47, 2),
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
var _extractErrorMessage$49 = extractErrorMessage.h(
|
|
4295
|
+
invalidPassword = _extractErrorMessage$48[0],
|
|
4296
|
+
setInvalidPassword = _extractErrorMessage$48[1];
|
|
4297
|
+
var _extractErrorMessage$49 = extractErrorMessage.h(false),
|
|
4467
4298
|
_extractErrorMessage$50 = _slicedToArray(_extractErrorMessage$49, 2),
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
var _extractErrorMessage$51 = extractErrorMessage.h(
|
|
4299
|
+
isSubmitting = _extractErrorMessage$50[0],
|
|
4300
|
+
setIsSubmitting = _extractErrorMessage$50[1];
|
|
4301
|
+
var _extractErrorMessage$51 = extractErrorMessage.h('none'),
|
|
4471
4302
|
_extractErrorMessage$52 = _slicedToArray(_extractErrorMessage$51, 2),
|
|
4472
|
-
|
|
4473
|
-
|
|
4303
|
+
strengthPolicy = _extractErrorMessage$52[0],
|
|
4304
|
+
setStrengthPolicy = _extractErrorMessage$52[1];
|
|
4474
4305
|
var _extractErrorMessage$53 = extractErrorMessage.h(0),
|
|
4475
4306
|
_extractErrorMessage$54 = _slicedToArray(_extractErrorMessage$53, 2),
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
var _extractErrorMessage$55 = extractErrorMessage.h(
|
|
4307
|
+
missingCharacters = _extractErrorMessage$54[0],
|
|
4308
|
+
setMissingCharacters = _extractErrorMessage$54[1];
|
|
4309
|
+
var _extractErrorMessage$55 = extractErrorMessage.h(0),
|
|
4479
4310
|
_extractErrorMessage$56 = _slicedToArray(_extractErrorMessage$55, 2),
|
|
4480
|
-
|
|
4481
|
-
|
|
4311
|
+
missingComplexity = _extractErrorMessage$56[0],
|
|
4312
|
+
setMissingComplexity = _extractErrorMessage$56[1];
|
|
4313
|
+
var _extractErrorMessage$57 = extractErrorMessage.h(false),
|
|
4314
|
+
_extractErrorMessage$58 = _slicedToArray(_extractErrorMessage$57, 2),
|
|
4315
|
+
isPasswordBreached = _extractErrorMessage$58[0],
|
|
4316
|
+
setIsPasswordBreached = _extractErrorMessage$58[1];
|
|
4482
4317
|
var updateStrengthCheck = extractErrorMessage.F(function () {
|
|
4483
4318
|
return internal.debounce(function (password) {
|
|
4484
4319
|
return stytchClient.passwords.strengthCheck({
|
|
4485
4320
|
password: password
|
|
4486
|
-
}).then(function (
|
|
4487
|
-
var score =
|
|
4488
|
-
valid_password =
|
|
4489
|
-
zxcvbn_feedback =
|
|
4490
|
-
luds_feedback =
|
|
4491
|
-
strength_policy =
|
|
4492
|
-
breached_password =
|
|
4321
|
+
}).then(function (_ref81) {
|
|
4322
|
+
var score = _ref81.score,
|
|
4323
|
+
valid_password = _ref81.valid_password,
|
|
4324
|
+
zxcvbn_feedback = _ref81.zxcvbn_feedback,
|
|
4325
|
+
luds_feedback = _ref81.luds_feedback,
|
|
4326
|
+
strength_policy = _ref81.strength_policy,
|
|
4327
|
+
breached_password = _ref81.breached_password;
|
|
4493
4328
|
setStrengthPolicy(strength_policy);
|
|
4494
4329
|
setInvalidPassword(!valid_password);
|
|
4495
4330
|
if (strength_policy === 'zxcvbn') {
|
|
@@ -4657,7 +4492,7 @@ var PasswordSetNew = function PasswordSetNew() {
|
|
|
4657
4492
|
reset_password_expiration_minutes: (_c = config.passwordOptions) === null || _c === void 0 ? void 0 : _c.resetPasswordExpirationMinutes,
|
|
4658
4493
|
reset_password_template_id: (_d = config.passwordOptions) === null || _d === void 0 ? void 0 : _d.resetPasswordTemplateId
|
|
4659
4494
|
}).then(function (data) {
|
|
4660
|
-
|
|
4495
|
+
_t.success('Email resent');
|
|
4661
4496
|
setIsSubmitting(false);
|
|
4662
4497
|
onEvent({
|
|
4663
4498
|
type: internal.StytchEventType.B2BPasswordResetByEmailStart,
|
|
@@ -4724,8 +4559,8 @@ var PasswordsForgotForm = function PasswordsForgotForm() {
|
|
|
4724
4559
|
case 4:
|
|
4725
4560
|
setErrorMessage('');
|
|
4726
4561
|
setIsSubmitting(true);
|
|
4727
|
-
internal.readB2BInternals(stytch).searchManager.searchMember(email, organization.organization_id).then(function (
|
|
4728
|
-
var member =
|
|
4562
|
+
internal.readB2BInternals(stytch).searchManager.searchMember(email, organization.organization_id).then(function (_ref82) {
|
|
4563
|
+
var member = _ref82.member;
|
|
4729
4564
|
var _a, _b, _c, _d;
|
|
4730
4565
|
if (!(member === null || member === void 0 ? void 0 : member.member_password_id)) {
|
|
4731
4566
|
handleNonMemberReset();
|
|
@@ -4812,16 +4647,16 @@ var RecoveryCodeEntryScreen = function RecoveryCodeEntryScreen() {
|
|
|
4812
4647
|
var _state$mfa$primaryInf = state.mfa.primaryInfo,
|
|
4813
4648
|
memberId = _state$mfa$primaryInf.memberId,
|
|
4814
4649
|
organizationId = _state$mfa$primaryInf.organizationId;
|
|
4815
|
-
var _extractErrorMessage$
|
|
4816
|
-
_extractErrorMessage$
|
|
4817
|
-
recoveryCode = _extractErrorMessage$
|
|
4818
|
-
setRecoveryCode = _extractErrorMessage$
|
|
4819
|
-
var _useMutate7 = useMutate('stytch.recoveryCodes.recover', function (_,
|
|
4820
|
-
var
|
|
4821
|
-
recoveryCode =
|
|
4822
|
-
memberId =
|
|
4823
|
-
organizationId =
|
|
4824
|
-
sessionDurationMinutes =
|
|
4650
|
+
var _extractErrorMessage$59 = extractErrorMessage.h(''),
|
|
4651
|
+
_extractErrorMessage$60 = _slicedToArray(_extractErrorMessage$59, 2),
|
|
4652
|
+
recoveryCode = _extractErrorMessage$60[0],
|
|
4653
|
+
setRecoveryCode = _extractErrorMessage$60[1];
|
|
4654
|
+
var _useMutate7 = useMutate('stytch.recoveryCodes.recover', function (_, _ref83) {
|
|
4655
|
+
var _ref83$arg = _ref83.arg,
|
|
4656
|
+
recoveryCode = _ref83$arg.recoveryCode,
|
|
4657
|
+
memberId = _ref83$arg.memberId,
|
|
4658
|
+
organizationId = _ref83$arg.organizationId,
|
|
4659
|
+
sessionDurationMinutes = _ref83$arg.sessionDurationMinutes;
|
|
4825
4660
|
return stytchClient.recoveryCodes.recover({
|
|
4826
4661
|
recovery_code: recoveryCode,
|
|
4827
4662
|
member_id: memberId,
|
|
@@ -4891,8 +4726,8 @@ var RecoveryCodeEntryScreen = function RecoveryCodeEntryScreen() {
|
|
|
4891
4726
|
isSubmitting: isSubmitting
|
|
4892
4727
|
})));
|
|
4893
4728
|
};
|
|
4894
|
-
var InsetContainer = extractErrorMessage.He.div(
|
|
4895
|
-
var CodeList = extractErrorMessage.He.ul(
|
|
4729
|
+
var InsetContainer = extractErrorMessage.He.div(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["\n background-color: #f3f5f6;\n color: #000;\n font-size: 16px;\n line-height: 28px;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n gap: 8px;\n padding: 16px 8px;\n"])));
|
|
4730
|
+
var CodeList = extractErrorMessage.He.ul(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n list-style: none;\n padding: 0;\n margin: 0;\n"])));
|
|
4896
4731
|
var downloadFile = function downloadFile(content, filename) {
|
|
4897
4732
|
var blob = new Blob([content], {
|
|
4898
4733
|
type: 'text/plain'
|
|
@@ -4929,13 +4764,13 @@ var RecoveryCodeSaveScreen = function RecoveryCodeSaveScreen() {
|
|
|
4929
4764
|
_context9.next = 3;
|
|
4930
4765
|
return navigator.clipboard.writeText(recoveryCodes.join('\n'));
|
|
4931
4766
|
case 3:
|
|
4932
|
-
|
|
4767
|
+
_t.success('Copied');
|
|
4933
4768
|
_context9.next = 9;
|
|
4934
4769
|
break;
|
|
4935
4770
|
case 6:
|
|
4936
4771
|
_context9.prev = 6;
|
|
4937
4772
|
_context9.t0 = _context9["catch"](0);
|
|
4938
|
-
|
|
4773
|
+
_t.error("Couldn't copy codes to clipboard");
|
|
4939
4774
|
case 9:
|
|
4940
4775
|
case "end":
|
|
4941
4776
|
return _context9.stop();
|
|
@@ -4966,7 +4801,7 @@ var RecoveryCodeSaveScreen = function RecoveryCodeSaveScreen() {
|
|
|
4966
4801
|
onClick: handleContinue
|
|
4967
4802
|
}, "Done"));
|
|
4968
4803
|
};
|
|
4969
|
-
var Select = extractErrorMessage.He.select(
|
|
4804
|
+
var Select = extractErrorMessage.He.select(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n height: 47px;\n box-sizing: border-box;\n padding: 0 8px;\n color: ", ";\n font-family: ", ";\n width: 80px;\n font-size: 18px;\n"])), function (props) {
|
|
4970
4805
|
return props.theme.inputs.backgroundColor;
|
|
4971
4806
|
}, function (props) {
|
|
4972
4807
|
return props.theme.inputs.borderColor;
|
|
@@ -4977,9 +4812,9 @@ var Select = extractErrorMessage.He.select(_templateObject41 || (_templateObject
|
|
|
4977
4812
|
}, function (props) {
|
|
4978
4813
|
return props.theme.typography.fontFamily;
|
|
4979
4814
|
});
|
|
4980
|
-
var CountrySelector = function CountrySelector(
|
|
4981
|
-
var country =
|
|
4982
|
-
setCountry =
|
|
4815
|
+
var CountrySelector = function CountrySelector(_ref84) {
|
|
4816
|
+
var country = _ref84.country,
|
|
4817
|
+
setCountry = _ref84.setCountry;
|
|
4983
4818
|
var countryFormatter = new Intl.DisplayNames(['en'], {
|
|
4984
4819
|
type: 'region'
|
|
4985
4820
|
});
|
|
@@ -4990,24 +4825,24 @@ var CountrySelector = function CountrySelector(_ref79) {
|
|
|
4990
4825
|
onChange: function onChange(e) {
|
|
4991
4826
|
setCountry(e.target.value);
|
|
4992
4827
|
}
|
|
4993
|
-
}, Object.entries(internal.COUNTRIES_LIST).map(function (
|
|
4994
|
-
var
|
|
4995
|
-
countryCode =
|
|
4996
|
-
countryNumber =
|
|
4828
|
+
}, Object.entries(internal.COUNTRIES_LIST).map(function (_ref85) {
|
|
4829
|
+
var _ref86 = _slicedToArray(_ref85, 2),
|
|
4830
|
+
countryCode = _ref86[0],
|
|
4831
|
+
countryNumber = _ref86[1];
|
|
4997
4832
|
return /*#__PURE__*/extractErrorMessage.wn.createElement("option", {
|
|
4998
4833
|
key: countryCode,
|
|
4999
4834
|
value: countryCode
|
|
5000
4835
|
}, countryCode !== country ? "+".concat(countryNumber, " ").concat(countryFormatter.of(countryCode)) : "+".concat(countryNumber));
|
|
5001
4836
|
}));
|
|
5002
4837
|
};
|
|
5003
|
-
var PhoneStyledInput = extractErrorMessage.He(Input)(
|
|
5004
|
-
var PhoneInput = function PhoneInput(
|
|
5005
|
-
var phone =
|
|
5006
|
-
setPhone =
|
|
5007
|
-
country =
|
|
5008
|
-
setCountry =
|
|
5009
|
-
parsePhoneNumber =
|
|
5010
|
-
hasPasskeys =
|
|
4838
|
+
var PhoneStyledInput = extractErrorMessage.He(Input)(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["\n flex-grow: 1;\n min-width: 100px;\n"])));
|
|
4839
|
+
var PhoneInput = function PhoneInput(_ref87) {
|
|
4840
|
+
var phone = _ref87.phone,
|
|
4841
|
+
setPhone = _ref87.setPhone,
|
|
4842
|
+
country = _ref87.country,
|
|
4843
|
+
setCountry = _ref87.setCountry,
|
|
4844
|
+
parsePhoneNumber = _ref87.parsePhoneNumber,
|
|
4845
|
+
hasPasskeys = _ref87.hasPasskeys;
|
|
5011
4846
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(Flex, {
|
|
5012
4847
|
direction: "row",
|
|
5013
4848
|
wrap: "nowrap",
|
|
@@ -5027,16 +4862,23 @@ var PhoneInput = function PhoneInput(_ref82) {
|
|
|
5027
4862
|
type: 'text',
|
|
5028
4863
|
onChange: function onChange(e) {
|
|
5029
4864
|
return internal.__awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
5030
|
-
var parsedPhoneNumber;
|
|
4865
|
+
var userInput, parsedPhoneNumber;
|
|
5031
4866
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
5032
4867
|
while (1) switch (_context10.prev = _context10.next) {
|
|
5033
4868
|
case 0:
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
4869
|
+
userInput = e.target.value;
|
|
4870
|
+
_context10.next = 3;
|
|
4871
|
+
return parsePhoneNumber(userInput, country);
|
|
4872
|
+
case 3:
|
|
5037
4873
|
parsedPhoneNumber = _context10.sent;
|
|
4874
|
+
if (!(userInput !== e.target.value)) {
|
|
4875
|
+
_context10.next = 6;
|
|
4876
|
+
break;
|
|
4877
|
+
}
|
|
4878
|
+
return _context10.abrupt("return");
|
|
4879
|
+
case 6:
|
|
5038
4880
|
setPhone(parsedPhoneNumber.national);
|
|
5039
|
-
case
|
|
4881
|
+
case 7:
|
|
5040
4882
|
case "end":
|
|
5041
4883
|
return _context10.stop();
|
|
5042
4884
|
}
|
|
@@ -5062,8 +4904,8 @@ var InvalidPhoneNumberError = /*#__PURE__*/function (_internal$StytchSDKEr) {
|
|
|
5062
4904
|
}
|
|
5063
4905
|
return _createClass(InvalidPhoneNumberError);
|
|
5064
4906
|
}(internal.StytchSDKError);
|
|
5065
|
-
var findErrorTypeFrom = function findErrorTypeFrom(
|
|
5066
|
-
var error =
|
|
4907
|
+
var findErrorTypeFrom = function findErrorTypeFrom(_ref88) {
|
|
4908
|
+
var error = _ref88.error;
|
|
5067
4909
|
var errorType = extractErrorType(error);
|
|
5068
4910
|
return !!errorType && errorType in supportedErrorTypeMap ? errorType : 'default';
|
|
5069
4911
|
};
|
|
@@ -5085,14 +4927,14 @@ var SMSOTPEnrollScreen = function SMSOTPEnrollScreen() {
|
|
|
5085
4927
|
var _state$mfa$primaryInf2 = state.mfa.primaryInfo,
|
|
5086
4928
|
memberId = _state$mfa$primaryInf2.memberId,
|
|
5087
4929
|
organizationId = _state$mfa$primaryInf2.organizationId;
|
|
5088
|
-
var _extractErrorMessage$
|
|
5089
|
-
_extractErrorMessage$60 = _slicedToArray(_extractErrorMessage$59, 2),
|
|
5090
|
-
countryCode = _extractErrorMessage$60[0],
|
|
5091
|
-
setCountryCode = _extractErrorMessage$60[1];
|
|
5092
|
-
var _extractErrorMessage$61 = extractErrorMessage.wn.useState((_b = enrolledNumber === null || enrolledNumber === void 0 ? void 0 : enrolledNumber.phoneNumber) !== null && _b !== void 0 ? _b : ''),
|
|
4930
|
+
var _extractErrorMessage$61 = extractErrorMessage.wn.useState((_a = enrolledNumber === null || enrolledNumber === void 0 ? void 0 : enrolledNumber.countryCode) !== null && _a !== void 0 ? _a : DEFAULT_COUNTRY_CODE),
|
|
5093
4931
|
_extractErrorMessage$62 = _slicedToArray(_extractErrorMessage$61, 2),
|
|
5094
|
-
|
|
5095
|
-
|
|
4932
|
+
countryCode = _extractErrorMessage$62[0],
|
|
4933
|
+
setCountryCode = _extractErrorMessage$62[1];
|
|
4934
|
+
var _extractErrorMessage$63 = extractErrorMessage.wn.useState((_b = enrolledNumber === null || enrolledNumber === void 0 ? void 0 : enrolledNumber.phoneNumber) !== null && _b !== void 0 ? _b : ''),
|
|
4935
|
+
_extractErrorMessage$64 = _slicedToArray(_extractErrorMessage$63, 2),
|
|
4936
|
+
phoneNumber = _extractErrorMessage$64[0],
|
|
4937
|
+
setPhoneNumber = _extractErrorMessage$64[1];
|
|
5096
4938
|
var errorType = findErrorTypeFrom({
|
|
5097
4939
|
error: sendError
|
|
5098
4940
|
});
|
|
@@ -5103,8 +4945,8 @@ var SMSOTPEnrollScreen = function SMSOTPEnrollScreen() {
|
|
|
5103
4945
|
regionCode: countryCode
|
|
5104
4946
|
});
|
|
5105
4947
|
};
|
|
5106
|
-
var _useMutate8 = useMutate('stytch.otps.sms.send', function (_,
|
|
5107
|
-
var parsedNumber =
|
|
4948
|
+
var _useMutate8 = useMutate('stytch.otps.sms.send', function (_, _ref89) {
|
|
4949
|
+
var parsedNumber = _ref89.arg.parsedNumber;
|
|
5108
4950
|
return internal.__awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
5109
4951
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
5110
4952
|
while (1) switch (_context11.prev = _context11.next) {
|
|
@@ -5203,9 +5045,9 @@ var SMSOTPEnrollScreen = function SMSOTPEnrollScreen() {
|
|
|
5203
5045
|
disabled: !phoneNumber
|
|
5204
5046
|
})));
|
|
5205
5047
|
};
|
|
5206
|
-
var InlineButton = function InlineButton(
|
|
5207
|
-
var onClick =
|
|
5208
|
-
children =
|
|
5048
|
+
var InlineButton = function InlineButton(_ref90) {
|
|
5049
|
+
var onClick = _ref90.onClick,
|
|
5050
|
+
children = _ref90.children;
|
|
5209
5051
|
return /*#__PURE__*/extractErrorMessage.wn.createElement("button", {
|
|
5210
5052
|
onClick: onClick,
|
|
5211
5053
|
style: {
|
|
@@ -5217,45 +5059,45 @@ var InlineButton = function InlineButton(_ref85) {
|
|
|
5217
5059
|
}
|
|
5218
5060
|
}, children));
|
|
5219
5061
|
};
|
|
5220
|
-
var Wrapper = extractErrorMessage.He.div(
|
|
5221
|
-
var isOpen =
|
|
5062
|
+
var Wrapper = extractErrorMessage.He.div(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["\n display: grid;\n grid-template-rows: ", ";\n transition: grid-template-rows 0.15s ease-out;\n"])), function (_ref91) {
|
|
5063
|
+
var isOpen = _ref91.isOpen;
|
|
5222
5064
|
return isOpen ? '1fr' : '0fr';
|
|
5223
5065
|
});
|
|
5224
|
-
var Inner = extractErrorMessage.He.div(
|
|
5225
|
-
var AnimatedContainer = function AnimatedContainer(
|
|
5226
|
-
var isOpen =
|
|
5227
|
-
children =
|
|
5066
|
+
var Inner = extractErrorMessage.He.div(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["\n overflow: hidden;\n"])));
|
|
5067
|
+
var AnimatedContainer = function AnimatedContainer(_ref92) {
|
|
5068
|
+
var isOpen = _ref92.isOpen,
|
|
5069
|
+
children = _ref92.children;
|
|
5228
5070
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(Wrapper, {
|
|
5229
5071
|
isOpen: isOpen
|
|
5230
5072
|
}, /*#__PURE__*/extractErrorMessage.wn.createElement(Inner, null, children));
|
|
5231
5073
|
};
|
|
5232
|
-
var Container = extractErrorMessage.He.div(
|
|
5233
|
-
var theme =
|
|
5074
|
+
var Container = extractErrorMessage.He.div(_templateObject58 || (_templateObject58 = _taggedTemplateLiteral(["\n height: 4px;\n background-color: ", ";\n border-radius: 3px;\n overflow: hidden;\n"])), function (_ref93) {
|
|
5075
|
+
var theme = _ref93.theme;
|
|
5234
5076
|
return theme.colors.disabled;
|
|
5235
5077
|
});
|
|
5236
|
-
var loading = extractErrorMessage.Ue(
|
|
5237
|
-
var Progress = extractErrorMessage.He.div(
|
|
5238
|
-
var theme =
|
|
5078
|
+
var loading = extractErrorMessage.Ue(_templateObject59 || (_templateObject59 = _taggedTemplateLiteral(["\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(-1%);\n }\n"])));
|
|
5079
|
+
var Progress = extractErrorMessage.He.div(_templateObject60 || (_templateObject60 = _taggedTemplateLiteral(["\n height: 100%;\n width: 100%;\n background-color: ", ";\n animation: ", " 10s cubic-bezier(0.22, 1, 0.36, 1);\n"])), function (_ref94) {
|
|
5080
|
+
var theme = _ref94.theme;
|
|
5239
5081
|
return theme.colors.primary;
|
|
5240
5082
|
}, loading);
|
|
5241
|
-
var LoadingBar = function LoadingBar(
|
|
5242
|
-
var isLoading =
|
|
5083
|
+
var LoadingBar = function LoadingBar(_ref95) {
|
|
5084
|
+
var isLoading = _ref95.isLoading;
|
|
5243
5085
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(Container, null, isLoading && /*#__PURE__*/extractErrorMessage.wn.createElement(Progress, null));
|
|
5244
5086
|
};
|
|
5245
5087
|
var GAP = '8px';
|
|
5246
5088
|
var WIDTH = '46px';
|
|
5247
5089
|
var INPUT_HEIGHT = '46px';
|
|
5248
|
-
var Digit = extractErrorMessage.He.div(
|
|
5249
|
-
var disabled =
|
|
5250
|
-
theme =
|
|
5090
|
+
var Digit = extractErrorMessage.He.div(_templateObject61 || (_templateObject61 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n border-radius: 4px;\n align-items: center;\n display: flex;\n font-size: 18px;\n justify-content: center;\n height: ", ";\n width: ", ";\n background: ", ";\n color: ", ";\n"])), function (_ref96) {
|
|
5091
|
+
var disabled = _ref96.disabled,
|
|
5092
|
+
theme = _ref96.theme;
|
|
5251
5093
|
return disabled ? theme.colors.disabled : '#ADBCC5';
|
|
5252
|
-
}, INPUT_HEIGHT, WIDTH, function (
|
|
5253
|
-
var disabled =
|
|
5254
|
-
theme =
|
|
5094
|
+
}, INPUT_HEIGHT, WIDTH, function (_ref97) {
|
|
5095
|
+
var disabled = _ref97.disabled,
|
|
5096
|
+
theme = _ref97.theme;
|
|
5255
5097
|
return disabled ? theme.colors.disabled : theme.inputs.backgroundColor;
|
|
5256
|
-
}, function (
|
|
5257
|
-
var disabled =
|
|
5258
|
-
theme =
|
|
5098
|
+
}, function (_ref98) {
|
|
5099
|
+
var disabled = _ref98.disabled,
|
|
5100
|
+
theme = _ref98.theme;
|
|
5259
5101
|
return disabled ? theme.colors.disabledText : theme.inputs.textColor;
|
|
5260
5102
|
});
|
|
5261
5103
|
var digitsContainerStyles = {
|
|
@@ -5285,20 +5127,20 @@ var invisibleInputStyles = {
|
|
|
5285
5127
|
paddingLeft: "calc(0.5 * ".concat(WIDTH, ")"),
|
|
5286
5128
|
zIndex: 10
|
|
5287
5129
|
};
|
|
5288
|
-
var DigitAtIndex = function DigitAtIndex(
|
|
5289
|
-
var index =
|
|
5290
|
-
disabled =
|
|
5291
|
-
otp =
|
|
5130
|
+
var DigitAtIndex = function DigitAtIndex(_ref99) {
|
|
5131
|
+
var index = _ref99.index,
|
|
5132
|
+
disabled = _ref99.disabled,
|
|
5133
|
+
otp = _ref99.otp;
|
|
5292
5134
|
var fill = otp ? otp[index] : '';
|
|
5293
5135
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(Digit, {
|
|
5294
5136
|
disabled: disabled,
|
|
5295
5137
|
"data-testid": "otp-".concat(index)
|
|
5296
5138
|
}, fill);
|
|
5297
5139
|
};
|
|
5298
|
-
var OTPInput = function OTPInput(
|
|
5299
|
-
var otp =
|
|
5300
|
-
setOtp =
|
|
5301
|
-
disabled =
|
|
5140
|
+
var OTPInput = function OTPInput(_ref100) {
|
|
5141
|
+
var otp = _ref100.otp,
|
|
5142
|
+
setOtp = _ref100.setOtp,
|
|
5143
|
+
disabled = _ref100.disabled;
|
|
5302
5144
|
var onPasscodeChange = function onPasscodeChange(e) {
|
|
5303
5145
|
if (!/^\d*$/.test(e.target.value)) {
|
|
5304
5146
|
return;
|
|
@@ -5330,14 +5172,14 @@ var OTPInput = function OTPInput(_ref95) {
|
|
|
5330
5172
|
})));
|
|
5331
5173
|
};
|
|
5332
5174
|
var OTP_CODE_LENGTH = 6;
|
|
5333
|
-
var OTPControl = function OTPControl(
|
|
5334
|
-
var isSubmitting =
|
|
5335
|
-
onSubmit =
|
|
5336
|
-
errorMessage =
|
|
5337
|
-
var _extractErrorMessage$
|
|
5338
|
-
_extractErrorMessage$
|
|
5339
|
-
otp = _extractErrorMessage$
|
|
5340
|
-
setOtp = _extractErrorMessage$
|
|
5175
|
+
var OTPControl = function OTPControl(_ref101) {
|
|
5176
|
+
var isSubmitting = _ref101.isSubmitting,
|
|
5177
|
+
onSubmit = _ref101.onSubmit,
|
|
5178
|
+
errorMessage = _ref101.errorMessage;
|
|
5179
|
+
var _extractErrorMessage$65 = extractErrorMessage.h(''),
|
|
5180
|
+
_extractErrorMessage$66 = _slicedToArray(_extractErrorMessage$65, 2),
|
|
5181
|
+
otp = _extractErrorMessage$66[0],
|
|
5182
|
+
setOtp = _extractErrorMessage$66[1];
|
|
5341
5183
|
var handleOtpChange = function handleOtpChange(otp) {
|
|
5342
5184
|
setOtp(otp);
|
|
5343
5185
|
if (otp.length === OTP_CODE_LENGTH) {
|
|
@@ -5366,13 +5208,13 @@ var OTPControl = function OTPControl(_ref96) {
|
|
|
5366
5208
|
errorMessage: errorMessage !== null && errorMessage !== void 0 ? errorMessage : ''
|
|
5367
5209
|
}));
|
|
5368
5210
|
};
|
|
5369
|
-
var OTPEntry = function OTPEntry(
|
|
5370
|
-
var header =
|
|
5371
|
-
helperContent =
|
|
5372
|
-
instruction =
|
|
5373
|
-
isSubmitting =
|
|
5374
|
-
onSubmit =
|
|
5375
|
-
errorMessage =
|
|
5211
|
+
var OTPEntry = function OTPEntry(_ref102) {
|
|
5212
|
+
var header = _ref102.header,
|
|
5213
|
+
helperContent = _ref102.helperContent,
|
|
5214
|
+
instruction = _ref102.instruction,
|
|
5215
|
+
isSubmitting = _ref102.isSubmitting,
|
|
5216
|
+
onSubmit = _ref102.onSubmit,
|
|
5217
|
+
errorMessage = _ref102.errorMessage;
|
|
5376
5218
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(Flex, {
|
|
5377
5219
|
direction: "column",
|
|
5378
5220
|
gap: 24
|
|
@@ -5391,15 +5233,15 @@ var getSecondsRemaining = function getSecondsRemaining(expiration) {
|
|
|
5391
5233
|
var now = new Date();
|
|
5392
5234
|
return Math.ceil((expiration.getTime() - now.getTime()) / 1000);
|
|
5393
5235
|
};
|
|
5394
|
-
var ExpirationMessage = function ExpirationMessage(
|
|
5395
|
-
var expiration =
|
|
5396
|
-
resendOTP =
|
|
5397
|
-
var _extractErrorMessage$
|
|
5236
|
+
var ExpirationMessage = function ExpirationMessage(_ref103) {
|
|
5237
|
+
var expiration = _ref103.expiration,
|
|
5238
|
+
resendOTP = _ref103.resendOTP;
|
|
5239
|
+
var _extractErrorMessage$67 = extractErrorMessage.h(function () {
|
|
5398
5240
|
return getSecondsRemaining(expiration);
|
|
5399
5241
|
}),
|
|
5400
|
-
_extractErrorMessage$
|
|
5401
|
-
seconds = _extractErrorMessage$
|
|
5402
|
-
setSeconds = _extractErrorMessage$
|
|
5242
|
+
_extractErrorMessage$68 = _slicedToArray(_extractErrorMessage$67, 2),
|
|
5243
|
+
seconds = _extractErrorMessage$68[0],
|
|
5244
|
+
setSeconds = _extractErrorMessage$68[1];
|
|
5403
5245
|
var codeExpired = seconds <= 0;
|
|
5404
5246
|
extractErrorMessage.p(function () {
|
|
5405
5247
|
if (!codeExpired) {
|
|
@@ -5421,13 +5263,13 @@ var ExpirationMessage = function ExpirationMessage(_ref98) {
|
|
|
5421
5263
|
onClick: resendOTP
|
|
5422
5264
|
}, "Resend code"));
|
|
5423
5265
|
};
|
|
5424
|
-
var SentOTPEntry = function SentOTPEntry(
|
|
5425
|
-
var expiration =
|
|
5426
|
-
formattedDestination =
|
|
5427
|
-
isSubmitting =
|
|
5428
|
-
onSubmit =
|
|
5429
|
-
errorMessage =
|
|
5430
|
-
resendOTP =
|
|
5266
|
+
var SentOTPEntry = function SentOTPEntry(_ref104) {
|
|
5267
|
+
var expiration = _ref104.expiration,
|
|
5268
|
+
formattedDestination = _ref104.formattedDestination,
|
|
5269
|
+
isSubmitting = _ref104.isSubmitting,
|
|
5270
|
+
onSubmit = _ref104.onSubmit,
|
|
5271
|
+
errorMessage = _ref104.errorMessage,
|
|
5272
|
+
resendOTP = _ref104.resendOTP;
|
|
5431
5273
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(OTPEntry, {
|
|
5432
5274
|
header: "Enter passcode",
|
|
5433
5275
|
helperContent: /*#__PURE__*/extractErrorMessage.wn.createElement(ExpirationMessage, {
|
|
@@ -5460,10 +5302,10 @@ var SMSOTPEntryScreen = function SMSOTPEntryScreen() {
|
|
|
5460
5302
|
memberPhoneNumber = _state$mfa$primaryInf3.memberPhoneNumber,
|
|
5461
5303
|
organizationId = _state$mfa$primaryInf3.organizationId,
|
|
5462
5304
|
organizationMfaOptionsSupported = _state$mfa$primaryInf3.organizationMfaOptionsSupported;
|
|
5463
|
-
var _useMutate9 = useMutate('stytch.otps.sms.send', function (_,
|
|
5464
|
-
var
|
|
5465
|
-
memberId =
|
|
5466
|
-
organizationId =
|
|
5305
|
+
var _useMutate9 = useMutate('stytch.otps.sms.send', function (_, _ref105) {
|
|
5306
|
+
var _ref105$arg = _ref105.arg,
|
|
5307
|
+
memberId = _ref105$arg.memberId,
|
|
5308
|
+
organizationId = _ref105$arg.organizationId;
|
|
5467
5309
|
dispatch({
|
|
5468
5310
|
type: 'sms_otp/send'
|
|
5469
5311
|
});
|
|
@@ -5481,7 +5323,7 @@ var SMSOTPEntryScreen = function SMSOTPEntryScreen() {
|
|
|
5481
5323
|
onError: function onError(error) {
|
|
5482
5324
|
var message = extractErrorMessage.extractErrorMessage(error);
|
|
5483
5325
|
if (message) {
|
|
5484
|
-
|
|
5326
|
+
_t.error(message);
|
|
5485
5327
|
}
|
|
5486
5328
|
dispatch({
|
|
5487
5329
|
type: 'sms_otp/send_error',
|
|
@@ -5492,12 +5334,12 @@ var SMSOTPEntryScreen = function SMSOTPEntryScreen() {
|
|
|
5492
5334
|
sendSms = _useMutate9.trigger,
|
|
5493
5335
|
isSending = _useMutate9.isMutating,
|
|
5494
5336
|
sendError = _useMutate9.error;
|
|
5495
|
-
var _useMutate10 = useMutate('stytch.otps.sms.authenticate', function (_,
|
|
5496
|
-
var
|
|
5497
|
-
otp =
|
|
5498
|
-
memberId =
|
|
5499
|
-
organizationId =
|
|
5500
|
-
sessionDurationMinutes =
|
|
5337
|
+
var _useMutate10 = useMutate('stytch.otps.sms.authenticate', function (_, _ref106) {
|
|
5338
|
+
var _ref106$arg = _ref106.arg,
|
|
5339
|
+
otp = _ref106$arg.otp,
|
|
5340
|
+
memberId = _ref106$arg.memberId,
|
|
5341
|
+
organizationId = _ref106$arg.organizationId,
|
|
5342
|
+
sessionDurationMinutes = _ref106$arg.sessionDurationMinutes;
|
|
5501
5343
|
return stytchClient.otps.sms.authenticate({
|
|
5502
5344
|
code: otp,
|
|
5503
5345
|
member_id: memberId,
|
|
@@ -5621,10 +5463,10 @@ var CopyIcon = function CopyIcon() {
|
|
|
5621
5463
|
}));
|
|
5622
5464
|
};
|
|
5623
5465
|
var Copy = CreateIcon(CopyIcon);
|
|
5624
|
-
var CopyButton = extractErrorMessage.He.button(
|
|
5625
|
-
var CodeContainer = extractErrorMessage.He(InsetContainer)(
|
|
5626
|
-
var Spacer = extractErrorMessage.He.div(
|
|
5627
|
-
var Code = extractErrorMessage.He.code(
|
|
5466
|
+
var CopyButton = extractErrorMessage.He.button(_templateObject62 || (_templateObject62 = _taggedTemplateLiteral(["\n all: unset;\n flex: 0 0 24px;\n height: 28px;\n opacity: 0;\n :focus {\n opacity: 1;\n }\n"])));
|
|
5467
|
+
var CodeContainer = extractErrorMessage.He(InsetContainer)(_templateObject63 || (_templateObject63 = _taggedTemplateLiteral(["\n cursor: pointer;\n :hover ", " {\n opacity: 1;\n }\n"])), CopyButton);
|
|
5468
|
+
var Spacer = extractErrorMessage.He.div(_templateObject64 || (_templateObject64 = _taggedTemplateLiteral(["\n flex: 0 1 24px;\n"])));
|
|
5469
|
+
var Code = extractErrorMessage.He.code(_templateObject65 || (_templateObject65 = _taggedTemplateLiteral(["\n white-space: pre-wrap;\n align-self: center;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n gap: 1ch;\n"])));
|
|
5628
5470
|
var TOTPEnrollManualScreen = function TOTPEnrollManualScreen() {
|
|
5629
5471
|
var _useGlobalReducer57 = useGlobalReducer(),
|
|
5630
5472
|
_useGlobalReducer58 = _slicedToArray(_useGlobalReducer57, 2),
|
|
@@ -5654,13 +5496,13 @@ var TOTPEnrollManualScreen = function TOTPEnrollManualScreen() {
|
|
|
5654
5496
|
_context14.next = 4;
|
|
5655
5497
|
return navigator.clipboard.writeText(displaySecret);
|
|
5656
5498
|
case 4:
|
|
5657
|
-
|
|
5499
|
+
_t.success('Code copied');
|
|
5658
5500
|
_context14.next = 10;
|
|
5659
5501
|
break;
|
|
5660
5502
|
case 7:
|
|
5661
5503
|
_context14.prev = 7;
|
|
5662
5504
|
_context14.t0 = _context14["catch"](1);
|
|
5663
|
-
|
|
5505
|
+
_t.error("Couldn't copy code to clipboard");
|
|
5664
5506
|
case 10:
|
|
5665
5507
|
case "end":
|
|
5666
5508
|
return _context14.stop();
|
|
@@ -5694,7 +5536,7 @@ var TOTPEnrollManualScreen = function TOTPEnrollManualScreen() {
|
|
|
5694
5536
|
onClick: handleShowQRCode
|
|
5695
5537
|
}, "Try to scan the QR code again"));
|
|
5696
5538
|
};
|
|
5697
|
-
var QRCodeImg = extractErrorMessage.He.img(
|
|
5539
|
+
var QRCodeImg = extractErrorMessage.He.img(_templateObject66 || (_templateObject66 = _taggedTemplateLiteral(["\n margin: 0 auto;\n"])));
|
|
5698
5540
|
var TOTPEnrollQRScreen = function TOTPEnrollQRScreen() {
|
|
5699
5541
|
var stytchClient = useStytch();
|
|
5700
5542
|
var _useGlobalReducer59 = useGlobalReducer(),
|
|
@@ -5708,10 +5550,10 @@ var TOTPEnrollQRScreen = function TOTPEnrollQRScreen() {
|
|
|
5708
5550
|
var _state$mfa$primaryInf4 = state.mfa.primaryInfo,
|
|
5709
5551
|
memberId = _state$mfa$primaryInf4.memberId,
|
|
5710
5552
|
organizationId = _state$mfa$primaryInf4.organizationId;
|
|
5711
|
-
var _useMutate11 = useMutate('stytch.totp.create', function (_,
|
|
5712
|
-
var
|
|
5713
|
-
memberId =
|
|
5714
|
-
organizationId =
|
|
5553
|
+
var _useMutate11 = useMutate('stytch.totp.create', function (_, _ref107) {
|
|
5554
|
+
var _ref107$arg = _ref107.arg,
|
|
5555
|
+
memberId = _ref107$arg.memberId,
|
|
5556
|
+
organizationId = _ref107$arg.organizationId;
|
|
5715
5557
|
dispatch({
|
|
5716
5558
|
type: 'totp/create'
|
|
5717
5559
|
});
|
|
@@ -5731,7 +5573,7 @@ var TOTPEnrollQRScreen = function TOTPEnrollQRScreen() {
|
|
|
5731
5573
|
onError: function onError(error) {
|
|
5732
5574
|
var message = extractErrorMessage.extractErrorMessage(error);
|
|
5733
5575
|
if (message) {
|
|
5734
|
-
|
|
5576
|
+
_t.error(message);
|
|
5735
5577
|
}
|
|
5736
5578
|
dispatch({
|
|
5737
5579
|
type: 'totp/create_error',
|
|
@@ -5777,11 +5619,11 @@ var TOTPEnrollQRScreen = function TOTPEnrollQRScreen() {
|
|
|
5777
5619
|
onClick: handleContinue
|
|
5778
5620
|
}, "Continue"))) : ( /*#__PURE__*/extractErrorMessage.wn.createElement(LoadingScreen, null)));
|
|
5779
5621
|
};
|
|
5780
|
-
var TOTPEntry = function TOTPEntry(
|
|
5781
|
-
var helperContent =
|
|
5782
|
-
isSubmitting =
|
|
5783
|
-
onSubmit =
|
|
5784
|
-
errorMessage =
|
|
5622
|
+
var TOTPEntry = function TOTPEntry(_ref108) {
|
|
5623
|
+
var helperContent = _ref108.helperContent,
|
|
5624
|
+
isSubmitting = _ref108.isSubmitting,
|
|
5625
|
+
onSubmit = _ref108.onSubmit,
|
|
5626
|
+
errorMessage = _ref108.errorMessage;
|
|
5785
5627
|
return /*#__PURE__*/extractErrorMessage.wn.createElement(OTPEntry, {
|
|
5786
5628
|
header: "Enter verification code",
|
|
5787
5629
|
instruction: "Enter the 6-digit code from your authenticator app.",
|
|
@@ -5805,12 +5647,12 @@ var TOTPEntryScreen = function TOTPEntryScreen() {
|
|
|
5805
5647
|
memberId = _state$mfa$primaryInf5.memberId,
|
|
5806
5648
|
organizationId = _state$mfa$primaryInf5.organizationId,
|
|
5807
5649
|
organizationMfaOptionsSupported = _state$mfa$primaryInf5.organizationMfaOptionsSupported;
|
|
5808
|
-
var _useMutate12 = useMutate('stytch.totp.authenticate', function (_,
|
|
5809
|
-
var
|
|
5810
|
-
memberId =
|
|
5811
|
-
organizationId =
|
|
5812
|
-
otp =
|
|
5813
|
-
sessionDurationMinutes =
|
|
5650
|
+
var _useMutate12 = useMutate('stytch.totp.authenticate', function (_, _ref109) {
|
|
5651
|
+
var _ref109$arg = _ref109.arg,
|
|
5652
|
+
memberId = _ref109$arg.memberId,
|
|
5653
|
+
organizationId = _ref109$arg.organizationId,
|
|
5654
|
+
otp = _ref109$arg.otp,
|
|
5655
|
+
sessionDurationMinutes = _ref109$arg.sessionDurationMinutes;
|
|
5814
5656
|
return stytchClient.totp.authenticate({
|
|
5815
5657
|
code: otp,
|
|
5816
5658
|
member_id: memberId,
|
|
@@ -5883,53 +5725,53 @@ var TOTPEntryScreen = function TOTPEntryScreen() {
|
|
|
5883
5725
|
onClick: handleSwitchToSms
|
|
5884
5726
|
}, "Text me a code instead"))));
|
|
5885
5727
|
};
|
|
5886
|
-
var MainContainer = extractErrorMessage.He.div(
|
|
5887
|
-
var theme =
|
|
5728
|
+
var MainContainer = extractErrorMessage.He.div(_templateObject67 || (_templateObject67 = _taggedTemplateLiteral(["\n width: ", ";\n font-family: ", ";\n box-sizing: border-box;\n * {\n box-sizing: content-box;\n }\n background-color: ", ";\n border: ", ";\n border-radius: ", ";\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n border-bottom: ", ";\n"])), function (_ref110) {
|
|
5729
|
+
var theme = _ref110.theme;
|
|
5888
5730
|
return theme.container.width;
|
|
5889
|
-
}, function (
|
|
5890
|
-
var theme =
|
|
5731
|
+
}, function (_ref111) {
|
|
5732
|
+
var theme = _ref111.theme;
|
|
5891
5733
|
return theme.typography.fontFamily;
|
|
5892
|
-
}, function (
|
|
5893
|
-
var theme =
|
|
5734
|
+
}, function (_ref112) {
|
|
5735
|
+
var theme = _ref112.theme;
|
|
5894
5736
|
return theme.container.backgroundColor;
|
|
5895
|
-
}, function (
|
|
5896
|
-
var theme =
|
|
5737
|
+
}, function (_ref113) {
|
|
5738
|
+
var theme = _ref113.theme;
|
|
5897
5739
|
return theme.container.border;
|
|
5898
|
-
}, function (
|
|
5899
|
-
var theme =
|
|
5740
|
+
}, function (_ref114) {
|
|
5741
|
+
var theme = _ref114.theme;
|
|
5900
5742
|
return theme.container.borderRadius;
|
|
5901
|
-
}, function (
|
|
5902
|
-
var theme =
|
|
5903
|
-
displayWatermark =
|
|
5743
|
+
}, function (_ref115) {
|
|
5744
|
+
var theme = _ref115.theme,
|
|
5745
|
+
displayWatermark = _ref115.displayWatermark;
|
|
5904
5746
|
return displayWatermark ? '0' : theme.container.borderRadius;
|
|
5905
|
-
}, function (
|
|
5906
|
-
var theme =
|
|
5907
|
-
displayWatermark =
|
|
5747
|
+
}, function (_ref116) {
|
|
5748
|
+
var theme = _ref116.theme,
|
|
5749
|
+
displayWatermark = _ref116.displayWatermark;
|
|
5908
5750
|
return displayWatermark ? '0' : theme.container.borderRadius;
|
|
5909
|
-
}, function (
|
|
5910
|
-
var theme =
|
|
5911
|
-
displayWatermark =
|
|
5751
|
+
}, function (_ref117) {
|
|
5752
|
+
var theme = _ref117.theme,
|
|
5753
|
+
displayWatermark = _ref117.displayWatermark;
|
|
5912
5754
|
return displayWatermark ? 'none' : theme.container.border;
|
|
5913
5755
|
});
|
|
5914
|
-
var ChildrenContainer = extractErrorMessage.He.div(
|
|
5915
|
-
var WatermarkContainer = extractErrorMessage.He.div(
|
|
5916
|
-
var theme =
|
|
5756
|
+
var ChildrenContainer = extractErrorMessage.He.div(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["\n padding: 24px 32px;\n"])));
|
|
5757
|
+
var WatermarkContainer = extractErrorMessage.He.div(_templateObject69 || (_templateObject69 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n width: ", ";\n background-color: ", ";\n border: ", ";\n border-top: none;\n border-bottom-left-radius: ", ";\n border-bottom-right-radius: ", ";\n overflow: hidden;\n"])), function (_ref118) {
|
|
5758
|
+
var theme = _ref118.theme;
|
|
5917
5759
|
return theme.container.width;
|
|
5918
|
-
}, function (
|
|
5919
|
-
var theme =
|
|
5760
|
+
}, function (_ref119) {
|
|
5761
|
+
var theme = _ref119.theme;
|
|
5920
5762
|
return theme.container.backgroundColor;
|
|
5921
|
-
}, function (
|
|
5922
|
-
var theme =
|
|
5763
|
+
}, function (_ref120) {
|
|
5764
|
+
var theme = _ref120.theme;
|
|
5923
5765
|
return theme.container.border;
|
|
5924
|
-
}, function (
|
|
5925
|
-
var theme =
|
|
5766
|
+
}, function (_ref121) {
|
|
5767
|
+
var theme = _ref121.theme;
|
|
5926
5768
|
return theme.container.borderRadius;
|
|
5927
|
-
}, function (
|
|
5928
|
-
var theme =
|
|
5769
|
+
}, function (_ref122) {
|
|
5770
|
+
var theme = _ref122.theme;
|
|
5929
5771
|
return theme.container.borderRadius;
|
|
5930
5772
|
});
|
|
5931
|
-
var InnerContainer = extractErrorMessage.He.div(
|
|
5932
|
-
var Image = extractErrorMessage.He.img(
|
|
5773
|
+
var InnerContainer = extractErrorMessage.He.div(_templateObject70 || (_templateObject70 = _taggedTemplateLiteral(["\n background-color: #19303d;\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0.5;\n"])));
|
|
5774
|
+
var Image = extractErrorMessage.He.img(_templateObject71 || (_templateObject71 = _taggedTemplateLiteral(["\n width: 150px;\n"])));
|
|
5933
5775
|
var POWERED_BY_STYTCH_IMG_URL = 'https://public-assets.stytch.com/et_powered_by_stytch_logo.png';
|
|
5934
5776
|
var getTokenFromUrl = function getTokenFromUrl() {
|
|
5935
5777
|
var url = new URL(window.location.href);
|
|
@@ -5953,8 +5795,8 @@ var AppContainer$1 = function AppContainer$1() {
|
|
|
5953
5795
|
dispatch = _useGlobalReducer64[1];
|
|
5954
5796
|
var stytchClient = useStytch();
|
|
5955
5797
|
var config = useConfig();
|
|
5956
|
-
var _extractErrorMessage$
|
|
5957
|
-
displayWatermark = _extractErrorMessage$
|
|
5798
|
+
var _extractErrorMessage$69 = extractErrorMessage.Ze(),
|
|
5799
|
+
displayWatermark = _extractErrorMessage$69.displayWatermark;
|
|
5958
5800
|
var isOnlyFloatingOneTap = useIsOnlyFloatingOneTap();
|
|
5959
5801
|
var currentScreen = state.screen;
|
|
5960
5802
|
var ScreenComponentMap = (_ScreenComponentMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ScreenComponentMap, AppScreens$1.Main, /*#__PURE__*/extractErrorMessage.wn.createElement(MainScreen, null)), AppScreens$1.EmailConfirmation, /*#__PURE__*/extractErrorMessage.wn.createElement(EmailConfirmation, null)), AppScreens$1.LoggedIn, /*#__PURE__*/extractErrorMessage.wn.createElement(ConfirmationScreen, null)), AppScreens$1.Discovery, /*#__PURE__*/extractErrorMessage.wn.createElement(Discovery, null)), AppScreens$1.Error, /*#__PURE__*/extractErrorMessage.wn.createElement(ErrorScreen, null)), AppScreens$1.PasswordEmailForm, /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordsEmailForm, null)), AppScreens$1.PasswordAuthenticate, /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordsAuthenticate, null)), AppScreens$1.PasswordResetForm, /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordResetForm, null)), AppScreens$1.PasswordResetVerifyConfirmation, /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordResetConfirmation, null)), AppScreens$1.PasswordForgotForm, /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordsForgotForm, null)), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ScreenComponentMap, AppScreens$1.PasswordSetNewConfirmation, /*#__PURE__*/extractErrorMessage.wn.createElement(PasswordSetNew, null)), AppScreens$1.MFAEnrollmentSelection, /*#__PURE__*/extractErrorMessage.wn.createElement(MFAEnrollmentSelectionScreen, null)), AppScreens$1.SMSOTPEnrollment, /*#__PURE__*/extractErrorMessage.wn.createElement(SMSOTPEnrollScreen, null)), AppScreens$1.SMSOTPEntry, /*#__PURE__*/extractErrorMessage.wn.createElement(SMSOTPEntryScreen, null)), AppScreens$1.RecoveryCodeEntry, /*#__PURE__*/extractErrorMessage.wn.createElement(RecoveryCodeEntryScreen, null)), AppScreens$1.RecoveryCodeSave, /*#__PURE__*/extractErrorMessage.wn.createElement(RecoveryCodeSaveScreen, null)), AppScreens$1.TOTPEnrollmentQRCode, /*#__PURE__*/extractErrorMessage.wn.createElement(TOTPEnrollQRScreen, null)), AppScreens$1.TOTPEnrollmentManual, /*#__PURE__*/extractErrorMessage.wn.createElement(TOTPEnrollManualScreen, null)), AppScreens$1.TOTPEntry, /*#__PURE__*/extractErrorMessage.wn.createElement(TOTPEntryScreen, null)));
|
|
@@ -5971,8 +5813,8 @@ var AppContainer$1 = function AppContainer$1() {
|
|
|
5971
5813
|
intermediateSessionToken: data.intermediate_session_token
|
|
5972
5814
|
});
|
|
5973
5815
|
};
|
|
5974
|
-
var onError = function onError(
|
|
5975
|
-
var errorType =
|
|
5816
|
+
var onError = function onError(_ref123) {
|
|
5817
|
+
var errorType = _ref123.errorType;
|
|
5976
5818
|
return function () {
|
|
5977
5819
|
clearStytchSearchParams();
|
|
5978
5820
|
dispatch({
|
|
@@ -5981,8 +5823,8 @@ var AppContainer$1 = function AppContainer$1() {
|
|
|
5981
5823
|
});
|
|
5982
5824
|
};
|
|
5983
5825
|
};
|
|
5984
|
-
var _useMutate13 = useMutate("stytch.magicLinks.authenticate", function (_,
|
|
5985
|
-
var token =
|
|
5826
|
+
var _useMutate13 = useMutate("stytch.magicLinks.authenticate", function (_, _ref124) {
|
|
5827
|
+
var token = _ref124.arg.token;
|
|
5986
5828
|
return stytchClient.magicLinks.authenticate({
|
|
5987
5829
|
magic_links_token: token,
|
|
5988
5830
|
session_duration_minutes: config.sessionOptions.sessionDurationMinutes
|
|
@@ -5995,8 +5837,8 @@ var AppContainer$1 = function AppContainer$1() {
|
|
|
5995
5837
|
}),
|
|
5996
5838
|
stytchMagicLinkAuthenticate = _useMutate13.trigger,
|
|
5997
5839
|
isMagicLinkLoading = _useMutate13.isMutating;
|
|
5998
|
-
var _useMutate14 = useMutate("stytch.oauth.authenticate", function (_,
|
|
5999
|
-
var token =
|
|
5840
|
+
var _useMutate14 = useMutate("stytch.oauth.authenticate", function (_, _ref125) {
|
|
5841
|
+
var token = _ref125.arg.token;
|
|
6000
5842
|
return stytchClient.oauth.authenticate({
|
|
6001
5843
|
oauth_token: token,
|
|
6002
5844
|
session_duration_minutes: config.sessionOptions.sessionDurationMinutes
|
|
@@ -6009,8 +5851,8 @@ var AppContainer$1 = function AppContainer$1() {
|
|
|
6009
5851
|
}),
|
|
6010
5852
|
stytchOAuthAuthenticate = _useMutate14.trigger,
|
|
6011
5853
|
isOAuthLoading = _useMutate14.isMutating;
|
|
6012
|
-
var _useMutate15 = useMutate("stytch.oauth.discovery.authenticate", function (_,
|
|
6013
|
-
var token =
|
|
5854
|
+
var _useMutate15 = useMutate("stytch.oauth.discovery.authenticate", function (_, _ref126) {
|
|
5855
|
+
var token = _ref126.arg.token;
|
|
6014
5856
|
return stytchClient.oauth.discovery.authenticate({
|
|
6015
5857
|
discovery_oauth_token: token
|
|
6016
5858
|
});
|
|
@@ -6022,8 +5864,8 @@ var AppContainer$1 = function AppContainer$1() {
|
|
|
6022
5864
|
}),
|
|
6023
5865
|
stytchOAuthDiscoveryAuthenticate = _useMutate15.trigger,
|
|
6024
5866
|
isDiscoveryOAuthLoading = _useMutate15.isMutating;
|
|
6025
|
-
var _useMutate16 = useMutate("stytch.sso.authenticate", function (_,
|
|
6026
|
-
var token =
|
|
5867
|
+
var _useMutate16 = useMutate("stytch.sso.authenticate", function (_, _ref127) {
|
|
5868
|
+
var token = _ref127.arg.token;
|
|
6027
5869
|
return stytchClient.sso.authenticate({
|
|
6028
5870
|
sso_token: token,
|
|
6029
5871
|
session_duration_minutes: config.sessionOptions.sessionDurationMinutes
|
|
@@ -6036,8 +5878,8 @@ var AppContainer$1 = function AppContainer$1() {
|
|
|
6036
5878
|
}),
|
|
6037
5879
|
stytchSSOAuthenticate = _useMutate16.trigger,
|
|
6038
5880
|
isSSOLoading = _useMutate16.isMutating;
|
|
6039
|
-
var _useMutate17 = useMutate("stytch.magicLinks.discovery.authenticate", function (_,
|
|
6040
|
-
var token =
|
|
5881
|
+
var _useMutate17 = useMutate("stytch.magicLinks.discovery.authenticate", function (_, _ref128) {
|
|
5882
|
+
var token = _ref128.arg.token;
|
|
6041
5883
|
return stytchClient.magicLinks.discovery.authenticate({
|
|
6042
5884
|
discovery_magic_links_token: token
|
|
6043
5885
|
});
|
|
@@ -6148,19 +5990,19 @@ var AppContainer$1 = function AppContainer$1() {
|
|
|
6148
5990
|
src: POWERED_BY_STYTCH_IMG_URL
|
|
6149
5991
|
}))))));
|
|
6150
5992
|
};
|
|
6151
|
-
var AppContainer = function AppContainer(
|
|
6152
|
-
var client =
|
|
6153
|
-
styles =
|
|
6154
|
-
callbacks =
|
|
6155
|
-
config =
|
|
6156
|
-
var _extractErrorMessage$
|
|
5993
|
+
var AppContainer = function AppContainer(_ref129) {
|
|
5994
|
+
var client = _ref129.client,
|
|
5995
|
+
styles = _ref129.styles,
|
|
5996
|
+
callbacks = _ref129.callbacks,
|
|
5997
|
+
config = _ref129.config;
|
|
5998
|
+
var _extractErrorMessage$70 = extractErrorMessage.h(function () {
|
|
6157
5999
|
var _internal$readB2BInte5 = internal.readB2BInternals(client).bootstrap.getSync(),
|
|
6158
6000
|
displayWatermark = _internal$readB2BInte5.displayWatermark;
|
|
6159
6001
|
return displayWatermark;
|
|
6160
6002
|
}),
|
|
6161
|
-
_extractErrorMessage$
|
|
6162
|
-
displayWatermark = _extractErrorMessage$
|
|
6163
|
-
setDisplayWatermark = _extractErrorMessage$
|
|
6003
|
+
_extractErrorMessage$71 = _slicedToArray(_extractErrorMessage$70, 2),
|
|
6004
|
+
displayWatermark = _extractErrorMessage$71[0],
|
|
6005
|
+
setDisplayWatermark = _extractErrorMessage$71[1];
|
|
6164
6006
|
extractErrorMessage.p(function () {
|
|
6165
6007
|
internal.readB2BInternals(client).networkClient.logEvent({
|
|
6166
6008
|
name: 'render_b2b_login_screen',
|
|
@@ -6168,8 +6010,8 @@ var AppContainer = function AppContainer(_ref124) {
|
|
|
6168
6010
|
options: config
|
|
6169
6011
|
}
|
|
6170
6012
|
});
|
|
6171
|
-
internal.readB2BInternals(client).bootstrap.getAsync().then(function (
|
|
6172
|
-
var displayWatermark =
|
|
6013
|
+
internal.readB2BInternals(client).bootstrap.getAsync().then(function (_ref130) {
|
|
6014
|
+
var displayWatermark = _ref130.displayWatermark;
|
|
6173
6015
|
setDisplayWatermark(displayWatermark);
|
|
6174
6016
|
});
|
|
6175
6017
|
}, [client]);
|
|
@@ -6206,11 +6048,11 @@ var StytchB2BUIClient = /*#__PURE__*/function (_b2b_index_headless$S) {
|
|
|
6206
6048
|
}
|
|
6207
6049
|
_createClass(StytchB2BUIClient, [{
|
|
6208
6050
|
key: "mount",
|
|
6209
|
-
value: function mount(
|
|
6210
|
-
var elementId =
|
|
6211
|
-
styles =
|
|
6212
|
-
callbacks =
|
|
6213
|
-
config =
|
|
6051
|
+
value: function mount(_ref131) {
|
|
6052
|
+
var elementId = _ref131.elementId,
|
|
6053
|
+
styles = _ref131.styles,
|
|
6054
|
+
callbacks = _ref131.callbacks,
|
|
6055
|
+
config = _ref131.config;
|
|
6214
6056
|
var _a;
|
|
6215
6057
|
var targetParentDomNode = document.querySelector(elementId);
|
|
6216
6058
|
if (!targetParentDomNode) {
|