|
|
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */function(e,t,n){"use strict";n.d(t,"a",(function(){return Ut}));var o=n("rePB"),a=n("ODXe"),r=n("Ff2n"),i=n("VTBJ"),c=n("q1tI"),s=n("TSYQ"),l=n.n(s),u=n("Zm9Q"),p=n("6cGi"),d=n("KQm4"),f=n("xEkU"),m=n.n(f),v=n("t23M");function h(e){var t=Object(c.useRef)(),n=Object(c.useRef)(!1);return Object(c.useEffect)((function(){return function(){n.current=!0,m.a.cancel(t.current)}}),[]),function(){for(var o=arguments.length,a=new Array(o),r=0;r<o;r++)a[r]=arguments[r];n.current||(m.a.cancel(t.current),t.current=m()((function(){e.apply(void 0,a)})))}}var b=n("4IlW");var y=c.forwardRef((function(e,t){var n,a=e.prefixCls,r=e.id,i=e.active,s=e.rtl,u=e.tab,p=u.key,d=u.tab,f=u.disabled,m=u.closeIcon,v=e.tabBarGutter,h=e.tabPosition,y=e.closable,g=e.renderWrapper,O=e.removeAriaLabel,j=e.editable,w=e.onClick,C=e.onRemove,E=e.onFocus,k="".concat(a,"-tab");c.useEffect((function(){return C}),[]);var x={};"top"===h||"bottom"===h?x[s?"marginLeft":"marginRight"]=v:x.marginBottom=v;var M=j&&!1!==y&&!f;function S(e){f||w(e)}var T=c.createElement("div",{key:p,ref:t,className:l()(k,(n={},Object(o.a)(n,"".concat(k,"-with-remove"),M),Object(o.a)(n,"".concat(k,"-active"),i),Object(o.a)(n,"".concat(k,"-disabled"),f),n)),style:x,onClick:S},c.createElement("div",{role:"tab","aria-selected":i,id:r&&"".concat(r,"-tab-").concat(p),className:"".concat(k,"-btn"),"aria-controls":r&&"".concat(r,"-panel-").concat(p),"aria-disabled":f,tabIndex:f?null:0,onClick:function(e){e.stopPropagation(),S(e)},onKeyDown:function(e){[b.a.SPACE,b.a.ENTER].includes(e.which)&&(e.preventDefault(),S(e))},onFocus:E},d),M&&c.createElement("button",{type:"button","aria-label":O||"remove",tabIndex:0,className:"".concat(k,"-remove"),onClick:function(e){var t;e.stopPropagation(),(t=e).preventDefault(),t.stopPropagation(),j.onEdit("remove",{key:p,event:t})}},m||j.removeIcon||"×"));return g&&(T=g(T)),T})),g={width:0,height:0,left:0,top:0};var O={width:0,height:0,left:0,top:0,right:0};var j=n("wx14"),w=n("1OyB"),C=n("vuIU"),E=n("JX7q"),k=n("Ji7U"),x=n("LK+K"),M=n("I8Z2"),S=n("bT9E"),T=n("2GS6"),N=n("Gytx"),D=n.n(N),I=n("U8pU"),P=/iPhone/i,_=/iPod/i,R=/iPad/i,A=/\bAndroid(?:.+)Mobile\b/i,K=/Android/i,L=/\bAndroid(?:.+)SD4930UR\b/i,z=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,H=/Windows Phone/i,V=/\bWindows(?:.+)ARM\b/i,F=/BlackBerry/i,W=/BB10/i,B=/Opera Mini/i,U=/\b(CriOS|Chrome)(?:.+)Mobile/i,q=/Mobile(?:.+)Firefox\b/i;function X(e,t){return e.test(t)}function Y(e){var t=e||("undefined"!=typeof navigator?navigator.userAgent:""),n=(t||"").split("[FBAN");if(void 0!==n[1]){var o=n;t=Object(a.a)(o,1)[0]}if(void 0!==(n=t.split("Twitter"))[1]){var r=n;t=Object(a.a)(r,1)[0]}var i={apple:{phone:X(P,t)&&!X(H,t),ipod:X(_,t),tablet:!X(P,t)&&X(R,t)&&!X(H,t),device:(X(P,t)||X(_,t)||X(R,t))&&!X(H,t)},amazon:{phone:X(L,t),tablet:!X(L,t)&&X(z,t),device:X(L,t)||X(z,t)},android:{phone:!X(H,t)&&X(L,t)||!X(H,t)&&X(A,t),tablet:!X(H,t)&&!X(L,t)&&!X(A,t)&&(X(z,t)||X(K,t)),device:!X(H,t)&&(X(L,t)||X(z,t)||X(A,t)||X(K,t))||X(/\bokhttp\b/i,t)},windows:{phone:X(H,t),tablet:X(V,t),device:X(H,t)||X(V,t)},other:{blackberry:X(F,t),blackberry10:X(W,t),opera:X(B,t),firefox:X(q,t),chrome:X(U,t),device:X(F,t)||X(W,t)||X(B,t)||X(q,t)||X(U,t)},any:null,phone:null,tablet:null};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var G=Object(i.a)(Object(i.a)({},Y()),{},{isMobile:Y});function J(){}function Q(e,t,n){var o=t||"";return e.key||"".concat(o,"item_").concat(n)}function Z(e){return"".concat(e,"-menu-")}function $(e,t){var n=-1;c.Children.forEach(e,(function(e){n+=1,e&&e.type&&e.type.isMenuItemGroup?c.Children.forEach(e.props.children,(function(e){t(e,n+=1)})):t(e,n)}))}var ee=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],te=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e&&"function"==typeof e.getBoundingClientRect&&e.getBoundingClientRect().width;if(n){if(t){var o=getComputedStyle(e),a=o.marginLeft,r=o.marginRight;n+=+a.replace("px","")+ +r.replace("px","")}n=+n.toFixed(6)}return n||0},ne=function(e,t,n){e&&"object"===Object(I.a)(e.style)&&(e.style[t]=n)},oe=n("bdgK"),ae=n("i8i4"),re=n.n(ae),ie=n("wgJM"),ce=n("l4aY"),se=n("m+aA"),le=n("c+Xe"),ue=n("zT1h"),pe=n("QC+M");function de(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var fe=n("MNnm");function me(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var ve,he,be,ye=(ve=Object(fe.a)(),he="undefined"!=typeof window?window:{},be={animationend:me("Animation","AnimationEnd"),transitionend:me("Transition","TransitionEnd")},ve&&("AnimationEvent"in he||delete be.animationend.animation,"TransitionEvent"in he||delete be.transitionend.transition),be),ge={};if(Object(fe.a)()){var Oe=document.createElement("div");ge=Oe.style}var je={};function we(e){if(je[e])return je[e];var t=ye[e];if(t)for(var n=Object.keys(t),o=n.length,a=0;a<o;a+=1){var r=n[a];if(Object.prototype.hasOwnProperty.call(t,r)&&r in ge)return je[e]=t[r],je[e]}return""}var Ce=we("animationend"),Ee=we("transitionend"),ke=!(!Ce||!Ee),xe=Ce||"animationend",Me=Ee||"transitionend";function Se(e,t){return e?"object"===Object(I.a)(e)?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(t):null}function Te(e){var t=Object(c.useRef)(!1),n=Object(c.useState)(e),o=Object(a.a)(n,2),r=o[0],i=o[1];return Object(c.useEffect)((function(){return function(){t.current=!0}}),[]),[r,function(e){t.current||i(e)}]}var Ne=Object(fe.a)()?c.useLayoutEffect:c.useEffect,De=["prepare","start","active","end"];function Ie(e){return"active"===e||"end"===e}var Pe=function(e,t){var n=c.useState("none"),o=Object(a.a)(n,2),r=o[0],i=o[1],s=function(){var e=c.useRef(null);function t(){ie.a.cancel(e.current)}return c.useEffect((function(){return function(){t()}}),[]),[function n(o){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var r=Object(ie.a)((function(){a<=1?o({isCanceled:function(){return r!==e.current}}):n(o,a-1)}));e.current=r},t]}(),l=Object(a.a)(s,2),u=l[0],p=l[1];return Ne((function(){if("none"!==r&&"end"!==r){var e=De.indexOf(r),n=De[e+1],o=t(r);!1===o?i(n):u((function(e){function t(){e.isCanceled()||i(n)}!0===o?t():Promise.resolve(o).then(t)}))}}),[e,r]),c.useEffect((function(){return function(){p()}}),[]),[function(){i("prepare")},r]};function _e(e,t,n,r){var s=r.motionEnter,l=void 0===s||s,u=r.motionAppear,p=void 0===u||u,d=r.motionLeave,f=void 0===d||d,m=r.motionDeadline,v=r.motionLeaveImmediately,h=r.onAppearPrepare,b=r.onEnterPrepare,y=r.onLeavePrepare,g=r.onAppearStart,O=r.onEnterStart,j=r.onLeaveStart,w=r.onAppearActive,C=r.onEnterActive,E=r.onLeaveActive,k=r.onAppearEnd,x=r.onEnterEnd,M=r.onLeaveEnd,S=r.onVisibleChanged,T=Te(),N=Object(a.a)(T,2),D=N[0],I=N[1],P=Te("none"),_=Object(a.a)(P,2),R=_[0],A=_[1],K=Te(null),L=Object(a.a)(K,2),z=L[0],H=L[1],V=Object(c.useRef)(!1),F=Object(c.useRef)(null),W=Object(c.useRef)(!1),B=Object(c.useRef)(null);function U(){return n()||B.current}var q=Object(c.useRef)(!1);function X(e){var t,n=U();e&&!e.deadline&&e.target!==n||("appear"===R&&q.current?t=null==k?void 0:k(n,e):"enter"===R&&q.current?t=null==x?void 0:x(n,e):"leave"===R&&q.current&&(t=null==M?void 0:M(n,e)),!1===t||W.current||(A("none"),H(null)))}var Y=function(e){var t=Object(c.useRef)(),n=Object(c.useRef)(e);n.current=e;var o=c.useCallback((function(e){n.current(e)}),[]);function a(e){e&&(e.removeEventListener(Me,o),e.removeEventListener(xe,o))}return c.useEffect((function(){return function(){a(t.current)}}),[]),[function(e){t.current&&t.current!==e&&a(t.current),e&&e!==t.current&&(e.addEventListener(Me,o),e.addEventListener(xe,o),t.current=e)},a]}(X),G=Object(a.a)(Y,1)[0],J=c.useMemo((function(){var e,t,n;switch(R){case"appear":return e={},Object(o.a)(e,"prepare",h),Object(o.a)(e,"start",g),Object(o.a)(e,"active",w),e;case"enter":return t={},Object(o.a)(t,"prepare",b),Object(o.a)(t,"start",O),Object(o.a)(t,"active",C),t;case"leave":return n={},Object(o.a)(n,"prepare",y),Object(o.a)(n,"start",j),Object(o.a)(n,"active",E),n;default:return{}}}),[R]),Q=Pe(R,(function(e){if("prepare"===e){var t=J.prepare;return!!t&&t(U())}var n;ee in J&&H((null===(n=J[ee])||void 0===n?void 0:n.call(J,U(),null))||null);return"active"===ee&&(G(U()),m>0&&(clearTimeout(F.current),F.current=setTimeout((function(){X({deadline:!0})}),m))),!0})),Z=Object(a.a)(Q,2),$=Z[0],ee=Z[1],te=Ie(ee);q.current=te,Ne((function(){I(t);var n,o=V.current;(V.current=!0,e)&&(!o&&t&&p&&(n="appear"),o&&t&&l&&(n="enter"),(o&&!t&&f||!o&&v&&!t&&f)&&(n="leave"),n&&(A(n),$()))}),[t]),Object(c.useEffect)((function(){("appear"===R&&!p||"enter"===R&&!l||"leave"===R&&!f)&&A("none")}),[p,l,f]),Object(c.useEffect)((function(){return function(){clearTimeout(F.current),W.current=!0}}),[]),Object(c.useEffect)((function(){void 0!==D&&"none"===R&&(null==S||S(D))}),[D,R]);var ne=z;return J.prepare&&"start"===ee&&(ne=Object(i.a)({transition:"none"},ne)),[R,ee,ne,null!=D?D:t]}var Re=function(e){Object(k.a)(n,e);var t=Object(x.a)(n);function n(){return Object(w.a)(this,n),t.apply(this,arguments)}return Object(C.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(c.Component);var Ae=function(e){var t=e;function n(e){return!(!e.motionName||!t)}"object"===Object(I.a)(e)&&(t=e.transitionSupport);var r=c.forwardRef((function(e,t){var r=e.visible,s=void 0===r||r,u=e.removeOnLeave,p=void 0===u||u,d=e.forceRender,f=e.children,m=e.motionName,v=e.leavedClassName,h=e.eventProps,b=n(e),y=Object(c.useRef)(),g=Object(c.useRef)();var O=_e(b,s,(function(){try{return Object(se.a)(y.current||g.current)}catch(e){return null}}),e),j=Object(a.a)(O,4),w=j[0],C=j[1],E=j[2],k=j[3],x=c.useRef(k);k&&(x.current=!0);var M=Object(c.useRef)(t);M.current=t;var S,T=c.useCallback((function(e){y.current=e,Object(le.b)(M.current,e)}),[]),N=Object(i.a)(Object(i.a)({},h),{},{visible:s});if(f)if("none"!==w&&n(e)){var D,I;"prepare"===C?I="prepare":Ie(C)?I="active":"start"===C&&(I="start"),S=f(Object(i.a)(Object(i.a)({},N),{},{className:l()(Se(m,w),(D={},Object(o.a)(D,Se(m,"".concat(w,"-").concat(I)),I),Object(o.a)(D,m,"string"==typeof m),D)),style:E}),T)}else S=k?f(Object(i.a)({},N),T):!p&&x.current?f(Object(i.a)(Object(i.a)({},N),{},{className:v}),T):d?f(Object(i.a)(Object(i.a)({},N),{},{style:{display:"none"}}),T):null;else S=null;return c.createElement(Re,{ref:g},S)}));return r.displayName="CSSMotion",r}(ke);function Ke(e){var t;return t=e&&"object"===Object(I.a)(e)&&"key"in e?e:{key:e},Object(i.a)(Object(i.a)({},t),{},{key:String(t.key)})}function Le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(Ke)}function ze(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],o=0,a=t.length,r=Le(e),c=Le(t);r.forEach((function(e){for(var t=!1,r=o;r<a;r+=1){var s=c[r];if(s.key===e.key){o<r&&(n=n.concat(c.slice(o,r).map((function(e){return Object(i.a)(Object(i.a)({},e),{},{status:"add"})}))),o=r),n.push(Object(i.a)(Object(i.a)({},s),{},{status:"keep"})),o+=1,t=!0;break}}t||n.push(Object(i.a)(Object(i.a)({},e),{},{status:"remove"}))})),o<a&&(n=n.concat(c.slice(o).map((function(e){return Object(i.a)(Object(i.a)({},e),{},{status:"add"})}))));var s={};n.forEach((function(e){var t=e.key;s[t]=(s[t]||0)+1}));var l=Object.keys(s).filter((function(e){return s[e]>1}));return l.forEach((function(e){(n=n.filter((function(t){var n=t.key,o=t.status;return n!==e||"remove"!==o}))).forEach((function(t){t.key===e&&(t.status="keep")}))})),n}var He=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ae,n=function(e){Object(k.a)(o,e);var n=Object(x.a)(o);function o(){var e;return Object(w.a)(this,o),(e=n.apply(this,arguments)).state={keyEntities:[]},e.removeKey=function(t){e.setState((function(e){return{keyEntities:e.keyEntities.map((function(e){return e.key!==t?e:Object(i.a)(Object(i.a)({},e),{},{status:"removed"})}))}}))},e}return Object(C.a)(o,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,o=this.props,a=o.component,i=o.children,s=o.onVisibleChanged,l=Object(r.a)(o,["component","children","onVisibleChanged"]),u=a||c.Fragment,p={};return He.forEach((function(e){p[e]=l[e],delete l[e]})),delete l.keys,c.createElement(u,l,n.map((function(n){var o=n.status,a=Object(r.a)(n,["status"]),l="add"===o||"keep"===o;return c.createElement(t,Object(j.a)({},p,{key:a.key,visible:l,eventProps:a,onVisibleChanged:function(t){null==s||s(t,{key:a.key}),t||e.removeKey(a.key)}}),i)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,o=t.keyEntities,a=Le(n);return{keyEntities:ze(o,a).filter((function(e){var t=o.find((function(t){var n=t.key;return e.key===n}));return!t||"removed"!==t.status||"remove"!==e.status}))}}}]),o}(c.Component);n.defaultProps={component:"div"}}(ke);var Ve=Ae;function Fe(e){var t=e.prefixCls,n=e.motion,o=e.animation,a=e.transitionName;return n||(o?{motionName:"".concat(t,"-").concat(o)}:a?{motionName:a}:null)}function We(e){var t=e.prefixCls,n=e.visible,o=e.zIndex,a=e.mask,r=e.maskMotion,s=e.maskAnimation,u=e.maskTransitionName;if(!a)return null;var p={};return(r||u||s)&&(p=Object(i.a)({motionAppear:!0},Fe({motion:r,prefixCls:t,transitionName:u,animation:s}))),c.createElement(Ve,Object(j.a)({},p,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return c.createElement("div",{style:{zIndex:o},className:l()("".concat(t,"-mask"),n)})}))}var Be=n("9mu1"),Ue=n("o0o1"),qe=n.n(Ue),Xe=n("HaE+"),Ye=["measure","align",null,"motion"],Ge=c.forwardRef((function(e,t){var n=e.visible,o=e.prefixCls,r=e.className,s=e.style,u=e.children,p=e.zIndex,d=e.stretch,f=e.destroyPopupOnHide,m=e.forceRender,v=e.align,h=e.point,b=e.getRootDomNode,y=e.getClassNameFromAlign,g=e.onAlign,O=e.onMouseEnter,w=e.onMouseLeave,C=e.onMouseDown,E=e.onTouchStart,k=Object(c.useRef)(),x=Object(c.useRef)(),M=Object(c.useState)(),S=Object(a.a)(M,2),T=S[0],N=S[1],D=function(e){var t=c.useState({width:0,height:0}),n=Object(a.a)(t,2),o=n[0],r=n[1];return[c.useMemo((function(){var t={};if(e){var n=o.width,a=o.height;-1!==e.indexOf("height")&&a?t.height=a:-1!==e.indexOf("minHeight")&&a&&(t.minHeight=a),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,o]),function(e){r({width:e.offsetWidth,height:e.offsetHeight})}]}(d),I=Object(a.a)(D,2),P=I[0],_=I[1];var R=function(e,t){var n=Object(c.useState)(null),o=Object(a.a)(n,2),r=o[0],i=o[1],s=Object(c.useRef)(),l=Object(c.useRef)(!1);function u(e){l.current||i(e)}function p(){ie.a.cancel(s.current)}return Object(c.useEffect)((function(){u("measure")}),[e]),Object(c.useEffect)((function(){switch(r){case"measure":t()}r&&(s.current=Object(ie.a)(Object(Xe.a)(qe.a.mark((function e(){var t,n;return qe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Ye.indexOf(r),(n=Ye[t+1])&&-1!==t&&u(n);case 3:case"end":return e.stop()}}),e)})))))}),[r]),Object(c.useEffect)((function(){return function(){l.current=!0,p()}}),[]),[r,function(e){p(),s.current=Object(ie.a)((function(){u((function(e){switch(r){case"align":return"motion";case"motion":return"stable"}return e})),null==e||e()}))}]}(n,(function(){d&&_(b())})),A=Object(a.a)(R,2),K=A[0],L=A[1],z=Object(c.useRef)();function H(){var e;null===(e=k.current)||void 0===e||e.forceAlign()}function V(e,t){var n=y(t);T!==n&&N(n),"align"===K&&(T!==n?Promise.resolve().then((function(){H()})):L((function(){var e;null===(e=z.current)||void 0===e||e.call(z)})),null==g||g(e,t))}var F=Object(i.a)({},Fe(e));function W(){return new Promise((function(e){z.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=F[e];F[e]=function(e,n){return L(),null==t?void 0:t(e,n)}})),c.useEffect((function(){F.motionName||"motion"!==K||L()}),[F.motionName,K]),c.useImperativeHandle(t,(function(){return{forceAlign:H,getElement:function(){return x.current}}}));var B=Object(i.a)(Object(i.a)({},P),{},{zIndex:p,opacity:"motion"!==K&&"stable"!==K&&n?0:void 0,pointerEvents:"stable"===K?void 0:"none"},s),U=!0;!(null==v?void 0:v.points)||"align"!==K&&"stable"!==K||(U=!1);var q=u;return c.Children.count(u)>1&&(q=c.createElement("div",{className:"".concat(o,"-content")},u)),c.createElement(Ve,Object(j.a)({visible:n,ref:x,leavedClassName:"".concat(o,"-hidden")},F,{onAppearPrepare:W,onEnterPrepare:W,removeOnLeave:f,forceRender:m}),(function(e,t){var n=e.className,a=e.style,s=l()(o,r,T,n);return c.createElement(Be.a,{target:h||b,key:"popup",ref:k,monitorWindowResize:!0,disabled:U,align:v,onAlign:V},c.createElement("div",{ref:t,className:s,onMouseEnter:O,onMouseLeave:w,onMouseDownCapture:C,onTouchStartCapture:E,style:Object(i.a)(Object(i.a)({},a),B)},q))}))}));Ge.displayName="PopupInner";var Je=Ge,Qe=c.forwardRef((function(e,t){var n=e.prefixCls,o=e.visible,a=e.zIndex,r=e.children,s=e.mobile,u=(s=void 0===s?{}:s).popupClassName,p=s.popupStyle,d=s.popupMotion,f=void 0===d?{}:d,m=s.popupRender,v=c.useRef();c.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return v.current}}}));var h=Object(i.a)({zIndex:a},p),b=r;return c.Children.count(r)>1&&(b=c.createElement("div",{className:"".concat(n,"-content")},r)),m&&(b=m(b)),c.createElement(Ve,Object(j.a)({visible:o,ref:v,removeOnLeave:!0},f),(function(e,t){var o=e.className,a=e.style,r=l()(n,u,o);return c.createElement("div",{ref:t,className:r,style:Object(i.a)(Object(i.a)({},a),h)},b)}))}));Qe.displayName="MobilePopupInner";var Ze=Qe,$e=["visible","mobile"],et=c.forwardRef((function(e,t){var n=e.visible,o=e.mobile,s=Object(r.a)(e,$e),l=Object(c.useState)(n),u=Object(a.a)(l,2),p=u[0],d=u[1],f=Object(c.useState)(!1),m=Object(a.a)(f,2),v=m[0],h=m[1],b=Object(i.a)(Object(i.a)({},s),{},{visible:p});Object(c.useEffect)((function(){d(n),n&&o&&h(function(){if("undefined"==typeof navigator||"undefined"==typeof window)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(null==e?void 0:e.substr(0,4)))}())}),[n,o]);var y=v?c.createElement(Ze,Object(j.a)({},b,{mobile:o,ref:t})):c.createElement(Je,Object(j.a)({},b,{ref:t}));return c.createElement("div",null,c.createElement(We,b),y)}));et.displayName="Popup";var tt=et,nt=c.createContext(null);function ot(){}function at(){return""}function rt(e){return e?e.ownerDocument:window.document}var it=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];var ct,st,lt=(ct=pe.a,(st=function(e){Object(k.a)(n,e);var t=Object(x.a)(n);function n(e){var o,a;return Object(w.a)(this,n),(o=t.call(this,e)).popupRef=c.createRef(),o.triggerRef=c.createRef(),o.attachId=void 0,o.clickOutsideHandler=void 0,o.touchOutsideHandler=void 0,o.contextMenuOutsideHandler1=void 0,o.contextMenuOutsideHandler2=void 0,o.mouseDownTimeout=void 0,o.focusTime=void 0,o.preClickTime=void 0,o.preTouchTime=void 0,o.delayTimer=void 0,o.hasPopupMouseDown=void 0,o.onMouseEnter=function(e){var t=o.props.mouseEnterDelay;o.fireEvents("onMouseEnter",e),o.delaySetPopupVisible(!0,t,t?null:e)},o.onMouseMove=function(e){o.fireEvents("onMouseMove",e),o.setPoint(e)},o.onMouseLeave=function(e){o.fireEvents("onMouseLeave",e),o.delaySetPopupVisible(!1,o.props.mouseLeaveDelay)},o.onPopupMouseEnter=function(){o.clearDelayTimer()},o.onPopupMouseLeave=function(e){var t;e.relatedTarget&&!e.relatedTarget.setTimeout&&Object(ce.a)(null===(t=o.popupRef.current)||void 0===t?void 0:t.getElement(),e.relatedTarget)||o.delaySetPopupVisible(!1,o.props.mouseLeaveDelay)},o.onFocus=function(e){o.fireEvents("onFocus",e),o.clearDelayTimer(),o.isFocusToShow()&&(o.focusTime=Date.now(),o.delaySetPopupVisible(!0,o.props.focusDelay))},o.onMouseDown=function(e){o.fireEvents("onMouseDown",e),o.preClickTime=Date.now()},o.onTouchStart=function(e){o.fireEvents("onTouchStart",e),o.preTouchTime=Date.now()},o.onBlur=function(e){o.fireEvents("onBlur",e),o.clearDelayTimer(),o.isBlurToHide()&&o.delaySetPopupVisible(!1,o.props.blurDelay)},o.onContextMenu=function(e){e.preventDefault(),o.fireEvents("onContextMenu",e),o.setPopupVisible(!0,e)},o.onContextMenuClose=function(){o.isContextMenuToShow()&&o.close()},o.onClick=function(e){if(o.fireEvents("onClick",e),o.focusTime){var t;if(o.preClickTime&&o.preTouchTime?t=Math.min(o.preClickTime,o.preTouchTime):o.preClickTime?t=o.preClickTime:o.preTouchTime&&(t=o.preTouchTime),Math.abs(t-o.focusTime)<20)return;o.focusTime=0}o.preClickTime=0,o.preTouchTime=0,o.isClickToShow()&&(o.isClickToHide()||o.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var n=!o.state.popupVisible;(o.isClickToHide()&&!n||n&&o.isClickToShow())&&o.setPopupVisible(!o.state.popupVisible,e)},o.onPopupMouseDown=function(){var e;o.hasPopupMouseDown=!0,clearTimeout(o.mouseDownTimeout),o.mouseDownTimeout=window.setTimeout((function(){o.hasPopupMouseDown=!1}),0),o.context&&(e=o.context).onPopupMouseDown.apply(e,arguments)},o.onDocumentClick=function(e){if(!o.props.mask||o.props.maskClosable){var t=e.target,n=o.getRootDomNode(),a=o.getPopupDomNode();Object(ce.a)(n,t)&&!o.isContextMenuOnly()||Object(ce.a)(a,t)||o.hasPopupMouseDown||o.close()}},o.getRootDomNode=function(){var e=o.props.getTriggerDOMNode;if(e)return e(o.triggerRef.current);try{var t=Object(se.a)(o.triggerRef.current);if(t)return t}catch(e){}return re.a.findDOMNode(Object(E.a)(o))},o.getPopupClassNameFromAlign=function(e){var t=[],n=o.props,a=n.popupPlacement,r=n.builtinPlacements,i=n.prefixCls,c=n.alignPoint,s=n.getPopupClassNameFromAlign;return a&&r&&t.push(function(e,t,n,o){for(var a=n.points,r=Object.keys(e),i=0;i<r.length;i+=1){var c=r[i];if(de(e[c].points,a,o))return"".concat(t,"-placement-").concat(c)}return""}(r,i,e,c)),s&&t.push(s(e)),t.join(" ")},o.getComponent=function(){var e=o.props,t=e.prefixCls,n=e.destroyPopupOnHide,a=e.popupClassName,r=e.onPopupAlign,i=e.popupMotion,s=e.popupAnimation,l=e.popupTransitionName,u=e.popupStyle,p=e.mask,d=e.maskAnimation,f=e.maskTransitionName,m=e.maskMotion,v=e.zIndex,h=e.popup,b=e.stretch,y=e.alignPoint,g=e.mobile,O=e.forceRender,w=o.state,C=w.popupVisible,E=w.point,k=o.getPopupAlign(),x={};return o.isMouseEnterToShow()&&(x.onMouseEnter=o.onPopupMouseEnter),o.isMouseLeaveToHide()&&(x.onMouseLeave=o.onPopupMouseLeave),x.onMouseDown=o.onPopupMouseDown,x.onTouchStart=o.onPopupMouseDown,c.createElement(tt,Object(j.a)({prefixCls:t,destroyPopupOnHide:n,visible:C,point:y&&E,className:a,align:k,onAlign:r,animation:s,getClassNameFromAlign:o.getPopupClassNameFromAlign},x,{stretch:b,getRootDomNode:o.getRootDomNode,style:u,mask:p,zIndex:v,transitionName:l,maskAnimation:d,maskTransitionName:f,maskMotion:m,ref:o.popupRef,motion:i,mobile:g,forceRender:O}),"function"==typeof h?h():h)},o.attachParent=function(e){ie.a.cancel(o.attachId);var t,n=o.props,a=n.getPopupContainer,r=n.getDocument,i=o.getRootDomNode();a?(i||0===a.length)&&(t=a(i)):t=r(o.getRootDomNode()).body,t?t.appendChild(e):o.attachId=Object(ie.a)((function(){o.attachParent(e)}))},o.getContainer=function(){var e=(0,o.props.getDocument)(o.getRootDomNode()).createElement("div");return e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",o.attachParent(e),e},o.setPoint=function(e){o.props.alignPoint&&e&&o.setState({point:{pageX:e.pageX,pageY:e.pageY}})},o.handlePortalUpdate=function(){o.state.prevPopupVisible!==o.state.popupVisible&&o.props.afterPopupVisibleChange(o.state.popupVisible)},o.triggerContextValue={onPopupMouseDown:o.onPopupMouseDown},a="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,o.state={prevPopupVisible:a,popupVisible:a},it.forEach((function(e){o["fire".concat(e)]=function(t){o.fireEvents(e,t)}})),o}return Object(C.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(ue.a)(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(ue.a)(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(ue.a)(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(ue.a)(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),ie.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var e;return(null===(e=this.popupRef.current)||void 0===e?void 0:e.getElement())||null}},{key:"getPopupAlign",value:function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,o=e.builtinPlacements;return t&&o?function(e,t,n){var o=e[t]||{};return Object(i.a)(Object(i.a)({},o),n)}(o,t,n):n}},{key:"setPopupVisible",value:function(e,t){var n=this.props.alignPoint,o=this.state.popupVisible;this.clearDelayTimer(),o!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:o}),this.props.onPopupVisibleChange(e)),n&&t&&e&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,n){var o=this,a=1e3*t;if(this.clearDelayTimer(),a){var r=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){o.setPopupVisible(e,r),o.clearDelayTimer()}),a)}else this.setPopupVisible(e,n)}},{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(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire".concat(e)]:t[e]||n[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuOnly",value:function(){var e=this.props.action;return"contextMenu"===e||1===e.length&&"contextMenu"===e[0]}},{key:"isContextMenuToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var e;this.state.popupVisible&&(null===(e=this.popupRef.current)||void 0===e||e.forceAlign())}},{key:"fireEvents",value:function(e,t){var n=this.props.children.props[e];n&&n(t);var o=this.props[e];o&&o(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var e=this.state.popupVisible,t=this.props,n=t.children,o=t.forceRender,a=t.alignPoint,r=t.className,s=t.autoDestroy,u=c.Children.only(n),p={key:"trigger"};this.isContextMenuToShow()?p.onContextMenu=this.onContextMenu:p.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(p.onClick=this.onClick,p.onMouseDown=this.onMouseDown,p.onTouchStart=this.onTouchStart):(p.onClick=this.createTwoChains("onClick"),p.onMouseDown=this.createTwoChains("onMouseDown"),p.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(p.onMouseEnter=this.onMouseEnter,a&&(p.onMouseMove=this.onMouseMove)):p.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?p.onMouseLeave=this.onMouseLeave:p.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(p.onFocus=this.onFocus,p.onBlur=this.onBlur):(p.onFocus=this.createTwoChains("onFocus"),p.onBlur=this.createTwoChains("onBlur"));var d=l()(u&&u.props&&u.props.className,r);d&&(p.className=d);var f=Object(i.a)({},p);Object(le.c)(u)&&(f.ref=Object(le.a)(this.triggerRef,u.ref));var m,v=c.cloneElement(u,f);return(e||this.popupRef.current||o)&&(m=c.createElement(ct,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!e&&s&&(m=null),c.createElement(nt.Provider,{value:this.triggerContextValue},v,m)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.popupVisible,o={};return void 0!==n&&t.popupVisible!==n&&(o.popupVisible=n,o.prevPopupVisible=t.popupVisible),o}}]),n}(c.Component)).contextType=nt,st.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:at,getDocument:rt,onPopupVisibleChange:ot,afterPopupVisibleChange:ot,onPopupAlign:ot,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},st),ut={adjustX:1,adjustY:1},pt={topLeft:{points:["bl","tl"],overflow:ut,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ut,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ut,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ut,offset:[4,0]}},dt={topLeft:{points:["bl","tl"],overflow:ut,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ut,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ut,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ut,offset:[4,0]}},ft=0,mt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},vt=function(e,t,n){var a=Z(t),r=e.getState();e.setState({defaultActiveFirst:Object(i.a)(Object(i.a)({},r.defaultActiveFirst),{},Object(o.a)({},a,n))})},ht=function(e){Object(k.a)(n,e);var t=Object(x.a)(n);function n(e){var o;Object(w.a)(this,n),(o=t.call(this,e)).onDestroy=function(e){o.props.onDestroy(e)},o.onKeyDown=function(e){var t=e.keyCode,n=o.menuInstance,a=o.props.store,r=o.getVisible();if(t===b.a.ENTER)return o.onTitleClick(e),vt(a,o.props.eventKey,!0),!0;if(t===b.a.RIGHT)return r?n.onKeyDown(e):(o.triggerOpenChange(!0),vt(a,o.props.eventKey,!0)),!0;if(t===b.a.LEFT){var i;if(!r)return;return(i=n.onKeyDown(e))||(o.triggerOpenChange(!1),i=!0),i}return!r||t!==b.a.UP&&t!==b.a.DOWN?void 0:n.onKeyDown(e)},o.onOpenChange=function(e){o.props.onOpenChange(e)},o.onPopupVisibleChange=function(e){o.triggerOpenChange(e,e?"mouseenter":"mouseleave")},o.onMouseEnter=function(e){var t=o.props,n=t.eventKey,a=t.onMouseEnter,r=t.store;vt(r,o.props.eventKey,!1),a({key:n,domEvent:e})},o.onMouseLeave=function(e){var t=o.props,n=t.parentMenu,a=t.eventKey,r=t.onMouseLeave;n.subMenuInstance=Object(E.a)(o),r({key:a,domEvent:e})},o.onTitleMouseEnter=function(e){var t=o.props,n=t.eventKey,a=t.onItemHover,r=t.onTitleMouseEnter;a({key:n,hover:!0}),r({key:n,domEvent:e})},o.onTitleMouseLeave=function(e){var t=o.props,n=t.parentMenu,a=t.eventKey,r=t.onItemHover,i=t.onTitleMouseLeave;n.subMenuInstance=Object(E.a)(o),r({key:a,hover:!1}),i({key:a,domEvent:e})},o.onTitleClick=function(e){var t=Object(E.a)(o).props;t.onTitleClick({key:t.eventKey,domEvent:e}),"hover"!==t.triggerSubMenuAction&&(o.triggerOpenChange(!o.getVisible(),"click"),vt(t.store,o.props.eventKey,!1))},o.onSubMenuClick=function(e){"function"==typeof o.props.onClick&&o.props.onClick(o.addKeyPath(e))},o.onSelect=function(e){o.props.onSelect(e)},o.onDeselect=function(e){o.props.onDeselect(e)},o.getPrefixCls=function(){return"".concat(o.props.rootPrefixCls,"-submenu")},o.getActiveClassName=function(){return"".concat(o.getPrefixCls(),"-active")},o.getDisabledClassName=function(){return"".concat(o.getPrefixCls(),"-disabled")},o.getSelectedClassName=function(){return"".concat(o.getPrefixCls(),"-selected")},o.getOpenClassName=function(){return"".concat(o.props.rootPrefixCls,"-submenu-open")},o.getVisible=function(){return o.state.isOpen},o.getMode=function(){return o.state.mode},o.saveMenuInstance=function(e){o.menuInstance=e},o.addKeyPath=function(e){return Object(i.a)(Object(i.a)({},e),{},{keyPath:(e.keyPath||[]).concat(o.props.eventKey)})},o.triggerOpenChange=function(e,t){var n=o.props.eventKey,a=function(){o.onOpenChange({key:n,item:Object(E.a)(o),trigger:t,open:e})};"mouseenter"===t?o.mouseenterTimeout=setTimeout((function(){a()}),0):a()},o.isChildrenSelected=function(){var e={find:!1};return function e(t,n,o){t&&!o.find&&c.Children.forEach(t,(function(t){if(t){var a=t.type;if(!a||!(a.isSubMenu||a.isMenuItem||a.isMenuItemGroup))return;-1!==n.indexOf(t.key)?o.find=!0:t.props.children&&e(t.props.children,n,o)}}))}(o.props.children,o.props.selectedKeys,e),e.find},o.isInlineMode=function(){return"inline"===o.getMode()},o.adjustWidth=function(){if(o.subMenuTitle&&o.menuInstance){var e=ae.findDOMNode(o.menuInstance);e.offsetWidth>=o.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(o.subMenuTitle.offsetWidth,"px"))}},o.saveSubMenuTitle=function(e){o.subMenuTitle=e},o.getBaseProps=function(){var e=Object(E.a)(o).props,t=o.getMode();return{mode:"horizontal"===t?"vertical":t,visible:o.getVisible(),level:e.level+1,inlineIndent:e.inlineIndent,focusable:!1,onClick:o.onSubMenuClick,onSelect:o.onSelect,onDeselect:o.onDeselect,onDestroy:o.onDestroy,selectedKeys:e.selectedKeys,eventKey:"".concat(e.eventKey,"-menu-"),openKeys:e.openKeys,motion:e.motion,onOpenChange:o.onOpenChange,subMenuOpenDelay:e.subMenuOpenDelay,parentMenu:Object(E.a)(o),subMenuCloseDelay:e.subMenuCloseDelay,forceSubMenuRender:e.forceSubMenuRender,triggerSubMenuAction:e.triggerSubMenuAction,builtinPlacements:e.builtinPlacements,defaultActiveFirst:e.store.getState().defaultActiveFirst[Z(e.eventKey)],multiple:e.multiple,prefixCls:e.rootPrefixCls,id:o.internalMenuId,manualRef:o.saveMenuInstance,itemIcon:e.itemIcon,expandIcon:e.expandIcon,direction:e.direction}},o.getMotion=function(e,t){var n=Object(E.a)(o).haveRendered,a=o.props,r=a.motion,c=a.rootPrefixCls;return Object(i.a)(Object(i.a)({},r),{},{leavedClassName:"".concat(c,"-hidden"),removeOnLeave:!1,motionAppear:n||!t||"inline"!==e})};var a=e.store,r=e.eventKey,s=a.getState().defaultActiveFirst;o.isRootMenu=!1;var l=!1;return s&&(l=s[r]),vt(a,r,l),o.state={mode:e.mode,isOpen:e.isOpen},o}return Object(C.a)(n,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,o=t.parentMenu,a=t.manualRef,r=t.isOpen,i=function(){e.setState({mode:n,isOpen:r})},c=r!==this.state.isOpen,s=n!==this.state.mode;(s||c)&&(ie.a.cancel(this.updateStateRaf),s?this.updateStateRaf=Object(ie.a)(i):i()),a&&a(this),"horizontal"===n&&(null==o?void 0:o.isRootMenu)&&r&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),ie.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(e,t){var n=this.getBaseProps();return c.createElement(xt,Object(j.a)({},n,{id:this.internalMenuId,className:e,style:t}),this.props.children)}},{key:"renderChildren",value:function(){var e=this,t=this.getBaseProps(),n=t.mode,a=t.visible,r=t.forceSubMenuRender,i=t.direction,s=this.getMotion(n,a);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||a||r,!this.haveOpened)return c.createElement("div",null);var u=l()("".concat(t.prefixCls,"-sub"),Object(o.a)({},"".concat(t.prefixCls,"-rtl"),"rtl"===i));return this.isInlineMode()?c.createElement(Ve,Object(j.a)({visible:t.visible,forceRender:r},s),(function(t){var n=t.className,o=t.style,a=l()(u,n);return e.renderPopupMenu(a,o)})):this.renderPopupMenu(u)}},{key:"render",value:function(){var e,t,n,a=Object(i.a)({},this.props),r=this.getVisible(),s=this.getPrefixCls(),u=this.isInlineMode(),p=this.getMode(),d=l()(s,"".concat(s,"-").concat(p),(e={},Object(o.a)(e,a.className,!!a.className),Object(o.a)(e,this.getOpenClassName(),r),Object(o.a)(e,this.getActiveClassName(),a.active||r&&!u),Object(o.a)(e,this.getDisabledClassName(),a.disabled),Object(o.a)(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(a.eventKey?this.internalMenuId="".concat(a.eventKey,"$Menu"):(ft+=1,this.internalMenuId="$__$".concat(ft,"$Menu")));var f={},m={},v={};a.disabled||(f={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},m={onClick:this.onTitleClick},v={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var h={},b="rtl"===a.direction;u&&(b?h.paddingRight=a.inlineIndent*a.level:h.paddingLeft=a.inlineIndent*a.level);var y={};this.getVisible()&&(y={"aria-owns":this.internalMenuId});var g=null;"horizontal"!==p&&(g=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(g=c.createElement(this.props.expandIcon,Object(i.a)({},this.props))));var O=c.createElement("div",Object(j.a)({ref:this.saveSubMenuTitle,style:h,className:"".concat(s,"-title"),role:"button"},v,m,{"aria-expanded":r},y,{"aria-haspopup":"true",title:"string"==typeof a.title?a.title:void 0}),a.title,g||c.createElement("i",{className:"".concat(s,"-arrow")})),w=this.renderChildren(),C=(null===(t=a.parentMenu)||void 0===t?void 0:t.isRootMenu)?a.parentMenu.props.getPopupContainer:function(e){return e.parentNode},E=mt[p],k=a.popupOffset?{offset:a.popupOffset}:{},x=l()((n={},Object(o.a)(n,a.popupClassName,a.popupClassName&&!u),Object(o.a)(n,"".concat(s,"-rtl"),b),n)),M=a.disabled,S=a.triggerSubMenuAction,T=a.subMenuOpenDelay,N=a.forceSubMenuRender,D=a.subMenuCloseDelay,I=a.builtinPlacements;ee.forEach((function(e){return delete a[e]})),delete a.onClick;var P=b?Object(i.a)(Object(i.a)({},dt),I):Object(i.a)(Object(i.a)({},pt),I);delete a.direction;var _=this.getBaseProps(),R=u?null:this.getMotion(_.mode,_.visible);return c.createElement("li",Object(j.a)({},a,f,{className:d,role:"menuitem"}),c.createElement(lt,{prefixCls:s,popupClassName:l()("".concat(s,"-popup"),x),getPopupContainer:C,builtinPlacements:P,popupPlacement:E,popupVisible:!u&&r,popupAlign:k,popup:u?null:w,action:M||u?[]:[S],mouseEnterDelay:T,mouseLeaveDelay:D,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:N,popupMotion:R},O),u?w:null)}}]),n}(c.Component);ht.defaultProps={onMouseEnter:J,onMouseLeave:J,onTitleMouseEnter:J,onTitleMouseLeave:J,onTitleClick:J,manualRef:J,mode:"vertical",title:""};var bt=Object(M.b)((function(e,t){var n=e.openKeys,o=e.activeKey,a=e.selectedKeys,r=t.eventKey,i=t.subMenuKey;return{isOpen:n.indexOf(r)>-1,active:o[i]===r,selectedKeys:a}}))(ht);bt.isSubMenu=!0;var yt=bt,gt=function(e){Object(k.a)(n,e);var t=Object(x.a)(n);function n(){var e;return Object(w.a)(this,n),(e=t.apply(this,arguments)).resizeObserver=null,e.mutationObserver=null,e.originalTotalWidth=0,e.overflowedItems=[],e.menuItemSizes=[],e.cancelFrameId=null,e.state={lastVisibleIndex:void 0},e.childRef=c.createRef(),e.getMenuItemNodes=function(){var t=e.props.prefixCls,n=e.childRef.current;return n?[].slice.call(n.children).filter((function(e){return e.className.split(" ").indexOf("".concat(t,"-overflowed-submenu"))<0})):[]},e.getOverflowedSubMenuItem=function(t,n,o){var a=e.props,s=a.overflowedIndicator,l=a.level,u=a.mode,p=a.prefixCls,d=a.theme;if(1!==l||"horizontal"!==u)return null;var f=e.props.children[0].props,m=(f.children,f.title,f.style),v=Object(r.a)(f,["children","title","style"]),h=Object(i.a)({},m),b="".concat(t,"-overflowed-indicator"),y="".concat(t,"-overflowed-indicator");0===n.length&&!0!==o?h=Object(i.a)(Object(i.a)({},h),{},{display:"none"}):o&&(h=Object(i.a)(Object(i.a)({},h),{},{visibility:"hidden",position:"absolute"}),b="".concat(b,"-placeholder"),y="".concat(y,"-placeholder"));var g=d?"".concat(p,"-").concat(d):"",O={};return ee.forEach((function(e){void 0!==v[e]&&(O[e]=v[e])})),c.createElement(yt,Object(j.a)({title:s,className:"".concat(p,"-overflowed-submenu"),popupClassName:g},O,{key:b,eventKey:y,disabled:!1,style:h}),n)},e.setChildrenWidthAndResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=t.children;if(n&&0!==n.length){var o=t.children[n.length-1];ne(o,"display","inline-block");var a=e.getMenuItemNodes(),r=a.filter((function(e){return e.className.split(" ").indexOf("menuitem-overflowed")>=0}));r.forEach((function(e){ne(e,"display","inline-block")})),e.menuItemSizes=a.map((function(e){return te(e,!0)})),r.forEach((function(e){ne(e,"display","none")})),e.overflowedIndicatorWidth=te(t.children[t.children.length-1],!0),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),ne(o,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=e.childRef.current;if(t){var n=te(t);e.overflowedItems=[];var o,a=0;e.originalTotalWidth>n+.5&&(o=-1,e.menuItemSizes.forEach((function(t){(a+=t)+e.overflowedIndicatorWidth<=n&&(o+=1)}))),e.setState({lastVisibleIndex:o})}}},e}return Object(C.a)(n,[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=this.childRef.current;if(!t)return;this.resizeObserver=new oe.default((function(t){t.forEach((function(){var t=e.cancelFrameId;cancelAnimationFrame(t),e.cancelFrameId=requestAnimationFrame(e.setChildrenWidthAndResize)}))})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(o,a,r){var i=a;if("horizontal"===t.props.mode){var s=t.getOverflowedSubMenuItem(a.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(r>n&&(i=c.cloneElement(a,{style:{display:"none"},eventKey:"".concat(a.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),r===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return c.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),s=t.getOverflowedSubMenuItem(a.props.eventKey,t.overflowedItems)));var l=[].concat(Object(d.a)(o),[s,i]);return r===e.length-1&&l.push(t.getOverflowedSubMenuItem(a.props.eventKey,[],!0)),l}return[].concat(Object(d.a)(o),[i])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,o=(e.theme,Object(r.a)(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),a=t;return c.createElement(a,Object(j.a)({ref:this.childRef},o),this.renderChildren(n))}}]),n}(c.Component);gt.defaultProps={tag:"div",className:""};var Ot=gt;function jt(e,t,n){var a=e.getState();e.setState({activeKey:Object(i.a)(Object(i.a)({},a.activeKey),{},Object(o.a)({},t,n))})}function wt(e){return e.eventKey||"0-menu-"}function Ct(e,t){var n,o=t,a=e.children,r=e.eventKey;if(o&&($(a,(function(e,t){e&&e.props&&!e.props.disabled&&o===Q(e,r,t)&&(n=!0)})),n))return o;return o=null,e.defaultActiveFirst?($(a,(function(e,t){o||!e||e.props.disabled||(o=Q(e,r,t))})),o):o}function Et(e){if(e){var t=this.instanceArray.indexOf(e);-1!==t?this.instanceArray[t]=e:this.instanceArray.push(e)}}var kt=function(e){Object(k.a)(n,e);var t=Object(x.a)(n);function n(e){var a;return Object(w.a)(this,n),(a=t.call(this,e)).onKeyDown=function(e,t){var n,o=e.keyCode;if(a.getFlatInstanceArray().forEach((function(t){t&&t.props.active&&t.onKeyDown&&(n=t.onKeyDown(e))})),n)return 1;var r=null;return o!==b.a.UP&&o!==b.a.DOWN||(r=a.step(o===b.a.UP?-1:1)),r?(e.preventDefault(),jt(a.props.store,wt(a.props),r.props.eventKey),"function"==typeof t&&t(r),1):void 0},a.onItemHover=function(e){var t=e.key,n=e.hover;jt(a.props.store,wt(a.props),n?t:null)},a.onDeselect=function(e){a.props.onDeselect(e)},a.onSelect=function(e){a.props.onSelect(e)},a.onClick=function(e){a.props.onClick(e)},a.onOpenChange=function(e){a.props.onOpenChange(e)},a.onDestroy=function(e){a.props.onDestroy(e)},a.getFlatInstanceArray=function(){return a.instanceArray},a.step=function(e){var t=a.getFlatInstanceArray(),n=a.props.store.getState().activeKey[wt(a.props)],o=t.length;if(!o)return null;e<0&&(t=t.concat().reverse());var r=-1;if(t.every((function(e,t){return!e||e.props.eventKey!==n||(r=t,!1)})),a.props.defaultActiveFirst||-1===r||(i=t.slice(r,o-1)).length&&!i.every((function(e){return!!e.props.disabled}))){var i,c=(r+1)%o,s=c;do{var l=t[s];if(l&&!l.props.disabled)return l;s=(s+1)%o}while(s!==c);return null}},a.renderCommonMenuItem=function(e,t,n){var o=a.props.store.getState(),r=Object(E.a)(a).props,s=Q(e,r.eventKey,t),l=e.props;if(!l||"string"==typeof e.type)return e;var u=s===o.activeKey,p=Object(i.a)(Object(i.a)({mode:l.mode||r.mode,level:r.level,inlineIndent:r.inlineIndent,renderMenuItem:a.renderMenuItem,rootPrefixCls:r.prefixCls,index:t,parentMenu:r.parentMenu,manualRef:l.disabled?void 0:Object(T.a)(e.ref,Et.bind(Object(E.a)(a))),eventKey:s,active:!l.disabled&&u,multiple:r.multiple,onClick:function(e){(l.onClick||J)(e),a.onClick(e)},onItemHover:a.onItemHover,motion:r.motion,subMenuOpenDelay:r.subMenuOpenDelay,subMenuCloseDelay:r.subMenuCloseDelay,forceSubMenuRender:r.forceSubMenuRender,onOpenChange:a.onOpenChange,onDeselect:a.onDeselect,onSelect:a.onSelect,builtinPlacements:r.builtinPlacements,itemIcon:l.itemIcon||a.props.itemIcon,expandIcon:l.expandIcon||a.props.expandIcon},n),{},{direction:r.direction});return("inline"===r.mode||G.any)&&(p.triggerSubMenuAction="click"),c.cloneElement(e,Object(i.a)(Object(i.a)({},p),{},{key:s||t}))},a.renderMenuItem=function(e,t,n){if(!e)return null;var o=a.props.store.getState(),r={openKeys:o.openKeys,selectedKeys:o.selectedKeys,triggerSubMenuAction:a.props.triggerSubMenuAction,subMenuKey:n};return a.renderCommonMenuItem(e,t,r)},e.store.setState({activeKey:Object(i.a)(Object(i.a)({},e.store.getState().activeKey),{},Object(o.a)({},e.eventKey,Ct(e,e.activeKey)))}),a.instanceArray=[],a}return Object(C.a)(n,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.visible||e.visible||this.props.className!==e.className||!D()(this.props.style,e.style)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n="activeKey"in t?t.activeKey:t.store.getState().activeKey[wt(t)],o=Ct(t,n);if(o!==n)jt(t.store,wt(t),o);else if("activeKey"in e){o!==Ct(e,e.activeKey)&&jt(t.store,wt(t),o)}}},{key:"render",value:function(){var e=this,t=Object(j.a)({},this.props);this.instanceArray=[];var n={className:l()(t.prefixCls,t.className,"".concat(t.prefixCls,"-").concat(t.mode)),role:t.role||"menu"};t.id&&(n.id=t.id),t.focusable&&(n.tabIndex=0,n.onKeyDown=this.onKeyDown);var o=t.prefixCls,a=t.eventKey,r=t.visible,i=t.level,s=t.mode,p=t.overflowedIndicator,d=t.theme;return ee.forEach((function(e){return delete t[e]})),delete t.onClick,c.createElement(Ot,Object(j.a)({},t,{prefixCls:o,mode:s,tag:"ul",level:i,theme:d,visible:r,overflowedIndicator:p},n),Object(u.a)(t.children).map((function(t,n){return e.renderMenuItem(t,n,a||"0-menu-")})))}}]),n}(c.Component);kt.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:J};var xt=Object(M.b)()(kt),Mt=n("Kwbf");function St(e,t,n){var o=e.prefixCls,a=e.motion,r=e.defaultMotions,i=void 0===r?{}:r,c=e.openAnimation,s=e.openTransitionName,l=t.switchingModeFromInline;if(a)return a;if("object"===Object(I.a)(c)&&c)Object(Mt.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if("string"==typeof c)return{motionName:"".concat(o,"-open-").concat(c)};if(s)return{motionName:s};var u=i[n];return u||(l?null:i.other)}var Tt=function(e){Object(k.a)(n,e);var t=Object(x.a)(n);function n(e){var o;Object(w.a)(this,n),(o=t.call(this,e)).onSelect=function(e){var t=Object(E.a)(o).props;if(t.selectable){var n=o.store.getState().selectedKeys,a=e.key;n=t.multiple?n.concat([a]):[a],"selectedKeys"in t||o.store.setState({selectedKeys:n}),t.onSelect(Object(i.a)(Object(i.a)({},e),{},{selectedKeys:n}))}},o.onClick=function(e){var t=o.getRealMenuMode(),n=Object(E.a)(o),a=n.store,r=n.props.onOpenChange;"inline"===t||"openKeys"in o.props||(a.setState({openKeys:[]}),r([])),o.props.onClick(e)},o.onKeyDown=function(e,t){o.innerMenu.getWrappedInstance().onKeyDown(e,t)},o.onOpenChange=function(e){var t=Object(E.a)(o).props,n=o.store.getState().openKeys.concat(),a=!1,r=function(e){var t=!1;if(e.open)(t=-1===n.indexOf(e.key))&&n.push(e.key);else{var o=n.indexOf(e.key);(t=-1!==o)&&n.splice(o,1)}a=a||t};Array.isArray(e)?e.forEach(r):r(e),a&&("openKeys"in o.props||o.store.setState({openKeys:n}),t.onOpenChange(n))},o.onDeselect=function(e){var t=Object(E.a)(o).props;if(t.selectable){var n=o.store.getState().selectedKeys.concat(),a=e.key,r=n.indexOf(a);-1!==r&&n.splice(r,1),"selectedKeys"in t||o.store.setState({selectedKeys:n}),t.onDeselect(Object(i.a)(Object(i.a)({},e),{},{selectedKeys:n}))}},o.onMouseEnter=function(e){o.restoreModeVerticalFromInline();var t=o.props.onMouseEnter;t&&t(e)},o.onTransitionEnd=function(e){var t="width"===e.propertyName&&e.target===e.currentTarget,n=e.target.className,a="[object SVGAnimatedString]"===Object.prototype.toString.call(n)?n.animVal:n,r="font-size"===e.propertyName&&a.indexOf("anticon")>=0;(t||r)&&o.restoreModeVerticalFromInline()},o.setInnerMenu=function(e){o.innerMenu=e},o.isRootMenu=!0;var a=e.defaultSelectedKeys,r=e.defaultOpenKeys;return"selectedKeys"in e&&(a=e.selectedKeys||[]),"openKeys"in e&&(r=e.openKeys||[]),o.store=Object(M.c)({selectedKeys:a,openKeys:r,activeKey:{"0-menu-":Ct(e,e.activeKey)}}),o.state={switchingModeFromInline:!1,prevProps:e,inlineOpenKeys:[],store:o.store},o}return Object(C.a)(n,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.siderCollapsed,o=t.inlineCollapsed,a=t.onOpenChange;(!e.inlineCollapsed&&o||!e.siderCollapsed&&n)&&a([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var e=this.props.collapsedWidth,t=this.store,n=this.prevOpenKeys;this.getInlineCollapsed()&&(0===e||"0"===e||"0px"===e)?(this.prevOpenKeys=t.getState().openKeys.concat(),this.store.setState({openKeys:[]})):n&&(this.store.setState({openKeys:n}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var e=this.props.mode,t=this.state.switchingModeFromInline,n=this.getInlineCollapsed();return t&&n?"inline":n?"vertical":e}},{key:"getInlineCollapsed",value:function(){var e=this.props,t=e.inlineCollapsed,n=e.siderCollapsed;return void 0!==n?n:t}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var e=Object(i.a)({},Object(S.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),t=this.getRealMenuMode();return e.className+=" ".concat(e.prefixCls,"-root"),"rtl"===e.direction&&(e.className+=" ".concat(e.prefixCls,"-rtl")),delete(e=Object(i.a)(Object(i.a)({},e),{},{mode:t,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:St(this.props,this.state,t)})).openAnimation,delete e.openTransitionName,c.createElement(M.a,{store:this.store},c.createElement(xt,Object(j.a)({},e,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t.store,a=o.getState(),r={},i={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(i.switchingModeFromInline=!0),"openKeys"in e?r.openKeys=e.openKeys||[]:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(i.switchingModeFromInline=!0,i.inlineOpenKeys=a.openKeys,r.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(r.openKeys=t.inlineOpenKeys,i.inlineOpenKeys=[])),Object.keys(r).length&&o.setState(r),i}}]),n}(c.Component);Tt.defaultProps={selectable:!0,onClick:J,onSelect:J,onOpenChange:J,onDeselect:J,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:c.createElement("span",null,"···")};var Nt=Tt,Dt=function(e){Object(k.a)(n,e);var t=Object(x.a)(n);function n(){var e;return Object(w.a)(this,n),(e=t.apply(this,arguments)).onKeyDown=function(t){if(t.keyCode===b.a.ENTER)return e.onClick(t),!0},e.onMouseLeave=function(t){var n=e.props,o=n.eventKey,a=n.onItemHover,r=n.onMouseLeave;a({key:o,hover:!1}),r({key:o,domEvent:t})},e.onMouseEnter=function(t){var n=e.props,o=n.eventKey,a=n.onItemHover,r=n.onMouseEnter;a({key:o,hover:!0}),r({key:o,domEvent:t})},e.onClick=function(t){var n=e.props,o=n.eventKey,a=n.multiple,r=n.onClick,i=n.onSelect,c=n.onDeselect,s=n.isSelected,l={key:o,keyPath:[o],item:Object(E.a)(e),domEvent:t};r(l),a?s?c(l):i(l):s||i(l)},e.saveNode=function(t){e.node=t},e}return Object(C.a)(n,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var e=this.props;e.onDestroy&&e.onDestroy(e.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var e,t=Object(i.a)({},this.props),n=l()(this.getPrefixCls(),t.className,(e={},Object(o.a)(e,this.getActiveClassName(),!t.disabled&&t.active),Object(o.a)(e,this.getSelectedClassName(),t.isSelected),Object(o.a)(e,this.getDisabledClassName(),t.disabled),e)),a=Object(i.a)(Object(i.a)({},t.attribute),{},{title:"string"==typeof t.title?t.title:void 0,className:n,role:t.role||"menuitem","aria-disabled":t.disabled});"option"===t.role?a=Object(i.a)(Object(i.a)({},a),{},{role:"option","aria-selected":t.isSelected}):null!==t.role&&"none"!==t.role||(a.role="none");var r={onClick:t.disabled?null:this.onClick,onMouseLeave:t.disabled?null:this.onMouseLeave,onMouseEnter:t.disabled?null:this.onMouseEnter},s=Object(i.a)({},t.style);"inline"===t.mode&&("rtl"===t.direction?s.paddingRight=t.inlineIndent*t.level:s.paddingLeft=t.inlineIndent*t.level),ee.forEach((function(e){return delete t[e]})),delete t.direction;var u=this.props.itemIcon;return"function"==typeof this.props.itemIcon&&(u=c.createElement(this.props.itemIcon,this.props)),c.createElement("li",Object(j.a)({},Object(S.a)(t,["onClick","onMouseEnter","onMouseLeave","onSelect"]),a,r,{style:s,ref:this.saveNode}),t.children,u)}}]),n}(c.Component);Dt.isMenuItem=!0,Dt.defaultProps={onSelect:J,onMouseEnter:J,onMouseLeave:J,manualRef:J};var It=Object(M.b)((function(e,t){var n=e.activeKey,o=e.selectedKeys,a=t.eventKey;return{active:n[t.subMenuKey]===a,isSelected:Array.isArray(o)?-1!==o.indexOf(a):o===a}}))(Dt),Pt=function(e){Object(k.a)(n,e);var t=Object(x.a)(n);function n(){var e;return Object(w.a)(this,n),(e=t.apply(this,arguments)).renderInnerMenuItem=function(t){var n=e.props;return(0,n.renderMenuItem)(t,n.index,e.props.subMenuKey)},e}return Object(C.a)(n,[{key:"render",value:function(){var e=Object(j.a)({},this.props),t=e.className,n=void 0===t?"":t,o=e.rootPrefixCls,a="".concat(o,"-item-group-title"),r="".concat(o,"-item-group-list"),i=e.title,s=e.children;return ee.forEach((function(t){return delete e[t]})),delete e.direction,c.createElement("li",Object(j.a)({},e,{onClick:function(e){return e.stopPropagation()},className:"".concat(n," ").concat(o,"-item-group")}),c.createElement("div",{className:a,title:"string"==typeof i?i:void 0},i),c.createElement("ul",{className:r},c.Children.map(s,this.renderInnerMenuItem)))}}]),n}(c.Component);Pt.isMenuItemGroup=!0,Pt.defaultProps={disabled:!0};var _t=function(e){var t=e.className,n=e.rootPrefixCls,o=e.style;return c.createElement("li",{className:"".concat(t," ").concat(n,"-item-divider"),style:o})};_t.defaultProps={disabled:!0,className:"",style:{}};var Rt=Nt,At=n("eDIo");var Kt=c.forwardRef((function(e,t){var n=e.prefixCls,o=e.editable,a=e.locale,r=e.style;return o&&!1!==o.showAdd?c.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:r,"aria-label":(null==a?void 0:a.addAriaLabel)||"Add tab",onClick:function(e){o.onEdit("add",{event:e})}},o.addIcon||"+"):null}));var Lt=c.forwardRef((function(e,t){var n=e.prefixCls,r=e.id,i=e.tabs,s=e.locale,u=e.mobile,p=e.moreIcon,d=void 0===p?"More":p,f=e.moreTransitionName,m=e.style,v=e.className,h=e.editable,y=e.tabBarGutter,g=e.rtl,O=e.onTabClick,j=Object(c.useState)(!1),w=Object(a.a)(j,2),C=w[0],E=w[1],k=Object(c.useState)(null),x=Object(a.a)(k,2),M=x[0],S=x[1],T="".concat(r,"-more-popup"),N="".concat(n,"-dropdown"),D=null!==M?"".concat(T,"-").concat(M):null,I=null==s?void 0:s.dropdownAriaLabel,P=c.createElement(Rt,{onClick:function(e){var t=e.key,n=e.domEvent;O(t,n),E(!1)},id:T,tabIndex:-1,role:"listbox","aria-activedescendant":D,selectedKeys:[M],"aria-label":void 0!==I?I:"expanded dropdown"},i.map((function(e){return c.createElement(It,{key:e.key,id:"".concat(T,"-").concat(e.key),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(e.key),disabled:e.disabled},e.tab)})));function _(e){for(var t=i.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===M}))||0,o=t.length,a=0;a<o;a+=1){var r=t[n=(n+e+o)%o];if(!r.disabled)return void S(r.key)}}Object(c.useEffect)((function(){var e=document.getElementById(D);e&&e.scrollIntoView&&e.scrollIntoView(!1)}),[M]),Object(c.useEffect)((function(){C||S(null)}),[C]);var R=Object(o.a)({},g?"marginLeft":"marginRight",y);i.length||(R.visibility="hidden",R.order=1);var A=l()(Object(o.a)({},"".concat(N,"-rtl"),g)),K=u?null:c.createElement(At.a,{prefixCls:N,overlay:P,trigger:["hover"],visible:C,transitionName:f,onVisibleChange:E,overlayClassName:A,mouseEnterDelay:.1,mouseLeaveDelay:.1},c.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:R,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":T,id:"".concat(r,"-more"),"aria-expanded":C,onKeyDown:function(e){var t=e.which;if(C)switch(t){case b.a.UP:_(-1),e.preventDefault();break;case b.a.DOWN:_(1),e.preventDefault();break;case b.a.ESC:E(!1);break;case b.a.SPACE:case b.a.ENTER:null!==M&&O(M,e)}else[b.a.DOWN,b.a.SPACE,b.a.ENTER].includes(t)&&(E(!0),e.preventDefault())}},d));return c.createElement("div",{className:l()("".concat(n,"-nav-operations"),v),style:m,ref:t},K,c.createElement(Kt,{prefixCls:n,locale:s,editable:h}))})),zt=Object(c.createContext)(null),Ht=Math.pow(.995,20);function Vt(e,t){var n=c.useRef(e),o=c.useState({}),r=Object(a.a)(o,2)[1];return[n.current,function(e){var o="function"==typeof e?e(n.current):e;o!==n.current&&t(o,n.current),n.current=o,r({})}]}var Ft=function(e){var t,n=e.position,o=e.prefixCls,a=e.extra;if(!a)return null;var r=a;return"right"===n&&(t=r.right||!r.left&&r||null),"left"===n&&(t=r.left||null),t?c.createElement("div",{className:"".concat(o,"-extra-content")},t):null};var Wt=c.forwardRef((function(e,t){var n,r,s=c.useContext(zt),u=s.prefixCls,p=s.tabs,f=e.className,b=e.style,j=e.id,w=e.animated,C=e.activeKey,E=e.rtl,k=e.extra,x=e.editable,M=e.locale,S=e.tabPosition,T=e.tabBarGutter,N=e.children,D=e.onTabClick,I=e.onTabScroll,P=Object(c.useRef)(),_=Object(c.useRef)(),R=Object(c.useRef)(),A=Object(c.useRef)(),K=(r=Object(c.useRef)(new Map),[function(e){return r.current.has(e)||r.current.set(e,c.createRef()),r.current.get(e)},function(e){r.current.delete(e)}]),L=Object(a.a)(K,2),z=L[0],H=L[1],V="top"===S||"bottom"===S,F=Vt(0,(function(e,t){V&&I&&I({direction:e>t?"left":"right"})})),W=Object(a.a)(F,2),B=W[0],U=W[1],q=Vt(0,(function(e,t){!V&&I&&I({direction:e>t?"top":"bottom"})})),X=Object(a.a)(q,2),Y=X[0],G=X[1],J=Object(c.useState)(0),Q=Object(a.a)(J,2),Z=Q[0],$=Q[1],ee=Object(c.useState)(0),te=Object(a.a)(ee,2),ne=te[0],oe=te[1],ae=Object(c.useState)(0),re=Object(a.a)(ae,2),ie=re[0],ce=re[1],se=Object(c.useState)(0),le=Object(a.a)(se,2),ue=le[0],pe=le[1],de=Object(c.useState)(null),fe=Object(a.a)(de,2),me=fe[0],ve=fe[1],he=Object(c.useState)(null),be=Object(a.a)(he,2),ye=be[0],ge=be[1],Oe=Object(c.useState)(0),je=Object(a.a)(Oe,2),we=je[0],Ce=je[1],Ee=Object(c.useState)(0),ke=Object(a.a)(Ee,2),xe=ke[0],Me=ke[1],Se=function(e){var t=Object(c.useRef)([]),n=Object(c.useState)({}),o=Object(a.a)(n,2)[1],r=Object(c.useRef)("function"==typeof e?e():e),i=h((function(){var e=r.current;t.current.forEach((function(t){e=t(e)})),t.current=[],r.current=e,o({})}));return[r.current,function(e){t.current.push(e),i()}]}(new Map),Te=Object(a.a)(Se,2),Ne=Te[0],De=Te[1],Ie=function(e,t,n){return Object(c.useMemo)((function(){for(var n,o=new Map,a=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||g,r=a.left+a.width,c=0;c<e.length;c+=1){var s,l=e[c].key,u=t.get(l);if(!u)u=t.get(null===(s=e[c-1])||void 0===s?void 0:s.key)||g;var p=o.get(l)||Object(i.a)({},u);p.right=r-p.left-p.width,o.set(l,p)}return o}),[e.map((function(e){return e.key})).join("_"),t,n])}(p,Ne,Z),Pe="".concat(u,"-nav-operations-hidden"),_e=0,Re=0;function Ae(e){return e<_e?[_e,!1]:e>Re?[Re,!1]:[e,!0]}V?E?(_e=0,Re=Math.max(0,Z-me)):(_e=Math.min(0,me-Z),Re=0):(_e=Math.min(0,ye-ne),Re=0);var Ke=Object(c.useRef)(),Le=Object(c.useState)(),ze=Object(a.a)(Le,2),He=ze[0],Ve=ze[1];function Fe(){Ve(Date.now())}function We(){window.clearTimeout(Ke.current)}function Be(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=Ie.get(e);if(t)if(V){var n=B;E?t.right<B?n=t.right:t.right+t.width>B+me&&(n=t.right+t.width-me):t.left<-B?n=-t.left:t.left+t.width>-B+me&&(n=-(t.left+t.width-me)),G(0),U(Ae(n)[0])}else{var o=Y;t.top<-Y?o=-t.top:t.top+t.height>-Y+ye&&(o=-(t.top+t.height-ye)),U(0),G(Ae(o)[0])}}!function(e,t){var n=Object(c.useState)(),o=Object(a.a)(n,2),r=o[0],i=o[1],s=Object(c.useState)(0),l=Object(a.a)(s,2),u=l[0],p=l[1],d=Object(c.useState)(0),f=Object(a.a)(d,2),m=f[0],v=f[1],h=Object(c.useState)(),b=Object(a.a)(h,2),y=b[0],g=b[1],O=Object(c.useRef)(),j=Object(c.useRef)(0),w=Object(c.useRef)(!1),C=Object(c.useRef)(),E=Object(c.useRef)(null);E.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,o=t.screenY;i({x:n,y:o}),window.clearInterval(O.current)},onTouchMove:function(e){if(r){e.preventDefault();var n=e.touches[0],o=n.screenX,a=n.screenY;i({x:o,y:a});var c=o-r.x,s=a-r.y;t(c,s);var l=Date.now();p(l),v(l-u),g({x:c,y:s})}},onTouchEnd:function(){if(r&&(i(null),g(null),y)){var e=y.x/m,n=y.y/m,o=Math.abs(e),a=Math.abs(n);if(Math.max(o,a)<.1)return;var c=e,s=n;O.current=window.setInterval((function(){Math.abs(c)<.01&&Math.abs(s)<.01?window.clearInterval(O.current):t(20*(c*=Ht),20*(s*=Ht))}),20)}},onWheel:function(e){var n=e.deltaX,o=e.deltaY,a=0,r=Math.abs(n),i=Math.abs(o);r===i?a="x"===C.current?n:o:r>i?(a=n,C.current="x"):(a=o,C.current="y");var c=Date.now();c-j.current>100&&(w.current=!1),(t(-a,-a)||w.current)&&(e.preventDefault(),w.current=!0),j.current=c}},c.useEffect((function(){function t(e){E.current.onTouchMove(e)}function n(e){E.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){E.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){E.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(P,(function(e,t){var n=!1;function o(e,t){e((function(e){var o=Ae(e+t),r=Object(a.a)(o,2),i=r[0],c=r[1];return n=c,i}))}if(V){if(me>=Z)return n;o(U,e)}else{if(ye>=ne)return n;o(G,t)}return We(),Fe(),n})),Object(c.useEffect)((function(){return We(),He&&(Ke.current=window.setTimeout((function(){Ve(0)}),100)),We}),[He]);var Ue=function(e,t,n,o,a){var r,i,s,l=a.tabs,u=a.tabPosition,p=a.rtl;["top","bottom"].includes(u)?(r="width",i=p?"right":"left",s=Math.abs(t.left)):(r="height",i="top",s=-t.top);var d=t[r],f=n[r],m=o[r],v=d;return f+m>d&&(v=d-m),Object(c.useMemo)((function(){if(!l.length)return[0,0];for(var t=l.length,n=t,o=0;o<t;o+=1){var a=e.get(l[o].key)||O;if(a[i]+a[r]>s+v){n=o-1;break}}for(var c=0,u=t-1;u>=0;u-=1){if((e.get(l[u].key)||O)[i]<s){c=u+1;break}}return[c,n]}),[e,s,v,u,l.map((function(e){return e.key})).join("_"),p])}(Ie,{width:me,height:ye,left:B,top:Y},{width:ie,height:ue},{width:we,height:xe},Object(i.a)(Object(i.a)({},e),{},{tabs:p})),qe=Object(a.a)(Ue,2),Xe=qe[0],Ye=qe[1],Ge=p.map((function(e){var t=e.key;return c.createElement(y,{id:j,prefixCls:u,key:t,rtl:E,tab:e,closable:e.closable,editable:x,active:t===C,tabPosition:S,tabBarGutter:T,renderWrapper:N,removeAriaLabel:null==M?void 0:M.removeAriaLabel,ref:z(t),onClick:function(e){D(t,e)},onRemove:function(){H(t)},onFocus:function(){Be(t),Fe(),E||(P.current.scrollLeft=0),P.current.scrollTop=0}})})),Je=h((function(){var e,t,n,o,a,r,i,c,s,l=(null===(e=P.current)||void 0===e?void 0:e.offsetWidth)||0,u=(null===(t=P.current)||void 0===t?void 0:t.offsetHeight)||0,d=(null===(n=A.current)||void 0===n?void 0:n.offsetWidth)||0,f=(null===(o=A.current)||void 0===o?void 0:o.offsetHeight)||0,m=(null===(a=R.current)||void 0===a?void 0:a.offsetWidth)||0,v=(null===(r=R.current)||void 0===r?void 0:r.offsetHeight)||0;ve(l),ge(u),Ce(d),Me(f);var h=((null===(i=_.current)||void 0===i?void 0:i.offsetWidth)||0)-d,b=((null===(c=_.current)||void 0===c?void 0:c.offsetHeight)||0)-f;$(h),oe(b);var y=null===(s=R.current)||void 0===s?void 0:s.className.includes(Pe);ce(h-(y?0:m)),pe(b-(y?0:v)),De((function(){var e=new Map;return p.forEach((function(t){var n=t.key,o=z(n).current;o&&e.set(n,{width:o.offsetWidth,height:o.offsetHeight,left:o.offsetLeft,top:o.offsetTop})})),e}))})),Qe=p.slice(0,Xe),Ze=p.slice(Ye+1),$e=[].concat(Object(d.a)(Qe),Object(d.a)(Ze)),et=Object(c.useState)(),tt=Object(a.a)(et,2),nt=tt[0],ot=tt[1],at=Ie.get(C),rt=Object(c.useRef)();function it(){m.a.cancel(rt.current)}Object(c.useEffect)((function(){var e={};return at&&(V?(E?e.right=at.right:e.left=at.left,e.width=at.width):(e.top=at.top,e.height=at.height)),it(),rt.current=m()((function(){ot(e)})),it}),[at,V,E]),Object(c.useEffect)((function(){Be()}),[C,at,Ie,V]),Object(c.useEffect)((function(){Je()}),[E,T,C,p.map((function(e){return e.key})).join("_")]);var ct,st,lt,ut,pt=!!$e.length,dt="".concat(u,"-nav-wrap");return V?E?(st=B>0,ct=B+me<Z):(ct=B<0,st=-B+me<Z):(lt=Y<0,ut=-Y+ye<ne),c.createElement("div",{ref:t,role:"tablist",className:l()("".concat(u,"-nav"),f),style:b,onKeyDown:function(){Fe()}},c.createElement(Ft,{position:"left",extra:k,prefixCls:u}),c.createElement(v.a,{onResize:Je},c.createElement("div",{className:l()(dt,(n={},Object(o.a)(n,"".concat(dt,"-ping-left"),ct),Object(o.a)(n,"".concat(dt,"-ping-right"),st),Object(o.a)(n,"".concat(dt,"-ping-top"),lt),Object(o.a)(n,"".concat(dt,"-ping-bottom"),ut),n)),ref:P},c.createElement(v.a,{onResize:Je},c.createElement("div",{ref:_,className:"".concat(u,"-nav-list"),style:{transform:"translate(".concat(B,"px, ").concat(Y,"px)"),transition:He?"none":void 0}},Ge,c.createElement(Kt,{ref:A,prefixCls:u,locale:M,editable:x,style:{visibility:pt?"hidden":null}}),c.createElement("div",{className:l()("".concat(u,"-ink-bar"),Object(o.a)({},"".concat(u,"-ink-bar-animated"),w.inkBar)),style:nt}))))),c.createElement(Lt,Object.assign({},e,{ref:R,prefixCls:u,tabs:$e,className:!pt&&Pe})),c.createElement(Ft,{position:"right",extra:k,prefixCls:u}))}));function Bt(e){var t=e.id,n=e.activeKey,a=e.animated,r=e.tabPosition,i=e.rtl,s=e.destroyInactiveTabPane,u=c.useContext(zt),p=u.prefixCls,d=u.tabs,f=a.tabPane,m=d.findIndex((function(e){return e.key===n}));return c.createElement("div",{className:l()("".concat(p,"-content-holder"))},c.createElement("div",{className:l()("".concat(p,"-content"),"".concat(p,"-content-").concat(r),Object(o.a)({},"".concat(p,"-content-animated"),f)),style:m&&f?Object(o.a)({},i?"marginRight":"marginLeft","-".concat(m,"00%")):null},d.map((function(e){return c.cloneElement(e.node,{key:e.key,prefixCls:p,tabKey:e.key,id:t,animated:f,active:e.key===n,destroyInactiveTabPane:s})}))))}function Ut(e){var t=e.prefixCls,n=e.forceRender,o=e.className,r=e.style,s=e.id,u=e.active,p=e.animated,d=e.destroyInactiveTabPane,f=e.tabKey,m=e.children,v=c.useState(n),h=Object(a.a)(v,2),b=h[0],y=h[1];c.useEffect((function(){u?y(!0):d&&y(!1)}),[u,d]);var g={};return u||(p?(g.visibility="hidden",g.height=0,g.overflowY="hidden"):g.display="none"),c.createElement("div",{id:s&&"".concat(s,"-panel-").concat(f),role:"tabpanel",tabIndex:u?0:-1,"aria-labelledby":s&&"".concat(s,"-tab-").concat(f),"aria-hidden":!u,style:Object(i.a)(Object(i.a)({},g),r),className:l()("".concat(t,"-tabpane"),u&&"".concat(t,"-tabpane-active"),o)},(u||b||n)&&m)}var qt=0;var Xt=c.forwardRef((function(e,t){var n,s,d=e.id,f=e.prefixCls,m=void 0===f?"rc-tabs":f,v=e.className,h=e.children,b=e.direction,y=e.activeKey,g=e.defaultActiveKey,O=e.editable,j=e.animated,w=e.tabPosition,C=void 0===w?"top":w,E=e.tabBarGutter,k=e.tabBarStyle,x=e.tabBarExtraContent,M=e.locale,S=e.moreIcon,T=e.moreTransitionName,N=e.destroyInactiveTabPane,D=e.renderTabBar,I=e.onChange,P=e.onTabClick,_=e.onTabScroll,R=Object(r.a)(e,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),A=function(e){return Object(u.a)(e).map((function(e){if(c.isValidElement(e)){var t=void 0!==e.key?String(e.key):void 0;return Object(i.a)(Object(i.a)({key:t},e.props),{},{node:e})}return null})).filter((function(e){return e}))}(h),K="rtl"===b;s=!1===j?{inkBar:!1,tabPane:!1}:Object(i.a)({inkBar:!0,tabPane:!1},!0!==j?j:null);var L=Object(c.useState)(!1),z=Object(a.a)(L,2),H=z[0],V=z[1];Object(c.useEffect)((function(){var e;V((e=navigator.userAgent||navigator.vendor||window.opera,!(!/(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.substr(0,4)))))}),[]);var F=Object(p.a)((function(){var e;return null===(e=A[0])||void 0===e?void 0:e.key}),{value:y,defaultValue:g}),W=Object(a.a)(F,2),B=W[0],U=W[1],q=Object(c.useState)((function(){return A.findIndex((function(e){return e.key===B}))})),X=Object(a.a)(q,2),Y=X[0],G=X[1];Object(c.useEffect)((function(){var e,t=A.findIndex((function(e){return e.key===B}));-1===t&&(t=Math.max(0,Math.min(Y,A.length-1)),U(null===(e=A[t])||void 0===e?void 0:e.key));G(t)}),[A.map((function(e){return e.key})).join("_"),B,Y]);var J=Object(p.a)(null,{value:d}),Q=Object(a.a)(J,2),Z=Q[0],$=Q[1],ee=C;H&&!["left","right"].includes(C)&&(ee="top"),Object(c.useEffect)((function(){d||($("rc-tabs-".concat(qt)),qt+=1)}),[]);var te,ne={id:Z,activeKey:B,animated:s,tabPosition:ee,rtl:K,mobile:H},oe=Object(i.a)(Object(i.a)({},ne),{},{editable:O,locale:M,moreIcon:S,moreTransitionName:T,tabBarGutter:E,onTabClick:function(e,t){null==P||P(e,t),U(e),null==I||I(e)},onTabScroll:_,extra:x,style:k,panes:h});return te=D?D(oe,Wt):c.createElement(Wt,Object.assign({},oe)),c.createElement(zt.Provider,{value:{tabs:A,prefixCls:m}},c.createElement("div",Object.assign({ref:t,id:d,className:l()(m,"".concat(m,"-").concat(ee),(n={},Object(o.a)(n,"".concat(m,"-mobile"),H),Object(o.a)(n,"".concat(m,"-editable"),O),Object(o.a)(n,"".concat(m,"-rtl"),K),n),v)},R),te,c.createElement(Bt,Object.assign({destroyInactiveTabPane:N},ne,{animated:s}))))}));Xt.TabPane=Ut;var Yt=Xt;t.b=Yt},mOS8:
|