antd-mobile 5.27.0 → 5.28.0

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 (64) hide show
  1. package/2x/README.md +1 -1
  2. package/2x/bundle/antd-mobile.cjs.development.js +473 -777
  3. package/2x/bundle/antd-mobile.cjs.js +9 -9
  4. package/2x/bundle/antd-mobile.es.development.js +473 -777
  5. package/2x/bundle/antd-mobile.es.js +7227 -7550
  6. package/2x/bundle/antd-mobile.umd.development.js +469 -773
  7. package/2x/bundle/antd-mobile.umd.js +9 -9
  8. package/2x/bundle/css-vars-patch.css +4 -0
  9. package/2x/cjs/components/calendar/calendar.d.ts +1 -0
  10. package/2x/cjs/components/calendar/calendar.js +1 -1
  11. package/2x/cjs/components/cascader/cascader.patch.css +3 -0
  12. package/2x/cjs/components/footer/footer.js +3 -3
  13. package/2x/cjs/components/input/input.js +1 -0
  14. package/2x/cjs/components/swiper/index.d.ts +1 -0
  15. package/2x/cjs/components/swiper/swiper.d.ts +9 -0
  16. package/2x/cjs/components/swiper/swiper.js +18 -2
  17. package/2x/cjs/global/css-vars-patch.css +4 -0
  18. package/2x/cjs/utils/with-func-props.d.ts +5 -0
  19. package/2x/cjs/utils/with-func-props.js +25 -0
  20. package/2x/es/components/calendar/calendar.d.ts +1 -0
  21. package/2x/es/components/calendar/calendar.js +1 -1
  22. package/2x/es/components/cascader/cascader.patch.css +3 -0
  23. package/2x/es/components/footer/footer.js +1 -1
  24. package/2x/es/components/input/input.js +1 -0
  25. package/2x/es/components/swiper/index.d.ts +1 -0
  26. package/2x/es/components/swiper/swiper.d.ts +9 -0
  27. package/2x/es/components/swiper/swiper.js +18 -2
  28. package/2x/es/global/css-vars-patch.css +4 -0
  29. package/2x/es/utils/with-func-props.d.ts +5 -0
  30. package/2x/es/utils/with-func-props.js +19 -0
  31. package/2x/package.json +1 -1
  32. package/README.md +1 -1
  33. package/bundle/antd-mobile.cjs.development.js +473 -777
  34. package/bundle/antd-mobile.cjs.js +9 -9
  35. package/bundle/antd-mobile.compatible.umd.js +1 -1
  36. package/bundle/antd-mobile.es.development.js +473 -777
  37. package/bundle/antd-mobile.es.js +7227 -7550
  38. package/bundle/antd-mobile.umd.development.js +469 -773
  39. package/bundle/antd-mobile.umd.js +9 -9
  40. package/bundle/css-vars-patch.css +3 -0
  41. package/cjs/components/calendar/calendar.d.ts +1 -0
  42. package/cjs/components/calendar/calendar.js +1 -1
  43. package/cjs/components/cascader/cascader.patch.css +3 -0
  44. package/cjs/components/footer/footer.js +3 -3
  45. package/cjs/components/input/input.js +1 -0
  46. package/cjs/components/swiper/index.d.ts +1 -0
  47. package/cjs/components/swiper/swiper.d.ts +9 -0
  48. package/cjs/components/swiper/swiper.js +18 -2
  49. package/cjs/global/css-vars-patch.css +3 -0
  50. package/cjs/utils/with-func-props.d.ts +5 -0
  51. package/cjs/utils/with-func-props.js +25 -0
  52. package/es/components/calendar/calendar.d.ts +1 -0
  53. package/es/components/calendar/calendar.js +1 -1
  54. package/es/components/cascader/cascader.patch.css +3 -0
  55. package/es/components/footer/footer.js +1 -1
  56. package/es/components/input/input.js +1 -0
  57. package/es/components/swiper/index.d.ts +1 -0
  58. package/es/components/swiper/swiper.d.ts +9 -0
  59. package/es/components/swiper/swiper.js +18 -2
  60. package/es/global/css-vars-patch.css +3 -0
  61. package/es/utils/with-func-props.d.ts +5 -0
  62. package/es/utils/with-func-props.js +19 -0
  63. package/package.json +1 -1
  64. package/umd/antd-mobile.js +1 -1
@@ -42,7 +42,7 @@
42
42
  }
43
43
  return t;
44
44
  }
