"use strict"; (self["webpackChunkramsey_plus_forms"] = self["webpackChunkramsey_plus_forms"] || []).push([[468],{ /***/ 961: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { function checkDCE() { /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function' ) { return; } if (false) // removed by dead control flow {} try { // Verify that the code above has been dead code eliminated (DCE'd). __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); } catch (err) { // DevTools shouldn't crash React, no matter what. // We should still report in case we break this code. console.error(err); } } if (true) { // DCE check should happen before ReactDOM bundle executes so that // DevTools can report bad minification during injection. checkDCE(); module.exports = __webpack_require__(6221); } else // removed by dead control flow {} /***/ }), /***/ 2911: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { // EXPORTS __webpack_require__.d(__webpack_exports__, { A: () => (/* binding */ Dialog) }); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__(6540); // EXTERNAL MODULE: ./node_modules/react-dom/index.js var react_dom = __webpack_require__(961); ;// ./node_modules/@ramsey-design-system/icons/dist/CloseIcon.esm.js /****************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; // Do not edit directly // Generated on Wed, 05 Nov 2025 17:15:24 GMT var CloseIcon = (0,react.forwardRef)(function (_a, ref) { var title = _a.title, rest = __rest(_a, ["title"]); return (react.createElement("svg", __assign({ ref: ref, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: 24, height: 24 }, rest), !!title && react.createElement("title", null, title), react.createElement("path", { fillRule: "evenodd", d: "M1.3 1.3a1 1 0 0 1 1.4 0l9.3 9.29 9.3-9.3a1 1 0 0 1 1.31-.08l.1.08a1 1 0 0 1 0 1.42L13.4 12l9.3 9.3a1 1 0 0 1 .08 1.31l-.08.1a1 1 0 0 1-1.42 0L12 13.4l-9.3 9.3a1 1 0 0 1-1.31.08l-.1-.08a1 1 0 0 1 0-1.42L10.6 12 1.3 2.7a1 1 0 0 1-.08-1.31z" }))); }); CloseIcon.displayName = 'CloseIcon'; // EXTERNAL MODULE: ./node_modules/@ramsey-design-system/button/dist/Button.esm.js + 1 modules var Button_esm = __webpack_require__(9438); // EXTERNAL MODULE: ./node_modules/@ramsey-design-system/heading/dist/Heading.esm.js var Heading_esm = __webpack_require__(1266); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__(6942); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/@ramsey-design-system/text/dist/Text.esm.js var Text_esm = __webpack_require__(1030); ;// ./node_modules/@ramsey-design-system/dialog/dist/Dialog.esm.js /****************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */ var Dialog_esm_assign = function() { Dialog_esm_assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return Dialog_esm_assign.apply(this, arguments); }; function Dialog_esm_rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); } typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { var e = new Error(message); return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }; var AriaContext = (0,react.createContext)(undefined); function AriaLabelAndDescriptionProvider(_a) { var children = _a.children; var ariaState = (0,react.useState)({}); return (react.createElement(AriaContext.Provider, { value: ariaState }, children)); } function useAriaLabelAndDescription() { var context = (0,react.useContext)(AriaContext); if (context === undefined) { throw new Error("useAria must be used within a AriaProvider"); } return context; } function generateUniqueId() { return Math.random().toString(36).slice(2, 16); } function useId() { return (0,react.useMemo)(function () { return generateUniqueId(); }, []); } function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; } function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } function getDefaultExportFromCjs (x) { return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; } var propTypes$1 = {exports: {}}; var reactIs = {exports: {}}; var reactIs_production_min = {}; /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var hasRequiredReactIs_production_min; function requireReactIs_production_min () { if (hasRequiredReactIs_production_min) return reactIs_production_min; hasRequiredReactIs_production_min = 1; var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b? Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119; function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d; reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t}; reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p}; reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z; return reactIs_production_min; } var reactIs_development = {}; /** @license React v16.13.1 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var hasRequiredReactIs_development; function requireReactIs_development () { if (hasRequiredReactIs_development) return reactIs_development; hasRequiredReactIs_development = 1; if (false) // removed by dead control flow {} return reactIs_development; } var hasRequiredReactIs; function requireReactIs () { if (hasRequiredReactIs) return reactIs.exports; hasRequiredReactIs = 1; if (true) { reactIs.exports = requireReactIs_production_min(); } else // removed by dead control flow {} return reactIs.exports; } /* object-assign (c) Sindre Sorhus @license MIT */ var objectAssign; var hasRequiredObjectAssign; function requireObjectAssign () { if (hasRequiredObjectAssign) return objectAssign; hasRequiredObjectAssign = 1; /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } objectAssign = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; return objectAssign; } /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret_1; var hasRequiredReactPropTypesSecret; function requireReactPropTypesSecret () { if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1; hasRequiredReactPropTypesSecret = 1; var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; ReactPropTypesSecret_1 = ReactPropTypesSecret; return ReactPropTypesSecret_1; } var has; var hasRequiredHas; function requireHas () { if (hasRequiredHas) return has; hasRequiredHas = 1; has = Function.call.bind(Object.prototype.hasOwnProperty); return has; } /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var checkPropTypes_1; var hasRequiredCheckPropTypes; function requireCheckPropTypes () { if (hasRequiredCheckPropTypes) return checkPropTypes_1; hasRequiredCheckPropTypes = 1; var printWarning = function() {}; if (false) // removed by dead control flow { var has, loggedTypeFailures, ReactPropTypesSecret; } /** * Assert that the values match with the type specs. * Error messages are memorized and will only be shown once. * * @param {object} typeSpecs Map of name to a ReactPropType * @param {object} values Runtime values that need to be type-checked * @param {string} location e.g. "prop", "context", "child context" * @param {string} componentName Name of the component for error messages. * @param {?Function} getStack Returns the component stack. * @private */ function checkPropTypes(typeSpecs, values, location, componentName, getStack) { if (false) // removed by dead control flow { var stack, err, error, typeSpecName; } } /** * Resets warning cache when testing. * * @private */ checkPropTypes.resetWarningCache = function() { if (false) // removed by dead control flow {} }; checkPropTypes_1 = checkPropTypes; return checkPropTypes_1; } /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var factoryWithTypeCheckers; var hasRequiredFactoryWithTypeCheckers; function requireFactoryWithTypeCheckers () { if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers; hasRequiredFactoryWithTypeCheckers = 1; var ReactIs = requireReactIs(); var assign = requireObjectAssign(); var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret(); var has = /*@__PURE__*/ requireHas(); var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes(); var printWarning = function() {}; if (false) // removed by dead control flow {} function emptyFunctionThatReturnsNull() { return null; } factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) { /* global Symbol */ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. /** * Returns the iterator method function contained on the iterable object. * * Be sure to invoke the function with the iterable as context: * * var iteratorFn = getIteratorFn(myIterable); * if (iteratorFn) { * var iterator = iteratorFn.call(myIterable); * ... * } * * @param {?object} maybeIterable * @return {?function} */ function getIteratorFn(maybeIterable) { var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); if (typeof iteratorFn === 'function') { return iteratorFn; } } /** * Collection of methods that allow declaration and validation of props that are * supplied to React components. Example usage: * * var Props = require('ReactPropTypes'); * var MyArticle = React.createClass({ * propTypes: { * // An optional string prop named "description". * description: Props.string, * * // A required enum prop named "category". * category: Props.oneOf(['News','Photos']).isRequired, * * // A prop named "dialog" that requires an instance of Dialog. * dialog: Props.instanceOf(Dialog).isRequired * }, * render: function() { ... } * }); * * A more formal specification of how these methods are used: * * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) * decl := ReactPropTypes.{type}(.isRequired)? * * Each and every declaration produces a function with the same signature. This * allows the creation of custom validation functions. For example: * * var MyLink = React.createClass({ * propTypes: { * // An optional string or URI prop named "href". * href: function(props, propName, componentName) { * var propValue = props[propName]; * if (propValue != null && typeof propValue !== 'string' && * !(propValue instanceof URI)) { * return new Error( * 'Expected a string or an URI for ' + propName + ' in ' + * componentName * ); * } * } * }, * render: function() {...} * }); * * @internal */ var ANONYMOUS = '<>'; // Important! // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. var ReactPropTypes = { array: createPrimitiveTypeChecker('array'), bigint: createPrimitiveTypeChecker('bigint'), bool: createPrimitiveTypeChecker('boolean'), func: createPrimitiveTypeChecker('function'), number: createPrimitiveTypeChecker('number'), object: createPrimitiveTypeChecker('object'), string: createPrimitiveTypeChecker('string'), symbol: createPrimitiveTypeChecker('symbol'), any: createAnyTypeChecker(), arrayOf: createArrayOfTypeChecker, element: createElementTypeChecker(), elementType: createElementTypeTypeChecker(), instanceOf: createInstanceTypeChecker, node: createNodeChecker(), objectOf: createObjectOfTypeChecker, oneOf: createEnumTypeChecker, oneOfType: createUnionTypeChecker, shape: createShapeTypeChecker, exact: createStrictShapeTypeChecker, }; /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ /*eslint-disable no-self-compare*/ function is(x, y) { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return x !== 0 || 1 / x === 1 / y; } else { // Step 6.a: NaN == NaN return x !== x && y !== y; } } /*eslint-enable no-self-compare*/ /** * We use an Error-like object for backward compatibility as people may call * PropTypes directly and inspect their output. However, we don't use real * Errors anymore. We don't inspect their stack anyway, and creating them * is prohibitively expensive if they are created too often, such as what * happens in oneOfType() for any type before the one that matched. */ function PropTypeError(message, data) { this.message = message; this.data = data && typeof data === 'object' ? data: {}; this.stack = ''; } // Make `instanceof Error` still work for returned errors. PropTypeError.prototype = Error.prototype; function createChainableTypeChecker(validate) { if (false) // removed by dead control flow { var manualPropTypeWarningCount, manualPropTypeCallCache; } function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { componentName = componentName || ANONYMOUS; propFullName = propFullName || propName; if (secret !== ReactPropTypesSecret) { if (throwOnDirectAccess) { // New behavior only for users of `prop-types` package var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; } else if (false) // removed by dead control flow { var cacheKey; } } if (props[propName] == null) { if (isRequired) { if (props[propName] === null) { return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); } return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); } return null; } else { return validate(props, propName, componentName, location, propFullName); } } var chainedCheckType = checkType.bind(null, false); chainedCheckType.isRequired = checkType.bind(null, true); return chainedCheckType; } function createPrimitiveTypeChecker(expectedType) { function validate(props, propName, componentName, location, propFullName, secret) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== expectedType) { // `propValue` being instance of, say, date/regexp, pass the 'object' // check, but we can offer a more precise error message here rather than // 'of type `object`'. var preciseType = getPreciseType(propValue); return new PropTypeError( 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {expectedType: expectedType} ); } return null; } return createChainableTypeChecker(validate); } function createAnyTypeChecker() { return createChainableTypeChecker(emptyFunctionThatReturnsNull); } function createArrayOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); } var propValue = props[propName]; if (!Array.isArray(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); } for (var i = 0; i < propValue.length; i++) { var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); if (error instanceof Error) { return error; } } return null; } return createChainableTypeChecker(validate); } function createElementTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!isValidElement(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); } return null; } return createChainableTypeChecker(validate); } function createElementTypeTypeChecker() { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; if (!ReactIs.isValidElementType(propValue)) { var propType = getPropType(propValue); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); } return null; } return createChainableTypeChecker(validate); } function createInstanceTypeChecker(expectedClass) { function validate(props, propName, componentName, location, propFullName) { if (!(props[propName] instanceof expectedClass)) { var expectedClassName = expectedClass.name || ANONYMOUS; var actualClassName = getClassName(props[propName]); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); } return null; } return createChainableTypeChecker(validate); } function createEnumTypeChecker(expectedValues) { if (!Array.isArray(expectedValues)) { if (false) // removed by dead control flow {} return emptyFunctionThatReturnsNull; } function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; for (var i = 0; i < expectedValues.length; i++) { if (is(propValue, expectedValues[i])) { return null; } } var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { var type = getPreciseType(value); if (type === 'symbol') { return String(value); } return value; }); return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); } return createChainableTypeChecker(validate); } function createObjectOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); } var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); } for (var key in propValue) { if (has(propValue, key)) { var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error instanceof Error) { return error; } } } return null; } return createChainableTypeChecker(validate); } function createUnionTypeChecker(arrayOfTypeCheckers) { if (!Array.isArray(arrayOfTypeCheckers)) { false ? 0 : void 0; return emptyFunctionThatReturnsNull; } for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; if (typeof checker !== 'function') { printWarning( 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' ); return emptyFunctionThatReturnsNull; } } function validate(props, propName, componentName, location, propFullName) { var expectedTypes = []; for (var i = 0; i < arrayOfTypeCheckers.length; i++) { var checker = arrayOfTypeCheckers[i]; var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); if (checkerResult == null) { return null; } if (checkerResult.data && has(checkerResult.data, 'expectedType')) { expectedTypes.push(checkerResult.data.expectedType); } } var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': ''; return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.')); } return createChainableTypeChecker(validate); } function createNodeChecker() { function validate(props, propName, componentName, location, propFullName) { if (!isNode(props[propName])) { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); } return null; } return createChainableTypeChecker(validate); } function invalidValidatorError(componentName, location, propFullName, key, type) { return new PropTypeError( (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.' ); } function createShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } for (var key in shapeTypes) { var checker = shapeTypes[key]; if (typeof checker !== 'function') { return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); } var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error) { return error; } } return null; } return createChainableTypeChecker(validate); } function createStrictShapeTypeChecker(shapeTypes) { function validate(props, propName, componentName, location, propFullName) { var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } // We need to check all keys in case some are required but missing from props. var allKeys = assign({}, props[propName], shapeTypes); for (var key in allKeys) { var checker = shapeTypes[key]; if (has(shapeTypes, key) && typeof checker !== 'function') { return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); } if (!checker) { return new PropTypeError( 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') ); } var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); if (error) { return error; } } return null; } return createChainableTypeChecker(validate); } function isNode(propValue) { switch (typeof propValue) { case 'number': case 'string': case 'undefined': return true; case 'boolean': return !propValue; case 'object': if (Array.isArray(propValue)) { return propValue.every(isNode); } if (propValue === null || isValidElement(propValue)) { return true; } var iteratorFn = getIteratorFn(propValue); if (iteratorFn) { var iterator = iteratorFn.call(propValue); var step; if (iteratorFn !== propValue.entries) { while (!(step = iterator.next()).done) { if (!isNode(step.value)) { return false; } } } else { // Iterator will provide entry [k,v] tuples rather than values. while (!(step = iterator.next()).done) { var entry = step.value; if (entry) { if (!isNode(entry[1])) { return false; } } } } } else { return false; } return true; default: return false; } } function isSymbol(propType, propValue) { // Native Symbol. if (propType === 'symbol') { return true; } // falsy value can't be a Symbol if (!propValue) { return false; } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' if (propValue['@@toStringTag'] === 'Symbol') { return true; } // Fallback for non-spec compliant Symbols which are polyfilled. if (typeof Symbol === 'function' && propValue instanceof Symbol) { return true; } return false; } // Equivalent of `typeof` but with special handling for array and regexp. function getPropType(propValue) { var propType = typeof propValue; if (Array.isArray(propValue)) { return 'array'; } if (propValue instanceof RegExp) { // Old webkits (at least until Android 4.0) return 'function' rather than // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ // passes PropTypes.object. return 'object'; } if (isSymbol(propType, propValue)) { return 'symbol'; } return propType; } // This handles more types than `getPropType`. Only used for error messages. // See `createPrimitiveTypeChecker`. function getPreciseType(propValue) { if (typeof propValue === 'undefined' || propValue === null) { return '' + propValue; } var propType = getPropType(propValue); if (propType === 'object') { if (propValue instanceof Date) { return 'date'; } else if (propValue instanceof RegExp) { return 'regexp'; } } return propType; } // Returns a string that is postfixed to a warning about an invalid type. // For example, "undefined" or "of type array" function getPostfixForTypeWarning(value) { var type = getPreciseType(value); switch (type) { case 'array': case 'object': return 'an ' + type; case 'boolean': case 'date': case 'regexp': return 'a ' + type; default: return type; } } // Returns class name of the object, if any. function getClassName(propValue) { if (!propValue.constructor || !propValue.constructor.name) { return ANONYMOUS; } return propValue.constructor.name; } ReactPropTypes.checkPropTypes = checkPropTypes; ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; return factoryWithTypeCheckers; } /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var factoryWithThrowingShims; var hasRequiredFactoryWithThrowingShims; function requireFactoryWithThrowingShims () { if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims; hasRequiredFactoryWithThrowingShims = 1; var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret(); function emptyFunction() {} function emptyFunctionWithReset() {} emptyFunctionWithReset.resetWarningCache = emptyFunction; factoryWithThrowingShims = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { // It is still safe when called from React. return; } var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; } shim.isRequired = shim; function getShim() { return shim; } // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bigint: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, elementType: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim, checkPropTypes: emptyFunctionWithReset, resetWarningCache: emptyFunction }; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; return factoryWithThrowingShims; } /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var hasRequiredPropTypes; function requirePropTypes () { if (hasRequiredPropTypes) return propTypes$1.exports; hasRequiredPropTypes = 1; if (false) // removed by dead control flow { var throwOnDirectAccess, ReactIs; } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod propTypes$1.exports = /*@__PURE__*/ requireFactoryWithThrowingShims()(); } return propTypes$1.exports; } var propTypesExports = /*@__PURE__*/ (/* unused pure expression or super */ null && (requirePropTypes())); var PropTypes = /*@__PURE__*/(/* unused pure expression or super */ null && (getDefaultExportFromCjs(propTypesExports))); /** * defines a focus group */ var FOCUS_GROUP = 'data-focus-lock'; /** * disables element discovery inside a group marked by key */ var FOCUS_DISABLED = 'data-focus-lock-disabled'; /** * allows uncontrolled focus within the marked area, effectively disabling focus lock for it's content */ var FOCUS_ALLOW = 'data-no-focus-lock'; /** * instructs autofocus engine to pick default autofocus inside a given node * can be set on the element or container */ var FOCUS_AUTO = 'data-autofocus-inside'; /** * instructs autofocus to ignore elements within a given node * can be set on the element or container */ var FOCUS_NO_AUTOFOCUS = 'data-no-autofocus'; /** * Assigns a value for a given ref, no matter of the ref format * @param {RefObject} ref - a callback function or ref object * @param value - a new value * * @see https://github.com/theKashey/use-callback-ref#assignref * @example * const refObject = useRef(); * const refFn = (ref) => {....} * * assignRef(refObject, "refValue"); * assignRef(refFn, "refValue"); */ function assignRef(ref, value) { if (typeof ref === 'function') { ref(value); } else if (ref) { ref.current = value; } return ref; } /** * creates a MutableRef with ref change callback * @param initialValue - initial ref value * @param {Function} callback - a callback to run when value changes * * @example * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue); * ref.current = 1; * // prints 0 -> 1 * * @see https://reactjs.org/docs/hooks-reference.html#useref * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref * @returns {MutableRefObject} */ function useCallbackRef(initialValue, callback) { var ref = (0,react.useState)(function () { return ({ // value value: initialValue, // last callback callback: callback, // "memoized" public interface facade: { get current() { return ref.value; }, set current(value) { var last = ref.value; if (last !== value) { ref.value = value; ref.callback(value, last); } }, }, }); })[0]; // update callback ref.callback = callback; return ref.facade; } var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? react.useLayoutEffect : react.useEffect; var currentValues = new WeakMap(); /** * Merges two or more refs together providing a single interface to set their value * @param {RefObject|Ref} refs * @returns {MutableRefObject} - a new ref, which translates all changes to {refs} * * @see {@link mergeRefs} a version without buit-in memoization * @see https://github.com/theKashey/use-callback-ref#usemergerefs * @example * const Component = React.forwardRef((props, ref) => { * const ownRef = useRef(); * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together * return
...
* } */ function useMergeRefs(refs, defaultValue) { var callbackRef = useCallbackRef(null, function (newValue) { return refs.forEach(function (ref) { return assignRef(ref, newValue); }); }); // handle refs changes - added or removed useIsomorphicLayoutEffect(function () { var oldValue = currentValues.get(callbackRef); if (oldValue) { var prevRefs_1 = new Set(oldValue); var nextRefs_1 = new Set(refs); var current_1 = callbackRef.current; prevRefs_1.forEach(function (ref) { if (!nextRefs_1.has(ref)) { assignRef(ref, null); } }); nextRefs_1.forEach(function (ref) { if (!prevRefs_1.has(ref)) { assignRef(ref, current_1); } }); } currentValues.set(callbackRef, refs); }, [refs]); return callbackRef; } var hiddenGuard = { width: '1px', height: '0px', padding: 0, overflow: 'hidden', position: 'fixed', top: '1px', left: '1px' }; false ? 0 : {}; function ItoI(a) { return a; } function innerCreateMedium(defaults, middleware) { if (middleware === void 0) { middleware = ItoI; } var buffer = []; var assigned = false; var medium = { read: function () { if (assigned) { throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.'); } if (buffer.length) { return buffer[buffer.length - 1]; } return defaults; }, useMedium: function (data) { var item = middleware(data, assigned); buffer.push(item); return function () { buffer = buffer.filter(function (x) { return x !== item; }); }; }, assignSyncMedium: function (cb) { assigned = true; while (buffer.length) { var cbs = buffer; buffer = []; cbs.forEach(cb); } buffer = { push: function (x) { return cb(x); }, filter: function () { return buffer; }, }; }, assignMedium: function (cb) { assigned = true; var pendingQueue = []; if (buffer.length) { var cbs = buffer; buffer = []; cbs.forEach(cb); pendingQueue = buffer; } var executeQueue = function () { var cbs = pendingQueue; pendingQueue = []; cbs.forEach(cb); }; var cycle = function () { return Promise.resolve().then(executeQueue); }; cycle(); buffer = { push: function (x) { pendingQueue.push(x); cycle(); }, filter: function (filter) { pendingQueue = pendingQueue.filter(filter); return buffer; }, }; }, }; return medium; } function createMedium(defaults, middleware) { if (middleware === void 0) { middleware = ItoI; } return innerCreateMedium(defaults, middleware); } // eslint-disable-next-line @typescript-eslint/ban-types function createSidecarMedium(options) { if (options === void 0) { options = {}; } var medium = innerCreateMedium(null); medium.options = Dialog_esm_assign({ async: true, ssr: false }, options); return medium; } var SideCar$1 = function (_a) { var sideCar = _a.sideCar, rest = Dialog_esm_rest(_a, ["sideCar"]); if (!sideCar) { throw new Error('Sidecar: please provide `sideCar` property to import the right car'); } var Target = sideCar.read(); if (!Target) { throw new Error('Sidecar medium not found'); } return react.createElement(Target, Dialog_esm_assign({}, rest)); }; SideCar$1.isSideCarExport = true; function exportSidecar(medium, exported) { medium.useMedium(exported); return SideCar$1; } var mediumFocus = createMedium({}, function (_ref) { var target = _ref.target, currentTarget = _ref.currentTarget; return { target: target, currentTarget: currentTarget }; }); var mediumBlur = createMedium(); var mediumEffect = createMedium(); var mediumSidecar = createSidecarMedium({ async: true, ssr: typeof document !== 'undefined' }); var focusScope = /*#__PURE__*/(0,react.createContext)(undefined); var emptyArray = []; var FocusLock = /*#__PURE__*/(0,react.forwardRef)(function FocusLockUI(props, parentRef) { var _extends2; var _useState = (0,react.useState)(), realObserved = _useState[0], setObserved = _useState[1]; var observed = (0,react.useRef)(); var isActive = (0,react.useRef)(false); var originalFocusedElement = (0,react.useRef)(null); var _useState2 = (0,react.useState)({}), update = _useState2[1]; var children = props.children, _props$disabled = props.disabled, disabled = _props$disabled === void 0 ? false : _props$disabled, _props$noFocusGuards = props.noFocusGuards, noFocusGuards = _props$noFocusGuards === void 0 ? false : _props$noFocusGuards, _props$persistentFocu = props.persistentFocus, persistentFocus = _props$persistentFocu === void 0 ? false : _props$persistentFocu, _props$crossFrame = props.crossFrame, crossFrame = _props$crossFrame === void 0 ? true : _props$crossFrame, _props$autoFocus = props.autoFocus, autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus, allowTextSelection = props.allowTextSelection, group = props.group, className = props.className, whiteList = props.whiteList, hasPositiveIndices = props.hasPositiveIndices, _props$shards = props.shards, shards = _props$shards === void 0 ? emptyArray : _props$shards, _props$as = props.as, Container = _props$as === void 0 ? 'div' : _props$as, _props$lockProps = props.lockProps, containerProps = _props$lockProps === void 0 ? {} : _props$lockProps, SideCar = props.sideCar, _props$returnFocus = props.returnFocus, shouldReturnFocus = _props$returnFocus === void 0 ? false : _props$returnFocus, focusOptions = props.focusOptions, onActivationCallback = props.onActivation, onDeactivationCallback = props.onDeactivation; var _useState3 = (0,react.useState)({}), id = _useState3[0]; var onActivation = (0,react.useCallback)(function (_ref) { var captureFocusRestore = _ref.captureFocusRestore; if (!originalFocusedElement.current) { var _document; var activeElement = (_document = document) == null ? void 0 : _document.activeElement; originalFocusedElement.current = activeElement; if (activeElement !== document.body) { originalFocusedElement.current = captureFocusRestore(activeElement); } } if (observed.current && onActivationCallback) { onActivationCallback(observed.current); } isActive.current = true; update(); }, [onActivationCallback]); var onDeactivation = (0,react.useCallback)(function () { isActive.current = false; if (onDeactivationCallback) { onDeactivationCallback(observed.current); } update(); }, [onDeactivationCallback]); var returnFocus = (0,react.useCallback)(function (allowDefer) { var focusRestore = originalFocusedElement.current; if (focusRestore) { var returnFocusTo = (typeof focusRestore === 'function' ? focusRestore() : focusRestore) || document.body; var howToReturnFocus = typeof shouldReturnFocus === 'function' ? shouldReturnFocus(returnFocusTo) : shouldReturnFocus; if (howToReturnFocus) { var returnFocusOptions = typeof howToReturnFocus === 'object' ? howToReturnFocus : undefined; originalFocusedElement.current = null; if (allowDefer) { Promise.resolve().then(function () { return returnFocusTo.focus(returnFocusOptions); }); } else { returnFocusTo.focus(returnFocusOptions); } } } }, [shouldReturnFocus]); var onFocus = (0,react.useCallback)(function (event) { if (isActive.current) { mediumFocus.useMedium(event); } }, []); var onBlur = mediumBlur.useMedium; var setObserveNode = (0,react.useCallback)(function (newObserved) { if (observed.current !== newObserved) { observed.current = newObserved; setObserved(newObserved); } }, []); if (false) // removed by dead control flow {} var lockProps = _extends((_extends2 = {}, _extends2[FOCUS_DISABLED] = disabled && 'disabled', _extends2[FOCUS_GROUP] = group, _extends2), containerProps); var hasLeadingGuards = noFocusGuards !== true; var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail'; var mergedRef = useMergeRefs([parentRef, setObserveNode]); var focusScopeValue = (0,react.useMemo)(function () { return { observed: observed, shards: shards, enabled: !disabled, active: isActive.current }; }, [disabled, isActive.current, shards, realObserved]); return /*#__PURE__*/react.createElement(react.Fragment, null, hasLeadingGuards && [ /*#__PURE__*/ react.createElement("div", { key: "guard-first", "data-focus-guard": true, tabIndex: disabled ? -1 : 0, style: hiddenGuard }), hasPositiveIndices ? /*#__PURE__*/react.createElement("div", { key: "guard-nearest", "data-focus-guard": true, tabIndex: disabled ? -1 : 1, style: hiddenGuard }) : null], !disabled && /*#__PURE__*/react.createElement(SideCar, { id: id, sideCar: mediumSidecar, observed: realObserved, disabled: disabled, persistentFocus: persistentFocus, crossFrame: crossFrame, autoFocus: autoFocus, whiteList: whiteList, shards: shards, onActivation: onActivation, onDeactivation: onDeactivation, returnFocus: returnFocus, focusOptions: focusOptions, noFocusGuards: noFocusGuards }), /*#__PURE__*/react.createElement(Container, _extends({ ref: mergedRef }, lockProps, { className: className, onBlur: onBlur, onFocus: onFocus }), /*#__PURE__*/react.createElement(focusScope.Provider, { value: focusScopeValue }, children)), hasTailingGuards && /*#__PURE__*/react.createElement("div", { "data-focus-guard": true, tabIndex: disabled ? -1 : 0, style: hiddenGuard })); }); FocusLock.propTypes = false ? 0 : {}; function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); } 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); } 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); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } function toPropertyKey(t) { var i = toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } function _defineProperty(e, r, t) { return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: true, configurable: true, writable: true }) : e[r] = t, e; } function withSideEffect(reducePropsToState, handleStateChangeOnClient) { if (false) // removed by dead control flow {} function getDisplayName(WrappedComponent) { return WrappedComponent.displayName || WrappedComponent.name || 'Component'; } return function wrap(WrappedComponent) { if (false) // removed by dead control flow {} var mountedInstances = []; var state; function emitChange() { state = reducePropsToState(mountedInstances.map(function (instance) { return instance.props; })); handleStateChangeOnClient(state); } var SideEffect = /*#__PURE__*/function (_PureComponent) { _inheritsLoose(SideEffect, _PureComponent); function SideEffect() { return _PureComponent.apply(this, arguments) || this; } // Try to use displayName of wrapped component SideEffect.peek = function peek() { return state; }; var _proto = SideEffect.prototype; _proto.componentDidMount = function componentDidMount() { mountedInstances.push(this); emitChange(); }; _proto.componentDidUpdate = function componentDidUpdate() { emitChange(); }; _proto.componentWillUnmount = function componentWillUnmount() { var index = mountedInstances.indexOf(this); mountedInstances.splice(index, 1); emitChange(); }; _proto.render = function render() { return /*#__PURE__*/react.createElement(WrappedComponent, this.props); }; return SideEffect; }(react.PureComponent); _defineProperty(SideEffect, "displayName", "SideEffect(" + getDisplayName(WrappedComponent) + ")"); return SideEffect; }; } /* IE11 support */ var toArray = function (a) { var ret = Array(a.length); for (var i = 0; i < a.length; ++i) { ret[i] = a[i]; } return ret; }; var asArray = function (a) { return (Array.isArray(a) ? a : [a]); }; var getFirst = function (a) { return (Array.isArray(a) ? a[0] : a); }; var isElementHidden = function (node) { // we can measure only "elements" // consider others as "visible" if (node.nodeType !== Node.ELEMENT_NODE) { return false; } var computedStyle = window.getComputedStyle(node, null); if (!computedStyle || !computedStyle.getPropertyValue) { return false; } return (computedStyle.getPropertyValue('display') === 'none' || computedStyle.getPropertyValue('visibility') === 'hidden'); }; var getParentNode = function (node) { // DOCUMENT_FRAGMENT_NODE can also point on ShadowRoot. In this case .host will point on the next node return node.parentNode && node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? // eslint-disable-next-line @typescript-eslint/no-explicit-any node.parentNode.host : node.parentNode; }; var isTopNode = function (node) { // @ts-ignore return node === document || (node && node.nodeType === Node.DOCUMENT_NODE); }; var isInert = function (node) { return node.hasAttribute('inert'); }; /** * @see https://github.com/testing-library/jest-dom/blob/main/src/to-be-visible.js */ var isVisibleUncached = function (node, checkParent) { return !node || isTopNode(node) || (!isElementHidden(node) && !isInert(node) && checkParent(getParentNode(node))); }; var isVisibleCached = function (visibilityCache, node) { var cached = visibilityCache.get(node); if (cached !== undefined) { return cached; } var result = isVisibleUncached(node, isVisibleCached.bind(undefined, visibilityCache)); visibilityCache.set(node, result); return result; }; var isAutoFocusAllowedUncached = function (node, checkParent) { return node && !isTopNode(node) ? (isAutoFocusAllowed(node) ? checkParent(getParentNode(node)) : false) : true; }; var isAutoFocusAllowedCached = function (cache, node) { var cached = cache.get(node); if (cached !== undefined) { return cached; } var result = isAutoFocusAllowedUncached(node, isAutoFocusAllowedCached.bind(undefined, cache)); cache.set(node, result); return result; }; var getDataset = function (node) { // @ts-ignore return node.dataset; }; var isHTMLButtonElement = function (node) { return node.tagName === 'BUTTON'; }; var isHTMLInputElement = function (node) { return node.tagName === 'INPUT'; }; var isRadioElement = function (node) { return isHTMLInputElement(node) && node.type === 'radio'; }; var notHiddenInput = function (node) { return !((isHTMLInputElement(node) || isHTMLButtonElement(node)) && (node.type === 'hidden' || node.disabled)); }; var isAutoFocusAllowed = function (node) { var attribute = node.getAttribute(FOCUS_NO_AUTOFOCUS); return ![true, 'true', ''].includes(attribute); }; var isGuard = function (node) { var _a; return Boolean(node && ((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.focusGuard)); }; var isNotAGuard = function (node) { return !isGuard(node); }; var isDefined = function (x) { return Boolean(x); }; var tabSort = function (a, b) { var aTab = Math.max(0, a.tabIndex); var bTab = Math.max(0, b.tabIndex); var tabDiff = aTab - bTab; var indexDiff = a.index - b.index; if (tabDiff) { if (!aTab) { return 1; } if (!bTab) { return -1; } } return tabDiff || indexDiff; }; var getTabIndex = function (node) { if (node.tabIndex < 0) { // all "focusable" elements are already preselected // but some might have implicit negative tabIndex // return 0 for