antd-mobile 5.30.0 → 5.31.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.
Files changed (116) hide show
  1. package/2x/README.md +1 -1
  2. package/2x/bundle/antd-mobile.cjs.development.js +283 -234
  3. package/2x/bundle/antd-mobile.cjs.js +9 -9
  4. package/2x/bundle/antd-mobile.es.development.js +283 -234
  5. package/2x/bundle/antd-mobile.es.js +4172 -4128
  6. package/2x/bundle/antd-mobile.umd.development.js +283 -234
  7. package/2x/bundle/antd-mobile.umd.js +9 -9
  8. package/2x/bundle/style.css +2 -0
  9. package/2x/cjs/components/avatar/avatar.js +1 -1
  10. package/2x/cjs/components/button/button.d.ts +2 -2
  11. package/2x/cjs/components/cascader/cascader.js +1 -6
  12. package/2x/cjs/components/cascader-view/cascader-view.d.ts +1 -0
  13. package/2x/cjs/components/cascader-view/cascader-view.js +2 -1
  14. package/2x/cjs/components/date-picker/date-picker.d.ts +1 -1
  15. package/2x/cjs/components/date-picker/index.d.ts +1 -1
  16. package/2x/cjs/components/ellipsis/ellipsis.d.ts +2 -2
  17. package/2x/cjs/components/ellipsis/ellipsis.js +17 -17
  18. package/2x/cjs/components/form/form-subscribe.js +1 -1
  19. package/2x/cjs/components/image/image.d.ts +1 -1
  20. package/2x/cjs/components/image/image.js +1 -0
  21. package/2x/cjs/components/input/input.d.ts +2 -4
  22. package/2x/cjs/components/list/list-item.d.ts +1 -1
  23. package/2x/cjs/components/notice-bar/notice-bar.css +2 -0
  24. package/2x/cjs/components/notice-bar/notice-bar.d.ts +2 -0
  25. package/2x/cjs/components/notice-bar/notice-bar.js +2 -1
  26. package/2x/cjs/components/popup/popup.d.ts +1 -0
  27. package/2x/cjs/components/popup/popup.js +2 -0
  28. package/2x/cjs/components/pull-to-refresh/pull-to-refresh.js +4 -2
  29. package/2x/cjs/components/slider/slider.js +6 -4
  30. package/2x/cjs/components/swiper/swiper.js +16 -12
  31. package/2x/cjs/components/text-area/text-area.d.ts +1 -1
  32. package/2x/cjs/utils/reduce-and-restore-motion.js +1 -1
  33. package/2x/es/components/avatar/avatar.js +1 -1
  34. package/2x/es/components/button/button.d.ts +2 -2
  35. package/2x/es/components/cascader/cascader.js +1 -6
  36. package/2x/es/components/cascader-view/cascader-view.d.ts +1 -0
  37. package/2x/es/components/cascader-view/cascader-view.js +2 -1
  38. package/2x/es/components/date-picker/date-picker.d.ts +1 -1
  39. package/2x/es/components/date-picker/index.d.ts +1 -1
  40. package/2x/es/components/ellipsis/ellipsis.d.ts +2 -2
  41. package/2x/es/components/ellipsis/ellipsis.js +17 -17
  42. package/2x/es/components/form/form-subscribe.js +1 -1
  43. package/2x/es/components/image/image.d.ts +1 -1
  44. package/2x/es/components/image/image.js +1 -0
  45. package/2x/es/components/input/input.d.ts +2 -4
  46. package/2x/es/components/list/list-item.d.ts +1 -1
  47. package/2x/es/components/notice-bar/notice-bar.css +2 -0
  48. package/2x/es/components/notice-bar/notice-bar.d.ts +2 -0
  49. package/2x/es/components/notice-bar/notice-bar.js +2 -1
  50. package/2x/es/components/popup/popup.d.ts +1 -0
  51. package/2x/es/components/popup/popup.js +2 -0
  52. package/2x/es/components/pull-to-refresh/pull-to-refresh.js +4 -2
  53. package/2x/es/components/slider/slider.js +6 -4
  54. package/2x/es/components/swiper/swiper.js +17 -13
  55. package/2x/es/components/text-area/text-area.d.ts +1 -1
  56. package/2x/es/utils/reduce-and-restore-motion.js +1 -1
  57. package/2x/package.json +2 -2
  58. package/README.md +1 -1
  59. package/bundle/antd-mobile.cjs.development.js +283 -234
  60. package/bundle/antd-mobile.cjs.js +9 -9
  61. package/bundle/antd-mobile.compatible.umd.js +1 -1
  62. package/bundle/antd-mobile.es.development.js +283 -234
  63. package/bundle/antd-mobile.es.js +4172 -4128
  64. package/bundle/antd-mobile.umd.development.js +283 -234
  65. package/bundle/antd-mobile.umd.js +9 -9
  66. package/bundle/style.css +1 -1
  67. package/cjs/components/avatar/avatar.js +1 -1
  68. package/cjs/components/button/button.d.ts +2 -2
  69. package/cjs/components/cascader/cascader.js +1 -6
  70. package/cjs/components/cascader-view/cascader-view.d.ts +1 -0
  71. package/cjs/components/cascader-view/cascader-view.js +2 -1
  72. package/cjs/components/date-picker/date-picker.d.ts +1 -1
  73. package/cjs/components/date-picker/index.d.ts +1 -1
  74. package/cjs/components/ellipsis/ellipsis.d.ts +2 -2
  75. package/cjs/components/ellipsis/ellipsis.js +17 -17
  76. package/cjs/components/form/form-subscribe.js +1 -1
  77. package/cjs/components/image/image.d.ts +1 -1
  78. package/cjs/components/image/image.js +1 -0
  79. package/cjs/components/input/input.d.ts +2 -4
  80. package/cjs/components/list/list-item.d.ts +1 -1
  81. package/cjs/components/notice-bar/notice-bar.css +2 -0
  82. package/cjs/components/notice-bar/notice-bar.d.ts +2 -0
  83. package/cjs/components/notice-bar/notice-bar.js +2 -1
  84. package/cjs/components/popup/popup.d.ts +1 -0
  85. package/cjs/components/popup/popup.js +2 -0
  86. package/cjs/components/pull-to-refresh/pull-to-refresh.js +4 -2
  87. package/cjs/components/slider/slider.js +6 -4
  88. package/cjs/components/swiper/swiper.js +16 -12
  89. package/cjs/components/text-area/text-area.d.ts +1 -1
  90. package/cjs/utils/reduce-and-restore-motion.js +1 -1
  91. package/es/components/avatar/avatar.js +1 -1
  92. package/es/components/button/button.d.ts +2 -2
  93. package/es/components/cascader/cascader.js +1 -6
  94. package/es/components/cascader-view/cascader-view.d.ts +1 -0
  95. package/es/components/cascader-view/cascader-view.js +2 -1
  96. package/es/components/date-picker/date-picker.d.ts +1 -1
  97. package/es/components/date-picker/index.d.ts +1 -1
  98. package/es/components/ellipsis/ellipsis.d.ts +2 -2
  99. package/es/components/ellipsis/ellipsis.js +17 -17
  100. package/es/components/form/form-subscribe.js +1 -1
  101. package/es/components/image/image.d.ts +1 -1
  102. package/es/components/image/image.js +1 -0
  103. package/es/components/input/input.d.ts +2 -4
  104. package/es/components/list/list-item.d.ts +1 -1
  105. package/es/components/notice-bar/notice-bar.css +2 -0
  106. package/es/components/notice-bar/notice-bar.d.ts +2 -0
  107. package/es/components/notice-bar/notice-bar.js +2 -1
  108. package/es/components/popup/popup.d.ts +1 -0
  109. package/es/components/popup/popup.js +2 -0
  110. package/es/components/pull-to-refresh/pull-to-refresh.js +4 -2
  111. package/es/components/slider/slider.js +6 -4
  112. package/es/components/swiper/swiper.js +17 -13
  113. package/es/components/text-area/text-area.d.ts +1 -1
  114. package/es/utils/reduce-and-restore-motion.js +1 -1
  115. package/package.json +2 -2
  116. package/umd/antd-mobile.js +1 -1
