UNPKG

350 kBSource Map (JSON)View Raw
1{"version":3,"file":"downshift.umd.js","sources":["../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js","../node_modules/prop-types/node_modules/react-is/index.js","../node_modules/object-assign/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/checkPropTypes.js","../node_modules/prop-types/factoryWithTypeCheckers.js","../node_modules/prop-types/index.js","../node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-is/cjs/react-is.development.js","../node_modules/react-is/index.js","../node_modules/compute-scroll-into-view/dist/index.module.js","../src/utils.js","../src/set-a11y-status.js","../src/stateChangeTypes.js","../src/downshift.js","../src/hooks/utils.js","../src/hooks/stateChangeTypes.js","../src/hooks/reducer.js","../src/hooks/useSelect/utils.js","../src/hooks/useSelect/stateChangeTypes.js","../src/hooks/useSelect/reducer.js","../src/hooks/useSelect/index.js","../src/hooks/useCombobox/stateChangeTypes.js","../src/hooks/useCombobox/utils.js","../src/hooks/useCombobox/reducer.js","../src/hooks/useCombobox/index.js","../src/hooks/useMultipleSelection/utils.js","../src/hooks/useMultipleSelection/stateChangeTypes.js","../src/hooks/useMultipleSelection/reducer.js","../src/hooks/useMultipleSelection/index.js"],"sourcesContent":["export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/** @license React v17.0.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","/** @license React v17.0.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar REACT_ELEMENT_TYPE = 0xeac7;\nvar REACT_PORTAL_TYPE = 0xeaca;\nvar REACT_FRAGMENT_TYPE = 0xeacb;\nvar REACT_STRICT_MODE_TYPE = 0xeacc;\nvar REACT_PROFILER_TYPE = 0xead2;\nvar REACT_PROVIDER_TYPE = 0xeacd;\nvar REACT_CONTEXT_TYPE = 0xeace;\nvar REACT_FORWARD_REF_TYPE = 0xead0;\nvar REACT_SUSPENSE_TYPE = 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = 0xead8;\nvar REACT_MEMO_TYPE = 0xead3;\nvar REACT_LAZY_TYPE = 0xead4;\nvar REACT_BLOCK_TYPE = 0xead9;\nvar REACT_SERVER_BLOCK_TYPE = 0xeada;\nvar REACT_FUNDAMENTAL_TYPE = 0xead5;\nvar REACT_SCOPE_TYPE = 0xead7;\nvar REACT_OPAQUE_ID_TYPE = 0xeae0;\nvar REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;\nvar REACT_OFFSCREEN_TYPE = 0xeae2;\nvar REACT_LEGACY_HIDDEN_TYPE = 0xeae3;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor = Symbol.for;\n REACT_ELEMENT_TYPE = symbolFor('react.element');\n REACT_PORTAL_TYPE = symbolFor('react.portal');\n REACT_FRAGMENT_TYPE = symbolFor('react.fragment');\n REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');\n REACT_PROFILER_TYPE = symbolFor('react.profiler');\n REACT_PROVIDER_TYPE = symbolFor('react.provider');\n REACT_CONTEXT_TYPE = symbolFor('react.context');\n REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');\n REACT_SUSPENSE_TYPE = symbolFor('react.suspense');\n REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');\n REACT_MEMO_TYPE = symbolFor('react.memo');\n REACT_LAZY_TYPE = symbolFor('react.lazy');\n REACT_BLOCK_TYPE = symbolFor('react.block');\n REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');\n REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');\n REACT_SCOPE_TYPE = symbolFor('react.scope');\n REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');\n REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');\n REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');\n REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');\n}\n\n// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n}\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\nvar hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isConcurrentMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsConcurrentMode) {\n hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","function t(t){return null!=t&&\"object\"==typeof t&&1===t.nodeType}function e(t,e){return(!e||\"hidden\"!==t)&&\"visible\"!==t&&\"clip\"!==t}function n(t,n){if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){var r=getComputedStyle(t,null);return e(r.overflowY,n)||e(r.overflowX,n)||function(t){var e=function(t){if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}}(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)}(t)}return!1}function r(t,e,n,r,i,o,l,d){return o<t&&l>e||o>t&&l<e?0:o<=t&&d<=n||l>=e&&d>=n?o-t-r:l>e&&d<n||o<t&&d>n?l-e+i:0}export default function(e,i){var o=window,l=i.scrollMode,d=i.block,u=i.inline,h=i.boundary,a=i.skipOverflowHiddenElements,c=\"function\"==typeof h?h:function(t){return t!==h};if(!t(e))throw new TypeError(\"Invalid target\");for(var f=document.scrollingElement||document.documentElement,s=[],p=e;t(p)&&c(p);){if((p=p.parentNode)===f){s.push(p);break}p===document.body&&n(p)&&!n(document.documentElement)||n(p,a)&&s.push(p)}for(var g=o.visualViewport?o.visualViewport.width:innerWidth,m=o.visualViewport?o.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,W=e.getBoundingClientRect(),b=W.height,H=W.width,y=W.top,M=W.right,E=W.bottom,V=W.left,x=\"start\"===d||\"nearest\"===d?y:\"end\"===d?E:y+b/2,I=\"center\"===u?V+H/2:\"end\"===u?M:V,C=[],T=0;T<s.length;T++){var k=s[T],B=k.getBoundingClientRect(),D=B.height,O=B.width,R=B.top,X=B.right,Y=B.bottom,L=B.left;if(\"if-needed\"===l&&y>=0&&V>=0&&E<=m&&M<=g&&y>=R&&E<=Y&&V>=L&&M<=X)return C;var S=getComputedStyle(k),j=parseInt(S.borderLeftWidth,10),N=parseInt(S.borderTopWidth,10),q=parseInt(S.borderRightWidth,10),z=parseInt(S.borderBottomWidth,10),A=0,F=0,G=\"offsetWidth\"in k?k.offsetWidth-k.clientWidth-j-q:0,J=\"offsetHeight\"in k?k.offsetHeight-k.clientHeight-N-z:0;if(f===k)A=\"start\"===d?x:\"end\"===d?x-m:\"nearest\"===d?r(v,v+m,m,N,z,v+x,v+x+b,b):x-m/2,F=\"start\"===u?I:\"center\"===u?I-g/2:\"end\"===u?I-g:r(w,w+g,g,j,q,w+I,w+I+H,H),A=Math.max(0,A+v),F=Math.max(0,F+w);else{A=\"start\"===d?x-R-N:\"end\"===d?x-Y+z+J:\"nearest\"===d?r(R,Y,D,N,z+J,x,x+b,b):x-(R+D/2)+J/2,F=\"start\"===u?I-L-j:\"center\"===u?I-(L+O/2)+G/2:\"end\"===u?I-X+q+G:r(L,X,O,j,q+G,I,I+H,H);var K=k.scrollLeft,P=k.scrollTop;x+=P-(A=Math.max(0,Math.min(P+A,k.scrollHeight-D+J))),I+=K-(F=Math.max(0,Math.min(K+F,k.scrollWidth-O+G)))}C.push({el:k,top:A,left:F})}return C}\n//# sourceMappingURL=index.module.js.map\n","import computeScrollIntoView from 'compute-scroll-into-view'\nimport {isPreact} from './is.macro'\n\nlet idCounter = 0\n\n/**\n * Accepts a parameter and returns it if it's a function\n * or a noop function if it's not. This allows us to\n * accept a callback, but not worry about it if it's not\n * passed.\n * @param {Function} cb the callback\n * @return {Function} a function\n */\nfunction cbToCb(cb) {\n return typeof cb === 'function' ? cb : noop\n}\n\nfunction noop() {}\n\n/**\n * Scroll node into view if necessary\n * @param {HTMLElement} node the element that should scroll into view\n * @param {HTMLElement} menuNode the menu element of the component\n */\nfunction scrollIntoView(node, menuNode) {\n if (!node) {\n return\n }\n\n const actions = computeScrollIntoView(node, {\n boundary: menuNode,\n block: 'nearest',\n scrollMode: 'if-needed',\n })\n actions.forEach(({el, top, left}) => {\n el.scrollTop = top\n el.scrollLeft = left\n })\n}\n\n/**\n * @param {HTMLElement} parent the parent node\n * @param {HTMLElement} child the child node\n * @return {Boolean} whether the parent is the child or the child is in the parent\n */\nfunction isOrContainsNode(parent, child) {\n return (\n parent === child ||\n (child instanceof Node && parent.contains && parent.contains(child))\n )\n}\n\n/**\n * Simple debounce implementation. Will call the given\n * function once after the time given has passed since\n * it was last called.\n * @param {Function} fn the function to call after the time\n * @param {Number} time the time to wait\n * @return {Function} the debounced function\n */\nfunction debounce(fn, time) {\n let timeoutId\n\n function cancel() {\n if (timeoutId) {\n clearTimeout(timeoutId)\n }\n }\n\n function wrapper(...args) {\n cancel()\n timeoutId = setTimeout(() => {\n timeoutId = null\n fn(...args)\n }, time)\n }\n\n wrapper.cancel = cancel\n\n return wrapper\n}\n\n/**\n * This is intended to be used to compose event handlers.\n * They are executed in order until one of them sets\n * `event.preventDownshiftDefault = true`.\n * @param {...Function} fns the event handler functions\n * @return {Function} the event handler to add to an element\n */\nfunction callAllEventHandlers(...fns) {\n return (event, ...args) =>\n fns.some(fn => {\n if (fn) {\n fn(event, ...args)\n }\n return (\n event.preventDownshiftDefault ||\n (event.hasOwnProperty('nativeEvent') &&\n event.nativeEvent.preventDownshiftDefault)\n )\n })\n}\n\nfunction handleRefs(...refs) {\n return node => {\n refs.forEach(ref => {\n if (typeof ref === 'function') {\n ref(node)\n } else if (ref) {\n ref.current = node\n }\n })\n }\n}\n\n/**\n * This generates a unique ID for an instance of Downshift\n * @return {String} the unique ID\n */\nfunction generateId() {\n return String(idCounter++)\n}\n\n/**\n * This is only used in tests\n * @param {Number} num the number to set the idCounter to\n */\nfunction setIdCounter(num) {\n idCounter = num\n}\n\n/**\n * Resets idCounter to 0. Used for SSR.\n */\nfunction resetIdCounter() {\n idCounter = 0\n}\n\n/**\n * Default implementation for status message. Only added when menu is open.\n * Will specift if there are results in the list, and if so, how many,\n * and what keys are relevant.\n *\n * @param {Object} param the downshift state and other relevant properties\n * @return {String} the a11y status message\n */\nfunction getA11yStatusMessage({isOpen, resultCount, previousResultCount}) {\n if (!isOpen) {\n return ''\n }\n\n if (!resultCount) {\n return 'No results are available.'\n }\n\n if (resultCount !== previousResultCount) {\n return `${resultCount} result${\n resultCount === 1 ? ' is' : 's are'\n } available, use up and down arrow keys to navigate. Press Enter key to select.`\n }\n\n return ''\n}\n\n/**\n * Takes an argument and if it's an array, returns the first item in the array\n * otherwise returns the argument\n * @param {*} arg the maybe-array\n * @param {*} defaultValue the value if arg is falsey not defined\n * @return {*} the arg or it's first item\n */\nfunction unwrapArray(arg, defaultValue) {\n arg = Array.isArray(arg) ? /* istanbul ignore next (preact) */ arg[0] : arg\n if (!arg && defaultValue) {\n return defaultValue\n } else {\n return arg\n }\n}\n\n/**\n * @param {Object} element (P)react element\n * @return {Boolean} whether it's a DOM element\n */\nfunction isDOMElement(element) {\n /* istanbul ignore if */\n if (isPreact) {\n // then this is preact or preact X\n return (\n typeof element.type === 'string' || typeof element.nodeName === 'string'\n )\n }\n\n // then we assume this is react\n return typeof element.type === 'string'\n}\n\n/**\n * @param {Object} element (P)react element\n * @return {Object} the props\n */\nfunction getElementProps(element) {\n // props for react, attributes for preact\n\n /* istanbul ignore if */\n if (isPreact) {\n return element.props || element.attributes\n }\n\n return element.props\n}\n\n/**\n * Throws a helpful error message for required properties. Useful\n * to be used as a default in destructuring or object params.\n * @param {String} fnName the function name\n * @param {String} propName the prop name\n */\nfunction requiredProp(fnName, propName) {\n // eslint-disable-next-line no-console\n console.error(`The property \"${propName}\" is required in \"${fnName}\"`)\n}\n\nconst stateKeys = [\n 'highlightedIndex',\n 'inputValue',\n 'isOpen',\n 'selectedItem',\n 'type',\n]\n/**\n * @param {Object} state the state object\n * @return {Object} state that is relevant to downshift\n */\nfunction pickState(state = {}) {\n const result = {}\n stateKeys.forEach(k => {\n if (state.hasOwnProperty(k)) {\n result[k] = state[k]\n }\n })\n return result\n}\n\n/**\n * This will perform a shallow merge of the given state object\n * with the state coming from props\n * (for the controlled component scenario)\n * This is used in state updater functions so they're referencing\n * the right state regardless of where it comes from.\n *\n * @param {Object} state The state of the component/hook.\n * @param {Object} props The props that may contain controlled values.\n * @returns {Object} The merged controlled state.\n */\nfunction getState(state, props) {\n return Object.keys(state).reduce((prevState, key) => {\n prevState[key] = isControlledProp(props, key) ? props[key] : state[key]\n\n return prevState\n }, {})\n}\n\n/**\n * This determines whether a prop is a \"controlled prop\" meaning it is\n * state which is controlled by the outside of this component rather\n * than within this component.\n *\n * @param {Object} props The props that may contain controlled values.\n * @param {String} key the key to check\n * @return {Boolean} whether it is a controlled controlled prop\n */\nfunction isControlledProp(props, key) {\n return props[key] !== undefined\n}\n\n/**\n * Normalizes the 'key' property of a KeyboardEvent in IE/Edge\n * @param {Object} event a keyboardEvent object\n * @return {String} keyboard key\n */\nfunction normalizeArrowKey(event) {\n const {key, keyCode} = event\n /* istanbul ignore next (ie) */\n if (keyCode >= 37 && keyCode <= 40 && key.indexOf('Arrow') !== 0) {\n return `Arrow${key}`\n }\n return key\n}\n\n/**\n * Simple check if the value passed is object literal\n * @param {*} obj any things\n * @return {Boolean} whether it's object literal\n */\nfunction isPlainObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]'\n}\n\n/**\n * Returns the new index in the list, in a circular way. If next value is out of bonds from the total,\n * it will wrap to either 0 or itemCount - 1.\n *\n * @param {number} moveAmount Number of positions to move. Negative to move backwards, positive forwards.\n * @param {number} baseIndex The initial position to move from.\n * @param {number} itemCount The total number of items.\n * @param {Function} getItemNodeFromIndex Used to check if item is disabled.\n * @param {boolean} circular Specify if navigation is circular. Default is true.\n * @returns {number} The new index after the move.\n */\nfunction getNextWrappingIndex(\n moveAmount,\n baseIndex,\n itemCount,\n getItemNodeFromIndex,\n circular = true,\n) {\n if (itemCount === 0) {\n return -1\n }\n\n const itemsLastIndex = itemCount - 1\n\n if (\n typeof baseIndex !== 'number' ||\n baseIndex < 0 ||\n baseIndex >= itemCount\n ) {\n baseIndex = moveAmount > 0 ? -1 : itemsLastIndex + 1\n }\n\n let newIndex = baseIndex + moveAmount\n\n if (newIndex < 0) {\n newIndex = circular ? itemsLastIndex : 0\n } else if (newIndex > itemsLastIndex) {\n newIndex = circular ? 0 : itemsLastIndex\n }\n\n const nonDisabledNewIndex = getNextNonDisabledIndex(\n moveAmount,\n newIndex,\n itemCount,\n getItemNodeFromIndex,\n circular,\n )\n\n if (nonDisabledNewIndex === -1) {\n return baseIndex >= itemCount ? -1 : baseIndex\n }\n\n return nonDisabledNewIndex\n}\n\n/**\n * Returns the next index in the list of an item that is not disabled.\n *\n * @param {number} moveAmount Number of positions to move. Negative to move backwards, positive forwards.\n * @param {number} baseIndex The initial position to move from.\n * @param {number} itemCount The total number of items.\n * @param {Function} getItemNodeFromIndex Used to check if item is disabled.\n * @param {boolean} circular Specify if navigation is circular. Default is true.\n * @returns {number} The new index. Returns baseIndex if item is not disabled. Returns next non-disabled item otherwise. If no non-disabled found it will return -1.\n */\nfunction getNextNonDisabledIndex(\n moveAmount,\n baseIndex,\n itemCount,\n getItemNodeFromIndex,\n circular,\n) {\n const currentElementNode = getItemNodeFromIndex(baseIndex)\n if (!currentElementNode || !currentElementNode.hasAttribute('disabled')) {\n return baseIndex\n }\n\n if (moveAmount > 0) {\n for (let index = baseIndex + 1; index < itemCount; index++) {\n if (!getItemNodeFromIndex(index).hasAttribute('disabled')) {\n return index\n }\n }\n } else {\n for (let index = baseIndex - 1; index >= 0; index--) {\n if (!getItemNodeFromIndex(index).hasAttribute('disabled')) {\n return index\n }\n }\n }\n\n if (circular) {\n return moveAmount > 0\n ? getNextNonDisabledIndex(1, 0, itemCount, getItemNodeFromIndex, false)\n : getNextNonDisabledIndex(\n -1,\n itemCount - 1,\n itemCount,\n getItemNodeFromIndex,\n false,\n )\n }\n\n return -1\n}\n\n/**\n * Checks if event target is within the downshift elements.\n *\n * @param {EventTarget} target Target to check.\n * @param {HTMLElement[]} downshiftElements The elements that form downshift (list, toggle button etc).\n * @param {Document} document The document.\n * @param {boolean} checkActiveElement Whether to also check activeElement.\n *\n * @returns {boolean} Whether or not the target is within downshift elements.\n */\nfunction targetWithinDownshift(\n target,\n downshiftElements,\n document,\n checkActiveElement = true,\n) {\n return downshiftElements.some(\n contextNode =>\n contextNode &&\n (isOrContainsNode(contextNode, target) ||\n (checkActiveElement &&\n isOrContainsNode(contextNode, document.activeElement))),\n )\n}\n\n// eslint-disable-next-line import/no-mutable-exports\nlet validateControlledUnchanged = noop\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n validateControlledUnchanged = (state, prevProps, nextProps) => {\n const warningDescription = `This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props`\n\n Object.keys(state).forEach(propKey => {\n if (\n prevProps[propKey] !== undefined &&\n nextProps[propKey] === undefined\n ) {\n // eslint-disable-next-line no-console\n console.error(\n `downshift: A component has changed the controlled prop \"${propKey}\" to be uncontrolled. ${warningDescription}`,\n )\n } else if (\n prevProps[propKey] === undefined &&\n nextProps[propKey] !== undefined\n ) {\n // eslint-disable-next-line no-console\n console.error(\n `downshift: A component has changed the uncontrolled prop \"${propKey}\" to be controlled. ${warningDescription}`,\n )\n }\n })\n }\n}\n\nexport {\n cbToCb,\n callAllEventHandlers,\n handleRefs,\n debounce,\n scrollIntoView,\n generateId,\n getA11yStatusMessage,\n unwrapArray,\n isDOMElement,\n getElementProps,\n noop,\n requiredProp,\n setIdCounter,\n resetIdCounter,\n pickState,\n isPlainObject,\n normalizeArrowKey,\n getNextWrappingIndex,\n getNextNonDisabledIndex,\n targetWithinDownshift,\n getState,\n isControlledProp,\n validateControlledUnchanged\n}\n","import {debounce} from './utils'\n\nconst cleanupStatus = debounce((documentProp) => {\n getStatusDiv(documentProp).textContent = ''\n}, 500)\n\n/**\n * @param {String} status the status message\n * @param {Object} documentProp document passed by the user.\n */\nfunction setStatus(status, documentProp) {\n const div = getStatusDiv(documentProp)\n if (!status) {\n return\n }\n\n div.textContent = status\n cleanupStatus(documentProp)\n}\n\n/**\n * Get the status node or create it if it does not already exist.\n * @param {Object} documentProp document passed by the user.\n * @return {HTMLElement} the status node.\n */\nfunction getStatusDiv(documentProp = document) {\n let statusDiv = documentProp.getElementById('a11y-status-message')\n if (statusDiv) {\n return statusDiv\n }\n\n statusDiv = documentProp.createElement('div')\n statusDiv.setAttribute('id', 'a11y-status-message')\n statusDiv.setAttribute('role', 'status')\n statusDiv.setAttribute('aria-live', 'polite')\n statusDiv.setAttribute('aria-relevant', 'additions text')\n Object.assign(statusDiv.style, {\n border: '0',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n width: '1px',\n })\n documentProp.body.appendChild(statusDiv)\n return statusDiv\n}\n\nexport default setStatus\n","import productionEnum from './productionEnum.macro'\n\nexport const unknown = productionEnum('__autocomplete_unknown__')\nexport const mouseUp = productionEnum('__autocomplete_mouseup__')\nexport const itemMouseEnter = productionEnum('__autocomplete_item_mouseenter__')\nexport const keyDownArrowUp = productionEnum(\n '__autocomplete_keydown_arrow_up__',\n)\nexport const keyDownArrowDown = productionEnum(\n '__autocomplete_keydown_arrow_down__',\n)\nexport const keyDownEscape = productionEnum('__autocomplete_keydown_escape__')\nexport const keyDownEnter = productionEnum('__autocomplete_keydown_enter__')\nexport const keyDownHome = productionEnum('__autocomplete_keydown_home__')\nexport const keyDownEnd = productionEnum('__autocomplete_keydown_end__')\nexport const clickItem = productionEnum('__autocomplete_click_item__')\nexport const blurInput = productionEnum('__autocomplete_blur_input__')\nexport const changeInput = productionEnum('__autocomplete_change_input__')\nexport const keyDownSpaceButton = productionEnum(\n '__autocomplete_keydown_space_button__',\n)\nexport const clickButton = productionEnum('__autocomplete_click_button__')\nexport const blurButton = productionEnum('__autocomplete_blur_button__')\nexport const controlledPropUpdatedSelectedItem = productionEnum(\n '__autocomplete_controlled_prop_updated_selected_item__',\n)\nexport const touchEnd = productionEnum('__autocomplete_touchend__')\n","/* eslint camelcase:0 */\n\nimport PropTypes from 'prop-types'\nimport {Component, cloneElement} from 'react'\nimport {isForwardRef} from 'react-is'\nimport {isPreact, isReactNative} from './is.macro'\nimport setA11yStatus from './set-a11y-status'\nimport * as stateChangeTypes from './stateChangeTypes'\nimport {\n handleRefs,\n callAllEventHandlers,\n cbToCb,\n debounce,\n generateId,\n getA11yStatusMessage,\n getElementProps,\n isDOMElement,\n targetWithinDownshift,\n isPlainObject,\n noop,\n normalizeArrowKey,\n pickState,\n requiredProp,\n scrollIntoView,\n unwrapArray,\n getNextWrappingIndex,\n getNextNonDisabledIndex,\n getState,\n isControlledProp,\n validateControlledUnchanged,\n} from './utils'\n\nclass Downshift extends Component {\n static propTypes = {\n children: PropTypes.func,\n defaultHighlightedIndex: PropTypes.number,\n defaultIsOpen: PropTypes.bool,\n initialHighlightedIndex: PropTypes.number,\n initialSelectedItem: PropTypes.any,\n initialInputValue: PropTypes.string,\n initialIsOpen: PropTypes.bool,\n getA11yStatusMessage: PropTypes.func,\n itemToString: PropTypes.func,\n onChange: PropTypes.func,\n onSelect: PropTypes.func,\n onStateChange: PropTypes.func,\n onInputValueChange: PropTypes.func,\n onUserAction: PropTypes.func,\n onOuterClick: PropTypes.func,\n selectedItemChanged: PropTypes.func,\n stateReducer: PropTypes.func,\n itemCount: PropTypes.number,\n id: PropTypes.string,\n environment: PropTypes.shape({\n addEventListener: PropTypes.func,\n removeEventListener: PropTypes.func,\n document: PropTypes.shape({\n getElementById: PropTypes.func,\n activeElement: PropTypes.any,\n body: PropTypes.any,\n }),\n }),\n suppressRefError: PropTypes.bool,\n scrollIntoView: PropTypes.func,\n // things we keep in state for uncontrolled components\n // but can accept as props for controlled components\n /* eslint-disable react/no-unused-prop-types */\n selectedItem: PropTypes.any,\n isOpen: PropTypes.bool,\n inputValue: PropTypes.string,\n highlightedIndex: PropTypes.number,\n labelId: PropTypes.string,\n inputId: PropTypes.string,\n menuId: PropTypes.string,\n getItemId: PropTypes.func,\n /* eslint-enable react/no-unused-prop-types */\n }\n\n static defaultProps = {\n defaultHighlightedIndex: null,\n defaultIsOpen: false,\n getA11yStatusMessage,\n itemToString: i => {\n if (i == null) {\n return ''\n }\n if (\n process.env.NODE_ENV !== 'production' &&\n isPlainObject(i) &&\n !i.hasOwnProperty('toString')\n ) {\n // eslint-disable-next-line no-console\n console.warn(\n 'downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.',\n 'The object that was passed:',\n i,\n )\n }\n return String(i)\n },\n onStateChange: noop,\n onInputValueChange: noop,\n onUserAction: noop,\n onChange: noop,\n onSelect: noop,\n onOuterClick: noop,\n selectedItemChanged: (prevItem, item) => prevItem !== item,\n environment:\n typeof window === 'undefined' /* istanbul ignore next (ssr) */\n ? {}\n : window,\n stateReducer: (state, stateToSet) => stateToSet,\n suppressRefError: false,\n scrollIntoView,\n }\n\n static stateChangeTypes = stateChangeTypes\n\n constructor(props) {\n super(props)\n // fancy destructuring + defaults + aliases\n // this basically says each value of state should either be set to\n // the initial value or the default value if the initial value is not provided\n const {\n defaultHighlightedIndex,\n initialHighlightedIndex: highlightedIndex = defaultHighlightedIndex,\n defaultIsOpen,\n initialIsOpen: isOpen = defaultIsOpen,\n initialInputValue: inputValue = '',\n initialSelectedItem: selectedItem = null,\n } = this.props\n const state = this.getState({\n highlightedIndex,\n isOpen,\n inputValue,\n selectedItem,\n })\n if (\n state.selectedItem != null &&\n this.props.initialInputValue === undefined\n ) {\n state.inputValue = this.props.itemToString(state.selectedItem)\n }\n this.state = state\n }\n\n id = this.props.id || `downshift-${generateId()}`\n menuId = this.props.menuId || `${this.id}-menu`\n labelId = this.props.labelId || `${this.id}-label`\n inputId = this.props.inputId || `${this.id}-input`\n getItemId = this.props.getItemId || (index => `${this.id}-item-${index}`)\n\n input = null\n items = []\n // itemCount can be changed asynchronously\n // from within downshift (so it can't come from a prop)\n // this is why we store it as an instance and use\n // getItemCount rather than just use items.length\n // (to support windowing + async)\n itemCount = null\n previousResultCount = 0\n\n timeoutIds = []\n\n /**\n * @param {Function} fn the function to call after the time\n * @param {Number} time the time to wait\n */\n internalSetTimeout = (fn, time) => {\n const id = setTimeout(() => {\n this.timeoutIds = this.timeoutIds.filter(i => i !== id)\n fn()\n }, time)\n\n this.timeoutIds.push(id)\n }\n\n /**\n * Clear all running timeouts\n */\n internalClearTimeouts() {\n this.timeoutIds.forEach(id => {\n clearTimeout(id)\n })\n\n this.timeoutIds = []\n }\n\n /**\n * Gets the state based on internal state or props\n * If a state value is passed via props, then that\n * is the value given, otherwise it's retrieved from\n * stateToMerge\n *\n * @param {Object} stateToMerge defaults to this.state\n * @return {Object} the state\n */\n getState(stateToMerge = this.state) {\n return getState(stateToMerge, this.props)\n }\n\n getItemCount() {\n // things read better this way. They're in priority order:\n // 1. `this.itemCount`\n // 2. `this.props.itemCount`\n // 3. `this.items.length`\n let itemCount = this.items.length\n if (this.itemCount != null) {\n itemCount = this.itemCount\n } else if (this.props.itemCount !== undefined) {\n itemCount = this.props.itemCount\n }\n return itemCount\n }\n\n setItemCount = count => {\n this.itemCount = count\n }\n\n unsetItemCount = () => {\n this.itemCount = null\n }\n\n getItemNodeFromIndex(index) {\n return this.props.environment.document.getElementById(this.getItemId(index))\n }\n\n setHighlightedIndex = (\n highlightedIndex = this.props.defaultHighlightedIndex,\n otherStateToSet = {},\n ) => {\n otherStateToSet = pickState(otherStateToSet)\n this.internalSetState({highlightedIndex, ...otherStateToSet})\n }\n\n scrollHighlightedItemIntoView() {\n /* istanbul ignore else (react-native) */\n if (!isReactNative) {\n const node = this.getItemNodeFromIndex(this.getState().highlightedIndex)\n this.props.scrollIntoView(node, this._menuNode)\n }\n }\n\n moveHighlightedIndex(amount, otherStateToSet) {\n const itemCount = this.getItemCount()\n const {highlightedIndex} = this.getState()\n if (itemCount > 0) {\n const nextHighlightedIndex = getNextWrappingIndex(\n amount,\n highlightedIndex,\n itemCount,\n index => this.getItemNodeFromIndex(index),\n )\n this.setHighlightedIndex(nextHighlightedIndex, otherStateToSet)\n }\n }\n\n clearSelection = cb => {\n this.internalSetState(\n {\n selectedItem: null,\n inputValue: '',\n highlightedIndex: this.props.defaultHighlightedIndex,\n isOpen: this.props.defaultIsOpen,\n },\n cb,\n )\n }\n\n selectItem = (item, otherStateToSet, cb) => {\n otherStateToSet = pickState(otherStateToSet)\n this.internalSetState(\n {\n isOpen: this.props.defaultIsOpen,\n highlightedIndex: this.props.defaultHighlightedIndex,\n selectedItem: item,\n inputValue: this.props.itemToString(item),\n ...otherStateToSet,\n },\n cb,\n )\n }\n\n selectItemAtIndex = (itemIndex, otherStateToSet, cb) => {\n const item = this.items[itemIndex]\n if (item == null) {\n return\n }\n this.selectItem(item, otherStateToSet, cb)\n }\n\n selectHighlightedItem = (otherStateToSet, cb) => {\n return this.selectItemAtIndex(\n this.getState().highlightedIndex,\n otherStateToSet,\n cb,\n )\n }\n\n // any piece of our state can live in two places:\n // 1. Uncontrolled: it's internal (this.state)\n // We will call this.setState to update that state\n // 2. Controlled: it's external (this.props)\n // We will call this.props.onStateChange to update that state\n //\n // In addition, we'll call this.props.onChange if the\n // selectedItem is changed.\n internalSetState = (stateToSet, cb) => {\n let isItemSelected, onChangeArg\n\n const onStateChangeArg = {}\n const isStateToSetFunction = typeof stateToSet === 'function'\n\n // we want to call `onInputValueChange` before the `setState` call\n // so someone controlling the `inputValue` state gets notified of\n // the input change as soon as possible. This avoids issues with\n // preserving the cursor position.\n // See https://github.com/downshift-js/downshift/issues/217 for more info.\n if (!isStateToSetFunction && stateToSet.hasOwnProperty('inputValue')) {\n this.props.onInputValueChange(stateToSet.inputValue, {\n ...this.getStateAndHelpers(),\n ...stateToSet,\n })\n }\n return this.setState(\n state => {\n state = this.getState(state)\n let newStateToSet = isStateToSetFunction\n ? stateToSet(state)\n : stateToSet\n\n // Your own function that could modify the state that will be set.\n newStateToSet = this.props.stateReducer(state, newStateToSet)\n\n // checks if an item is selected, regardless of if it's different from\n // what was selected before\n // used to determine if onSelect and onChange callbacks should be called\n isItemSelected = newStateToSet.hasOwnProperty('selectedItem')\n // this keeps track of the object we want to call with setState\n const nextState = {}\n // this is just used to tell whether the state changed\n const nextFullState = {}\n // we need to call on change if the outside world is controlling any of our state\n // and we're trying to update that state. OR if the selection has changed and we're\n // trying to update the selection\n if (\n isItemSelected &&\n newStateToSet.selectedItem !== state.selectedItem\n ) {\n onChangeArg = newStateToSet.selectedItem\n }\n newStateToSet.type = newStateToSet.type || stateChangeTypes.unknown\n\n Object.keys(newStateToSet).forEach(key => {\n // onStateChangeArg should only have the state that is\n // actually changing\n if (state[key] !== newStateToSet[key]) {\n onStateChangeArg[key] = newStateToSet[key]\n }\n // the type is useful for the onStateChangeArg\n // but we don't actually want to set it in internal state.\n // this is an undocumented feature for now... Not all internalSetState\n // calls support it and I'm not certain we want them to yet.\n // But it enables users controlling the isOpen state to know when\n // the isOpen state changes due to mouseup events which is quite handy.\n if (key === 'type') {\n return\n }\n nextFullState[key] = newStateToSet[key]\n // if it's coming from props, then we don't care to set it internally\n if (!isControlledProp(this.props, key)) {\n nextState[key] = newStateToSet[key]\n }\n })\n\n // if stateToSet is a function, then we weren't able to call onInputValueChange\n // earlier, so we'll call it now that we know what the inputValue state will be.\n if (\n isStateToSetFunction &&\n newStateToSet.hasOwnProperty('inputValue')\n ) {\n this.props.onInputValueChange(newStateToSet.inputValue, {\n ...this.getStateAndHelpers(),\n ...newStateToSet,\n })\n }\n\n return nextState\n },\n () => {\n // call the provided callback if it's a function\n cbToCb(cb)()\n\n // only call the onStateChange and onChange callbacks if\n // we have relevant information to pass them.\n const hasMoreStateThanType = Object.keys(onStateChangeArg).length > 1\n if (hasMoreStateThanType) {\n this.props.onStateChange(onStateChangeArg, this.getStateAndHelpers())\n }\n\n if (isItemSelected) {\n this.props.onSelect(\n stateToSet.selectedItem,\n this.getStateAndHelpers(),\n )\n }\n\n if (onChangeArg !== undefined) {\n this.props.onChange(onChangeArg, this.getStateAndHelpers())\n }\n // this is currently undocumented and therefore subject to change\n // We'll try to not break it, but just be warned.\n this.props.onUserAction(onStateChangeArg, this.getStateAndHelpers())\n },\n )\n }\n\n getStateAndHelpers() {\n const {highlightedIndex, inputValue, selectedItem, isOpen} = this.getState()\n const {itemToString} = this.props\n const {id} = this\n const {\n getRootProps,\n getToggleButtonProps,\n getLabelProps,\n getMenuProps,\n getInputProps,\n getItemProps,\n openMenu,\n closeMenu,\n toggleMenu,\n selectItem,\n selectItemAtIndex,\n selectHighlightedItem,\n setHighlightedIndex,\n clearSelection,\n clearItems,\n reset,\n setItemCount,\n unsetItemCount,\n internalSetState: setState,\n } = this\n return {\n // prop getters\n getRootProps,\n getToggleButtonProps,\n getLabelProps,\n getMenuProps,\n getInputProps,\n getItemProps,\n\n // actions\n reset,\n openMenu,\n closeMenu,\n toggleMenu,\n selectItem,\n selectItemAtIndex,\n selectHighlightedItem,\n setHighlightedIndex,\n clearSelection,\n clearItems,\n setItemCount,\n unsetItemCount,\n setState,\n\n // props\n itemToString,\n\n // derived\n id,\n\n // state\n highlightedIndex,\n inputValue,\n isOpen,\n selectedItem,\n }\n }\n\n //////////////////////////// ROOT\n\n rootRef = node => (this._rootNode = node)\n\n getRootProps = (\n {refKey = 'ref', ref, ...rest} = {},\n {suppressRefError = false} = {},\n ) => {\n // this is used in the render to know whether the user has called getRootProps.\n // It uses that to know whether to apply the props automatically\n this.getRootProps.called = true\n this.getRootProps.refKey = refKey\n this.getRootProps.suppressRefError = suppressRefError\n const {isOpen} = this.getState()\n return {\n [refKey]: handleRefs(ref, this.rootRef),\n role: 'combobox',\n 'aria-expanded': isOpen,\n 'aria-haspopup': 'listbox',\n 'aria-owns': isOpen ? this.menuId : null,\n 'aria-labelledby': this.labelId,\n ...rest,\n }\n }\n\n //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ROOT\n\n keyDownHandlers = {\n ArrowDown(event) {\n event.preventDefault()\n\n if (this.getState().isOpen) {\n const amount = event.shiftKey ? 5 : 1\n this.moveHighlightedIndex(amount, {\n type: stateChangeTypes.keyDownArrowDown,\n })\n } else {\n this.internalSetState(\n {\n isOpen: true,\n type: stateChangeTypes.keyDownArrowDown,\n },\n () => {\n const itemCount = this.getItemCount()\n if (itemCount > 0) {\n const {highlightedIndex} = this.getState()\n const nextHighlightedIndex = getNextWrappingIndex(\n 1,\n highlightedIndex,\n itemCount,\n index => this.getItemNodeFromIndex(index),\n )\n\n this.setHighlightedIndex(nextHighlightedIndex, {\n type: stateChangeTypes.keyDownArrowDown,\n })\n }\n },\n )\n }\n },\n\n ArrowUp(event) {\n event.preventDefault()\n\n if (this.getState().isOpen) {\n const amount = event.shiftKey ? -5 : -1\n this.moveHighlightedIndex(amount, {\n type: stateChangeTypes.keyDownArrowUp,\n })\n } else {\n this.internalSetState(\n {\n isOpen: true,\n type: stateChangeTypes.keyDownArrowUp,\n },\n () => {\n const itemCount = this.getItemCount()\n if (itemCount > 0) {\n const {highlightedIndex} = this.getState()\n const nextHighlightedIndex = getNextWrappingIndex(\n -1,\n highlightedIndex,\n itemCount,\n index => this.getItemNodeFromIndex(index),\n )\n\n this.setHighlightedIndex(nextHighlightedIndex, {\n type: stateChangeTypes.keyDownArrowUp,\n })\n }\n },\n )\n }\n },\n\n Enter(event) {\n if (event.which === 229) {\n return\n }\n\n const {isOpen, highlightedIndex} = this.getState()\n if (isOpen && highlightedIndex != null) {\n event.preventDefault()\n const item = this.items[highlightedIndex]\n const itemNode = this.getItemNodeFromIndex(highlightedIndex)\n if (item == null || (itemNode && itemNode.hasAttribute('disabled'))) {\n return\n }\n this.selectHighlightedItem({\n type: stateChangeTypes.keyDownEnter,\n })\n }\n },\n\n Escape(event) {\n event.preventDefault()\n this.reset({\n type: stateChangeTypes.keyDownEscape,\n ...(!this.state.isOpen && {selectedItem: null, inputValue: ''}),\n })\n },\n }\n\n //////////////////////////// BUTTON\n\n buttonKeyDownHandlers = {\n ...this.keyDownHandlers,\n\n ' '(event) {\n event.preventDefault()\n this.toggleMenu({type: stateChangeTypes.keyDownSpaceButton})\n },\n }\n\n inputKeyDownHandlers = {\n ...this.keyDownHandlers,\n Home(event) {\n event.preventDefault()\n\n const itemCount = this.getItemCount()\n const {isOpen} = this.getState()\n\n if (itemCount <= 0 || !isOpen) {\n return\n }\n\n // get next non-disabled starting downwards from 0 if that's disabled.\n const newHighlightedIndex = getNextNonDisabledIndex(\n 1,\n 0,\n itemCount,\n index => this.getItemNodeFromIndex(index),\n false,\n )\n\n this.setHighlightedIndex(newHighlightedIndex, {\n type: stateChangeTypes.keyDownHome,\n })\n },\n\n End(event) {\n event.preventDefault()\n\n const itemCount = this.getItemCount()\n const {isOpen} = this.getState()\n\n if (itemCount <= 0 || !isOpen) {\n return\n }\n\n // get next non-disabled starting upwards from last index if that's disabled.\n const newHighlightedIndex = getNextNonDisabledIndex(\n -1,\n itemCount - 1,\n itemCount,\n index => this.getItemNodeFromIndex(index),\n false,\n )\n\n this.setHighlightedIndex(newHighlightedIndex, {\n type: stateChangeTypes.keyDownEnd,\n })\n },\n }\n\n getToggleButtonProps = ({\n onClick,\n onPress,\n onKeyDown,\n onKeyUp,\n onBlur,\n ...rest\n } = {}) => {\n const {isOpen} = this.getState()\n const enabledEventHandlers = isReactNative\n ? /* istanbul ignore next (react-native) */\n {\n onPress: callAllEventHandlers(onPress, this.buttonHandleClick),\n }\n : {\n onClick: callAllEventHandlers(onClick, this.buttonHandleClick),\n onKeyDown: callAllEventHandlers(onKeyDown, this.buttonHandleKeyDown),\n onKeyUp: callAllEventHandlers(onKeyUp, this.buttonHandleKeyUp),\n onBlur: callAllEventHandlers(onBlur, this.buttonHandleBlur),\n }\n const eventHandlers = rest.disabled ? {} : enabledEventHandlers\n return {\n type: 'button',\n role: 'button',\n 'aria-label': isOpen ? 'close menu' : 'open menu',\n 'aria-haspopup': true,\n 'data-toggle': true,\n ...eventHandlers,\n ...rest,\n }\n }\n\n buttonHandleKeyUp = event => {\n // Prevent click event from emitting in Firefox\n event.preventDefault()\n }\n\n buttonHandleKeyDown = event => {\n const key = normalizeArrowKey(event)\n if (this.buttonKeyDownHandlers[key]) {\n this.buttonKeyDownHandlers[key].call(this, event)\n }\n }\n\n buttonHandleClick = event => {\n event.preventDefault()\n // handle odd case for Safari and Firefox which\n // don't give the button the focus properly.\n /* istanbul ignore if (can't reasonably test this) */\n if (\n !isReactNative &&\n this.props.environment.document.activeElement ===\n this.props.environment.document.body\n ) {\n event.target.focus()\n }\n // to simplify testing components that use downshift, we'll not wrap this in a setTimeout\n // if the NODE_ENV is test. With the proper build system, this should be dead code eliminated\n // when building for production and should therefore have no impact on production code.\n if (process.env.NODE_ENV === 'test') {\n this.toggleMenu({type: stateChangeTypes.clickButton})\n } else {\n // Ensure that toggle of menu occurs after the potential blur event in iOS\n this.internalSetTimeout(() =>\n this.toggleMenu({type: stateChangeTypes.clickButton}),\n )\n }\n }\n\n buttonHandleBlur = event => {\n const blurTarget = event.target // Save blur target for comparison with activeElement later\n // Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not body element\n this.internalSetTimeout(() => {\n if (\n !this.isMouseDown &&\n (this.props.environment.document.activeElement == null ||\n this.props.environment.document.activeElement.id !== this.inputId) &&\n this.props.environment.document.activeElement !== blurTarget // Do nothing if we refocus the same element again (to solve issue in Safari on iOS)\n ) {\n this.reset({type: stateChangeTypes.blurButton})\n }\n })\n }\n\n //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ BUTTON\n\n /////////////////////////////// LABEL\n\n getLabelProps = props => {\n return {htmlFor: this.inputId, id: this.labelId, ...props}\n }\n\n //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ LABEL\n\n /////////////////////////////// INPUT\n\n getInputProps = ({\n onKeyDown,\n onBlur,\n onChange,\n onInput,\n onChangeText,\n ...rest\n } = {}) => {\n let onChangeKey\n let eventHandlers = {}\n\n /* istanbul ignore next (preact) */\n if (isPreact) {\n onChangeKey = 'onInput'\n } else {\n onChangeKey = 'onChange'\n }\n const {inputValue, isOpen, highlightedIndex} = this.getState()\n\n if (!rest.disabled) {\n eventHandlers = {\n [onChangeKey]: callAllEventHandlers(\n onChange,\n onInput,\n this.inputHandleChange,\n ),\n onKeyDown: callAllEventHandlers(onKeyDown, this.inputHandleKeyDown),\n onBlur: callAllEventHandlers(onBlur, this.inputHandleBlur),\n }\n }\n\n /* istanbul ignore if (react-native) */\n if (isReactNative) {\n eventHandlers = {\n onChange: callAllEventHandlers(\n onChange,\n onInput,\n this.inputHandleChange,\n ),\n onChangeText: callAllEventHandlers(onChangeText, onInput, text =>\n this.inputHandleChange({nativeEvent: {text}}),\n ),\n onBlur: callAllEventHandlers(onBlur, this.inputHandleBlur),\n }\n }\n\n return {\n 'aria-autocomplete': 'list',\n 'aria-activedescendant':\n isOpen && typeof highlightedIndex === 'number' && highlightedIndex >= 0\n ? this.getItemId(highlightedIndex)\n : null,\n 'aria-controls': isOpen ? this.menuId : null,\n 'aria-labelledby': this.labelId,\n // https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion\n // revert back since autocomplete=\"nope\" is ignored on latest Chrome and Opera\n autoComplete: 'off',\n value: inputValue,\n id: this.inputId,\n ...eventHandlers,\n ...rest,\n }\n }\n\n inputHandleKeyDown = event => {\n const key = normalizeArrowKey(event)\n if (key && this.inputKeyDownHandlers[key]) {\n this.inputKeyDownHandlers[key].call(this, event)\n }\n }\n\n inputHandleChange = event => {\n this.internalSetState({\n type: stateChangeTypes.changeInput,\n isOpen: true,\n inputValue: isReactNative\n ? /* istanbul ignore next (react-native) */ event.nativeEvent.text\n : event.target.value,\n highlightedIndex: this.props.defaultHighlightedIndex,\n })\n }\n\n inputHandleBlur = () => {\n // Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not the body element\n this.internalSetTimeout(() => {\n const downshiftButtonIsActive =\n this.props.environment.document &&\n !!this.props.environment.document.activeElement &&\n !!this.props.environment.document.activeElement.dataset &&\n this.props.environment.document.activeElement.dataset.toggle &&\n this._rootNode &&\n this._rootNode.contains(this.props.environment.document.activeElement)\n if (!this.isMouseDown && !downshiftButtonIsActive) {\n this.reset({type: stateChangeTypes.blurInput})\n }\n })\n }\n\n //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ INPUT\n\n /////////////////////////////// MENU\n\n menuRef = node => {\n this._menuNode = node\n }\n\n getMenuProps = (\n {refKey = 'ref', ref, ...props} = {},\n {suppressRefError = false} = {},\n ) => {\n this.getMenuProps.called = true\n this.getMenuProps.refKey = refKey\n this.getMenuProps.suppressRefError = suppressRefError\n\n return {\n [refKey]: handleRefs(ref, this.menuRef),\n role: 'listbox',\n 'aria-labelledby': props && props['aria-label'] ? null : this.labelId,\n id: this.menuId,\n ...props,\n }\n }\n //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ MENU\n\n /////////////////////////////// ITEM\n getItemProps = ({\n onMouseMove,\n onMouseDown,\n onClick,\n onPress,\n index,\n item = process.env.NODE_ENV === 'production'\n ? /* istanbul ignore next */ undefined\n : requiredProp('getItemProps', 'item'),\n ...rest\n } = {}) => {\n if (index === undefined) {\n this.items.push(item)\n index = this.items.indexOf(item)\n } else {\n this.items[index] = item\n }\n\n const onSelectKey = isReactNative\n ? /* istanbul ignore next (react-native) */ 'onPress'\n : 'onClick'\n const customClickHandler = isReactNative\n ? /* istanbul ignore next (react-native) */ onPress\n : onClick\n\n const enabledEventHandlers = {\n // onMouseMove is used over onMouseEnter here. onMouseMove\n // is only triggered on actual mouse movement while onMouseEnter\n // can fire on DOM changes, interrupting keyboard navigation\n onMouseMove: callAllEventHandlers(onMouseMove, () => {\n if (index === this.getState().highlightedIndex) {\n return\n }\n this.setHighlightedIndex(index, {\n type: stateChangeTypes.itemMouseEnter,\n })\n\n // We never want to manually scroll when changing state based\n // on `onMouseMove` because we will be moving the element out\n // from under the user which is currently scrolling/moving the\n // cursor\n this.avoidScrolling = true\n this.internalSetTimeout(() => (this.avoidScrolling = false), 250)\n }),\n onMouseDown: callAllEventHandlers(onMouseDown, event => {\n // This prevents the activeElement from being changed\n // to the item so it can remain with the current activeElement\n // which is a more common use case.\n event.preventDefault()\n }),\n [onSelectKey]: callAllEventHandlers(customClickHandler, () => {\n this.selectItemAtIndex(index, {\n type: stateChangeTypes.clickItem,\n })\n }),\n }\n\n // Passing down the onMouseDown handler to prevent redirect\n // of the activeElement if clicking on disabled items\n const eventHandlers = rest.disabled\n ? {onMouseDown: enabledEventHandlers.onMouseDown}\n : enabledEventHandlers\n\n return {\n id: this.getItemId(index),\n role: 'option',\n 'aria-selected': this.getState().highlightedIndex === index,\n ...eventHandlers,\n ...rest,\n }\n }\n //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ITEM\n\n clearItems = () => {\n this.items = []\n }\n\n reset = (otherStateToSet = {}, cb) => {\n otherStateToSet = pickState(otherStateToSet)\n this.internalSetState(\n ({selectedItem}) => ({\n isOpen: this.props.defaultIsOpen,\n highlightedIndex: this.props.defaultHighlightedIndex,\n inputValue: this.props.itemToString(selectedItem),\n ...otherStateToSet,\n }),\n cb,\n )\n }\n\n toggleMenu = (otherStateToSet = {}, cb) => {\n otherStateToSet = pickState(otherStateToSet)\n this.internalSetState(\n ({isOpen}) => {\n return {\n isOpen: !isOpen,\n ...(isOpen && {\n highlightedIndex: this.props.defaultHighlightedIndex,\n }),\n ...otherStateToSet,\n }\n },\n () => {\n const {isOpen, highlightedIndex} = this.getState()\n if (isOpen) {\n if (this.getItemCount() > 0 && typeof highlightedIndex === 'number') {\n this.setHighlightedIndex(highlightedIndex, otherStateToSet)\n }\n }\n cbToCb(cb)()\n },\n )\n }\n\n openMenu = cb => {\n this.internalSetState({isOpen: true}, cb)\n }\n\n closeMenu = cb => {\n this.internalSetState({isOpen: false}, cb)\n }\n\n updateStatus = debounce(() => {\n const state = this.getState()\n const item = this.items[state.highlightedIndex]\n const resultCount = this.getItemCount()\n const status = this.props.getA11yStatusMessage({\n itemToString: this.props.itemToString,\n previousResultCount: this.previousResultCount,\n resultCount,\n highlightedItem: item,\n ...state,\n })\n this.previousResultCount = resultCount\n\n setA11yStatus(status, this.props.environment.document)\n }, 200)\n\n componentDidMount() {\n /* istanbul ignore if (react-native) */\n if (\n process.env.NODE_ENV !== 'production' &&\n !isReactNative &&\n this.getMenuProps.called &&\n !this.getMenuProps.suppressRefError\n ) {\n validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps)\n }\n\n /* istanbul ignore if (react-native) */\n if (isReactNative) {\n this.cleanup = () => {\n this.internalClearTimeouts()\n }\n } else {\n // this.isMouseDown helps us track whether the mouse is currently held down.\n // This is useful when the user clicks on an item in the list, but holds the mouse\n // down long enough for the list to disappear (because the blur event fires on the input)\n // this.isMouseDown is used in the blur handler on the input to determine whether the blur event should\n // trigger hiding the menu.\n const onMouseDown = () => {\n this.isMouseDown = true\n }\n const onMouseUp = event => {\n this.isMouseDown = false\n // if the target element or the activeElement is within a downshift node\n // then we don't want to reset downshift\n const contextWithinDownshift = targetWithinDownshift(\n event.target,\n [this._rootNode, this._menuNode],\n this.props.environment.document,\n )\n if (!contextWithinDownshift && this.getState().isOpen) {\n this.reset({type: stateChangeTypes.mouseUp}, () =>\n this.props.onOuterClick(this.getStateAndHelpers()),\n )\n }\n }\n // Touching an element in iOS gives focus and hover states, but touching out of\n // the element will remove hover, and persist the focus state, resulting in the\n // blur event not being triggered.\n // this.isTouchMove helps us track whether the user is tapping or swiping on a touch screen.\n // If the user taps outside of Downshift, the component should be reset,\n // but not if the user is swiping\n const onTouchStart = () => {\n this.isTouchMove = false\n }\n\n const onTouchMove = () => {\n this.isTouchMove = true\n }\n\n const onTouchEnd = event => {\n const contextWithinDownshift = targetWithinDownshift(\n event.target,\n [this._rootNode, this._menuNode],\n this.props.environment.document,\n false,\n )\n if (\n !this.isTouchMove &&\n !contextWithinDownshift &&\n this.getState().isOpen\n ) {\n this.reset({type: stateChangeTypes.touchEnd}, () =>\n this.props.onOuterClick(this.getStateAndHelpers()),\n )\n }\n }\n const {environment} = this.props\n\n environment.addEventListener('mousedown', onMouseDown)\n environment.addEventListener('mouseup', onMouseUp)\n environment.addEventListener('touchstart', onTouchStart)\n environment.addEventListener('touchmove', onTouchMove)\n environment.addEventListener('touchend', onTouchEnd)\n\n this.cleanup = () => {\n this.internalClearTimeouts()\n this.updateStatus.cancel()\n environment.removeEventListener('mousedown', onMouseDown)\n environment.removeEventListener('mouseup', onMouseUp)\n environment.removeEventListener('touchstart', onTouchStart)\n environment.removeEventListener('touchmove', onTouchMove)\n environment.removeEventListener('touchend', onTouchEnd)\n }\n }\n }\n\n shouldScroll(prevState, prevProps) {\n const {highlightedIndex: currentHighlightedIndex} =\n this.props.highlightedIndex === undefined ? this.getState() : this.props\n const {highlightedIndex: prevHighlightedIndex} =\n prevProps.highlightedIndex === undefined ? prevState : prevProps\n const scrollWhenOpen =\n currentHighlightedIndex && this.getState().isOpen && !prevState.isOpen\n const scrollWhenNavigating =\n currentHighlightedIndex !== prevHighlightedIndex\n\n return scrollWhenOpen || scrollWhenNavigating\n }\n\n componentDidUpdate(prevProps, prevState) {\n if (process.env.NODE_ENV !== 'production') {\n validateControlledUnchanged(this.state, prevProps, this.props)\n /* istanbul ignore if (react-native) */\n if (\n !isReactNative &&\n this.getMenuProps.called &&\n !this.getMenuProps.suppressRefError\n ) {\n validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps)\n }\n }\n\n if (\n isControlledProp(this.props, 'selectedItem') &&\n this.props.selectedItemChanged(\n prevProps.selectedItem,\n this.props.selectedItem,\n )\n ) {\n this.internalSetState({\n type: stateChangeTypes.controlledPropUpdatedSelectedItem,\n inputValue: this.props.itemToString(this.props.selectedItem),\n })\n }\n\n if (!this.avoidScrolling && this.shouldScroll(prevState, prevProps)) {\n this.scrollHighlightedItemIntoView()\n }\n\n /* istanbul ignore else (react-native) */\n if (!isReactNative) {\n this.updateStatus()\n }\n }\n\n componentWillUnmount() {\n this.cleanup() // avoids memory leak\n }\n\n render() {\n const children = unwrapArray(this.props.children, noop)\n // because the items are rerendered every time we call the children\n // we clear this out each render and it will be populated again as\n // getItemProps is called.\n this.clearItems()\n // we reset this so we know whether the user calls getRootProps during\n // this render. If they do then we don't need to do anything,\n // if they don't then we need to clone the element they return and\n // apply the props for them.\n this.getRootProps.called = false\n this.getRootProps.refKey = undefined\n this.getRootProps.suppressRefError = undefined\n // we do something similar for getMenuProps\n this.getMenuProps.called = false\n this.getMenuProps.refKey = undefined\n this.getMenuProps.suppressRefError = undefined\n // we do something similar for getLabelProps\n this.getLabelProps.called = false\n // and something similar for getInputProps\n this.getInputProps.called = false\n const element = unwrapArray(children(this.getStateAndHelpers()))\n if (!element) {\n return null\n }\n\n if (this.getRootProps.called || this.props.suppressRefError) {\n if (\n process.env.NODE_ENV !== 'production' &&\n !this.getRootProps.suppressRefError &&\n !this.props.suppressRefError\n ) {\n validateGetRootPropsCalledCorrectly(element, this.getRootProps)\n }\n return element\n } else if (isDOMElement(element)) {\n // they didn't apply the root props, but we can clone\n // this and apply the props ourselves\n return cloneElement(element, this.getRootProps(getElementProps(element)))\n }\n\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n // they didn't apply the root props, but they need to\n // otherwise we can't query around the autocomplete\n\n throw new Error(\n 'downshift: If you return a non-DOM element, you must apply the getRootProps function',\n )\n }\n\n /* istanbul ignore next */\n return undefined\n }\n}\n\nexport default Downshift\n\nfunction validateGetMenuPropsCalledCorrectly(node, {refKey}) {\n if (!node) {\n // eslint-disable-next-line no-console\n console.error(\n `downshift: The ref prop \"${refKey}\" from getMenuProps was not applied correctly on your menu element.`,\n )\n }\n}\n\nfunction validateGetRootPropsCalledCorrectly(element, {refKey}) {\n const refKeySpecified = refKey !== 'ref'\n const isComposite = !isDOMElement(element)\n if (isComposite && !refKeySpecified && !isForwardRef(element)) {\n // eslint-disable-next-line no-console\n console.error(\n 'downshift: You returned a non-DOM element. You must specify a refKey in getRootProps',\n )\n } else if (!isComposite && refKeySpecified) {\n // eslint-disable-next-line no-console\n console.error(\n `downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified \"${refKey}\"`,\n )\n }\n if (!isForwardRef(element) && !getElementProps(element)[refKey]) {\n // eslint-disable-next-line no-console\n console.error(\n `downshift: You must apply the ref prop \"${refKey}\" from getRootProps onto your root element.`,\n )\n }\n}\n","import {\n useRef,\n useCallback,\n useReducer,\n useEffect,\n useLayoutEffect,\n} from 'react'\nimport {\n scrollIntoView,\n getNextWrappingIndex,\n getState,\n generateId,\n debounce,\n targetWithinDownshift,\n validateControlledUnchanged,\n noop,\n} from '../utils'\nimport setStatus from '../set-a11y-status'\n\nconst dropdownDefaultStateValues = {\n highlightedIndex: -1,\n isOpen: false,\n selectedItem: null,\n inputValue: '',\n}\n\nfunction callOnChangeProps(action, state, newState) {\n const {props, type} = action\n const changes = {}\n\n Object.keys(state).forEach(key => {\n invokeOnChangeHandler(key, action, state, newState)\n\n if (newState[key] !== state[key]) {\n changes[key] = newState[key]\n }\n })\n\n if (props.onStateChange && Object.keys(changes).length) {\n props.onStateChange({type, ...changes})\n }\n}\n\nfunction invokeOnChangeHandler(key, action, state, newState) {\n const {props, type} = action\n const handler = `on${capitalizeString(key)}Change`\n if (\n props[handler] &&\n newState[key] !== undefined &&\n newState[key] !== state[key]\n ) {\n props[handler]({type, ...newState})\n }\n}\n\n/**\n * Default state reducer that returns the changes.\n *\n * @param {Object} s state.\n * @param {Object} a action with changes.\n * @returns {Object} changes.\n */\nfunction stateReducer(s, a) {\n return a.changes\n}\n\n/**\n * Returns a message to be added to aria-live region when item is selected.\n *\n * @param {Object} selectionParameters Parameters required to build the message.\n * @returns {string} The a11y message.\n */\nfunction getA11ySelectionMessage(selectionParameters) {\n const {selectedItem, itemToString: itemToStringLocal} = selectionParameters\n\n return selectedItem\n ? `${itemToStringLocal(selectedItem)} has been selected.`\n : ''\n}\n\n/**\n * Debounced call for updating the a11y message.\n */\nconst updateA11yStatus = debounce((getA11yMessage, document) => {\n setStatus(getA11yMessage(), document)\n}, 200)\n\n// istanbul ignore next\nconst useIsomorphicLayoutEffect =\n typeof window !== 'undefined' &&\n typeof window.document !== 'undefined' &&\n typeof window.document.createElement !== 'undefined'\n ? useLayoutEffect\n : useEffect\n\nfunction useElementIds({\n id = `downshift-${generateId()}`,\n labelId,\n menuId,\n getItemId,\n toggleButtonId,\n inputId,\n}) {\n const elementIdsRef = useRef({\n labelId: labelId || `${id}-label`,\n menuId: menuId || `${id}-menu`,\n getItemId: getItemId || (index => `${id}-item-${index}`),\n toggleButtonId: toggleButtonId || `${id}-toggle-button`,\n inputId: inputId || `${id}-input`,\n })\n\n return elementIdsRef.current\n}\n\nfunction getItemIndex(index, item, items) {\n if (index !== undefined) {\n return index\n }\n if (items.length === 0) {\n return -1\n }\n return items.indexOf(item)\n}\n\nfunction itemToString(item) {\n return item ? String(item) : ''\n}\n\nfunction isAcceptedCharacterKey(key) {\n return /^\\S{1}$/.test(key)\n}\n\nfunction capitalizeString(string) {\n return `${string.slice(0, 1).toUpperCase()}${string.slice(1)}`\n}\n\nfunction useLatestRef(val) {\n const ref = useRef(val)\n // technically this is not \"concurrent mode safe\" because we're manipulating\n // the value during render (so it's not idempotent). However, the places this\n // hook is used is to support memoizing callbacks which will be called\n // *during* render, so we need the latest values *during* render.\n // If not for this, then we'd probably want to use useLayoutEffect instead.\n ref.current = val\n return ref\n}\n\n/**\n * Computes the controlled state using a the previous state, props,\n * two reducers, one from downshift and an optional one from the user.\n * Also calls the onChange handlers for state values that have changed.\n *\n * @param {Function} reducer Reducer function from downshift.\n * @param {Object} initialState Initial state of the hook.\n * @param {Object} props The hook props.\n * @returns {Array} An array with the state and an action dispatcher.\n */\nfunction useEnhancedReducer(reducer, initialState, props) {\n const prevStateRef = useRef()\n const actionRef = useRef()\n const enhancedReducer = useCallback(\n (state, action) => {\n actionRef.current = action\n state = getState(state, action.props)\n\n const changes = reducer(state, action)\n const newState = action.props.stateReducer(state, {...action, changes})\n\n return newState\n },\n [reducer],\n )\n const [state, dispatch] = useReducer(enhancedReducer, initialState)\n const propsRef = useLatestRef(props)\n const dispatchWithProps = useCallback(\n action => dispatch({props: propsRef.current, ...action}),\n [propsRef],\n )\n const action = actionRef.current\n\n useEffect(() => {\n if (action && prevStateRef.current && prevStateRef.current !== state) {\n callOnChangeProps(\n action,\n getState(prevStateRef.current, action.props),\n state,\n )\n }\n\n prevStateRef.current = state\n }, [state, props, action])\n\n return [state, dispatchWithProps]\n}\n\n/**\n * Wraps the useEnhancedReducer and applies the controlled prop values before\n * returning the new state.\n *\n * @param {Function} reducer Reducer function from downshift.\n * @param {Object} initialState Initial state of the hook.\n * @param {Object} props The hook props.\n * @returns {Array} An array with the state and an action dispatcher.\n */\nfunction useControlledReducer(reducer, initialState, props) {\n const [state, dispatch] = useEnhancedReducer(reducer, initialState, props)\n\n return [getState(state, props), dispatch]\n}\n\nconst defaultProps = {\n itemToString,\n stateReducer,\n getA11ySelectionMessage,\n scrollIntoView,\n circularNavigation: false,\n environment:\n typeof window === 'undefined' /* istanbul ignore next (ssr) */\n ? {}\n : window,\n}\n\nfunction getDefaultValue(\n props,\n propKey,\n defaultStateValues = dropdownDefaultStateValues,\n) {\n const defaultPropKey = `default${capitalizeString(propKey)}`\n\n if (defaultPropKey in props) {\n return props[defaultPropKey]\n }\n\n return defaultStateValues[propKey]\n}\n\nfunction getInitialValue(\n props,\n propKey,\n defaultStateValues = dropdownDefaultStateValues,\n) {\n if (propKey in props) {\n return props[propKey]\n }\n\n const initialPropKey = `initial${capitalizeString(propKey)}`\n\n if (initialPropKey in props) {\n return props[initialPropKey]\n }\n return getDefaultValue(props, propKey, defaultStateValues)\n}\n\nfunction getInitialState(props) {\n const selectedItem = getInitialValue(props, 'selectedItem')\n const isOpen = getInitialValue(props, 'isOpen')\n const highlightedIndex = getInitialValue(props, 'highlightedIndex')\n const inputValue = getInitialValue(props, 'inputValue')\n\n return {\n highlightedIndex:\n highlightedIndex < 0 && selectedItem && isOpen\n ? props.items.indexOf(selectedItem)\n : highlightedIndex,\n isOpen,\n selectedItem,\n inputValue,\n }\n}\n\nfunction getHighlightedIndexOnOpen(props, state, offset, getItemNodeFromIndex) {\n const {items, initialHighlightedIndex, defaultHighlightedIndex} = props\n const {selectedItem, highlightedIndex} = state\n\n if (items.length === 0) {\n return -1\n }\n\n // initialHighlightedIndex will give value to highlightedIndex on initial state only.\n if (\n initialHighlightedIndex !== undefined &&\n highlightedIndex === initialHighlightedIndex\n ) {\n return initialHighlightedIndex\n }\n if (defaultHighlightedIndex !== undefined) {\n return defaultHighlightedIndex\n }\n if (selectedItem) {\n if (offset === 0) {\n return items.indexOf(selectedItem)\n }\n return getNextWrappingIndex(\n offset,\n items.indexOf(selectedItem),\n items.length,\n getItemNodeFromIndex,\n false,\n )\n }\n if (offset === 0) {\n return -1\n }\n return offset < 0 ? items.length - 1 : 0\n}\n\n/**\n * Reuse the movement tracking of mouse and touch events.\n *\n * @param {boolean} isOpen Whether the dropdown is open or not.\n * @param {Array<Object>} downshiftElementRefs Downshift element refs to track movement (toggleButton, menu etc.)\n * @param {Object} environment Environment where component/hook exists.\n * @param {Function} handleBlur Handler on blur from mouse or touch.\n * @returns {Object} Ref containing whether mouseDown or touchMove event is happening\n */\nfunction useMouseAndTouchTracker(\n isOpen,\n downshiftElementRefs,\n environment,\n handleBlur,\n) {\n const mouseAndTouchTrackersRef = useRef({\n isMouseDown: false,\n isTouchMove: false,\n })\n\n useEffect(() => {\n // The same strategy for checking if a click occurred inside or outside downsift\n // as in downshift.js.\n const onMouseDown = () => {\n mouseAndTouchTrackersRef.current.isMouseDown = true\n }\n const onMouseUp = event => {\n mouseAndTouchTrackersRef.current.isMouseDown = false\n if (\n isOpen &&\n !targetWithinDownshift(\n event.target,\n downshiftElementRefs.map(ref => ref.current),\n environment.document,\n )\n ) {\n handleBlur()\n }\n }\n const onTouchStart = () => {\n mouseAndTouchTrackersRef.current.isTouchMove = false\n }\n const onTouchMove = () => {\n mouseAndTouchTrackersRef.current.isTouchMove = true\n }\n const onTouchEnd = event => {\n if (\n isOpen &&\n !mouseAndTouchTrackersRef.current.isTouchMove &&\n !targetWithinDownshift(\n event.target,\n downshiftElementRefs.map(ref => ref.current),\n environment.document,\n false,\n )\n ) {\n handleBlur()\n }\n }\n\n environment.addEventListener('mousedown', onMouseDown)\n environment.addEventListener('mouseup', onMouseUp)\n environment.addEventListener('touchstart', onTouchStart)\n environment.addEventListener('touchmove', onTouchMove)\n environment.addEventListener('touchend', onTouchEnd)\n\n return function cleanup() {\n environment.removeEventListener('mousedown', onMouseDown)\n environment.removeEventListener('mouseup', onMouseUp)\n environment.removeEventListener('touchstart', onTouchStart)\n environment.removeEventListener('touchmove', onTouchMove)\n environment.removeEventListener('touchend', onTouchEnd)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen, environment])\n\n return mouseAndTouchTrackersRef\n}\n\n/* istanbul ignore next */\n// eslint-disable-next-line import/no-mutable-exports\nlet useGetterPropsCalledChecker = () => noop\n/**\n * Custom hook that checks if getter props are called correctly.\n *\n * @param {...any} propKeys Getter prop names to be handled.\n * @returns {Function} Setter function called inside getter props to set call information.\n */\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n useGetterPropsCalledChecker = (...propKeys) => {\n const isInitialMountRef = useRef(true)\n const getterPropsCalledRef = useRef(\n propKeys.reduce((acc, propKey) => {\n acc[propKey] = {}\n return acc\n }, {}),\n )\n\n useEffect(() => {\n Object.keys(getterPropsCalledRef.current).forEach(propKey => {\n const propCallInfo = getterPropsCalledRef.current[propKey]\n if (isInitialMountRef.current) {\n if (!Object.keys(propCallInfo).length) {\n // eslint-disable-next-line no-console\n console.error(\n `downshift: You forgot to call the ${propKey} getter function on your component / element.`,\n )\n return\n }\n }\n\n const {suppressRefError, refKey, elementRef} = propCallInfo\n\n if ((!elementRef || !elementRef.current) && !suppressRefError) {\n // eslint-disable-next-line no-console\n console.error(\n `downshift: The ref prop \"${refKey}\" from ${propKey} was not applied correctly on your element.`,\n )\n }\n })\n\n isInitialMountRef.current = false\n })\n\n const setGetterPropCallInfo = useCallback(\n (propKey, suppressRefError, refKey, elementRef) => {\n getterPropsCalledRef.current[propKey] = {\n suppressRefError,\n refKey,\n elementRef,\n }\n },\n [],\n )\n\n return setGetterPropCallInfo\n }\n}\n\nfunction useA11yMessageSetter(\n getA11yMessage,\n dependencyArray,\n {isInitialMount, highlightedIndex, items, environment, ...rest},\n) {\n // Sets a11y status message on changes in state.\n useEffect(() => {\n if (isInitialMount) {\n return\n }\n\n updateA11yStatus(\n () =>\n getA11yMessage({\n highlightedIndex,\n highlightedItem: items[highlightedIndex],\n resultCount: items.length,\n ...rest,\n }),\n environment.document,\n )\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, dependencyArray)\n}\n\nfunction useScrollIntoView({\n highlightedIndex,\n isOpen,\n itemRefs,\n getItemNodeFromIndex,\n menuElement,\n scrollIntoView: scrollIntoViewProp,\n}) {\n // used not to scroll on highlight by mouse.\n const shouldScrollRef = useRef(true)\n // Scroll on highlighted item if change comes from keyboard.\n useIsomorphicLayoutEffect(() => {\n if (\n highlightedIndex < 0 ||\n !isOpen ||\n !Object.keys(itemRefs.current).length\n ) {\n return\n }\n\n if (shouldScrollRef.current === false) {\n shouldScrollRef.current = true\n } else {\n scrollIntoViewProp(getItemNodeFromIndex(highlightedIndex), menuElement)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [highlightedIndex])\n\n return shouldScrollRef\n}\n\n// eslint-disable-next-line import/no-mutable-exports\nlet useControlPropsValidator = noop\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n useControlPropsValidator = ({isInitialMount, props, state}) => {\n // used for checking when props are moving from controlled to uncontrolled.\n const prevPropsRef = useRef(props)\n\n useEffect(() => {\n if (isInitialMount) {\n return\n }\n\n validateControlledUnchanged(state, prevPropsRef.current, props)\n prevPropsRef.current = props\n }, [state, props, isInitialMount])\n }\n}\n\nexport {\n useControlPropsValidator,\n useScrollIntoView,\n useA11yMessageSetter,\n useGetterPropsCalledChecker,\n useMouseAndTouchTracker,\n getHighlightedIndexOnOpen,\n getInitialState,\n getInitialValue,\n getDefaultValue,\n defaultProps,\n useControlledReducer,\n useEnhancedReducer,\n useLatestRef,\n capitalizeString,\n isAcceptedCharacterKey,\n getItemIndex,\n useElementIds,\n}\n","import productionEnum from '../productionEnum.macro'\n\nexport const MenuMouseLeave = productionEnum('__menu_mouse_leave__')\n\nexport const ItemMouseMove = productionEnum('__item_mouse_move__')\nexport const ItemClick = productionEnum('__item_click__')\n\nexport const ToggleButtonClick = productionEnum('__togglebutton_click__')\n\nexport const FunctionToggleMenu = productionEnum('__function_toggle_menu__')\nexport const FunctionOpenMenu = productionEnum('__function_open_menu__')\nexport const FunctionCloseMenu = productionEnum('__function_close_menu__')\nexport const FunctionSetHighlightedIndex = productionEnum(\n '__function_set_highlighted_index__',\n)\nexport const FunctionSelectItem = productionEnum('__function_select_item__')\nexport const FunctionSetInputValue = productionEnum(\n '__function_set_input_value__',\n)\nexport const FunctionReset = productionEnum('__function_reset__')\n\n// to be used by useSelect and useCombobox\nexport function productionEnumFn(state) {\n return productionEnum(state)\n}\n","import {getHighlightedIndexOnOpen, getDefaultValue} from './utils'\nimport * as stateChangeTypes from './stateChangeTypes'\n\n/* eslint-disable complexity */\nexport default function downshiftCommonReducer(state, action) {\n const {type, props} = action\n let changes\n\n switch (type) {\n case stateChangeTypes.ItemMouseMove:\n changes = {\n highlightedIndex: action.index,\n }\n\n break\n case stateChangeTypes.MenuMouseLeave:\n changes = {\n highlightedIndex: -1,\n }\n\n break\n case stateChangeTypes.ToggleButtonClick:\n case stateChangeTypes.FunctionToggleMenu:\n changes = {\n isOpen: !state.isOpen,\n highlightedIndex: state.isOpen\n ? -1\n : getHighlightedIndexOnOpen(props, state, 0),\n }\n\n break\n case stateChangeTypes.FunctionOpenMenu:\n changes = {\n isOpen: true,\n highlightedIndex: getHighlightedIndexOnOpen(props, state, 0),\n }\n\n break\n case stateChangeTypes.FunctionCloseMenu:\n changes = {\n isOpen: false,\n }\n\n break\n case stateChangeTypes.FunctionSetHighlightedIndex:\n changes = {\n highlightedIndex: action.highlightedIndex,\n }\n\n break\n case stateChangeTypes.FunctionSetInputValue:\n changes = {\n inputValue: action.inputValue,\n }\n\n break\n case stateChangeTypes.FunctionReset:\n changes = {\n highlightedIndex: getDefaultValue(props, 'highlightedIndex'),\n isOpen: getDefaultValue(props, 'isOpen'),\n selectedItem: getDefaultValue(props, 'selectedItem'),\n inputValue: getDefaultValue(props, 'inputValue'),\n }\n\n break\n default:\n throw new Error('Reducer called without proper action type.')\n }\n\n return {\n ...state,\n ...changes,\n }\n}\n/* eslint-enable complexity */\n","import PropTypes from 'prop-types'\nimport {defaultProps as commonDefaultProps} from '../utils'\nimport {noop} from '../../utils'\n\nfunction getItemIndexByCharacterKey(\n keysSoFar,\n highlightedIndex,\n items,\n itemToString,\n getItemNodeFromIndex,\n) {\n const lowerCasedKeysSoFar = keysSoFar.toLowerCase()\n\n for (let index = 0; index < items.length; index++) {\n const offsetIndex = (index + highlightedIndex + 1) % items.length\n\n if (\n itemToString(items[offsetIndex])\n .toLowerCase()\n .startsWith(lowerCasedKeysSoFar)\n ) {\n const element = getItemNodeFromIndex(offsetIndex)\n\n if (!(element && element.hasAttribute('disabled'))) {\n return offsetIndex\n }\n }\n }\n\n return highlightedIndex\n}\n\nconst propTypes = {\n items: PropTypes.array.isRequired,\n itemToString: PropTypes.func,\n getA11yStatusMessage: PropTypes.func,\n getA11ySelectionMessage: PropTypes.func,\n circularNavigation: PropTypes.bool,\n highlightedIndex: PropTypes.number,\n defaultHighlightedIndex: PropTypes.number,\n initialHighlightedIndex: PropTypes.number,\n isOpen: PropTypes.bool,\n defaultIsOpen: PropTypes.bool,\n initialIsOpen: PropTypes.bool,\n selectedItem: PropTypes.any,\n initialSelectedItem: PropTypes.any,\n defaultSelectedItem: PropTypes.any,\n id: PropTypes.string,\n labelId: PropTypes.string,\n menuId: PropTypes.string,\n getItemId: PropTypes.func,\n toggleButtonId: PropTypes.string,\n stateReducer: PropTypes.func,\n onSelectedItemChange: PropTypes.func,\n onHighlightedIndexChange: PropTypes.func,\n onStateChange: PropTypes.func,\n onIsOpenChange: PropTypes.func,\n environment: PropTypes.shape({\n addEventListener: PropTypes.func,\n removeEventListener: PropTypes.func,\n document: PropTypes.shape({\n getElementById: PropTypes.func,\n activeElement: PropTypes.any,\n body: PropTypes.any,\n }),\n }),\n}\n\n/**\n * Default implementation for status message. Only added when menu is open.\n * Will specift if there are results in the list, and if so, how many,\n * and what keys are relevant.\n *\n * @param {Object} param the downshift state and other relevant properties\n * @return {String} the a11y status message\n */\nfunction getA11yStatusMessage({isOpen, resultCount, previousResultCount}) {\n if (!isOpen) {\n return ''\n }\n\n if (!resultCount) {\n return 'No results are available.'\n }\n\n if (resultCount !== previousResultCount) {\n return `${resultCount} result${\n resultCount === 1 ? ' is' : 's are'\n } available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.`\n }\n\n return ''\n}\n\nconst defaultProps = {\n ...commonDefaultProps,\n getA11yStatusMessage,\n}\n\n// eslint-disable-next-line import/no-mutable-exports\nlet validatePropTypes = noop\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n validatePropTypes = (options, caller) => {\n PropTypes.checkPropTypes(propTypes, options, 'prop', caller.name)\n }\n}\n\nexport {getItemIndexByCharacterKey, defaultProps, validatePropTypes}\n","import {productionEnumFn} from '../stateChangeTypes'\n\nexport * from '../stateChangeTypes'\n\nexport const MenuKeyDownArrowDown = productionEnumFn(\n '__menu_keydown_arrow_down__',\n)\nexport const MenuKeyDownArrowUp = productionEnumFn('__menu_keydown_arrow_up__')\nexport const MenuKeyDownEscape = productionEnumFn('__menu_keydown_escape__')\nexport const MenuKeyDownHome = productionEnumFn('__menu_keydown_home__')\nexport const MenuKeyDownEnd = productionEnumFn('__menu_keydown_end__')\nexport const MenuKeyDownEnter = productionEnumFn('__menu_keydown_enter__')\nexport const MenuKeyDownSpaceButton = productionEnumFn(\n '__menu_keydown_space_button__',\n)\nexport const MenuKeyDownCharacter = productionEnumFn('__menu_keydown_character__')\nexport const MenuBlur = productionEnumFn('__menu_blur__')\nexport const ToggleButtonKeyDownArrowDown = productionEnumFn(\n '__togglebutton_keydown_arrow_down__',\n)\nexport const ToggleButtonKeyDownArrowUp = productionEnumFn(\n '__togglebutton_keydown_arrow_up__',\n)\nexport const ToggleButtonKeyDownCharacter = productionEnumFn(\n '__togglebutton_keydown_character__',\n)\n","import {getNextWrappingIndex, getNextNonDisabledIndex} from '../../utils'\nimport {getHighlightedIndexOnOpen, getDefaultValue} from '../utils'\nimport commonReducer from '../reducer'\nimport {getItemIndexByCharacterKey} from './utils'\nimport * as stateChangeTypes from './stateChangeTypes'\n\n/* eslint-disable complexity */\nexport default function downshiftSelectReducer(state, action) {\n const {type, props, shiftKey} = action\n let changes\n\n switch (type) {\n case stateChangeTypes.ItemClick:\n changes = {\n isOpen: getDefaultValue(props, 'isOpen'),\n highlightedIndex: getDefaultValue(props, 'highlightedIndex'),\n selectedItem: props.items[action.index],\n }\n\n break\n case stateChangeTypes.ToggleButtonKeyDownCharacter:\n {\n const lowercasedKey = action.key\n const inputValue = `${state.inputValue}${lowercasedKey}`\n const itemIndex = getItemIndexByCharacterKey(\n inputValue,\n state.selectedItem ? props.items.indexOf(state.selectedItem) : -1,\n props.items,\n props.itemToString,\n action.getItemNodeFromIndex,\n )\n\n changes = {\n inputValue,\n ...(itemIndex >= 0 && {\n selectedItem: props.items[itemIndex],\n }),\n }\n }\n\n break\n case stateChangeTypes.ToggleButtonKeyDownArrowDown:\n changes = {\n highlightedIndex: getHighlightedIndexOnOpen(\n props,\n state,\n 1,\n action.getItemNodeFromIndex,\n ),\n isOpen: true,\n }\n\n break\n case stateChangeTypes.ToggleButtonKeyDownArrowUp:\n changes = {\n highlightedIndex: getHighlightedIndexOnOpen(\n props,\n state,\n -1,\n action.getItemNodeFromIndex,\n ),\n isOpen: true,\n }\n\n break\n case stateChangeTypes.MenuKeyDownEnter:\n case stateChangeTypes.MenuKeyDownSpaceButton:\n changes = {\n isOpen: getDefaultValue(props, 'isOpen'),\n highlightedIndex: getDefaultValue(props, 'highlightedIndex'),\n ...(state.highlightedIndex >= 0 && {\n selectedItem: props.items[state.highlightedIndex],\n }),\n }\n\n break\n case stateChangeTypes.MenuKeyDownHome:\n changes = {\n highlightedIndex: getNextNonDisabledIndex(\n 1,\n 0,\n props.items.length,\n action.getItemNodeFromIndex,\n false,\n ),\n }\n\n break\n case stateChangeTypes.MenuKeyDownEnd:\n changes = {\n highlightedIndex: getNextNonDisabledIndex(\n -1,\n props.items.length - 1,\n props.items.length,\n action.getItemNodeFromIndex,\n false,\n ),\n }\n\n break\n case stateChangeTypes.MenuKeyDownEscape:\n changes = {\n isOpen: false,\n highlightedIndex: -1,\n }\n\n break\n case stateChangeTypes.MenuBlur:\n changes = {\n isOpen: false,\n highlightedIndex: -1,\n }\n\n break\n case stateChangeTypes.MenuKeyDownCharacter:\n {\n const lowercasedKey = action.key\n const inputValue = `${state.inputValue}${lowercasedKey}`\n const highlightedIndex = getItemIndexByCharacterKey(\n inputValue,\n state.highlightedIndex,\n props.items,\n props.itemToString,\n action.getItemNodeFromIndex,\n )\n\n changes = {\n inputValue,\n ...(highlightedIndex >= 0 && {\n highlightedIndex,\n }),\n }\n }\n break\n case stateChangeTypes.MenuKeyDownArrowDown:\n changes = {\n highlightedIndex: getNextWrappingIndex(\n shiftKey ? 5 : 1,\n state.highlightedIndex,\n props.items.length,\n action.getItemNodeFromIndex,\n props.circularNavigation,\n ),\n }\n\n break\n case stateChangeTypes.MenuKeyDownArrowUp:\n changes = {\n highlightedIndex: getNextWrappingIndex(\n shiftKey ? -5 : -1,\n state.highlightedIndex,\n props.items.length,\n action.getItemNodeFromIndex,\n props.circularNavigation,\n ),\n }\n break\n\n case stateChangeTypes.FunctionSelectItem:\n changes = {\n selectedItem: action.selectedItem,\n }\n\n break\n default:\n return commonReducer(state, action)\n }\n\n return {\n ...state,\n ...changes,\n }\n}\n/* eslint-enable complexity */\n","/* eslint-disable max-statements */\nimport {useRef, useEffect, useCallback, useMemo} from 'react'\nimport {\n getItemIndex,\n isAcceptedCharacterKey,\n useControlledReducer,\n getInitialState,\n useMouseAndTouchTracker,\n useGetterPropsCalledChecker,\n useLatestRef,\n useA11yMessageSetter,\n useScrollIntoView,\n useControlPropsValidator,\n useElementIds,\n} from '../utils'\nimport {\n callAllEventHandlers,\n handleRefs,\n debounce,\n normalizeArrowKey,\n} from '../../utils'\nimport downshiftSelectReducer from './reducer'\nimport {validatePropTypes, defaultProps} from './utils'\nimport * as stateChangeTypes from './stateChangeTypes'\n\nuseSelect.stateChangeTypes = stateChangeTypes\n\nfunction useSelect(userProps = {}) {\n validatePropTypes(userProps, useSelect)\n // Props defaults and destructuring.\n const props = {\n ...defaultProps,\n ...userProps,\n }\n const {\n items,\n scrollIntoView,\n environment,\n initialIsOpen,\n defaultIsOpen,\n itemToString,\n getA11ySelectionMessage,\n getA11yStatusMessage,\n } = props\n // Initial state depending on controlled props.\n const initialState = getInitialState(props)\n const [state, dispatch] = useControlledReducer(\n downshiftSelectReducer,\n initialState,\n props,\n )\n const {isOpen, highlightedIndex, selectedItem, inputValue} = state\n\n // Element efs.\n const toggleButtonRef = useRef(null)\n const menuRef = useRef(null)\n const itemRefs = useRef()\n itemRefs.current = {}\n // used not to trigger menu blur action in some scenarios.\n const shouldBlurRef = useRef(true)\n // used to keep the inputValue clearTimeout object between renders.\n const clearTimeoutRef = useRef(null)\n // prevent id re-generation between renders.\n const elementIds = useElementIds(props)\n // used to keep track of how many items we had on previous cycle.\n const previousResultCountRef = useRef()\n const isInitialMountRef = useRef(true)\n // utility callback to get item element.\n const latest = useLatestRef({\n state,\n props,\n })\n\n // Some utils.\n const getItemNodeFromIndex = useCallback(\n index => itemRefs.current[elementIds.getItemId(index)],\n [elementIds],\n )\n\n // Effects.\n // Sets a11y status message on changes in state.\n useA11yMessageSetter(\n getA11yStatusMessage,\n [isOpen, highlightedIndex, inputValue, items],\n {\n isInitialMount: isInitialMountRef.current,\n previousResultCount: previousResultCountRef.current,\n items,\n environment,\n itemToString,\n ...state,\n },\n )\n // Sets a11y status message on changes in selectedItem.\n useA11yMessageSetter(getA11ySelectionMessage, [selectedItem], {\n isInitialMount: isInitialMountRef.current,\n previousResultCount: previousResultCountRef.current,\n items,\n environment,\n itemToString,\n ...state,\n })\n // Scroll on highlighted item if change comes from keyboard.\n const shouldScrollRef = useScrollIntoView({\n menuElement: menuRef.current,\n highlightedIndex,\n isOpen,\n itemRefs,\n scrollIntoView,\n getItemNodeFromIndex,\n })\n // Sets cleanup for the keysSoFar after 500ms.\n useEffect(() => {\n // init the clean function here as we need access to dispatch.\n if (isInitialMountRef.current) {\n clearTimeoutRef.current = debounce(outerDispatch => {\n outerDispatch({\n type: stateChangeTypes.FunctionSetInputValue,\n inputValue: '',\n })\n }, 500)\n }\n\n if (!inputValue) {\n return\n }\n clearTimeoutRef.current(dispatch)\n }, [dispatch, inputValue])\n useControlPropsValidator({\n isInitialMount: isInitialMountRef.current,\n props,\n state,\n })\n /* Controls the focus on the menu or the toggle button. */\n useEffect(() => {\n // Don't focus menu on first render.\n if (isInitialMountRef.current) {\n // Unless it was initialised as open.\n if ((initialIsOpen || defaultIsOpen || isOpen) && menuRef.current) {\n menuRef.current.focus()\n }\n return\n }\n // Focus menu on open.\n if (isOpen) {\n // istanbul ignore else\n if (menuRef.current) {\n menuRef.current.focus()\n }\n return\n }\n // Focus toggleButton on close, but not if it was closed with (Shift+)Tab.\n if (environment.document.activeElement === menuRef.current) {\n // istanbul ignore else\n if (toggleButtonRef.current) {\n shouldBlurRef.current = false\n toggleButtonRef.current.focus()\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen])\n useEffect(() => {\n if (isInitialMountRef.current) {\n return\n }\n\n previousResultCountRef.current = items.length\n })\n // Add mouse/touch events to document.\n const mouseAndTouchTrackersRef = useMouseAndTouchTracker(\n isOpen,\n [menuRef, toggleButtonRef],\n environment,\n () => {\n dispatch({\n type: stateChangeTypes.MenuBlur,\n })\n },\n )\n const setGetterPropCallInfo = useGetterPropsCalledChecker(\n 'getMenuProps',\n 'getToggleButtonProps',\n )\n // Make initial ref false.\n useEffect(() => {\n isInitialMountRef.current = false\n }, [])\n\n // Event handler functions.\n const toggleButtonKeyDownHandlers = useMemo(\n () => ({\n ArrowDown(event) {\n event.preventDefault()\n\n dispatch({\n type: stateChangeTypes.ToggleButtonKeyDownArrowDown,\n getItemNodeFromIndex,\n shiftKey: event.shiftKey,\n })\n },\n ArrowUp(event) {\n event.preventDefault()\n\n dispatch({\n type: stateChangeTypes.ToggleButtonKeyDownArrowUp,\n getItemNodeFromIndex,\n shiftKey: event.shiftKey,\n })\n },\n }),\n [dispatch, getItemNodeFromIndex],\n )\n const menuKeyDownHandlers = useMemo(\n () => ({\n ArrowDown(event) {\n event.preventDefault()\n\n dispatch({\n type: stateChangeTypes.MenuKeyDownArrowDown,\n getItemNodeFromIndex,\n shiftKey: event.shiftKey,\n })\n },\n ArrowUp(event) {\n event.preventDefault()\n\n dispatch({\n type: stateChangeTypes.MenuKeyDownArrowUp,\n getItemNodeFromIndex,\n shiftKey: event.shiftKey,\n })\n },\n Home(event) {\n event.preventDefault()\n\n dispatch({\n type: stateChangeTypes.MenuKeyDownHome,\n getItemNodeFromIndex,\n })\n },\n End(event) {\n event.preventDefault()\n\n dispatch({\n type: stateChangeTypes.MenuKeyDownEnd,\n getItemNodeFromIndex,\n })\n },\n Escape() {\n dispatch({\n type: stateChangeTypes.MenuKeyDownEscape,\n })\n },\n Enter(event) {\n event.preventDefault()\n\n dispatch({\n type: stateChangeTypes.MenuKeyDownEnter,\n })\n },\n ' '(event) {\n event.preventDefault()\n\n dispatch({\n type: stateChangeTypes.MenuKeyDownSpaceButton,\n })\n },\n }),\n [dispatch, getItemNodeFromIndex],\n )\n\n // Action functions.\n const toggleMenu = useCallback(() => {\n dispatch({\n type: stateChangeTypes.FunctionToggleMenu,\n })\n }, [dispatch])\n const closeMenu = useCallback(() => {\n dispatch({\n type: stateChangeTypes.FunctionCloseMenu,\n })\n }, [dispatch])\n const openMenu = useCallback(() => {\n dispatch({\n type: stateChangeTypes.FunctionOpenMenu,\n })\n }, [dispatch])\n const setHighlightedIndex = useCallback(\n newHighlightedIndex => {\n dispatch({\n type: stateChangeTypes.FunctionSetHighlightedIndex,\n highlightedIndex: newHighlightedIndex,\n })\n },\n [dispatch],\n )\n const selectItem = useCallback(\n newSelectedItem => {\n dispatch({\n type: stateChangeTypes.FunctionSelectItem,\n selectedItem: newSelectedItem,\n })\n },\n [dispatch],\n )\n const reset = useCallback(() => {\n dispatch({\n type: stateChangeTypes.FunctionReset,\n })\n }, [dispatch])\n const setInputValue = useCallback(\n newInputValue => {\n dispatch({\n type: stateChangeTypes.FunctionSetInputValue,\n inputValue: newInputValue,\n })\n },\n [dispatch],\n )\n // Getter functions.\n const getLabelProps = useCallback(\n labelProps => ({\n id: elementIds.labelId,\n htmlFor: elementIds.toggleButtonId,\n ...labelProps,\n }),\n [elementIds],\n )\n const getMenuProps = useCallback(\n (\n {onMouseLeave, refKey = 'ref', onKeyDown, onBlur, ref, ...rest} = {},\n {suppressRefError = false} = {},\n ) => {\n const latestState = latest.current.state\n const menuHandleKeyDown = event => {\n const key = normalizeArrowKey(event)\n if (key && menuKeyDownHandlers[key]) {\n menuKeyDownHandlers[key](event)\n } else if (isAcceptedCharacterKey(key)) {\n dispatch({\n type: stateChangeTypes.MenuKeyDownCharacter,\n key,\n getItemNodeFromIndex,\n })\n }\n }\n const menuHandleBlur = () => {\n // if the blur was a result of selection, we don't trigger this action.\n if (shouldBlurRef.current === false) {\n shouldBlurRef.current = true\n return\n }\n\n const shouldBlur = !mouseAndTouchTrackersRef.current.isMouseDown\n /* istanbul ignore else */\n if (shouldBlur) {\n dispatch({type: stateChangeTypes.MenuBlur})\n }\n }\n const menuHandleMouseLeave = () => {\n dispatch({\n type: stateChangeTypes.MenuMouseLeave,\n })\n }\n\n setGetterPropCallInfo('getMenuProps', suppressRefError, refKey, menuRef)\n\n return {\n [refKey]: handleRefs(ref, menuNode => {\n menuRef.current = menuNode\n }),\n id: elementIds.menuId,\n role: 'listbox',\n 'aria-labelledby': elementIds.labelId,\n tabIndex: -1,\n ...(latestState.isOpen &&\n latestState.highlightedIndex > -1 && {\n 'aria-activedescendant': elementIds.getItemId(\n latestState.highlightedIndex,\n ),\n }),\n onMouseLeave: callAllEventHandlers(onMouseLeave, menuHandleMouseLeave),\n onKeyDown: callAllEventHandlers(onKeyDown, menuHandleKeyDown),\n onBlur: callAllEventHandlers(onBlur, menuHandleBlur),\n ...rest,\n }\n },\n [\n dispatch,\n latest,\n menuKeyDownHandlers,\n mouseAndTouchTrackersRef,\n setGetterPropCallInfo,\n elementIds,\n getItemNodeFromIndex,\n ],\n )\n const getToggleButtonProps = useCallback(\n (\n {onClick, onKeyDown, refKey = 'ref', ref, ...rest} = {},\n {suppressRefError = false} = {},\n ) => {\n const toggleButtonHandleClick = () => {\n dispatch({\n type: stateChangeTypes.ToggleButtonClick,\n })\n }\n const toggleButtonHandleKeyDown = event => {\n const key = normalizeArrowKey(event)\n if (key && toggleButtonKeyDownHandlers[key]) {\n toggleButtonKeyDownHandlers[key](event)\n } else if (isAcceptedCharacterKey(key)) {\n dispatch({\n type: stateChangeTypes.ToggleButtonKeyDownCharacter,\n key,\n getItemNodeFromIndex,\n })\n }\n }\n const toggleProps = {\n [refKey]: handleRefs(ref, toggleButtonNode => {\n toggleButtonRef.current = toggleButtonNode\n }),\n id: elementIds.toggleButtonId,\n 'aria-haspopup': 'listbox',\n 'aria-expanded': latest.current.state.isOpen,\n 'aria-labelledby': `${elementIds.labelId} ${elementIds.toggleButtonId}`,\n ...rest,\n }\n\n if (!rest.disabled) {\n toggleProps.onClick = callAllEventHandlers(\n onClick,\n toggleButtonHandleClick,\n )\n toggleProps.onKeyDown = callAllEventHandlers(\n onKeyDown,\n toggleButtonHandleKeyDown,\n )\n }\n\n setGetterPropCallInfo(\n 'getToggleButtonProps',\n suppressRefError,\n refKey,\n toggleButtonRef,\n )\n\n return toggleProps\n },\n [\n dispatch,\n latest,\n toggleButtonKeyDownHandlers,\n setGetterPropCallInfo,\n elementIds,\n getItemNodeFromIndex,\n ],\n )\n const getItemProps = useCallback(\n ({\n item,\n index,\n onMouseMove,\n onClick,\n refKey = 'ref',\n ref,\n ...rest\n } = {}) => {\n const {state: latestState, props: latestProps} = latest.current\n const itemHandleMouseMove = () => {\n if (index === latestState.highlightedIndex) {\n return\n }\n shouldScrollRef.current = false\n dispatch({\n type: stateChangeTypes.ItemMouseMove,\n index,\n })\n }\n const itemHandleClick = () => {\n dispatch({\n type: stateChangeTypes.ItemClick,\n index,\n })\n }\n\n const itemIndex = getItemIndex(index, item, latestProps.items)\n if (itemIndex < 0) {\n throw new Error('Pass either item or item index in getItemProps!')\n }\n const itemProps = {\n role: 'option',\n 'aria-selected': `${itemIndex === latestState.highlightedIndex}`,\n id: elementIds.getItemId(itemIndex),\n [refKey]: handleRefs(ref, itemNode => {\n if (itemNode) {\n itemRefs.current[elementIds.getItemId(itemIndex)] = itemNode\n }\n }),\n ...rest,\n }\n\n if (!rest.disabled) {\n itemProps.onMouseMove = callAllEventHandlers(\n onMouseMove,\n itemHandleMouseMove,\n )\n itemProps.onClick = callAllEventHandlers(onClick, itemHandleClick)\n }\n\n return itemProps\n },\n [dispatch, latest, shouldScrollRef, elementIds],\n )\n\n return {\n // prop getters.\n getToggleButtonProps,\n getLabelProps,\n getMenuProps,\n getItemProps,\n // actions.\n toggleMenu,\n openMenu,\n closeMenu,\n setHighlightedIndex,\n selectItem,\n reset,\n setInputValue,\n // state.\n highlightedIndex,\n isOpen,\n selectedItem,\n inputValue,\n }\n}\n\nexport default useSelect\n","import {productionEnumFn} from '../stateChangeTypes'\n\nexport * from '../stateChangeTypes'\n\nexport const InputKeyDownArrowDown = productionEnumFn(\n '__input_keydown_arrow_down__',\n)\nexport const InputKeyDownArrowUp = productionEnumFn('__input_keydown_arrow_up__')\nexport const InputKeyDownEscape = productionEnumFn('__input_keydown_escape__')\nexport const InputKeyDownHome = productionEnumFn('__input_keydown_home__')\nexport const InputKeyDownEnd = productionEnumFn('__input_keydown_end__')\nexport const InputKeyDownEnter = productionEnumFn('__input_keydown_enter__')\nexport const InputChange = productionEnumFn('__input_change__')\nexport const InputBlur = productionEnumFn('__input_blur__')\nexport const ControlledPropUpdatedSelectedItem = productionEnumFn(\n '__controlled_prop_updated_selected_item__',\n)\n","import {useRef, useEffect} from 'react'\nimport PropTypes from 'prop-types'\nimport {\n getA11yStatusMessage,\n isControlledProp,\n getState,\n noop,\n} from '../../utils'\nimport {\n defaultProps as defaultPropsCommon,\n getInitialState as getInitialStateCommon,\n useEnhancedReducer,\n} from '../utils'\nimport {ControlledPropUpdatedSelectedItem} from './stateChangeTypes'\n\nfunction getInitialState(props) {\n const initialState = getInitialStateCommon(props)\n const {selectedItem} = initialState\n let {inputValue} = initialState\n\n if (\n inputValue === '' &&\n selectedItem &&\n props.defaultInputValue === undefined &&\n props.initialInputValue === undefined &&\n props.inputValue === undefined\n ) {\n inputValue = props.itemToString(selectedItem)\n }\n\n return {\n ...initialState,\n inputValue,\n }\n}\n\nconst propTypes = {\n items: PropTypes.array.isRequired,\n itemToString: PropTypes.func,\n getA11yStatusMessage: PropTypes.func,\n getA11ySelectionMessage: PropTypes.func,\n circularNavigation: PropTypes.bool,\n highlightedIndex: PropTypes.number,\n defaultHighlightedIndex: PropTypes.number,\n initialHighlightedIndex: PropTypes.number,\n isOpen: PropTypes.bool,\n defaultIsOpen: PropTypes.bool,\n initialIsOpen: PropTypes.bool,\n selectedItem: PropTypes.any,\n initialSelectedItem: PropTypes.any,\n defaultSelectedItem: PropTypes.any,\n inputValue: PropTypes.string,\n defaultInputValue: PropTypes.string,\n initialInputValue: PropTypes.string,\n id: PropTypes.string,\n labelId: PropTypes.string,\n menuId: PropTypes.string,\n getItemId: PropTypes.func,\n inputId: PropTypes.string,\n toggleButtonId: PropTypes.string,\n stateReducer: PropTypes.func,\n onSelectedItemChange: PropTypes.func,\n onHighlightedIndexChange: PropTypes.func,\n onStateChange: PropTypes.func,\n onIsOpenChange: PropTypes.func,\n onInputValueChange: PropTypes.func,\n environment: PropTypes.shape({\n addEventListener: PropTypes.func,\n removeEventListener: PropTypes.func,\n document: PropTypes.shape({\n getElementById: PropTypes.func,\n activeElement: PropTypes.any,\n body: PropTypes.any,\n }),\n }),\n}\n\n/**\n * The useCombobox version of useControlledReducer, which also\n * checks if the controlled prop selectedItem changed between\n * renders. If so, it will also update inputValue with its\n * string equivalent. It uses the common useEnhancedReducer to\n * compute the rest of the state.\n *\n * @param {Function} reducer Reducer function from downshift.\n * @param {Object} initialState Initial state of the hook.\n * @param {Object} props The hook props.\n * @returns {Array} An array with the state and an action dispatcher.\n */\nfunction useControlledReducer(reducer, initialState, props) {\n const previousSelectedItemRef = useRef()\n const [state, dispatch] = useEnhancedReducer(reducer, initialState, props)\n\n // ToDo: if needed, make same approach as selectedItemChanged from Downshift.\n useEffect(() => {\n if (isControlledProp(props, 'selectedItem')) {\n if (previousSelectedItemRef.current !== props.selectedItem) {\n dispatch({\n type: ControlledPropUpdatedSelectedItem,\n inputValue: props.itemToString(props.selectedItem),\n })\n }\n\n previousSelectedItemRef.current =\n state.selectedItem === previousSelectedItemRef.current\n ? props.selectedItem\n : state.selectedItem\n }\n })\n\n return [getState(state, props), dispatch]\n}\n\n// eslint-disable-next-line import/no-mutable-exports\nlet validatePropTypes = noop\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n validatePropTypes = (options, caller) => {\n PropTypes.checkPropTypes(propTypes, options, 'prop', caller.name)\n }\n}\n\nconst defaultProps = {\n ...defaultPropsCommon,\n getA11yStatusMessage,\n circularNavigation: true,\n}\n\nexport {validatePropTypes, useControlledReducer, getInitialState, defaultProps}\n","import {getHighlightedIndexOnOpen, getDefaultValue} from '../utils'\nimport {getNextWrappingIndex, getNextNonDisabledIndex} from '../../utils'\nimport commonReducer from '../reducer'\nimport * as stateChangeTypes from './stateChangeTypes'\n\n/* eslint-disable complexity */\nexport default function downshiftUseComboboxReducer(state, action) {\n const {type, props, shiftKey} = action\n let changes\n\n switch (type) {\n case stateChangeTypes.ItemClick:\n changes = {\n isOpen: getDefaultValue(props, 'isOpen'),\n highlightedIndex: getDefaultValue(props, 'highlightedIndex'),\n selectedItem: props.items[action.index],\n inputValue: props.itemToString(props.items[action.index]),\n }\n break\n case stateChangeTypes.InputKeyDownArrowDown:\n if (state.isOpen) {\n changes = {\n highlightedIndex: getNextWrappingIndex(\n shiftKey ? 5 : 1,\n state.highlightedIndex,\n props.items.length,\n action.getItemNodeFromIndex,\n props.circularNavigation,\n ),\n }\n } else {\n changes = {\n highlightedIndex: getHighlightedIndexOnOpen(\n props,\n state,\n 1,\n action.getItemNodeFromIndex,\n ),\n isOpen: true,\n }\n }\n break\n case stateChangeTypes.InputKeyDownArrowUp:\n if (state.isOpen) {\n changes = {\n highlightedIndex: getNextWrappingIndex(\n shiftKey ? -5 : -1,\n state.highlightedIndex,\n props.items.length,\n action.getItemNodeFromIndex,\n props.circularNavigation,\n ),\n }\n } else {\n changes = {\n highlightedIndex: getHighlightedIndexOnOpen(\n props,\n state,\n -1,\n action.getItemNodeFromIndex,\n ),\n isOpen: true,\n }\n }\n break\n case stateChangeTypes.InputKeyDownEnter:\n changes = {\n ...(state.isOpen &&\n state.highlightedIndex >= 0 && {\n selectedItem: props.items[state.highlightedIndex],\n isOpen: getDefaultValue(props, 'isOpen'),\n highlightedIndex: getDefaultValue(props, 'highlightedIndex'),\n inputValue: props.itemToString(props.items[state.highlightedIndex]),\n }),\n }\n break\n case stateChangeTypes.InputKeyDownEscape:\n changes = {\n isOpen: false,\n highlightedIndex: -1,\n ...(!state.isOpen && {\n selectedItem: null,\n inputValue: '',\n }),\n }\n break\n case stateChangeTypes.InputKeyDownHome:\n changes = {\n ...(state.isOpen && {\n highlightedIndex: getNextNonDisabledIndex(\n 1,\n 0,\n props.items.length,\n action.getItemNodeFromIndex,\n false,\n ),\n }),\n }\n break\n case stateChangeTypes.InputKeyDownEnd:\n changes = {\n ...(state.isOpen && {\n highlightedIndex: getNextNonDisabledIndex(\n -1,\n props.items.length - 1,\n props.items.length,\n action.getItemNodeFromIndex,\n false,\n ),\n }),\n }\n break\n case stateChangeTypes.InputBlur:\n if (state.isOpen) {\n changes = {\n isOpen: false,\n highlightedIndex: -1,\n ...(state.highlightedIndex >= 0 &&\n action.selectItem && {\n selectedItem: props.items[state.highlightedIndex],\n inputValue: props.itemToString(\n props.items[state.highlightedIndex],\n ),\n }),\n }\n }\n break\n case stateChangeTypes.InputChange:\n changes = {\n isOpen: true,\n highlightedIndex: getDefaultValue(props, 'highlightedIndex'),\n inputValue: action.inputValue,\n }\n break\n case stateChangeTypes.FunctionSelectItem:\n changes = {\n selectedItem: action.selectedItem,\n inputValue: props.itemToString(action.selectedItem),\n }\n break\n case stateChangeTypes.ControlledPropUpdatedSelectedItem:\n changes = {\n inputValue: action.inputValue,\n }\n break\n default:\n return commonReducer(state, action)\n }\n\n return {\n ...state,\n ...changes,\n }\n}\n/* eslint-enable complexity */\n","/* eslint-disable max-statements */\nimport {useRef, useEffect, useCallback, useMemo} from 'react'\nimport {isPreact, isReactNative} from '../../is.macro'\nimport {handleRefs, normalizeArrowKey, callAllEventHandlers} from '../../utils'\nimport {\n getItemIndex,\n useA11yMessageSetter,\n useMouseAndTouchTracker,\n useGetterPropsCalledChecker,\n useLatestRef,\n useScrollIntoView,\n useControlPropsValidator,\n useElementIds,\n} from '../utils'\nimport {\n getInitialState,\n defaultProps,\n useControlledReducer,\n validatePropTypes,\n} from './utils'\nimport downshiftUseComboboxReducer from './reducer'\nimport * as stateChangeTypes from './stateChangeTypes'\n\nuseCombobox.stateChangeTypes = stateChangeTypes\n\nfunction useCombobox(userProps = {}) {\n validatePropTypes(userProps, useCombobox)\n // Props defaults and destructuring.\n const props = {\n ...defaultProps,\n ...userProps,\n }\n const {\n initialIsOpen,\n defaultIsOpen,\n items,\n scrollIntoView,\n environment,\n getA11yStatusMessage,\n getA11ySelectionMessage,\n itemToString,\n } = props\n // Initial state depending on controlled props.\n const initialState = getInitialState(props)\n const [state, dispatch] = useControlledReducer(\n downshiftUseComboboxReducer,\n initialState,\n props,\n )\n const {isOpen, highlightedIndex, selectedItem, inputValue} = state\n\n // Element refs.\n const menuRef = useRef(null)\n const itemRefs = useRef()\n const inputRef = useRef(null)\n const toggleButtonRef = useRef(null)\n const comboboxRef = useRef(null)\n itemRefs.current = {}\n const isInitialMountRef = useRef(true)\n // prevent id re-generation between renders.\n const elementIds = useElementIds(props)\n // used to keep track of how many items we had on previous cycle.\n const previousResultCountRef = useRef()\n // utility callback to get item element.\n const latest = useLatestRef({state, props})\n\n const getItemNodeFromIndex = useCallback(\n index => itemRefs.current[elementIds.getItemId(index)],\n [elementIds],\n )\n\n // Effects.\n // Sets a11y status message on changes in state.\n useA11yMessageSetter(\n getA11yStatusMessage,\n [isOpen, highlightedIndex, inputValue, items],\n {\n isInitialMount: isInitialMountRef.current,\n previousResultCount: previousResultCountRef.current,\n items,\n environment,\n itemToString,\n ...state,\n },\n )\n // Sets a11y status message on changes in selectedItem.\n useA11yMessageSetter(getA11ySelectionMessage, [selectedItem], {\n isInitialMount: isInitialMountRef.current,\n previousResultCount: previousResultCountRef.current,\n items,\n environment,\n itemToString,\n ...state,\n })\n // Scroll on highlighted item if change comes from keyboard.\n const shouldScrollRef = useScrollIntoView({\n menuElement: menuRef.current,\n highlightedIndex,\n isOpen,\n itemRefs,\n scrollIntoView,\n getItemNodeFromIndex,\n })\n useControlPropsValidator({\n isInitialMount: isInitialMountRef.current,\n props,\n state,\n })\n // Focus the input on first render if required.\n useEffect(() => {\n const focusOnOpen = initialIsOpen || defaultIsOpen || isOpen\n\n if (focusOnOpen && inputRef.current) {\n inputRef.current.focus()\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n useEffect(() => {\n if (isInitialMountRef.current) {\n return\n }\n\n previousResultCountRef.current = items.length\n })\n // Add mouse/touch events to document.\n const mouseAndTouchTrackersRef = useMouseAndTouchTracker(\n isOpen,\n [comboboxRef, menuRef, toggleButtonRef],\n environment,\n () => {\n dispatch({\n type: stateChangeTypes.InputBlur,\n selectItem: false,\n })\n },\n )\n const setGetterPropCallInfo = useGetterPropsCalledChecker(\n 'getInputProps',\n 'getComboboxProps',\n 'getMenuProps',\n )\n // Make initial ref false.\n useEffect(() => {\n isInitialMountRef.current = false\n }, [])\n\n /* Event handler functions */\n const inputKeyDownHandlers = useMemo(\n () => ({\n ArrowDown(event) {\n event.preventDefault()\n dispatch({\n type: stateChangeTypes.InputKeyDownArrowDown,\n shiftKey: event.shiftKey,\n getItemNodeFromIndex,\n })\n },\n ArrowUp(event) {\n event.preventDefault()\n dispatch({\n type: stateChangeTypes.InputKeyDownArrowUp,\n shiftKey: event.shiftKey,\n getItemNodeFromIndex,\n })\n },\n Home(event) {\n event.preventDefault()\n dispatch({\n type: stateChangeTypes.InputKeyDownHome,\n getItemNodeFromIndex,\n })\n },\n End(event) {\n event.preventDefault()\n dispatch({\n type: stateChangeTypes.InputKeyDownEnd,\n getItemNodeFromIndex,\n })\n },\n Escape() {\n dispatch({\n type: stateChangeTypes.InputKeyDownEscape,\n })\n },\n Enter(event) {\n // if IME composing, wait for next Enter keydown event.\n if (event.which === 229) {\n return\n }\n const latestState = latest.current.state\n\n if (latestState.isOpen) {\n event.preventDefault()\n }\n\n dispatch({\n type: stateChangeTypes.InputKeyDownEnter,\n getItemNodeFromIndex,\n })\n },\n }),\n [dispatch, latest, getItemNodeFromIndex],\n )\n\n // Getter props.\n const getLabelProps = useCallback(\n labelProps => ({\n id: elementIds.labelId,\n htmlFor: elementIds.inputId,\n ...labelProps,\n }),\n [elementIds],\n )\n const getMenuProps = useCallback(\n (\n {onMouseLeave, refKey = 'ref', ref, ...rest} = {},\n {suppressRefError = false} = {},\n ) => {\n setGetterPropCallInfo('getMenuProps', suppressRefError, refKey, menuRef)\n return {\n [refKey]: handleRefs(ref, menuNode => {\n menuRef.current = menuNode\n }),\n id: elementIds.menuId,\n role: 'listbox',\n 'aria-labelledby': elementIds.labelId,\n onMouseLeave: callAllEventHandlers(onMouseLeave, () => {\n dispatch({\n type: stateChangeTypes.MenuMouseLeave,\n })\n }),\n ...rest,\n }\n },\n [dispatch, setGetterPropCallInfo, elementIds],\n )\n\n const getItemProps = useCallback(\n ({\n item,\n index,\n refKey = 'ref',\n ref,\n onMouseMove,\n onClick,\n onPress,\n ...rest\n } = {}) => {\n const {props: latestProps, state: latestState} = latest.current\n const itemIndex = getItemIndex(index, item, latestProps.items)\n if (itemIndex < 0) {\n throw new Error('Pass either item or item index in getItemProps!')\n }\n\n const onSelectKey = isReactNative\n ? /* istanbul ignore next (react-native) */ 'onPress'\n : 'onClick'\n const customClickHandler = isReactNative\n ? /* istanbul ignore next (react-native) */ onPress\n : onClick\n\n const itemHandleMouseMove = () => {\n if (index === latestState.highlightedIndex) {\n return\n }\n shouldScrollRef.current = false\n dispatch({\n type: stateChangeTypes.ItemMouseMove,\n index,\n })\n }\n const itemHandleClick = () => {\n dispatch({\n type: stateChangeTypes.ItemClick,\n index,\n })\n\n if (inputRef.current) {\n inputRef.current.focus()\n }\n }\n\n return {\n [refKey]: handleRefs(ref, itemNode => {\n if (itemNode) {\n itemRefs.current[elementIds.getItemId(itemIndex)] = itemNode\n }\n }),\n role: 'option',\n 'aria-selected': `${itemIndex === latestState.highlightedIndex}`,\n id: elementIds.getItemId(itemIndex),\n ...(!rest.disabled && {\n onMouseMove: callAllEventHandlers(onMouseMove, itemHandleMouseMove),\n [onSelectKey]: callAllEventHandlers(\n customClickHandler,\n itemHandleClick,\n ),\n }),\n ...rest,\n }\n },\n [dispatch, latest, shouldScrollRef, elementIds],\n )\n\n const getToggleButtonProps = useCallback(\n ({onClick, onPress, refKey = 'ref', ref, ...rest} = {}) => {\n const toggleButtonHandleClick = () => {\n dispatch({\n type: stateChangeTypes.ToggleButtonClick,\n })\n\n if (!latest.current.state.isOpen && inputRef.current) {\n inputRef.current.focus()\n }\n }\n\n return {\n [refKey]: handleRefs(ref, toggleButtonNode => {\n toggleButtonRef.current = toggleButtonNode\n }),\n id: elementIds.toggleButtonId,\n tabIndex: -1,\n ...(!rest.disabled && {\n ...(isReactNative\n ? /* istanbul ignore next (react-native) */ {\n onPress: callAllEventHandlers(onPress, toggleButtonHandleClick),\n }\n : {\n onClick: callAllEventHandlers(onClick, toggleButtonHandleClick),\n }),\n }),\n ...rest,\n }\n },\n [dispatch, latest, elementIds],\n )\n const getInputProps = useCallback(\n (\n {\n onKeyDown,\n onChange,\n onInput,\n onBlur,\n onChangeText,\n refKey = 'ref',\n ref,\n ...rest\n } = {},\n {suppressRefError = false} = {},\n ) => {\n setGetterPropCallInfo('getInputProps', suppressRefError, refKey, inputRef)\n\n const latestState = latest.current.state\n const inputHandleKeyDown = event => {\n const key = normalizeArrowKey(event)\n if (key && inputKeyDownHandlers[key]) {\n inputKeyDownHandlers[key](event)\n }\n }\n const inputHandleChange = event => {\n dispatch({\n type: stateChangeTypes.InputChange,\n inputValue: isReactNative\n ? /* istanbul ignore next (react-native) */ event.nativeEvent.text\n : event.target.value,\n })\n }\n const inputHandleBlur = () => {\n /* istanbul ignore else */\n if (!mouseAndTouchTrackersRef.current.isMouseDown) {\n dispatch({\n type: stateChangeTypes.InputBlur,\n selectItem: true,\n })\n }\n }\n\n /* istanbul ignore next (preact) */\n const onChangeKey = isPreact ? 'onInput' : 'onChange'\n let eventHandlers = {}\n\n if (!rest.disabled) {\n eventHandlers = {\n [onChangeKey]: callAllEventHandlers(\n onChange,\n onInput,\n inputHandleChange,\n ),\n onKeyDown: callAllEventHandlers(onKeyDown, inputHandleKeyDown),\n onBlur: callAllEventHandlers(onBlur, inputHandleBlur),\n }\n }\n\n /* istanbul ignore if (react-native) */\n if (isReactNative) {\n eventHandlers.onChange = callAllEventHandlers(\n onChange,\n onInput,\n inputHandleChange,\n )\n eventHandlers.onChangeText = callAllEventHandlers(\n onChangeText,\n onInput,\n text => {\n inputHandleChange({nativeEvent: {text}})\n },\n )\n }\n\n return {\n [refKey]: handleRefs(ref, inputNode => {\n inputRef.current = inputNode\n }),\n id: elementIds.inputId,\n 'aria-autocomplete': 'list',\n 'aria-controls': elementIds.menuId,\n ...(latestState.isOpen &&\n latestState.highlightedIndex > -1 && {\n 'aria-activedescendant': elementIds.getItemId(\n latestState.highlightedIndex,\n ),\n }),\n 'aria-labelledby': elementIds.labelId,\n // https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion\n // revert back since autocomplete=\"nope\" is ignored on latest Chrome and Opera\n autoComplete: 'off',\n value: latestState.inputValue,\n ...eventHandlers,\n ...rest,\n }\n },\n [\n dispatch,\n inputKeyDownHandlers,\n latest,\n mouseAndTouchTrackersRef,\n setGetterPropCallInfo,\n elementIds,\n ],\n )\n const getComboboxProps = useCallback(\n ({refKey = 'ref', ref, ...rest} = {}, {suppressRefError = false} = {}) => {\n setGetterPropCallInfo(\n 'getComboboxProps',\n suppressRefError,\n refKey,\n comboboxRef,\n )\n\n return {\n [refKey]: handleRefs(ref, comboboxNode => {\n comboboxRef.current = comboboxNode\n }),\n role: 'combobox',\n 'aria-haspopup': 'listbox',\n 'aria-owns': elementIds.menuId,\n 'aria-expanded': latest.current.state.isOpen,\n ...rest,\n }\n },\n [latest, setGetterPropCallInfo, elementIds],\n )\n\n // returns\n const toggleMenu = useCallback(() => {\n dispatch({\n type: stateChangeTypes.FunctionToggleMenu,\n })\n }, [dispatch])\n const closeMenu = useCallback(() => {\n dispatch({\n type: stateChangeTypes.FunctionCloseMenu,\n })\n }, [dispatch])\n const openMenu = useCallback(() => {\n dispatch({\n type: stateChangeTypes.FunctionOpenMenu,\n })\n }, [dispatch])\n const setHighlightedIndex = useCallback(\n newHighlightedIndex => {\n dispatch({\n type: stateChangeTypes.FunctionSetHighlightedIndex,\n highlightedIndex: newHighlightedIndex,\n })\n },\n [dispatch],\n )\n const selectItem = useCallback(\n newSelectedItem => {\n dispatch({\n type: stateChangeTypes.FunctionSelectItem,\n selectedItem: newSelectedItem,\n })\n },\n [dispatch],\n )\n const setInputValue = useCallback(\n newInputValue => {\n dispatch({\n type: stateChangeTypes.FunctionSetInputValue,\n inputValue: newInputValue,\n })\n },\n [dispatch],\n )\n const reset = useCallback(() => {\n dispatch({\n type: stateChangeTypes.FunctionReset,\n })\n }, [dispatch])\n\n return {\n // prop getters.\n getItemProps,\n getLabelProps,\n getMenuProps,\n getInputProps,\n getComboboxProps,\n getToggleButtonProps,\n // actions.\n toggleMenu,\n openMenu,\n closeMenu,\n setHighlightedIndex,\n setInputValue,\n selectItem,\n reset,\n // state.\n highlightedIndex,\n isOpen,\n selectedItem,\n inputValue,\n }\n}\n\nexport default useCombobox\n","import PropTypes from 'prop-types'\nimport {\n getInitialValue as getInitialValueCommon,\n getDefaultValue as getDefaultValueCommon,\n defaultProps as defaultPropsCommon,\n} from '../utils'\nimport {noop} from '../../utils'\n\nconst defaultStateValues = {\n activeIndex: -1,\n selectedItems: [],\n}\n\n/**\n * Returns the initial value for a state key in the following order:\n * 1. controlled prop, 2. initial prop, 3. default prop, 4. default\n * value from Downshift.\n *\n * @param {Object} props Props passed to the hook.\n * @param {string} propKey Props key to generate the value for.\n * @returns {any} The initial value for that prop.\n */\nfunction getInitialValue(props, propKey) {\n return getInitialValueCommon(props, propKey, defaultStateValues)\n}\n\n/**\n * Returns the default value for a state key in the following order:\n * 1. controlled prop, 2. default prop, 3. default value from Downshift.\n *\n * @param {Object} props Props passed to the hook.\n * @param {string} propKey Props key to generate the value for.\n * @returns {any} The initial value for that prop.\n */\nfunction getDefaultValue(props, propKey) {\n return getDefaultValueCommon(props, propKey, defaultStateValues)\n}\n\n/**\n * Gets the initial state based on the provided props. It uses initial, default\n * and controlled props related to state in order to compute the initial value.\n *\n * @param {Object} props Props passed to the hook.\n * @returns {Object} The initial state.\n */\nfunction getInitialState(props) {\n const activeIndex = getInitialValue(props, 'activeIndex')\n const selectedItems = getInitialValue(props, 'selectedItems')\n\n return {\n activeIndex,\n selectedItems,\n }\n}\n\n/**\n * Returns true if dropdown keydown operation is permitted. Should not be\n * allowed on keydown with modifier keys (ctrl, alt, shift, meta), on\n * input element with text content that is either highlighted or selection\n * cursor is not at the starting position.\n *\n * @param {KeyboardEvent} event The event from keydown.\n * @returns {boolean} Whether the operation is allowed.\n */\nfunction isKeyDownOperationPermitted(event) {\n if (event.shiftKey || event.metaKey || event.ctrlKey || event.altKey) {\n return false\n }\n\n const element = event.target\n\n if (\n element instanceof HTMLInputElement && // if element is a text input\n element.value !== '' && // and we have text in it\n // and cursor is either not at the start or is currently highlighting text.\n (element.selectionStart !== 0 || element.selectionEnd !== 0)\n ) {\n return false\n }\n\n return true\n}\n\n/**\n * Returns a message to be added to aria-live region when item is removed.\n *\n * @param {Object} selectionParameters Parameters required to build the message.\n * @returns {string} The a11y message.\n */\nfunction getA11yRemovalMessage(selectionParameters) {\n const {\n removedSelectedItem,\n itemToString: itemToStringLocal,\n } = selectionParameters\n\n return `${itemToStringLocal(removedSelectedItem)} has been removed.`\n}\n\nconst propTypes = {\n selectedItems: PropTypes.array,\n initialSelectedItems: PropTypes.array,\n defaultSelectedItems: PropTypes.array,\n itemToString: PropTypes.func,\n getA11yRemovalMessage: PropTypes.func,\n stateReducer: PropTypes.func,\n activeIndex: PropTypes.number,\n initialActiveIndex: PropTypes.number,\n defaultActiveIndex: PropTypes.number,\n onActiveIndexChange: PropTypes.func,\n onSelectedItemsChange: PropTypes.func,\n keyNavigationNext: PropTypes.string,\n keyNavigationPrevious: PropTypes.string,\n environment: PropTypes.shape({\n addEventListener: PropTypes.func,\n removeEventListener: PropTypes.func,\n document: PropTypes.shape({\n getElementById: PropTypes.func,\n activeElement: PropTypes.any,\n body: PropTypes.any,\n }),\n }),\n}\n\nexport const defaultProps = {\n itemToString: defaultPropsCommon.itemToString,\n stateReducer: defaultPropsCommon.stateReducer,\n environment: defaultPropsCommon.environment,\n getA11yRemovalMessage,\n keyNavigationNext: 'ArrowRight',\n keyNavigationPrevious: 'ArrowLeft',\n}\n\n// eslint-disable-next-line import/no-mutable-exports\nlet validatePropTypes = noop\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n validatePropTypes = (options, caller) => {\n PropTypes.checkPropTypes(propTypes, options, 'prop', caller.name)\n }\n}\n\nexport {\n validatePropTypes,\n getDefaultValue,\n getInitialState,\n isKeyDownOperationPermitted,\n}\n","import productionEnum from '../../productionEnum.macro'\n\nexport const SelectedItemClick = productionEnum('__selected_item_click__')\nexport const SelectedItemKeyDownDelete = productionEnum(\n '__selected_item_keydown_delete__',\n)\nexport const SelectedItemKeyDownBackspace = productionEnum(\n '__selected_item_keydown_backspace__',\n)\nexport const SelectedItemKeyDownNavigationNext = productionEnum(\n '__selected_item_keydown_navigation_next__',\n)\nexport const SelectedItemKeyDownNavigationPrevious = productionEnum(\n '__selected_item_keydown_navigation_previous__',\n)\n\nexport const DropdownKeyDownNavigationPrevious = productionEnum(\n '__dropdown_keydown_navigation_previous__',\n)\nexport const DropdownKeyDownBackspace = productionEnum(\n '__dropdown_keydown_backspace__',\n)\nexport const DropdownClick = productionEnum('__dropdown_click__')\n\nexport const FunctionAddSelectedItem = productionEnum(\n '__function_add_selected_item__',\n)\nexport const FunctionRemoveSelectedItem = productionEnum(\n '__function_remove_selected_item__',\n)\nexport const FunctionSetSelectedItems = productionEnum(\n '__function_set_selected_items__',\n)\nexport const FunctionSetActiveIndex = productionEnum(\n '__function_set_active_index__',\n)\nexport const FunctionReset = productionEnum('__function_reset__')\n","import {getDefaultValue} from './utils'\nimport * as stateChangeTypes from './stateChangeTypes'\n\n/* eslint-disable complexity */\nexport default function downshiftMultipleSelectionReducer(state, action) {\n const {type, index, props, selectedItem} = action\n const {activeIndex, selectedItems} = state\n let changes\n\n switch (type) {\n case stateChangeTypes.SelectedItemClick:\n changes = {\n activeIndex: index,\n }\n\n break\n case stateChangeTypes.SelectedItemKeyDownNavigationPrevious:\n changes = {\n activeIndex: activeIndex - 1 < 0 ? 0 : activeIndex - 1,\n }\n\n break\n case stateChangeTypes.SelectedItemKeyDownNavigationNext:\n changes = {\n activeIndex:\n activeIndex + 1 >= selectedItems.length ? -1 : activeIndex + 1,\n }\n\n break\n case stateChangeTypes.SelectedItemKeyDownBackspace:\n case stateChangeTypes.SelectedItemKeyDownDelete: {\n let newActiveIndex = activeIndex\n\n if (selectedItems.length === 1) {\n newActiveIndex = -1\n } else if (activeIndex === selectedItems.length - 1) {\n newActiveIndex = selectedItems.length - 2\n }\n\n changes = {\n selectedItems: [\n ...selectedItems.slice(0, activeIndex),\n ...selectedItems.slice(activeIndex + 1),\n ],\n ...{activeIndex: newActiveIndex},\n }\n\n break\n }\n case stateChangeTypes.DropdownKeyDownNavigationPrevious:\n changes = {\n activeIndex: selectedItems.length - 1,\n }\n break\n case stateChangeTypes.DropdownKeyDownBackspace:\n changes = {\n selectedItems: selectedItems.slice(0, selectedItems.length - 1),\n }\n break\n case stateChangeTypes.FunctionAddSelectedItem:\n changes = {\n selectedItems: [...selectedItems, selectedItem],\n }\n break\n case stateChangeTypes.DropdownClick:\n changes = {\n activeIndex: -1,\n }\n break\n case stateChangeTypes.FunctionRemoveSelectedItem: {\n let newActiveIndex = activeIndex\n const selectedItemIndex = selectedItems.indexOf(selectedItem)\n\n if (selectedItems.length === 1) {\n newActiveIndex = -1\n } else if (selectedItemIndex === selectedItems.length - 1) {\n newActiveIndex = selectedItems.length - 2\n }\n\n changes = {\n selectedItems: [\n ...selectedItems.slice(0, selectedItemIndex),\n ...selectedItems.slice(selectedItemIndex + 1),\n ],\n ...{activeIndex: newActiveIndex},\n }\n break\n }\n case stateChangeTypes.FunctionSetSelectedItems: {\n const {selectedItems: newSelectedItems} = action\n changes = {\n selectedItems: newSelectedItems,\n }\n break\n }\n case stateChangeTypes.FunctionSetActiveIndex: {\n const {activeIndex: newActiveIndex} = action\n changes = {\n activeIndex: newActiveIndex,\n }\n break\n }\n case stateChangeTypes.FunctionReset:\n changes = {\n activeIndex: getDefaultValue(props, 'activeIndex'),\n selectedItems: getDefaultValue(props, 'selectedItems'),\n }\n break\n default:\n throw new Error('Reducer called without proper action type.')\n }\n\n return {\n ...state,\n ...changes,\n }\n}\n","import {useRef, useEffect, useCallback, useMemo} from 'react'\nimport setStatus from '../../set-a11y-status'\nimport {handleRefs, callAllEventHandlers, normalizeArrowKey} from '../../utils'\nimport {\n useControlledReducer,\n getItemIndex,\n useGetterPropsCalledChecker,\n useLatestRef,\n useControlPropsValidator,\n} from '../utils'\nimport {\n getInitialState,\n defaultProps,\n isKeyDownOperationPermitted,\n validatePropTypes\n} from './utils'\nimport downshiftMultipleSelectionReducer from './reducer'\nimport * as stateChangeTypes from './stateChangeTypes'\n\nuseMultipleSelection.stateChangeTypes = stateChangeTypes\n\nfunction useMultipleSelection(userProps = {}) {\n validatePropTypes(userProps, useMultipleSelection)\n // Props defaults and destructuring.\n const props = {\n ...defaultProps,\n ...userProps,\n }\n const {\n getA11yRemovalMessage,\n itemToString,\n environment,\n keyNavigationNext,\n keyNavigationPrevious,\n } = props\n\n // Reducer init.\n const [state, dispatch] = useControlledReducer(\n downshiftMultipleSelectionReducer,\n getInitialState(props),\n props,\n )\n const {activeIndex, selectedItems} = state\n\n // Refs.\n const isInitialMountRef = useRef(true)\n const dropdownRef = useRef(null)\n const previousSelectedItemsRef = useRef(selectedItems)\n const selectedItemRefs = useRef()\n selectedItemRefs.current = []\n const latest = useLatestRef({state, props})\n\n // Effects.\n /* Sets a11y status message on changes in selectedItem. */\n useEffect(() => {\n if (isInitialMountRef.current) {\n return\n }\n\n if (selectedItems.length < previousSelectedItemsRef.current.length) {\n const removedSelectedItem = previousSelectedItemsRef.current.find(\n item => selectedItems.indexOf(item) < 0,\n )\n\n setStatus(\n getA11yRemovalMessage({\n itemToString,\n resultCount: selectedItems.length,\n removedSelectedItem,\n activeIndex,\n activeSelectedItem: selectedItems[activeIndex],\n }),\n environment.document,\n )\n }\n\n previousSelectedItemsRef.current = selectedItems\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedItems.length])\n // Sets focus on active item.\n useEffect(() => {\n if (isInitialMountRef.current) {\n return\n }\n\n if (activeIndex === -1 && dropdownRef.current) {\n dropdownRef.current.focus()\n } else if (selectedItemRefs.current[activeIndex]) {\n selectedItemRefs.current[activeIndex].focus()\n }\n }, [activeIndex])\n useControlPropsValidator({\n isInitialMount: isInitialMountRef.current,\n props,\n state,\n })\n const setGetterPropCallInfo = useGetterPropsCalledChecker('getDropdownProps')\n // Make initial ref false.\n useEffect(() => {\n isInitialMountRef.current = false\n }, [])\n\n // Event handler functions.\n const selectedItemKeyDownHandlers = useMemo(\n () => ({\n [keyNavigationPrevious]() {\n dispatch({\n type: stateChangeTypes.SelectedItemKeyDownNavigationPrevious,\n })\n },\n [keyNavigationNext]() {\n dispatch({\n type: stateChangeTypes.SelectedItemKeyDownNavigationNext,\n })\n },\n Delete() {\n dispatch({\n type: stateChangeTypes.SelectedItemKeyDownDelete,\n })\n },\n Backspace() {\n dispatch({\n type: stateChangeTypes.SelectedItemKeyDownBackspace,\n })\n },\n }),\n [dispatch, keyNavigationNext, keyNavigationPrevious],\n )\n const dropdownKeyDownHandlers = useMemo(\n () => ({\n [keyNavigationPrevious](event) {\n if (isKeyDownOperationPermitted(event)) {\n dispatch({\n type: stateChangeTypes.DropdownKeyDownNavigationPrevious,\n })\n }\n },\n Backspace(event) {\n if (isKeyDownOperationPermitted(event)) {\n dispatch({\n type: stateChangeTypes.DropdownKeyDownBackspace,\n })\n }\n },\n }),\n [dispatch, keyNavigationPrevious],\n )\n\n // Getter props.\n const getSelectedItemProps = useCallback(\n ({\n refKey = 'ref',\n ref,\n onClick,\n onKeyDown,\n selectedItem,\n index,\n ...rest\n } = {}) => {\n const {state: latestState} = latest.current\n const itemIndex = getItemIndex(\n index,\n selectedItem,\n latestState.selectedItems,\n )\n if (itemIndex < 0) {\n throw new Error(\n 'Pass either selectedItem or index in getSelectedItemProps!',\n )\n }\n\n const selectedItemHandleClick = () => {\n dispatch({\n type: stateChangeTypes.SelectedItemClick,\n index,\n })\n }\n const selectedItemHandleKeyDown = event => {\n const key = normalizeArrowKey(event)\n if (key && selectedItemKeyDownHandlers[key]) {\n selectedItemKeyDownHandlers[key](event)\n }\n }\n\n return {\n [refKey]: handleRefs(ref, selectedItemNode => {\n if (selectedItemNode) {\n selectedItemRefs.current.push(selectedItemNode)\n }\n }),\n tabIndex: index === latestState.activeIndex ? 0 : -1,\n onClick: callAllEventHandlers(onClick, selectedItemHandleClick),\n onKeyDown: callAllEventHandlers(onKeyDown, selectedItemHandleKeyDown),\n ...rest,\n }\n },\n [dispatch, latest, selectedItemKeyDownHandlers],\n )\n const getDropdownProps = useCallback(\n (\n {\n refKey = 'ref',\n ref,\n onKeyDown,\n onClick,\n preventKeyAction = false,\n ...rest\n } = {},\n {suppressRefError = false} = {},\n ) => {\n setGetterPropCallInfo(\n 'getDropdownProps',\n suppressRefError,\n refKey,\n dropdownRef,\n )\n\n const dropdownHandleKeyDown = event => {\n const key = normalizeArrowKey(event)\n if (key && dropdownKeyDownHandlers[key]) {\n dropdownKeyDownHandlers[key](event)\n }\n }\n const dropdownHandleClick = () => {\n dispatch({\n type: stateChangeTypes.DropdownClick,\n })\n }\n\n return {\n [refKey]: handleRefs(ref, dropdownNode => {\n if (dropdownNode) {\n dropdownRef.current = dropdownNode\n }\n }),\n ...(!preventKeyAction && {\n onKeyDown: callAllEventHandlers(onKeyDown, dropdownHandleKeyDown),\n onClick: callAllEventHandlers(onClick, dropdownHandleClick),\n }),\n ...rest,\n }\n },\n [dispatch, dropdownKeyDownHandlers, setGetterPropCallInfo],\n )\n\n // returns\n const addSelectedItem = useCallback(\n selectedItem => {\n dispatch({\n type: stateChangeTypes.FunctionAddSelectedItem,\n selectedItem,\n })\n },\n [dispatch],\n )\n const removeSelectedItem = useCallback(\n selectedItem => {\n dispatch({\n type: stateChangeTypes.FunctionRemoveSelectedItem,\n selectedItem,\n })\n },\n [dispatch],\n )\n const setSelectedItems = useCallback(\n newSelectedItems => {\n dispatch({\n type: stateChangeTypes.FunctionSetSelectedItems,\n selectedItems: newSelectedItems,\n })\n },\n [dispatch],\n )\n const setActiveIndex = useCallback(\n newActiveIndex => {\n dispatch({\n type: stateChangeTypes.FunctionSetActiveIndex,\n activeIndex: newActiveIndex,\n })\n },\n [dispatch],\n )\n const reset = useCallback(() => {\n dispatch({\n type: stateChangeTypes.FunctionReset,\n })\n }, [dispatch])\n\n return {\n getSelectedItemProps,\n getDropdownProps,\n addSelectedItem,\n removeSelectedItem,\n setSelectedItems,\n setActiveIndex,\n reset,\n selectedItems,\n activeIndex,\n }\n}\n\nexport default useMultipleSelection\n"],"names":["_objectWithoutPropertiesLoose","source","excluded","target","sourceKeys","Object","keys","key","i","length","indexOf","_extends","assign","arguments","prototype","hasOwnProperty","call","apply","_assertThisInitialized","self","ReferenceError","_inheritsLoose","subClass","superClass","create","constructor","__proto__","hasSymbol","Symbol","for","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_ASYNC_MODE_TYPE","REACT_CONCURRENT_MODE_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_BLOCK_TYPE","REACT_FUNDAMENTAL_TYPE","REACT_RESPONDER_TYPE","REACT_SCOPE_TYPE","isValidElementType","type","$$typeof","typeOf","object","$$typeofType","undefined","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","ForwardRef","Fragment","Lazy","Memo","Portal","Profiler","StrictMode","Suspense","hasWarnedAboutDeprecatedIsAsyncMode","isAsyncMode","console","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","exports","module","require$$1","getOwnPropertySymbols","propIsEnumerable","propertyIsEnumerable","toObject","val","TypeError","shouldUseNative","test1","String","getOwnPropertyNames","test2","fromCharCode","order2","map","n","join","test3","split","forEach","letter","err","from","to","symbols","s","ReactPropTypesSecret","printWarning","require$$0","loggedTypeFailures","has","Function","bind","text","message","error","Error","x","checkPropTypes","typeSpecs","values","location","componentName","getStack","typeSpecName","name","ex","stack","resetWarningCache","emptyFunctionThatReturnsNull","isValidElement","throwOnDirectAccess","ITERATOR_SYMBOL","iterator","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","iteratorFn","ANONYMOUS","ReactPropTypes","array","createPrimitiveTypeChecker","bool","func","number","string","symbol","any","createAnyTypeChecker","arrayOf","createArrayOfTypeChecker","element","createElementTypeChecker","elementType","createElementTypeTypeChecker","instanceOf","createInstanceTypeChecker","node","createNodeChecker","objectOf","createObjectOfTypeChecker","oneOf","createEnumTypeChecker","oneOfType","createUnionTypeChecker","shape","createShapeTypeChecker","exact","createStrictShapeTypeChecker","is","y","PropTypeError","createChainableTypeChecker","validate","manualPropTypeCallCache","manualPropTypeWarningCount","checkType","isRequired","props","propName","propFullName","secret","cacheKey","chainedCheckType","expectedType","propValue","propType","getPropType","preciseType","getPreciseType","typeChecker","Array","isArray","ReactIs","expectedClass","expectedClassName","actualClassName","getClassName","expectedValues","valuesString","JSON","stringify","replacer","value","arrayOfTypeCheckers","process","checker","getPostfixForTypeWarning","isNode","shapeTypes","allKeys","every","step","entries","next","done","entry","isSymbol","RegExp","Date","PropTypes","b","c","d","e","f","g","h","k","l","m","p","q","r","u","v","w","REACT_SERVER_BLOCK_TYPE","REACT_DEBUG_TRACING_MODE_TYPE","REACT_LEGACY_HIDDEN_TYPE","symbolFor","REACT_OPAQUE_ID_TYPE","REACT_OFFSCREEN_TYPE","enableScopeAPI","hasWarnedAboutDeprecatedIsConcurrentMode","el","nodeType","canOverflow","overflow","skipOverflowHiddenElements","isScrollable","clientHeight","scrollHeight","clientWidth","scrollWidth","style","getComputedStyle","overflowY","overflowX","frame","ownerDocument","defaultView","frameElement","getFrameElement","isHiddenByFrame","alignNearest","scrollingEdgeStart","scrollingEdgeEnd","scrollingSize","scrollingBorderStart","scrollingBorderEnd","elementEdgeStart","elementEdgeEnd","elementSize","options","windowWithViewport","window","scrollMode","block","inline","boundary","checkBoundary","scrollingElement","document","documentElement","frames","cursor","parentNode","push","body","viewportWidth","visualViewport","width","innerWidth","viewportHeight","height","innerHeight","viewportX","scrollX","pageXOffset","viewportY","scrollY","pageYOffset","getBoundingClientRect","targetHeight","targetWidth","targetTop","top","targetRight","right","targetBottom","bottom","targetLeft","left","targetBlock","targetInline","computations","index","frameStyle","borderLeft","parseInt","borderLeftWidth","borderTop","borderTopWidth","borderRight","borderRightWidth","borderBottom","borderBottomWidth","blockScroll","inlineScroll","scrollbarWidth","offsetWidth","scrollbarHeight","offsetHeight","Math","max","scrollLeft","scrollTop","min","idCounter","cbToCb","cb","noop","scrollIntoView","menuNode","actions","computeScrollIntoView","isOrContainsNode","parent","child","Node","contains","debounce","fn","time","timeoutId","cancel","clearTimeout","wrapper","args","setTimeout","callAllEventHandlers","fns","event","some","preventDownshiftDefault","nativeEvent","handleRefs","refs","ref","current","generateId","resetIdCounter","getA11yStatusMessage","isOpen","resultCount","previousResultCount","unwrapArray","arg","defaultValue","isDOMElement","getElementProps","requiredProp","fnName","stateKeys","pickState","state","result","getState","reduce","prevState","isControlledProp","normalizeArrowKey","keyCode","isPlainObject","obj","toString","getNextWrappingIndex","moveAmount","baseIndex","itemCount","getItemNodeFromIndex","circular","itemsLastIndex","newIndex","nonDisabledNewIndex","getNextNonDisabledIndex","currentElementNode","hasAttribute","targetWithinDownshift","downshiftElements","checkActiveElement","contextNode","activeElement","validateControlledUnchanged","prevProps","nextProps","warningDescription","propKey","cleanupStatus","documentProp","getStatusDiv","textContent","setStatus","status","div","statusDiv","getElementById","createElement","setAttribute","border","clip","margin","padding","position","appendChild","unknown","mouseUp","itemMouseEnter","keyDownArrowUp","keyDownArrowDown","keyDownEscape","keyDownEnter","keyDownHome","keyDownEnd","clickItem","blurInput","changeInput","keyDownSpaceButton","clickButton","blurButton","controlledPropUpdatedSelectedItem","touchEnd","Downshift","id","menuId","labelId","inputId","getItemId","input","items","timeoutIds","internalSetTimeout","filter","setItemCount","count","unsetItemCount","setHighlightedIndex","highlightedIndex","otherStateToSet","defaultHighlightedIndex","internalSetState","clearSelection","selectedItem","inputValue","defaultIsOpen","selectItem","item","itemToString","selectItemAtIndex","itemIndex","selectHighlightedItem","stateToSet","isItemSelected","onChangeArg","onStateChangeArg","isStateToSetFunction","onInputValueChange","getStateAndHelpers","setState","newStateToSet","stateReducer","nextState","stateChangeTypes","nextFullState","hasMoreStateThanType","onStateChange","onSelect","onChange","onUserAction","rootRef","_rootNode","getRootProps","refKey","rest","suppressRefError","called","role","keyDownHandlers","ArrowDown","preventDefault","amount","shiftKey","moveHighlightedIndex","getItemCount","nextHighlightedIndex","ArrowUp","Enter","which","itemNode","Escape","reset","buttonKeyDownHandlers","toggleMenu","inputKeyDownHandlers","Home","newHighlightedIndex","End","getToggleButtonProps","onClick","onPress","onKeyDown","onKeyUp","onBlur","enabledEventHandlers","buttonHandleClick","buttonHandleKeyDown","buttonHandleKeyUp","buttonHandleBlur","eventHandlers","disabled","environment","focus","blurTarget","isMouseDown","getLabelProps","htmlFor","getInputProps","onInput","onChangeText","onChangeKey","inputHandleChange","inputHandleKeyDown","inputHandleBlur","autoComplete","downshiftButtonIsActive","dataset","toggle","menuRef","_menuNode","getMenuProps","getItemProps","onMouseMove","onMouseDown","onSelectKey","customClickHandler","avoidScrolling","clearItems","openMenu","closeMenu","updateStatus","highlightedItem","setA11yStatus","initialHighlightedIndex","initialIsOpen","initialInputValue","initialSelectedItem","internalClearTimeouts","stateToMerge","scrollHighlightedItemIntoView","componentDidMount","validateGetMenuPropsCalledCorrectly","onMouseUp","contextWithinDownshift","onOuterClick","onTouchStart","isTouchMove","onTouchMove","onTouchEnd","addEventListener","cleanup","removeEventListener","shouldScroll","currentHighlightedIndex","prevHighlightedIndex","scrollWhenOpen","componentDidUpdate","selectedItemChanged","componentWillUnmount","render","children","validateGetRootPropsCalledCorrectly","cloneElement","Component","defaultProps","warn","prevItem","propTypes","refKeySpecified","isComposite","dropdownDefaultStateValues","callOnChangeProps","action","newState","changes","invokeOnChangeHandler","handler","capitalizeString","a","getA11ySelectionMessage","selectionParameters","itemToStringLocal","updateA11yStatus","getA11yMessage","useIsomorphicLayoutEffect","useLayoutEffect","useEffect","useElementIds","toggleButtonId","elementIdsRef","useRef","getItemIndex","isAcceptedCharacterKey","test","slice","toUpperCase","useLatestRef","useEnhancedReducer","reducer","initialState","prevStateRef","actionRef","enhancedReducer","useCallback","useReducer","dispatch","propsRef","dispatchWithProps","useControlledReducer","circularNavigation","getDefaultValue","defaultStateValues","defaultPropKey","getInitialValue","initialPropKey","getInitialState","getHighlightedIndexOnOpen","offset","useMouseAndTouchTracker","downshiftElementRefs","handleBlur","mouseAndTouchTrackersRef","useGetterPropsCalledChecker","isInitialMountRef","propKeys","getterPropsCalledRef","acc","propCallInfo","elementRef","setGetterPropCallInfo","useA11yMessageSetter","dependencyArray","isInitialMount","useScrollIntoView","itemRefs","menuElement","scrollIntoViewProp","shouldScrollRef","useControlPropsValidator","prevPropsRef","MenuMouseLeave","ItemMouseMove","ItemClick","ToggleButtonClick","FunctionToggleMenu","FunctionOpenMenu","FunctionCloseMenu","FunctionSetHighlightedIndex","FunctionSelectItem","FunctionSetInputValue","FunctionReset","productionEnumFn","downshiftCommonReducer","getItemIndexByCharacterKey","keysSoFar","lowerCasedKeysSoFar","toLowerCase","offsetIndex","startsWith","defaultSelectedItem","onSelectedItemChange","onHighlightedIndexChange","onIsOpenChange","commonDefaultProps","validatePropTypes","caller","MenuKeyDownArrowDown","MenuKeyDownArrowUp","MenuKeyDownEscape","MenuKeyDownHome","MenuKeyDownEnd","MenuKeyDownEnter","MenuKeyDownSpaceButton","MenuKeyDownCharacter","MenuBlur","ToggleButtonKeyDownArrowDown","ToggleButtonKeyDownArrowUp","ToggleButtonKeyDownCharacter","downshiftSelectReducer","lowercasedKey","commonReducer","useSelect","userProps","toggleButtonRef","shouldBlurRef","clearTimeoutRef","elementIds","previousResultCountRef","latest","outerDispatch","toggleButtonKeyDownHandlers","useMemo","menuKeyDownHandlers","newSelectedItem","setInputValue","newInputValue","labelProps","onMouseLeave","latestState","tabIndex","menuHandleMouseLeave","menuHandleKeyDown","menuHandleBlur","shouldBlur","toggleButtonHandleClick","toggleButtonHandleKeyDown","toggleProps","toggleButtonNode","latestProps","itemHandleMouseMove","itemHandleClick","itemProps","InputKeyDownArrowDown","InputKeyDownArrowUp","InputKeyDownEscape","InputKeyDownHome","InputKeyDownEnd","InputKeyDownEnter","InputChange","InputBlur","ControlledPropUpdatedSelectedItem","getInitialStateCommon","defaultInputValue","previousSelectedItemRef","defaultPropsCommon","downshiftUseComboboxReducer","useCombobox","inputRef","comboboxRef","inputNode","getComboboxProps","comboboxNode","activeIndex","selectedItems","getInitialValueCommon","getDefaultValueCommon","isKeyDownOperationPermitted","metaKey","ctrlKey","altKey","HTMLInputElement","selectionStart","selectionEnd","getA11yRemovalMessage","removedSelectedItem","initialSelectedItems","defaultSelectedItems","initialActiveIndex","defaultActiveIndex","onActiveIndexChange","onSelectedItemsChange","keyNavigationNext","keyNavigationPrevious","SelectedItemClick","SelectedItemKeyDownDelete","SelectedItemKeyDownBackspace","SelectedItemKeyDownNavigationNext","SelectedItemKeyDownNavigationPrevious","DropdownKeyDownNavigationPrevious","DropdownKeyDownBackspace","DropdownClick","FunctionAddSelectedItem","FunctionRemoveSelectedItem","FunctionSetSelectedItems","FunctionSetActiveIndex","downshiftMultipleSelectionReducer","newActiveIndex","selectedItemIndex","newSelectedItems","useMultipleSelection","dropdownRef","previousSelectedItemsRef","selectedItemRefs","find","activeSelectedItem","selectedItemKeyDownHandlers","Delete","Backspace","dropdownKeyDownHandlers","getSelectedItemProps","selectedItemNode","selectedItemHandleClick","selectedItemHandleKeyDown","getDropdownProps","preventKeyAction","dropdownNode","dropdownHandleKeyDown","dropdownHandleClick","addSelectedItem","removeSelectedItem","setSelectedItems","setActiveIndex"],"mappings":";;;;;;EAAe,SAASA,6BAAT,CAAuCC,MAAvC,EAA+CC,QAA/C,EAAyD;EACtE,MAAID,MAAM,IAAI,IAAd,EAAoB,OAAO,EAAP;EACpB,MAAIE,MAAM,GAAG,EAAb;EACA,MAAIC,UAAU,GAAGC,MAAM,CAACC,IAAP,CAAYL,MAAZ,CAAjB;EACA,MAAIM,GAAJ,EAASC,CAAT;;EAEA,OAAKA,CAAC,GAAG,CAAT,EAAYA,CAAC,GAAGJ,UAAU,CAACK,MAA3B,EAAmCD,CAAC,EAApC,EAAwC;EACtCD,IAAAA,GAAG,GAAGH,UAAU,CAACI,CAAD,CAAhB;EACA,QAAIN,QAAQ,CAACQ,OAAT,CAAiBH,GAAjB,KAAy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