rsuite 5.22.2 → 5.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rsuite.js CHANGED
@@ -140,7 +140,7 @@ eval("function _objectWithoutPropertiesLoose(source, excluded) {\n if (source =
140
140
  \*******************************************************************/
141
141
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
142
142
 
143
- eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"./node_modules/@babel/runtime/helpers/typeof.js\").default;\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports.default = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return generator._invoke = function (innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }(innerFn, self, context), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n this._invoke = function (method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (undefined === method) {\n if (context.delegate = null, \"throw\" === context.method) {\n if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n return ContinueSentinel;\n }\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) {\n if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n }\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, \"constructor\", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n }\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports.default = module.exports;\n\n//# sourceURL=webpack://rsuite/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js?");
143
+ eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"./node_modules/@babel/runtime/helpers/typeof.js\").default;\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports.default = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (undefined === method) {\n if (context.delegate = null, \"throw\" === context.method) {\n if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n }\n return ContinueSentinel;\n }\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) {\n if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n }\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) {\n keys.push(key);\n }\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n }\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports.default = module.exports;\n\n//# sourceURL=webpack://rsuite/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js?");
144
144
 
145
145
  /***/ }),
146
146
 
@@ -1687,7 +1687,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
1687
1687
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1688
1688
 
1689
1689
  "use strict";
1690
- eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nvar _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ \"./node_modules/@babel/runtime/helpers/interopRequireWildcard.js\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\"));\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\n\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _pick = _interopRequireDefault(__webpack_require__(/*! lodash/pick */ \"./node_modules/lodash/pick.js\"));\n\nvar _Input = _interopRequireDefault(__webpack_require__(/*! ../Input */ \"./src/Input/index.tsx\"));\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _utils2 = __webpack_require__(/*! ../Animation/utils */ \"./src/Animation/utils.ts\");\n\nvar _Picker = __webpack_require__(/*! ../Picker */ \"./src/Picker/index.ts\");\n\nvar _utils3 = __webpack_require__(/*! ./utils */ \"./src/AutoComplete/utils.ts\");\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/AutoComplete/AutoComplete.tsx\",\n _this = void 0;\n\n/**\n * TODO: Remove unnecessary .rs-auto-complete element\n * TODO: role=combobox and aria-autocomplete on input element\n */\nvar AutoComplete = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n var _props$as = props.as,\n Component = _props$as === void 0 ? 'div' : _props$as,\n disabled = props.disabled,\n className = props.className,\n _props$placement = props.placement,\n placement = _props$placement === void 0 ? 'bottomStart' : _props$placement,\n _props$selectOnEnter = props.selectOnEnter,\n selectOnEnter = _props$selectOnEnter === void 0 ? true : _props$selectOnEnter,\n _props$classPrefix = props.classPrefix,\n classPrefix = _props$classPrefix === void 0 ? 'auto-complete' : _props$classPrefix,\n _props$defaultValue = props.defaultValue,\n defaultValue = _props$defaultValue === void 0 ? '' : _props$defaultValue,\n _props$menuAutoWidth = props.menuAutoWidth,\n menuAutoWidth = _props$menuAutoWidth === void 0 ? true : _props$menuAutoWidth,\n data = props.data,\n valueProp = props.value,\n open = props.open,\n style = props.style,\n menuClassName = props.menuClassName,\n id = props.id,\n renderMenu = props.renderMenu,\n renderMenuItem = props.renderMenuItem,\n onSelect = props.onSelect,\n filterBy = props.filterBy,\n onKeyDown = props.onKeyDown,\n onChange = props.onChange,\n onClose = props.onClose,\n onOpen = props.onOpen,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onMenuFocus = props.onMenuFocus,\n rest = (0, _objectWithoutPropertiesLoose2.default)(props, [\"as\", \"disabled\", \"className\", \"placement\", \"selectOnEnter\", \"classPrefix\", \"defaultValue\", \"menuAutoWidth\", \"data\", \"value\", \"open\", \"style\", \"menuClassName\", \"id\", \"renderMenu\", \"renderMenuItem\", \"onSelect\", \"filterBy\", \"onKeyDown\", \"onChange\", \"onClose\", \"onOpen\", \"onFocus\", \"onBlur\", \"onMenuFocus\"]);\n var datalist = (0, _utils3.transformData)(data);\n\n var _useControlled = (0, _utils.useControlled)(valueProp, defaultValue),\n value = _useControlled[0],\n setValue = _useControlled[1];\n\n var _useState = (0, _react.useState)(false),\n focus = _useState[0],\n setFocus = _useState[1];\n\n var items = (datalist === null || datalist === void 0 ? void 0 : datalist.filter((0, _utils3.shouldDisplay)(filterBy, value))) || [];\n var hasItems = items.length > 0;\n var overlayRef = (0, _react.useRef)(null);\n var isMounted = (0, _utils.useIsMounted)(); // Used to hover the focuse item when trigger `onKeydown`\n\n var _useFocusItemValue = (0, _Picker.useFocusItemValue)(value, {\n data: datalist,\n callback: onMenuFocus,\n target: function target() {\n return overlayRef.current;\n }\n }),\n focusItemValue = _useFocusItemValue.focusItemValue,\n setFocusItemValue = _useFocusItemValue.setFocusItemValue,\n handleKeyDown = _useFocusItemValue.onKeyDown;\n\n var handleKeyDownEvent = function handleKeyDownEvent(event) {\n if (!overlayRef.current) {\n return;\n }\n\n (0, _Picker.onMenuKeyDown)(event, {\n enter: selectOnEnter ? selectFocusMenuItem : undefined,\n esc: handleClose\n });\n handleKeyDown(event);\n onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);\n };\n\n var selectFocusMenuItem = function selectFocusMenuItem(event) {\n if (!focusItemValue) {\n return;\n }\n\n var focusItem = datalist.find(function (item) {\n return (item === null || item === void 0 ? void 0 : item.value) === focusItemValue;\n });\n setValue(focusItemValue);\n setFocusItemValue(focusItemValue);\n handleSelect(focusItem, event);\n\n if (value !== focusItemValue) {\n handleChangeValue(focusItemValue, event);\n }\n\n handleClose();\n };\n\n var handleSelect = (0, _react.useCallback)(function (item, event) {\n onSelect === null || onSelect === void 0 ? void 0 : onSelect(item.value, item, event);\n }, [onSelect]);\n var handleChangeValue = (0, _react.useCallback)(function (value, event) {\n onChange === null || onChange === void 0 ? void 0 : onChange(value, event);\n }, [onChange]);\n\n var handleChange = function handleChange(value, event) {\n setFocusItemValue('');\n setValue(value);\n setFocus(true);\n handleChangeValue(value, event);\n };\n\n var handleClose = (0, _react.useCallback)(function () {\n if (isMounted()) {\n setFocus(false);\n onClose === null || onClose === void 0 ? void 0 : onClose();\n }\n }, [isMounted, onClose]);\n var handleOpen = (0, _react.useCallback)(function () {\n setFocus(true);\n onOpen === null || onOpen === void 0 ? void 0 : onOpen();\n }, [onOpen]);\n var handleItemSelect = (0, _react.useCallback)(function (nextItemValue, item, event) {\n setValue(nextItemValue);\n setFocusItemValue(nextItemValue);\n handleSelect(item, event);\n\n if (value !== nextItemValue) {\n handleChangeValue(nextItemValue, event);\n }\n\n handleClose();\n }, [value, setValue, handleSelect, handleChangeValue, handleClose, setFocusItemValue]);\n var handleInputFocus = (0, _react.useCallback)(function (event) {\n onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);\n handleOpen();\n }, [onFocus, handleOpen]);\n var handleInputBlur = (0, _react.useCallback)(function (event) {\n setTimeout(handleClose, 300);\n onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);\n }, [onBlur, handleClose]);\n\n var _useClassNames = (0, _utils.useClassNames)(classPrefix),\n withClassPrefix = _useClassNames.withClassPrefix,\n merge = _useClassNames.merge;\n\n var classes = merge(className, withClassPrefix({\n disabled: disabled\n }));\n var triggerRef = (0, _react.useRef)(null);\n (0, _Picker.usePublicMethods)(ref, {\n triggerRef: triggerRef,\n overlayRef: overlayRef\n });\n\n var renderDropdownMenu = function renderDropdownMenu(positionProps, speakerRef) {\n var left = positionProps.left,\n top = positionProps.top,\n className = positionProps.className;\n var styles = {\n left: left,\n top: top\n };\n\n var menu = /*#__PURE__*/_react.default.createElement(_Picker.DropdownMenu, {\n id: id ? id + \"-listbox\" : undefined,\n classPrefix: \"auto-complete-menu\",\n dropdownMenuItemClassPrefix: \"auto-complete-item\",\n dropdownMenuItemAs: _Picker.DropdownMenuItem,\n focusItemValue: focusItemValue,\n onSelect: handleItemSelect,\n renderMenuItem: renderMenuItem,\n data: items,\n className: menuClassName,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 241,\n columnNumber: 9\n }\n });\n\n return /*#__PURE__*/_react.default.createElement(_Picker.PickerOverlay, {\n ref: (0, _utils.mergeRefs)(overlayRef, speakerRef),\n style: styles,\n className: className,\n onKeyDown: handleKeyDownEvent,\n target: triggerRef,\n autoWidth: menuAutoWidth,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 255,\n columnNumber: 9\n }\n }, renderMenu ? renderMenu(menu) : menu);\n };\n\n return /*#__PURE__*/_react.default.createElement(_Picker.PickerToggleTrigger, {\n ref: triggerRef,\n placement: placement,\n pickerProps: (0, _pick.default)(props, _Picker.pickTriggerPropKeys),\n trigger: ['click', 'focus'],\n open: open || focus && hasItems,\n speaker: renderDropdownMenu,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 269,\n columnNumber: 7\n }\n }, /*#__PURE__*/_react.default.createElement(Component, {\n className: classes,\n style: style,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 277,\n columnNumber: 9\n }\n }, /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({}, rest, {\n id: id,\n disabled: disabled,\n value: value,\n onBlur: handleInputBlur,\n onFocus: handleInputFocus,\n onChange: handleChange,\n onKeyDown: handleKeyDownEvent,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 278,\n columnNumber: 11\n }\n }))));\n});\n\nAutoComplete.displayName = 'AutoComplete';\nAutoComplete.propTypes = (0, _extends2.default)({}, _utils2.animationPropTypes, {\n data: _propTypes.default.array,\n disabled: _propTypes.default.bool,\n onSelect: _propTypes.default.func,\n onChange: _propTypes.default.func,\n classPrefix: _propTypes.default.string,\n value: _propTypes.default.string,\n defaultValue: _propTypes.default.string,\n className: _propTypes.default.string,\n menuClassName: _propTypes.default.string,\n menuAutoWidth: _propTypes.default.bool,\n placement: _propTypes.default.oneOf(_utils.PLACEMENT),\n onFocus: _propTypes.default.func,\n onMenuFocus: _propTypes.default.func,\n onBlur: _propTypes.default.func,\n onKeyDown: _propTypes.default.func,\n onOpen: _propTypes.default.func,\n onClose: _propTypes.default.func,\n renderMenu: _propTypes.default.func,\n renderMenuItem: _propTypes.default.func,\n style: _propTypes.default.object,\n open: _propTypes.default.bool,\n selectOnEnter: _propTypes.default.bool,\n filterBy: _propTypes.default.func\n});\nvar _default = AutoComplete;\nexports.default = _default;\n\n//# sourceURL=webpack://rsuite/./src/AutoComplete/AutoComplete.tsx?");
1690
+ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nvar _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ \"./node_modules/@babel/runtime/helpers/interopRequireWildcard.js\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\"));\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\n\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _pick = _interopRequireDefault(__webpack_require__(/*! lodash/pick */ \"./node_modules/lodash/pick.js\"));\n\nvar _omit = _interopRequireDefault(__webpack_require__(/*! lodash/omit */ \"./node_modules/lodash/omit.js\"));\n\nvar _Input = _interopRequireDefault(__webpack_require__(/*! ../Input */ \"./src/Input/index.tsx\"));\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _utils2 = __webpack_require__(/*! ../Animation/utils */ \"./src/Animation/utils.ts\");\n\nvar _Picker = __webpack_require__(/*! ../Picker */ \"./src/Picker/index.ts\");\n\nvar _utils3 = __webpack_require__(/*! ./utils */ \"./src/AutoComplete/utils.ts\");\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/AutoComplete/AutoComplete.tsx\",\n _this = void 0;\n\n/**\n * TODO: Remove unnecessary .rs-auto-complete element\n * TODO: role=combobox and aria-autocomplete on input element\n */\nvar AutoComplete = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n var _props$as = props.as,\n Component = _props$as === void 0 ? 'div' : _props$as,\n disabled = props.disabled,\n className = props.className,\n _props$placement = props.placement,\n placement = _props$placement === void 0 ? 'bottomStart' : _props$placement,\n _props$selectOnEnter = props.selectOnEnter,\n selectOnEnter = _props$selectOnEnter === void 0 ? true : _props$selectOnEnter,\n _props$classPrefix = props.classPrefix,\n classPrefix = _props$classPrefix === void 0 ? 'auto-complete' : _props$classPrefix,\n _props$defaultValue = props.defaultValue,\n defaultValue = _props$defaultValue === void 0 ? '' : _props$defaultValue,\n _props$menuAutoWidth = props.menuAutoWidth,\n menuAutoWidth = _props$menuAutoWidth === void 0 ? true : _props$menuAutoWidth,\n data = props.data,\n valueProp = props.value,\n open = props.open,\n style = props.style,\n menuClassName = props.menuClassName,\n id = props.id,\n renderMenu = props.renderMenu,\n renderMenuItem = props.renderMenuItem,\n onSelect = props.onSelect,\n filterBy = props.filterBy,\n onKeyDown = props.onKeyDown,\n onChange = props.onChange,\n onClose = props.onClose,\n onOpen = props.onOpen,\n onFocus = props.onFocus,\n onBlur = props.onBlur,\n onMenuFocus = props.onMenuFocus,\n rest = (0, _objectWithoutPropertiesLoose2.default)(props, [\"as\", \"disabled\", \"className\", \"placement\", \"selectOnEnter\", \"classPrefix\", \"defaultValue\", \"menuAutoWidth\", \"data\", \"value\", \"open\", \"style\", \"menuClassName\", \"id\", \"renderMenu\", \"renderMenuItem\", \"onSelect\", \"filterBy\", \"onKeyDown\", \"onChange\", \"onClose\", \"onOpen\", \"onFocus\", \"onBlur\", \"onMenuFocus\"]);\n var datalist = (0, _utils3.transformData)(data);\n\n var _useControlled = (0, _utils.useControlled)(valueProp, defaultValue),\n value = _useControlled[0],\n setValue = _useControlled[1];\n\n var _useState = (0, _react.useState)(false),\n focus = _useState[0],\n setFocus = _useState[1];\n\n var items = (datalist === null || datalist === void 0 ? void 0 : datalist.filter((0, _utils3.shouldDisplay)(filterBy, value))) || [];\n var hasItems = items.length > 0;\n var overlayRef = (0, _react.useRef)(null);\n var isMounted = (0, _utils.useIsMounted)(); // Used to hover the focuse item when trigger `onKeydown`\n\n var _useFocusItemValue = (0, _Picker.useFocusItemValue)(value, {\n data: datalist,\n callback: onMenuFocus,\n target: function target() {\n return overlayRef.current;\n }\n }),\n focusItemValue = _useFocusItemValue.focusItemValue,\n setFocusItemValue = _useFocusItemValue.setFocusItemValue,\n handleKeyDown = _useFocusItemValue.onKeyDown;\n\n var handleKeyDownEvent = function handleKeyDownEvent(event) {\n if (!overlayRef.current) {\n return;\n }\n\n (0, _Picker.onMenuKeyDown)(event, {\n enter: selectOnEnter ? selectFocusMenuItem : undefined,\n esc: handleClose\n });\n handleKeyDown(event);\n onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);\n };\n\n var selectFocusMenuItem = function selectFocusMenuItem(event) {\n if (!focusItemValue) {\n return;\n }\n\n var focusItem = datalist.find(function (item) {\n return (item === null || item === void 0 ? void 0 : item.value) === focusItemValue;\n });\n setValue(focusItemValue);\n setFocusItemValue(focusItemValue);\n handleSelect(focusItem, event);\n\n if (value !== focusItemValue) {\n handleChangeValue(focusItemValue, event);\n }\n\n handleClose();\n };\n\n var handleSelect = (0, _react.useCallback)(function (item, event) {\n onSelect === null || onSelect === void 0 ? void 0 : onSelect(item.value, item, event);\n }, [onSelect]);\n var handleChangeValue = (0, _react.useCallback)(function (value, event) {\n onChange === null || onChange === void 0 ? void 0 : onChange(value, event);\n }, [onChange]);\n\n var handleChange = function handleChange(value, event) {\n setFocusItemValue('');\n setValue(value);\n setFocus(true);\n handleChangeValue(value, event);\n };\n\n var handleClose = (0, _react.useCallback)(function () {\n if (isMounted()) {\n setFocus(false);\n onClose === null || onClose === void 0 ? void 0 : onClose();\n }\n }, [isMounted, onClose]);\n var handleOpen = (0, _react.useCallback)(function () {\n setFocus(true);\n onOpen === null || onOpen === void 0 ? void 0 : onOpen();\n }, [onOpen]);\n var handleItemSelect = (0, _react.useCallback)(function (nextItemValue, item, event) {\n setValue(nextItemValue);\n setFocusItemValue(nextItemValue);\n handleSelect(item, event);\n\n if (value !== nextItemValue) {\n handleChangeValue(nextItemValue, event);\n }\n\n handleClose();\n }, [value, setValue, handleSelect, handleChangeValue, handleClose, setFocusItemValue]);\n var handleInputFocus = (0, _react.useCallback)(function (event) {\n onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);\n handleOpen();\n }, [onFocus, handleOpen]);\n var handleInputBlur = (0, _react.useCallback)(function (event) {\n setTimeout(handleClose, 300);\n onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);\n }, [onBlur, handleClose]);\n\n var _useClassNames = (0, _utils.useClassNames)(classPrefix),\n withClassPrefix = _useClassNames.withClassPrefix,\n merge = _useClassNames.merge;\n\n var classes = merge(className, withClassPrefix({\n disabled: disabled\n }));\n var triggerRef = (0, _react.useRef)(null);\n\n var _partitionHTMLProps = (0, _utils.partitionHTMLProps)((0, _omit.default)(rest, _Picker.pickTriggerPropKeys)),\n htmlInputProps = _partitionHTMLProps[0],\n restProps = _partitionHTMLProps[1];\n\n (0, _Picker.usePublicMethods)(ref, {\n triggerRef: triggerRef,\n overlayRef: overlayRef\n });\n\n var renderDropdownMenu = function renderDropdownMenu(positionProps, speakerRef) {\n var left = positionProps.left,\n top = positionProps.top,\n className = positionProps.className;\n var styles = {\n left: left,\n top: top\n };\n\n var menu = /*#__PURE__*/_react.default.createElement(_Picker.DropdownMenu, {\n id: id ? id + \"-listbox\" : undefined,\n classPrefix: \"auto-complete-menu\",\n dropdownMenuItemClassPrefix: \"auto-complete-item\",\n dropdownMenuItemAs: _Picker.DropdownMenuItem,\n focusItemValue: focusItemValue,\n onSelect: handleItemSelect,\n renderMenuItem: renderMenuItem,\n data: items,\n className: menuClassName,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 250,\n columnNumber: 9\n }\n });\n\n return /*#__PURE__*/_react.default.createElement(_Picker.PickerOverlay, {\n ref: (0, _utils.mergeRefs)(overlayRef, speakerRef),\n style: styles,\n className: className,\n onKeyDown: handleKeyDownEvent,\n target: triggerRef,\n autoWidth: menuAutoWidth,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 264,\n columnNumber: 9\n }\n }, renderMenu ? renderMenu(menu) : menu);\n };\n\n return /*#__PURE__*/_react.default.createElement(_Picker.PickerToggleTrigger, {\n ref: triggerRef,\n placement: placement,\n pickerProps: (0, _pick.default)(props, _Picker.pickTriggerPropKeys),\n trigger: ['click', 'focus'],\n open: open || focus && hasItems,\n speaker: renderDropdownMenu,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 278,\n columnNumber: 7\n }\n }, /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({\n className: classes,\n style: style\n }, restProps, {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 286,\n columnNumber: 9\n }\n }), /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({}, htmlInputProps, {\n id: id,\n disabled: disabled,\n value: value,\n onBlur: handleInputBlur,\n onFocus: handleInputFocus,\n onChange: handleChange,\n onKeyDown: handleKeyDownEvent,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 287,\n columnNumber: 11\n }\n }))));\n});\n\nAutoComplete.displayName = 'AutoComplete';\nAutoComplete.propTypes = (0, _extends2.default)({}, _utils2.animationPropTypes, {\n data: _propTypes.default.array,\n disabled: _propTypes.default.bool,\n onSelect: _propTypes.default.func,\n onChange: _propTypes.default.func,\n classPrefix: _propTypes.default.string,\n value: _propTypes.default.string,\n defaultValue: _propTypes.default.string,\n className: _propTypes.default.string,\n menuClassName: _propTypes.default.string,\n menuAutoWidth: _propTypes.default.bool,\n placement: _propTypes.default.oneOf(_utils.PLACEMENT),\n onFocus: _propTypes.default.func,\n onMenuFocus: _propTypes.default.func,\n onBlur: _propTypes.default.func,\n onKeyDown: _propTypes.default.func,\n onOpen: _propTypes.default.func,\n onClose: _propTypes.default.func,\n renderMenu: _propTypes.default.func,\n renderMenuItem: _propTypes.default.func,\n style: _propTypes.default.object,\n open: _propTypes.default.bool,\n selectOnEnter: _propTypes.default.bool,\n filterBy: _propTypes.default.func\n});\nvar _default = AutoComplete;\nexports.default = _default;\n\n//# sourceURL=webpack://rsuite/./src/AutoComplete/AutoComplete.tsx?");
1691
1691
 
1692
1692
  /***/ }),
1693
1693
 
@@ -3062,7 +3062,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
3062
3062
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3063
3063
 
3064
3064
  "use strict";
