openapi-ui-dist
Version:
<h1 align="center"> OpenAPI UI </h1> <p align="center"> OpenAPI/Swagger UI document, quickly generate mock params and call api, also simplified postman tool </p> <p align="center"> <a href="https://github.com/rookie-luochao/openapi-ui/blob/master/LICE
1,460 lines • 250 kB
JavaScript
import { r as a, m as Va, n as Ha, o as _r, p as jr, s as zr, l as Po, f as he, aL as pr, v as bn, t as _o, _ as Ne, G as $t, H as ut, b2 as De, M as gt, bK as Ga, y as Le, Q as pt, bL as qa, d as V, bM as Ka, b3 as jo, aP as Tr, bN as zo, aR as To, bO as Ua, X as Ar, aQ as Xa, bP as ka, bQ as Ao, a as Qe, w as ct, b as fe, P as lt, x as Qa, W as ce, aK as qe, C as Fr, c as Xt, bR as Ya, bS as Er, h as Fo, g as ze, bT as Or, bU as Za, bV as Bo, bW as Do, bX as Ja, I as kt, U as Lo, D as ne, J as ei, j as qn, B as fn, bY as ti, O as ni, aV as ri, z as Bn, V as oi, aO as Wo, L as ai, e as Ee, q as Br, k as ii, aZ as br, T as si, N as li, a0 as Dr, aS as it, aT as Qt, aU as Kn, bZ as Vo, aI as ci, a1 as ui, b_ as Ho, b$ as Lr, R as Zr, b9 as di, c0 as fi, c1 as mi, c2 as vi, c3 as gi, c4 as hi, c5 as Go, c6 as ht, c7 as pi, c8 as bi, aN as yi, ba as Ci, c9 as qo, ca as wi, cb as $i, cc as Si, cd as xi, ce as Ei, cf as Oi, cg as Ri, ch as Ii, ci as Ni, cj as Mi, bh as Pi, ay as _i, ck as Ko, cl as ji, cm as Uo, cn as zi, bC as Jr, aB as sn, co as jt, az as Ti } from "./index.js";
var Rr = /* @__PURE__ */ a.createContext(null);
function Ai(e) {
var t = e.children, n = e.onBatchResize, r = a.useRef(0), o = a.useRef([]), i = a.useContext(Rr), s = a.useCallback(function(l, c, u) {
r.current += 1;
var d = r.current;
o.current.push({
size: l,
element: c,
data: u
}), Promise.resolve().then(function() {
d === r.current && (n == null || n(o.current), o.current = []);
}), i == null || i(l, c, u);
}, [n, i]);
return /* @__PURE__ */ a.createElement(Rr.Provider, {
value: s
}, t);
}
var Xo = function() {
if (typeof Map < "u")
return Map;
function e(t, n) {
var r = -1;
return t.some(function(o, i) {
return o[0] === n ? (r = i, !0) : !1;
}), r;
}
return (
/** @class */
function() {
function t() {
this.__entries__ = [];
}
return Object.defineProperty(t.prototype, "size", {
/**
* @returns {boolean}
*/
get: function() {
return this.__entries__.length;
},
enumerable: !0,
configurable: !0
}), t.prototype.get = function(n) {
var r = e(this.__entries__, n), o = this.__entries__[r];
return o && o[1];
}, t.prototype.set = function(n, r) {
var o = e(this.__entries__, n);
~o ? this.__entries__[o][1] = r : this.__entries__.push([n, r]);
}, t.prototype.delete = function(n) {
var r = this.__entries__, o = e(r, n);
~o && r.splice(o, 1);
}, t.prototype.has = function(n) {
return !!~e(this.__entries__, n);
}, t.prototype.clear = function() {
this.__entries__.splice(0);
}, t.prototype.forEach = function(n, r) {
r === void 0 && (r = null);
for (var o = 0, i = this.__entries__; o < i.length; o++) {
var s = i[o];
n.call(r, s[1], s[0]);
}
}, t;
}()
);
}(), Ir = typeof window < "u" && typeof document < "u" && window.document === document, Dn = function() {
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
}(), Fi = function() {
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Dn) : function(e) {
return setTimeout(function() {
return e(Date.now());
}, 1e3 / 60);
};
}(), Bi = 2;
function Di(e, t) {
var n = !1, r = !1, o = 0;
function i() {
n && (n = !1, e()), r && l();
}
function s() {
Fi(i);
}
function l() {
var c = Date.now();
if (n) {
if (c - o < Bi)
return;
r = !0;
} else
n = !0, r = !1, setTimeout(s, t);
o = c;
}
return l;
}
var Li = 20, Wi = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], Vi = typeof MutationObserver < "u", Hi = (
/** @class */
function() {
function e() {
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = Di(this.refresh.bind(this), Li);
}
return e.prototype.addObserver = function(t) {
~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();
}, e.prototype.removeObserver = function(t) {
var n = this.observers_, r = n.indexOf(t);
~r && n.splice(r, 1), !n.length && this.connected_ && this.disconnect_();
}, e.prototype.refresh = function() {
var t = this.updateObservers_();
t && this.refresh();
}, e.prototype.updateObservers_ = function() {
var t = this.observers_.filter(function(n) {
return n.gatherActive(), n.hasActive();
});
return t.forEach(function(n) {
return n.broadcastActive();
}), t.length > 0;
}, e.prototype.connect_ = function() {
!Ir || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), Vi ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
attributes: !0,
childList: !0,
characterData: !0,
subtree: !0
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
}, e.prototype.disconnect_ = function() {
!Ir || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
}, e.prototype.onTransitionEnd_ = function(t) {
var n = t.propertyName, r = n === void 0 ? "" : n, o = Wi.some(function(i) {
return !!~r.indexOf(i);
});
o && this.refresh();
}, e.getInstance = function() {
return this.instance_ || (this.instance_ = new e()), this.instance_;
}, e.instance_ = null, e;
}()
), ko = function(e, t) {
for (var n = 0, r = Object.keys(t); n < r.length; n++) {
var o = r[n];
Object.defineProperty(e, o, {
value: t[o],
enumerable: !1,
writable: !1,
configurable: !0
});
}
return e;
}, Ut = function(e) {
var t = e && e.ownerDocument && e.ownerDocument.defaultView;
return t || Dn;
}, Qo = Un(0, 0, 0, 0);
function Ln(e) {
return parseFloat(e) || 0;
}
function eo(e) {
for (var t = [], n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
return t.reduce(function(r, o) {
var i = e["border-" + o + "-width"];
return r + Ln(i);
}, 0);
}
function Gi(e) {
for (var t = ["top", "right", "bottom", "left"], n = {}, r = 0, o = t; r < o.length; r++) {
var i = o[r], s = e["padding-" + i];
n[i] = Ln(s);
}
return n;
}
function qi(e) {
var t = e.getBBox();
return Un(0, 0, t.width, t.height);
}
function Ki(e) {
var t = e.clientWidth, n = e.clientHeight;
if (!t && !n)
return Qo;
var r = Ut(e).getComputedStyle(e), o = Gi(r), i = o.left + o.right, s = o.top + o.bottom, l = Ln(r.width), c = Ln(r.height);
if (r.boxSizing === "border-box" && (Math.round(l + i) !== t && (l -= eo(r, "left", "right") + i), Math.round(c + s) !== n && (c -= eo(r, "top", "bottom") + s)), !Xi(e)) {
var u = Math.round(l + i) - t, d = Math.round(c + s) - n;
Math.abs(u) !== 1 && (l -= u), Math.abs(d) !== 1 && (c -= d);
}
return Un(o.left, o.top, l, c);
}
var Ui = /* @__PURE__ */ function() {
return typeof SVGGraphicsElement < "u" ? function(e) {
return e instanceof Ut(e).SVGGraphicsElement;
} : function(e) {
return e instanceof Ut(e).SVGElement && typeof e.getBBox == "function";
};
}();
function Xi(e) {
return e === Ut(e).document.documentElement;
}
function ki(e) {
return Ir ? Ui(e) ? qi(e) : Ki(e) : Qo;
}
function Qi(e) {
var t = e.x, n = e.y, r = e.width, o = e.height, i = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, s = Object.create(i.prototype);
return ko(s, {
x: t,
y: n,
width: r,
height: o,
top: n,
right: t + r,
bottom: o + n,
left: t
}), s;
}
function Un(e, t, n, r) {
return { x: e, y: t, width: n, height: r };
}
var Yi = (
/** @class */
function() {
function e(t) {
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = Un(0, 0, 0, 0), this.target = t;
}
return e.prototype.isActive = function() {
var t = ki(this.target);
return this.contentRect_ = t, t.width !== this.broadcastWidth || t.height !== this.broadcastHeight;
}, e.prototype.broadcastRect = function() {
var t = this.contentRect_;
return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;
}, e;
}()
), Zi = (
/** @class */
/* @__PURE__ */ function() {
function e(t, n) {
var r = Qi(n);
ko(this, { target: t, contentRect: r });
}
return e;
}()
), Ji = (
/** @class */
function() {
function e(t, n, r) {
if (this.activeObservations_ = [], this.observations_ = new Xo(), typeof t != "function")
throw new TypeError("The callback provided as parameter 1 is not a function.");
this.callback_ = t, this.controller_ = n, this.callbackCtx_ = r;
}
return e.prototype.observe = function(t) {
if (!arguments.length)
throw new TypeError("1 argument required, but only 0 present.");
if (!(typeof Element > "u" || !(Element instanceof Object))) {
if (!(t instanceof Ut(t).Element))
throw new TypeError('parameter 1 is not of type "Element".');
var n = this.observations_;
n.has(t) || (n.set(t, new Yi(t)), this.controller_.addObserver(this), this.controller_.refresh());
}
}, e.prototype.unobserve = function(t) {
if (!arguments.length)
throw new TypeError("1 argument required, but only 0 present.");
if (!(typeof Element > "u" || !(Element instanceof Object))) {
if (!(t instanceof Ut(t).Element))
throw new TypeError('parameter 1 is not of type "Element".');
var n = this.observations_;
n.has(t) && (n.delete(t), n.size || this.controller_.removeObserver(this));
}
}, e.prototype.disconnect = function() {
this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
}, e.prototype.gatherActive = function() {
var t = this;
this.clearActive(), this.observations_.forEach(function(n) {
n.isActive() && t.activeObservations_.push(n);
});
}, e.prototype.broadcastActive = function() {
if (this.hasActive()) {
var t = this.callbackCtx_, n = this.activeObservations_.map(function(r) {
return new Zi(r.target, r.broadcastRect());
});
this.callback_.call(t, n, t), this.clearActive();
}
}, e.prototype.clearActive = function() {
this.activeObservations_.splice(0);
}, e.prototype.hasActive = function() {
return this.activeObservations_.length > 0;
}, e;
}()
), Yo = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Xo(), Zo = (
/** @class */
/* @__PURE__ */ function() {
function e(t) {
if (!(this instanceof e))
throw new TypeError("Cannot call a class as a function.");
if (!arguments.length)
throw new TypeError("1 argument required, but only 0 present.");
var n = Hi.getInstance(), r = new Ji(t, n, this);
Yo.set(this, r);
}
return e;
}()
);
[
"observe",
"unobserve",
"disconnect"
].forEach(function(e) {
Zo.prototype[e] = function() {
var t;
return (t = Yo.get(this))[e].apply(t, arguments);
};
});
var es = function() {
return typeof Dn.ResizeObserver < "u" ? Dn.ResizeObserver : Zo;
}(), wt = /* @__PURE__ */ new Map();
function ts(e) {
e.forEach(function(t) {
var n, r = t.target;
(n = wt.get(r)) === null || n === void 0 || n.forEach(function(o) {
return o(r);
});
});
}
var Jo = new es(ts);
function ns(e, t) {
wt.has(e) || (wt.set(e, /* @__PURE__ */ new Set()), Jo.observe(e)), wt.get(e).add(t);
}
function rs(e, t) {
wt.has(e) && (wt.get(e).delete(t), wt.get(e).size || (Jo.unobserve(e), wt.delete(e)));
}
var os = /* @__PURE__ */ function(e) {
Va(n, e);
var t = Ha(n);
function n() {
return _r(this, n), t.apply(this, arguments);
}
return jr(n, [{
key: "render",
value: function() {
return this.props.children;
}
}]), n;
}(a.Component);
function as(e, t) {
var n = e.children, r = e.disabled, o = a.useRef(null), i = a.useRef(null), s = a.useContext(Rr), l = typeof n == "function", c = l ? n(o) : n, u = a.useRef({
width: -1,
height: -1,
offsetWidth: -1,
offsetHeight: -1
}), d = !l && /* @__PURE__ */ a.isValidElement(c) && zr(c), f = d ? c.ref : null, b = Po(f, o), h = function() {
var p;
return pr(o.current) || // Support `nativeElement` format
(o.current && bn(o.current) === "object" ? pr((p = o.current) === null || p === void 0 ? void 0 : p.nativeElement) : null) || pr(i.current);
};
a.useImperativeHandle(t, function() {
return h();
});
var g = a.useRef(e);
g.current = e;
var $ = a.useCallback(function(x) {
var p = g.current, C = p.onResize, m = p.data, v = x.getBoundingClientRect(), y = v.width, w = v.height, R = x.offsetWidth, S = x.offsetHeight, E = Math.floor(y), I = Math.floor(w);
if (u.current.width !== E || u.current.height !== I || u.current.offsetWidth !== R || u.current.offsetHeight !== S) {
var z = {
width: E,
height: I,
offsetWidth: R,
offsetHeight: S
};
u.current = z;
var F = R === Math.round(y) ? y : R, T = S === Math.round(w) ? w : S, D = he(he({}, z), {}, {
offsetWidth: F,
offsetHeight: T
});
s == null || s(D, x, m), C && Promise.resolve().then(function() {
C(D, x);
});
}
}, []);
return a.useEffect(function() {
var x = h();
return x && !r && ns(x, $), function() {
return rs(x, $);
};
}, [o.current, r]), /* @__PURE__ */ a.createElement(os, {
ref: i
}, d ? /* @__PURE__ */ a.cloneElement(c, {
ref: b
}) : c);
}
var is = /* @__PURE__ */ a.forwardRef(as), ss = "rc-observer-key";
function ls(e, t) {
var n = e.children, r = typeof n == "function" ? [n] : _o(n);
return r.map(function(o, i) {
var s = (o == null ? void 0 : o.key) || "".concat(ss, "-").concat(i);
return /* @__PURE__ */ a.createElement(is, Ne({}, e, {
key: s,
ref: i === 0 ? t : void 0
}), o);
});
}
var Yt = /* @__PURE__ */ a.forwardRef(ls);
Yt.Collection = Ai;
const Wn = ["blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
function cs(e, t) {
return Wn.reduce((n, r) => {
const o = e[`${r}1`], i = e[`${r}3`], s = e[`${r}6`], l = e[`${r}7`];
return Object.assign(Object.assign({}, n), t(r, {
lightColor: o,
lightBorderColor: i,
darkColor: s,
textColor: l
}));
}, {});
}
const to = (e) => typeof e == "object" && e != null && e.nodeType === 1, no = (e, t) => (!t || e !== "hidden") && e !== "visible" && e !== "clip", yr = (e, t) => {
if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
const n = getComputedStyle(e, null);
return no(n.overflowY, t) || no(n.overflowX, t) || ((r) => {
const o = ((i) => {
if (!i.ownerDocument || !i.ownerDocument.defaultView) return null;
try {
return i.ownerDocument.defaultView.frameElement;
} catch {
return null;
}
})(r);
return !!o && (o.clientHeight < r.scrollHeight || o.clientWidth < r.scrollWidth);
})(e);
}
return !1;
}, zn = (e, t, n, r, o, i, s, l) => i < e && s > t || i > e && s < t ? 0 : i <= e && l <= n || s >= t && l >= n ? i - e - r : s > t && l < n || i < e && l > n ? s - t + o : 0, us = (e) => {
const t = e.parentElement;
return t ?? (e.getRootNode().host || null);
}, ro = (e, t) => {
var n, r, o, i;
if (typeof document > "u") return [];
const { scrollMode: s, block: l, inline: c, boundary: u, skipOverflowHiddenElements: d } = t, f = typeof u == "function" ? u : (B) => B !== u;
if (!to(e)) throw new TypeError("Invalid target");
const b = document.scrollingElement || document.documentElement, h = [];
let g = e;
for (; to(g) && f(g); ) {
if (g = us(g), g === b) {
h.push(g);
break;
}
g != null && g === document.body && yr(g) && !yr(document.documentElement) || g != null && yr(g, d) && h.push(g);
}
const $ = (r = (n = window.visualViewport) == null ? void 0 : n.width) != null ? r : innerWidth, x = (i = (o = window.visualViewport) == null ? void 0 : o.height) != null ? i : innerHeight, { scrollX: p, scrollY: C } = window, { height: m, width: v, top: y, right: w, bottom: R, left: S } = e.getBoundingClientRect(), { top: E, right: I, bottom: z, left: F } = ((B) => {
const N = window.getComputedStyle(B);
return { top: parseFloat(N.scrollMarginTop) || 0, right: parseFloat(N.scrollMarginRight) || 0, bottom: parseFloat(N.scrollMarginBottom) || 0, left: parseFloat(N.scrollMarginLeft) || 0 };
})(e);
let T = l === "start" || l === "nearest" ? y - E : l === "end" ? R + z : y + m / 2 - E + z, D = c === "center" ? S + v / 2 - F + I : c === "end" ? w + I : S - F;
const W = [];
for (let B = 0; B < h.length; B++) {
const N = h[B], { height: j, width: L, top: _, right: O, bottom: P, left: A } = N.getBoundingClientRect();
if (s === "if-needed" && y >= 0 && S >= 0 && R <= x && w <= $ && y >= _ && R <= P && S >= A && w <= O) return W;
const Q = getComputedStyle(N), H = parseInt(Q.borderLeftWidth, 10), re = parseInt(Q.borderTopWidth, 10), G = parseInt(Q.borderRightWidth, 10), M = parseInt(Q.borderBottomWidth, 10);
let q = 0, Z = 0;
const se = "offsetWidth" in N ? N.offsetWidth - N.clientWidth - H - G : 0, pe = "offsetHeight" in N ? N.offsetHeight - N.clientHeight - re - M : 0, ve = "offsetWidth" in N ? N.offsetWidth === 0 ? 0 : L / N.offsetWidth : 0, te = "offsetHeight" in N ? N.offsetHeight === 0 ? 0 : j / N.offsetHeight : 0;
if (b === N) q = l === "start" ? T : l === "end" ? T - x : l === "nearest" ? zn(C, C + x, x, re, M, C + T, C + T + m, m) : T - x / 2, Z = c === "start" ? D : c === "center" ? D - $ / 2 : c === "end" ? D - $ : zn(p, p + $, $, H, G, p + D, p + D + v, v), q = Math.max(0, q + C), Z = Math.max(0, Z + p);
else {
q = l === "start" ? T - _ - re : l === "end" ? T - P + M + pe : l === "nearest" ? zn(_, P, j, re, M + pe, T, T + m, m) : T - (_ + j / 2) + pe / 2, Z = c === "start" ? D - A - H : c === "center" ? D - (A + L / 2) + se / 2 : c === "end" ? D - O + G + se : zn(A, O, L, H, G + se, D, D + v, v);
const { scrollLeft: ue, scrollTop: le } = N;
q = te === 0 ? 0 : Math.max(0, Math.min(le + q / te, N.scrollHeight - j / te + pe)), Z = ve === 0 ? 0 : Math.max(0, Math.min(ue + Z / ve, N.scrollWidth - L / ve + se)), T += le - q, D += ue - Z;
}
W.push({ el: N, top: q, left: Z });
}
return W;
}, ds = (e) => e === !1 ? { block: "end", inline: "nearest" } : ((t) => t === Object(t) && Object.keys(t).length !== 0)(e) ? e : { block: "start", inline: "nearest" };
function fs(e, t) {
if (!e.isConnected || !((o) => {
let i = o;
for (; i && i.parentNode; ) {
if (i.parentNode === document) return !0;
i = i.parentNode instanceof ShadowRoot ? i.parentNode.host : i.parentNode;
}
return !1;
})(e)) return;
const n = ((o) => {
const i = window.getComputedStyle(o);
return { top: parseFloat(i.scrollMarginTop) || 0, right: parseFloat(i.scrollMarginRight) || 0, bottom: parseFloat(i.scrollMarginBottom) || 0, left: parseFloat(i.scrollMarginLeft) || 0 };
})(e);
if (((o) => typeof o == "object" && typeof o.behavior == "function")(t)) return t.behavior(ro(e, t));
const r = typeof t == "boolean" || t == null ? void 0 : t.behavior;
for (const { el: o, top: i, left: s } of ro(e, ds(t))) {
const l = i - n.top + n.bottom, c = s - n.left + n.right;
o.scroll({ top: l, left: c, behavior: r });
}
}
const ms = (e) => {
const {
componentCls: t,
iconCls: n,
boxShadow: r,
colorText: o,
colorSuccess: i,
colorError: s,
colorWarning: l,
colorInfo: c,
fontSizeLG: u,
motionEaseInOutCirc: d,
motionDurationSlow: f,
marginXS: b,
paddingXS: h,
borderRadiusLG: g,
zIndexPopup: $,
// Custom token
contentPadding: x,
contentBg: p
} = e, C = `${t}-notice`, m = new De("MessageMoveIn", {
"0%": {
padding: 0,
transform: "translateY(-100%)",
opacity: 0
},
"100%": {
padding: h,
transform: "translateY(0)",
opacity: 1
}
}), v = new De("MessageMoveOut", {
"0%": {
maxHeight: e.height,
padding: h,
opacity: 1
},
"100%": {
maxHeight: 0,
padding: 0,
opacity: 0
}
}), y = {
padding: h,
textAlign: "center",
[`${t}-custom-content`]: {
display: "flex",
alignItems: "center"
},
[`${t}-custom-content > ${n}`]: {
marginInlineEnd: b,
// affected by ltr or rtl
fontSize: u
},
[`${C}-content`]: {
display: "inline-block",
padding: x,
background: p,
borderRadius: g,
boxShadow: r,
pointerEvents: "all"
},
[`${t}-success > ${n}`]: {
color: i
},
[`${t}-error > ${n}`]: {
color: s
},
[`${t}-warning > ${n}`]: {
color: l
},
[`${t}-info > ${n},
${t}-loading > ${n}`]: {
color: c
}
};
return [
// ============================ Holder ============================
{
[t]: Object.assign(Object.assign({}, gt(e)), {
color: o,
position: "fixed",
top: b,
width: "100%",
pointerEvents: "none",
zIndex: $,
[`${t}-move-up`]: {
animationFillMode: "forwards"
},
[`
${t}-move-up-appear,
${t}-move-up-enter
`]: {
animationName: m,
animationDuration: f,
animationPlayState: "paused",
animationTimingFunction: d
},
[`
${t}-move-up-appear${t}-move-up-appear-active,
${t}-move-up-enter${t}-move-up-enter-active
`]: {
animationPlayState: "running"
},
[`${t}-move-up-leave`]: {
animationName: v,
animationDuration: f,
animationPlayState: "paused",
animationTimingFunction: d
},
[`${t}-move-up-leave${t}-move-up-leave-active`]: {
animationPlayState: "running"
},
"&-rtl": {
direction: "rtl",
span: {
direction: "rtl"
}
}
})
},
// ============================ Notice ============================
{
[t]: {
[`${C}-wrapper`]: Object.assign({}, y)
}
},
// ============================= Pure =============================
{
[`${t}-notice-pure-panel`]: Object.assign(Object.assign({}, y), {
padding: 0,
textAlign: "start"
})
}
];
}, vs = (e) => ({
zIndexPopup: e.zIndexPopupBase + Ga + 10,
contentBg: e.colorBgElevated,
contentPadding: `${(e.controlHeightLG - e.fontSize * e.lineHeight) / 2}px ${e.paddingSM}px`
}), ea = $t("Message", (e) => {
const t = ut(e, {
height: 150
});
return [ms(t)];
}, vs);
var gs = function(e, t) {
var n = {};
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
return n;
};
const hs = {
info: /* @__PURE__ */ a.createElement(Ka, null),
success: /* @__PURE__ */ a.createElement(jo, null),
error: /* @__PURE__ */ a.createElement(Tr, null),
warning: /* @__PURE__ */ a.createElement(zo, null),
loading: /* @__PURE__ */ a.createElement(To, null)
}, ta = (e) => {
let {
prefixCls: t,
type: n,
icon: r,
children: o
} = e;
return /* @__PURE__ */ a.createElement("div", {
className: V(`${t}-custom-content`, `${t}-${n}`)
}, r || hs[n], /* @__PURE__ */ a.createElement("span", null, o));
}, ps = (e) => {
const {
prefixCls: t,
className: n,
type: r,
icon: o,
content: i
} = e, s = gs(e, ["prefixCls", "className", "type", "icon", "content"]), {
getPrefixCls: l
} = a.useContext(Le), c = t || l("message"), u = pt(c), [d, f, b] = ea(c, u);
return d(/* @__PURE__ */ a.createElement(qa, Object.assign({}, s, {
prefixCls: c,
className: V(n, f, `${c}-notice-pure-panel`, b, u),
eventKey: "pure",
duration: null,
content: /* @__PURE__ */ a.createElement(ta, {
prefixCls: c,
type: r,
icon: o
}, i)
})));
};
function bs(e, t) {
return {
motionName: t ?? `${e}-move-up`
};
}
function Wr(e) {
let t;
const n = new Promise((o) => {
t = e(() => {
o(!0);
});
}), r = () => {
t == null || t();
};
return r.then = (o, i) => n.then(o, i), r.promise = n, r;
}
var ys = function(e, t) {
var n = {};
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
return n;
};
const Cs = 8, ws = 3, $s = (e) => {
let {
children: t,
prefixCls: n
} = e;
const r = pt(n), [o, i, s] = ea(n, r);
return o(/* @__PURE__ */ a.createElement(ka, {
classNames: {
list: V(i, s, r)
}
}, t));
}, Ss = (e, t) => {
let {
prefixCls: n,
key: r
} = t;
return /* @__PURE__ */ a.createElement($s, {
prefixCls: n,
key: r
}, e);
}, xs = /* @__PURE__ */ a.forwardRef((e, t) => {
const {
top: n,
prefixCls: r,
getContainer: o,
maxCount: i,
duration: s = ws,
rtl: l,
transitionName: c,
onAllRemoved: u
} = e, {
getPrefixCls: d,
getPopupContainer: f,
message: b,
direction: h
} = a.useContext(Le), g = r || d("message"), $ = () => ({
left: "50%",
transform: "translateX(-50%)",
top: n ?? Cs
}), x = () => V({
[`${g}-rtl`]: l ?? h === "rtl"
}), p = () => bs(g, c), C = /* @__PURE__ */ a.createElement("span", {
className: `${g}-close-x`
}, /* @__PURE__ */ a.createElement(Xa, {
className: `${g}-close-icon`
})), [m, v] = Ua({
prefixCls: g,
style: $,
className: x,
motion: p,
closable: !1,
closeIcon: C,
duration: s,
getContainer: () => (o == null ? void 0 : o()) || (f == null ? void 0 : f()) || document.body,
maxCount: i,
onAllRemoved: u,
renderNotifications: Ss
});
return a.useImperativeHandle(t, () => Object.assign(Object.assign({}, m), {
prefixCls: g,
message: b
})), v;
});
let oo = 0;
function na(e) {
const t = a.useRef(null);
return Ar(), [a.useMemo(() => {
const r = (c) => {
var u;
(u = t.current) === null || u === void 0 || u.close(c);
}, o = (c) => {
if (!t.current) {
const w = () => {
};
return w.then = () => {
}, w;
}
const {
open: u,
prefixCls: d,
message: f
} = t.current, b = `${d}-notice`, {
content: h,
icon: g,
type: $,
key: x,
className: p,
style: C,
onClose: m
} = c, v = ys(c, ["content", "icon", "type", "key", "className", "style", "onClose"]);
let y = x;
return y == null && (oo += 1, y = `antd-message-${oo}`), Wr((w) => (u(Object.assign(Object.assign({}, v), {
key: y,
content: /* @__PURE__ */ a.createElement(ta, {
prefixCls: d,
type: $,
icon: g
}, h),
placement: "top",
className: V($ && `${b}-${$}`, p, f == null ? void 0 : f.className),
style: Object.assign(Object.assign({}, f == null ? void 0 : f.style), C),
onClose: () => {
m == null || m(), w();
}
})), () => {
r(y);
}));
}, s = {
open: o,
destroy: (c) => {
var u;
c !== void 0 ? r(c) : (u = t.current) === null || u === void 0 || u.destroy();
}
};
return ["info", "success", "warning", "error", "loading"].forEach((c) => {
const u = (d, f, b) => {
let h;
d && typeof d == "object" && "content" in d ? h = d : h = {
content: d
};
let g, $;
typeof f == "function" ? $ = f : (g = f, $ = b);
const x = Object.assign(Object.assign({
onClose: $,
duration: g
}, h), {
type: c
});
return o(x);
};
s[c] = u;
}), s;
}, []), /* @__PURE__ */ a.createElement(xs, Object.assign({
key: "message-holder"
}, e, {
ref: t
}))];
}
function Es(e) {
return na(e);
}
const Os = (e) => ({
[e.componentCls]: {
// For common/openAnimation
[`${e.antCls}-motion-collapse-legacy`]: {
overflow: "hidden",
"&-active": {
transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
}
},
[`${e.antCls}-motion-collapse`]: {
overflow: "hidden",
transition: `height ${e.motionDurationMid} ${e.motionEaseInOut},
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`
}
}
}), Rs = new De("antMoveDownIn", {
"0%": {
transform: "translate3d(0, 100%, 0)",
transformOrigin: "0 0",
opacity: 0
},
"100%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
}
}), Is = new De("antMoveDownOut", {
"0%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
},
"100%": {
transform: "translate3d(0, 100%, 0)",
transformOrigin: "0 0",
opacity: 0
}
}), Ns = new De("antMoveLeftIn", {
"0%": {
transform: "translate3d(-100%, 0, 0)",
transformOrigin: "0 0",
opacity: 0
},
"100%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
}
}), Ms = new De("antMoveLeftOut", {
"0%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
},
"100%": {
transform: "translate3d(-100%, 0, 0)",
transformOrigin: "0 0",
opacity: 0
}
}), Ps = new De("antMoveRightIn", {
"0%": {
transform: "translate3d(100%, 0, 0)",
transformOrigin: "0 0",
opacity: 0
},
"100%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
}
}), _s = new De("antMoveRightOut", {
"0%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
},
"100%": {
transform: "translate3d(100%, 0, 0)",
transformOrigin: "0 0",
opacity: 0
}
}), js = new De("antMoveUpIn", {
"0%": {
transform: "translate3d(0, -100%, 0)",
transformOrigin: "0 0",
opacity: 0
},
"100%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
}
}), zs = new De("antMoveUpOut", {
"0%": {
transform: "translate3d(0, 0, 0)",
transformOrigin: "0 0",
opacity: 1
},
"100%": {
transform: "translate3d(0, -100%, 0)",
transformOrigin: "0 0",
opacity: 0
}
}), Ts = {
"move-up": {
inKeyframes: js,
outKeyframes: zs
},
"move-down": {
inKeyframes: Rs,
outKeyframes: Is
},
"move-left": {
inKeyframes: Ns,
outKeyframes: Ms
},
"move-right": {
inKeyframes: Ps,
outKeyframes: _s
}
}, vd = (e, t) => {
const {
antCls: n
} = e, r = `${n}-${t}`, {
inKeyframes: o,
outKeyframes: i
} = Ts[t];
return [Ao(r, o, i, e.motionDurationMid), {
[`
${r}-enter,
${r}-appear
`]: {
opacity: 0,
animationTimingFunction: e.motionEaseOutCirc
},
[`${r}-leave`]: {
animationTimingFunction: e.motionEaseInOutCirc
}
}];
}, As = new De("antSlideUpIn", {
"0%": {
transform: "scaleY(0.8)",
transformOrigin: "0% 0%",
opacity: 0
},
"100%": {
transform: "scaleY(1)",
transformOrigin: "0% 0%",
opacity: 1
}
}), Fs = new De("antSlideUpOut", {
"0%": {
transform: "scaleY(1)",
transformOrigin: "0% 0%",
opacity: 1
},
"100%": {
transform: "scaleY(0.8)",
transformOrigin: "0% 0%",
opacity: 0
}
}), Bs = new De("antSlideDownIn", {
"0%": {
transform: "scaleY(0.8)",
transformOrigin: "100% 100%",
opacity: 0
},
"100%": {
transform: "scaleY(1)",
transformOrigin: "100% 100%",
opacity: 1
}
}), Ds = new De("antSlideDownOut", {
"0%": {
transform: "scaleY(1)",
transformOrigin: "100% 100%",
opacity: 1
},
"100%": {
transform: "scaleY(0.8)",
transformOrigin: "100% 100%",
opacity: 0
}
}), Ls = new De("antSlideLeftIn", {
"0%": {
transform: "scaleX(0.8)",
transformOrigin: "0% 0%",
opacity: 0
},
"100%": {
transform: "scaleX(1)",
transformOrigin: "0% 0%",
opacity: 1
}
}), Ws = new De("antSlideLeftOut", {
"0%": {
transform: "scaleX(1)",
transformOrigin: "0% 0%",
opacity: 1
},
"100%": {
transform: "scaleX(0.8)",
transformOrigin: "0% 0%",
opacity: 0
}
}), Vs = new De("antSlideRightIn", {
"0%": {
transform: "scaleX(0.8)",
transformOrigin: "100% 0%",
opacity: 0
},
"100%": {
transform: "scaleX(1)",
transformOrigin: "100% 0%",
opacity: 1
}
}), Hs = new De("antSlideRightOut", {
"0%": {
transform: "scaleX(1)",
transformOrigin: "100% 0%",
opacity: 1
},
"100%": {
transform: "scaleX(0.8)",
transformOrigin: "100% 0%",
opacity: 0
}
}), Gs = {
"slide-up": {
inKeyframes: As,
outKeyframes: Fs
},
"slide-down": {
inKeyframes: Bs,
outKeyframes: Ds
},
"slide-left": {
inKeyframes: Ls,
outKeyframes: Ws
},
"slide-right": {
inKeyframes: Vs,
outKeyframes: Hs
}
}, gd = (e, t) => {
const {
antCls: n
} = e, r = `${n}-${t}`, {
inKeyframes: o,
outKeyframes: i
} = Gs[t];
return [Ao(r, o, i, e.motionDurationMid), {
[`
${r}-enter,
${r}-appear
`]: {
transform: "scale(0)",
transformOrigin: "0% 0%",
opacity: 0,
animationTimingFunction: e.motionEaseOutQuint,
"&-prepare": {
transform: "scale(1)"
}
},
[`${r}-leave`]: {
animationTimingFunction: e.motionEaseInQuint
}
}];
}, ra = function() {
if (typeof navigator > "u" || typeof window > "u")
return !1;
var e = 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(e) || /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(e == null ? void 0 : e.substr(0, 4));
};
var qs = ["prefixCls", "invalidate", "item", "renderItem", "responsive", "responsiveDisabled", "registerSize", "itemKey", "className", "style", "children", "display", "order", "component"], Ht = void 0;
function Ks(e, t) {
var n = e.prefixCls, r = e.invalidate, o = e.item, i = e.renderItem, s = e.responsive, l = e.responsiveDisabled, c = e.registerSize, u = e.itemKey, d = e.className, f = e.style, b = e.children, h = e.display, g = e.order, $ = e.component, x = $ === void 0 ? "div" : $, p = Qe(e, qs), C = s && !h;
function m(S) {
c(u, S);
}
a.useEffect(function() {
return function() {
m(null);
};
}, []);
var v = i && o !== Ht ? i(o) : b, y;
r || (y = {
opacity: C ? 0 : 1,
height: C ? 0 : Ht,
overflowY: C ? "hidden" : Ht,
order: s ? g : Ht,
pointerEvents: C ? "none" : Ht,
position: C ? "absolute" : Ht
});
var w = {};
C && (w["aria-hidden"] = !0);
var R = /* @__PURE__ */ a.createElement(x, Ne({
className: V(!r && n, d),
style: he(he({}, y), f)
}, w, p, {
ref: t
}), v);
return s && (R = /* @__PURE__ */ a.createElement(Yt, {
onResize: function(E) {
var I = E.offsetWidth;
m(I);
},
disabled: l
}, R)), R;
}
var un = /* @__PURE__ */ a.forwardRef(Ks);
un.displayName = "Item";
function Us(e) {
if (typeof MessageChannel > "u")
ct(e);
else {
var t = new MessageChannel();
t.port1.onmessage = function() {
return e();
}, t.port2.postMessage(void 0);
}
}
function Xs() {
var e = a.useRef(null), t = function(r) {
e.current || (e.current = [], Us(function() {
Qa.unstable_batchedUpdates(function() {
e.current.forEach(function(o) {
o();
}), e.current = null;
});
})), e.current.push(r);
};
return t;
}
function ln(e, t) {
var n = a.useState(t), r = fe(n, 2), o = r[0], i = r[1], s = lt(function(l) {
e(function() {
i(l);
});
});
return [o, s];
}
var Vn = /* @__PURE__ */ ce.createContext(null), ks = ["component"], Qs = ["className"], Ys = ["className"], Zs = function(t, n) {
var r = a.useContext(Vn);
if (!r) {
var o = t.component, i = o === void 0 ? "div" : o, s = Qe(t, ks);
return /* @__PURE__ */ a.createElement(i, Ne({}, s, {
ref: n
}));
}
var l = r.className, c = Qe(r, Qs), u = t.className, d = Qe(t, Ys);
return /* @__PURE__ */ a.createElement(Vn.Provider, {
value: null
}, /* @__PURE__ */ a.createElement(un, Ne({
ref: n,
className: V(l, u)
}, c, d)));
}, oa = /* @__PURE__ */ a.forwardRef(Zs);
oa.displayName = "RawItem";
var Js = ["prefixCls", "data", "renderItem", "renderRawItem", "itemKey", "itemWidth", "ssr", "style", "className", "maxCount", "renderRest", "renderRawRest", "suffix", "component", "itemComponent", "onVisibleChange"], aa = "responsive", ia = "invalidate";
function el(e) {
return "+ ".concat(e.length, " ...");
}
function tl(e, t) {
var n = e.prefixCls, r = n === void 0 ? "rc-overflow" : n, o = e.data, i = o === void 0 ? [] : o, s = e.renderItem, l = e.renderRawItem, c = e.itemKey, u = e.itemWidth, d = u === void 0 ? 10 : u, f = e.ssr, b = e.style, h = e.className, g = e.maxCount, $ = e.renderRest, x = e.renderRawRest, p = e.suffix, C = e.component, m = C === void 0 ? "div" : C, v = e.itemComponent, y = e.onVisibleChange, w = Qe(e, Js), R = f === "full", S = Xs(), E = ln(S, null), I = fe(E, 2), z = I[0], F = I[1], T = z || 0, D = ln(S, /* @__PURE__ */ new Map()), W = fe(D, 2), B = W[0], N = W[1], j = ln(S, 0), L = fe(j, 2), _ = L[0], O = L[1], P = ln(S, 0), A = fe(P, 2), Q = A[0], H = A[1], re = ln(S, 0), G = fe(re, 2), M = G[0], q = G[1], Z = a.useState(null), se = fe(Z, 2), pe = se[0], ve = se[1], te = a.useState(null), ue = fe(te, 2), le = ue[0], Ce = ue[1], we = a.useMemo(function() {
return le === null && R ? Number.MAX_SAFE_INTEGER : le || 0;
}, [le, z]), ae = a.useState(!1), Oe = fe(ae, 2), $e = Oe[0], Te = Oe[1], k = "".concat(r, "-item"), Y = Math.max(_, Q), de = g === aa, ge = i.length && de, We = g === ia, _e = ge || typeof g == "number" && i.length > g, Se = a.useMemo(function() {
var ee = i;
return ge ? z === null && R ? ee = i : ee = i.slice(0, Math.min(i.length, T / d)) : typeof g == "number" && (ee = i.slice(0, g)), ee;
}, [i, d, z, g, ge]), Re = a.useMemo(function() {
return ge ? i.slice(we + 1) : i.slice(Se.length);
}, [i, Se, ge, we]), ke = a.useCallback(function(ee, me) {
var Ie;
return typeof c == "function" ? c(ee) : (Ie = c && (ee == null ? void 0 : ee[c])) !== null && Ie !== void 0 ? Ie : me;
}, [c]), Ae = a.useCallback(s || function(ee) {
return ee;
}, [s]);
function xe(ee, me, Ie) {
le === ee && (me === void 0 || me === pe) || (Ce(ee), Ie || (Te(ee < i.length - 1), y == null || y(ee)), me !== void 0 && ve(me));
}
function be(ee, me) {
F(me.clientWidth);
}
function Ve(ee, me) {
N(function(Ie) {
var Ge = new Map(Ie);
return me === null ? Ge.delete(ee) : Ge.set(ee, me), Ge;
});
}
function Fe(ee, me) {
H(me), O(Q);
}
function He(ee, me) {
q(me);
}
function Ke(ee) {
return B.get(ke(Se[ee], ee));
}
qe(function() {
if (T && typeof Y == "number" && Se) {
var ee = M, me = Se.length, Ie = me - 1;
if (!me) {
xe(0, null);
return;
}
for (var Ge = 0; Ge < me; Ge += 1) {
var nt = Ke(Ge);
if (R && (nt = nt || 0), nt === void 0) {
xe(Ge - 1, void 0, !0);
break;
}
if (ee += nt, // Only one means `totalWidth` is the final width
Ie === 0 && ee <= T || // Last two width will be the final width
Ge === Ie - 1 && ee + Ke(Ie) <= T) {
xe(Ie, null);
break;
} else if (ee + Y > T) {
xe(Ge - 1, ee - nt - M + Q);
break;
}
}
p && Ke(0) + M > T && ve(null);
}
}, [T, B, Q, M, ke, Se]);
var Ue = $e && !!Re.length, Be = {};
pe !== null && ge && (Be = {
position: "absolute",
left: pe,
top: 0
});
var Ye = {
prefixCls: k,
responsive: ge,
component: v,
invalidate: We
}, oe = l ? function(ee, me) {
var Ie = ke(ee, me);
return /* @__PURE__ */ a.createElement(Vn.Provider, {
key: Ie,
value: he(he({}, Ye), {}, {
order: me,
item: ee,
itemKey: Ie,
registerSize: Ve,
display: me <= we
})
}, l(ee, me));
} : function(ee, me) {
var Ie = ke(ee, me);
return /* @__PURE__ */ a.createElement(un, Ne({}, Ye, {
order: me,
key: Ie,
item: ee,
renderItem: Ae,
itemKey: Ie,
registerSize: Ve,
display: me <= we
}));
}, X, J = {
order: Ue ? we : Number.MAX_SAFE_INTEGER,
className: "".concat(k, "-rest"),
registerSize: Fe,
display: Ue
};
if (x)
x && (X = /* @__PURE__ */ a.createElement(Vn.Provider, {
value: he(he({}, Ye), J)
}, x(Re)));
else {
var K = $ || el;
X = /* @__PURE__ */ a.createElement(un, Ne({}, Ye, J), typeof K == "function" ? K(Re) : K);
}
var ye = /* @__PURE__ */ a.createElement(m, Ne({
className: V(!We && r, h),
style: b,
ref: t
}, w), Se.map(oe), _e ? X : null, p && /* @__PURE__ */ a.createElement(un, Ne({}, Ye, {
responsive: de,
responsiveDisabled: !ge,
order: we,
className: "".concat(k, "-suffix"),
registerSize: He,
display: !0,
style: Be
}), p));
return de && (ye = /* @__PURE__ */ a.createElement(Yt, {
onResize: be,
disabled: !ge
}, ye)), ye;
}
var Xn = /* @__PURE__ */ a.forwardRef(tl);
Xn.displayName = "Overflow";
Xn.Item = oa;
Xn.RESPONSIVE = aa;
Xn.INVALIDATE = ia;
function nl(e) {
var t = e.prefixCls, n = e.align, r = e.arrow, o = e.arrowPos, i = r || {}, s = i.className, l = i.content, c = o.x, u = c === void 0 ? 0 : c, d = o.y, f = d === void 0 ? 0 : d, b = a.useRef();
if (!n || !n.points)
return null;
var h = {
position: "absolute"
};
if (n.autoArrow !== !1) {
var g = n.points[0], $ = n.points[1], x = g[0], p = g[1], C = $[0], m = $[1];
x === C || !["t", "b"].includes(x) ? h.top = f : x === "t" ? h.top = 0 : h.bottom = 0, p === m || !["l", "r"].includes(p) ? h.left = u : p === "l" ? h.left = 0 : h.right = 0;
}
return /* @__PURE__ */ a.createElement("div", {
ref: b,
className: V("".concat(t, "-arrow"), s),
style: h
}, l);
}
function rl(e) {
var t = e.prefixCls, n = e.open, r = e.zIndex, o = e.mask, i = e.motion;
return o ? /* @__PURE__ */ a.createElement(Fr, Ne({}, i, {
motionAppear: !0,
visible: n,
removeOnLeave: !0
}), function(s) {
var l = s.className;
return /* @__PURE__ */ a.createElement("div", {
style: {
zIndex: r
},
className: V("".concat(t, "-mask"), l)
});
}) : null;
}
var ol = /* @__PURE__ */ a.memo(function(e) {
var t = e.children;
return t;
}, function(e, t) {
return t.cache;
}), al = /* @__PURE__ */ a.forwardRef(function(e, t) {
var n = e.popup, r = e.className, o = e.prefixCls, i = e.style, s = e.target, l = e.onVisibleChanged, c = e.open, u = e.keepDom, d = e.fresh, f = e.onClick, b = e.mask, h = e.arrow, g = e.arrowPos, $ = e.align, x = e.motion, p = e.maskMotion, C = e.forceRender, m = e.getPopupContainer, v = e.autoDestroy, y = e.portal, w = e.zIndex, R = e.onMouseEnter, S = e.onMouseLeave, E = e.onPointerEnter, I = e.ready, z = e.offsetX, F = e.offsetY, T = e.offsetR, D = e.offsetB, W = e.onAlign, B = e.onPrepare, N = e.stretch, j = e.targetWidth, L = e.targetHeight, _ = typeof n == "function" ? n() : n, O = c || u, P = (m == null ? void 0 : m.length) > 0, A = a.useState(!m || !P), Q = fe(A, 2), H = Q[0], re = Q[1];
if (qe(function() {
!H && P && s && re(!0);
}, [H, P, s]), !H)
return null;
var G = "auto", M = {
left: "-1000vw",
top: "-1000vh",
right: G,
bottom: G
};
if (I || !c) {
var q, Z = $.points, se = $.dynamicInset || ((q = $._experimental) === null || q === void 0 ? void 0 : q.dynamicInset), pe = se && Z[0][1] === "r", ve = se && Z[0][0] === "b";
pe ? (M.right = T, M.left = G) : (M.left = z, M.right = G), ve ? (M.bottom = D, M.top = G) : (M.top = F, M.bottom = G);
}
var te = {};
return N && (N.includes("height") && L ? te.height = L : N.includes("minHeight") && L && (te.minHeight = L), N.includes("width") && j ? te.width = j : N.includes("minWidth") && j && (te.minWidth = j)), c || (te.pointerEvents = "none"), /* @__PURE__ */ a.createElement(y, {
open: C || O,
getContainer: m && function() {
return m(s);
},
autoDestroy: v
}, /* @__PURE__ */ a.createElement(rl, {
prefixCls: o,
open: c,
zIndex: w,
mask: b,
motion: p
}), /* @__PURE__ */ a.createElement(Yt, {
onResize: W,
disabled: !c
}, function(ue) {
return /* @__PURE__ */ a.createElement(Fr, Ne({
motionAppear: !0,
motionEnter: !0,
motionLeave: !0,
removeOnLeave: !1,
forceRender: C,
leavedClassName: "".concat(o, "-hidden")
}, x, {
onAppearPrepare: B,
onEnterPrepare: B,
visible: c,
onVisibleChanged: function(Ce) {
var we;
x == null || (we = x.onVisibleChanged) === null || we === void 0 || we.call(x, Ce), l(Ce);
}
}), function(le, Ce) {
var we = le.className, ae = le.style, Oe = V(o, we, r);
return /* @__PURE__ */ a.createElement("div", {
ref: Xt(ue, t, Ce),
className: Oe,
style: he(he(he(he({
"--arrow-x": "".concat(g.x || 0, "px"),
"--arrow-y": "".concat(g.y || 0, "px")
}, M), te), ae), {}, {
boxSizing: "border-box",
zIndex: w
}, i),
onMouseEnter: R,
onMouseLeave: S,
onPointerEnter: E,
onClick: f
}, h && /* @__PURE__ */ a.createElement(nl, {
prefixCls: o,
arrow: h,
arrowPos: g,
align: $
}), /* @__PURE__ */ a.createElement(ol, {
cache: !c && !d
}, _));
});
}));
}), il = /* @__PURE__ */ a.forwardRef(function(e, t) {
var n = e.children, r = e.getTriggerDOMNode, o = zr(n), i = a.useCallback(function(l) {
Ya(t, r ? r(l) : l);
}, [r]), s = Po(i, n.ref);
return o ? /* @__PURE__ */ a.cloneElement(n, {
ref: s
}) : n;
}), ao = /* @__PURE__ */ a.createContext(null);
function io(e) {
return e ? Array.isArray(e) ? e : [e] : [];
}
function sl(e, t, n, r) {
return a.useMemo(function() {
var o = io(n ?? t), i = io(r ?? t), s = new Set(o), l = new Set(i);
return e && (s.has("hover") && (s.delete("hover"), s.add("click")), l.has("hover") && (l.delete("hover"), l.add("click"))), [s, l];
}, [e, t, n, r]);
}
function ll() {
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0