45
- function __awaiter$1(thisArg, _arguments, P, generator) {
45
+ function __awaiter(thisArg, _arguments, P, generator) {
46
46
  function adopt(value) {
47
47
  return value instanceof P ? value : new P(function(resolve) {
48
48
  resolve(value);
@@ -904,48 +904,36 @@
904
904
  return ret;
905
905
  }
906
906
  const popup = "";
907
- var createUpdateEffect = function createUpdateEffect2(hook) {
908
- return function(effect, deps) {
909
- var isMounted = React$4.useRef(false);
910
- hook(function() {
911
- return function() {
912
- isMounted.current = false;
913
- };
914
- }, []);
915
- hook(function() {
916
- if (!isMounted.current) {
917
- isMounted.current = true;
918
- } else {
919
- return effect();
920
- }
921
- }, deps);
922
- };
923
- };
924
- var isFunction$1 = function isFunction2(value) {
925
- return typeof value === "function";
926
- };
927
- var isNumber = function isNumber2(value) {
928
- return typeof value === "number";
907
+ const createUpdateEffect = (hook) => (effect, deps) => {
908
+ const isMounted = React$4.useRef(false);
909
+ hook(() => {
910
+ return () => {
911
+ isMounted.current = false;
912
+ };
913
+ }, []);
914
+ hook(() => {
915
+ if (!isMounted.current) {
916
+ isMounted.current = true;
917
+ } else {
918
+ return effect();
919
+ }
920
+ }, deps);
929
921
  };
930
- var isDev$1 = true;
922
+ const isFunction$1 = (value) => typeof value === "function";
923
+ const isNumber = (value) => typeof value === "number";
924
+ const isDev$1 = true;
931
925
  const isDev$2 = isDev$1;
932
926
  function useMemoizedFn(fn) {
933
927
  if (isDev$2) {
934
928
  if (!isFunction$1(fn)) {
935
- console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof fn));
929
+ console.error(`useMemoizedFn expected parameter is a function, got ${typeof fn}`);
936
930
  }
937
931
  }
938
- var fnRef = React$4.useRef(fn);
939
- fnRef.current = React$4.useMemo(function() {
940
- return fn;
941
- }, [fn]);
942
- var memoizedFn = React$4.useRef();
932
+ const fnRef = React$4.useRef(fn);
933
+ fnRef.current = React$4.useMemo(() => fn, [fn]);
934
+ const memoizedFn = React$4.useRef();
943
935
  if (!memoizedFn.current) {
944
- memoizedFn.current = function() {
945
- var args = [];
946
- for (var _i = 0; _i < arguments.length; _i++) {
947
- args[_i] = arguments[_i];
948
- }
936
+ memoizedFn.current = function(...args) {
949
937
  return fnRef.current.apply(this, args);
950
938
  };
951
939
  }
@@ -955,28 +943,26 @@
955
943
  function depsAreSame(oldDeps, deps) {
956
944
  if (oldDeps === deps)
957
945
  return true;
958
- for (var i = 0; i < oldDeps.length; i++) {
946
+ for (let i = 0; i < oldDeps.length; i++) {
959
947
  if (!Object.is(oldDeps[i], deps[i]))
960
948
  return false;
961
949
  }
962
950
  return true;
963
951
  }
964
952
  function useLatest(value) {
965
- var ref = React$4.useRef(value);
953
+ const ref = React$4.useRef(value);
966
954
  ref.current = value;
967
955
  return ref;
968
956
  }
969
- var useUnmount = function useUnmount2(fn) {
957
+ const useUnmount = (fn) => {
970
958
  if (isDev$2) {
971
959
  if (!isFunction$1(fn)) {
972
- console.error("useUnmount expected parameter is a function, got ".concat(typeof fn));
960
+ console.error(`useUnmount expected parameter is a function, got ${typeof fn}`);
973
961
  }
974
962
  }
975
- var fnRef = useLatest(fn);
976
- React$4.useEffect(function() {
977
- return function() {
978
- fnRef.current();
979
- };
963
+ const fnRef = useLatest(fn);
964
+ React$4.useEffect(() => () => {
965
+ fnRef.current();
980
966
  }, []);
981
967
  };
982
968
  const useUnmount$1 = useUnmount;
@@ -1115,7 +1101,7 @@
1115
1101
  return debounced;
1116
1102
  }
1117
1103
  var debounce_1 = debounce$1;
1118
- var isBrowser$2 = !!(typeof window !== "undefined" && window.document && window.document.createElement);
1104
+ const isBrowser$2 = !!(typeof window !== "undefined" && window.document && window.document.createElement);
1119
1105
  const isBrowser$3 = isBrowser$2;
1120
1106
  var debounce = debounce_1, isObject$5 = isObject_1;
1121
1107
  var FUNC_ERROR_TEXT$1 = "Expected a function";
@@ -1135,46 +1121,20 @@
1135
1121
  });
1136
1122
  }
1137
1123
  var throttle_1 = throttle$1;
1138
- var useMount = function useMount2(fn) {
1124
+ const useMount = (fn) => {
1139
1125
  if (isDev$2) {
1140
1126
  if (!isFunction$1(fn)) {
1141
- console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof fn, '".'));
1127
+ console.error(`useMount: parameter \`fn\` expected to be a function, but got "${typeof fn}".`);
1142
1128
  }
1143
1129
  }
1144
- React$4.useEffect(function() {
1130
+ React$4.useEffect(() => {
1145
1131
  fn === null || fn === void 0 ? void 0 : fn();
1146
1132
  }, []);
1147
1133
  };
1148
1134
  const useMount$1 = useMount;
1149
- var __read$7 = globalThis && globalThis.__read || function(o, n) {
1150
- var m = typeof Symbol === "function" && o[Symbol.iterator];
1151
- if (!m)
1152
- return o;
1153
- var i = m.call(o), r, ar = [], e;
1154
- try {
1155
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
1156
- ar.push(r.value);
1157
- }
1158
- } catch (error) {
1159
- e = {
1160
- error
1161
- };
1162
- } finally {
1163
- try {
1164
- if (r && !r.done && (m = i["return"]))
1165
- m.call(i);
1166
- } finally {
1167
- if (e)
1168
- throw e.error;
1169
- }
1170
- }
1171
- return ar;
1172
- };
1173
- var useUpdate = function useUpdate2() {
1174
- var _a = __read$7(React$4.useState({}), 2), setState = _a[1];
1175
- return React$4.useCallback(function() {
1176
- return setState({});
1177
- }, []);
1135
+ const useUpdate = () => {
1136
+ const [, setState] = React$4.useState({});
1137
+ return React$4.useCallback(() => setState({}), []);
1178
1138
  };
1179
1139
  const useUpdate$1 = useUpdate;
1180
1140
  function getTargetElement(target, defaultElement) {
@@ -1184,7 +1144,7 @@
1184
1144
  if (!target) {
1185
1145
  return defaultElement;
1186
1146
  }
1187
- var targetElement;
1147
+ let targetElement;
1188
1148
  if (isFunction$1(target)) {
1189
1149
  targetElement = target();
1190
1150
  } else if ("current" in target) {
@@ -1194,44 +1154,42 @@
1194
1154
  }
1195
1155
  return targetElement;
1196
1156
  }
1197
- var checkIfAllInShadow = function checkIfAllInShadow2(targets) {
1198
- return targets.every(function(item) {
1199
- var targetElement = getTargetElement(item);
1157
+ const checkIfAllInShadow = (targets) => {
1158
+ return targets.every((item) => {
1159
+ const targetElement = getTargetElement(item);
1200
1160
  if (!targetElement)
1201
1161
  return false;
1202
1162
  if (targetElement.getRootNode() instanceof ShadowRoot)
1203
1163
  return true;
1204
1164
  });
1205
1165
  };
1206
- var getShadow = function getShadow2(node) {
1166
+ const getShadow = (node) => {
1207
1167
  if (!node) {
1208
1168
  return document;
1209
1169
  }
1210
1170
  return node.getRootNode();
1211
1171
  };
1212
- var getDocumentOrShadow = function getDocumentOrShadow2(target) {
1172
+ const getDocumentOrShadow = (target) => {
1213
1173
  if (!target || !document.getRootNode) {
1214
1174
  return document;
1215
1175
  }
1216
- var targets = Array.isArray(target) ? target : [target];
1176
+ const targets = Array.isArray(target) ? target : [target];
1217
1177
  if (checkIfAllInShadow(targets)) {
1218
1178
  return getShadow(getTargetElement(targets[0]));
1219
1179
  }
1220
1180
  return document;
1221
1181
  };
1222
1182
  const getDocumentOrShadow$1 = getDocumentOrShadow;
1223
- var createEffectWithTarget = function createEffectWithTarget2(useEffectType) {
1224
- var useEffectWithTarget2 = function useEffectWithTarget3(effect, deps, target) {
1225
- var hasInitRef = React$4.useRef(false);
1226
- var lastElementRef = React$4.useRef([]);
1227
- var lastDepsRef = React$4.useRef([]);
1228
- var unLoadRef = React$4.useRef();
1229
- useEffectType(function() {
1183
+ const createEffectWithTarget = (useEffectType) => {
1184
+ const useEffectWithTarget2 = (effect, deps, target) => {
1185
+ const hasInitRef = React$4.useRef(false);
1186
+ const lastElementRef = React$4.useRef([]);
1187
+ const lastDepsRef = React$4.useRef([]);
1188
+ const unLoadRef = React$4.useRef();
1189
+ useEffectType(() => {
1230
1190
  var _a;
1231
- var targets = Array.isArray(target) ? target : [target];
1232
- var els = targets.map(function(item) {
1233
- return getTargetElement(item);
1234
- });
1191
+ const targets = Array.isArray(target) ? target : [target];
1192
+ const els = targets.map((item) => getTargetElement(item));
1235
1193
  if (!hasInitRef.current) {
1236
1194
  hasInitRef.current = true;
1237
1195
  lastElementRef.current = els;
@@ -1246,7 +1204,7 @@
1246
1204
  unLoadRef.current = effect();
1247
1205
  }
1248
1206
  });
1249
- useUnmount$1(function() {
1207
+ useUnmount$1(() => {
1250
1208
  var _a;
1251
1209
  (_a = unLoadRef.current) === null || _a === void 0 ? void 0 : _a.call(unLoadRef);
1252
1210
  hasInitRef.current = false;
@@ -1255,33 +1213,26 @@
1255
1213
  return useEffectWithTarget2;
1256
1214
  };
1257
1215
  const createEffectWithTarget$1 = createEffectWithTarget;
1258
- var useEffectWithTarget$1 = createEffectWithTarget$1(React$4.useEffect);
1216
+ const useEffectWithTarget$1 = createEffectWithTarget$1(React$4.useEffect);
1259
1217
  const useEffectWithTarget$2 = useEffectWithTarget$1;
1260
- function useClickAway(onClickAway, target, eventName) {
1261
- if (eventName === void 0) {
1262
- eventName = "click";
1263
- }
1264
- var onClickAwayRef = useLatest(onClickAway);
1265
- useEffectWithTarget$2(function() {
1266
- var handler = function handler2(event) {
1267
- var targets = Array.isArray(target) ? target : [target];
1268
- if (targets.some(function(item) {
1269
- var targetElement = getTargetElement(item);
1218
+ function useClickAway(onClickAway, target, eventName = "click") {
1219
+ const onClickAwayRef = useLatest(onClickAway);
1220
+ useEffectWithTarget$2(() => {
1221
+ const handler = (event) => {
1222
+ const targets = Array.isArray(target) ? target : [target];
1223
+ if (targets.some((item) => {
1224
+ const targetElement = getTargetElement(item);
1270
1225
  return !targetElement || targetElement.contains(event.target);
1271
1226
  })) {
1272
1227
  return;
1273
1228
  }
1274
1229
  onClickAwayRef.current(event);
1275
1230
  };
1276
- var documentOrShadow = getDocumentOrShadow$1(target);
1277
- var eventNames = Array.isArray(eventName) ? eventName : [eventName];
1278
- eventNames.forEach(function(event) {
1279
- return documentOrShadow.addEventListener(event, handler);
1280
- });
1281
- return function() {
1282
- eventNames.forEach(function(event) {
1283
- return documentOrShadow.removeEventListener(event, handler);
1284
- });
1231
+ const documentOrShadow = getDocumentOrShadow$1(target);
1232
+ const eventNames = Array.isArray(eventName) ? eventName : [eventName];
1233
+ eventNames.forEach((event) => documentOrShadow.addEventListener(event, handler));
1234
+ return () => {
1235
+ eventNames.forEach((event) => documentOrShadow.removeEventListener(event, handler));
1285
1236
  };
1286
1237
  }, Array.isArray(eventName) ? eventName : [eventName], target);
1287
1238
  }
@@ -1494,60 +1445,19 @@
1494
1445
  });
1495
1446
  })(dayjs_min);
1496
1447
  const dayjs = dayjs_min.exports;
1497
- var __read$6 = globalThis && globalThis.__read || function(o, n) {
1498
- var m = typeof Symbol === "function" && o[Symbol.iterator];
1499
- if (!m)
1500
- return o;
1501
- var i = m.call(o), r, ar = [], e;
1502
- try {
1503
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
1504
- ar.push(r.value);
1505
- }
1506
- } catch (error) {
1507
- e = {
1508
- error
1509
- };
1510
- } finally {
1511
- try {
1512
- if (r && !r.done && (m = i["return"]))
1513
- m.call(i);
1514
- } finally {
1515
- if (e)
1516
- throw e.error;
1517
- }
1518
- }
1519
- return ar;
1520
- };
1521
- var __spreadArray$2 = globalThis && globalThis.__spreadArray || function(to2, from, pack) {
1522
- if (pack || arguments.length === 2)
1523
- for (var i = 0, l = from.length, ar; i < l; i++) {
1524
- if (ar || !(i in from)) {
1525
- if (!ar)
1526
- ar = Array.prototype.slice.call(from, 0, i);
1527
- ar[i] = from[i];
1528
- }
1529
- }
1530
- return to2.concat(ar || Array.prototype.slice.call(from));
1531
- };
1532
1448
  function useDebounceFn(fn, options) {
1533
1449
  var _a;
1534
1450
  if (isDev$2) {
1535
1451
  if (!isFunction$1(fn)) {
1536
- console.error("useDebounceFn expected parameter is a function, got ".concat(typeof fn));
1452
+ console.error(`useDebounceFn expected parameter is a function, got ${typeof fn}`);
1537
1453
  }
1538
1454
  }
1539
- var fnRef = useLatest(fn);
1540
- var wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
1541
- var debounced = React$4.useMemo(function() {
1542
- return debounce_1(function() {
1543
- var args = [];
1544
- for (var _i = 0; _i < arguments.length; _i++) {
1545
- args[_i] = arguments[_i];
1546
- }
1547
- return fnRef.current.apply(fnRef, __spreadArray$2([], __read$6(args), false));
1548
- }, wait, options);
1549
- }, []);
1550
- useUnmount$1(function() {
1455
+ const fnRef = useLatest(fn);
1456
+ const wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
1457
+ const debounced = React$4.useMemo(() => debounce_1((...args) => {
1458
+ return fnRef.current(...args);
1459
+ }, wait, options), []);
1460
+ useUnmount$1(() => {
1551
1461
  debounced.cancel();
1552
1462
  });
1553
1463
  return {
@@ -1556,36 +1466,14 @@
1556
1466
  flush: debounced.flush
1557
1467
  };
1558
1468
  }
1559
- var __read$5 = globalThis && globalThis.__read || function(o, n) {
1560
- var m = typeof Symbol === "function" && o[Symbol.iterator];
1561
- if (!m)
1562
- return o;
1563
- var i = m.call(o), r, ar = [], e;
1564
- try {
1565
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
1566
- ar.push(r.value);
1567
- }
1568
- } catch (error) {
1569
- e = {
1570
- error
1571
- };
1572
- } finally {
1573
- try {
1574
- if (r && !r.done && (m = i["return"]))
1575
- m.call(i);
1576
- } finally {
1577
- if (e)
1578
- throw e.error;
1579
- }
1580
- }
1581
- return ar;
1582
- };
1583
1469
  function useDebounceEffect(effect, deps, options) {
1584
- var _a = __read$5(React$4.useState({}), 2), flag = _a[0], setFlag = _a[1];
1585
- var run = useDebounceFn(function() {
1470
+ const [flag, setFlag] = React$4.useState({});
1471
+ const {
1472
+ run
1473
+ } = useDebounceFn(() => {
1586
1474
  setFlag({});
1587
- }, options).run;
1588
- React$4.useEffect(function() {
1475
+ }, options);
1476
+ React$4.useEffect(() => {
1589
1477
  return run();
1590
1478
  }, deps);
1591
1479
  useUpdateEffect(effect, [flag]);
@@ -2706,333 +2594,66 @@
2706
2594
  window.IntersectionObserver = IntersectionObserver2;
2707
2595
  window.IntersectionObserverEntry = IntersectionObserverEntry;
2708
2596
  })();
2709
- var __assign = globalThis && globalThis.__assign || function() {
2710
- __assign = Object.assign || function(t) {
2711
- for (var s, i = 1, n = arguments.length; i < n; i++) {
2712
- s = arguments[i];
2713
- for (var p in s) {
2714
- if (Object.prototype.hasOwnProperty.call(s, p))
2715
- t[p] = s[p];
2716
- }
2717
- }
2718
- return t;
2719
- };
2720
- return __assign.apply(this, arguments);
2721
- };
2722
- var __read$4 = globalThis && globalThis.__read || function(o, n) {
2723
- var m = typeof Symbol === "function" && o[Symbol.iterator];
2724
- if (!m)
2725
- return o;
2726
- var i = m.call(o), r, ar = [], e;
2727
- try {
2728
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
2729
- ar.push(r.value);
2730
- }
2731
- } catch (error) {
2732
- e = {
2733
- error
2734
- };
2735
- } finally {
2736
- try {
2737
- if (r && !r.done && (m = i["return"]))
2738
- m.call(i);
2739
- } finally {
2740
- if (e)
2741
- throw e.error;
2742
- }
2743
- }
2744
- return ar;
2745
- };
2746
- var __values = globalThis && globalThis.__values || function(o) {
2747
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
2748
- if (m)
2749
- return m.call(o);
2750
- if (o && typeof o.length === "number")
2751
- return {
2752
- next: function next() {
2753
- if (o && i >= o.length)
2754
- o = void 0;
2755
- return {
2756
- value: o && o[i++],
2757
- done: !o
2758
- };
2759
- }
2760
- };
2761
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
2762
- };
2763
2597
  function useInViewport(target, options) {
2764
- var _a = __read$4(React$4.useState(), 2), state = _a[0], setState = _a[1];
2765
- var _b = __read$4(React$4.useState(), 2), ratio = _b[0], setRatio = _b[1];
2766
- useEffectWithTarget$2(function() {
2767
- var el = getTargetElement(target);
2598
+ const [state, setState] = React$4.useState();
2599
+ const [ratio, setRatio] = React$4.useState();
2600
+ useEffectWithTarget$2(() => {
2601
+ const el = getTargetElement(target);
2768
2602
  if (!el) {
2769
2603
  return;
2770
2604
  }
2771
- var observer = new IntersectionObserver(function(entries) {
2772
- var e_1, _a2;
2773
- try {
2774
- for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
2775
- var entry = entries_1_1.value;
2776
- setRatio(entry.intersectionRatio);
2777
- setState(entry.isIntersecting);
2778
- }
2779
- } catch (e_1_1) {
2780
- e_1 = {
2781
- error: e_1_1
2782
- };
2783
- } finally {
2784
- try {
2785
- if (entries_1_1 && !entries_1_1.done && (_a2 = entries_1["return"]))
2786
- _a2.call(entries_1);
2787
- } finally {
2788
- if (e_1)
2789
- throw e_1.error;
2790
- }
2605
+ const observer = new IntersectionObserver((entries) => {
2606
+ for (const entry of entries) {
2607
+ setRatio(entry.intersectionRatio);
2608
+ setState(entry.isIntersecting);
2791
2609
  }
2792
- }, __assign(__assign({}, options), {
2610
+ }, Object.assign(Object.assign({}, options), {
2793
2611
  root: getTargetElement(options === null || options === void 0 ? void 0 : options.root)
2794
2612
  }));
2795
2613
  observer.observe(el);
2796
- return function() {
2614
+ return () => {
2797
2615
  observer.disconnect();
2798
2616
  };
2799
- }, [], target);
2617
+ }, [options === null || options === void 0 ? void 0 : options.rootMargin, options === null || options === void 0 ? void 0 : options.threshold], target);
2800
2618
  return [state, ratio];
2801
2619
  }
2802
- var useIsomorphicLayoutEffect$1 = isBrowser$3 ? React$4.useLayoutEffect : React$4.useEffect;
2620
+ const useIsomorphicLayoutEffect$1 = isBrowser$3 ? React$4.useLayoutEffect : React$4.useEffect;
2803
2621
  const useIsomorphicLayoutEffect$2 = useIsomorphicLayoutEffect$1;
2804
- var __awaiter = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P, generator) {
2805
- function adopt(value) {
2806
- return value instanceof P ? value : new P(function(resolve) {
2807
- resolve(value);
2808
- });
2809
- }
2810
- return new (P || (P = Promise))(function(resolve, reject) {
2811
- function fulfilled(value) {
2812
- try {
2813
- step(generator.next(value));
2814
- } catch (e) {
2815
- reject(e);
2816
- }
2817
- }
2818
- function rejected(value) {
2819
- try {
2820
- step(generator["throw"](value));
2821
- } catch (e) {
2822
- reject(e);
2823
- }
2824
- }
2825
- function step(result2) {
2826
- result2.done ? resolve(result2.value) : adopt(result2.value).then(fulfilled, rejected);
2827
- }
2828
- step((generator = generator.apply(thisArg, _arguments || [])).next());
2829
- });
2830
- };
2831
- var __generator = globalThis && globalThis.__generator || function(thisArg, body) {
2832
- var _ = {
2833
- label: 0,
2834
- sent: function sent() {
2835
- if (t[0] & 1)
2836
- throw t[1];
2837
- return t[1];
2838
- },
2839
- trys: [],
2840
- ops: []
2841
- }, f, y, t, g;
2842
- return g = {
2843
- next: verb(0),
2844
- "throw": verb(1),
2845
- "return": verb(2)
2846
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
2847
- return this;
2848
- }), g;
2849
- function verb(n) {
2850
- return function(v) {
2851
- return step([n, v]);
2852
- };
2853
- }
2854
- function step(op) {
2855
- if (f)
2856
- throw new TypeError("Generator is already executing.");
2857
- while (_) {
2858
- try {
2859
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
2860
- return t;
2861
- if (y = 0, t)
2862
- op = [op[0] & 2, t.value];
2863
- switch (op[0]) {
2864
- case 0:
2865
- case 1:
2866
- t = op;
2867
- break;
2868
- case 4:
2869
- _.label++;
2870
- return {
2871
- value: op[1],
2872
- done: false
2873
- };
2874
- case 5:
2875
- _.label++;
2876
- y = op[1];
2877
- op = [0];
2878
- continue;
2879
- case 7:
2880
- op = _.ops.pop();
2881
- _.trys.pop();
2882
- continue;
2883
- default:
2884
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
2885
- _ = 0;
2886
- continue;
2887
- }
2888
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
2889
- _.label = op[1];
2890
- break;
2891
- }
2892
- if (op[0] === 6 && _.label < t[1]) {
2893
- _.label = t[1];
2894
- t = op;
2895
- break;
2896
- }
2897
- if (t && _.label < t[2]) {
2898
- _.label = t[2];
2899
- _.ops.push(op);
2900
- break;
2901
- }
2902
- if (t[2])
2903
- _.ops.pop();
2904
- _.trys.pop();
2905
- continue;
2906
- }
2907
- op = body.call(thisArg, _);
2908
- } catch (e) {
2909
- op = [6, e];
2910
- y = 0;
2911
- } finally {
2912
- f = t = 0;
2913
- }
2914
- }
2915
- if (op[0] & 5)
2916
- throw op[1];
2917
- return {
2918
- value: op[0] ? op[1] : void 0,
2919
- done: true
2920
- };
2921
- }
2922
- };
2923
- var __read$3 = globalThis && globalThis.__read || function(o, n) {
2924
- var m = typeof Symbol === "function" && o[Symbol.iterator];
2925
- if (!m)
2926
- return o;
2927
- var i = m.call(o), r, ar = [], e;
2928
- try {
2929
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
2930
- ar.push(r.value);
2931
- }
2932
- } catch (error) {
2933
- e = {
2934
- error
2935
- };
2936
- } finally {
2937
- try {
2938
- if (r && !r.done && (m = i["return"]))
2939
- m.call(i);
2940
- } finally {
2941
- if (e)
2942
- throw e.error;
2943
- }
2944
- }
2945
- return ar;
2946
- };
2947
- var __spreadArray$1 = globalThis && globalThis.__spreadArray || function(to2, from, pack) {
2948
- if (pack || arguments.length === 2)
2949
- for (var i = 0, l = from.length, ar; i < l; i++) {
2950
- if (ar || !(i in from)) {
2951
- if (!ar)
2952
- ar = Array.prototype.slice.call(from, 0, i);
2953
- ar[i] = from[i];
2954
- }
2955
- }
2956
- return to2.concat(ar || Array.prototype.slice.call(from));
2957
- };
2958
2622
  function useLockFn(fn) {
2959
- var _this = this;
2960
- var lockRef = React$4.useRef(false);
2961
- return React$4.useCallback(function() {
2962
- var args = [];
2963
- for (var _i = 0; _i < arguments.length; _i++) {
2964
- args[_i] = arguments[_i];
2965
- }
2966
- return __awaiter(_this, void 0, void 0, function() {
2967
- var ret, e_1;
2968
- return __generator(this, function(_a) {
2969
- switch (_a.label) {
2970
- case 0:
2971
- if (lockRef.current)
2972
- return [2];
2973
- lockRef.current = true;
2974
- _a.label = 1;
2975
- case 1:
2976
- _a.trys.push([1, 3, , 4]);
2977
- return [4, fn.apply(void 0, __spreadArray$1([], __read$3(args), false))];
2978
- case 2:
2979
- ret = _a.sent();
2980
- lockRef.current = false;
2981
- return [2, ret];
2982
- case 3:
2983
- e_1 = _a.sent();
2984
- lockRef.current = false;
2985
- throw e_1;
2986
- case 4:
2987
- return [2];
2988
- }
2989
- });
2990
- });
2991
- }, [fn]);
2992
- }
2993
- var __read$2 = globalThis && globalThis.__read || function(o, n) {
2994
- var m = typeof Symbol === "function" && o[Symbol.iterator];
2995
- if (!m)
2996
- return o;
2997
- var i = m.call(o), r, ar = [], e;
2998
- try {
2999
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
3000
- ar.push(r.value);
3001
- }
3002
- } catch (error) {
3003
- e = {
3004
- error
3005
- };
3006
- } finally {
2623
+ const lockRef = React$4.useRef(false);
2624
+ return React$4.useCallback((...args) => __awaiter(this, void 0, void 0, function* () {
2625
+ if (lockRef.current)
2626
+ return;
2627
+ lockRef.current = true;
3007
2628
  try {
3008
- if (r && !r.done && (m = i["return"]))
3009
- m.call(i);
3010
- } finally {
3011
- if (e)
3012
- throw e.error;
2629
+ const ret = yield fn(...args);
2630
+ lockRef.current = false;
2631
+ return ret;
2632
+ } catch (e) {
2633
+ lockRef.current = false;
2634
+ throw e;
3013
2635
  }
3014
- }
3015
- return ar;
3016
- };
2636
+ }), [fn]);
2637
+ }
3017
2638
  function useRafState(initialState) {
3018
- var ref = React$4.useRef(0);
3019
- var _a = __read$2(React$4.useState(initialState), 2), state = _a[0], setState = _a[1];
3020
- var setRafState = React$4.useCallback(function(value) {
2639
+ const ref = React$4.useRef(0);
2640
+ const [state, setState] = React$4.useState(initialState);
2641
+ const setRafState = React$4.useCallback((value) => {
3021
2642
  cancelAnimationFrame(ref.current);
3022
- ref.current = requestAnimationFrame(function() {
2643
+ ref.current = requestAnimationFrame(() => {
3023
2644
  setState(value);
3024
2645
  });
3025
2646
  }, []);
3026
- useUnmount$1(function() {
2647
+ useUnmount$1(() => {
3027
2648
  cancelAnimationFrame(ref.current);
3028
2649
  });
3029
2650
  return [state, setRafState];
3030
2651
  }
3031
- var useUnmountedRef = function useUnmountedRef2() {
3032
- var unmountedRef = React$4.useRef(false);
3033
- React$4.useEffect(function() {
2652
+ const useUnmountedRef = () => {
2653
+ const unmountedRef = React$4.useRef(false);
2654
+ React$4.useEffect(() => {
3034
2655
  unmountedRef.current = false;
3035
- return function() {
2656
+ return () => {
3036
2657
  unmountedRef.current = true;
3037
2658
  };
3038
2659
  }, []);
@@ -3510,44 +3131,23 @@
3510
3131
  }
3511
3132
  return ResizeObserver$1;
3512
3133
  }();
3513
- var useEffectWithTarget = createEffectWithTarget$1(React$4.useLayoutEffect);
3134
+ const useEffectWithTarget = createEffectWithTarget$1(React$4.useLayoutEffect);
3514
3135
  const useLayoutEffectWithTarget = useEffectWithTarget;
3515
- var useIsomorphicLayoutEffectWithTarget = isBrowser$3 ? useLayoutEffectWithTarget : useEffectWithTarget$2;
3136
+ const useIsomorphicLayoutEffectWithTarget = isBrowser$3 ? useLayoutEffectWithTarget : useEffectWithTarget$2;
3516
3137
  const useIsomorphicLayoutEffectWithTarget$1 = useIsomorphicLayoutEffectWithTarget;
3517
- var __read$1 = globalThis && globalThis.__read || function(o, n) {
3518
- var m = typeof Symbol === "function" && o[Symbol.iterator];
3519
- if (!m)
3520
- return o;
3521
- var i = m.call(o), r, ar = [], e;
3522
- try {
3523
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
3524
- ar.push(r.value);
3525
- }
3526
- } catch (error) {
3527
- e = {
3528
- error
3529
- };
3530
- } finally {
3531
- try {
3532
- if (r && !r.done && (m = i["return"]))
3533
- m.call(i);
3534
- } finally {
3535
- if (e)
3536
- throw e.error;
3537
- }
3538
- }
3539
- return ar;
3540
- };
3541
3138
  function useSize(target) {
3542
- var _a = __read$1(useRafState(), 2), state = _a[0], setState = _a[1];
3543
- useIsomorphicLayoutEffectWithTarget$1(function() {
3544
- var el = getTargetElement(target);
3139
+ const [state, setState] = useRafState();
3140
+ useIsomorphicLayoutEffectWithTarget$1(() => {
3141
+ const el = getTargetElement(target);
3545
3142
  if (!el) {
3546
3143
  return;
3547
3144
  }
3548
- var resizeObserver = new index$k(function(entries) {
3549
- entries.forEach(function(entry) {
3550
- var _a2 = entry.target, clientWidth = _a2.clientWidth, clientHeight = _a2.clientHeight;
3145
+ const resizeObserver = new index$k((entries) => {
3146
+ entries.forEach((entry) => {
3147
+ const {
3148
+ clientWidth,
3149
+ clientHeight
3150
+ } = entry.target;
3551
3151
  setState({
3552
3152
  width: clientWidth,
3553
3153
  height: clientHeight
@@ -3555,66 +3155,25 @@
3555
3155
  });
3556
3156
  });
3557
3157
  resizeObserver.observe(el);
3558
- return function() {
3158
+ return () => {
3559
3159
  resizeObserver.disconnect();
3560
3160
  };
3561
3161
  }, [], target);
3562
3162
  return state;
3563
3163
  }
3564
- var __read = globalThis && globalThis.__read || function(o, n) {
3565
- var m = typeof Symbol === "function" && o[Symbol.iterator];
3566
- if (!m)
3567
- return o;
3568
- var i = m.call(o), r, ar = [], e;
3569
- try {
3570
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
3571
- ar.push(r.value);
3572
- }
3573
- } catch (error) {
3574
- e = {
3575
- error
3576
- };
3577
- } finally {
3578
- try {
3579
- if (r && !r.done && (m = i["return"]))
3580
- m.call(i);
3581
- } finally {
3582
- if (e)
3583
- throw e.error;
3584
- }
3585
- }
3586
- return ar;
3587
- };
3588
- var __spreadArray = globalThis && globalThis.__spreadArray || function(to2, from, pack) {
3589
- if (pack || arguments.length === 2)
3590
- for (var i = 0, l = from.length, ar; i < l; i++) {
3591
- if (ar || !(i in from)) {
3592
- if (!ar)
3593
- ar = Array.prototype.slice.call(from, 0, i);
3594
- ar[i] = from[i];
3595
- }
3596
- }
3597
- return to2.concat(ar || Array.prototype.slice.call(from));
3598
- };
3599
3164
  function useThrottleFn(fn, options) {
3600
3165
  var _a;
3601
3166
  if (isDev$2) {
3602
3167
  if (!isFunction$1(fn)) {
3603
- console.error("useThrottleFn expected parameter is a function, got ".concat(typeof fn));
3168
+ console.error(`useThrottleFn expected parameter is a function, got ${typeof fn}`);
3604
3169
  }
3605
3170
  }
3606
- var fnRef = useLatest(fn);
3607
- var wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
3608
- var throttled = React$4.useMemo(function() {
3609
- return throttle_1(function() {
3610
- var args = [];
3611
- for (var _i = 0; _i < arguments.length; _i++) {
3612
- args[_i] = arguments[_i];
3613
- }
3614
- return fnRef.current.apply(fnRef, __spreadArray([], __read(args), false));
3615
- }, wait, options);
3616
- }, []);
3617
- useUnmount$1(function() {
3171
+ const fnRef = useLatest(fn);
3172
+ const wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
3173
+ const throttled = React$4.useMemo(() => throttle_1((...args) => {
3174
+ return fnRef.current(...args);
3175
+ }, wait, options), []);
3176
+ useUnmount$1(() => {
3618
3177
  throttled.cancel();
3619
3178
  });
3620
3179
  return {
@@ -3624,22 +3183,22 @@
3624
3183
  };
3625
3184
  }
3626
3185
  function useTimeout(fn, delay) {
3627
- var fnRef = useLatest(fn);
3628
- var timerRef = React$4.useRef(null);
3629
- React$4.useEffect(function() {
3186
+ const fnRef = useLatest(fn);
3187
+ const timerRef = React$4.useRef(null);
3188
+ React$4.useEffect(() => {
3630
3189
  if (!isNumber(delay) || delay < 0) {
3631
3190
  return;
3632
3191
  }
3633
- timerRef.current = setTimeout(function() {
3192
+ timerRef.current = setTimeout(() => {
3634
3193
  fnRef.current();
3635
3194
  }, delay);
3636
- return function() {
3195
+ return () => {
3637
3196
  if (timerRef.current) {
3638
3197
  clearTimeout(timerRef.current);
3639
3198
  }
3640
3199
  };
3641
3200
  }, [delay]);
3642
- var clear2 = React$4.useCallback(function() {
3201
+ const clear2 = React$4.useCallback(() => {
3643
3202
  if (timerRef.current) {
3644
3203
  clearTimeout(timerRef.current);
3645
3204
  }
@@ -4131,6 +3690,7 @@
4131
3690
  const index2 = arr.findIndex(test);
4132
3691
  return index2 < 0 ? arr.length : index2;
4133
3692
  }
3693
+ const clamp$1 = (min2, max2, v) => Math.min(Math.max(v, min2), max2);
4134
3694
  const colors = {
4135
3695
  transparent: 0,
4136
3696
  aliceblue: 4042850303,
@@ -4452,6 +4012,64 @@
4452
4012
  break;
4453
4013
  return i - 1;
4454
4014
  }
4015
+ const steps$1 = (steps2, direction = "end") => (progress) => {
4016
+ progress = direction === "end" ? Math.min(progress, 0.999) : Math.max(progress, 1e-3);
4017
+ const expanded = progress * steps2;
4018
+ const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
4019
+ return clamp$1(0, 1, rounded / steps2);
4020
+ };
4021
+ const c1 = 1.70158;
4022
+ const c2 = c1 * 1.525;
4023
+ const c3 = c1 + 1;
4024
+ const c4 = 2 * Math.PI / 3;
4025
+ const c5 = 2 * Math.PI / 4.5;
4026
+ const bounceOut = (x) => {
4027
+ const n1 = 7.5625;
4028
+ const d1 = 2.75;
4029
+ if (x < 1 / d1) {
4030
+ return n1 * x * x;
4031
+ } else if (x < 2 / d1) {
4032
+ return n1 * (x -= 1.5 / d1) * x + 0.75;
4033
+ } else if (x < 2.5 / d1) {
4034
+ return n1 * (x -= 2.25 / d1) * x + 0.9375;
4035
+ } else {
4036
+ return n1 * (x -= 2.625 / d1) * x + 0.984375;
4037
+ }
4038
+ };
4039
+ const easings = {
4040
+ linear: (x) => x,
4041
+ easeInQuad: (x) => x * x,
4042
+ easeOutQuad: (x) => 1 - (1 - x) * (1 - x),
4043
+ easeInOutQuad: (x) => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2,
4044
+ easeInCubic: (x) => x * x * x,
4045
+ easeOutCubic: (x) => 1 - Math.pow(1 - x, 3),
4046
+ easeInOutCubic: (x) => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,
4047
+ easeInQuart: (x) => x * x * x * x,
4048
+ easeOutQuart: (x) => 1 - Math.pow(1 - x, 4),
4049
+ easeInOutQuart: (x) => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,
4050
+ easeInQuint: (x) => x * x * x * x * x,
4051
+ easeOutQuint: (x) => 1 - Math.pow(1 - x, 5),
4052
+ easeInOutQuint: (x) => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,
4053
+ easeInSine: (x) => 1 - Math.cos(x * Math.PI / 2),
4054
+ easeOutSine: (x) => Math.sin(x * Math.PI / 2),
4055
+ easeInOutSine: (x) => -(Math.cos(Math.PI * x) - 1) / 2,
4056
+ easeInExpo: (x) => x === 0 ? 0 : Math.pow(2, 10 * x - 10),
4057
+ easeOutExpo: (x) => x === 1 ? 1 : 1 - Math.pow(2, -10 * x),
4058
+ easeInOutExpo: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2,
4059
+ easeInCirc: (x) => 1 - Math.sqrt(1 - Math.pow(x, 2)),
4060
+ easeOutCirc: (x) => Math.sqrt(1 - Math.pow(x - 1, 2)),
4061
+ easeInOutCirc: (x) => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2,
4062
+ easeInBack: (x) => c3 * x * x * x - c1 * x * x,
4063
+ easeOutBack: (x) => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),
4064
+ easeInOutBack: (x) => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,
4065
+ easeInElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),
4066
+ easeOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1,
4067
+ easeInOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1,
4068
+ easeInBounce: (x) => 1 - bounceOut(1 - x),
4069
+ easeOutBounce: bounceOut,
4070
+ easeInOutBounce: (x) => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2,
4071
+ steps: steps$1
4072
+ };
4455
4073
  function _extends$4() {
4456
4074
  _extends$4 = Object.assign ? Object.assign.bind() : function(target) {
4457
4075
  for (var i = 1; i < arguments.length; i++) {
@@ -5133,57 +4751,6 @@
5133
4751
  friction: 120
5134
4752
  }
5135
4753
  };
5136
- const c1 = 1.70158;
5137
- const c2 = c1 * 1.525;
5138
- const c3 = c1 + 1;
5139
- const c4 = 2 * Math.PI / 3;
5140
- const c5 = 2 * Math.PI / 4.5;
5141
- const bounceOut = (x) => {
5142
- const n1 = 7.5625;
5143
- const d1 = 2.75;
5144
- if (x < 1 / d1) {
5145
- return n1 * x * x;
5146
- } else if (x < 2 / d1) {
5147
- return n1 * (x -= 1.5 / d1) * x + 0.75;
5148
- } else if (x < 2.5 / d1) {
5149
- return n1 * (x -= 2.25 / d1) * x + 0.9375;
5150
- } else {
5151
- return n1 * (x -= 2.625 / d1) * x + 0.984375;
5152
- }
5153
- };
5154
- const easings = {
5155
- linear: (x) => x,
5156
- easeInQuad: (x) => x * x,
5157
- easeOutQuad: (x) => 1 - (1 - x) * (1 - x),
5158
- easeInOutQuad: (x) => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2,
5159
- easeInCubic: (x) => x * x * x,
5160
- easeOutCubic: (x) => 1 - Math.pow(1 - x, 3),
5161
- easeInOutCubic: (x) => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,
5162
- easeInQuart: (x) => x * x * x * x,
5163
- easeOutQuart: (x) => 1 - Math.pow(1 - x, 4),
5164
- easeInOutQuart: (x) => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,
5165
- easeInQuint: (x) => x * x * x * x * x,
5166
- easeOutQuint: (x) => 1 - Math.pow(1 - x, 5),
5167
- easeInOutQuint: (x) => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,
5168
- easeInSine: (x) => 1 - Math.cos(x * Math.PI / 2),
5169
- easeOutSine: (x) => Math.sin(x * Math.PI / 2),
5170
- easeInOutSine: (x) => -(Math.cos(Math.PI * x) - 1) / 2,
5171
- easeInExpo: (x) => x === 0 ? 0 : Math.pow(2, 10 * x - 10),
5172
- easeOutExpo: (x) => x === 1 ? 1 : 1 - Math.pow(2, -10 * x),
5173
- easeInOutExpo: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2,
5174
- easeInCirc: (x) => 1 - Math.sqrt(1 - Math.pow(x, 2)),
5175
- easeOutCirc: (x) => Math.sqrt(1 - Math.pow(x - 1, 2)),
5176
- easeInOutCirc: (x) => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2,
5177
- easeInBack: (x) => c3 * x * x * x - c1 * x * x,
5178
- easeOutBack: (x) => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),
5179
- easeInOutBack: (x) => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,
5180
- easeInElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),
5181
- easeOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1,
5182
- easeInOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1,
5183
- easeInBounce: (x) => 1 - bounceOut(1 - x),
5184
- easeOutBounce: bounceOut,
5185
- easeInOutBounce: (x) => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2
5186
- };
5187
4754
  const defaults = _extends$2({}, config$1.default, {
5188
4755
  mass: 1,
5189
4756
  damping: 1,
@@ -5379,7 +4946,7 @@
5379
4946
  };
5380
4947
  const animate = (arg1, arg2) => {
5381
4948
  const bailSignal = new BailSignal();
5382
- const skipAnimationSignal = new SkipAniamtionSignal();
4949
+ const skipAnimationSignal = new SkipAnimationSignal();
5383
4950
  return (async () => {
5384
4951
  if (globals.skipAnimation) {
5385
4952
  stopAsync(state);
@@ -5428,7 +4995,7 @@
5428
4995
  } catch (err) {
5429
4996
  if (err instanceof BailSignal) {
5430
4997
  result2 = err.result;
5431
- } else if (err instanceof SkipAniamtionSignal) {
4998
+ } else if (err instanceof SkipAnimationSignal) {
5432
4999
  result2 = err.result;
5433
5000
  } else {
5434
5001
  throw err;
@@ -5462,7 +5029,7 @@
5462
5029
  this.result = void 0;
5463
5030
  }
5464
5031
  }
5465
- class SkipAniamtionSignal extends Error {
5032
+ class SkipAnimationSignal extends Error {
5466
5033
  constructor() {
5467
5034
  super("SkipAnimationSignal");
5468
5035
  this.result = void 0;
@@ -6493,11 +6060,11 @@
6493
6060
  }
6494
6061
  return target;
6495
6062
  }
6496
- const _excluded$3$1 = ["children"];
6063
+ const _excluded$6 = ["children"];
6497
6064
  const SpringContext = (_ref) => {
6498
6065
  let {
6499
6066
  children
6500
- } = _ref, props = _objectWithoutPropertiesLoose$3(_ref, _excluded$3$1);
6067
+ } = _ref, props = _objectWithoutPropertiesLoose$3(_ref, _excluded$6);
6501
6068
  const inherited = React$4.useContext(ctx);
6502
6069
  const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate;
6503
6070
  props = useMemoOne(() => ({
@@ -6801,7 +6368,7 @@
6801
6368
  }
6802
6369
  return target;
6803
6370
  }
6804
- const _excluded$2$1 = ["style", "children", "scrollTop", "scrollLeft"];
6371
+ const _excluded$2$1 = ["style", "children", "scrollTop", "scrollLeft", "viewBox"];
6805
6372
  const isCustomPropRE = /^--/;
6806
6373
  function dangerousStyleValue(name, value) {
6807
6374
  if (value == null || typeof value === "boolean" || value === "")
@@ -6820,7 +6387,8 @@
6820
6387
  style,
6821
6388
  children,
6822
6389
  scrollTop,
6823
- scrollLeft
6390
+ scrollLeft,
6391
+ viewBox
6824
6392
  } = _ref, attributes = _objectWithoutPropertiesLoose$2(_ref, _excluded$2$1);
6825
6393
  const values = Object.values(attributes);
6826
6394
  const names = Object.keys(attributes).map((name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, (n) => "-" + n.toLowerCase())));
@@ -6846,6 +6414,9 @@
6846
6414
  if (scrollLeft !== void 0) {
6847
6415
  instance.scrollLeft = scrollLeft;
6848
6416
  }
6417
+ if (viewBox !== void 0) {
6418
+ instance.setAttribute("viewBox", viewBox);
6419
+ }
6849
6420
  }
6850
6421
  let isUnitlessNumber = {
6851
6422
  animationIterationCount: true,
@@ -7018,13 +6589,13 @@
7018
6589
  return false;
7019
6590
  return !destroyOnClose;
7020
6591
  }
7021
- const eventToPropRecord = {
6592
+ const eventToPropRecord$1 = {
7022
6593
  "click": "onClick"
7023
6594
  };
7024
6595
  function withStopPropagation(events, element) {
7025
6596
  const props = Object.assign({}, element.props);
7026
6597
  for (const key of events) {
7027
- const prop = eventToPropRecord[key];
6598
+ const prop = eventToPropRecord$1[key];
7028
6599
  props[prop] = function(e) {
7029
6600
  var _a, _b;
7030
6601
  e.stopPropagation();
@@ -7878,7 +7449,7 @@
7878
7449
  return unmountComponentAtNode(container);
7879
7450
  }
7880
7451
  function concurrentUnmount(container) {
7881
- return __awaiter$1(this, void 0, void 0, function* () {
7452
+ return __awaiter(this, void 0, void 0, function* () {
7882
7453
  return Promise.resolve().then(() => {
7883
7454
  var _a;
7884
7455
  (_a = container[MARK]) === null || _a === void 0 ? void 0 : _a.unmount();
@@ -8357,7 +7928,7 @@
8357
7928
  return nativeButtonRef.current;
8358
7929
  }
8359
7930
  }));
8360
- const handleClick = (e) => __awaiter$1(void 0, void 0, void 0, function* () {
7931
+ const handleClick = (e) => __awaiter(void 0, void 0, void 0, function* () {
8361
7932
  if (!props.onClick)
8362
7933
  return;
8363
7934
  const promise = props.onClick(e);
@@ -8699,7 +8270,7 @@
8699
8270
  }
8700
8271
  }, React__default.default.createElement("div", {
8701
8272
  className: `${classPrefix$1b}-cell-top`
8702
- }, d.date()), React__default.default.createElement("div", {
8273
+ }, props.renderDate ? props.renderDate(d.toDate()) : d.date()), React__default.default.createElement("div", {
8703
8274
  className: `${classPrefix$1b}-cell-bottom`
8704
8275
  }, (_a = props.renderLabel) === null || _a === void 0 ? void 0 : _a.call(props, d.toDate()))));
8705
8276
  iterator = iterator.add(1, "day");
@@ -13441,7 +13012,7 @@ Please add \`${key}Action\` when creating your handler.`);
13441
13012
  }, actions.map((action, index3) => React__default.default.createElement(DialogActionButton, {
13442
13013
  key: action.key,
13443
13014
  action,
13444
- onAction: () => __awaiter$1(void 0, void 0, void 0, function* () {
13015
+ onAction: () => __awaiter(void 0, void 0, void 0, function* () {
13445
13016
  var _a, _b, _c;
13446
13017
  yield Promise.all([(_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action), (_b = props.onAction) === null || _b === void 0 ? void 0 : _b.call(props, action, index3)]);
13447
13018
  if (props.closeOnAction) {
@@ -13532,7 +13103,7 @@ Please add \`${key}Action\` when creating your handler.`);
13532
13103
  actions: [[{
13533
13104
  key: "cancel",
13534
13105
  text: props.cancelText,
13535
- onClick: () => __awaiter$1(this, void 0, void 0, function* () {
13106
+ onClick: () => __awaiter(this, void 0, void 0, function* () {
13536
13107
  var _a;
13537
13108
  yield (_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
13538
13109
  resolve(false);
@@ -13541,7 +13112,7 @@ Please add \`${key}Action\` when creating your handler.`);
13541
13112
  key: "confirm",
13542
13113
  text: props.confirmText,
13543
13114
  bold: true,
13544
- onClick: () => __awaiter$1(this, void 0, void 0, function* () {
13115
+ onClick: () => __awaiter(this, void 0, void 0, function* () {
13545
13116
  var _b;
13546
13117
  yield (_b = props.onConfirm) === null || _b === void 0 ? void 0 : _b.call(props);
13547
13118
  resolve(true);
@@ -14910,9 +14481,8 @@ Please add \`${key}Action\` when creating your handler.`);
14910
14481
  function _arrayLikeToArray(arr, len) {
14911
14482
  if (len == null || len > arr.length)
14912
14483
  len = arr.length;
14913
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
14484
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
14914
14485
  arr2[i] = arr[i];
14915
- }
14916
14486
  return arr2;
14917
14487
  }
14918
14488
  function _arrayWithoutHoles(arr) {
@@ -15444,10 +15014,9 @@ Please add \`${key}Action\` when creating your handler.`);
15444
15014
  return iterable;
15445
15015
  if (!isNaN(iterable.length)) {
15446
15016
  var i = -1, next = function next2() {
15447
- for (; ++i < iterable.length; ) {
15017
+ for (; ++i < iterable.length; )
15448
15018
  if (hasOwn.call(iterable, i))
15449
15019
  return next2.value = iterable[i], next2.done = false, next2;
15450
- }
15451
15020
  return next2.value = void 0, next2.done = true, next2;
15452
15021
  };
15453
15022
  return next.next = next;
@@ -15492,9 +15061,8 @@ Please add \`${key}Action\` when creating your handler.`);
15492
15061
  return "[object Generator]";
15493
15062
  }), exports3.keys = function(val) {
15494
15063
  var object2 = Object(val), keys2 = [];
15495
- for (var key in object2) {
15064
+ for (var key in object2)
15496
15065
  keys2.push(key);
15497
- }
15498
15066
  return keys2.reverse(), function next() {
15499
15067
  for (; keys2.length; ) {
15500
15068
  var key2 = keys2.pop();
@@ -15507,9 +15075,8 @@ Please add \`${key}Action\` when creating your handler.`);
15507
15075
  constructor: Context2,
15508
15076
  reset: function reset(skipTempReset) {
15509
15077
  if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = false, this.delegate = null, this.method = "next", this.arg = void 0, this.tryEntries.forEach(resetTryEntry), !skipTempReset)
15510
- for (var name in this) {
15078
+ for (var name in this)
15511
15079
  "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = void 0);
15512
- }
15513
15080
  },
15514
15081
  stop: function stop2() {
15515
15082
  this.done = true;
@@ -17685,9 +17252,8 @@ Please add \`${key}Action\` when creating your handler.`);
17685
17252
  return;
17686
17253
  _n = false;
17687
17254
  } else
17688
- for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true) {
17255
+ for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true)
17689
17256
  ;
17690
- }
17691
17257
  } catch (err) {
17692
17258
  _d = true, _e = err;
17693
17259
  } finally {
@@ -19230,18 +18796,18 @@ Please add \`${key}Action\` when creating your handler.`);
19230
18796
  d: "M0,0 L30,0 L18.07289,14.312538 C16.65863,16.009645 14.13637,16.238942 12.43926,14.824685 C12.25341,14.669808 12.08199,14.49839 11.92711,14.312538 L0,0 L0,0 Z"
19231
18797
  }))));
19232
18798
  });
19233
- function getSide(placement) {
19234
- return placement.split("-")[0];
19235
- }
19236
18799
  function getAlignment(placement) {
19237
18800
  return placement.split("-")[1];
19238
18801
  }
19239
- function getMainAxisFromPlacement(placement) {
19240
- return ["top", "bottom"].includes(getSide(placement)) ? "x" : "y";
19241
- }
19242
18802
  function getLengthFromAxis(axis) {
19243
18803
  return axis === "y" ? "height" : "width";
19244
18804
  }
18805
+ function getSide(placement) {
18806
+ return placement.split("-")[0];
18807
+ }
18808
+ function getMainAxisFromPlacement(placement) {
18809
+ return ["top", "bottom"].includes(getSide(placement)) ? "x" : "y";
18810
+ }
19245
18811
  function computeCoordsFromPlacement(_ref, placement, rtl) {
19246
18812
  let {
19247
18813
  reference,
@@ -19493,7 +19059,7 @@ Please add \`${key}Action\` when creating your handler.`);
19493
19059
  const {
19494
19060
  element,
19495
19061
  padding = 0
19496
- } = options != null ? options : {};
19062
+ } = options || {};
19497
19063
  const {
19498
19064
  x,
19499
19065
  y,
@@ -19513,7 +19079,6 @@ Please add \`${key}Action\` when creating your handler.`);
19513
19079
  y
19514
19080
  };
19515
19081
  const axis = getMainAxisFromPlacement(placement);
19516
- const alignment = getAlignment(placement);
19517
19082
  const length = getLengthFromAxis(axis);
19518
19083
  const arrowDimensions = await platform2.getDimensions(element);
19519
19084
  const minProp = axis === "y" ? "top" : "left";
@@ -19530,8 +19095,7 @@ Please add \`${key}Action\` when creating your handler.`);
19530
19095
  const max2 = clientSize - arrowDimensions[length] - paddingObject[maxProp];
19531
19096
  const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
19532
19097
  const offset2 = within(min2, center, max2);
19533
- const alignmentPadding = alignment === "start" ? paddingObject[minProp] : paddingObject[maxProp];
19534
- const shouldAddOffset = alignmentPadding > 0 && center !== offset2 && rects.reference[length] <= rects.floating[length];
19098
+ const shouldAddOffset = getAlignment(placement) != null && center != offset2 && rects.reference[length] / 2 - (center < min2 ? paddingObject[minProp] : paddingObject[maxProp]) - arrowDimensions[length] / 2 < 0;
19535
19099
  const alignmentOffset = shouldAddOffset ? center < min2 ? min2 - center : max2 - center : 0;
19536
19100
  return {
19537
19101
  [axis]: coords[axis] - alignmentOffset,
@@ -19542,14 +19106,15 @@ Please add \`${key}Action\` when creating your handler.`);
19542
19106
  };
19543
19107
  }
19544
19108
  });
19545
- const hash$1 = {
19109
+ const sides = ["top", "right", "bottom", "left"];
19110
+ const oppositeSideMap = {
19546
19111
  left: "right",
19547
19112
  right: "left",
19548
19113
  bottom: "top",
19549
19114
  top: "bottom"
19550
19115
  };
19551
19116
  function getOppositePlacement(placement) {
19552
- return placement.replace(/left|right|bottom|top/g, (matched) => hash$1[matched]);
19117
+ return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
19553
19118
  }
19554
19119
  function getAlignmentSides(placement, rects, rtl) {
19555
19120
  if (rtl === void 0) {
@@ -19567,18 +19132,46 @@ Please add \`${key}Action\` when creating your handler.`);
19567
19132
  cross: getOppositePlacement(mainAlignmentSide)
19568
19133
  };
19569
19134
  }
19570
- const hash = {
19135
+ const oppositeAlignmentMap = {
19571
19136
  start: "end",
19572
19137
  end: "start"
19573
19138
  };
19574
19139
  function getOppositeAlignmentPlacement(placement) {
19575
- return placement.replace(/start|end/g, (matched) => hash[matched]);
19140
+ return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
19576
19141
  }
19577
- const sides = ["top", "right", "bottom", "left"];
19578
19142
  function getExpandedPlacements(placement) {
19579
19143
  const oppositePlacement = getOppositePlacement(placement);
19580
19144
  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
19581
19145
  }
19146
+ function getSideList(side, isStart, rtl) {
19147
+ const lr = ["left", "right"];
19148
+ const rl = ["right", "left"];
19149
+ const tb = ["top", "bottom"];
19150
+ const bt = ["bottom", "top"];
19151
+ switch (side) {
19152
+ case "top":
19153
+ case "bottom":
19154
+ if (rtl)
19155
+ return isStart ? rl : lr;
19156
+ return isStart ? lr : rl;
19157
+ case "left":
19158
+ case "right":
19159
+ return isStart ? tb : bt;
19160
+ default:
19161
+ return [];
19162
+ }
19163
+ }
19164
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
19165
+ const alignment = getAlignment(placement);
19166
+ let list2 = getSideList(getSide(placement), direction === "start", rtl);
19167
+ if (alignment) {
19168
+ list2 = list2.map((side) => side + "-" + alignment);
19169
+ if (flipAlignment) {
19170
+ list2 = list2.concat(list2.map(getOppositeAlignmentPlacement));
19171
+ }
19172
+ }
19173
+ return list2;
19174
+ }
19582
19175
  const flip = function(options) {
19583
19176
  if (options === void 0) {
19584
19177
  options = {};
@@ -19601,12 +19194,17 @@ Please add \`${key}Action\` when creating your handler.`);
19601
19194
  crossAxis: checkCrossAxis = true,
19602
19195
  fallbackPlacements: specifiedFallbackPlacements,
19603
19196
  fallbackStrategy = "bestFit",
19197
+ fallbackAxisSideDirection = "none",
19604
19198
  flipAlignment = true,
19605
19199
  ...detectOverflowOptions
19606
19200
  } = options;
19607
19201
  const side = getSide(placement);
19608
- const isBasePlacement = side === initialPlacement;
19202
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
19203
+ const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
19609
19204
  const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
19205
+ if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== "none") {
19206
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
19207
+ }
19610
19208
  const placements = [initialPlacement, ...fallbackPlacements];
19611
19209
  const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
19612
19210
  const overflows = [];
@@ -19618,7 +19216,7 @@ Please add \`${key}Action\` when creating your handler.`);
19618
19216
  const {
19619
19217
  main,
19620
19218
  cross
19621
- } = getAlignmentSides(placement, rects, await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)));
19219
+ } = getAlignmentSides(placement, rects, rtl);
19622
19220
  overflows.push(overflow[main], overflow[cross]);
19623
19221
  }
19624
19222
  overflowsData = [...overflowsData, {
@@ -19626,8 +19224,8 @@ Please add \`${key}Action\` when creating your handler.`);
19626
19224
  overflows
19627
19225
  }];
19628
19226
  if (!overflows.every((side2) => side2 <= 0)) {
19629
- var _middlewareData$flip$, _middlewareData$flip2;
19630
- const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) != null ? _middlewareData$flip$ : 0) + 1;
19227
+ var _middlewareData$flip2;
19228
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
19631
19229
  const nextPlacement = placements[nextIndex];
19632
19230
  if (nextPlacement) {
19633
19231
  return {
@@ -19677,14 +19275,18 @@ Please add \`${key}Action\` when creating your handler.`);
19677
19275
  function isAnySideFullyClipped(overflow) {
19678
19276
  return sides.some((side) => overflow[side] >= 0);
19679
19277
  }
19680
- const hide = function(_temp) {
19681
- let {
19682
- strategy = "referenceHidden",
19683
- ...detectOverflowOptions
19684
- } = _temp === void 0 ? {} : _temp;
19278
+ const hide = function(options) {
19279
+ if (options === void 0) {
19280
+ options = {};
19281
+ }
19685
19282
  return {
19686
19283
  name: "hide",
19284
+ options,
19687
19285
  async fn(middlewareArguments) {
19286
+ const {
19287
+ strategy = "referenceHidden",
19288
+ ...detectOverflowOptions
19289
+ } = options;
19688
19290
  const {
19689
19291
  rects
19690
19292
  } = middlewareArguments;
@@ -19899,11 +19501,11 @@ Please add \`${key}Action\` when creating your handler.`);
19899
19501
  }
19900
19502
  }
19901
19503
  if (checkCrossAxis) {
19902
- var _middlewareData$offse, _middlewareData$offse2, _middlewareData$offse3, _middlewareData$offse4;
19504
+ var _middlewareData$offse, _middlewareData$offse2;
19903
19505
  const len = mainAxis === "y" ? "width" : "height";
19904
19506
  const isOriginSide = ["top", "left"].includes(getSide(placement));
19905
- const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? (_middlewareData$offse = (_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) != null ? _middlewareData$offse : 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
19906
- const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : (_middlewareData$offse3 = (_middlewareData$offse4 = middlewareData.offset) == null ? void 0 : _middlewareData$offse4[crossAxis]) != null ? _middlewareData$offse3 : 0) - (isOriginSide ? computedOffset.crossAxis : 0);
19507
+ const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
19508
+ const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
19907
19509
  if (crossAxisCoord < limitMin) {
19908
19510
  crossAxisCoord = limitMin;
19909
19511
  } else if (crossAxisCoord > limitMax) {
@@ -19917,30 +19519,25 @@ Please add \`${key}Action\` when creating your handler.`);
19917
19519
  }
19918
19520
  };
19919
19521
  };
19920
- const min = Math.min;
19921
- const max = Math.max;
19922
- const round = Math.round;
19923
- function getScale(element, paramRect) {
19924
- const rect = paramRect || element.getBoundingClientRect();
19925
- return {
19926
- x: element.offsetWidth > 0 ? round(rect.width) / element.offsetWidth || 1 : 1,
19927
- y: element.offsetHeight > 0 ? round(rect.height) / element.offsetHeight || 1 : 1
19928
- };
19929
- }
19930
19522
  function getWindow(node) {
19931
19523
  var _node$ownerDocument;
19932
19524
  return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
19933
19525
  }
19934
- function getComputedStyle(element) {
19526
+ function getComputedStyle$1(element) {
19935
19527
  return getWindow(element).getComputedStyle(element);
19936
19528
  }
19937
19529
  function getNodeName(node) {
19938
19530
  return isNode(node) ? (node.nodeName || "").toLowerCase() : "";
19939
19531
  }
19532
+ let uaString;
19940
19533
  function getUAString() {
19534
+ if (uaString) {
19535
+ return uaString;
19536
+ }
19941
19537
  const uaData = navigator.userAgentData;
19942
19538
  if (uaData && Array.isArray(uaData.brands)) {
19943
- return uaData.brands.map((item) => item.brand + "/" + item.version).join(" ");
19539
+ uaString = uaData.brands.map((item) => item.brand + "/" + item.version).join(" ");
19540
+ return uaString;
19944
19541
  }
19945
19542
  return navigator.userAgent;
19946
19543
  }
@@ -19966,15 +19563,15 @@ Please add \`${key}Action\` when creating your handler.`);
19966
19563
  overflowX,
19967
19564
  overflowY,
19968
19565
  display
19969
- } = getComputedStyle(element);
19970
- return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
19566
+ } = getComputedStyle$1(element);
19567
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
19971
19568
  }
19972
19569
  function isTableElement(element) {
19973
19570
  return ["table", "td", "th"].includes(getNodeName(element));
19974
19571
  }
19975
19572
  function isContainingBlock(element) {
19976
19573
  const isFirefox = /firefox/i.test(getUAString());
19977
- const css = getComputedStyle(element);
19574
+ const css = getComputedStyle$1(element);
19978
19575
  const backdropFilter = css.backdropFilter || css.WebkitBackdropFilter;
19979
19576
  return css.transform !== "none" || css.perspective !== "none" || (backdropFilter ? backdropFilter !== "none" : false) || isFirefox && css.willChange === "filter" || isFirefox && (css.filter ? css.filter !== "none" : false) || ["transform", "perspective"].some((value) => css.willChange.includes(value)) || ["paint", "layout", "strict", "content"].some(
19980
19577
  (value) => {
@@ -19989,8 +19586,59 @@ Please add \`${key}Action\` when creating your handler.`);
19989
19586
  function isLastTraversableNode(node) {
19990
19587
  return ["html", "body", "#document"].includes(getNodeName(node));
19991
19588
  }
19992
- function getBoundingClientRect(element, includeScale, isFixedStrategy) {
19993
- var _win$visualViewport$o, _win$visualViewport, _win$visualViewport$o2, _win$visualViewport2;
19589
+ const min = Math.min;
19590
+ const max = Math.max;
19591
+ const round = Math.round;
19592
+ function getCssDimensions(element) {
19593
+ const css = getComputedStyle$1(element);
19594
+ let width = parseFloat(css.width);
19595
+ let height = parseFloat(css.height);
19596
+ const offsetWidth = element.offsetWidth;
19597
+ const offsetHeight = element.offsetHeight;
19598
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
19599
+ if (shouldFallback) {
19600
+ width = offsetWidth;
19601
+ height = offsetHeight;
19602
+ }
19603
+ return {
19604
+ width,
19605
+ height,
19606
+ fallback: shouldFallback
19607
+ };
19608
+ }
19609
+ function unwrapElement(element) {
19610
+ return !isElement(element) ? element.contextElement : element;
19611
+ }
19612
+ const FALLBACK_SCALE = {
19613
+ x: 1,
19614
+ y: 1
19615
+ };
19616
+ function getScale(element) {
19617
+ const domElement = unwrapElement(element);
19618
+ if (!isHTMLElement(domElement)) {
19619
+ return FALLBACK_SCALE;
19620
+ }
19621
+ const rect = domElement.getBoundingClientRect();
19622
+ const {
19623
+ width,
19624
+ height,
19625
+ fallback
19626
+ } = getCssDimensions(domElement);
19627
+ let x = (fallback ? round(rect.width) : rect.width) / width;
19628
+ let y = (fallback ? round(rect.height) : rect.height) / height;
19629
+ if (!x || !Number.isFinite(x)) {
19630
+ x = 1;
19631
+ }
19632
+ if (!y || !Number.isFinite(y)) {
19633
+ y = 1;
19634
+ }
19635
+ return {
19636
+ x,
19637
+ y
19638
+ };
19639
+ }
19640
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
19641
+ var _win$visualViewport, _win$visualViewport2;
19994
19642
  if (includeScale === void 0) {
19995
19643
  includeScale = false;
19996
19644
  }
@@ -19998,25 +19646,42 @@ Please add \`${key}Action\` when creating your handler.`);
19998
19646
  isFixedStrategy = false;
19999
19647
  }
20000
19648
  const clientRect = element.getBoundingClientRect();
20001
- let contextRect = clientRect;
20002
- let elementToCheckForScale = element;
20003
- let scale2 = {
20004
- x: 1,
20005
- y: 1
20006
- };
20007
- if (!isElement(element) && element.contextElement) {
20008
- contextRect = element.contextElement.getBoundingClientRect();
20009
- elementToCheckForScale = element.contextElement;
20010
- }
20011
- if (includeScale && isHTMLElement(elementToCheckForScale)) {
20012
- scale2 = getScale(elementToCheckForScale, contextRect);
19649
+ const domElement = unwrapElement(element);
19650
+ let scale2 = FALLBACK_SCALE;
19651
+ if (includeScale) {
19652
+ if (offsetParent) {
19653
+ if (isElement(offsetParent)) {
19654
+ scale2 = getScale(offsetParent);
19655
+ }
19656
+ } else {
19657
+ scale2 = getScale(element);
19658
+ }
20013
19659
  }
20014
- const win = isElement(element) ? getWindow(element) : window;
19660
+ const win = domElement ? getWindow(domElement) : window;
20015
19661
  const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
20016
- const x = (clientRect.left + (addVisualOffsets ? (_win$visualViewport$o = (_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null ? _win$visualViewport$o : 0 : 0)) / scale2.x;
20017
- const y = (clientRect.top + (addVisualOffsets ? (_win$visualViewport$o2 = (_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null ? _win$visualViewport$o2 : 0 : 0)) / scale2.y;
20018
- const width = clientRect.width / scale2.x;
20019
- const height = clientRect.height / scale2.y;
19662
+ let x = (clientRect.left + (addVisualOffsets ? ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0 : 0)) / scale2.x;
19663
+ let y = (clientRect.top + (addVisualOffsets ? ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0 : 0)) / scale2.y;
19664
+ let width = clientRect.width / scale2.x;
19665
+ let height = clientRect.height / scale2.y;
19666
+ if (domElement) {
19667
+ const win2 = getWindow(domElement);
19668
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
19669
+ let currentIFrame = win2.frameElement;
19670
+ while (currentIFrame && offsetParent && offsetWin !== win2) {
19671
+ const iframeScale = getScale(currentIFrame);
19672
+ const iframeRect = currentIFrame.getBoundingClientRect();
19673
+ const css = getComputedStyle(currentIFrame);
19674
+ iframeRect.x += (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
19675
+ iframeRect.y += (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
19676
+ x *= iframeScale.x;
19677
+ y *= iframeScale.y;
19678
+ width *= iframeScale.x;
19679
+ height *= iframeScale.y;
19680
+ x += iframeRect.x;
19681
+ y += iframeRect.y;
19682
+ currentIFrame = getWindow(currentIFrame).frameElement;
19683
+ }
19684
+ }
20020
19685
  return {
20021
19686
  width,
20022
19687
  height,
@@ -20046,18 +19711,10 @@ Please add \`${key}Action\` when creating your handler.`);
20046
19711
  function getWindowScrollBarX(element) {
20047
19712
  return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
20048
19713
  }
20049
- function isScaled(element) {
20050
- const rect = getBoundingClientRect(element);
20051
- return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;
20052
- }
20053
19714
  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
20054
19715
  const isOffsetParentAnElement = isHTMLElement(offsetParent);
20055
19716
  const documentElement = getDocumentElement(offsetParent);
20056
- const rect = getBoundingClientRect(
20057
- element,
20058
- isOffsetParentAnElement && isScaled(offsetParent),
20059
- strategy === "fixed"
20060
- );
19717
+ const rect = getBoundingClientRect(element, true, strategy === "fixed", offsetParent);
20061
19718
  let scroll = {
20062
19719
  scrollLeft: 0,
20063
19720
  scrollTop: 0
@@ -20093,7 +19750,7 @@ Please add \`${key}Action\` when creating your handler.`);
20093
19750
  return isShadowRoot(result2) ? result2.host : result2;
20094
19751
  }
20095
19752
  function getTrueOffsetParent(element) {
20096
- if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
19753
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
20097
19754
  return null;
20098
19755
  }
20099
19756
  return element.offsetParent;
@@ -20112,26 +19769,16 @@ Please add \`${key}Action\` when creating your handler.`);
20112
19769
  function getOffsetParent(element) {
20113
19770
  const window2 = getWindow(element);
20114
19771
  let offsetParent = getTrueOffsetParent(element);
20115
- while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") {
19772
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") {
20116
19773
  offsetParent = getTrueOffsetParent(offsetParent);
20117
19774
  }
20118
- if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
19775
+ if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle$1(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
20119
19776
  return window2;
20120
19777
  }
20121
19778
  return offsetParent || getContainingBlock(element) || window2;
20122
19779
  }
20123
19780
  function getDimensions(element) {
20124
- if (isHTMLElement(element)) {
20125
- return {
20126
- width: element.offsetWidth,
20127
- height: element.offsetHeight
20128
- };
20129
- }
20130
- const rect = getBoundingClientRect(element);
20131
- return {
20132
- width: rect.width,
20133
- height: rect.height
20134
- };
19781
+ return getCssDimensions(element);
20135
19782
  }
20136
19783
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
20137
19784
  let {
@@ -20207,7 +19854,7 @@ Please add \`${key}Action\` when creating your handler.`);
20207
19854
  const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
20208
19855
  let x = -scroll.scrollLeft + getWindowScrollBarX(element);
20209
19856
  const y = -scroll.scrollTop;
20210
- if (getComputedStyle(body || html).direction === "rtl") {
19857
+ if (getComputedStyle$1(body || html).direction === "rtl") {
20211
19858
  x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
20212
19859
  }
20213
19860
  return {
@@ -20272,13 +19919,17 @@ Please add \`${key}Action\` when creating your handler.`);
20272
19919
  }
20273
19920
  return rectToClientRect(getDocumentRect(getDocumentElement(element)));
20274
19921
  }
20275
- function getClippingElementAncestors(element) {
19922
+ function getClippingElementAncestors(element, cache) {
19923
+ const cachedResult = cache.get(element);
19924
+ if (cachedResult) {
19925
+ return cachedResult;
19926
+ }
20276
19927
  let result2 = getOverflowAncestors(element).filter((el) => isElement(el) && getNodeName(el) !== "body");
20277
19928
  let currentContainingBlockComputedStyle = null;
20278
- const elementIsFixed = getComputedStyle(element).position === "fixed";
19929
+ const elementIsFixed = getComputedStyle$1(element).position === "fixed";
20279
19930
  let currentNode = elementIsFixed ? getParentNode(element) : element;
20280
19931
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
20281
- const computedStyle = getComputedStyle(currentNode);
19932
+ const computedStyle = getComputedStyle$1(currentNode);
20282
19933
  const containingBlock = isContainingBlock(currentNode);
20283
19934
  const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position);
20284
19935
  if (shouldDropCurrentNode) {
@@ -20288,6 +19939,7 @@ Please add \`${key}Action\` when creating your handler.`);
20288
19939
  }
20289
19940
  currentNode = getParentNode(currentNode);
20290
19941
  }
19942
+ cache.set(element, result2);
20291
19943
  return result2;
20292
19944
  }
20293
19945
  function getClippingRect(_ref) {
@@ -20297,7 +19949,7 @@ Please add \`${key}Action\` when creating your handler.`);
20297
19949
  rootBoundary,
20298
19950
  strategy
20299
19951
  } = _ref;
20300
- const elementClippingAncestors = boundary === "clippingAncestors" ? getClippingElementAncestors(element) : [].concat(boundary);
19952
+ const elementClippingAncestors = boundary === "clippingAncestors" ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
20301
19953
  const clippingAncestors = [...elementClippingAncestors, rootBoundary];
20302
19954
  const firstClippingAncestor = clippingAncestors[0];
20303
19955
  const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
@@ -20341,7 +19993,7 @@ Please add \`${key}Action\` when creating your handler.`);
20341
19993
  };
20342
19994
  },
20343
19995
  getClientRects: (element) => Array.from(element.getClientRects()),
20344
- isRTL: (element) => getComputedStyle(element).direction === "rtl"
19996
+ isRTL: (element) => getComputedStyle$1(element).direction === "rtl"
20345
19997
  };
20346
19998
  function autoUpdate(reference, floating, update2, options) {
20347
19999
  if (options === void 0) {
@@ -20403,10 +20055,21 @@ Please add \`${key}Action\` when creating your handler.`);
20403
20055
  }
20404
20056
  };
20405
20057
  }
20406
- const computePosition = (reference, floating, options) => computePosition$1(reference, floating, {
20407
- platform,
20408
- ...options
20409
- });
20058
+ const computePosition = (reference, floating, options) => {
20059
+ const cache = /* @__PURE__ */ new Map();
20060
+ const mergedOptions = {
20061
+ platform,
20062
+ ...options
20063
+ };
20064
+ const platformWithCache = {
20065
+ ...mergedOptions.platform,
20066
+ _c: cache
20067
+ };
20068
+ return computePosition$1(reference, floating, {
20069
+ ...mergedOptions,
20070
+ platform: platformWithCache
20071
+ });
20072
+ };
20410
20073
  class Wrapper extends React__default.default.Component {
20411
20074
  constructor() {
20412
20075
  super(...arguments);
@@ -20510,7 +20173,7 @@ Please add \`${key}Action\` when creating your handler.`);
20510
20173
  const [targetElement, setTargetElement] = React$4.useState(null);
20511
20174
  function update2() {
20512
20175
  var _a, _b, _c;
20513
- return __awaiter$1(this, void 0, void 0, function* () {
20176
+ return __awaiter(this, void 0, void 0, function* () {
20514
20177
  const target = (_b = (_a = targetRef.current) === null || _a === void 0 ? void 0 : _a.element) !== null && _b !== void 0 ? _b : null;
20515
20178
  const floating2 = floatingRef.current;
20516
20179
  const arrowElement = arrowRef.current;
@@ -21524,7 +21187,7 @@ Please add \`${key}Action\` when creating your handler.`);
21524
21187
  renderItem
21525
21188
  } = props;
21526
21189
  function processFile(file, fileList) {
21527
- return __awaiter$1(this, void 0, void 0, function* () {
21190
+ return __awaiter(this, void 0, void 0, function* () {
21528
21191
  const {
21529
21192
  beforeUpload
21530
21193
  } = props;
@@ -21538,7 +21201,7 @@ Please add \`${key}Action\` when creating your handler.`);
21538
21201
  }
21539
21202
  function onChange(e) {
21540
21203
  var _a;
21541
- return __awaiter$1(this, void 0, void 0, function* () {
21204
+ return __awaiter(this, void 0, void 0, function* () {
21542
21205
  e.persist();
21543
21206
  const {
21544
21207
  files: rawFiles
@@ -21571,7 +21234,7 @@ Please add \`${key}Action\` when creating your handler.`);
21571
21234
  file
21572
21235
  }));
21573
21236
  setTasks((prev) => [...getFinalTasks(prev), ...newTasks]);
21574
- yield Promise.all(newTasks.map((currentTask) => __awaiter$1(this, void 0, void 0, function* () {
21237
+ yield Promise.all(newTasks.map((currentTask) => __awaiter(this, void 0, void 0, function* () {
21575
21238
  try {
21576
21239
  const result2 = yield props.upload(currentTask.file);
21577
21240
  setTasks((prev) => {
@@ -21636,7 +21299,7 @@ Please add \`${key}Action\` when creating your handler.`);
21636
21299
  }
21637
21300
  onPreview && onPreview(index2, fileItem);
21638
21301
  },
21639
- onDelete: () => __awaiter$1(void 0, void 0, void 0, function* () {
21302
+ onDelete: () => __awaiter(void 0, void 0, void 0, function* () {
21640
21303
  var _c;
21641
21304
  const canDelete = yield (_c = props.onDelete) === null || _c === void 0 ? void 0 : _c.call(props, fileItem);
21642
21305
  if (canDelete === false)
@@ -21884,7 +21547,7 @@ Please add \`${key}Action\` when creating your handler.`);
21884
21547
  const InfiniteScroll$1 = (p) => {
21885
21548
  const props = mergeProps(defaultProps$w, p);
21886
21549
  const [failed, setFailed] = React$4.useState(false);
21887
- const doLoadMore = useLockFn((isRetry) => __awaiter$1(void 0, void 0, void 0, function* () {
21550
+ const doLoadMore = useLockFn((isRetry) => __awaiter(void 0, void 0, void 0, function* () {
21888
21551
  try {
21889
21552
  yield props.loadMore(isRetry);
21890
21553
  } catch (e) {
@@ -21898,7 +21561,7 @@ Please add \`${key}Action\` when creating your handler.`);
21898
21561
  const [scrollParent, setScrollParent] = React$4.useState();
21899
21562
  const {
21900
21563
  run: check
21901
- } = useThrottleFn(() => __awaiter$1(void 0, void 0, void 0, function* () {
21564
+ } = useThrottleFn(() => __awaiter(void 0, void 0, void 0, function* () {
21902
21565
  if (nextFlagRef.current !== flag)
21903
21566
  return;
21904
21567
  if (!props.hasMore)
@@ -21944,7 +21607,7 @@ Please add \`${key}Action\` when creating your handler.`);
21944
21607
  };
21945
21608
  }, [scrollParent]);
21946
21609
  function retry() {
21947
- return __awaiter$1(this, void 0, void 0, function* () {
21610
+ return __awaiter(this, void 0, void 0, function* () {
21948
21611
  setFailed(false);
21949
21612
  yield doLoadMore(true);
21950
21613
  setFlag(nextFlagRef.current);
@@ -22089,6 +21752,7 @@ Please add \`${key}Action\` when creating your handler.`);
22089
21752
  (_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e);
22090
21753
  },
22091
21754
  onClick: props.onClick,
21755
+ step: props.step,
22092
21756
  role: props.role,
22093
21757
  "aria-valuenow": props["aria-valuenow"],
22094
21758
  "aria-valuemax": props["aria-valuemax"],
@@ -22256,7 +21920,7 @@ Please add \`${key}Action\` when creating your handler.`);
22256
21920
  return React__default.default.createElement(ModalActionButton, {
22257
21921
  key: action.key,
22258
21922
  action,
22259
- onAction: () => __awaiter$1(void 0, void 0, void 0, function* () {
21923
+ onAction: () => __awaiter(void 0, void 0, void 0, function* () {
22260
21924
  var _a, _b, _c;
22261
21925
  yield Promise.all([(_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action), (_b = props.onAction) === null || _b === void 0 ? void 0 : _b.call(props, action, index2)]);
22262
21926
  if (props.closeOnAction) {
@@ -22346,7 +22010,7 @@ Please add \`${key}Action\` when creating your handler.`);
22346
22010
  key: "confirm",
22347
22011
  text: props.confirmText,
22348
22012
  primary: true,
22349
- onClick: () => __awaiter$1(this, void 0, void 0, function* () {
22013
+ onClick: () => __awaiter(this, void 0, void 0, function* () {
22350
22014
  var _a;
22351
22015
  yield (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(props);
22352
22016
  resolve(true);
@@ -22354,7 +22018,7 @@ Please add \`${key}Action\` when creating your handler.`);
22354
22018
  }, {
22355
22019
  key: "cancel",
22356
22020
  text: props.cancelText,
22357
- onClick: () => __awaiter$1(this, void 0, void 0, function* () {
22021
+ onClick: () => __awaiter(this, void 0, void 0, function* () {
22358
22022
  var _b;
22359
22023
  yield (_b = props.onCancel) === null || _b === void 0 ? void 0 : _b.call(props);
22360
22024
  resolve(false);
@@ -22922,7 +22586,7 @@ Please add \`${key}Action\` when creating your handler.`);
22922
22586
  });
22923
22587
  }, []);
22924
22588
  function doRefresh() {
22925
- return __awaiter$1(this, void 0, void 0, function* () {
22589
+ return __awaiter(this, void 0, void 0, function* () {
22926
22590
  api.start({
22927
22591
  height: headHeight
22928
22592
  });
@@ -22932,7 +22596,7 @@ Please add \`${key}Action\` when creating your handler.`);
22932
22596
  setStatus("complete");
22933
22597
  } catch (e) {
22934
22598
  api.start({
22935
- to: (next) => __awaiter$1(this, void 0, void 0, function* () {
22599
+ to: (next) => __awaiter(this, void 0, void 0, function* () {
22936
22600
  yield next({
22937
22601
  height: 0
22938
22602
  });
@@ -22945,7 +22609,7 @@ Please add \`${key}Action\` when creating your handler.`);
22945
22609
  yield sleep(props.completeDelay);
22946
22610
  }
22947
22611
  api.start({
22948
- to: (next) => __awaiter$1(this, void 0, void 0, function* () {
22612
+ to: (next) => __awaiter(this, void 0, void 0, function* () {
22949
22613
  yield next({
22950
22614
  height: 0
22951
22615
  });
@@ -24311,9 +23975,8 @@ Please add \`${key}Action\` when creating your handler.`);
24311
23975
  return;
24312
23976
  _n = false;
24313
23977
  } else
24314
- for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true) {
23978
+ for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true)
24315
23979
  ;
24316
- }
24317
23980
  } catch (err) {
24318
23981
  _d = true, _e = err;
24319
23982
  } finally {
@@ -24336,9 +23999,8 @@ Please add \`${key}Action\` when creating your handler.`);
24336
23999
  function _arrayLikeToArray2(arr, len) {
24337
24000
  if (len == null || len > arr.length)
24338
24001
  len = arr.length;
24339
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
24002
+ for (var i = 0, arr2 = new Array(len); i < len; i++)
24340
24003
  arr2[i] = arr[i];
24341
- }
24342
24004
  return arr2;
24343
24005
  }
24344
24006
  module2.exports = _arrayLikeToArray2, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
@@ -24968,7 +24630,31 @@ Please add \`${key}Action\` when creating your handler.`);
24968
24630
  }, [state]);
24969
24631
  return [state, setState, ref];
24970
24632
  }
24633
+ function mergeFuncProps(p1, p2) {
24634
+ const p1Keys = Object.keys(p1);
24635
+ const p2Keys = Object.keys(p2);
24636
+ const keys2 = /* @__PURE__ */ new Set([...p1Keys, ...p2Keys]);
24637
+ const res = {};
24638
+ keys2.forEach((key) => {
24639
+ const p1Value = p1[key];
24640
+ const p2Value = p2[key];
24641
+ if (typeof p1Value === "function" && typeof p2Value === "function") {
24642
+ res[key] = function(...args) {
24643
+ p1Value(...args);
24644
+ p2Value(...args);
24645
+ };
24646
+ } else {
24647
+ res[key] = p1Value || p2Value;
24648
+ }
24649
+ });
24650
+ return res;
24651
+ }
24971
24652
  const classPrefix$a = `adm-swiper`;
24653
+ const eventToPropRecord = {
24654
+ "mousedown": "onMouseDown",
24655
+ "mousemove": "onMouseMove",
24656
+ "mouseup": "onMouseUp"
24657
+ };
24972
24658
  const defaultProps$a = {
24973
24659
  defaultIndex: 0,
24974
24660
  allowTouchMove: true,
@@ -24979,7 +24665,8 @@ Please add \`${key}Action\` when creating your handler.`);
24979
24665
  slideSize: 100,
24980
24666
  trackOffset: 0,
24981
24667
  stuckAtBoundary: true,
24982
- rubberband: true
24668
+ rubberband: true,
24669
+ stopPropagation: []
24983
24670
  };
24984
24671
  let currentUid;
24985
24672
  const Swiper = React$4.forwardRef(staged_1((p, ref) => {
@@ -25206,6 +24893,15 @@ Please add \`${key}Action\` when creating your handler.`);
25206
24893
  "--slide-size": `${props.slideSize}%`,
25207
24894
  "--track-offset": `${props.trackOffset}%`
25208
24895
  };
24896
+ const dragProps = Object.assign({}, props.allowTouchMove ? bind() : {});
24897
+ const stopPropagationProps = {};
24898
+ for (const key of props.stopPropagation) {
24899
+ const prop = eventToPropRecord[key];
24900
+ stopPropagationProps[prop] = function(e) {
24901
+ e.stopPropagation();
24902
+ };
24903
+ }
24904
+ const mergedProps = mergeFuncProps(dragProps, stopPropagationProps);
25209
24905
  return withNativeProps(props, React__default.default.createElement("div", {
25210
24906
  className: classNames(classPrefix$a, `${classPrefix$a}-${props.direction}`),
25211
24907
  style
@@ -25220,7 +24916,7 @@ Please add \`${key}Action\` when creating your handler.`);
25220
24916
  }
25221
24917
  forceCancelDrag();
25222
24918
  }
25223
- }, props.allowTouchMove ? bind() : {}), renderTrackInner()), props.indicator === void 0 ? React__default.default.createElement("div", {
24919
+ }, mergedProps), renderTrackInner()), props.indicator === void 0 ? React__default.default.createElement("div", {
25224
24920
  className: `${classPrefix$a}-indicator`
25225
24921
  }, React__default.default.createElement(PageIndicator, Object.assign({}, props.indicatorProps, {
25226
24922
  total: count,
@@ -25275,7 +24971,7 @@ Please add \`${key}Action\` when creating your handler.`);
25275
24971
  onChange: props.onChange
25276
24972
  });
25277
24973
  function onClick() {
25278
- return __awaiter$1(this, void 0, void 0, function* () {
24974
+ return __awaiter(this, void 0, void 0, function* () {
25279
24975
  if (disabled || props.loading || changing) {
25280
24976
  return;
25281
24977
  }
@@ -26227,7 +25923,7 @@ Please add \`${key}Action\` when creating your handler.`);
26227
25923
  className: classNames(classPrefix)
26228
25924
  }, label && React__default.default.createElement("div", {
26229
25925
  className: `${classPrefix}-label`
26230
- }, React__default.default.createElement(Divider$1, null, label)), links && links.length > 0 && React__default.default.createElement("div", {
25926
+ }, React__default.default.createElement(Divider, null, label)), links && links.length > 0 && React__default.default.createElement("div", {
26231
25927
  className: `${classPrefix}-links`
26232
25928
  }, links.map((link, index2) => {
26233
25929
  return React__default.default.createElement(React__default.default.Fragment, {
@@ -26236,7 +25932,7 @@ Please add \`${key}Action\` when creating your handler.`);
26236
25932
  href: link.href,
26237
25933
  rel: "noopener noreferrer",
26238
25934
  onClick: (event) => clickLinkItem(link, index2, event)
26239
- }, link.text), index2 !== links.length - 1 && React__default.default.createElement(Divider$1, {
25935
+ }, link.text), index2 !== links.length - 1 && React__default.default.createElement(Divider, {
26240
25936
  direction: "vertical"
26241
25937
  }));
26242
25938
  })), content && React__default.default.createElement("div", {