3065
- eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nvar _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ \"./node_modules/@babel/runtime/helpers/interopRequireWildcard.js\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\"));\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\n\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _isNil = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\n\nvar _AngleUp = _interopRequireDefault(__webpack_require__(/*! @rsuite/icons/legacy/AngleUp */ \"./node_modules/@rsuite/icons/legacy/AngleUp.js\"));\n\nvar _AngleDown = _interopRequireDefault(__webpack_require__(/*! @rsuite/icons/legacy/AngleDown */ \"./node_modules/@rsuite/icons/legacy/AngleDown.js\"));\n\nvar _on = _interopRequireDefault(__webpack_require__(/*! dom-lib/on */ \"./node_modules/dom-lib/esm/on.js\"));\n\nvar _InputGroup = _interopRequireDefault(__webpack_require__(/*! ../InputGroup/InputGroup */ \"./src/InputGroup/InputGroup.tsx\"));\n\nvar _InputGroupAddon = _interopRequireDefault(__webpack_require__(/*! ../InputGroup/InputGroupAddon */ \"./src/InputGroup/InputGroupAddon.tsx\"));\n\nvar _Input = _interopRequireDefault(__webpack_require__(/*! ../Input */ \"./src/Input/index.tsx\"));\n\nvar _Button = _interopRequireDefault(__webpack_require__(/*! ../Button */ \"./src/Button/index.tsx\"));\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/InputNumber/InputNumber.tsx\",\n _this = void 0;\n\n/**\n * Check if the value is a number.\n * @param value\n */\nvar isNumber = function isNumber(value) {\n return /(^-?|^\\+?|^\\d?)\\d*\\.\\d+$/.test(value + '');\n};\n/**\n * Get the length of the decimal.\n * @param value\n */\n\n\nfunction getDecimalLength(value) {\n if (isNumber(value)) {\n return value.toString().split('.')[1].length;\n }\n\n return 0;\n}\n/**\n * Get the value after the decimal point.\n * @param values\n */\n\n\nfunction decimals() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n var lengths = values.map(getDecimalLength);\n return Math.max.apply(Math, lengths);\n}\n/**\n * Disable the upper limit of the number.\n * @param value\n * @param max\n */\n\n\nfunction valueReachesMax(value, max) {\n if (!(0, _isNil.default)(value)) {\n return +value >= max;\n }\n\n return false;\n}\n/**\n * Disable the lower limit of the number.\n * @param value\n * @param min\n */\n\n\nfunction valueReachesMin(value, min) {\n if (!(0, _isNil.default)(value)) {\n return +value <= min;\n }\n\n return false;\n}\n\nvar InputNumber = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n var _props$as = props.as,\n Component = _props$as === void 0 ? _InputGroup.default : _props$as,\n className = props.className,\n _props$classPrefix = props.classPrefix,\n classPrefix = _props$classPrefix === void 0 ? 'input-number' : _props$classPrefix,\n disabled = props.disabled,\n readOnly = props.readOnly,\n plaintext = props.plaintext,\n valueProp = props.value,\n defaultValue = props.defaultValue,\n size = props.size,\n prefixElement = props.prefix,\n postfix = props.postfix,\n _props$step = props.step,\n step = _props$step === void 0 ? 1 : _props$step,\n _props$buttonAppearan = props.buttonAppearance,\n buttonAppearance = _props$buttonAppearan === void 0 ? 'subtle' : _props$buttonAppearan,\n minProp = props.min,\n maxProp = props.max,\n _props$scrollable = props.scrollable,\n scrollable = _props$scrollable === void 0 ? true : _props$scrollable,\n onChange = props.onChange,\n onWheel = props.onWheel,\n restProps = (0, _objectWithoutPropertiesLoose2.default)(props, [\"as\", \"className\", \"classPrefix\", \"disabled\", \"readOnly\", \"plaintext\", \"value\", \"defaultValue\", \"size\", \"prefix\", \"postfix\", \"step\", \"buttonAppearance\", \"min\", \"max\", \"scrollable\", \"onChange\", \"onWheel\"]);\n var min = minProp !== null && minProp !== void 0 ? minProp : -Infinity;\n var max = maxProp !== null && maxProp !== void 0 ? maxProp : Infinity;\n\n var _useControlled = (0, _utils.useControlled)(valueProp, defaultValue),\n value = _useControlled[0],\n setValue = _useControlled[1];\n\n var _useClassNames = (0, _utils.useClassNames)(classPrefix),\n withClassPrefix = _useClassNames.withClassPrefix,\n merge = _useClassNames.merge,\n prefix = _useClassNames.prefix;\n\n var classes = merge(className, withClassPrefix());\n\n var _partitionHTMLProps = (0, _utils.partitionHTMLProps)(restProps),\n htmlInputProps = _partitionHTMLProps[0],\n rest = _partitionHTMLProps[1];\n\n var inputRef = (0, _react.useRef)();\n var handleChangeValue = (0, _react.useCallback)(function (currentValue, event) {\n if (currentValue !== value) {\n setValue(currentValue);\n onChange === null || onChange === void 0 ? void 0 : onChange(currentValue, event);\n }\n }, [onChange, setValue, value]);\n var getSafeValue = (0, _react.useCallback)(function (value) {\n if (!Number.isNaN(value)) {\n if (+value > max) {\n value = max;\n }\n\n if (+value < min) {\n value = min;\n }\n } else {\n value = '';\n }\n\n return value.toString();\n }, [max, min]); // Increment value by step\n\n var handleStepUp = (0, _react.useCallback)(function (event) {\n var val = +(value || 0);\n var bit = decimals(val, step);\n handleChangeValue(getSafeValue((val + step).toFixed(bit)), event);\n }, [getSafeValue, handleChangeValue, step, value]); // Decrement value by step\n\n var handleStepDown = (0, _react.useCallback)(function (event) {\n var val = +(value || 0);\n var bit = decimals(val, step);\n handleChangeValue(getSafeValue((val - step).toFixed(bit)), event);\n }, [getSafeValue, handleChangeValue, step, value]); // Disables step up/down button when\n // - InputNumber is disabled/readonly\n // - value reaches max/min limits\n\n var stepUpDisabled = disabled || readOnly || valueReachesMax(value, max);\n var stepDownDisabled = disabled || readOnly || valueReachesMin(value, min);\n var handleKeyDown = (0, _react.useCallback)(function (event) {\n switch (event.key) {\n case _utils.KEY_VALUES.UP:\n event.preventDefault();\n handleStepUp(event);\n break;\n\n case _utils.KEY_VALUES.DOWN:\n event.preventDefault();\n handleStepDown(event);\n break;\n\n case _utils.KEY_VALUES.HOME:\n if (typeof minProp !== 'undefined') {\n event.preventDefault();\n handleChangeValue(getSafeValue(minProp), event);\n }\n\n break;\n\n case _utils.KEY_VALUES.END:\n if (typeof maxProp !== 'undefined') {\n event.preventDefault();\n handleChangeValue(getSafeValue(maxProp), event);\n }\n\n break;\n }\n }, [handleStepUp, handleStepDown, minProp, maxProp, handleChangeValue, getSafeValue]);\n var handleWheel = (0, _react.useCallback)(function (event) {\n if (!disabled && !readOnly && event.target === document.activeElement) {\n event.preventDefault();\n var delta = event['wheelDelta'] || -event.deltaY || -(event === null || event === void 0 ? void 0 : event.detail);\n\n if (delta > 0) {\n handleStepDown(event);\n }\n\n if (delta < 0) {\n handleStepUp(event);\n }\n }\n\n onWheel === null || onWheel === void 0 ? void 0 : onWheel(event);\n }, [disabled, handleStepDown, handleStepUp, onWheel, readOnly]);\n var handleChange = (0, _react.useCallback)(function (value, event) {\n if (!/^-?(?:\\d+)?(\\.)?\\d*$/.test(value) && value !== '') {\n return;\n }\n\n handleChangeValue(value, event);\n }, [handleChangeValue]);\n var handleBlur = (0, _react.useCallback)(function (event) {\n var _event$target;\n\n var targetValue = Number.parseFloat((_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.value);\n handleChangeValue(getSafeValue(targetValue), event);\n }, [getSafeValue, handleChangeValue]);\n (0, _react.useEffect)(function () {\n var wheelListener;\n\n if (inputRef.current && scrollable) {\n wheelListener = (0, _on.default)(inputRef.current, 'wheel', handleWheel, {\n passive: false\n });\n }\n\n return function () {\n var _wheelListener;\n\n (_wheelListener = wheelListener) === null || _wheelListener === void 0 ? void 0 : _wheelListener.off();\n };\n }, [handleWheel, scrollable]);\n\n var input = /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({}, htmlInputProps, {\n type: \"number\",\n autoComplete: \"off\",\n step: step,\n inputRef: inputRef,\n onChange: handleChange,\n onBlur: (0, _utils.createChainedFunction)(handleBlur, htmlInputProps === null || htmlInputProps === void 0 ? void 0 : htmlInputProps.onBlur),\n value: (0, _isNil.default)(value) ? '' : \"\" + value,\n disabled: disabled,\n readOnly: readOnly,\n plaintext: plaintext,\n ref: plaintext ? ref : undefined,\n onKeyDown: handleKeyDown,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 275,\n columnNumber: 5\n }\n }));\n\n if (plaintext) {\n return input;\n }\n\n return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, rest, {\n ref: ref,\n className: classes,\n disabled: disabled,\n size: size,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 297,\n columnNumber: 5\n }\n }), prefixElement && /*#__PURE__*/_react.default.createElement(_InputGroupAddon.default, {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 298,\n columnNumber: 25\n }\n }, prefixElement), input, /*#__PURE__*/_react.default.createElement(\"span\", {\n className: prefix('btn-group-vertical'),\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 300,\n columnNumber: 7\n }\n }, /*#__PURE__*/_react.default.createElement(_Button.default, {\n tabIndex: -1,\n appearance: buttonAppearance,\n className: prefix('touchspin-up'),\n onClick: handleStepUp,\n disabled: stepUpDisabled,\n \"aria-label\": \"Increment\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 301,\n columnNumber: 9\n }\n }, /*#__PURE__*/_react.default.createElement(_AngleUp.default, {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 309,\n columnNumber: 11\n }\n })), /*#__PURE__*/_react.default.createElement(_Button.default, {\n tabIndex: -1,\n appearance: buttonAppearance,\n className: prefix('touchspin-down'),\n onClick: handleStepDown,\n disabled: stepDownDisabled,\n \"aria-label\": \"Decrement\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 311,\n columnNumber: 9\n }\n }, /*#__PURE__*/_react.default.createElement(_AngleDown.default, {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 319,\n columnNumber: 11\n }\n }))), postfix && /*#__PURE__*/_react.default.createElement(_InputGroupAddon.default, {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 322,\n columnNumber: 19\n }\n }, postfix));\n});\n\nInputNumber.displayName = 'InputNumber';\nInputNumber.propTypes = {\n className: _propTypes.default.string,\n classPrefix: _propTypes.default.string,\n min: _propTypes.default.number,\n max: _propTypes.default.number,\n step: _propTypes.default.number,\n value: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n defaultValue: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n prefix: _propTypes.default.node,\n postfix: _propTypes.default.node,\n disabled: _propTypes.default.bool,\n readOnly: _propTypes.default.bool,\n plaintext: _propTypes.default.bool,\n scrollable: _propTypes.default.bool,\n size: _propTypes.default.oneOf(['lg', 'md', 'sm', 'xs']),\n buttonAppearance: _propTypes.default.oneOf(['default', 'primary', 'link', 'subtle', 'ghost']),\n onWheel: _propTypes.default.func,\n onChange: _propTypes.default.func\n};\nvar _default = InputNumber;\nexports.default = _default;\n\n//# sourceURL=webpack://rsuite/./src/InputNumber/InputNumber.tsx?");
3065
+ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nvar _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ \"./node_modules/@babel/runtime/helpers/interopRequireWildcard.js\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ \"./node_modules/@babel/runtime/helpers/extends.js\"));\n\nvar _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js\"));\n\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"react\"));\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _isNil = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\n\nvar _AngleUp = _interopRequireDefault(__webpack_require__(/*! @rsuite/icons/legacy/AngleUp */ \"./node_modules/@rsuite/icons/legacy/AngleUp.js\"));\n\nvar _AngleDown = _interopRequireDefault(__webpack_require__(/*! @rsuite/icons/legacy/AngleDown */ \"./node_modules/@rsuite/icons/legacy/AngleDown.js\"));\n\nvar _on = _interopRequireDefault(__webpack_require__(/*! dom-lib/on */ \"./node_modules/dom-lib/esm/on.js\"));\n\nvar _InputGroup = _interopRequireDefault(__webpack_require__(/*! ../InputGroup/InputGroup */ \"./src/InputGroup/InputGroup.tsx\"));\n\nvar _InputGroupAddon = _interopRequireDefault(__webpack_require__(/*! ../InputGroup/InputGroupAddon */ \"./src/InputGroup/InputGroupAddon.tsx\"));\n\nvar _Input = _interopRequireDefault(__webpack_require__(/*! ../Input */ \"./src/Input/index.tsx\"));\n\nvar _Button = _interopRequireDefault(__webpack_require__(/*! ../Button */ \"./src/Button/index.tsx\"));\n\nvar _utils = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\nvar _jsxFileName = \"/home/runner/work/rsuite/rsuite/src/InputNumber/InputNumber.tsx\",\n _this = void 0;\n\n/**\n * Check if the value is a number.\n * @param value\n */\nvar isNumber = function isNumber(value) {\n return /(^-?|^\\+?|^\\d?)\\d*\\.\\d+$/.test(value + '');\n};\n/**\n * Get the length of the decimal.\n * @param value\n */\n\n\nfunction getDecimalLength(value) {\n if (isNumber(value)) {\n return value.toString().split('.')[1].length;\n }\n\n return 0;\n}\n/**\n * Get the value after the decimal point.\n * @param values\n */\n\n\nfunction decimals() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n var lengths = values.map(getDecimalLength);\n return Math.max.apply(Math, lengths);\n}\n/**\n * Disable the upper limit of the number.\n * @param value\n * @param max\n */\n\n\nfunction valueReachesMax(value, max) {\n if (!(0, _isNil.default)(value)) {\n return +value >= max;\n }\n\n return false;\n}\n/**\n * Disable the lower limit of the number.\n * @param value\n * @param min\n */\n\n\nfunction valueReachesMin(value, min) {\n if (!(0, _isNil.default)(value)) {\n return +value <= min;\n }\n\n return false;\n}\n\nvar InputNumber = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {\n var _props$as = props.as,\n Component = _props$as === void 0 ? _InputGroup.default : _props$as,\n className = props.className,\n _props$classPrefix = props.classPrefix,\n classPrefix = _props$classPrefix === void 0 ? 'input-number' : _props$classPrefix,\n disabled = props.disabled,\n readOnly = props.readOnly,\n plaintext = props.plaintext,\n valueProp = props.value,\n defaultValue = props.defaultValue,\n size = props.size,\n prefixElement = props.prefix,\n postfix = props.postfix,\n _props$step = props.step,\n step = _props$step === void 0 ? 1 : _props$step,\n _props$buttonAppearan = props.buttonAppearance,\n buttonAppearance = _props$buttonAppearan === void 0 ? 'subtle' : _props$buttonAppearan,\n minProp = props.min,\n maxProp = props.max,\n _props$scrollable = props.scrollable,\n scrollable = _props$scrollable === void 0 ? true : _props$scrollable,\n onChange = props.onChange,\n onWheel = props.onWheel,\n restProps = (0, _objectWithoutPropertiesLoose2.default)(props, [\"as\", \"className\", \"classPrefix\", \"disabled\", \"readOnly\", \"plaintext\", \"value\", \"defaultValue\", \"size\", \"prefix\", \"postfix\", \"step\", \"buttonAppearance\", \"min\", \"max\", \"scrollable\", \"onChange\", \"onWheel\"]);\n var min = minProp !== null && minProp !== void 0 ? minProp : -Infinity;\n var max = maxProp !== null && maxProp !== void 0 ? maxProp : Infinity;\n\n var _useControlled = (0, _utils.useControlled)(valueProp, defaultValue),\n value = _useControlled[0],\n setValue = _useControlled[1];\n\n var _useClassNames = (0, _utils.useClassNames)(classPrefix),\n withClassPrefix = _useClassNames.withClassPrefix,\n merge = _useClassNames.merge,\n prefix = _useClassNames.prefix;\n\n var classes = merge(className, withClassPrefix());\n\n var _partitionHTMLProps = (0, _utils.partitionHTMLProps)(restProps),\n htmlInputProps = _partitionHTMLProps[0],\n rest = _partitionHTMLProps[1];\n\n var inputRef = (0, _react.useRef)();\n var handleChangeValue = (0, _react.useCallback)(function (currentValue, event) {\n if (currentValue !== value) {\n setValue(currentValue);\n onChange === null || onChange === void 0 ? void 0 : onChange(currentValue, event);\n }\n }, [onChange, setValue, value]);\n var getSafeValue = (0, _react.useCallback)(function (value) {\n if (!Number.isNaN(value)) {\n if (+value > max) {\n value = max;\n }\n\n if (+value < min) {\n value = min;\n }\n } else {\n value = '';\n }\n\n return value.toString();\n }, [max, min]); // Increment value by step\n\n var handleStepUp = (0, _react.useCallback)(function (event) {\n var val = +(value || 0);\n var bit = decimals(val, step);\n handleChangeValue(getSafeValue((val + step).toFixed(bit)), event);\n }, [getSafeValue, handleChangeValue, step, value]); // Decrement value by step\n\n var handleStepDown = (0, _react.useCallback)(function (event) {\n var val = +(value || 0);\n var bit = decimals(val, step);\n handleChangeValue(getSafeValue((val - step).toFixed(bit)), event);\n }, [getSafeValue, handleChangeValue, step, value]); // Disables step up/down button when\n // - InputNumber is disabled/readonly\n // - value reaches max/min limits\n\n var stepUpDisabled = disabled || readOnly || valueReachesMax(value, max);\n var stepDownDisabled = disabled || readOnly || valueReachesMin(value, min);\n var handleKeyDown = (0, _react.useCallback)(function (event) {\n switch (event.key) {\n case _utils.KEY_VALUES.UP:\n event.preventDefault();\n handleStepUp(event);\n break;\n\n case _utils.KEY_VALUES.DOWN:\n event.preventDefault();\n handleStepDown(event);\n break;\n\n case _utils.KEY_VALUES.HOME:\n if (typeof minProp !== 'undefined') {\n event.preventDefault();\n handleChangeValue(getSafeValue(minProp), event);\n }\n\n break;\n\n case _utils.KEY_VALUES.END:\n if (typeof maxProp !== 'undefined') {\n event.preventDefault();\n handleChangeValue(getSafeValue(maxProp), event);\n }\n\n break;\n }\n }, [handleStepUp, handleStepDown, minProp, maxProp, handleChangeValue, getSafeValue]);\n var handleWheel = (0, _react.useCallback)(function (event) {\n if (!scrollable) {\n event.preventDefault();\n return;\n }\n\n if (!disabled && !readOnly && event.target === document.activeElement) {\n event.preventDefault();\n var delta = event['wheelDelta'] || -event.deltaY || -(event === null || event === void 0 ? void 0 : event.detail);\n\n if (delta > 0) {\n handleStepDown(event);\n }\n\n if (delta < 0) {\n handleStepUp(event);\n }\n }\n\n onWheel === null || onWheel === void 0 ? void 0 : onWheel(event);\n }, [disabled, handleStepDown, handleStepUp, onWheel, readOnly, scrollable]);\n var handleChange = (0, _react.useCallback)(function (value, event) {\n if (!/^-?(?:\\d+)?(\\.)?\\d*$/.test(value) && value !== '') {\n return;\n }\n\n handleChangeValue(value, event);\n }, [handleChangeValue]);\n var handleBlur = (0, _react.useCallback)(function (event) {\n var _event$target;\n\n var targetValue = Number.parseFloat((_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.value);\n handleChangeValue(getSafeValue(targetValue), event);\n }, [getSafeValue, handleChangeValue]);\n (0, _react.useEffect)(function () {\n var wheelListener;\n\n if (inputRef.current) {\n wheelListener = (0, _on.default)(inputRef.current, 'wheel', handleWheel, {\n passive: false\n });\n }\n\n return function () {\n var _wheelListener;\n\n (_wheelListener = wheelListener) === null || _wheelListener === void 0 ? void 0 : _wheelListener.off();\n };\n }, [handleWheel, scrollable]);\n\n var input = /*#__PURE__*/_react.default.createElement(_Input.default, (0, _extends2.default)({}, htmlInputProps, {\n type: \"number\",\n autoComplete: \"off\",\n step: step,\n inputRef: inputRef,\n onChange: handleChange,\n onBlur: (0, _utils.createChainedFunction)(handleBlur, htmlInputProps === null || htmlInputProps === void 0 ? void 0 : htmlInputProps.onBlur),\n value: (0, _isNil.default)(value) ? '' : \"\" + value,\n disabled: disabled,\n readOnly: readOnly,\n plaintext: plaintext,\n ref: plaintext ? ref : undefined,\n onKeyDown: handleKeyDown,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 280,\n columnNumber: 5\n }\n }));\n\n if (plaintext) {\n return input;\n }\n\n return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, rest, {\n ref: ref,\n className: classes,\n disabled: disabled,\n size: size,\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 302,\n columnNumber: 5\n }\n }), prefixElement && /*#__PURE__*/_react.default.createElement(_InputGroupAddon.default, {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 303,\n columnNumber: 25\n }\n }, prefixElement), input, /*#__PURE__*/_react.default.createElement(\"span\", {\n className: prefix('btn-group-vertical'),\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 305,\n columnNumber: 7\n }\n }, /*#__PURE__*/_react.default.createElement(_Button.default, {\n tabIndex: -1,\n appearance: buttonAppearance,\n className: prefix('touchspin-up'),\n onClick: handleStepUp,\n disabled: stepUpDisabled,\n \"aria-label\": \"Increment\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 306,\n columnNumber: 9\n }\n }, /*#__PURE__*/_react.default.createElement(_AngleUp.default, {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 314,\n columnNumber: 11\n }\n })), /*#__PURE__*/_react.default.createElement(_Button.default, {\n tabIndex: -1,\n appearance: buttonAppearance,\n className: prefix('touchspin-down'),\n onClick: handleStepDown,\n disabled: stepDownDisabled,\n \"aria-label\": \"Decrement\",\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 316,\n columnNumber: 9\n }\n }, /*#__PURE__*/_react.default.createElement(_AngleDown.default, {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 324,\n columnNumber: 11\n }\n }))), postfix && /*#__PURE__*/_react.default.createElement(_InputGroupAddon.default, {\n __self: _this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 327,\n columnNumber: 19\n }\n }, postfix));\n});\n\nInputNumber.displayName = 'InputNumber';\nInputNumber.propTypes = {\n className: _propTypes.default.string,\n classPrefix: _propTypes.default.string,\n min: _propTypes.default.number,\n max: _propTypes.default.number,\n step: _propTypes.default.number,\n value: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n defaultValue: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n prefix: _propTypes.default.node,\n postfix: _propTypes.default.node,\n disabled: _propTypes.default.bool,\n readOnly: _propTypes.default.bool,\n plaintext: _propTypes.default.bool,\n scrollable: _propTypes.default.bool,\n size: _propTypes.default.oneOf(['lg', 'md', 'sm', 'xs']),\n buttonAppearance: _propTypes.default.oneOf(['default', 'primary', 'link', 'subtle', 'ghost']),\n onWheel: _propTypes.default.func,\n onChange: _propTypes.default.func\n};\nvar _default = InputNumber;\nexports.default = _default;\n\n//# sourceURL=webpack://rsuite/./src/InputNumber/InputNumber.tsx?");
3066
3066
 
3067
3067
  /***/ }),
3068
3068
 
@@ -3337,7 +3337,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
3337
3337
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3338
3338
 
3339
3339
  "use strict";
3340
- eval("\n\nvar _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ \"./node_modules/@babel/runtime/helpers/interopRequireWildcard.js\");\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _isNil = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\n\nvar _useUniqueId = _interopRequireDefault(__webpack_require__(/*! ../utils/useUniqueId */ \"./src/utils/useUniqueId.ts\"));\n\nvar _MenuContext = _interopRequireWildcard(__webpack_require__(/*! ./MenuContext */ \"./src/Menu/MenuContext.ts\"));\n\n/**\n * Headless ARIA `menuitem`\n * @private\n */\nfunction MenuItem(props) {\n var children = props.children,\n _props$selected = props.selected,\n selected = _props$selected === void 0 ? false : _props$selected,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n onActivate = props.onActivate;\n var menuitemRef = (0, _react.useRef)(null);\n var menuitemId = (0, _useUniqueId.default)('menuitem-');\n var menu = (0, _react.useContext)(_MenuContext.default);\n\n if (!menu) {\n throw new Error('<MenuItem> must be rendered within a <Menu>');\n }\n\n var menuState = menu[0],\n dispatch = menu[1]; // Whether this menuitem has focus (indicated by `aria-activedescendant` from parent menu)\n\n var hasFocus = !(0, _isNil.default)(menuitemRef.current) && !(0, _isNil.default)(menuState.activeItemIndex) && menuState.items[menuState.activeItemIndex].element === menuitemRef.current;\n var handleClick = (0, _react.useCallback)(function (event) {\n if (disabled) {\n return;\n }\n\n onActivate === null || onActivate === void 0 ? void 0 : onActivate(event);\n }, [disabled, onActivate]); // Gain/release focus on mousedown in `menubar`\n\n var handleMouseDown = (0, _react.useCallback)(function () {\n if (!(0, _isNil.default)(menuitemRef.current) && !hasFocus) {\n dispatch({\n type: _MenuContext.MenuActionTypes.MoveFocus,\n to: _MenuContext.MoveFocusTo.Specific,\n id: menuitemRef.current.id\n });\n }\n }, [dispatch, hasFocus]); // Gain/release focus on mouseenter/mouseleave in `menu`\n\n var handleMouseMove = (0, _react.useCallback)(function () {\n if (!(0, _isNil.default)(menuitemRef.current) && !hasFocus) {\n dispatch({\n type: _MenuContext.MenuActionTypes.MoveFocus,\n to: _MenuContext.MoveFocusTo.Specific,\n id: menuitemRef.current.id\n });\n }\n }, [hasFocus, dispatch]);\n var handleMouseLeave = (0, _react.useCallback)(function () {\n dispatch({\n type: _MenuContext.MenuActionTypes.MoveFocus,\n to: _MenuContext.MoveFocusTo.None\n });\n }, [dispatch]);\n (0, _react.useEffect)(function () {\n var menuitemElement = menuitemRef.current;\n\n if (menuitemElement) {\n dispatch({\n type: _MenuContext.MenuActionTypes.RegisterItem,\n element: menuitemElement,\n props: {\n disabled: disabled\n }\n });\n return function () {\n dispatch({\n type: _MenuContext.MenuActionTypes.UnregisterItem,\n id: menuitemElement.id\n });\n };\n }\n }, [menuitemRef, disabled, dispatch]);\n var menuitemProps = {\n id: menuitemId,\n role: 'menuitem',\n // fixme Only use `aria-checked` on menuitemradio and menuitemcheckbox\n 'aria-checked': selected || undefined,\n 'aria-disabled': disabled,\n tabIndex: -1,\n onClick: handleClick,\n // render props\n selected: selected,\n active: hasFocus\n }; // Only move focus on hover in a `menu`, not `menubar`\n\n if ((menuState === null || menuState === void 0 ? void 0 : menuState.role) === 'menu') {\n menuitemProps.onMouseMove = handleMouseMove;\n menuitemProps.onMouseLeave = handleMouseLeave;\n }\n\n if ((menuState === null || menuState === void 0 ? void 0 : menuState.role) === 'menubar') {\n menuitemProps.onMouseDown = handleMouseDown;\n menuitemProps.onMouseOver = handleMouseMove;\n menuitemProps.onMouseLeave = handleMouseLeave;\n }\n\n return children(menuitemProps, menuitemRef);\n}\n\nMenuItem.displayName = 'MenuItem';\nMenuItem.propTypes = {\n selected: _propTypes.default.bool,\n disabled: _propTypes.default.bool,\n children: _propTypes.default.func.isRequired,\n onActivate: _propTypes.default.func\n};\nvar _default = MenuItem;\nexports.default = _default;\n\n//# sourceURL=webpack://rsuite/./src/Menu/MenuItem.tsx?");
3340
+ eval("\n\nvar _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ \"./node_modules/@babel/runtime/helpers/interopRequireWildcard.js\");\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\n\nvar _isNil = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\n\nvar _useUniqueId = _interopRequireDefault(__webpack_require__(/*! ../utils/useUniqueId */ \"./src/utils/useUniqueId.ts\"));\n\nvar _MenuContext = _interopRequireWildcard(__webpack_require__(/*! ./MenuContext */ \"./src/Menu/MenuContext.ts\"));\n\n/**\n * Headless ARIA `menuitem`\n * @private\n */\nfunction MenuItem(props) {\n var _menuState$items$menu;\n\n var children = props.children,\n _props$selected = props.selected,\n selected = _props$selected === void 0 ? false : _props$selected,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n onActivate = props.onActivate;\n var menuitemRef = (0, _react.useRef)(null);\n var menuitemId = (0, _useUniqueId.default)('menuitem-');\n var menu = (0, _react.useContext)(_MenuContext.default);\n\n if (!menu) {\n throw new Error('<MenuItem> must be rendered within a <Menu>');\n }\n\n var menuState = menu[0],\n dispatch = menu[1]; // Whether this menuitem has focus (indicated by `aria-activedescendant` from parent menu)\n\n var hasFocus = !(0, _isNil.default)(menuitemRef.current) && !(0, _isNil.default)(menuState.activeItemIndex) && ((_menuState$items$menu = menuState.items[menuState.activeItemIndex]) === null || _menuState$items$menu === void 0 ? void 0 : _menuState$items$menu.element) === menuitemRef.current;\n var handleClick = (0, _react.useCallback)(function (event) {\n if (disabled) {\n return;\n }\n\n onActivate === null || onActivate === void 0 ? void 0 : onActivate(event);\n }, [disabled, onActivate]); // Gain/release focus on mousedown in `menubar`\n\n var handleMouseDown = (0, _react.useCallback)(function () {\n if (!(0, _isNil.default)(menuitemRef.current) && !hasFocus) {\n dispatch({\n type: _MenuContext.MenuActionTypes.MoveFocus,\n to: _MenuContext.MoveFocusTo.Specific,\n id: menuitemRef.current.id\n });\n }\n }, [dispatch, hasFocus]); // Gain/release focus on mouseenter/mouseleave in `menu`\n\n var handleMouseMove = (0, _react.useCallback)(function () {\n if (!(0, _isNil.default)(menuitemRef.current) && !hasFocus) {\n dispatch({\n type: _MenuContext.MenuActionTypes.MoveFocus,\n to: _MenuContext.MoveFocusTo.Specific,\n id: menuitemRef.current.id\n });\n }\n }, [hasFocus, dispatch]);\n var handleMouseLeave = (0, _react.useCallback)(function () {\n dispatch({\n type: _MenuContext.MenuActionTypes.MoveFocus,\n to: _MenuContext.MoveFocusTo.None\n });\n }, [dispatch]);\n (0, _react.useEffect)(function () {\n var menuitemElement = menuitemRef.current;\n\n if (menuitemElement) {\n dispatch({\n type: _MenuContext.MenuActionTypes.RegisterItem,\n element: menuitemElement,\n props: {\n disabled: disabled\n }\n });\n return function () {\n dispatch({\n type: _MenuContext.MenuActionTypes.UnregisterItem,\n id: menuitemElement.id\n });\n };\n }\n }, [menuitemRef, disabled, dispatch]);\n var menuitemProps = {\n id: menuitemId,\n role: 'menuitem',\n // fixme Only use `aria-checked` on menuitemradio and menuitemcheckbox\n 'aria-checked': selected || undefined,\n 'aria-disabled': disabled,\n tabIndex: -1,\n onClick: handleClick,\n // render props\n selected: selected,\n active: hasFocus\n }; // Only move focus on hover in a `menu`, not `menubar`\n\n if ((menuState === null || menuState === void 0 ? void 0 : menuState.role) === 'menu') {\n menuitemProps.onMouseMove = handleMouseMove;\n menuitemProps.onMouseLeave = handleMouseLeave;\n }\n\n if ((menuState === null || menuState === void 0 ? void 0 : menuState.role) === 'menubar') {\n menuitemProps.onMouseDown = handleMouseDown;\n menuitemProps.onMouseOver = handleMouseMove;\n menuitemProps.onMouseLeave = handleMouseLeave;\n }\n\n return children(menuitemProps, menuitemRef);\n}\n\nMenuItem.displayName = 'MenuItem';\nMenuItem.propTypes = {\n selected: _propTypes.default.bool,\n disabled: _propTypes.default.bool,\n children: _propTypes.default.func.isRequired,\n onActivate: _propTypes.default.func\n};\nvar _default = MenuItem;\nexports.default = _default;\n\n//# sourceURL=webpack://rsuite/./src/Menu/MenuItem.tsx?");
3341
3341
 
3342
3342
  /***/ }),
3343
3343
 
@@ -3524,7 +3524,7 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
3524
3524
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3525
3525
 
3526
3526
  "use strict";
