@oliasoft-open-source/react-ui-library 4.18.1-beta-1 → 4.19.0-beta-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/index.js CHANGED
@@ -11,11 +11,11 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
11
11
  var _docChanged, _ignoreNextExit, _suggesters, _next, _prev, _handlerMatches, _ignored, _removed, _lastChangeFromAppend, _a;
12
12
  import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
13
13
  import * as React$4 from "react";
14
- import React__default, { useContext, isValidElement, useState, useRef, useEffect, useCallback, createElement, forwardRef, useMemo, useLayoutEffect as useLayoutEffect$1, createContext, useReducer, useDebugValue, Fragment as Fragment$2, Component as Component$1, memo, cloneElement as cloneElement$1, PureComponent, useImperativeHandle } from "react";
14
+ import React__default, { useContext, isValidElement, useState, useRef, useEffect, useCallback, createElement, forwardRef, useMemo, useLayoutEffect as useLayoutEffect$1, createContext, useReducer, useDebugValue, Fragment as Fragment$2, memo as memo$1, cloneElement as cloneElement$1, PureComponent, useImperativeHandle } from "react";
15
15
  import * as PropTypes from "prop-types";
16
16
  import PropTypes__default from "prop-types";
17
- import ReactDOM, { createPortal, unstable_batchedUpdates, render } from "react-dom";
18
- import { noop as noop$2, set, get as get$2, isString as isString$3, isNumber as isNumber$1, isBoolean as isBoolean$1, isFunction as isFunction$3, isEmpty, isArray as isArray$1, toNumber, debounce as debounce$2, isObject as isObject$5, isEqual as isEqual$3 } from "lodash";
17
+ import ReactDOM, { createPortal, unstable_batchedUpdates, flushSync as flushSync$1, render } from "react-dom";
18
+ import { noop as noop$2, set, get as get$2, isString as isString$3, isNumber as isNumber$1, isBoolean as isBoolean$1, isFunction as isFunction$3, isEmpty, isArray as isArray$1, toNumber, debounce as debounce$3, isObject as isObject$5, isEqual as isEqual$3 } from "lodash";
19
19
  import { toString as toString$1, isScientificStringNum, roundToPrecision, toNum, validateNumber, cleanNumStr, stripLeadingZeros, roundToFixed, roundByMagnitude, unitFromQuantity, getUnit, KNOWN_UNITS, ALT_UNITS, isValueWithUnit, getValue, withUnit, convertSamePrecision, convertAndGetValue, split as split$1, label as label$b, isValidNum, getAltUnitsListByQuantity, altUnitsList, withPrettyUnitLabel, getUnitsForQuantity, roundByMagnitudeToFixed } from "@oliasoft-open-source/units";
