{"size": 25438, "ext": "js", "max_stars_repo_path": "public/294ab51f2241fff6aef7411a6bceba79ca2b1ef1-0840ebd10514943b8b60.js", "max_stars_repo_name": "LearnAnythingCn/learn-anything.cn", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/294ab51f2241fff6aef7411a6bceba79ca2b1ef1-0840ebd10514943b8b60.js", "max_issues_repo_name": "LearnAnythingCn/learn-anything.cn", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/294ab51f2241fff6aef7411a6bceba79ca2b1ef1-0840ebd10514943b8b60.js", "max_forks_repo_name": "LearnAnythingCn/learn-anything.cn", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 12719.0, "max_line_length": 25348, "alphanum_fraction": 0.6652252536}
"use strict";(self.webpackChunklearn_anything=self.webpackChunklearn_anything||[]).push([[766],{6050:function(e,t,n){n.d(t,{Z:function(){return se}});var a=n(86552),r=n(54038),c=n(67294),o=n(75900),i=n.n(o),l=n(8613),u=n(82525),s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n},d=function(e){var t=e.prefixCls,n=e.className,o=e.hoverable,l=void 0===o||o,d=s(e,["prefixCls","className","hoverable"]);return c.createElement(u.C,null,(function(e){var o=(0,e.getPrefixCls)("card",t),u=i()("".concat(o,"-grid"),n,(0,a.Z)({},"".concat(o,"-grid-hoverable"),l));return c.createElement("div",(0,r.Z)({},d,{className:u}))}))},f=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n},v=function(e){return c.createElement(u.C,null,(function(t){var n=t.getPrefixCls,a=e.prefixCls,o=e.className,l=e.avatar,u=e.title,s=e.description,d=f(e,["prefixCls","className","avatar","title","description"]),v=n("card",a),m=i()("".concat(v,"-meta"),o),b=l?c.createElement("div",{className:"".concat(v,"-meta-avatar")},l):null,p=u?c.createElement("div",{className:"".concat(v,"-meta-title")},u):null,h=s?c.createElement("div",{className:"".concat(v,"-meta-description")},s):null,y=p||h?c.createElement("div",{className:"".concat(v,"-meta-detail")},p,h):null;return c.createElement("div",(0,r.Z)({},d,{className:m}),b,y)}))},m=n(82277),b=n(1449),p=n(262),h=n(32663),y=n(11786),E=n(9866),g=n(61637),Z=n(53168),A=n(10518),k=n(88493);function x(e){var t=(0,c.useRef)(),n=(0,c.useRef)(!1);return(0,c.useEffect)((function(){return function(){n.current=!0,A.Z.cancel(t.current)}}),[]),function(){for(var a=arguments.length,r=new Array(a),c=0;c<a;c++)r[c]=arguments[c];n.current||(A.Z.cancel(t.current),t.current=(0,A.Z)((function(){e.apply(void 0,r)})))}}var C=n(45934);function w(e,t){var n,r=e.prefixCls,o=e.id,l=e.active,u=e.tab,s=u.key,d=u.tab,f=u.disabled,v=u.closeIcon,m=e.closable,b=e.renderWrapper,p=e.removeAriaLabel,h=e.editable,y=e.onClick,E=e.onRemove,g=e.onFocus,Z=e.style,A=e.className,k="".concat(r,"-tab");c.useEffect((function(){return E}),[]);var x=h&&!1!==m&&!f;function w(e){f||y(e)}var N=c.createElement("div",{key:s,ref:t,className:i()(k,A,(n={},(0,a.Z)(n,"".concat(k,"-with-remove"),x),(0,a.Z)(n,"".concat(k,"-active"),l),(0,a.Z)(n,"".concat(k,"-disabled"),f),n)),style:Z,onClick:w},c.createElement("div",{role:"tab","aria-selected":l,id:o&&"".concat(o,"-tab-").concat(s),className:"".concat(k,"-btn"),"aria-controls":o&&"".concat(o,"-panel-").concat(s),"aria-disabled":f,tabIndex:f?null:0,onClick:function(e){e.stopPropagation(),w(e)},onKeyDown:function(e){[C.Z.SPACE,C.Z.ENTER].includes(e.which)&&(e.preventDefault(),w(e))},onFocus:g},d),x&&c.createElement("button",{type:"button","aria-label":p||"remove",tabIndex:0,className:"".concat(k,"-remove"),onClick:function(e){var t;e.stopPropagation(),(t=e).preventDefault(),t.stopPropagation(),h.onEdit("remove",{key:s,event:t})}},v||h.removeIcon||"×"));return b?b(N):N}var N=c.forwardRef(w),O={width:0,height:0,left:0,top:0};var P={width:0,height:0,left:0,top:0,right:0};var S=n(97690),I=n(23110);function T(e,t){var n=e.prefixCls,a=e.editable,r=e.locale,o=e.style;return a&&!1!==a.showAdd?c.createElement("button",{ref:t,type:"button",className:"".concat(n,"-nav-add"),style:o,"aria-label":(null==r?void 0:r.addAriaLabel)||"Add tab",onClick:function(e){a.onEdit("add",{event:e})}},a.addIcon||"+"):null}var R=c.forwardRef(T);function j(e,t){var n=e.prefixCls,r=e.id,o=e.tabs,l=e.locale,u=e.mobile,s=e.moreIcon,d=void 0===s?"More":s,f=e.moreTransitionName,v=e.style,b=e.className,p=e.editable,h=e.tabBarGutter,y=e.rtl,E=e.removeAriaLabel,g=e.onTabClick,Z=(0,c.useState)(!1),A=(0,m.Z)(Z,2),k=A[0],x=A[1],w=(0,c.useState)(null),N=(0,m.Z)(w,2),O=N[0],P=N[1],T="".concat(r,"-more-popup"),j="".concat(n,"-dropdown"),M=null!==O?"".concat(T,"-").concat(O):null,B=null==l?void 0:l.dropdownAriaLabel;var L=c.createElement(S.ZP,{onClick:function(e){var t=e.key,n=e.domEvent;g(t,n),x(!1)},id:T,tabIndex:-1,role:"listbox","aria-activedescendant":M,selectedKeys:[O],"aria-label":void 0!==B?B:"expanded dropdown"},o.map((function(e){var t=p&&!1!==e.closable&&!e.disabled;return c.createElement(S.sN,{key:e.key,id:"".concat(T,"-").concat(e.key),role:"option","aria-controls":r&&"".concat(r,"-panel-").concat(e.key),disabled:e.disabled},c.createElement("span",null,e.tab),t&&c.createElement("button",{type:"button","aria-label":E||"remove",tabIndex:0,className:"".concat(j,"-menu-item-remove"),onClick:function(t){var n,a;t.stopPropagation(),n=t,a=e.key,n.preventDefault(),n.stopPropagation(),p.onEdit("remove",{key:a,event:n})}},e.closeIcon||p.removeIcon||"×"))})));function D(e){for(var t=o.filter((function(e){return!e.disabled})),n=t.findIndex((function(e){return e.key===O}))||0,a=t.length,r=0;r<a;r+=1){var c=t[n=(n+e+a)%a];if(!c.disabled)return void P(c.key)}}(0,c.useEffect)((function(){var e=document.getElementById(M);e&&e.scrollIntoView&&e.scrollIntoView(!1)}),[O]),(0,c.useEffect)((function(){k||P(null)}),[k]);var K=(0,a.Z)({},y?"marginRight":"marginLeft",h);o.length||(K.visibility="hidden",K.order=1);var G=i()((0,a.Z)({},"".concat(j,"-rtl"),y)),W=u?null:c.createElement(I.Z,{prefixCls:j,overlay:L,trigger:["hover"],visible:k,transitionName:f,onVisibleChange:x,overlayClassName:G,mouseEnterDelay:.1,mouseLeaveDelay:.1},c.createElement("button",{type:"button",className:"".concat(n,"-nav-more"),style:K,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":T,id:"".concat(r,"-more"),"aria-expanded":k,onKeyDown:function(e){var t=e.which;if(k)switch(t){case C.Z.UP:D(-1),e.preventDefault();break;case C.Z.DOWN:D(1),e.preventDefault();break;case C.Z.ESC:x(!1);break;case C.Z.SPACE:case C.Z.ENTER:null!==O&&g(O,e)}else[C.Z.DOWN,C.Z.SPACE,C.Z.ENTER].includes(t)&&(x(!0),e.preventDefault())}},d));return c.createElement("div",{className:i()("".concat(n,"-nav-operations"),b),style:v,ref:t},W,c.createElement(R,{prefixCls:n,locale:l,editable:p}))}var M=c.memo(c.forwardRef(j),(function(e,t){return t.tabMoving})),B=(0,c.createContext)(null),L=Math.pow(.995,20);function D(e,t){var n=c.useRef(e),a=c.useState({}),r=(0,m.Z)(a,2)[1];return[n.current,function(e){var a="function"==typeof e?e(n.current):e;a!==n.current&&t(a,n.current),n.current=a,r({})}]}var K=function(e){var t,n=e.position,a=e.prefixCls,r=e.extra;if(!r)return null;var o={};return r&&"object"===(0,b.Z)(r)&&!c.isValidElement(r)?o=r:o.right=r,"right"===n&&(t=o.right),"left"===n&&(t=o.left),t?c.createElement("div",{className:"".concat(a,"-extra-content")},t):null};function G(e,t){var n,o,l=c.useContext(B),u=l.prefixCls,s=l.tabs,d=e.className,f=e.style,v=e.id,b=e.animated,p=e.activeKey,y=e.rtl,E=e.extra,g=e.editable,C=e.locale,w=e.tabPosition,S=e.tabBarGutter,I=e.children,T=e.onTabClick,j=e.onTabScroll,G=(0,c.useRef)(),W=(0,c.useRef)(),U=(0,c.useRef)(),V=(0,c.useRef)(),Y=(o=(0,c.useRef)(new Map),[function(e){return o.current.has(e)||o.current.set(e,c.createRef()),o.current.get(e)},function(e){o.current.delete(e)}]),H=(0,m.Z)(Y,2),q=H[0],F=H[1],z="top"===w||"bottom"===w,X=D(0,(function(e,t){z&&j&&j({direction:e>t?"left":"right"})})),J=(0,m.Z)(X,2),Q=J[0],_=J[1],$=D(0,(function(e,t){!z&&j&&j({direction:e>t?"top":"bottom"})})),ee=(0,m.Z)($,2),te=ee[0],ne=ee[1],ae=(0,c.useState)(0),re=(0,m.Z)(ae,2),ce=re[0],oe=re[1],ie=(0,c.useState)(0),le=(0,m.Z)(ie,2),ue=le[0],se=le[1],de=(0,c.useState)(0),fe=(0,m.Z)(de,2),ve=fe[0],me=fe[1],be=(0,c.useState)(0),pe=(0,m.Z)(be,2),he=pe[0],ye=pe[1],Ee=(0,c.useState)(null),ge=(0,m.Z)(Ee,2),Ze=ge[0],Ae=ge[1],ke=(0,c.useState)(null),xe=(0,m.Z)(ke,2),Ce=xe[0],we=xe[1],Ne=(0,c.useState)(0),Oe=(0,m.Z)(Ne,2),Pe=Oe[0],Se=Oe[1],Ie=(0,c.useState)(0),Te=(0,m.Z)(Ie,2),Re=Te[0],je=Te[1],Me=function(e){var t=(0,c.useRef)([]),n=(0,c.useState)({}),a=(0,m.Z)(n,2)[1],r=(0,c.useRef)("function"==typeof e?e():e),o=x((function(){var e=r.current;t.current.forEach((function(t){e=t(e)})),t.current=[],r.current=e,a({})}));return[r.current,function(e){t.current.push(e),o()}]}(new Map),Be=(0,m.Z)(Me,2),Le=Be[0],De=Be[1],Ke=function(e,t,n){return(0,c.useMemo)((function(){for(var n,a=new Map,r=t.get(null===(n=e[0])||void 0===n?void 0:n.key)||O,c=r.left+r.width,o=0;o<e.length;o+=1){var i,l=e[o].key,u=t.get(l);u||(u=t.get(null===(i=e[o-1])||void 0===i?void 0:i.key)||O);var s=a.get(l)||(0,h.Z)({},u);s.right=c-s.left-s.width,a.set(l,s)}return a}),[e.map((function(e){return e.key})).join("_"),t,n])}(s,Le,ce),Ge="".concat(u,"-nav-operations-hidden"),We=0,Ue=0;function Ve(e){return e<We?We:e>Ue?Ue:e}z?y?(We=0,Ue=Math.max(0,ce-Ze)):(We=Math.min(0,Ze-ce),Ue=0):(We=Math.min(0,Ce-ue),Ue=0);var Ye=(0,c.useRef)(),He=(0,c.useState)(),qe=(0,m.Z)(He,2),Fe=qe[0],ze=qe[1];function Xe(){ze(Date.now())}function Je(){window.clearTimeout(Ye.current)}function Qe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=Ke.get(e)||{width:0,height:0,left:0,right:0,top:0};if(z){var n=Q;y?t.right<Q?n=t.right:t.right+t.width>Q+Ze&&(n=t.right+t.width-Ze):t.left<-Q?n=-t.left:t.left+t.width>-Q+Ze&&(n=-(t.left+t.width-Ze)),ne(0),_(Ve(n))}else{var a=te;t.top<-te?a=-t.top:t.top+t.height>-te+Ce&&(a=-(t.top+t.height-Ce)),_(0),ne(Ve(a))}}!function(e,t){var n=(0,c.useState)(),a=(0,m.Z)(n,2),r=a[0],o=a[1],i=(0,c.useState)(0),l=(0,m.Z)(i,2),u=l[0],s=l[1],d=(0,c.useState)(0),f=(0,m.Z)(d,2),v=f[0],b=f[1],p=(0,c.useState)(),h=(0,m.Z)(p,2),y=h[0],E=h[1],g=(0,c.useRef)(),Z=(0,c.useRef)(),A=(0,c.useRef)(null);A.current={onTouchStart:function(e){var t=e.touches[0],n=t.screenX,a=t.screenY;o({x:n,y:a}),window.clearInterval(g.current)},onTouchMove:function(e){if(r){e.preventDefault();var n=e.touches[0],a=n.screenX,c=n.screenY;o({x:a,y:c});var i=a-r.x,l=c-r.y;t(i,l);var d=Date.now();s(d),b(d-u),E({x:i,y:l})}},onTouchEnd:function(){if(r&&(o(null),E(null),y)){var e=y.x/v,n=y.y/v,a=Math.abs(e),c=Math.abs(n);if(Math.max(a,c)<.1)return;var i=e,l=n;g.current=window.setInterval((function(){Math.abs(i)<.01&&Math.abs(l)<.01?window.clearInterval(g.current):t(20*(i*=L),20*(l*=L))}),20)}},onWheel:function(e){var n=e.deltaX,a=e.deltaY,r=0,c=Math.abs(n),o=Math.abs(a);c===o?r="x"===Z.current?n:a:c>o?(r=n,Z.current="x"):(r=a,Z.current="y"),t(-r,-r)&&e.preventDefault()}},c.useEffect((function(){function t(e){A.current.onTouchMove(e)}function n(e){A.current.onTouchEnd(e)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",n,{passive:!1}),e.current.addEventListener("touchstart",(function(e){A.current.onTouchStart(e)}),{passive:!1}),e.current.addEventListener("wheel",(function(e){A.current.onWheel(e)})),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",n)}}),[])}(G,(function(e,t){function n(e,t){e((function(e){return Ve(e+t)}))}if(z){if(Ze>=ce)return!1;n(_,e)}else{if(Ce>=ue)return!1;n(ne,t)}return Je(),Xe(),!0})),(0,c.useEffect)((function(){return Je(),Fe&&(Ye.current=window.setTimeout((function(){ze(0)}),100)),Je}),[Fe]);var _e=function(e,t,n,a,r){var o,i,l,u=r.tabs,s=r.tabPosition,d=r.rtl;["top","bottom"].includes(s)?(o="width",i=d?"right":"left",l=Math.abs(t.left)):(o="height",i="top",l=-t.top);var f=t[o],v=n[o],m=a[o],b=f;return v+m>f&&(b=f-m),(0,c.useMemo)((function(){if(!u.length)return[0,0];for(var t=u.length,n=t,a=0;a<t;a+=1){var r=e.get(u[a].key)||P;if(r[i]+r[o]>l+b){n=a-1;break}}for(var c=0,s=t-1;s>=0;s-=1)if((e.get(u[s].key)||P)[i]<l){c=s+1;break}return[c,n]}),[e,l,b,s,u.map((function(e){return e.key})).join("_"),d])}(Ke,{width:Ze,height:Ce,left:Q,top:te},{width:ve,height:he},{width:Pe,height:Re},(0,h.Z)((0,h.Z)({},e),{},{tabs:s})),$e=(0,m.Z)(_e,2),et=$e[0],tt=$e[1],nt={};"top"===w||"bottom"===w?nt[y?"marginRight":"marginLeft"]=S:nt.marginTop=S;var at=s.map((function(e,t){var n=e.key,a=e.className;return c.createElement(N,{id:v,prefixCls:u,key:n,tab:e,style:0===t?void 0:nt,className:a,closable:e.closable,editable:g,active:n===p,renderWrapper:I,removeAriaLabel:null==C?void 0:C.removeAriaLabel,ref:q(n),onClick:function(e){T(n,e)},onRemove:function(){F(n)},onFocus:function(){Qe(n),Xe(),G.current&&(y||(G.current.scrollLeft=0),G.current.scrollTop=0)}})})),rt=x((function(){var e,t,n,a,r,c,o,i,l,u=(null===(e=G.current)||void 0===e?void 0:e.offsetWidth)||0,d=(null===(t=G.current)||void 0===t?void 0:t.offsetHeight)||0,f=(null===(n=V.current)||void 0===n?void 0:n.offsetWidth)||0,v=(null===(a=V.current)||void 0===a?void 0:a.offsetHeight)||0,m=(null===(r=U.current)||void 0===r?void 0:r.offsetWidth)||0,b=(null===(c=U.current)||void 0===c?void 0:c.offsetHeight)||0;Ae(u),we(d),Se(f),je(v);var p=((null===(o=W.current)||void 0===o?void 0:o.offsetWidth)||0)-f,h=((null===(i=W.current)||void 0===i?void 0:i.offsetHeight)||0)-v;oe(p),se(h);var y=null===(l=U.current)||void 0===l?void 0:l.className.includes(Ge);me(p-(y?0:m)),ye(h-(y?0:b)),De((function(){var e=new Map;return s.forEach((function(t){var n=t.key,a=q(n).current;a&&e.set(n,{width:a.offsetWidth,height:a.offsetHeight,left:a.offsetLeft,top:a.offsetTop})})),e}))})),ct=s.slice(0,et),ot=s.slice(tt+1),it=[].concat((0,Z.Z)(ct),(0,Z.Z)(ot)),lt=(0,c.useState)(),ut=(0,m.Z)(lt,2),st=ut[0],dt=ut[1],ft=Ke.get(p),vt=(0,c.useRef)();function mt(){A.Z.cancel(vt.current)}(0,c.useEffect)((function(){var e={};return ft&&(z?(y?e.right=ft.right:e.left=ft.left,e.width=ft.width):(e.top=ft.top,e.height=ft.height)),mt(),vt.current=(0,A.Z)((function(){dt(e)})),mt}),[ft,z,y]),(0,c.useEffect)((function(){Qe()}),[p,ft,Ke,z]),(0,c.useEffect)((function(){rt()}),[y,S,p,s.map((function(e){return e.key})).join("_")]);var bt,pt,ht,yt,Et=!!it.length,gt="".concat(u,"-nav-wrap");return z?y?(pt=Q>0,bt=Q+Ze<ce):(bt=Q<0,pt=-Q+Ze<ce):(ht=te<0,yt=-te+Ce<ue),c.createElement("div",{ref:t,role:"tablist",className:i()("".concat(u,"-nav"),d),style:f,onKeyDown:function(){Xe()}},c.createElement(K,{position:"left",extra:E,prefixCls:u}),c.createElement(k.Z,{onResize:rt},c.createElement("div",{className:i()(gt,(n={},(0,a.Z)(n,"".concat(gt,"-ping-left"),bt),(0,a.Z)(n,"".concat(gt,"-ping-right"),pt),(0,a.Z)(n,"".concat(gt,"-ping-top"),ht),(0,a.Z)(n,"".concat(gt,"-ping-bottom"),yt),n)),ref:G},c.createElement(k.Z,{onResize:rt},c.createElement("div",{ref:W,className:"".concat(u,"-nav-list"),style:{transform:"translate(".concat(Q,"px, ").concat(te,"px)"),transition:Fe?"none":void 0}},at,c.createElement(R,{ref:V,prefixCls:u,locale:C,editable:g,style:(0,h.Z)((0,h.Z)({},0===at.length?void 0:nt),{},{visibility:Et?"hidden":null})}),c.createElement("div",{className:i()("".concat(u,"-ink-bar"),(0,a.Z)({},"".concat(u,"-ink-bar-animated"),b.inkBar)),style:st}))))),c.createElement(M,(0,r.Z)({},e,{removeAriaLabel:null==C?void 0:C.removeAriaLabel,ref:U,prefixCls:u,tabs:it,className:!Et&&Ge,tabMoving:!!Fe})),c.createElement(K,{position:"right",extra:E,prefixCls:u}))}var W=c.forwardRef(G);function U(e){var t=e.id,n=e.activeKey,r=e.animated,o=e.tabPosition,l=e.rtl,u=e.destroyInactiveTabPane,s=c.useContext(B),d=s.prefixCls,f=s.tabs,v=r.tabPane,m=f.findIndex((function(e){return e.key===n}));return c.createElement("div",{className:i()("".concat(d,"-content-holder"))},c.createElement("div",{className:i()("".concat(d,"-content"),"".concat(d,"-content-").concat(o),(0,a.Z)({},"".concat(d,"-content-animated"),v)),style:m&&v?(0,a.Z)({},l?"marginRight":"marginLeft","-".concat(m,"00%")):null},f.map((function(e){return c.cloneElement(e.node,{key:e.key,prefixCls:d,tabKey:e.key,id:t,animated:v,active:e.key===n,destroyInactiveTabPane:u})}))))}function V(e){var t=e.prefixCls,n=e.forceRender,a=e.className,r=e.style,o=e.id,l=e.active,u=e.animated,s=e.destroyInactiveTabPane,d=e.tabKey,f=e.children,v=c.useState(n),b=(0,m.Z)(v,2),p=b[0],y=b[1];c.useEffect((function(){l?y(!0):s&&y(!1)}),[l,s]);var E={};return l||(u?(E.visibility="hidden",E.height=0,E.overflowY="hidden"):E.display="none"),c.createElement("div",{id:o&&"".concat(o,"-panel-").concat(d),role:"tabpanel",tabIndex:l?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(d),"aria-hidden":!l,style:(0,h.Z)((0,h.Z)({},E),r),className:i()("".concat(t,"-tabpane"),l&&"".concat(t,"-tabpane-active"),a)},(l||p||n)&&f)}var Y=["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"],H=0;function q(e,t){var n,o,l=e.id,u=e.prefixCls,s=void 0===u?"rc-tabs":u,d=e.className,f=e.children,v=e.direction,Z=e.activeKey,A=e.defaultActiveKey,k=e.editable,x=e.animated,C=void 0===x?{inkBar:!0,tabPane:!1}:x,w=e.tabPosition,N=void 0===w?"top":w,O=e.tabBarGutter,P=e.tabBarStyle,S=e.tabBarExtraContent,I=e.locale,T=e.moreIcon,R=e.moreTransitionName,j=e.destroyInactiveTabPane,M=e.renderTabBar,L=e.onChange,D=e.onTabClick,K=e.onTabScroll,G=(0,p.Z)(e,Y),V=function(e){return(0,y.Z)(e).map((function(e){if(c.isValidElement(e)){var t=void 0!==e.key?String(e.key):void 0;return(0,h.Z)((0,h.Z)({key:t},e.props),{},{node:e})}return null})).filter((function(e){return e}))}(f),q="rtl"===v;o=!1===C?{inkBar:!1,tabPane:!1}:!0===C?{inkBar:!0,tabPane:!0}:(0,h.Z)({inkBar:!0,tabPane:!1},"object"===(0,b.Z)(C)?C:{});var F=(0,c.useState)(!1),z=(0,m.Z)(F,2),X=z[0],J=z[1];(0,c.useEffect)((function(){J((0,E.Z)())}),[]);var Q=(0,g.Z)((function(){var e;return null===(e=V[0])||void 0===e?void 0:e.key}),{value:Z,defaultValue:A}),_=(0,m.Z)(Q,2),$=_[0],ee=_[1],te=(0,c.useState)((function(){return V.findIndex((function(e){return e.key===$}))})),ne=(0,m.Z)(te,2),ae=ne[0],re=ne[1];(0,c.useEffect)((function(){var e,t=V.findIndex((function(e){return e.key===$}));-1===t&&(t=Math.max(0,Math.min(ae,V.length-1)),ee(null===(e=V[t])||void 0===e?void 0:e.key));re(t)}),[V.map((function(e){return e.key})).join("_"),$,ae]);var ce=(0,g.Z)(null,{value:l}),oe=(0,m.Z)(ce,2),ie=oe[0],le=oe[1],ue=N;X&&!["left","right"].includes(N)&&(ue="top"),(0,c.useEffect)((function(){l||(le("rc-tabs-".concat(H)),H+=1)}),[]);var se,de={id:ie,activeKey:$,animated:o,tabPosition:ue,rtl:q,mobile:X},fe=(0,h.Z)((0,h.Z)({},de),{},{editable:k,locale:I,moreIcon:T,moreTransitionName:R,tabBarGutter:O,onTabClick:function(e,t){null==D||D(e,t),ee(e),null==L||L(e)},onTabScroll:K,extra:S,style:P,panes:f});return se=M?M(fe,W):c.createElement(W,fe),c.createElement(B.Provider,{value:{tabs:V,prefixCls:s}},c.createElement("div",(0,r.Z)({ref:t,id:l,className:i()(s,"".concat(s,"-").concat(ue),(n={},(0,a.Z)(n,"".concat(s,"-mobile"),X),(0,a.Z)(n,"".concat(s,"-editable"),k),(0,a.Z)(n,"".concat(s,"-rtl"),q),n),d)},G),se,c.createElement(U,(0,r.Z)({destroyInactiveTabPane:j},de,{animated:o}))))}var F=c.forwardRef(q);F.TabPane=V;var z=F,X=n(16002),J={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},Q=n(84971),_=function(e,t){return c.createElement(Q.Z,(0,h.Z)((0,h.Z)({},e),{},{ref:t,icon:J}))};_.displayName="PlusOutlined";var $=c.forwardRef(_),ee=n(15663),te=n(80200),ne=n(82226),ae=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n};function re(e){var t,n=e.type,o=e.className,l=e.size,s=e.onEdit,d=e.hideAdd,f=e.centered,v=e.addIcon,m=ae(e,["type","className","size","onEdit","hideAdd","centered","addIcon"]),b=m.prefixCls,p=m.moreIcon,h=void 0===p?c.createElement(X.Z,null):p,y=c.useContext(u.E_),E=y.getPrefixCls,g=y.direction,Z=E("tabs",b);"editable-card"===n&&(t={onEdit:function(e,t){var n=t.key,a=t.event;null==s||s("add"===e?a:n,e)},removeIcon:c.createElement(ee.Z,null),addIcon:v||c.createElement($,null),showAdd:!0!==d});var A=E();return(0,te.Z)(!("onPrevClick"in m)&&!("onNextClick"in m),"Tabs","`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."),c.createElement(ne.Z.Consumer,null,(function(e){var u,s=void 0!==l?l:e;return c.createElement(z,(0,r.Z)({direction:g,moreTransitionName:"".concat(A,"-slide-up")},m,{className:i()((u={},(0,a.Z)(u,"".concat(Z,"-").concat(s),s),(0,a.Z)(u,"".concat(Z,"-card"),["card","editable-card"].includes(n)),(0,a.Z)(u,"".concat(Z,"-editable-card"),"editable-card"===n),(0,a.Z)(u,"".concat(Z,"-centered"),f),u),o),editable:t,moreIcon:h,prefixCls:Z}))}))}re.TabPane=V;var ce=re,oe=n(23148),ie=n(56452),le=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n};var ue=function(e){var t,n,o,s=c.useContext(u.E_),f=s.getPrefixCls,v=s.direction,m=c.useContext(ne.Z),b=e.prefixCls,p=e.className,h=e.extra,y=e.headStyle,E=void 0===y?{}:y,g=e.bodyStyle,Z=void 0===g?{}:g,A=e.title,k=e.loading,x=e.bordered,C=void 0===x||x,w=e.size,N=e.type,O=e.cover,P=e.actions,S=e.tabList,I=e.children,T=e.activeTabKey,R=e.defaultActiveTabKey,j=e.tabBarExtraContent,M=e.hoverable,B=e.tabProps,L=void 0===B?{}:B,D=le(e,["prefixCls","className","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),K=f("card",b),G=0===Z.padding||"0px"===Z.padding?{padding:24}:void 0,W=c.createElement("div",{className:"".concat(K,"-loading-block")}),U=c.createElement("div",{className:"".concat(K,"-loading-content"),style:G},c.createElement(oe.Z,{gutter:8},c.createElement(ie.Z,{span:22},W)),c.createElement(oe.Z,{gutter:8},c.createElement(ie.Z,{span:8},W),c.createElement(ie.Z,{span:15},W)),c.createElement(oe.Z,{gutter:8},c.createElement(ie.Z,{span:6},W),c.createElement(ie.Z,{span:18},W)),c.createElement(oe.Z,{gutter:8},c.createElement(ie.Z,{span:13},W),c.createElement(ie.Z,{span:9},W)),c.createElement(oe.Z,{gutter:8},c.createElement(ie.Z,{span:4},W),c.createElement(ie.Z,{span:3},W),c.createElement(ie.Z,{span:16},W))),V=void 0!==T,Y=(0,r.Z)((0,r.Z)({},L),(t={},(0,a.Z)(t,V?"activeKey":"defaultActiveKey",V?T:R),(0,a.Z)(t,"tabBarExtraContent",j),t)),H=S&&S.length?c.createElement(ce,(0,r.Z)({size:"large"},Y,{className:"".concat(K,"-head-tabs"),onChange:function(t){var n;null===(n=e.onTabChange)||void 0===n||n.call(e,t)}}),S.map((function(e){return c.createElement(ce.TabPane,{tab:e.tab,disabled:e.disabled,key:e.key})}))):null;(A||h||H)&&(o=c.createElement("div",{className:"".concat(K,"-head"),style:E},c.createElement("div",{className:"".concat(K,"-head-wrapper")},A&&c.createElement("div",{className:"".concat(K,"-head-title")},A),h&&c.createElement("div",{className:"".concat(K,"-extra")},h)),H));var q,F=O?c.createElement("div",{className:"".concat(K,"-cover")},O):null,z=c.createElement("div",{className:"".concat(K,"-body"),style:Z},k?U:I),X=P&&P.length?c.createElement("ul",{className:"".concat(K,"-actions")},function(e){return e.map((function(t,n){return c.createElement("li",{style:{width:"".concat(100/e.length,"%")},key:"action-".concat(n)},c.createElement("span",null,t))}))}(P)):null,J=(0,l.Z)(D,["onTabChange"]),Q=w||m,_=i()(K,(n={},(0,a.Z)(n,"".concat(K,"-loading"),k),(0,a.Z)(n,"".concat(K,"-bordered"),C),(0,a.Z)(n,"".concat(K,"-hoverable"),M),(0,a.Z)(n,"".concat(K,"-contain-grid"),(c.Children.forEach(e.children,(function(e){e&&e.type&&e.type===d&&(q=!0)})),q)),(0,a.Z)(n,"".concat(K,"-contain-tabs"),S&&S.length),(0,a.Z)(n,"".concat(K,"-").concat(Q),Q),(0,a.Z)(n,"".concat(K,"-type-").concat(N),!!N),(0,a.Z)(n,"".concat(K,"-rtl"),"rtl"===v),n),p);return c.createElement("div",(0,r.Z)({},J,{className:_}),o,F,z,X)};ue.Grid=d,ue.Meta=v;var se=ue},56452:function(e,t,n){var a=n(87482);t.Z=a.Z},58986:function(e,t){t.Z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAAAgVBMVEUAAAAAnPsArPIAieEAieEAjOcAiOEAl+kAi+UAh/EAieIAjOYAjOcAjOYAieAAjegAjOYAi+UAiuMAi+QAjOcAi+YAi+YAjOcAi+UAiuMAjOcAjOcAiuIAjukAi+UAjecAjOcAh98AjuoAieEAkOwAkvAAjOYAk/EAjukAlvYAm/45iDkjAAAAI3RSTlMAAwH6/KBNCuIG/vRs1YTkeN+L7pV/6TPQtHFkUiTGXkhAEg+N45EAAAFnSURBVGje7dnbboJAEIDhmWWtLIe2nD1r3WUB3/8BSwANmtQayyRNnD9cwSRfyFwOcBz38om7TWT8+n3ScJSYUkEIfPejyw1HRR99+eL4dwWhWAVd62Vl6yFbhuugb68mXcmXceSQU6Ykm1CwMVIPOeUMFPZNasHbNYLQxwgjjDDCCCOMMMIII4wwwggjjDDCCCOvgSDSI6J9qBEB2QGQFkHYnmJqREF8yogRAce8eSdGFKTGECMIhXUqWgRBhDUxIhBmpUOLtEZWOZoUaY2gHSVFEFpDa1JEAaRGkyIoYLurJCEiEAEC3ziaBhkEOCxKT2oSRGAnqM3O1O1vPIGgun9uGs6BWMSRMVLqa+SJw5knvTbp3RzO5tt9GtrSOsPAeehRBKHIPrtWS2Mvmah/mcXxbLlIbNMY69nrvCZ+GFnVid+VuKNy/1KS5G4URe5tkb9+fPHq3HycGjX/IfhniacDjuNevW+PO4aeoX6/TQAAAABJRU5ErkJggg=="}}]);
//# sourceMappingURL=294ab51f2241fff6aef7411a6bceba79ca2b1ef1-0840ebd10514943b8b60.js.map