3527
- eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports.useFlattenData = useFlattenData;\nexports.useColumnData = useColumnData;\nexports.useCascadeValue = useCascadeValue;\nexports.removeAllChildrenValue = exports.getOtherItemValuesByUnselectChild = exports.isSomeParentChecked = exports.isSomeChildChecked = exports.getParents = void 0;\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _uniq = _interopRequireDefault(__webpack_require__(/*! lodash/uniq */ \"./node_modules/lodash/uniq.js\"));\n\nvar _remove = _interopRequireDefault(__webpack_require__(/*! lodash/remove */ \"./node_modules/lodash/remove.js\"));\n\nvar _slice = _interopRequireDefault(__webpack_require__(/*! lodash/slice */ \"./node_modules/lodash/slice.js\"));\n\nvar _treeUtils = __webpack_require__(/*! ../utils/treeUtils */ \"./src/utils/treeUtils.ts\");\n\nvar _attachParent = __webpack_require__(/*! ../utils/attachParent */ \"./src/utils/attachParent.ts\");\n\n/**\n * Get all parents of a node\n * @param node\n */\nvar getParents = function getParents(node) {\n var parents = [];\n\n if (!node.parent) {\n return parents;\n }\n\n parents.push(node.parent);\n parents = parents.concat(getParents(node.parent));\n return parents;\n};\n/**\n * Check if any child nodes are selected.\n * @param node\n * @param value\n * @param itemKeys\n */\n\n\nexports.getParents = getParents;\n\nvar isSomeChildChecked = function isSomeChildChecked(node, value, itemKeys) {\n var childrenKey = itemKeys.childrenKey,\n valueKey = itemKeys.valueKey;\n\n if (!node[childrenKey] || !value) {\n return false;\n }\n\n return node[childrenKey].some(function (child) {\n var _child$childrenKey;\n\n if (value.some(function (n) {\n return n === child[valueKey];\n })) {\n return true;\n }\n\n if ((_child$childrenKey = child[childrenKey]) !== null && _child$childrenKey !== void 0 && _child$childrenKey.length) {\n return isSomeChildChecked(child, value, itemKeys);\n }\n\n return false;\n });\n};\n/**\n * Check if the parent is selected.\n * @param node\n * @param value\n * @param itemKeys\n */\n\n\nexports.isSomeChildChecked = isSomeChildChecked;\n\nvar isSomeParentChecked = function isSomeParentChecked(node, value, itemKeys) {\n var valueKey = itemKeys.valueKey;\n\n if (!value) {\n return false;\n }\n\n if (value.some(function (n) {\n return n === node[valueKey];\n })) {\n return true;\n }\n\n if (node.parent) {\n return isSomeParentChecked(node.parent, value, itemKeys);\n }\n\n return false;\n};\n\nexports.isSomeParentChecked = isSomeParentChecked;\n\nvar getOtherItemValuesByUnselectChild = function getOtherItemValuesByUnselectChild(itemNode, value, itemKeys) {\n var valueKey = itemKeys.valueKey,\n childrenKey = itemKeys.childrenKey;\n var parentValues = [];\n var itemValues = []; // Find the parent node of the current node by value\n\n function findParent(item) {\n parentValues.push(item[valueKey]);\n\n if (value.some(function (v) {\n return v === item[valueKey];\n })) {\n return item;\n }\n\n if (item.parent) {\n var p = findParent(item.parent);\n\n if (p) {\n return p;\n }\n }\n\n return null;\n } // Get child nodes through parent node\n\n\n function pushChildValue(item) {\n if (!item[childrenKey]) {\n return;\n }\n\n item[childrenKey].forEach(function (n) {\n // Determine whether it is a direct parent\n if (parentValues.some(function (v) {\n return v === n[valueKey];\n }) && n[childrenKey]) {\n pushChildValue(n);\n } else if (n[valueKey] !== itemNode[valueKey]) {\n itemValues.push(n[valueKey]);\n }\n });\n }\n\n var parent = findParent(itemNode);\n\n if (!parent) {\n return [];\n }\n\n pushChildValue(parent);\n return itemValues;\n};\n/**\n * Remove the values of all children.\n */\n\n\nexports.getOtherItemValuesByUnselectChild = getOtherItemValuesByUnselectChild;\n\nvar removeAllChildrenValue = function removeAllChildrenValue(value, item, itemKeys) {\n var valueKey = itemKeys.valueKey,\n childrenKey = itemKeys.childrenKey;\n var removedValue = [];\n\n if (!item[childrenKey]) {\n return;\n }\n\n item[childrenKey].forEach(function (n) {\n removedValue = removedValue.concat((0, _remove.default)(value, function (v) {\n return v === n[valueKey];\n }));\n\n if (n[childrenKey]) {\n removeAllChildrenValue(value, n, itemKeys);\n }\n });\n return removedValue;\n};\n/**\n * A hook to flatten tree structure data\n * @param data\n */\n\n\nexports.removeAllChildrenValue = removeAllChildrenValue;\n\nfunction useFlattenData(data, itemKeys) {\n var childrenKey = itemKeys.childrenKey;\n\n var _useState = (0, _react.useState)((0, _treeUtils.flattenTree)(data)),\n flattenData = _useState[0],\n setFlattenData = _useState[1];\n\n var addFlattenData = (0, _react.useCallback)(function (children, parent) {\n var nodes = children.map(function (child) {\n return (0, _attachParent.attachParent)(child, parent);\n });\n parent[childrenKey] = nodes;\n setFlattenData([].concat(flattenData, nodes));\n }, [childrenKey, flattenData]);\n (0, _react.useEffect)(function () {\n setFlattenData((0, _treeUtils.flattenTree)(data));\n }, [data]);\n return {\n addFlattenData: addFlattenData,\n flattenData: flattenData\n };\n}\n/**\n * A hook for column data\n * @param flattenData\n */\n\n\nfunction useColumnData(flattenData) {\n // The columns displayed in the cascading panel.\n var _useState2 = (0, _react.useState)([flattenData.filter(function (item) {\n return !item.parent;\n })]),\n columnData = _useState2[0],\n setColumnData = _useState2[1];\n /**\n * Add a list of options to the cascading panel. Used for lazy loading options.\n * @param column\n * @param index The index of the current column.\n */\n\n\n function addColumn(column, index) {\n setColumnData([].concat((0, _slice.default)(columnData, 0, index), [column]));\n }\n /**\n * Remove subsequent columns of the specified column\n * @param index\n */\n\n\n function romoveColumnByIndex(index) {\n setColumnData([].concat((0, _slice.default)(columnData, 0, index)));\n }\n\n function enforceUpdateColumnData(nextData) {\n var nextFlattenData = (0, _treeUtils.flattenTree)(nextData);\n setColumnData([nextFlattenData.filter(function (item) {\n return !item.parent;\n })]);\n }\n\n return {\n columnData: columnData,\n addColumn: addColumn,\n romoveColumnByIndex: romoveColumnByIndex,\n setColumnData: setColumnData,\n enforceUpdateColumnData: enforceUpdateColumnData\n };\n}\n/**\n * A hook that converts the value into a cascading value\n * @param props\n * @param flattenData\n */\n\n\nfunction useCascadeValue(props, flattenData) {\n var valueKey = props.valueKey,\n childrenKey = props.childrenKey,\n uncheckableItemValues = props.uncheckableItemValues,\n cascade = props.cascade,\n valueProp = props.value;\n /**\n * Get the values of all children\n */\n\n var getChildrenValue = (0, _react.useCallback)(function (item) {\n var values = [];\n\n if (!item[childrenKey]) {\n return values;\n }\n\n item[childrenKey].forEach(function (n) {\n if (uncheckableItemValues && !uncheckableItemValues.some(function (v) {\n return v === n[valueKey];\n })) {\n values.push(n[valueKey]);\n }\n\n values = values.concat(getChildrenValue(n));\n });\n return values;\n }, [childrenKey, uncheckableItemValues, valueKey]);\n var splitValue = (0, _react.useCallback)(function (item, checked, value) {\n var itemValue = item[valueKey];\n var childrenValue = getChildrenValue(item);\n var parents = getParents(item);\n var nextValue = [].concat(value);\n var removedValue = [];\n\n if (checked) {\n nextValue.push(itemValue); // Delete all values under the current node\n\n removedValue = removedValue.concat(removeAllChildrenValue(nextValue, item, {\n valueKey: valueKey,\n childrenKey: childrenKey\n }) || []); // Traverse all ancestor nodes of the current node\n // Then determine whether all the child nodes of these nodes are selected, and then they themselves must be selected\n\n var _loop = function _loop(i) {\n // Whether the parent node can be selected\n var isCheckableParent = !(uncheckableItemValues !== null && uncheckableItemValues !== void 0 && uncheckableItemValues.some(function (v) {\n return v === parents[i][valueKey];\n }));\n\n if (isCheckableParent) {\n var isCheckAll = parents[i][childrenKey] // Filter out options that are marked as not selectable\n .filter(function (n) {\n return !(uncheckableItemValues !== null && uncheckableItemValues !== void 0 && uncheckableItemValues.some(function (v) {\n return v === n[valueKey];\n }));\n }) // Check if all nodes are selected\n .every(function (n) {\n return nextValue.some(function (v) {\n return v === n[valueKey];\n });\n });\n\n if (isCheckAll) {\n // Add parent node value\n nextValue.push(parents[i][valueKey]); // Delete all values under the parent node\n\n removedValue = removedValue.concat(removeAllChildrenValue(nextValue, parents[i], {\n valueKey: valueKey,\n childrenKey: childrenKey\n }) || []);\n }\n }\n };\n\n for (var i = 0; i < parents.length; i++) {\n _loop(i);\n }\n } else {\n var tempValue = childrenValue.concat(parents.map(function (item) {\n return item[valueKey];\n }));\n nextValue = nextValue.concat(getOtherItemValuesByUnselectChild(item, nextValue, {\n valueKey: valueKey,\n childrenKey: childrenKey\n })); // Delete related child and parent nodes\n\n removedValue = (0, _remove.default)(nextValue, function (v) {\n // Delete yourself\n if (v === itemValue) {\n return true;\n }\n\n return tempValue.some(function (n) {\n return n === v;\n });\n });\n }\n\n var uniqValue = (0, _uniq.default)(nextValue);\n var uniqRemovedValue = (0, _uniq.default)(removedValue);\n return {\n value: uniqValue,\n removedValue: uniqRemovedValue\n };\n }, [valueKey, childrenKey, uncheckableItemValues, getChildrenValue]);\n var transformValue = (0, _react.useCallback)(function (value) {\n if (value === void 0) {\n value = [];\n }\n\n if (!cascade) {\n return value;\n }\n\n var tempRemovedValue = [];\n var nextValue = [];\n\n var _loop2 = function _loop2(i) {\n // If the value in the current value is already in the deleted list, it will not be processed\n if (tempRemovedValue.some(function (v) {\n return v === value[i];\n })) {\n return \"continue\";\n }\n\n var item = flattenData.find(function (v) {\n return v[valueKey] === value[i];\n });\n\n if (!item) {\n return \"continue\";\n }\n\n var sv = splitValue(item, true, value);\n tempRemovedValue = (0, _uniq.default)(tempRemovedValue.concat(sv.removedValue)); // Get all relevant values\n\n nextValue = (0, _uniq.default)(nextValue.concat(sv.value));\n };\n\n for (var i = 0; i < value.length; i++) {\n var _ret = _loop2(i);\n\n if (_ret === \"continue\") continue;\n } // Finally traverse all nextValue, and delete if its parent node is also nextValue\n\n\n return nextValue.filter(function (v) {\n var item = flattenData.find(function (n) {\n return n[valueKey] === v;\n });\n\n if (item !== null && item !== void 0 && item.parent && nextValue.some(function (v) {\n return v === item.parent && item.parent[valueKey];\n })) {\n return false;\n }\n\n return true;\n });\n }, [cascade, flattenData, splitValue, valueKey]);\n\n var _useState3 = (0, _react.useState)(transformValue(valueProp) || []),\n value = _useState3[0],\n setValue = _useState3[1];\n\n (0, _react.useEffect)(function () {\n // Update value when valueProp is updated.\n setValue(transformValue(valueProp) || []);\n }, [transformValue, valueProp]);\n return {\n value: value,\n setValue: setValue,\n splitValue: splitValue\n };\n}\n\n//# sourceURL=webpack://rsuite/./src/MultiCascader/utils.ts?");
3527
+ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\n\nexports.__esModule = true;\nexports.useFlattenData = useFlattenData;\nexports.useColumnData = useColumnData;\nexports.useCascadeValue = useCascadeValue;\nexports.removeAllChildrenValue = exports.getOtherItemValuesByUnselectChild = exports.isSomeParentChecked = exports.isSomeChildChecked = exports.getParents = void 0;\n\nvar _react = __webpack_require__(/*! react */ \"react\");\n\nvar _uniq = _interopRequireDefault(__webpack_require__(/*! lodash/uniq */ \"./node_modules/lodash/uniq.js\"));\n\nvar _remove = _interopRequireDefault(__webpack_require__(/*! lodash/remove */ \"./node_modules/lodash/remove.js\"));\n\nvar _slice = _interopRequireDefault(__webpack_require__(/*! lodash/slice */ \"./node_modules/lodash/slice.js\"));\n\nvar _treeUtils = __webpack_require__(/*! ../utils/treeUtils */ \"./src/utils/treeUtils.ts\");\n\nvar _attachParent = __webpack_require__(/*! ../utils/attachParent */ \"./src/utils/attachParent.ts\");\n\n/**\n * Get all parents of a node\n * @param node\n */\nvar getParents = function getParents(node) {\n var parents = [];\n\n if (!node.parent) {\n return parents;\n }\n\n parents.push(node.parent);\n parents = parents.concat(getParents(node.parent));\n return parents;\n};\n/**\n * Check if any child nodes are selected.\n * @param node\n * @param value\n * @param itemKeys\n */\n\n\nexports.getParents = getParents;\n\nvar isSomeChildChecked = function isSomeChildChecked(node, value, itemKeys) {\n var childrenKey = itemKeys.childrenKey,\n valueKey = itemKeys.valueKey;\n\n if (!node[childrenKey] || !value) {\n return false;\n }\n\n return node[childrenKey].some(function (child) {\n var _child$childrenKey;\n\n if (value.some(function (n) {\n return n === child[valueKey];\n })) {\n return true;\n }\n\n if ((_child$childrenKey = child[childrenKey]) !== null && _child$childrenKey !== void 0 && _child$childrenKey.length) {\n return isSomeChildChecked(child, value, itemKeys);\n }\n\n return false;\n });\n};\n/**\n * Check if the parent is selected.\n * @param node\n * @param value\n * @param itemKeys\n */\n\n\nexports.isSomeChildChecked = isSomeChildChecked;\n\nvar isSomeParentChecked = function isSomeParentChecked(node, value, itemKeys) {\n var valueKey = itemKeys.valueKey;\n\n if (!value) {\n return false;\n }\n\n if (value.some(function (n) {\n return n === node[valueKey];\n })) {\n return true;\n }\n\n if (node.parent) {\n return isSomeParentChecked(node.parent, value, itemKeys);\n }\n\n return false;\n};\n\nexports.isSomeParentChecked = isSomeParentChecked;\n\nvar getOtherItemValuesByUnselectChild = function getOtherItemValuesByUnselectChild(itemNode, value, itemKeys) {\n var valueKey = itemKeys.valueKey,\n childrenKey = itemKeys.childrenKey;\n var parentValues = [];\n var itemValues = []; // Find the parent node of the current node by value\n\n function findParent(item) {\n parentValues.push(item[valueKey]);\n\n if (value.some(function (v) {\n return v === item[valueKey];\n })) {\n return item;\n }\n\n if (item.parent) {\n var p = findParent(item.parent);\n\n if (p) {\n return p;\n }\n }\n\n return null;\n } // Get child nodes through parent node\n\n\n function pushChildValue(item) {\n if (!item[childrenKey]) {\n return;\n }\n\n item[childrenKey].forEach(function (n) {\n // Determine whether it is a direct parent\n if (parentValues.some(function (v) {\n return v === n[valueKey];\n }) && n[childrenKey]) {\n pushChildValue(n);\n } else if (n[valueKey] !== itemNode[valueKey]) {\n itemValues.push(n[valueKey]);\n }\n });\n }\n\n var parent = findParent(itemNode);\n\n if (!parent) {\n return [];\n }\n\n pushChildValue(parent);\n return itemValues;\n};\n/**\n * Remove the values of all children.\n */\n\n\nexports.getOtherItemValuesByUnselectChild = getOtherItemValuesByUnselectChild;\n\nvar removeAllChildrenValue = function removeAllChildrenValue(value, item, itemKeys) {\n var valueKey = itemKeys.valueKey,\n childrenKey = itemKeys.childrenKey;\n var removedValue = [];\n\n if (!item[childrenKey]) {\n return;\n }\n\n item[childrenKey].forEach(function (n) {\n removedValue = removedValue.concat((0, _remove.default)(value, function (v) {\n return v === n[valueKey];\n }));\n\n if (n[childrenKey]) {\n removeAllChildrenValue(value, n, itemKeys);\n }\n });\n return removedValue;\n};\n/**\n * A hook to flatten tree structure data\n * @param data\n */\n\n\nexports.removeAllChildrenValue = removeAllChildrenValue;\n\nfunction useFlattenData(data, itemKeys) {\n var childrenKey = itemKeys.childrenKey;\n\n var _useState = (0, _react.useState)((0, _treeUtils.flattenTree)(data, itemKeys.childrenKey)),\n flattenData = _useState[0],\n setFlattenData = _useState[1];\n\n var addFlattenData = (0, _react.useCallback)(function (children, parent) {\n var nodes = children.map(function (child) {\n return (0, _attachParent.attachParent)(child, parent);\n });\n parent[childrenKey] = nodes;\n setFlattenData([].concat(flattenData, nodes));\n }, [childrenKey, flattenData]);\n (0, _react.useEffect)(function () {\n setFlattenData((0, _treeUtils.flattenTree)(data, itemKeys.childrenKey));\n }, [data, itemKeys.childrenKey]);\n return {\n addFlattenData: addFlattenData,\n flattenData: flattenData\n };\n}\n/**\n * A hook for column data\n * @param flattenData\n */\n\n\nfunction useColumnData(flattenData) {\n // The columns displayed in the cascading panel.\n var _useState2 = (0, _react.useState)([flattenData.filter(function (item) {\n return !item.parent;\n })]),\n columnData = _useState2[0],\n setColumnData = _useState2[1];\n /**\n * Add a list of options to the cascading panel. Used for lazy loading options.\n * @param column\n * @param index The index of the current column.\n */\n\n\n function addColumn(column, index) {\n setColumnData([].concat((0, _slice.default)(columnData, 0, index), [column]));\n }\n /**\n * Remove subsequent columns of the specified column\n * @param index\n */\n\n\n function romoveColumnByIndex(index) {\n setColumnData([].concat((0, _slice.default)(columnData, 0, index)));\n }\n\n function enforceUpdateColumnData(nextData) {\n var nextFlattenData = (0, _treeUtils.flattenTree)(nextData);\n setColumnData([nextFlattenData.filter(function (item) {\n return !item.parent;\n })]);\n }\n\n return {\n columnData: columnData,\n addColumn: addColumn,\n romoveColumnByIndex: romoveColumnByIndex,\n setColumnData: setColumnData,\n enforceUpdateColumnData: enforceUpdateColumnData\n };\n}\n/**\n * A hook that converts the value into a cascading value\n * @param props\n * @param flattenData\n */\n\n\nfunction useCascadeValue(props, flattenData) {\n var valueKey = props.valueKey,\n childrenKey = props.childrenKey,\n uncheckableItemValues = props.uncheckableItemValues,\n cascade = props.cascade,\n valueProp = props.value;\n /**\n * Get the values of all children\n */\n\n var getChildrenValue = (0, _react.useCallback)(function (item) {\n var values = [];\n\n if (!item[childrenKey]) {\n return values;\n }\n\n item[childrenKey].forEach(function (n) {\n if (uncheckableItemValues && !uncheckableItemValues.some(function (v) {\n return v === n[valueKey];\n })) {\n values.push(n[valueKey]);\n }\n\n values = values.concat(getChildrenValue(n));\n });\n return values;\n }, [childrenKey, uncheckableItemValues, valueKey]);\n var splitValue = (0, _react.useCallback)(function (item, checked, value) {\n var itemValue = item[valueKey];\n var childrenValue = getChildrenValue(item);\n var parents = getParents(item);\n var nextValue = [].concat(value);\n var removedValue = [];\n\n if (checked) {\n nextValue.push(itemValue); // Delete all values under the current node\n\n removedValue = removedValue.concat(removeAllChildrenValue(nextValue, item, {\n valueKey: valueKey,\n childrenKey: childrenKey\n }) || []); // Traverse all ancestor nodes of the current node\n // Then determine whether all the child nodes of these nodes are selected, and then they themselves must be selected\n\n var _loop = function _loop(i) {\n // Whether the parent node can be selected\n var isCheckableParent = !(uncheckableItemValues !== null && uncheckableItemValues !== void 0 && uncheckableItemValues.some(function (v) {\n return v === parents[i][valueKey];\n }));\n\n if (isCheckableParent) {\n var isCheckAll = parents[i][childrenKey] // Filter out options that are marked as not selectable\n .filter(function (n) {\n return !(uncheckableItemValues !== null && uncheckableItemValues !== void 0 && uncheckableItemValues.some(function (v) {\n return v === n[valueKey];\n }));\n }) // Check if all nodes are selected\n .every(function (n) {\n return nextValue.some(function (v) {\n return v === n[valueKey];\n });\n });\n\n if (isCheckAll) {\n // Add parent node value\n nextValue.push(parents[i][valueKey]); // Delete all values under the parent node\n\n removedValue = removedValue.concat(removeAllChildrenValue(nextValue, parents[i], {\n valueKey: valueKey,\n childrenKey: childrenKey\n }) || []);\n }\n }\n };\n\n for (var i = 0; i < parents.length; i++) {\n _loop(i);\n }\n } else {\n var tempValue = childrenValue.concat(parents.map(function (item) {\n return item[valueKey];\n }));\n nextValue = nextValue.concat(getOtherItemValuesByUnselectChild(item, nextValue, {\n valueKey: valueKey,\n childrenKey: childrenKey\n })); // Delete related child and parent nodes\n\n removedValue = (0, _remove.default)(nextValue, function (v) {\n // Delete yourself\n if (v === itemValue) {\n return true;\n }\n\n return tempValue.some(function (n) {\n return n === v;\n });\n });\n }\n\n var uniqValue = (0, _uniq.default)(nextValue);\n var uniqRemovedValue = (0, _uniq.default)(removedValue);\n return {\n value: uniqValue,\n removedValue: uniqRemovedValue\n };\n }, [valueKey, childrenKey, uncheckableItemValues, getChildrenValue]);\n var transformValue = (0, _react.useCallback)(function (value) {\n if (value === void 0) {\n value = [];\n }\n\n if (!cascade) {\n return value;\n }\n\n var tempRemovedValue = [];\n var nextValue = [];\n\n var _loop2 = function _loop2(i) {\n // If the value in the current value is already in the deleted list, it will not be processed\n if (tempRemovedValue.some(function (v) {\n return v === value[i];\n })) {\n return \"continue\";\n }\n\n var item = flattenData.find(function (v) {\n return v[valueKey] === value[i];\n });\n\n if (!item) {\n return \"continue\";\n }\n\n var sv = splitValue(item, true, value);\n tempRemovedValue = (0, _uniq.default)(tempRemovedValue.concat(sv.removedValue)); // Get all relevant values\n\n nextValue = (0, _uniq.default)(nextValue.concat(sv.value));\n };\n\n for (var i = 0; i < value.length; i++) {\n var _ret = _loop2(i);\n\n if (_ret === \"continue\") continue;\n } // Finally traverse all nextValue, and delete if its parent node is also nextValue\n\n\n return nextValue.filter(function (v) {\n var item = flattenData.find(function (n) {\n return n[valueKey] === v;\n });\n\n if (item !== null && item !== void 0 && item.parent && nextValue.some(function (v) {\n return v === item.parent && item.parent[valueKey];\n })) {\n return false;\n }\n\n return true;\n });\n }, [cascade, flattenData, splitValue, valueKey]);\n\n var _useState3 = (0, _react.useState)(transformValue(valueProp) || []),\n value = _useState3[0],\n setValue = _useState3[1];\n\n (0, _react.useEffect)(function () {\n // Update value when valueProp is updated.\n setValue(transformValue(valueProp) || []);\n }, [transformValue, valueProp]);\n return {\n value: value,\n setValue: setValue,\n splitValue: splitValue\n };\n}\n\n//# sourceURL=webpack://rsuite/./src/MultiCascader/utils.ts?");
3528
3528
 
3529
3529
  /***/ }),
3530
3530
 
@@ -9490,7 +9490,7 @@ eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs
9490
9490
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9491
9491
 
9492
9492
  "use strict";
