You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/82138.4b56d21a.async.js

1 line
20 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[82138,36270,79817],{680:function(e,t,n){n.d(t,{Z:function(){return s}});var o=n(5891),r=n(59301),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},l=n(22589),a=function(e,t){return r.createElement(l.Z,(0,o.Z)({},e,{ref:t,icon:i}))};var s=r.forwardRef(a)},27666:function(e,t,n){var o=n(26390),r=n(71783);t.Z=function(e){let t;const n=n=>()=>{t=null,e.apply(void 0,(0,o.Z)(n))},i=function(){if(null==t){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];t=(0,r.Z)(n(o))}};return i.cancel=()=>{r.Z.cancel(t),t=null},i}},81228:function(e,t,n){n.d(t,{Z:function(){return E}});var o=n(79545),r=n(68550),i=n(17928),l=n(99487),a=n(59301),s=n(92310),c=n.n(s),u=n(28647),d=n(55405),f=n(27666),p=n(36355),g=n(83116),m=n(37613);const h=e=>{const{componentCls:t}=e;return{[t]:{position:"fixed",zIndex:e.zIndexPopup}}};var v=(0,g.Z)("Affix",(e=>{const t=(0,m.TS)(e,{zIndexPopup:e.zIndexBase+10});return[h(t)]}));function b(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function y(e,t,n){if(void 0!==n&&t.top>e.top-n)return n+t.top}function C(e,t,n){if(void 0!==n&&t.bottom<e.bottom+n){return n+(window.innerHeight-t.bottom)}}const k=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"];function x(){return"undefined"!=typeof window?window:null}var $;!function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"}($||($={}));let S=function(e){(0,i.Z)(n,e);var t=(0,l.Z)(n);function n(){var e;return(0,o.Z)(this,n),(e=t.apply(this,arguments)).state={status:$.None,lastAffix:!1,prevTarget:null},e.placeholderNodeRef=(0,a.createRef)(),e.fixedNodeRef=(0,a.createRef)(),e.addListeners=()=>{const t=e.getTargetFunc(),n=null==t?void 0:t(),{prevTarget:o}=e.state;o!==n&&(k.forEach((t=>{null==o||o.removeEventListener(t,e.lazyUpdatePosition),null==n||n.addEventListener(t,e.lazyUpdatePosition)})),e.updatePosition(),e.setState({prevTarget:n}))},e.removeListeners=()=>{e.timer&&(clearTimeout(e.timer),e.timer=null);const{prevTarget:t}=e.state,n=e.getTargetFunc(),o=null==n?void 0:n();k.forEach((n=>{null==o||o.removeEventListener(n,e.lazyUpdatePosition),null==t||t.removeEventListener(n,e.lazyUpdatePosition)})),e.updatePosition.cancel(),e.lazyUpdatePosition.cancel()},e.getOffsetTop=()=>{const{offsetBottom:t,offsetTop:n}=e.props;return void 0===t&&void 0===n?0:n},e.getOffsetBottom=()=>e.props.offsetBottom,e.measure=()=>{const{status:t,lastAffix:n}=e.state,{onChange:o}=e.props,r=e.getTargetFunc();if(t!==$.Prepare||!e.fixedNodeRef.current||!e.placeholderNodeRef.current||!r)return;const i=e.getOffsetTop(),l=e.getOffsetBottom(),a=r();if(a){const t={status:$.None},r=b(e.placeholderNodeRef.current);if(0===r.top&&0===r.left&&0===r.width&&0===r.height)return;const s=b(a),c=y(r,s,i),u=C(r,s,l);void 0!==c?(t.affixStyle={position:"fixed",top:c,width:r.width,height:r.height},t.placeholderStyle={width:r.width,height:r.height}):void 0!==u&&(t.affixStyle={position:"fixed",bottom:u,width:r.width,height:r.height},t.placeholderStyle={width:r.width,height:r.height}),t.lastAffix=!!t.affixStyle,o&&n!==t.lastAffix&&o(t.lastAffix),e.setState(t)}},e.prepareMeasure=()=>{e.setState({status:$.Prepare,affixStyle:void 0,placeholderStyle:void 0})},e.updatePosition=(0,f.Z)((()=>{e.prepareMeasure()})),e.lazyUpdatePosition=(0,f.Z)((()=>{const t=e.getTargetFunc(),{affixStyle:n}=e.state;if(t&&n){const o=e.getOffsetTop(),r=e.getOffsetBottom(),i=t();if(i&&e.placeholderNodeRef.current){const t=b(i),l=b(e.placeholderNodeRef.current),a=y(l,t,o),s=C(l,t,r);if(void 0!==a&&n.top===a||void 0!==s&&n.bottom===s)return}}e.prepareMeasure()})),e}return(0,r.Z)(n,[{key:"getTargetFunc",value:function(){const{getTargetContainer:e}=this.context,{target:t}=this.props;return void 0!==t?t:null!=e?e:x}},{key:"componentDidMount",value:function(){this.timer=setTimeout(this.addListeners)}},{key:"componentDidUpdate",value:function(e){this.addListeners(),e.offsetTop===this.props.offsetTop&&e.offsetBottom===this.props.offsetBottom||this.updatePosition(),this.measure()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"render",value:function(){const{affixStyle:e,placeholderStyle:t}=this.state,{affixPrefixCls:n,rootClassName:o,children:r}=this.props,i=c()(e&&o,{[n]:!!e});let l=(0,d.Z)(this.props,["prefixCls","offsetTop","offsetBottom","target","onChange","affixPrefixCls","rootClassName"]);return a.createElement(u.Z,{onResize:this.updatePosition},a.createElement("div",Object.assign({},l,{ref:this.placeholderNodeRef}),e&&a.createElement("div",{style:t,"aria-hidden":"true"}),a.createElement("div",{className:i,ref:this.fixedNodeRef,style:e},a.createElement(u.Z,{onResize:this.updatePosition},r))))}}]),n}(a.Component);S.contextType=p.E_;var E=(0,a.forwardRef)(((e,t)=>{const{prefixCls:n,rootClassName:o}=e,{getPrefixCls:r}=(0,a.useContext)(p.E_),i=r("affix",n),[l,s]=v(i),u=Object.assign(Object.assign({},e),{affixPrefixCls:i,rootClassName:c()(o,s)});return l(a.createElement(S,Object.assign({},u,{ref:t})))}))},79817:function(e,t,n){n.d(t,{Z:function(){return w}});var o=n(26390),r=n(92310),i=n.n(r),l=n(83794),a=n(59301),s=n(6774),c=n(13845),u=n(68031),d=n(81228),f=n(36355);var p=a.createContext(void 0);var g=e=>{const{href:t,title:n,prefixCls:o,children:r,className:l,target:s,replace:c}=e,u=a.useContext(p),{registerLink:d,unregisterLink:g,scrollTo:m,onClick:h,activeLink:v,direction:b}=u||{};a.useEffect((()=>(null==d||d(t),()=>{null==g||g(t)})),[t]);const{getPrefixCls:y}=a.useContext(f.E_),C=y("anchor",o),k=v===t,x=i()(`${C}-link`,l,{[`${C}-link-active`]:k}),$=i()(`${C}-link-title`,{[`${C}-link-title-active`]:k});return a.createElement("div",{className:x},a.createElement("a",{className:$,href:t,title:"string"==typeof n?n:"",target:s,onClick:e=>{c&&(e.preventDefault(),window.location.replace(t)),null==h||h(e,{title:n,href:t}),null==m||m(t)}},n),"horizontal"!==b?r:null)},m=n(17313),h=n(83116),v=n(37613);const b=e=>{const{componentCls:t,holderOffsetBlock:n,motionDurationSlow:o,lineWidthBold:r,colorPrimary:i,lineType:l,colorSplit:a}=e;return{[`${t}-wrapper`]:{marginBlockStart:-n,paddingBlockStart:n,[t]:Object.assign(Object.assign({},(0,m.Wf)(e)),{position:"relative",paddingInlineStart:r,[`${t}-link`]:{paddingBlock:e.linkPaddingBlock,paddingInline:`${e.linkPaddingInlineStart}px 0`,"&-title":Object.assign(Object.assign({},m.vS),{position:"relative",display:"block",marginBlockEnd:e.anchorTitleBlock,color:e.colorText,transition:`all ${e.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${t}-link-title`]:{color:e.colorPrimary},[`${t}-link`]:{paddingBlock:e.anchorPaddingBlockSecondary}}}),[`&:not(${t}-wrapper-horizontal)`]:{[t]:{"&::before":{position:"absolute",insetInlineStart:0,top:0,height:"100%",borderInlineStart:`${r}px ${l} ${a}`,content:'" "'},[`${t}-ink`]:{position:"absolute",insetInlineStart:0,display:"none",transform:"translateY(-50%)",transition:`top ${o} ease-in-out`,width:r,backgroundColor:i,[`&${t}-ink-visible`]:{display:"inline-block"}}}},[`${t}-fixed ${t}-ink ${t}-ink`]:{display:"none"}}}},y=e=>{const{componentCls:t,motionDurationSlow:n,lineWidthBold:o,colorPrimary:r}=e;return{[`${t}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`1px ${e.lineType} ${e.colorSplit}`,content:'" "'},[t]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${t}-link:first-of-type`]:{paddingInline:0},[`${t}-ink`]:{position:"absolute",bottom:0,transition:`left ${n} ease-in-out, width ${n} ease-in-out`,height:o,backgroundColor:r}}}}};var C=(0,h.Z)("Anchor",(e=>{const{fontSize:t,fontSizeLG:n,paddingXXS:o}=e,r=(0,v.TS)(e,{holderOffsetBlock:o,anchorPaddingBlockSecondary:o/2,anchorTitleBlock:t/14*3,anchorBallSize:n/2});return[b(r),y(r)]}),(e=>({linkPaddingBlock:e.paddingXXS,linkPaddingInlineStart:e.padding})));function k(){return window}function x(e,t){if(!e.getClientRects().length)return 0;const n=e.getBoundingClientRect();return n.width||n.height?t===window?(t=e.ownerDocument.documentElement,n.top-t.clientTop):n.top-t.getBoundingClientRect().top:n.top}const $=/#([\S ]+)$/,S=e=>{var t;const{rootClassName:n,anchorPrefixCls:r,className:m,style:h,offsetTop:v,affix:b=!0,showInkInFixed:y=!1,children:C,items:S,direction:E="vertical",bounds:w,targetOffset:O,onClick:T,onChange:N,getContainer:P,getCurrentAnchor:B,replace:z}=e;const[j,Z]=a.useState([]),[I,R]=a.useState(null),L=a.useRef(I),M=a.useRef(null),F=a.useRef(null),D=a.useRef(!1),{direction:H,getTargetContainer:A,anchor:_}=a.useContext(f.E_),W=null!==(t=null!=P?P:A)&&void 0!==t?t:k,X=JSON.stringify(j),U=(0,l.useEvent)((e=>{j.includes(e)||Z((t=>[].concat((0,o.Z)(t),[e])))})),Y=(0,l.useEvent)((e=>{j.includes(e)&&Z((t=>t.filter((t=>t!==e))))})),q=(0,l.useEvent)((e=>{if(L.current===e)return;const t="function"==typeof B?B(e):e;R(t),L.current=t,null==N||N(e)})),G=a.useCallback((()=>{if(D.current)return;const e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;const o=[],r=W();if(e.forEach((e=>{const i=$.exec(null==e?void 0:e.toString());if(!i)return;const l=document.getElementById(i[1]);if(l){const i=x(l,r);i<t+n&&o.push({link:e,top:i})}})),o.length)return o.reduce(((e,t)=>t.top>e.top?t:e)).link;return""}(j,void 0!==O?O:v||0,w);q(e)}),[X,O,v]),J=a.useCallback((e=>{q(e);const t=$.exec(e);if(!t)return;const n=document.getElementById(t[1]);if(!n)return;const o=W();let r=(0,c.Z)(o,!0)+x(n,o);r-=void 0!==O?O:v||0,D.current=!0,(0,u.Z)(r,{getContainer:W,callback(){D.current=!1}})}),[O,v]),Q=i()(n,`${r}-wrapper`,{[`${r}-wrapper-horizontal`]:"horizontal"===E,[`${r}-rtl`]:"rtl"===H},m,null==_?void 0:_.className),V=i()(r,{[`${r}-fixed`]:!b&&!y}),K=i()(`${r}-ink`,{[`${r}-ink-visible`]:I}),ee=Object.assign(Object.assign({maxHeight:v?`calc(100vh - ${v}px)`:"100vh"},null==_?void 0:_.style),h),te=e=>Array.isArray(e)?e.map((e=>a.createElement(g,Object.assign({replace:z},e,{key:e.key}),"vertical"===E&&te(e.children)))):null,ne=a.createElement("div",{ref:M,className:Q,style:ee},a.createElement("div",{className:V},a.createElement("span",{className:K,ref:F}),"items"in e?te(S):C));a.useEffect((()=>{const e=W();return G(),null==e||e.addEventListener("scroll",G),()=>{null==e||e.removeEventListener("scroll",G)}}),[X]),a.useEffect((()=>{"function"==typeof B&&q(B(L.current||""))}),[B]),a.useEffect((()=>{(()=>{var e;const t=null===(e=M.current)||void 0===e?void 0:e.querySelector(`.${r}-link-title-active`);if(t&&F.current){const{style:e}=F.current,n="horizontal"===E;e.top=n?"":`${t.offsetTop+t.clientHeight/2}px`,e.height=n?"":`${t.clientHeight}px`,e.left=n?`${t.offsetLeft}px`:"",e.width=n?`${t.clientWidth}px`:"",n&&(0,s.Z)(t,{scrollMode:"if-needed",block:"nearest"})}})()}),[E,B,X,I]);const oe=a.useMemo((()=>({registerLink:U,unregisterLink:Y,scrollTo:J,activeLink:I,onClick:T,direction:E})),[I,T,J,E]);return a.createElement(p.Provider,{value:oe},b?a.createElement(d.Z,{offsetTop:v,target:W},ne):ne)};const E=e=>{const{prefixCls:t,rootClassName:n}=e,{getPrefixCls:o}=a.useContext(f.E_),r=o("anchor",t),[l,s]=C(r);return l(a.createElement(S,Object.assign({},e,{rootClassName:i()(s,n),anchorPrefixCls:r})))};E.Link=g;var w=E},31797:function(e,t,n){n.d(t,{Z:function(){return k}});var o=n(59301),r=n(56762),i=n(92343),l=n(92310),a=n.n(l),s=n(36355),c=n(96865);var u=e=>{const{value:t,formatter:n,precision:r,decimalSeparator:i,groupSeparator:l="",prefixCls:a}=e;let s;if("function"==typeof n)s=n(t);else{const e=String(t),n=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(n&&"-"!==e){const e=n[1];let t=n[2]||"0",c=n[4]||"";t=t.replace(/\B(?=(\d{3})+(?!\d))/g,l),"number"==typeof r&&(c=c.padEnd(r,"0").slice(0,r>0?r:0)),c&&(c=`${i}${c}`),s=[o.createElement("span",{key:"int",className:`${a}-content-value-int`},e,t),c&&o.createElement("span",{key:"decimal",className:`${a}-content-value-decimal`},c)]}else s=e}return o.createElement("span",{className:`${a}-content-value`},s)},d=n(17313),f=n(83116),p=n(37613);const g=e=>{const{componentCls:t,marginXXS:n,padding:o,colorTextDescription:r,titleFontSize:i,colorTextHeading:l,contentFontSize:a,fontFamily:s}=e;return{[`${t}`]:Object.assign(Object.assign({},(0,d.Wf)(e)),{[`${t}-title`]:{marginBottom:n,color:r,fontSize:i},[`${t}-skeleton`]:{paddingTop:o},[`${t}-content`]:{color:l,fontSize:a,fontFamily:s,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}})}};var m=(0,f.Z)("Statistic",(e=>{const t=(0,p.TS)(e,{});return[g(t)]}),(e=>{const{fontSizeHeading3:t,fontSize:n}=e;return{titleFontSize:n,contentFontSize:t}}));var h=e=>{const{prefixCls:t,className:n,rootClassName:r,style:i,valueStyle:l,value:d=0,title:f,valueRender:p,prefix:g,suffix:h,loading:v=!1,onMouseEnter:b,onMouseLeave:y,decimalSeparator:C=".",groupSeparator:k=","}=e,{getPrefixCls:x,direction:$,statistic:S}=o.useContext(s.E_),E=x("statistic",t),[w,O]=m(E),T=o.createElement(u,Object.assign({decimalSeparator:C,groupSeparator:k,prefixCls:E},e,{value:d})),N=a()(E,{[`${E}-rtl`]:"rtl"===$},null==S?void 0:S.className,n,r,O);return w(o.createElement("div",{className:N,style:Object.assign(Object.assign({},null==S?void 0:S.style),i),onMouseEnter:b,onMouseLeave:y},f&&o.createElement("div",{className:`${E}-title`},f),o.createElement(c.Z,{paragraph:!1,loading:v,className:`${E}-skeleton`},o.createElement("div",{style:l,className:`${E}-content`},g&&o.createElement("span",{className:`${E}-content-prefix`},g),p?p(T):T,h&&o.createElement("span",{className:`${E}-content-suffix`},h)))))};const v=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];function b(e,t){const{format:n=""}=t,o=new Date(e).getTime(),r=Date.now();return function(e,t){let n=e;const o=/\[[^\]]*]/g,r=(t.match(o)||[]).map((e=>e.slice(1,-1))),i=t.replace(o,"[]"),l=v.reduce(((e,t)=>{let[o,r]=t;if(e.includes(o)){const t=Math.floor(n/r);return n-=t*r,e.replace(new RegExp(`${o}+`,"g"),(e=>{const n=e.length;return t.toString().padStart(n,"0")}))}return e}),i);let a=0;return l.replace(o,(()=>{const e=r[a];return a+=1,e}))}(Math.max(o-r,0),n)}const y=e=>{const{value:t,format:n="HH:mm:ss",onChange:l,onFinish:a}=e,s=(0,r.Z)(),c=o.useRef(null),u=()=>{const e=function(e){return new Date(e).getTime()}(t);e>=Date.now()&&(c.current=setInterval((()=>{s(),null==l||l(e-Date.now()),e<Date.now()&&(null==a||a(),c.current&&(clearInterval(c.current),c.current=null))}),33.333333333333336))};o.useEffect((()=>(u(),()=>{c.current&&(clearInterval(c.current),c.current=null)})),[t]);return o.createElement(h,Object.assign({},e,{valueRender:e=>(0,i.Tm)(e,{title:void 0}),formatter:(e,t)=>b(e,Object.assign(Object.assign({},t),{format:n}))}))};var C=o.memo(y);h.Countdown=C;var k=h},12563:function(e,t,n){n.d(t,{Z:function(){return w}});var o=n(59301),r=n(51638),i=n(92310),l=n.n(i),a=n(36785),s=n(47729),c=n(14088),u=n(36355),d=n(17313),f=n(37613),p=n(83116);const g=e=>{const{lineWidth:t,fontSizeIcon:n}=e,o=e.fontSizeSM,r=e.lineHeightSM*o+"px";return(0,f.TS)(e,{tagFontSize:o,tagLineHeight:r,tagIconSize:n-2*t,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary})},m=e=>({defaultBg:e.colorFillQuaternary,defaultColor:e.colorText});var h=(0,p.Z)("Tag",(e=>(e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:o,componentCls:r}=e,i=o-n,l=t-n;return{[r]:Object.assign(Object.assign({},(0,d.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${r}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${r}-close-icon`]:{marginInlineStart:l,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${r}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${r}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${r}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(g(e))),m),v=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};var b=e=>{const{prefixCls:t,style:n,className:r,checked:i,onChange:a,onClick:s}=e,c=v(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:d,tag:f}=o.useContext(u.E_),p=d("tag",t),[g,m]=h(p),b=l()(p,`${p}-checkable`,{[`${p}-checkable-checked`]:i},null==f?void 0:f.className,r,m);return g(o.createElement("span",Object.assign({},c,{style:Object.assign(Object.assign({},n),null==f?void 0:f.style),className:b,onClick:e=>{null==a||a(!i),null==s||s(e)}})))},y=n(45157);var C=(0,p.b)(["Tag","preset"],(e=>(e=>(0,y.Z)(e,((t,n)=>{let{textColor:o,lightBorderColor:r,lightColor:i,darkColor:l}=n;return{[`${e.componentCls}-${t}`]:{color:o,background:i,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:l,borderColor:l},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}})))(g(e))),m);const k=(e,t,n)=>{const o="string"!=typeof(r=n)?r:r.charAt(0).toUpperCase()+r.slice(1);var r;return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${o}Bg`],borderColor:e[`color${o}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}};var x=(0,p.b)(["Tag","status"],(e=>{const t=g(e);return[k(t,"success","Success"),k(t,"processing","Info"),k(t,"error","Error"),k(t,"warning","Warning")]}),m),$=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const S=(e,t)=>{const{prefixCls:n,className:i,rootClassName:d,style:f,children:p,icon:g,color:m,onClose:v,closeIcon:b,closable:y,bordered:k=!0}=e,S=$(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:E,direction:w,tag:O}=o.useContext(u.E_),[T,N]=o.useState(!0);o.useEffect((()=>{"visible"in S&&N(S.visible)}),[S.visible]);const P=(0,a.o2)(m),B=(0,a.yT)(m),z=P||B,j=Object.assign(Object.assign({backgroundColor:m&&!z?m:void 0},null==O?void 0:O.style),f),Z=E("tag",n),[I,R]=h(Z),L=l()(Z,null==O?void 0:O.className,{[`${Z}-${m}`]:z,[`${Z}-has-color`]:m&&!z,[`${Z}-hidden`]:!T,[`${Z}-rtl`]:"rtl"===w,[`${Z}-borderless`]:!k},i,d,R),M=e=>{e.stopPropagation(),null==v||v(e),e.defaultPrevented||N(!1)},[,F]=(0,s.Z)(y,b,(e=>null===e?o.createElement(r.Z,{className:`${Z}-close-icon`,onClick:M}):o.createElement("span",{className:`${Z}-close-icon`,onClick:M},e)),null,!1),D="function"==typeof S.onClick||p&&"a"===p.type,H=g||null,A=H?o.createElement(o.Fragment,null,H,p&&o.createElement("span",null,p)):p,_=o.createElement("span",Object.assign({},S,{ref:t,className:L,style:j}),A,F,P&&o.createElement(C,{key:"preset",prefixCls:Z}),B&&o.createElement(x,{key:"status",prefixCls:Z}));return I(D?o.createElement(c.Z,{component:"Tag"},_):_)},E=o.forwardRef(S);E.CheckableTag=b;var w=E}}]);