import { f as e, _ as n, cW as t, cX as o, cY as i, cZ as r, j as a, k as u, c as s, c_ as c, h as l, c$ as p, d0 as d, d1 as f } from "./vendor-208d0ff5.js";
import * as v from "react";
import m, { forwardRef as h, useRef as g, useImperativeHandle as y, useEffect as k, useLayoutEffect as w, createElement as b, useState as C } from "react";
import T from "react-dom";
import { d as M } from "./react-d37f274e.js";
import { j as E, a as x } from "./common-64096f9e.js";
var P = function(e2) {
  return +setTimeout(e2, 16);
}, D = function(e2) {
  return clearTimeout(e2);
};
"undefined" != typeof window && "requestAnimationFrame" in window && (P = function(e2) {
  return window.requestAnimationFrame(e2);
}, D = function(e2) {
  return window.cancelAnimationFrame(e2);
});
var N = 0, O = /* @__PURE__ */ new Map();
function A(e2) {
  O.delete(e2);
}
var S = function(e2) {
  var n2 = N += 1;
  return function t2(o2) {
    if (0 === o2)
      A(n2), e2();
    else {
      var i2 = P(function() {
        t2(o2 - 1);
      });
      O.set(n2, i2);
    }
  }(arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1), n2;
};
function L(e2, n2) {
  if (!e2)
    return false;
  if (e2.contains)
    return e2.contains(n2);
  for (var t2 = n2; t2; ) {
    if (t2 === e2)
      return true;
    t2 = t2.parentNode;
  }
  return false;
}
function H(e2) {
  return function(e3) {
    return e3 instanceof HTMLElement || e3 instanceof SVGElement;
  }(e2) ? e2 : e2 instanceof m.Component ? T.findDOMNode(e2) : null;
}
function V(n2, t2) {
  "function" == typeof n2 ? n2(t2) : "object" === e(n2) && n2 && "current" in n2 && (n2.current = t2);
}
function R(e2) {
  var n2, t2, o2 = M.isMemo(e2) ? e2.type.type : e2.type;
  return !!("function" != typeof o2 || null !== (n2 = o2.prototype) && void 0 !== n2 && n2.render || o2.$$typeof === M.ForwardRef) && !!("function" != typeof e2 || null !== (t2 = e2.prototype) && void 0 !== t2 && t2.render || e2.$$typeof === M.ForwardRef);
}
function F(e2, n2, t2, o2) {
  var i2 = T.unstable_batchedUpdates ? function(e3) {
    T.unstable_batchedUpdates(t2, e3);
  } : t2;
  return null != e2 && e2.addEventListener && e2.addEventListener(n2, i2, o2), { remove: function() {
    null != e2 && e2.removeEventListener && e2.removeEventListener(n2, i2, o2);
  } };
}
function z() {
  return !("undefined" == typeof window || !window.document || !window.document.createElement);
}
S.cancel = function(e2) {
  var n2 = O.get(e2);
  return A(e2), D(n2);
}, "production" !== process.env.NODE_ENV && (S.ids = function() {
  return O;
});
var j = h(function(e2, n2) {
  var t2 = e2.didUpdate, o2 = e2.getContainer, i2 = e2.children, r2 = g(), a2 = g();
  y(n2, function() {
    return {};
  });
  var u2 = g(false);
  return !u2.current && z() && (a2.current = o2(), r2.current = a2.current.parentNode, u2.current = true), k(function() {
    null == t2 || t2(e2);
  }), k(function() {
    return null === a2.current.parentNode && null !== r2.current && r2.current.appendChild(a2.current), function() {
      var e3;
      null === (e3 = a2.current) || void 0 === e3 || null === (e3 = e3.parentNode) || void 0 === e3 || e3.removeChild(a2.current);
    };
  }, []), a2.current ? T.createPortal(i2, a2.current) : null;
});
function I(e2, n2, t2) {
  return t2 ? e2[0] === n2[0] : e2[0] === n2[0] && e2[1] === n2[1];
}
var B = v.createContext({}), U = function(e2) {
  t(a2, e2);
  var n2 = o(a2);
  function a2() {
    return i(this, a2), n2.apply(this, arguments);
  }
  return r(a2, [{ key: "render", value: function() {
    return this.props.children;
  } }]), a2;
}(v.Component);
function _(e2) {
  var n2 = v.useRef(false), t2 = v.useState(e2), o2 = a(t2, 2), i2 = o2[0], r2 = o2[1];
  return v.useEffect(function() {
    return n2.current = false, function() {
      n2.current = true;
    };
  }, []), [i2, function(e3, t3) {
    t3 && n2.current || r2(e3);
  }];
}
var q = "none", W = "appear", X = "enter", Y = "leave", $ = "none", K = "prepare", G = "start", Z = "active", J = "end", Q = "prepared";
function ee(e2, n2) {
  var t2 = {};
  return t2[e2.toLowerCase()] = n2.toLowerCase(), t2["Webkit".concat(e2)] = "webkit".concat(n2), t2["Moz".concat(e2)] = "moz".concat(n2), t2["ms".concat(e2)] = "MS".concat(n2), t2["O".concat(e2)] = "o".concat(n2.toLowerCase()), t2;
}
var ne, te, oe, ie = (ne = z(), te = "undefined" != typeof window ? window : {}, oe = { animationend: ee("Animation", "AnimationEnd"), transitionend: ee("Transition", "TransitionEnd") }, ne && ("AnimationEvent" in te || delete oe.animationend.animation, "TransitionEvent" in te || delete oe.transitionend.transition), oe), re = {};
if (z()) {
  var ae = document.createElement("div");
  re = ae.style;
}
var ue = {};
function se(e2) {
  if (ue[e2])
    return ue[e2];
  var n2 = ie[e2];
  if (n2)
    for (var t2 = Object.keys(n2), o2 = t2.length, i2 = 0; i2 < o2; i2 += 1) {
      var r2 = t2[i2];
      if (Object.prototype.hasOwnProperty.call(n2, r2) && r2 in re)
        return ue[e2] = n2[r2], ue[e2];
    }
  return "";
}
var ce = se("animationend"), le = se("transitionend"), pe = !(!ce || !le), de = ce || "animationend", fe = le || "transitionend";
function ve(n2, t2) {
  return n2 ? "object" === e(n2) ? n2[t2.replace(/-\w/g, function(e2) {
    return e2[1].toUpperCase();
  })] : "".concat(n2, "-").concat(t2) : null;
}
const me = function(e2) {
  var n2 = g(), t2 = g(e2);
  t2.current = e2;
  var o2 = v.useCallback(function(e3) {
    t2.current(e3);
  }, []);
  function i2(e3) {
    e3 && (e3.removeEventListener(fe, o2), e3.removeEventListener(de, o2));
  }
  return v.useEffect(function() {
    return function() {
      i2(n2.current);
    };
  }, []), [function(e3) {
    n2.current && n2.current !== e3 && i2(n2.current), e3 && e3 !== n2.current && (e3.addEventListener(fe, o2), e3.addEventListener(de, o2), n2.current = e3);
  }, i2];
};
var he = z() ? w : k;
var ge = [K, G, Z, J], ye = [K, Q], ke = false, we = true;
function be(e2) {
  return e2 === Z || e2 === J;
}
const Ce = function(e2, n2, t2) {
  var o2 = _($), i2 = a(o2, 2), r2 = i2[0], u2 = i2[1], s2 = function() {
    var e3 = v.useRef(null);
    function n3() {
      S.cancel(e3.current);
    }
    return v.useEffect(function() {
      return function() {
        n3();
      };
    }, []), [function t3(o3) {
      var i3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2;
      n3();
      var r3 = S(function() {
        i3 <= 1 ? o3({ isCanceled: function() {
          return r3 !== e3.current;
        } }) : t3(o3, i3 - 1);
      });
      e3.current = r3;
    }, n3];
  }(), c2 = a(s2, 2), l2 = c2[0], p2 = c2[1];
  var d2 = n2 ? ye : ge;
  return he(function() {
    if (r2 !== $ && r2 !== J) {
      var e3 = d2.indexOf(r2), n3 = d2[e3 + 1], o3 = t2(r2);
      o3 === ke ? u2(n3, true) : n3 && l2(function(e4) {
        function t3() {
          e4.isCanceled() || u2(n3, true);
        }
        true === o3 ? t3() : Promise.resolve(o3).then(t3);
      });
    }
  }, [e2, r2]), v.useEffect(function() {
    return function() {
      p2();
    };
  }, []), [function() {
    u2(K, true);
  }, r2];
};
const Te = function(t2) {
  var o2 = t2;
  "object" === e(t2) && (o2 = t2.transitionSupport);
  var i2 = v.forwardRef(function(e2, t3) {
    var i3 = e2.visible, r2 = void 0 === i3 || i3, c2 = e2.removeOnLeave, l2 = void 0 === c2 || c2, p2 = e2.forceRender, d2 = e2.children, f2 = e2.motionName, m2 = e2.leavedClassName, h2 = e2.eventProps, y2 = function(e3, n2) {
      return !(!e3.motionName || !o2 || false === n2);
    }(e2, v.useContext(B).motion), w2 = g(), b2 = g();
    var C2 = function(e3, t4, o3, i4) {
      var r3 = i4.motionEnter, s2 = void 0 === r3 || r3, c3 = i4.motionAppear, l3 = void 0 === c3 || c3, p3 = i4.motionLeave, d3 = void 0 === p3 || p3, f3 = i4.motionDeadline, m3 = i4.motionLeaveImmediately, h3 = i4.onAppearPrepare, y3 = i4.onEnterPrepare, w3 = i4.onLeavePrepare, b3 = i4.onAppearStart, C3 = i4.onEnterStart, T3 = i4.onLeaveStart, M3 = i4.onAppearActive, E2 = i4.onEnterActive, x3 = i4.onLeaveActive, P3 = i4.onAppearEnd, D3 = i4.onEnterEnd, N3 = i4.onLeaveEnd, O3 = i4.onVisibleChanged, A3 = _(), S3 = a(A3, 2), L3 = S3[0], H2 = S3[1], V2 = _(q), R2 = a(V2, 2), F3 = R2[0], z3 = R2[1], j2 = _(null), I2 = a(j2, 2), B2 = I2[0], U2 = I2[1], $2 = g(false), J2 = g(null);
      function ee2() {
        return o3();
      }
      var ne2 = g(false);
      function te2() {
        z3(q, true), U2(null, true);
      }
      function oe2(e4) {
        var n2 = ee2();
        if (!e4 || e4.deadline || e4.target === n2) {
          var t5, o4 = ne2.current;
          F3 === W && o4 ? t5 = null == P3 ? void 0 : P3(n2, e4) : F3 === X && o4 ? t5 = null == D3 ? void 0 : D3(n2, e4) : F3 === Y && o4 && (t5 = null == N3 ? void 0 : N3(n2, e4)), F3 !== q && o4 && false !== t5 && te2();
        }
      }
      var ie2 = me(oe2), re2 = a(ie2, 1)[0], ae = function(e4) {
        var n2, t5, o4;
        switch (e4) {
          case W:
            return u(n2 = {}, K, h3), u(n2, G, b3), u(n2, Z, M3), n2;
          case X:
            return u(t5 = {}, K, y3), u(t5, G, C3), u(t5, Z, E2), t5;
          case Y:
            return u(o4 = {}, K, w3), u(o4, G, T3), u(o4, Z, x3), o4;
          default:
            return {};
        }
      }, ue2 = v.useMemo(function() {
        return ae(F3);
      }, [F3]), se2 = Ce(F3, !e3, function(e4) {
        if (e4 === K) {
          var n2 = ue2[K];
          return n2 ? n2(ee2()) : ke;
        }
        var t5;
        return pe2 in ue2 && U2((null === (t5 = ue2[pe2]) || void 0 === t5 ? void 0 : t5.call(ue2, ee2(), null)) || null), pe2 === Z && (re2(ee2()), f3 > 0 && (clearTimeout(J2.current), J2.current = setTimeout(function() {
          oe2({ deadline: true });
        }, f3))), pe2 === Q && te2(), we;
      }), ce2 = a(se2, 2), le2 = ce2[0], pe2 = ce2[1], de2 = be(pe2);
      ne2.current = de2, he(function() {
        H2(t4);
        var n2, o4 = $2.current;
        $2.current = true, !o4 && t4 && l3 && (n2 = W), o4 && t4 && s2 && (n2 = X), (o4 && !t4 && d3 || !o4 && m3 && !t4 && d3) && (n2 = Y);
        var i5 = ae(n2);
        n2 && (e3 || i5[K]) ? (z3(n2), le2()) : z3(q);
      }, [t4]), k(function() {
        (F3 === W && !l3 || F3 === X && !s2 || F3 === Y && !d3) && z3(q);
      }, [l3, s2, d3]), k(function() {
        return function() {
          $2.current = false, clearTimeout(J2.current);
        };
      }, []);
      var fe2 = v.useRef(false);
      k(function() {
        L3 && (fe2.current = true), void 0 !== L3 && F3 === q && ((fe2.current || L3) && (null == O3 || O3(L3)), fe2.current = true);
      }, [L3, F3]);
      var ve2 = B2;
      return ue2[K] && pe2 === G && (ve2 = n({ transition: "none" }, ve2)), [F3, pe2, ve2, null != L3 ? L3 : t4];
    }(y2, r2, function() {
      try {
        return w2.current instanceof HTMLElement ? w2.current : H(b2.current);
      } catch (e3) {
        return null;
      }
    }, e2), T2 = a(C2, 4), M2 = T2[0], x2 = T2[1], P2 = T2[2], D2 = T2[3], N2 = v.useRef(D2);
    D2 && (N2.current = true);
    var O2, A2 = v.useCallback(function(e3) {
      w2.current = e3, V(t3, e3);
    }, [t3]), S2 = n(n({}, h2), {}, { visible: r2 });
    if (d2)
      if (M2 === q)
        O2 = D2 ? d2(n({}, S2), A2) : !l2 && N2.current && m2 ? d2(n(n({}, S2), {}, { className: m2 }), A2) : p2 || !l2 && !m2 ? d2(n(n({}, S2), {}, { style: { display: "none" } }), A2) : null;
      else {
        var L2, F2;
        x2 === K ? F2 = "prepare" : be(x2) ? F2 = "active" : x2 === G && (F2 = "start");
        var z2 = ve(f2, "".concat(M2, "-").concat(F2));
        O2 = d2(n(n({}, S2), {}, { className: s(ve(f2, M2), (L2 = {}, u(L2, z2, z2 && F2), u(L2, f2, "string" == typeof f2), L2)), style: P2 }), A2);
      }
    else
      O2 = null;
    v.isValidElement(O2) && R(O2) && (O2.ref || (O2 = v.cloneElement(O2, { ref: A2 })));
    return E(U, { ref: b2, children: O2 });
  });
  return i2.displayName = "CSSMotion", i2;
}(pe);
var Me = "add", Ee = "keep", xe = "remove", Pe = "removed";
function De(t2) {
  var o2;
  return o2 = t2 && "object" === e(t2) && "key" in t2 ? t2 : { key: t2 }, n(n({}, o2), {}, { key: String(o2.key) });
}
function Ne() {
  return (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []).map(De);
}
var Oe = ["component", "children", "onVisibleChanged", "onAllRemoved"], Ae = ["status"], Se = ["eventProps", "visible", "children", "motionName", "motionAppear", "motionEnter", "motionLeave", "motionLeaveImmediately", "motionDeadline", "removeOnLeave", "leavedClassName", "onAppearPrepare", "onAppearStart", "onAppearActive", "onAppearEnd", "onEnterStart", "onEnterActive", "onEnterEnd", "onLeaveStart", "onLeaveActive", "onLeaveEnd"];
function Le(e2) {
  var n2 = e2.prefixCls, t2 = e2.motion, o2 = e2.animation, i2 = e2.transitionName;
  return t2 || (o2 ? { motionName: "".concat(n2, "-").concat(o2) } : i2 ? { motionName: i2 } : null);
}
function He(e2) {
  var t2 = e2.prefixCls, o2 = e2.visible, i2 = e2.zIndex, r2 = e2.mask, a2 = e2.maskMotion, u2 = e2.maskAnimation, c2 = e2.maskTransitionName;
  if (!r2)
    return null;
  var l2 = {};
  return (a2 || c2 || u2) && (l2 = n({ motionAppear: true }, Le({ motion: a2, prefixCls: t2, transitionName: c2, animation: u2 }))), E(Te, { ...l2, visible: o2, removeOnLeave: true, children: function(e3) {
    var n2 = e3.className;
    return E("div", { style: { zIndex: i2 }, className: s("".concat(t2, "-mask"), n2) });
  } });
}
!function(e2) {
  var a2 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Te, s2 = function(e3) {
    t(p2, e3);
    var s3 = o(p2);
    function p2() {
      var e4;
      i(this, p2);
      for (var t2 = arguments.length, o2 = new Array(t2), r2 = 0; r2 < t2; r2++)
        o2[r2] = arguments[r2];
      return e4 = s3.call.apply(s3, [this].concat(o2)), u(c(e4), "state", { keyEntities: [] }), u(c(e4), "removeKey", function(t3) {
        var o3 = e4.state.keyEntities.map(function(e5) {
          return e5.key !== t3 ? e5 : n(n({}, e5), {}, { status: Pe });
        });
        return e4.setState({ keyEntities: o3 }), o3.filter(function(e5) {
          return e5.status !== Pe;
        }).length;
      }), e4;
    }
    return r(p2, [{ key: "render", value: function() {
      var e4 = this, t2 = this.state.keyEntities, o2 = this.props, i2 = o2.component, r2 = o2.children, u2 = o2.onVisibleChanged, s4 = o2.onAllRemoved, c2 = l(o2, Oe), p3 = i2 || v.Fragment, d2 = {};
      return Se.forEach(function(e5) {
        d2[e5] = c2[e5], delete c2[e5];
      }), delete c2.keys, E(p3, { ...c2, children: t2.map(function(t3, o3) {
        var i3 = t3.status, c3 = l(t3, Ae), p4 = i3 === Me || i3 === Ee;
        return b(a2, { ...d2, key: c3.key, visible: p4, eventProps: c3, onVisibleChanged: function(n2) {
          (null == u2 || u2(n2, { key: c3.key }), n2) || 0 === e4.removeKey(c3.key) && s4 && s4();
        } }, function(e5, t4) {
          return r2(n(n({}, e5), {}, { index: o3 }), t4);
        });
      }) });
    } }], [{ key: "getDerivedStateFromProps", value: function(e4, t2) {
      var o2 = e4.keys, i2 = t2.keyEntities, r2 = Ne(o2), a3 = function() {
        var e5 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], t3 = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [], o3 = [], i3 = 0, r3 = t3.length, a4 = Ne(e5), u2 = Ne(t3);
        a4.forEach(function(e6) {
          for (var t4 = false, a5 = i3; a5 < r3; a5 += 1) {
            var s5 = u2[a5];
            if (s5.key === e6.key) {
              i3 < a5 && (o3 = o3.concat(u2.slice(i3, a5).map(function(e7) {
                return n(n({}, e7), {}, { status: Me });
              })), i3 = a5), o3.push(n(n({}, s5), {}, { status: Ee })), i3 += 1, t4 = true;
              break;
            }
          }
          t4 || o3.push(n(n({}, e6), {}, { status: xe }));
        }), i3 < r3 && (o3 = o3.concat(u2.slice(i3).map(function(e6) {
          return n(n({}, e6), {}, { status: Me });
        })));
        var s4 = {};
        return o3.forEach(function(e6) {
          var n2 = e6.key;
          s4[n2] = (s4[n2] || 0) + 1;
        }), Object.keys(s4).filter(function(e6) {
          return s4[e6] > 1;
        }).forEach(function(e6) {
          (o3 = o3.filter(function(n2) {
            var t4 = n2.key, o4 = n2.status;
            return t4 !== e6 || o4 !== xe;
          })).forEach(function(n2) {
            n2.key === e6 && (n2.status = Ee);
          });
        }), o3;
      }(i2, r2);
      return { keyEntities: a3.filter(function(e5) {
        var n2 = i2.find(function(n3) {
          var t3 = n3.key;
          return e5.key === t3;
        });
        return !n2 || n2.status !== Pe || e5.status !== xe;
      }) };
    } }]), p2;
  }(v.Component);
  u(s2, "defaultProps", { component: "div" });
}(pe);
var Ve = "test" !== process.env.NODE_ENV && z() ? v.useLayoutEffect : v.useEffect, Re = function(e2, n2) {
  var t2 = v.useRef(true);
  Ve(function() {
    return e2(t2.current);
  }, n2), Ve(function() {
    return t2.current = false, function() {
      t2.current = true;
    };
  }, []);
}, Fe = ["measure", "alignPre", "align", null, "motion"];
var ze = v.forwardRef(function(e2, t2) {
  var o2 = e2.visible, i2 = e2.prefixCls, r2 = e2.className, u2 = e2.style, c2 = e2.children, l2 = e2.zIndex, m2 = e2.stretch, h2 = e2.destroyPopupOnHide, y2 = e2.forceRender, w2 = e2.align, b2 = e2.point, T2 = e2.getRootDomNode, M2 = e2.getClassNameFromAlign, x2 = e2.onAlign, P2 = e2.onMouseEnter, D2 = e2.onMouseLeave, N2 = e2.onMouseDown, O2 = e2.onTouchStart, A2 = e2.onClick, L2 = g(), H2 = g(), V2 = C(), R2 = a(V2, 2), F2 = R2[0], z2 = R2[1], j2 = function(e3) {
    var n2 = v.useState({ width: 0, height: 0 }), t3 = a(n2, 2), o3 = t3[0], i3 = t3[1];
    return [v.useMemo(function() {
      var n3 = {};
      if (e3) {
        var t4 = o3.width, i4 = o3.height;
        -1 !== e3.indexOf("height") && i4 ? n3.height = i4 : -1 !== e3.indexOf("minHeight") && i4 && (n3.minHeight = i4), -1 !== e3.indexOf("width") && t4 ? n3.width = t4 : -1 !== e3.indexOf("minWidth") && t4 && (n3.minWidth = t4);
      }
      return n3;
    }, [e3, o3]), function(e4) {
      var n3 = e4.offsetWidth, t4 = e4.offsetHeight, o4 = e4.getBoundingClientRect(), r3 = o4.width, a2 = o4.height;
      Math.abs(n3 - r3) < 1 && Math.abs(t4 - a2) < 1 && (n3 = r3, t4 = a2), i3({ width: n3, height: t4 });
    }];
  }(m2), I2 = a(j2, 2), B2 = I2[0], U2 = I2[1];
  var q2 = function(e3, n2) {
    var t3 = _(null), o3 = a(t3, 2), i3 = o3[0], r3 = o3[1], u3 = g();
    function s2(e4) {
      r3(e4, true);
    }
    function c3() {
      S.cancel(u3.current);
    }
    return k(function() {
      s2("measure");
    }, [e3]), k(function() {
      "measure" === i3 && n2(), i3 && (u3.current = S(p(d().mark(function e4() {
        var n3, t4;
        return d().wrap(function(e5) {
          for (; ; )
            switch (e5.prev = e5.next) {
              case 0:
                n3 = Fe.indexOf(i3), (t4 = Fe[n3 + 1]) && -1 !== n3 && s2(t4);
              case 3:
              case "end":
                return e5.stop();
            }
        }, e4);
      }))));
    }, [i3]), k(function() {
      return function() {
        c3();
      };
    }, []), [i3, function(e4) {
      c3(), u3.current = S(function() {
        s2(function(e5) {
          switch (i3) {
            case "align":
              return "motion";
            case "motion":
              return "stable";
          }
          return e5;
        }), null == e4 || e4();
      });
    }];
  }(o2, function() {
    m2 && U2(T2());
  }), W2 = a(q2, 2), X2 = W2[0], Y2 = W2[1], $2 = C(0), K2 = a($2, 2), G2 = K2[0], Z2 = K2[1], J2 = g();
  function Q2() {
    var e3;
    null === (e3 = L2.current) || void 0 === e3 || e3.forceAlign();
  }
  function ee2(e3, n2) {
    var t3 = M2(n2);
    F2 !== t3 && z2(t3), Z2(function(e4) {
      return e4 + 1;
    }), "align" === X2 && (null == x2 || x2(e3, n2));
  }
  Re(function() {
    "alignPre" === X2 && Z2(0);
  }, [X2]), Re(function() {
    "align" === X2 && (G2 < 3 ? Q2() : Y2(function() {
      var e3;
      null === (e3 = J2.current) || void 0 === e3 || e3.call(J2);
    }));
  }, [G2]);
  var ne2 = n({}, Le(e2));
  function te2() {
    return new Promise(function(e3) {
      J2.current = e3;
    });
  }
  ["onAppearEnd", "onEnterEnd", "onLeaveEnd"].forEach(function(e3) {
    var n2 = ne2[e3];
    ne2[e3] = function(e4, t3) {
      return Y2(), null == n2 ? void 0 : n2(e4, t3);
    };
  }), v.useEffect(function() {
    ne2.motionName || "motion" !== X2 || Y2();
  }, [ne2.motionName, X2]), v.useImperativeHandle(t2, function() {
    return { forceAlign: Q2, getElement: function() {
      return H2.current;
    } };
  });
  var oe2 = n(n({}, B2), {}, { zIndex: l2, opacity: "motion" !== X2 && "stable" !== X2 && o2 ? 0 : void 0, pointerEvents: o2 || "stable" === X2 ? void 0 : "none" }, u2), ie2 = true;
  null == w2 || !w2.points || "align" !== X2 && "stable" !== X2 || (ie2 = false);
  var re2 = c2;
  return v.Children.count(c2) > 1 && (re2 = E("div", { className: "".concat(i2, "-content"), children: c2 })), E(Te, { visible: o2, ref: H2, leavedClassName: "".concat(i2, "-hidden"), ...ne2, onAppearPrepare: te2, onEnterPrepare: te2, removeOnLeave: h2, forceRender: y2, children: function(e3, t3) {
    var o3 = e3.className, a2 = e3.style, u3 = s(i2, r2, F2, o3);
    return E(f, { target: b2 || T2, ref: L2, monitorWindowResize: true, disabled: ie2, align: w2, onAlign: ee2, children: E("div", { ref: t3, className: u3, onMouseEnter: P2, onMouseLeave: D2, onMouseDownCapture: N2, onTouchStartCapture: O2, onClick: A2, style: n(n({}, a2), oe2), children: re2 }) }, "popup");
  } });
});
ze.displayName = "PopupInner";
var je = v.forwardRef(function(e2, t2) {
  var o2 = e2.prefixCls, i2 = e2.visible, r2 = e2.zIndex, a2 = e2.children, u2 = e2.mobile, c2 = (u2 = void 0 === u2 ? {} : u2).popupClassName, l2 = u2.popupStyle, p2 = u2.popupMotion, d2 = void 0 === p2 ? {} : p2, f2 = u2.popupRender, m2 = e2.onClick, h2 = v.useRef();
  v.useImperativeHandle(t2, function() {
    return { forceAlign: function() {
    }, getElement: function() {
      return h2.current;
    } };
  });
  var g2 = n({ zIndex: r2 }, l2), y2 = a2;
  return v.Children.count(a2) > 1 && (y2 = E("div", { className: "".concat(o2, "-content"), children: a2 })), f2 && (y2 = f2(y2)), E(Te, { visible: i2, ref: h2, removeOnLeave: true, ...d2, children: function(e3, t3) {
    var i3 = e3.className, r3 = e3.style, a3 = s(o2, c2, i3);
    return E("div", { ref: t3, className: a3, onClick: m2, style: n(n({}, r3), g2), children: y2 });
  } });
});
je.displayName = "MobilePopupInner";
var Ie = ["visible", "mobile"], Be = v.forwardRef(function(e2, t2) {
  var o2 = e2.visible, i2 = e2.mobile, r2 = l(e2, Ie), u2 = C(o2), s2 = a(u2, 2), c2 = s2[0], p2 = s2[1], d2 = C(false), f2 = a(d2, 2), v2 = f2[0], m2 = f2[1], h2 = n(n({}, r2), {}, { visible: c2 });
  k(function() {
    p2(o2), o2 && i2 && m2(function() {
      if ("undefined" == typeof navigator || "undefined" == typeof window)
        return false;
      var e3 = navigator.userAgent || navigator.vendor || window.opera;
      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(e3) || /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(null == e3 ? void 0 : e3.substr(0, 4));
    }());
  }, [o2, i2]);
  var g2 = v2 ? E(je, { ...h2, mobile: i2, ref: t2 }) : E(ze, { ...h2, ref: t2 });
  return x("div", { children: [E(He, { ...h2 }), g2] });
});
Be.displayName = "Popup";
var Ue = v.createContext(null);
function _e() {
}
function qe() {
  return "";
}
function We(e2) {
  return e2 ? e2.ownerDocument : window.document;
}
var Xe = ["onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onContextMenu"];
const Ye = function(e2) {
  var a2 = function(a3) {
    t(p2, a3);
    var l2 = o(p2);
    function p2(e3) {
      var n2, t2;
      return i(this, p2), n2 = l2.call(this, e3), u(c(n2), "popupRef", v.createRef()), u(c(n2), "triggerRef", v.createRef()), u(c(n2), "portalContainer", void 0), u(c(n2), "attachId", void 0), u(c(n2), "clickOutsideHandler", void 0), u(c(n2), "touchOutsideHandler", void 0), u(c(n2), "contextMenuOutsideHandler1", void 0), u(c(n2), "contextMenuOutsideHandler2", void 0), u(c(n2), "mouseDownTimeout", void 0), u(c(n2), "focusTime", void 0), u(c(n2), "preClickTime", void 0), u(c(n2), "preTouchTime", void 0), u(c(n2), "delayTimer", void 0), u(c(n2), "hasPopupMouseDown", void 0), u(c(n2), "onMouseEnter", function(e4) {
        var t3 = n2.props.mouseEnterDelay;
        n2.fireEvents("onMouseEnter", e4), n2.delaySetPopupVisible(true, t3, t3 ? null : e4);
      }), u(c(n2), "onMouseMove", function(e4) {
        n2.fireEvents("onMouseMove", e4), n2.setPoint(e4);
      }), u(c(n2), "onMouseLeave", function(e4) {
        n2.fireEvents("onMouseLeave", e4), n2.delaySetPopupVisible(false, n2.props.mouseLeaveDelay);
      }), u(c(n2), "onPopupMouseEnter", function() {
        n2.clearDelayTimer();
      }), u(c(n2), "onPopupMouseLeave", function(e4) {
        var t3;
        e4.relatedTarget && !e4.relatedTarget.setTimeout && L(null === (t3 = n2.popupRef.current) || void 0 === t3 ? void 0 : t3.getElement(), e4.relatedTarget) || n2.delaySetPopupVisible(false, n2.props.mouseLeaveDelay);
      }), u(c(n2), "onFocus", function(e4) {
        n2.fireEvents("onFocus", e4), n2.clearDelayTimer(), n2.isFocusToShow() && (n2.focusTime = Date.now(), n2.delaySetPopupVisible(true, n2.props.focusDelay));
      }), u(c(n2), "onMouseDown", function(e4) {
        n2.fireEvents("onMouseDown", e4), n2.preClickTime = Date.now();
      }), u(c(n2), "onTouchStart", function(e4) {
        n2.fireEvents("onTouchStart", e4), n2.preTouchTime = Date.now();
      }), u(c(n2), "onBlur", function(e4) {
        n2.fireEvents("onBlur", e4), n2.clearDelayTimer(), n2.isBlurToHide() && n2.delaySetPopupVisible(false, n2.props.blurDelay);
      }), u(c(n2), "onContextMenu", function(e4) {
        e4.preventDefault(), n2.fireEvents("onContextMenu", e4), n2.setPopupVisible(true, e4);
      }), u(c(n2), "onContextMenuClose", function() {
        n2.isContextMenuToShow() && n2.close();
      }), u(c(n2), "onClick", function(e4) {
        if (n2.fireEvents("onClick", e4), n2.focusTime) {
          var t3;
          if (n2.preClickTime && n2.preTouchTime ? t3 = Math.min(n2.preClickTime, n2.preTouchTime) : n2.preClickTime ? t3 = n2.preClickTime : n2.preTouchTime && (t3 = n2.preTouchTime), Math.abs(t3 - n2.focusTime) < 20)
            return;
          n2.focusTime = 0;
        }
        n2.preClickTime = 0, n2.preTouchTime = 0, n2.isClickToShow() && (n2.isClickToHide() || n2.isBlurToHide()) && e4 && e4.preventDefault && e4.preventDefault();
        var o2 = !n2.state.popupVisible;
        (n2.isClickToHide() && !o2 || o2 && n2.isClickToShow()) && n2.setPopupVisible(!n2.state.popupVisible, e4);
      }), u(c(n2), "onPopupMouseDown", function() {
        var e4;
        (n2.hasPopupMouseDown = true, clearTimeout(n2.mouseDownTimeout), n2.mouseDownTimeout = window.setTimeout(function() {
          n2.hasPopupMouseDown = false;
        }, 0), n2.context) && (e4 = n2.context).onPopupMouseDown.apply(e4, arguments);
      }), u(c(n2), "onDocumentClick", function(e4) {
        if (!n2.props.mask || n2.props.maskClosable) {
          var t3 = e4.target, o2 = n2.getRootDomNode(), i2 = n2.getPopupDomNode();
          L(o2, t3) && !n2.isContextMenuOnly() || L(i2, t3) || n2.hasPopupMouseDown || n2.close();
        }
      }), u(c(n2), "getRootDomNode", function() {
        var e4 = n2.props.getTriggerDOMNode;
        if (e4)
          return e4(n2.triggerRef.current);
        try {
          var t3 = H(n2.triggerRef.current);
          if (t3)
            return t3;
        } catch (e5) {
        }
        return T.findDOMNode(c(n2));
      }), u(c(n2), "getPopupClassNameFromAlign", function(e4) {
        var t3 = [], o2 = n2.props, i2 = o2.popupPlacement, r2 = o2.builtinPlacements, a4 = o2.prefixCls, u2 = o2.alignPoint, s2 = o2.getPopupClassNameFromAlign;
        return i2 && r2 && t3.push(function(e5, n3, t4, o3) {
          for (var i3 = t4.points, r3 = Object.keys(e5), a5 = 0; a5 < r3.length; a5 += 1) {
            var u3 = r3[a5];
            if (I(e5[u3].points, i3, o3))
              return "".concat(n3, "-placement-").concat(u3);
          }
          return "";
        }(r2, a4, e4, u2)), s2 && t3.push(s2(e4)), t3.join(" ");
      }), u(c(n2), "getComponent", function() {
        var e4 = n2.props, t3 = e4.prefixCls, o2 = e4.destroyPopupOnHide, i2 = e4.popupClassName, r2 = e4.onPopupAlign, a4 = e4.popupMotion, u2 = e4.popupAnimation, s2 = e4.popupTransitionName, c2 = e4.popupStyle, l3 = e4.mask, p3 = e4.maskAnimation, d2 = e4.maskTransitionName, f2 = e4.maskMotion, v2 = e4.zIndex, m2 = e4.popup, h2 = e4.stretch, g2 = e4.alignPoint, y2 = e4.mobile, k2 = e4.forceRender, w2 = e4.onPopupClick, b2 = n2.state, C2 = b2.popupVisible, T2 = b2.point, M2 = n2.getPopupAlign(), x2 = {};
        return n2.isMouseEnterToShow() && (x2.onMouseEnter = n2.onPopupMouseEnter), n2.isMouseLeaveToHide() && (x2.onMouseLeave = n2.onPopupMouseLeave), x2.onMouseDown = n2.onPopupMouseDown, x2.onTouchStart = n2.onPopupMouseDown, E(Be, { prefixCls: t3, destroyPopupOnHide: o2, visible: C2, point: g2 && T2, className: i2, align: M2, onAlign: r2, animation: u2, getClassNameFromAlign: n2.getPopupClassNameFromAlign, ...x2, stretch: h2, getRootDomNode: n2.getRootDomNode, style: c2, mask: l3, zIndex: v2, transitionName: s2, maskAnimation: p3, maskTransitionName: d2, maskMotion: f2, ref: n2.popupRef, motion: a4, mobile: y2, forceRender: k2, onClick: w2, children: "function" == typeof m2 ? m2() : m2 });
      }), u(c(n2), "attachParent", function(e4) {
        S.cancel(n2.attachId);
        var t3, o2 = n2.props, i2 = o2.getPopupContainer, r2 = o2.getDocument, a4 = n2.getRootDomNode();
        i2 ? (a4 || 0 === i2.length) && (t3 = i2(a4)) : t3 = r2(n2.getRootDomNode()).body, t3 ? t3.appendChild(e4) : n2.attachId = S(function() {
          n2.attachParent(e4);
        });
      }), u(c(n2), "getContainer", function() {
        if (!n2.portalContainer) {
          var e4 = (0, n2.props.getDocument)(n2.getRootDomNode()).createElement("div");
          e4.style.position = "absolute", e4.style.top = "0", e4.style.left = "0", e4.style.width = "100%", n2.portalContainer = e4;
        }
        return n2.attachParent(n2.portalContainer), n2.portalContainer;
      }), u(c(n2), "setPoint", function(e4) {
        n2.props.alignPoint && e4 && n2.setState({ point: { pageX: e4.pageX, pageY: e4.pageY } });
      }), u(c(n2), "handlePortalUpdate", function() {
        n2.state.prevPopupVisible !== n2.state.popupVisible && n2.props.afterPopupVisibleChange(n2.state.popupVisible);
      }), u(c(n2), "triggerContextValue", { onPopupMouseDown: n2.onPopupMouseDown }), t2 = "popupVisible" in e3 ? !!e3.popupVisible : !!e3.defaultPopupVisible, n2.state = { prevPopupVisible: t2, popupVisible: t2 }, Xe.forEach(function(e4) {
        n2["fire".concat(e4)] = function(t3) {
          n2.fireEvents(e4, t3);
        };
      }), n2;
    }
    return r(p2, [{ key: "componentDidMount", value: function() {
      this.componentDidUpdate();
    } }, { key: "componentDidUpdate", value: function() {
      var e3, n2 = this.props;
      if (this.state.popupVisible)
        return this.clickOutsideHandler || !this.isClickToHide() && !this.isContextMenuToShow() || (e3 = n2.getDocument(this.getRootDomNode()), this.clickOutsideHandler = F(e3, "mousedown", this.onDocumentClick)), this.touchOutsideHandler || (e3 = e3 || n2.getDocument(this.getRootDomNode()), this.touchOutsideHandler = F(e3, "touchstart", this.onDocumentClick)), !this.contextMenuOutsideHandler1 && this.isContextMenuToShow() && (e3 = e3 || n2.getDocument(this.getRootDomNode()), this.contextMenuOutsideHandler1 = F(e3, "scroll", this.onContextMenuClose)), void (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow() && (this.contextMenuOutsideHandler2 = F(window, "blur", this.onContextMenuClose)));
      this.clearOutsideHandler();
    } }, { key: "componentWillUnmount", value: function() {
      this.clearDelayTimer(), this.clearOutsideHandler(), clearTimeout(this.mouseDownTimeout), S.cancel(this.attachId);
    } }, { key: "getPopupDomNode", value: function() {
      var e3;
      return (null === (e3 = this.popupRef.current) || void 0 === e3 ? void 0 : e3.getElement()) || null;
    } }, { key: "getPopupAlign", value: function() {
      var e3 = this.props, t2 = e3.popupPlacement, o2 = e3.popupAlign, i2 = e3.builtinPlacements;
      return t2 && i2 ? function(e4, t3, o3) {
        var i3 = e4[t3] || {};
        return n(n({}, i3), o3);
      }(i2, t2, o2) : o2;
    } }, { key: "setPopupVisible", value: function(e3, n2) {
      var t2 = this.props.alignPoint, o2 = this.state.popupVisible;
      this.clearDelayTimer(), o2 !== e3 && ("popupVisible" in this.props || this.setState({ popupVisible: e3, prevPopupVisible: o2 }), this.props.onPopupVisibleChange(e3)), t2 && n2 && e3 && this.setPoint(n2);
    } }, { key: "delaySetPopupVisible", value: function(e3, n2, t2) {
      var o2 = this, i2 = 1e3 * n2;
      if (this.clearDelayTimer(), i2) {
        var r2 = t2 ? { pageX: t2.pageX, pageY: t2.pageY } : null;
        this.delayTimer = window.setTimeout(function() {
          o2.setPopupVisible(e3, r2), o2.clearDelayTimer();
        }, i2);
      } else
        this.setPopupVisible(e3, t2);
    } }, { key: "clearDelayTimer", value: function() {
      this.delayTimer && (clearTimeout(this.delayTimer), this.delayTimer = null);
    } }, { key: "clearOutsideHandler", value: function() {
      this.clickOutsideHandler && (this.clickOutsideHandler.remove(), this.clickOutsideHandler = null), this.contextMenuOutsideHandler1 && (this.contextMenuOutsideHandler1.remove(), this.contextMenuOutsideHandler1 = null), this.contextMenuOutsideHandler2 && (this.contextMenuOutsideHandler2.remove(), this.contextMenuOutsideHandler2 = null), this.touchOutsideHandler && (this.touchOutsideHandler.remove(), this.touchOutsideHandler = null);
    } }, { key: "createTwoChains", value: function(e3) {
      var n2 = this.props.children.props, t2 = this.props;
      return n2[e3] && t2[e3] ? this["fire".concat(e3)] : n2[e3] || t2[e3];
    } }, { key: "isClickToShow", value: function() {
      var e3 = this.props, n2 = e3.action, t2 = e3.showAction;
      return -1 !== n2.indexOf("click") || -1 !== t2.indexOf("click");
    } }, { key: "isContextMenuOnly", value: function() {
      var e3 = this.props.action;
      return "contextMenu" === e3 || 1 === e3.length && "contextMenu" === e3[0];
    } }, { key: "isContextMenuToShow", value: function() {
      var e3 = this.props, n2 = e3.action, t2 = e3.showAction;
      return -1 !== n2.indexOf("contextMenu") || -1 !== t2.indexOf("contextMenu");
    } }, { key: "isClickToHide", value: function() {
      var e3 = this.props, n2 = e3.action, t2 = e3.hideAction;
      return -1 !== n2.indexOf("click") || -1 !== t2.indexOf("click");
    } }, { key: "isMouseEnterToShow", value: function() {
      var e3 = this.props, n2 = e3.action, t2 = e3.showAction;
      return -1 !== n2.indexOf("hover") || -1 !== t2.indexOf("mouseEnter");
    } }, { key: "isMouseLeaveToHide", value: function() {
      var e3 = this.props, n2 = e3.action, t2 = e3.hideAction;
      return -1 !== n2.indexOf("hover") || -1 !== t2.indexOf("mouseLeave");
    } }, { key: "isFocusToShow", value: function() {
      var e3 = this.props, n2 = e3.action, t2 = e3.showAction;
      return -1 !== n2.indexOf("focus") || -1 !== t2.indexOf("focus");
    } }, { key: "isBlurToHide", value: function() {
      var e3 = this.props, n2 = e3.action, t2 = e3.hideAction;
      return -1 !== n2.indexOf("focus") || -1 !== t2.indexOf("blur");
    } }, { key: "forcePopupAlign", value: function() {
      var e3;
      this.state.popupVisible && (null === (e3 = this.popupRef.current) || void 0 === e3 || e3.forceAlign());
    } }, { key: "fireEvents", value: function(e3, n2) {
      var t2 = this.props.children.props[e3];
      t2 && t2(n2);
      var o2 = this.props[e3];
      o2 && o2(n2);
    } }, { key: "close", value: function() {
      this.setPopupVisible(false);
    } }, { key: "render", value: function() {
      var t2 = this.state.popupVisible, o2 = this.props, i2 = o2.children, r2 = o2.forceRender, a4 = o2.alignPoint, u2 = o2.className, c2 = o2.autoDestroy, l3 = v.Children.only(i2), p3 = { key: "trigger" };
      this.isContextMenuToShow() ? p3.onContextMenu = this.onContextMenu : p3.onContextMenu = this.createTwoChains("onContextMenu"), this.isClickToHide() || this.isClickToShow() ? (p3.onClick = this.onClick, p3.onMouseDown = this.onMouseDown, p3.onTouchStart = this.onTouchStart) : (p3.onClick = this.createTwoChains("onClick"), p3.onMouseDown = this.createTwoChains("onMouseDown"), p3.onTouchStart = this.createTwoChains("onTouchStart")), this.isMouseEnterToShow() ? (p3.onMouseEnter = this.onMouseEnter, a4 && (p3.onMouseMove = this.onMouseMove)) : p3.onMouseEnter = this.createTwoChains("onMouseEnter"), this.isMouseLeaveToHide() ? p3.onMouseLeave = this.onMouseLeave : p3.onMouseLeave = this.createTwoChains("onMouseLeave"), this.isFocusToShow() || this.isBlurToHide() ? (p3.onFocus = this.onFocus, p3.onBlur = this.onBlur) : (p3.onFocus = this.createTwoChains("onFocus"), p3.onBlur = this.createTwoChains("onBlur"));
      var d2 = s(l3 && l3.props && l3.props.className, u2);
      d2 && (p3.className = d2);
      var f2 = n({}, p3);
      R(l3) && (f2.ref = function() {
        for (var e3 = arguments.length, n2 = new Array(e3), t3 = 0; t3 < e3; t3++)
          n2[t3] = arguments[t3];
        var o3 = n2.filter(function(e4) {
          return e4;
        });
        return o3.length <= 1 ? o3[0] : function(e4) {
          n2.forEach(function(n3) {
            V(n3, e4);
          });
        };
      }(this.triggerRef, l3.ref));
      var m2, h2 = v.cloneElement(l3, f2);
      return (t2 || this.popupRef.current || r2) && (m2 = E(e2, { getContainer: this.getContainer, didUpdate: this.handlePortalUpdate, children: this.getComponent() }, "portal")), !t2 && c2 && (m2 = null), x(Ue.Provider, { value: this.triggerContextValue, children: [h2, m2] });
    } }], [{ key: "getDerivedStateFromProps", value: function(e3, n2) {
      var t2 = e3.popupVisible, o2 = {};
      return void 0 !== t2 && n2.popupVisible !== t2 && (o2.popupVisible = t2, o2.prevPopupVisible = n2.popupVisible), o2;
    } }]), p2;
  }(v.Component);
  return u(a2, "contextType", Ue), u(a2, "defaultProps", { prefixCls: "rc-trigger-popup", getPopupClassNameFromAlign: qe, getDocument: We, onPopupVisibleChange: _e, afterPopupVisibleChange: _e, onPopupAlign: _e, popupClassName: "", mouseEnterDelay: 0, mouseLeaveDelay: 0.1, focusDelay: 0, blurDelay: 0.15, popupStyle: {}, destroyPopupOnHide: false, popupAlign: {}, defaultPopupVisible: false, mask: false, maskClosable: true, action: [], showAction: [], hideAction: [], autoDestroy: false }), a2;
}(j);
export {
  Ye as T
};
