1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1545],{7570:(function(ne,h,n){n.r(h),n.d(h,{default:function(){return z}});var C=n(57704),y=n.n(C),i=n(65788),E=n.n(i),g=n(55472),A=n.n(g),N=n(54299),p=n(39982),I=n(18466),K=n(6758),U=n(76648),Y=n(65744),G=n(79177),M=n(86807),Q=n(9182),a=n.n(Q),B=n(37953),W=n(55880);function J(){return(0,W.request)("/api/v1/admin/plugin/version_list",{method:"POST",data:{}})}function X(c){return"/api/v1/admin/plugin/download?fileName=".concat(encodeURIComponent(c))}var d=n(15621);function Z(c){return typeof c!="number"||Number.isNaN(c)||c<0?"-":c<1024?"".concat(c," B"):c<1024*1024?"".concat((c/1024).toFixed(2)," KB"):"".concat((c/1024/1024).toFixed(2)," MB")}function x(c){return(c==null?void 0:c.version)||"-"}var D=function(){var b=(0,B.useState)([]),L=A()(b,2),R=L[0],w=L[1],O=R.reduce(function(s,t){var e=x(t);return s[e]=(s[e]||0)+1,s},{}),F=Object.keys(O).filter(function(s){return O[s]>1}).map(function(s){return{version:s,items:R.filter(function(t){return x(t)===s})}}),k=function(t){if(!(t!=null&&t.fileName)){U.Ay.error("\u6587\u4EF6\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u4E0B\u8F7D");return}var e=document.createElement("a");e.href=X(t.fileName),e.download=t.fileName,e.style.display="none",document.body.appendChild(e),e.click(),document.body.removeChild(e)},$=(0,B.useCallback)(E()(y()().mark(function s(){var t,e;return y()().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,J();case 2:return t=r.sent,(0,p.y)(t,{showError:!0,errorMessage:"\u83B7\u53D6\u5386\u53F2\u7248\u672C\u5217\u8868\u5931\u8D25"}),e=(0,N.UO)(t==null?void 0:t.data),w(e),r.abrupt("return",{data:e,success:(t==null?void 0:t.success)===!0});case 7:case"end":return r.stop()}},s)})),[]);return(0,d.jsxs)(K.Ay,{ghost:!0,children:[F.length>0&&(0,d.jsx)(Y.A,{type:"warning",showIcon:!0,style:{marginBottom:12},message:"\u68C0\u6D4B\u5230 ".concat(F.length," \u4E2A\u7248\u672C\u53F7\u51B2\u7A81\uFF0C\u8BF7\u786E\u8BA4\u540E\u518D\u4E0B\u8F7D"),description:(0,d.jsx)("ul",{style:{margin:0,paddingLeft:18},children:F.map(function(s){var t=s.version,e=s.items;return(0,d.jsxs)("li",{children:[(0,d.jsx)("b",{children:t}),"\uFF08",e.length," \u4E2A\u6587\u4EF6\uFF09\uFF1A",e.map(function(o){return o.fileName}).join("\u3001")]},t)})})}),(0,d.jsx)(I.A,{rowKey:"fileName",search:!1,pagination:!1,options:{density:!1,setting:!1},request:$,columns:[{dataIndex:"version",title:"\u7248\u672C\u53F7",width:200,render:function(t,e){var o=(O[x(e)]||0)>1;return(0,d.jsxs)("span",{children:[x(e),o&&(0,d.jsx)(G.A,{color:"error",style:{marginLeft:8},children:"\u7248\u672C\u51B2\u7A81"})]})}},{dataIndex:"fileName",title:"\u6587\u4EF6\u540D",ellipsis:!0},{dataIndex:"size",title:"\u6587\u4EF6\u5927\u5C0F",width:140,render:function(t,e){return Z(e.size)}},{dataIndex:"lastModified",title:"\u4E0A\u4F20\u65F6\u95F4",width:200,render:function(t,e){return e.lastModified?a()(e.lastModified).format("YYYY-MM-DD HH:mm:ss"):"-"}},{title:"\u64CD\u4F5C",width:120,fixed:"right",render:function(t,e){return(0,d.jsx)(M.A,{type:"link",onClick:function(){return k(e)},children:"\u4E0B\u8F7D"})}}]})]})},z=D}),39982:(function(ne,h,n){n.d(h,{y:function(){return y}});var C=n(24619);function y(i,E){if((i==null?void 0:i.success)!==!0){var g=E||{},A=g.showError,N=A===void 0?!0:A,p=g.errorMessage,I=p===void 0?"":p;N&&C.A.error({message:"\u9519\u8BEF",description:(i==null?void 0:i.msg)||(i==null?void 0:i.message)||I})}}}),65744:(function(ne,h,n){n.d(h,{A:function(){return s}});var C=n(65062),y=n(73159),i=n(20873),E=n(8922),g=n(67419),A=n(1769),N=n(72468),p=n(10056),I=n(67032),K=n(73141),U=n(34550),Y=n(32867),G=n(97500),M=n.n(G),Q=n(15550),a=n(37953),B=n(57982),W=n(46240),J=n(65967),X=n(71267),d=n(60919),Z=n(16032),x=n(2666),D=n(37388),z=n(78097);function c(t,e,o){return e=(0,D.A)(e),(0,Z.A)(t,(0,x.A)()?Reflect.construct(e,o||[],(0,D.A)(t).constructor):e.apply(t,o))}var b=(function(t){(0,z.A)(e,t);function e(){var o;return(0,X.A)(this,e),o=c(this,e,arguments),o.state={error:void 0,info:{componentStack:""}},o}return(0,d.A)(e,[{key:"componentDidCatch",value:function(r,l){this.setState({error:r,info:l})}},{key:"render",value:function(){var r=this.props,l=r.message,f=r.description,v=r.children,V=this.state,H=V.error,S=V.info,q=S&&S.componentStack?S.componentStack:null,_=typeof l=="undefined"?(H||"").toString():l,ee=typeof f=="undefined"?q:f;return H?a.createElement(s,{type:"error",message:_,description:a.createElement("pre",null,ee)}):v}}]),e})(a.Component),L=b,R=function(t,e){var o={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(o[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,r=Object.getOwnPropertySymbols(t);l<r.length;l++)e.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(t,r[l])&&(o[r[l]]=t[r[l]]);return o},w={success:E.A,info:U.A,error:A.A,warning:I.A},O={success:g.A,info:Y.A,error:N.A,warning:K.A},F=function(e){var o=e.description,r=e.icon,l=e.prefixCls,f=e.type,v=(o?O:w)[f]||null;return r?(0,J.fx)(r,a.createElement("span",{className:"".concat(l,"-icon")},r),function(){return{className:M()("".concat(l,"-icon"),(0,i.A)({},r.props.className,r.props.className))}}):a.createElement(v,{className:"".concat(l,"-icon")})},k=function(e){var o=e.isClosable,r=e.closeText,l=e.prefixCls,f=e.closeIcon,v=e.handleClose;return o?a.createElement("button",{type:"button",onClick:v,className:"".concat(l,"-close-icon"),tabIndex:0},r?a.createElement("span",{className:"".concat(l,"-close-text")},r):f):null},$=function(e){var o=e.description,r=e.prefixCls,l=e.message,f=e.banner,v=e.className,V=v===void 0?"":v,H=e.style,S=e.onMouseEnter,q=e.onMouseLeave,_=e.onClick,ee=e.afterClose,te=e.showIcon,de=e.closable,re=e.closeText,oe=e.closeIcon,fe=oe===void 0?a.createElement(p.A,null):oe,ae=e.action,P=R(e,["description","prefixCls","message","banner","className","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action"]),ve=a.useState(!1),se=(0,y.A)(ve,2),le=se[0],me=se[1],Ce=a.useRef(),ie=a.useContext(B.QO),he=ie.getPrefixCls,ye=ie.direction,u=he("alert",r),ge=function(m){var T;me(!0),(T=P.onClose)===null||T===void 0||T.call(P,m)},Ae=function(){var m=P.type;
1return m!==void 0?m:f?"warning":"info"},pe=re?!0:de,ce=Ae(),ue=f&&te===void 0?!0:te,xe=M()(u,"".concat(u,"-").concat(ce),(0,i.A)((0,i.A)((0,i.A)((0,i.A)({},"".concat(u,"-with-description"),!!o),"".concat(u,"-no-icon"),!ue),"".concat(u,"-banner"),!!f),"".concat(u,"-rtl"),ye==="rtl"),V),Ee=(0,W.A)(P);return a.createElement(Q.Ay,{visible:!le,motionName:"".concat(u,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:function(m){return{maxHeight:m.offsetHeight}},onLeaveEnd:ee},function(j){var m=j.className,T=j.style;return a.createElement("div",(0,C.A)({ref:Ce,"data-show":!le,className:M()(xe,m),style:(0,C.A)((0,C.A)({},H),T),onMouseEnter:S,onMouseLeave:q,onClick:_,role:"alert"},Ee),ue?a.createElement(F,{description:o,icon:P.icon,prefixCls:u,type:ce}):null,a.createElement("div",{className:"".concat(u,"-content")},l?a.createElement("div",{className:"".concat(u,"-message")},l):null,o?a.createElement("div",{className:"".concat(u,"-description")},o):null),ae?a.createElement("div",{className:"".concat(u,"-action")},ae):null,a.createElement(k,{isClosable:!!pe,closeText:re,prefixCls:u,closeIcon:fe,handleClose:ge}))})};$.ErrorBoundary=L;var s=$})}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.