@@ -524,7 +524,7 @@ function attachPropertiesToComponent(component, properties) {
524
524
  return ret;
525
525
  }
526
526
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
527
- var _classnames_2_3_2_classnames = { exports: {} };
527
+ var classnames = { exports: {} };
528
528
  /*!
529
529
  Copyright (c) 2018 Jed Watson.
530
530
  Licensed under the MIT License (MIT), see
@@ -570,8 +570,8 @@ var _classnames_2_3_2_classnames = { exports: {} };
570
570
  window.classNames = classNames2;
571
571
  }
572
572
  })();
573
- })(_classnames_2_3_2_classnames);
574
- const classNames = _classnames_2_3_2_classnames.exports;
573
+ })(classnames);
574
+ const classNames = classnames.exports;
575
575
  function withNativeProps(props, element) {
576
576
  const p = Object.assign({}, element.props);
577
577
  if (props.className) {
@@ -2232,6 +2232,15 @@ function isEqual$1(value, other) {
2232
2232
  return baseIsEqual(value, other);
2233
2233
  }
2234
2234
  var isEqual_1 = isEqual$1;
2235
+ function useGetState(initialState) {
2236
+ var _a = __read(React$4.useState(initialState), 2), state = _a[0], setState = _a[1];
2237
+ var stateRef = React$4.useRef(state);
2238
+ stateRef.current = state;
2239
+ var getState = React$4.useCallback(function() {
2240
+ return stateRef.current;
2241
+ }, []);
2242
+ return [state, setState, getState];
2243
+ }
2235
2244
  (function() {
2236
2245
  if (typeof window !== "object") {
2237
2246
  return;
@@ -2855,27 +2864,6 @@ function useRafState(initialState) {
2855
2864
  });
2856
2865
  return [state, setRafState];
2857
2866
  }
2858
- var overArg = _overArg;
2859
- var getPrototype$2 = overArg(Object.getPrototypeOf, Object);
2860
- var _getPrototype = getPrototype$2;
2861
- var baseGetTag = _baseGetTag, getPrototype$1 = _getPrototype, isObjectLike$1 = isObjectLike_1;
2862
- var objectTag = "[object Object]";
2863
- var funcProto = Function.prototype, objectProto$1 = Object.prototype;
2864
- var funcToString = funcProto.toString;
2865
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
2866
- var objectCtorString = funcToString.call(Object);
2867
- function isPlainObject$1(value) {
2868
- if (!isObjectLike$1(value) || baseGetTag(value) != objectTag) {
2869
- return false;
2870
- }
2871
- var proto = getPrototype$1(value);
2872
- if (proto === null) {
2873
- return true;
2874
- }
2875
- var Ctor = hasOwnProperty$1.call(proto, "constructor") && proto.constructor;
2876
- return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
2877
- }
2878
- var isPlainObject_1 = isPlainObject$1;
2879
2867
  var useUnmountedRef = function() {
2880
2868
  var unmountedRef = React$4.useRef(false);
2881
2869
  React$4.useEffect(function() {
@@ -9330,6 +9318,7 @@ function createUseGesture(actions) {
9330
9318
  }
9331
9319
  const classPrefix$1k = `adm-popup`;
9332
9320
  const defaultProps$12 = Object.assign(Object.assign({}, defaultPopupBaseProps), {
9321
+ closeOnSwipe: false,
9333
9322
  position: "bottom"
9334
9323
  });
9335
9324
  const Popup$1 = (p) => {
@@ -9373,6 +9362,8 @@ const Popup$1 = (p) => {
9373
9362
  swipe: [, swipeY]
9374
9363
  }) => {
9375
9364
  var _a;
9365
+ if (!props.closeOnSwipe)
9366
+ return;
9376
9367
  if (swipeY === 1 && props.position === "bottom" || swipeY === -1 && props.position === "top") {
9377
9368
  (_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
9378
9369
  }
@@ -9668,13 +9659,51 @@ const AutoCenter$1 = (props) => {
9668
9659
  };
9669
9660
  const AutoCenter = AutoCenter$1;
9670
9661
  const avatar = "";
9662
+ const Fallback = React$4.memo(() => React__default.default.createElement("svg", {
9663
+ className: "adm-avatar-fallback",
9664
+ width: "88px",
9665
+ height: "88px",
9666
+ viewBox: "0 0 88 88",
9667
+ version: "1.1"
9668
+ }, React__default.default.createElement("title", null, "\u7F16\u7EC4 3"), React__default.default.createElement("defs", null, React__default.default.createElement("polygon", {
9669
+ id: "path-1",
9670
+ points: "0 0 88 0 88 88 0 88"
9671
+ })), React__default.default.createElement("g", {
9672
+ id: "\u9875\u9762-1",
9673
+ stroke: "none",
9674
+ strokeWidth: "1",
9675
+ fill: "none",
9676
+ fillRule: "evenodd"
9677
+ }, React__default.default.createElement("g", {
9678
+ id: "\u8BED\u96C0",
9679
+ transform: "translate(-495.000000, -71.000000)"
9680
+ }, React__default.default.createElement("g", {
9681
+ id: "\u7F16\u7EC4-3",
9682
+ transform: "translate(495.000000, 71.000000)"
9683
+ }, React__default.default.createElement("mask", {
9684
+ id: "mask-2",
9685
+ fill: "white"
9686
+ }, React__default.default.createElement("use", {
9687
+ xlinkHref: "#path-1"
9688
+ })), React__default.default.createElement("use", {
9689
+ id: "Mask",
9690
+ fill: "#EEEEEE",
9691
+ fillRule: "nonzero",
9692
+ xlinkHref: "#path-1"
9693
+ }), React__default.default.createElement("path", {
9694
+ d: "M44.5707528,16 L43.4292117,16 L42.9575197,16.0086403 L42.9575195,16.0086403 C36.5215787,16.2615464 31.4341803,21.5678078 31.4344832,28.0273864 L31.4344832,34.7776551 L31.4495601,35.3716788 L31.4495593,35.3716628 C31.599687,38.5368723 32.9422041,41.5269327 35.2058513,43.7376716 L38.2147759,46.6775505 L38.4086219,46.8913989 C38.7747759,47.3385365 38.9750835,47.9001589 38.9750835,48.4833848 L38.9750835,48.8938006 L38.9556989,49.1897326 L38.9556989,49.1897325 C38.8577746,49.9812662 38.3754713,50.67284 37.667703,51.036605 L18.7375269,60.7440265 L18.4101421,60.9276334 L18.4101423,60.9276333 C16.9141658,61.8418636 16.0009389,63.4714674 16,65.2283758 L16,66.070809 L16.0129231,66.3948217 C16.1766149,68.4123376 17.860922,70 19.91569,70 L68.0843101,70 L68.08431,70 C70.2460467,70 71.9988087,68.243122 72,66.0751224 L72,65.2326893 C72,63.3382982 70.9446194,61.6037466 69.2624598,60.7440295 L50.3322837,51.036608 L50.3322835,51.0366079 C49.5291218,50.6249082 49.0240448,49.7962466 49.024903,48.8916436 L49.024903,48.4812278 C49.024903,47.8029608 49.3005955,47.1527756 49.7852106,46.6775603 L52.7941352,43.7376813 L52.7941354,43.7376811 C55.204308,41.3832325 56.5636029,38.151975 56.5633606,34.7776456 L56.5633606,28.0273769 L56.5633606,28.0273774 C56.5633606,21.3848531 51.1940878,16 44.5707524,16 L44.5707528,16 Z",
9695
+ id: "\u5F62\u72B6",
9696
+ fill: "#CCCCCC",
9697
+ fillRule: "nonzero",
9698
+ mask: "url(#mask-2)"
9699
+ }))))));
9671
9700
  const image = "";
9672
- var _stagedComponents_1_1_3_stagedComponents = {};
9701
+ var stagedComponents = {};
9673
9702
  var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
9674
9703
  return mod && mod.__esModule ? mod : { "default": mod };
9675
9704
  };
9676
- Object.defineProperty(_stagedComponents_1_1_3_stagedComponents, "__esModule", { value: true });
9677
- var staged_1 = _stagedComponents_1_1_3_stagedComponents.staged = void 0;
9705
+ Object.defineProperty(stagedComponents, "__esModule", { value: true });
9706
+ var staged_1 = stagedComponents.staged = void 0;
9678
9707
  const react_1 = __importDefault(React__default.default);
9679
9708
  function processNext(next) {
9680
9709
  if (typeof next === "function") {
@@ -9693,7 +9722,7 @@ function staged(stage) {
9693
9722
  return processNext(next);
9694
9723
  };
9695
9724
  }
9696
- staged_1 = _stagedComponents_1_1_3_stagedComponents.staged = staged;
9725
+ staged_1 = stagedComponents.staged = staged;
9697
9726
  function toCSSLength(val) {
9698
9727
  return typeof val === "number" ? `${val}px` : val;
9699
9728
  }
@@ -9765,6 +9794,7 @@ const Image$2 = staged_1((p) => {
9765
9794
  }
9766
9795
  const img = React__default.default.createElement("img", {
9767
9796
  ref: imgRef,
9797
+ id: props.id,
9768
9798
  className: `${classPrefix$1g}-img`,
9769
9799
  src,
9770
9800
  alt: props.alt,
@@ -9815,44 +9845,6 @@ const Image$2 = staged_1((p) => {
9815
9845
  }), renderInner()));
9816
9846
  });
9817
9847
  const Image$1 = Image$2;
9818
- const Fallback = React$4.memo(() => React__default.default.createElement("svg", {
9819
- className: "adm-avatar-fallback",
9820
- width: "88px",
9821
- height: "88px",
9822
- viewBox: "0 0 88 88",
9823
- version: "1.1"
9824
- }, React__default.default.createElement("title", null, "\u7F16\u7EC4 3"), React__default.default.createElement("defs", null, React__default.default.createElement("polygon", {
9825
- id: "path-1",
9826
- points: "0 0 88 0 88 88 0 88"
9827
- })), React__default.default.createElement("g", {
9828
- id: "\u9875\u9762-1",
9829
- stroke: "none",
9830
- strokeWidth: "1",
9831
- fill: "none",
9832
- fillRule: "evenodd"
9833
- }, React__default.default.createElement("g", {
9834
- id: "\u8BED\u96C0",
9835
- transform: "translate(-495.000000, -71.000000)"
9836
- }, React__default.default.createElement("g", {
9837
- id: "\u7F16\u7EC4-3",
9838
- transform: "translate(495.000000, 71.000000)"
9839
- }, React__default.default.createElement("mask", {
9840
- id: "mask-2",
9841
- fill: "white"
9842
- }, React__default.default.createElement("use", {
9843
- xlinkHref: "#path-1"
9844
- })), React__default.default.createElement("use", {
9845
- id: "Mask",
9846
- fill: "#EEEEEE",
9847
- fillRule: "nonzero",
9848
- xlinkHref: "#path-1"
9849
- }), React__default.default.createElement("path", {
9850
- d: "M44.5707528,16 L43.4292117,16 L42.9575197,16.0086403 L42.9575195,16.0086403 C36.5215787,16.2615464 31.4341803,21.5678078 31.4344832,28.0273864 L31.4344832,34.7776551 L31.4495601,35.3716788 L31.4495593,35.3716628 C31.599687,38.5368723 32.9422041,41.5269327 35.2058513,43.7376716 L38.2147759,46.6775505 L38.4086219,46.8913989 C38.7747759,47.3385365 38.9750835,47.9001589 38.9750835,48.4833848 L38.9750835,48.8938006 L38.9556989,49.1897326 L38.9556989,49.1897325 C38.8577746,49.9812662 38.3754713,50.67284 37.667703,51.036605 L18.7375269,60.7440265 L18.4101421,60.9276334 L18.4101423,60.9276333 C16.9141658,61.8418636 16.0009389,63.4714674 16,65.2283758 L16,66.070809 L16.0129231,66.3948217 C16.1766149,68.4123376 17.860922,70 19.91569,70 L68.0843101,70 L68.08431,70 C70.2460467,70 71.9988087,68.243122 72,66.0751224 L72,65.2326893 C72,63.3382982 70.9446194,61.6037466 69.2624598,60.7440295 L50.3322837,51.036608 L50.3322835,51.0366079 C49.5291218,50.6249082 49.0240448,49.7962466 49.024903,48.8916436 L49.024903,48.4812278 C49.024903,47.8029608 49.3005955,47.1527756 49.7852106,46.6775603 L52.7941352,43.7376813 L52.7941354,43.7376811 C55.204308,41.3832325 56.5636029,38.151975 56.5633606,34.7776456 L56.5633606,28.0273769 L56.5633606,28.0273774 C56.5633606,21.3848531 51.1940878,16 44.5707524,16 L44.5707528,16 Z",
9851
- id: "\u5F62\u72B6",
9852
- fill: "#CCCCCC",
9853
- fillRule: "nonzero",
9854
- mask: "url(#mask-2)"
9855
- }))))));
9856
9848
  const classPrefix$1f = "adm-avatar";
9857
9849
  const defaultProps$$ = {
9858
9850
  fallback: React__default.default.createElement(Fallback, null),
@@ -10509,7 +10501,7 @@ const ScrollMask$1 = (props) => {
10509
10501
  }));
10510
10502
  };
10511
10503
  const ScrollMask = ScrollMask$1;
10512
- var _reactIs_18_2_0_reactIs = { exports: {} };
10504
+ var reactIs$1 = { exports: {} };
10513
10505
  var reactIs_development$1 = {};
10514
10506
  /**
10515
10507
  * @license React
@@ -10694,12 +10686,12 @@ var reactIs_development$1 = {};
10694
10686
  {
10695
10687
  module2.exports = reactIs_development$1;
10696
10688
  }
10697
- })(_reactIs_18_2_0_reactIs);
10689
+ })(reactIs$1);
10698
10690
  function traverseReactNode(children, fn) {
10699
10691
  let i2 = 0;
10700
10692
  function handle(target) {
10701
10693
  React__default.default.Children.forEach(target, (child) => {
10702
- if (!_reactIs_18_2_0_reactIs.exports.isFragment(child)) {
10694
+ if (!reactIs$1.exports.isFragment(child)) {
10703
10695
  fn(child, i2);
10704
10696
  i2 += 1;
10705
10697
  } else {
@@ -11270,7 +11262,7 @@ function subscribe(onStoreChange) {
11270
11262
  };
11271
11263
  }
11272
11264
  function useMotionReduced() {
11273
- return shim.exports.useSyncExternalStore(subscribe, isMotionReduced);
11265
+ return shim.exports.useSyncExternalStore(subscribe, isMotionReduced, isMotionReduced);
11274
11266
  }
11275
11267
  const classPrefix$16 = "adm-spin-loading";
11276
11268
  const colorRecord$2 = {
@@ -12180,6 +12172,7 @@ const CascaderView$1 = (p) => {
12180
12172
  }
12181
12173
  setValue2(next);
12182
12174
  };
12175
+ const whetherLoading = (options) => props.loading || options === optionSkeleton;
12183
12176
  return withNativeProps(props, React__default.default.createElement("div", {
12184
12177
  className: classPrefix$Z
12185
12178
  }, React__default.default.createElement(Tabs, {
@@ -12200,7 +12193,7 @@ const CascaderView$1 = (p) => {
12200
12193
  forceRender: true
12201
12194
  }, React__default.default.createElement("div", {
12202
12195
  className: `${classPrefix$Z}-content`
12203
- }, level.options === optionSkeleton ? React__default.default.createElement("div", {
12196
+ }, whetherLoading(level.options) ? React__default.default.createElement("div", {
12204
12197
  className: `${classPrefix$Z}-skeleton`
12205
12198
  }, React__default.default.createElement(Skeleton, {
12206
12199
  className: `${classPrefix$Z}-skeleton-line-1`,
@@ -12284,12 +12277,7 @@ const Cascader = React$4.forwardRef((p, ref) => {
12284
12277
  if (!visible) {
12285
12278
  setInnerValue(value);
12286
12279
  }
12287
- }, [visible]);
12288
- React$4.useEffect(() => {
12289
- if (!visible) {
12290
- setInnerValue(value);
12291
- }
12292
- }, [value]);
12280
+ }, [visible, value]);
12293
12281
  const cascaderElement = withNativeProps(props, React__default.default.createElement("div", {
12294
12282
  className: classPrefix$Y
12295
12283
  }, React__default.default.createElement("div", {
@@ -13624,6 +13612,8 @@ const defaultProps$G = {
13624
13612
  const Ellipsis$1 = (p) => {
13625
13613
  const props = mergeProps(defaultProps$G, p);
13626
13614
  const rootRef = React$4.useRef(null);
13615
+ const expandElRef = React$4.useRef(null);
13616
+ const collapseElRef = React$4.useRef(null);
13627
13617
  const [ellipsised, setEllipsised] = React$4.useState({});
13628
13618
  const [expanded, setExpanded] = React$4.useState(props.defaultExpanded);
13629
13619
  const [exceeded, setExceeded] = React$4.useState(false);
@@ -13632,21 +13622,19 @@ const Ellipsis$1 = (p) => {
13632
13622
  return chars.slice(start2, end).join("");
13633
13623
  }
13634
13624
  function calcEllipsised() {
13625
+ var _a, _b;
13635
13626
  const root2 = rootRef.current;
13636
13627
  if (!root2)
13637
13628
  return;
13638
- if (!root2.offsetParent)
13639
- return;
13629
+ const originDisplay = root2.style.display;
13630
+ root2.style.display = "block";
13640
13631
  const originStyle = window.getComputedStyle(root2);
13641
13632
  const container = document.createElement("div");
13642
13633
  const styleNames = Array.prototype.slice.apply(originStyle);
13643
13634
  styleNames.forEach((name) => {
13644
13635
  container.style.setProperty(name, originStyle.getPropertyValue(name));
13645
13636
  });
13646
- container.style.position = "fixed";
13647
- container.style.left = "999999px";
13648
- container.style.top = "999999px";
13649
- container.style.zIndex = "-1000";
13637
+ root2.style.display = originDisplay;
13650
13638
  container.style.height = "auto";
13651
13639
  container.style.minHeight = "auto";
13652
13640
  container.style.maxHeight = "auto";
@@ -13675,9 +13663,9 @@ const Ellipsis$1 = (p) => {
13675
13663
  }
13676
13664
  const middle2 = Math.round((left + right) / 2);
13677
13665
  if (props.direction === "end") {
13678
- container.innerText = getSubString(0, middle2) + "..." + actionText;
13666
+ container.innerHTML = getSubString(0, middle2) + "..." + actionText;
13679
13667
  } else {
13680
- container.innerText = actionText + "..." + getSubString(middle2, end);
13668
+ container.innerHTML = actionText + "..." + getSubString(middle2, end);
13681
13669
  }
13682
13670
  if (container.offsetHeight <= maxHeight) {
13683
13671
  if (props.direction === "end") {
@@ -13701,7 +13689,7 @@ const Ellipsis$1 = (p) => {
13701
13689
  }
13702
13690
  const leftPartMiddle = Math.floor((leftPart[0] + leftPart[1]) / 2);
13703
13691
  const rightPartMiddle = Math.ceil((rightPart[0] + rightPart[1]) / 2);
13704
- container.innerText = getSubString(0, leftPartMiddle) + "..." + actionText + "..." + getSubString(rightPartMiddle, end);
13692
+ container.innerHTML = getSubString(0, leftPartMiddle) + "..." + actionText + "..." + getSubString(rightPartMiddle, end);
13705
13693
  if (container.offsetHeight <= maxHeight) {
13706
13694
  return checkMiddle([leftPartMiddle, leftPart[1]], [rightPart[0], rightPartMiddle]);
13707
13695
  } else {
@@ -13710,7 +13698,9 @@ const Ellipsis$1 = (p) => {
13710
13698
  };
13711
13699
  setExceeded(true);
13712
13700
  const end = props.content.length;
13713
- const actionText = expanded ? props.collapseText : props.expandText;
13701
+ const collapseEl = typeof props.collapseText === "string" ? props.collapseText : (_a = collapseElRef.current) === null || _a === void 0 ? void 0 : _a.innerHTML;
13702
+ const expandEl = typeof props.expandText === "string" ? props.expandText : (_b = expandElRef.current) === null || _b === void 0 ? void 0 : _b.innerHTML;
13703
+ const actionText = expanded ? collapseEl : expandEl;
13714
13704
  const middle = Math.floor((0 + end) / 2);
13715
13705
  const ellipsised2 = props.direction === "middle" ? checkMiddle([0, middle], [middle, end]) : check(0, end);
13716
13706
  setEllipsised(ellipsised2);
@@ -13722,24 +13712,23 @@ const Ellipsis$1 = (p) => {
13722
13712
  calcEllipsised();
13723
13713
  }, [props.content, props.direction, props.rows, props.expandText, props.collapseText]);
13724
13714
  const expandActionElement = exceeded && props.expandText ? withStopPropagation(props.stopPropagationForActionButtons, React__default.default.createElement("a", {
13715
+ ref: expandElRef,
13725
13716
  onClick: () => {
13726
13717
  setExpanded(true);
13727
13718
  }
13728
13719
  }, props.expandText)) : null;
13729
13720
  const collapseActionElement = exceeded && props.collapseText ? withStopPropagation(props.stopPropagationForActionButtons, React__default.default.createElement("a", {
13721
+ ref: collapseElRef,
13730
13722
  onClick: () => {
13731
13723
  setExpanded(false);
13732
13724
  }
13733
13725
  }, props.collapseText)) : null;
13734
13726
  const renderContent = () => {
13735
- if (!exceeded) {
13727
+ if (!exceeded)
13736
13728
  return props.content;
13737
- }
13738
- if (expanded) {
13729
+ if (expanded)
13739
13730
  return React__default.default.createElement(React__default.default.Fragment, null, props.content, collapseActionElement);
13740
- } else {
13741
- return React__default.default.createElement(React__default.default.Fragment, null, ellipsised.leading, expandActionElement, ellipsised.tailing);
13742
- }
13731
+ return React__default.default.createElement(React__default.default.Fragment, null, ellipsised.leading, expandActionElement, ellipsised.tailing);
13743
13732
  };
13744
13733
  return withNativeProps(props, React__default.default.createElement("div", {
13745
13734
  ref: rootRef,
@@ -14817,7 +14806,7 @@ function _createSuper(Derived) {
14817
14806
  return _possibleConstructorReturn(this, result2);
14818
14807
  };
14819
14808
  }
14820
- var _reactIs_16_13_1_reactIs = { exports: {} };
14809
+ var reactIs = { exports: {} };
14821
14810
  var reactIs_development = {};
14822
14811
  /** @license React v16.13.1
14823
14812
  * react-is.development.js
@@ -14977,7 +14966,7 @@ var reactIs_development = {};
14977
14966
  {
14978
14967
  module2.exports = reactIs_development;
14979
14968
  }
14980
- })(_reactIs_16_13_1_reactIs);
14969
+ })(reactIs);
14981
14970
  function toArray$2(children) {
14982
14971
  var option = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
14983
14972
  var ret = [];
@@ -14987,7 +14976,7 @@ function toArray$2(children) {
14987
14976
  }
14988
14977
  if (Array.isArray(child)) {
14989
14978
  ret = ret.concat(toArray$2(child));
14990
- } else if (_reactIs_16_13_1_reactIs.exports.isFragment(child) && child.props) {
14979
+ } else if (reactIs.exports.isFragment(child) && child.props) {
14991
14980
  ret = ret.concat(toArray$2(child.props.children, option));
14992
14981
  } else {
14993
14982
  ret.push(child);
@@ -18603,16 +18592,37 @@ var baseCreate$1 = function() {
18603
18592
  };
18604
18593
  }();
18605
18594
  var _baseCreate = baseCreate$1;
18606
- var baseCreate = _baseCreate, getPrototype = _getPrototype, isPrototype$1 = _isPrototype;
18595
+ var overArg = _overArg;
18596
+ var getPrototype$2 = overArg(Object.getPrototypeOf, Object);
18597
+ var _getPrototype = getPrototype$2;
18598
+ var baseCreate = _baseCreate, getPrototype$1 = _getPrototype, isPrototype$1 = _isPrototype;
18607
18599
  function initCloneObject$1(object4) {
18608
- return typeof object4.constructor == "function" && !isPrototype$1(object4) ? baseCreate(getPrototype(object4)) : {};
18600
+ return typeof object4.constructor == "function" && !isPrototype$1(object4) ? baseCreate(getPrototype$1(object4)) : {};
18609
18601
  }
18610
18602
  var _initCloneObject = initCloneObject$1;
18611
- var isArrayLike$1 = isArrayLike_1, isObjectLike = isObjectLike_1;
18603
+ var isArrayLike$1 = isArrayLike_1, isObjectLike$1 = isObjectLike_1;
18612
18604
  function isArrayLikeObject$1(value) {
18613
- return isObjectLike(value) && isArrayLike$1(value);
18605
+ return isObjectLike$1(value) && isArrayLike$1(value);
18614
18606
  }
18615
18607
  var isArrayLikeObject_1 = isArrayLikeObject$1;
18608
+ var baseGetTag = _baseGetTag, getPrototype = _getPrototype, isObjectLike = isObjectLike_1;
18609
+ var objectTag = "[object Object]";
18610
+ var funcProto = Function.prototype, objectProto$1 = Object.prototype;
18611
+ var funcToString = funcProto.toString;
18612
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
18613
+ var objectCtorString = funcToString.call(Object);
18614
+ function isPlainObject$1(value) {
18615
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
18616
+ return false;
18617
+ }
18618
+ var proto = getPrototype(value);
18619
+ if (proto === null) {
18620
+ return true;
18621
+ }
18622
+ var Ctor = hasOwnProperty$1.call(proto, "constructor") && proto.constructor;
18623
+ return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
18624
+ }
18625
+ var isPlainObject_1 = isPlainObject$1;
18616
18626
  function safeGet$2(object4, key) {
18617
18627
  if (key === "constructor" && typeof object4[key] === "function") {
18618
18628
  return;
@@ -19015,9 +19025,9 @@ function isSimpleFunctionComponent(type4) {
19015
19025
  return typeof type4 === "function" && !shouldConstruct(type4) && type4.defaultProps === void 0;
19016
19026
  }
19017
19027
  function isSafeSetRefComponent(component) {
19018
- if (_reactIs_18_2_0_reactIs.exports.isFragment(component))
19028
+ if (reactIs$1.exports.isFragment(component))
19019
19029
  return false;
19020
- if (_reactIs_18_2_0_reactIs.exports.isMemo(component))
19030
+ if (reactIs$1.exports.isMemo(component))
19021
19031
  return isSafeSetRefComponent(component.type);
19022
19032
  return !isSimpleFunctionComponent(component.type);
19023
19033
  }
@@ -20077,13 +20087,6 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
20077
20087
  }
20078
20088
  return rectToClientRect(rect);
20079
20089
  }
20080
- function hasFixedPositionAncestor(element, stopNode) {
20081
- const parentNode = getParentNode(element);
20082
- if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
20083
- return false;
20084
- }
20085
- return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
20086
- }
20087
20090
  function getClippingElementAncestors(element, cache) {
20088
20091
  const cachedResult = cache.get(element);
20089
20092
  if (cachedResult) {
@@ -20095,11 +20098,11 @@ function getClippingElementAncestors(element, cache) {
20095
20098
  let currentNode = elementIsFixed ? getParentNode(element) : element;
20096
20099
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
20097
20100
  const computedStyle = getComputedStyle$1(currentNode);
20098
- const currentNodeIsContaining = isContainingBlock(currentNode);
20099
- if (!currentNodeIsContaining && computedStyle.position === "fixed") {
20101
+ const containingBlock = isContainingBlock(currentNode);
20102
+ if (computedStyle.position === "fixed") {
20100
20103
  currentContainingBlockComputedStyle = null;
20101
20104
  }
20102
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
20105
+ const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position);
20103
20106
  if (shouldDropCurrentNode) {
20104
20107
  result2 = result2.filter((ancestor) => ancestor !== currentNode);
20105
20108
  } else {
@@ -20236,19 +20239,17 @@ function autoUpdate(reference, floating, update2, options) {
20236
20239
  options = {};
20237
20240
  }
20238
20241
  const {
20239
- ancestorScroll = true,
20242
+ ancestorScroll: _ancestorScroll = true,
20240
20243
  ancestorResize = true,
20241
20244
  elementResize = true,
20242
20245
  animationFrame = false
20243
20246
  } = options;
20247
+ const ancestorScroll = _ancestorScroll && !animationFrame;
20244
20248
  const ancestors = ancestorScroll || ancestorResize ? [...isElement(reference) ? getOverflowAncestors(reference) : reference.contextElement ? getOverflowAncestors(reference.contextElement) : [], ...getOverflowAncestors(floating)] : [];
20245
20249
  ancestors.forEach((ancestor) => {
20246
- const isVisualViewport = !isElement(ancestor) && ancestor.toString().includes("V");
20247
- if (ancestorScroll && (animationFrame ? isVisualViewport : true)) {
20248
- ancestor.addEventListener("scroll", update2, {
20249
- passive: true
20250
- });
20251
- }
20250
+ ancestorScroll && ancestor.addEventListener("scroll", update2, {
20251
+ passive: true
20252
+ });
20252
20253
  ancestorResize && ancestor.addEventListener("resize", update2);
20253
20254
  });
20254
20255
  let observer = null;
@@ -20833,7 +20834,7 @@ const FormSubscribe = (props) => {
20833
20834
  const update2 = useUpdate$1();
20834
20835
  const form = React$4.useContext(Context$1);
20835
20836
  const value = form.getFieldsValue(props.to);
20836
- const childNode = React__default.default.useMemo(() => props.children(value, form), [JSON.stringify(value)]);
20837
+ const childNode = React__default.default.useMemo(() => props.children(value, form), [JSON.stringify(value), props.children]);
20837
20838
  return React__default.default.createElement(React__default.default.Fragment, null, childNode, props.to.map((namePath) => React__default.default.createElement(Watcher, {
20838
20839
  key: namePath.toString(),
20839
20840
  form,
@@ -22366,7 +22367,8 @@ const NoticeBar$1 = React$4.memo((p) => {
22366
22367
  return withNativeProps(props, React__default.default.createElement("div", {
22367
22368
  className: classNames(classPrefix$x, `${classPrefix$x}-${props.color}`, {
22368
22369
  [`${classPrefix$x}-wrap`]: props.wrap
22369
- })
22370
+ }),
22371
+ onClick: props.onClick
22370
22372
  }, props.icon && React__default.default.createElement("span", {
22371
22373
  className: `${classPrefix$x}-left`
22372
22374
  }, props.icon), React__default.default.createElement("span", {
@@ -22816,6 +22818,7 @@ const PullToRefresh$1 = (p) => {
22816
22818
  config: {
22817
22819
  tension: 300,
22818
22820
  friction: 30,
22821
+ round: true,
22819
22822
  clamp: true
22820
22823
  }
22821
22824
  }));
@@ -22876,7 +22879,8 @@ const PullToRefresh$1 = (p) => {
22876
22879
  return;
22877
22880
  }
22878
22881
  const [, y] = state.movement;
22879
- if (state.first && y > 0) {
22882
+ const parsedY = Math.ceil(y);
22883
+ if (state.first && parsedY > 0) {
22880
22884
  let getScrollTop = function(element) {
22881
22885
  return "scrollTop" in element ? element.scrollTop : element.scrollY;
22882
22886
  };
@@ -22904,7 +22908,7 @@ const PullToRefresh$1 = (p) => {
22904
22908
  event.preventDefault();
22905
22909
  }
22906
22910
  event.stopPropagation();
22907
- const height = Math.max(rubberbandIfOutOfBounds(y, 0, 0, headHeight * 5, 0.5), 0);
22911
+ const height = Math.max(rubberbandIfOutOfBounds(parsedY, 0, 0, headHeight * 5, 0.5), 0);
22908
22912
  api.start({
22909
22913
  height
22910
22914
  });
@@ -23619,6 +23623,9 @@ const Marks$1 = Marks;
23619
23623
  function supportBigInt() {
23620
23624
  return typeof BigInt === "function";
23621
23625
  }
23626
+ function isEmpty(value) {
23627
+ return !value && value !== 0 && !Number.isNaN(value) || !String(value).trim();
23628
+ }
23622
23629
  function trimNumber(numStr) {
23623
23630
  var str = numStr.trim();
23624
23631
  var negative = str.startsWith("-");
@@ -23684,92 +23691,6 @@ function validateNumber(num) {
23684
23691
  }
23685
23692
  return /^\s*-?\d+(\.\d+)?\s*$/.test(num) || /^\s*-?\d+\.\s*$/.test(num) || /^\s*-?\.\d+\s*$/.test(num);
23686
23693
  }
23687
- function isEmpty(value) {
23688
- return !value && value !== 0 && !Number.isNaN(value) || !String(value).trim();
23689
- }
23690
- var NumberDecimal = /* @__PURE__ */ function() {
23691
- function NumberDecimal2(value) {
23692
- _classCallCheck(this, NumberDecimal2);
23693
- _defineProperty(this, "origin", "");
23694
- _defineProperty(this, "number", void 0);
23695
- _defineProperty(this, "empty", void 0);
23696
- if (isEmpty(value)) {
23697
- this.empty = true;
23698
- return;
23699
- }
23700
- this.origin = String(value);
23701
- this.number = Number(value);
23702
- }
23703
- _createClass(NumberDecimal2, [{
23704
- key: "negate",
23705
- value: function negate() {
23706
- return new NumberDecimal2(-this.toNumber());
23707
- }
23708
- }, {
23709
- key: "add",
23710
- value: function add(value) {
23711
- if (this.isInvalidate()) {
23712
- return new NumberDecimal2(value);
23713
- }
23714
- var target = Number(value);
23715
- if (Number.isNaN(target)) {
23716
- return this;
23717
- }
23718
- var number4 = this.number + target;
23719
- if (number4 > Number.MAX_SAFE_INTEGER) {
23720
- return new NumberDecimal2(Number.MAX_SAFE_INTEGER);
23721
- }
23722
- if (number4 < Number.MIN_SAFE_INTEGER) {
23723
- return new NumberDecimal2(Number.MIN_SAFE_INTEGER);
23724
- }
23725
- var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));
23726
- return new NumberDecimal2(number4.toFixed(maxPrecision));
23727
- }
23728
- }, {
23729
- key: "isEmpty",
23730
- value: function isEmpty2() {
23731
- return this.empty;
23732
- }
23733
- }, {
23734
- key: "isNaN",
23735
- value: function isNaN2() {
23736
- return Number.isNaN(this.number);
23737
- }
23738
- }, {
23739
- key: "isInvalidate",
23740
- value: function isInvalidate() {
23741
- return this.isEmpty() || this.isNaN();
23742
- }
23743
- }, {
23744
- key: "equals",
23745
- value: function equals(target) {
23746
- return this.toNumber() === (target === null || target === void 0 ? void 0 : target.toNumber());
23747
- }
23748
- }, {
23749
- key: "lessEquals",
23750
- value: function lessEquals(target) {
23751
- return this.add(target.negate().toString()).toNumber() <= 0;
23752
- }
23753
- }, {
23754
- key: "toNumber",
23755
- value: function toNumber2() {
23756
- return this.number;
23757
- }
23758
- }, {
23759
- key: "toString",
23760
- value: function toString() {
23761
- var safe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
23762
- if (!safe) {
23763
- return this.origin;
23764
- }
23765
- if (this.isInvalidate()) {
23766
- return "";
23767
- }
23768
- return num2str(this.number);
23769
- }
23770
- }]);
23771
- return NumberDecimal2;
23772
- }();
23773
23694
  var BigIntDecimal = /* @__PURE__ */ function() {
23774
23695
  function BigIntDecimal2(value) {
23775
23696
  _classCallCheck(this, BigIntDecimal2);
@@ -23834,6 +23755,18 @@ var BigIntDecimal = /* @__PURE__ */ function() {
23834
23755
  clone.negative = !clone.negative;
23835
23756
  return clone;
23836
23757
  }
23758
+ }, {
23759
+ key: "cal",
23760
+ value: function cal(offset2, calculator, calDecimalLen) {
23761
+ var maxDecimalLength = Math.max(this.getDecimalStr().length, offset2.getDecimalStr().length);
23762
+ var myAlignedDecimal = this.alignDecimal(maxDecimalLength);
23763
+ var offsetAlignedDecimal = offset2.alignDecimal(maxDecimalLength);
23764
+ var valueStr = calculator(myAlignedDecimal, offsetAlignedDecimal).toString();
23765
+ var nextDecimalLength = calDecimalLen(maxDecimalLength);
23766
+ var _trimNumber = trimNumber(valueStr), negativeStr = _trimNumber.negativeStr, trimStr = _trimNumber.trimStr;
23767
+ var hydrateValueStr = "".concat(negativeStr).concat(trimStr.padStart(nextDecimalLength + 1, "0"));
23768
+ return new BigIntDecimal2("".concat(hydrateValueStr.slice(0, -nextDecimalLength), ".").concat(hydrateValueStr.slice(-nextDecimalLength)));
23769
+ }
23837
23770
  }, {
23838
23771
  key: "add",
23839
23772
  value: function add(value) {
@@ -23844,13 +23777,24 @@ var BigIntDecimal = /* @__PURE__ */ function() {
23844
23777
  if (offset2.isInvalidate()) {
23845
23778
  return this;
23846
23779
  }
23847
- var maxDecimalLength = Math.max(this.getDecimalStr().length, offset2.getDecimalStr().length);
23848
- var myAlignedDecimal = this.alignDecimal(maxDecimalLength);
23849
- var offsetAlignedDecimal = offset2.alignDecimal(maxDecimalLength);
23850
- var valueStr = (myAlignedDecimal + offsetAlignedDecimal).toString();
23851
- var _trimNumber = trimNumber(valueStr), negativeStr = _trimNumber.negativeStr, trimStr = _trimNumber.trimStr;
23852
- var hydrateValueStr = "".concat(negativeStr).concat(trimStr.padStart(maxDecimalLength + 1, "0"));
23853
- return new BigIntDecimal2("".concat(hydrateValueStr.slice(0, -maxDecimalLength), ".").concat(hydrateValueStr.slice(-maxDecimalLength)));
23780
+ return this.cal(offset2, function(num1, num2) {
23781
+ return num1 + num2;
23782
+ }, function(len) {
23783
+ return len;
23784
+ });
23785
+ }
23786
+ }, {
23787
+ key: "multi",
23788
+ value: function multi(value) {
23789
+ var target = new BigIntDecimal2(value);
23790
+ if (this.isInvalidate() || target.isInvalidate()) {
23791
+ return new BigIntDecimal2(NaN);
23792
+ }
23793
+ return this.cal(target, function(num1, num2) {
23794
+ return num1 * num2;
23795
+ }, function(len) {
23796
+ return len * 2;
23797
+ });
23854
23798
  }
23855
23799
  }, {
23856
23800
  key: "isEmpty",
@@ -23900,6 +23844,106 @@ var BigIntDecimal = /* @__PURE__ */ function() {
23900
23844
  }]);
23901
23845
  return BigIntDecimal2;
23902
23846
  }();