9493
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FixedSizeGrid\": function() { return /* binding */ FixedSizeGrid; },\n/* harmony export */ \"FixedSizeList\": function() { return /* binding */ FixedSizeList; },\n/* harmony export */ \"VariableSizeGrid\": function() { return /* binding */ VariableSizeGrid; },\n/* harmony export */ \"VariableSizeList\": function() { return /* binding */ VariableSizeList; },\n/* harmony export */ \"areEqual\": function() { return /* binding */ areEqual; },\n/* harmony export */ \"shouldComponentUpdate\": function() { return /* binding */ shouldComponentUpdate; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! memoize-one */ \"./node_modules/memoize-one/dist/memoize-one.esm.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n\n\n\n\n\n\n\n// Animation frame based implementation of setTimeout.\n// Inspired by Joe Lambert, https://gist.github.com/joelambert/1002116#file-requesttimeout-js\nvar hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';\nvar now = hasNativePerformanceNow ? function () {\n return performance.now();\n} : function () {\n return Date.now();\n};\nfunction cancelTimeout(timeoutID) {\n cancelAnimationFrame(timeoutID.id);\n}\nfunction requestTimeout(callback, delay) {\n var start = now();\n\n function tick() {\n if (now() - start >= delay) {\n callback.call(null);\n } else {\n timeoutID.id = requestAnimationFrame(tick);\n }\n }\n\n var timeoutID = {\n id: requestAnimationFrame(tick)\n };\n return timeoutID;\n}\n\nvar size = -1; // This utility copied from \"dom-helpers\" package.\n\nfunction getScrollbarSize(recalculate) {\n if (recalculate === void 0) {\n recalculate = false;\n }\n\n if (size === -1 || recalculate) {\n var div = document.createElement('div');\n var style = div.style;\n style.width = '50px';\n style.height = '50px';\n style.overflow = 'scroll';\n document.body.appendChild(div);\n size = div.offsetWidth - div.clientWidth;\n document.body.removeChild(div);\n }\n\n return size;\n}\nvar cachedRTLResult = null; // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n// Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).\n// Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.\n// The safest way to check this is to intentionally set a negative offset,\n// and then verify that the subsequent \"scroll\" event matches the negative offset.\n// If it does not match, then we can assume a non-standard RTL scroll implementation.\n\nfunction getRTLOffsetType(recalculate) {\n if (recalculate === void 0) {\n recalculate = false;\n }\n\n if (cachedRTLResult === null || recalculate) {\n var outerDiv = document.createElement('div');\n var outerStyle = outerDiv.style;\n outerStyle.width = '50px';\n outerStyle.height = '50px';\n outerStyle.overflow = 'scroll';\n outerStyle.direction = 'rtl';\n var innerDiv = document.createElement('div');\n var innerStyle = innerDiv.style;\n innerStyle.width = '100px';\n innerStyle.height = '100px';\n outerDiv.appendChild(innerDiv);\n document.body.appendChild(outerDiv);\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = 'positive-descending';\n } else {\n outerDiv.scrollLeft = 1;\n\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = 'negative';\n } else {\n cachedRTLResult = 'positive-ascending';\n }\n }\n\n document.body.removeChild(outerDiv);\n return cachedRTLResult;\n }\n\n return cachedRTLResult;\n}\n\nvar IS_SCROLLING_DEBOUNCE_INTERVAL = 150;\n\nvar defaultItemKey = function defaultItemKey(_ref) {\n var columnIndex = _ref.columnIndex,\n data = _ref.data,\n rowIndex = _ref.rowIndex;\n return rowIndex + \":\" + columnIndex;\n}; // In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\n\n\nvar devWarningsOverscanCount = null;\nvar devWarningsOverscanRowsColumnsCount = null;\nvar devWarningsTagName = null;\n\nif (true) {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsOverscanCount = /*#__PURE__*/new WeakSet();\n devWarningsOverscanRowsColumnsCount = /*#__PURE__*/new WeakSet();\n devWarningsTagName = /*#__PURE__*/new WeakSet();\n }\n}\n\nfunction createGridComponent(_ref2) {\n var _class;\n\n var getColumnOffset = _ref2.getColumnOffset,\n getColumnStartIndexForOffset = _ref2.getColumnStartIndexForOffset,\n getColumnStopIndexForStartIndex = _ref2.getColumnStopIndexForStartIndex,\n getColumnWidth = _ref2.getColumnWidth,\n getEstimatedTotalHeight = _ref2.getEstimatedTotalHeight,\n getEstimatedTotalWidth = _ref2.getEstimatedTotalWidth,\n getOffsetForColumnAndAlignment = _ref2.getOffsetForColumnAndAlignment,\n getOffsetForRowAndAlignment = _ref2.getOffsetForRowAndAlignment,\n getRowHeight = _ref2.getRowHeight,\n getRowOffset = _ref2.getRowOffset,\n getRowStartIndexForOffset = _ref2.getRowStartIndexForOffset,\n getRowStopIndexForStartIndex = _ref2.getRowStopIndexForStartIndex,\n initInstanceProps = _ref2.initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange = _ref2.shouldResetStyleCacheOnItemSizeChange,\n validateProps = _ref2.validateProps;\n return _class = /*#__PURE__*/function (_PureComponent) {\n (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__.default)(Grid, _PureComponent);\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n function Grid(props) {\n var _this;\n\n _this = _PureComponent.call(this, props) || this;\n _this._instanceProps = initInstanceProps(_this.props, (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__.default)(_this));\n _this._resetIsScrollingTimeoutId = null;\n _this._outerRef = void 0;\n _this.state = {\n instance: (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__.default)(_this),\n isScrolling: false,\n horizontalScrollDirection: 'forward',\n scrollLeft: typeof _this.props.initialScrollLeft === 'number' ? _this.props.initialScrollLeft : 0,\n scrollTop: typeof _this.props.initialScrollTop === 'number' ? _this.props.initialScrollTop : 0,\n scrollUpdateWasRequested: false,\n verticalScrollDirection: 'forward'\n };\n _this._callOnItemsRendered = void 0;\n _this._callOnItemsRendered = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__.default)(function (overscanColumnStartIndex, overscanColumnStopIndex, overscanRowStartIndex, overscanRowStopIndex, visibleColumnStartIndex, visibleColumnStopIndex, visibleRowStartIndex, visibleRowStopIndex) {\n return _this.props.onItemsRendered({\n overscanColumnStartIndex: overscanColumnStartIndex,\n overscanColumnStopIndex: overscanColumnStopIndex,\n overscanRowStartIndex: overscanRowStartIndex,\n overscanRowStopIndex: overscanRowStopIndex,\n visibleColumnStartIndex: visibleColumnStartIndex,\n visibleColumnStopIndex: visibleColumnStopIndex,\n visibleRowStartIndex: visibleRowStartIndex,\n visibleRowStopIndex: visibleRowStopIndex\n });\n });\n _this._callOnScroll = void 0;\n _this._callOnScroll = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__.default)(function (scrollLeft, scrollTop, horizontalScrollDirection, verticalScrollDirection, scrollUpdateWasRequested) {\n return _this.props.onScroll({\n horizontalScrollDirection: horizontalScrollDirection,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n verticalScrollDirection: verticalScrollDirection,\n scrollUpdateWasRequested: scrollUpdateWasRequested\n });\n });\n _this._getItemStyle = void 0;\n\n _this._getItemStyle = function (rowIndex, columnIndex) {\n var _this$props = _this.props,\n columnWidth = _this$props.columnWidth,\n direction = _this$props.direction,\n rowHeight = _this$props.rowHeight;\n\n var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && columnWidth, shouldResetStyleCacheOnItemSizeChange && direction, shouldResetStyleCacheOnItemSizeChange && rowHeight);\n\n var key = rowIndex + \":\" + columnIndex;\n var style;\n\n if (itemStyleCache.hasOwnProperty(key)) {\n style = itemStyleCache[key];\n } else {\n var _offset = getColumnOffset(_this.props, columnIndex, _this._instanceProps);\n\n var isRtl = direction === 'rtl';\n itemStyleCache[key] = style = {\n position: 'absolute',\n left: isRtl ? undefined : _offset,\n right: isRtl ? _offset : undefined,\n top: getRowOffset(_this.props, rowIndex, _this._instanceProps),\n height: getRowHeight(_this.props, rowIndex, _this._instanceProps),\n width: getColumnWidth(_this.props, columnIndex, _this._instanceProps)\n };\n }\n\n return style;\n };\n\n _this._getItemStyleCache = void 0;\n _this._getItemStyleCache = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__.default)(function (_, __, ___) {\n return {};\n });\n\n _this._onScroll = function (event) {\n var _event$currentTarget = event.currentTarget,\n clientHeight = _event$currentTarget.clientHeight,\n clientWidth = _event$currentTarget.clientWidth,\n scrollLeft = _event$currentTarget.scrollLeft,\n scrollTop = _event$currentTarget.scrollTop,\n scrollHeight = _event$currentTarget.scrollHeight,\n scrollWidth = _event$currentTarget.scrollWidth;\n\n _this.setState(function (prevState) {\n if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n var direction = _this.props.direction; // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n\n var calculatedScrollLeft = scrollLeft;\n\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n calculatedScrollLeft = -scrollLeft;\n break;\n\n case 'positive-descending':\n calculatedScrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n calculatedScrollLeft = Math.max(0, Math.min(calculatedScrollLeft, scrollWidth - clientWidth));\n var calculatedScrollTop = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));\n return {\n isScrolling: true,\n horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: calculatedScrollLeft,\n scrollTop: calculatedScrollTop,\n verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward',\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._outerRefSetter = function (ref) {\n var outerRef = _this.props.outerRef;\n _this._outerRef = ref;\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('current')) {\n outerRef.current = ref;\n }\n };\n\n _this._resetIsScrollingDebounced = function () {\n if (_this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(_this._resetIsScrollingTimeoutId);\n }\n\n _this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL);\n };\n\n _this._resetIsScrolling = function () {\n _this._resetIsScrollingTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n }, function () {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n _this._getItemStyleCache(-1);\n });\n };\n\n return _this;\n }\n\n Grid.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n validateSharedProps(nextProps, prevState);\n validateProps(nextProps);\n return null;\n };\n\n var _proto = Grid.prototype;\n\n _proto.scrollTo = function scrollTo(_ref3) {\n var scrollLeft = _ref3.scrollLeft,\n scrollTop = _ref3.scrollTop;\n\n if (scrollLeft !== undefined) {\n scrollLeft = Math.max(0, scrollLeft);\n }\n\n if (scrollTop !== undefined) {\n scrollTop = Math.max(0, scrollTop);\n }\n\n this.setState(function (prevState) {\n if (scrollLeft === undefined) {\n scrollLeft = prevState.scrollLeft;\n }\n\n if (scrollTop === undefined) {\n scrollTop = prevState.scrollTop;\n }\n\n if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {\n return null;\n }\n\n return {\n horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollUpdateWasRequested: true,\n verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward'\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _proto.scrollToItem = function scrollToItem(_ref4) {\n var _ref4$align = _ref4.align,\n align = _ref4$align === void 0 ? 'auto' : _ref4$align,\n columnIndex = _ref4.columnIndex,\n rowIndex = _ref4.rowIndex;\n var _this$props2 = this.props,\n columnCount = _this$props2.columnCount,\n height = _this$props2.height,\n rowCount = _this$props2.rowCount,\n width = _this$props2.width;\n var _this$state = this.state,\n scrollLeft = _this$state.scrollLeft,\n scrollTop = _this$state.scrollTop;\n var scrollbarSize = getScrollbarSize();\n\n if (columnIndex !== undefined) {\n columnIndex = Math.max(0, Math.min(columnIndex, columnCount - 1));\n }\n\n if (rowIndex !== undefined) {\n rowIndex = Math.max(0, Math.min(rowIndex, rowCount - 1));\n }\n\n var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);\n var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps); // The scrollbar size should be considered when scrolling an item into view,\n // to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n\n var horizontalScrollbarSize = estimatedTotalWidth > width ? scrollbarSize : 0;\n var verticalScrollbarSize = estimatedTotalHeight > height ? scrollbarSize : 0;\n this.scrollTo({\n scrollLeft: columnIndex !== undefined ? getOffsetForColumnAndAlignment(this.props, columnIndex, align, scrollLeft, this._instanceProps, verticalScrollbarSize) : scrollLeft,\n scrollTop: rowIndex !== undefined ? getOffsetForRowAndAlignment(this.props, rowIndex, align, scrollTop, this._instanceProps, horizontalScrollbarSize) : scrollTop\n });\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props3 = this.props,\n initialScrollLeft = _this$props3.initialScrollLeft,\n initialScrollTop = _this$props3.initialScrollTop;\n\n if (this._outerRef != null) {\n var outerRef = this._outerRef;\n\n if (typeof initialScrollLeft === 'number') {\n outerRef.scrollLeft = initialScrollLeft;\n }\n\n if (typeof initialScrollTop === 'number') {\n outerRef.scrollTop = initialScrollTop;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var direction = this.props.direction;\n var _this$state2 = this.state,\n scrollLeft = _this$state2.scrollLeft,\n scrollTop = _this$state2.scrollTop,\n scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n var outerRef = this._outerRef;\n\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollLeft;\n break;\n\n case 'positive-ascending':\n outerRef.scrollLeft = scrollLeft;\n break;\n\n default:\n var clientWidth = outerRef.clientWidth,\n scrollWidth = outerRef.scrollWidth;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } else {\n outerRef.scrollLeft = Math.max(0, scrollLeft);\n }\n\n outerRef.scrollTop = Math.max(0, scrollTop);\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n };\n\n _proto.render = function render() {\n var _this$props4 = this.props,\n children = _this$props4.children,\n className = _this$props4.className,\n columnCount = _this$props4.columnCount,\n direction = _this$props4.direction,\n height = _this$props4.height,\n innerRef = _this$props4.innerRef,\n innerElementType = _this$props4.innerElementType,\n innerTagName = _this$props4.innerTagName,\n itemData = _this$props4.itemData,\n _this$props4$itemKey = _this$props4.itemKey,\n itemKey = _this$props4$itemKey === void 0 ? defaultItemKey : _this$props4$itemKey,\n outerElementType = _this$props4.outerElementType,\n outerTagName = _this$props4.outerTagName,\n rowCount = _this$props4.rowCount,\n style = _this$props4.style,\n useIsScrolling = _this$props4.useIsScrolling,\n width = _this$props4.width;\n var isScrolling = this.state.isScrolling;\n\n var _this$_getHorizontalR = this._getHorizontalRangeToRender(),\n columnStartIndex = _this$_getHorizontalR[0],\n columnStopIndex = _this$_getHorizontalR[1];\n\n var _this$_getVerticalRan = this._getVerticalRangeToRender(),\n rowStartIndex = _this$_getVerticalRan[0],\n rowStopIndex = _this$_getVerticalRan[1];\n\n var items = [];\n\n if (columnCount > 0 && rowCount) {\n for (var _rowIndex = rowStartIndex; _rowIndex <= rowStopIndex; _rowIndex++) {\n for (var _columnIndex = columnStartIndex; _columnIndex <= columnStopIndex; _columnIndex++) {\n items.push((0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(children, {\n columnIndex: _columnIndex,\n data: itemData,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n key: itemKey({\n columnIndex: _columnIndex,\n data: itemData,\n rowIndex: _rowIndex\n }),\n rowIndex: _rowIndex,\n style: this._getItemStyle(_rowIndex, _columnIndex)\n }));\n }\n }\n } // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n\n\n var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);\n var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps);\n return (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(outerElementType || outerTagName || 'div', {\n className: className,\n onScroll: this._onScroll,\n ref: this._outerRefSetter,\n style: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n position: 'relative',\n height: height,\n width: width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction: direction\n }, style)\n }, (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: estimatedTotalHeight,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: estimatedTotalWidth\n }\n }));\n };\n\n _proto._callPropsCallbacks = function _callPropsCallbacks() {\n var _this$props5 = this.props,\n columnCount = _this$props5.columnCount,\n onItemsRendered = _this$props5.onItemsRendered,\n onScroll = _this$props5.onScroll,\n rowCount = _this$props5.rowCount;\n\n if (typeof onItemsRendered === 'function') {\n if (columnCount > 0 && rowCount > 0) {\n var _this$_getHorizontalR2 = this._getHorizontalRangeToRender(),\n _overscanColumnStartIndex = _this$_getHorizontalR2[0],\n _overscanColumnStopIndex = _this$_getHorizontalR2[1],\n _visibleColumnStartIndex = _this$_getHorizontalR2[2],\n _visibleColumnStopIndex = _this$_getHorizontalR2[3];\n\n var _this$_getVerticalRan2 = this._getVerticalRangeToRender(),\n _overscanRowStartIndex = _this$_getVerticalRan2[0],\n _overscanRowStopIndex = _this$_getVerticalRan2[1],\n _visibleRowStartIndex = _this$_getVerticalRan2[2],\n _visibleRowStopIndex = _this$_getVerticalRan2[3];\n\n this._callOnItemsRendered(_overscanColumnStartIndex, _overscanColumnStopIndex, _overscanRowStartIndex, _overscanRowStopIndex, _visibleColumnStartIndex, _visibleColumnStopIndex, _visibleRowStartIndex, _visibleRowStopIndex);\n }\n }\n\n if (typeof onScroll === 'function') {\n var _this$state3 = this.state,\n _horizontalScrollDirection = _this$state3.horizontalScrollDirection,\n _scrollLeft = _this$state3.scrollLeft,\n _scrollTop = _this$state3.scrollTop,\n _scrollUpdateWasRequested = _this$state3.scrollUpdateWasRequested,\n _verticalScrollDirection = _this$state3.verticalScrollDirection;\n\n this._callOnScroll(_scrollLeft, _scrollTop, _horizontalScrollDirection, _verticalScrollDirection, _scrollUpdateWasRequested);\n }\n } // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n ;\n\n _proto._getHorizontalRangeToRender = function _getHorizontalRangeToRender() {\n var _this$props6 = this.props,\n columnCount = _this$props6.columnCount,\n overscanColumnCount = _this$props6.overscanColumnCount,\n overscanColumnsCount = _this$props6.overscanColumnsCount,\n overscanCount = _this$props6.overscanCount,\n rowCount = _this$props6.rowCount;\n var _this$state4 = this.state,\n horizontalScrollDirection = _this$state4.horizontalScrollDirection,\n isScrolling = _this$state4.isScrolling,\n scrollLeft = _this$state4.scrollLeft;\n var overscanCountResolved = overscanColumnCount || overscanColumnsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getColumnStartIndexForOffset(this.props, scrollLeft, this._instanceProps);\n var stopIndex = getColumnStopIndexForStartIndex(this.props, startIndex, scrollLeft, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || horizontalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;\n var overscanForward = !isScrolling || horizontalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(columnCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n _proto._getVerticalRangeToRender = function _getVerticalRangeToRender() {\n var _this$props7 = this.props,\n columnCount = _this$props7.columnCount,\n overscanCount = _this$props7.overscanCount,\n overscanRowCount = _this$props7.overscanRowCount,\n overscanRowsCount = _this$props7.overscanRowsCount,\n rowCount = _this$props7.rowCount;\n var _this$state5 = this.state,\n isScrolling = _this$state5.isScrolling,\n verticalScrollDirection = _this$state5.verticalScrollDirection,\n scrollTop = _this$state5.scrollTop;\n var overscanCountResolved = overscanRowCount || overscanRowsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getRowStartIndexForOffset(this.props, scrollTop, this._instanceProps);\n var stopIndex = getRowStopIndexForStartIndex(this.props, startIndex, scrollTop, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || verticalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;\n var overscanForward = !isScrolling || verticalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(rowCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n return Grid;\n }(react__WEBPACK_IMPORTED_MODULE_3__.PureComponent), _class.defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n useIsScrolling: false\n }, _class;\n}\n\nvar validateSharedProps = function validateSharedProps(_ref5, _ref6) {\n var children = _ref5.children,\n direction = _ref5.direction,\n height = _ref5.height,\n innerTagName = _ref5.innerTagName,\n outerTagName = _ref5.outerTagName,\n overscanColumnsCount = _ref5.overscanColumnsCount,\n overscanCount = _ref5.overscanCount,\n overscanRowsCount = _ref5.overscanRowsCount,\n width = _ref5.width;\n var instance = _ref6.instance;\n\n if (true) {\n if (typeof overscanCount === 'number') {\n if (devWarningsOverscanCount && !devWarningsOverscanCount.has(instance)) {\n devWarningsOverscanCount.add(instance);\n console.warn('The overscanCount prop has been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');\n }\n }\n\n if (typeof overscanColumnsCount === 'number' || typeof overscanRowsCount === 'number') {\n if (devWarningsOverscanRowsColumnsCount && !devWarningsOverscanRowsColumnsCount.has(instance)) {\n devWarningsOverscanRowsColumnsCount.add(instance);\n console.warn('The overscanColumnsCount and overscanRowsCount props have been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');\n }\n }\n\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName && !devWarningsTagName.has(instance)) {\n devWarningsTagName.add(instance);\n console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');\n }\n }\n\n if (children == null) {\n throw Error('An invalid \"children\" prop has been specified. ' + 'Value should be a React component. ' + (\"\\\"\" + (children === null ? 'null' : typeof children) + \"\\\" was specified.\"));\n }\n\n switch (direction) {\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"direction\" prop has been specified. ' + 'Value should be either \"ltr\" or \"rtl\". ' + (\"\\\"\" + direction + \"\\\" was specified.\"));\n }\n\n if (typeof width !== 'number') {\n throw Error('An invalid \"width\" prop has been specified. ' + 'Grids must specify a number for width. ' + (\"\\\"\" + (width === null ? 'null' : typeof width) + \"\\\" was specified.\"));\n }\n\n if (typeof height !== 'number') {\n throw Error('An invalid \"height\" prop has been specified. ' + 'Grids must specify a number for height. ' + (\"\\\"\" + (height === null ? 'null' : typeof height) + \"\\\" was specified.\"));\n }\n }\n};\n\nvar DEFAULT_ESTIMATED_ITEM_SIZE = 50;\n\nvar getEstimatedTotalHeight = function getEstimatedTotalHeight(_ref, _ref2) {\n var rowCount = _ref.rowCount;\n var rowMetadataMap = _ref2.rowMetadataMap,\n estimatedRowHeight = _ref2.estimatedRowHeight,\n lastMeasuredRowIndex = _ref2.lastMeasuredRowIndex;\n var totalSizeOfMeasuredRows = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredRowIndex >= rowCount) {\n lastMeasuredRowIndex = rowCount - 1;\n }\n\n if (lastMeasuredRowIndex >= 0) {\n var itemMetadata = rowMetadataMap[lastMeasuredRowIndex];\n totalSizeOfMeasuredRows = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = rowCount - lastMeasuredRowIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedRowHeight;\n return totalSizeOfMeasuredRows + totalSizeOfUnmeasuredItems;\n};\n\nvar getEstimatedTotalWidth = function getEstimatedTotalWidth(_ref3, _ref4) {\n var columnCount = _ref3.columnCount;\n var columnMetadataMap = _ref4.columnMetadataMap,\n estimatedColumnWidth = _ref4.estimatedColumnWidth,\n lastMeasuredColumnIndex = _ref4.lastMeasuredColumnIndex;\n var totalSizeOfMeasuredRows = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredColumnIndex >= columnCount) {\n lastMeasuredColumnIndex = columnCount - 1;\n }\n\n if (lastMeasuredColumnIndex >= 0) {\n var itemMetadata = columnMetadataMap[lastMeasuredColumnIndex];\n totalSizeOfMeasuredRows = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = columnCount - lastMeasuredColumnIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedColumnWidth;\n return totalSizeOfMeasuredRows + totalSizeOfUnmeasuredItems;\n};\n\nvar getItemMetadata = function getItemMetadata(itemType, props, index, instanceProps) {\n var itemMetadataMap, itemSize, lastMeasuredIndex;\n\n if (itemType === 'column') {\n itemMetadataMap = instanceProps.columnMetadataMap;\n itemSize = props.columnWidth;\n lastMeasuredIndex = instanceProps.lastMeasuredColumnIndex;\n } else {\n itemMetadataMap = instanceProps.rowMetadataMap;\n itemSize = props.rowHeight;\n lastMeasuredIndex = instanceProps.lastMeasuredRowIndex;\n }\n\n if (index > lastMeasuredIndex) {\n var offset = 0;\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n offset = itemMetadata.offset + itemMetadata.size;\n }\n\n for (var i = lastMeasuredIndex + 1; i <= index; i++) {\n var size = itemSize(i);\n itemMetadataMap[i] = {\n offset: offset,\n size: size\n };\n offset += size;\n }\n\n if (itemType === 'column') {\n instanceProps.lastMeasuredColumnIndex = index;\n } else {\n instanceProps.lastMeasuredRowIndex = index;\n }\n }\n\n return itemMetadataMap[index];\n};\n\nvar findNearestItem = function findNearestItem(itemType, props, instanceProps, offset) {\n var itemMetadataMap, lastMeasuredIndex;\n\n if (itemType === 'column') {\n itemMetadataMap = instanceProps.columnMetadataMap;\n lastMeasuredIndex = instanceProps.lastMeasuredColumnIndex;\n } else {\n itemMetadataMap = instanceProps.rowMetadataMap;\n lastMeasuredIndex = instanceProps.lastMeasuredRowIndex;\n }\n\n var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;\n\n if (lastMeasuredItemOffset >= offset) {\n // If we've already measured items within this range just use a binary search as it's faster.\n return findNearestItemBinarySearch(itemType, props, instanceProps, lastMeasuredIndex, 0, offset);\n } else {\n // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n // The exponential search avoids pre-computing sizes for the full set of items as a binary search would.\n // The overall complexity for this approach is O(log n).\n return findNearestItemExponentialSearch(itemType, props, instanceProps, Math.max(0, lastMeasuredIndex), offset);\n }\n};\n\nvar findNearestItemBinarySearch = function findNearestItemBinarySearch(itemType, props, instanceProps, high, low, offset) {\n while (low <= high) {\n var middle = low + Math.floor((high - low) / 2);\n var currentOffset = getItemMetadata(itemType, props, middle, instanceProps).offset;\n\n if (currentOffset === offset) {\n return middle;\n } else if (currentOffset < offset) {\n low = middle + 1;\n } else if (currentOffset > offset) {\n high = middle - 1;\n }\n }\n\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n};\n\nvar findNearestItemExponentialSearch = function findNearestItemExponentialSearch(itemType, props, instanceProps, index, offset) {\n var itemCount = itemType === 'column' ? props.columnCount : props.rowCount;\n var interval = 1;\n\n while (index < itemCount && getItemMetadata(itemType, props, index, instanceProps).offset < offset) {\n index += interval;\n interval *= 2;\n }\n\n return findNearestItemBinarySearch(itemType, props, instanceProps, Math.min(index, itemCount - 1), Math.floor(index / 2), offset);\n};\n\nvar getOffsetForIndexAndAlignment = function getOffsetForIndexAndAlignment(itemType, props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n var size = itemType === 'column' ? props.width : props.height;\n var itemMetadata = getItemMetadata(itemType, props, index, instanceProps); // Get estimated total size after ItemMetadata is computed,\n // To ensure it reflects actual measurements instead of just estimates.\n\n var estimatedTotalSize = itemType === 'column' ? getEstimatedTotalWidth(props, instanceProps) : getEstimatedTotalHeight(props, instanceProps);\n var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, itemMetadata.offset));\n var minOffset = Math.max(0, itemMetadata.offset - size + scrollbarSize + itemMetadata.size);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n return Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n};\n\nvar VariableSizeGrid = /*#__PURE__*/createGridComponent({\n getColumnOffset: function getColumnOffset(props, index, instanceProps) {\n return getItemMetadata('column', props, index, instanceProps).offset;\n },\n getColumnStartIndexForOffset: function getColumnStartIndexForOffset(props, scrollLeft, instanceProps) {\n return findNearestItem('column', props, instanceProps, scrollLeft);\n },\n getColumnStopIndexForStartIndex: function getColumnStopIndexForStartIndex(props, startIndex, scrollLeft, instanceProps) {\n var columnCount = props.columnCount,\n width = props.width;\n var itemMetadata = getItemMetadata('column', props, startIndex, instanceProps);\n var maxOffset = scrollLeft + width;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < columnCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata('column', props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n getColumnWidth: function getColumnWidth(props, index, instanceProps) {\n return instanceProps.columnMetadataMap[index].size;\n },\n getEstimatedTotalHeight: getEstimatedTotalHeight,\n getEstimatedTotalWidth: getEstimatedTotalWidth,\n getOffsetForColumnAndAlignment: function getOffsetForColumnAndAlignment(props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n return getOffsetForIndexAndAlignment('column', props, index, align, scrollOffset, instanceProps, scrollbarSize);\n },\n getOffsetForRowAndAlignment: function getOffsetForRowAndAlignment(props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n return getOffsetForIndexAndAlignment('row', props, index, align, scrollOffset, instanceProps, scrollbarSize);\n },\n getRowOffset: function getRowOffset(props, index, instanceProps) {\n return getItemMetadata('row', props, index, instanceProps).offset;\n },\n getRowHeight: function getRowHeight(props, index, instanceProps) {\n return instanceProps.rowMetadataMap[index].size;\n },\n getRowStartIndexForOffset: function getRowStartIndexForOffset(props, scrollTop, instanceProps) {\n return findNearestItem('row', props, instanceProps, scrollTop);\n },\n getRowStopIndexForStartIndex: function getRowStopIndexForStartIndex(props, startIndex, scrollTop, instanceProps) {\n var rowCount = props.rowCount,\n height = props.height;\n var itemMetadata = getItemMetadata('row', props, startIndex, instanceProps);\n var maxOffset = scrollTop + height;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < rowCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata('row', props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n initInstanceProps: function initInstanceProps(props, instance) {\n var _ref5 = props,\n estimatedColumnWidth = _ref5.estimatedColumnWidth,\n estimatedRowHeight = _ref5.estimatedRowHeight;\n var instanceProps = {\n columnMetadataMap: {},\n estimatedColumnWidth: estimatedColumnWidth || DEFAULT_ESTIMATED_ITEM_SIZE,\n estimatedRowHeight: estimatedRowHeight || DEFAULT_ESTIMATED_ITEM_SIZE,\n lastMeasuredColumnIndex: -1,\n lastMeasuredRowIndex: -1,\n rowMetadataMap: {}\n };\n\n instance.resetAfterColumnIndex = function (columnIndex, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instance.resetAfterIndices({\n columnIndex: columnIndex,\n shouldForceUpdate: shouldForceUpdate\n });\n };\n\n instance.resetAfterRowIndex = function (rowIndex, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instance.resetAfterIndices({\n rowIndex: rowIndex,\n shouldForceUpdate: shouldForceUpdate\n });\n };\n\n instance.resetAfterIndices = function (_ref6) {\n var columnIndex = _ref6.columnIndex,\n rowIndex = _ref6.rowIndex,\n _ref6$shouldForceUpda = _ref6.shouldForceUpdate,\n shouldForceUpdate = _ref6$shouldForceUpda === void 0 ? true : _ref6$shouldForceUpda;\n\n if (typeof columnIndex === 'number') {\n instanceProps.lastMeasuredColumnIndex = Math.min(instanceProps.lastMeasuredColumnIndex, columnIndex - 1);\n }\n\n if (typeof rowIndex === 'number') {\n instanceProps.lastMeasuredRowIndex = Math.min(instanceProps.lastMeasuredRowIndex, rowIndex - 1);\n } // We could potentially optimize further by only evicting styles after this index,\n // But since styles are only cached while scrolling is in progress-\n // It seems an unnecessary optimization.\n // It's unlikely that resetAfterIndex() will be called while a user is scrolling.\n\n\n instance._getItemStyleCache(-1);\n\n if (shouldForceUpdate) {\n instance.forceUpdate();\n }\n };\n\n return instanceProps;\n },\n shouldResetStyleCacheOnItemSizeChange: false,\n validateProps: function validateProps(_ref7) {\n var columnWidth = _ref7.columnWidth,\n rowHeight = _ref7.rowHeight;\n\n if (true) {\n if (typeof columnWidth !== 'function') {\n throw Error('An invalid \"columnWidth\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (columnWidth === null ? 'null' : typeof columnWidth) + \"\\\" was specified.\"));\n } else if (typeof rowHeight !== 'function') {\n throw Error('An invalid \"rowHeight\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (rowHeight === null ? 'null' : typeof rowHeight) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\nvar IS_SCROLLING_DEBOUNCE_INTERVAL$1 = 150;\n\nvar defaultItemKey$1 = function defaultItemKey(index, data) {\n return index;\n}; // In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\n\n\nvar devWarningsDirection = null;\nvar devWarningsTagName$1 = null;\n\nif (true) {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsDirection = /*#__PURE__*/new WeakSet();\n devWarningsTagName$1 = /*#__PURE__*/new WeakSet();\n }\n}\n\nfunction createListComponent(_ref) {\n var _class;\n\n var getItemOffset = _ref.getItemOffset,\n getEstimatedTotalSize = _ref.getEstimatedTotalSize,\n getItemSize = _ref.getItemSize,\n getOffsetForIndexAndAlignment = _ref.getOffsetForIndexAndAlignment,\n getStartIndexForOffset = _ref.getStartIndexForOffset,\n getStopIndexForStartIndex = _ref.getStopIndexForStartIndex,\n initInstanceProps = _ref.initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange = _ref.shouldResetStyleCacheOnItemSizeChange,\n validateProps = _ref.validateProps;\n return _class = /*#__PURE__*/function (_PureComponent) {\n (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__.default)(List, _PureComponent);\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n function List(props) {\n var _this;\n\n _this = _PureComponent.call(this, props) || this;\n _this._instanceProps = initInstanceProps(_this.props, (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__.default)(_this));\n _this._outerRef = void 0;\n _this._resetIsScrollingTimeoutId = null;\n _this.state = {\n instance: (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__.default)(_this),\n isScrolling: false,\n scrollDirection: 'forward',\n scrollOffset: typeof _this.props.initialScrollOffset === 'number' ? _this.props.initialScrollOffset : 0,\n scrollUpdateWasRequested: false\n };\n _this._callOnItemsRendered = void 0;\n _this._callOnItemsRendered = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__.default)(function (overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) {\n return _this.props.onItemsRendered({\n overscanStartIndex: overscanStartIndex,\n overscanStopIndex: overscanStopIndex,\n visibleStartIndex: visibleStartIndex,\n visibleStopIndex: visibleStopIndex\n });\n });\n _this._callOnScroll = void 0;\n _this._callOnScroll = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__.default)(function (scrollDirection, scrollOffset, scrollUpdateWasRequested) {\n return _this.props.onScroll({\n scrollDirection: scrollDirection,\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: scrollUpdateWasRequested\n });\n });\n _this._getItemStyle = void 0;\n\n _this._getItemStyle = function (index) {\n var _this$props = _this.props,\n direction = _this$props.direction,\n itemSize = _this$props.itemSize,\n layout = _this$props.layout;\n\n var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize, shouldResetStyleCacheOnItemSizeChange && layout, shouldResetStyleCacheOnItemSizeChange && direction);\n\n var style;\n\n if (itemStyleCache.hasOwnProperty(index)) {\n style = itemStyleCache[index];\n } else {\n var _offset = getItemOffset(_this.props, index, _this._instanceProps);\n\n var size = getItemSize(_this.props, index, _this._instanceProps); // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var isRtl = direction === 'rtl';\n var offsetHorizontal = isHorizontal ? _offset : 0;\n itemStyleCache[index] = style = {\n position: 'absolute',\n left: isRtl ? undefined : offsetHorizontal,\n right: isRtl ? offsetHorizontal : undefined,\n top: !isHorizontal ? _offset : 0,\n height: !isHorizontal ? size : '100%',\n width: isHorizontal ? size : '100%'\n };\n }\n\n return style;\n };\n\n _this._getItemStyleCache = void 0;\n _this._getItemStyleCache = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__.default)(function (_, __, ___) {\n return {};\n });\n\n _this._onScrollHorizontal = function (event) {\n var _event$currentTarget = event.currentTarget,\n clientWidth = _event$currentTarget.clientWidth,\n scrollLeft = _event$currentTarget.scrollLeft,\n scrollWidth = _event$currentTarget.scrollWidth;\n\n _this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollLeft) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n var direction = _this.props.direction;\n var scrollOffset = scrollLeft;\n\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n switch (getRTLOffsetType()) {\n case 'negative':\n scrollOffset = -scrollLeft;\n break;\n\n case 'positive-descending':\n scrollOffset = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollLeft ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._onScrollVertical = function (event) {\n var _event$currentTarget2 = event.currentTarget,\n clientHeight = _event$currentTarget2.clientHeight,\n scrollHeight = _event$currentTarget2.scrollHeight,\n scrollTop = _event$currentTarget2.scrollTop;\n\n _this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollTop) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n var scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._outerRefSetter = function (ref) {\n var outerRef = _this.props.outerRef;\n _this._outerRef = ref;\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('current')) {\n outerRef.current = ref;\n }\n };\n\n _this._resetIsScrollingDebounced = function () {\n if (_this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(_this._resetIsScrollingTimeoutId);\n }\n\n _this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL$1);\n };\n\n _this._resetIsScrolling = function () {\n _this._resetIsScrollingTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n }, function () {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n _this._getItemStyleCache(-1, null);\n });\n };\n\n return _this;\n }\n\n List.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n validateSharedProps$1(nextProps, prevState);\n validateProps(nextProps);\n return null;\n };\n\n var _proto = List.prototype;\n\n _proto.scrollTo = function scrollTo(scrollOffset) {\n scrollOffset = Math.max(0, scrollOffset);\n this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollOffset) {\n return null;\n }\n\n return {\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: true\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _proto.scrollToItem = function scrollToItem(index, align) {\n if (align === void 0) {\n align = 'auto';\n }\n\n var itemCount = this.props.itemCount;\n var scrollOffset = this.state.scrollOffset;\n index = Math.max(0, Math.min(index, itemCount - 1));\n this.scrollTo(getOffsetForIndexAndAlignment(this.props, index, align, scrollOffset, this._instanceProps));\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props2 = this.props,\n direction = _this$props2.direction,\n initialScrollOffset = _this$props2.initialScrollOffset,\n layout = _this$props2.layout;\n\n if (typeof initialScrollOffset === 'number' && this._outerRef != null) {\n var outerRef = this._outerRef; // TODO Deprecate direction \"horizontal\"\n\n if (direction === 'horizontal' || layout === 'horizontal') {\n outerRef.scrollLeft = initialScrollOffset;\n } else {\n outerRef.scrollTop = initialScrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var _this$props3 = this.props,\n direction = _this$props3.direction,\n layout = _this$props3.layout;\n var _this$state = this.state,\n scrollOffset = _this$state.scrollOffset,\n scrollUpdateWasRequested = _this$state.scrollUpdateWasRequested;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n var outerRef = this._outerRef; // TODO Deprecate direction \"horizontal\"\n\n if (direction === 'horizontal' || layout === 'horizontal') {\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollOffset;\n break;\n\n case 'positive-ascending':\n outerRef.scrollLeft = scrollOffset;\n break;\n\n default:\n var clientWidth = outerRef.clientWidth,\n scrollWidth = outerRef.scrollWidth;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;\n break;\n }\n } else {\n outerRef.scrollLeft = scrollOffset;\n }\n } else {\n outerRef.scrollTop = scrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n };\n\n _proto.render = function render() {\n var _this$props4 = this.props,\n children = _this$props4.children,\n className = _this$props4.className,\n direction = _this$props4.direction,\n height = _this$props4.height,\n innerRef = _this$props4.innerRef,\n innerElementType = _this$props4.innerElementType,\n innerTagName = _this$props4.innerTagName,\n itemCount = _this$props4.itemCount,\n itemData = _this$props4.itemData,\n _this$props4$itemKey = _this$props4.itemKey,\n itemKey = _this$props4$itemKey === void 0 ? defaultItemKey$1 : _this$props4$itemKey,\n layout = _this$props4.layout,\n outerElementType = _this$props4.outerElementType,\n outerTagName = _this$props4.outerTagName,\n style = _this$props4.style,\n useIsScrolling = _this$props4.useIsScrolling,\n width = _this$props4.width;\n var isScrolling = this.state.isScrolling; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var onScroll = isHorizontal ? this._onScrollHorizontal : this._onScrollVertical;\n\n var _this$_getRangeToRend = this._getRangeToRender(),\n startIndex = _this$_getRangeToRend[0],\n stopIndex = _this$_getRangeToRend[1];\n\n var items = [];\n\n if (itemCount > 0) {\n for (var _index = startIndex; _index <= stopIndex; _index++) {\n items.push((0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(children, {\n data: itemData,\n key: itemKey(_index, itemData),\n index: _index,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n style: this._getItemStyle(_index)\n }));\n }\n } // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n\n\n var estimatedTotalSize = getEstimatedTotalSize(this.props, this._instanceProps);\n return (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(outerElementType || outerTagName || 'div', {\n className: className,\n onScroll: onScroll,\n ref: this._outerRefSetter,\n style: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n position: 'relative',\n height: height,\n width: width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction: direction\n }, style)\n }, (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: isHorizontal ? '100%' : estimatedTotalSize,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: isHorizontal ? estimatedTotalSize : '100%'\n }\n }));\n };\n\n _proto._callPropsCallbacks = function _callPropsCallbacks() {\n if (typeof this.props.onItemsRendered === 'function') {\n var itemCount = this.props.itemCount;\n\n if (itemCount > 0) {\n var _this$_getRangeToRend2 = this._getRangeToRender(),\n _overscanStartIndex = _this$_getRangeToRend2[0],\n _overscanStopIndex = _this$_getRangeToRend2[1],\n _visibleStartIndex = _this$_getRangeToRend2[2],\n _visibleStopIndex = _this$_getRangeToRend2[3];\n\n this._callOnItemsRendered(_overscanStartIndex, _overscanStopIndex, _visibleStartIndex, _visibleStopIndex);\n }\n }\n\n if (typeof this.props.onScroll === 'function') {\n var _this$state2 = this.state,\n _scrollDirection = _this$state2.scrollDirection,\n _scrollOffset = _this$state2.scrollOffset,\n _scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;\n\n this._callOnScroll(_scrollDirection, _scrollOffset, _scrollUpdateWasRequested);\n }\n } // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n ;\n\n _proto._getRangeToRender = function _getRangeToRender() {\n var _this$props5 = this.props,\n itemCount = _this$props5.itemCount,\n overscanCount = _this$props5.overscanCount;\n var _this$state3 = this.state,\n isScrolling = _this$state3.isScrolling,\n scrollDirection = _this$state3.scrollDirection,\n scrollOffset = _this$state3.scrollOffset;\n\n if (itemCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getStartIndexForOffset(this.props, scrollOffset, this._instanceProps);\n var stopIndex = getStopIndexForStartIndex(this.props, startIndex, scrollOffset, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || scrollDirection === 'backward' ? Math.max(1, overscanCount) : 1;\n var overscanForward = !isScrolling || scrollDirection === 'forward' ? Math.max(1, overscanCount) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n return List;\n }(react__WEBPACK_IMPORTED_MODULE_3__.PureComponent), _class.defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n layout: 'vertical',\n overscanCount: 2,\n useIsScrolling: false\n }, _class;\n} // NOTE: I considered further wrapping individual items with a pure ListItem component.\n// This would avoid ever calling the render function for the same index more than once,\n// But it would also add the overhead of a lot of components/fibers.\n// I assume people already do this (render function returning a class component),\n// So my doing it would just unnecessarily double the wrappers.\n\nvar validateSharedProps$1 = function validateSharedProps(_ref2, _ref3) {\n var children = _ref2.children,\n direction = _ref2.direction,\n height = _ref2.height,\n layout = _ref2.layout,\n innerTagName = _ref2.innerTagName,\n outerTagName = _ref2.outerTagName,\n width = _ref2.width;\n var instance = _ref3.instance;\n\n if (true) {\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName$1 && !devWarningsTagName$1.has(instance)) {\n devWarningsTagName$1.add(instance);\n console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');\n }\n } // TODO Deprecate direction \"horizontal\"\n\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n\n switch (direction) {\n case 'horizontal':\n case 'vertical':\n if (devWarningsDirection && !devWarningsDirection.has(instance)) {\n devWarningsDirection.add(instance);\n console.warn('The direction prop should be either \"ltr\" (default) or \"rtl\". ' + 'Please use the layout prop to specify \"vertical\" (default) or \"horizontal\" orientation.');\n }\n\n break;\n\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"direction\" prop has been specified. ' + 'Value should be either \"ltr\" or \"rtl\". ' + (\"\\\"\" + direction + \"\\\" was specified.\"));\n }\n\n switch (layout) {\n case 'horizontal':\n case 'vertical':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"layout\" prop has been specified. ' + 'Value should be either \"horizontal\" or \"vertical\". ' + (\"\\\"\" + layout + \"\\\" was specified.\"));\n }\n\n if (children == null) {\n throw Error('An invalid \"children\" prop has been specified. ' + 'Value should be a React component. ' + (\"\\\"\" + (children === null ? 'null' : typeof children) + \"\\\" was specified.\"));\n }\n\n if (isHorizontal && typeof width !== 'number') {\n throw Error('An invalid \"width\" prop has been specified. ' + 'Horizontal lists must specify a number for width. ' + (\"\\\"\" + (width === null ? 'null' : typeof width) + \"\\\" was specified.\"));\n } else if (!isHorizontal && typeof height !== 'number') {\n throw Error('An invalid \"height\" prop has been specified. ' + 'Vertical lists must specify a number for height. ' + (\"\\\"\" + (height === null ? 'null' : typeof height) + \"\\\" was specified.\"));\n }\n }\n};\n\nvar DEFAULT_ESTIMATED_ITEM_SIZE$1 = 50;\n\nvar getItemMetadata$1 = function getItemMetadata(props, index, instanceProps) {\n var _ref = props,\n itemSize = _ref.itemSize;\n var itemMetadataMap = instanceProps.itemMetadataMap,\n lastMeasuredIndex = instanceProps.lastMeasuredIndex;\n\n if (index > lastMeasuredIndex) {\n var offset = 0;\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n offset = itemMetadata.offset + itemMetadata.size;\n }\n\n for (var i = lastMeasuredIndex + 1; i <= index; i++) {\n var size = itemSize(i);\n itemMetadataMap[i] = {\n offset: offset,\n size: size\n };\n offset += size;\n }\n\n instanceProps.lastMeasuredIndex = index;\n }\n\n return itemMetadataMap[index];\n};\n\nvar findNearestItem$1 = function findNearestItem(props, instanceProps, offset) {\n var itemMetadataMap = instanceProps.itemMetadataMap,\n lastMeasuredIndex = instanceProps.lastMeasuredIndex;\n var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;\n\n if (lastMeasuredItemOffset >= offset) {\n // If we've already measured items within this range just use a binary search as it's faster.\n return findNearestItemBinarySearch$1(props, instanceProps, lastMeasuredIndex, 0, offset);\n } else {\n // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n // The exponential search avoids pre-computing sizes for the full set of items as a binary search would.\n // The overall complexity for this approach is O(log n).\n return findNearestItemExponentialSearch$1(props, instanceProps, Math.max(0, lastMeasuredIndex), offset);\n }\n};\n\nvar findNearestItemBinarySearch$1 = function findNearestItemBinarySearch(props, instanceProps, high, low, offset) {\n while (low <= high) {\n var middle = low + Math.floor((high - low) / 2);\n var currentOffset = getItemMetadata$1(props, middle, instanceProps).offset;\n\n if (currentOffset === offset) {\n return middle;\n } else if (currentOffset < offset) {\n low = middle + 1;\n } else if (currentOffset > offset) {\n high = middle - 1;\n }\n }\n\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n};\n\nvar findNearestItemExponentialSearch$1 = function findNearestItemExponentialSearch(props, instanceProps, index, offset) {\n var itemCount = props.itemCount;\n var interval = 1;\n\n while (index < itemCount && getItemMetadata$1(props, index, instanceProps).offset < offset) {\n index += interval;\n interval *= 2;\n }\n\n return findNearestItemBinarySearch$1(props, instanceProps, Math.min(index, itemCount - 1), Math.floor(index / 2), offset);\n};\n\nvar getEstimatedTotalSize = function getEstimatedTotalSize(_ref2, _ref3) {\n var itemCount = _ref2.itemCount;\n var itemMetadataMap = _ref3.itemMetadataMap,\n estimatedItemSize = _ref3.estimatedItemSize,\n lastMeasuredIndex = _ref3.lastMeasuredIndex;\n var totalSizeOfMeasuredItems = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredIndex >= itemCount) {\n lastMeasuredIndex = itemCount - 1;\n }\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n totalSizeOfMeasuredItems = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = itemCount - lastMeasuredIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize;\n return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;\n};\n\nvar VariableSizeList = /*#__PURE__*/createListComponent({\n getItemOffset: function getItemOffset(props, index, instanceProps) {\n return getItemMetadata$1(props, index, instanceProps).offset;\n },\n getItemSize: function getItemSize(props, index, instanceProps) {\n return instanceProps.itemMetadataMap[index].size;\n },\n getEstimatedTotalSize: getEstimatedTotalSize,\n getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment(props, index, align, scrollOffset, instanceProps) {\n var direction = props.direction,\n height = props.height,\n layout = props.layout,\n width = props.width; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var itemMetadata = getItemMetadata$1(props, index, instanceProps); // Get estimated total size after ItemMetadata is computed,\n // To ensure it reflects actual measurements instead of just estimates.\n\n var estimatedTotalSize = getEstimatedTotalSize(props, instanceProps);\n var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, itemMetadata.offset));\n var minOffset = Math.max(0, itemMetadata.offset - size + itemMetadata.size);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n return Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getStartIndexForOffset: function getStartIndexForOffset(props, offset, instanceProps) {\n return findNearestItem$1(props, instanceProps, offset);\n },\n getStopIndexForStartIndex: function getStopIndexForStartIndex(props, startIndex, scrollOffset, instanceProps) {\n var direction = props.direction,\n height = props.height,\n itemCount = props.itemCount,\n layout = props.layout,\n width = props.width; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var itemMetadata = getItemMetadata$1(props, startIndex, instanceProps);\n var maxOffset = scrollOffset + size;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < itemCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata$1(props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n initInstanceProps: function initInstanceProps(props, instance) {\n var _ref4 = props,\n estimatedItemSize = _ref4.estimatedItemSize;\n var instanceProps = {\n itemMetadataMap: {},\n estimatedItemSize: estimatedItemSize || DEFAULT_ESTIMATED_ITEM_SIZE$1,\n lastMeasuredIndex: -1\n };\n\n instance.resetAfterIndex = function (index, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instanceProps.lastMeasuredIndex = Math.min(instanceProps.lastMeasuredIndex, index - 1); // We could potentially optimize further by only evicting styles after this index,\n // But since styles are only cached while scrolling is in progress-\n // It seems an unnecessary optimization.\n // It's unlikely that resetAfterIndex() will be called while a user is scrolling.\n\n instance._getItemStyleCache(-1);\n\n if (shouldForceUpdate) {\n instance.forceUpdate();\n }\n };\n\n return instanceProps;\n },\n shouldResetStyleCacheOnItemSizeChange: false,\n validateProps: function validateProps(_ref5) {\n var itemSize = _ref5.itemSize;\n\n if (true) {\n if (typeof itemSize !== 'function') {\n throw Error('An invalid \"itemSize\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (itemSize === null ? 'null' : typeof itemSize) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\nvar FixedSizeGrid = /*#__PURE__*/createGridComponent({\n getColumnOffset: function getColumnOffset(_ref, index) {\n var columnWidth = _ref.columnWidth;\n return index * columnWidth;\n },\n getColumnWidth: function getColumnWidth(_ref2, index) {\n var columnWidth = _ref2.columnWidth;\n return columnWidth;\n },\n getRowOffset: function getRowOffset(_ref3, index) {\n var rowHeight = _ref3.rowHeight;\n return index * rowHeight;\n },\n getRowHeight: function getRowHeight(_ref4, index) {\n var rowHeight = _ref4.rowHeight;\n return rowHeight;\n },\n getEstimatedTotalHeight: function getEstimatedTotalHeight(_ref5) {\n var rowCount = _ref5.rowCount,\n rowHeight = _ref5.rowHeight;\n return rowHeight * rowCount;\n },\n getEstimatedTotalWidth: function getEstimatedTotalWidth(_ref6) {\n var columnCount = _ref6.columnCount,\n columnWidth = _ref6.columnWidth;\n return columnWidth * columnCount;\n },\n getOffsetForColumnAndAlignment: function getOffsetForColumnAndAlignment(_ref7, columnIndex, align, scrollLeft, instanceProps, scrollbarSize) {\n var columnCount = _ref7.columnCount,\n columnWidth = _ref7.columnWidth,\n width = _ref7.width;\n var lastColumnOffset = Math.max(0, columnCount * columnWidth - width);\n var maxOffset = Math.min(lastColumnOffset, columnIndex * columnWidth);\n var minOffset = Math.max(0, columnIndex * columnWidth - width + scrollbarSize + columnWidth);\n\n if (align === 'smart') {\n if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(width / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) {\n return lastColumnOffset; // near the end\n } else {\n return middleOffset;\n }\n\n case 'auto':\n default:\n if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {\n return scrollLeft;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollLeft < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getOffsetForRowAndAlignment: function getOffsetForRowAndAlignment(_ref8, rowIndex, align, scrollTop, instanceProps, scrollbarSize) {\n var rowHeight = _ref8.rowHeight,\n height = _ref8.height,\n rowCount = _ref8.rowCount;\n var lastRowOffset = Math.max(0, rowCount * rowHeight - height);\n var maxOffset = Math.min(lastRowOffset, rowIndex * rowHeight);\n var minOffset = Math.max(0, rowIndex * rowHeight - height + scrollbarSize + rowHeight);\n\n if (align === 'smart') {\n if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(height / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastRowOffset + Math.floor(height / 2)) {\n return lastRowOffset; // near the end\n } else {\n return middleOffset;\n }\n\n case 'auto':\n default:\n if (scrollTop >= minOffset && scrollTop <= maxOffset) {\n return scrollTop;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollTop < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getColumnStartIndexForOffset: function getColumnStartIndexForOffset(_ref9, scrollLeft) {\n var columnWidth = _ref9.columnWidth,\n columnCount = _ref9.columnCount;\n return Math.max(0, Math.min(columnCount - 1, Math.floor(scrollLeft / columnWidth)));\n },\n getColumnStopIndexForStartIndex: function getColumnStopIndexForStartIndex(_ref10, startIndex, scrollLeft) {\n var columnWidth = _ref10.columnWidth,\n columnCount = _ref10.columnCount,\n width = _ref10.width;\n var left = startIndex * columnWidth;\n var numVisibleColumns = Math.ceil((width + scrollLeft - left) / columnWidth);\n return Math.max(0, Math.min(columnCount - 1, startIndex + numVisibleColumns - 1 // -1 is because stop index is inclusive\n ));\n },\n getRowStartIndexForOffset: function getRowStartIndexForOffset(_ref11, scrollTop) {\n var rowHeight = _ref11.rowHeight,\n rowCount = _ref11.rowCount;\n return Math.max(0, Math.min(rowCount - 1, Math.floor(scrollTop / rowHeight)));\n },\n getRowStopIndexForStartIndex: function getRowStopIndexForStartIndex(_ref12, startIndex, scrollTop) {\n var rowHeight = _ref12.rowHeight,\n rowCount = _ref12.rowCount,\n height = _ref12.height;\n var top = startIndex * rowHeight;\n var numVisibleRows = Math.ceil((height + scrollTop - top) / rowHeight);\n return Math.max(0, Math.min(rowCount - 1, startIndex + numVisibleRows - 1 // -1 is because stop index is inclusive\n ));\n },\n initInstanceProps: function initInstanceProps(props) {// Noop\n },\n shouldResetStyleCacheOnItemSizeChange: true,\n validateProps: function validateProps(_ref13) {\n var columnWidth = _ref13.columnWidth,\n rowHeight = _ref13.rowHeight;\n\n if (true) {\n if (typeof columnWidth !== 'number') {\n throw Error('An invalid \"columnWidth\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (columnWidth === null ? 'null' : typeof columnWidth) + \"\\\" was specified.\"));\n }\n\n if (typeof rowHeight !== 'number') {\n throw Error('An invalid \"rowHeight\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (rowHeight === null ? 'null' : typeof rowHeight) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\nvar FixedSizeList = /*#__PURE__*/createListComponent({\n getItemOffset: function getItemOffset(_ref, index) {\n var itemSize = _ref.itemSize;\n return index * itemSize;\n },\n getItemSize: function getItemSize(_ref2, index) {\n var itemSize = _ref2.itemSize;\n return itemSize;\n },\n getEstimatedTotalSize: function getEstimatedTotalSize(_ref3) {\n var itemCount = _ref3.itemCount,\n itemSize = _ref3.itemSize;\n return itemSize * itemCount;\n },\n getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment(_ref4, index, align, scrollOffset) {\n var direction = _ref4.direction,\n height = _ref4.height,\n itemCount = _ref4.itemCount,\n itemSize = _ref4.itemSize,\n layout = _ref4.layout,\n width = _ref4.width;\n // TODO Deprecate direction \"horizontal\"\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var lastItemOffset = Math.max(0, itemCount * itemSize - size);\n var maxOffset = Math.min(lastItemOffset, index * itemSize);\n var minOffset = Math.max(0, index * itemSize - size + itemSize);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n {\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(size / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastItemOffset + Math.floor(size / 2)) {\n return lastItemOffset; // near the end\n } else {\n return middleOffset;\n }\n }\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getStartIndexForOffset: function getStartIndexForOffset(_ref5, offset) {\n var itemCount = _ref5.itemCount,\n itemSize = _ref5.itemSize;\n return Math.max(0, Math.min(itemCount - 1, Math.floor(offset / itemSize)));\n },\n getStopIndexForStartIndex: function getStopIndexForStartIndex(_ref6, startIndex, scrollOffset) {\n var direction = _ref6.direction,\n height = _ref6.height,\n itemCount = _ref6.itemCount,\n itemSize = _ref6.itemSize,\n layout = _ref6.layout,\n width = _ref6.width;\n // TODO Deprecate direction \"horizontal\"\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var offset = startIndex * itemSize;\n var size = isHorizontal ? width : height;\n var numVisibleItems = Math.ceil((size + scrollOffset - offset) / itemSize);\n return Math.max(0, Math.min(itemCount - 1, startIndex + numVisibleItems - 1 // -1 is because stop index is inclusive\n ));\n },\n initInstanceProps: function initInstanceProps(props) {// Noop\n },\n shouldResetStyleCacheOnItemSizeChange: true,\n validateProps: function validateProps(_ref7) {\n var itemSize = _ref7.itemSize;\n\n if (true) {\n if (typeof itemSize !== 'number') {\n throw Error('An invalid \"itemSize\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (itemSize === null ? 'null' : typeof itemSize) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\n// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(prev, next) {\n for (var attribute in prev) {\n if (!(attribute in next)) {\n return true;\n }\n }\n\n for (var _attribute in next) {\n if (prev[_attribute] !== next[_attribute]) {\n return true;\n }\n }\n\n return false;\n}\n\nvar _excluded = [\"style\"],\n _excluded2 = [\"style\"];\n// It knows to compare individual style props and ignore the wrapper object.\n// See https://reactjs.org/docs/react-api.html#reactmemo\n\nfunction areEqual(prevProps, nextProps) {\n var prevStyle = prevProps.style,\n prevRest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_4__.default)(prevProps, _excluded);\n\n var nextStyle = nextProps.style,\n nextRest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_4__.default)(nextProps, _excluded2);\n\n return !shallowDiffers(prevStyle, nextStyle) && !shallowDiffers(prevRest, nextRest);\n}\n\n// It knows to compare individual style props and ignore the wrapper object.\n// See https://reactjs.org/docs/react-component.html#shouldcomponentupdate\n\nfunction shouldComponentUpdate(nextProps, nextState) {\n return !areEqual(this.props, nextProps) || shallowDiffers(this.state, nextState);\n}\n\n\n//# sourceMappingURL=index.esm.js.map\n\n\n//# sourceURL=webpack://rsuite/./node_modules/react-window/dist/index.esm.js?");
9493
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FixedSizeGrid\": function() { return /* binding */ FixedSizeGrid; },\n/* harmony export */ \"FixedSizeList\": function() { return /* binding */ FixedSizeList; },\n/* harmony export */ \"VariableSizeGrid\": function() { return /* binding */ VariableSizeGrid; },\n/* harmony export */ \"VariableSizeList\": function() { return /* binding */ VariableSizeList; },\n/* harmony export */ \"areEqual\": function() { return /* binding */ areEqual; },\n/* harmony export */ \"shouldComponentUpdate\": function() { return /* binding */ shouldComponentUpdate; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! memoize-one */ \"./node_modules/memoize-one/dist/memoize-one.esm.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n\n\n\n\n\n\n\n// Animation frame based implementation of setTimeout.\n// Inspired by Joe Lambert, https://gist.github.com/joelambert/1002116#file-requesttimeout-js\nvar hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';\nvar now = hasNativePerformanceNow ? function () {\n return performance.now();\n} : function () {\n return Date.now();\n};\nfunction cancelTimeout(timeoutID) {\n cancelAnimationFrame(timeoutID.id);\n}\nfunction requestTimeout(callback, delay) {\n var start = now();\n\n function tick() {\n if (now() - start >= delay) {\n callback.call(null);\n } else {\n timeoutID.id = requestAnimationFrame(tick);\n }\n }\n\n var timeoutID = {\n id: requestAnimationFrame(tick)\n };\n return timeoutID;\n}\n\nvar size = -1; // This utility copied from \"dom-helpers\" package.\n\nfunction getScrollbarSize(recalculate) {\n if (recalculate === void 0) {\n recalculate = false;\n }\n\n if (size === -1 || recalculate) {\n var div = document.createElement('div');\n var style = div.style;\n style.width = '50px';\n style.height = '50px';\n style.overflow = 'scroll';\n document.body.appendChild(div);\n size = div.offsetWidth - div.clientWidth;\n document.body.removeChild(div);\n }\n\n return size;\n}\nvar cachedRTLResult = null; // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n// Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).\n// Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.\n// The safest way to check this is to intentionally set a negative offset,\n// and then verify that the subsequent \"scroll\" event matches the negative offset.\n// If it does not match, then we can assume a non-standard RTL scroll implementation.\n\nfunction getRTLOffsetType(recalculate) {\n if (recalculate === void 0) {\n recalculate = false;\n }\n\n if (cachedRTLResult === null || recalculate) {\n var outerDiv = document.createElement('div');\n var outerStyle = outerDiv.style;\n outerStyle.width = '50px';\n outerStyle.height = '50px';\n outerStyle.overflow = 'scroll';\n outerStyle.direction = 'rtl';\n var innerDiv = document.createElement('div');\n var innerStyle = innerDiv.style;\n innerStyle.width = '100px';\n innerStyle.height = '100px';\n outerDiv.appendChild(innerDiv);\n document.body.appendChild(outerDiv);\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = 'positive-descending';\n } else {\n outerDiv.scrollLeft = 1;\n\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = 'negative';\n } else {\n cachedRTLResult = 'positive-ascending';\n }\n }\n\n document.body.removeChild(outerDiv);\n return cachedRTLResult;\n }\n\n return cachedRTLResult;\n}\n\nvar IS_SCROLLING_DEBOUNCE_INTERVAL = 150;\n\nvar defaultItemKey = function defaultItemKey(_ref) {\n var columnIndex = _ref.columnIndex,\n data = _ref.data,\n rowIndex = _ref.rowIndex;\n return rowIndex + \":\" + columnIndex;\n}; // In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\n\n\nvar devWarningsOverscanCount = null;\nvar devWarningsOverscanRowsColumnsCount = null;\nvar devWarningsTagName = null;\n\nif (true) {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsOverscanCount = /*#__PURE__*/new WeakSet();\n devWarningsOverscanRowsColumnsCount = /*#__PURE__*/new WeakSet();\n devWarningsTagName = /*#__PURE__*/new WeakSet();\n }\n}\n\nfunction createGridComponent(_ref2) {\n var _class;\n\n var getColumnOffset = _ref2.getColumnOffset,\n getColumnStartIndexForOffset = _ref2.getColumnStartIndexForOffset,\n getColumnStopIndexForStartIndex = _ref2.getColumnStopIndexForStartIndex,\n getColumnWidth = _ref2.getColumnWidth,\n getEstimatedTotalHeight = _ref2.getEstimatedTotalHeight,\n getEstimatedTotalWidth = _ref2.getEstimatedTotalWidth,\n getOffsetForColumnAndAlignment = _ref2.getOffsetForColumnAndAlignment,\n getOffsetForRowAndAlignment = _ref2.getOffsetForRowAndAlignment,\n getRowHeight = _ref2.getRowHeight,\n getRowOffset = _ref2.getRowOffset,\n getRowStartIndexForOffset = _ref2.getRowStartIndexForOffset,\n getRowStopIndexForStartIndex = _ref2.getRowStopIndexForStartIndex,\n initInstanceProps = _ref2.initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange = _ref2.shouldResetStyleCacheOnItemSizeChange,\n validateProps = _ref2.validateProps;\n return _class = /*#__PURE__*/function (_PureComponent) {\n (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__.default)(Grid, _PureComponent);\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n function Grid(props) {\n var _this;\n\n _this = _PureComponent.call(this, props) || this;\n _this._instanceProps = initInstanceProps(_this.props, (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__.default)(_this));\n _this._resetIsScrollingTimeoutId = null;\n _this._outerRef = void 0;\n _this.state = {\n instance: (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__.default)(_this),\n isScrolling: false,\n horizontalScrollDirection: 'forward',\n scrollLeft: typeof _this.props.initialScrollLeft === 'number' ? _this.props.initialScrollLeft : 0,\n scrollTop: typeof _this.props.initialScrollTop === 'number' ? _this.props.initialScrollTop : 0,\n scrollUpdateWasRequested: false,\n verticalScrollDirection: 'forward'\n };\n _this._callOnItemsRendered = void 0;\n _this._callOnItemsRendered = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__.default)(function (overscanColumnStartIndex, overscanColumnStopIndex, overscanRowStartIndex, overscanRowStopIndex, visibleColumnStartIndex, visibleColumnStopIndex, visibleRowStartIndex, visibleRowStopIndex) {\n return _this.props.onItemsRendered({\n overscanColumnStartIndex: overscanColumnStartIndex,\n overscanColumnStopIndex: overscanColumnStopIndex,\n overscanRowStartIndex: overscanRowStartIndex,\n overscanRowStopIndex: overscanRowStopIndex,\n visibleColumnStartIndex: visibleColumnStartIndex,\n visibleColumnStopIndex: visibleColumnStopIndex,\n visibleRowStartIndex: visibleRowStartIndex,\n visibleRowStopIndex: visibleRowStopIndex\n });\n });\n _this._callOnScroll = void 0;\n _this._callOnScroll = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__.default)(function (scrollLeft, scrollTop, horizontalScrollDirection, verticalScrollDirection, scrollUpdateWasRequested) {\n return _this.props.onScroll({\n horizontalScrollDirection: horizontalScrollDirection,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n verticalScrollDirection: verticalScrollDirection,\n scrollUpdateWasRequested: scrollUpdateWasRequested\n });\n });\n _this._getItemStyle = void 0;\n\n _this._getItemStyle = function (rowIndex, columnIndex) {\n var _this$props = _this.props,\n columnWidth = _this$props.columnWidth,\n direction = _this$props.direction,\n rowHeight = _this$props.rowHeight;\n\n var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && columnWidth, shouldResetStyleCacheOnItemSizeChange && direction, shouldResetStyleCacheOnItemSizeChange && rowHeight);\n\n var key = rowIndex + \":\" + columnIndex;\n var style;\n\n if (itemStyleCache.hasOwnProperty(key)) {\n style = itemStyleCache[key];\n } else {\n var _offset = getColumnOffset(_this.props, columnIndex, _this._instanceProps);\n\n var isRtl = direction === 'rtl';\n itemStyleCache[key] = style = {\n position: 'absolute',\n left: isRtl ? undefined : _offset,\n right: isRtl ? _offset : undefined,\n top: getRowOffset(_this.props, rowIndex, _this._instanceProps),\n height: getRowHeight(_this.props, rowIndex, _this._instanceProps),\n width: getColumnWidth(_this.props, columnIndex, _this._instanceProps)\n };\n }\n\n return style;\n };\n\n _this._getItemStyleCache = void 0;\n _this._getItemStyleCache = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__.default)(function (_, __, ___) {\n return {};\n });\n\n _this._onScroll = function (event) {\n var _event$currentTarget = event.currentTarget,\n clientHeight = _event$currentTarget.clientHeight,\n clientWidth = _event$currentTarget.clientWidth,\n scrollLeft = _event$currentTarget.scrollLeft,\n scrollTop = _event$currentTarget.scrollTop,\n scrollHeight = _event$currentTarget.scrollHeight,\n scrollWidth = _event$currentTarget.scrollWidth;\n\n _this.setState(function (prevState) {\n if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n var direction = _this.props.direction; // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n\n var calculatedScrollLeft = scrollLeft;\n\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n calculatedScrollLeft = -scrollLeft;\n break;\n\n case 'positive-descending':\n calculatedScrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n calculatedScrollLeft = Math.max(0, Math.min(calculatedScrollLeft, scrollWidth - clientWidth));\n var calculatedScrollTop = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));\n return {\n isScrolling: true,\n horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: calculatedScrollLeft,\n scrollTop: calculatedScrollTop,\n verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward',\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._outerRefSetter = function (ref) {\n var outerRef = _this.props.outerRef;\n _this._outerRef = ref;\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('current')) {\n outerRef.current = ref;\n }\n };\n\n _this._resetIsScrollingDebounced = function () {\n if (_this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(_this._resetIsScrollingTimeoutId);\n }\n\n _this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL);\n };\n\n _this._resetIsScrolling = function () {\n _this._resetIsScrollingTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n }, function () {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n _this._getItemStyleCache(-1);\n });\n };\n\n return _this;\n }\n\n Grid.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n validateSharedProps(nextProps, prevState);\n validateProps(nextProps);\n return null;\n };\n\n var _proto = Grid.prototype;\n\n _proto.scrollTo = function scrollTo(_ref3) {\n var scrollLeft = _ref3.scrollLeft,\n scrollTop = _ref3.scrollTop;\n\n if (scrollLeft !== undefined) {\n scrollLeft = Math.max(0, scrollLeft);\n }\n\n if (scrollTop !== undefined) {\n scrollTop = Math.max(0, scrollTop);\n }\n\n this.setState(function (prevState) {\n if (scrollLeft === undefined) {\n scrollLeft = prevState.scrollLeft;\n }\n\n if (scrollTop === undefined) {\n scrollTop = prevState.scrollTop;\n }\n\n if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {\n return null;\n }\n\n return {\n horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollUpdateWasRequested: true,\n verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward'\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _proto.scrollToItem = function scrollToItem(_ref4) {\n var _ref4$align = _ref4.align,\n align = _ref4$align === void 0 ? 'auto' : _ref4$align,\n columnIndex = _ref4.columnIndex,\n rowIndex = _ref4.rowIndex;\n var _this$props2 = this.props,\n columnCount = _this$props2.columnCount,\n height = _this$props2.height,\n rowCount = _this$props2.rowCount,\n width = _this$props2.width;\n var _this$state = this.state,\n scrollLeft = _this$state.scrollLeft,\n scrollTop = _this$state.scrollTop;\n var scrollbarSize = getScrollbarSize();\n\n if (columnIndex !== undefined) {\n columnIndex = Math.max(0, Math.min(columnIndex, columnCount - 1));\n }\n\n if (rowIndex !== undefined) {\n rowIndex = Math.max(0, Math.min(rowIndex, rowCount - 1));\n }\n\n var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);\n var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps); // The scrollbar size should be considered when scrolling an item into view,\n // to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n\n var horizontalScrollbarSize = estimatedTotalWidth > width ? scrollbarSize : 0;\n var verticalScrollbarSize = estimatedTotalHeight > height ? scrollbarSize : 0;\n this.scrollTo({\n scrollLeft: columnIndex !== undefined ? getOffsetForColumnAndAlignment(this.props, columnIndex, align, scrollLeft, this._instanceProps, verticalScrollbarSize) : scrollLeft,\n scrollTop: rowIndex !== undefined ? getOffsetForRowAndAlignment(this.props, rowIndex, align, scrollTop, this._instanceProps, horizontalScrollbarSize) : scrollTop\n });\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props3 = this.props,\n initialScrollLeft = _this$props3.initialScrollLeft,\n initialScrollTop = _this$props3.initialScrollTop;\n\n if (this._outerRef != null) {\n var outerRef = this._outerRef;\n\n if (typeof initialScrollLeft === 'number') {\n outerRef.scrollLeft = initialScrollLeft;\n }\n\n if (typeof initialScrollTop === 'number') {\n outerRef.scrollTop = initialScrollTop;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var direction = this.props.direction;\n var _this$state2 = this.state,\n scrollLeft = _this$state2.scrollLeft,\n scrollTop = _this$state2.scrollTop,\n scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n var outerRef = this._outerRef;\n\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollLeft;\n break;\n\n case 'positive-ascending':\n outerRef.scrollLeft = scrollLeft;\n break;\n\n default:\n var clientWidth = outerRef.clientWidth,\n scrollWidth = outerRef.scrollWidth;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } else {\n outerRef.scrollLeft = Math.max(0, scrollLeft);\n }\n\n outerRef.scrollTop = Math.max(0, scrollTop);\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n };\n\n _proto.render = function render() {\n var _this$props4 = this.props,\n children = _this$props4.children,\n className = _this$props4.className,\n columnCount = _this$props4.columnCount,\n direction = _this$props4.direction,\n height = _this$props4.height,\n innerRef = _this$props4.innerRef,\n innerElementType = _this$props4.innerElementType,\n innerTagName = _this$props4.innerTagName,\n itemData = _this$props4.itemData,\n _this$props4$itemKey = _this$props4.itemKey,\n itemKey = _this$props4$itemKey === void 0 ? defaultItemKey : _this$props4$itemKey,\n outerElementType = _this$props4.outerElementType,\n outerTagName = _this$props4.outerTagName,\n rowCount = _this$props4.rowCount,\n style = _this$props4.style,\n useIsScrolling = _this$props4.useIsScrolling,\n width = _this$props4.width;\n var isScrolling = this.state.isScrolling;\n\n var _this$_getHorizontalR = this._getHorizontalRangeToRender(),\n columnStartIndex = _this$_getHorizontalR[0],\n columnStopIndex = _this$_getHorizontalR[1];\n\n var _this$_getVerticalRan = this._getVerticalRangeToRender(),\n rowStartIndex = _this$_getVerticalRan[0],\n rowStopIndex = _this$_getVerticalRan[1];\n\n var items = [];\n\n if (columnCount > 0 && rowCount) {\n for (var _rowIndex = rowStartIndex; _rowIndex <= rowStopIndex; _rowIndex++) {\n for (var _columnIndex = columnStartIndex; _columnIndex <= columnStopIndex; _columnIndex++) {\n items.push((0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(children, {\n columnIndex: _columnIndex,\n data: itemData,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n key: itemKey({\n columnIndex: _columnIndex,\n data: itemData,\n rowIndex: _rowIndex\n }),\n rowIndex: _rowIndex,\n style: this._getItemStyle(_rowIndex, _columnIndex)\n }));\n }\n }\n } // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n\n\n var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);\n var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps);\n return (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(outerElementType || outerTagName || 'div', {\n className: className,\n onScroll: this._onScroll,\n ref: this._outerRefSetter,\n style: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n position: 'relative',\n height: height,\n width: width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction: direction\n }, style)\n }, (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: estimatedTotalHeight,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: estimatedTotalWidth\n }\n }));\n };\n\n _proto._callPropsCallbacks = function _callPropsCallbacks() {\n var _this$props5 = this.props,\n columnCount = _this$props5.columnCount,\n onItemsRendered = _this$props5.onItemsRendered,\n onScroll = _this$props5.onScroll,\n rowCount = _this$props5.rowCount;\n\n if (typeof onItemsRendered === 'function') {\n if (columnCount > 0 && rowCount > 0) {\n var _this$_getHorizontalR2 = this._getHorizontalRangeToRender(),\n _overscanColumnStartIndex = _this$_getHorizontalR2[0],\n _overscanColumnStopIndex = _this$_getHorizontalR2[1],\n _visibleColumnStartIndex = _this$_getHorizontalR2[2],\n _visibleColumnStopIndex = _this$_getHorizontalR2[3];\n\n var _this$_getVerticalRan2 = this._getVerticalRangeToRender(),\n _overscanRowStartIndex = _this$_getVerticalRan2[0],\n _overscanRowStopIndex = _this$_getVerticalRan2[1],\n _visibleRowStartIndex = _this$_getVerticalRan2[2],\n _visibleRowStopIndex = _this$_getVerticalRan2[3];\n\n this._callOnItemsRendered(_overscanColumnStartIndex, _overscanColumnStopIndex, _overscanRowStartIndex, _overscanRowStopIndex, _visibleColumnStartIndex, _visibleColumnStopIndex, _visibleRowStartIndex, _visibleRowStopIndex);\n }\n }\n\n if (typeof onScroll === 'function') {\n var _this$state3 = this.state,\n _horizontalScrollDirection = _this$state3.horizontalScrollDirection,\n _scrollLeft = _this$state3.scrollLeft,\n _scrollTop = _this$state3.scrollTop,\n _scrollUpdateWasRequested = _this$state3.scrollUpdateWasRequested,\n _verticalScrollDirection = _this$state3.verticalScrollDirection;\n\n this._callOnScroll(_scrollLeft, _scrollTop, _horizontalScrollDirection, _verticalScrollDirection, _scrollUpdateWasRequested);\n }\n } // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n ;\n\n _proto._getHorizontalRangeToRender = function _getHorizontalRangeToRender() {\n var _this$props6 = this.props,\n columnCount = _this$props6.columnCount,\n overscanColumnCount = _this$props6.overscanColumnCount,\n overscanColumnsCount = _this$props6.overscanColumnsCount,\n overscanCount = _this$props6.overscanCount,\n rowCount = _this$props6.rowCount;\n var _this$state4 = this.state,\n horizontalScrollDirection = _this$state4.horizontalScrollDirection,\n isScrolling = _this$state4.isScrolling,\n scrollLeft = _this$state4.scrollLeft;\n var overscanCountResolved = overscanColumnCount || overscanColumnsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getColumnStartIndexForOffset(this.props, scrollLeft, this._instanceProps);\n var stopIndex = getColumnStopIndexForStartIndex(this.props, startIndex, scrollLeft, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || horizontalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;\n var overscanForward = !isScrolling || horizontalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(columnCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n _proto._getVerticalRangeToRender = function _getVerticalRangeToRender() {\n var _this$props7 = this.props,\n columnCount = _this$props7.columnCount,\n overscanCount = _this$props7.overscanCount,\n overscanRowCount = _this$props7.overscanRowCount,\n overscanRowsCount = _this$props7.overscanRowsCount,\n rowCount = _this$props7.rowCount;\n var _this$state5 = this.state,\n isScrolling = _this$state5.isScrolling,\n verticalScrollDirection = _this$state5.verticalScrollDirection,\n scrollTop = _this$state5.scrollTop;\n var overscanCountResolved = overscanRowCount || overscanRowsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getRowStartIndexForOffset(this.props, scrollTop, this._instanceProps);\n var stopIndex = getRowStopIndexForStartIndex(this.props, startIndex, scrollTop, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || verticalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;\n var overscanForward = !isScrolling || verticalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(rowCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n return Grid;\n }(react__WEBPACK_IMPORTED_MODULE_3__.PureComponent), _class.defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n useIsScrolling: false\n }, _class;\n}\n\nvar validateSharedProps = function validateSharedProps(_ref5, _ref6) {\n var children = _ref5.children,\n direction = _ref5.direction,\n height = _ref5.height,\n innerTagName = _ref5.innerTagName,\n outerTagName = _ref5.outerTagName,\n overscanColumnsCount = _ref5.overscanColumnsCount,\n overscanCount = _ref5.overscanCount,\n overscanRowsCount = _ref5.overscanRowsCount,\n width = _ref5.width;\n var instance = _ref6.instance;\n\n if (true) {\n if (typeof overscanCount === 'number') {\n if (devWarningsOverscanCount && !devWarningsOverscanCount.has(instance)) {\n devWarningsOverscanCount.add(instance);\n console.warn('The overscanCount prop has been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');\n }\n }\n\n if (typeof overscanColumnsCount === 'number' || typeof overscanRowsCount === 'number') {\n if (devWarningsOverscanRowsColumnsCount && !devWarningsOverscanRowsColumnsCount.has(instance)) {\n devWarningsOverscanRowsColumnsCount.add(instance);\n console.warn('The overscanColumnsCount and overscanRowsCount props have been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');\n }\n }\n\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName && !devWarningsTagName.has(instance)) {\n devWarningsTagName.add(instance);\n console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');\n }\n }\n\n if (children == null) {\n throw Error('An invalid \"children\" prop has been specified. ' + 'Value should be a React component. ' + (\"\\\"\" + (children === null ? 'null' : typeof children) + \"\\\" was specified.\"));\n }\n\n switch (direction) {\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"direction\" prop has been specified. ' + 'Value should be either \"ltr\" or \"rtl\". ' + (\"\\\"\" + direction + \"\\\" was specified.\"));\n }\n\n if (typeof width !== 'number') {\n throw Error('An invalid \"width\" prop has been specified. ' + 'Grids must specify a number for width. ' + (\"\\\"\" + (width === null ? 'null' : typeof width) + \"\\\" was specified.\"));\n }\n\n if (typeof height !== 'number') {\n throw Error('An invalid \"height\" prop has been specified. ' + 'Grids must specify a number for height. ' + (\"\\\"\" + (height === null ? 'null' : typeof height) + \"\\\" was specified.\"));\n }\n }\n};\n\nvar DEFAULT_ESTIMATED_ITEM_SIZE = 50;\n\nvar getEstimatedTotalHeight = function getEstimatedTotalHeight(_ref, _ref2) {\n var rowCount = _ref.rowCount;\n var rowMetadataMap = _ref2.rowMetadataMap,\n estimatedRowHeight = _ref2.estimatedRowHeight,\n lastMeasuredRowIndex = _ref2.lastMeasuredRowIndex;\n var totalSizeOfMeasuredRows = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredRowIndex >= rowCount) {\n lastMeasuredRowIndex = rowCount - 1;\n }\n\n if (lastMeasuredRowIndex >= 0) {\n var itemMetadata = rowMetadataMap[lastMeasuredRowIndex];\n totalSizeOfMeasuredRows = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = rowCount - lastMeasuredRowIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedRowHeight;\n return totalSizeOfMeasuredRows + totalSizeOfUnmeasuredItems;\n};\n\nvar getEstimatedTotalWidth = function getEstimatedTotalWidth(_ref3, _ref4) {\n var columnCount = _ref3.columnCount;\n var columnMetadataMap = _ref4.columnMetadataMap,\n estimatedColumnWidth = _ref4.estimatedColumnWidth,\n lastMeasuredColumnIndex = _ref4.lastMeasuredColumnIndex;\n var totalSizeOfMeasuredRows = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredColumnIndex >= columnCount) {\n lastMeasuredColumnIndex = columnCount - 1;\n }\n\n if (lastMeasuredColumnIndex >= 0) {\n var itemMetadata = columnMetadataMap[lastMeasuredColumnIndex];\n totalSizeOfMeasuredRows = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = columnCount - lastMeasuredColumnIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedColumnWidth;\n return totalSizeOfMeasuredRows + totalSizeOfUnmeasuredItems;\n};\n\nvar getItemMetadata = function getItemMetadata(itemType, props, index, instanceProps) {\n var itemMetadataMap, itemSize, lastMeasuredIndex;\n\n if (itemType === 'column') {\n itemMetadataMap = instanceProps.columnMetadataMap;\n itemSize = props.columnWidth;\n lastMeasuredIndex = instanceProps.lastMeasuredColumnIndex;\n } else {\n itemMetadataMap = instanceProps.rowMetadataMap;\n itemSize = props.rowHeight;\n lastMeasuredIndex = instanceProps.lastMeasuredRowIndex;\n }\n\n if (index > lastMeasuredIndex) {\n var offset = 0;\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n offset = itemMetadata.offset + itemMetadata.size;\n }\n\n for (var i = lastMeasuredIndex + 1; i <= index; i++) {\n var size = itemSize(i);\n itemMetadataMap[i] = {\n offset: offset,\n size: size\n };\n offset += size;\n }\n\n if (itemType === 'column') {\n instanceProps.lastMeasuredColumnIndex = index;\n } else {\n instanceProps.lastMeasuredRowIndex = index;\n }\n }\n\n return itemMetadataMap[index];\n};\n\nvar findNearestItem = function findNearestItem(itemType, props, instanceProps, offset) {\n var itemMetadataMap, lastMeasuredIndex;\n\n if (itemType === 'column') {\n itemMetadataMap = instanceProps.columnMetadataMap;\n lastMeasuredIndex = instanceProps.lastMeasuredColumnIndex;\n } else {\n itemMetadataMap = instanceProps.rowMetadataMap;\n lastMeasuredIndex = instanceProps.lastMeasuredRowIndex;\n }\n\n var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;\n\n if (lastMeasuredItemOffset >= offset) {\n // If we've already measured items within this range just use a binary search as it's faster.\n return findNearestItemBinarySearch(itemType, props, instanceProps, lastMeasuredIndex, 0, offset);\n } else {\n // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n // The exponential search avoids pre-computing sizes for the full set of items as a binary search would.\n // The overall complexity for this approach is O(log n).\n return findNearestItemExponentialSearch(itemType, props, instanceProps, Math.max(0, lastMeasuredIndex), offset);\n }\n};\n\nvar findNearestItemBinarySearch = function findNearestItemBinarySearch(itemType, props, instanceProps, high, low, offset) {\n while (low <= high) {\n var middle = low + Math.floor((high - low) / 2);\n var currentOffset = getItemMetadata(itemType, props, middle, instanceProps).offset;\n\n if (currentOffset === offset) {\n return middle;\n } else if (currentOffset < offset) {\n low = middle + 1;\n } else if (currentOffset > offset) {\n high = middle - 1;\n }\n }\n\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n};\n\nvar findNearestItemExponentialSearch = function findNearestItemExponentialSearch(itemType, props, instanceProps, index, offset) {\n var itemCount = itemType === 'column' ? props.columnCount : props.rowCount;\n var interval = 1;\n\n while (index < itemCount && getItemMetadata(itemType, props, index, instanceProps).offset < offset) {\n index += interval;\n interval *= 2;\n }\n\n return findNearestItemBinarySearch(itemType, props, instanceProps, Math.min(index, itemCount - 1), Math.floor(index / 2), offset);\n};\n\nvar getOffsetForIndexAndAlignment = function getOffsetForIndexAndAlignment(itemType, props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n var size = itemType === 'column' ? props.width : props.height;\n var itemMetadata = getItemMetadata(itemType, props, index, instanceProps); // Get estimated total size after ItemMetadata is computed,\n // To ensure it reflects actual measurements instead of just estimates.\n\n var estimatedTotalSize = itemType === 'column' ? getEstimatedTotalWidth(props, instanceProps) : getEstimatedTotalHeight(props, instanceProps);\n var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, itemMetadata.offset));\n var minOffset = Math.max(0, itemMetadata.offset - size + scrollbarSize + itemMetadata.size);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n return Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n};\n\nvar VariableSizeGrid = /*#__PURE__*/createGridComponent({\n getColumnOffset: function getColumnOffset(props, index, instanceProps) {\n return getItemMetadata('column', props, index, instanceProps).offset;\n },\n getColumnStartIndexForOffset: function getColumnStartIndexForOffset(props, scrollLeft, instanceProps) {\n return findNearestItem('column', props, instanceProps, scrollLeft);\n },\n getColumnStopIndexForStartIndex: function getColumnStopIndexForStartIndex(props, startIndex, scrollLeft, instanceProps) {\n var columnCount = props.columnCount,\n width = props.width;\n var itemMetadata = getItemMetadata('column', props, startIndex, instanceProps);\n var maxOffset = scrollLeft + width;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < columnCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata('column', props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n getColumnWidth: function getColumnWidth(props, index, instanceProps) {\n return instanceProps.columnMetadataMap[index].size;\n },\n getEstimatedTotalHeight: getEstimatedTotalHeight,\n getEstimatedTotalWidth: getEstimatedTotalWidth,\n getOffsetForColumnAndAlignment: function getOffsetForColumnAndAlignment(props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n return getOffsetForIndexAndAlignment('column', props, index, align, scrollOffset, instanceProps, scrollbarSize);\n },\n getOffsetForRowAndAlignment: function getOffsetForRowAndAlignment(props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n return getOffsetForIndexAndAlignment('row', props, index, align, scrollOffset, instanceProps, scrollbarSize);\n },\n getRowOffset: function getRowOffset(props, index, instanceProps) {\n return getItemMetadata('row', props, index, instanceProps).offset;\n },\n getRowHeight: function getRowHeight(props, index, instanceProps) {\n return instanceProps.rowMetadataMap[index].size;\n },\n getRowStartIndexForOffset: function getRowStartIndexForOffset(props, scrollTop, instanceProps) {\n return findNearestItem('row', props, instanceProps, scrollTop);\n },\n getRowStopIndexForStartIndex: function getRowStopIndexForStartIndex(props, startIndex, scrollTop, instanceProps) {\n var rowCount = props.rowCount,\n height = props.height;\n var itemMetadata = getItemMetadata('row', props, startIndex, instanceProps);\n var maxOffset = scrollTop + height;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < rowCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata('row', props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n initInstanceProps: function initInstanceProps(props, instance) {\n var _ref5 = props,\n estimatedColumnWidth = _ref5.estimatedColumnWidth,\n estimatedRowHeight = _ref5.estimatedRowHeight;\n var instanceProps = {\n columnMetadataMap: {},\n estimatedColumnWidth: estimatedColumnWidth || DEFAULT_ESTIMATED_ITEM_SIZE,\n estimatedRowHeight: estimatedRowHeight || DEFAULT_ESTIMATED_ITEM_SIZE,\n lastMeasuredColumnIndex: -1,\n lastMeasuredRowIndex: -1,\n rowMetadataMap: {}\n };\n\n instance.resetAfterColumnIndex = function (columnIndex, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instance.resetAfterIndices({\n columnIndex: columnIndex,\n shouldForceUpdate: shouldForceUpdate\n });\n };\n\n instance.resetAfterRowIndex = function (rowIndex, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instance.resetAfterIndices({\n rowIndex: rowIndex,\n shouldForceUpdate: shouldForceUpdate\n });\n };\n\n instance.resetAfterIndices = function (_ref6) {\n var columnIndex = _ref6.columnIndex,\n rowIndex = _ref6.rowIndex,\n _ref6$shouldForceUpda = _ref6.shouldForceUpdate,\n shouldForceUpdate = _ref6$shouldForceUpda === void 0 ? true : _ref6$shouldForceUpda;\n\n if (typeof columnIndex === 'number') {\n instanceProps.lastMeasuredColumnIndex = Math.min(instanceProps.lastMeasuredColumnIndex, columnIndex - 1);\n }\n\n if (typeof rowIndex === 'number') {\n instanceProps.lastMeasuredRowIndex = Math.min(instanceProps.lastMeasuredRowIndex, rowIndex - 1);\n } // We could potentially optimize further by only evicting styles after this index,\n // But since styles are only cached while scrolling is in progress-\n // It seems an unnecessary optimization.\n // It's unlikely that resetAfterIndex() will be called while a user is scrolling.\n\n\n instance._getItemStyleCache(-1);\n\n if (shouldForceUpdate) {\n instance.forceUpdate();\n }\n };\n\n return instanceProps;\n },\n shouldResetStyleCacheOnItemSizeChange: false,\n validateProps: function validateProps(_ref7) {\n var columnWidth = _ref7.columnWidth,\n rowHeight = _ref7.rowHeight;\n\n if (true) {\n if (typeof columnWidth !== 'function') {\n throw Error('An invalid \"columnWidth\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (columnWidth === null ? 'null' : typeof columnWidth) + \"\\\" was specified.\"));\n } else if (typeof rowHeight !== 'function') {\n throw Error('An invalid \"rowHeight\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (rowHeight === null ? 'null' : typeof rowHeight) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\nvar IS_SCROLLING_DEBOUNCE_INTERVAL$1 = 150;\n\nvar defaultItemKey$1 = function defaultItemKey(index, data) {\n return index;\n}; // In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\n\n\nvar devWarningsDirection = null;\nvar devWarningsTagName$1 = null;\n\nif (true) {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsDirection = /*#__PURE__*/new WeakSet();\n devWarningsTagName$1 = /*#__PURE__*/new WeakSet();\n }\n}\n\nfunction createListComponent(_ref) {\n var _class;\n\n var getItemOffset = _ref.getItemOffset,\n getEstimatedTotalSize = _ref.getEstimatedTotalSize,\n getItemSize = _ref.getItemSize,\n getOffsetForIndexAndAlignment = _ref.getOffsetForIndexAndAlignment,\n getStartIndexForOffset = _ref.getStartIndexForOffset,\n getStopIndexForStartIndex = _ref.getStopIndexForStartIndex,\n initInstanceProps = _ref.initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange = _ref.shouldResetStyleCacheOnItemSizeChange,\n validateProps = _ref.validateProps;\n return _class = /*#__PURE__*/function (_PureComponent) {\n (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__.default)(List, _PureComponent);\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n function List(props) {\n var _this;\n\n _this = _PureComponent.call(this, props) || this;\n _this._instanceProps = initInstanceProps(_this.props, (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__.default)(_this));\n _this._outerRef = void 0;\n _this._resetIsScrollingTimeoutId = null;\n _this.state = {\n instance: (0,_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__.default)(_this),\n isScrolling: false,\n scrollDirection: 'forward',\n scrollOffset: typeof _this.props.initialScrollOffset === 'number' ? _this.props.initialScrollOffset : 0,\n scrollUpdateWasRequested: false\n };\n _this._callOnItemsRendered = void 0;\n _this._callOnItemsRendered = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__.default)(function (overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) {\n return _this.props.onItemsRendered({\n overscanStartIndex: overscanStartIndex,\n overscanStopIndex: overscanStopIndex,\n visibleStartIndex: visibleStartIndex,\n visibleStopIndex: visibleStopIndex\n });\n });\n _this._callOnScroll = void 0;\n _this._callOnScroll = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__.default)(function (scrollDirection, scrollOffset, scrollUpdateWasRequested) {\n return _this.props.onScroll({\n scrollDirection: scrollDirection,\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: scrollUpdateWasRequested\n });\n });\n _this._getItemStyle = void 0;\n\n _this._getItemStyle = function (index) {\n var _this$props = _this.props,\n direction = _this$props.direction,\n itemSize = _this$props.itemSize,\n layout = _this$props.layout;\n\n var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize, shouldResetStyleCacheOnItemSizeChange && layout, shouldResetStyleCacheOnItemSizeChange && direction);\n\n var style;\n\n if (itemStyleCache.hasOwnProperty(index)) {\n style = itemStyleCache[index];\n } else {\n var _offset = getItemOffset(_this.props, index, _this._instanceProps);\n\n var size = getItemSize(_this.props, index, _this._instanceProps); // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var isRtl = direction === 'rtl';\n var offsetHorizontal = isHorizontal ? _offset : 0;\n itemStyleCache[index] = style = {\n position: 'absolute',\n left: isRtl ? undefined : offsetHorizontal,\n right: isRtl ? offsetHorizontal : undefined,\n top: !isHorizontal ? _offset : 0,\n height: !isHorizontal ? size : '100%',\n width: isHorizontal ? size : '100%'\n };\n }\n\n return style;\n };\n\n _this._getItemStyleCache = void 0;\n _this._getItemStyleCache = (0,memoize_one__WEBPACK_IMPORTED_MODULE_5__.default)(function (_, __, ___) {\n return {};\n });\n\n _this._onScrollHorizontal = function (event) {\n var _event$currentTarget = event.currentTarget,\n clientWidth = _event$currentTarget.clientWidth,\n scrollLeft = _event$currentTarget.scrollLeft,\n scrollWidth = _event$currentTarget.scrollWidth;\n\n _this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollLeft) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n var direction = _this.props.direction;\n var scrollOffset = scrollLeft;\n\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n switch (getRTLOffsetType()) {\n case 'negative':\n scrollOffset = -scrollLeft;\n break;\n\n case 'positive-descending':\n scrollOffset = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollLeft ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._onScrollVertical = function (event) {\n var _event$currentTarget2 = event.currentTarget,\n clientHeight = _event$currentTarget2.clientHeight,\n scrollHeight = _event$currentTarget2.scrollHeight,\n scrollTop = _event$currentTarget2.scrollTop;\n\n _this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollTop) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n var scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._outerRefSetter = function (ref) {\n var outerRef = _this.props.outerRef;\n _this._outerRef = ref;\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('current')) {\n outerRef.current = ref;\n }\n };\n\n _this._resetIsScrollingDebounced = function () {\n if (_this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(_this._resetIsScrollingTimeoutId);\n }\n\n _this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL$1);\n };\n\n _this._resetIsScrolling = function () {\n _this._resetIsScrollingTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n }, function () {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n _this._getItemStyleCache(-1, null);\n });\n };\n\n return _this;\n }\n\n List.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n validateSharedProps$1(nextProps, prevState);\n validateProps(nextProps);\n return null;\n };\n\n var _proto = List.prototype;\n\n _proto.scrollTo = function scrollTo(scrollOffset) {\n scrollOffset = Math.max(0, scrollOffset);\n this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollOffset) {\n return null;\n }\n\n return {\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: true\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _proto.scrollToItem = function scrollToItem(index, align) {\n if (align === void 0) {\n align = 'auto';\n }\n\n var _this$props2 = this.props,\n itemCount = _this$props2.itemCount,\n layout = _this$props2.layout;\n var scrollOffset = this.state.scrollOffset;\n index = Math.max(0, Math.min(index, itemCount - 1)); // The scrollbar size should be considered when scrolling an item into view, to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n // This is an edge case for lists; normally they only scroll in the dominant direction.\n\n var scrollbarSize = 0;\n\n if (this._outerRef) {\n var outerRef = this._outerRef;\n\n if (layout === 'vertical') {\n scrollbarSize = outerRef.scrollWidth > outerRef.clientWidth ? getScrollbarSize() : 0;\n } else {\n scrollbarSize = outerRef.scrollHeight > outerRef.clientHeight ? getScrollbarSize() : 0;\n }\n }\n\n this.scrollTo(getOffsetForIndexAndAlignment(this.props, index, align, scrollOffset, this._instanceProps, scrollbarSize));\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props3 = this.props,\n direction = _this$props3.direction,\n initialScrollOffset = _this$props3.initialScrollOffset,\n layout = _this$props3.layout;\n\n if (typeof initialScrollOffset === 'number' && this._outerRef != null) {\n var outerRef = this._outerRef; // TODO Deprecate direction \"horizontal\"\n\n if (direction === 'horizontal' || layout === 'horizontal') {\n outerRef.scrollLeft = initialScrollOffset;\n } else {\n outerRef.scrollTop = initialScrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var _this$props4 = this.props,\n direction = _this$props4.direction,\n layout = _this$props4.layout;\n var _this$state = this.state,\n scrollOffset = _this$state.scrollOffset,\n scrollUpdateWasRequested = _this$state.scrollUpdateWasRequested;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n var outerRef = this._outerRef; // TODO Deprecate direction \"horizontal\"\n\n if (direction === 'horizontal' || layout === 'horizontal') {\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollOffset;\n break;\n\n case 'positive-ascending':\n outerRef.scrollLeft = scrollOffset;\n break;\n\n default:\n var clientWidth = outerRef.clientWidth,\n scrollWidth = outerRef.scrollWidth;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;\n break;\n }\n } else {\n outerRef.scrollLeft = scrollOffset;\n }\n } else {\n outerRef.scrollTop = scrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n };\n\n _proto.render = function render() {\n var _this$props5 = this.props,\n children = _this$props5.children,\n className = _this$props5.className,\n direction = _this$props5.direction,\n height = _this$props5.height,\n innerRef = _this$props5.innerRef,\n innerElementType = _this$props5.innerElementType,\n innerTagName = _this$props5.innerTagName,\n itemCount = _this$props5.itemCount,\n itemData = _this$props5.itemData,\n _this$props5$itemKey = _this$props5.itemKey,\n itemKey = _this$props5$itemKey === void 0 ? defaultItemKey$1 : _this$props5$itemKey,\n layout = _this$props5.layout,\n outerElementType = _this$props5.outerElementType,\n outerTagName = _this$props5.outerTagName,\n style = _this$props5.style,\n useIsScrolling = _this$props5.useIsScrolling,\n width = _this$props5.width;\n var isScrolling = this.state.isScrolling; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var onScroll = isHorizontal ? this._onScrollHorizontal : this._onScrollVertical;\n\n var _this$_getRangeToRend = this._getRangeToRender(),\n startIndex = _this$_getRangeToRend[0],\n stopIndex = _this$_getRangeToRend[1];\n\n var items = [];\n\n if (itemCount > 0) {\n for (var _index = startIndex; _index <= stopIndex; _index++) {\n items.push((0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(children, {\n data: itemData,\n key: itemKey(_index, itemData),\n index: _index,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n style: this._getItemStyle(_index)\n }));\n }\n } // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n\n\n var estimatedTotalSize = getEstimatedTotalSize(this.props, this._instanceProps);\n return (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(outerElementType || outerTagName || 'div', {\n className: className,\n onScroll: onScroll,\n ref: this._outerRefSetter,\n style: (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({\n position: 'relative',\n height: height,\n width: width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction: direction\n }, style)\n }, (0,react__WEBPACK_IMPORTED_MODULE_3__.createElement)(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: isHorizontal ? '100%' : estimatedTotalSize,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: isHorizontal ? estimatedTotalSize : '100%'\n }\n }));\n };\n\n _proto._callPropsCallbacks = function _callPropsCallbacks() {\n if (typeof this.props.onItemsRendered === 'function') {\n var itemCount = this.props.itemCount;\n\n if (itemCount > 0) {\n var _this$_getRangeToRend2 = this._getRangeToRender(),\n _overscanStartIndex = _this$_getRangeToRend2[0],\n _overscanStopIndex = _this$_getRangeToRend2[1],\n _visibleStartIndex = _this$_getRangeToRend2[2],\n _visibleStopIndex = _this$_getRangeToRend2[3];\n\n this._callOnItemsRendered(_overscanStartIndex, _overscanStopIndex, _visibleStartIndex, _visibleStopIndex);\n }\n }\n\n if (typeof this.props.onScroll === 'function') {\n var _this$state2 = this.state,\n _scrollDirection = _this$state2.scrollDirection,\n _scrollOffset = _this$state2.scrollOffset,\n _scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;\n\n this._callOnScroll(_scrollDirection, _scrollOffset, _scrollUpdateWasRequested);\n }\n } // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n ;\n\n _proto._getRangeToRender = function _getRangeToRender() {\n var _this$props6 = this.props,\n itemCount = _this$props6.itemCount,\n overscanCount = _this$props6.overscanCount;\n var _this$state3 = this.state,\n isScrolling = _this$state3.isScrolling,\n scrollDirection = _this$state3.scrollDirection,\n scrollOffset = _this$state3.scrollOffset;\n\n if (itemCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getStartIndexForOffset(this.props, scrollOffset, this._instanceProps);\n var stopIndex = getStopIndexForStartIndex(this.props, startIndex, scrollOffset, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || scrollDirection === 'backward' ? Math.max(1, overscanCount) : 1;\n var overscanForward = !isScrolling || scrollDirection === 'forward' ? Math.max(1, overscanCount) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n return List;\n }(react__WEBPACK_IMPORTED_MODULE_3__.PureComponent), _class.defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n layout: 'vertical',\n overscanCount: 2,\n useIsScrolling: false\n }, _class;\n} // NOTE: I considered further wrapping individual items with a pure ListItem component.\n// This would avoid ever calling the render function for the same index more than once,\n// But it would also add the overhead of a lot of components/fibers.\n// I assume people already do this (render function returning a class component),\n// So my doing it would just unnecessarily double the wrappers.\n\nvar validateSharedProps$1 = function validateSharedProps(_ref2, _ref3) {\n var children = _ref2.children,\n direction = _ref2.direction,\n height = _ref2.height,\n layout = _ref2.layout,\n innerTagName = _ref2.innerTagName,\n outerTagName = _ref2.outerTagName,\n width = _ref2.width;\n var instance = _ref3.instance;\n\n if (true) {\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName$1 && !devWarningsTagName$1.has(instance)) {\n devWarningsTagName$1.add(instance);\n console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');\n }\n } // TODO Deprecate direction \"horizontal\"\n\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n\n switch (direction) {\n case 'horizontal':\n case 'vertical':\n if (devWarningsDirection && !devWarningsDirection.has(instance)) {\n devWarningsDirection.add(instance);\n console.warn('The direction prop should be either \"ltr\" (default) or \"rtl\". ' + 'Please use the layout prop to specify \"vertical\" (default) or \"horizontal\" orientation.');\n }\n\n break;\n\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"direction\" prop has been specified. ' + 'Value should be either \"ltr\" or \"rtl\". ' + (\"\\\"\" + direction + \"\\\" was specified.\"));\n }\n\n switch (layout) {\n case 'horizontal':\n case 'vertical':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"layout\" prop has been specified. ' + 'Value should be either \"horizontal\" or \"vertical\". ' + (\"\\\"\" + layout + \"\\\" was specified.\"));\n }\n\n if (children == null) {\n throw Error('An invalid \"children\" prop has been specified. ' + 'Value should be a React component. ' + (\"\\\"\" + (children === null ? 'null' : typeof children) + \"\\\" was specified.\"));\n }\n\n if (isHorizontal && typeof width !== 'number') {\n throw Error('An invalid \"width\" prop has been specified. ' + 'Horizontal lists must specify a number for width. ' + (\"\\\"\" + (width === null ? 'null' : typeof width) + \"\\\" was specified.\"));\n } else if (!isHorizontal && typeof height !== 'number') {\n throw Error('An invalid \"height\" prop has been specified. ' + 'Vertical lists must specify a number for height. ' + (\"\\\"\" + (height === null ? 'null' : typeof height) + \"\\\" was specified.\"));\n }\n }\n};\n\nvar DEFAULT_ESTIMATED_ITEM_SIZE$1 = 50;\n\nvar getItemMetadata$1 = function getItemMetadata(props, index, instanceProps) {\n var _ref = props,\n itemSize = _ref.itemSize;\n var itemMetadataMap = instanceProps.itemMetadataMap,\n lastMeasuredIndex = instanceProps.lastMeasuredIndex;\n\n if (index > lastMeasuredIndex) {\n var offset = 0;\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n offset = itemMetadata.offset + itemMetadata.size;\n }\n\n for (var i = lastMeasuredIndex + 1; i <= index; i++) {\n var size = itemSize(i);\n itemMetadataMap[i] = {\n offset: offset,\n size: size\n };\n offset += size;\n }\n\n instanceProps.lastMeasuredIndex = index;\n }\n\n return itemMetadataMap[index];\n};\n\nvar findNearestItem$1 = function findNearestItem(props, instanceProps, offset) {\n var itemMetadataMap = instanceProps.itemMetadataMap,\n lastMeasuredIndex = instanceProps.lastMeasuredIndex;\n var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;\n\n if (lastMeasuredItemOffset >= offset) {\n // If we've already measured items within this range just use a binary search as it's faster.\n return findNearestItemBinarySearch$1(props, instanceProps, lastMeasuredIndex, 0, offset);\n } else {\n // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n // The exponential search avoids pre-computing sizes for the full set of items as a binary search would.\n // The overall complexity for this approach is O(log n).\n return findNearestItemExponentialSearch$1(props, instanceProps, Math.max(0, lastMeasuredIndex), offset);\n }\n};\n\nvar findNearestItemBinarySearch$1 = function findNearestItemBinarySearch(props, instanceProps, high, low, offset) {\n while (low <= high) {\n var middle = low + Math.floor((high - low) / 2);\n var currentOffset = getItemMetadata$1(props, middle, instanceProps).offset;\n\n if (currentOffset === offset) {\n return middle;\n } else if (currentOffset < offset) {\n low = middle + 1;\n } else if (currentOffset > offset) {\n high = middle - 1;\n }\n }\n\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n};\n\nvar findNearestItemExponentialSearch$1 = function findNearestItemExponentialSearch(props, instanceProps, index, offset) {\n var itemCount = props.itemCount;\n var interval = 1;\n\n while (index < itemCount && getItemMetadata$1(props, index, instanceProps).offset < offset) {\n index += interval;\n interval *= 2;\n }\n\n return findNearestItemBinarySearch$1(props, instanceProps, Math.min(index, itemCount - 1), Math.floor(index / 2), offset);\n};\n\nvar getEstimatedTotalSize = function getEstimatedTotalSize(_ref2, _ref3) {\n var itemCount = _ref2.itemCount;\n var itemMetadataMap = _ref3.itemMetadataMap,\n estimatedItemSize = _ref3.estimatedItemSize,\n lastMeasuredIndex = _ref3.lastMeasuredIndex;\n var totalSizeOfMeasuredItems = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredIndex >= itemCount) {\n lastMeasuredIndex = itemCount - 1;\n }\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n totalSizeOfMeasuredItems = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = itemCount - lastMeasuredIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize;\n return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;\n};\n\nvar VariableSizeList = /*#__PURE__*/createListComponent({\n getItemOffset: function getItemOffset(props, index, instanceProps) {\n return getItemMetadata$1(props, index, instanceProps).offset;\n },\n getItemSize: function getItemSize(props, index, instanceProps) {\n return instanceProps.itemMetadataMap[index].size;\n },\n getEstimatedTotalSize: getEstimatedTotalSize,\n getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment(props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n var direction = props.direction,\n height = props.height,\n layout = props.layout,\n width = props.width; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var itemMetadata = getItemMetadata$1(props, index, instanceProps); // Get estimated total size after ItemMetadata is computed,\n // To ensure it reflects actual measurements instead of just estimates.\n\n var estimatedTotalSize = getEstimatedTotalSize(props, instanceProps);\n var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, itemMetadata.offset));\n var minOffset = Math.max(0, itemMetadata.offset - size + itemMetadata.size + scrollbarSize);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n return Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getStartIndexForOffset: function getStartIndexForOffset(props, offset, instanceProps) {\n return findNearestItem$1(props, instanceProps, offset);\n },\n getStopIndexForStartIndex: function getStopIndexForStartIndex(props, startIndex, scrollOffset, instanceProps) {\n var direction = props.direction,\n height = props.height,\n itemCount = props.itemCount,\n layout = props.layout,\n width = props.width; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var itemMetadata = getItemMetadata$1(props, startIndex, instanceProps);\n var maxOffset = scrollOffset + size;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < itemCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata$1(props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n initInstanceProps: function initInstanceProps(props, instance) {\n var _ref4 = props,\n estimatedItemSize = _ref4.estimatedItemSize;\n var instanceProps = {\n itemMetadataMap: {},\n estimatedItemSize: estimatedItemSize || DEFAULT_ESTIMATED_ITEM_SIZE$1,\n lastMeasuredIndex: -1\n };\n\n instance.resetAfterIndex = function (index, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instanceProps.lastMeasuredIndex = Math.min(instanceProps.lastMeasuredIndex, index - 1); // We could potentially optimize further by only evicting styles after this index,\n // But since styles are only cached while scrolling is in progress-\n // It seems an unnecessary optimization.\n // It's unlikely that resetAfterIndex() will be called while a user is scrolling.\n\n instance._getItemStyleCache(-1);\n\n if (shouldForceUpdate) {\n instance.forceUpdate();\n }\n };\n\n return instanceProps;\n },\n shouldResetStyleCacheOnItemSizeChange: false,\n validateProps: function validateProps(_ref5) {\n var itemSize = _ref5.itemSize;\n\n if (true) {\n if (typeof itemSize !== 'function') {\n throw Error('An invalid \"itemSize\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (itemSize === null ? 'null' : typeof itemSize) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\nvar FixedSizeGrid = /*#__PURE__*/createGridComponent({\n getColumnOffset: function getColumnOffset(_ref, index) {\n var columnWidth = _ref.columnWidth;\n return index * columnWidth;\n },\n getColumnWidth: function getColumnWidth(_ref2, index) {\n var columnWidth = _ref2.columnWidth;\n return columnWidth;\n },\n getRowOffset: function getRowOffset(_ref3, index) {\n var rowHeight = _ref3.rowHeight;\n return index * rowHeight;\n },\n getRowHeight: function getRowHeight(_ref4, index) {\n var rowHeight = _ref4.rowHeight;\n return rowHeight;\n },\n getEstimatedTotalHeight: function getEstimatedTotalHeight(_ref5) {\n var rowCount = _ref5.rowCount,\n rowHeight = _ref5.rowHeight;\n return rowHeight * rowCount;\n },\n getEstimatedTotalWidth: function getEstimatedTotalWidth(_ref6) {\n var columnCount = _ref6.columnCount,\n columnWidth = _ref6.columnWidth;\n return columnWidth * columnCount;\n },\n getOffsetForColumnAndAlignment: function getOffsetForColumnAndAlignment(_ref7, columnIndex, align, scrollLeft, instanceProps, scrollbarSize) {\n var columnCount = _ref7.columnCount,\n columnWidth = _ref7.columnWidth,\n width = _ref7.width;\n var lastColumnOffset = Math.max(0, columnCount * columnWidth - width);\n var maxOffset = Math.min(lastColumnOffset, columnIndex * columnWidth);\n var minOffset = Math.max(0, columnIndex * columnWidth - width + scrollbarSize + columnWidth);\n\n if (align === 'smart') {\n if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(width / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) {\n return lastColumnOffset; // near the end\n } else {\n return middleOffset;\n }\n\n case 'auto':\n default:\n if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {\n return scrollLeft;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollLeft < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getOffsetForRowAndAlignment: function getOffsetForRowAndAlignment(_ref8, rowIndex, align, scrollTop, instanceProps, scrollbarSize) {\n var rowHeight = _ref8.rowHeight,\n height = _ref8.height,\n rowCount = _ref8.rowCount;\n var lastRowOffset = Math.max(0, rowCount * rowHeight - height);\n var maxOffset = Math.min(lastRowOffset, rowIndex * rowHeight);\n var minOffset = Math.max(0, rowIndex * rowHeight - height + scrollbarSize + rowHeight);\n\n if (align === 'smart') {\n if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(height / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastRowOffset + Math.floor(height / 2)) {\n return lastRowOffset; // near the end\n } else {\n return middleOffset;\n }\n\n case 'auto':\n default:\n if (scrollTop >= minOffset && scrollTop <= maxOffset) {\n return scrollTop;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollTop < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getColumnStartIndexForOffset: function getColumnStartIndexForOffset(_ref9, scrollLeft) {\n var columnWidth = _ref9.columnWidth,\n columnCount = _ref9.columnCount;\n return Math.max(0, Math.min(columnCount - 1, Math.floor(scrollLeft / columnWidth)));\n },\n getColumnStopIndexForStartIndex: function getColumnStopIndexForStartIndex(_ref10, startIndex, scrollLeft) {\n var columnWidth = _ref10.columnWidth,\n columnCount = _ref10.columnCount,\n width = _ref10.width;\n var left = startIndex * columnWidth;\n var numVisibleColumns = Math.ceil((width + scrollLeft - left) / columnWidth);\n return Math.max(0, Math.min(columnCount - 1, startIndex + numVisibleColumns - 1 // -1 is because stop index is inclusive\n ));\n },\n getRowStartIndexForOffset: function getRowStartIndexForOffset(_ref11, scrollTop) {\n var rowHeight = _ref11.rowHeight,\n rowCount = _ref11.rowCount;\n return Math.max(0, Math.min(rowCount - 1, Math.floor(scrollTop / rowHeight)));\n },\n getRowStopIndexForStartIndex: function getRowStopIndexForStartIndex(_ref12, startIndex, scrollTop) {\n var rowHeight = _ref12.rowHeight,\n rowCount = _ref12.rowCount,\n height = _ref12.height;\n var top = startIndex * rowHeight;\n var numVisibleRows = Math.ceil((height + scrollTop - top) / rowHeight);\n return Math.max(0, Math.min(rowCount - 1, startIndex + numVisibleRows - 1 // -1 is because stop index is inclusive\n ));\n },\n initInstanceProps: function initInstanceProps(props) {// Noop\n },\n shouldResetStyleCacheOnItemSizeChange: true,\n validateProps: function validateProps(_ref13) {\n var columnWidth = _ref13.columnWidth,\n rowHeight = _ref13.rowHeight;\n\n if (true) {\n if (typeof columnWidth !== 'number') {\n throw Error('An invalid \"columnWidth\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (columnWidth === null ? 'null' : typeof columnWidth) + \"\\\" was specified.\"));\n }\n\n if (typeof rowHeight !== 'number') {\n throw Error('An invalid \"rowHeight\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (rowHeight === null ? 'null' : typeof rowHeight) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\nvar FixedSizeList = /*#__PURE__*/createListComponent({\n getItemOffset: function getItemOffset(_ref, index) {\n var itemSize = _ref.itemSize;\n return index * itemSize;\n },\n getItemSize: function getItemSize(_ref2, index) {\n var itemSize = _ref2.itemSize;\n return itemSize;\n },\n getEstimatedTotalSize: function getEstimatedTotalSize(_ref3) {\n var itemCount = _ref3.itemCount,\n itemSize = _ref3.itemSize;\n return itemSize * itemCount;\n },\n getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment(_ref4, index, align, scrollOffset, instanceProps, scrollbarSize) {\n var direction = _ref4.direction,\n height = _ref4.height,\n itemCount = _ref4.itemCount,\n itemSize = _ref4.itemSize,\n layout = _ref4.layout,\n width = _ref4.width;\n // TODO Deprecate direction \"horizontal\"\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var lastItemOffset = Math.max(0, itemCount * itemSize - size);\n var maxOffset = Math.min(lastItemOffset, index * itemSize);\n var minOffset = Math.max(0, index * itemSize - size + itemSize + scrollbarSize);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n {\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(size / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastItemOffset + Math.floor(size / 2)) {\n return lastItemOffset; // near the end\n } else {\n return middleOffset;\n }\n }\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getStartIndexForOffset: function getStartIndexForOffset(_ref5, offset) {\n var itemCount = _ref5.itemCount,\n itemSize = _ref5.itemSize;\n return Math.max(0, Math.min(itemCount - 1, Math.floor(offset / itemSize)));\n },\n getStopIndexForStartIndex: function getStopIndexForStartIndex(_ref6, startIndex, scrollOffset) {\n var direction = _ref6.direction,\n height = _ref6.height,\n itemCount = _ref6.itemCount,\n itemSize = _ref6.itemSize,\n layout = _ref6.layout,\n width = _ref6.width;\n // TODO Deprecate direction \"horizontal\"\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var offset = startIndex * itemSize;\n var size = isHorizontal ? width : height;\n var numVisibleItems = Math.ceil((size + scrollOffset - offset) / itemSize);\n return Math.max(0, Math.min(itemCount - 1, startIndex + numVisibleItems - 1 // -1 is because stop index is inclusive\n ));\n },\n initInstanceProps: function initInstanceProps(props) {// Noop\n },\n shouldResetStyleCacheOnItemSizeChange: true,\n validateProps: function validateProps(_ref7) {\n var itemSize = _ref7.itemSize;\n\n if (true) {\n if (typeof itemSize !== 'number') {\n throw Error('An invalid \"itemSize\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (itemSize === null ? 'null' : typeof itemSize) + \"\\\" was specified.\"));\n }\n }\n }\n});\n\n// Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\nfunction shallowDiffers(prev, next) {\n for (var attribute in prev) {\n if (!(attribute in next)) {\n return true;\n }\n }\n\n for (var _attribute in next) {\n if (prev[_attribute] !== next[_attribute]) {\n return true;\n }\n }\n\n return false;\n}\n\nvar _excluded = [\"style\"],\n _excluded2 = [\"style\"];\n// It knows to compare individual style props and ignore the wrapper object.\n// See https://reactjs.org/docs/react-api.html#reactmemo\n\nfunction areEqual(prevProps, nextProps) {\n var prevStyle = prevProps.style,\n prevRest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_4__.default)(prevProps, _excluded);\n\n var nextStyle = nextProps.style,\n nextRest = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_4__.default)(nextProps, _excluded2);\n\n return !shallowDiffers(prevStyle, nextStyle) && !shallowDiffers(prevRest, nextRest);\n}\n\n// It knows to compare individual style props and ignore the wrapper object.\n// See https://reactjs.org/docs/react-component.html#shouldcomponentupdate\n\nfunction shouldComponentUpdate(nextProps, nextState) {\n return !areEqual(this.props, nextProps) || shallowDiffers(this.state, nextState);\n}\n\n\n//# sourceMappingURL=index.esm.js.map\n\n\n//# sourceURL=webpack://rsuite/./node_modules/react-window/dist/index.esm.js?");
9494
9494
 
