eiam/eiam-portal/src/main/resources/fe/p__Audit__index.0aacc638.as...

2 lines
18 KiB
JavaScript

"use strict";(self.webpackChunktopiam_portal=self.webpackChunktopiam_portal||[]).push([[956],{82665:function(re,L,t){t.r(L),t.d(L,{default:function(){return ye}});var h=t(97983),N=t.n(h),z=t(40794),$=t.n(z),U=t(12741),D=t.n(U),f=t(39398),l=t(1413),m=t(67294),g={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"},c=g,E=t(84089),C=function(T,p){return m.createElement(E.Z,(0,l.Z)((0,l.Z)({},T),{},{ref:p,icon:c}))};C.displayName="CaretRightOutlined";var M=m.forwardRef(C),u=t(19847),Z=t(65767),X=t(92652),ve=t(2093),le=t(98033),_=t(34041),se=t(76521),me=t(26713),oe=t(51904),he=t(27484),ce=t.n(he),ge=t(17057),ie=t(95462),pe=t(30381),d=t.n(pe),n=t(12812),i=t.n(n),o=t(38755);function v(b){var T=".".concat(b),p=(0,o.l)(function(){var y;return i()({},"".concat(T),(y={display:"flex","padding-left":"10px"},i()(y,"&-line-user",{flex:1,"margin-right":"24px"}),i()(y,"&-line-event",{flex:1,"margin-right":"24px"}),i()(y,"&-line-geo",{flex:1,"margin-right":"24px"}),i()(y,"&-label",{display:"block","min-width":"80px",color:"#878a95","font-size":"14px"}),i()(y,"&-content",{display:"block","flex-wrap":"wrap","overflow-x":"auto",color:"#293350","font-size":"14px"}),i()(y,"&-each-line",{display:"flex","margin-bottom":"14px"}),i()(y,"&-target",{flex:1}),y))});return{className:p}}var A=t(94184),a=t.n(A),F;(function(b){b.admin="admin",b.user="user"})(F||(F={}));var R;(function(b){b.success="success",b.fail="fail"})(R||(R={}));var e=t(85893),r="audit-expanded-card",V=ge.Z.Text,W=function(T){var p,y,w,I,x,O,j,s=T.record,S=v(r),B=S.className,q=function(Y){return!Y||Y==="null"||Y==="-"||Y==="undefined"?"-":Y};return(0,e.jsx)("div",{className:B,children:(0,e.jsxs)("div",{className:a()("".concat(r)),children:[(0,e.jsxs)("div",{className:a()("".concat(r,"-line-user")),children:[(0,e.jsxs)("div",{className:a()("".concat(r,"-each-line")),children:[(0,e.jsx)("span",{className:a()("".concat(r,"-label")),children:"\u64CD\u4F5C\u8005 ID"}),(0,e.jsx)("span",{className:a()("".concat(r,"-content")),children:(0,e.jsx)(ie.Z,{style:{marginBottom:0},className:a()("".concat(r,"-content")),copyable:!0,children:q(s.userId)})})]}),(0,e.jsxs)("div",{className:a()("".concat(r,"-each-line")),children:[(0,e.jsx)("span",{className:a()("".concat(r,"-label")),children:"\u64CD\u4F5C\u8005\u540D\u79F0"}),(0,e.jsx)("span",{className:a()("".concat(r,"-content")),children:q(s.username)})]})]}),(0,e.jsxs)("div",{className:a()("".concat(r,"-line-geo")),children:[(0,e.jsxs)("div",{className:a()("".concat(r,"-each-line")),children:[(0,e.jsx)("span",{className:a()("".concat(r,"-label")),children:"\u8BBE\u5907\u7C7B\u578B"}),(0,e.jsx)("span",{className:a()("".concat(r,"-content")),children:s.userAgent&&((p=s.userAgent)===null||p===void 0?void 0:p.deviceType)||"-"})]}),(0,e.jsxs)("div",{className:a()("".concat(r,"-each-line")),children:[(0,e.jsx)("span",{className:a()("".concat(r,"-label")),children:"\u64CD\u4F5C\u7CFB\u7EDF"}),(0,e.jsx)("span",{className:a()("".concat(r,"-content")),children:s.userAgent&&((y=s.userAgent)===null||y===void 0?void 0:y.platform)||"-"})]}),(0,e.jsxs)("div",{className:a()("".concat(r,"-each-line")),children:[(0,e.jsx)("span",{className:a()("".concat(r,"-label")),children:"\u5BA2\u6237\u7AEFIP"}),(0,e.jsx)("span",{className:a()("".concat(r,"-content")),children:((w=s.geoLocation)===null||w===void 0?void 0:w.ip)||"-"})]}),(0,e.jsxs)("div",{className:a()("".concat(r,"-each-line")),children:[(0,e.jsx)("span",{className:a()("".concat(r,"-label")),children:"\u6D4F\u89C8\u5668"}),(0,e.jsx)("span",{className:a()("".concat(r,"-content")),children:s.userAgent&&((I=s.userAgent)===null||I===void 0?void 0:I.browser)||"-"})]}),(0,e.jsxs)("div",{className:a()("".concat(r,"-each-line")),children:[(0,e.jsx)("span",{className:a()("".concat(r,"-label")),children:"\u56FD\u5BB6"}),(0,e.jsx)("span",{className:a()("".concat(r,"-content")),children:s.geoLocation&&((x=s.geoLocation)===null||x===void 0?void 0:x.countryName)||"-"})]}),(0,e.jsxs)("div",{className:a()("".concat(r,"-each-line")),children:[(0,e.jsx)("span",{className:a()("".concat(r,"-label")),children:"\u7701\u4EFD"}),(0,e.jsx)("span",{className:a()("".concat(r,"-content")),children:s.geoLocation&&((O=s.geoLocation)===null||O===void 0?void 0:O.provinceName)||"-"})]}),(0,e.jsxs)("div",{className:a()("".concat(r,"-each-line")),children:[(0,e.jsx)("span",{className:a()("".concat(r,"-label")),children:"\u57CE\u5E02"}),(0,e.jsx)("span",{className:a()("".concat(r,"-content")),children:s.geoLocation&&((j=s.geoLocation)===null||j===void 0?void 0:j.cityName)||"-"})]})]}),(0,e.jsxs)("div",{className:a()("".concat(r,"-line-event")),children:[(0,e.jsxs)("div",{className:a()("".concat(r,"-each-line")),children:[(0,e.jsx)("span",{className:a()("".concat(r,"-label")),children:"\u4E8B\u4EF6\u65F6\u95F4"}),(0,e.jsx)("span",{className:a()("".concat(r,"-content")),children:(0,e.jsx)(V,{style:{maxWidth:"100%"},ellipsis:!0,children:d()(s.eventTime).format("YYYY.MM.DD HH:mm:ss")})})]}),(0,e.jsxs)("div",{className:a()("".concat(r,"-each-line")),children:[(0,e.jsx)("span",{className:a()("".concat(r,"-label")),children:"\u4E8B\u4EF6\u7C7B\u578B"}),(0,e.jsx)("span",{className:a()("".concat(r,"-content")),children:s.eventType})]}),(0,e.jsxs)("div",{className:a()("".concat(r,"-each-line")),children:[(0,e.jsx)("span",{className:a()("".concat(r,"-label")),children:"\u4E8B\u4EF6\u72B6\u6001"}),(0,e.jsxs)("span",{className:a()("".concat(r,"-content")),children:[s.eventStatus===R.success&&(0,e.jsx)("span",{style:{color:"#87d068"},children:"\u6210\u529F"}),s.eventStatus===R.fail&&(0,e.jsx)("span",{style:{color:"#e54545"},children:"\u5931\u8D25"})]})]})]}),s.targets&&(0,e.jsx)("div",{className:a()("".concat(r,"-line-target")),children:(0,e.jsxs)("span",{className:a()("".concat(r,"-each-line")),children:[(0,e.jsx)("span",{className:a()("".concat(r,"-label")),children:"\u64CD\u4F5C\u5BF9\u8C61"}),(0,e.jsx)("span",{className:a()("".concat(r,"-content")),children:(0,e.jsx)("pre",{children:JSON.stringify(s.targets,null,3)},s.id)})]})})]})})},ee=t(11281),P=t.n(ee),J=t(40367),Q=t(98971);function ne(b,T,p){return K.apply(this,arguments)}function K(){return K=$()(N()().mark(function b(T,p,y){return N()().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.abrupt("return",(0,Q.request)("/api/audit/list",{params:P()(P()(P()({},T),{},{userType:"user",startEventTime:T.eventTime&&T.eventTime[0],endEventTime:T.eventTime&&T.eventTime[1]},(0,J.YE)(p)),(0,J.oH)(y))}).then(function(x){var O,j,s,S,B={data:x!=null&&(O=x.result)!==null&&O!==void 0&&O.list?x==null||(j=x.result)===null||j===void 0?void 0:j.list:[],success:x==null?void 0:x.success,total:x!=null&&(s=x.result)!==null&&s!==void 0&&s.pagination?x==null||(S=x.result)===null||S===void 0?void 0:S.pagination.total:0};return Promise.resolve(B)}));case 1:case"end":return I.stop()}},b)})),K.apply(this,arguments)}function k(){return te.apply(this,arguments)}function te(){return te=$()(N()().mark(function b(){return N()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.abrupt("return",(0,Q.request)("/api/audit/types/user"));case 1:case"end":return p.stop()}},b)})),te.apply(this,arguments)}var ue=t(46986),de=ue.ZP.ConfigContext;function xe(b){var T=".".concat(b),p=(0,m.useContext)(de),y=p.getPrefixCls,w=".".concat(y()),I=(0,o.l)(function(){return i()({},"".concat(T),i()({},"".concat(w,"-table-expanded-row-fixed"),{width:"auto !important"}))});return{className:I}}var fe=le.Z.RangePicker,H=_.Z.OptGroup,Ce=_.Z.Option,ae="audit-user",ye=function(){var b=(0,m.useRef)(),T=(0,X.Z)(),p=D()(T,2),y=p[0],w=p[1],I=xe(ae),x=I.className;(0,ve.Z)($()(N()().mark(function j(){var s,S,B;return N()().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.next=2,k();case 2:s=G.sent,S=s.result,B=s.success,B&&w(S);case 6:case"end":return G.stop()}},j)})),[]);var O=[{title:"\u4E8B\u4EF6\u7C7B\u578B",dataIndex:"eventType",fixed:"left",renderFormItem:function(){return(0,e.jsx)(_.Z,{placeholder:"\u8BF7\u9009\u62E9\u4E8B\u4EF6\u7C7B\u578B",showSearch:!0,allowClear:!0,mode:"multiple",maxTagCount:"responsive",children:y&&y.map(function(s){return(0,e.jsx)(H,{label:s.name,children:s.types&&s.types.map(function(S){return(0,e.jsx)(Ce,{value:S.code,children:S.name},S.code)})},s.code)})},"select")}},{title:"\u64CD\u4F5C\u8005",ellipsis:!0,dataIndex:"username",fieldProps:{placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D"}},{title:"\u5BA2\u6237\u7AEFIP",dataIndex:"geoLocation",ellipsis:!0,valueType:"text",hideInSearch:!0,render:function(s,S){var B=S.geoLocation;return B?(0,e.jsx)(se.Z,{status:"success",text:B.ip}):(0,e.jsx)(se.Z,{status:"error",text:"\u672A\u77E5"})}},{title:"\u64CD\u4F5C\u7CFB\u7EDF",ellipsis:!0,dataIndex:"platform",render:function(s,S){var B=S.userAgent;return B.platform}},{title:"\u6D4F\u89C8\u5668",ellipsis:!0,dataIndex:"browser",render:function(s,S){var B=S.userAgent;return B.browser}},{title:"\u4E8B\u4EF6\u65F6\u95F4",sorter:!0,defaultSortOrder:"descend",ellipsis:!0,align:"center",dataIndex:"eventTime",valueType:"dateTime",renderFormItem:function(){return(0,e.jsx)(fe,{showTime:{hideDisabledOptions:!0,defaultValue:[ce()("00:00:00","HH:mm:ss"),ce()("11:59:59","HH:mm:ss")]},placeholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"],format:"YYYY-MM-DD HH:mm:ss"})}},{title:"\u4E8B\u4EF6\u72B6\u6001",dataIndex:"eventStatus",hideInSearch:!0,align:"center",fixed:"right",width:150,render:function(s){return(0,e.jsxs)(me.Z,{children:[s===R.success&&(0,e.jsx)(oe.Z,{color:"#87d068",children:"\u6210\u529F"}),s===R.fail&&(0,e.jsx)(oe.Z,{color:"#e54545",children:"\u5931\u8D25"})]})}}];return(0,e.jsx)(u._z,{className:x,content:"\u5BA1\u8BA1\u65E5\u5FD7\u8BB0\u5F55\u4E86\u6240\u6709\u5E73\u53F0\u7528\u6237\u8FDB\u884C\u7684\u5173\u952E\u64CD\u4F5C\uFF0C\u65E0\u8BBA\u662F\u7BA1\u7406\u5458\u8FDB\u884C\u7684\u6279\u91CF\u64CD\u4F5C\u3001\u8FD8\u662F\u7528\u6237\u4FA7\u8FDB\u884C\u7684\u591A\u56E0\u7D20\u8BA4\u8BC1\uFF0C\u90FD\u53EF\u4EE5\u5728\u8FD9\u91CC\u627E\u5230\u5BF9\u5E94\u7684\u8BB0\u5F55\uFF0C\u4EE5\u5BF9\u67D0\u6B21\u6539\u53D8\u63D0\u4F9B\u5145\u5206\u7684\u6EAF\u6E90\u6570\u636E\u3002",children:(0,e.jsx)(Z.Z,{columns:O,scroll:{x:1200},pagination:{showQuickJumper:!0,defaultPageSize:10},search:{},expandable:{expandRowByClick:!0,expandedRowClassName:function(){return a()("".concat(ae))},expandedRowRender:function(s,S){return(0,e.jsx)(W,{record:s,index:S})},expandIcon:function(s){var S=s.expanded,B=s.onExpand,q=s.record;return S?(0,e.jsx)(f.Z,{onClick:function(Y){return B(q,Y)}}):(0,e.jsx)(M,{onClick:function(Y){return B(q,Y)}})}},actionRef:b,params:{userType:F.user},request:ne,rowKey:"id",dateFormatter:"string"})})}},2093:function(re,L,t){var h=t(67294),N=t(92770),z=function(D,f,l,m){function g(c){return c instanceof l?c:new l(function(E){E(c)})}return new(l||(l=Promise))(function(c,E){function C(Z){try{u(m.next(Z))}catch(X){E(X)}}function M(Z){try{u(m.throw(Z))}catch(X){E(X)}}function u(Z){Z.done?c(Z.value):g(Z.value).then(C,M)}u((m=m.apply(D,f||[])).next())})},$=function(D,f){var l={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},m,g,c,E;return E={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function C(u){return function(Z){return M([u,Z])}}function M(u){if(m)throw new TypeError("Generator is already executing.");for(;l;)try{if(m=1,g&&(c=u[0]&2?g.return:u[0]?g.throw||((c=g.return)&&c.call(g),0):g.next)&&!(c=c.call(g,u[1])).done)return c;switch(g=0,c&&(u=[u[0]&2,c.value]),u[0]){case 0:case 1:c=u;break;case 4:return l.label++,{value:u[1],done:!1};case 5:l.label++,g=u[1],u=[0];continue;case 7:u=l.ops.pop(),l.trys.pop();continue;default:if(c=l.trys,!(c=c.length>0&&c[c.length-1])&&(u[0]===6||u[0]===2)){l=0;continue}if(u[0]===3&&(!c||u[1]>c[0]&&u[1]<c[3])){l.label=u[1];break}if(u[0]===6&&l.label<c[1]){l.label=c[1],c=u;break}if(c&&l.label<c[2]){l.label=c[2],l.ops.push(u);break}c[2]&&l.ops.pop(),l.trys.pop();continue}u=f.call(D,l)}catch(Z){u=[6,Z],g=0}finally{m=c=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};function U(D,f){function l(m){return(0,N.mf)(m[Symbol.asyncIterator])}(0,h.useEffect)(function(){var m=D(),g=!1;function c(){return z(this,void 0,void 0,function(){var E;return $(this,function(C){switch(C.label){case 0:if(!l(m))return[3,4];C.label=1;case 1:return[4,m.next()];case 2:return E=C.sent(),E.done||g?[3,3]:[3,1];case 3:return[3,6];case 4:return[4,m];case 5:C.sent(),C.label=6;case 6:return[2]}})})}return c(),function(){g=!0}},f)}L.Z=U},92652:function(re,L,t){t.d(L,{Z:function(){return D}});var h=t(67294),N=function(){var l=(0,h.useRef)(!1);return(0,h.useEffect)(function(){return l.current=!1,function(){l.current=!0}},[]),l},z=N,$=function(f,l){var m=typeof Symbol=="function"&&f[Symbol.iterator];if(!m)return f;var g=m.call(f),c,E=[],C;try{for(;(l===void 0||l-- >0)&&!(c=g.next()).done;)E.push(c.value)}catch(M){C={error:M}}finally{try{c&&!c.done&&(m=g.return)&&m.call(g)}finally{if(C)throw C.error}}return E};function U(f){var l=z(),m=$((0,h.useState)(f),2),g=m[0],c=m[1],E=(0,h.useCallback)(function(C){l.current||c(C)},[]);return[g,E]}var D=U},92770:function(re,L,t){t.d(L,{mf:function(){return N}});var h=function(l){return l!==null&&typeof l=="object"},N=function(l){return typeof l=="function"},z=function(l){return typeof l=="string"},$=function(l){return typeof l=="boolean"},U=function(l){return typeof l=="number"},D=function(l){return typeof l=="undefined"}},51904:function(re,L,t){t.d(L,{Z:function(){return pe}});var h=t(4942),N=t(87462),z=t(97685),$=t(97937),U=t(94184),D=t.n(U),f=t(67294),l=t(53124),m=t(98787),g=t(28704),c=t(8796),E=t(67968),C=t(45503);function M(d){if(typeof d!="string")return d;var n=d.charAt(0).toUpperCase()+d.slice(1);return n}var u=t(14747),Z=function(n,i,o){var v=M(o);return(0,h.Z)({},n.componentCls+"-"+i,{color:n["color"+o],background:n["color"+v+"Bg"],borderColor:n["color"+v+"Border"]})},X=function(n){return c.i.reduce(function(i,o){var v,A=n[o+"-1"],a=n[o+"-3"],F=n[o+"-6"],R=n[o+"-7"];return(0,N.Z)((0,N.Z)({},i),(v={},(0,h.Z)(v,n.componentCls+"-"+o,{color:R,background:A,borderColor:a}),(0,h.Z)(v,n.componentCls+"-"+o+"-inverse",{color:n.colorTextLightSolid,background:F,borderColor:F}),v))},{})},ve=function(n){var i,o=n.paddingXXS,v=n.lineWidth,A=n.tagPaddingHorizontal,a=A-v,F=o-v;return(0,h.Z)({},n.componentCls,(0,N.Z)((0,N.Z)({},(0,u.Wf)(n)),(i={display:"inline-block",height:"auto",marginInlineEnd:n.marginXS,paddingInline:a,fontSize:n.tagFontSize,lineHeight:n.tagLineHeight+"px",whiteSpace:"nowrap",background:n.tagDefaultBg,border:n.lineWidth+"px "+n.lineType+" "+n.colorBorder,borderRadius:n.borderRadiusSM,opacity:1,transition:"all "+n.motionDurationMid,textAlign:"start","&&-rtl":{direction:"rtl"},"&, a, a:hover":{color:n.tagDefaultColor}},(0,h.Z)(i,n.componentCls+"-close-icon",{marginInlineStart:F,color:n.colorTextDescription,fontSize:n.tagIconSize,cursor:"pointer",transition:"all "+n.motionDurationMid,"&:hover":{color:n.colorTextHeading}}),(0,h.Z)(i,"&&-has-color",(0,h.Z)({borderColor:"transparent"},"&, a, a:hover, "+n.iconCls+"-close, "+n.iconCls+"-close:hover",{color:n.colorTextLightSolid})),(0,h.Z)(i,"&-checkable",{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer","&:not(&-checked):hover":{color:n.colorPrimary,backgroundColor:n.colorFillSecondary},"&:active, &-checked":{color:n.colorTextLightSolid},"&-checked":{backgroundColor:n.colorPrimary,"&:hover":{backgroundColor:n.colorPrimaryHover}},"&:active":{backgroundColor:n.colorPrimaryActive}}),(0,h.Z)(i,"&-hidden",{display:"none"}),(0,h.Z)(i,"> "+n.iconCls+" + span, > span + "+n.iconCls,{marginInlineStart:a}),i)))},le=(0,E.Z)("Tag",function(d){var n=d.fontSize,i=d.lineHeight,o=d.lineWidth,v=d.fontSizeIcon,A=Math.round(n*i),a=d.fontSizeSM,F=A-o*2,R=d.colorFillAlter,e=d.colorText,r=(0,C.TS)(d,{tagFontSize:a,tagLineHeight:F,tagDefaultBg:R,tagDefaultColor:e,tagIconSize:v-2*o,tagPaddingHorizontal:8});return[ve(r),X(r),Z(r,"success","Success"),Z(r,"processing","Info"),Z(r,"error","Error"),Z(r,"warning","Warning")]}),_=function(d,n){var i={};for(var o in d)Object.prototype.hasOwnProperty.call(d,o)&&n.indexOf(o)<0&&(i[o]=d[o]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,o=Object.getOwnPropertySymbols(d);v<o.length;v++)n.indexOf(o[v])<0&&Object.prototype.propertyIsEnumerable.call(d,o[v])&&(i[o[v]]=d[o[v]]);return i},se=function(n){var i,o=n.prefixCls,v=n.className,A=n.checked,a=n.onChange,F=n.onClick,R=_(n,["prefixCls","className","checked","onChange","onClick"]),e=f.useContext(l.E_),r=e.getPrefixCls,V=function(k){a==null||a(!A),F==null||F(k)},W=r("tag",o),ee=le(W),P=(0,z.Z)(ee,2),J=P[0],Q=P[1],ne=D()(W,(i={},(0,h.Z)(i,W+"-checkable",!0),(0,h.Z)(i,W+"-checkable-checked",A),i),v,Q);return J(f.createElement("span",(0,N.Z)({},R,{className:ne,onClick:V})))},me=se,oe=function(d,n){var i={};for(var o in d)Object.prototype.hasOwnProperty.call(d,o)&&n.indexOf(o)<0&&(i[o]=d[o]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,o=Object.getOwnPropertySymbols(d);v<o.length;v++)n.indexOf(o[v])<0&&Object.prototype.propertyIsEnumerable.call(d,o[v])&&(i[o[v]]=d[o[v]]);return i},he=new RegExp("^("+m.Y.join("|")+")(-inverse)?$"),ce=new RegExp("^("+m.E.join("|")+")$"),ge=function(n,i){var o,v=n.prefixCls,A=n.className,a=n.style,F=n.children,R=n.icon,e=n.color,r=n.onClose,V=n.closeIcon,W=n.closable,ee=W===void 0?!1:W,P=oe(n,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),J=f.useContext(l.E_),Q=J.getPrefixCls,ne=J.direction,K=f.useState(!0),k=(0,z.Z)(K,2),te=k[0],ue=k[1];f.useEffect(function(){"visible"in P&&ue(P.visible)},[P.visible]);var de=function(){return e?he.test(e)||ce.test(e):!1},xe=(0,N.Z)({backgroundColor:e&&!de()?e:void 0},a),fe=de(),H=Q("tag",v),Ce=le(H),ae=(0,z.Z)(Ce,2),ye=ae[0],b=ae[1],T=D()(H,(o={},(0,h.Z)(o,H+"-"+e,fe),(0,h.Z)(o,H+"-has-color",e&&!fe),(0,h.Z)(o,H+"-hidden",!te),(0,h.Z)(o,H+"-rtl",ne==="rtl"),o),A,b),p=function(s){s.stopPropagation(),r==null||r(s),!s.defaultPrevented&&ue(!1)},y=function(){return ee?V?f.createElement("span",{className:H+"-close-icon",onClick:p},V):f.createElement($.Z,{className:H+"-close-icon",onClick:p}):null},w="onClick"in P||F&&F.type==="a",I=R||null,x=I?f.createElement(f.Fragment,null,I,f.createElement("span",null,F)):F,O=f.createElement("span",(0,N.Z)({},P,{ref:i,className:T,style:xe}),x,y());return ye(w?f.createElement(g.Z,null,O):O)},ie=f.forwardRef(ge);ie.CheckableTag=me;var pe=ie}}]);