20
20
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
21
21
  function getDefaultExportFromCjs(x2) {
@@ -222,32 +222,32 @@ function _setPrototypeOf$3(t, e2) {
222
222
  function _inheritsLoose$3(t, o) {
223
223
  t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf$3(t, o);
224
224
  }
225
- var extendStatics$1 = function(d2, b2) {
226
- extendStatics$1 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
225
+ var extendStatics = function(d2, b2) {
226
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
227
227
  d3.__proto__ = b3;
228
228
  } || function(d3, b3) {
229
229
  for (var p in b3) if (Object.prototype.hasOwnProperty.call(b3, p)) d3[p] = b3[p];
230
230
  };
231
- return extendStatics$1(d2, b2);
231
+ return extendStatics(d2, b2);
232
232
  };
233
- function __extends$1(d2, b2) {
233
+ function __extends(d2, b2) {
234
234
  if (typeof b2 !== "function" && b2 !== null)
235
235
  throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
236
- extendStatics$1(d2, b2);
236
+ extendStatics(d2, b2);
237
237
  function __() {
238
238
  this.constructor = d2;
239
239
  }
240
240
  d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
241
241
  }
242
- var __assign$4 = function() {
243
- __assign$4 = Object.assign || function __assign2(t) {
242
+ var __assign$3 = function() {
243
+ __assign$3 = Object.assign || function __assign2(t) {
244
244
  for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
245
245
  s = arguments[i];
246
246
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
247
247
  }
248
248
  return t;
249
249
  };
250
- return __assign$4.apply(this, arguments);
250
+ return __assign$3.apply(this, arguments);
251
251
  };
252
252
  function __rest$1(s, e2) {
253
253
  var t = {};
@@ -883,15 +883,15 @@ var DefaultContext = {
883
883
  attr: void 0
884
884
  };
885
885
  var IconContext = React__default.createContext && React__default.createContext(DefaultContext);
886
- var __assign$3 = function() {
887
- __assign$3 = Object.assign || function(t) {
886
+ var __assign$2 = function() {
887
+ __assign$2 = Object.assign || function(t) {
888
888
  for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
889
889
  s = arguments[i];
890
890
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
891
891
  }
892
892
  return t;
893
893
  };
894
- return __assign$3.apply(this, arguments);
894
+ return __assign$2.apply(this, arguments);
895
895
  };
896
896
  var __rest = function(s, e2) {
897
897
  var t = {};
@@ -903,15 +903,15 @@ var __rest = function(s, e2) {
903
903
  };
904
904
  function Tree2Element(tree2) {
905
905
  return tree2 && tree2.map(function(node2, i) {
906
- return React__default.createElement(node2.tag, __assign$3({
906
+ return React__default.createElement(node2.tag, __assign$2({
907
907
  key: i
908
908
  }, node2.attr), Tree2Element(node2.child));
909
909
  });
910
910
  }
911
911
  function GenIcon(data) {
912
912
  return function(props) {
913
- return React__default.createElement(IconBase, __assign$3({
914
- attr: __assign$3({}, data.attr)
913
+ return React__default.createElement(IconBase, __assign$2({
914
+ attr: __assign$2({}, data.attr)
915
915
  }, props), Tree2Element(data.child));
916
916
  };
917
917
  }
@@ -922,13 +922,13 @@ function IconBase(props) {
922
922
  var className;
923
923
  if (conf.className) className = conf.className;
924
924
  if (props.className) className = (className ? className + " " : "") + props.className;
925
- return React__default.createElement("svg", __assign$3({
925
+ return React__default.createElement("svg", __assign$2({
926
926
  stroke: "currentColor",
927
927
  fill: "currentColor",
928
928
  strokeWidth: "0"
929
929
  }, conf.attr, attr, svgProps, {
930
930
  className,
931
- style: __assign$3(__assign$3({
931
+ style: __assign$2(__assign$2({
932
932
  color: props.color || conf.color
933
933
  }, conf.style), props.style),
934
934
  height: computedSize,
@@ -1808,7 +1808,7 @@ var requestAnimationFrame$1 = function() {
1808
1808
  };
1809
1809
  }();
1810
1810
  var trailingTimeout = 2;
1811
- function throttle$2(callback, delay) {
1811
+ function throttle$1(callback, delay) {
1812
1812
  var leadingCall = false, trailingCall = false, lastCallTime = 0;
1813
1813
  function resolvePending() {
1814
1814
  if (leadingCall) {
@@ -1850,7 +1850,7 @@ var ResizeObserverController$1 = (
1850
1850
  this.mutationsObserver_ = null;
1851
1851
  this.observers_ = [];
1852
1852
  this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
1853
- this.refresh = throttle$2(this.refresh.bind(this), REFRESH_DELAY);
1853
+ this.refresh = throttle$1(this.refresh.bind(this), REFRESH_DELAY);
1854
1854
  }
1855
1855
  ResizeObserverController2.prototype.addObserver = function(observer) {
1856
1856
  if (!~this.observers_.indexOf(observer)) {
@@ -2354,7 +2354,7 @@ function useEventSubscriptions() {
2354
2354
  };
2355
2355
  }, []);
2356
2356
  }
2357
- var useIsomorphicLayoutEffect$5 = typeof window !== "undefined" ? useLayoutEffect$1 : useEffect;
2357
+ var useIsomorphicLayoutEffect$6 = typeof window !== "undefined" ? useLayoutEffect$1 : useEffect;
2358
2358
  function useLastState(currentState, enabled) {
2359
2359
  var lastState = useRef(currentState);
2360
2360
  if (!enabled) {
@@ -2602,7 +2602,7 @@ function useTrackElements(_ref) {
2602
2602
  resetWhenReferenceChangedWhileTracking(previousTrigger, trigger2);
2603
2603
  }, [get3, set2, resetWhenReferenceChangedWhileTracking, getScrollContainers]));
2604
2604
  var triggerOptionParent = triggerOption == null ? void 0 : triggerOption.getParent == null ? void 0 : triggerOption.getParent();
2605
- useIsomorphicLayoutEffect$5(function() {
2605
+ useIsomorphicLayoutEffect$6(function() {
2606
2606
  if (!triggerOptionParent) {
2607
2607
  return;
2608
2608
  }
@@ -2612,7 +2612,7 @@ function useTrackElements(_ref) {
2612
2612
  });
2613
2613
  });
2614
2614
  }, [triggerOptionParent, set2, getScrollContainers]);
2615
- useIsomorphicLayoutEffect$5(function() {
2615
+ useIsomorphicLayoutEffect$6(function() {
2616
2616
  if (enabled) {
2617
2617
  if (!hasEventSubscriptions()) {
2618
2618
  addEventListeners();
@@ -2624,7 +2624,7 @@ function useTrackElements(_ref) {
2624
2624
  }
2625
2625
  };
2626
2626
  }, [enabled, hasEventSubscriptions, addEventListeners, removeAllEventSubscriptions]);
2627
- useIsomorphicLayoutEffect$5(function() {
2627
+ useIsomorphicLayoutEffect$6(function() {
2628
2628
  if (enabled) {
2629
2629
  handleChange();
2630
2630
  }
@@ -5308,15 +5308,15 @@ const Card = ({
5308
5308
  }
5309
5309
  );
5310
5310
  };
5311
- var __assign$2 = function() {
5312
- __assign$2 = Object.assign || function __assign2(t) {
5311
+ var __assign$1 = function() {
5312
+ __assign$1 = Object.assign || function __assign2(t) {
5313
5313
  for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
5314
5314
  s = arguments[i];
5315
5315
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
5316
5316
  }
5317
5317
  return t;
5318
5318
  };
5319
- return __assign$2.apply(this, arguments);
5319
+ return __assign$1.apply(this, arguments);
5320
5320
  };
5321
5321
  function __spreadArray$1(to2, from3, pack) {
5322
5322
  if (pack || arguments.length === 2) for (var i = 0, l = from3.length, ar2; i < l; i++) {
@@ -6149,7 +6149,7 @@ var Ie = function(e2) {
6149
6149
  function e2(e3, n2, o) {
6150
6150
  void 0 === e3 && (e3 = C), void 0 === n2 && (n2 = {});
6151
6151
  var r2 = this;
6152
- this.options = __assign$2(__assign$2({}, Te), e3), this.gs = n2, this.names = new Map(o), this.server = !!e3.isServer, !this.server && S && Re && (Re = false, _e(this)), ue(this, function() {
6152
+ this.options = __assign$1(__assign$1({}, Te), e3), this.gs = n2, this.names = new Map(o), this.server = !!e3.isServer, !this.server && S && Re && (Re = false, _e(this)), ue(this, function() {
6153
6153
  return function(e4) {
6154
6154
  for (var t = e4.getTag(), n3 = t.length, o2 = "", r3 = function(n4) {
6155
6155
  var r4 = function(e5) {
@@ -6172,7 +6172,7 @@ var Ie = function(e2) {
6172
6172
  }, e2.prototype.rehydrate = function() {
6173
6173
  !this.server && S && _e(this);
6174
6174
  }, e2.prototype.reconstructWithOptions = function(n2, o) {
6175
- return void 0 === o && (o = true), new e2(__assign$2(__assign$2({}, this.options), n2), this.gs, o && this.names || void 0);
6175
+ return void 0 === o && (o = true), new e2(__assign$1(__assign$1({}, this.options), n2), this.gs, o && this.names || void 0);
6176
6176
  }, e2.prototype.allocateGSInstance = function(e3) {
6177
6177
  return this.gs[e3] = (this.gs[e3] || 0) + 1;
6178
6178
  }, e2.prototype.getTag = function() {
@@ -6345,9 +6345,9 @@ function it$1(e2, r2, s) {
6345
6345
  var i2 = e4.attrs, a3 = e4.componentStyle, c3 = e4.defaultProps, p2 = e4.foldedComponentIds, d3 = e4.styledComponentId, h2 = e4.target, f3 = React__default.useContext(et$1), m3 = Ge(), y3 = e4.shouldForwardProp || m3.shouldForwardProp;
6346
6346
  "production" !== process.env.NODE_ENV && useDebugValue(d3);
6347
6347
  var v2 = I(r4, f3, c3) || C, g3 = function(e5, n2, o) {
6348
- for (var r5, s3 = __assign$2(__assign$2({}, n2), { className: void 0, theme: o }), i3 = 0; i3 < e5.length; i3 += 1) {
6348
+ for (var r5, s3 = __assign$1(__assign$1({}, n2), { className: void 0, theme: o }), i3 = 0; i3 < e5.length; i3 += 1) {
6349
6349
  var a4 = re(r5 = e5[i3]) ? r5(s3) : r5;
6350
- for (var c4 in a4) s3[c4] = "className" === c4 ? ie$2(s3[c4], a4[c4]) : "style" === c4 ? __assign$2(__assign$2({}, s3[c4]), a4[c4]) : a4[c4];
6350
+ for (var c4 in a4) s3[c4] = "className" === c4 ? ie$2(s3[c4], a4[c4]) : "style" === c4 ? __assign$1(__assign$1({}, s3[c4]), a4[c4]) : a4[c4];
6351
6351
  }
6352
6352
  return n2.className && (s3.className = ie$2(s3.className, n2.className)), s3;
6353
6353
  }(i2, r4, v2), S3 = g3.as || h2, w3 = {};
@@ -6403,9 +6403,9 @@ function ut(n2, o, r2) {
6403
6403
  return n2(o, r2, lt$1.apply(void 0, __spreadArray$1([t], s2, false)));
6404
6404
  };
6405
6405
  return s.attrs = function(e2) {
6406
- return ut(n2, o, __assign$2(__assign$2({}, r2), { attrs: Array.prototype.concat(r2.attrs, e2).filter(Boolean) }));
6406
+ return ut(n2, o, __assign$1(__assign$1({}, r2), { attrs: Array.prototype.concat(r2.attrs, e2).filter(Boolean) }));
6407
6407
  }, s.withConfig = function(e2) {
6408
- return ut(n2, o, __assign$2(__assign$2({}, r2), e2));
6408
+ return ut(n2, o, __assign$1(__assign$1({}, r2), e2));
6409
6409
  }, s;
6410
6410
  }
6411
6411
  var pt$1 = function(e2) {
@@ -9501,383 +9501,47 @@ const InputGroupAddon = ({
9501
9501
  })();
9502
9502
  return /* @__PURE__ */ jsx("span", { className: cx$2(styles$u.addon, order2, small2 ? styles$u.small : ""), children });
9503
9503
  };
9504
- /*! *****************************************************************************
9505
- Copyright (c) Microsoft Corporation. All rights reserved.
9506
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
9507
- this file except in compliance with the License. You may obtain a copy of the
9508
- License at http://www.apache.org/licenses/LICENSE-2.0
9509
-
9510
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9511
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9512
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
9513
- MERCHANTABLITY OR NON-INFRINGEMENT.
9514
-
9515
- See the Apache Version 2.0 License for specific language governing permissions
9516
- and limitations under the License.
9517
- ***************************************************************************** */
9518
- var extendStatics = function(d2, b2) {
9519
- extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
9520
- d3.__proto__ = b3;
9521
- } || function(d3, b3) {
9522
- for (var p in b3) if (b3.hasOwnProperty(p)) d3[p] = b3[p];
9523
- };
9524
- return extendStatics(d2, b2);
9525
- };
9526
- function __extends(d2, b2) {
9527
- extendStatics(d2, b2);
9528
- function __() {
9529
- this.constructor = d2;
9530
- }
9531
- d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
9532
- }
9533
- var __assign$1 = function() {
9534
- __assign$1 = Object.assign || function __assign2(t) {
9535
- for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
9536
- s = arguments[i];
9537
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
9538
- }
9539
- return t;
9540
- };
9541
- return __assign$1.apply(this, arguments);
9542
- };
9543
- function throttle$1(delay, noTrailing, callback, debounceMode) {
9544
- var timeoutID;
9545
- var cancelled = false;
9546
- var lastExec = 0;
9547
- function clearExistingTimeout() {
9548
- if (timeoutID) {
9549
- clearTimeout(timeoutID);
9550
- }
9551
- }
9552
- function cancel() {
9553
- clearExistingTimeout();
9554
- cancelled = true;
9555
- }
9556
- if (typeof noTrailing !== "boolean") {
9557
- debounceMode = callback;
9558
- callback = noTrailing;
9559
- noTrailing = void 0;
9560
- }
9561
- function wrapper2() {
9562
- var self2 = this;
9563
- var elapsed = Date.now() - lastExec;
9564
- var args = arguments;
9565
- if (cancelled) {
9566
- return;
9567
- }
9568
- function exec() {
9569
- lastExec = Date.now();
9570
- callback.apply(self2, args);
9571
- }
9572
- function clear() {
9573
- timeoutID = void 0;
9574
- }
9575
- if (debounceMode && !timeoutID) {
9576
- exec();
9577
- }
9578
- clearExistingTimeout();
9579
- if (debounceMode === void 0 && elapsed > delay) {
9580
- exec();
9581
- } else if (noTrailing !== true) {
9582
- timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === void 0 ? delay - elapsed : delay);
9583
- }
9584
- }
9585
- wrapper2.cancel = cancel;
9586
- return wrapper2;
9587
- }
9588
- var ThresholdUnits = {
9589
- Pixel: "Pixel",
9590
- Percent: "Percent"
9591
- };
9592
- var defaultThreshold$1 = {
9593
- unit: ThresholdUnits.Percent,
9594
- value: 0.8
9595
- };
9596
- function parseThreshold(scrollThreshold) {
9597
- if (typeof scrollThreshold === "number") {
9598
- return {
9599
- unit: ThresholdUnits.Percent,
9600
- value: scrollThreshold * 100
9601
- };
9602
- }
9603
- if (typeof scrollThreshold === "string") {
9604
- if (scrollThreshold.match(/^(\d*(\.\d+)?)px$/)) {
9605
- return {
9606
- unit: ThresholdUnits.Pixel,
9607
- value: parseFloat(scrollThreshold)
9608
- };
9609
- }
9610
- if (scrollThreshold.match(/^(\d*(\.\d+)?)%$/)) {
9611
- return {
9612
- unit: ThresholdUnits.Percent,
9613
- value: parseFloat(scrollThreshold)
9614
- };
9615
- }
9616
- console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...');
9617
- return defaultThreshold$1;
9618
- }
9619
- console.warn("scrollThreshold should be string or number");
9620
- return defaultThreshold$1;
9621
- }
9622
- var InfiniteScroll = (
9623
- /** @class */
9624
- function(_super) {
9625
- __extends(InfiniteScroll2, _super);
9626
- function InfiniteScroll2(props) {
9627
- var _this = _super.call(this, props) || this;
9628
- _this.lastScrollTop = 0;
9629
- _this.actionTriggered = false;
9630
- _this.startY = 0;
9631
- _this.currentY = 0;
9632
- _this.dragging = false;
9633
- _this.maxPullDownDistance = 0;
9634
- _this.getScrollableTarget = function() {
9635
- if (_this.props.scrollableTarget instanceof HTMLElement)
9636
- return _this.props.scrollableTarget;
9637
- if (typeof _this.props.scrollableTarget === "string") {
9638
- return document.getElementById(_this.props.scrollableTarget);
9639
- }
9640
- if (_this.props.scrollableTarget === null) {
9641
- console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n ");
9642
- }
9643
- return null;
9644
- };
9645
- _this.onStart = function(evt) {
9646
- if (_this.lastScrollTop)
9647
- return;
9648
- _this.dragging = true;
9649
- if (evt instanceof MouseEvent) {
9650
- _this.startY = evt.pageY;
9651
- } else if (evt instanceof TouchEvent) {
9652
- _this.startY = evt.touches[0].pageY;
9653
- }
9654
- _this.currentY = _this.startY;
9655
- if (_this._infScroll) {
9656
- _this._infScroll.style.willChange = "transform";
9657
- _this._infScroll.style.transition = "transform 0.2s cubic-bezier(0,0,0.31,1)";
9658
- }
9659
- };
9660
- _this.onMove = function(evt) {
9661
- if (!_this.dragging)
9662
- return;
9663
- if (evt instanceof MouseEvent) {
9664
- _this.currentY = evt.pageY;
9665
- } else if (evt instanceof TouchEvent) {
9666
- _this.currentY = evt.touches[0].pageY;
9667
- }
9668
- if (_this.currentY < _this.startY)
9669
- return;
9670
- if (_this.currentY - _this.startY >= Number(_this.props.pullDownToRefreshThreshold)) {
9671
- _this.setState({
9672
- pullToRefreshThresholdBreached: true
9673
- });
9674
- }
9675
- if (_this.currentY - _this.startY > _this.maxPullDownDistance * 1.5)
9676
- return;
9677
- if (_this._infScroll) {
9678
- _this._infScroll.style.overflow = "visible";
9679
- _this._infScroll.style.transform = "translate3d(0px, " + (_this.currentY - _this.startY) + "px, 0px)";
9680
- }
9681
- };
9682
- _this.onEnd = function() {
9683
- _this.startY = 0;
9684
- _this.currentY = 0;
9685
- _this.dragging = false;
9686
- if (_this.state.pullToRefreshThresholdBreached) {
9687
- _this.props.refreshFunction && _this.props.refreshFunction();
9688
- _this.setState({
9689
- pullToRefreshThresholdBreached: false
9690
- });
9691
- }
9692
- requestAnimationFrame(function() {
9693
- if (_this._infScroll) {
9694
- _this._infScroll.style.overflow = "auto";
9695
- _this._infScroll.style.transform = "none";
9696
- _this._infScroll.style.willChange = "unset";
9697
- }
9698
- });
9699
- };
9700
- _this.onScrollListener = function(event) {
9701
- if (typeof _this.props.onScroll === "function") {
9702
- setTimeout(function() {
9703
- return _this.props.onScroll && _this.props.onScroll(event);
9704
- }, 0);
9705
- }
9706
- var target = _this.props.height || _this._scrollableNode ? event.target : document.documentElement.scrollTop ? document.documentElement : document.body;
9707
- if (_this.actionTriggered)
9708
- return;
9709
- var atBottom = _this.props.inverse ? _this.isElementAtTop(target, _this.props.scrollThreshold) : _this.isElementAtBottom(target, _this.props.scrollThreshold);
9710
- if (atBottom && _this.props.hasMore) {
9711
- _this.actionTriggered = true;
9712
- _this.setState({ showLoader: true });
9713
- _this.props.next && _this.props.next();
9714
- }
9715
- _this.lastScrollTop = target.scrollTop;
9716
- };
9717
- _this.state = {
9718
- showLoader: false,
9719
- pullToRefreshThresholdBreached: false,
9720
- prevDataLength: props.dataLength
9721
- };
9722
- _this.throttledOnScrollListener = throttle$1(150, _this.onScrollListener).bind(_this);
9723
- _this.onStart = _this.onStart.bind(_this);
9724
- _this.onMove = _this.onMove.bind(_this);
9725
- _this.onEnd = _this.onEnd.bind(_this);
9726
- return _this;
9727
- }
9728
- InfiniteScroll2.prototype.componentDidMount = function() {
9729
- if (typeof this.props.dataLength === "undefined") {
9730
- throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');
9731
- }
9732
- this._scrollableNode = this.getScrollableTarget();
9733
- this.el = this.props.height ? this._infScroll : this._scrollableNode || window;
9734
- if (this.el) {
9735
- this.el.addEventListener("scroll", this.throttledOnScrollListener);
9736
- }
9737
- if (typeof this.props.initialScrollY === "number" && this.el && this.el instanceof HTMLElement && this.el.scrollHeight > this.props.initialScrollY) {
9738
- this.el.scrollTo(0, this.props.initialScrollY);
9739
- }
9740
- if (this.props.pullDownToRefresh && this.el) {
9741
- this.el.addEventListener("touchstart", this.onStart);
9742
- this.el.addEventListener("touchmove", this.onMove);
9743
- this.el.addEventListener("touchend", this.onEnd);
9744
- this.el.addEventListener("mousedown", this.onStart);
9745
- this.el.addEventListener("mousemove", this.onMove);
9746
- this.el.addEventListener("mouseup", this.onEnd);
9747
- this.maxPullDownDistance = this._pullDown && this._pullDown.firstChild && this._pullDown.firstChild.getBoundingClientRect().height || 0;
9748
- this.forceUpdate();
9749
- if (typeof this.props.refreshFunction !== "function") {
9750
- throw new Error(`Mandatory prop "refreshFunction" missing.
9751
- Pull Down To Refresh functionality will not work
9752
- as expected. Check README.md for usage'`);
9753
- }
9754
- }
9755
- };
9756
- InfiniteScroll2.prototype.componentWillUnmount = function() {
9757
- if (this.el) {
9758
- this.el.removeEventListener("scroll", this.throttledOnScrollListener);
9759
- if (this.props.pullDownToRefresh) {
9760
- this.el.removeEventListener("touchstart", this.onStart);
9761
- this.el.removeEventListener("touchmove", this.onMove);
9762
- this.el.removeEventListener("touchend", this.onEnd);
9763
- this.el.removeEventListener("mousedown", this.onStart);
9764
- this.el.removeEventListener("mousemove", this.onMove);
9765
- this.el.removeEventListener("mouseup", this.onEnd);
9766
- }
9767
- }
9768
- };
9769
- InfiniteScroll2.prototype.componentDidUpdate = function(prevProps) {
9770
- if (this.props.dataLength === prevProps.dataLength)
9771
- return;
9772
- this.actionTriggered = false;
9773
- this.setState({
9774
- showLoader: false
9775
- });
9776
- };
9777
- InfiniteScroll2.getDerivedStateFromProps = function(nextProps, prevState) {
9778
- var dataLengthChanged = nextProps.dataLength !== prevState.prevDataLength;
9779
- if (dataLengthChanged) {
9780
- return __assign$1(__assign$1({}, prevState), { prevDataLength: nextProps.dataLength });
9781
- }
9782
- return null;
9783
- };
9784
- InfiniteScroll2.prototype.isElementAtTop = function(target, scrollThreshold) {
9785
- if (scrollThreshold === void 0) {
9786
- scrollThreshold = 0.8;
9787
- }
9788
- var clientHeight = target === document.body || target === document.documentElement ? window.screen.availHeight : target.clientHeight;
9789
- var threshold = parseThreshold(scrollThreshold);
9790
- if (threshold.unit === ThresholdUnits.Pixel) {
9791
- return target.scrollTop <= threshold.value + clientHeight - target.scrollHeight + 1;
9792
- }
9793
- return target.scrollTop <= threshold.value / 100 + clientHeight - target.scrollHeight + 1;
9794
- };
9795
- InfiniteScroll2.prototype.isElementAtBottom = function(target, scrollThreshold) {
9796
- if (scrollThreshold === void 0) {
9797
- scrollThreshold = 0.8;
9798
- }
9799
- var clientHeight = target === document.body || target === document.documentElement ? window.screen.availHeight : target.clientHeight;
9800
- var threshold = parseThreshold(scrollThreshold);
9801
- if (threshold.unit === ThresholdUnits.Pixel) {
9802
- return target.scrollTop + clientHeight >= target.scrollHeight - threshold.value;
9803
- }
9804
- return target.scrollTop + clientHeight >= threshold.value / 100 * target.scrollHeight;
9805
- };
9806
- InfiniteScroll2.prototype.render = function() {
9807
- var _this = this;
9808
- var style = __assign$1({ height: this.props.height || "auto", overflow: "auto", WebkitOverflowScrolling: "touch" }, this.props.style);
9809
- var hasChildren2 = this.props.hasChildren || !!(this.props.children && this.props.children instanceof Array && this.props.children.length);
9810
- var outerDivStyle = this.props.pullDownToRefresh && this.props.height ? { overflow: "auto" } : {};
9811
- return React__default.createElement(
9812
- "div",
9813
- { style: outerDivStyle, className: "infinite-scroll-component__outerdiv" },
9814
- React__default.createElement(
9815
- "div",
9816
- { className: "infinite-scroll-component " + (this.props.className || ""), ref: function(infScroll) {
9817
- return _this._infScroll = infScroll;
9818
- }, style },
9819
- this.props.pullDownToRefresh && React__default.createElement(
9820
- "div",
9821
- { style: { position: "relative" }, ref: function(pullDown) {
9822
- return _this._pullDown = pullDown;
9823
- } },
9824
- React__default.createElement("div", { style: {
9825
- position: "absolute",
9826
- left: 0,
9827
- right: 0,
9828
- top: -1 * this.maxPullDownDistance
9829
- } }, this.state.pullToRefreshThresholdBreached ? this.props.releaseToRefreshContent : this.props.pullDownToRefreshContent)
9830
- ),
9831
- this.props.children,
9832
- !this.state.showLoader && !hasChildren2 && this.props.hasMore && this.props.loader,
9833
- this.state.showLoader && this.props.hasMore && this.props.loader,
9834
- !this.props.hasMore && this.props.endMessage
9835
- )
9836
- );
9837
- };
9838
- return InfiniteScroll2;
9839
- }(Component$1)
9840
- );
9841
- const inputInTable$8 = "_inputInTable_7sjlf_1";
9842
- const inputHover$8 = "_inputHover_7sjlf_13";
9843
- const inputFocus$8 = "_inputFocus_7sjlf_18";
9844
- const inputError$8 = "_inputError_7sjlf_25";
9845
- const inputWarning$8 = "_inputWarning_7sjlf_26";
9846
- const inputDisabled$8 = "_inputDisabled_7sjlf_61";
9847
- const hideScrollbars$8 = "_hideScrollbars_7sjlf_67";
9848
- const header$1 = "_header_7sjlf_77";
9849
- const headerTitle = "_headerTitle_7sjlf_77";
9850
- const heading$3 = "_heading_7sjlf_78";
9851
- const itemHeader = "_itemHeader_7sjlf_78";
9852
- const narrow = "_narrow_7sjlf_81";
9853
- const stickyHeader = "_stickyHeader_7sjlf_85";
9854
- const title$3 = "_title_7sjlf_96";
9855
- const name = "_name_7sjlf_102";
9856
- const iconTooltipMargin = "_iconTooltipMargin_7sjlf_105";
9857
- const bold = "_bold_7sjlf_108";
9858
- const toggleNarrow = "_toggleNarrow_7sjlf_117";
9859
- const drag$1 = "_drag_7sjlf_135";
9860
- const dragOverlay$1 = "_dragOverlay_7sjlf_156";
9861
- const list$1 = "_list_7sjlf_161";
9862
- const bordered$1 = "_bordered_7sjlf_165";
9863
- const item$4 = "_item_7sjlf_78";
9864
- const action = "_action_7sjlf_198";
9865
- const active$3 = "_active_7sjlf_201";
9866
- const indented = "_indented_7sjlf_208";
9867
- const disabled$5 = "_disabled_7sjlf_221";
9868
- const label$6 = "_label_7sjlf_232";
9869
- const details$2 = "_details_7sjlf_243";
9870
- const metadata = "_metadata_7sjlf_244";
9871
- const itemContent = "_itemContent_7sjlf_252";
9872
- const indentIcon = "_indentIcon_7sjlf_259";
9873
- const expandIcon = "_expandIcon_7sjlf_264";
9874
- const expanded = "_expanded_7sjlf_271";
9875
- const right$4 = "_right_7sjlf_274";
9876
- const actions = "_actions_7sjlf_282";
9877
- const scrollableList = "_scrollableList_7sjlf_287";
9878
- const infiniteScrollContainer = "_infiniteScrollContainer_7sjlf_292";
9879
- const hideScrollbar = "_hideScrollbar_7sjlf_67";
9880
- const noPointerEvents = "_noPointerEvents_7sjlf_309";
9504
+ const inputInTable$8 = "_inputInTable_4cdnv_1";
9505
+ const inputHover$8 = "_inputHover_4cdnv_13";
9506
+ const inputFocus$8 = "_inputFocus_4cdnv_18";
9507
+ const inputError$8 = "_inputError_4cdnv_25";
9508
+ const inputWarning$8 = "_inputWarning_4cdnv_26";
9509
+ const inputDisabled$8 = "_inputDisabled_4cdnv_61";
9510
+ const hideScrollbars$8 = "_hideScrollbars_4cdnv_67";
9511
+ const list$1 = "_list_4cdnv_77";
9512
+ const bordered$1 = "_bordered_4cdnv_83";
9513
+ const virtualRow = "_virtualRow_4cdnv_87";
9514
+ const item$4 = "_item_4cdnv_87";
9515
+ const header$1 = "_header_4cdnv_90";
9516
+ const headerTitle = "_headerTitle_4cdnv_90";
9517
+ const heading$3 = "_heading_4cdnv_91";
9518
+ const itemHeader = "_itemHeader_4cdnv_91";
9519
+ const narrow = "_narrow_4cdnv_94";
9520
+ const stickyHeader = "_stickyHeader_4cdnv_98";
9521
+ const title$3 = "_title_4cdnv_109";
9522
+ const name = "_name_4cdnv_115";
9523
+ const iconTooltipMargin = "_iconTooltipMargin_4cdnv_119";
9524
+ const bold = "_bold_4cdnv_122";
9525
+ const toggleNarrow = "_toggleNarrow_4cdnv_133";
9526
+ const drag$1 = "_drag_4cdnv_151";
9527
+ const dragOverlay$1 = "_dragOverlay_4cdnv_172";
9528
+ const listContent = "_listContent_4cdnv_177";
9529
+ const action = "_action_4cdnv_204";
9530
+ const active$3 = "_active_4cdnv_207";
9531
+ const indented = "_indented_4cdnv_214";
9532
+ const disabled$5 = "_disabled_4cdnv_227";
9533
+ const label$6 = "_label_4cdnv_238";
9534
+ const details$2 = "_details_4cdnv_249";
9535
+ const metadata = "_metadata_4cdnv_250";
9536
+ const itemContent = "_itemContent_4cdnv_258";
9537
+ const indentIcon = "_indentIcon_4cdnv_265";
9538
+ const expandIcon = "_expandIcon_4cdnv_270";
9539
+ const expanded = "_expanded_4cdnv_277";
9540
+ const right$4 = "_right_4cdnv_280";
9541
+ const actions = "_actions_4cdnv_288";
9542
+ const hideScrollbar = "_hideScrollbar_4cdnv_67";
9543
+ const noPointerEvents = "_noPointerEvents_4cdnv_303";
9544
+ const virtualRows = "_virtualRows_4cdnv_306";
9881
9545
  const listStyles = {
9882
9546
  inputInTable: inputInTable$8,
9883
9547
  inputHover: inputHover$8,
@@ -9886,6 +9550,10 @@ const listStyles = {
9886
9550
  inputWarning: inputWarning$8,
9887
9551
  inputDisabled: inputDisabled$8,
9888
9552
  hideScrollbars: hideScrollbars$8,
9553
+ list: list$1,
9554
+ bordered: bordered$1,
9555
+ virtualRow,
9556
+ item: item$4,
9889
9557
  header: header$1,
9890
9558
  headerTitle,
9891
9559
  heading: heading$3,
@@ -9899,9 +9567,7 @@ const listStyles = {
9899
9567
  toggleNarrow,
9900
9568
  drag: drag$1,
9901
9569
  dragOverlay: dragOverlay$1,
9902
- list: list$1,
9903
- bordered: bordered$1,
9904
- item: item$4,
9570
+ listContent,
9905
9571
  action,
9906
9572
  active: active$3,
9907
9573
  indented,
@@ -9915,10 +9581,9 @@ const listStyles = {
9915
9581
  expanded,
9916
9582
  right: right$4,
9917
9583
  actions,
9918
- scrollableList,
9919
- infiniteScrollContainer,
9920
9584
  hideScrollbar,
9921
- noPointerEvents
9585
+ noPointerEvents,
9586
+ virtualRows
9922
9587
  };
9923
9588
  const ToggleNarrow = ({
9924
9589
  toggleNarrow: toggleNarrow2,
@@ -10022,10 +9687,10 @@ function getOwnerDocument(target) {
10022
9687
  }
10023
9688
  return document;
10024
9689
  }
10025
- const useIsomorphicLayoutEffect$4 = canUseDOM ? useLayoutEffect$1 : useEffect;
9690
+ const useIsomorphicLayoutEffect$5 = canUseDOM ? useLayoutEffect$1 : useEffect;
10026
9691
  function useEvent$1(handler) {
10027
9692
  const handlerRef = useRef(handler);
10028
- useIsomorphicLayoutEffect$4(() => {
9693
+ useIsomorphicLayoutEffect$5(() => {
10029
9694
  handlerRef.current = handler;
10030
9695
  });
10031
9696
  return useCallback(function() {
@@ -10053,7 +9718,7 @@ function useLatestValue(value, dependencies) {
10053
9718
  dependencies = [value];
10054
9719
  }
10055
9720
  const valueRef = useRef(value);
10056
- useIsomorphicLayoutEffect$4(() => {
9721
+ useIsomorphicLayoutEffect$5(() => {
10057
9722
  if (valueRef.current !== value) {
10058
9723
  valueRef.current = value;
10059
9724
  }
@@ -10143,9 +9808,9 @@ function isTouchEvent$2(event) {
10143
9808
  return false;
10144
9809
  }
10145
9810
  const {
10146
- TouchEvent: TouchEvent2
9811
+ TouchEvent
10147
9812
  } = getWindow(event.target);
10148
- return TouchEvent2 && event instanceof TouchEvent2;
9813
+ return TouchEvent && event instanceof TouchEvent;
10149
9814
  }
10150
9815
  function getEventCoordinates(event) {
10151
9816
  if (isTouchEvent$2(event)) {
@@ -11965,7 +11630,7 @@ function useRect(element, measure, fallbackRect) {
11965
11630
  const resizeObserver = useResizeObserver({
11966
11631
  callback: measureRect
11967
11632
  });
11968
- useIsomorphicLayoutEffect$4(() => {
11633
+ useIsomorphicLayoutEffect$5(() => {
11969
11634
  measureRect();
11970
11635
  if (element) {
11971
11636
  resizeObserver == null ? void 0 : resizeObserver.observe(element);
@@ -12148,7 +11813,7 @@ function useRects(elements, measure) {
12148
11813
  if (elements.length > 0 && rects === defaultValue$2) {
12149
11814
  measureRects();
12150
11815
  }
12151
- useIsomorphicLayoutEffect$4(() => {
11816
+ useIsomorphicLayoutEffect$5(() => {
12152
11817
  if (elements.length) {
12153
11818
  elements.forEach((element) => resizeObserver == null ? void 0 : resizeObserver.observe(element));
12154
11819
  } else {
@@ -12519,7 +12184,7 @@ function useLayoutShiftScrollCompensation(_ref) {
12519
12184
  x: config,
12520
12185
  y: config
12521
12186
  } : config;
12522
- useIsomorphicLayoutEffect$4(() => {
12187
+ useIsomorphicLayoutEffect$5(() => {
12523
12188
  const disabled2 = !x2 && !y2;
12524
12189
  if (disabled2 || !activeNode) {
12525
12190
  initialized.current = false;
@@ -12563,7 +12228,7 @@ var Status;
12563
12228
  Status2[Status2["Initializing"] = 1] = "Initializing";
12564
12229
  Status2[Status2["Initialized"] = 2] = "Initialized";
12565
12230
  })(Status || (Status = {}));
12566
- const DndContext$1 = /* @__PURE__ */ memo(function DndContext(_ref) {
12231
+ const DndContext$1 = /* @__PURE__ */ memo$1(function DndContext(_ref) {
12567
12232
  var _sensorContext$curren, _dragOverlay$nodeRef$, _dragOverlay$rect, _over$rect;
12568
12233
  let {
12569
12234
  id: id2,
@@ -12841,7 +12506,7 @@ const DndContext$1 = /* @__PURE__ */ memo(function DndContext(_ref) {
12841
12506
  }, [draggableNodes, instantiateSensor]);
12842
12507
  const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);
12843
12508
  useSensorSetup(sensors);
12844
- useIsomorphicLayoutEffect$4(() => {
12509
+ useIsomorphicLayoutEffect$5(() => {
12845
12510
  if (activeNodeRect && status === Status.Initializing) {
12846
12511
  setStatus(Status.Initialized);
12847
12512
  }
@@ -12925,7 +12590,7 @@ const DndContext$1 = /* @__PURE__ */ memo(function DndContext(_ref) {
12925
12590
  // eslint-disable-next-line react-hooks/exhaustive-deps
12926
12591
  [overId]
12927
12592
  );
12928
- useIsomorphicLayoutEffect$4(() => {
12593
+ useIsomorphicLayoutEffect$5(() => {
12929
12594
  sensorContext.current = {
12930
12595
  activatorEvent,
12931
12596
  active: active2,
@@ -13052,7 +12717,7 @@ function useDraggable(_ref) {
13052
12717
  const [activatorNode, setActivatorNodeRef] = useNodeRef();
13053
12718
  const listeners = useSyntheticListeners(activators, id2);
13054
12719
  const dataRef = useLatestValue(data);
13055
- useIsomorphicLayoutEffect$4(
12720
+ useIsomorphicLayoutEffect$5(
13056
12721
  () => {
13057
12722
  draggableNodes.set(id2, {
13058
12723
  id: id2,
@@ -13172,7 +12837,7 @@ function useDroppable(_ref) {
13172
12837
  resizeObserverConnected.current = false;
13173
12838
  resizeObserver.observe(nodeRef.current);
13174
12839
  }, [nodeRef, resizeObserver]);
13175
- useIsomorphicLayoutEffect$4(
12840
+ useIsomorphicLayoutEffect$5(
13176
12841
  () => {
13177
12842
  dispatch({
13178
12843
  type: Action.RegisterDroppable,
@@ -13225,7 +12890,7 @@ function AnimationManager(_ref) {
13225
12890
  if (!children && !clonedChildren && previousChildren) {
13226
12891
  setClonedChildren(previousChildren);
13227
12892
  }
13228
- useIsomorphicLayoutEffect$4(() => {
12893
+ useIsomorphicLayoutEffect$5(() => {
13229
12894
  if (!element) {
13230
12895
  return;
13231
12896
  }
@@ -13725,7 +13390,7 @@ function SortableContext(_ref) {
13725
13390
  const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);
13726
13391
  const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;
13727
13392
  const disabled2 = normalizeDisabled(disabledProp);
13728
- useIsomorphicLayoutEffect$4(() => {
13393
+ useIsomorphicLayoutEffect$5(() => {
13729
13394
  if (itemsHaveChanged && isDragging) {
13730
13395
  measureDroppableContainers(items);
13731
13396
  }
@@ -13806,7 +13471,7 @@ function useDerivedTransform(_ref) {
13806
13471
  } = _ref;
13807
13472
  const [derivedTransform, setDerivedtransform] = useState(null);
13808
13473
  const previousIndex = useRef(index2);
13809
- useIsomorphicLayoutEffect$4(() => {
13474
+ useIsomorphicLayoutEffect$5(() => {
13810
13475
  if (!disabled2 && index2 !== previousIndex.current && node2.current) {
13811
13476
  const initial = rect.current;
13812
13477
  if (initial) {
@@ -14201,72 +13866,6 @@ const ListRow = forwardRef(
14201
13866
  return isSubheading ? /* @__PURE__ */ jsx(ListSubheading, { ref: listRowRefs, item: item2, index: index2 }, index2) : draggable ? listElementWithDrag(index2, item2) : listElement(index2, item2);
14202
13867
  }
14203
13868
  );
14204
- const loader = "_loader_477i5_1";
14205
- const fullViewPortSize = "_fullViewPortSize_477i5_7";
14206
- const cover = "_cover_477i5_14";
14207
- const dimmer = "_dimmer_477i5_21";
14208
- const content$2 = "_content_477i5_44";
14209
- const text$1 = "_text_477i5_49";
14210
- const details$1 = "_details_477i5_53";
14211
- const styles$t = {
14212
- loader,
14213
- fullViewPortSize,
14214
- cover,
14215
- dimmer,
14216
- content: content$2,
14217
- text: text$1,
14218
- details: details$1
14219
- };
14220
- const Loader = ({
14221
- width: width2,
14222
- height: height2,
14223
- text: text2 = "",
14224
- details: details2 = "",
14225
- fullViewPortSize: fullViewPortSize2 = false,
14226
- cover: cover2 = false,
14227
- children = null,
14228
- theme = Theme.DARK,
14229
- testId = null
14230
- }) => {
14231
- const color2 = theme === Theme.DARK ? Theme.WHITE : Theme.INHERIT;
14232
- const background2 = theme === "white" ? "var(--color-background-raised)" : theme === "light" ? "var(--color-background)" : "black";
14233
- return /* @__PURE__ */ jsx(
14234
- "div",
14235
- {
14236
- className: cx$2(styles$t.loader, cover2 ? styles$t.cover : "", {
14237
- [styles$t.fullViewPortSize]: fullViewPortSize2
14238
- }),
14239
- style: { width: width2, height: height2 },
14240
- "data-testid": testId,
14241
- children: /* @__PURE__ */ jsx("div", { className: styles$t.dimmer, style: { background: background2, color: color2 }, children: /* @__PURE__ */ jsxs(
14242
- "div",
14243
- {
14244
- className: styles$t.content,
14245
- "data-testid": testId && `${testId}-content`,
14246
- children: [
14247
- children,
14248
- text2 && /* @__PURE__ */ jsx(
14249
- "div",
14250
- {
14251
- className: styles$t.text,
14252
- "data-testid": testId && `${testId}-text`,
14253
- children: text2
14254
- }
14255
- ),
14256
- details2 && /* @__PURE__ */ jsx(
14257
- "div",
14258
- {
14259
- className: styles$t.details,
14260
- "data-testid": testId && `${testId}-details`,
14261
- children: details2
14262
- }
14263
- )
14264
- ]
14265
- }
14266
- ) })
14267
- }
14268
- );
14269
- };
14270
13869
  const ListDragWrapper = ({
14271
13870
  children,
14272
13871
  draggable,
@@ -14281,15 +13880,14 @@ const ListDragWrapper = ({
14281
13880
  setDragIndex(event.active.id);
14282
13881
  };
14283
13882
  const handleDragEnd = (event) => {
14284
- var _a2, _b, _c, _d, _e2, _f, _g, _h;
14285
13883
  setDragIndex(null);
14286
13884
  const { active: active2, over } = event;
14287
- const from3 = (_b = (_a2 = active2 == null ? void 0 : active2.data) == null ? void 0 : _a2.current) == null ? void 0 : _b.sortable.index;
14288
- const to2 = (_d = (_c = over == null ? void 0 : over.data) == null ? void 0 : _c.current) == null ? void 0 : _d.sortable.index;
13885
+ const from3 = active2 == null ? void 0 : active2.id;
13886
+ const to2 = over == null ? void 0 : over.id;
14289
13887
  if (from3 !== to2) {
14290
13888
  onListReorder({
14291
- from: (_f = (_e2 = active2 == null ? void 0 : active2.data) == null ? void 0 : _e2.current) == null ? void 0 : _f.sortable.index,
14292
- to: (_h = (_g = over == null ? void 0 : over.data) == null ? void 0 : _g.current) == null ? void 0 : _h.sortable.index
13889
+ from: Number(from3),
13890
+ to: Number(to2)
14293
13891
  });
14294
13892
  }
14295
13893
  };
@@ -14320,6 +13918,830 @@ const ListDragWrapper = ({
14320
13918
  }
14321
13919
  );
14322
13920
  };
13921
+ function memo(getDeps, fn, opts) {
13922
+ let deps = opts.initialDeps ?? [];
13923
+ let result;
13924
+ return () => {
13925
+ var _a2, _b, _c, _d;
13926
+ let depTime;
13927
+ if (opts.key && ((_a2 = opts.debug) == null ? void 0 : _a2.call(opts))) depTime = Date.now();
13928
+ const newDeps = getDeps();
13929
+ const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index2) => deps[index2] !== dep);
13930
+ if (!depsChanged) {
13931
+ return result;
13932
+ }
13933
+ deps = newDeps;
13934
+ let resultTime;
13935
+ if (opts.key && ((_b = opts.debug) == null ? void 0 : _b.call(opts))) resultTime = Date.now();
13936
+ result = fn(...newDeps);
13937
+ if (opts.key && ((_c = opts.debug) == null ? void 0 : _c.call(opts))) {
13938
+ const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;
13939
+ const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;
13940
+ const resultFpsPercentage = resultEndTime / 16;
13941
+ const pad = (str, num) => {
13942
+ str = String(str);
13943
+ while (str.length < num) {
13944
+ str = " " + str;
13945
+ }
13946
+ return str;
13947
+ };
13948
+ console.info(
13949
+ `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,
13950
+ `
13951
+ font-size: .6rem;
13952
+ font-weight: bold;
13953
+ color: hsl(${Math.max(
13954
+ 0,
13955
+ Math.min(120 - 120 * resultFpsPercentage, 120)
13956
+ )}deg 100% 31%);`,
13957
+ opts == null ? void 0 : opts.key
13958
+ );
13959
+ }
13960
+ (_d = opts == null ? void 0 : opts.onChange) == null ? void 0 : _d.call(opts, result);
13961
+ return result;
13962
+ };
13963
+ }
13964
+ function notUndefined(value, msg2) {
13965
+ if (value === void 0) {
13966
+ throw new Error(`Unexpected undefined${""}`);
13967
+ } else {
13968
+ return value;
13969
+ }
13970
+ }
13971
+ const approxEqual = (a2, b2) => Math.abs(a2 - b2) < 1;
13972
+ const debounce$2 = (targetWindow, fn, ms2) => {
13973
+ let timeoutId;
13974
+ return function(...args) {
13975
+ targetWindow.clearTimeout(timeoutId);
13976
+ timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms2);
13977
+ };
13978
+ };
13979
+ const defaultKeyExtractor = (index2) => index2;
13980
+ const defaultRangeExtractor = (range2) => {
13981
+ const start = Math.max(range2.startIndex - range2.overscan, 0);
13982
+ const end = Math.min(range2.endIndex + range2.overscan, range2.count - 1);
13983
+ const arr = [];
13984
+ for (let i = start; i <= end; i++) {
13985
+ arr.push(i);
13986
+ }
13987
+ return arr;
13988
+ };
13989
+ const observeElementRect = (instance, cb2) => {
13990
+ const element = instance.scrollElement;
13991
+ if (!element) {
13992
+ return;
13993
+ }
13994
+ const targetWindow = instance.targetWindow;
13995
+ if (!targetWindow) {
13996
+ return;
13997
+ }
13998
+ const handler = (rect) => {
13999
+ const { width: width2, height: height2 } = rect;
14000
+ cb2({ width: Math.round(width2), height: Math.round(height2) });
14001
+ };
14002
+ handler(element.getBoundingClientRect());
14003
+ if (!targetWindow.ResizeObserver) {
14004
+ return () => {
14005
+ };
14006
+ }
14007
+ const observer = new targetWindow.ResizeObserver((entries2) => {
14008
+ const entry = entries2[0];
14009
+ if (entry == null ? void 0 : entry.borderBoxSize) {
14010
+ const box = entry.borderBoxSize[0];
14011
+ if (box) {
14012
+ handler({ width: box.inlineSize, height: box.blockSize });
14013
+ return;
14014
+ }
14015
+ }
14016
+ handler(element.getBoundingClientRect());
14017
+ });
14018
+ observer.observe(element, { box: "border-box" });
14019
+ return () => {
14020
+ observer.unobserve(element);
14021
+ };
14022
+ };
14023
+ const addEventListenerOptions = {
14024
+ passive: true
14025
+ };
14026
+ const supportsScrollend = typeof window == "undefined" ? true : "onscrollend" in window;
14027
+ const observeElementOffset = (instance, cb2) => {
14028
+ const element = instance.scrollElement;
14029
+ if (!element) {
14030
+ return;
14031
+ }
14032
+ const targetWindow = instance.targetWindow;
14033
+ if (!targetWindow) {
14034
+ return;
14035
+ }
14036
+ let offset = 0;
14037
+ const fallback = instance.options.useScrollendEvent && supportsScrollend ? () => void 0 : debounce$2(
14038
+ targetWindow,
14039
+ () => {
14040
+ cb2(offset, false);
14041
+ },
14042
+ instance.options.isScrollingResetDelay
14043
+ );
14044
+ const createHandler = (isScrolling) => () => {
14045
+ const { horizontal, isRtl } = instance.options;
14046
+ offset = horizontal ? element["scrollLeft"] * (isRtl && -1 || 1) : element["scrollTop"];
14047
+ fallback();
14048
+ cb2(offset, isScrolling);
14049
+ };
14050
+ const handler = createHandler(true);
14051
+ const endHandler = createHandler(false);
14052
+ endHandler();
14053
+ element.addEventListener("scroll", handler, addEventListenerOptions);
14054
+ element.addEventListener("scrollend", endHandler, addEventListenerOptions);
14055
+ return () => {
14056
+ element.removeEventListener("scroll", handler);
14057
+ element.removeEventListener("scrollend", endHandler);
14058
+ };
14059
+ };
14060
+ const measureElement = (element, entry, instance) => {
14061
+ if (entry == null ? void 0 : entry.borderBoxSize) {
14062
+ const box = entry.borderBoxSize[0];
14063
+ if (box) {
14064
+ const size2 = Math.round(
14065
+ box[instance.options.horizontal ? "inlineSize" : "blockSize"]
14066
+ );
14067
+ return size2;
14068
+ }
14069
+ }
14070
+ return Math.round(
14071
+ element.getBoundingClientRect()[instance.options.horizontal ? "width" : "height"]
14072
+ );
14073
+ };
14074
+ const elementScroll = (offset, {
14075
+ adjustments = 0,
14076
+ behavior
14077
+ }, instance) => {
14078
+ var _a2, _b;
14079
+ const toOffset = offset + adjustments;
14080
+ (_b = (_a2 = instance.scrollElement) == null ? void 0 : _a2.scrollTo) == null ? void 0 : _b.call(_a2, {
14081
+ [instance.options.horizontal ? "left" : "top"]: toOffset,
14082
+ behavior
14083
+ });
14084
+ };
14085
+ class Virtualizer {
14086
+ constructor(opts) {
14087
+ this.unsubs = [];
14088
+ this.scrollElement = null;
14089
+ this.targetWindow = null;
14090
+ this.isScrolling = false;
14091
+ this.scrollToIndexTimeoutId = null;
14092
+ this.measurementsCache = [];
14093
+ this.itemSizeCache = /* @__PURE__ */ new Map();
14094
+ this.pendingMeasuredCacheIndexes = [];
14095
+ this.scrollRect = null;
14096
+ this.scrollOffset = null;
14097
+ this.scrollDirection = null;
14098
+ this.scrollAdjustments = 0;
14099
+ this.elementsCache = /* @__PURE__ */ new Map();
14100
+ this.observer = /* @__PURE__ */ (() => {
14101
+ let _ro = null;
14102
+ const get3 = () => {
14103
+ if (_ro) {
14104
+ return _ro;
14105
+ }
14106
+ if (!this.targetWindow || !this.targetWindow.ResizeObserver) {
14107
+ return null;
14108
+ }
14109
+ return _ro = new this.targetWindow.ResizeObserver((entries2) => {
14110
+ entries2.forEach((entry) => {
14111
+ this._measureElement(entry.target, entry);
14112
+ });
14113
+ });
14114
+ };
14115
+ return {
14116
+ disconnect: () => {
14117
+ var _a2;
14118
+ (_a2 = get3()) == null ? void 0 : _a2.disconnect();
14119
+ _ro = null;
14120
+ },
14121
+ observe: (target) => {
14122
+ var _a2;
14123
+ return (_a2 = get3()) == null ? void 0 : _a2.observe(target, { box: "border-box" });
14124
+ },
14125
+ unobserve: (target) => {
14126
+ var _a2;
14127
+ return (_a2 = get3()) == null ? void 0 : _a2.unobserve(target);
14128
+ }
14129
+ };
14130
+ })();
14131
+ this.range = null;
14132
+ this.setOptions = (opts2) => {
14133
+ Object.entries(opts2).forEach(([key2, value]) => {
14134
+ if (typeof value === "undefined") delete opts2[key2];
14135
+ });
14136
+ this.options = {
14137
+ debug: false,
14138
+ initialOffset: 0,
14139
+ overscan: 1,
14140
+ paddingStart: 0,
14141
+ paddingEnd: 0,
14142
+ scrollPaddingStart: 0,
14143
+ scrollPaddingEnd: 0,
14144
+ horizontal: false,
14145
+ getItemKey: defaultKeyExtractor,
14146
+ rangeExtractor: defaultRangeExtractor,
14147
+ onChange: () => {
14148
+ },
14149
+ measureElement,
14150
+ initialRect: { width: 0, height: 0 },
14151
+ scrollMargin: 0,
14152
+ gap: 0,
14153
+ indexAttribute: "data-index",
14154
+ initialMeasurementsCache: [],
14155
+ lanes: 1,
14156
+ isScrollingResetDelay: 150,
14157
+ enabled: true,
14158
+ isRtl: false,
14159
+ useScrollendEvent: true,
14160
+ ...opts2
14161
+ };
14162
+ };
14163
+ this.notify = (sync2) => {
14164
+ var _a2, _b;
14165
+ (_b = (_a2 = this.options).onChange) == null ? void 0 : _b.call(_a2, this, sync2);
14166
+ };
14167
+ this.maybeNotify = memo(
14168
+ () => {
14169
+ this.calculateRange();
14170
+ return [
14171
+ this.isScrolling,
14172
+ this.range ? this.range.startIndex : null,
14173
+ this.range ? this.range.endIndex : null
14174
+ ];
14175
+ },
14176
+ (isScrolling) => {
14177
+ this.notify(isScrolling);
14178
+ },
14179
+ {
14180
+ key: process.env.NODE_ENV !== "production" && "maybeNotify",
14181
+ debug: () => this.options.debug,
14182
+ initialDeps: [
14183
+ this.isScrolling,
14184
+ this.range ? this.range.startIndex : null,
14185
+ this.range ? this.range.endIndex : null
14186
+ ]
14187
+ }
14188
+ );
14189
+ this.cleanup = () => {
14190
+ this.unsubs.filter(Boolean).forEach((d2) => d2());
14191
+ this.unsubs = [];
14192
+ this.observer.disconnect();
14193
+ this.scrollElement = null;
14194
+ this.targetWindow = null;
14195
+ };
14196
+ this._didMount = () => {
14197
+ return () => {
14198
+ this.cleanup();
14199
+ };
14200
+ };
14201
+ this._willUpdate = () => {
14202
+ var _a2;
14203
+ const scrollElement = this.options.enabled ? this.options.getScrollElement() : null;
14204
+ if (this.scrollElement !== scrollElement) {
14205
+ this.cleanup();
14206
+ if (!scrollElement) {
14207
+ this.maybeNotify();
14208
+ return;
14209
+ }
14210
+ this.scrollElement = scrollElement;
14211
+ if (this.scrollElement && "ownerDocument" in this.scrollElement) {
14212
+ this.targetWindow = this.scrollElement.ownerDocument.defaultView;
14213
+ } else {
14214
+ this.targetWindow = ((_a2 = this.scrollElement) == null ? void 0 : _a2.window) ?? null;
14215
+ }
14216
+ this.elementsCache.forEach((cached) => {
14217
+ this.observer.observe(cached);
14218
+ });
14219
+ this._scrollToOffset(this.getScrollOffset(), {
14220
+ adjustments: void 0,
14221
+ behavior: void 0
14222
+ });
14223
+ this.unsubs.push(
14224
+ this.options.observeElementRect(this, (rect) => {
14225
+ this.scrollRect = rect;
14226
+ this.maybeNotify();
14227
+ })
14228
+ );
14229
+ this.unsubs.push(
14230
+ this.options.observeElementOffset(this, (offset, isScrolling) => {
14231
+ this.scrollAdjustments = 0;
14232
+ this.scrollDirection = isScrolling ? this.getScrollOffset() < offset ? "forward" : "backward" : null;
14233
+ this.scrollOffset = offset;
14234
+ this.isScrolling = isScrolling;
14235
+ this.maybeNotify();
14236
+ })
14237
+ );
14238
+ }
14239
+ };
14240
+ this.getSize = () => {
14241
+ if (!this.options.enabled) {
14242
+ this.scrollRect = null;
14243
+ return 0;
14244
+ }
14245
+ this.scrollRect = this.scrollRect ?? this.options.initialRect;
14246
+ return this.scrollRect[this.options.horizontal ? "width" : "height"];
14247
+ };
14248
+ this.getScrollOffset = () => {
14249
+ if (!this.options.enabled) {
14250
+ this.scrollOffset = null;
14251
+ return 0;
14252
+ }
14253
+ this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset === "function" ? this.options.initialOffset() : this.options.initialOffset);
14254
+ return this.scrollOffset;
14255
+ };
14256
+ this.getFurthestMeasurement = (measurements, index2) => {
14257
+ const furthestMeasurementsFound = /* @__PURE__ */ new Map();
14258
+ const furthestMeasurements = /* @__PURE__ */ new Map();
14259
+ for (let m2 = index2 - 1; m2 >= 0; m2--) {
14260
+ const measurement = measurements[m2];
14261
+ if (furthestMeasurementsFound.has(measurement.lane)) {
14262
+ continue;
14263
+ }
14264
+ const previousFurthestMeasurement = furthestMeasurements.get(
14265
+ measurement.lane
14266
+ );
14267
+ if (previousFurthestMeasurement == null || measurement.end > previousFurthestMeasurement.end) {
14268
+ furthestMeasurements.set(measurement.lane, measurement);
14269
+ } else if (measurement.end < previousFurthestMeasurement.end) {
14270
+ furthestMeasurementsFound.set(measurement.lane, true);
14271
+ }
14272
+ if (furthestMeasurementsFound.size === this.options.lanes) {
14273
+ break;
14274
+ }
14275
+ }
14276
+ return furthestMeasurements.size === this.options.lanes ? Array.from(furthestMeasurements.values()).sort((a2, b2) => {
14277
+ if (a2.end === b2.end) {
14278
+ return a2.index - b2.index;
14279
+ }
14280
+ return a2.end - b2.end;
14281
+ })[0] : void 0;
14282
+ };
14283
+ this.getMeasurementOptions = memo(
14284
+ () => [
14285
+ this.options.count,
14286
+ this.options.paddingStart,
14287
+ this.options.scrollMargin,
14288
+ this.options.getItemKey,
14289
+ this.options.enabled
14290
+ ],
14291
+ (count, paddingStart, scrollMargin, getItemKey, enabled) => {
14292
+ this.pendingMeasuredCacheIndexes = [];
14293
+ return {
14294
+ count,
14295
+ paddingStart,
14296
+ scrollMargin,
14297
+ getItemKey,
14298
+ enabled
14299
+ };
14300
+ },
14301
+ {
14302
+ key: false
14303
+ }
14304
+ );
14305
+ this.getMeasurements = memo(
14306
+ () => [this.getMeasurementOptions(), this.itemSizeCache],
14307
+ ({ count, paddingStart, scrollMargin, getItemKey, enabled }, itemSizeCache) => {
14308
+ if (!enabled) {
14309
+ this.measurementsCache = [];
14310
+ this.itemSizeCache.clear();
14311
+ return [];
14312
+ }
14313
+ if (this.measurementsCache.length === 0) {
14314
+ this.measurementsCache = this.options.initialMeasurementsCache;
14315
+ this.measurementsCache.forEach((item2) => {
14316
+ this.itemSizeCache.set(item2.key, item2.size);
14317
+ });
14318
+ }
14319
+ const min = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
14320
+ this.pendingMeasuredCacheIndexes = [];
14321
+ const measurements = this.measurementsCache.slice(0, min);
14322
+ for (let i = min; i < count; i++) {
14323
+ const key2 = getItemKey(i);
14324
+ const furthestMeasurement = this.options.lanes === 1 ? measurements[i - 1] : this.getFurthestMeasurement(measurements, i);
14325
+ const start = furthestMeasurement ? furthestMeasurement.end + this.options.gap : paddingStart + scrollMargin;
14326
+ const measuredSize = itemSizeCache.get(key2);
14327
+ const size2 = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i);
14328
+ const end = start + size2;
14329
+ const lane = furthestMeasurement ? furthestMeasurement.lane : i % this.options.lanes;
14330
+ measurements[i] = {
14331
+ index: i,
14332
+ start,
14333
+ size: size2,
14334
+ end,
14335
+ key: key2,
14336
+ lane
14337
+ };
14338
+ }
14339
+ this.measurementsCache = measurements;
14340
+ return measurements;
14341
+ },
14342
+ {
14343
+ key: process.env.NODE_ENV !== "production" && "getMeasurements",
14344
+ debug: () => this.options.debug
14345
+ }
14346
+ );
14347
+ this.calculateRange = memo(
14348
+ () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
14349
+ (measurements, outerSize, scrollOffset) => {
14350
+ return this.range = measurements.length > 0 && outerSize > 0 ? calculateRange({
14351
+ measurements,
14352
+ outerSize,
14353
+ scrollOffset
14354
+ }) : null;
14355
+ },
14356
+ {
14357
+ key: process.env.NODE_ENV !== "production" && "calculateRange",
14358
+ debug: () => this.options.debug
14359
+ }
14360
+ );
14361
+ this.getIndexes = memo(
14362
+ () => [
14363
+ this.options.rangeExtractor,
14364
+ this.calculateRange(),
14365
+ this.options.overscan,
14366
+ this.options.count
14367
+ ],
14368
+ (rangeExtractor, range2, overscan, count) => {
14369
+ return range2 === null ? [] : rangeExtractor({
14370
+ startIndex: range2.startIndex,
14371
+ endIndex: range2.endIndex,
14372
+ overscan,
14373
+ count
14374
+ });
14375
+ },
14376
+ {
14377
+ key: process.env.NODE_ENV !== "production" && "getIndexes",
14378
+ debug: () => this.options.debug
14379
+ }
14380
+ );
14381
+ this.indexFromElement = (node2) => {
14382
+ const attributeName = this.options.indexAttribute;
14383
+ const indexStr = node2.getAttribute(attributeName);
14384
+ if (!indexStr) {
14385
+ console.warn(
14386
+ `Missing attribute name '${attributeName}={index}' on measured element.`
14387
+ );
14388
+ return -1;
14389
+ }
14390
+ return parseInt(indexStr, 10);
14391
+ };
14392
+ this._measureElement = (node2, entry) => {
14393
+ const index2 = this.indexFromElement(node2);
14394
+ const item2 = this.measurementsCache[index2];
14395
+ if (!item2) {
14396
+ return;
14397
+ }
14398
+ const key2 = item2.key;
14399
+ const prevNode = this.elementsCache.get(key2);
14400
+ if (prevNode !== node2) {
14401
+ if (prevNode) {
14402
+ this.observer.unobserve(prevNode);
14403
+ }
14404
+ this.observer.observe(node2);
14405
+ this.elementsCache.set(key2, node2);
14406
+ }
14407
+ if (node2.isConnected) {
14408
+ this.resizeItem(index2, this.options.measureElement(node2, entry, this));
14409
+ }
14410
+ };
14411
+ this.resizeItem = (index2, size2) => {
14412
+ const item2 = this.measurementsCache[index2];
14413
+ if (!item2) {
14414
+ return;
14415
+ }
14416
+ const itemSize = this.itemSizeCache.get(item2.key) ?? item2.size;
14417
+ const delta = size2 - itemSize;
14418
+ if (delta !== 0) {
14419
+ if (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(item2, delta, this) : item2.start < this.getScrollOffset() + this.scrollAdjustments) {
14420
+ if (process.env.NODE_ENV !== "production" && this.options.debug) {
14421
+ console.info("correction", delta);
14422
+ }
14423
+ this._scrollToOffset(this.getScrollOffset(), {
14424
+ adjustments: this.scrollAdjustments += delta,
14425
+ behavior: void 0
14426
+ });
14427
+ }
14428
+ this.pendingMeasuredCacheIndexes.push(item2.index);
14429
+ this.itemSizeCache = new Map(this.itemSizeCache.set(item2.key, size2));
14430
+ this.notify(false);
14431
+ }
14432
+ };
14433
+ this.measureElement = (node2) => {
14434
+ if (!node2) {
14435
+ this.elementsCache.forEach((cached, key2) => {
14436
+ if (!cached.isConnected) {
14437
+ this.observer.unobserve(cached);
14438
+ this.elementsCache.delete(key2);
14439
+ }
14440
+ });
14441
+ return;
14442
+ }
14443
+ this._measureElement(node2, void 0);
14444
+ };
14445
+ this.getVirtualItems = memo(
14446
+ () => [this.getIndexes(), this.getMeasurements()],
14447
+ (indexes, measurements) => {
14448
+ const virtualItems = [];
14449
+ for (let k2 = 0, len = indexes.length; k2 < len; k2++) {
14450
+ const i = indexes[k2];
14451
+ const measurement = measurements[i];
14452
+ virtualItems.push(measurement);
14453
+ }
14454
+ return virtualItems;
14455
+ },
14456
+ {
14457
+ key: process.env.NODE_ENV !== "production" && "getVirtualItems",
14458
+ debug: () => this.options.debug
14459
+ }
14460
+ );
14461
+ this.getVirtualItemForOffset = (offset) => {
14462
+ const measurements = this.getMeasurements();
14463
+ if (measurements.length === 0) {
14464
+ return void 0;
14465
+ }
14466
+ return notUndefined(
14467
+ measurements[findNearestBinarySearch(
14468
+ 0,
14469
+ measurements.length - 1,
14470
+ (index2) => notUndefined(measurements[index2]).start,
14471
+ offset
14472
+ )]
14473
+ );
14474
+ };
14475
+ this.getOffsetForAlignment = (toOffset, align) => {
14476
+ const size2 = this.getSize();
14477
+ const scrollOffset = this.getScrollOffset();
14478
+ if (align === "auto") {
14479
+ if (toOffset <= scrollOffset) {
14480
+ align = "start";
14481
+ } else if (toOffset >= scrollOffset + size2) {
14482
+ align = "end";
14483
+ } else {
14484
+ align = "start";
14485
+ }
14486
+ }
14487
+ if (align === "start") {
14488
+ toOffset = toOffset;
14489
+ } else if (align === "end") {
14490
+ toOffset = toOffset - size2;
14491
+ } else if (align === "center") {
14492
+ toOffset = toOffset - size2 / 2;
14493
+ }
14494
+ const scrollSizeProp = this.options.horizontal ? "scrollWidth" : "scrollHeight";
14495
+ const scrollSize = this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[scrollSizeProp] : this.scrollElement[scrollSizeProp] : 0;
14496
+ const maxOffset = scrollSize - size2;
14497
+ return Math.max(Math.min(maxOffset, toOffset), 0);
14498
+ };
14499
+ this.getOffsetForIndex = (index2, align = "auto") => {
14500
+ index2 = Math.max(0, Math.min(index2, this.options.count - 1));
14501
+ const item2 = this.measurementsCache[index2];
14502
+ if (!item2) {
14503
+ return void 0;
14504
+ }
14505
+ const size2 = this.getSize();
14506
+ const scrollOffset = this.getScrollOffset();
14507
+ if (align === "auto") {
14508
+ if (item2.end >= scrollOffset + size2 - this.options.scrollPaddingEnd) {
14509
+ align = "end";
14510
+ } else if (item2.start <= scrollOffset + this.options.scrollPaddingStart) {
14511
+ align = "start";
14512
+ } else {
14513
+ return [scrollOffset, align];
14514
+ }
14515
+ }
14516
+ const toOffset = align === "end" ? item2.end + this.options.scrollPaddingEnd : item2.start - this.options.scrollPaddingStart;
14517
+ return [this.getOffsetForAlignment(toOffset, align), align];
14518
+ };
14519
+ this.isDynamicMode = () => this.elementsCache.size > 0;
14520
+ this.cancelScrollToIndex = () => {
14521
+ if (this.scrollToIndexTimeoutId !== null && this.targetWindow) {
14522
+ this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId);
14523
+ this.scrollToIndexTimeoutId = null;
14524
+ }
14525
+ };
14526
+ this.scrollToOffset = (toOffset, { align = "start", behavior } = {}) => {
14527
+ this.cancelScrollToIndex();
14528
+ if (behavior === "smooth" && this.isDynamicMode()) {
14529
+ console.warn(
14530
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
14531
+ );
14532
+ }
14533
+ this._scrollToOffset(this.getOffsetForAlignment(toOffset, align), {
14534
+ adjustments: void 0,
14535
+ behavior
14536
+ });
14537
+ };
14538
+ this.scrollToIndex = (index2, { align: initialAlign = "auto", behavior } = {}) => {
14539
+ index2 = Math.max(0, Math.min(index2, this.options.count - 1));
14540
+ this.cancelScrollToIndex();
14541
+ if (behavior === "smooth" && this.isDynamicMode()) {
14542
+ console.warn(
14543
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
14544
+ );
14545
+ }
14546
+ const offsetAndAlign = this.getOffsetForIndex(index2, initialAlign);
14547
+ if (!offsetAndAlign) return;
14548
+ const [offset, align] = offsetAndAlign;
14549
+ this._scrollToOffset(offset, { adjustments: void 0, behavior });
14550
+ if (behavior !== "smooth" && this.isDynamicMode() && this.targetWindow) {
14551
+ this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
14552
+ this.scrollToIndexTimeoutId = null;
14553
+ const elementInDOM = this.elementsCache.has(
14554
+ this.options.getItemKey(index2)
14555
+ );
14556
+ if (elementInDOM) {
14557
+ const [latestOffset] = notUndefined(
14558
+ this.getOffsetForIndex(index2, align)
14559
+ );
14560
+ if (!approxEqual(latestOffset, this.getScrollOffset())) {
14561
+ this.scrollToIndex(index2, { align, behavior });
14562
+ }
14563
+ } else {
14564
+ this.scrollToIndex(index2, { align, behavior });
14565
+ }
14566
+ });
14567
+ }
14568
+ };
14569
+ this.scrollBy = (delta, { behavior } = {}) => {
14570
+ this.cancelScrollToIndex();
14571
+ if (behavior === "smooth" && this.isDynamicMode()) {
14572
+ console.warn(
14573
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
14574
+ );
14575
+ }
14576
+ this._scrollToOffset(this.getScrollOffset() + delta, {
14577
+ adjustments: void 0,
14578
+ behavior
14579
+ });
14580
+ };
14581
+ this.getTotalSize = () => {
14582
+ var _a2;
14583
+ const measurements = this.getMeasurements();
14584
+ let end;
14585
+ if (measurements.length === 0) {
14586
+ end = this.options.paddingStart;
14587
+ } else {
14588
+ end = this.options.lanes === 1 ? ((_a2 = measurements[measurements.length - 1]) == null ? void 0 : _a2.end) ?? 0 : Math.max(
14589
+ ...measurements.slice(-this.options.lanes).map((m2) => m2.end)
14590
+ );
14591
+ }
14592
+ return Math.max(
14593
+ end - this.options.scrollMargin + this.options.paddingEnd,
14594
+ 0
14595
+ );
14596
+ };
14597
+ this._scrollToOffset = (offset, {
14598
+ adjustments,
14599
+ behavior
14600
+ }) => {
14601
+ this.options.scrollToFn(offset, { behavior, adjustments }, this);
14602
+ };
14603
+ this.measure = () => {
14604
+ this.itemSizeCache = /* @__PURE__ */ new Map();
14605
+ this.notify(false);
14606
+ };
14607
+ this.setOptions(opts);
14608
+ }
14609
+ }
14610
+ const findNearestBinarySearch = (low, high, getCurrentValue, value) => {
14611
+ while (low <= high) {
14612
+ const middle = (low + high) / 2 | 0;
14613
+ const currentValue = getCurrentValue(middle);
14614
+ if (currentValue < value) {
14615
+ low = middle + 1;
14616
+ } else if (currentValue > value) {
14617
+ high = middle - 1;
14618
+ } else {
14619
+ return middle;
14620
+ }
14621
+ }
14622
+ if (low > 0) {
14623
+ return low - 1;
14624
+ } else {
14625
+ return 0;
14626
+ }
14627
+ };
14628
+ function calculateRange({
14629
+ measurements,
14630
+ outerSize,
14631
+ scrollOffset
14632
+ }) {
14633
+ const count = measurements.length - 1;
14634
+ const getOffset2 = (index2) => measurements[index2].start;
14635
+ const startIndex = findNearestBinarySearch(0, count, getOffset2, scrollOffset);
14636
+ let endIndex = startIndex;
14637
+ while (endIndex < count && measurements[endIndex].end < scrollOffset + outerSize) {
14638
+ endIndex++;
14639
+ }
14640
+ return { startIndex, endIndex };
14641
+ }
14642
+ const useIsomorphicLayoutEffect$4 = typeof document !== "undefined" ? React$4.useLayoutEffect : React$4.useEffect;
14643
+ function useVirtualizerBase(options) {
14644
+ const rerender = React$4.useReducer(() => ({}), {})[1];
14645
+ const resolvedOptions = {
14646
+ ...options,
14647
+ onChange: (instance2, sync2) => {
14648
+ var _a2;
14649
+ if (sync2) {
14650
+ flushSync$1(rerender);
14651
+ } else {
14652
+ rerender();
14653
+ }
14654
+ (_a2 = options.onChange) == null ? void 0 : _a2.call(options, instance2, sync2);
14655
+ }
14656
+ };
14657
+ const [instance] = React$4.useState(
14658
+ () => new Virtualizer(resolvedOptions)
14659
+ );
14660
+ instance.setOptions(resolvedOptions);
14661
+ React$4.useEffect(() => {
14662
+ return instance._didMount();
14663
+ }, []);
14664
+ useIsomorphicLayoutEffect$4(() => {
14665
+ return instance._willUpdate();
14666
+ });
14667
+ return instance;
14668
+ }
14669
+ function useVirtualizer(options) {
14670
+ return useVirtualizerBase({
14671
+ observeElementRect,
14672
+ observeElementOffset,
14673
+ scrollToFn: elementScroll,
14674
+ ...options
14675
+ });
14676
+ }
14677
+ const ListScrollWrapper = ({
14678
+ items,
14679
+ scrollDetails,
14680
+ children
14681
+ }) => {
14682
+ const { hideScrollbar: hideScrollbar2, triggerScrollToActiveItem, infiniteScroll } = scrollDetails;
14683
+ if (!infiniteScroll) {
14684
+ return /* @__PURE__ */ jsx(
14685
+ "div",
14686
+ {
14687
+ className: cx$2(
14688
+ listStyles.listContent,
14689
+ hideScrollbar2 ? listStyles.hideScrollbar : ""
14690
+ ),
14691
+ children: /* @__PURE__ */ jsx("div", { children: children({}) })
14692
+ }
14693
+ );
14694
+ }
14695
+ const listContainerRef = useRef(null);
14696
+ const estimateItemHeight = () => {
14697
+ let height2 = 37;
14698
+ if (items.length > 0) {
14699
+ const item2 = items[items.length - 1];
14700
+ if (item2.details) height2 += 20;
14701
+ if (item2.metadata) height2 += 20;
14702
+ }
14703
+ return height2;
14704
+ };
14705
+ const virtualizer = useVirtualizer({
14706
+ count: items.length,
14707
+ getScrollElement: () => listContainerRef.current,
14708
+ estimateSize: useCallback(estimateItemHeight, []),
14709
+ overscan: 5
14710
+ });
14711
+ const findFirstActiveItemIndex = (items2) => items2.findIndex((item2) => item2.active === true);
14712
+ const setScrollToActiveItem = (activeItemIndex) => {
14713
+ if (activeItemIndex >= 0) {
14714
+ virtualizer.scrollToIndex(activeItemIndex, {
14715
+ align: "center",
14716
+ behavior: "smooth"
14717
+ });
14718
+ }
14719
+ };
14720
+ useEffect(() => {
14721
+ if (triggerScrollToActiveItem) {
14722
+ const activeItemIndex = findFirstActiveItemIndex(items);
14723
+ setScrollToActiveItem(activeItemIndex);
14724
+ }
14725
+ }, [triggerScrollToActiveItem]);
14726
+ return /* @__PURE__ */ jsx(
14727
+ "div",
14728
+ {
14729
+ className: cx$2(
14730
+ listStyles.listContent,
14731
+ hideScrollbar2 ? listStyles.hideScrollbar : ""
14732
+ ),
14733
+ ref: listContainerRef,
14734
+ children: /* @__PURE__ */ jsx(
14735
+ "div",
14736
+ {
14737
+ className: listStyles.virtualRows,
14738
+ style: { height: `${virtualizer.getTotalSize()}px` },
14739
+ children: children({ virtualizer })
14740
+ }
14741
+ )
14742
+ }
14743
+ );
14744
+ };
14323
14745
  const List = ({
14324
14746
  list: list2,
14325
14747
  bordered: bordered2 = false,
@@ -14338,83 +14760,22 @@ const List = ({
14338
14760
  height: height2,
14339
14761
  testId,
14340
14762
  scrollDetails = {
14341
- scrollable: false,
14342
14763
  hideScrollbar: false,
14343
- triggerScrollToActiveItem: false,
14344
- infiniteScroll: false,
14345
- limit: 10,
14346
- infiniteScrollTarget: void 0
14764
+ triggerScrollToActiveItem: false
14347
14765
  }
14348
14766
  }) => {
14349
- const {
14350
- scrollable,
14351
- hideScrollbar: hideScrollbar2,
14352
- triggerScrollToActiveItem,
14353
- infiniteScroll,
14354
- infiniteScrollTarget
14355
- } = scrollDetails;
14356
- const listHeadingRef = useRef(null);
14357
- const listRowRefs = useRef([]);
14358
- const listContainerRef = useRef(null);
14359
- const MIN_ITEM_HEIGHT = 44;
14360
- const pageSize = infiniteScroll ? Math.ceil(window.innerHeight / MIN_ITEM_HEIGHT) : list2.items.length;
14361
- const [numVisibleRows, setNumVisibleRows] = useState(pageSize);
14362
- const [hasMore, setHasMore] = useState(numVisibleRows < (list2 == null ? void 0 : list2.items.length));
14363
- useEffect(() => {
14364
- listRowRefs.current = listRowRefs.current.slice(0, list2.items.length);
14365
- }, [list2.items.length]);
14366
- const loadMoreItems = () => {
14367
- if (numVisibleRows >= list2.items.length) {
14368
- setHasMore(false);
14369
- return;
14370
- }
14371
- const newVisibleRows = pageSize + numVisibleRows;
14372
- setNumVisibleRows(newVisibleRows);
14373
- };
14374
- const findFirstActiveItemIndex = (items) => items.findIndex((item2) => item2.active === true);
14375
- const setScrollToActiveItem = (activeItemIndex) => {
14376
- if (!listContainerRef.current || !listHeadingRef.current) return;
14377
- const itemBorderLength = 1;
14378
- if (triggerScrollToActiveItem && activeItemIndex >= 0) {
14379
- const itemOffsets = listRowRefs.current.reduce((acc, val, index2) => {
14380
- if (index2 < activeItemIndex) {
14381
- return acc + val.clientHeight + itemBorderLength;
14382
- }
14383
- return acc;
14384
- }, 0);
14385
- const centerOffset = listContainerRef.current.clientHeight / 2 - listRowRefs.current[activeItemIndex].clientHeight / 2;
14386
- const scrollOffset = itemOffsets - centerOffset;
14387
- if (stickyHeader2) {
14388
- const headingOffset2 = listHeadingRef.current.clientHeight / 2;
14389
- listContainerRef.current.scrollTop = scrollOffset + headingOffset2;
14390
- }
14391
- const headingOffset = listHeadingRef.current.clientHeight;
14392
- listContainerRef.current.scrollTop = scrollOffset + headingOffset;
14393
- }
14394
- };
14395
- useEffect(() => {
14396
- if (triggerScrollToActiveItem) {
14397
- const activeItemIndex = findFirstActiveItemIndex(list2 == null ? void 0 : list2.items);
14398
- setScrollToActiveItem(activeItemIndex);
14399
- }
14400
- }, [
14401
- listContainerRef.current,
14402
- listHeadingRef.current,
14403
- triggerScrollToActiveItem
14404
- ]);
14405
- return /* @__PURE__ */ jsx(
14767
+ return /* @__PURE__ */ jsxs(
14406
14768
  "div",
14407
14769
  {
14408
14770
  className: cx$2(
14771
+ listStyles.list,
14409
14772
  narrow2 ? listStyles.narrow : "",
14410
- scrollable ? listStyles.scrollableList : "",
14411
- hideScrollbar2 ? listStyles.hideScrollbar : ""
14773
+ bordered2 ? listStyles.bordered : ""
14412
14774
  ),
14413
14775
  "data-testid": testId,
14414
- id: "scrollableDiv",
14415
14776
  style: { height: height2, marginBottom },
14416
- ref: listContainerRef,
14417
- children: /* @__PURE__ */ jsxs(Card, { bordered: bordered2, padding: false, children: [
14777
+ id: "scrollableDiv",
14778
+ children: [
14418
14779
  !noHeader && /* @__PURE__ */ jsx(
14419
14780
  ListHeading,
14420
14781
  {
@@ -14422,53 +14783,115 @@ const List = ({
14422
14783
  actions: list2.actions,
14423
14784
  toggleNarrow: toggleNarrow2,
14424
14785
  onToggleNarrow,
14425
- stickyHeader: stickyHeader2,
14426
- ref: listHeadingRef
14786
+ stickyHeader: stickyHeader2
14427
14787
  }
14428
14788
  ),
14429
- /* @__PURE__ */ jsx("div", { className: cx$2(listStyles.list, bordered2 ? listStyles.bordered : ""), children: /* @__PURE__ */ jsx(
14789
+ /* @__PURE__ */ jsx(
14430
14790
  ListDragWrapper,
14431
14791
  {
14432
14792
  draggable,
14433
14793
  list: list2,
14434
14794
  onListReorder,
14435
- children: infiniteScroll ? /* @__PURE__ */ jsx(
14436
- InfiniteScroll,
14795
+ children: /* @__PURE__ */ jsx(ListScrollWrapper, { items: list2.items, scrollDetails, children: ({ virtualizer }) => virtualizer ? virtualizer.getVirtualItems().map((virtualRow2) => /* @__PURE__ */ jsx(
14796
+ "div",
14437
14797
  {
14438
- dataLength: numVisibleRows,
14439
- next: loadMoreItems,
14440
- hasMore,
14441
- scrollableTarget: infiniteScrollTarget || "scrollableDiv",
14442
- loader: /* @__PURE__ */ jsx(Loader, {}),
14443
- className: listStyles.infiniteScrollContainer,
14444
- children: list2.items.slice(0, numVisibleRows).map((item2, index2) => /* @__PURE__ */ jsx(
14798
+ "data-index": virtualRow2.index,
14799
+ className: listStyles.virtualRow,
14800
+ style: {
14801
+ transform: `translateY(${virtualRow2.start}px)`
14802
+ },
14803
+ ref: virtualizer.measureElement,
14804
+ children: /* @__PURE__ */ jsx(
14445
14805
  ListRow,
14446
14806
  {
14447
- index: index2,
14807
+ index: virtualRow2.index,
14448
14808
  draggable,
14449
- item: item2,
14809
+ item: list2.items[virtualRow2.index],
14450
14810
  expanding,
14451
- invokeEditOnRowClick,
14452
- ref: listRowRefs
14453
- },
14454
- index2
14455
- ))
14456
- }
14457
- ) : list2.items.map((item2, index2) => /* @__PURE__ */ jsx(
14811
+ invokeEditOnRowClick
14812
+ }
14813
+ )
14814
+ },
14815
+ virtualRow2.key
14816
+ )) : list2.items.map((row2, index2) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
14458
14817
  ListRow,
14459
14818
  {
14460
14819
  index: index2,
14461
14820
  draggable,
14462
- item: item2,
14821
+ item: row2,
14463
14822
  expanding,
14464
- invokeEditOnRowClick,
14465
- ref: listRowRefs
14466
- },
14467
- index2
14468
- ))
14823
+ invokeEditOnRowClick
14824
+ }
14825
+ ) }, index2)) })
14469
14826
  }
14470
- ) })
14471
- ] })
14827
+ )
14828
+ ]
14829
+ }
14830
+ );
14831
+ };
14832
+ const loader = "_loader_477i5_1";
14833
+ const fullViewPortSize = "_fullViewPortSize_477i5_7";
14834
+ const cover = "_cover_477i5_14";
14835
+ const dimmer = "_dimmer_477i5_21";
14836
+ const content$2 = "_content_477i5_44";
14837
+ const text$1 = "_text_477i5_49";
14838
+ const details$1 = "_details_477i5_53";
14839
+ const styles$t = {
14840
+ loader,
14841
+ fullViewPortSize,
14842
+ cover,
14843
+ dimmer,
14844
+ content: content$2,
14845
+ text: text$1,
14846
+ details: details$1
14847
+ };
14848
+ const Loader = ({
14849
+ width: width2,
14850
+ height: height2,
14851
+ text: text2 = "",
14852
+ details: details2 = "",
14853
+ fullViewPortSize: fullViewPortSize2 = false,
14854
+ cover: cover2 = false,
14855
+ children = null,
14856
+ theme = Theme.DARK,
14857
+ testId = null
14858
+ }) => {
14859
+ const color2 = theme === Theme.DARK ? Theme.WHITE : Theme.INHERIT;
14860
+ const background2 = theme === "white" ? "var(--color-background-raised)" : theme === "light" ? "var(--color-background)" : "black";
14861
+ return /* @__PURE__ */ jsx(
14862
+ "div",
14863
+ {
14864
+ className: cx$2(styles$t.loader, cover2 ? styles$t.cover : "", {
14865
+ [styles$t.fullViewPortSize]: fullViewPortSize2
14866
+ }),
14867
+ style: { width: width2, height: height2 },
14868
+ "data-testid": testId,
14869
+ children: /* @__PURE__ */ jsx("div", { className: styles$t.dimmer, style: { background: background2, color: color2 }, children: /* @__PURE__ */ jsxs(
14870
+ "div",
14871
+ {
14872
+ className: styles$t.content,
14873
+ "data-testid": testId && `${testId}-content`,
14874
+ children: [
14875
+ children,
14876
+ text2 && /* @__PURE__ */ jsx(
14877
+ "div",
14878
+ {
14879
+ className: styles$t.text,
14880
+ "data-testid": testId && `${testId}-text`,
14881
+ children: text2
14882
+ }
14883
+ ),
14884
+ details2 && /* @__PURE__ */ jsx(
14885
+ "div",
14886
+ {
14887
+ className: styles$t.details,
14888
+ "data-testid": testId && `${testId}-details`,
14889
+ children: details2
14890
+ }
14891
+ )
14892
+ ]
14893
+ }
14894
+ ) })
14472
14895
  }
14473
14896
  );
14474
14897
  };
@@ -15242,7 +15665,7 @@ const useFontsReady = () => {
15242
15665
  const getWidth = () => window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
15243
15666
  const useWindowWidth = () => {
15244
15667
  const [width2, setWidth] = useState(getWidth());
15245
- const resizeListener = debounce$2(() => setWidth(getWidth()), 150);
15668
+ const resizeListener = debounce$3(() => setWidth(getWidth()), 150);
15246
15669
  useEffect(() => {
15247
15670
  window.addEventListener("resize", resizeListener);
15248
15671
  return () => {
@@ -48004,7 +48427,7 @@ const styles$d = {
48004
48427
  active: active$2,
48005
48428
  icon: icon$1
48006
48429
  };
48007
- const TooltipIcon = memo(
48430
+ const TooltipIcon = memo$1(
48008
48431
  ({ isOpen: isOpen2, label: label2, icon: icon2, invalid }) => {
48009
48432
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
48010
48433
  /* @__PURE__ */ jsx(
@@ -48079,7 +48502,7 @@ const Sections = ({
48079
48502
  )
48080
48503
  ] }, i)) });
48081
48504
  };
48082
- const SideBar = memo(
48505
+ const SideBar = memo$1(
48083
48506
  ({
48084
48507
  options,
48085
48508
  startOpen = false,
@@ -50705,19 +51128,19 @@ const Spacer = ({
50705
51128
  }
50706
51129
  }
50707
51130
  );
50708
- const inputInTable$2 = "_inputInTable_xzacf_1";
50709
- const inputHover$2 = "_inputHover_xzacf_13";
50710
- const inputFocus$2 = "_inputFocus_xzacf_18";
50711
- const inputError$2 = "_inputError_xzacf_25";
50712
- const inputWarning$2 = "_inputWarning_xzacf_26";
50713
- const inputDisabled$2 = "_inputDisabled_xzacf_61";
50714
- const hideScrollbars$2 = "_hideScrollbars_xzacf_67";
50715
- const wrapper = "_wrapper_xzacf_85";
50716
- const bordered = "_bordered_xzacf_93";
50717
- const scroll = "_scroll_xzacf_98";
50718
- const table = "_table_xzacf_108";
50719
- const dragOverlay = "_dragOverlay_xzacf_145";
50720
- const striped = "_striped_xzacf_194";
51131
+ const inputInTable$2 = "_inputInTable_xkoxm_1";
51132
+ const inputHover$2 = "_inputHover_xkoxm_13";
51133
+ const inputFocus$2 = "_inputFocus_xkoxm_18";
51134
+ const inputError$2 = "_inputError_xkoxm_25";
51135
+ const inputWarning$2 = "_inputWarning_xkoxm_26";
51136
+ const inputDisabled$2 = "_inputDisabled_xkoxm_61";
51137
+ const hideScrollbars$2 = "_hideScrollbars_xkoxm_67";
51138
+ const wrapper = "_wrapper_xkoxm_85";
51139
+ const bordered = "_bordered_xkoxm_93";
51140
+ const scroll = "_scroll_xkoxm_98";
51141
+ const table = "_table_xkoxm_109";
51142
+ const dragOverlay = "_dragOverlay_xkoxm_145";
51143
+ const striped = "_striped_xkoxm_194";
50721
51144
  const styles$b = {
50722
51145
  inputInTable: inputInTable$2,
50723
51146
  inputHover: inputHover$2,
@@ -50823,36 +51246,6 @@ const hasActions = (rows) => rows.reduce(
50823
51246
  const hasRowActions = (rows, headers) => {
50824
51247
  return hasActions(headers) > 0 || hasActions(rows) > 0;
50825
51248
  };
50826
- const TableScrollWrapper = ({
50827
- table: table2,
50828
- children
50829
- }) => {
50830
- const { rows, infiniteScroll } = table2;
50831
- const pageSize = Math.ceil(window.innerHeight / 30);
50832
- const [visibleRows, setVisibleRows] = infiniteScroll ? useState(pageSize) : [rows.length, null];
50833
- const [hasMore, setHasMore] = infiniteScroll ? useState(visibleRows < rows.length) : [false, null];
50834
- const loadMoreItems = () => {
50835
- if (visibleRows >= rows.length && setHasMore) {
50836
- setHasMore(false);
50837
- return;
50838
- }
50839
- if (setVisibleRows) {
50840
- setVisibleRows(visibleRows + pageSize);
50841
- }
50842
- };
50843
- return /* @__PURE__ */ jsx("div", { id: "scrollWrapper", className: styles$b.scroll, children: infiniteScroll ? /* @__PURE__ */ jsx(
50844
- InfiniteScroll,
50845
- {
50846
- dataLength: Math.min(rows.length, visibleRows + pageSize),
50847
- next: loadMoreItems,
50848
- hasMore,
50849
- scrollableTarget: "scrollWrapper",
50850
- style: { overflow: "initial" },
50851
- loader: null,
50852
- children: children({ visibleRows })
50853
- }
50854
- ) : children({ visibleRows }) });
50855
- };
50856
51249
  const clickableRow = "_clickableRow_10f34_1";
50857
51250
  const hoverableRow = "_hoverableRow_10f34_4";
50858
51251
  const rowActive = "_rowActive_10f34_4";
@@ -51566,6 +51959,7 @@ const Row = ({
51566
51959
  hasRowActions: hasRowActions2,
51567
51960
  draggableTable = false,
51568
51961
  columnWidths,
51962
+ height: height2,
51569
51963
  testId
51570
51964
  //TODO: add testId
51571
51965
  }) => {
@@ -51622,7 +52016,8 @@ const Row = ({
51622
52016
  animateLayoutChanges: () => false
51623
52017
  });
51624
52018
  const style = {
51625
- transform: CSS.Translate.toString(transform),
52019
+ height: height2,
52020
+ transform: CSS.Transform.toString(transform),
51626
52021
  transition,
51627
52022
  opacity: isDragging ? 0 : void 0
51628
52023
  };
@@ -51680,6 +52075,8 @@ const Row = ({
51680
52075
  ),
51681
52076
  "data-error": error2 || null,
51682
52077
  "data-warning": warning2 || null,
52078
+ "data-index": rowIndex,
52079
+ "data-even": rowIndex % 2 === 0,
51683
52080
  style,
51684
52081
  children: [
51685
52082
  draggableTable ? getDragItem() : null,
@@ -51771,6 +52168,36 @@ const TableDragWrapper = (props) => {
51771
52168
  }
51772
52169
  );
51773
52170
  };
52171
+ const TableScrollWrapper = ({
52172
+ table: table2,
52173
+ theadRef,
52174
+ children
52175
+ }) => {
52176
+ var _a2, _b;
52177
+ const { infiniteScroll = false } = table2;
52178
+ if (!infiniteScroll) {
52179
+ return /* @__PURE__ */ jsx("div", { id: "scrollWrapper", className: styles$b.scroll, children: children({}) });
52180
+ }
52181
+ const containerRef = useRef(null);
52182
+ const MIN_ITEM_HEIGHT = 31;
52183
+ const virtualizer = useVirtualizer({
52184
+ count: ((_a2 = table2.rows) == null ? void 0 : _a2.length) ?? 0,
52185
+ getScrollElement: () => containerRef.current,
52186
+ estimateSize: () => MIN_ITEM_HEIGHT,
52187
+ overscan: 10
52188
+ });
52189
+ const theadHeight = ((_b = theadRef.current) == null ? void 0 : _b.clientHeight) ?? 0;
52190
+ const totalHeight = virtualizer.getTotalSize() + theadHeight;
52191
+ const items = virtualizer.getVirtualItems();
52192
+ const paddingTop = items.length > 0 ? items[0].start : 0;
52193
+ const paddingBottom = items.length > 0 ? virtualizer.getTotalSize() - items[items.length - 1].end : 0;
52194
+ const tableStyle = {
52195
+ "--virtualPaddingTop": paddingTop + "px",
52196
+ "--virtualPaddingBottom": paddingBottom + "px",
52197
+ height: totalHeight
52198
+ };
52199
+ return /* @__PURE__ */ jsx("div", { id: "scrollWrapper", className: styles$b.scroll, ref: containerRef, children: children({ virtualizer, tableStyle }) });
52200
+ };
51774
52201
  const Table = (props) => {
51775
52202
  var _a2, _b, _c, _d, _e2, _f, _g;
51776
52203
  const { onListReorder = () => {
@@ -51793,6 +52220,7 @@ const Table = (props) => {
51793
52220
  maxHeight,
51794
52221
  fixedWidth: width2
51795
52222
  } = propTable;
52223
+ const theadRef = useRef(null);
51796
52224
  const tbodyRef = useRef(null);
51797
52225
  const headers = get$2(props, "table.headers", []);
51798
52226
  const columnCount = getColumnCount(propRows, headers);
@@ -51854,7 +52282,7 @@ const Table = (props) => {
51854
52282
  testId: testId && `${testId}-title`
51855
52283
  }
51856
52284
  ),
51857
- /* @__PURE__ */ jsx(TableScrollWrapper, { table: table2, children: ({ visibleRows }) => /* @__PURE__ */ jsx(
52285
+ /* @__PURE__ */ jsx(
51858
52286
  TableDragWrapper,
51859
52287
  {
51860
52288
  colSpan,
@@ -51865,49 +52293,66 @@ const Table = (props) => {
51865
52293
  rowActions,
51866
52294
  rows,
51867
52295
  tbodyRef,
51868
- children: /* @__PURE__ */ jsxs(
51869
- "table",
51870
- {
51871
- className: cx$2(styles$b.table, striped2 ? styles$b.striped : ""),
51872
- "data-testid": testId,
51873
- children: [
51874
- /* @__PURE__ */ jsx("thead", { children: headers.map((row2, rowIndex) => {
51875
- return /* @__PURE__ */ jsx(
52296
+ children: /* @__PURE__ */ jsx(TableScrollWrapper, { table: table2, theadRef, children: ({ virtualizer, tableStyle }) => {
52297
+ return /* @__PURE__ */ jsxs(
52298
+ "table",
52299
+ {
52300
+ className: cx$2(styles$b.table, striped2 ? styles$b.striped : ""),
52301
+ "data-testid": testId,
52302
+ style: tableStyle,
52303
+ children: [
52304
+ /* @__PURE__ */ jsx("thead", { ref: theadRef, children: headers.map((row2, rowIndex) => {
52305
+ return /* @__PURE__ */ jsx(
52306
+ Row,
52307
+ {
52308
+ rowIndex,
52309
+ isHeader: true,
52310
+ row: row2,
52311
+ columnCount,
52312
+ columnWidths,
52313
+ colSpan,
52314
+ hasRowActions: rowActions,
52315
+ columnAlignment,
52316
+ columnHeaderAlignments,
52317
+ draggableTable: draggable
52318
+ },
52319
+ `0_${rowIndex}`
52320
+ );
52321
+ }) }),
52322
+ /* @__PURE__ */ jsx("tbody", { ref: tbodyRef, children: virtualizer ? virtualizer.getVirtualItems().map((virtualRow2) => /* @__PURE__ */ jsx(
51876
52323
  Row,
51877
52324
  {
51878
- rowIndex,
51879
- isHeader: true,
52325
+ rowIndex: virtualRow2.index,
52326
+ row: rows[virtualRow2.index],
52327
+ columnCount,
52328
+ columnWidths,
52329
+ colSpan,
52330
+ hasRowActions: rowActions,
52331
+ columnAlignment,
52332
+ draggableTable: draggable,
52333
+ height: virtualRow2.size
52334
+ },
52335
+ `1_${virtualRow2.index}`
52336
+ )) : rows.map((row2, index2) => /* @__PURE__ */ jsx(
52337
+ Row,
52338
+ {
52339
+ rowIndex: index2,
51880
52340
  row: row2,
51881
52341
  columnCount,
51882
52342
  columnWidths,
51883
52343
  colSpan,
51884
52344
  hasRowActions: rowActions,
51885
52345
  columnAlignment,
51886
- columnHeaderAlignments,
51887
52346
  draggableTable: draggable
51888
52347
  },
51889
- `0_${rowIndex}`
51890
- );
51891
- }) }),
51892
- /* @__PURE__ */ jsx("tbody", { ref: tbodyRef, children: rows.slice(0, visibleRows).map((row2, rowIndex) => /* @__PURE__ */ jsx(
51893
- Row,
51894
- {
51895
- rowIndex,
51896
- row: row2,
51897
- columnCount,
51898
- columnWidths,
51899
- colSpan,
51900
- hasRowActions: rowActions,
51901
- columnAlignment,
51902
- draggableTable: draggable
51903
- },
51904
- `1_${rowIndex}`
51905
- )) })
51906
- ]
51907
- }
51908
- )
52348
+ `1_${index2}`
52349
+ )) })
52350
+ ]
52351
+ }
52352
+ );
52353
+ } })
51909
52354
  }
51910
- ) }),
52355
+ ),
51911
52356
  footer2 && /* @__PURE__ */ jsx(
51912
52357
  Footer,
51913
52358
  {
@@ -55020,7 +55465,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
55020
55465
  }
55021
55466
  let refCount = 0;
55022
55467
  const INSTANCE_SYM = Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");
55023
- var DndProvider = /* @__PURE__ */ memo(function DndProvider2(_param) {
55468
+ var DndProvider = /* @__PURE__ */ memo$1(function DndProvider2(_param) {
55024
55469
  var { children } = _param, props = _objectWithoutProperties(_param, [
55025
55470
  "children"
55026
55471
  ]);
@@ -57381,7 +57826,7 @@ function useFeatures(props, visualElement2, preloadedFeatures) {
57381
57826
  var name_1 = featureNames[i];
57382
57827
  var _a2 = featureDefinitions[name_1], isEnabled = _a2.isEnabled, Component2 = _a2.Component;
57383
57828
  if (isEnabled(props) && Component2) {
57384
- features.push(React$4.createElement(Component2, __assign$4({ key: name_1 }, props, { visualElement: visualElement2 })));
57829
+ features.push(React$4.createElement(Component2, __assign$3({ key: name_1 }, props, { visualElement: visualElement2 })));
57385
57830
  }
57386
57831
  }
57387
57832
  return features;
@@ -57622,7 +58067,7 @@ function useProjection(projectionId, _a2, visualElement2, ProjectionNodeConstruc
57622
58067
  var VisualElementHandler = (
57623
58068
  /** @class */
57624
58069
  function(_super) {
57625
- __extends$1(VisualElementHandler2, _super);
58070
+ __extends(VisualElementHandler2, _super);
57626
58071
  function VisualElementHandler2() {
57627
58072
  return _super !== null && _super.apply(this, arguments) || this;
57628
58073
  }
@@ -57648,20 +58093,20 @@ function createMotionComponent(_a2) {
57648
58093
  preloadedFeatures && loadFeatures(preloadedFeatures);
57649
58094
  function MotionComponent(props, externalRef) {
57650
58095
  var layoutId = useLayoutId(props);
57651
- props = __assign$4(__assign$4({}, props), { layoutId });
58096
+ props = __assign$3(__assign$3({}, props), { layoutId });
57652
58097
  var config = useContext(MotionConfigContext);
57653
58098
  var features = null;
57654
58099
  var context2 = useCreateMotionContext(props);
57655
58100
  var projectionId = config.isStatic ? void 0 : useProjectionId();
57656
58101
  var visualState = useVisualState(props, config.isStatic);
57657
58102
  if (!config.isStatic && isBrowser) {
57658
- context2.visualElement = useVisualElement(Component2, visualState, __assign$4(__assign$4({}, config), props), createVisualElement);
58103
+ context2.visualElement = useVisualElement(Component2, visualState, __assign$3(__assign$3({}, config), props), createVisualElement);
57659
58104
  useProjection(projectionId, props, context2.visualElement, projectionNodeConstructor || featureDefinitions.projectionNodeConstructor);
57660
58105
  features = useFeatures(props, context2.visualElement, preloadedFeatures);
57661
58106
  }
57662
58107
  return React$4.createElement(
57663
58108
  VisualElementHandler,
57664
- { visualElement: context2.visualElement, props: __assign$4(__assign$4({}, config), props) },
58109
+ { visualElement: context2.visualElement, props: __assign$3(__assign$3({}, config), props) },
57665
58110
  features,
57666
58111
  React$4.createElement(MotionContext.Provider, { value: context2 }, useRender(Component2, props, projectionId, useMotionRef(visualState, context2.visualElement, externalRef), visualState, config.isStatic, context2.visualElement))
57667
58112
  );
@@ -57987,7 +58432,7 @@ const filter = Object.assign(Object.assign({}, complex), { getAnimatableNone: (v
57987
58432
  const functions = v2.match(functionRegex);
57988
58433
  return functions ? functions.map(applyDefaultFilter).join(" ") : v2;
57989
58434
  } });
57990
- var int = __assign$4(__assign$4({}, number), { transform: Math.round });
58435
+ var int = __assign$3(__assign$3({}, number), { transform: Math.round });
57991
58436
  var numberValueTypes = {
57992
58437
  // Border props
57993
58438
  borderWidth: px,
@@ -58117,7 +58562,7 @@ function useInitialMotionValues(_a2, visualState, isStatic) {
58117
58562
  var state = createHtmlRenderState();
58118
58563
  buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);
58119
58564
  var vars = state.vars, style = state.style;
58120
- return __assign$4(__assign$4({}, vars), style);
58565
+ return __assign$3(__assign$3({}, vars), style);
58121
58566
  }, [visualState]);
58122
58567
  }
58123
58568
  function useStyle(props, visualState, isStatic) {
@@ -58275,18 +58720,18 @@ function buildSVGAttrs(state, _a2, options, transformTemplate) {
58275
58720
  }
58276
58721
  }
58277
58722
  var createSvgRenderState = function() {
58278
- return __assign$4(__assign$4({}, createHtmlRenderState()), { attrs: {} });
58723
+ return __assign$3(__assign$3({}, createHtmlRenderState()), { attrs: {} });
58279
58724
  };
58280
58725
  function useSVGProps(props, visualState) {
58281
58726
  var visualProps = useMemo(function() {
58282
58727
  var state = createSvgRenderState();
58283
58728
  buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, props.transformTemplate);
58284
- return __assign$4(__assign$4({}, state.attrs), { style: __assign$4({}, state.style) });
58729
+ return __assign$3(__assign$3({}, state.attrs), { style: __assign$3({}, state.style) });
58285
58730
  }, [visualState]);
58286
58731
  if (props.style) {
58287
58732
  var rawStyles = {};
58288
58733
  copyRawValuesOnly(rawStyles, props.style, props);
58289
- visualProps.style = __assign$4(__assign$4({}, rawStyles), visualProps.style);
58734
+ visualProps.style = __assign$3(__assign$3({}, rawStyles), visualProps.style);
58290
58735
  }
58291
58736
  return visualProps;
58292
58737
  }
@@ -58299,7 +58744,7 @@ function createUseRender(forwardMotionProps) {
58299
58744
  var useVisualProps = isSVGComponent(Component2) ? useSVGProps : useHTMLProps;
58300
58745
  var visualProps = useVisualProps(props, latestValues, isStatic);
58301
58746
  var filteredProps = filterProps(props, typeof Component2 === "string", forwardMotionProps);
58302
- var elementProps = __assign$4(__assign$4(__assign$4({}, filteredProps), visualProps), { ref });
58747
+ var elementProps = __assign$3(__assign$3(__assign$3({}, filteredProps), visualProps), { ref });
58303
58748
  if (projectionId) {
58304
58749
  elementProps["data-projection-id"] = projectionId;
58305
58750
  }
@@ -58476,7 +58921,7 @@ var htmlMotionConfig = {
58476
58921
  function createDomMotionConfig(Component2, _a2, preloadedFeatures, createVisualElement, projectionNodeConstructor) {
58477
58922
  var _b = _a2.forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b;
58478
58923
  var baseConfig = isSVGComponent(Component2) ? svgMotionConfig : htmlMotionConfig;
58479
- return __assign$4(__assign$4({}, baseConfig), { preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement, projectionNodeConstructor, Component: Component2 });
58924
+ return __assign$3(__assign$3({}, baseConfig), { preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement, projectionNodeConstructor, Component: Component2 });
58480
58925
  }
58481
58926
  var AnimationType;
58482
58927
  (function(AnimationType2) {
@@ -59563,7 +60008,7 @@ function initIntersectionObserver(_a2) {
59563
60008
  var rootObservers = observers.get(lookupRoot);
59564
60009
  var key2 = JSON.stringify(options);
59565
60010
  if (!rootObservers[key2]) {
59566
- rootObservers[key2] = new IntersectionObserver(fireAllObserverCallbacks, __assign$4({ root: root2 }, options));
60011
+ rootObservers[key2] = new IntersectionObserver(fireAllObserverCallbacks, __assign$3({ root: root2 }, options));
59567
60012
  }
59568
60013
  return rootObservers[key2];
59569
60014
  }
@@ -59781,9 +60226,9 @@ var getDefaultTransition = function(valueKey, to2) {
59781
60226
  } else {
59782
60227
  transitionFactory = defaultTransitions[valueKey] || defaultTransitions.default;
59783
60228
  }
59784
- return __assign$4({ to: to2 }, transitionFactory(to2));
60229
+ return __assign$3({ to: to2 }, transitionFactory(to2));
59785
60230
  };
59786
- var defaultValueTypes = __assign$4(__assign$4({}, numberValueTypes), {
60231
+ var defaultValueTypes = __assign$3(__assign$3({}, numberValueTypes), {
59787
60232
  // Color props
59788
60233
  color,
59789
60234
  backgroundColor: color,
@@ -59825,7 +60270,7 @@ function isTransitionDefined(_a2) {
59825
60270
  var legacyRepeatWarning = false;
59826
60271
  function convertTransitionToAnimationOptions(_a2) {
59827
60272
  var ease = _a2.ease, times = _a2.times, yoyo = _a2.yoyo, flip = _a2.flip, loop = _a2.loop, transition = __rest$1(_a2, ["ease", "times", "yoyo", "flip", "loop"]);
59828
- var options = __assign$4({}, transition);
60273
+ var options = __assign$3({}, transition);
59829
60274
  if (times)
59830
60275
  options["offset"] = times;
59831
60276
  if (transition.duration)
@@ -59872,9 +60317,9 @@ function getPopmotionAnimationOptions(transition, options, key2) {
59872
60317
  }
59873
60318
  hydrateKeyframes(options);
59874
60319
  if (!isTransitionDefined(transition)) {
59875
- transition = __assign$4(__assign$4({}, transition), getDefaultTransition(key2, options.to));
60320
+ transition = __assign$3(__assign$3({}, transition), getDefaultTransition(key2, options.to));
59876
60321
  }
59877
- return __assign$4(__assign$4({}, options), convertTransitionToAnimationOptions(transition));
60322
+ return __assign$3(__assign$3({}, options), convertTransitionToAnimationOptions(transition));
59878
60323
  }
59879
60324
  function getAnimation(key2, value, target, transition, onComplete) {
59880
60325
  var _a2;
@@ -59900,7 +60345,7 @@ function getAnimation(key2, value, target, transition, onComplete) {
59900
60345
  return value.set(v2);
59901
60346
  }
59902
60347
  };
59903
- return valueTransition.type === "inertia" || valueTransition.type === "decay" ? inertia(__assign$4(__assign$4({}, options), valueTransition)) : animate$1(__assign$4(__assign$4({}, getPopmotionAnimationOptions(valueTransition, options, key2)), { onUpdate: function(v2) {
60348
+ return valueTransition.type === "inertia" || valueTransition.type === "decay" ? inertia(__assign$3(__assign$3({}, options), valueTransition)) : animate$1(__assign$3(__assign$3({}, getPopmotionAnimationOptions(valueTransition, options, key2)), { onUpdate: function(v2) {
59904
60349
  var _a3;
59905
60350
  options.onUpdate(v2);
59906
60351
  (_a3 = valueTransition.onUpdate) === null || _a3 === void 0 ? void 0 : _a3.call(valueTransition, v2);
@@ -60153,7 +60598,7 @@ function setTarget(visualElement2, definition) {
60153
60598
  var _a2 = resolved ? visualElement2.makeTargetAnimatable(resolved, false) : {}, _b = _a2.transitionEnd, transitionEnd = _b === void 0 ? {} : _b;
60154
60599
  _a2.transition;
60155
60600
  var target = __rest$1(_a2, ["transitionEnd", "transition"]);
60156
- target = __assign$4(__assign$4({}, target), transitionEnd);
60601
+ target = __assign$3(__assign$3({}, target), transitionEnd);
60157
60602
  for (var key2 in target) {
60158
60603
  var value = resolveFinalValueInKeyframes(target[key2]);
60159
60604
  setMotionValue(visualElement2, key2, value);
@@ -60271,9 +60716,9 @@ function animateTarget(visualElement2, definition, _a2) {
60271
60716
  if (!value || valueTarget === void 0 || animationTypeState && shouldBlockAnimation(animationTypeState, key2)) {
60272
60717
  continue;
60273
60718
  }
60274
- var valueTransition = __assign$4({ delay }, transition);
60719
+ var valueTransition = __assign$3({ delay }, transition);
60275
60720
  if (visualElement2.shouldReduceMotion && isTransformProp(key2)) {
60276
- valueTransition = __assign$4(__assign$4({}, valueTransition), { type: false, delay: 0 });
60721
+ valueTransition = __assign$3(__assign$3({}, valueTransition), { type: false, delay: 0 });
60277
60722
  }
60278
60723
  var animation = startAnimation(key2, value, valueTarget, valueTransition);
60279
60724
  animations2.push(animation);
@@ -60306,7 +60751,7 @@ function animateChildren(visualElement2, variant, delayChildren, staggerChildren
60306
60751
  return maxStaggerDuration - i * staggerChildren;
60307
60752
  };
60308
60753
  Array.from(visualElement2.variantChildren).sort(sortByTreeOrder).forEach(function(child, i) {
60309
- animations2.push(animateVariant(child, variant, __assign$4(__assign$4({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function() {
60754
+ animations2.push(animateVariant(child, variant, __assign$3(__assign$3({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function() {
60310
60755
  return child.notifyAnimationComplete(variant);
60311
60756
  }));
60312
60757
  });
@@ -60350,7 +60795,7 @@ function createAnimationState(visualElement2) {
60350
60795
  if (resolved) {
60351
60796
  resolved.transition;
60352
60797
  var transitionEnd = resolved.transitionEnd, target = __rest$1(resolved, ["transition", "transitionEnd"]);
60353
- acc = __assign$4(__assign$4(__assign$4({}, acc), target), transitionEnd);
60798
+ acc = __assign$3(__assign$3(__assign$3({}, acc), target), transitionEnd);
60354
60799
  }
60355
60800
  return acc;
60356
60801
  };
@@ -60380,7 +60825,7 @@ function createAnimationState(visualElement2) {
60380
60825
  if (isInherited && isInitialRender && visualElement2.manuallyAnimateOnMount) {
60381
60826
  isInherited = false;
60382
60827
  }
60383
- typeState.protectedKeys = __assign$4({}, encounteredKeys);
60828
+ typeState.protectedKeys = __assign$3({}, encounteredKeys);
60384
60829
  if (
60385
60830
  // If it isn't active and hasn't *just* been set as inactive
60386
60831
  !typeState.isActive && activeDelta === null || // If we didn't and don't have any defined prop for this animation type
@@ -60398,7 +60843,7 @@ function createAnimationState(visualElement2) {
60398
60843
  if (activeDelta === false)
60399
60844
  resolvedValues = {};
60400
60845
  var _b = typeState.prevResolvedValues, prevResolvedValues = _b === void 0 ? {} : _b;
60401
- var allKeys = __assign$4(__assign$4({}, prevResolvedValues), resolvedValues);
60846
+ var allKeys = __assign$3(__assign$3({}, prevResolvedValues), resolvedValues);
60402
60847
  var markToAnimate = function(key3) {
60403
60848
  shouldAnimateType = true;
60404
60849
  removedKeys.delete(key3);
@@ -60430,7 +60875,7 @@ function createAnimationState(visualElement2) {
60430
60875
  typeState.prevProp = prop;
60431
60876
  typeState.prevResolvedValues = resolvedValues;
60432
60877
  if (typeState.isActive) {
60433
- encounteredKeys = __assign$4(__assign$4({}, encounteredKeys), resolvedValues);
60878
+ encounteredKeys = __assign$3(__assign$3({}, encounteredKeys), resolvedValues);
60434
60879
  }
60435
60880
  if (isInitialRender && visualElement2.blockInitialAnimation) {
60436
60881
  shouldAnimateType = false;
@@ -60439,7 +60884,7 @@ function createAnimationState(visualElement2) {
60439
60884
  animations2.push.apply(animations2, __spreadArray$2([], __read(definitionList.map(function(animation) {
60440
60885
  return {
60441
60886
  animation,
60442
- options: __assign$4({ type }, options)
60887
+ options: __assign$3({ type }, options)
60443
60888
  };
60444
60889
  })), false));
60445
60890
  }
@@ -60447,7 +60892,7 @@ function createAnimationState(visualElement2) {
60447
60892
  for (var i = 0; i < numAnimationTypes; i++) {
60448
60893
  _loop_1(i);
60449
60894
  }
60450
- allAnimatedKeys = __assign$4({}, encounteredKeys);
60895
+ allAnimatedKeys = __assign$3({}, encounteredKeys);
60451
60896
  if (removedKeys.size) {
60452
60897
  var fallbackAnimation_1 = {};
60453
60898
  removedKeys.forEach(function(key2) {
@@ -60555,7 +61000,7 @@ var PanSession = (
60555
61000
  return;
60556
61001
  var point2 = info3.point;
60557
61002
  var timestamp2 = getFrameData().timestamp;
60558
- _this.history.push(__assign$4(__assign$4({}, point2), { timestamp: timestamp2 }));
61003
+ _this.history.push(__assign$3(__assign$3({}, point2), { timestamp: timestamp2 }));
60559
61004
  var _a3 = _this.handlers, onStart = _a3.onStart, onMove = _a3.onMove;
60560
61005
  if (!isPanStarted) {
60561
61006
  onStart && onStart(_this.lastMoveEvent, info3);
@@ -60589,7 +61034,7 @@ var PanSession = (
60589
61034
  var initialInfo = transformPoint(info2, this.transformPagePoint);
60590
61035
  var point = initialInfo.point;
60591
61036
  var timestamp = getFrameData().timestamp;
60592
- this.history = [__assign$4(__assign$4({}, point), { timestamp })];
61037
+ this.history = [__assign$3(__assign$3({}, point), { timestamp })];
60593
61038
  var onSessionStart = handlers2.onSessionStart;
60594
61039
  onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
60595
61040
  this.removeListeners = pipe(addPointerEvent(window, "pointermove", this.handlePointerMove), addPointerEvent(window, "pointerup", this.handlePointerUp), addPointerEvent(window, "pointercancel", this.handlePointerUp));
@@ -61110,7 +61555,7 @@ var VisualElementDragControls = (
61110
61555
  transition = { min: 0, max: 0 };
61111
61556
  var bounceStiffness = dragElastic ? 200 : 1e6;
61112
61557
  var bounceDamping = dragElastic ? 40 : 1e7;
61113
- var inertia2 = __assign$4(__assign$4({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness, bounceDamping, timeConstant: 750, restDelta: 1, restSpeed: 10 }, dragTransition), transition);
61558
+ var inertia2 = __assign$3(__assign$3({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness, bounceDamping, timeConstant: 750, restDelta: 1, restSpeed: 10 }, dragTransition), transition);
61114
61559
  return _this.startAxisValueAnimation(axis, inertia2);
61115
61560
  });
61116
61561
  return Promise.all(momentumAnimations).then(onDragTransitionEnd);
@@ -61221,7 +61666,7 @@ var VisualElementDragControls = (
61221
61666
  VisualElementDragControls2.prototype.getProps = function() {
61222
61667
  var props = this.visualElement.getProps();
61223
61668
  var _a2 = props.drag, drag2 = _a2 === void 0 ? false : _a2, _b = props.dragDirectionLock, dragDirectionLock = _b === void 0 ? false : _b, _c = props.dragPropagation, dragPropagation = _c === void 0 ? false : _c, _d = props.dragConstraints, dragConstraints = _d === void 0 ? false : _d, _e2 = props.dragElastic, dragElastic = _e2 === void 0 ? defaultElastic : _e2, _f = props.dragMomentum, dragMomentum = _f === void 0 ? true : _f;
61224
- return __assign$4(__assign$4({}, props), { drag: drag2, dragDirectionLock, dragPropagation, dragConstraints, dragElastic, dragMomentum });
61669
+ return __assign$3(__assign$3({}, props), { drag: drag2, dragDirectionLock, dragPropagation, dragConstraints, dragElastic, dragMomentum });
61225
61670
  };
61226
61671
  return VisualElementDragControls2;
61227
61672
  }()
@@ -61378,7 +61823,7 @@ var visualElement = function(_a2) {
61378
61823
  var values2 = /* @__PURE__ */ new Map();
61379
61824
  var valueSubscriptions = /* @__PURE__ */ new Map();
61380
61825
  var prevMotionValues = {};
61381
- var baseTarget = __assign$4({}, latestValues);
61826
+ var baseTarget = __assign$3({}, latestValues);
61382
61827
  var removeFromVariantTree;
61383
61828
  function render2() {
61384
61829
  if (!instance || !isMounted)
@@ -61412,7 +61857,7 @@ var visualElement = function(_a2) {
61412
61857
  }
61413
61858
  var isControllingVariants = checkIfControllingVariants(props);
61414
61859
  var isVariantNode = checkIfVariantNode(props);
61415
- var element = __assign$4(__assign$4({
61860
+ var element = __assign$3(__assign$3({
61416
61861
  treeType,
61417
61862
  /**
61418
61863
  * This is a mirror of the internal instance prop, which keeps
@@ -61777,7 +62222,7 @@ function resolveCSSVariables(visualElement2, _a2, transitionEnd) {
61777
62222
  if (!(element instanceof Element))
61778
62223
  return { target, transitionEnd };
61779
62224
  if (transitionEnd) {
61780
- transitionEnd = __assign$4({}, transitionEnd);
62225
+ transitionEnd = __assign$3({}, transitionEnd);
61781
62226
  }
61782
62227
  visualElement2.forEachValue(function(value) {
61783
62228
  var current2 = value.get();
@@ -61932,8 +62377,8 @@ var checkAndConvertChangedValueTypes = function(visualElement2, target, origin,
61932
62377
  if (transitionEnd === void 0) {
61933
62378
  transitionEnd = {};
61934
62379
  }
61935
- target = __assign$4({}, target);
61936
- transitionEnd = __assign$4({}, transitionEnd);
62380
+ target = __assign$3({}, target);
62381
+ transitionEnd = __assign$3({}, transitionEnd);
61937
62382
  var targetPositionalKeys = Object.keys(target).filter(isPositionalKey);
61938
62383
  var removedTransformValues = [];
61939
62384
  var hasAttemptedToRemoveTransformValues = false;
@@ -62086,7 +62531,7 @@ var htmlConfig = {
62086
62531
  transitionEnd = parsed.transitionEnd;
62087
62532
  target = parsed.target;
62088
62533
  }
62089
- return __assign$4({ transition, transitionEnd }, target);
62534
+ return __assign$3({ transition, transitionEnd }, target);
62090
62535
  },
62091
62536
  scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
62092
62537
  build: function(element, renderState, latestValues, options, props) {
@@ -62098,7 +62543,7 @@ var htmlConfig = {
62098
62543
  render: renderHTML
62099
62544
  };
62100
62545
  var htmlVisualElement = visualElement(htmlConfig);
62101
- var svgVisualElement = visualElement(__assign$4(__assign$4({}, htmlConfig), { getBaseTarget: function(props, key2) {
62546
+ var svgVisualElement = visualElement(__assign$3(__assign$3({}, htmlConfig), { getBaseTarget: function(props, key2) {
62102
62547
  return props[key2];
62103
62548
  }, readValueFromInstance: function(domElement, key2) {
62104
62549
  var _a2;
@@ -62176,7 +62621,7 @@ var correctBoxShadow = {
62176
62621
  var MeasureLayoutWithContext = (
62177
62622
  /** @class */
62178
62623
  function(_super) {
62179
- __extends$1(MeasureLayoutWithContext2, _super);
62624
+ __extends(MeasureLayoutWithContext2, _super);
62180
62625
  function MeasureLayoutWithContext2() {
62181
62626
  return _super !== null && _super.apply(this, arguments) || this;
62182
62627
  }
@@ -62195,7 +62640,7 @@ var MeasureLayoutWithContext = (
62195
62640
  projection.addEventListener("animationComplete", function() {
62196
62641
  _this.safeToRemove();
62197
62642
  });
62198
- projection.setOptions(__assign$4(__assign$4({}, projection.options), { onExitComplete: function() {
62643
+ projection.setOptions(__assign$3(__assign$3({}, projection.options), { onExitComplete: function() {
62199
62644
  return _this.safeToRemove();
62200
62645
  } }));
62201
62646
  }
@@ -62260,10 +62705,10 @@ var MeasureLayoutWithContext = (
62260
62705
  function MeasureLayout(props) {
62261
62706
  var _a2 = __read(usePresence(), 2), isPresent = _a2[0], safeToRemove = _a2[1];
62262
62707
  var layoutGroup = useContext(LayoutGroupContext);
62263
- return React__default.createElement(MeasureLayoutWithContext, __assign$4({}, props, { layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent, safeToRemove }));
62708
+ return React__default.createElement(MeasureLayoutWithContext, __assign$3({}, props, { layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent, safeToRemove }));
62264
62709
  }
62265
62710
  var defaultScaleCorrectors = {
62266
- borderRadius: __assign$4(__assign$4({}, correctBorderRadius), { applyTo: [
62711
+ borderRadius: __assign$3(__assign$3({}, correctBorderRadius), { applyTo: [
62267
62712
  "borderTopLeftRadius",
62268
62713
  "borderTopRightRadius",
62269
62714
  "borderBottomLeftRadius",
@@ -62686,7 +63131,7 @@ function createProjectionNode(_a2) {
62686
63131
  _this.resumingFrom.resumingFrom = void 0;
62687
63132
  }
62688
63133
  _this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
62689
- var animationOptions = __assign$4(__assign$4({}, getValueTransition(layoutTransition, "layout")), { onPlay: onLayoutAnimationStart, onComplete: onLayoutAnimationComplete });
63134
+ var animationOptions = __assign$3(__assign$3({}, getValueTransition(layoutTransition, "layout")), { onPlay: onLayoutAnimationStart, onComplete: onLayoutAnimationComplete });
62690
63135
  if (visualElement2.shouldReduceMotion) {
62691
63136
  animationOptions.delay = 0;
62692
63137
  animationOptions.type = false;
@@ -62940,7 +63385,7 @@ function createProjectionNode(_a2) {
62940
63385
  };
62941
63386
  ProjectionNode.prototype.setOptions = function(options) {
62942
63387
  var _a3;
62943
- this.options = __assign$4(__assign$4(__assign$4({}, this.options), options), { crossfade: (_a3 = options.crossfade) !== null && _a3 !== void 0 ? _a3 : true });
63388
+ this.options = __assign$3(__assign$3(__assign$3({}, this.options), options), { crossfade: (_a3 = options.crossfade) !== null && _a3 !== void 0 ? _a3 : true });
62944
63389
  };
62945
63390
  ProjectionNode.prototype.clearMeasurements = function() {
62946
63391
  this.scroll = void 0;
@@ -63058,7 +63503,7 @@ function createProjectionNode(_a2) {
63058
63503
  }
63059
63504
  var snapshot = this.snapshot;
63060
63505
  var snapshotLatestValues = (snapshot === null || snapshot === void 0 ? void 0 : snapshot.latestValues) || {};
63061
- var mixedValues = __assign$4({}, this.latestValues);
63506
+ var mixedValues = __assign$3({}, this.latestValues);
63062
63507
  var targetDelta = createDelta();
63063
63508
  this.relativeTarget = this.relativeTargetOrigin = void 0;
63064
63509
  this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;
@@ -63101,7 +63546,7 @@ function createProjectionNode(_a2) {
63101
63546
  }
63102
63547
  this.pendingAnimation = sync.update(function() {
63103
63548
  globalProjectionState.hasAnimatedSinceResize = true;
63104
- _this.currentAnimation = animate(0, animationTarget, __assign$4(__assign$4({}, options), { onUpdate: function(latest) {
63549
+ _this.currentAnimation = animate(0, animationTarget, __assign$3(__assign$3({}, options), { onUpdate: function(latest) {
63105
63550
  var _a4;
63106
63551
  _this.mixTargetDelta(latest);
63107
63552
  (_a4 = options.onUpdate) === null || _a4 === void 0 ? void 0 : _a4.call(options, latest);
@@ -63469,7 +63914,7 @@ var HTMLProjectionNode = createProjectionNode({
63469
63914
  return Boolean(window.getComputedStyle(instance).position === "fixed");
63470
63915
  }
63471
63916
  });
63472
- var featureBundle = __assign$4(__assign$4(__assign$4(__assign$4({}, animations), gestureAnimations), drag), layoutFeatures);
63917
+ var featureBundle = __assign$3(__assign$3(__assign$3(__assign$3({}, animations), gestureAnimations), drag), layoutFeatures);
63473
63918
  var motion = /* @__PURE__ */ createMotionProxy(function(Component2, config) {
63474
63919
  return createDomMotionConfig(Component2, config, featureBundle, createDomVisualElement, HTMLProjectionNode);
63475
63920
  });