9495
9495
  /***/ }),
9496
9496
 
@@ -9703,6 +9703,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
9703
9703
 
9704
9704
  /***/ }),
9705
9705
 
9706
+ /***/ "./node_modules/rsuite-table/es/utils/getColumnProps.js":
9707
+ /*!**************************************************************!*\
9708
+ !*** ./node_modules/rsuite-table/es/utils/getColumnProps.js ***!
9709
+ \**************************************************************/
9710
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9711
+
9712
+ "use strict";
9713
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ getColumnProps; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n\n\n/**\n * Get the union of the props of the column itself and the props of the custom column\n *\n * e.g.\n * const CustomColumn = React.forwardRef((props, ref) => {\n * return <Column ref={ref} sortable align=\"center\" flexGrow={1} fullText {...props} />;\n * });\n *\n * <CustomColumn width={100} >\n * <HeaderCell>Header</HeaderCell>\n * <Cell>Cell</Cell>\n * </CustomColumn>\n *\n */\nfunction getColumnProps(column) {\n var _column$type, _column$type$render, _column$type$render$c;\n\n var columnDefaultProps = ((_column$type = column['type']) === null || _column$type === void 0 ? void 0 : (_column$type$render = _column$type['render']) === null || _column$type$render === void 0 ? void 0 : (_column$type$render$c = _column$type$render.call(_column$type)) === null || _column$type$render$c === void 0 ? void 0 : _column$type$render$c.props) || {};\n return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, columnDefaultProps, column === null || column === void 0 ? void 0 : column.props);\n}\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/getColumnProps.js?");
9714
+
9715
+ /***/ }),
9716
+
9706
9717
  /***/ "./node_modules/rsuite-table/es/utils/getTableColumns.js":
