@univerjs/design 0.2.12 → 0.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1240,13 +1240,13 @@ const _FastColor = class _FastColor {
1240
1240
  };
1241
1241
  __name(_FastColor, "FastColor");
1242
1242
  let FastColor = _FastColor;
1243
- var _excluded$y = ["b"], _excluded2$8 = ["v"], getRoundNumber = /* @__PURE__ */ __name(function(value) {
1243
+ var _excluded$x = ["b"], _excluded2$7 = ["v"], getRoundNumber = /* @__PURE__ */ __name(function(value) {
1244
1244
  return Math.round(Number(value || 0));
1245
1245
  }, "getRoundNumber"), convertHsb2Hsv = /* @__PURE__ */ __name(function(color) {
1246
1246
  if (color instanceof FastColor)
1247
1247
  return color;
1248
1248
  if (color && _typeof$4(color) === "object" && "h" in color && "b" in color) {
1249
- var _ref = color, b2 = _ref.b, resets = _objectWithoutProperties$3(_ref, _excluded$y);
1249
+ var _ref = color, b2 = _ref.b, resets = _objectWithoutProperties$3(_ref, _excluded$x);
1250
1250
  return _objectSpread2$3(_objectSpread2$3({}, resets), {}, {
1251
1251
  v: b2
1252
1252
  });
@@ -1267,7 +1267,7 @@ var _excluded$y = ["b"], _excluded2$8 = ["v"], getRoundNumber = /* @__PURE__ */
1267
1267
  }, {
1268
1268
  key: "toHsb",
1269
1269
  value: /* @__PURE__ */ __name(function() {
1270
- var _this$toHsv = this.toHsv(), v2 = _this$toHsv.v, resets = _objectWithoutProperties$3(_this$toHsv, _excluded2$8);
1270
+ var _this$toHsv = this.toHsv(), v2 = _this$toHsv.v, resets = _objectWithoutProperties$3(_this$toHsv, _excluded2$7);
1271
1271
  return _objectSpread2$3(_objectSpread2$3({}, resets), {}, {
1272
1272
  b: v2,
1273
1273
  a: this.a
@@ -1729,10 +1729,6 @@ function _toConsumableArray$5(r) {
1729
1729
  return _arrayWithoutHoles$4(r) || _iterableToArray$4(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread$4();
1730
1730
  }
1731
1731
  __name(_toConsumableArray$5, "_toConsumableArray$5");
1732
- function _toArray(r) {
1733
- return _arrayWithHoles$2(r) || _iterableToArray$4(r) || _unsupportedIterableToArray$1(r) || _nonIterableRest$2();
1734
- }
1735
- __name(_toArray, "_toArray");
1736
1732
  var warned$1 = {}, preMessage$1 = /* @__PURE__ */ __name(function(fn) {
1737
1733
  }, "preMessage2");
1738
1734
  function warning$2(valid, message2) {
@@ -3120,7 +3116,7 @@ function _objectWithoutProperties$2(e2, t2) {
3120
3116
  return i;
3121
3117
  }
3122
3118
  __name(_objectWithoutProperties$2, "_objectWithoutProperties$2");
3123
- var Context$1 = /* @__PURE__ */ React$6.createContext({});
3119
+ var Context = /* @__PURE__ */ React$6.createContext({});
3124
3120
  function _classCallCheck$2(a, n2) {
3125
3121
  if (!(a instanceof n2)) throw new TypeError("Cannot call a class as a function");
3126
3122
  }
@@ -3197,7 +3193,7 @@ function _createSuper$2(t2) {
3197
3193
  };
3198
3194
  }
3199
3195
  __name(_createSuper$2, "_createSuper$2");
3200
- var DomWrapper$2 = /* @__PURE__ */ function(_React$Component) {
3196
+ var DomWrapper$1 = /* @__PURE__ */ function(_React$Component) {
3201
3197
  _inherits$2(DomWrapper2, _React$Component);
3202
3198
  var _super = _createSuper$2(DomWrapper2);
3203
3199
  function DomWrapper2() {
@@ -3221,41 +3217,41 @@ function useSyncState$1(defaultValue) {
3221
3217
  return [getValue, setValue];
3222
3218
  }
3223
3219
  __name(useSyncState$1, "useSyncState$1");
3224
- var STATUS_NONE$1 = "none", STATUS_APPEAR$1 = "appear", STATUS_ENTER$1 = "enter", STATUS_LEAVE$1 = "leave", STEP_NONE$1 = "none", STEP_PREPARE$1 = "prepare", STEP_START$1 = "start", STEP_ACTIVE$1 = "active", STEP_ACTIVATED$1 = "end", STEP_PREPARED$1 = "prepared";
3225
- function makePrefixMap$1(styleProp, eventName) {
3220
+ var STATUS_NONE = "none", STATUS_APPEAR = "appear", STATUS_ENTER = "enter", STATUS_LEAVE = "leave", STEP_NONE = "none", STEP_PREPARE = "prepare", STEP_START = "start", STEP_ACTIVE = "active", STEP_ACTIVATED = "end", STEP_PREPARED = "prepared";
3221
+ function makePrefixMap(styleProp, eventName) {
3226
3222
  var prefixes2 = {};
3227
3223
  return prefixes2[styleProp.toLowerCase()] = eventName.toLowerCase(), prefixes2["Webkit".concat(styleProp)] = "webkit".concat(eventName), prefixes2["Moz".concat(styleProp)] = "moz".concat(eventName), prefixes2["ms".concat(styleProp)] = "MS".concat(eventName), prefixes2["O".concat(styleProp)] = "o".concat(eventName.toLowerCase()), prefixes2;
3228
3224
  }
3229
- __name(makePrefixMap$1, "makePrefixMap$1");
3230
- function getVendorPrefixes$1(domSupport, win) {
3225
+ __name(makePrefixMap, "makePrefixMap");
3226
+ function getVendorPrefixes(domSupport, win) {
3231
3227
  var prefixes2 = {
3232
- animationend: makePrefixMap$1("Animation", "AnimationEnd"),
3233
- transitionend: makePrefixMap$1("Transition", "TransitionEnd")
3228
+ animationend: makePrefixMap("Animation", "AnimationEnd"),
3229
+ transitionend: makePrefixMap("Transition", "TransitionEnd")
3234
3230
  };
3235
3231
  return domSupport && ("AnimationEvent" in win || delete prefixes2.animationend.animation, "TransitionEvent" in win || delete prefixes2.transitionend.transition), prefixes2;
3236
3232
  }
3237
- __name(getVendorPrefixes$1, "getVendorPrefixes$1");
3238
- var vendorPrefixes$1 = getVendorPrefixes$1(canUseDom(), typeof window < "u" ? window : {}), style$1 = {};
3233
+ __name(getVendorPrefixes, "getVendorPrefixes");
3234
+ var vendorPrefixes = getVendorPrefixes(canUseDom(), typeof window < "u" ? window : {}), style = {};
3239
3235
  if (canUseDom()) {
3240
- var _document$createEleme$1 = document.createElement("div");
3241
- style$1 = _document$createEleme$1.style;
3242
- }
3243
- var prefixedEventNames$1 = {};
3244
- function getVendorPrefixedEventName$1(eventName) {
3245
- if (prefixedEventNames$1[eventName])
3246
- return prefixedEventNames$1[eventName];
3247
- var prefixMap = vendorPrefixes$1[eventName];
3236
+ var _document$createEleme = document.createElement("div");
3237
+ style = _document$createEleme.style;
3238
+ }
3239
+ var prefixedEventNames = {};
3240
+ function getVendorPrefixedEventName(eventName) {
3241
+ if (prefixedEventNames[eventName])
3242
+ return prefixedEventNames[eventName];
3243
+ var prefixMap = vendorPrefixes[eventName];
3248
3244
  if (prefixMap)
3249
3245
  for (var stylePropList = Object.keys(prefixMap), len = stylePropList.length, i = 0; i < len; i += 1) {
3250
3246
  var styleProp = stylePropList[i];
3251
- if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style$1)
3252
- return prefixedEventNames$1[eventName] = prefixMap[styleProp], prefixedEventNames$1[eventName];
3247
+ if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style)
3248
+ return prefixedEventNames[eventName] = prefixMap[styleProp], prefixedEventNames[eventName];
3253
3249
  }
3254
3250
  return "";
3255
3251
  }
3256
- __name(getVendorPrefixedEventName$1, "getVendorPrefixedEventName$1");
3257
- var internalAnimationEndName$1 = getVendorPrefixedEventName$1("animationend"), internalTransitionEndName$1 = getVendorPrefixedEventName$1("transitionend"), supportTransition$1 = !!(internalAnimationEndName$1 && internalTransitionEndName$1), animationEndName$1 = internalAnimationEndName$1 || "animationend", transitionEndName$1 = internalTransitionEndName$1 || "transitionend";
3258
- function getTransitionName$1(transitionName, transitionType) {
3252
+ __name(getVendorPrefixedEventName, "getVendorPrefixedEventName");
3253
+ var internalAnimationEndName = getVendorPrefixedEventName("animationend"), internalTransitionEndName = getVendorPrefixedEventName("transitionend"), supportTransition = !!(internalAnimationEndName && internalTransitionEndName), animationEndName = internalAnimationEndName || "animationend", transitionEndName = internalTransitionEndName || "transitionend";
3254
+ function getTransitionName(transitionName, transitionType) {
3259
3255
  if (!transitionName) return null;
3260
3256
  if (_typeof$2(transitionName) === "object") {
3261
3257
  var type2 = transitionType.replace(/-\w/g, function(match2) {
@@ -3265,23 +3261,23 @@ function getTransitionName$1(transitionName, transitionType) {
3265
3261
  }
3266
3262
  return "".concat(transitionName, "-").concat(transitionType);
3267
3263
  }
3268
- __name(getTransitionName$1, "getTransitionName$1");
3269
- const useDomMotionEvents$1 = /* @__PURE__ */ __name(function(onInternalMotionEnd) {
3264
+ __name(getTransitionName, "getTransitionName");
3265
+ const useDomMotionEvents = /* @__PURE__ */ __name(function(onInternalMotionEnd) {
3270
3266
  var cacheElementRef = useRef();
3271
3267
  function removeMotionEvents(element2) {
3272
- element2 && (element2.removeEventListener(transitionEndName$1, onInternalMotionEnd), element2.removeEventListener(animationEndName$1, onInternalMotionEnd));
3268
+ element2 && (element2.removeEventListener(transitionEndName, onInternalMotionEnd), element2.removeEventListener(animationEndName, onInternalMotionEnd));
3273
3269
  }
3274
3270
  __name(removeMotionEvents, "removeMotionEvents");
3275
3271
  function patchMotionEvents(element2) {
3276
- cacheElementRef.current && cacheElementRef.current !== element2 && removeMotionEvents(cacheElementRef.current), element2 && element2 !== cacheElementRef.current && (element2.addEventListener(transitionEndName$1, onInternalMotionEnd), element2.addEventListener(animationEndName$1, onInternalMotionEnd), cacheElementRef.current = element2);
3272
+ cacheElementRef.current && cacheElementRef.current !== element2 && removeMotionEvents(cacheElementRef.current), element2 && element2 !== cacheElementRef.current && (element2.addEventListener(transitionEndName, onInternalMotionEnd), element2.addEventListener(animationEndName, onInternalMotionEnd), cacheElementRef.current = element2);
3277
3273
  }
3278
3274
  return __name(patchMotionEvents, "patchMotionEvents"), React$6.useEffect(function() {
3279
3275
  return function() {
3280
3276
  removeMotionEvents(cacheElementRef.current);
3281
3277
  };
3282
3278
  }, []), [patchMotionEvents, removeMotionEvents];
3283
- }, "useDomMotionEvents$1");
3284
- var useIsomorphicLayoutEffect$1 = canUseDom() ? useLayoutEffect$2 : useEffect, raf = /* @__PURE__ */ __name(function(callback) {
3279
+ }, "useDomMotionEvents");
3280
+ var useIsomorphicLayoutEffect = canUseDom() ? useLayoutEffect$2 : useEffect, raf = /* @__PURE__ */ __name(function(callback) {
3285
3281
  return +setTimeout(callback, 16);
3286
3282
  }, "raf2"), caf = /* @__PURE__ */ __name(function(num) {
3287
3283
  return clearTimeout(num);
@@ -3316,7 +3312,7 @@ wrapperRaf.cancel = function(id) {
3316
3312
  var realId = rafIds.get(id);
3317
3313
  return cleanup(id), caf(realId);
3318
3314
  };
3319
- const useNextFrame$1 = /* @__PURE__ */ __name(function() {
3315
+ const useNextFrame = /* @__PURE__ */ __name(function() {
3320
3316
  var nextFrameRef = React$6.useRef(null);
3321
3317
  function cancelNextFrame() {
3322
3318
  wrapperRaf.cancel(nextFrameRef.current);
@@ -3339,23 +3335,23 @@ const useNextFrame$1 = /* @__PURE__ */ __name(function() {
3339
3335
  cancelNextFrame();
3340
3336
  };
3341
3337
  }, []), [nextFrame, cancelNextFrame];
3342
- }, "useNextFrame$1");
3343
- var FULL_STEP_QUEUE$1 = [STEP_PREPARE$1, STEP_START$1, STEP_ACTIVE$1, STEP_ACTIVATED$1], SIMPLE_STEP_QUEUE$1 = [STEP_PREPARE$1, STEP_PREPARED$1], SkipStep$1 = !1, DoStep$1 = !0;
3344
- function isActive$1(step) {
3345
- return step === STEP_ACTIVE$1 || step === STEP_ACTIVATED$1;
3346
- }
3347
- __name(isActive$1, "isActive$1");
3348
- const useStepQueue$1 = /* @__PURE__ */ __name(function(status, prepareOnly, callback) {
3349
- var _useState = useSafeState(STEP_NONE$1), _useState2 = _slicedToArray$1(_useState, 2), step = _useState2[0], setStep = _useState2[1], _useNextFrame = useNextFrame$1(), _useNextFrame2 = _slicedToArray$1(_useNextFrame, 2), nextFrame = _useNextFrame2[0], cancelNextFrame = _useNextFrame2[1];
3338
+ }, "useNextFrame");
3339
+ var FULL_STEP_QUEUE = [STEP_PREPARE, STEP_START, STEP_ACTIVE, STEP_ACTIVATED], SIMPLE_STEP_QUEUE = [STEP_PREPARE, STEP_PREPARED], SkipStep = !1, DoStep = !0;
3340
+ function isActive(step) {
3341
+ return step === STEP_ACTIVE || step === STEP_ACTIVATED;
3342
+ }
3343
+ __name(isActive, "isActive");
3344
+ const useStepQueue = /* @__PURE__ */ __name(function(status, prepareOnly, callback) {
3345
+ var _useState = useSafeState(STEP_NONE), _useState2 = _slicedToArray$1(_useState, 2), step = _useState2[0], setStep = _useState2[1], _useNextFrame = useNextFrame(), _useNextFrame2 = _slicedToArray$1(_useNextFrame, 2), nextFrame = _useNextFrame2[0], cancelNextFrame = _useNextFrame2[1];
3350
3346
  function startQueue() {
3351
- setStep(STEP_PREPARE$1, !0);
3347
+ setStep(STEP_PREPARE, !0);
3352
3348
  }
3353
3349
  __name(startQueue, "startQueue");
3354
- var STEP_QUEUE = prepareOnly ? SIMPLE_STEP_QUEUE$1 : FULL_STEP_QUEUE$1;
3355
- return useIsomorphicLayoutEffect$1(function() {
3356
- if (step !== STEP_NONE$1 && step !== STEP_ACTIVATED$1) {
3350
+ var STEP_QUEUE = prepareOnly ? SIMPLE_STEP_QUEUE : FULL_STEP_QUEUE;
3351
+ return useIsomorphicLayoutEffect(function() {
3352
+ if (step !== STEP_NONE && step !== STEP_ACTIVATED) {
3357
3353
  var index2 = STEP_QUEUE.indexOf(step), nextStep = STEP_QUEUE[index2 + 1], result = callback(step);
3358
- result === SkipStep$1 ? setStep(nextStep, !0) : nextStep && nextFrame(function(info) {
3354
+ result === SkipStep ? setStep(nextStep, !0) : nextStep && nextFrame(function(info) {
3359
3355
  function doNext() {
3360
3356
  info.isCanceled() || setStep(nextStep, !0);
3361
3357
  }
@@ -3367,68 +3363,68 @@ const useStepQueue$1 = /* @__PURE__ */ __name(function(status, prepareOnly, call
3367
3363
  cancelNextFrame();
3368
3364
  };
3369
3365
  }, []), [startQueue, step];
3370
- }, "useStepQueue$1");
3371
- function useStatus$1(supportMotion, visible, getElement, _ref) {
3372
- var _ref$motionEnter = _ref.motionEnter, motionEnter = _ref$motionEnter === void 0 ? !0 : _ref$motionEnter, _ref$motionAppear = _ref.motionAppear, motionAppear = _ref$motionAppear === void 0 ? !0 : _ref$motionAppear, _ref$motionLeave = _ref.motionLeave, motionLeave = _ref$motionLeave === void 0 ? !0 : _ref$motionLeave, motionDeadline = _ref.motionDeadline, motionLeaveImmediately = _ref.motionLeaveImmediately, onAppearPrepare = _ref.onAppearPrepare, onEnterPrepare = _ref.onEnterPrepare, onLeavePrepare = _ref.onLeavePrepare, onAppearStart = _ref.onAppearStart, onEnterStart = _ref.onEnterStart, onLeaveStart = _ref.onLeaveStart, onAppearActive = _ref.onAppearActive, onEnterActive = _ref.onEnterActive, onLeaveActive = _ref.onLeaveActive, onAppearEnd = _ref.onAppearEnd, onEnterEnd = _ref.onEnterEnd, onLeaveEnd = _ref.onLeaveEnd, onVisibleChanged = _ref.onVisibleChanged, _useState = useSafeState(), _useState2 = _slicedToArray$1(_useState, 2), asyncVisible = _useState2[0], setAsyncVisible = _useState2[1], _useSyncState = useSyncState$1(STATUS_NONE$1), _useSyncState2 = _slicedToArray$1(_useSyncState, 2), getStatus = _useSyncState2[0], setStatus = _useSyncState2[1], _useState3 = useSafeState(null), _useState4 = _slicedToArray$1(_useState3, 2), style2 = _useState4[0], setStyle = _useState4[1], currentStatus = getStatus(), mountedRef = useRef(!1), deadlineRef = useRef(null);
3366
+ }, "useStepQueue");
3367
+ function useStatus(supportMotion, visible, getElement, _ref) {
3368
+ var _ref$motionEnter = _ref.motionEnter, motionEnter = _ref$motionEnter === void 0 ? !0 : _ref$motionEnter, _ref$motionAppear = _ref.motionAppear, motionAppear = _ref$motionAppear === void 0 ? !0 : _ref$motionAppear, _ref$motionLeave = _ref.motionLeave, motionLeave = _ref$motionLeave === void 0 ? !0 : _ref$motionLeave, motionDeadline = _ref.motionDeadline, motionLeaveImmediately = _ref.motionLeaveImmediately, onAppearPrepare = _ref.onAppearPrepare, onEnterPrepare = _ref.onEnterPrepare, onLeavePrepare = _ref.onLeavePrepare, onAppearStart = _ref.onAppearStart, onEnterStart = _ref.onEnterStart, onLeaveStart = _ref.onLeaveStart, onAppearActive = _ref.onAppearActive, onEnterActive = _ref.onEnterActive, onLeaveActive = _ref.onLeaveActive, onAppearEnd = _ref.onAppearEnd, onEnterEnd = _ref.onEnterEnd, onLeaveEnd = _ref.onLeaveEnd, onVisibleChanged = _ref.onVisibleChanged, _useState = useSafeState(), _useState2 = _slicedToArray$1(_useState, 2), asyncVisible = _useState2[0], setAsyncVisible = _useState2[1], _useSyncState = useSyncState$1(STATUS_NONE), _useSyncState2 = _slicedToArray$1(_useSyncState, 2), getStatus = _useSyncState2[0], setStatus = _useSyncState2[1], _useState3 = useSafeState(null), _useState4 = _slicedToArray$1(_useState3, 2), style2 = _useState4[0], setStyle = _useState4[1], currentStatus = getStatus(), mountedRef = useRef(!1), deadlineRef = useRef(null);
3373
3369
  function getDomElement() {
3374
3370
  return getElement();
3375
3371
  }
3376
3372
  __name(getDomElement, "getDomElement");
3377
3373
  var activeRef = useRef(!1);
3378
3374
  function updateMotionEndStatus() {
3379
- setStatus(STATUS_NONE$1), setStyle(null, !0);
3375
+ setStatus(STATUS_NONE), setStyle(null, !0);
3380
3376
  }
3381
3377
  __name(updateMotionEndStatus, "updateMotionEndStatus");
3382
3378
  var onInternalMotionEnd = useEvent(function(event) {
3383
3379
  var status = getStatus();
3384
- if (status !== STATUS_NONE$1) {
3380
+ if (status !== STATUS_NONE) {
3385
3381
  var element2 = getDomElement();
3386
3382
  if (!(event && !event.deadline && event.target !== element2)) {
3387
3383
  var currentActive = activeRef.current, canEnd;
3388
- status === STATUS_APPEAR$1 && currentActive ? canEnd = onAppearEnd == null ? void 0 : onAppearEnd(element2, event) : status === STATUS_ENTER$1 && currentActive ? canEnd = onEnterEnd == null ? void 0 : onEnterEnd(element2, event) : status === STATUS_LEAVE$1 && currentActive && (canEnd = onLeaveEnd == null ? void 0 : onLeaveEnd(element2, event)), currentActive && canEnd !== !1 && updateMotionEndStatus();
3384
+ status === STATUS_APPEAR && currentActive ? canEnd = onAppearEnd == null ? void 0 : onAppearEnd(element2, event) : status === STATUS_ENTER && currentActive ? canEnd = onEnterEnd == null ? void 0 : onEnterEnd(element2, event) : status === STATUS_LEAVE && currentActive && (canEnd = onLeaveEnd == null ? void 0 : onLeaveEnd(element2, event)), currentActive && canEnd !== !1 && updateMotionEndStatus();
3389
3385
  }
3390
3386
  }
3391
- }), _useDomMotionEvents = useDomMotionEvents$1(onInternalMotionEnd), _useDomMotionEvents2 = _slicedToArray$1(_useDomMotionEvents, 1), patchMotionEvents = _useDomMotionEvents2[0], getEventHandlers = /* @__PURE__ */ __name(function(targetStatus) {
3387
+ }), _useDomMotionEvents = useDomMotionEvents(onInternalMotionEnd), _useDomMotionEvents2 = _slicedToArray$1(_useDomMotionEvents, 1), patchMotionEvents = _useDomMotionEvents2[0], getEventHandlers = /* @__PURE__ */ __name(function(targetStatus) {
3392
3388
  switch (targetStatus) {
3393
- case STATUS_APPEAR$1:
3394
- return _defineProperty$b(_defineProperty$b(_defineProperty$b({}, STEP_PREPARE$1, onAppearPrepare), STEP_START$1, onAppearStart), STEP_ACTIVE$1, onAppearActive);
3395
- case STATUS_ENTER$1:
3396
- return _defineProperty$b(_defineProperty$b(_defineProperty$b({}, STEP_PREPARE$1, onEnterPrepare), STEP_START$1, onEnterStart), STEP_ACTIVE$1, onEnterActive);
3397
- case STATUS_LEAVE$1:
3398
- return _defineProperty$b(_defineProperty$b(_defineProperty$b({}, STEP_PREPARE$1, onLeavePrepare), STEP_START$1, onLeaveStart), STEP_ACTIVE$1, onLeaveActive);
3389
+ case STATUS_APPEAR:
3390
+ return _defineProperty$b(_defineProperty$b(_defineProperty$b({}, STEP_PREPARE, onAppearPrepare), STEP_START, onAppearStart), STEP_ACTIVE, onAppearActive);
3391
+ case STATUS_ENTER:
3392
+ return _defineProperty$b(_defineProperty$b(_defineProperty$b({}, STEP_PREPARE, onEnterPrepare), STEP_START, onEnterStart), STEP_ACTIVE, onEnterActive);
3393
+ case STATUS_LEAVE:
3394
+ return _defineProperty$b(_defineProperty$b(_defineProperty$b({}, STEP_PREPARE, onLeavePrepare), STEP_START, onLeaveStart), STEP_ACTIVE, onLeaveActive);
3399
3395
  default:
3400
3396
  return {};
3401
3397
  }
3402
3398
  }, "getEventHandlers"), eventHandlers = React$6.useMemo(function() {
3403
3399
  return getEventHandlers(currentStatus);
3404
- }, [currentStatus]), _useStepQueue = useStepQueue$1(currentStatus, !supportMotion, function(newStep) {
3405
- if (newStep === STEP_PREPARE$1) {
3406
- var onPrepare = eventHandlers[STEP_PREPARE$1];
3407
- return onPrepare ? onPrepare(getDomElement()) : SkipStep$1;
3400
+ }, [currentStatus]), _useStepQueue = useStepQueue(currentStatus, !supportMotion, function(newStep) {
3401
+ if (newStep === STEP_PREPARE) {
3402
+ var onPrepare = eventHandlers[STEP_PREPARE];
3403
+ return onPrepare ? onPrepare(getDomElement()) : SkipStep;
3408
3404
  }
3409
3405
  if (step in eventHandlers) {
3410
3406
  var _eventHandlers$step;
3411
3407
  setStyle(((_eventHandlers$step = eventHandlers[step]) === null || _eventHandlers$step === void 0 ? void 0 : _eventHandlers$step.call(eventHandlers, getDomElement(), null)) || null);
3412
3408
  }
3413
- return step === STEP_ACTIVE$1 && currentStatus !== STATUS_NONE$1 && (patchMotionEvents(getDomElement()), motionDeadline > 0 && (clearTimeout(deadlineRef.current), deadlineRef.current = setTimeout(function() {
3409
+ return step === STEP_ACTIVE && currentStatus !== STATUS_NONE && (patchMotionEvents(getDomElement()), motionDeadline > 0 && (clearTimeout(deadlineRef.current), deadlineRef.current = setTimeout(function() {
3414
3410
  onInternalMotionEnd({
3415
3411
  deadline: !0
3416
3412
  });
3417
- }, motionDeadline))), step === STEP_PREPARED$1 && updateMotionEndStatus(), DoStep$1;
3418
- }), _useStepQueue2 = _slicedToArray$1(_useStepQueue, 2), startStep = _useStepQueue2[0], step = _useStepQueue2[1], active = isActive$1(step);
3419
- activeRef.current = active, useIsomorphicLayoutEffect$1(function() {
3413
+ }, motionDeadline))), step === STEP_PREPARED && updateMotionEndStatus(), DoStep;
3414
+ }), _useStepQueue2 = _slicedToArray$1(_useStepQueue, 2), startStep = _useStepQueue2[0], step = _useStepQueue2[1], active = isActive(step);
3415
+ activeRef.current = active, useIsomorphicLayoutEffect(function() {
3420
3416
  setAsyncVisible(visible);
3421
3417
  var isMounted = mountedRef.current;
3422
3418
  mountedRef.current = !0;
3423
3419
  var nextStatus;
3424
- !isMounted && visible && motionAppear && (nextStatus = STATUS_APPEAR$1), isMounted && visible && motionEnter && (nextStatus = STATUS_ENTER$1), (isMounted && !visible && motionLeave || !isMounted && motionLeaveImmediately && !visible && motionLeave) && (nextStatus = STATUS_LEAVE$1);
3420
+ !isMounted && visible && motionAppear && (nextStatus = STATUS_APPEAR), isMounted && visible && motionEnter && (nextStatus = STATUS_ENTER), (isMounted && !visible && motionLeave || !isMounted && motionLeaveImmediately && !visible && motionLeave) && (nextStatus = STATUS_LEAVE);
3425
3421
  var nextEventHandlers = getEventHandlers(nextStatus);
3426
- nextStatus && (supportMotion || nextEventHandlers[STEP_PREPARE$1]) ? (setStatus(nextStatus), startStep()) : setStatus(STATUS_NONE$1);
3422
+ nextStatus && (supportMotion || nextEventHandlers[STEP_PREPARE]) ? (setStatus(nextStatus), startStep()) : setStatus(STATUS_NONE);
3427
3423
  }, [visible]), useEffect(function() {
3428
3424
  // Cancel appear
3429
- (currentStatus === STATUS_APPEAR$1 && !motionAppear || // Cancel enter
3430
- currentStatus === STATUS_ENTER$1 && !motionEnter || // Cancel leave
3431
- currentStatus === STATUS_LEAVE$1 && !motionLeave) && setStatus(STATUS_NONE$1);
3425
+ (currentStatus === STATUS_APPEAR && !motionAppear || // Cancel enter
3426
+ currentStatus === STATUS_ENTER && !motionEnter || // Cancel leave
3427
+ currentStatus === STATUS_LEAVE && !motionLeave) && setStatus(STATUS_NONE);
3432
3428
  }, [motionAppear, motionEnter, motionLeave]), useEffect(function() {
3433
3429
  return function() {
3434
3430
  mountedRef.current = !1, clearTimeout(deadlineRef.current);
@@ -3436,15 +3432,15 @@ function useStatus$1(supportMotion, visible, getElement, _ref) {
3436
3432
  }, []);
3437
3433
  var firstMountChangeRef = React$6.useRef(!1);
3438
3434
  useEffect(function() {
3439
- asyncVisible && (firstMountChangeRef.current = !0), asyncVisible !== void 0 && currentStatus === STATUS_NONE$1 && ((firstMountChangeRef.current || asyncVisible) && (onVisibleChanged == null || onVisibleChanged(asyncVisible)), firstMountChangeRef.current = !0);
3435
+ asyncVisible && (firstMountChangeRef.current = !0), asyncVisible !== void 0 && currentStatus === STATUS_NONE && ((firstMountChangeRef.current || asyncVisible) && (onVisibleChanged == null || onVisibleChanged(asyncVisible)), firstMountChangeRef.current = !0);
3440
3436
  }, [asyncVisible, currentStatus]);
3441
3437
  var mergedStyle = style2;
3442
- return eventHandlers[STEP_PREPARE$1] && step === STEP_START$1 && (mergedStyle = _objectSpread2$1({
3438
+ return eventHandlers[STEP_PREPARE] && step === STEP_START && (mergedStyle = _objectSpread2$1({
3443
3439
  transition: "none"
3444
3440
  }, mergedStyle)), [currentStatus, step, mergedStyle, asyncVisible != null ? asyncVisible : visible];
3445
3441
  }
3446
- __name(useStatus$1, "useStatus$1");
3447
- function genCSSMotion$1(config2) {
3442
+ __name(useStatus, "useStatus");
3443
+ function genCSSMotion(config2) {
3448
3444
  var transitionSupport = config2;
3449
3445
  _typeof$2(config2) === "object" && (transitionSupport = config2.transitionSupport);
3450
3446
  function isSupportTransition(props, contextMotion) {
@@ -3452,7 +3448,7 @@ function genCSSMotion$1(config2) {
3452
3448
  }
3453
3449
  __name(isSupportTransition, "isSupportTransition");
3454
3450
  var CSSMotion2 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
3455
- var _props$visible = props.visible, visible = _props$visible === void 0 ? !0 : _props$visible, _props$removeOnLeave = props.removeOnLeave, removeOnLeave = _props$removeOnLeave === void 0 ? !0 : _props$removeOnLeave, forceRender = props.forceRender, children = props.children, motionName = props.motionName, leavedClassName = props.leavedClassName, eventProps = props.eventProps, _React$useContext = React$6.useContext(Context$1), contextMotion = _React$useContext.motion, supportMotion = isSupportTransition(props, contextMotion), nodeRef = useRef(), wrapperNodeRef = useRef();
3451
+ var _props$visible = props.visible, visible = _props$visible === void 0 ? !0 : _props$visible, _props$removeOnLeave = props.removeOnLeave, removeOnLeave = _props$removeOnLeave === void 0 ? !0 : _props$removeOnLeave, forceRender = props.forceRender, children = props.children, motionName = props.motionName, leavedClassName = props.leavedClassName, eventProps = props.eventProps, _React$useContext = React$6.useContext(Context), contextMotion = _React$useContext.motion, supportMotion = isSupportTransition(props, contextMotion), nodeRef = useRef(), wrapperNodeRef = useRef();
3456
3452
  function getDomElement() {
3457
3453
  try {
3458
3454
  return nodeRef.current instanceof HTMLElement ? nodeRef.current : findDOMNode$1(wrapperNodeRef.current);
@@ -3461,7 +3457,7 @@ function genCSSMotion$1(config2) {
3461
3457
  }
3462
3458
  }
3463
3459
  __name(getDomElement, "getDomElement");
3464
- var _useStatus = useStatus$1(supportMotion, visible, getDomElement, props), _useStatus2 = _slicedToArray$1(_useStatus, 4), status = _useStatus2[0], statusStep = _useStatus2[1], statusStyle = _useStatus2[2], mergedVisible = _useStatus2[3], renderedRef = React$6.useRef(mergedVisible);
3460
+ var _useStatus = useStatus(supportMotion, visible, getDomElement, props), _useStatus2 = _slicedToArray$1(_useStatus, 4), status = _useStatus2[0], statusStep = _useStatus2[1], statusStyle = _useStatus2[2], mergedVisible = _useStatus2[3], renderedRef = React$6.useRef(mergedVisible);
3465
3461
  mergedVisible && (renderedRef.current = !0);
3466
3462
  var setNodeRef = React$6.useCallback(function(node) {
3467
3463
  nodeRef.current = node, fillRef(ref, node);
@@ -3470,7 +3466,7 @@ function genCSSMotion$1(config2) {
3470
3466
  });
3471
3467
  if (!children)
3472
3468
  motionChildren = null;
3473
- else if (status === STATUS_NONE$1)
3469
+ else if (status === STATUS_NONE)
3474
3470
  mergedVisible ? motionChildren = children(_objectSpread2$1({}, mergedProps), setNodeRef) : !removeOnLeave && renderedRef.current && leavedClassName ? motionChildren = children(_objectSpread2$1(_objectSpread2$1({}, mergedProps), {}, {
3475
3471
  className: leavedClassName
3476
3472
  }), setNodeRef) : forceRender || !removeOnLeave && !leavedClassName ? motionChildren = children(_objectSpread2$1(_objectSpread2$1({}, mergedProps), {}, {
@@ -3480,10 +3476,10 @@ function genCSSMotion$1(config2) {
3480
3476
  }), setNodeRef) : motionChildren = null;
3481
3477
  else {
3482
3478
  var statusSuffix;
3483
- statusStep === STEP_PREPARE$1 ? statusSuffix = "prepare" : isActive$1(statusStep) ? statusSuffix = "active" : statusStep === STEP_START$1 && (statusSuffix = "start");
3484
- var motionCls = getTransitionName$1(motionName, "".concat(status, "-").concat(statusSuffix));
3479
+ statusStep === STEP_PREPARE ? statusSuffix = "prepare" : isActive(statusStep) ? statusSuffix = "active" : statusStep === STEP_START && (statusSuffix = "start");
3480
+ var motionCls = getTransitionName(motionName, "".concat(status, "-").concat(statusSuffix));
3485
3481
  motionChildren = children(_objectSpread2$1(_objectSpread2$1({}, mergedProps), {}, {
3486
- className: clsx(getTransitionName$1(motionName, status), _defineProperty$b(_defineProperty$b({}, motionCls, motionCls && statusSuffix), motionName, typeof motionName == "string")),
3482
+ className: clsx(getTransitionName(motionName, status), _defineProperty$b(_defineProperty$b({}, motionCls, motionCls && statusSuffix), motionName, typeof motionName == "string")),
3487
3483
  style: statusStyle
3488
3484
  }), setNodeRef);
3489
3485
  }
@@ -3493,16 +3489,16 @@ function genCSSMotion$1(config2) {
3493
3489
  ref: setNodeRef
3494
3490
  }));
3495
3491
  }
3496
- return /* @__PURE__ */ React$6.createElement(DomWrapper$2, {
3492
+ return /* @__PURE__ */ React$6.createElement(DomWrapper$1, {
3497
3493
  ref: wrapperNodeRef
3498
3494
  }, motionChildren);
3499
3495
  });
3500
3496
  return CSSMotion2.displayName = "CSSMotion", CSSMotion2;
3501
3497
  }
3502
- __name(genCSSMotion$1, "genCSSMotion$1");
3503
- const CSSMotion$1 = genCSSMotion$1(supportTransition$1);
3504
- var STATUS_ADD$1 = "add", STATUS_KEEP$1 = "keep", STATUS_REMOVE$1 = "remove", STATUS_REMOVED$1 = "removed";
3505
- function wrapKeyToObject$1(key) {
3498
+ __name(genCSSMotion, "genCSSMotion");
3499
+ const CSSMotion = genCSSMotion(supportTransition);
3500
+ var STATUS_ADD = "add", STATUS_KEEP = "keep", STATUS_REMOVE = "remove", STATUS_REMOVED = "removed";
3501
+ function wrapKeyToObject(key) {
3506
3502
  var keyObj;
3507
3503
  return key && _typeof$2(key) === "object" && "key" in key ? keyObj = key : keyObj = {
3508
3504
  key
@@ -3510,34 +3506,34 @@ function wrapKeyToObject$1(key) {
3510
3506
  key: String(keyObj.key)
3511
3507
  });
3512
3508
  }
3513
- __name(wrapKeyToObject$1, "wrapKeyToObject$1");
3514
- function parseKeys$1() {
3509
+ __name(wrapKeyToObject, "wrapKeyToObject");
3510
+ function parseKeys() {
3515
3511
  var keys4 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
3516
- return keys4.map(wrapKeyToObject$1);
3512
+ return keys4.map(wrapKeyToObject);
3517
3513
  }
3518
- __name(parseKeys$1, "parseKeys$1");
3519
- function diffKeys$1() {
3520
- var prevKeys = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], currentKeys = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], list = [], currentIndex = 0, currentLen = currentKeys.length, prevKeyObjects = parseKeys$1(prevKeys), currentKeyObjects = parseKeys$1(currentKeys);
3514
+ __name(parseKeys, "parseKeys");
3515
+ function diffKeys() {
3516
+ var prevKeys = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], currentKeys = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], list = [], currentIndex = 0, currentLen = currentKeys.length, prevKeyObjects = parseKeys(prevKeys), currentKeyObjects = parseKeys(currentKeys);
3521
3517
  prevKeyObjects.forEach(function(keyObj) {
3522
3518
  for (var hit = !1, i = currentIndex; i < currentLen; i += 1) {
3523
3519
  var currentKeyObj = currentKeyObjects[i];
3524
3520
  if (currentKeyObj.key === keyObj.key) {
3525
3521
  currentIndex < i && (list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function(obj) {
3526
3522
  return _objectSpread2$1(_objectSpread2$1({}, obj), {}, {
3527
- status: STATUS_ADD$1
3523
+ status: STATUS_ADD
3528
3524
  });
3529
3525
  })), currentIndex = i), list.push(_objectSpread2$1(_objectSpread2$1({}, currentKeyObj), {}, {
3530
- status: STATUS_KEEP$1
3526
+ status: STATUS_KEEP
3531
3527
  })), currentIndex += 1, hit = !0;
3532
3528
  break;
3533
3529
  }
3534
3530
  }
3535
3531
  hit || list.push(_objectSpread2$1(_objectSpread2$1({}, keyObj), {}, {
3536
- status: STATUS_REMOVE$1
3532
+ status: STATUS_REMOVE
3537
3533
  }));
3538
3534
  }), currentIndex < currentLen && (list = list.concat(currentKeyObjects.slice(currentIndex).map(function(obj) {
3539
3535
  return _objectSpread2$1(_objectSpread2$1({}, obj), {}, {
3540
- status: STATUS_ADD$1
3536
+ status: STATUS_ADD
3541
3537
  });
3542
3538
  })));
3543
3539
  var keys4 = {};
@@ -3551,16 +3547,16 @@ function diffKeys$1() {
3551
3547
  return duplicatedKeys.forEach(function(matchKey) {
3552
3548
  list = list.filter(function(_ref2) {
3553
3549
  var key = _ref2.key, status = _ref2.status;
3554
- return key !== matchKey || status !== STATUS_REMOVE$1;
3550
+ return key !== matchKey || status !== STATUS_REMOVE;
3555
3551
  }), list.forEach(function(node) {
3556
- node.key === matchKey && (node.status = STATUS_KEEP$1);
3552
+ node.key === matchKey && (node.status = STATUS_KEEP);
3557
3553
  });
3558
3554
  }), list;
3559
3555
  }
3560
- __name(diffKeys$1, "diffKeys$1");
3561
- var _excluded$x = ["component", "children", "onVisibleChanged", "onAllRemoved"], _excluded2$7 = ["status"], MOTION_PROP_NAMES$1 = ["eventProps", "visible", "children", "motionName", "motionAppear", "motionEnter", "motionLeave", "motionLeaveImmediately", "motionDeadline", "removeOnLeave", "leavedClassName", "onAppearPrepare", "onAppearStart", "onAppearActive", "onAppearEnd", "onEnterStart", "onEnterActive", "onEnterEnd", "onLeaveStart", "onLeaveActive", "onLeaveEnd"];
3562
- function genCSSMotionList$1(transitionSupport) {
3563
- var CSSMotion2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : CSSMotion$1, CSSMotionList = /* @__PURE__ */ function(_React$Component) {
3556
+ __name(diffKeys, "diffKeys");
3557
+ var _excluded$w = ["component", "children", "onVisibleChanged", "onAllRemoved"], _excluded2$6 = ["status"], MOTION_PROP_NAMES = ["eventProps", "visible", "children", "motionName", "motionAppear", "motionEnter", "motionLeave", "motionLeaveImmediately", "motionDeadline", "removeOnLeave", "leavedClassName", "onAppearPrepare", "onAppearStart", "onAppearActive", "onAppearEnd", "onEnterStart", "onEnterActive", "onEnterEnd", "onLeaveStart", "onLeaveActive", "onLeaveEnd"];
3558
+ function genCSSMotionList(transitionSupport) {
3559
+ var CSSMotion$1 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : CSSMotion, CSSMotionList = /* @__PURE__ */ function(_React$Component) {
3564
3560
  _inherits$2(CSSMotionList2, _React$Component);
3565
3561
  var _super = _createSuper$2(CSSMotionList2);
3566
3562
  function CSSMotionList2() {
@@ -3573,26 +3569,26 @@ function genCSSMotionList$1(transitionSupport) {
3573
3569
  }), _defineProperty$b(_assertThisInitialized$2(_this), "removeKey", function(removeKey) {
3574
3570
  var keyEntities = _this.state.keyEntities, nextKeyEntities = keyEntities.map(function(entity) {
3575
3571
  return entity.key !== removeKey ? entity : _objectSpread2$1(_objectSpread2$1({}, entity), {}, {
3576
- status: STATUS_REMOVED$1
3572
+ status: STATUS_REMOVED
3577
3573
  });
3578
3574
  });
3579
3575
  return _this.setState({
3580
3576
  keyEntities: nextKeyEntities
3581
3577
  }), nextKeyEntities.filter(function(_ref) {
3582
3578
  var status = _ref.status;
3583
- return status !== STATUS_REMOVED$1;
3579
+ return status !== STATUS_REMOVED;
3584
3580
  }).length;
3585
3581
  }), _this;
3586
3582
  }
3587
3583
  return __name(CSSMotionList2, "CSSMotionList"), _createClass$2(CSSMotionList2, [{
3588
3584
  key: "render",
3589
3585
  value: /* @__PURE__ */ __name(function() {
3590
- var _this2 = this, keyEntities = this.state.keyEntities, _this$props = this.props, component = _this$props.component, children = _this$props.children, _onVisibleChanged = _this$props.onVisibleChanged, onAllRemoved = _this$props.onAllRemoved, restProps = _objectWithoutProperties$2(_this$props, _excluded$x), Component = component || React$6.Fragment, motionProps = {};
3591
- return MOTION_PROP_NAMES$1.forEach(function(prop) {
3586
+ var _this2 = this, keyEntities = this.state.keyEntities, _this$props = this.props, component = _this$props.component, children = _this$props.children, _onVisibleChanged = _this$props.onVisibleChanged, onAllRemoved = _this$props.onAllRemoved, restProps = _objectWithoutProperties$2(_this$props, _excluded$w), Component = component || React$6.Fragment, motionProps = {};
3587
+ return MOTION_PROP_NAMES.forEach(function(prop) {
3592
3588
  motionProps[prop] = restProps[prop], delete restProps[prop];
3593
3589
  }), delete restProps.keys, /* @__PURE__ */ React$6.createElement(Component, restProps, keyEntities.map(function(_ref2, index2) {
3594
- var status = _ref2.status, eventProps = _objectWithoutProperties$2(_ref2, _excluded2$7), visible = status === STATUS_ADD$1 || status === STATUS_KEEP$1;
3595
- return /* @__PURE__ */ React$6.createElement(CSSMotion2, _extends$6({}, motionProps, {
3590
+ var status = _ref2.status, eventProps = _objectWithoutProperties$2(_ref2, _excluded2$6), visible = status === STATUS_ADD || status === STATUS_KEEP;
3591
+ return /* @__PURE__ */ React$6.createElement(CSSMotion$1, _extends$6({}, motionProps, {
3596
3592
  key: eventProps.key,
3597
3593
  visible,
3598
3594
  eventProps,
@@ -3614,14 +3610,14 @@ function genCSSMotionList$1(transitionSupport) {
3614
3610
  }], [{
3615
3611
  key: "getDerivedStateFromProps",
3616
3612
  value: /* @__PURE__ */ __name(function(_ref3, _ref4) {
3617
- var keys4 = _ref3.keys, keyEntities = _ref4.keyEntities, parsedKeyObjects = parseKeys$1(keys4), mixedKeyEntities = diffKeys$1(keyEntities, parsedKeyObjects);
3613
+ var keys4 = _ref3.keys, keyEntities = _ref4.keyEntities, parsedKeyObjects = parseKeys(keys4), mixedKeyEntities = diffKeys(keyEntities, parsedKeyObjects);
3618
3614
  return {
3619
3615
  keyEntities: mixedKeyEntities.filter(function(entity) {
3620
3616
  var prevEntity = keyEntities.find(function(_ref5) {
3621
3617
  var key = _ref5.key;
3622
3618
  return entity.key === key;
3623
3619
  });
3624
- return !(prevEntity && prevEntity.status === STATUS_REMOVED$1 && entity.status === STATUS_REMOVE$1);
3620
+ return !(prevEntity && prevEntity.status === STATUS_REMOVED && entity.status === STATUS_REMOVE);
3625
3621
  })
3626
3622
  };
3627
3623
  }, "getDerivedStateFromProps")
@@ -3631,8 +3627,8 @@ function genCSSMotionList$1(transitionSupport) {
3631
3627
  component: "div"
3632
3628
  }), CSSMotionList;
3633
3629
  }
3634
- __name(genCSSMotionList$1, "genCSSMotionList$1");
3635
- genCSSMotionList$1(supportTransition$1);
3630
+ __name(genCSSMotionList, "genCSSMotionList");
3631
+ genCSSMotionList(supportTransition);
3636
3632
  const MemoChildren = /* @__PURE__ */ React$6.memo(function(_ref) {
3637
3633
  var children = _ref.children;
3638
3634
  return children;
@@ -3726,7 +3722,7 @@ var sentinelStyle = {
3726
3722
  var elementOffset = offset(dialogRef.current);
3727
3723
  setTransformOrigin(mousePosition && (mousePosition.x || mousePosition.y) ? "".concat(mousePosition.x - elementOffset.left, "px ").concat(mousePosition.y - elementOffset.top, "px") : "");
3728
3724
  }
3729
- return __name(onPrepare, "onPrepare"), /* @__PURE__ */ React$6.createElement(CSSMotion$1, {
3725
+ return __name(onPrepare, "onPrepare"), /* @__PURE__ */ React$6.createElement(CSSMotion, {
3730
3726
  visible,
3731
3727
  onVisibleChanged,
3732
3728
  onAppearPrepare: onPrepare,
@@ -3751,7 +3747,7 @@ var sentinelStyle = {
3751
3747
  Content.displayName = "Content";
3752
3748
  var Mask$1 = /* @__PURE__ */ __name(function(props) {
3753
3749
  var prefixCls = props.prefixCls, style2 = props.style, visible = props.visible, maskProps = props.maskProps, motionName = props.motionName, className = props.className;
3754
- return /* @__PURE__ */ React$6.createElement(CSSMotion$1, {
3750
+ return /* @__PURE__ */ React$6.createElement(CSSMotion, {
3755
3751
  key: "mask",
3756
3752
  visible,
3757
3753
  motionName,
@@ -5487,7 +5483,7 @@ function _defineProperties$1(e2, r) {
5487
5483
  }
5488
5484
  __name(_defineProperties$1, "_defineProperties$1");
5489
5485
  function _createClass$1(e2, r, t2) {
5490
- return r && _defineProperties$1(e2.prototype, r), t2 && _defineProperties$1(e2, t2), Object.defineProperty(e2, "prototype", {
5486
+ return r && _defineProperties$1(e2.prototype, r), Object.defineProperty(e2, "prototype", {
5491
5487
  writable: !1
5492
5488
  }), e2;
5493
5489
  }
@@ -5551,7 +5547,7 @@ function _createSuper$1(t2) {
5551
5547
  };
5552
5548
  }
5553
5549
  __name(_createSuper$1, "_createSuper$1");
5554
- var DomWrapper$1 = /* @__PURE__ */ function(_React$Component) {
5550
+ var DomWrapper = /* @__PURE__ */ function(_React$Component) {
5555
5551
  _inherits$1(DomWrapper2, _React$Component);
5556
5552
  var _super = _createSuper$1(DomWrapper2);
5557
5553
  function DomWrapper2() {
@@ -5570,489 +5566,80 @@ function SingleObserver(props, ref) {
5570
5566
  height: -1,
5571
5567
  offsetWidth: -1,
5572
5568
  offsetHeight: -1
5573
- }), canRef = !isRenderProps && /* @__PURE__ */ React$6.isValidElement(mergedChildren) && supportRef(mergedChildren), originRef = canRef ? mergedChildren.ref : null, mergedRef = useComposeRef(originRef, elementRef), getDom = /* @__PURE__ */ __name(function() {
5574
- var _elementRef$current;
5575
- return findDOMNode$1(elementRef.current) || // Support `nativeElement` format
5576
- (elementRef.current && _typeof$3(elementRef.current) === "object" ? findDOMNode$1((_elementRef$current = elementRef.current) === null || _elementRef$current === void 0 ? void 0 : _elementRef$current.nativeElement) : null) || findDOMNode$1(wrapperRef.current);
5577
- }, "getDom2");
5578
- React$6.useImperativeHandle(ref, function() {
5579
- return getDom();
5580
- });
5581
- var propsRef = React$6.useRef(props);
5582
- propsRef.current = props;
5583
- var onInternalResize = React$6.useCallback(function(target) {
5584
- var _propsRef$current = propsRef.current, onResize2 = _propsRef$current.onResize, data = _propsRef$current.data, _target$getBoundingCl = target.getBoundingClientRect(), width2 = _target$getBoundingCl.width, height2 = _target$getBoundingCl.height, offsetWidth = target.offsetWidth, offsetHeight = target.offsetHeight, fixedWidth = Math.floor(width2), fixedHeight = Math.floor(height2);
5585
- if (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) {
5586
- var size = {
5587
- width: fixedWidth,
5588
- height: fixedHeight,
5589
- offsetWidth,
5590
- offsetHeight
5591
- };
5592
- sizeRef.current = size;
5593
- var mergedOffsetWidth = offsetWidth === Math.round(width2) ? width2 : offsetWidth, mergedOffsetHeight = offsetHeight === Math.round(height2) ? height2 : offsetHeight, sizeInfo = _objectSpread2$2(_objectSpread2$2({}, size), {}, {
5594
- offsetWidth: mergedOffsetWidth,
5595
- offsetHeight: mergedOffsetHeight
5596
- });
5597
- onCollectionResize == null || onCollectionResize(sizeInfo, target, data), onResize2 && Promise.resolve().then(function() {
5598
- onResize2(sizeInfo, target);
5599
- });
5600
- }
5601
- }, []);
5602
- return React$6.useEffect(function() {
5603
- var currentElement = getDom();
5604
- return currentElement && !disabled && observe(currentElement, onInternalResize), function() {
5605
- return unobserve(currentElement, onInternalResize);
5606
- };
5607
- }, [elementRef.current, disabled]), /* @__PURE__ */ React$6.createElement(DomWrapper$1, {
5608
- ref: wrapperRef
5609
- }, canRef ? /* @__PURE__ */ React$6.cloneElement(mergedChildren, {
5610
- ref: mergedRef
5611
- }) : mergedChildren);
5612
- }
5613
- __name(SingleObserver, "SingleObserver");
5614
- var RefSingleObserver = /* @__PURE__ */ React$6.forwardRef(SingleObserver), INTERNAL_PREFIX_KEY = "rc-observer-key";
5615
- function ResizeObserver$1(props, ref) {
5616
- var children = props.children, childNodes = typeof children == "function" ? [children] : toArray$3(children);
5617
- return childNodes.map(function(child, index2) {
5618
- var key = (child == null ? void 0 : child.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(index2);
5619
- return /* @__PURE__ */ React$6.createElement(RefSingleObserver, _extends$5({}, props, {
5620
- key,
5621
- ref: index2 === 0 ? ref : void 0
5622
- }), child);
5623
- });
5624
- }
5625
- __name(ResizeObserver$1, "ResizeObserver$1");
5626
- var RefResizeObserver = /* @__PURE__ */ React$6.forwardRef(ResizeObserver$1);
5627
- RefResizeObserver.Collection = Collection;
5628
- function getRoot(ele) {
5629
- var _ele$getRootNode;
5630
- return ele == null || (_ele$getRootNode = ele.getRootNode) === null || _ele$getRootNode === void 0 ? void 0 : _ele$getRootNode.call(ele);
5631
- }
5632
- __name(getRoot, "getRoot");
5633
- function inShadow(ele) {
5634
- return getRoot(ele) instanceof ShadowRoot;
5635
- }
5636
- __name(inShadow, "inShadow");
5637
- function getShadowRoot(ele) {
5638
- return inShadow(ele) ? getRoot(ele) : null;
5639
- }
5640
- __name(getShadowRoot, "getShadowRoot");
5641
- const isMobile = /* @__PURE__ */ __name(function() {
5642
- if (typeof navigator > "u" || typeof window > "u")
5643
- return !1;
5644
- var agent = navigator.userAgent || navigator.vendor || window.opera;
5645
- return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent == null ? void 0 : agent.substr(0, 4));
5646
- }, "isMobile");
5647
- function _objectWithoutPropertiesLoose$3(r, e2) {
5648
- if (r == null) return {};
5649
- var t2 = {};
5650
- for (var n2 in r) if ({}.hasOwnProperty.call(r, n2)) {
5651
- if (e2.indexOf(n2) >= 0) continue;
5652
- t2[n2] = r[n2];
5653
- }
5654
- return t2;
5655
- }
5656
- __name(_objectWithoutPropertiesLoose$3, "_objectWithoutPropertiesLoose$3");
5657
- function _objectWithoutProperties$1(e2, t2) {
5658
- if (e2 == null) return {};
5659
- var o, r, i = _objectWithoutPropertiesLoose$3(e2, t2);
5660
- if (Object.getOwnPropertySymbols) {
5661
- var n2 = Object.getOwnPropertySymbols(e2);
5662
- for (r = 0; r < n2.length; r++) o = n2[r], t2.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e2, o) && (i[o] = e2[o]);
5663
- }
5664
- return i;
5665
- }
5666
- __name(_objectWithoutProperties$1, "_objectWithoutProperties$1");
5667
- var Context = /* @__PURE__ */ React$6.createContext({}), DomWrapper = /* @__PURE__ */ function(_React$Component) {
5668
- _inherits$1(DomWrapper2, _React$Component);
5669
- var _super = _createSuper$1(DomWrapper2);
5670
- function DomWrapper2() {
5671
- return _classCallCheck$1(this, DomWrapper2), _super.apply(this, arguments);
5672
- }
5673
- return __name(DomWrapper2, "DomWrapper"), _createClass$1(DomWrapper2, [{
5674
- key: "render",
5675
- value: /* @__PURE__ */ __name(function() {
5676
- return this.props.children;
5677
- }, "render")
5678
- }]), DomWrapper2;
5679
- }(React$6.Component), STATUS_NONE = "none", STATUS_APPEAR = "appear", STATUS_ENTER = "enter", STATUS_LEAVE = "leave", STEP_NONE = "none", STEP_PREPARE = "prepare", STEP_START = "start", STEP_ACTIVE = "active", STEP_ACTIVATED = "end", STEP_PREPARED = "prepared";
5680
- function makePrefixMap(styleProp, eventName) {
5681
- var prefixes2 = {};
5682
- return prefixes2[styleProp.toLowerCase()] = eventName.toLowerCase(), prefixes2["Webkit".concat(styleProp)] = "webkit".concat(eventName), prefixes2["Moz".concat(styleProp)] = "moz".concat(eventName), prefixes2["ms".concat(styleProp)] = "MS".concat(eventName), prefixes2["O".concat(styleProp)] = "o".concat(eventName.toLowerCase()), prefixes2;
5683
- }
5684
- __name(makePrefixMap, "makePrefixMap");
5685
- function getVendorPrefixes(domSupport, win) {
5686
- var prefixes2 = {
5687
- animationend: makePrefixMap("Animation", "AnimationEnd"),
5688
- transitionend: makePrefixMap("Transition", "TransitionEnd")
5689
- };
5690
- return domSupport && ("AnimationEvent" in win || delete prefixes2.animationend.animation, "TransitionEvent" in win || delete prefixes2.transitionend.transition), prefixes2;
5691
- }
5692
- __name(getVendorPrefixes, "getVendorPrefixes");
5693
- var vendorPrefixes = getVendorPrefixes(canUseDom(), typeof window < "u" ? window : {}), style = {};
5694
- if (canUseDom()) {
5695
- var _document$createEleme = document.createElement("div");
5696
- style = _document$createEleme.style;
5697
- }
5698
- var prefixedEventNames = {};
5699
- function getVendorPrefixedEventName(eventName) {
5700
- if (prefixedEventNames[eventName])
5701
- return prefixedEventNames[eventName];
5702
- var prefixMap = vendorPrefixes[eventName];
5703
- if (prefixMap)
5704
- for (var stylePropList = Object.keys(prefixMap), len = stylePropList.length, i = 0; i < len; i += 1) {
5705
- var styleProp = stylePropList[i];
5706
- if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style)
5707
- return prefixedEventNames[eventName] = prefixMap[styleProp], prefixedEventNames[eventName];
5708
- }
5709
- return "";
5710
- }
5711
- __name(getVendorPrefixedEventName, "getVendorPrefixedEventName");
5712
- var internalAnimationEndName = getVendorPrefixedEventName("animationend"), internalTransitionEndName = getVendorPrefixedEventName("transitionend"), supportTransition = !!(internalAnimationEndName && internalTransitionEndName), animationEndName = internalAnimationEndName || "animationend", transitionEndName = internalTransitionEndName || "transitionend";
5713
- function getTransitionName(transitionName, transitionType) {
5714
- if (!transitionName) return null;
5715
- if (_typeof$3(transitionName) === "object") {
5716
- var type2 = transitionType.replace(/-\w/g, function(match2) {
5717
- return match2[1].toUpperCase();
5718
- });
5719
- return transitionName[type2];
5720
- }
5721
- return "".concat(transitionName, "-").concat(transitionType);
5722
- }
5723
- __name(getTransitionName, "getTransitionName");
5724
- const useDomMotionEvents = /* @__PURE__ */ __name(function(onInternalMotionEnd) {
5725
- var cacheElementRef = useRef();
5726
- function removeMotionEvents(element2) {
5727
- element2 && (element2.removeEventListener(transitionEndName, onInternalMotionEnd), element2.removeEventListener(animationEndName, onInternalMotionEnd));
5728
- }
5729
- __name(removeMotionEvents, "removeMotionEvents");
5730
- function patchMotionEvents(element2) {
5731
- cacheElementRef.current && cacheElementRef.current !== element2 && removeMotionEvents(cacheElementRef.current), element2 && element2 !== cacheElementRef.current && (element2.addEventListener(transitionEndName, onInternalMotionEnd), element2.addEventListener(animationEndName, onInternalMotionEnd), cacheElementRef.current = element2);
5732
- }
5733
- return __name(patchMotionEvents, "patchMotionEvents"), React$6.useEffect(function() {
5734
- return function() {
5735
- removeMotionEvents(cacheElementRef.current);
5736
- };
5737
- }, []), [patchMotionEvents, removeMotionEvents];
5738
- }, "useDomMotionEvents");
5739
- var useIsomorphicLayoutEffect = canUseDom() ? useLayoutEffect$2 : useEffect;
5740
- const useNextFrame = /* @__PURE__ */ __name(function() {
5741
- var nextFrameRef = React$6.useRef(null);
5742
- function cancelNextFrame() {
5743
- wrapperRaf.cancel(nextFrameRef.current);
5744
- }
5745
- __name(cancelNextFrame, "cancelNextFrame");
5746
- function nextFrame(callback) {
5747
- var delay = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2;
5748
- cancelNextFrame();
5749
- var nextFrameId = wrapperRaf(function() {
5750
- delay <= 1 ? callback({
5751
- isCanceled: /* @__PURE__ */ __name(function() {
5752
- return nextFrameId !== nextFrameRef.current;
5753
- }, "isCanceled")
5754
- }) : nextFrame(callback, delay - 1);
5755
- });
5756
- nextFrameRef.current = nextFrameId;
5757
- }
5758
- return __name(nextFrame, "nextFrame"), React$6.useEffect(function() {
5759
- return function() {
5760
- cancelNextFrame();
5761
- };
5762
- }, []), [nextFrame, cancelNextFrame];
5763
- }, "useNextFrame");
5764
- var FULL_STEP_QUEUE = [STEP_PREPARE, STEP_START, STEP_ACTIVE, STEP_ACTIVATED], SIMPLE_STEP_QUEUE = [STEP_PREPARE, STEP_PREPARED], SkipStep = !1, DoStep = !0;
5765
- function isActive(step) {
5766
- return step === STEP_ACTIVE || step === STEP_ACTIVATED;
5767
- }
5768
- __name(isActive, "isActive");
5769
- const useStepQueue = /* @__PURE__ */ __name(function(status, prepareOnly, callback) {
5770
- var _useState = useSafeState(STEP_NONE), _useState2 = _slicedToArray$2(_useState, 2), step = _useState2[0], setStep = _useState2[1], _useNextFrame = useNextFrame(), _useNextFrame2 = _slicedToArray$2(_useNextFrame, 2), nextFrame = _useNextFrame2[0], cancelNextFrame = _useNextFrame2[1];
5771
- function startQueue() {
5772
- setStep(STEP_PREPARE, !0);
5773
- }
5774
- __name(startQueue, "startQueue");
5775
- var STEP_QUEUE = prepareOnly ? SIMPLE_STEP_QUEUE : FULL_STEP_QUEUE;
5776
- return useIsomorphicLayoutEffect(function() {
5777
- if (step !== STEP_NONE && step !== STEP_ACTIVATED) {
5778
- var index2 = STEP_QUEUE.indexOf(step), nextStep = STEP_QUEUE[index2 + 1], result = callback(step);
5779
- result === SkipStep ? setStep(nextStep, !0) : nextStep && nextFrame(function(info) {
5780
- function doNext() {
5781
- info.isCanceled() || setStep(nextStep, !0);
5782
- }
5783
- __name(doNext, "doNext"), result === !0 ? doNext() : Promise.resolve(result).then(doNext);
5784
- });
5785
- }
5786
- }, [status, step]), React$6.useEffect(function() {
5787
- return function() {
5788
- cancelNextFrame();
5789
- };
5790
- }, []), [startQueue, step];
5791
- }, "useStepQueue");
5792
- function useStatus(supportMotion, visible, getElement, _ref) {
5793
- var _ref$motionEnter = _ref.motionEnter, motionEnter = _ref$motionEnter === void 0 ? !0 : _ref$motionEnter, _ref$motionAppear = _ref.motionAppear, motionAppear = _ref$motionAppear === void 0 ? !0 : _ref$motionAppear, _ref$motionLeave = _ref.motionLeave, motionLeave = _ref$motionLeave === void 0 ? !0 : _ref$motionLeave, motionDeadline = _ref.motionDeadline, motionLeaveImmediately = _ref.motionLeaveImmediately, onAppearPrepare = _ref.onAppearPrepare, onEnterPrepare = _ref.onEnterPrepare, onLeavePrepare = _ref.onLeavePrepare, onAppearStart = _ref.onAppearStart, onEnterStart = _ref.onEnterStart, onLeaveStart = _ref.onLeaveStart, onAppearActive = _ref.onAppearActive, onEnterActive = _ref.onEnterActive, onLeaveActive = _ref.onLeaveActive, onAppearEnd = _ref.onAppearEnd, onEnterEnd = _ref.onEnterEnd, onLeaveEnd = _ref.onLeaveEnd, onVisibleChanged = _ref.onVisibleChanged, _useState = useSafeState(), _useState2 = _slicedToArray$2(_useState, 2), asyncVisible = _useState2[0], setAsyncVisible = _useState2[1], _useState3 = useSafeState(STATUS_NONE), _useState4 = _slicedToArray$2(_useState3, 2), status = _useState4[0], setStatus = _useState4[1], _useState5 = useSafeState(null), _useState6 = _slicedToArray$2(_useState5, 2), style2 = _useState6[0], setStyle = _useState6[1], mountedRef = useRef(!1), deadlineRef = useRef(null);
5794
- function getDomElement() {
5795
- return getElement();
5796
- }
5797
- __name(getDomElement, "getDomElement");
5798
- var activeRef = useRef(!1);
5799
- function updateMotionEndStatus() {
5800
- setStatus(STATUS_NONE, !0), setStyle(null, !0);
5801
- }
5802
- __name(updateMotionEndStatus, "updateMotionEndStatus");
5803
- var onInternalMotionEnd = useEvent(function(event) {
5804
- if (status !== STATUS_NONE) {
5805
- var element2 = getDomElement();
5806
- if (!(event && !event.deadline && event.target !== element2)) {
5807
- var currentActive = activeRef.current, canEnd;
5808
- status === STATUS_APPEAR && currentActive ? canEnd = onAppearEnd == null ? void 0 : onAppearEnd(element2, event) : status === STATUS_ENTER && currentActive ? canEnd = onEnterEnd == null ? void 0 : onEnterEnd(element2, event) : status === STATUS_LEAVE && currentActive && (canEnd = onLeaveEnd == null ? void 0 : onLeaveEnd(element2, event)), currentActive && canEnd !== !1 && updateMotionEndStatus();
5809
- }
5810
- }
5811
- }), _useDomMotionEvents = useDomMotionEvents(onInternalMotionEnd), _useDomMotionEvents2 = _slicedToArray$2(_useDomMotionEvents, 1), patchMotionEvents = _useDomMotionEvents2[0], getEventHandlers = /* @__PURE__ */ __name(function(targetStatus) {
5812
- switch (targetStatus) {
5813
- case STATUS_APPEAR:
5814
- return _defineProperty$c(_defineProperty$c(_defineProperty$c({}, STEP_PREPARE, onAppearPrepare), STEP_START, onAppearStart), STEP_ACTIVE, onAppearActive);
5815
- case STATUS_ENTER:
5816
- return _defineProperty$c(_defineProperty$c(_defineProperty$c({}, STEP_PREPARE, onEnterPrepare), STEP_START, onEnterStart), STEP_ACTIVE, onEnterActive);
5817
- case STATUS_LEAVE:
5818
- return _defineProperty$c(_defineProperty$c(_defineProperty$c({}, STEP_PREPARE, onLeavePrepare), STEP_START, onLeaveStart), STEP_ACTIVE, onLeaveActive);
5819
- default:
5820
- return {};
5821
- }
5822
- }, "getEventHandlers"), eventHandlers = React$6.useMemo(function() {
5823
- return getEventHandlers(status);
5824
- }, [status]), _useStepQueue = useStepQueue(status, !supportMotion, function(newStep) {
5825
- if (newStep === STEP_PREPARE) {
5826
- var onPrepare = eventHandlers[STEP_PREPARE];
5827
- return onPrepare ? onPrepare(getDomElement()) : SkipStep;
5828
- }
5829
- if (step in eventHandlers) {
5830
- var _eventHandlers$step;
5831
- setStyle(((_eventHandlers$step = eventHandlers[step]) === null || _eventHandlers$step === void 0 ? void 0 : _eventHandlers$step.call(eventHandlers, getDomElement(), null)) || null);
5832
- }
5833
- return step === STEP_ACTIVE && status !== STATUS_NONE && (patchMotionEvents(getDomElement()), motionDeadline > 0 && (clearTimeout(deadlineRef.current), deadlineRef.current = setTimeout(function() {
5834
- onInternalMotionEnd({
5835
- deadline: !0
5836
- });
5837
- }, motionDeadline))), step === STEP_PREPARED && updateMotionEndStatus(), DoStep;
5838
- }), _useStepQueue2 = _slicedToArray$2(_useStepQueue, 2), startStep = _useStepQueue2[0], step = _useStepQueue2[1], active = isActive(step);
5839
- activeRef.current = active, useIsomorphicLayoutEffect(function() {
5840
- setAsyncVisible(visible);
5841
- var isMounted = mountedRef.current;
5842
- mountedRef.current = !0;
5843
- var nextStatus;
5844
- !isMounted && visible && motionAppear && (nextStatus = STATUS_APPEAR), isMounted && visible && motionEnter && (nextStatus = STATUS_ENTER), (isMounted && !visible && motionLeave || !isMounted && motionLeaveImmediately && !visible && motionLeave) && (nextStatus = STATUS_LEAVE);
5845
- var nextEventHandlers = getEventHandlers(nextStatus);
5846
- nextStatus && (supportMotion || nextEventHandlers[STEP_PREPARE]) ? (setStatus(nextStatus), startStep()) : setStatus(STATUS_NONE);
5847
- }, [visible]), useEffect(function() {
5848
- // Cancel appear
5849
- (status === STATUS_APPEAR && !motionAppear || // Cancel enter
5850
- status === STATUS_ENTER && !motionEnter || // Cancel leave
5851
- status === STATUS_LEAVE && !motionLeave) && setStatus(STATUS_NONE);
5852
- }, [motionAppear, motionEnter, motionLeave]), useEffect(function() {
5853
- return function() {
5854
- mountedRef.current = !1, clearTimeout(deadlineRef.current);
5855
- };
5856
- }, []);
5857
- var firstMountChangeRef = React$6.useRef(!1);
5858
- useEffect(function() {
5859
- asyncVisible && (firstMountChangeRef.current = !0), asyncVisible !== void 0 && status === STATUS_NONE && ((firstMountChangeRef.current || asyncVisible) && (onVisibleChanged == null || onVisibleChanged(asyncVisible)), firstMountChangeRef.current = !0);
5860
- }, [asyncVisible, status]);
5861
- var mergedStyle = style2;
5862
- return eventHandlers[STEP_PREPARE] && step === STEP_START && (mergedStyle = _objectSpread2$2({
5863
- transition: "none"
5864
- }, mergedStyle)), [status, step, mergedStyle, asyncVisible != null ? asyncVisible : visible];
5865
- }
5866
- __name(useStatus, "useStatus");
5867
- function genCSSMotion(config2) {
5868
- var transitionSupport = config2;
5869
- _typeof$3(config2) === "object" && (transitionSupport = config2.transitionSupport);
5870
- function isSupportTransition(props, contextMotion) {
5871
- return !!(props.motionName && transitionSupport && contextMotion !== !1);
5872
- }
5873
- __name(isSupportTransition, "isSupportTransition");
5874
- var CSSMotion2 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
5875
- var _props$visible = props.visible, visible = _props$visible === void 0 ? !0 : _props$visible, _props$removeOnLeave = props.removeOnLeave, removeOnLeave = _props$removeOnLeave === void 0 ? !0 : _props$removeOnLeave, forceRender = props.forceRender, children = props.children, motionName = props.motionName, leavedClassName = props.leavedClassName, eventProps = props.eventProps, _React$useContext = React$6.useContext(Context), contextMotion = _React$useContext.motion, supportMotion = isSupportTransition(props, contextMotion), nodeRef = useRef(), wrapperNodeRef = useRef();
5876
- function getDomElement() {
5877
- try {
5878
- return nodeRef.current instanceof HTMLElement ? nodeRef.current : findDOMNode$1(wrapperNodeRef.current);
5879
- } catch {
5880
- return null;
5881
- }
5882
- }
5883
- __name(getDomElement, "getDomElement");
5884
- var _useStatus = useStatus(supportMotion, visible, getDomElement, props), _useStatus2 = _slicedToArray$2(_useStatus, 4), status = _useStatus2[0], statusStep = _useStatus2[1], statusStyle = _useStatus2[2], mergedVisible = _useStatus2[3], renderedRef = React$6.useRef(mergedVisible);
5885
- mergedVisible && (renderedRef.current = !0);
5886
- var setNodeRef = React$6.useCallback(function(node) {
5887
- nodeRef.current = node, fillRef(ref, node);
5888
- }, [ref]), motionChildren, mergedProps = _objectSpread2$2(_objectSpread2$2({}, eventProps), {}, {
5889
- visible
5890
- });
5891
- if (!children)
5892
- motionChildren = null;
5893
- else if (status === STATUS_NONE)
5894
- mergedVisible ? motionChildren = children(_objectSpread2$2({}, mergedProps), setNodeRef) : !removeOnLeave && renderedRef.current && leavedClassName ? motionChildren = children(_objectSpread2$2(_objectSpread2$2({}, mergedProps), {}, {
5895
- className: leavedClassName
5896
- }), setNodeRef) : forceRender || !removeOnLeave && !leavedClassName ? motionChildren = children(_objectSpread2$2(_objectSpread2$2({}, mergedProps), {}, {
5897
- style: {
5898
- display: "none"
5899
- }
5900
- }), setNodeRef) : motionChildren = null;
5901
- else {
5902
- var statusSuffix;
5903
- statusStep === STEP_PREPARE ? statusSuffix = "prepare" : isActive(statusStep) ? statusSuffix = "active" : statusStep === STEP_START && (statusSuffix = "start");
5904
- var motionCls = getTransitionName(motionName, "".concat(status, "-").concat(statusSuffix));
5905
- motionChildren = children(_objectSpread2$2(_objectSpread2$2({}, mergedProps), {}, {
5906
- className: clsx(getTransitionName(motionName, status), _defineProperty$c(_defineProperty$c({}, motionCls, motionCls && statusSuffix), motionName, typeof motionName == "string")),
5907
- style: statusStyle
5908
- }), setNodeRef);
5909
- }
5910
- if (/* @__PURE__ */ React$6.isValidElement(motionChildren) && supportRef(motionChildren)) {
5911
- var _ref = motionChildren, originNodeRef = _ref.ref;
5912
- originNodeRef || (motionChildren = /* @__PURE__ */ React$6.cloneElement(motionChildren, {
5913
- ref: setNodeRef
5914
- }));
5915
- }
5916
- return /* @__PURE__ */ React$6.createElement(DomWrapper, {
5917
- ref: wrapperNodeRef
5918
- }, motionChildren);
5569
+ }), canRef = !isRenderProps && /* @__PURE__ */ React$6.isValidElement(mergedChildren) && supportRef(mergedChildren), originRef = canRef ? mergedChildren.ref : null, mergedRef = useComposeRef(originRef, elementRef), getDom = /* @__PURE__ */ __name(function() {
5570
+ var _elementRef$current;
5571
+ return findDOMNode$1(elementRef.current) || // Support `nativeElement` format
5572
+ (elementRef.current && _typeof$3(elementRef.current) === "object" ? findDOMNode$1((_elementRef$current = elementRef.current) === null || _elementRef$current === void 0 ? void 0 : _elementRef$current.nativeElement) : null) || findDOMNode$1(wrapperRef.current);
5573
+ }, "getDom2");
5574
+ React$6.useImperativeHandle(ref, function() {
5575
+ return getDom();
5919
5576
  });
5920
- return CSSMotion2.displayName = "CSSMotion", CSSMotion2;
5577
+ var propsRef = React$6.useRef(props);
5578
+ propsRef.current = props;
5579
+ var onInternalResize = React$6.useCallback(function(target) {
5580
+ var _propsRef$current = propsRef.current, onResize2 = _propsRef$current.onResize, data = _propsRef$current.data, _target$getBoundingCl = target.getBoundingClientRect(), width2 = _target$getBoundingCl.width, height2 = _target$getBoundingCl.height, offsetWidth = target.offsetWidth, offsetHeight = target.offsetHeight, fixedWidth = Math.floor(width2), fixedHeight = Math.floor(height2);
5581
+ if (sizeRef.current.width !== fixedWidth || sizeRef.current.height !== fixedHeight || sizeRef.current.offsetWidth !== offsetWidth || sizeRef.current.offsetHeight !== offsetHeight) {
5582
+ var size = {
5583
+ width: fixedWidth,
5584
+ height: fixedHeight,
5585
+ offsetWidth,
5586
+ offsetHeight
5587
+ };
5588
+ sizeRef.current = size;
5589
+ var mergedOffsetWidth = offsetWidth === Math.round(width2) ? width2 : offsetWidth, mergedOffsetHeight = offsetHeight === Math.round(height2) ? height2 : offsetHeight, sizeInfo = _objectSpread2$2(_objectSpread2$2({}, size), {}, {
5590
+ offsetWidth: mergedOffsetWidth,
5591
+ offsetHeight: mergedOffsetHeight
5592
+ });
5593
+ onCollectionResize == null || onCollectionResize(sizeInfo, target, data), onResize2 && Promise.resolve().then(function() {
5594
+ onResize2(sizeInfo, target);
5595
+ });
5596
+ }
5597
+ }, []);
5598
+ return React$6.useEffect(function() {
5599
+ var currentElement = getDom();
5600
+ return currentElement && !disabled && observe(currentElement, onInternalResize), function() {
5601
+ return unobserve(currentElement, onInternalResize);
5602
+ };
5603
+ }, [elementRef.current, disabled]), /* @__PURE__ */ React$6.createElement(DomWrapper, {
5604
+ ref: wrapperRef
5605
+ }, canRef ? /* @__PURE__ */ React$6.cloneElement(mergedChildren, {
5606
+ ref: mergedRef
5607
+ }) : mergedChildren);
5921
5608
  }
5922
- __name(genCSSMotion, "genCSSMotion");
5923
- const CSSMotion = genCSSMotion(supportTransition);
5924
- var STATUS_ADD = "add", STATUS_KEEP = "keep", STATUS_REMOVE = "remove", STATUS_REMOVED = "removed";
5925
- function wrapKeyToObject(key) {
5926
- var keyObj;
5927
- return key && _typeof$3(key) === "object" && "key" in key ? keyObj = key : keyObj = {
5928
- key
5929
- }, _objectSpread2$2(_objectSpread2$2({}, keyObj), {}, {
5930
- key: String(keyObj.key)
5609
+ __name(SingleObserver, "SingleObserver");
5610
+ var RefSingleObserver = /* @__PURE__ */ React$6.forwardRef(SingleObserver), INTERNAL_PREFIX_KEY = "rc-observer-key";
5611
+ function ResizeObserver$1(props, ref) {
5612
+ var children = props.children, childNodes = typeof children == "function" ? [children] : toArray$3(children);
5613
+ return childNodes.map(function(child, index2) {
5614
+ var key = (child == null ? void 0 : child.key) || "".concat(INTERNAL_PREFIX_KEY, "-").concat(index2);
5615
+ return /* @__PURE__ */ React$6.createElement(RefSingleObserver, _extends$5({}, props, {
5616
+ key,
5617
+ ref: index2 === 0 ? ref : void 0
5618
+ }), child);
5931
5619
  });
5932
5620
  }
5933
- __name(wrapKeyToObject, "wrapKeyToObject");
5934
- function parseKeys() {
5935
- var keys4 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
5936
- return keys4.map(wrapKeyToObject);
5621
+ __name(ResizeObserver$1, "ResizeObserver$1");
5622
+ var RefResizeObserver = /* @__PURE__ */ React$6.forwardRef(ResizeObserver$1);
5623
+ RefResizeObserver.Collection = Collection;
5624
+ function getRoot(ele) {
5625
+ var _ele$getRootNode;
5626
+ return ele == null || (_ele$getRootNode = ele.getRootNode) === null || _ele$getRootNode === void 0 ? void 0 : _ele$getRootNode.call(ele);
5937
5627
  }
5938
- __name(parseKeys, "parseKeys");
5939
- function diffKeys() {
5940
- var prevKeys = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], currentKeys = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], list = [], currentIndex = 0, currentLen = currentKeys.length, prevKeyObjects = parseKeys(prevKeys), currentKeyObjects = parseKeys(currentKeys);
5941
- prevKeyObjects.forEach(function(keyObj) {
5942
- for (var hit = !1, i = currentIndex; i < currentLen; i += 1) {
5943
- var currentKeyObj = currentKeyObjects[i];
5944
- if (currentKeyObj.key === keyObj.key) {
5945
- currentIndex < i && (list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function(obj) {
5946
- return _objectSpread2$2(_objectSpread2$2({}, obj), {}, {
5947
- status: STATUS_ADD
5948
- });
5949
- })), currentIndex = i), list.push(_objectSpread2$2(_objectSpread2$2({}, currentKeyObj), {}, {
5950
- status: STATUS_KEEP
5951
- })), currentIndex += 1, hit = !0;
5952
- break;
5953
- }
5954
- }
5955
- hit || list.push(_objectSpread2$2(_objectSpread2$2({}, keyObj), {}, {
5956
- status: STATUS_REMOVE
5957
- }));
5958
- }), currentIndex < currentLen && (list = list.concat(currentKeyObjects.slice(currentIndex).map(function(obj) {
5959
- return _objectSpread2$2(_objectSpread2$2({}, obj), {}, {
5960
- status: STATUS_ADD
5961
- });
5962
- })));
5963
- var keys4 = {};
5964
- list.forEach(function(_ref) {
5965
- var key = _ref.key;
5966
- keys4[key] = (keys4[key] || 0) + 1;
5967
- });
5968
- var duplicatedKeys = Object.keys(keys4).filter(function(key) {
5969
- return keys4[key] > 1;
5970
- });
5971
- return duplicatedKeys.forEach(function(matchKey) {
5972
- list = list.filter(function(_ref2) {
5973
- var key = _ref2.key, status = _ref2.status;
5974
- return key !== matchKey || status !== STATUS_REMOVE;
5975
- }), list.forEach(function(node) {
5976
- node.key === matchKey && (node.status = STATUS_KEEP);
5977
- });
5978
- }), list;
5628
+ __name(getRoot, "getRoot");
5629
+ function inShadow(ele) {
5630
+ return getRoot(ele) instanceof ShadowRoot;
5979
5631
  }
5980
- __name(diffKeys, "diffKeys");
5981
- var _excluded$w = ["component", "children", "onVisibleChanged", "onAllRemoved"], _excluded2$6 = ["status"], MOTION_PROP_NAMES = ["eventProps", "visible", "children", "motionName", "motionAppear", "motionEnter", "motionLeave", "motionLeaveImmediately", "motionDeadline", "removeOnLeave", "leavedClassName", "onAppearPrepare", "onAppearStart", "onAppearActive", "onAppearEnd", "onEnterStart", "onEnterActive", "onEnterEnd", "onLeaveStart", "onLeaveActive", "onLeaveEnd"];
5982
- function genCSSMotionList(transitionSupport) {
5983
- var CSSMotion$12 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : CSSMotion, CSSMotionList = /* @__PURE__ */ function(_React$Component) {
5984
- _inherits$1(CSSMotionList2, _React$Component);
5985
- var _super = _createSuper$1(CSSMotionList2);
5986
- function CSSMotionList2() {
5987
- var _this;
5988
- _classCallCheck$1(this, CSSMotionList2);
5989
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++)
5990
- args[_key] = arguments[_key];
5991
- return _this = _super.call.apply(_super, [this].concat(args)), _defineProperty$c(_assertThisInitialized$1(_this), "state", {
5992
- keyEntities: []
5993
- }), _defineProperty$c(_assertThisInitialized$1(_this), "removeKey", function(removeKey) {
5994
- var keyEntities = _this.state.keyEntities, nextKeyEntities = keyEntities.map(function(entity) {
5995
- return entity.key !== removeKey ? entity : _objectSpread2$2(_objectSpread2$2({}, entity), {}, {
5996
- status: STATUS_REMOVED
5997
- });
5998
- });
5999
- return _this.setState({
6000
- keyEntities: nextKeyEntities
6001
- }), nextKeyEntities.filter(function(_ref) {
6002
- var status = _ref.status;
6003
- return status !== STATUS_REMOVED;
6004
- }).length;
6005
- }), _this;
6006
- }
6007
- return __name(CSSMotionList2, "CSSMotionList"), _createClass$1(CSSMotionList2, [{
6008
- key: "render",
6009
- value: /* @__PURE__ */ __name(function() {
6010
- var _this2 = this, keyEntities = this.state.keyEntities, _this$props = this.props, component = _this$props.component, children = _this$props.children, _onVisibleChanged = _this$props.onVisibleChanged, onAllRemoved = _this$props.onAllRemoved, restProps = _objectWithoutProperties$1(_this$props, _excluded$w), Component = component || React$6.Fragment, motionProps = {};
6011
- return MOTION_PROP_NAMES.forEach(function(prop) {
6012
- motionProps[prop] = restProps[prop], delete restProps[prop];
6013
- }), delete restProps.keys, /* @__PURE__ */ React$6.createElement(Component, restProps, keyEntities.map(function(_ref2, index2) {
6014
- var status = _ref2.status, eventProps = _objectWithoutProperties$1(_ref2, _excluded2$6), visible = status === STATUS_ADD || status === STATUS_KEEP;
6015
- return /* @__PURE__ */ React$6.createElement(CSSMotion$12, _extends$5({}, motionProps, {
6016
- key: eventProps.key,
6017
- visible,
6018
- eventProps,
6019
- onVisibleChanged: /* @__PURE__ */ __name(function(changedVisible) {
6020
- if (_onVisibleChanged == null || _onVisibleChanged(changedVisible, {
6021
- key: eventProps.key
6022
- }), !changedVisible) {
6023
- var restKeysCount = _this2.removeKey(eventProps.key);
6024
- restKeysCount === 0 && onAllRemoved && onAllRemoved();
6025
- }
6026
- }, "onVisibleChanged")
6027
- }), function(props, ref) {
6028
- return children(_objectSpread2$2(_objectSpread2$2({}, props), {}, {
6029
- index: index2
6030
- }), ref);
6031
- });
6032
- }));
6033
- }, "render")
6034
- }], [{
6035
- key: "getDerivedStateFromProps",
6036
- value: /* @__PURE__ */ __name(function(_ref3, _ref4) {
6037
- var keys4 = _ref3.keys, keyEntities = _ref4.keyEntities, parsedKeyObjects = parseKeys(keys4), mixedKeyEntities = diffKeys(keyEntities, parsedKeyObjects);
6038
- return {
6039
- keyEntities: mixedKeyEntities.filter(function(entity) {
6040
- var prevEntity = keyEntities.find(function(_ref5) {
6041
- var key = _ref5.key;
6042
- return entity.key === key;
6043
- });
6044
- return !(prevEntity && prevEntity.status === STATUS_REMOVED && entity.status === STATUS_REMOVE);
6045
- })
6046
- };
6047
- }, "getDerivedStateFromProps")
6048
- }]), CSSMotionList2;
6049
- }(React$6.Component);
6050
- return _defineProperty$c(CSSMotionList, "defaultProps", {
6051
- component: "div"
6052
- }), CSSMotionList;
5632
+ __name(inShadow, "inShadow");
5633
+ function getShadowRoot(ele) {
5634
+ return inShadow(ele) ? getRoot(ele) : null;
6053
5635
  }
6054
- __name(genCSSMotionList, "genCSSMotionList");
6055
- genCSSMotionList(supportTransition);
5636
+ __name(getShadowRoot, "getShadowRoot");
5637
+ const isMobile = /* @__PURE__ */ __name(function() {
5638
+ if (typeof navigator > "u" || typeof window > "u")
5639
+ return !1;
5640
+ var agent = navigator.userAgent || navigator.vendor || window.opera;
5641
+ return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(agent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(agent == null ? void 0 : agent.substr(0, 4));
5642
+ }, "isMobile");
6056
5643
  function Arrow(props) {
6057
5644
  var prefixCls = props.prefixCls, align = props.align, arrow = props.arrow, arrowPos = props.arrowPos, _ref = arrow || {}, className = _ref.className, content = _ref.content, _arrowPos$x = arrowPos.x, x = _arrowPos$x === void 0 ? 0 : _arrowPos$x, _arrowPos$y = arrowPos.y, y = _arrowPos$y === void 0 ? 0 : _arrowPos$y, arrowRef = React$6.useRef();
6058
5645
  if (!align || !align.points)
@@ -6073,7 +5660,7 @@ function Arrow(props) {
6073
5660
  __name(Arrow, "Arrow");
6074
5661
  function Mask2(props) {
6075
5662
  var prefixCls = props.prefixCls, open = props.open, zIndex = props.zIndex, mask = props.mask, motion = props.motion;
6076
- return mask ? /* @__PURE__ */ React$6.createElement(CSSMotion, _extends$7({}, motion, {
5663
+ return mask ? /* @__PURE__ */ React$6.createElement(CSSMotion, _extends$6({}, motion, {
6077
5664
  motionAppear: !0,
6078
5665
  visible: open,
6079
5666
  removeOnLeave: !0
@@ -6094,7 +5681,7 @@ var PopupContent = /* @__PURE__ */ React$6.memo(function(_ref) {
6094
5681
  }, function(_, next) {
6095
5682
  return next.cache;
6096
5683
  }), Popup$3 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
6097
- var popup2 = props.popup, className = props.className, prefixCls = props.prefixCls, style2 = props.style, target = props.target, _onVisibleChanged = props.onVisibleChanged, open = props.open, keepDom = props.keepDom, fresh = props.fresh, onClick = props.onClick, mask = props.mask, arrow = props.arrow, arrowPos = props.arrowPos, align = props.align, motion = props.motion, maskMotion = props.maskMotion, forceRender = props.forceRender, getPopupContainer = props.getPopupContainer, autoDestroy = props.autoDestroy, Portal2 = props.portal, zIndex = props.zIndex, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, onPointerEnter = props.onPointerEnter, ready = props.ready, offsetX = props.offsetX, offsetY = props.offsetY, offsetR = props.offsetR, offsetB = props.offsetB, onAlign = props.onAlign, onPrepare = props.onPrepare, stretch = props.stretch, targetWidth = props.targetWidth, targetHeight = props.targetHeight, childNode = typeof popup2 == "function" ? popup2() : popup2, isNodeVisible = open || keepDom, getPopupContainerNeedParams = (getPopupContainer == null ? void 0 : getPopupContainer.length) > 0, _React$useState = React$6.useState(!getPopupContainer || !getPopupContainerNeedParams), _React$useState2 = _slicedToArray$3(_React$useState, 2), show = _React$useState2[0], setShow = _React$useState2[1];
5684
+ var popup2 = props.popup, className = props.className, prefixCls = props.prefixCls, style2 = props.style, target = props.target, _onVisibleChanged = props.onVisibleChanged, open = props.open, keepDom = props.keepDom, fresh = props.fresh, onClick = props.onClick, mask = props.mask, arrow = props.arrow, arrowPos = props.arrowPos, align = props.align, motion = props.motion, maskMotion = props.maskMotion, forceRender = props.forceRender, getPopupContainer = props.getPopupContainer, autoDestroy = props.autoDestroy, Portal2 = props.portal, zIndex = props.zIndex, onMouseEnter = props.onMouseEnter, onMouseLeave = props.onMouseLeave, onPointerEnter = props.onPointerEnter, ready = props.ready, offsetX = props.offsetX, offsetY = props.offsetY, offsetR = props.offsetR, offsetB = props.offsetB, onAlign = props.onAlign, onPrepare = props.onPrepare, stretch = props.stretch, targetWidth = props.targetWidth, targetHeight = props.targetHeight, childNode = typeof popup2 == "function" ? popup2() : popup2, isNodeVisible = open || keepDom, getPopupContainerNeedParams = (getPopupContainer == null ? void 0 : getPopupContainer.length) > 0, _React$useState = React$6.useState(!getPopupContainer || !getPopupContainerNeedParams), _React$useState2 = _slicedToArray$1(_React$useState, 2), show = _React$useState2[0], setShow = _React$useState2[1];
6098
5685
  if (useLayoutEffect$1(function() {
6099
5686
  !show && getPopupContainerNeedParams && target && setShow(!0);
6100
5687
  }, [show, getPopupContainerNeedParams, target]), !show)
@@ -6126,7 +5713,7 @@ var PopupContent = /* @__PURE__ */ React$6.memo(function(_ref) {
6126
5713
  onResize: onAlign,
6127
5714
  disabled: !open
6128
5715
  }, function(resizeObserverRef) {
6129
- return /* @__PURE__ */ React$6.createElement(CSSMotion, _extends$7({
5716
+ return /* @__PURE__ */ React$6.createElement(CSSMotion, _extends$6({
6130
5717
  motionAppear: !0,
6131
5718
  motionEnter: !0,
6132
5719
  motionLeave: !0,
@@ -6146,7 +5733,7 @@ var PopupContent = /* @__PURE__ */ React$6.memo(function(_ref) {
6146
5733
  return /* @__PURE__ */ React$6.createElement("div", {
6147
5734
  ref: composeRef(resizeObserverRef, ref, motionRef),
6148
5735
  className: cls,
6149
- style: _objectSpread2$3(_objectSpread2$3(_objectSpread2$3(_objectSpread2$3({
5736
+ style: _objectSpread2$1(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({
6150
5737
  "--arrow-x": "".concat(arrowPos.x || 0, "px"),
6151
5738
  "--arrow-y": "".concat(arrowPos.y || 0, "px")
6152
5739
  }, offsetStyle), miscStyle), motionStyle), {}, {
@@ -6251,7 +5838,7 @@ function getPxValue(val) {
6251
5838
  }
6252
5839
  __name(getPxValue, "getPxValue");
6253
5840
  function getVisibleArea(initArea, scrollerList) {
6254
- var visibleArea = _objectSpread2$3({}, initArea);
5841
+ var visibleArea = _objectSpread2$1({}, initArea);
6255
5842
  return (scrollerList || []).forEach(function(ele) {
6256
5843
  if (!(ele instanceof HTMLBodyElement || ele instanceof HTMLHtmlElement)) {
6257
5844
  var _getWin$getComputedSt2 = getWin(ele).getComputedStyle(ele), overflow = _getWin$getComputedSt2.overflow, overflowClipMargin = _getWin$getComputedSt2.overflowClipMargin, borderTopWidth = _getWin$getComputedSt2.borderTopWidth, borderBottomWidth = _getWin$getComputedSt2.borderBottomWidth, borderLeftWidth = _getWin$getComputedSt2.borderLeftWidth, borderRightWidth = _getWin$getComputedSt2.borderRightWidth, eleRect = ele.getBoundingClientRect(), eleOutHeight = ele.offsetHeight, eleInnerHeight = ele.clientHeight, eleOutWidth = ele.offsetWidth, eleInnerWidth = ele.clientWidth, borderTopNum = getPxValue(borderTopWidth), borderBottomNum = getPxValue(borderBottomWidth), borderLeftNum = getPxValue(borderLeftWidth), borderRightNum = getPxValue(borderRightWidth), scaleX = toNum(Math.round(eleRect.width / eleOutWidth * 1e3) / 1e3), scaleY = toNum(Math.round(eleRect.height / eleOutHeight * 1e3) / 1e3), eleScrollWidth = (eleOutWidth - eleInnerWidth - borderLeftNum - borderRightNum) * scaleX, eleScrollHeight = (eleOutHeight - eleInnerHeight - borderTopNum - borderBottomNum) * scaleY, scaledBorderTopWidth = borderTopNum * scaleY, scaledBorderBottomWidth = borderBottomNum * scaleY, scaledBorderLeftWidth = borderLeftNum * scaleX, scaledBorderRightWidth = borderRightNum * scaleX, clipMarginWidth = 0, clipMarginHeight = 0;
@@ -6271,7 +5858,7 @@ function getUnitOffset(size) {
6271
5858
  }
6272
5859
  __name(getUnitOffset, "getUnitOffset");
6273
5860
  function getNumberOffset(rect, offset2) {
6274
- var _ref = offset2 || [], _ref2 = _slicedToArray$3(_ref, 2), offsetX = _ref2[0], offsetY = _ref2[1];
5861
+ var _ref = offset2 || [], _ref2 = _slicedToArray$1(_ref, 2), offsetX = _ref2[0], offsetY = _ref2[1];
6275
5862
  return [getUnitOffset(rect.width, offsetX), getUnitOffset(rect.height, offsetY)];
6276
5863
  }
6277
5864
  __name(getNumberOffset, "getNumberOffset");
@@ -6312,7 +5899,7 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
6312
5899
  scaleX: 1,
6313
5900
  scaleY: 1,
6314
5901
  align: builtinPlacements[placement] || {}
6315
- }), _React$useState2 = _slicedToArray$3(_React$useState, 2), offsetInfo = _React$useState2[0], setOffsetInfo = _React$useState2[1], alignCountRef = React$6.useRef(0), scrollerList = React$6.useMemo(function() {
5902
+ }), _React$useState2 = _slicedToArray$1(_React$useState, 2), offsetInfo = _React$useState2[0], setOffsetInfo = _React$useState2[1], alignCountRef = React$6.useRef(0), scrollerList = React$6.useMemo(function() {
6316
5903
  return popupEle ? collectScroller(popupEle) : [];
6317
5904
  }, [popupEle]), prevFlipRef = React$6.useRef({}), resetFlipCache = /* @__PURE__ */ __name(function() {
6318
5905
  prevFlipRef.current = {};
@@ -6327,7 +5914,7 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
6327
5914
  nextPopupY = popupRect.y + nextOffsetY, nextPopupBottom = nextPopupY + popupHeight, nextPopupX = popupRect.x + nextOffsetX, nextPopupRight = nextPopupX + popupWidth;
6328
5915
  };
6329
5916
  __name(getIntersectionVisibleArea, "getIntersectionVisibleArea"), __name(syncNextPopupPosition, "syncNextPopupPosition");
6330
- var _popupElement$parentE, _popupElement$parentE2, popupElement = popupEle, doc = popupElement.ownerDocument, win = getWin(popupElement), _win$getComputedStyle = win.getComputedStyle(popupElement), width2 = _win$getComputedStyle.width, height2 = _win$getComputedStyle.height, popupPosition = _win$getComputedStyle.position, originLeft = popupElement.style.left, originTop = popupElement.style.top, originRight = popupElement.style.right, originBottom = popupElement.style.bottom, originOverflow = popupElement.style.overflow, placementInfo = _objectSpread2$3(_objectSpread2$3({}, builtinPlacements[placement]), popupAlign), placeholderElement = doc.createElement("div");
5917
+ var _popupElement$parentE, _popupRect$x, _popupRect$y, _popupElement$parentE2, popupElement = popupEle, doc = popupElement.ownerDocument, win = getWin(popupElement), _win$getComputedStyle = win.getComputedStyle(popupElement), width2 = _win$getComputedStyle.width, height2 = _win$getComputedStyle.height, popupPosition = _win$getComputedStyle.position, originLeft = popupElement.style.left, originTop = popupElement.style.top, originRight = popupElement.style.right, originBottom = popupElement.style.bottom, originOverflow = popupElement.style.overflow, placementInfo = _objectSpread2$1(_objectSpread2$1({}, builtinPlacements[placement]), popupAlign), placeholderElement = doc.createElement("div");
6331
5918
  (_popupElement$parentE = popupElement.parentElement) === null || _popupElement$parentE === void 0 || _popupElement$parentE.appendChild(placeholderElement), placeholderElement.style.left = "".concat(popupElement.offsetLeft, "px"), placeholderElement.style.top = "".concat(popupElement.offsetTop, "px"), placeholderElement.style.position = popupPosition, placeholderElement.style.height = "".concat(popupElement.offsetHeight, "px"), placeholderElement.style.width = "".concat(popupElement.offsetWidth, "px"), popupElement.style.left = "0", popupElement.style.top = "0", popupElement.style.right = "auto", popupElement.style.bottom = "auto", popupElement.style.overflow = "hidden";
6332
5919
  var targetRect;
6333
5920
  if (Array.isArray(target))
@@ -6338,15 +5925,17 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
6338
5925
  height: 0
6339
5926
  };
6340
5927
  else {
6341
- var rect = target.getBoundingClientRect();
6342
- targetRect = {
5928
+ var _rect$x, _rect$y, rect = target.getBoundingClientRect();
5929
+ rect.x = (_rect$x = rect.x) !== null && _rect$x !== void 0 ? _rect$x : rect.left, rect.y = (_rect$y = rect.y) !== null && _rect$y !== void 0 ? _rect$y : rect.top, targetRect = {
6343
5930
  x: rect.x,
6344
5931
  y: rect.y,
6345
5932
  width: rect.width,
6346
5933
  height: rect.height
6347
5934
  };
6348
5935
  }
6349
- var popupRect = popupElement.getBoundingClientRect(), _doc$documentElement = doc.documentElement, clientWidth = _doc$documentElement.clientWidth, clientHeight = _doc$documentElement.clientHeight, scrollWidth = _doc$documentElement.scrollWidth, scrollHeight = _doc$documentElement.scrollHeight, scrollTop = _doc$documentElement.scrollTop, scrollLeft = _doc$documentElement.scrollLeft, popupHeight = popupRect.height, popupWidth = popupRect.width, targetHeight = targetRect.height, targetWidth = targetRect.width, visibleRegion = {
5936
+ var popupRect = popupElement.getBoundingClientRect();
5937
+ popupRect.x = (_popupRect$x = popupRect.x) !== null && _popupRect$x !== void 0 ? _popupRect$x : popupRect.left, popupRect.y = (_popupRect$y = popupRect.y) !== null && _popupRect$y !== void 0 ? _popupRect$y : popupRect.top;
5938
+ var _doc$documentElement = doc.documentElement, clientWidth = _doc$documentElement.clientWidth, clientHeight = _doc$documentElement.clientHeight, scrollWidth = _doc$documentElement.scrollWidth, scrollHeight = _doc$documentElement.scrollHeight, scrollTop = _doc$documentElement.scrollTop, scrollLeft = _doc$documentElement.scrollLeft, popupHeight = popupRect.height, popupWidth = popupRect.width, targetHeight = targetRect.height, targetWidth = targetRect.width, visibleRegion = {
6350
5939
  left: 0,
6351
5940
  top: 0,
6352
5941
  right: clientWidth,
@@ -6365,9 +5954,9 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
6365
5954
  var _scaleX = toNum(Math.round(popupWidth / parseFloat(width2) * 1e3) / 1e3), _scaleY = toNum(Math.round(popupHeight / parseFloat(height2) * 1e3) / 1e3);
6366
5955
  if (_scaleX === 0 || _scaleY === 0 || isDOM(target) && !isVisible(target))
6367
5956
  return;
6368
- var offset2 = placementInfo.offset, targetOffset2 = placementInfo.targetOffset, _getNumberOffset = getNumberOffset(popupRect, offset2), _getNumberOffset2 = _slicedToArray$3(_getNumberOffset, 2), popupOffsetX = _getNumberOffset2[0], popupOffsetY = _getNumberOffset2[1], _getNumberOffset3 = getNumberOffset(targetRect, targetOffset2), _getNumberOffset4 = _slicedToArray$3(_getNumberOffset3, 2), targetOffsetX = _getNumberOffset4[0], targetOffsetY = _getNumberOffset4[1];
5957
+ var offset2 = placementInfo.offset, targetOffset2 = placementInfo.targetOffset, _getNumberOffset = getNumberOffset(popupRect, offset2), _getNumberOffset2 = _slicedToArray$1(_getNumberOffset, 2), popupOffsetX = _getNumberOffset2[0], popupOffsetY = _getNumberOffset2[1], _getNumberOffset3 = getNumberOffset(targetRect, targetOffset2), _getNumberOffset4 = _slicedToArray$1(_getNumberOffset3, 2), targetOffsetX = _getNumberOffset4[0], targetOffsetY = _getNumberOffset4[1];
6369
5958
  targetRect.x -= targetOffsetX, targetRect.y -= targetOffsetY;
6370
- var _ref3 = placementInfo.points || [], _ref4 = _slicedToArray$3(_ref3, 2), popupPoint = _ref4[0], targetPoint = _ref4[1], targetPoints = splitPoints(targetPoint), popupPoints = splitPoints(popupPoint), targetAlignPoint = getAlignPoint(targetRect, targetPoints), popupAlignPoint = getAlignPoint(popupRect, popupPoints), nextAlignInfo = _objectSpread2$3({}, placementInfo), nextOffsetX = targetAlignPoint.x - popupAlignPoint.x + popupOffsetX, nextOffsetY = targetAlignPoint.y - popupAlignPoint.y + popupOffsetY, originIntersectionVisibleArea = getIntersectionVisibleArea(nextOffsetX, nextOffsetY), originIntersectionRecommendArea = getIntersectionVisibleArea(nextOffsetX, nextOffsetY, visibleRegionArea), targetAlignPointTL = getAlignPoint(targetRect, ["t", "l"]), popupAlignPointTL = getAlignPoint(popupRect, ["t", "l"]), targetAlignPointBR = getAlignPoint(targetRect, ["b", "r"]), popupAlignPointBR = getAlignPoint(popupRect, ["b", "r"]), overflow = placementInfo.overflow || {}, adjustX = overflow.adjustX, adjustY = overflow.adjustY, shiftX = overflow.shiftX, shiftY = overflow.shiftY, supportAdjust = /* @__PURE__ */ __name(function(val) {
5959
+ var _ref3 = placementInfo.points || [], _ref4 = _slicedToArray$1(_ref3, 2), popupPoint = _ref4[0], targetPoint = _ref4[1], targetPoints = splitPoints(targetPoint), popupPoints = splitPoints(popupPoint), targetAlignPoint = getAlignPoint(targetRect, targetPoints), popupAlignPoint = getAlignPoint(popupRect, popupPoints), nextAlignInfo = _objectSpread2$1({}, placementInfo), nextOffsetX = targetAlignPoint.x - popupAlignPoint.x + popupOffsetX, nextOffsetY = targetAlignPoint.y - popupAlignPoint.y + popupOffsetY, originIntersectionVisibleArea = getIntersectionVisibleArea(nextOffsetX, nextOffsetY), originIntersectionRecommendArea = getIntersectionVisibleArea(nextOffsetX, nextOffsetY, visibleRegionArea), targetAlignPointTL = getAlignPoint(targetRect, ["t", "l"]), popupAlignPointTL = getAlignPoint(popupRect, ["t", "l"]), targetAlignPointBR = getAlignPoint(targetRect, ["b", "r"]), popupAlignPointBR = getAlignPoint(popupRect, ["b", "r"]), overflow = placementInfo.overflow || {}, adjustX = overflow.adjustX, adjustY = overflow.adjustY, shiftX = overflow.shiftX, shiftY = overflow.shiftY, supportAdjust = /* @__PURE__ */ __name(function(val) {
6371
5960
  return typeof val == "boolean" ? val : val >= 0;
6372
5961
  }, "supportAdjust"), nextPopupY, nextPopupBottom, nextPopupX, nextPopupRight;
6373
5962
  syncNextPopupPosition();
@@ -6436,7 +6025,7 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
6436
6025
  });
6437
6026
  }, "triggerAlign"), resetReady = /* @__PURE__ */ __name(function() {
6438
6027
  setOffsetInfo(function(ori) {
6439
- return _objectSpread2$3(_objectSpread2$3({}, ori), {}, {
6028
+ return _objectSpread2$1(_objectSpread2$1({}, ori), {}, {
6440
6029
  ready: !1
6441
6030
  });
6442
6031
  });
@@ -6446,23 +6035,6 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
6446
6035
  }, [open]), [offsetInfo.ready, offsetInfo.offsetX, offsetInfo.offsetY, offsetInfo.offsetR, offsetInfo.offsetB, offsetInfo.arrowX, offsetInfo.arrowY, offsetInfo.scaleX, offsetInfo.scaleY, offsetInfo.align, triggerAlign];
6447
6036
  }
6448
6037
  __name(useAlign, "useAlign");
6449
- function _arrayWithoutHoles$2(r) {
6450
- if (Array.isArray(r)) return _arrayLikeToArray$2(r);
6451
- }
6452
- __name(_arrayWithoutHoles$2, "_arrayWithoutHoles$2");
6453
- function _iterableToArray$2(r) {
6454
- if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
6455
- }
6456
- __name(_iterableToArray$2, "_iterableToArray$2");
6457
- function _nonIterableSpread$2() {
6458
- throw new TypeError(`Invalid attempt to spread non-iterable instance.
6459
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
6460
- }
6461
- __name(_nonIterableSpread$2, "_nonIterableSpread$2");
6462
- function _toConsumableArray$3(r) {
6463
- return _arrayWithoutHoles$2(r) || _iterableToArray$2(r) || _unsupportedIterableToArray$2(r) || _nonIterableSpread$2();
6464
- }
6465
- __name(_toConsumableArray$3, "_toConsumableArray$3");
6466
6038
  function useWatch(open, target, popup2, onAlign, onScroll) {
6467
6039
  useLayoutEffect$1(function() {
6468
6040
  if (open && target && popup2) {
@@ -6470,7 +6042,7 @@ function useWatch(open, target, popup2, onAlign, onScroll) {
6470
6042
  onAlign(), onScroll();
6471
6043
  };
6472
6044
  __name(notifyScroll, "notifyScroll");
6473
- var targetElement = target, popupElement = popup2, targetScrollList = collectScroller(targetElement), popupScrollList = collectScroller(popupElement), win = getWin(popupElement), mergedList = new Set([win].concat(_toConsumableArray$3(targetScrollList), _toConsumableArray$3(popupScrollList)));
6045
+ var targetElement = target, popupElement = popup2, targetScrollList = collectScroller(targetElement), popupScrollList = collectScroller(popupElement), win = getWin(popupElement), mergedList = new Set([win].concat(_toConsumableArray$4(targetScrollList), _toConsumableArray$4(popupScrollList)));
6474
6046
  return mergedList.forEach(function(scroller) {
6475
6047
  scroller.addEventListener("scroll", notifyScroll, {
6476
6048
  passive: !0
@@ -6506,7 +6078,7 @@ __name(useWinClick, "useWinClick");
6506
6078
  var _excluded$v = ["prefixCls", "children", "action", "showAction", "hideAction", "popupVisible", "defaultPopupVisible", "onPopupVisibleChange", "afterPopupVisibleChange", "mouseEnterDelay", "mouseLeaveDelay", "focusDelay", "blurDelay", "mask", "maskClosable", "getPopupContainer", "forceRender", "autoDestroy", "destroyPopupOnHide", "popup", "popupClassName", "popupStyle", "popupPlacement", "builtinPlacements", "popupAlign", "zIndex", "stretch", "getPopupClassNameFromAlign", "fresh", "alignPoint", "onPopupClick", "onPopupAlign", "arrow", "popupMotion", "maskMotion", "popupTransitionName", "popupAnimation", "maskTransitionName", "maskAnimation", "className", "getTriggerDOMNode"];
6507
6079
  function generateTrigger() {
6508
6080
  var PortalComponent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Portal, Trigger2 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
6509
- var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "rc-trigger-popup" : _props$prefixCls, children = props.children, _props$action = props.action, action = _props$action === void 0 ? "hover" : _props$action, showAction = props.showAction, hideAction = props.hideAction, popupVisible = props.popupVisible, defaultPopupVisible = props.defaultPopupVisible, onPopupVisibleChange = props.onPopupVisibleChange, afterPopupVisibleChange = props.afterPopupVisibleChange, mouseEnterDelay = props.mouseEnterDelay, _props$mouseLeaveDela = props.mouseLeaveDelay, mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela, focusDelay = props.focusDelay, blurDelay = props.blurDelay, mask = props.mask, _props$maskClosable = props.maskClosable, maskClosable = _props$maskClosable === void 0 ? !0 : _props$maskClosable, getPopupContainer = props.getPopupContainer, forceRender = props.forceRender, autoDestroy = props.autoDestroy, destroyPopupOnHide = props.destroyPopupOnHide, popup2 = props.popup, popupClassName = props.popupClassName, popupStyle = props.popupStyle, popupPlacement = props.popupPlacement, _props$builtinPlaceme = props.builtinPlacements, builtinPlacements = _props$builtinPlaceme === void 0 ? {} : _props$builtinPlaceme, popupAlign = props.popupAlign, zIndex = props.zIndex, stretch = props.stretch, getPopupClassNameFromAlign = props.getPopupClassNameFromAlign, fresh = props.fresh, alignPoint = props.alignPoint, onPopupClick = props.onPopupClick, onPopupAlign = props.onPopupAlign, arrow = props.arrow, popupMotion = props.popupMotion, maskMotion = props.maskMotion, popupTransitionName = props.popupTransitionName, popupAnimation = props.popupAnimation, maskTransitionName = props.maskTransitionName, maskAnimation = props.maskAnimation, className = props.className, getTriggerDOMNode = props.getTriggerDOMNode, restProps = _objectWithoutProperties$3(props, _excluded$v), mergedAutoDestroy = autoDestroy || destroyPopupOnHide || !1, _React$useState = React$6.useState(!1), _React$useState2 = _slicedToArray$3(_React$useState, 2), mobile = _React$useState2[0], setMobile = _React$useState2[1];
6081
+ var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "rc-trigger-popup" : _props$prefixCls, children = props.children, _props$action = props.action, action = _props$action === void 0 ? "hover" : _props$action, showAction = props.showAction, hideAction = props.hideAction, popupVisible = props.popupVisible, defaultPopupVisible = props.defaultPopupVisible, onPopupVisibleChange = props.onPopupVisibleChange, afterPopupVisibleChange = props.afterPopupVisibleChange, mouseEnterDelay = props.mouseEnterDelay, _props$mouseLeaveDela = props.mouseLeaveDelay, mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela, focusDelay = props.focusDelay, blurDelay = props.blurDelay, mask = props.mask, _props$maskClosable = props.maskClosable, maskClosable = _props$maskClosable === void 0 ? !0 : _props$maskClosable, getPopupContainer = props.getPopupContainer, forceRender = props.forceRender, autoDestroy = props.autoDestroy, destroyPopupOnHide = props.destroyPopupOnHide, popup2 = props.popup, popupClassName = props.popupClassName, popupStyle = props.popupStyle, popupPlacement = props.popupPlacement, _props$builtinPlaceme = props.builtinPlacements, builtinPlacements = _props$builtinPlaceme === void 0 ? {} : _props$builtinPlaceme, popupAlign = props.popupAlign, zIndex = props.zIndex, stretch = props.stretch, getPopupClassNameFromAlign = props.getPopupClassNameFromAlign, fresh = props.fresh, alignPoint = props.alignPoint, onPopupClick = props.onPopupClick, onPopupAlign = props.onPopupAlign, arrow = props.arrow, popupMotion = props.popupMotion, maskMotion = props.maskMotion, popupTransitionName = props.popupTransitionName, popupAnimation = props.popupAnimation, maskTransitionName = props.maskTransitionName, maskAnimation = props.maskAnimation, className = props.className, getTriggerDOMNode = props.getTriggerDOMNode, restProps = _objectWithoutProperties$2(props, _excluded$v), mergedAutoDestroy = autoDestroy || destroyPopupOnHide || !1, _React$useState = React$6.useState(!1), _React$useState2 = _slicedToArray$1(_React$useState, 2), mobile = _React$useState2[0], setMobile = _React$useState2[1];
6510
6082
  useLayoutEffect$1(function() {
6511
6083
  setMobile(isMobile());
6512
6084
  }, []);
@@ -6516,16 +6088,16 @@ function generateTrigger() {
6516
6088
  subPopupElements.current[id2] = subPopupEle, parentContext == null || parentContext.registerSubPopup(id2, subPopupEle);
6517
6089
  }, "registerSubPopup")
6518
6090
  };
6519
- }, [parentContext]), id = useId$1(), _React$useState3 = React$6.useState(null), _React$useState4 = _slicedToArray$3(_React$useState3, 2), popupEle = _React$useState4[0], setPopupEle = _React$useState4[1], externalPopupRef = React$6.useRef(null), setPopupRef = useEvent(function(node) {
6091
+ }, [parentContext]), id = useId$1(), _React$useState3 = React$6.useState(null), _React$useState4 = _slicedToArray$1(_React$useState3, 2), popupEle = _React$useState4[0], setPopupEle = _React$useState4[1], externalPopupRef = React$6.useRef(null), setPopupRef = useEvent(function(node) {
6520
6092
  externalPopupRef.current = node, isDOM(node) && popupEle !== node && setPopupEle(node), parentContext == null || parentContext.registerSubPopup(id, node);
6521
- }), _React$useState5 = React$6.useState(null), _React$useState6 = _slicedToArray$3(_React$useState5, 2), targetEle = _React$useState6[0], setTargetEle = _React$useState6[1], externalForwardRef = React$6.useRef(null), setTargetRef = useEvent(function(node) {
6093
+ }), _React$useState5 = React$6.useState(null), _React$useState6 = _slicedToArray$1(_React$useState5, 2), targetEle = _React$useState6[0], setTargetEle = _React$useState6[1], externalForwardRef = React$6.useRef(null), setTargetRef = useEvent(function(node) {
6522
6094
  isDOM(node) && targetEle !== node && (setTargetEle(node), externalForwardRef.current = node);
6523
6095
  }), child = React$6.Children.only(children), originChildProps = (child == null ? void 0 : child.props) || {}, cloneProps = {}, inPopupOrChild = useEvent(function(ele) {
6524
6096
  var _getShadowRoot, _getShadowRoot2, childDOM = targetEle;
6525
6097
  return (childDOM == null ? void 0 : childDOM.contains(ele)) || ((_getShadowRoot = getShadowRoot(childDOM)) === null || _getShadowRoot === void 0 ? void 0 : _getShadowRoot.host) === ele || ele === childDOM || (popupEle == null ? void 0 : popupEle.contains(ele)) || ((_getShadowRoot2 = getShadowRoot(popupEle)) === null || _getShadowRoot2 === void 0 ? void 0 : _getShadowRoot2.host) === ele || ele === popupEle || Object.values(subPopupElements.current).some(function(subPopupEle) {
6526
6098
  return (subPopupEle == null ? void 0 : subPopupEle.contains(ele)) || ele === subPopupEle;
6527
6099
  });
6528
- }), mergePopupMotion = getMotion$1(prefixCls, popupMotion, popupAnimation, popupTransitionName), mergeMaskMotion = getMotion$1(prefixCls, maskMotion, maskAnimation, maskTransitionName), _React$useState7 = React$6.useState(defaultPopupVisible || !1), _React$useState8 = _slicedToArray$3(_React$useState7, 2), internalOpen = _React$useState8[0], setInternalOpen = _React$useState8[1], mergedOpen = popupVisible != null ? popupVisible : internalOpen, setMergedOpen = useEvent(function(nextOpen) {
6100
+ }), mergePopupMotion = getMotion$1(prefixCls, popupMotion, popupAnimation, popupTransitionName), mergeMaskMotion = getMotion$1(prefixCls, maskMotion, maskAnimation, maskTransitionName), _React$useState7 = React$6.useState(defaultPopupVisible || !1), _React$useState8 = _slicedToArray$1(_React$useState7, 2), internalOpen = _React$useState8[0], setInternalOpen = _React$useState8[1], mergedOpen = popupVisible != null ? popupVisible : internalOpen, setMergedOpen = useEvent(function(nextOpen) {
6529
6101
  popupVisible === void 0 && setInternalOpen(nextOpen);
6530
6102
  });
6531
6103
  useLayoutEffect$1(function() {
@@ -6549,13 +6121,13 @@ function generateTrigger() {
6549
6121
  React$6.useEffect(function() {
6550
6122
  return clearDelay;
6551
6123
  }, []);
6552
- var _React$useState9 = React$6.useState(!1), _React$useState10 = _slicedToArray$3(_React$useState9, 2), inMotion = _React$useState10[0], setInMotion = _React$useState10[1];
6124
+ var _React$useState9 = React$6.useState(!1), _React$useState10 = _slicedToArray$1(_React$useState9, 2), inMotion = _React$useState10[0], setInMotion = _React$useState10[1];
6553
6125
  useLayoutEffect$1(function(firstMount) {
6554
6126
  (!firstMount || mergedOpen) && setInMotion(!0);
6555
6127
  }, [mergedOpen]);
6556
- var _React$useState11 = React$6.useState(null), _React$useState12 = _slicedToArray$3(_React$useState11, 2), motionPrepareResolve = _React$useState12[0], setMotionPrepareResolve = _React$useState12[1], _React$useState13 = React$6.useState([0, 0]), _React$useState14 = _slicedToArray$3(_React$useState13, 2), mousePos = _React$useState14[0], setMousePos = _React$useState14[1], setMousePosByEvent = /* @__PURE__ */ __name(function(event) {
6128
+ var _React$useState11 = React$6.useState(null), _React$useState12 = _slicedToArray$1(_React$useState11, 2), motionPrepareResolve = _React$useState12[0], setMotionPrepareResolve = _React$useState12[1], _React$useState13 = React$6.useState(null), _React$useState14 = _slicedToArray$1(_React$useState13, 2), mousePos = _React$useState14[0], setMousePos = _React$useState14[1], setMousePosByEvent = /* @__PURE__ */ __name(function(event) {
6557
6129
  setMousePos([event.clientX, event.clientY]);
6558
- }, "setMousePosByEvent2"), _useAlign = useAlign(mergedOpen, popupEle, alignPoint ? mousePos : targetEle, popupPlacement, builtinPlacements, popupAlign, onPopupAlign), _useAlign2 = _slicedToArray$3(_useAlign, 11), ready = _useAlign2[0], offsetX = _useAlign2[1], offsetY = _useAlign2[2], offsetR = _useAlign2[3], offsetB = _useAlign2[4], arrowX = _useAlign2[5], arrowY = _useAlign2[6], scaleX = _useAlign2[7], scaleY = _useAlign2[8], alignInfo = _useAlign2[9], onAlign = _useAlign2[10], _useAction = useAction(mobile, action, showAction, hideAction), _useAction2 = _slicedToArray$3(_useAction, 2), showActions = _useAction2[0], hideActions = _useAction2[1], clickToShow = showActions.has("click"), clickToHide = hideActions.has("click") || hideActions.has("contextMenu"), triggerAlign = useEvent(function() {
6130
+ }, "setMousePosByEvent2"), _useAlign = useAlign(mergedOpen, popupEle, alignPoint && mousePos !== null ? mousePos : targetEle, popupPlacement, builtinPlacements, popupAlign, onPopupAlign), _useAlign2 = _slicedToArray$1(_useAlign, 11), ready = _useAlign2[0], offsetX = _useAlign2[1], offsetY = _useAlign2[2], offsetR = _useAlign2[3], offsetB = _useAlign2[4], arrowX = _useAlign2[5], arrowY = _useAlign2[6], scaleX = _useAlign2[7], scaleY = _useAlign2[8], alignInfo = _useAlign2[9], onAlign = _useAlign2[10], _useAction = useAction(mobile, action, showAction, hideAction), _useAction2 = _slicedToArray$1(_useAction, 2), showActions = _useAction2[0], hideActions = _useAction2[1], clickToShow = showActions.has("click"), clickToHide = hideActions.has("click") || hideActions.has("contextMenu"), triggerAlign = useEvent(function() {
6559
6131
  inMotion || onAlign();
6560
6132
  }), onScroll = /* @__PURE__ */ __name(function() {
6561
6133
  openRef.current && alignPoint && clickToHide && triggerOpen(!1);
@@ -6576,7 +6148,7 @@ function generateTrigger() {
6576
6148
  forceAlign: triggerAlign
6577
6149
  };
6578
6150
  });
6579
- var _React$useState15 = React$6.useState(0), _React$useState16 = _slicedToArray$3(_React$useState15, 2), targetWidth = _React$useState16[0], setTargetWidth = _React$useState16[1], _React$useState17 = React$6.useState(0), _React$useState18 = _slicedToArray$3(_React$useState17, 2), targetHeight = _React$useState18[0], setTargetHeight = _React$useState18[1], syncTargetSize = /* @__PURE__ */ __name(function() {
6151
+ var _React$useState15 = React$6.useState(0), _React$useState16 = _slicedToArray$1(_React$useState15, 2), targetWidth = _React$useState16[0], setTargetWidth = _React$useState16[1], _React$useState17 = React$6.useState(0), _React$useState18 = _slicedToArray$1(_React$useState17, 2), targetHeight = _React$useState18[0], setTargetHeight = _React$useState18[1], syncTargetSize = /* @__PURE__ */ __name(function() {
6580
6152
  if (stretch && targetEle) {
6581
6153
  var rect = targetEle.getBoundingClientRect();
6582
6154
  setTargetWidth(rect.width), setTargetHeight(rect.height);
@@ -6630,7 +6202,7 @@ function generateTrigger() {
6630
6202
  args[_key3 - 1] = arguments[_key3];
6631
6203
  (_originChildProps$onC2 = originChildProps.onContextMenu) === null || _originChildProps$onC2 === void 0 || _originChildProps$onC2.call.apply(_originChildProps$onC2, [originChildProps, event].concat(args));
6632
6204
  }), className && (cloneProps.className = clsx(originChildProps.className, className));
6633
- var mergedChildrenProps = _objectSpread2$3(_objectSpread2$3({}, originChildProps), cloneProps), passedProps = {}, passedEventList = ["onContextMenu", "onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur"];
6205
+ var mergedChildrenProps = _objectSpread2$1(_objectSpread2$1({}, originChildProps), cloneProps), passedProps = {}, passedEventList = ["onContextMenu", "onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur"];
6634
6206
  passedEventList.forEach(function(eventName) {
6635
6207
  restProps[eventName] && (passedProps[eventName] = function() {
6636
6208
  for (var _mergedChildrenProps$, _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++)
@@ -6638,10 +6210,10 @@ function generateTrigger() {
6638
6210
  (_mergedChildrenProps$ = mergedChildrenProps[eventName]) === null || _mergedChildrenProps$ === void 0 || _mergedChildrenProps$.call.apply(_mergedChildrenProps$, [mergedChildrenProps].concat(args)), restProps[eventName].apply(restProps, args);
6639
6211
  });
6640
6212
  });
6641
- var triggerNode = /* @__PURE__ */ React$6.cloneElement(child, _objectSpread2$3(_objectSpread2$3({}, mergedChildrenProps), passedProps)), arrowPos = {
6213
+ var triggerNode = /* @__PURE__ */ React$6.cloneElement(child, _objectSpread2$1(_objectSpread2$1({}, mergedChildrenProps), passedProps)), arrowPos = {
6642
6214
  x: arrowX,
6643
6215
  y: arrowY
6644
- }, innerArrow = arrow ? _objectSpread2$3({}, arrow !== !0 ? arrow : {}) : null;
6216
+ }, innerArrow = arrow ? _objectSpread2$1({}, arrow !== !0 ? arrow : {}) : null;
6645
6217
  return /* @__PURE__ */ React$6.createElement(React$6.Fragment, null, /* @__PURE__ */ React$6.createElement(RefResizeObserver, {
6646
6218
  disabled: !mergedOpen,
6647
6219
  ref: setTargetRef,
@@ -8937,7 +8509,28 @@ var _excluded$t = ["active", "showActiveCls", "suffixIcon", "format", "validateF
8937
8509
  type: "suffix",
8938
8510
  icon: suffixIcon
8939
8511
  }), clearIcon);
8940
- }), _excluded$s = ["prefixCls", "invalidate", "item", "renderItem", "responsive", "responsiveDisabled", "registerSize", "itemKey", "className", "style", "children", "display", "order", "component"], UNDEFINED = void 0;
8512
+ });
8513
+ function _objectWithoutPropertiesLoose$3(r, e2) {
8514
+ if (r == null) return {};
8515
+ var t2 = {};
8516
+ for (var n2 in r) if ({}.hasOwnProperty.call(r, n2)) {
8517
+ if (e2.indexOf(n2) >= 0) continue;
8518
+ t2[n2] = r[n2];
8519
+ }
8520
+ return t2;
8521
+ }
8522
+ __name(_objectWithoutPropertiesLoose$3, "_objectWithoutPropertiesLoose$3");
8523
+ function _objectWithoutProperties$1(e2, t2) {
8524
+ if (e2 == null) return {};
8525
+ var o, r, i = _objectWithoutPropertiesLoose$3(e2, t2);
8526
+ if (Object.getOwnPropertySymbols) {
8527
+ var n2 = Object.getOwnPropertySymbols(e2);
8528
+ for (r = 0; r < n2.length; r++) o = n2[r], t2.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e2, o) && (i[o] = e2[o]);
8529
+ }
8530
+ return i;
8531
+ }
8532
+ __name(_objectWithoutProperties$1, "_objectWithoutProperties$1");
8533
+ var _excluded$s = ["prefixCls", "invalidate", "item", "renderItem", "responsive", "responsiveDisabled", "registerSize", "itemKey", "className", "style", "children", "display", "order", "component"], UNDEFINED = void 0;
8941
8534
  function InternalItem(props, ref) {
8942
8535
  var prefixCls = props.prefixCls, invalidate = props.invalidate, item = props.item, renderItem = props.renderItem, responsive = props.responsive, responsiveDisabled = props.responsiveDisabled, registerSize = props.registerSize, itemKey2 = props.itemKey, className = props.className, style2 = props.style, children = props.children, display = props.display, order = props.order, _props$component = props.component, Component = _props$component === void 0 ? "div" : _props$component, restProps = _objectWithoutProperties$1(props, _excluded$s), mergedHidden = responsive && !display;
8943
8536
  function internalRegisterSize(width2) {
@@ -10087,8 +9680,8 @@ const formLayout = "univer-form-layout", formLayoutLabel = "univer-form-layout-l
10087
9680
  formLayoutError,
10088
9681
  formDualColumnLayout
10089
9682
  }, FormLayout = /* @__PURE__ */ __name((props) => {
10090
- const { label, desc, children, style: style2, className, error } = props;
10091
- return /* @__PURE__ */ React__default.createElement("div", { className: clsx$1(styles$j.formLayout, className), style: style2 }, label && /* @__PURE__ */ React__default.createElement("div", { className: styles$j.formLayoutLabel }, label), desc && /* @__PURE__ */ React__default.createElement("div", { className: styles$j.formLayoutDesc }, desc), /* @__PURE__ */ React__default.createElement("div", { className: clsx$1(styles$j.formLayoutContent, error ? styles$j.formLayoutContentError : "") }, children, error ? /* @__PURE__ */ React__default.createElement("div", { className: styles$j.formLayoutError }, error) : null));
9683
+ const { label, desc, children, style: style2, className, error, contentStyle } = props;
9684
+ return /* @__PURE__ */ React__default.createElement("div", { className: clsx$1(styles$j.formLayout, className), style: style2 }, label && /* @__PURE__ */ React__default.createElement("div", { className: styles$j.formLayoutLabel }, label), desc && /* @__PURE__ */ React__default.createElement("div", { className: styles$j.formLayoutDesc }, desc), /* @__PURE__ */ React__default.createElement("div", { style: contentStyle, className: clsx$1(styles$j.formLayoutContent, error ? styles$j.formLayoutContentError : "") }, children, error ? /* @__PURE__ */ React__default.createElement("div", { className: styles$j.formLayoutError }, error) : null));
10092
9685
  }, "FormLayout"), FormDualColumnLayout = /* @__PURE__ */ __name((props) => /* @__PURE__ */ React__default.createElement("div", { className: styles$j.formDualColumnLayout }, props.children), "FormDualColumnLayout");
10093
9686
  function hasAddon(props) {
10094
9687
  return !!(props.addonBefore || props.addonAfter);
@@ -10208,7 +9801,25 @@ var BaseInput = /* @__PURE__ */ React__default.forwardRef(function(props, ref) {
10208
9801
  style: _objectSpread2$3(_objectSpread2$3({}, (_element$props2 = element2.props) === null || _element$props2 === void 0 ? void 0 : _element$props2.style), style2),
10209
9802
  hidden
10210
9803
  });
10211
- }), _excluded$n = ["show"];
9804
+ });
9805
+ function _arrayWithoutHoles$2(r) {
9806
+ if (Array.isArray(r)) return _arrayLikeToArray$2(r);
9807
+ }
9808
+ __name(_arrayWithoutHoles$2, "_arrayWithoutHoles$2");
9809
+ function _iterableToArray$2(r) {
9810
+ if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
9811
+ }
9812
+ __name(_iterableToArray$2, "_iterableToArray$2");
9813
+ function _nonIterableSpread$2() {
9814
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
9815
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
9816
+ }
9817
+ __name(_nonIterableSpread$2, "_nonIterableSpread$2");
9818
+ function _toConsumableArray$3(r) {
9819
+ return _arrayWithoutHoles$2(r) || _iterableToArray$2(r) || _unsupportedIterableToArray$2(r) || _nonIterableSpread$2();
9820
+ }
9821
+ __name(_toConsumableArray$3, "_toConsumableArray$3");
9822
+ var _excluded$n = ["show"];
10212
9823
  function useCount(count, showCount) {
10213
9824
  return React$6.useMemo(function() {
10214
9825
  var mergedConfig = {};
@@ -11707,7 +11318,7 @@ function InlineSubMenuList(_ref) {
11707
11318
  }, destroy ? null : /* @__PURE__ */ React$6.createElement(InheritableContextProvider, {
11708
11319
  mode: fixedMode,
11709
11320
  locked: !sameModeRef.current
11710
- }, /* @__PURE__ */ React$6.createElement(CSSMotion$1, _extends$6({
11321
+ }, /* @__PURE__ */ React$6.createElement(CSSMotion, _extends$6({
11711
11322
  visible: mergedOpen
11712
11323
  }, mergedMotion, {
11713
11324
  forceRender: forceSubMenuRender,
@@ -13264,7 +12875,7 @@ function calcPopupPosition(layout) {
13264
12875
  }
13265
12876
  __name(calcPopupPosition, "calcPopupPosition");
13266
12877
  function RectPopup(props) {
13267
- const { children, anchorRect, direction = "vertical", onClickOutside, excludeOutside, excludeRects } = props, nodeRef = useRef(null), clickOtherFn = useEvent(onClickOutside != null ? onClickOutside : () => {
12878
+ const { children, anchorRect, direction = "vertical", onClickOutside, excludeOutside, excludeRects, onPinterEnter, onPointerLeave, onClick, hidden } = props, nodeRef = useRef(null), clickOtherFn = useEvent(onClickOutside != null ? onClickOutside : () => {
13268
12879
  }), [position, setPosition] = useState({
13269
12880
  top: -9999,
13270
12881
  left: -9999
@@ -13313,10 +12924,13 @@ function RectPopup(props) {
13313
12924
  }, [anchorRect, anchorRect.bottom, anchorRect.left, anchorRect.right, anchorRect.top, clickOtherFn, excludeOutside]), /* @__PURE__ */ React__default.createElement(
13314
12925
  "section",
13315
12926
  {
12927
+ onPointerEnter: onPinterEnter,
12928
+ onPointerLeave,
13316
12929
  ref: nodeRef,
13317
- style: style2,
12930
+ style: { ...style2, ...hidden ? { display: "none" } : null },
13318
12931
  className: styles$d.popupFixed,
13319
- onPointerDown: /* @__PURE__ */ __name((e2) => e2.stopPropagation(), "onPointerDown")
12932
+ onPointerDown: /* @__PURE__ */ __name((e2) => e2.stopPropagation(), "onPointerDown"),
12933
+ onClick
13320
12934
  },
13321
12935
  /* @__PURE__ */ React__default.createElement(RectPopupContext.Provider, { value: anchorRect }, children)
13322
12936
  );
@@ -13465,7 +13079,7 @@ var TransBtn = /* @__PURE__ */ __name(function(props) {
13465
13079
  }, children));
13466
13080
  }, "TransBtn"), useAllowClear = /* @__PURE__ */ __name(function(prefixCls, onClearMouseDown, displayValues, allowClear, clearIcon) {
13467
13081
  var disabled = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, mergedSearchValue = arguments.length > 6 ? arguments[6] : void 0, mode = arguments.length > 7 ? arguments[7] : void 0, mergedClearIcon = React__default.useMemo(function() {
13468
- if (_typeof$3(allowClear) === "object")
13082
+ if (_typeof$2(allowClear) === "object")
13469
13083
  return allowClear.clearIcon;
13470
13084
  if (clearIcon)
13471
13085
  return clearIcon;
@@ -13486,7 +13100,7 @@ function useBaseProps() {
13486
13100
  }
13487
13101
  __name(useBaseProps, "useBaseProps");
13488
13102
  function useDelayReset() {
13489
- var timeout = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, _React$useState = React$6.useState(!1), _React$useState2 = _slicedToArray$2(_React$useState, 2), bool = _React$useState2[0], setBool = _React$useState2[1], delayRef = React$6.useRef(null), cancelLatest = /* @__PURE__ */ __name(function() {
13103
+ var timeout = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 10, _React$useState = React$6.useState(!1), _React$useState2 = _slicedToArray$1(_React$useState, 2), bool = _React$useState2[0], setBool = _React$useState2[1], delayRef = React$6.useRef(null), cancelLatest = /* @__PURE__ */ __name(function() {
13490
13104
  window.clearTimeout(delayRef.current);
13491
13105
  }, "cancelLatest");
13492
13106
  React$6.useEffect(function() {
@@ -13575,7 +13189,7 @@ function isValidateOpenKey(currentKeyCode) {
13575
13189
  __name(isValidateOpenKey, "isValidateOpenKey");
13576
13190
  var Input = /* @__PURE__ */ __name(function(props, ref) {
13577
13191
  var _inputNode2, prefixCls = props.prefixCls, id = props.id, inputElement = props.inputElement, disabled = props.disabled, tabIndex = props.tabIndex, autoFocus = props.autoFocus, autoComplete = props.autoComplete, editable = props.editable, activeDescendantId = props.activeDescendantId, value = props.value, maxLength = props.maxLength, _onKeyDown = props.onKeyDown, _onMouseDown = props.onMouseDown, _onChange = props.onChange, onPaste = props.onPaste, _onCompositionStart = props.onCompositionStart, _onCompositionEnd = props.onCompositionEnd, open = props.open, attrs = props.attrs, inputNode = inputElement || /* @__PURE__ */ React$6.createElement("input", null), _inputNode = inputNode, originRef = _inputNode.ref, originProps = _inputNode.props, onOriginKeyDown = originProps.onKeyDown, onOriginChange = originProps.onChange, onOriginMouseDown = originProps.onMouseDown, onOriginCompositionStart = originProps.onCompositionStart, onOriginCompositionEnd = originProps.onCompositionEnd, style2 = originProps.style;
13578
- return "maxLength" in inputNode.props, inputNode = /* @__PURE__ */ React$6.cloneElement(inputNode, _objectSpread2$2(_objectSpread2$2(_objectSpread2$2({
13192
+ return "maxLength" in inputNode.props, inputNode = /* @__PURE__ */ React$6.cloneElement(inputNode, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({
13579
13193
  type: "search"
13580
13194
  }, originProps), {}, {
13581
13195
  // Override over origin props
@@ -13598,7 +13212,7 @@ var Input = /* @__PURE__ */ __name(function(props, ref) {
13598
13212
  maxLength,
13599
13213
  readOnly: !editable,
13600
13214
  unselectable: editable ? null : "on",
13601
- style: _objectSpread2$2(_objectSpread2$2({}, style2), {}, {
13215
+ style: _objectSpread2$1(_objectSpread2$1({}, style2), {}, {
13602
13216
  opacity: editable ? null : 0
13603
13217
  }),
13604
13218
  onKeyDown: /* @__PURE__ */ __name(function(event) {
@@ -13633,7 +13247,7 @@ function isComboNoValue(value) {
13633
13247
  }
13634
13248
  __name(isComboNoValue, "isComboNoValue");
13635
13249
  function isTitleType$1(title) {
13636
- return ["string", "number"].includes(_typeof$3(title));
13250
+ return ["string", "number"].includes(_typeof$2(title));
13637
13251
  }
13638
13252
  __name(isTitleType$1, "isTitleType$1");
13639
13253
  function getTitle(item) {
@@ -13655,14 +13269,14 @@ var onPreventMouseDown = /* @__PURE__ */ __name(function(event) {
13655
13269
  }, "onPreventMouseDown"), SelectSelector = /* @__PURE__ */ __name(function(props) {
13656
13270
  var id = props.id, prefixCls = props.prefixCls, values3 = props.values, open = props.open, searchValue = props.searchValue, autoClearSearchValue = props.autoClearSearchValue, inputRef = props.inputRef, placeholder = props.placeholder, disabled = props.disabled, mode = props.mode, showSearch = props.showSearch, autoFocus = props.autoFocus, autoComplete = props.autoComplete, activeDescendantId = props.activeDescendantId, tabIndex = props.tabIndex, removeIcon = props.removeIcon, maxTagCount = props.maxTagCount, maxTagTextLength = props.maxTagTextLength, _props$maxTagPlacehol = props.maxTagPlaceholder, maxTagPlaceholder = _props$maxTagPlacehol === void 0 ? function(omittedValues) {
13657
13271
  return "+ ".concat(omittedValues.length, " ...");
13658
- } : _props$maxTagPlacehol, tagRender = props.tagRender, onToggleOpen = props.onToggleOpen, onRemove2 = props.onRemove, onInputChange = props.onInputChange, onInputPaste = props.onInputPaste, onInputKeyDown = props.onInputKeyDown, onInputMouseDown = props.onInputMouseDown, onInputCompositionStart = props.onInputCompositionStart, onInputCompositionEnd = props.onInputCompositionEnd, measureRef = React$6.useRef(null), _useState = useState(0), _useState2 = _slicedToArray$2(_useState, 2), inputWidth = _useState2[0], setInputWidth = _useState2[1], _useState3 = useState(!1), _useState4 = _slicedToArray$2(_useState3, 2), focused = _useState4[0], setFocused = _useState4[1], selectionPrefixCls = "".concat(prefixCls, "-selection"), inputValue = open || mode === "multiple" && autoClearSearchValue === !1 || mode === "tags" ? searchValue : "", inputEditable = mode === "tags" || mode === "multiple" && autoClearSearchValue === !1 || showSearch && (open || focused);
13272
+ } : _props$maxTagPlacehol, tagRender = props.tagRender, onToggleOpen = props.onToggleOpen, onRemove2 = props.onRemove, onInputChange = props.onInputChange, onInputPaste = props.onInputPaste, onInputKeyDown = props.onInputKeyDown, onInputMouseDown = props.onInputMouseDown, onInputCompositionStart = props.onInputCompositionStart, onInputCompositionEnd = props.onInputCompositionEnd, measureRef = React$6.useRef(null), _useState = useState(0), _useState2 = _slicedToArray$1(_useState, 2), inputWidth = _useState2[0], setInputWidth = _useState2[1], _useState3 = useState(!1), _useState4 = _slicedToArray$1(_useState3, 2), focused = _useState4[0], setFocused = _useState4[1], selectionPrefixCls = "".concat(prefixCls, "-selection"), inputValue = open || mode === "multiple" && autoClearSearchValue === !1 || mode === "tags" ? searchValue : "", inputEditable = mode === "tags" || mode === "multiple" && autoClearSearchValue === !1 || showSearch && (open || focused);
13659
13273
  useLayoutEffect(function() {
13660
13274
  setInputWidth(measureRef.current.scrollWidth);
13661
13275
  }, [inputValue]);
13662
13276
  var defaultRenderSelector = /* @__PURE__ */ __name(function(item, content, itemDisabled, closable, onClose) {
13663
13277
  return /* @__PURE__ */ React$6.createElement("span", {
13664
13278
  title: getTitle(item),
13665
- className: clsx("".concat(selectionPrefixCls, "-item"), _defineProperty$c({}, "".concat(selectionPrefixCls, "-item-disabled"), itemDisabled))
13279
+ className: clsx("".concat(selectionPrefixCls, "-item"), _defineProperty$b({}, "".concat(selectionPrefixCls, "-item-disabled"), itemDisabled))
13666
13280
  }, /* @__PURE__ */ React$6.createElement("span", {
13667
13281
  className: "".concat(selectionPrefixCls, "-item-content")
13668
13282
  }, content), closable && /* @__PURE__ */ React$6.createElement(TransBtn, {
@@ -13748,7 +13362,7 @@ var onPreventMouseDown = /* @__PURE__ */ __name(function(event) {
13748
13362
  className: "".concat(selectionPrefixCls, "-placeholder")
13749
13363
  }, placeholder));
13750
13364
  }, "SelectSelector"), SingleSelector = /* @__PURE__ */ __name(function(props) {
13751
- var inputElement = props.inputElement, prefixCls = props.prefixCls, id = props.id, inputRef = props.inputRef, disabled = props.disabled, autoFocus = props.autoFocus, autoComplete = props.autoComplete, activeDescendantId = props.activeDescendantId, mode = props.mode, open = props.open, values3 = props.values, placeholder = props.placeholder, tabIndex = props.tabIndex, showSearch = props.showSearch, searchValue = props.searchValue, activeValue = props.activeValue, maxLength = props.maxLength, onInputKeyDown = props.onInputKeyDown, onInputMouseDown = props.onInputMouseDown, onInputChange = props.onInputChange, onInputPaste = props.onInputPaste, onInputCompositionStart = props.onInputCompositionStart, onInputCompositionEnd = props.onInputCompositionEnd, title = props.title, _React$useState = React$6.useState(!1), _React$useState2 = _slicedToArray$2(_React$useState, 2), inputChanged = _React$useState2[0], setInputChanged = _React$useState2[1], combobox = mode === "combobox", inputEditable = combobox || showSearch, item = values3[0], inputValue = searchValue || "";
13365
+ var inputElement = props.inputElement, prefixCls = props.prefixCls, id = props.id, inputRef = props.inputRef, disabled = props.disabled, autoFocus = props.autoFocus, autoComplete = props.autoComplete, activeDescendantId = props.activeDescendantId, mode = props.mode, open = props.open, values3 = props.values, placeholder = props.placeholder, tabIndex = props.tabIndex, showSearch = props.showSearch, searchValue = props.searchValue, activeValue = props.activeValue, maxLength = props.maxLength, onInputKeyDown = props.onInputKeyDown, onInputMouseDown = props.onInputMouseDown, onInputChange = props.onInputChange, onInputPaste = props.onInputPaste, onInputCompositionStart = props.onInputCompositionStart, onInputCompositionEnd = props.onInputCompositionEnd, title = props.title, _React$useState = React$6.useState(!1), _React$useState2 = _slicedToArray$1(_React$useState, 2), inputChanged = _React$useState2[0], setInputChanged = _React$useState2[1], combobox = mode === "combobox", inputEditable = combobox || showSearch, item = values3[0], inputValue = searchValue || "";
13752
13366
  combobox && activeValue && !inputChanged && (inputValue = activeValue), React$6.useEffect(function() {
13753
13367
  combobox && setInputChanged(!1);
13754
13368
  }, [combobox, activeValue]);
@@ -13804,7 +13418,7 @@ var onPreventMouseDown = /* @__PURE__ */ __name(function(event) {
13804
13418
  }, "blur")
13805
13419
  };
13806
13420
  });
13807
- var _useLock = useLock(0), _useLock2 = _slicedToArray$2(_useLock, 2), getInputMouseDown = _useLock2[0], setInputMouseDown = _useLock2[1], onInternalInputKeyDown = /* @__PURE__ */ __name(function(event) {
13421
+ var _useLock = useLock(0), _useLock2 = _slicedToArray$1(_useLock, 2), getInputMouseDown = _useLock2[0], setInputMouseDown = _useLock2[1], onInternalInputKeyDown = /* @__PURE__ */ __name(function(event) {
13808
13422
  var which = event.which;
13809
13423
  (which === KeyCode.UP || which === KeyCode.DOWN) && event.preventDefault(), onInputKeyDown && onInputKeyDown(event), which === KeyCode.ENTER && mode === "tags" && !compositionStatusRef.current && !open && (onSearchSubmit == null || onSearchSubmit(event.target.value)), isValidateOpenKey(which) && onToggleOpen(!0);
13810
13424
  }, "onInternalInputKeyDown2"), onInternalInputMouseDown = /* @__PURE__ */ __name(function() {
@@ -13844,7 +13458,7 @@ var onPreventMouseDown = /* @__PURE__ */ __name(function(event) {
13844
13458
  onInputPaste,
13845
13459
  onInputCompositionStart,
13846
13460
  onInputCompositionEnd
13847
- }, selectNode = mode === "multiple" || mode === "tags" ? /* @__PURE__ */ React$6.createElement(SelectSelector, _extends$5({}, props, sharedProps)) : /* @__PURE__ */ React$6.createElement(SingleSelector, _extends$5({}, props, sharedProps));
13461
+ }, selectNode = mode === "multiple" || mode === "tags" ? /* @__PURE__ */ React$6.createElement(SelectSelector, _extends$6({}, props, sharedProps)) : /* @__PURE__ */ React$6.createElement(SingleSelector, _extends$6({}, props, sharedProps));
13848
13462
  return /* @__PURE__ */ React$6.createElement("div", {
13849
13463
  ref: domRef,
13850
13464
  className: "".concat(prefixCls, "-selector"),
@@ -13894,14 +13508,14 @@ var onPreventMouseDown = /* @__PURE__ */ __name(function(event) {
13894
13508
  }, "getBuiltInPlacements2"), SelectTrigger = /* @__PURE__ */ __name(function(props, ref) {
13895
13509
  var prefixCls = props.prefixCls;
13896
13510
  props.disabled;
13897
- var visible = props.visible, children = props.children, popupElement = props.popupElement, animation = props.animation, transitionName = props.transitionName, dropdownStyle = props.dropdownStyle, dropdownClassName = props.dropdownClassName, _props$direction = props.direction, direction = _props$direction === void 0 ? "ltr" : _props$direction, placement = props.placement, builtinPlacements = props.builtinPlacements, dropdownMatchSelectWidth = props.dropdownMatchSelectWidth, dropdownRender = props.dropdownRender, dropdownAlign = props.dropdownAlign, getPopupContainer = props.getPopupContainer, empty = props.empty, getTriggerDOMNode = props.getTriggerDOMNode, onPopupVisibleChange = props.onPopupVisibleChange, onPopupMouseEnter = props.onPopupMouseEnter, restProps = _objectWithoutProperties$1(props, _excluded$c), dropdownPrefixCls = "".concat(prefixCls, "-dropdown"), popupNode = popupElement;
13511
+ var visible = props.visible, children = props.children, popupElement = props.popupElement, animation = props.animation, transitionName = props.transitionName, dropdownStyle = props.dropdownStyle, dropdownClassName = props.dropdownClassName, _props$direction = props.direction, direction = _props$direction === void 0 ? "ltr" : _props$direction, placement = props.placement, builtinPlacements = props.builtinPlacements, dropdownMatchSelectWidth = props.dropdownMatchSelectWidth, dropdownRender = props.dropdownRender, dropdownAlign = props.dropdownAlign, getPopupContainer = props.getPopupContainer, empty = props.empty, getTriggerDOMNode = props.getTriggerDOMNode, onPopupVisibleChange = props.onPopupVisibleChange, onPopupMouseEnter = props.onPopupMouseEnter, restProps = _objectWithoutProperties$2(props, _excluded$c), dropdownPrefixCls = "".concat(prefixCls, "-dropdown"), popupNode = popupElement;
13898
13512
  dropdownRender && (popupNode = dropdownRender(popupElement));
13899
13513
  var mergedBuiltinPlacements = React$6.useMemo(function() {
13900
13514
  return builtinPlacements || getBuiltInPlacements(dropdownMatchSelectWidth);
13901
13515
  }, [builtinPlacements, dropdownMatchSelectWidth]), mergedTransitionName = animation ? "".concat(dropdownPrefixCls, "-").concat(animation) : transitionName, isNumberPopupWidth = typeof dropdownMatchSelectWidth == "number", stretch = React$6.useMemo(function() {
13902
13516
  return isNumberPopupWidth ? null : dropdownMatchSelectWidth === !1 ? "minWidth" : "width";
13903
13517
  }, [dropdownMatchSelectWidth, isNumberPopupWidth]), popupStyle = dropdownStyle;
13904
- isNumberPopupWidth && (popupStyle = _objectSpread2$2(_objectSpread2$2({}, popupStyle), {}, {
13518
+ isNumberPopupWidth && (popupStyle = _objectSpread2$1(_objectSpread2$1({}, popupStyle), {}, {
13905
13519
  width: dropdownMatchSelectWidth
13906
13520
  }));
13907
13521
  var triggerPopupRef = React$6.useRef(null);
@@ -13912,7 +13526,7 @@ var onPreventMouseDown = /* @__PURE__ */ __name(function(event) {
13912
13526
  return (_triggerPopupRef$curr = triggerPopupRef.current) === null || _triggerPopupRef$curr === void 0 ? void 0 : _triggerPopupRef$curr.popupElement;
13913
13527
  }, "getPopupElement")
13914
13528
  };
13915
- }), /* @__PURE__ */ React$6.createElement(Trigger, _extends$5({}, restProps, {
13529
+ }), /* @__PURE__ */ React$6.createElement(Trigger, _extends$6({}, restProps, {
13916
13530
  showAction: onPopupVisibleChange ? ["click"] : [],
13917
13531
  hideAction: onPopupVisibleChange ? ["click"] : [],
13918
13532
  popupPlacement: placement || (direction === "rtl" ? "bottomRight" : "bottomLeft"),
@@ -13927,12 +13541,16 @@ var onPreventMouseDown = /* @__PURE__ */ __name(function(event) {
13927
13541
  popupAlign: dropdownAlign,
13928
13542
  popupVisible: visible,
13929
13543
  getPopupContainer,
13930
- popupClassName: clsx(dropdownClassName, _defineProperty$c({}, "".concat(dropdownPrefixCls, "-empty"), empty)),
13544
+ popupClassName: clsx(dropdownClassName, _defineProperty$b({}, "".concat(dropdownPrefixCls, "-empty"), empty)),
13931
13545
  popupStyle,
13932
13546
  getTriggerDOMNode,
13933
13547
  onPopupVisibleChange
13934
13548
  }), children);
13935
13549
  }, "SelectTrigger2"), RefSelectTrigger = /* @__PURE__ */ React$6.forwardRef(SelectTrigger);
13550
+ function _toArray(r) {
13551
+ return _arrayWithHoles$1(r) || _iterableToArray$3(r) || _unsupportedIterableToArray(r) || _nonIterableRest$1();
13552
+ }
13553
+ __name(_toArray, "_toArray");
13936
13554
  function getKey(data, index2) {
13937
13555
  var key = data.key, value;
13938
13556
  return "value" in data && (value = data.value), key != null ? key : value !== void 0 ? value : "rc-index-key-".concat(index2);
@@ -13980,7 +13598,7 @@ function flattenOptions(options) {
13980
13598
  }
13981
13599
  __name(flattenOptions, "flattenOptions");
13982
13600
  function injectPropsWithOption(option) {
13983
- var newOption = _objectSpread2$2({}, option);
13601
+ var newOption = _objectSpread2$1({}, option);
13984
13602
  return "props" in newOption || Object.defineProperty(newOption, "props", {
13985
13603
  get: /* @__PURE__ */ __name(function() {
13986
13604
  return warningOnce$1(!1, "Return type is option instead of Option instance. Please read value directly instead of reading from `props`."), newOption;
@@ -13997,7 +13615,7 @@ var getSeparatedContent = /* @__PURE__ */ __name(function(text, tokens, end) {
13997
13615
  return [str];
13998
13616
  var list2 = str.split(token);
13999
13617
  return match2 = match2 || list2.length > 1, list2.reduce(function(prevList, unitStr) {
14000
- return [].concat(_toConsumableArray$5(prevList), _toConsumableArray$5(separate2(unitStr, restTokens)));
13618
+ return [].concat(_toConsumableArray$4(prevList), _toConsumableArray$4(separate2(unitStr, restTokens)));
14001
13619
  }, []).filter(Boolean);
14002
13620
  }, "separate"), list = separate(text, tokens);
14003
13621
  return match2 ? typeof end < "u" ? list.slice(0, end) : list : null;
@@ -14018,24 +13636,24 @@ function Polite(props) {
14018
13636
  }
14019
13637
  }, "".concat(values3.slice(0, MAX_COUNT).map(function(_ref) {
14020
13638
  var label = _ref.label, value = _ref.value;
14021
- return ["number", "string"].includes(_typeof$3(label)) ? label : value;
13639
+ return ["number", "string"].includes(_typeof$2(label)) ? label : value;
14022
13640
  }).join(", ")), values3.length > MAX_COUNT ? ", ..." : null);
14023
13641
  }
14024
13642
  __name(Polite, "Polite");
14025
13643
  var _excluded$b = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction", "omitDomProps", "displayValues", "onDisplayValuesChange", "emptyOptions", "notFoundContent", "onClear", "mode", "disabled", "loading", "getInputElement", "getRawInputElement", "open", "defaultOpen", "onDropdownVisibleChange", "activeValue", "onActiveValueChange", "activeDescendantId", "searchValue", "autoClearSearchValue", "onSearch", "onSearchSplit", "tokenSeparators", "allowClear", "suffixIcon", "clearIcon", "OptionList", "animation", "transitionName", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "placement", "builtinPlacements", "getPopupContainer", "showAction", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown"], DEFAULT_OMIT_PROPS = ["value", "onChange", "removeIcon", "placeholder", "autoFocus", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "choiceTransitionName", "onInputKeyDown", "onPopupScroll", "tabIndex"], isMultiple = /* @__PURE__ */ __name(function(mode) {
14026
13644
  return mode === "tags" || mode === "multiple";
14027
13645
  }, "isMultiple2"), BaseSelect = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
14028
- var _customizeRawInputEle, id = props.id, prefixCls = props.prefixCls, className = props.className, showSearch = props.showSearch, tagRender = props.tagRender, direction = props.direction, omitDomProps = props.omitDomProps, displayValues = props.displayValues, onDisplayValuesChange = props.onDisplayValuesChange, emptyOptions = props.emptyOptions, _props$notFoundConten = props.notFoundContent, notFoundContent = _props$notFoundConten === void 0 ? "Not Found" : _props$notFoundConten, onClear = props.onClear, mode = props.mode, disabled = props.disabled, loading = props.loading, getInputElement = props.getInputElement, getRawInputElement = props.getRawInputElement, open = props.open, defaultOpen = props.defaultOpen, onDropdownVisibleChange = props.onDropdownVisibleChange, activeValue = props.activeValue, onActiveValueChange = props.onActiveValueChange, activeDescendantId = props.activeDescendantId, searchValue = props.searchValue, autoClearSearchValue = props.autoClearSearchValue, onSearch = props.onSearch, onSearchSplit = props.onSearchSplit, tokenSeparators = props.tokenSeparators, allowClear = props.allowClear, suffixIcon = props.suffixIcon, clearIcon = props.clearIcon, OptionList3 = props.OptionList, animation = props.animation, transitionName = props.transitionName, dropdownStyle = props.dropdownStyle, dropdownClassName = props.dropdownClassName, dropdownMatchSelectWidth = props.dropdownMatchSelectWidth, dropdownRender = props.dropdownRender, dropdownAlign = props.dropdownAlign, placement = props.placement, builtinPlacements = props.builtinPlacements, getPopupContainer = props.getPopupContainer, _props$showAction = props.showAction, showAction = _props$showAction === void 0 ? [] : _props$showAction, onFocus = props.onFocus, onBlur2 = props.onBlur, onKeyUp = props.onKeyUp, onKeyDown2 = props.onKeyDown, onMouseDown = props.onMouseDown, restProps = _objectWithoutProperties$1(props, _excluded$b), multiple = isMultiple(mode), mergedShowSearch = (showSearch !== void 0 ? showSearch : multiple) || mode === "combobox", domProps = _objectSpread2$2({}, restProps);
13646
+ var _customizeRawInputEle, id = props.id, prefixCls = props.prefixCls, className = props.className, showSearch = props.showSearch, tagRender = props.tagRender, direction = props.direction, omitDomProps = props.omitDomProps, displayValues = props.displayValues, onDisplayValuesChange = props.onDisplayValuesChange, emptyOptions = props.emptyOptions, _props$notFoundConten = props.notFoundContent, notFoundContent = _props$notFoundConten === void 0 ? "Not Found" : _props$notFoundConten, onClear = props.onClear, mode = props.mode, disabled = props.disabled, loading = props.loading, getInputElement = props.getInputElement, getRawInputElement = props.getRawInputElement, open = props.open, defaultOpen = props.defaultOpen, onDropdownVisibleChange = props.onDropdownVisibleChange, activeValue = props.activeValue, onActiveValueChange = props.onActiveValueChange, activeDescendantId = props.activeDescendantId, searchValue = props.searchValue, autoClearSearchValue = props.autoClearSearchValue, onSearch = props.onSearch, onSearchSplit = props.onSearchSplit, tokenSeparators = props.tokenSeparators, allowClear = props.allowClear, suffixIcon = props.suffixIcon, clearIcon = props.clearIcon, OptionList3 = props.OptionList, animation = props.animation, transitionName = props.transitionName, dropdownStyle = props.dropdownStyle, dropdownClassName = props.dropdownClassName, dropdownMatchSelectWidth = props.dropdownMatchSelectWidth, dropdownRender = props.dropdownRender, dropdownAlign = props.dropdownAlign, placement = props.placement, builtinPlacements = props.builtinPlacements, getPopupContainer = props.getPopupContainer, _props$showAction = props.showAction, showAction = _props$showAction === void 0 ? [] : _props$showAction, onFocus = props.onFocus, onBlur2 = props.onBlur, onKeyUp = props.onKeyUp, onKeyDown2 = props.onKeyDown, onMouseDown = props.onMouseDown, restProps = _objectWithoutProperties$2(props, _excluded$b), multiple = isMultiple(mode), mergedShowSearch = (showSearch !== void 0 ? showSearch : multiple) || mode === "combobox", domProps = _objectSpread2$1({}, restProps);
14029
13647
  DEFAULT_OMIT_PROPS.forEach(function(propName) {
14030
13648
  delete domProps[propName];
14031
13649
  }), omitDomProps == null || omitDomProps.forEach(function(propName) {
14032
13650
  delete domProps[propName];
14033
13651
  });
14034
- var _React$useState = React$6.useState(!1), _React$useState2 = _slicedToArray$2(_React$useState, 2), mobile = _React$useState2[0], setMobile = _React$useState2[1];
13652
+ var _React$useState = React$6.useState(!1), _React$useState2 = _slicedToArray$1(_React$useState, 2), mobile = _React$useState2[0], setMobile = _React$useState2[1];
14035
13653
  React$6.useEffect(function() {
14036
13654
  setMobile(isMobile());
14037
13655
  }, []);
14038
- var containerRef = React$6.useRef(null), selectorDomRef = React$6.useRef(null), triggerRef = React$6.useRef(null), selectorRef = React$6.useRef(null), listRef = React$6.useRef(null), blurRef = React$6.useRef(!1), _useDelayReset = useDelayReset(), _useDelayReset2 = _slicedToArray$2(_useDelayReset, 3), mockFocused = _useDelayReset2[0], setMockFocused = _useDelayReset2[1], cancelSetMockFocused = _useDelayReset2[2];
13656
+ var containerRef = React$6.useRef(null), selectorDomRef = React$6.useRef(null), triggerRef = React$6.useRef(null), selectorRef = React$6.useRef(null), listRef = React$6.useRef(null), blurRef = React$6.useRef(!1), _useDelayReset = useDelayReset(), _useDelayReset2 = _slicedToArray$1(_useDelayReset, 3), mockFocused = _useDelayReset2[0], setMockFocused = _useDelayReset2[1], cancelSetMockFocused = _useDelayReset2[2];
14039
13657
  React$6.useImperativeHandle(ref, function() {
14040
13658
  var _selectorRef$current, _selectorRef$current2;
14041
13659
  return {
@@ -14054,14 +13672,14 @@ var _excluded$b = ["id", "prefixCls", "className", "showSearch", "tagRender", "d
14054
13672
  return searchValue;
14055
13673
  var val = (_displayValues$ = displayValues[0]) === null || _displayValues$ === void 0 ? void 0 : _displayValues$.value;
14056
13674
  return typeof val == "string" || typeof val == "number" ? String(val) : "";
14057
- }, [searchValue, mode, displayValues]), customizeInputElement = mode === "combobox" && typeof getInputElement == "function" && getInputElement() || null, customizeRawInputElement = typeof getRawInputElement == "function" && getRawInputElement(), customizeRawInputRef = useComposeRef(selectorDomRef, customizeRawInputElement == null || (_customizeRawInputEle = customizeRawInputElement.props) === null || _customizeRawInputEle === void 0 ? void 0 : _customizeRawInputEle.ref), _React$useState3 = React$6.useState(!1), _React$useState4 = _slicedToArray$2(_React$useState3, 2), rendered = _React$useState4[0], setRendered = _React$useState4[1];
13675
+ }, [searchValue, mode, displayValues]), customizeInputElement = mode === "combobox" && typeof getInputElement == "function" && getInputElement() || null, customizeRawInputElement = typeof getRawInputElement == "function" && getRawInputElement(), customizeRawInputRef = useComposeRef(selectorDomRef, customizeRawInputElement == null || (_customizeRawInputEle = customizeRawInputElement.props) === null || _customizeRawInputEle === void 0 ? void 0 : _customizeRawInputEle.ref), _React$useState3 = React$6.useState(!1), _React$useState4 = _slicedToArray$1(_React$useState3, 2), rendered = _React$useState4[0], setRendered = _React$useState4[1];
14058
13676
  useLayoutEffect$1(function() {
14059
13677
  setRendered(!0);
14060
13678
  }, []);
14061
13679
  var _useMergedState = useMergedState(!1, {
14062
13680
  defaultValue: defaultOpen,
14063
13681
  value: open
14064
- }), _useMergedState2 = _slicedToArray$2(_useMergedState, 2), innerOpen = _useMergedState2[0], setInnerOpen = _useMergedState2[1], mergedOpen = rendered ? innerOpen : !1, emptyListContent = !notFoundContent && emptyOptions;
13682
+ }), _useMergedState2 = _slicedToArray$1(_useMergedState, 2), innerOpen = _useMergedState2[0], setInnerOpen = _useMergedState2[1], mergedOpen = rendered ? innerOpen : !1, emptyListContent = !notFoundContent && emptyOptions;
14065
13683
  (disabled || emptyListContent && mergedOpen && mode === "combobox") && (mergedOpen = !1);
14066
13684
  var triggerOpen = emptyListContent ? !1 : mergedOpen, onToggleOpen = React$6.useCallback(function(newOpen) {
14067
13685
  var nextOpen = newOpen !== void 0 ? newOpen : !mergedOpen;
@@ -14091,10 +13709,10 @@ var _excluded$b = ["id", "prefixCls", "className", "showSearch", "tagRender", "d
14091
13709
  }, [mergedOpen]), React$6.useEffect(function() {
14092
13710
  innerOpen && disabled && setInnerOpen(!1), disabled && !blurRef.current && setMockFocused(!1);
14093
13711
  }, [disabled]);
14094
- var _useLock = useLock(), _useLock2 = _slicedToArray$2(_useLock, 2), getClearLock = _useLock2[0], setClearLock = _useLock2[1], keyLockRef = React$6.useRef(!1), onInternalKeyDown = /* @__PURE__ */ __name(function(event) {
13712
+ var _useLock = useLock(), _useLock2 = _slicedToArray$1(_useLock, 2), getClearLock = _useLock2[0], setClearLock = _useLock2[1], keyLockRef = React$6.useRef(!1), onInternalKeyDown = /* @__PURE__ */ __name(function(event) {
14095
13713
  var clearLock = getClearLock(), key = event.key, isEnterKey = key === "Enter";
14096
13714
  if (isEnterKey && (mode !== "combobox" && event.preventDefault(), mergedOpen || onToggleOpen(!0)), setClearLock(!!mergedSearchValue), key === "Backspace" && !clearLock && multiple && !mergedSearchValue && displayValues.length) {
14097
- for (var cloneDisplayValues = _toConsumableArray$5(displayValues), removedDisplayValue = null, i = cloneDisplayValues.length - 1; i >= 0; i -= 1) {
13715
+ for (var cloneDisplayValues = _toConsumableArray$4(displayValues), removedDisplayValue = null, i = cloneDisplayValues.length - 1; i >= 0; i -= 1) {
14098
13716
  var current = cloneDisplayValues[i];
14099
13717
  if (!current.disabled) {
14100
13718
  cloneDisplayValues.splice(i, 1), removedDisplayValue = current;
@@ -14162,7 +13780,7 @@ var _excluded$b = ["id", "prefixCls", "className", "showSearch", "tagRender", "d
14162
13780
  for (var _len3 = arguments.length, restArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++)
14163
13781
  restArgs[_key3 - 1] = arguments[_key3];
14164
13782
  onMouseDown == null || onMouseDown.apply(void 0, [event].concat(restArgs));
14165
- }, "onInternalMouseDown2"), _React$useState5 = React$6.useState({}), _React$useState6 = _slicedToArray$2(_React$useState5, 2), forceUpdate = _React$useState6[1];
13783
+ }, "onInternalMouseDown2"), _React$useState5 = React$6.useState({}), _React$useState6 = _slicedToArray$1(_React$useState5, 2), forceUpdate = _React$useState6[1];
14166
13784
  function onPopupMouseEnter() {
14167
13785
  forceUpdate({});
14168
13786
  }
@@ -14175,7 +13793,7 @@ var _excluded$b = ["id", "prefixCls", "className", "showSearch", "tagRender", "d
14175
13793
  return [containerRef.current, (_triggerRef$current2 = triggerRef.current) === null || _triggerRef$current2 === void 0 ? void 0 : _triggerRef$current2.getPopupElement()];
14176
13794
  }, triggerOpen, onToggleOpen, !!customizeRawInputElement);
14177
13795
  var baseSelectContext = React$6.useMemo(function() {
14178
- return _objectSpread2$2(_objectSpread2$2({}, props), {}, {
13796
+ return _objectSpread2$1(_objectSpread2$1({}, props), {}, {
14179
13797
  notFoundContent,
14180
13798
  open: mergedOpen,
14181
13799
  triggerOpen,
@@ -14186,7 +13804,7 @@ var _excluded$b = ["id", "prefixCls", "className", "showSearch", "tagRender", "d
14186
13804
  });
14187
13805
  }, [props, notFoundContent, triggerOpen, mergedOpen, id, mergedShowSearch, multiple, onToggleOpen]), showSuffixIcon = !!suffixIcon || loading, arrowNode;
14188
13806
  showSuffixIcon && (arrowNode = /* @__PURE__ */ React$6.createElement(TransBtn, {
14189
- className: clsx("".concat(prefixCls, "-arrow"), _defineProperty$c({}, "".concat(prefixCls, "-arrow-loading"), loading)),
13807
+ className: clsx("".concat(prefixCls, "-arrow"), _defineProperty$b({}, "".concat(prefixCls, "-arrow-loading"), loading)),
14190
13808
  customizeIcon: suffixIcon,
14191
13809
  customizeIconProps: {
14192
13810
  loading,
@@ -14204,7 +13822,7 @@ var _excluded$b = ["id", "prefixCls", "className", "showSearch", "tagRender", "d
14204
13822
  }), onInternalSearch("", !1, !1);
14205
13823
  }, "onClearMouseDown2"), _useAllowClear = useAllowClear(prefixCls, onClearMouseDown, displayValues, allowClear, clearIcon, disabled, mergedSearchValue, mode), mergedAllowClear = _useAllowClear.allowClear, clearNode = _useAllowClear.clearIcon, optionList = /* @__PURE__ */ React$6.createElement(OptionList3, {
14206
13824
  ref: listRef
14207
- }), mergedClassName = clsx(prefixCls, className, _defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(prefixCls, "-focused"), mockFocused), "".concat(prefixCls, "-multiple"), multiple), "".concat(prefixCls, "-single"), !multiple), "".concat(prefixCls, "-allow-clear"), allowClear), "".concat(prefixCls, "-show-arrow"), showSuffixIcon), "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-loading"), loading), "".concat(prefixCls, "-open"), mergedOpen), "".concat(prefixCls, "-customize-input"), customizeInputElement), "".concat(prefixCls, "-show-search"), mergedShowSearch)), selectorNode = /* @__PURE__ */ React$6.createElement(RefSelectTrigger, {
13825
+ }), mergedClassName = clsx(prefixCls, className, _defineProperty$b(_defineProperty$b(_defineProperty$b(_defineProperty$b(_defineProperty$b(_defineProperty$b(_defineProperty$b(_defineProperty$b(_defineProperty$b(_defineProperty$b({}, "".concat(prefixCls, "-focused"), mockFocused), "".concat(prefixCls, "-multiple"), multiple), "".concat(prefixCls, "-single"), !multiple), "".concat(prefixCls, "-allow-clear"), allowClear), "".concat(prefixCls, "-show-arrow"), showSuffixIcon), "".concat(prefixCls, "-disabled"), disabled), "".concat(prefixCls, "-loading"), loading), "".concat(prefixCls, "-open"), mergedOpen), "".concat(prefixCls, "-customize-input"), customizeInputElement), "".concat(prefixCls, "-show-search"), mergedShowSearch)), selectorNode = /* @__PURE__ */ React$6.createElement(RefSelectTrigger, {
14208
13826
  ref: triggerRef,
14209
13827
  disabled,
14210
13828
  prefixCls,
@@ -14234,7 +13852,7 @@ var _excluded$b = ["id", "prefixCls", "className", "showSearch", "tagRender", "d
14234
13852
  onPopupMouseEnter
14235
13853
  }, customizeRawInputElement ? /* @__PURE__ */ React$6.cloneElement(customizeRawInputElement, {
14236
13854
  ref: customizeRawInputRef
14237
- }) : /* @__PURE__ */ React$6.createElement(ForwardSelector, _extends$5({}, props, {
13855
+ }) : /* @__PURE__ */ React$6.createElement(ForwardSelector, _extends$6({}, props, {
14238
13856
  domRef: selectorDomRef,
14239
13857
  prefixCls,
14240
13858
  inputElement: customizeInputElement,
@@ -14255,7 +13873,7 @@ var _excluded$b = ["id", "prefixCls", "className", "showSearch", "tagRender", "d
14255
13873
  onRemove: onSelectorRemove,
14256
13874
  tokenWithEnter
14257
13875
  }))), renderNode;
14258
- return customizeRawInputElement ? renderNode = selectorNode : renderNode = /* @__PURE__ */ React$6.createElement("div", _extends$5({
13876
+ return customizeRawInputElement ? renderNode = selectorNode : renderNode = /* @__PURE__ */ React$6.createElement("div", _extends$6({
14259
13877
  className: mergedClassName
14260
13878
  }, domProps, {
14261
13879
  ref: containerRef,
@@ -14975,7 +14593,7 @@ var OptionList = /* @__PURE__ */ __name(function(_, ref) {
14975
14593
  return -1;
14976
14594
  }, "getEnabledActiveIndex2"), _React$useState = React$6.useState(function() {
14977
14595
  return getEnabledActiveIndex(0);
14978
- }), _React$useState2 = _slicedToArray$2(_React$useState, 2), activeIndex = _React$useState2[0], setActiveIndex = _React$useState2[1], setActive = /* @__PURE__ */ __name(function(index2) {
14596
+ }), _React$useState2 = _slicedToArray$1(_React$useState, 2), activeIndex = _React$useState2[0], setActiveIndex = _React$useState2[1], setActive = /* @__PURE__ */ __name(function(index2) {
14979
14597
  var fromKeyboard = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
14980
14598
  setActiveIndex(index2);
14981
14599
  var info = {
@@ -14992,7 +14610,7 @@ var OptionList = /* @__PURE__ */ __name(function(_, ref) {
14992
14610
  }, [memoFlattenOptions.length, searchValue]);
14993
14611
  var isSelected = React$6.useCallback(function(value) {
14994
14612
  return rawValues.has(value) && mode !== "combobox";
14995
- }, [mode, _toConsumableArray$5(rawValues).toString(), rawValues.size]);
14613
+ }, [mode, _toConsumableArray$4(rawValues).toString(), rawValues.size]);
14996
14614
  useEffect(function() {
14997
14615
  var timeoutId = setTimeout(function() {
14998
14616
  if (!multiple && open && rawValues.size === 1) {
@@ -15072,7 +14690,7 @@ var OptionList = /* @__PURE__ */ __name(function(_, ref) {
15072
14690
  if (!item)
15073
14691
  return null;
15074
14692
  var itemData = item.data || {}, value = itemData.value, group = item.group, attrs = pickAttrs(itemData, !0), mergedLabel = getLabel(item);
15075
- return item ? /* @__PURE__ */ React$6.createElement("div", _extends$5({
14693
+ return item ? /* @__PURE__ */ React$6.createElement("div", _extends$6({
15076
14694
  "aria-label": typeof mergedLabel == "string" && !group ? mergedLabel : null
15077
14695
  }, attrs, {
15078
14696
  key: index2
@@ -15083,7 +14701,7 @@ var OptionList = /* @__PURE__ */ __name(function(_, ref) {
15083
14701
  role: "listbox",
15084
14702
  id: "".concat(id, "_list")
15085
14703
  };
15086
- return /* @__PURE__ */ React$6.createElement(React$6.Fragment, null, virtual && /* @__PURE__ */ React$6.createElement("div", _extends$5({}, a11yProps, {
14704
+ return /* @__PURE__ */ React$6.createElement(React$6.Fragment, null, virtual && /* @__PURE__ */ React$6.createElement("div", _extends$6({}, a11yProps, {
15087
14705
  style: {
15088
14706
  height: 0,
15089
14707
  width: 0,
@@ -15112,8 +14730,8 @@ var OptionList = /* @__PURE__ */ __name(function(_, ref) {
15112
14730
  }
15113
14731
  var disabled = data.disabled, title = data.title;
15114
14732
  data.children;
15115
- var style2 = data.style, className = data.className, otherProps = _objectWithoutProperties$1(data, _excluded$9), passedProps = omit$2(otherProps, omitFieldNameList), selected = isSelected(value), mergedDisabled = disabled || !selected && overMaxCount, optionPrefixCls = "".concat(itemPrefixCls, "-option"), optionClassName = clsx(itemPrefixCls, optionPrefixCls, className, _defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(optionPrefixCls, "-grouped"), groupOption), "".concat(optionPrefixCls, "-active"), activeIndex === itemIndex && !mergedDisabled), "".concat(optionPrefixCls, "-disabled"), mergedDisabled), "".concat(optionPrefixCls, "-selected"), selected)), mergedLabel = getLabel(item), iconVisible = !menuItemSelectedIcon || typeof menuItemSelectedIcon == "function" || selected, content = typeof mergedLabel == "number" ? mergedLabel : mergedLabel || value, optionTitle = isTitleType(content) ? content.toString() : void 0;
15116
- return title !== void 0 && (optionTitle = title), /* @__PURE__ */ React$6.createElement("div", _extends$5({}, pickAttrs(passedProps), virtual ? {} : getItemAriaProps(item, itemIndex), {
14733
+ var style2 = data.style, className = data.className, otherProps = _objectWithoutProperties$2(data, _excluded$9), passedProps = omit$2(otherProps, omitFieldNameList), selected = isSelected(value), mergedDisabled = disabled || !selected && overMaxCount, optionPrefixCls = "".concat(itemPrefixCls, "-option"), optionClassName = clsx(itemPrefixCls, optionPrefixCls, className, _defineProperty$b(_defineProperty$b(_defineProperty$b(_defineProperty$b({}, "".concat(optionPrefixCls, "-grouped"), groupOption), "".concat(optionPrefixCls, "-active"), activeIndex === itemIndex && !mergedDisabled), "".concat(optionPrefixCls, "-disabled"), mergedDisabled), "".concat(optionPrefixCls, "-selected"), selected)), mergedLabel = getLabel(item), iconVisible = !menuItemSelectedIcon || typeof menuItemSelectedIcon == "function" || selected, content = typeof mergedLabel == "number" ? mergedLabel : mergedLabel || value, optionTitle = isTitleType(content) ? content.toString() : void 0;
14734
+ return title !== void 0 && (optionTitle = title), /* @__PURE__ */ React$6.createElement("div", _extends$6({}, pickAttrs(passedProps), virtual ? {} : getItemAriaProps(item, itemIndex), {
15117
14735
  "aria-selected": selected,
15118
14736
  className: optionClassName,
15119
14737
  title: optionTitle,
@@ -15147,7 +14765,7 @@ const useCache = /* @__PURE__ */ __name(function(labeledValues, valueOptions) {
15147
14765
  var _cacheRef$current = cacheRef.current, prevValueCache = _cacheRef$current.values, prevOptionCache = _cacheRef$current.options, patchedValues = labeledValues.map(function(item) {
15148
14766
  if (item.label === void 0) {
15149
14767
  var _prevValueCache$get;
15150
- return _objectSpread2$2(_objectSpread2$2({}, item), {}, {
14768
+ return _objectSpread2$1(_objectSpread2$1({}, item), {}, {
15151
14769
  label: (_prevValueCache$get = prevValueCache.get(item.value)) === null || _prevValueCache$get === void 0 ? void 0 : _prevValueCache$get.label
15152
14770
  });
15153
14771
  }
@@ -15185,7 +14803,7 @@ const useFilterOptions = /* @__PURE__ */ __name(function(options, fieldNames, se
15185
14803
  var subOptions = item[fieldOptions].filter(function(subItem) {
15186
14804
  return filterFunc(searchValue, wrapOption(subItem));
15187
14805
  });
15188
- subOptions.length && filteredOptions.push(_objectSpread2$2(_objectSpread2$2({}, item), {}, _defineProperty$c({}, fieldOptions, subOptions)));
14806
+ subOptions.length && filteredOptions.push(_objectSpread2$1(_objectSpread2$1({}, item), {}, _defineProperty$b({}, fieldOptions, subOptions)));
15189
14807
  }
15190
14808
  return;
15191
14809
  }
@@ -15200,7 +14818,7 @@ function getUUID() {
15200
14818
  }
15201
14819
  __name(getUUID, "getUUID");
15202
14820
  function useId2(id) {
15203
- var _React$useState = React$6.useState(), _React$useState2 = _slicedToArray$2(_React$useState, 2), innerId = _React$useState2[0], setInnerId = _React$useState2[1];
14821
+ var _React$useState = React$6.useState(), _React$useState2 = _slicedToArray$1(_React$useState, 2), innerId = _React$useState2[0], setInnerId = _React$useState2[1];
15204
14822
  return React$6.useEffect(function() {
15205
14823
  setInnerId("rc_select_".concat(getUUID()));
15206
14824
  }, []), id || innerId;
@@ -15208,8 +14826,8 @@ function useId2(id) {
15208
14826
  __name(useId2, "useId");
15209
14827
  var _excluded$8 = ["children", "value"], _excluded2 = ["children"];
15210
14828
  function convertNodeToOption(node) {
15211
- var _ref = node, key = _ref.key, _ref$props = _ref.props, children = _ref$props.children, value = _ref$props.value, restProps = _objectWithoutProperties$1(_ref$props, _excluded$8);
15212
- return _objectSpread2$2({
14829
+ var _ref = node, key = _ref.key, _ref$props = _ref.props, children = _ref$props.children, value = _ref$props.value, restProps = _objectWithoutProperties$2(_ref$props, _excluded$8);
14830
+ return _objectSpread2$1({
15213
14831
  key,
15214
14832
  value: value !== void 0 ? value : key,
15215
14833
  children
@@ -15221,8 +14839,8 @@ function convertChildrenToData(nodes) {
15221
14839
  return toArray$3(nodes).map(function(node, index2) {
15222
14840
  if (!/* @__PURE__ */ React$6.isValidElement(node) || !node.type)
15223
14841
  return null;
15224
- var _ref2 = node, isSelectOptGroup = _ref2.type.isSelectOptGroup, key = _ref2.key, _ref2$props = _ref2.props, children = _ref2$props.children, restProps = _objectWithoutProperties$1(_ref2$props, _excluded2);
15225
- return optionOnly || !isSelectOptGroup ? convertNodeToOption(node) : _objectSpread2$2(_objectSpread2$2({
14842
+ var _ref2 = node, isSelectOptGroup = _ref2.type.isSelectOptGroup, key = _ref2.key, _ref2$props = _ref2.props, children = _ref2$props.children, restProps = _objectWithoutProperties$2(_ref2$props, _excluded2);
14843
+ return optionOnly || !isSelectOptGroup ? convertNodeToOption(node) : _objectSpread2$1(_objectSpread2$1({
15226
14844
  key: "__RC_SELECT_GRP__".concat(key === null ? index2 : key, "__"),
15227
14845
  label: key
15228
14846
  }, restProps), {}, {
@@ -15263,11 +14881,11 @@ function useRefFunc(callback) {
15263
14881
  __name(useRefFunc, "useRefFunc");
15264
14882
  var _excluded$7 = ["id", "mode", "prefixCls", "backfill", "fieldNames", "inputValue", "searchValue", "onSearch", "autoClearSearchValue", "onSelect", "onDeselect", "dropdownMatchSelectWidth", "filterOption", "filterSort", "optionFilterProp", "optionLabelProp", "options", "optionRender", "children", "defaultActiveFirstOption", "menuItemSelectedIcon", "virtual", "direction", "listHeight", "listItemHeight", "labelRender", "value", "defaultValue", "labelInValue", "onChange", "maxCount"], OMIT_DOM_PROPS = ["inputValue"];
15265
14883
  function isRawValue(value) {
15266
- return !value || _typeof$3(value) !== "object";
14884
+ return !value || _typeof$2(value) !== "object";
15267
14885
  }
15268
14886
  __name(isRawValue, "isRawValue");
15269
14887
  var Select$1 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
15270
- var id = props.id, mode = props.mode, _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "rc-select" : _props$prefixCls, backfill = props.backfill, fieldNames = props.fieldNames, inputValue = props.inputValue, searchValue = props.searchValue, onSearch = props.onSearch, _props$autoClearSearc = props.autoClearSearchValue, autoClearSearchValue = _props$autoClearSearc === void 0 ? !0 : _props$autoClearSearc, onSelect2 = props.onSelect, onDeselect = props.onDeselect, _props$dropdownMatchS = props.dropdownMatchSelectWidth, dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? !0 : _props$dropdownMatchS, filterOption = props.filterOption, filterSort = props.filterSort, optionFilterProp = props.optionFilterProp, optionLabelProp = props.optionLabelProp, options = props.options, optionRender = props.optionRender, children = props.children, defaultActiveFirstOption = props.defaultActiveFirstOption, menuItemSelectedIcon = props.menuItemSelectedIcon, virtual = props.virtual, direction = props.direction, _props$listHeight = props.listHeight, listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight, _props$listItemHeight = props.listItemHeight, listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight, labelRender = props.labelRender, value = props.value, defaultValue = props.defaultValue, labelInValue = props.labelInValue, onChange = props.onChange, maxCount = props.maxCount, restProps = _objectWithoutProperties$1(props, _excluded$7), mergedId = useId2(id), multiple = isMultiple(mode), childrenAsData = !!(!options && children), mergedFilterOption = React$6.useMemo(function() {
14888
+ var id = props.id, mode = props.mode, _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "rc-select" : _props$prefixCls, backfill = props.backfill, fieldNames = props.fieldNames, inputValue = props.inputValue, searchValue = props.searchValue, onSearch = props.onSearch, _props$autoClearSearc = props.autoClearSearchValue, autoClearSearchValue = _props$autoClearSearc === void 0 ? !0 : _props$autoClearSearc, onSelect2 = props.onSelect, onDeselect = props.onDeselect, _props$dropdownMatchS = props.dropdownMatchSelectWidth, dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? !0 : _props$dropdownMatchS, filterOption = props.filterOption, filterSort = props.filterSort, optionFilterProp = props.optionFilterProp, optionLabelProp = props.optionLabelProp, options = props.options, optionRender = props.optionRender, children = props.children, defaultActiveFirstOption = props.defaultActiveFirstOption, menuItemSelectedIcon = props.menuItemSelectedIcon, virtual = props.virtual, direction = props.direction, _props$listHeight = props.listHeight, listHeight = _props$listHeight === void 0 ? 200 : _props$listHeight, _props$listItemHeight = props.listItemHeight, listItemHeight = _props$listItemHeight === void 0 ? 20 : _props$listItemHeight, labelRender = props.labelRender, value = props.value, defaultValue = props.defaultValue, labelInValue = props.labelInValue, onChange = props.onChange, maxCount = props.maxCount, restProps = _objectWithoutProperties$2(props, _excluded$7), mergedId = useId2(id), multiple = isMultiple(mode), childrenAsData = !!(!options && children), mergedFilterOption = React$6.useMemo(function() {
15271
14889
  return filterOption === void 0 && mode === "combobox" ? !1 : filterOption;
15272
14890
  }, [filterOption, mode]), mergedFieldNames = React$6.useMemo(
15273
14891
  function() {
@@ -15285,7 +14903,7 @@ var Select$1 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
15285
14903
  postState: /* @__PURE__ */ __name(function(search) {
15286
14904
  return search || "";
15287
14905
  }, "postState")
15288
- }), _useMergedState2 = _slicedToArray$2(_useMergedState, 2), mergedSearchValue = _useMergedState2[0], setSearchValue = _useMergedState2[1], parsedOptions = useOptions(options, children, mergedFieldNames, optionFilterProp, optionLabelProp), valueOptions = parsedOptions.valueOptions, labelOptions = parsedOptions.labelOptions, mergedOptions = parsedOptions.options, convert2LabelValues = React$6.useCallback(function(draftValues) {
14906
+ }), _useMergedState2 = _slicedToArray$1(_useMergedState, 2), mergedSearchValue = _useMergedState2[0], setSearchValue = _useMergedState2[1], parsedOptions = useOptions(options, children, mergedFieldNames, optionFilterProp, optionLabelProp), valueOptions = parsedOptions.valueOptions, labelOptions = parsedOptions.labelOptions, mergedOptions = parsedOptions.options, convert2LabelValues = React$6.useCallback(function(draftValues) {
15289
14907
  var valueList = toArray(draftValues);
15290
14908
  return valueList.map(function(val) {
15291
14909
  var rawValue, rawLabel, rawKey, rawDisabled, rawTitle;
@@ -15310,10 +14928,10 @@ var Select$1 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
15310
14928
  });
15311
14929
  }, [mergedFieldNames, optionLabelProp, valueOptions]), _useMergedState3 = useMergedState(defaultValue, {
15312
14930
  value
15313
- }), _useMergedState4 = _slicedToArray$2(_useMergedState3, 2), internalValue = _useMergedState4[0], setInternalValue = _useMergedState4[1], rawLabeledValues = React$6.useMemo(function() {
14931
+ }), _useMergedState4 = _slicedToArray$1(_useMergedState3, 2), internalValue = _useMergedState4[0], setInternalValue = _useMergedState4[1], rawLabeledValues = React$6.useMemo(function() {
15314
14932
  var _values$, newInternalValue = multiple && internalValue === null ? [] : internalValue, values3 = convert2LabelValues(newInternalValue);
15315
14933
  return mode === "combobox" && isComboNoValue((_values$ = values3[0]) === null || _values$ === void 0 ? void 0 : _values$.value) ? [] : values3;
15316
- }, [internalValue, convert2LabelValues, mode, multiple]), _useCache = useCache(rawLabeledValues, valueOptions), _useCache2 = _slicedToArray$2(_useCache, 2), mergedValues = _useCache2[0], getMixedOption = _useCache2[1], displayValues = React$6.useMemo(function() {
14934
+ }, [internalValue, convert2LabelValues, mode, multiple]), _useCache = useCache(rawLabeledValues, valueOptions), _useCache2 = _slicedToArray$1(_useCache, 2), mergedValues = _useCache2[0], getMixedOption = _useCache2[1], displayValues = React$6.useMemo(function() {
15317
14935
  if (!mode && mergedValues.length === 1) {
15318
14936
  var firstValue = mergedValues[0];
15319
14937
  if (firstValue.value === null && (firstValue.label === null || firstValue.label === void 0))
@@ -15321,7 +14939,7 @@ var Select$1 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
15321
14939
  }
15322
14940
  return mergedValues.map(function(item) {
15323
14941
  var _ref;
15324
- return _objectSpread2$2(_objectSpread2$2({}, item), {}, {
14942
+ return _objectSpread2$1(_objectSpread2$1({}, item), {}, {
15325
14943
  label: (_ref = typeof labelRender == "function" ? labelRender(item) : item.label) !== null && _ref !== void 0 ? _ref : item.value
15326
14944
  });
15327
14945
  });
@@ -15338,14 +14956,14 @@ var Select$1 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
15338
14956
  }, [mergedValues]);
15339
14957
  var createTagOption = useRefFunc(function(val, label) {
15340
14958
  var mergedLabel = label != null ? label : val;
15341
- return _defineProperty$c(_defineProperty$c({}, mergedFieldNames.value, val), mergedFieldNames.label, mergedLabel);
14959
+ return _defineProperty$b(_defineProperty$b({}, mergedFieldNames.value, val), mergedFieldNames.label, mergedLabel);
15342
14960
  }), filledTagOptions = React$6.useMemo(function() {
15343
14961
  if (mode !== "tags")
15344
14962
  return mergedOptions;
15345
- var cloneOptions = _toConsumableArray$5(mergedOptions), existOptions = /* @__PURE__ */ __name(function(val) {
14963
+ var cloneOptions = _toConsumableArray$4(mergedOptions), existOptions = /* @__PURE__ */ __name(function(val) {
15346
14964
  return valueOptions.has(val);
15347
14965
  }, "existOptions2");
15348
- return _toConsumableArray$5(mergedValues).sort(function(a, b2) {
14966
+ return _toConsumableArray$4(mergedValues).sort(function(a, b2) {
15349
14967
  return a.value < b2.value ? -1 : 1;
15350
14968
  }).forEach(function(item) {
15351
14969
  var val = item.value;
@@ -15356,13 +14974,20 @@ var Select$1 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
15356
14974
  return item[optionFilterProp || "value"] === mergedSearchValue;
15357
14975
  }) || filteredOptions.some(function(item) {
15358
14976
  return item[mergedFieldNames.value] === mergedSearchValue;
15359
- }) ? filteredOptions : [createTagOption(mergedSearchValue)].concat(_toConsumableArray$5(filteredOptions));
15360
- }, [createTagOption, optionFilterProp, mode, filteredOptions, mergedSearchValue, mergedFieldNames]), orderedFilteredOptions = React$6.useMemo(function() {
15361
- return filterSort ? _toConsumableArray$5(filledSearchOptions).sort(function(a, b2) {
14977
+ }) ? filteredOptions : [createTagOption(mergedSearchValue)].concat(_toConsumableArray$4(filteredOptions));
14978
+ }, [createTagOption, optionFilterProp, mode, filteredOptions, mergedSearchValue, mergedFieldNames]), sorter = /* @__PURE__ */ __name(function sorter2(inputOptions) {
14979
+ var sortedOptions = _toConsumableArray$4(inputOptions).sort(function(a, b2) {
15362
14980
  return filterSort(a, b2, {
15363
14981
  searchValue: mergedSearchValue
15364
14982
  });
15365
- }) : filledSearchOptions;
14983
+ });
14984
+ return sortedOptions.map(function(item) {
14985
+ return Array.isArray(item.options) ? _objectSpread2$1(_objectSpread2$1({}, item), {}, {
14986
+ options: item.options.length > 0 ? sorter2(item.options) : item.options
14987
+ }) : item;
14988
+ });
14989
+ }, "sorter2"), orderedFilteredOptions = React$6.useMemo(function() {
14990
+ return filterSort ? sorter(filledSearchOptions) : filledSearchOptions;
15366
14991
  }, [filledSearchOptions, filterSort, mergedSearchValue]), displayOptions = React$6.useMemo(function() {
15367
14992
  return flattenOptions(orderedFilteredOptions, {
15368
14993
  fieldNames: mergedFieldNames,
@@ -15387,7 +15012,7 @@ var Select$1 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
15387
15012
  multiple ? returnOptions : returnOptions[0]
15388
15013
  );
15389
15014
  }
15390
- }, "triggerChange2"), _React$useState = React$6.useState(null), _React$useState2 = _slicedToArray$2(_React$useState, 2), activeValue = _React$useState2[0], setActiveValue = _React$useState2[1], _React$useState3 = React$6.useState(0), _React$useState4 = _slicedToArray$2(_React$useState3, 2), accessibilityIndex = _React$useState4[0], setAccessibilityIndex = _React$useState4[1], mergedDefaultActiveFirstOption = defaultActiveFirstOption !== void 0 ? defaultActiveFirstOption : mode !== "combobox", onActiveValue = React$6.useCallback(function(active, index2) {
15015
+ }, "triggerChange2"), _React$useState = React$6.useState(null), _React$useState2 = _slicedToArray$1(_React$useState, 2), activeValue = _React$useState2[0], setActiveValue = _React$useState2[1], _React$useState3 = React$6.useState(0), _React$useState4 = _slicedToArray$1(_React$useState3, 2), accessibilityIndex = _React$useState4[0], setAccessibilityIndex = _React$useState4[1], mergedDefaultActiveFirstOption = defaultActiveFirstOption !== void 0 ? defaultActiveFirstOption : mode !== "combobox", onActiveValue = React$6.useCallback(function(active, index2) {
15391
15016
  var _ref3 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, _ref3$source = _ref3.source, source = _ref3$source === void 0 ? "keyboard" : _ref3$source;
15392
15017
  setAccessibilityIndex(index2), backfill && mode === "combobox" && active !== null && source === "keyboard" && setActiveValue(String(active));
15393
15018
  }, [backfill, mode]), triggerSelect = /* @__PURE__ */ __name(function(val, selected, type2) {
@@ -15400,15 +15025,15 @@ var Select$1 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
15400
15025
  } : val, injectPropsWithOption(option)];
15401
15026
  }, "getSelectEnt2");
15402
15027
  if (selected && onSelect2) {
15403
- var _getSelectEnt = getSelectEnt(), _getSelectEnt2 = _slicedToArray$2(_getSelectEnt, 2), wrappedValue = _getSelectEnt2[0], _option = _getSelectEnt2[1];
15028
+ var _getSelectEnt = getSelectEnt(), _getSelectEnt2 = _slicedToArray$1(_getSelectEnt, 2), wrappedValue = _getSelectEnt2[0], _option = _getSelectEnt2[1];
15404
15029
  onSelect2(wrappedValue, _option);
15405
15030
  } else if (!selected && onDeselect && type2 !== "clear") {
15406
- var _getSelectEnt3 = getSelectEnt(), _getSelectEnt4 = _slicedToArray$2(_getSelectEnt3, 2), _wrappedValue = _getSelectEnt4[0], _option2 = _getSelectEnt4[1];
15031
+ var _getSelectEnt3 = getSelectEnt(), _getSelectEnt4 = _slicedToArray$1(_getSelectEnt3, 2), _wrappedValue = _getSelectEnt4[0], _option2 = _getSelectEnt4[1];
15407
15032
  onDeselect(_wrappedValue, _option2);
15408
15033
  }
15409
15034
  }, "triggerSelect2"), onInternalSelect = useRefFunc(function(val, info) {
15410
15035
  var cloneValues, mergedSelect = multiple ? info.selected : !0;
15411
- mergedSelect ? cloneValues = multiple ? [].concat(_toConsumableArray$5(mergedValues), [val]) : [val] : cloneValues = mergedValues.filter(function(v2) {
15036
+ mergedSelect ? cloneValues = multiple ? [].concat(_toConsumableArray$4(mergedValues), [val]) : [val] : cloneValues = mergedValues.filter(function(v2) {
15412
15037
  return v2.value !== val;
15413
15038
  }), triggerChange(cloneValues), triggerSelect(val, mergedSelect), mode === "combobox" ? setActiveValue("") : (!isMultiple || autoClearSearchValue) && (setSearchValue(""), setActiveValue(""));
15414
15039
  }), onDisplayValuesChange = /* @__PURE__ */ __name(function(nextValues, info) {
@@ -15421,7 +15046,7 @@ var Select$1 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
15421
15046
  if (setSearchValue(searchText), setActiveValue(null), info.source === "submit") {
15422
15047
  var formatted = (searchText || "").trim();
15423
15048
  if (formatted) {
15424
- var newRawValues = Array.from(new Set([].concat(_toConsumableArray$5(rawValues), [formatted])));
15049
+ var newRawValues = Array.from(new Set([].concat(_toConsumableArray$4(rawValues), [formatted])));
15425
15050
  triggerChange(newRawValues), triggerSelect(formatted, !0), setSearchValue("");
15426
15051
  }
15427
15052
  return;
@@ -15435,13 +15060,13 @@ var Select$1 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
15435
15060
  }).filter(function(val) {
15436
15061
  return val !== void 0;
15437
15062
  }));
15438
- var newRawValues = Array.from(new Set([].concat(_toConsumableArray$5(rawValues), _toConsumableArray$5(patchValues))));
15063
+ var newRawValues = Array.from(new Set([].concat(_toConsumableArray$4(rawValues), _toConsumableArray$4(patchValues))));
15439
15064
  triggerChange(newRawValues), newRawValues.forEach(function(newRawValue) {
15440
15065
  triggerSelect(newRawValue, !0);
15441
15066
  });
15442
15067
  }, "onInternalSearchSplit2"), selectContext = React$6.useMemo(function() {
15443
15068
  var realVirtual = virtual !== !1 && dropdownMatchSelectWidth !== !1;
15444
- return _objectSpread2$2(_objectSpread2$2({}, parsedOptions), {}, {
15069
+ return _objectSpread2$1(_objectSpread2$1({}, parsedOptions), {}, {
15445
15070
  flattenOptions: displayOptions,
15446
15071
  onActiveValue,
15447
15072
  defaultActiveFirstOption: mergedDefaultActiveFirstOption,
@@ -15460,7 +15085,7 @@ var Select$1 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
15460
15085
  }, [maxCount, parsedOptions, displayOptions, onActiveValue, mergedDefaultActiveFirstOption, onInternalSelect, menuItemSelectedIcon, rawValues, mergedFieldNames, virtual, dropdownMatchSelectWidth, direction, listHeight, listItemHeight, childrenAsData, optionRender]);
15461
15086
  return /* @__PURE__ */ React$6.createElement(SelectContext.Provider, {
15462
15087
  value: selectContext
15463
- }, /* @__PURE__ */ React$6.createElement(BaseSelect, _extends$5({}, restProps, {
15088
+ }, /* @__PURE__ */ React$6.createElement(BaseSelect, _extends$6({}, restProps, {
15464
15089
  // >>> MISC
15465
15090
  id: mergedId,
15466
15091
  prefixCls,
@@ -15602,37 +15227,70 @@ function SelectList(props) {
15602
15227
  }));
15603
15228
  }
15604
15229
  __name(SelectList, "SelectList");
15605
- var calcThumbStyle = /* @__PURE__ */ __name(function(targetElement) {
15606
- return targetElement ? {
15230
+ var calcThumbStyle = /* @__PURE__ */ __name(function(targetElement, vertical) {
15231
+ if (!targetElement) return null;
15232
+ var style2 = {
15607
15233
  left: targetElement.offsetLeft,
15608
15234
  right: targetElement.parentElement.clientWidth - targetElement.clientWidth - targetElement.offsetLeft,
15609
- width: targetElement.clientWidth
15610
- } : null;
15235
+ width: targetElement.clientWidth,
15236
+ top: targetElement.offsetTop,
15237
+ bottom: targetElement.parentElement.clientHeight - targetElement.clientHeight - targetElement.offsetTop,
15238
+ height: targetElement.clientHeight
15239
+ };
15240
+ return vertical ? {
15241
+ left: 0,
15242
+ right: 0,
15243
+ width: 0,
15244
+ top: style2.top,
15245
+ bottom: style2.bottom,
15246
+ height: style2.height
15247
+ } : {
15248
+ left: style2.left,
15249
+ right: style2.right,
15250
+ width: style2.width,
15251
+ top: 0,
15252
+ bottom: 0,
15253
+ height: 0
15254
+ };
15611
15255
  }, "calcThumbStyle2"), toPX = /* @__PURE__ */ __name(function(value) {
15612
15256
  return value !== void 0 ? "".concat(value, "px") : void 0;
15613
15257
  }, "toPX2");
15614
15258
  function MotionThumb(props) {
15615
- var prefixCls = props.prefixCls, containerRef = props.containerRef, value = props.value, getValueIndex = props.getValueIndex, motionName = props.motionName, onMotionStart = props.onMotionStart, onMotionEnd = props.onMotionEnd, direction = props.direction, thumbRef = React$6.useRef(null), _React$useState = React$6.useState(value), _React$useState2 = _slicedToArray$3(_React$useState, 2), prevValue = _React$useState2[0], setPrevValue = _React$useState2[1], findValueElement = /* @__PURE__ */ __name(function(val) {
15259
+ var prefixCls = props.prefixCls, containerRef = props.containerRef, value = props.value, getValueIndex = props.getValueIndex, motionName = props.motionName, onMotionStart = props.onMotionStart, onMotionEnd = props.onMotionEnd, direction = props.direction, _props$vertical = props.vertical, vertical = _props$vertical === void 0 ? !1 : _props$vertical, thumbRef = React$6.useRef(null), _React$useState = React$6.useState(value), _React$useState2 = _slicedToArray$1(_React$useState, 2), prevValue = _React$useState2[0], setPrevValue = _React$useState2[1], findValueElement = /* @__PURE__ */ __name(function(val) {
15616
15260
  var _containerRef$current, index2 = getValueIndex(val), ele = (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.querySelectorAll(".".concat(prefixCls, "-item"))[index2];
15617
15261
  return (ele == null ? void 0 : ele.offsetParent) && ele;
15618
- }, "findValueElement2"), _React$useState3 = React$6.useState(null), _React$useState4 = _slicedToArray$3(_React$useState3, 2), prevStyle = _React$useState4[0], setPrevStyle = _React$useState4[1], _React$useState5 = React$6.useState(null), _React$useState6 = _slicedToArray$3(_React$useState5, 2), nextStyle = _React$useState6[0], setNextStyle = _React$useState6[1];
15262
+ }, "findValueElement2"), _React$useState3 = React$6.useState(null), _React$useState4 = _slicedToArray$1(_React$useState3, 2), prevStyle = _React$useState4[0], setPrevStyle = _React$useState4[1], _React$useState5 = React$6.useState(null), _React$useState6 = _slicedToArray$1(_React$useState5, 2), nextStyle = _React$useState6[0], setNextStyle = _React$useState6[1];
15619
15263
  useLayoutEffect$1(function() {
15620
15264
  if (prevValue !== value) {
15621
- var prev = findValueElement(prevValue), next = findValueElement(value), calcPrevStyle = calcThumbStyle(prev), calcNextStyle = calcThumbStyle(next);
15265
+ var prev = findValueElement(prevValue), next = findValueElement(value), calcPrevStyle = calcThumbStyle(prev, vertical), calcNextStyle = calcThumbStyle(next, vertical);
15622
15266
  setPrevValue(value), setPrevStyle(calcPrevStyle), setNextStyle(calcNextStyle), prev && next ? onMotionStart() : onMotionEnd();
15623
15267
  }
15624
15268
  }, [value]);
15625
15269
  var thumbStart = React$6.useMemo(function() {
15270
+ if (vertical) {
15271
+ var _prevStyle$top;
15272
+ return toPX((_prevStyle$top = prevStyle == null ? void 0 : prevStyle.top) !== null && _prevStyle$top !== void 0 ? _prevStyle$top : 0);
15273
+ }
15626
15274
  return toPX(direction === "rtl" ? -(prevStyle == null ? void 0 : prevStyle.right) : prevStyle == null ? void 0 : prevStyle.left);
15627
- }, [direction, prevStyle]), thumbActive = React$6.useMemo(function() {
15275
+ }, [vertical, direction, prevStyle]), thumbActive = React$6.useMemo(function() {
15276
+ if (vertical) {
15277
+ var _nextStyle$top;
15278
+ return toPX((_nextStyle$top = nextStyle == null ? void 0 : nextStyle.top) !== null && _nextStyle$top !== void 0 ? _nextStyle$top : 0);
15279
+ }
15628
15280
  return toPX(direction === "rtl" ? -(nextStyle == null ? void 0 : nextStyle.right) : nextStyle == null ? void 0 : nextStyle.left);
15629
- }, [direction, nextStyle]), onAppearStart = /* @__PURE__ */ __name(function() {
15630
- return {
15281
+ }, [vertical, direction, nextStyle]), onAppearStart = /* @__PURE__ */ __name(function() {
15282
+ return vertical ? {
15283
+ transform: "translateY(var(--thumb-start-top))",
15284
+ height: "var(--thumb-start-height)"
15285
+ } : {
15631
15286
  transform: "translateX(var(--thumb-start-left))",
15632
15287
  width: "var(--thumb-start-width)"
15633
15288
  };
15634
15289
  }, "onAppearStart2"), onAppearActive = /* @__PURE__ */ __name(function() {
15635
- return {
15290
+ return vertical ? {
15291
+ transform: "translateY(var(--thumb-active-top))",
15292
+ height: "var(--thumb-active-height)"
15293
+ } : {
15636
15294
  transform: "translateX(var(--thumb-active-left))",
15637
15295
  width: "var(--thumb-active-width)"
15638
15296
  };
@@ -15647,11 +15305,15 @@ function MotionThumb(props) {
15647
15305
  onAppearActive,
15648
15306
  onVisibleChanged
15649
15307
  }, function(_ref, ref) {
15650
- var motionClassName = _ref.className, motionStyle = _ref.style, mergedStyle = _objectSpread2$3(_objectSpread2$3({}, motionStyle), {}, {
15308
+ var motionClassName = _ref.className, motionStyle = _ref.style, mergedStyle = _objectSpread2$1(_objectSpread2$1({}, motionStyle), {}, {
15651
15309
  "--thumb-start-left": thumbStart,
15652
15310
  "--thumb-start-width": toPX(prevStyle == null ? void 0 : prevStyle.width),
15653
15311
  "--thumb-active-left": thumbActive,
15654
- "--thumb-active-width": toPX(nextStyle == null ? void 0 : nextStyle.width)
15312
+ "--thumb-active-width": toPX(nextStyle == null ? void 0 : nextStyle.width),
15313
+ "--thumb-start-top": thumbStart,
15314
+ "--thumb-start-height": toPX(prevStyle == null ? void 0 : prevStyle.height),
15315
+ "--thumb-active-top": thumbActive,
15316
+ "--thumb-active-height": toPX(nextStyle == null ? void 0 : nextStyle.height)
15655
15317
  }), motionProps = {
15656
15318
  ref: composeRef(thumbRef, ref),
15657
15319
  style: mergedStyle,
@@ -15661,11 +15323,11 @@ function MotionThumb(props) {
15661
15323
  });
15662
15324
  }
15663
15325
  __name(MotionThumb, "MotionThumb");
15664
- var _excluded$6 = ["prefixCls", "direction", "options", "disabled", "defaultValue", "value", "onChange", "className", "motionName"];
15326
+ var _excluded$6 = ["prefixCls", "direction", "vertical", "options", "disabled", "defaultValue", "value", "onChange", "className", "motionName"];
15665
15327
  function getValidTitle(option) {
15666
15328
  if (typeof option.title < "u")
15667
15329
  return option.title;
15668
- if (_typeof$4(option.label) !== "object") {
15330
+ if (_typeof$2(option.label) !== "object") {
15669
15331
  var _option$label;
15670
15332
  return (_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.toString();
15671
15333
  }
@@ -15673,9 +15335,9 @@ function getValidTitle(option) {
15673
15335
  __name(getValidTitle, "getValidTitle");
15674
15336
  function normalizeOptions(options) {
15675
15337
  return options.map(function(option) {
15676
- if (_typeof$4(option) === "object" && option !== null) {
15338
+ if (_typeof$2(option) === "object" && option !== null) {
15677
15339
  var validTitle = getValidTitle(option);
15678
- return _objectSpread2$3(_objectSpread2$3({}, option), {}, {
15340
+ return _objectSpread2$1(_objectSpread2$1({}, option), {}, {
15679
15341
  title: validTitle
15680
15342
  });
15681
15343
  }
@@ -15692,7 +15354,7 @@ var InternalSegmentedOption = /* @__PURE__ */ __name(function(_ref) {
15692
15354
  disabled || onChange(event, value);
15693
15355
  }, "handleChange2");
15694
15356
  return /* @__PURE__ */ React$6.createElement("label", {
15695
- className: clsx(className, _defineProperty$d({}, "".concat(prefixCls, "-item-disabled"), disabled))
15357
+ className: clsx(className, _defineProperty$b({}, "".concat(prefixCls, "-item-disabled"), disabled))
15696
15358
  }, /* @__PURE__ */ React$6.createElement("input", {
15697
15359
  className: "".concat(prefixCls, "-item-input"),
15698
15360
  type: "radio",
@@ -15706,25 +15368,26 @@ var InternalSegmentedOption = /* @__PURE__ */ __name(function(_ref) {
15706
15368
  "aria-selected": checked
15707
15369
  }, label));
15708
15370
  }, "InternalSegmentedOption2"), Segmented$1 = /* @__PURE__ */ React$6.forwardRef(function(props, ref) {
15709
- var _segmentedOptions$, _classNames2, _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "rc-segmented" : _props$prefixCls, direction = props.direction, _props$options = props.options, options = _props$options === void 0 ? [] : _props$options, disabled = props.disabled, defaultValue = props.defaultValue, value = props.value, onChange = props.onChange, _props$className = props.className, className = _props$className === void 0 ? "" : _props$className, _props$motionName = props.motionName, motionName = _props$motionName === void 0 ? "thumb-motion" : _props$motionName, restProps = _objectWithoutProperties$3(props, _excluded$6), containerRef = React$6.useRef(null), mergedRef = React$6.useMemo(function() {
15371
+ var _segmentedOptions$, _classNames2, _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "rc-segmented" : _props$prefixCls, direction = props.direction, vertical = props.vertical, _props$options = props.options, options = _props$options === void 0 ? [] : _props$options, disabled = props.disabled, defaultValue = props.defaultValue, value = props.value, onChange = props.onChange, _props$className = props.className, className = _props$className === void 0 ? "" : _props$className, _props$motionName = props.motionName, motionName = _props$motionName === void 0 ? "thumb-motion" : _props$motionName, restProps = _objectWithoutProperties$2(props, _excluded$6), containerRef = React$6.useRef(null), mergedRef = React$6.useMemo(function() {
15710
15372
  return composeRef(containerRef, ref);
15711
15373
  }, [containerRef, ref]), segmentedOptions = React$6.useMemo(function() {
15712
15374
  return normalizeOptions(options);
15713
15375
  }, [options]), _useMergedState = useMergedState((_segmentedOptions$ = segmentedOptions[0]) === null || _segmentedOptions$ === void 0 ? void 0 : _segmentedOptions$.value, {
15714
15376
  value,
15715
15377
  defaultValue
15716
- }), _useMergedState2 = _slicedToArray$3(_useMergedState, 2), rawValue = _useMergedState2[0], setRawValue = _useMergedState2[1], _React$useState = React$6.useState(!1), _React$useState2 = _slicedToArray$3(_React$useState, 2), thumbShow = _React$useState2[0], setThumbShow = _React$useState2[1], handleChange = /* @__PURE__ */ __name(function(event, val) {
15378
+ }), _useMergedState2 = _slicedToArray$1(_useMergedState, 2), rawValue = _useMergedState2[0], setRawValue = _useMergedState2[1], _React$useState = React$6.useState(!1), _React$useState2 = _slicedToArray$1(_React$useState, 2), thumbShow = _React$useState2[0], setThumbShow = _React$useState2[1], handleChange = /* @__PURE__ */ __name(function(event, val) {
15717
15379
  disabled || (setRawValue(val), onChange == null || onChange(val));
15718
15380
  }, "handleChange2"), divProps = omit$2(restProps, ["children"]);
15719
- return /* @__PURE__ */ React$6.createElement("div", _extends$7({
15381
+ return /* @__PURE__ */ React$6.createElement("div", _extends$6({
15720
15382
  role: "listbox",
15721
15383
  "aria-label": "segmented control"
15722
15384
  }, divProps, {
15723
- className: clsx(prefixCls, (_classNames2 = {}, _defineProperty$d(_classNames2, "".concat(prefixCls, "-rtl"), direction === "rtl"), _defineProperty$d(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _classNames2), className),
15385
+ className: clsx(prefixCls, (_classNames2 = {}, _defineProperty$b(_classNames2, "".concat(prefixCls, "-rtl"), direction === "rtl"), _defineProperty$b(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _defineProperty$b(_classNames2, "".concat(prefixCls, "-vertical"), vertical), _classNames2), className),
15724
15386
  ref: mergedRef
15725
15387
  }), /* @__PURE__ */ React$6.createElement("div", {
15726
15388
  className: "".concat(prefixCls, "-group")
15727
15389
  }, /* @__PURE__ */ React$6.createElement(MotionThumb, {
15390
+ vertical,
15728
15391
  prefixCls,
15729
15392
  value: rawValue,
15730
15393
  containerRef,
@@ -15742,10 +15405,10 @@ var InternalSegmentedOption = /* @__PURE__ */ __name(function(_ref) {
15742
15405
  setThumbShow(!1);
15743
15406
  }, "onMotionEnd")
15744
15407
  }), segmentedOptions.map(function(segmentedOption) {
15745
- return /* @__PURE__ */ React$6.createElement(InternalSegmentedOption, _extends$7({}, segmentedOption, {
15408
+ return /* @__PURE__ */ React$6.createElement(InternalSegmentedOption, _extends$6({}, segmentedOption, {
15746
15409
  key: segmentedOption.value,
15747
15410
  prefixCls,
15748
- className: clsx(segmentedOption.className, "".concat(prefixCls, "-item"), _defineProperty$d({}, "".concat(prefixCls, "-item-selected"), segmentedOption.value === rawValue && !thumbShow)),
15411
+ className: clsx(segmentedOption.className, "".concat(prefixCls, "-item"), _defineProperty$b({}, "".concat(prefixCls, "-item-selected"), segmentedOption.value === rawValue && !thumbShow)),
15749
15412
  checked: segmentedOption.value === rawValue,
15750
15413
  onChange: handleChange,
15751
15414
  disabled: !!disabled || !!segmentedOption.disabled