23847
+ var NumberDecimal = /* @__PURE__ */ function() {
23848
+ function NumberDecimal2(value) {
23849
+ _classCallCheck(this, NumberDecimal2);
23850
+ _defineProperty(this, "origin", "");
23851
+ _defineProperty(this, "number", void 0);
23852
+ _defineProperty(this, "empty", void 0);
23853
+ if (isEmpty(value)) {
23854
+ this.empty = true;
23855
+ return;
23856
+ }
23857
+ this.origin = String(value);
23858
+ this.number = Number(value);
23859
+ }
23860
+ _createClass(NumberDecimal2, [{
23861
+ key: "negate",
23862
+ value: function negate() {
23863
+ return new NumberDecimal2(-this.toNumber());
23864
+ }
23865
+ }, {
23866
+ key: "add",
23867
+ value: function add(value) {
23868
+ if (this.isInvalidate()) {
23869
+ return new NumberDecimal2(value);
23870
+ }
23871
+ var target = Number(value);
23872
+ if (Number.isNaN(target)) {
23873
+ return this;
23874
+ }
23875
+ var number4 = this.number + target;
23876
+ if (number4 > Number.MAX_SAFE_INTEGER) {
23877
+ return new NumberDecimal2(Number.MAX_SAFE_INTEGER);
23878
+ }
23879
+ if (number4 < Number.MIN_SAFE_INTEGER) {
23880
+ return new NumberDecimal2(Number.MIN_SAFE_INTEGER);
23881
+ }
23882
+ var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));
23883
+ return new NumberDecimal2(number4.toFixed(maxPrecision));
23884
+ }
23885
+ }, {
23886
+ key: "multi",
23887
+ value: function multi(value) {
23888
+ var target = Number(value);
23889
+ if (this.isInvalidate() || Number.isNaN(target)) {
23890
+ return new NumberDecimal2(NaN);
23891
+ }
23892
+ var number4 = this.number * target;
23893
+ if (number4 > Number.MAX_SAFE_INTEGER) {
23894
+ return new NumberDecimal2(Number.MAX_SAFE_INTEGER);
23895
+ }
23896
+ if (number4 < Number.MIN_SAFE_INTEGER) {
23897
+ return new NumberDecimal2(Number.MIN_SAFE_INTEGER);
23898
+ }
23899
+ var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));
23900
+ return new NumberDecimal2(number4.toFixed(maxPrecision));
23901
+ }
23902
+ }, {
23903
+ key: "isEmpty",
23904
+ value: function isEmpty2() {
23905
+ return this.empty;
23906
+ }
23907
+ }, {
23908
+ key: "isNaN",
23909
+ value: function isNaN2() {
23910
+ return Number.isNaN(this.number);
23911
+ }
23912
+ }, {
23913
+ key: "isInvalidate",
23914
+ value: function isInvalidate() {
23915
+ return this.isEmpty() || this.isNaN();
23916
+ }
23917
+ }, {
23918
+ key: "equals",
23919
+ value: function equals(target) {
23920
+ return this.toNumber() === (target === null || target === void 0 ? void 0 : target.toNumber());
23921
+ }
23922
+ }, {
23923
+ key: "lessEquals",
23924
+ value: function lessEquals(target) {
23925
+ return this.add(target.negate().toString()).toNumber() <= 0;
23926
+ }
23927
+ }, {
23928
+ key: "toNumber",
23929
+ value: function toNumber2() {
23930
+ return this.number;
23931
+ }
23932
+ }, {
23933
+ key: "toString",
23934
+ value: function toString() {
23935
+ var safe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
23936
+ if (!safe) {
23937
+ return this.origin;
23938
+ }
23939
+ if (this.isInvalidate()) {
23940
+ return "";
23941
+ }
23942
+ return num2str(this.number);
23943
+ }
23944
+ }]);
23945
+ return NumberDecimal2;
23946
+ }();
23903
23947
  function getMiniDecimal(value) {
23904
23948
  if (supportBigInt()) {
23905
23949
  return new BigIntDecimal(value);
@@ -23911,7 +23955,7 @@ function toFixed(numStr, separatorStr, precision) {
23911
23955
  if (numStr === "") {
23912
23956
  return "";
23913
23957
  }
23914
- var _trimNumber2 = trimNumber(numStr), negativeStr = _trimNumber2.negativeStr, integerStr = _trimNumber2.integerStr, decimalStr = _trimNumber2.decimalStr;
23958
+ var _trimNumber = trimNumber(numStr), negativeStr = _trimNumber.negativeStr, integerStr = _trimNumber.integerStr, decimalStr = _trimNumber.decimalStr;
23915
23959
  var precisionDecimalStr = "".concat(separatorStr).concat(decimalStr);
23916
23960
  var numberWithoutDecimal = "".concat(negativeStr).concat(integerStr);
23917
23961
  if (precision >= 0) {
@@ -24091,13 +24135,14 @@ const Slider$1 = (p) => {
24091
24135
  const pointList = React$4.useMemo(() => {
24092
24136
  if (marks) {
24093
24137
  return Object.keys(marks).map(parseFloat).sort((a, b) => a - b);
24094
- } else {
24138
+ } else if (ticks) {
24095
24139
  const points = [];
24096
24140
  for (let i2 = getMiniDecimal(min2); i2.lessEquals(getMiniDecimal(max2)); i2 = i2.add(step)) {
24097
24141
  points.push(i2.toNumber());
24098
24142
  }
24099
24143
  return points;
24100
24144
  }
24145
+ return [];
24101
24146
  }, [marks, ticks, step, min2, max2]);
24102
24147
  function getValueByPosition(position) {
24103
24148
  const newPosition = position < min2 ? min2 : position > max2 ? max2 : position;
@@ -24105,9 +24150,9 @@ const Slider$1 = (p) => {
24105
24150
  if (pointList.length) {
24106
24151
  value = nearest(pointList, newPosition);
24107
24152
  } else {
24108
- const lengthPerStep = 100 / ((max2 - min2) / step);
24109
- const steps2 = Math.round(newPosition / lengthPerStep);
24110
- value = steps2 * lengthPerStep * (max2 - min2) * 0.01 + min2;
24153
+ const cell = Math.round((newPosition - min2) / step);
24154
+ const nextVal = getMiniDecimal(cell).multi(step);
24155
+ value = getMiniDecimal(min2).add(nextVal.toString()).toNumber();
24111
24156
  }
24112
24157
  return value;
24113
24158
  }
@@ -24939,6 +24984,7 @@ let currentUid;
24939
24984
  const Swiper = React$4.forwardRef(staged_1((p, ref) => {
24940
24985
  const props = mergeProps(defaultProps$a, p);
24941
24986
  const [uid] = React$4.useState({});
24987
+ const timeoutRef = React$4.useRef(null);
24942
24988
  const isVertical = props.direction === "vertical";
24943
24989
  const slideRatio = props.slideSize / 100;
24944
24990
  const offsetRatio = props.trackOffset / 100;
@@ -24979,7 +25025,7 @@ const Swiper = React$4.forwardRef(staged_1((p, ref) => {
24979
25025
  const trackPixels = isVertical ? track.offsetHeight : track.offsetWidth;
24980
25026
  return trackPixels * props.slideSize / 100;
24981
25027
  }
24982
- const [current, setCurrent] = React$4.useState(props.defaultIndex);
25028
+ const [current, setCurrent, getCurrent] = useGetState(props.defaultIndex);
24983
25029
  const [dragging, setDragging, draggingRef] = useRefState(false);
24984
25030
  function boundIndex(current2) {
24985
25031
  let min2 = 0;
@@ -25084,10 +25130,10 @@ const Swiper = React$4.forwardRef(staged_1((p, ref) => {
25084
25130
  var _a;
25085
25131
  const roundedIndex = Math.round(index2);
25086
25132
  const targetIndex = loop2 ? modulus(roundedIndex, count) : bound(roundedIndex, 0, count - 1);
25087
- setCurrent(targetIndex);
25088
- if (targetIndex !== current) {
25133
+ if (targetIndex !== getCurrent()) {
25089
25134
  (_a = props.onIndexChange) === null || _a === void 0 ? void 0 : _a.call(props, targetIndex);
25090
25135
  }
25136
+ setCurrent(targetIndex);
25091
25137
  api.start({
25092
25138
  position: (loop2 ? roundedIndex : boundIndex(roundedIndex)) * 100,
25093
25139
  immediate
@@ -25114,18 +25160,19 @@ const Swiper = React$4.forwardRef(staged_1((p, ref) => {
25114
25160
  autoplay,
25115
25161
  autoplayInterval
25116
25162
  } = props;
25163
+ const runTimeSwiper = () => {
25164
+ timeoutRef.current = window.setTimeout(() => {
25165
+ swipeNext();
25166
+ runTimeSwiper();
25167
+ }, autoplayInterval);
25168
+ };
25117
25169
  React$4.useEffect(() => {
25118
25170
  if (!autoplay || dragging)
25119
25171
  return;
25120
- let interval;
25121
- function tick() {
25122
- interval = window.setTimeout(tick, autoplayInterval);
25123
- swipeNext();
25124
- }
25125
- interval = window.setTimeout(tick, autoplayInterval);
25172
+ runTimeSwiper();
25126
25173
  return () => {
25127
- if (interval)
25128
- window.clearTimeout(interval);
25174
+ if (timeoutRef.current)
25175
+ window.clearTimeout(timeoutRef.current);
25129
25176
  };
25130
25177
  }, [autoplay, autoplayInterval, dragging, count]);
25131
25178
  function renderTrackInner() {
@@ -25155,9 +25202,11 @@ const Swiper = React$4.forwardRef(staged_1((p, ref) => {
25155
25202
  style: {
25156
25203
  [isVertical ? "y" : "x"]: position.to((position2) => `${-position2}%`)
25157
25204
  }
25158
- }, React__default.default.Children.map(validChildren, (child) => {
25205
+ }, React__default.default.Children.map(validChildren, (child, index2) => {
25159
25206
  return React__default.default.createElement("div", {
25160
- className: `${classPrefix$a}-slide`
25207
+ className: classNames(`${classPrefix$a}-slide`, {
25208
+ [`${classPrefix$a}-slide-active`]: current === index2
25209
+ })
25161
25210
  }, child);
25162
25211
  }));
25163
25212
  }