9707
9718
  /*!***************************************************************!*\
9708
9719
  !*** ./node_modules/rsuite-table/es/utils/getTableColumns.js ***!
@@ -9721,7 +9732,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab
9721
9732
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9722
9733
 
9723
9734
  "use strict";
9724
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isPlainObject */ \"./node_modules/lodash/isPlainObject.js\");\n/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nfunction getTotalByColumns(columns) {\n var totalFlexGrow = 0;\n var totalWidth = 0;\n\n var count = function count(items) {\n Array.from(items).forEach(function (column) {\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().isValidElement(column)) {\n var _ref = column.props,\n flexGrow = _ref.flexGrow,\n _ref$width = _ref.width,\n width = _ref$width === void 0 ? 0 : _ref$width;\n totalFlexGrow += flexGrow || 0;\n totalWidth += flexGrow ? 0 : width;\n } else if (Array.isArray(column)) {\n count(column);\n }\n });\n };\n\n if (Array.isArray(columns)) {\n count(columns);\n } else if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(columns)) {\n var _columns$props = columns === null || columns === void 0 ? void 0 : columns.props,\n flexGrow = _columns$props.flexGrow,\n _columns$props$width = _columns$props.width,\n width = _columns$props$width === void 0 ? 0 : _columns$props$width;\n\n totalFlexGrow = flexGrow || 0;\n totalWidth = flexGrow ? 0 : width;\n }\n\n return {\n totalFlexGrow: totalFlexGrow,\n totalWidth: totalWidth\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getTotalByColumns);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/getTotalByColumns.js?");
9735
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isPlainObject */ \"./node_modules/lodash/isPlainObject.js\");\n/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _getColumnProps__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./getColumnProps */ \"./node_modules/rsuite-table/es/utils/getColumnProps.js\");\n\n\n\n\nfunction getTotalByColumns(columns) {\n var totalFlexGrow = 0;\n var totalWidth = 0;\n\n var count = function count(items) {\n Array.from(items).forEach(function (column) {\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().isValidElement(column)) {\n var _getColumnProps = (0,_getColumnProps__WEBPACK_IMPORTED_MODULE_2__.default)(column),\n flexGrow = _getColumnProps.flexGrow,\n _getColumnProps$width = _getColumnProps.width,\n width = _getColumnProps$width === void 0 ? 0 : _getColumnProps$width;\n\n totalFlexGrow += flexGrow || 0;\n totalWidth += flexGrow ? 0 : width;\n } else if (Array.isArray(column)) {\n count(column);\n }\n });\n };\n\n if (Array.isArray(columns)) {\n count(columns);\n } else if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(columns)) {\n var _columns$props = columns === null || columns === void 0 ? void 0 : columns.props,\n flexGrow = _columns$props.flexGrow,\n _columns$props$width = _columns$props.width,\n width = _columns$props$width === void 0 ? 0 : _columns$props$width;\n\n totalFlexGrow = flexGrow || 0;\n totalWidth = flexGrow ? 0 : width;\n }\n\n return {\n totalFlexGrow: totalFlexGrow,\n totalWidth: totalWidth\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (getTotalByColumns);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/getTotalByColumns.js?");
9725
9736
 
