import { aE as Xe, bC as ft, w as ge, c as le, K as q, d as T, P as we, H as D, cD as ht, cE as gt, cF as mt, cG as $t, cH as yt, bn as j, cI as he, R as Fe, _ as te, e as me, F as xt, cl as je, g as _t, m as St, r as tt, t as Ct, cJ as at, bP as Tt, o as wt, i as nt, E as Pt, bL as Rt, h as De, u as Et, bY as It, L as Ve, al as Bt, bV as Lt, l as At, bp as xe, bo as Dt, bq as kt } from "./index2.js"; import { shallowRef as H, onBeforeUnmount as Me, defineComponent as ae, ref as J, computed as W, createVNode as g, watchEffect as Ce, onMounted as Te, watch as ie, provide as Mt, inject as Nt, toRefs as Ot } from "vue"; import { u as Ht } from "./useRefs.js"; import { e as ot, t as Wt, a as zt, b as Kt, h as Gt, f as Xt } from "./hasIn.js"; function Ft(e, t, a, i) { if (!Xe(e)) return e; t = ot(t, e); for (var o = -1, l = t.length, n = l - 1, s = e; s != null && ++o < l; ) { var v = Wt(t[o]), d = a; if (v === "__proto__" || v === "constructor" || v === "prototype") return e; if (o != n) { var p = s[v]; d = void 0, d === void 0 && (d = Xe(p) ? p : ft(t[o + 1]) ? [] : {}); } zt(s, v, d), s = s[v]; } return e; } function jt(e, t, a) { for (var i = -1, o = t.length, l = {}; ++i < o; ) { var n = t[i], s = Kt(e, n); a(s, n) && Ft(l, ot(n, e), s); } return l; } function Vt(e, t) { return jt(e, t, function(a, i) { return Gt(e, i); }); } var it = Xt(function(e, t) { return e == null ? {} : Vt(e, t); }); function Yt(e) { const t = H(), a = H(!1); function i() { for (var o = arguments.length, l = new Array(o), n = 0; n < o; n++) l[n] = arguments[n]; a.value || (ge.cancel(t.value), t.value = ge(() => { e(...l); })); } return Me(() => { a.value = !0, ge.cancel(t.value); }), i; } function Ut(e) { const t = H([]), a = H(typeof e == "function" ? e() : e), i = Yt(() => { let l = a.value; t.value.forEach((n) => { l = n(l); }), t.value = [], a.value = l; }); function o(l) { t.value.push(l), i(); } return [a, o]; } const Zt = ae({ compatConfig: { MODE: 3 }, name: "TabNode", props: { id: { type: String }, prefixCls: { type: String }, tab: { type: Object }, active: { type: Boolean }, closable: { type: Boolean }, editable: { type: Object }, onClick: { type: Function }, onResize: { type: Function }, renderWrapper: { type: Function }, removeAriaLabel: { type: String }, // onRemove: { type: Function as PropType<() => void> }, onFocus: { type: Function } }, emits: ["click", "resize", "remove", "focus"], setup(e, t) { let { expose: a, attrs: i } = t; const o = J(); function l(v) { var d; !((d = e.tab) === null || d === void 0) && d.disabled || e.onClick(v); } a({ domRef: o }); function n(v) { var d; v.preventDefault(), v.stopPropagation(), e.editable.onEdit("remove", { key: (d = e.tab) === null || d === void 0 ? void 0 : d.key, event: v }); } const s = W(() => { var v; return e.editable && e.closable !== !1 && !(!((v = e.tab) === null || v === void 0) && v.disabled); }); return () => { var v; const { prefixCls: d, id: p, active: S, tab: { key: h, tab: c, disabled: y, closeIcon: x }, renderWrapper: w, removeAriaLabel: C, editable: k, onFocus: K } = e, M = `${d}-tab`, r = g("div", { key: h, ref: o, class: le(M, { [`${M}-with-remove`]: s.value, [`${M}-active`]: S, [`${M}-disabled`]: y }), style: i.style, onClick: l }, [g("div", { role: "tab", "aria-selected": S, id: p && `${p}-tab-${h}`, class: `${M}-btn`, "aria-controls": p && `${p}-panel-${h}`, "aria-disabled": y, tabindex: y ? null : 0, onClick: (m) => { m.stopPropagation(), l(m); }, onKeydown: (m) => { [q.SPACE, q.ENTER].includes(m.which) && (m.preventDefault(), l(m)); }, onFocus: K }, [typeof c == "function" ? c() : c]), s.value && g("button", { type: "button", "aria-label": C || "remove", tabindex: 0, class: `${M}-remove`, onClick: (m) => { m.stopPropagation(), n(m); } }, [(x == null ? void 0 : x()) || ((v = k.removeIcon) === null || v === void 0 ? void 0 : v.call(k)) || "×"])]); return w ? w(r) : r; }; } }), Ye = { width: 0, height: 0, left: 0, top: 0 }; function qt(e, t) { const a = J(/* @__PURE__ */ new Map()); return Ce(() => { var i, o; const l = /* @__PURE__ */ new Map(), n = e.value, s = t.value.get((i = n[0]) === null || i === void 0 ? void 0 : i.key) || Ye, v = s.left + s.width; for (let d = 0; d < n.length; d += 1) { const { key: p } = n[d]; let S = t.value.get(p); S || (S = t.value.get((o = n[d - 1]) === null || o === void 0 ? void 0 : o.key) || Ye); const h = l.get(p) || T({}, S); h.right = v - h.left - h.width, l.set(p, h); } a.value = new Map(l); }), a; } const lt = ae({ compatConfig: { MODE: 3 }, name: "AddButton", inheritAttrs: !1, props: { prefixCls: String, editable: { type: Object }, locale: { type: Object, default: void 0 } }, setup(e, t) { let { expose: a, attrs: i } = t; const o = J(); return a({ domRef: o }), () => { const { prefixCls: l, editable: n, locale: s } = e; return !n || n.showAdd === !1 ? null : g("button", { ref: o, type: "button", class: `${l}-nav-add`, style: i.style, "aria-label": (s == null ? void 0 : s.addAriaLabel) || "Add tab", onClick: (v) => { n.onEdit("add", { event: v }); } }, [n.addIcon ? n.addIcon() : "+"]); }; } }), Jt = { prefixCls: { type: String }, id: { type: String }, tabs: { type: Object }, rtl: { type: Boolean }, tabBarGutter: { type: Number }, activeKey: { type: [String, Number] }, mobile: { type: Boolean }, moreIcon: we.any, moreTransitionName: { type: String }, editable: { type: Object }, locale: { type: Object, default: void 0 }, removeAriaLabel: String, onTabClick: { type: Function }, popupClassName: String, getPopupContainer: j() }, Qt = ae({ compatConfig: { MODE: 3 }, name: "OperationNode", inheritAttrs: !1, props: Jt, emits: ["tabClick"], slots: Object, setup(e, t) { let { attrs: a, slots: i } = t; const [o, l] = D(!1), [n, s] = D(null), v = (c) => { const y = e.tabs.filter((C) => !C.disabled); let x = y.findIndex((C) => C.key === n.value) || 0; const w = y.length; for (let C = 0; C < w; C += 1) { x = (x + c + w) % w; const k = y[x]; if (!k.disabled) { s(k.key); return; } } }, d = (c) => { const { which: y } = c; if (!o.value) { [q.DOWN, q.SPACE, q.ENTER].includes(y) && (l(!0), c.preventDefault()); return; } switch (y) { case q.UP: v(-1), c.preventDefault(); break; case q.DOWN: v(1), c.preventDefault(); break; case q.ESC: l(!1); break; case q.SPACE: case q.ENTER: n.value !== null && e.onTabClick(n.value, c); break; } }, p = W(() => `${e.id}-more-popup`), S = W(() => n.value !== null ? `${p.value}-${n.value}` : null), h = (c, y) => { c.preventDefault(), c.stopPropagation(), e.editable.onEdit("remove", { key: y, event: c }); }; return Te(() => { ie(n, () => { const c = document.getElementById(S.value); c && c.scrollIntoView && c.scrollIntoView(!1); }, { flush: "post", immediate: !0 }); }), ie(o, () => { o.value || s(null); }), ht({}), () => { var c; const { prefixCls: y, id: x, tabs: w, locale: C, mobile: k, moreIcon: K = ((c = i.moreIcon) === null || c === void 0 ? void 0 : c.call(i)) || g(gt, null, null), moreTransitionName: M, editable: r, tabBarGutter: m, rtl: u, onTabClick: $, popupClassName: I } = e; if (!w.length) return null; const R = `${y}-dropdown`, G = C == null ? void 0 : C.dropdownAriaLabel, re = { [u ? "marginRight" : "marginLeft"]: m }; w.length || (re.visibility = "hidden", re.order = 1); const se = le({ [`${R}-rtl`]: u, [`${I}`]: !0 }), ce = k ? null : g(mt, { prefixCls: R, trigger: ["hover"], visible: o.value, transitionName: M, onVisibleChange: l, overlayClassName: se, mouseEnterDelay: 0.1, mouseLeaveDelay: 0.1, getPopupContainer: e.getPopupContainer }, { overlay: () => g($t, { onClick: (E) => { let { key: Q, domEvent: N } = E; $(Q, N), l(!1); }, id: p.value, tabindex: -1, role: "listbox", "aria-activedescendant": S.value, selectedKeys: [n.value], "aria-label": G !== void 0 ? G : "expanded dropdown" }, { default: () => [w.map((E) => { var Q, N; const V = r && E.closable !== !1 && !E.disabled; return g(yt, { key: E.key, id: `${p.value}-${E.key}`, role: "option", "aria-controls": x && `${x}-panel-${E.key}`, disabled: E.disabled }, { default: () => [g("span", null, [typeof E.tab == "function" ? E.tab() : E.tab]), V && g("button", { type: "button", "aria-label": e.removeAriaLabel || "remove", tabindex: 0, class: `${R}-menu-item-remove`, onClick: (Y) => { Y.stopPropagation(), h(Y, E.key); } }, [((Q = E.closeIcon) === null || Q === void 0 ? void 0 : Q.call(E)) || ((N = r.removeIcon) === null || N === void 0 ? void 0 : N.call(r)) || "×"])] }); })] }), default: () => g("button", { type: "button", class: `${y}-nav-more`, style: re, tabindex: -1, "aria-hidden": "true", "aria-haspopup": "listbox", "aria-controls": p.value, id: `${x}-more`, "aria-expanded": o.value, onKeydown: d }, [K]) }); return g("div", { class: le(`${y}-nav-operations`, a.class), style: a.style }, [ce, g(lt, { prefixCls: y, locale: C, editable: r }, null)]); }; } }), rt = Symbol("tabsContextKey"), st = (e) => { Mt(rt, e); }, dt = () => Nt(rt, { tabs: J([]), prefixCls: J() }); ae({ compatConfig: { MODE: 3 }, name: "TabsContextProvider", inheritAttrs: !1, props: { tabs: { type: Object, default: void 0 }, prefixCls: { type: String, default: void 0 } }, setup(e, t) { let { slots: a } = t; return st(Ot(e)), () => { var i; return (i = a.default) === null || i === void 0 ? void 0 : i.call(a); }; } }); const ea = 0.1, Ue = 0.01, _e = 20, Ze = Math.pow(0.995, _e); function ta(e, t) { const [a, i] = D(), [o, l] = D(0), [n, s] = D(0), [v, d] = D(), p = J(); function S(r) { const { screenX: m, screenY: u } = r.touches[0]; i({ x: m, y: u }), clearInterval(p.value); } function h(r) { if (!a.value) return; r.preventDefault(); const { screenX: m, screenY: u } = r.touches[0], $ = m - a.value.x, I = u - a.value.y; t($, I), i({ x: m, y: u }); const R = Date.now(); s(R - o.value), l(R), d({ x: $, y: I }); } function c() { if (!a.value) return; const r = v.value; if (i(null), d(null), r) { const m = r.x / n.value, u = r.y / n.value, $ = Math.abs(m), I = Math.abs(u); if (Math.max($, I) < ea) return; let R = m, G = u; p.value = setInterval(() => { if (Math.abs(R) < Ue && Math.abs(G) < Ue) { clearInterval(p.value); return; } R *= Ze, G *= Ze, t(R * _e, G * _e); }, _e); } } const y = J(); function x(r) { const { deltaX: m, deltaY: u } = r; let $ = 0; const I = Math.abs(m), R = Math.abs(u); I === R ? $ = y.value === "x" ? m : u : I > R ? ($ = m, y.value = "x") : ($ = u, y.value = "y"), t(-$, -$) && r.preventDefault(); } const w = J({ onTouchStart: S, onTouchMove: h, onTouchEnd: c, onWheel: x }); function C(r) { w.value.onTouchStart(r); } function k(r) { w.value.onTouchMove(r); } function K(r) { w.value.onTouchEnd(r); } function M(r) { w.value.onWheel(r); } Te(() => { var r, m; document.addEventListener("touchmove", k, { passive: !1 }), document.addEventListener("touchend", K, { passive: !1 }), (r = e.value) === null || r === void 0 || r.addEventListener("touchstart", C, { passive: !1 }), (m = e.value) === null || m === void 0 || m.addEventListener("wheel", M, { passive: !1 }); }), Me(() => { document.removeEventListener("touchmove", k), document.removeEventListener("touchend", K); }); } function qe(e, t) { const a = J(e); function i(o) { const l = typeof o == "function" ? o(a.value) : o; l !== a.value && t(l, a.value), a.value = l; } return [a, i]; } const Je = { width: 0, height: 0, left: 0, top: 0, right: 0 }, aa = () => ({ id: { type: String }, tabPosition: { type: String }, activeKey: { type: [String, Number] }, rtl: { type: Boolean }, animated: me(), editable: me(), moreIcon: we.any, moreTransitionName: { type: String }, mobile: { type: Boolean }, tabBarGutter: { type: Number }, renderTabBar: { type: Function }, locale: me(), popupClassName: String, getPopupContainer: j(), onTabClick: { type: Function }, onTabScroll: { type: Function } }), na = (e, t) => { const { offsetWidth: a, offsetHeight: i, offsetTop: o, offsetLeft: l } = e, { width: n, height: s, x: v, y: d } = e.getBoundingClientRect(); return Math.abs(n - a) < 1 ? [n, s, v - t.x, d - t.y] : [a, i, l, o]; }, Qe = ae({ compatConfig: { MODE: 3 }, name: "TabNavList", inheritAttrs: !1, props: aa(), slots: Object, emits: ["tabClick", "tabScroll"], setup(e, t) { let { attrs: a, slots: i } = t; const { tabs: o, prefixCls: l } = dt(), n = H(), s = H(), v = H(), d = H(), [p, S] = Ht(), h = W(() => e.tabPosition === "top" || e.tabPosition === "bottom"), [c, y] = qe(0, (f, b) => { h.value && e.onTabScroll && e.onTabScroll({ direction: f > b ? "left" : "right" }); }), [x, w] = qe(0, (f, b) => { !h.value && e.onTabScroll && e.onTabScroll({ direction: f > b ? "top" : "bottom" }); }), [C, k] = D(0), [K, M] = D(0), [r, m] = D(null), [u, $] = D(null), [I, R] = D(0), [G, re] = D(0), [se, ce] = Ut(/* @__PURE__ */ new Map()), E = qt(o, se), Q = W(() => `${l.value}-nav-operations-hidden`), N = H(0), V = H(0); Ce(() => { h.value ? e.rtl ? (N.value = 0, V.value = Math.max(0, C.value - r.value)) : (N.value = Math.min(0, r.value - C.value), V.value = 0) : (N.value = Math.min(0, u.value - K.value), V.value = 0); }); const Y = (f) => f < N.value ? N.value : f > V.value ? V.value : f, ue = H(), [z, ve] = D(), be = () => { ve(Date.now()); }, pe = () => { clearTimeout(ue.value); }, $e = (f, b) => { f((_) => Y(_ + b)); }; ta(n, (f, b) => { if (h.value) { if (r.value >= C.value) return !1; $e(y, f); } else { if (u.value >= K.value) return !1; $e(w, b); } return pe(), be(), !0; }), ie(z, () => { pe(), z.value && (ue.value = setTimeout(() => { ve(0); }, 100)); }); const de = function() { let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : e.activeKey; const b = E.value.get(f) || { width: 0, height: 0, left: 0, right: 0, top: 0 }; if (h.value) { let _ = c.value; e.rtl ? b.right < c.value ? _ = b.right : b.right + b.width > c.value + r.value && (_ = b.right + b.width - r.value) : b.left < -c.value ? _ = -b.left : b.left + b.width > -c.value + r.value && (_ = -(b.left + b.width - r.value)), w(0), y(Y(_)); } else { let _ = x.value; b.top < -x.value ? _ = -b.top : b.top + b.height > -x.value + u.value && (_ = -(b.top + b.height - u.value)), y(0), w(Y(_)); } }, Pe = H(0), Re = H(0); Ce(() => { let f, b, _, P, L, B; const U = E.value; ["top", "bottom"].includes(e.tabPosition) ? (f = "width", P = r.value, L = C.value, B = I.value, b = e.rtl ? "right" : "left", _ = Math.abs(c.value)) : (f = "height", P = u.value, L = C.value, B = G.value, b = "top", _ = -x.value); let O = P; L + B > P && L < P && (O = P - B); const F = o.value; if (!F.length) return [Pe.value, Re.value] = [0, 0]; const Z = F.length; let oe = Z; for (let X = 0; X < Z; X += 1) { const ee = U.get(F[X].key) || Je; if (ee[b] + ee[f] > _ + O) { oe = X - 1; break; } } let A = 0; for (let X = Z - 1; X >= 0; X -= 1) if ((U.get(F[X].key) || Je)[b] < _) { A = X + 1; break; } return [Pe.value, Re.value] = [A, oe]; }); const Ne = () => { ce(() => { var f; const b = /* @__PURE__ */ new Map(), _ = (f = s.value) === null || f === void 0 ? void 0 : f.getBoundingClientRect(); return o.value.forEach((P) => { let { key: L } = P; const B = S.value.get(L), U = (B == null ? void 0 : B.$el) || B; if (U) { const [O, F, Z, oe] = na(U, _); b.set(L, { width: O, height: F, left: Z, top: oe }); } }), b; }); }; ie(() => o.value.map((f) => f.key).join("%%"), () => { Ne(); }, { flush: "post" }); const Ee = () => { var f, b, _, P, L; const B = ((f = n.value) === null || f === void 0 ? void 0 : f.offsetWidth) || 0, U = ((b = n.value) === null || b === void 0 ? void 0 : b.offsetHeight) || 0, O = ((_ = d.value) === null || _ === void 0 ? void 0 : _.$el) || {}, F = O.offsetWidth || 0, Z = O.offsetHeight || 0; m(B), $(U), R(F), re(Z); const oe = (((P = s.value) === null || P === void 0 ? void 0 : P.offsetWidth) || 0) - F, A = (((L = s.value) === null || L === void 0 ? void 0 : L.offsetHeight) || 0) - Z; k(oe), M(A), Ne(); }, Oe = W(() => [...o.value.slice(0, Pe.value), ...o.value.slice(Re.value + 1)]), [ut, vt] = D(), ne = W(() => E.value.get(e.activeKey)), He = H(), We = () => { ge.cancel(He.value); }; ie([ne, h, () => e.rtl], () => { const f = {}; ne.value && (h.value ? (e.rtl ? f.right = he(ne.value.right) : f.left = he(ne.value.left), f.width = he(ne.value.width)) : (f.top = he(ne.value.top), f.height = he(ne.value.height))), We(), He.value = ge(() => { vt(f); }); }), ie([() => e.activeKey, ne, E, h], () => { de(); }, { flush: "post" }), ie([() => e.rtl, () => e.tabBarGutter, () => e.activeKey, () => o.value], () => { Ee(); }, { flush: "post" }); const Ie = (f) => { let { position: b, prefixCls: _, extra: P } = f; if (!P) return null; const L = P == null ? void 0 : P({ position: b }); return L ? g("div", { class: `${_}-extra-content` }, [L]) : null; }; return Me(() => { pe(), We(); }), () => { const { id: f, animated: b, activeKey: _, rtl: P, editable: L, locale: B, tabPosition: U, tabBarGutter: O, onTabClick: F } = e, { class: Z, style: oe } = a, A = l.value, X = !!Oe.value.length, ee = `${A}-nav-wrap`; let Be, Le, ze, Ke; h.value ? P ? (Le = c.value > 0, Be = c.value + r.value < C.value) : (Be = c.value < 0, Le = -c.value + r.value < C.value) : (ze = x.value < 0, Ke = -x.value + u.value < K.value); const ye = {}; U === "top" || U === "bottom" ? ye[P ? "marginRight" : "marginLeft"] = typeof O == "number" ? `${O}px` : O : ye.marginTop = typeof O == "number" ? `${O}px` : O; const Ge = o.value.map((Ae, bt) => { const { key: fe } = Ae; return g(Zt, { id: f, prefixCls: A, key: fe, tab: Ae, style: bt === 0 ? void 0 : ye, closable: Ae.closable, editable: L, active: fe === _, removeAriaLabel: B == null ? void 0 : B.removeAriaLabel, ref: p(fe), onClick: (pt) => { F(fe, pt); }, onFocus: () => { de(fe), be(), n.value && (P || (n.value.scrollLeft = 0), n.value.scrollTop = 0); } }, i); }); return g("div", { role: "tablist", class: le(`${A}-nav`, Z), style: oe, onKeydown: () => { be(); } }, [g(Ie, { position: "left", prefixCls: A, extra: i.leftExtra }, null), g(Fe, { onResize: Ee }, { default: () => [g("div", { class: le(ee, { [`${ee}-ping-left`]: Be, [`${ee}-ping-right`]: Le, [`${ee}-ping-top`]: ze, [`${ee}-ping-bottom`]: Ke }), ref: n }, [g(Fe, { onResize: Ee }, { default: () => [g("div", { ref: s, class: `${A}-nav-list`, style: { transform: `translate(${c.value}px, ${x.value}px)`, transition: z.value ? "none" : void 0 } }, [Ge, g(lt, { ref: d, prefixCls: A, locale: B, editable: L, style: T(T({}, Ge.length === 0 ? void 0 : ye), { visibility: X ? "hidden" : null }) }, null), g("div", { class: le(`${A}-ink-bar`, { [`${A}-ink-bar-animated`]: b.inkBar }), style: ut.value }, null)])] })])] }), g(Qt, te(te({}, e), {}, { removeAriaLabel: B == null ? void 0 : B.removeAriaLabel, ref: v, prefixCls: A, tabs: Oe.value, class: !X && Q.value }), it(i, ["moreIcon"])), g(Ie, { position: "right", prefixCls: A, extra: i.rightExtra }, null), g(Ie, { position: "right", prefixCls: A, extra: i.tabBarExtraContent }, null)]); }; } }), oa = ae({ compatConfig: { MODE: 3 }, name: "TabPanelList", inheritAttrs: !1, props: { activeKey: { type: [String, Number] }, id: { type: String }, rtl: { type: Boolean }, animated: { type: Object, default: void 0 }, tabPosition: { type: String }, destroyInactiveTabPane: { type: Boolean } }, setup(e) { const { tabs: t, prefixCls: a } = dt(); return () => { const { id: i, activeKey: o, animated: l, tabPosition: n, rtl: s, destroyInactiveTabPane: v } = e, d = l.tabPane, p = a.value, S = t.value.findIndex((h) => h.key === o); return g("div", { class: `${p}-content-holder` }, [g("div", { class: [`${p}-content`, `${p}-content-${n}`, { [`${p}-content-animated`]: d }], style: S && d ? { [s ? "marginRight" : "marginLeft"]: `-${S}00%` } : null }, [t.value.map((h) => xt(h.node, { key: h.key, prefixCls: p, tabKey: h.key, id: i, animated: d, active: h.key === o, destroyInactiveTabPane: v }))])]); }; } }), ia = (e) => { const { componentCls: t, motionDurationSlow: a } = e; return [ { [t]: { [`${t}-switch`]: { "&-appear, &-enter": { transition: "none", "&-start": { opacity: 0 }, "&-active": { opacity: 1, transition: `opacity ${a}` } }, "&-leave": { position: "absolute", transition: "none", inset: 0, "&-start": { opacity: 1 }, "&-active": { opacity: 0, transition: `opacity ${a}` } } } } }, // Follow code may reuse in other components [je(e, "slide-up"), je(e, "slide-down")] ]; }, la = (e) => { const { componentCls: t, tabsCardHorizontalPadding: a, tabsCardHeadBackground: i, tabsCardGutter: o, colorSplit: l } = e; return { [`${t}-card`]: { [`> ${t}-nav, > div > ${t}-nav`]: { [`${t}-tab`]: { margin: 0, padding: a, background: i, border: `${e.lineWidth}px ${e.lineType} ${l}`, transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}` }, [`${t}-tab-active`]: { color: e.colorPrimary, background: e.colorBgContainer }, [`${t}-ink-bar`]: { visibility: "hidden" } }, // ========================== Top & Bottom ========================== [`&${t}-top, &${t}-bottom`]: { [`> ${t}-nav, > div > ${t}-nav`]: { [`${t}-tab + ${t}-tab`]: { marginLeft: { _skip_check_: !0, value: `${o}px` } } } }, [`&${t}-top`]: { [`> ${t}-nav, > div > ${t}-nav`]: { [`${t}-tab`]: { borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0` }, [`${t}-tab-active`]: { borderBottomColor: e.colorBgContainer } } }, [`&${t}-bottom`]: { [`> ${t}-nav, > div > ${t}-nav`]: { [`${t}-tab`]: { borderRadius: `0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px` }, [`${t}-tab-active`]: { borderTopColor: e.colorBgContainer } } }, // ========================== Left & Right ========================== [`&${t}-left, &${t}-right`]: { [`> ${t}-nav, > div > ${t}-nav`]: { [`${t}-tab + ${t}-tab`]: { marginTop: `${o}px` } } }, [`&${t}-left`]: { [`> ${t}-nav, > div > ${t}-nav`]: { [`${t}-tab`]: { borderRadius: { _skip_check_: !0, value: `${e.borderRadiusLG}px 0 0 ${e.borderRadiusLG}px` } }, [`${t}-tab-active`]: { borderRightColor: { _skip_check_: !0, value: e.colorBgContainer } } } }, [`&${t}-right`]: { [`> ${t}-nav, > div > ${t}-nav`]: { [`${t}-tab`]: { borderRadius: { _skip_check_: !0, value: `0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px 0` } }, [`${t}-tab-active`]: { borderLeftColor: { _skip_check_: !0, value: e.colorBgContainer } } } } } }; }, ra = (e) => { const { componentCls: t, tabsHoverColor: a, dropdownEdgeChildVerticalPadding: i } = e; return { [`${t}-dropdown`]: T(T({}, tt(e)), { position: "absolute", top: -9999, left: { _skip_check_: !0, value: -9999 }, zIndex: e.zIndexPopup, display: "block", "&-hidden": { display: "none" }, [`${t}-dropdown-menu`]: { maxHeight: e.tabsDropdownHeight, margin: 0, padding: `${i}px 0`, overflowX: "hidden", overflowY: "auto", textAlign: { _skip_check_: !0, value: "left" }, listStyleType: "none", backgroundColor: e.colorBgContainer, backgroundClip: "padding-box", borderRadius: e.borderRadiusLG, outline: "none", boxShadow: e.boxShadowSecondary, "&-item": T(T({}, Ct), { display: "flex", alignItems: "center", minWidth: e.tabsDropdownWidth, margin: 0, padding: `${e.paddingXXS}px ${e.paddingSM}px`, color: e.colorText, fontWeight: "normal", fontSize: e.fontSize, lineHeight: e.lineHeight, cursor: "pointer", transition: `all ${e.motionDurationSlow}`, "> span": { flex: 1, whiteSpace: "nowrap" }, "&-remove": { flex: "none", marginLeft: { _skip_check_: !0, value: e.marginSM }, color: e.colorTextDescription, fontSize: e.fontSizeSM, background: "transparent", border: 0, cursor: "pointer", "&:hover": { color: a } }, "&:hover": { background: e.controlItemBgHover }, "&-disabled": { "&, &:hover": { color: e.colorTextDisabled, background: "transparent", cursor: "not-allowed" } } }) } }) }; }, sa = (e) => { const { componentCls: t, margin: a, colorSplit: i } = e; return { // ========================== Top & Bottom ========================== [`${t}-top, ${t}-bottom`]: { flexDirection: "column", [`> ${t}-nav, > div > ${t}-nav`]: { margin: `0 0 ${a}px 0`, "&::before": { position: "absolute", right: { _skip_check_: !0, value: 0 }, left: { _skip_check_: !0, value: 0 }, borderBottom: `${e.lineWidth}px ${e.lineType} ${i}`, content: "''" }, [`${t}-ink-bar`]: { height: e.lineWidthBold, "&-animated": { transition: `width ${e.motionDurationSlow}, left ${e.motionDurationSlow}, right ${e.motionDurationSlow}` } }, [`${t}-nav-wrap`]: { "&::before, &::after": { top: 0, bottom: 0, width: e.controlHeight }, "&::before": { left: { _skip_check_: !0, value: 0 }, boxShadow: e.boxShadowTabsOverflowLeft }, "&::after": { right: { _skip_check_: !0, value: 0 }, boxShadow: e.boxShadowTabsOverflowRight }, [`&${t}-nav-wrap-ping-left::before`]: { opacity: 1 }, [`&${t}-nav-wrap-ping-right::after`]: { opacity: 1 } } } }, [`${t}-top`]: { [`> ${t}-nav, > div > ${t}-nav`]: { "&::before": { bottom: 0 }, [`${t}-ink-bar`]: { bottom: 0 } } }, [`${t}-bottom`]: { [`> ${t}-nav, > div > ${t}-nav`]: { order: 1, marginTop: `${a}px`, marginBottom: 0, "&::before": { top: 0 }, [`${t}-ink-bar`]: { top: 0 } }, [`> ${t}-content-holder, > div > ${t}-content-holder`]: { order: 0 } }, // ========================== Left & Right ========================== [`${t}-left, ${t}-right`]: { [`> ${t}-nav, > div > ${t}-nav`]: { flexDirection: "column", minWidth: e.controlHeight * 1.25, // >>>>>>>>>>> Tab [`${t}-tab`]: { padding: `${e.paddingXS}px ${e.paddingLG}px`, textAlign: "center" }, [`${t}-tab + ${t}-tab`]: { margin: `${e.margin}px 0 0 0` }, // >>>>>>>>>>> Nav [`${t}-nav-wrap`]: { flexDirection: "column", "&::before, &::after": { right: { _skip_check_: !0, value: 0 }, left: { _skip_check_: !0, value: 0 }, height: e.controlHeight }, "&::before": { top: 0, boxShadow: e.boxShadowTabsOverflowTop }, "&::after": { bottom: 0, boxShadow: e.boxShadowTabsOverflowBottom }, [`&${t}-nav-wrap-ping-top::before`]: { opacity: 1 }, [`&${t}-nav-wrap-ping-bottom::after`]: { opacity: 1 } }, // >>>>>>>>>>> Ink Bar [`${t}-ink-bar`]: { width: e.lineWidthBold, "&-animated": { transition: `height ${e.motionDurationSlow}, top ${e.motionDurationSlow}` } }, [`${t}-nav-list, ${t}-nav-operations`]: { flex: "1 0 auto", flexDirection: "column" } } }, [`${t}-left`]: { [`> ${t}-nav, > div > ${t}-nav`]: { [`${t}-ink-bar`]: { right: { _skip_check_: !0, value: 0 } } }, [`> ${t}-content-holder, > div > ${t}-content-holder`]: { marginLeft: { _skip_check_: !0, value: `-${e.lineWidth}px` }, borderLeft: { _skip_check_: !0, value: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}` }, [`> ${t}-content > ${t}-tabpane`]: { paddingLeft: { _skip_check_: !0, value: e.paddingLG } } } }, [`${t}-right`]: { [`> ${t}-nav, > div > ${t}-nav`]: { order: 1, [`${t}-ink-bar`]: { left: { _skip_check_: !0, value: 0 } } }, [`> ${t}-content-holder, > div > ${t}-content-holder`]: { order: 0, marginRight: { _skip_check_: !0, value: -e.lineWidth }, borderRight: { _skip_check_: !0, value: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}` }, [`> ${t}-content > ${t}-tabpane`]: { paddingRight: { _skip_check_: !0, value: e.paddingLG } } } } }; }, da = (e) => { const { componentCls: t, padding: a } = e; return { [t]: { "&-small": { [`> ${t}-nav`]: { [`${t}-tab`]: { padding: `${e.paddingXS}px 0`, fontSize: e.fontSize } } }, "&-large": { [`> ${t}-nav`]: { [`${t}-tab`]: { padding: `${a}px 0`, fontSize: e.fontSizeLG } } } }, [`${t}-card`]: { [`&${t}-small`]: { [`> ${t}-nav`]: { [`${t}-tab`]: { padding: `${e.paddingXXS * 1.5}px ${a}px` } }, [`&${t}-bottom`]: { [`> ${t}-nav ${t}-tab`]: { borderRadius: `0 0 ${e.borderRadius}px ${e.borderRadius}px` } }, [`&${t}-top`]: { [`> ${t}-nav ${t}-tab`]: { borderRadius: `${e.borderRadius}px ${e.borderRadius}px 0 0` } }, [`&${t}-right`]: { [`> ${t}-nav ${t}-tab`]: { borderRadius: { _skip_check_: !0, value: `0 ${e.borderRadius}px ${e.borderRadius}px 0` } } }, [`&${t}-left`]: { [`> ${t}-nav ${t}-tab`]: { borderRadius: { _skip_check_: !0, value: `${e.borderRadius}px 0 0 ${e.borderRadius}px` } } } }, [`&${t}-large`]: { [`> ${t}-nav`]: { [`${t}-tab`]: { padding: `${e.paddingXS}px ${a}px ${e.paddingXXS * 1.5}px` } } } } }; }, ca = (e) => { const { componentCls: t, tabsActiveColor: a, tabsHoverColor: i, iconCls: o, tabsHorizontalGutter: l } = e, n = `${t}-tab`; return { [n]: { position: "relative", display: "inline-flex", alignItems: "center", padding: `${e.paddingSM}px 0`, fontSize: `${e.fontSize}px`, background: "transparent", border: 0, outline: "none", cursor: "pointer", "&-btn, &-remove": T({ "&:focus:not(:focus-visible), &:active": { color: a } }, at(e)), "&-btn": { outline: "none", transition: "all 0.3s" }, "&-remove": { flex: "none", marginRight: { _skip_check_: !0, value: -e.marginXXS }, marginLeft: { _skip_check_: !0, value: e.marginXS }, color: e.colorTextDescription, fontSize: e.fontSizeSM, background: "transparent", border: "none", outline: "none", cursor: "pointer", transition: `all ${e.motionDurationSlow}`, "&:hover": { color: e.colorTextHeading } }, "&:hover": { color: i }, [`&${n}-active ${n}-btn`]: { color: e.colorPrimary, textShadow: e.tabsActiveTextShadow }, [`&${n}-disabled`]: { color: e.colorTextDisabled, cursor: "not-allowed" }, [`&${n}-disabled ${n}-btn, &${n}-disabled ${t}-remove`]: { "&:focus, &:active": { color: e.colorTextDisabled } }, [`& ${n}-remove ${o}`]: { margin: 0 }, [o]: { marginRight: { _skip_check_: !0, value: e.marginSM } } }, [`${n} + ${n}`]: { margin: { _skip_check_: !0, value: `0 0 0 ${l}px` } } }; }, ua = (e) => { const { componentCls: t, tabsHorizontalGutter: a, iconCls: i, tabsCardGutter: o } = e; return { [`${t}-rtl`]: { direction: "rtl", [`${t}-nav`]: { [`${t}-tab`]: { margin: { _skip_check_: !0, value: `0 0 0 ${a}px` }, [`${t}-tab:last-of-type`]: { marginLeft: { _skip_check_: !0, value: 0 } }, [i]: { marginRight: { _skip_check_: !0, value: 0 }, marginLeft: { _skip_check_: !0, value: `${e.marginSM}px` } }, [`${t}-tab-remove`]: { marginRight: { _skip_check_: !0, value: `${e.marginXS}px` }, marginLeft: { _skip_check_: !0, value: `-${e.marginXXS}px` }, [i]: { margin: 0 } } } }, [`&${t}-left`]: { [`> ${t}-nav`]: { order: 1 }, [`> ${t}-content-holder`]: { order: 0 } }, [`&${t}-right`]: { [`> ${t}-nav`]: { order: 0 }, [`> ${t}-content-holder`]: { order: 1 } }, // ====================== Card ====================== [`&${t}-card${t}-top, &${t}-card${t}-bottom`]: { [`> ${t}-nav, > div > ${t}-nav`]: { [`${t}-tab + ${t}-tab`]: { marginRight: { _skip_check_: !0, value: `${o}px` }, marginLeft: { _skip_check_: !0, value: 0 } } } } }, [`${t}-dropdown-rtl`]: { direction: "rtl" }, [`${t}-menu-item`]: { [`${t}-dropdown-rtl`]: { textAlign: { _skip_check_: !0, value: "right" } } } }; }, va = (e) => { const { componentCls: t, tabsCardHorizontalPadding: a, tabsCardHeight: i, tabsCardGutter: o, tabsHoverColor: l, tabsActiveColor: n, colorSplit: s } = e; return { [t]: T(T(T(T({}, tt(e)), { display: "flex", // ========================== Navigation ========================== [`> ${t}-nav, > div > ${t}-nav`]: { position: "relative", display: "flex", flex: "none", alignItems: "center", [`${t}-nav-wrap`]: { position: "relative", display: "flex", flex: "auto", alignSelf: "stretch", overflow: "hidden", whiteSpace: "nowrap", transform: "translate(0)", // >>>>> Ping shadow "&::before, &::after": { position: "absolute", zIndex: 1, opacity: 0, transition: `opacity ${e.motionDurationSlow}`, content: "''", pointerEvents: "none" } }, [`${t}-nav-list`]: { position: "relative", display: "flex", transition: `opacity ${e.motionDurationSlow}` }, // >>>>>>>> Operations [`${t}-nav-operations`]: { display: "flex", alignSelf: "stretch" }, [`${t}-nav-operations-hidden`]: { position: "absolute", visibility: "hidden", pointerEvents: "none" }, [`${t}-nav-more`]: { position: "relative", padding: a, background: "transparent", border: 0, "&::after": { position: "absolute", right: { _skip_check_: !0, value: 0 }, bottom: 0, left: { _skip_check_: !0, value: 0 }, height: e.controlHeightLG / 8, transform: "translateY(100%)", content: "''" } }, [`${t}-nav-add`]: T({ minWidth: `${i}px`, marginLeft: { _skip_check_: !0, value: `${o}px` }, padding: `0 ${e.paddingXS}px`, background: "transparent", border: `${e.lineWidth}px ${e.lineType} ${s}`, borderRadius: `${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`, outline: "none", cursor: "pointer", color: e.colorText, transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`, "&:hover": { color: l }, "&:active, &:focus:not(:focus-visible)": { color: n } }, at(e)) }, [`${t}-extra-content`]: { flex: "none" }, // ============================ InkBar ============================ [`${t}-ink-bar`]: { position: "absolute", background: e.colorPrimary, pointerEvents: "none" } }), ca(e)), { // =========================== TabPanes =========================== [`${t}-content`]: { position: "relative", display: "flex", width: "100%", "&-animated": { transition: "margin 0.3s" } }, [`${t}-content-holder`]: { flex: "auto", minWidth: 0, minHeight: 0 }, [`${t}-tabpane`]: { outline: "none", flex: "none", width: "100%" } }), [`${t}-centered`]: { [`> ${t}-nav, > div > ${t}-nav`]: { [`${t}-nav-wrap`]: { [`&:not([class*='${t}-nav-wrap-ping'])`]: { justifyContent: "center" } } } } }; }, ba = _t("Tabs", (e) => { const t = e.controlHeightLG, a = St(e, { tabsHoverColor: e.colorPrimaryHover, tabsActiveColor: e.colorPrimaryActive, tabsCardHorizontalPadding: `${(t - Math.round(e.fontSize * e.lineHeight)) / 2 - e.lineWidth}px ${e.padding}px`, tabsCardHeight: t, tabsCardGutter: e.marginXXS / 2, tabsHorizontalGutter: 32, tabsCardHeadBackground: e.colorFillAlter, dropdownEdgeChildVerticalPadding: e.paddingXXS, tabsActiveTextShadow: "0 0 0.25px currentcolor", tabsDropdownHeight: 200, tabsDropdownWidth: 120 }); return [da(a), ua(a), sa(a), ra(a), la(a), va(a), ia(a)]; }, (e) => ({ zIndexPopup: e.zIndexPopupBase + 50 })); let et = 0; const ct = () => ({ prefixCls: { type: String }, id: { type: String }, popupClassName: String, getPopupContainer: j(), activeKey: { type: [String, Number] }, defaultActiveKey: { type: [String, Number] }, direction: xe(), animated: kt([Boolean, Object]), renderTabBar: j(), tabBarGutter: { type: Number }, tabBarStyle: me(), tabPosition: xe(), destroyInactiveTabPane: Dt(), hideAdd: Boolean, type: xe(), size: xe(), centered: Boolean, onEdit: j(), onChange: j(), onTabClick: j(), onTabScroll: j(), "onUpdate:activeKey": j(), // Accessibility locale: me(), onPrevClick: j(), onNextClick: j(), tabBarExtraContent: we.any }); function pa(e) { return e.map((t) => { if (Pt(t)) { const a = T({}, t.props || {}); for (const [h, c] of Object.entries(a)) delete a[h], a[Rt(h)] = c; const i = t.children || {}, o = t.key !== void 0 ? t.key : void 0, { tab: l = i.tab, disabled: n, forceRender: s, closable: v, animated: d, active: p, destroyInactiveTabPane: S } = a; return T(T({ key: o }, a), { node: t, closeIcon: i.closeIcon, tab: l, disabled: n === "" || n, forceRender: s === "" || s, closable: v === "" || v, animated: d === "" || d, active: p === "" || p, destroyInactiveTabPane: S === "" || S }); } return null; }).filter((t) => t); } const fa = ae({ compatConfig: { MODE: 3 }, name: "InternalTabs", inheritAttrs: !1, props: T(T({}, nt(ct(), { tabPosition: "top", animated: { inkBar: !0, tabPane: !1 } })), { tabs: At() }), slots: Object, // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'], setup(e, t) { let { attrs: a, slots: i } = t; De(e.onPrevClick === void 0 && e.onNextClick === void 0, "Tabs", "`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."), De(e.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."), De(i.tabBarExtraContent === void 0, "Tabs", "`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead."); const { prefixCls: o, direction: l, size: n, rootPrefixCls: s, getPopupContainer: v } = Et("tabs", e), [d, p] = ba(o), S = W(() => l.value === "rtl"), h = W(() => { const { animated: u, tabPosition: $ } = e; return u === !1 || ["left", "right"].includes($) ? { inkBar: !1, tabPane: !1 } : u === !0 ? { inkBar: !0, tabPane: !0 } : T({ inkBar: !0, tabPane: !1 }, typeof u == "object" ? u : {}); }), [c, y] = D(!1); Te(() => { y(It()); }); const [x, w] = Ve(() => { var u; return (u = e.tabs[0]) === null || u === void 0 ? void 0 : u.key; }, { value: W(() => e.activeKey), defaultValue: e.defaultActiveKey }), [C, k] = D(() => e.tabs.findIndex((u) => u.key === x.value)); Ce(() => { var u; let $ = e.tabs.findIndex((I) => I.key === x.value); $ === -1 && ($ = Math.max(0, Math.min(C.value, e.tabs.length - 1)), w((u = e.tabs[$]) === null || u === void 0 ? void 0 : u.key)), k($); }); const [K, M] = Ve(null, { value: W(() => e.id) }), r = W(() => c.value && !["left", "right"].includes(e.tabPosition) ? "top" : e.tabPosition); Te(() => { e.id || (M(`rc-tabs-${process.env.NODE_ENV === "test" ? "test" : et}`), et += 1); }); const m = (u, $) => { var I, R; (I = e.onTabClick) === null || I === void 0 || I.call(e, u, $); const G = u !== x.value; w(u), G && ((R = e.onChange) === null || R === void 0 || R.call(e, u)); }; return st({ tabs: W(() => e.tabs), prefixCls: o }), () => { const { id: u, type: $, tabBarGutter: I, tabBarStyle: R, locale: G, destroyInactiveTabPane: re, renderTabBar: se = i.renderTabBar, onTabScroll: ce, hideAdd: E, centered: Q } = e, N = { id: K.value, activeKey: x.value, animated: h.value, tabPosition: r.value, rtl: S.value, mobile: c.value }; let V; $ === "editable-card" && (V = { onEdit: (ve, be) => { let { key: pe, event: $e } = be; var de; (de = e.onEdit) === null || de === void 0 || de.call(e, ve === "add" ? $e : pe, ve); }, removeIcon: () => g(Lt, null, null), addIcon: i.addIcon ? i.addIcon : () => g(Bt, null, null), showAdd: E !== !0 }); let Y; const ue = T(T({}, N), { moreTransitionName: `${s.value}-slide-up`, editable: V, locale: G, tabBarGutter: I, onTabClick: m, onTabScroll: ce, style: R, getPopupContainer: v.value, popupClassName: le(e.popupClassName, p.value) }); se ? Y = se(T(T({}, ue), { DefaultTabBar: Qe })) : Y = g(Qe, ue, it(i, ["moreIcon", "leftExtra", "rightExtra", "tabBarExtraContent"])); const z = o.value; return d(g("div", te(te({}, a), {}, { id: u, class: le(z, `${z}-${r.value}`, { [p.value]: !0, [`${z}-${n.value}`]: n.value, [`${z}-card`]: ["card", "editable-card"].includes($), [`${z}-editable-card`]: $ === "editable-card", [`${z}-centered`]: Q, [`${z}-mobile`]: c.value, [`${z}-editable`]: $ === "editable-card", [`${z}-rtl`]: S.value }, a.class) }), [Y, g(oa, te(te({ destroyInactiveTabPane: re }, N), {}, { animated: h.value }), null)])); }; } }), Se = ae({ compatConfig: { MODE: 3 }, name: "ATabs", inheritAttrs: !1, props: nt(ct(), { tabPosition: "top", animated: { inkBar: !0, tabPane: !1 } }), slots: Object, // emits: ['tabClick', 'tabScroll', 'change', 'update:activeKey'], setup(e, t) { let { attrs: a, slots: i, emit: o } = t; const l = (n) => { o("update:activeKey", n), o("change", n); }; return () => { var n; const s = pa(Tt((n = i.default) === null || n === void 0 ? void 0 : n.call(i))); return g(fa, te(te(te({}, wt(e, ["onUpdate:activeKey"])), a), {}, { onChange: l, tabs: s }), i); }; } }), ha = () => ({ tab: we.any, disabled: { type: Boolean }, forceRender: { type: Boolean }, closable: { type: Boolean }, animated: { type: Boolean }, active: { type: Boolean }, destroyInactiveTabPane: { type: Boolean }, // Pass by TabPaneList prefixCls: { type: String }, tabKey: { type: [String, Number] }, id: { type: String } // closeIcon: PropTypes.any, }), ke = ae({ compatConfig: { MODE: 3 }, name: "ATabPane", inheritAttrs: !1, __ANT_TAB_PANE: !0, props: ha(), slots: Object, setup(e, t) { let { attrs: a, slots: i } = t; const o = J(e.forceRender); ie([() => e.active, () => e.destroyInactiveTabPane], () => { e.active ? o.value = !0 : e.destroyInactiveTabPane && (o.value = !1); }, { immediate: !0 }); const l = W(() => e.active ? {} : e.animated ? { visibility: "hidden", height: 0, overflowY: "hidden" } : { display: "none" }); return () => { var n; const { prefixCls: s, forceRender: v, id: d, active: p, tabKey: S } = e; return g("div", { id: d && `${d}-panel-${S}`, role: "tabpanel", tabindex: p ? 0 : -1, "aria-labelledby": d && `${d}-tab-${S}`, "aria-hidden": !p, style: [l.value, a.style], class: [`${s}-tabpane`, p && `${s}-tabpane-active`, a.class] }, [(p || o.value || v) && ((n = i.default) === null || n === void 0 ? void 0 : n.call(i))]); }; } }); Se.TabPane = ke; Se.install = function(e) { return e.component(Se.name, Se), e.component(ke.name, ke), e; }; export { Se as T, ke as _ };