9726
9737
  /***/ }),
9727
9738
 
@@ -9886,7 +9897,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
9886
9897
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9887
9898
 
9888
9899
  "use strict";
9889
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var dom_lib_addStyle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dom-lib/addStyle */ \"./node_modules/dom-lib/esm/addStyle.js\");\n/* harmony import */ var dom_lib_addClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! dom-lib/addClass */ \"./node_modules/dom-lib/esm/addClass.js\");\n/* harmony import */ var dom_lib_removeClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! dom-lib/removeClass */ \"./node_modules/dom-lib/esm/removeClass.js\");\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/omit */ \"./node_modules/lodash/omit.js\");\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_omit__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _useControlled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./useControlled */ \"./node_modules/rsuite-table/es/utils/useControlled.js\");\n/* harmony import */ var _getTableColumns__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./getTableColumns */ \"./node_modules/rsuite-table/es/utils/getTableColumns.js\");\n/* harmony import */ var _getTotalByColumns__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./getTotalByColumns */ \"./node_modules/rsuite-table/es/utils/getTotalByColumns.js\");\n/* harmony import */ var _useUpdateEffect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./useUpdateEffect */ \"./node_modules/rsuite-table/es/utils/useUpdateEffect.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Attach rendering-related attributes to all cells of the form and cache them.\n * @param props\n * @returns\n */\nvar useCellDescriptor = function useCellDescriptor(props) {\n var children = props.children,\n rtl = props.rtl,\n mouseAreaRef = props.mouseAreaRef,\n tableRef = props.tableRef,\n minScrollX = props.minScrollX,\n scrollX = props.scrollX,\n tableWidth = props.tableWidth,\n headerHeight = props.headerHeight,\n showHeader = props.showHeader,\n sortTypeProp = props.sortType,\n defaultSortType = props.defaultSortType,\n sortColumn = props.sortColumn,\n rowHeight = props.rowHeight,\n onSortColumn = props.onSortColumn,\n onHeaderCellResize = props.onHeaderCellResize,\n prefix = props.prefix;\n\n var _useControlled = (0,_useControlled__WEBPACK_IMPORTED_MODULE_8__.default)(sortTypeProp, defaultSortType),\n sortType = _useControlled[0],\n setSortType = _useControlled[1];\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(),\n cacheData = _useState[0],\n setCacheData = _useState[1];\n\n var clearCache = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\n setCacheData(null);\n }, []);\n var setColumnResizing = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (resizing) {\n if (!tableRef.current) {\n return;\n }\n\n if (resizing) {\n (0,dom_lib_addClass__WEBPACK_IMPORTED_MODULE_3__.default)(tableRef.current, prefix('column-resizing'));\n } else {\n (0,dom_lib_removeClass__WEBPACK_IMPORTED_MODULE_4__.default)(tableRef.current, prefix('column-resizing'));\n }\n }, [prefix, tableRef]);\n var columnWidths = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)({});\n (0,_useUpdateEffect__WEBPACK_IMPORTED_MODULE_11__.default)(function () {\n clearCache();\n }, [children, sortColumn, sortType, tableWidth.current, scrollX.current, minScrollX.current]);\n (0,_useUpdateEffect__WEBPACK_IMPORTED_MODULE_11__.default)(function () {\n columnWidths.current = {};\n }, [children]);\n var handleColumnResizeEnd = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (columnWidth, _cursorDelta, dataKey, index) {\n columnWidths.current[dataKey + \"_\" + index + \"_width\"] = columnWidth;\n setColumnResizing(false);\n\n if (mouseAreaRef.current) {\n (0,dom_lib_addStyle__WEBPACK_IMPORTED_MODULE_2__.default)(mouseAreaRef.current, {\n display: 'none'\n });\n }\n\n clearCache();\n onHeaderCellResize === null || onHeaderCellResize === void 0 ? void 0 : onHeaderCellResize(columnWidth, dataKey);\n }, [clearCache, mouseAreaRef, onHeaderCellResize, setColumnResizing]);\n var handleColumnResizeMove = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (width, left, fixed) {\n var mouseAreaLeft = width + left;\n var x = mouseAreaLeft;\n var dir = 'left';\n\n if (rtl) {\n mouseAreaLeft += minScrollX.current + _constants__WEBPACK_IMPORTED_MODULE_7__.SCROLLBAR_WIDTH;\n dir = 'right';\n }\n\n if (!fixed) {\n x = mouseAreaLeft + (rtl ? -scrollX.current : scrollX.current);\n }\n\n if (mouseAreaRef.current) {\n var _addStyle;\n\n (0,dom_lib_addStyle__WEBPACK_IMPORTED_MODULE_2__.default)(mouseAreaRef.current, (_addStyle = {\n display: 'block'\n }, _addStyle[dir] = x + \"px\", _addStyle));\n }\n }, [minScrollX, mouseAreaRef, rtl, scrollX]);\n var handleColumnResizeStart = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (width, left, fixed) {\n setColumnResizing(true);\n handleColumnResizeMove(width, left, fixed);\n }, [handleColumnResizeMove, setColumnResizing]);\n var handleSortColumn = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (dataKey) {\n var nextSortType = sortType;\n\n if (sortColumn === dataKey) {\n nextSortType = sortType === _constants__WEBPACK_IMPORTED_MODULE_7__.SORT_TYPE.ASC ? _constants__WEBPACK_IMPORTED_MODULE_7__.SORT_TYPE.DESC : _constants__WEBPACK_IMPORTED_MODULE_7__.SORT_TYPE.ASC;\n setSortType(nextSortType);\n }\n\n onSortColumn === null || onSortColumn === void 0 ? void 0 : onSortColumn(dataKey, nextSortType);\n }, [onSortColumn, setSortType, sortColumn, sortType]);\n\n if (cacheData) {\n return cacheData;\n }\n\n var hasCustomTreeCol = false;\n var left = 0; // Cell left margin\n\n var headerCells = []; // Table header cell\n\n var bodyCells = []; // Table body cell\n\n if (!children) {\n var _cacheCell = {\n columns: [],\n headerCells: headerCells,\n bodyCells: bodyCells,\n hasCustomTreeCol: hasCustomTreeCol,\n allColumnsWidth: left\n };\n setCacheData(_cacheCell);\n return _cacheCell;\n }\n\n var columns = (0,_getTableColumns__WEBPACK_IMPORTED_MODULE_9__.default)(children);\n var count = columns.length;\n\n var _getTotalByColumns = (0,_getTotalByColumns__WEBPACK_IMPORTED_MODULE_10__.default)(columns),\n totalFlexGrow = _getTotalByColumns.totalFlexGrow,\n totalWidth = _getTotalByColumns.totalWidth;\n\n react__WEBPACK_IMPORTED_MODULE_1___default().Children.forEach(columns, function (column, index) {\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().isValidElement(column)) {\n var _columnWidths$current;\n\n var columnChildren = column.props.children;\n var _column$props = column.props,\n _width = _column$props.width,\n resizable = _column$props.resizable,\n flexGrow = _column$props.flexGrow,\n minWidth = _column$props.minWidth,\n onResize = _column$props.onResize,\n treeCol = _column$props.treeCol;\n\n if (treeCol) {\n hasCustomTreeCol = true;\n }\n\n if (resizable && flexGrow) {\n console.warn(\"Cannot set 'resizable' and 'flexGrow' together in <Column>, column index: \" + index);\n }\n\n if (columnChildren.length !== 2) {\n throw new Error(\"Component <HeaderCell> and <Cell> is required, column index: \" + index + \" \");\n }\n\n var headerCell = columnChildren[0];\n var cell = columnChildren[1];\n var cellWidth = ((_columnWidths$current = columnWidths.current) === null || _columnWidths$current === void 0 ? void 0 : _columnWidths$current[cell.props.dataKey + \"_\" + index + \"_width\"]) || _width || 0;\n\n if (tableWidth.current && flexGrow && totalFlexGrow) {\n cellWidth = Math.max((tableWidth.current - totalWidth) / totalFlexGrow * flexGrow, minWidth || 60);\n }\n\n var cellProps = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, lodash_omit__WEBPACK_IMPORTED_MODULE_5___default()(column.props, ['children']), {\n 'aria-colindex': index + 1,\n left: left,\n headerHeight: headerHeight,\n key: index,\n width: cellWidth,\n height: typeof rowHeight === 'function' ? rowHeight() : rowHeight,\n firstColumn: index === 0,\n lastColumn: index === count - 1\n });\n\n if (showHeader && headerHeight) {\n var headerCellProps = {\n // Resizable column\n // `index` is used to define the serial number when dragging the column width\n index: index,\n dataKey: cell.props.dataKey,\n isHeaderCell: true,\n minWidth: column.props.minWidth,\n sortable: column.props.sortable,\n onSortColumn: handleSortColumn,\n sortType: sortType,\n sortColumn: sortColumn,\n flexGrow: flexGrow\n };\n\n if (resizable) {\n lodash_merge__WEBPACK_IMPORTED_MODULE_6___default()(headerCellProps, {\n onResize: onResize,\n onColumnResizeEnd: handleColumnResizeEnd,\n onColumnResizeStart: handleColumnResizeStart,\n onColumnResizeMove: handleColumnResizeMove\n });\n }\n\n headerCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(headerCell, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, cellProps, headerCellProps)));\n }\n\n bodyCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(cell, cellProps));\n left += cellWidth;\n }\n });\n var cacheCell = {\n columns: columns,\n headerCells: headerCells,\n bodyCells: bodyCells,\n allColumnsWidth: left,\n hasCustomTreeCol: hasCustomTreeCol\n };\n setCacheData(cacheCell);\n return cacheCell;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (useCellDescriptor);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/useCellDescriptor.js?");
9900
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var dom_lib_addStyle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dom-lib/addStyle */ \"./node_modules/dom-lib/esm/addStyle.js\");\n/* harmony import */ var dom_lib_addClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! dom-lib/addClass */ \"./node_modules/dom-lib/esm/addClass.js\");\n/* harmony import */ var dom_lib_removeClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! dom-lib/removeClass */ \"./node_modules/dom-lib/esm/removeClass.js\");\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/omit */ \"./node_modules/lodash/omit.js\");\n/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_omit__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/merge */ \"./node_modules/lodash/merge.js\");\n/* harmony import */ var lodash_merge__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_merge__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _useControlled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./useControlled */ \"./node_modules/rsuite-table/es/utils/useControlled.js\");\n/* harmony import */ var _getTableColumns__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./getTableColumns */ \"./node_modules/rsuite-table/es/utils/getTableColumns.js\");\n/* harmony import */ var _getTotalByColumns__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./getTotalByColumns */ \"./node_modules/rsuite-table/es/utils/getTotalByColumns.js\");\n/* harmony import */ var _getColumnProps__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./getColumnProps */ \"./node_modules/rsuite-table/es/utils/getColumnProps.js\");\n/* harmony import */ var _useUpdateEffect__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./useUpdateEffect */ \"./node_modules/rsuite-table/es/utils/useUpdateEffect.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/**\n * Attach rendering-related attributes to all cells of the form and cache them.\n * @param props\n * @returns\n */\nvar useCellDescriptor = function useCellDescriptor(props) {\n var children = props.children,\n rtl = props.rtl,\n mouseAreaRef = props.mouseAreaRef,\n tableRef = props.tableRef,\n minScrollX = props.minScrollX,\n scrollX = props.scrollX,\n tableWidth = props.tableWidth,\n headerHeight = props.headerHeight,\n showHeader = props.showHeader,\n sortTypeProp = props.sortType,\n defaultSortType = props.defaultSortType,\n sortColumn = props.sortColumn,\n rowHeight = props.rowHeight,\n onSortColumn = props.onSortColumn,\n onHeaderCellResize = props.onHeaderCellResize,\n prefix = props.prefix;\n\n var _useControlled = (0,_useControlled__WEBPACK_IMPORTED_MODULE_8__.default)(sortTypeProp, defaultSortType),\n sortType = _useControlled[0],\n setSortType = _useControlled[1];\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(),\n cacheData = _useState[0],\n setCacheData = _useState[1];\n\n var clearCache = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {\n setCacheData(null);\n }, []);\n var setColumnResizing = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (resizing) {\n if (!tableRef.current) {\n return;\n }\n\n if (resizing) {\n (0,dom_lib_addClass__WEBPACK_IMPORTED_MODULE_3__.default)(tableRef.current, prefix('column-resizing'));\n } else {\n (0,dom_lib_removeClass__WEBPACK_IMPORTED_MODULE_4__.default)(tableRef.current, prefix('column-resizing'));\n }\n }, [prefix, tableRef]);\n var columnWidths = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)({});\n (0,_useUpdateEffect__WEBPACK_IMPORTED_MODULE_12__.default)(function () {\n clearCache();\n }, [children, sortColumn, sortType, tableWidth.current, scrollX.current, minScrollX.current]);\n (0,_useUpdateEffect__WEBPACK_IMPORTED_MODULE_12__.default)(function () {\n columnWidths.current = {};\n }, [children]);\n var handleColumnResizeEnd = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (columnWidth, _cursorDelta, dataKey, index) {\n columnWidths.current[dataKey + \"_\" + index + \"_width\"] = columnWidth;\n setColumnResizing(false);\n\n if (mouseAreaRef.current) {\n (0,dom_lib_addStyle__WEBPACK_IMPORTED_MODULE_2__.default)(mouseAreaRef.current, {\n display: 'none'\n });\n }\n\n clearCache();\n onHeaderCellResize === null || onHeaderCellResize === void 0 ? void 0 : onHeaderCellResize(columnWidth, dataKey);\n }, [clearCache, mouseAreaRef, onHeaderCellResize, setColumnResizing]);\n var handleColumnResizeMove = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (width, left, fixed) {\n var mouseAreaLeft = width + left;\n var x = mouseAreaLeft;\n var dir = 'left';\n\n if (rtl) {\n mouseAreaLeft += minScrollX.current + _constants__WEBPACK_IMPORTED_MODULE_7__.SCROLLBAR_WIDTH;\n dir = 'right';\n }\n\n if (!fixed) {\n x = mouseAreaLeft + (rtl ? -scrollX.current : scrollX.current);\n }\n\n if (mouseAreaRef.current) {\n var _addStyle;\n\n (0,dom_lib_addStyle__WEBPACK_IMPORTED_MODULE_2__.default)(mouseAreaRef.current, (_addStyle = {\n display: 'block'\n }, _addStyle[dir] = x + \"px\", _addStyle));\n }\n }, [minScrollX, mouseAreaRef, rtl, scrollX]);\n var handleColumnResizeStart = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (width, left, fixed) {\n setColumnResizing(true);\n handleColumnResizeMove(width, left, fixed);\n }, [handleColumnResizeMove, setColumnResizing]);\n var handleSortColumn = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (dataKey) {\n var nextSortType = sortType;\n\n if (sortColumn === dataKey) {\n nextSortType = sortType === _constants__WEBPACK_IMPORTED_MODULE_7__.SORT_TYPE.ASC ? _constants__WEBPACK_IMPORTED_MODULE_7__.SORT_TYPE.DESC : _constants__WEBPACK_IMPORTED_MODULE_7__.SORT_TYPE.ASC;\n setSortType(nextSortType);\n }\n\n onSortColumn === null || onSortColumn === void 0 ? void 0 : onSortColumn(dataKey, nextSortType);\n }, [onSortColumn, setSortType, sortColumn, sortType]);\n\n if (cacheData) {\n return cacheData;\n }\n\n var hasCustomTreeCol = false;\n var left = 0; // Cell left margin\n\n var headerCells = []; // Table header cell\n\n var bodyCells = []; // Table body cell\n\n if (!children) {\n var _cacheCell = {\n columns: [],\n headerCells: headerCells,\n bodyCells: bodyCells,\n hasCustomTreeCol: hasCustomTreeCol,\n allColumnsWidth: left\n };\n setCacheData(_cacheCell);\n return _cacheCell;\n }\n\n var columns = (0,_getTableColumns__WEBPACK_IMPORTED_MODULE_9__.default)(children);\n var count = columns.length;\n\n var _getTotalByColumns = (0,_getTotalByColumns__WEBPACK_IMPORTED_MODULE_10__.default)(columns),\n totalFlexGrow = _getTotalByColumns.totalFlexGrow,\n totalWidth = _getTotalByColumns.totalWidth;\n\n react__WEBPACK_IMPORTED_MODULE_1___default().Children.forEach(columns, function (column, index) {\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().isValidElement(column)) {\n var _columnWidths$current;\n\n var columnChildren = column.props.children;\n var columnProps = (0,_getColumnProps__WEBPACK_IMPORTED_MODULE_11__.default)(column);\n var _width = columnProps.width,\n resizable = columnProps.resizable,\n flexGrow = columnProps.flexGrow,\n minWidth = columnProps.minWidth,\n onResize = columnProps.onResize,\n treeCol = columnProps.treeCol;\n\n if (treeCol) {\n hasCustomTreeCol = true;\n }\n\n if (resizable && flexGrow) {\n console.warn(\"Cannot set 'resizable' and 'flexGrow' together in <Column>, column index: \" + index);\n }\n\n if (columnChildren.length !== 2) {\n throw new Error(\"Component <HeaderCell> and <Cell> is required, column index: \" + index + \" \");\n }\n\n var headerCell = columnChildren[0];\n var cell = columnChildren[1];\n var cellWidth = ((_columnWidths$current = columnWidths.current) === null || _columnWidths$current === void 0 ? void 0 : _columnWidths$current[cell.props.dataKey + \"_\" + index + \"_width\"]) || _width || 0;\n\n if (tableWidth.current && flexGrow && totalFlexGrow) {\n cellWidth = Math.max((tableWidth.current - totalWidth) / totalFlexGrow * flexGrow, minWidth || 60);\n }\n\n var cellProps = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, lodash_omit__WEBPACK_IMPORTED_MODULE_5___default()(columnProps, ['children']), {\n 'aria-colindex': index + 1,\n left: left,\n headerHeight: headerHeight,\n key: index,\n width: cellWidth,\n height: typeof rowHeight === 'function' ? rowHeight() : rowHeight,\n firstColumn: index === 0,\n lastColumn: index === count - 1\n });\n\n if (showHeader && headerHeight) {\n var headerCellProps = {\n // Resizable column\n // `index` is used to define the serial number when dragging the column width\n index: index,\n dataKey: cell.props.dataKey,\n isHeaderCell: true,\n minWidth: columnProps.minWidth,\n sortable: columnProps.sortable,\n onSortColumn: handleSortColumn,\n sortType: sortType,\n sortColumn: sortColumn,\n flexGrow: flexGrow\n };\n\n if (resizable) {\n lodash_merge__WEBPACK_IMPORTED_MODULE_6___default()(headerCellProps, {\n onResize: onResize,\n onColumnResizeEnd: handleColumnResizeEnd,\n onColumnResizeStart: handleColumnResizeStart,\n onColumnResizeMove: handleColumnResizeMove\n });\n }\n\n headerCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(headerCell, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__.default)({}, cellProps, headerCellProps)));\n }\n\n bodyCells.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(cell, cellProps));\n left += cellWidth;\n }\n });\n var cacheCell = {\n columns: columns,\n headerCells: headerCells,\n bodyCells: bodyCells,\n allColumnsWidth: left,\n hasCustomTreeCol: hasCustomTreeCol\n };\n setCacheData(cacheCell);\n return cacheCell;\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (useCellDescriptor);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/useCellDescriptor.js?");
9890
9901
 
9891
9902
  /***/ }),
9892
9903
 
@@ -9952,7 +9963,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
9952
9963
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9953
9964
 
9954
9965
  "use strict";
9955
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var dom_lib_WheelHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dom-lib/WheelHandler */ \"./node_modules/dom-lib/esm/WheelHandler.js\");\n/* harmony import */ var dom_lib_scrollLeft__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dom-lib/scrollLeft */ \"./node_modules/dom-lib/esm/scrollLeft.js\");\n/* harmony import */ var dom_lib_scrollTop__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! dom-lib/scrollTop */ \"./node_modules/dom-lib/esm/scrollTop.js\");\n/* harmony import */ var dom_lib_on__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! dom-lib/on */ \"./node_modules/dom-lib/esm/on.js\");\n/* harmony import */ var dom_lib_removeStyle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dom-lib/removeStyle */ \"./node_modules/dom-lib/esm/removeStyle.js\");\n/* harmony import */ var _requestAnimationTimeout__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./requestAnimationTimeout */ \"./node_modules/rsuite-table/es/utils/requestAnimationTimeout.js\");\n/* harmony import */ var _useUpdateEffect__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./useUpdateEffect */ \"./node_modules/rsuite-table/es/utils/useUpdateEffect.js\");\n/* harmony import */ var _useMount__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./useMount */ \"./node_modules/rsuite-table/es/utils/useMount.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _isSupportTouchEvent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./isSupportTouchEvent */ \"./node_modules/rsuite-table/es/utils/isSupportTouchEvent.js\");\n/* harmony import */ var _flushSync__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./flushSync */ \"./node_modules/rsuite-table/es/utils/flushSync.js\");\n\n\n\n\n\n\n\n\n\n\n\n // Inertial sliding start time threshold\n\nvar momentumTimeThreshold = 300; // Inertial sliding start vertical distance threshold\n\nvar momentumYThreshold = 15;\n\n/**\n * Calculate the distance of inertial sliding.\n */\nvar momentum = function momentum(current, start, duration) {\n // Inertial sliding acceleration.\n var deceleration = 0.003;\n var distance = current - start;\n var speed = 2 * Math.abs(distance) / duration;\n var destination = current + speed / deceleration * (distance < 0 ? -1 : 1);\n return {\n delta: current - destination,\n duration: _constants__WEBPACK_IMPORTED_MODULE_9__.TRANSITION_DURATION,\n bezier: _constants__WEBPACK_IMPORTED_MODULE_9__.BEZIER\n };\n};\n/**\n * Add scroll, touch, and wheel monitoring events to the table,\n * and update the scroll position of the table.\n * @param props\n * @returns\n */\n\n\nvar useScrollListener = function useScrollListener(props) {\n var data = props.data,\n autoHeight = props.autoHeight,\n tableBodyRef = props.tableBodyRef,\n scrollbarXRef = props.scrollbarXRef,\n scrollbarYRef = props.scrollbarYRef,\n disabledScroll = props.disabledScroll,\n loading = props.loading,\n tableRef = props.tableRef,\n contentWidth = props.contentWidth,\n tableWidth = props.tableWidth,\n scrollY = props.scrollY,\n minScrollY = props.minScrollY,\n minScrollX = props.minScrollX,\n scrollX = props.scrollX,\n setScrollX = props.setScrollX,\n setScrollY = props.setScrollY,\n virtualized = props.virtualized,\n forceUpdatePosition = props.forceUpdatePosition,\n onScroll = props.onScroll,\n onTouchMove = props.onTouchMove,\n onTouchStart = props.onTouchStart,\n onTouchEnd = props.onTouchEnd,\n height = props.height,\n getTableHeight = props.getTableHeight,\n contentHeight = props.contentHeight,\n headerHeight = props.headerHeight,\n rtl = props.rtl;\n var wheelListener = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();\n var touchStartListener = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();\n var touchMoveListener = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();\n var touchEndListener = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n isScrolling = _useState[0],\n setScrolling = _useState[1];\n\n var touchX = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);\n var touchY = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);\n var disableEventsTimeoutId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);\n var isTouching = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false); // The start time within the inertial sliding range.\n\n var momentumStartTime = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0); // The vertical starting value within the inertial sliding range.\n\n var momentumStartY = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);\n var shouldHandleWheelX = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (delta) {\n if (delta === 0 || disabledScroll || loading) {\n return false;\n }\n\n return true;\n }, [disabledScroll, loading]);\n var shouldHandleWheelY = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (delta) {\n if (delta === 0 || disabledScroll || loading || autoHeight) {\n return false;\n }\n\n if (typeof scrollY.current === 'number' && typeof minScrollY.current === 'number') {\n return delta >= 0 && scrollY.current > minScrollY.current || delta < 0 && scrollY.current < 0;\n }\n }, [autoHeight, disabledScroll, loading, minScrollY, scrollY]);\n var debounceScrollEndedCallback = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {\n disableEventsTimeoutId.current = null; // Forces the end of scrolling to be prioritized so that virtualized long lists can update rendering.\n // There will be no scrolling white screen.\n\n (0,_flushSync__WEBPACK_IMPORTED_MODULE_11__.default)(function () {\n return setScrolling(false);\n });\n }, []);\n /**\n * Triggered when scrolling, including: wheel/touch/scroll\n * @param deltaX\n * @param deltaY\n * @param momentumOptions The configuration of inertial scrolling is used for the touch event.\n */\n\n var handleWheel = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (deltaX, deltaY, momentumOptions, event) {\n if (!tableRef.current) {\n return;\n }\n\n var nextScrollX = contentWidth.current <= tableWidth.current ? 0 : scrollX.current - deltaX;\n var nextScrollY = scrollY.current - deltaY;\n var y = Math.min(0, nextScrollY < minScrollY.current ? minScrollY.current : nextScrollY);\n var x = Math.min(0, nextScrollX < minScrollX.current ? minScrollX.current : nextScrollX);\n setScrollX(x);\n setScrollY(y);\n onScroll === null || onScroll === void 0 ? void 0 : onScroll(Math.abs(x), Math.abs(y));\n\n if (virtualized) {\n // Add a state to the table during virtualized scrolling.\n // Make it set CSS `pointer-events:none` on the DOM to avoid wrong event interaction.\n setScrolling(true);\n\n if (disableEventsTimeoutId.current) {\n (0,_requestAnimationTimeout__WEBPACK_IMPORTED_MODULE_6__.cancelAnimationTimeout)(disableEventsTimeoutId.current);\n }\n\n disableEventsTimeoutId.current = (0,_requestAnimationTimeout__WEBPACK_IMPORTED_MODULE_6__.requestAnimationTimeout)(debounceScrollEndedCallback, // When momentum is enabled, set a delay of 50ms rendering.\n momentumOptions !== null && momentumOptions !== void 0 && momentumOptions.duration ? 50 : 0);\n } // When the user clicks on the scrollbar, the scrollbar will be moved to the clicked position.\n\n\n if ((event === null || event === void 0 ? void 0 : event.type) === 'click') {\n /**\n * With virtualized enabled, the list will be re-rendered on every scroll.\n * Update the position of the rendered list with a delay.\n * fix: https://github.com/rsuite/rsuite/issues/2378\n */\n setTimeout(function () {\n return forceUpdatePosition(momentumOptions === null || momentumOptions === void 0 ? void 0 : momentumOptions.duration, momentumOptions === null || momentumOptions === void 0 ? void 0 : momentumOptions.bezier);\n }, 0);\n return;\n }\n\n forceUpdatePosition(momentumOptions === null || momentumOptions === void 0 ? void 0 : momentumOptions.duration, momentumOptions === null || momentumOptions === void 0 ? void 0 : momentumOptions.bezier);\n }, [tableRef, contentWidth, tableWidth, scrollX, scrollY, minScrollY, minScrollX, setScrollX, setScrollY, onScroll, forceUpdatePosition, virtualized, debounceScrollEndedCallback]);\n var onWheel = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (deltaX, deltaY, momentumOptions) {\n var _scrollbarXRef$curren, _scrollbarXRef$curren2, _scrollbarYRef$curren, _scrollbarYRef$curren2;\n\n handleWheel(deltaX, deltaY, momentumOptions);\n (_scrollbarXRef$curren = scrollbarXRef.current) === null || _scrollbarXRef$curren === void 0 ? void 0 : (_scrollbarXRef$curren2 = _scrollbarXRef$curren.onWheelScroll) === null || _scrollbarXRef$curren2 === void 0 ? void 0 : _scrollbarXRef$curren2.call(_scrollbarXRef$curren, deltaX);\n (_scrollbarYRef$curren = scrollbarYRef.current) === null || _scrollbarYRef$curren === void 0 ? void 0 : (_scrollbarYRef$curren2 = _scrollbarYRef$curren.onWheelScroll) === null || _scrollbarYRef$curren2 === void 0 ? void 0 : _scrollbarYRef$curren2.call(_scrollbarYRef$curren, deltaY, momentumOptions !== null && momentumOptions !== void 0 && momentumOptions.duration ? true : false);\n }, [handleWheel, scrollbarXRef, scrollbarYRef]);\n var wheelHandler = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(); // Stop unending scrolling and remove transition\n\n var stopScroll = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {\n var _tableBodyRef$current, _scrollbarYRef$curren3;\n\n var wheelElement = (_tableBodyRef$current = tableBodyRef.current) === null || _tableBodyRef$current === void 0 ? void 0 : _tableBodyRef$current.querySelector('.rs-table-body-wheel-area');\n var handleElement = (_scrollbarYRef$curren3 = scrollbarYRef.current) === null || _scrollbarYRef$curren3 === void 0 ? void 0 : _scrollbarYRef$curren3.handle;\n var transitionCSS = ['transition-duration', 'transition-timing-function'];\n\n if (!virtualized && wheelElement) {\n // Get the current translate position.\n var matrix = window.getComputedStyle(wheelElement).getPropertyValue('transform');\n var offsetY = Math.round(+matrix.split(')')[0].split(', ')[5]);\n setScrollY(offsetY);\n }\n\n if (wheelElement) {\n (0,dom_lib_removeStyle__WEBPACK_IMPORTED_MODULE_5__.default)(wheelElement, transitionCSS);\n }\n\n if (handleElement) {\n (0,dom_lib_removeStyle__WEBPACK_IMPORTED_MODULE_5__.default)(handleElement, transitionCSS);\n }\n }, [scrollbarYRef, setScrollY, tableBodyRef, virtualized]); // Handle the Touch event and initialize it when touchstart is triggered.\n\n var handleTouchStart = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {\n var _event$touches$ = event.touches[0],\n pageX = _event$touches$.pageX,\n pageY = _event$touches$.pageY;\n touchX.current = pageX;\n touchY.current = pageY;\n momentumStartTime.current = new Date().getTime();\n momentumStartY.current = scrollY.current;\n isTouching.current = true;\n onTouchStart === null || onTouchStart === void 0 ? void 0 : onTouchStart(event); // Stop unfinished scrolling when Touch starts.\n\n stopScroll();\n }, [onTouchStart, scrollY, stopScroll]); // Handle the Touch event and update the scroll when touchmove is triggered.\n\n var handleTouchMove = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {\n if (!isTouching.current) {\n return;\n }\n\n var _event$touches$2 = event.touches[0],\n pageX = _event$touches$2.pageX,\n pageY = _event$touches$2.pageY;\n var deltaX = touchX.current - pageX;\n var deltaY = autoHeight ? 0 : touchY.current - pageY;\n\n if (!shouldHandleWheelY(deltaY) && !shouldHandleWheelX(deltaX)) {\n return;\n }\n /**\n * Prevent the default touch event when the table is scrollable.\n * fix: https://github.com/rsuite/rsuite-table/commit/21785fc18f430519ab5885c44540d9ffc30de366#commitcomment-36236425\n */\n\n\n if (!autoHeight && shouldHandleWheelY(deltaY)) {\n var _event$preventDefault;\n\n (_event$preventDefault = event.preventDefault) === null || _event$preventDefault === void 0 ? void 0 : _event$preventDefault.call(event);\n }\n\n var now = new Date().getTime();\n onWheel(deltaX, deltaY);\n touchX.current = pageX;\n touchY.current = pageY; // Record the offset value and time under the condition of triggering inertial scrolling.\n\n if (now - momentumStartTime.current > momentumTimeThreshold) {\n momentumStartY.current = scrollY.current;\n momentumStartTime.current = now;\n }\n\n onTouchMove === null || onTouchMove === void 0 ? void 0 : onTouchMove(event);\n }, [autoHeight, onWheel, onTouchMove, scrollY, shouldHandleWheelX, shouldHandleWheelY]);\n var handleTouchEnd = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {\n if (!isTouching.current) {\n return;\n }\n\n isTouching.current = false;\n var touchDuration = new Date().getTime() - momentumStartTime.current;\n var absDeltaY = Math.abs(scrollY.current - momentumStartY.current); // Enable inertial sliding.\n\n if (touchDuration < momentumTimeThreshold && absDeltaY > momentumYThreshold) {\n var _momentum = momentum(scrollY.current, momentumStartY.current, touchDuration),\n delta = _momentum.delta,\n duration = _momentum.duration,\n bezier = _momentum.bezier;\n\n onWheel(0, delta, {\n duration: duration,\n bezier: bezier\n });\n onTouchEnd === null || onTouchEnd === void 0 ? void 0 : onTouchEnd(event);\n }\n }, [onWheel, onTouchEnd, scrollY]);\n /**\n * When the user uses the tab key in the Table, the onScroll event is triggered,\n * and the scroll bar position should be updated at the same time.\n * https://github.com/rsuite/rsuite/issues/234\n */\n\n var onScrollBody = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {\n if (event.target !== tableBodyRef.current) {\n return;\n }\n\n var left = (0,dom_lib_scrollLeft__WEBPACK_IMPORTED_MODULE_2__.default)(event.target);\n var top = (0,dom_lib_scrollTop__WEBPACK_IMPORTED_MODULE_3__.default)(event.target);\n\n if (top === 0 && left === 0) {\n return;\n }\n\n onWheel(left, top);\n (0,dom_lib_scrollLeft__WEBPACK_IMPORTED_MODULE_2__.default)(event.target, 0);\n (0,dom_lib_scrollTop__WEBPACK_IMPORTED_MODULE_3__.default)(event.target, 0);\n }, [onWheel, tableBodyRef]);\n var getControlledScrollTopValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (value) {\n if (autoHeight) {\n return [0, 0];\n }\n\n var height = getTableHeight(); // The maximum range of scrolling value is judged.\n\n value = Math.min(value, Math.max(0, contentHeight.current - (height - headerHeight))); // The value is a value of the theoretical scroll position of the table,\n // and the scrollY coordinate value and the value of the scroll bar position are calculated by value.\n\n return [-value, value / contentHeight.current * (height - headerHeight)];\n }, [autoHeight, contentHeight, getTableHeight, headerHeight]);\n\n var rerender = function rerender() {\n setScrolling(true);\n setTimeout(function () {\n if (tableBodyRef.current) {\n setScrolling(false);\n }\n }, 0);\n };\n\n var getControlledScrollLeftValue = function getControlledScrollLeftValue(value) {\n // The maximum range of scrolling value is judged.\n value = Math.min(value, Math.max(0, contentWidth.current - tableWidth.current));\n return [-value, value / contentWidth.current * tableWidth.current];\n };\n\n var onScrollTop = function onScrollTop(top) {\n var _scrollbarYRef$curren4, _scrollbarYRef$curren5;\n\n if (top === void 0) {\n top = 0;\n }\n\n var _getControlledScrollT = getControlledScrollTopValue(top),\n nextScrollY = _getControlledScrollT[0],\n handleScrollY = _getControlledScrollT[1];\n\n var height = getTableHeight();\n\n if (!loading && nextScrollY !== scrollY.current) {\n onScroll === null || onScroll === void 0 ? void 0 : onScroll(Math.abs(scrollX.current), Math.abs(nextScrollY));\n }\n\n setScrollY(nextScrollY);\n scrollbarYRef === null || scrollbarYRef === void 0 ? void 0 : (_scrollbarYRef$curren4 = scrollbarYRef.current) === null || _scrollbarYRef$curren4 === void 0 ? void 0 : (_scrollbarYRef$curren5 = _scrollbarYRef$curren4.resetScrollBarPosition) === null || _scrollbarYRef$curren5 === void 0 ? void 0 : _scrollbarYRef$curren5.call(_scrollbarYRef$curren4, handleScrollY);\n forceUpdatePosition();\n /**\n * After calling `scrollTop`, a white screen will appear when `virtualized` is true.\n * The reason is that the coordinates of the DOM are directly manipulated,\n * but the component is not re-rendered. Need to call `rerender`.\n * Fix: rsuite#1044\n */\n\n if (virtualized && contentHeight.current > height) {\n rerender();\n }\n };\n\n var onScrollLeft = function onScrollLeft(left) {\n var _scrollbarXRef$curren3, _scrollbarXRef$curren4;\n\n if (left === void 0) {\n left = 0;\n }\n\n var _getControlledScrollL = getControlledScrollLeftValue(left),\n nextScrollX = _getControlledScrollL[0],\n scrollbarX = _getControlledScrollL[1];\n\n setScrollX(nextScrollX);\n !loading && (onScroll === null || onScroll === void 0 ? void 0 : onScroll(Math.abs(nextScrollX), Math.abs(scrollY.current)));\n scrollbarXRef === null || scrollbarXRef === void 0 ? void 0 : (_scrollbarXRef$curren3 = scrollbarXRef.current) === null || _scrollbarXRef$curren3 === void 0 ? void 0 : (_scrollbarXRef$curren4 = _scrollbarXRef$curren3.resetScrollBarPosition) === null || _scrollbarXRef$curren4 === void 0 ? void 0 : _scrollbarXRef$curren4.call(_scrollbarXRef$curren3, scrollbarX);\n forceUpdatePosition();\n };\n\n var onScrollTo = function onScrollTo(coord) {\n var _ref = coord || {},\n x = _ref.x,\n y = _ref.y;\n\n if (typeof x === 'number') {\n onScrollLeft(x);\n }\n\n if (typeof y === 'number') {\n onScrollTop(y);\n }\n };\n\n (0,_useUpdateEffect__WEBPACK_IMPORTED_MODULE_7__.default)(function () {\n if (scrollY.current !== 0) {\n onScrollTop(Math.abs(scrollY.current));\n }\n }, [height, data]);\n var releaseListeners = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {\n var _wheelListener$curren, _touchStartListener$c, _touchMoveListener$cu, _touchEndListener$cur;\n\n wheelHandler.current = null;\n (_wheelListener$curren = wheelListener.current) === null || _wheelListener$curren === void 0 ? void 0 : _wheelListener$curren.off();\n (_touchStartListener$c = touchStartListener.current) === null || _touchStartListener$c === void 0 ? void 0 : _touchStartListener$c.off();\n (_touchMoveListener$cu = touchMoveListener.current) === null || _touchMoveListener$cu === void 0 ? void 0 : _touchMoveListener$cu.off();\n (_touchEndListener$cur = touchEndListener.current) === null || _touchEndListener$cur === void 0 ? void 0 : _touchEndListener$cur.off();\n }, []);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n var options = {\n passive: false\n };\n var tableBody = tableBodyRef.current;\n\n if (tableBody) {\n // Reset the listener after props is updated.\n releaseListeners();\n wheelHandler.current = new dom_lib_WheelHandler__WEBPACK_IMPORTED_MODULE_1__.default(onWheel, shouldHandleWheelX, shouldHandleWheelY, false);\n wheelListener.current = (0,dom_lib_on__WEBPACK_IMPORTED_MODULE_4__.default)(tableBody, 'wheel', wheelHandler.current.onWheel, options);\n\n if ((0,_isSupportTouchEvent__WEBPACK_IMPORTED_MODULE_10__.default)()) {\n touchStartListener.current = (0,dom_lib_on__WEBPACK_IMPORTED_MODULE_4__.default)(tableBody, 'touchstart', handleTouchStart, options);\n touchMoveListener.current = (0,dom_lib_on__WEBPACK_IMPORTED_MODULE_4__.default)(tableBody, 'touchmove', handleTouchMove, options);\n touchEndListener.current = (0,dom_lib_on__WEBPACK_IMPORTED_MODULE_4__.default)(tableBody, 'touchend', handleTouchEnd, options);\n }\n }\n\n return releaseListeners;\n }, [handleTouchEnd, handleTouchMove, handleTouchStart, onWheel, releaseListeners, shouldHandleWheelX, shouldHandleWheelY, tableBodyRef]);\n (0,_useMount__WEBPACK_IMPORTED_MODULE_8__.default)(function () {\n if (rtl) {\n var _scrollbarXRef$curren5, _scrollbarXRef$curren6;\n\n // Initialize scroll position\n setScrollX(tableWidth.current - contentWidth.current - _constants__WEBPACK_IMPORTED_MODULE_9__.SCROLLBAR_WIDTH);\n scrollbarXRef === null || scrollbarXRef === void 0 ? void 0 : (_scrollbarXRef$curren5 = scrollbarXRef.current) === null || _scrollbarXRef$curren5 === void 0 ? void 0 : (_scrollbarXRef$curren6 = _scrollbarXRef$curren5.resetScrollBarPosition) === null || _scrollbarXRef$curren6 === void 0 ? void 0 : _scrollbarXRef$curren6.call(_scrollbarXRef$curren5, -scrollX.current);\n forceUpdatePosition();\n }\n });\n var onScrollHorizontal = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (delta) {\n return handleWheel(delta, 0);\n }, [handleWheel]);\n var onScrollVertical = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (delta, event) {\n return handleWheel(0, delta, undefined, event);\n }, [handleWheel]);\n return {\n isScrolling: isScrolling,\n onScrollHorizontal: onScrollHorizontal,\n onScrollVertical: onScrollVertical,\n onScrollBody: onScrollBody,\n onScrollTop: onScrollTop,\n onScrollLeft: onScrollLeft,\n onScrollTo: onScrollTo\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (useScrollListener);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/useScrollListener.js?");
9966
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var dom_lib_WheelHandler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dom-lib/WheelHandler */ \"./node_modules/dom-lib/esm/WheelHandler.js\");\n/* harmony import */ var dom_lib_scrollLeft__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dom-lib/scrollLeft */ \"./node_modules/dom-lib/esm/scrollLeft.js\");\n/* harmony import */ var dom_lib_scrollTop__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! dom-lib/scrollTop */ \"./node_modules/dom-lib/esm/scrollTop.js\");\n/* harmony import */ var dom_lib_on__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! dom-lib/on */ \"./node_modules/dom-lib/esm/on.js\");\n/* harmony import */ var dom_lib_removeStyle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dom-lib/removeStyle */ \"./node_modules/dom-lib/esm/removeStyle.js\");\n/* harmony import */ var _requestAnimationTimeout__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./requestAnimationTimeout */ \"./node_modules/rsuite-table/es/utils/requestAnimationTimeout.js\");\n/* harmony import */ var _useUpdateEffect__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./useUpdateEffect */ \"./node_modules/rsuite-table/es/utils/useUpdateEffect.js\");\n/* harmony import */ var _useMount__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./useMount */ \"./node_modules/rsuite-table/es/utils/useMount.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../constants */ \"./node_modules/rsuite-table/es/constants.js\");\n/* harmony import */ var _isSupportTouchEvent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./isSupportTouchEvent */ \"./node_modules/rsuite-table/es/utils/isSupportTouchEvent.js\");\n/* harmony import */ var _flushSync__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./flushSync */ \"./node_modules/rsuite-table/es/utils/flushSync.js\");\n\n\n\n\n\n\n\n\n\n\n\n // Inertial sliding start time threshold\n\nvar momentumTimeThreshold = 300; // Inertial sliding start vertical distance threshold\n\nvar momentumYThreshold = 15;\n\n/**\n * Calculate the distance of inertial sliding.\n */\nvar momentum = function momentum(current, start, duration) {\n // Inertial sliding acceleration.\n var deceleration = 0.003;\n var distance = current - start;\n var speed = 2 * Math.abs(distance) / duration;\n var destination = current + speed / deceleration * (distance < 0 ? -1 : 1);\n return {\n delta: current - destination,\n duration: _constants__WEBPACK_IMPORTED_MODULE_9__.TRANSITION_DURATION,\n bezier: _constants__WEBPACK_IMPORTED_MODULE_9__.BEZIER\n };\n};\n/**\n * Add scroll, touch, and wheel monitoring events to the table,\n * and update the scroll position of the table.\n * @param props\n * @returns\n */\n\n\nvar useScrollListener = function useScrollListener(props) {\n var data = props.data,\n autoHeight = props.autoHeight,\n tableBodyRef = props.tableBodyRef,\n scrollbarXRef = props.scrollbarXRef,\n scrollbarYRef = props.scrollbarYRef,\n disabledScroll = props.disabledScroll,\n loading = props.loading,\n tableRef = props.tableRef,\n contentWidth = props.contentWidth,\n tableWidth = props.tableWidth,\n scrollY = props.scrollY,\n minScrollY = props.minScrollY,\n minScrollX = props.minScrollX,\n scrollX = props.scrollX,\n setScrollX = props.setScrollX,\n setScrollY = props.setScrollY,\n virtualized = props.virtualized,\n forceUpdatePosition = props.forceUpdatePosition,\n onScroll = props.onScroll,\n onTouchMove = props.onTouchMove,\n onTouchStart = props.onTouchStart,\n onTouchEnd = props.onTouchEnd,\n height = props.height,\n getTableHeight = props.getTableHeight,\n contentHeight = props.contentHeight,\n headerHeight = props.headerHeight,\n rtl = props.rtl;\n var wheelListener = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();\n var touchStartListener = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();\n var touchMoveListener = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();\n var touchEndListener = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),\n isScrolling = _useState[0],\n setScrolling = _useState[1];\n\n var touchX = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);\n var touchY = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);\n var disableEventsTimeoutId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);\n var isTouching = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false); // The start time within the inertial sliding range.\n\n var momentumStartTime = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0); // The vertical starting value within the inertial sliding range.\n\n var momentumStartY = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);\n var shouldHandleWheelX = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (delta) {\n if (delta === 0 || disabledScroll || loading) {\n return false;\n }\n\n return true;\n }, [disabledScroll, loading]);\n var shouldHandleWheelY = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (delta) {\n if (delta === 0 || disabledScroll || loading || autoHeight) {\n return false;\n }\n\n if (typeof scrollY.current === 'number' && typeof minScrollY.current === 'number') {\n return delta >= 0 && scrollY.current > minScrollY.current || delta < 0 && scrollY.current < 0;\n }\n }, [autoHeight, disabledScroll, loading, minScrollY, scrollY]);\n var debounceScrollEndedCallback = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {\n disableEventsTimeoutId.current = null; // Forces the end of scrolling to be prioritized so that virtualized long lists can update rendering.\n // There will be no scrolling white screen.\n\n (0,_flushSync__WEBPACK_IMPORTED_MODULE_11__.default)(function () {\n return setScrolling(false);\n });\n }, []);\n /**\n * Triggered when scrolling, including: wheel/touch/scroll\n * @param deltaX\n * @param deltaY\n * @param momentumOptions The configuration of inertial scrolling is used for the touch event.\n */\n\n var handleWheel = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (deltaX, deltaY, momentumOptions, event) {\n if (!tableRef.current) {\n return;\n }\n\n var nextScrollX = contentWidth.current <= tableWidth.current ? 0 : scrollX.current - deltaX;\n var nextScrollY = scrollY.current - deltaY;\n var y = Math.min(0, nextScrollY < minScrollY.current ? minScrollY.current : nextScrollY);\n var x = Math.min(0, nextScrollX < minScrollX.current ? minScrollX.current : nextScrollX);\n setScrollX(x);\n setScrollY(y);\n onScroll === null || onScroll === void 0 ? void 0 : onScroll(Math.abs(x), Math.abs(y));\n\n if (virtualized) {\n // Add a state to the table during virtualized scrolling.\n // Make it set CSS `pointer-events:none` on the DOM to avoid wrong event interaction.\n (0,_flushSync__WEBPACK_IMPORTED_MODULE_11__.default)(function () {\n return setScrolling(true);\n });\n\n if (disableEventsTimeoutId.current) {\n (0,_requestAnimationTimeout__WEBPACK_IMPORTED_MODULE_6__.cancelAnimationTimeout)(disableEventsTimeoutId.current);\n }\n\n disableEventsTimeoutId.current = (0,_requestAnimationTimeout__WEBPACK_IMPORTED_MODULE_6__.requestAnimationTimeout)(debounceScrollEndedCallback, // When momentum is enabled, set a delay of 50ms rendering.\n momentumOptions !== null && momentumOptions !== void 0 && momentumOptions.duration ? 50 : 0);\n } // When the user clicks on the scrollbar, the scrollbar will be moved to the clicked position.\n\n\n if ((event === null || event === void 0 ? void 0 : event.type) === 'click') {\n /**\n * With virtualized enabled, the list will be re-rendered on every scroll.\n * Update the position of the rendered list with a delay.\n * fix: https://github.com/rsuite/rsuite/issues/2378\n */\n setTimeout(function () {\n return forceUpdatePosition(momentumOptions === null || momentumOptions === void 0 ? void 0 : momentumOptions.duration, momentumOptions === null || momentumOptions === void 0 ? void 0 : momentumOptions.bezier);\n }, 0);\n return;\n }\n\n forceUpdatePosition(momentumOptions === null || momentumOptions === void 0 ? void 0 : momentumOptions.duration, momentumOptions === null || momentumOptions === void 0 ? void 0 : momentumOptions.bezier);\n }, [tableRef, contentWidth, tableWidth, scrollX, scrollY, minScrollY, minScrollX, setScrollX, setScrollY, onScroll, forceUpdatePosition, virtualized, debounceScrollEndedCallback]);\n var onWheel = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (deltaX, deltaY, momentumOptions) {\n var _scrollbarXRef$curren, _scrollbarXRef$curren2, _scrollbarYRef$curren, _scrollbarYRef$curren2;\n\n handleWheel(deltaX, deltaY, momentumOptions);\n (_scrollbarXRef$curren = scrollbarXRef.current) === null || _scrollbarXRef$curren === void 0 ? void 0 : (_scrollbarXRef$curren2 = _scrollbarXRef$curren.onWheelScroll) === null || _scrollbarXRef$curren2 === void 0 ? void 0 : _scrollbarXRef$curren2.call(_scrollbarXRef$curren, deltaX);\n (_scrollbarYRef$curren = scrollbarYRef.current) === null || _scrollbarYRef$curren === void 0 ? void 0 : (_scrollbarYRef$curren2 = _scrollbarYRef$curren.onWheelScroll) === null || _scrollbarYRef$curren2 === void 0 ? void 0 : _scrollbarYRef$curren2.call(_scrollbarYRef$curren, deltaY, momentumOptions !== null && momentumOptions !== void 0 && momentumOptions.duration ? true : false);\n }, [handleWheel, scrollbarXRef, scrollbarYRef]);\n var wheelHandler = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(); // Stop unending scrolling and remove transition\n\n var stopScroll = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {\n var _tableBodyRef$current, _scrollbarYRef$curren3;\n\n var wheelElement = (_tableBodyRef$current = tableBodyRef.current) === null || _tableBodyRef$current === void 0 ? void 0 : _tableBodyRef$current.querySelector('.rs-table-body-wheel-area');\n var handleElement = (_scrollbarYRef$curren3 = scrollbarYRef.current) === null || _scrollbarYRef$curren3 === void 0 ? void 0 : _scrollbarYRef$curren3.handle;\n var transitionCSS = ['transition-duration', 'transition-timing-function'];\n\n if (!virtualized && wheelElement) {\n // Get the current translate position.\n var matrix = window.getComputedStyle(wheelElement).getPropertyValue('transform');\n var offsetY = Math.round(+matrix.split(')')[0].split(', ')[5]);\n setScrollY(offsetY);\n }\n\n if (wheelElement) {\n (0,dom_lib_removeStyle__WEBPACK_IMPORTED_MODULE_5__.default)(wheelElement, transitionCSS);\n }\n\n if (handleElement) {\n (0,dom_lib_removeStyle__WEBPACK_IMPORTED_MODULE_5__.default)(handleElement, transitionCSS);\n }\n }, [scrollbarYRef, setScrollY, tableBodyRef, virtualized]); // Handle the Touch event and initialize it when touchstart is triggered.\n\n var handleTouchStart = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {\n var _event$touches$ = event.touches[0],\n pageX = _event$touches$.pageX,\n pageY = _event$touches$.pageY;\n touchX.current = pageX;\n touchY.current = pageY;\n momentumStartTime.current = new Date().getTime();\n momentumStartY.current = scrollY.current;\n isTouching.current = true;\n onTouchStart === null || onTouchStart === void 0 ? void 0 : onTouchStart(event); // Stop unfinished scrolling when Touch starts.\n\n stopScroll();\n }, [onTouchStart, scrollY, stopScroll]); // Handle the Touch event and update the scroll when touchmove is triggered.\n\n var handleTouchMove = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {\n if (!isTouching.current) {\n return;\n }\n\n var _event$touches$2 = event.touches[0],\n pageX = _event$touches$2.pageX,\n pageY = _event$touches$2.pageY;\n var deltaX = touchX.current - pageX;\n var deltaY = autoHeight ? 0 : touchY.current - pageY;\n\n if (!shouldHandleWheelY(deltaY) && !shouldHandleWheelX(deltaX)) {\n return;\n }\n /**\n * Prevent the default touch event when the table is scrollable.\n * fix: https://github.com/rsuite/rsuite-table/commit/21785fc18f430519ab5885c44540d9ffc30de366#commitcomment-36236425\n */\n\n\n if (!autoHeight && shouldHandleWheelY(deltaY)) {\n var _event$preventDefault;\n\n (_event$preventDefault = event.preventDefault) === null || _event$preventDefault === void 0 ? void 0 : _event$preventDefault.call(event);\n }\n\n var now = new Date().getTime();\n onWheel(deltaX, deltaY);\n touchX.current = pageX;\n touchY.current = pageY; // Record the offset value and time under the condition of triggering inertial scrolling.\n\n if (now - momentumStartTime.current > momentumTimeThreshold) {\n momentumStartY.current = scrollY.current;\n momentumStartTime.current = now;\n }\n\n onTouchMove === null || onTouchMove === void 0 ? void 0 : onTouchMove(event);\n }, [autoHeight, onWheel, onTouchMove, scrollY, shouldHandleWheelX, shouldHandleWheelY]);\n var handleTouchEnd = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {\n if (!isTouching.current) {\n return;\n }\n\n isTouching.current = false;\n var touchDuration = new Date().getTime() - momentumStartTime.current;\n var absDeltaY = Math.abs(scrollY.current - momentumStartY.current); // Enable inertial sliding.\n\n if (touchDuration < momentumTimeThreshold && absDeltaY > momentumYThreshold) {\n var _momentum = momentum(scrollY.current, momentumStartY.current, touchDuration),\n delta = _momentum.delta,\n duration = _momentum.duration,\n bezier = _momentum.bezier;\n\n onWheel(0, delta, {\n duration: duration,\n bezier: bezier\n });\n onTouchEnd === null || onTouchEnd === void 0 ? void 0 : onTouchEnd(event);\n }\n }, [onWheel, onTouchEnd, scrollY]);\n /**\n * When the user uses the tab key in the Table, the onScroll event is triggered,\n * and the scroll bar position should be updated at the same time.\n * https://github.com/rsuite/rsuite/issues/234\n */\n\n var onScrollBody = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (event) {\n if (event.target !== tableBodyRef.current) {\n return;\n }\n\n var left = (0,dom_lib_scrollLeft__WEBPACK_IMPORTED_MODULE_2__.default)(event.target);\n var top = (0,dom_lib_scrollTop__WEBPACK_IMPORTED_MODULE_3__.default)(event.target);\n\n if (top === 0 && left === 0) {\n return;\n }\n\n onWheel(left, top);\n (0,dom_lib_scrollLeft__WEBPACK_IMPORTED_MODULE_2__.default)(event.target, 0);\n (0,dom_lib_scrollTop__WEBPACK_IMPORTED_MODULE_3__.default)(event.target, 0);\n }, [onWheel, tableBodyRef]);\n var getControlledScrollTopValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (value) {\n if (autoHeight) {\n return [0, 0];\n }\n\n var height = getTableHeight(); // The maximum range of scrolling value is judged.\n\n value = Math.min(value, Math.max(0, contentHeight.current - (height - headerHeight))); // The value is a value of the theoretical scroll position of the table,\n // and the scrollY coordinate value and the value of the scroll bar position are calculated by value.\n\n return [-value, value / contentHeight.current * (height - headerHeight)];\n }, [autoHeight, contentHeight, getTableHeight, headerHeight]);\n\n var rerender = function rerender() {\n setScrolling(true);\n setTimeout(function () {\n if (tableBodyRef.current) {\n setScrolling(false);\n }\n }, 0);\n };\n\n var getControlledScrollLeftValue = function getControlledScrollLeftValue(value) {\n // The maximum range of scrolling value is judged.\n value = Math.min(value, Math.max(0, contentWidth.current - tableWidth.current));\n return [-value, value / contentWidth.current * tableWidth.current];\n };\n\n var onScrollTop = function onScrollTop(top) {\n var _scrollbarYRef$curren4, _scrollbarYRef$curren5;\n\n if (top === void 0) {\n top = 0;\n }\n\n var _getControlledScrollT = getControlledScrollTopValue(top),\n nextScrollY = _getControlledScrollT[0],\n handleScrollY = _getControlledScrollT[1];\n\n var height = getTableHeight();\n\n if (!loading && nextScrollY !== scrollY.current) {\n onScroll === null || onScroll === void 0 ? void 0 : onScroll(Math.abs(scrollX.current), Math.abs(nextScrollY));\n }\n\n setScrollY(nextScrollY);\n scrollbarYRef === null || scrollbarYRef === void 0 ? void 0 : (_scrollbarYRef$curren4 = scrollbarYRef.current) === null || _scrollbarYRef$curren4 === void 0 ? void 0 : (_scrollbarYRef$curren5 = _scrollbarYRef$curren4.resetScrollBarPosition) === null || _scrollbarYRef$curren5 === void 0 ? void 0 : _scrollbarYRef$curren5.call(_scrollbarYRef$curren4, handleScrollY);\n forceUpdatePosition();\n /**\n * After calling `scrollTop`, a white screen will appear when `virtualized` is true.\n * The reason is that the coordinates of the DOM are directly manipulated,\n * but the component is not re-rendered. Need to call `rerender`.\n * Fix: rsuite#1044\n */\n\n if (virtualized && contentHeight.current > height) {\n rerender();\n }\n };\n\n var onScrollLeft = function onScrollLeft(left) {\n var _scrollbarXRef$curren3, _scrollbarXRef$curren4;\n\n if (left === void 0) {\n left = 0;\n }\n\n var _getControlledScrollL = getControlledScrollLeftValue(left),\n nextScrollX = _getControlledScrollL[0],\n scrollbarX = _getControlledScrollL[1];\n\n setScrollX(nextScrollX);\n !loading && (onScroll === null || onScroll === void 0 ? void 0 : onScroll(Math.abs(nextScrollX), Math.abs(scrollY.current)));\n scrollbarXRef === null || scrollbarXRef === void 0 ? void 0 : (_scrollbarXRef$curren3 = scrollbarXRef.current) === null || _scrollbarXRef$curren3 === void 0 ? void 0 : (_scrollbarXRef$curren4 = _scrollbarXRef$curren3.resetScrollBarPosition) === null || _scrollbarXRef$curren4 === void 0 ? void 0 : _scrollbarXRef$curren4.call(_scrollbarXRef$curren3, scrollbarX);\n forceUpdatePosition();\n };\n\n var onScrollTo = function onScrollTo(coord) {\n var _ref = coord || {},\n x = _ref.x,\n y = _ref.y;\n\n if (typeof x === 'number') {\n onScrollLeft(x);\n }\n\n if (typeof y === 'number') {\n onScrollTop(y);\n }\n };\n\n (0,_useUpdateEffect__WEBPACK_IMPORTED_MODULE_7__.default)(function () {\n if (scrollY.current !== 0) {\n onScrollTop(Math.abs(scrollY.current));\n }\n }, [height, data]);\n var releaseListeners = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {\n var _wheelListener$curren, _touchStartListener$c, _touchMoveListener$cu, _touchEndListener$cur;\n\n wheelHandler.current = null;\n (_wheelListener$curren = wheelListener.current) === null || _wheelListener$curren === void 0 ? void 0 : _wheelListener$curren.off();\n (_touchStartListener$c = touchStartListener.current) === null || _touchStartListener$c === void 0 ? void 0 : _touchStartListener$c.off();\n (_touchMoveListener$cu = touchMoveListener.current) === null || _touchMoveListener$cu === void 0 ? void 0 : _touchMoveListener$cu.off();\n (_touchEndListener$cur = touchEndListener.current) === null || _touchEndListener$cur === void 0 ? void 0 : _touchEndListener$cur.off();\n }, []);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n var options = {\n passive: false\n };\n var tableBody = tableBodyRef.current;\n\n if (tableBody) {\n // Reset the listener after props is updated.\n releaseListeners();\n wheelHandler.current = new dom_lib_WheelHandler__WEBPACK_IMPORTED_MODULE_1__.default(onWheel, shouldHandleWheelX, shouldHandleWheelY, false);\n wheelListener.current = (0,dom_lib_on__WEBPACK_IMPORTED_MODULE_4__.default)(tableBody, 'wheel', wheelHandler.current.onWheel, options);\n\n if ((0,_isSupportTouchEvent__WEBPACK_IMPORTED_MODULE_10__.default)()) {\n touchStartListener.current = (0,dom_lib_on__WEBPACK_IMPORTED_MODULE_4__.default)(tableBody, 'touchstart', handleTouchStart, options);\n touchMoveListener.current = (0,dom_lib_on__WEBPACK_IMPORTED_MODULE_4__.default)(tableBody, 'touchmove', handleTouchMove, options);\n touchEndListener.current = (0,dom_lib_on__WEBPACK_IMPORTED_MODULE_4__.default)(tableBody, 'touchend', handleTouchEnd, options);\n }\n }\n\n return releaseListeners;\n }, [handleTouchEnd, handleTouchMove, handleTouchStart, onWheel, releaseListeners, shouldHandleWheelX, shouldHandleWheelY, tableBodyRef]);\n (0,_useMount__WEBPACK_IMPORTED_MODULE_8__.default)(function () {\n if (rtl) {\n var _scrollbarXRef$curren5, _scrollbarXRef$curren6;\n\n // Initialize scroll position\n setScrollX(tableWidth.current - contentWidth.current - _constants__WEBPACK_IMPORTED_MODULE_9__.SCROLLBAR_WIDTH);\n scrollbarXRef === null || scrollbarXRef === void 0 ? void 0 : (_scrollbarXRef$curren5 = scrollbarXRef.current) === null || _scrollbarXRef$curren5 === void 0 ? void 0 : (_scrollbarXRef$curren6 = _scrollbarXRef$curren5.resetScrollBarPosition) === null || _scrollbarXRef$curren6 === void 0 ? void 0 : _scrollbarXRef$curren6.call(_scrollbarXRef$curren5, -scrollX.current);\n forceUpdatePosition();\n }\n });\n var onScrollHorizontal = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (delta) {\n return handleWheel(delta, 0);\n }, [handleWheel]);\n var onScrollVertical = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (delta, event) {\n return handleWheel(0, delta, undefined, event);\n }, [handleWheel]);\n return {\n isScrolling: isScrolling,\n onScrollHorizontal: onScrollHorizontal,\n onScrollVertical: onScrollVertical,\n onScrollBody: onScrollBody,\n onScrollTop: onScrollTop,\n onScrollLeft: onScrollLeft,\n onScrollTo: onScrollTo\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (useScrollListener);\n\n//# sourceURL=webpack://rsuite/./node_modules/rsuite-table/es/utils/useScrollListener.js?");
9956
9967
 
9957
9968
  /***/ }),
9958
9969