30 lines
80 KiB
JavaScript
30 lines
80 KiB
JavaScript
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{$n as t,$t as n,An as r,Bn as i,Dn as a,En as o,Fn as s,Gn as c,In as l,It as u,J as d,Kn as f,Kt as p,Ln as m,Mt as h,Nn as g,On as _,Pn as v,Qn as y,Rn as b,Rt as ee,S as x,Sn as S,St as C,Tt as w,U as T,Un as E,Ut as D,V as te,Vn as ne,Vt as O,Wt as k,Xn as re,Xt as A,Zn as j,_n as M,_t as N,bt as P,cn as F,gt as I,in as L,it as R,jn as z,jt as ie,kn as ae,kt as B,ln as oe,lt as se,nn as ce,on as V,pt as H,qn as U,rt as le,tn as W,tr as ue,un as G,ut as de,wn as K,wt as fe,xt as pe,zt as q}from"./index-CPt4N9y-.js";var J=e(t()),Y=e(ue()),me=Y.createContext(null),he=(function(){if(typeof Map<`u`)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){t===void 0&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()})(),ge=typeof window<`u`&&typeof document<`u`&&window.document===document,_e=(function(){return typeof global<`u`&&global.Math===Math?global:typeof self<`u`&&self.Math===Math?self:typeof window<`u`&&window.Math===Math?window:Function(`return this`)()})(),ve=(function(){return typeof requestAnimationFrame==`function`?requestAnimationFrame.bind(_e):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),ye=2;function be(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&s()}function o(){ve(a)}function s(){var e=Date.now();if(n){if(e-i<ye)return;r=!0}else n=!0,r=!1,setTimeout(o,t);i=e}return s}var X=20,xe=[`top`,`right`,`bottom`,`left`,`width`,`height`,`size`,`weight`],Se=typeof MutationObserver<`u`,Ce=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=be(this.refresh.bind(this),X)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){ge&&!this.connected_&&(document.addEventListener(`transitionend`,this.onTransitionEnd_),window.addEventListener(`resize`,this.refresh),Se?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener(`DOMSubtreeModified`,this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){ge&&this.connected_&&(document.removeEventListener(`transitionend`,this.onTransitionEnd_),window.removeEventListener(`resize`,this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener(`DOMSubtreeModified`,this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=t===void 0?``:t;xe.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||=new e,this.instance_},e.instance_=null,e}(),Z=(function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),Q=(function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||_e}),we=Pe(0,0,0,0);function Te(e){return parseFloat(e)||0}function Ee(e){return[...arguments].slice(1).reduce(function(t,n){return t+Te(e[`border-`+n+`-width`])},0)}function De(e){for(var t=[`top`,`right`,`bottom`,`left`],n={},r=0,i=t;r<i.length;r++){var a=i[r];n[a]=Te(e[`padding-`+a])}return n}function Oe(e){var t=e.getBBox();return Pe(0,0,t.width,t.height)}function ke(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return we;var r=Q(e).getComputedStyle(e),i=De(r),a=i.left+i.right,o=i.top+i.bottom,s=Te(r.width),c=Te(r.height);if(r.boxSizing===`border-box`&&(Math.round(s+a)!==t&&(s-=Ee(r,`left`,`right`)+a),Math.round(c+o)!==n&&(c-=Ee(r,`top`,`bottom`)+o)),!je(e)){var l=Math.round(s+a)-t,u=Math.round(c+o)-n;Math.abs(l)!==1&&(s-=l),Math.abs(u)!==1&&(c-=u)}return Pe(i.left,i.top,s,c)}var Ae=(function(){return typeof SVGGraphicsElement<`u`?function(e){return e instanceof Q(e).SVGGraphicsElement}:function(e){return e instanceof Q(e).SVGElement&&typeof e.getBBox==`function`}})();function je(e){return e===Q(e).document.documentElement}function Me(e){return ge?Ae(e)?Oe(e):ke(e):we}function Ne(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=Object.create((typeof DOMRectReadOnly<`u`?DOMRectReadOnly:Object).prototype);return Z(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}function Pe(e,t,n,r){return{x:e,y:t,width:n,height:r}}var Fe=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Pe(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=Me(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),Ie=function(){function e(e,t){var n=Ne(t);Z(this,{target:e,contentRect:n})}return e}(),Le=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new he,typeof e!=`function`)throw TypeError(`The callback provided as parameter 1 is not a function.`);this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(typeof Element<`u`&&Element instanceof Object){if(!(e instanceof Q(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)||(t.set(e,new Fe(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);if(typeof Element<`u`&&Element instanceof Object){if(!(e instanceof Q(e).Element))throw TypeError(`parameter 1 is not of type "Element".`);var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new Ie(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),$=typeof WeakMap<`u`?new WeakMap:new he,Re=function(){function e(t){if(!(this instanceof e))throw TypeError(`Cannot call a class as a function.`);if(!arguments.length)throw TypeError(`1 argument required, but only 0 present.`);var n=new Le(t,Ce.getInstance(),this);$.set(this,n)}return e}();[`observe`,`unobserve`,`disconnect`].forEach(function(e){Re.prototype[e]=function(){var t;return(t=$.get(this))[e].apply(t,arguments)}});var ze=(function(){return _e.ResizeObserver===void 0?Re:_e.ResizeObserver})(),Be=new Map;function Ve(e){e.forEach(function(e){var t,n=e.target;(t=Be.get(n))==null||t.forEach(function(e){return e(n)})})}var He=new ze(Ve);function Ue(e,t){Be.has(e)||(Be.set(e,new Set),He.observe(e)),Be.get(e).add(t)}function We(e,t){Be.has(e)&&(Be.get(e).delete(t),Be.get(e).size||(He.unobserve(e),Be.delete(e)))}var Ge=function(e){g(n,e);var t=z(n);function n(){return s(this,n),t.apply(this,arguments)}return v(n,[{key:`render`,value:function(){return this.props.children}}]),n}(Y.Component);function Ke(e,t){var n=e.children,r=e.disabled,a=Y.useRef(null),o=Y.useRef(null),s=Y.useContext(me),c=typeof n==`function`,l=c?n(a):n,u=Y.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),d=!c&&Y.isValidElement(l)&&i(l),p=d?b(l):null,m=ne(p,a),h=function(){return E(a.current)||(a.current&&j(a.current)===`object`?E(a.current?.nativeElement):null)||E(o.current)};Y.useImperativeHandle(t,function(){return h()});var g=Y.useRef(e);g.current=e;var _=Y.useCallback(function(e){var t=g.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),a=i.width,o=i.height,c=e.offsetWidth,l=e.offsetHeight,d=Math.floor(a),p=Math.floor(o);if(u.current.width!==d||u.current.height!==p||u.current.offsetWidth!==c||u.current.offsetHeight!==l){var m={width:d,height:p,offsetWidth:c,offsetHeight:l};u.current=m;var h=c===Math.round(a)?a:c,_=l===Math.round(o)?o:l,v=f(f({},m),{},{offsetWidth:h,offsetHeight:_});s?.(v,e,r),n&&Promise.resolve().then(function(){n(v,e)})}},[]);return Y.useEffect(function(){var e=h();return e&&!r&&Ue(e,_),function(){return We(e,_)}},[a.current,r]),Y.createElement(Ge,{ref:o},d?Y.cloneElement(l,{ref:m}):l)}var qe=Y.forwardRef(Ke),Je=`rc-observer-key`;function Ye(e,t){var n=e.children;return(typeof n==`function`?[n]:re(n)).map(function(n,r){var i=n?.key||`${Je}-${r}`;return Y.createElement(qe,y({},e,{key:i,ref:r===0?t:void 0}),n)})}var Xe=Y.forwardRef(Ye);Xe.Collection=function(e){var t=e.children,n=e.onBatchResize,r=Y.useRef(0),i=Y.useRef([]),a=Y.useContext(me),o=Y.useCallback(function(e,t,o){r.current+=1;var s=r.current;i.current.push({size:e,element:t,data:o}),Promise.resolve().then(function(){s===r.current&&(n?.(i.current),i.current=[])}),a?.(e,t,o)},[n,a]);return Y.createElement(me.Provider,{value:o},t)};var Ze=e=>e instanceof H?e:new H(e),Qe=function(e){if(a()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some(function(e){return e in n.style})}return!1},$e=function(e,t){if(!Qe(e))return!1;var n=document.createElement(`div`),r=n.style[e];return n.style[e]=t,n.style[e]!==r};function et(e,t){return!Array.isArray(e)&&t!==void 0?$e(e,t):Qe(e)}var tt=(function(){if(typeof navigator>`u`||typeof window>`u`)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(e?.substr(0,4))});function nt(e){var t=e.prefixCls,n=e.align,r=e.arrow,i=e.arrowPos,a=r||{},o=a.className,s=a.content,c=i.x,l=c===void 0?0:c,u=i.y,d=u===void 0?0:u,f=Y.useRef();if(!n||!n.points)return null;var p={position:`absolute`};if(n.autoArrow!==!1){var m=n.points[0],h=n.points[1],g=m[0],_=m[1],v=h[0],y=h[1];g===v||![`t`,`b`].includes(g)?p.top=d:g===`t`?p.top=0:p.bottom=0,_===y||![`l`,`r`].includes(_)?p.left=l:_===`l`?p.left=0:p.right=0}return Y.createElement(`div`,{ref:f,className:(0,J.default)(`${t}-arrow`,o),style:p},s)}function rt(e){var t=e.prefixCls,n=e.open,r=e.zIndex,i=e.mask,a=e.motion;return i?Y.createElement(O,y({},a,{motionAppear:!0,visible:n,removeOnLeave:!0}),function(e){var n=e.className;return Y.createElement(`div`,{style:{zIndex:r},className:(0,J.default)(`${t}-mask`,n)})}):null}var it=Y.memo(function(e){return e.children},function(e,t){return t.cache}),at=Y.forwardRef(function(e,t){var n=e.popup,r=e.className,i=e.prefixCls,a=e.style,o=e.target,s=e.onVisibleChanged,c=e.open,u=e.keepDom,d=e.fresh,p=e.onClick,m=e.mask,h=e.arrow,g=e.arrowPos,v=e.align,b=e.motion,ee=e.maskMotion,x=e.forceRender,C=e.getPopupContainer,w=e.autoDestroy,T=e.portal,E=e.zIndex,D=e.onMouseEnter,te=e.onMouseLeave,ne=e.onPointerEnter,k=e.onPointerDownCapture,re=e.ready,A=e.offsetX,j=e.offsetY,M=e.offsetR,N=e.offsetB,P=e.onAlign,F=e.onPrepare,I=e.stretch,L=e.targetWidth,R=e.targetHeight,z=typeof n==`function`?n():n,ie=c||u,ae=C?.length>0,B=Y.useState(!C||!ae),oe=_(B,2),se=oe[0],ce=oe[1];if(S(function(){!se&&ae&&o&&ce(!0)},[se,ae,o]),!se)return null;var V=`auto`,H={left:`-1000vw`,top:`-1000vh`,right:V,bottom:V};if(re||!c){var U=v.points,le=v.dynamicInset||v._experimental?.dynamicInset,W=le&&U[0][1]===`r`,ue=le&&U[0][0]===`b`;W?(H.right=M,H.left=V):(H.left=A,H.right=V),ue?(H.bottom=N,H.top=V):(H.top=j,H.bottom=V)}var G={};return I&&(I.includes(`height`)&&R?G.height=R:I.includes(`minHeight`)&&R&&(G.minHeight=R),I.includes(`width`)&&L?G.width=L:I.includes(`minWidth`)&&L&&(G.minWidth=L)),c||(G.pointerEvents=`none`),Y.createElement(T,{open:x||ie,getContainer:C&&function(){return C(o)},autoDestroy:w},Y.createElement(rt,{prefixCls:i,open:c,zIndex:E,mask:m,motion:ee}),Y.createElement(Xe,{onResize:P,disabled:!c},function(e){return Y.createElement(O,y({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:x,leavedClassName:`${i}-hidden`},b,{onAppearPrepare:F,onEnterPrepare:F,visible:c,onVisibleChanged:function(e){var t;b==null||(t=b.onVisibleChanged)==null||t.call(b,e),s(e)}}),function(n,o){var s=n.className,u=n.style,m=(0,J.default)(i,s,r);return Y.createElement(`div`,{ref:l(e,t,o),className:m,style:f(f(f(f({"--arrow-x":`${g.x||0}px`,"--arrow-y":`${g.y||0}px`},H),G),u),{},{boxSizing:`border-box`,zIndex:E},a),onMouseEnter:D,onMouseLeave:te,onPointerEnter:ne,onClick:p,onPointerDownCapture:k},h&&Y.createElement(nt,{prefixCls:i,arrow:h,arrowPos:g,align:v}),Y.createElement(it,{cache:!c&&!d},z))})}))}),ot=Y.forwardRef(function(e,t){var n=e.children,r=e.getTriggerDOMNode,a=i(n),o=Y.useCallback(function(e){m(t,r?r(e):e)},[r]),s=ne(o,b(n));return a?Y.cloneElement(n,{ref:s}):n}),st=Y.createContext(null);function ct(e){return e?Array.isArray(e)?e:[e]:[]}function lt(e,t,n,r){return Y.useMemo(function(){var i=ct(n??t),a=ct(r??t),o=new Set(i),s=new Set(a);return e&&(o.has(`hover`)&&(o.delete(`hover`),o.add(`click`)),s.has(`hover`)&&(s.delete(`hover`),s.add(`click`))),[o,s]},[e,t,n,r])}function ut(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return arguments.length>2&&arguments[2]?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function dt(e,t,n,r){for(var i=n.points,a=Object.keys(e),o=0;o<a.length;o+=1){var s=a[o];if(ut(e[s]?.points,i,r))return`${t}-placement-${s}`}return``}function ft(e,t,n,r){return t||(n?{motionName:`${e}-${n}`}:r?{motionName:r}:null)}function pt(e){return e.ownerDocument.defaultView}function mt(e){for(var t=[],n=e?.parentElement,r=[`hidden`,`scroll`,`clip`,`auto`];n;){var i=pt(n).getComputedStyle(n);[i.overflowX,i.overflowY,i.overflow].some(function(e){return r.includes(e)})&&t.push(n),n=n.parentElement}return t}function ht(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function gt(e){return ht(parseFloat(e),0)}function _t(e,t){var n=f({},e);return(t||[]).forEach(function(e){if(!(e instanceof HTMLBodyElement||e instanceof HTMLHtmlElement)){var t=pt(e).getComputedStyle(e),r=t.overflow,i=t.overflowClipMargin,a=t.borderTopWidth,o=t.borderBottomWidth,s=t.borderLeftWidth,c=t.borderRightWidth,l=e.getBoundingClientRect(),u=e.offsetHeight,d=e.clientHeight,f=e.offsetWidth,p=e.clientWidth,m=gt(a),h=gt(o),g=gt(s),_=gt(c),v=ht(Math.round(l.width/f*1e3)/1e3),y=ht(Math.round(l.height/u*1e3)/1e3),b=(f-p-g-_)*v,ee=(u-d-m-h)*y,x=m*y,S=h*y,C=g*v,w=_*v,T=0,E=0;if(r===`clip`){var D=gt(i);T=D*v,E=D*y}var te=l.x+C-T,ne=l.y+x-E,O=te+l.width+2*T-C-w-b,k=ne+l.height+2*E-x-S-ee;n.left=Math.max(n.left,te),n.top=Math.max(n.top,ne),n.right=Math.min(n.right,O),n.bottom=Math.min(n.bottom,k)}}),n}function vt(e){var t=`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:0}`,n=t.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(t)}function yt(e,t){var n=_(t||[],2),r=n[0],i=n[1];return[vt(e.width,r),vt(e.height,i)]}function bt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``;return[e[0],e[1]]}function xt(e,t){var n=t[0],r=t[1],i,a=n===`t`?e.y:n===`b`?e.y+e.height:e.y+e.height/2;return i=r===`l`?e.x:r===`r`?e.x+e.width:e.x+e.width/2,{x:i,y:a}}function St(e,t){var n={t:`b`,b:`t`,l:`r`,r:`l`};return e.map(function(e,r){return r===t?n[e]||`c`:e}).join(``)}function Ct(e,t,n,r,i,a,o){var s=Y.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[r]||{}}),l=_(s,2),u=l[0],d=l[1],p=Y.useRef(0),m=Y.useMemo(function(){return t?mt(t):[]},[t]),h=Y.useRef({});e||function(){h.current={}}();var g=L(function(){if(t&&n&&e){var s,l,u=t,p=u.ownerDocument,g=pt(u),v=g.getComputedStyle(u).position,y=u.style.left,b=u.style.top,ee=u.style.right,x=u.style.bottom,S=u.style.overflow,C=f(f({},i[r]),a),w=p.createElement(`div`);(s=u.parentElement)==null||s.appendChild(w),w.style.left=`${u.offsetLeft}px`,w.style.top=`${u.offsetTop}px`,w.style.position=v,w.style.height=`${u.offsetHeight}px`,w.style.width=`${u.offsetWidth}px`,u.style.left=`0`,u.style.top=`0`,u.style.right=`auto`,u.style.bottom=`auto`,u.style.overflow=`hidden`;var T;if(Array.isArray(n))T={x:n[0],y:n[1],width:0,height:0};else{var E=n.getBoundingClientRect();E.x=E.x??E.left,E.y=E.y??E.top,T={x:E.x,y:E.y,width:E.width,height:E.height}}var D=u.getBoundingClientRect(),te=g.getComputedStyle(u),ne=te.height,O=te.width;D.x=D.x??D.left,D.y=D.y??D.top;var k=p.documentElement,re=k.clientWidth,A=k.clientHeight,j=k.scrollWidth,M=k.scrollHeight,N=k.scrollTop,F=k.scrollLeft,I=D.height,L=D.width,R=T.height,z=T.width,ie={left:0,top:0,right:re,bottom:A},ae={left:-F,top:-N,right:j-F,bottom:M-N},B=C.htmlRegion,oe=`visible`,se=`visibleFirst`;B!==`scroll`&&B!==se&&(B=oe);var ce=B===se,V=_t(ae,m),H=_t(ie,m),U=B===oe?H:V,le=ce?H:U;u.style.left=`auto`,u.style.top=`auto`,u.style.right=`0`,u.style.bottom=`0`;var W=u.getBoundingClientRect();u.style.left=y,u.style.top=b,u.style.right=ee,u.style.bottom=x,u.style.overflow=S,(l=u.parentElement)==null||l.removeChild(w);var ue=ht(Math.round(L/parseFloat(O)*1e3)/1e3),G=ht(Math.round(I/parseFloat(ne)*1e3)/1e3);if(ue===0||G===0||c(n)&&!P(n))return;var de=C.offset,K=C.targetOffset,fe=yt(D,de),pe=_(fe,2),q=pe[0],J=pe[1],Y=yt(T,K),me=_(Y,2),he=me[0],ge=me[1];T.x-=he,T.y-=ge;var _e=C.points||[],ve=_(_e,2),ye=ve[0],be=bt(ve[1]),X=bt(ye),xe=xt(T,be),Se=xt(D,X),Ce=f({},C),Z=xe.x-Se.x+q,Q=xe.y-Se.y+J;function e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:U,r=D.x+e,i=D.y+t,a=r+L,o=i+I,s=Math.max(r,n.left),c=Math.max(i,n.top),l=Math.min(a,n.right),u=Math.min(o,n.bottom);return Math.max(0,(l-s)*(u-c))}var we=e(Z,Q),Te=e(Z,Q,H),Ee=xt(T,[`t`,`l`]),De=xt(D,[`t`,`l`]),Oe=xt(T,[`b`,`r`]),ke=xt(D,[`b`,`r`]),Ae=C.overflow||{},je=Ae.adjustX,Me=Ae.adjustY,Ne=Ae.shiftX,Pe=Ae.shiftY,Fe=function(e){return typeof e==`boolean`?e:e>=0},Ie,Le,$,Re;function vt(){Ie=D.y+Q,Le=Ie+I,$=D.x+Z,Re=$+L}vt();var ze=Fe(Me),Be=X[0]===be[0];if(ze&&X[0]===`t`&&(Le>le.bottom||h.current.bt)){var Ve=Q;Be?Ve-=I-R:Ve=Ee.y-ke.y-J;var He=e(Z,Ve),Ue=e(Z,Ve,H);He>we||He===we&&(!ce||Ue>=Te)?(h.current.bt=!0,Q=Ve,J=-J,Ce.points=[St(X,0),St(be,0)]):h.current.bt=!1}if(ze&&X[0]===`b`&&(Ie<le.top||h.current.tb)){var We=Q;Be?We+=I-R:We=Oe.y-De.y-J;var Ge=e(Z,We),Ke=e(Z,We,H);Ge>we||Ge===we&&(!ce||Ke>=Te)?(h.current.tb=!0,Q=We,J=-J,Ce.points=[St(X,0),St(be,0)]):h.current.tb=!1}var qe=Fe(je),Je=X[1]===be[1];if(qe&&X[1]===`l`&&(Re>le.right||h.current.rl)){var Ye=Z;Je?Ye-=L-z:Ye=Ee.x-ke.x-q;var Xe=e(Ye,Q),Ze=e(Ye,Q,H);Xe>we||Xe===we&&(!ce||Ze>=Te)?(h.current.rl=!0,Z=Ye,q=-q,Ce.points=[St(X,1),St(be,1)]):h.current.rl=!1}if(qe&&X[1]===`r`&&($<le.left||h.current.lr)){var Qe=Z;Je?Qe+=L-z:Qe=Oe.x-De.x-q;var $e=e(Qe,Q),et=e(Qe,Q,H);$e>we||$e===we&&(!ce||et>=Te)?(h.current.lr=!0,Z=Qe,q=-q,Ce.points=[St(X,1),St(be,1)]):h.current.lr=!1}vt();var tt=Ne===!0?0:Ne;typeof tt==`number`&&($<H.left&&(Z-=$-H.left-q,T.x+z<H.left+tt&&(Z+=T.x-H.left+z-tt)),Re>H.right&&(Z-=Re-H.right-q,T.x>H.right-tt&&(Z+=T.x-H.right+tt)));var nt=Pe===!0?0:Pe;typeof nt==`number`&&(Ie<H.top&&(Q-=Ie-H.top-J,T.y+R<H.top+nt&&(Q+=T.y-H.top+R-nt)),Le>H.bottom&&(Q-=Le-H.bottom-J,T.y>H.bottom-nt&&(Q+=T.y-H.bottom+nt)));var rt=D.x+Z,it=rt+L,at=D.y+Q,ot=at+I,st=T.x,ct=st+z,lt=T.y,ut=lt+R,dt=(Math.max(rt,st)+Math.min(it,ct))/2-rt,ft=(Math.max(at,lt)+Math.min(ot,ut))/2-at;o?.(t,Ce);var mt=W.right-D.x-(Z+D.width),gt=W.bottom-D.y-(Q+D.height);ue===1&&(Z=Math.floor(Z),mt=Math.floor(mt)),G===1&&(Q=Math.floor(Q),gt=Math.floor(gt)),d({ready:!0,offsetX:Z/ue,offsetY:Q/G,offsetR:mt/ue,offsetB:gt/G,arrowX:dt/ue,arrowY:ft/G,scaleX:ue,scaleY:G,align:Ce})}}),v=function(){p.current+=1;var e=p.current;Promise.resolve().then(function(){p.current===e&&g()})},y=function(){d(function(e){return f(f({},e),{},{ready:!1})})};return S(y,[r]),S(function(){e||y()},[e]),[u.ready,u.offsetX,u.offsetY,u.offsetR,u.offsetB,u.arrowX,u.arrowY,u.scaleX,u.scaleY,u.align,v]}function wt(e,t,n,i,a){S(function(){if(e&&t&&n){var o=t,s=n,c=mt(o),l=mt(s),u=pt(s),d=new Set([u].concat(r(c),r(l)));function e(){i(),a()}return d.forEach(function(t){t.addEventListener(`scroll`,e,{passive:!0})}),u.addEventListener(`resize`,e,{passive:!0}),i(),function(){d.forEach(function(t){t.removeEventListener(`scroll`,e),u.removeEventListener(`resize`,e)})}}},[e,t,n])}function Tt(e,t,n,r,i,a,o,s){var c=Y.useRef(e);c.current=e;var l=Y.useRef(!1);Y.useEffect(function(){if(t&&r&&(!i||a)){var e=function(){l.current=!1},u=function(e){var t;c.current&&!o(((t=e.composedPath)==null||(t=t.call(e))==null?void 0:t[0])||e.target)&&!l.current&&s(!1)},d=pt(r);d.addEventListener(`pointerdown`,e,!0),d.addEventListener(`mousedown`,u,!0),d.addEventListener(`contextmenu`,u,!0);var f=q(n);return f&&(f.addEventListener(`mousedown`,u,!0),f.addEventListener(`contextmenu`,u,!0)),function(){d.removeEventListener(`pointerdown`,e,!0),d.removeEventListener(`mousedown`,u,!0),d.removeEventListener(`contextmenu`,u,!0),f&&(f.removeEventListener(`mousedown`,u,!0),f.removeEventListener(`contextmenu`,u,!0))}}},[t,n,r,i,a]);function u(){l.current=!0}return u}var Et=`prefixCls.children.action.showAction.hideAction.popupVisible.defaultPopupVisible.onPopupVisibleChange.afterPopupVisibleChange.mouseEnterDelay.mouseLeaveDelay.focusDelay.blurDelay.mask.maskClosable.getPopupContainer.forceRender.autoDestroy.destroyPopupOnHide.popup.popupClassName.popupStyle.popupPlacement.builtinPlacements.popupAlign.zIndex.stretch.getPopupClassNameFromAlign.fresh.alignPoint.onPopupClick.onPopupAlign.arrow.popupMotion.maskMotion.popupTransitionName.popupAnimation.maskTransitionName.maskAnimation.className.getTriggerDOMNode`.split(`.`);function Dt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:R;return Y.forwardRef(function(t,n){var r=t.prefixCls,i=r===void 0?`rc-trigger-popup`:r,a=t.children,s=t.action,l=s===void 0?`hover`:s,u=t.showAction,d=t.hideAction,p=t.popupVisible,m=t.defaultPopupVisible,h=t.onPopupVisibleChange,g=t.afterPopupVisibleChange,v=t.mouseEnterDelay,y=t.mouseLeaveDelay,b=y===void 0?.1:y,ee=t.focusDelay,x=t.blurDelay,C=t.mask,w=t.maskClosable,T=w===void 0||w,E=t.getPopupContainer,D=t.forceRender,te=t.autoDestroy,ne=t.destroyPopupOnHide,O=t.popup,k=t.popupClassName,re=t.popupStyle,A=t.popupPlacement,j=t.builtinPlacements,M=j===void 0?{}:j,N=t.popupAlign,P=t.zIndex,F=t.stretch,I=t.getPopupClassNameFromAlign,R=t.fresh,z=t.alignPoint,ie=t.onPopupClick,ae=t.onPopupAlign,B=t.arrow,oe=t.popupMotion,se=t.maskMotion,ce=t.popupTransitionName,V=t.popupAnimation,H=t.maskTransitionName,U=t.maskAnimation,W=t.className,ue=t.getTriggerDOMNode,G=o(t,Et),de=te||ne||!1,K=Y.useState(!1),fe=_(K,2),pe=fe[0],me=fe[1];S(function(){me(tt())},[]);var he=Y.useRef({}),ge=Y.useContext(st),_e=Y.useMemo(function(){return{registerSubPopup:function(e,t){he.current[e]=t,ge?.registerSubPopup(e,t)}}},[ge]),ve=le(),ye=Y.useState(null),be=_(ye,2),X=be[0],xe=be[1],Se=Y.useRef(null),Ce=L(function(e){Se.current=e,c(e)&&X!==e&&xe(e),ge?.registerSubPopup(ve,e)}),Z=Y.useState(null),Q=_(Z,2),we=Q[0],Te=Q[1],Ee=Y.useRef(null),De=L(function(e){c(e)&&we!==e&&(Te(e),Ee.current=e)}),Oe=Y.Children.only(a),ke=Oe?.props||{},Ae={},je=L(function(e){var t=we;return t?.contains(e)||q(t)?.host===e||e===t||X?.contains(e)||q(X)?.host===e||e===X||Object.values(he.current).some(function(t){return t?.contains(e)||e===t})}),Me=ft(i,oe,V,ce),Ne=ft(i,se,U,H),Pe=Y.useState(m||!1),Fe=_(Pe,2),Ie=Fe[0],Le=Fe[1],$=p??Ie,Re=L(function(e){p===void 0&&Le(e)});S(function(){Le(p||!1)},[p]);var ze=Y.useRef($);ze.current=$;var Be=Y.useRef([]);Be.current=[];var Ve=L(function(e){Re(e),(Be.current[Be.current.length-1]??$)!==e&&(Be.current.push(e),h?.(e))}),He=Y.useRef(),Ue=function(){clearTimeout(He.current)},We=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Ue(),t===0?Ve(e):He.current=setTimeout(function(){Ve(e)},t*1e3)};Y.useEffect(function(){return Ue},[]);var Ge=Y.useState(!1),Ke=_(Ge,2),qe=Ke[0],Je=Ke[1];S(function(e){(!e||$)&&Je(!0)},[$]);var Ye=Y.useState(null),Ze=_(Ye,2),Qe=Ze[0],$e=Ze[1],et=Y.useState(null),nt=_(et,2),rt=nt[0],it=nt[1],ct=function(e){it([e.clientX,e.clientY])},ut=Ct($,X,z&&rt!==null?rt:we,A,M,N,ae),pt=_(ut,11),mt=pt[0],ht=pt[1],gt=pt[2],_t=pt[3],vt=pt[4],yt=pt[5],bt=pt[6],xt=pt[7],St=pt[8],Dt=pt[9],Ot=pt[10],kt=lt(pe,l,u,d),At=_(kt,2),jt=At[0],Mt=At[1],Nt=jt.has(`click`),Pt=Mt.has(`click`)||Mt.has(`contextMenu`),Ft=L(function(){qe||Ot()});wt($,we,X,Ft,function(){ze.current&&z&&Pt&&We(!1)}),S(function(){Ft()},[rt,A]),S(function(){$&&!(M!=null&&M[A])&&Ft()},[JSON.stringify(N)]);var It=Y.useMemo(function(){var e=dt(M,i,Dt,z);return(0,J.default)(e,I?.(Dt))},[Dt,I,M,i,z]);Y.useImperativeHandle(n,function(){return{nativeElement:Ee.current,popupElement:Se.current,forceAlign:Ft}});var Lt=Y.useState(0),Rt=_(Lt,2),zt=Rt[0],Bt=Rt[1],Vt=Y.useState(0),Ht=_(Vt,2),Ut=Ht[0],Wt=Ht[1],Gt=function(){if(F&&we){var e=we.getBoundingClientRect();Bt(e.width),Wt(e.height)}},Kt=function(){Gt(),Ft()},qt=function(e){Je(!1),Ot(),g?.(e)},Jt=function(){return new Promise(function(e){Gt(),$e(function(){return e})})};S(function(){Qe&&(Ot(),Qe(),$e(null))},[Qe]);function Yt(e,t,n,r){Ae[e]=function(i){var a;r?.(i),We(t,n);var o=[...arguments].slice(1);(a=ke[e])==null||a.call.apply(a,[ke,i].concat(o))}}(Nt||Pt)&&(Ae.onClick=function(e){var t;ze.current&&Pt?We(!1):!ze.current&&Nt&&(ct(e),We(!0));var n=[...arguments].slice(1);(t=ke.onClick)==null||t.call.apply(t,[ke,e].concat(n))});var Xt=Tt($,Pt,we,X,C,T,je,We),Zt=jt.has(`hover`),Qt=Mt.has(`hover`),$t,en;Zt&&(Yt(`onMouseEnter`,!0,v,function(e){ct(e)}),Yt(`onPointerEnter`,!0,v,function(e){ct(e)}),$t=function(e){($||qe)&&X!=null&&X.contains(e.target)&&We(!0,v)},z&&(Ae.onMouseMove=function(e){var t;(t=ke.onMouseMove)==null||t.call(ke,e)})),Qt&&(Yt(`onMouseLeave`,!1,b),Yt(`onPointerLeave`,!1,b),en=function(){We(!1,b)}),jt.has(`focus`)&&Yt(`onFocus`,!0,ee),Mt.has(`focus`)&&Yt(`onBlur`,!1,x),jt.has(`contextMenu`)&&(Ae.onContextMenu=function(e){var t;ze.current&&Mt.has(`contextMenu`)?We(!1):(ct(e),We(!0)),e.preventDefault();var n=[...arguments].slice(1);(t=ke.onContextMenu)==null||t.call.apply(t,[ke,e].concat(n))}),W&&(Ae.className=(0,J.default)(ke.className,W));var tn=Y.useRef(!1);tn.current||=D||$||qe;var nn=f(f({},ke),Ae),rn={};[`onContextMenu`,`onClick`,`onMouseDown`,`onTouchStart`,`onMouseEnter`,`onMouseLeave`,`onFocus`,`onBlur`].forEach(function(e){G[e]&&(rn[e]=function(){var t,n=[...arguments];(t=nn[e])==null||t.call.apply(t,[nn].concat(n)),G[e].apply(G,n)})});var an=Y.cloneElement(Oe,f(f({},nn),rn)),on={x:yt,y:bt},sn=B?f({},B===!0?{}:B):null;return Y.createElement(Y.Fragment,null,Y.createElement(Xe,{disabled:!$,ref:De,onResize:Kt},Y.createElement(ot,{getTriggerDOMNode:ue},an)),tn.current&&Y.createElement(st.Provider,{value:_e},Y.createElement(at,{portal:e,ref:Ce,prefixCls:i,popup:O,className:(0,J.default)(k,It),style:re,target:we,onMouseEnter:$t,onMouseLeave:en,onPointerEnter:$t,zIndex:P,open:$,keepDom:qe,fresh:R,onClick:ie,onPointerDownCapture:Xt,mask:C,motion:Me,maskMotion:Ne,onVisibleChanged:qt,onPrepare:Jt,forceRender:D,autoDestroy:de,getPopupContainer:E,align:Dt,arrow:sn,arrowPos:on,ready:mt,offsetX:ht,offsetY:gt,offsetR:_t,offsetB:vt,onAlign:Ft,stretch:F,targetWidth:zt/xt,targetHeight:Ut/St})))})}var Ot=Dt(R);function kt(e,t,n){return(0,J.default)({[`${e}-status-success`]:t===`success`,[`${e}-status-warning`]:t===`warning`,[`${e}-status-error`]:t===`error`,[`${e}-status-validating`]:t===`validating`,[`${e}-has-feedback`]:n})}var At=(e,t)=>t||e,jt=(e,t,n)=>{let{variant:r,[e]:i}=Y.useContext(F),a=Y.useContext(d),o=i?.variant,s;s=t===void 0?n===!1?`borderless`:a??o??r??`outlined`:t;let c=oe.includes(s);return[s,c]},Mt={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z`}}]},name:`check`,theme:`outlined`},Nt=Y.forwardRef(function(e,t){return Y.createElement(ee,y({},e,{ref:t,icon:Mt}))});function Pt(e){var t=e.children,n=e.prefixCls,r=e.id,i=e.overlayInnerStyle,a=e.bodyClassName,o=e.className,s=e.style;return Y.createElement(`div`,{className:(0,J.default)(`${n}-content`,o),style:s},Y.createElement(`div`,{className:(0,J.default)(`${n}-inner`,a),id:r,role:`tooltip`,style:i},typeof t==`function`?t():t))}var Ft={shiftX:64,adjustY:1},It={adjustX:1,shiftY:!0},Lt=[0,0],Rt={left:{points:[`cr`,`cl`],overflow:It,offset:[-4,0],targetOffset:Lt},right:{points:[`cl`,`cr`],overflow:It,offset:[4,0],targetOffset:Lt},top:{points:[`bc`,`tc`],overflow:Ft,offset:[0,-4],targetOffset:Lt},bottom:{points:[`tc`,`bc`],overflow:Ft,offset:[0,4],targetOffset:Lt},topLeft:{points:[`bl`,`tl`],overflow:Ft,offset:[0,-4],targetOffset:Lt},leftTop:{points:[`tr`,`tl`],overflow:It,offset:[-4,0],targetOffset:Lt},topRight:{points:[`br`,`tr`],overflow:Ft,offset:[0,-4],targetOffset:Lt},rightTop:{points:[`tl`,`tr`],overflow:It,offset:[4,0],targetOffset:Lt},bottomRight:{points:[`tr`,`br`],overflow:Ft,offset:[0,4],targetOffset:Lt},rightBottom:{points:[`bl`,`br`],overflow:It,offset:[4,0],targetOffset:Lt},bottomLeft:{points:[`tl`,`bl`],overflow:Ft,offset:[0,4],targetOffset:Lt},leftBottom:{points:[`br`,`bl`],overflow:It,offset:[-4,0],targetOffset:Lt}},zt=[`overlayClassName`,`trigger`,`mouseEnterDelay`,`mouseLeaveDelay`,`overlayStyle`,`prefixCls`,`children`,`onVisibleChange`,`afterVisibleChange`,`transitionName`,`animation`,`motion`,`placement`,`align`,`destroyTooltipOnHide`,`defaultVisible`,`getTooltipContainer`,`overlayInnerStyle`,`arrowContent`,`overlay`,`id`,`showArrow`,`classNames`,`styles`],Bt=(0,Y.forwardRef)(function(e,t){var n=e.overlayClassName,r=e.trigger,i=r===void 0?[`hover`]:r,a=e.mouseEnterDelay,s=a===void 0?0:a,c=e.mouseLeaveDelay,l=c===void 0?.1:c,u=e.overlayStyle,d=e.prefixCls,p=d===void 0?`rc-tooltip`:d,m=e.children,h=e.onVisibleChange,g=e.afterVisibleChange,_=e.transitionName,v=e.animation,b=e.motion,ee=e.placement,x=ee===void 0?`right`:ee,S=e.align,C=S===void 0?{}:S,w=e.destroyTooltipOnHide,T=w!==void 0&&w,E=e.defaultVisible,D=e.getTooltipContainer,te=e.overlayInnerStyle;e.arrowContent;var ne=e.overlay,O=e.id,k=e.showArrow,re=k===void 0||k,A=e.classNames,j=e.styles,M=o(e,zt),N=le(O),P=(0,Y.useRef)(null);(0,Y.useImperativeHandle)(t,function(){return P.current});var F=f({},M);return`visible`in e&&(F.popupVisible=e.visible),Y.createElement(Ot,y({popupClassName:(0,J.default)(n,A?.root),prefixCls:p,popup:function(){return Y.createElement(Pt,{key:`content`,prefixCls:p,id:N,bodyClassName:A?.body,overlayInnerStyle:f(f({},te),j?.body)},ne)},action:i,builtinPlacements:Rt,popupPlacement:x,ref:P,popupAlign:C,getPopupContainer:D,onPopupVisibleChange:h,afterPopupVisibleChange:g,popupTransitionName:_,popupAnimation:v,popupMotion:b,defaultPopupVisible:E,autoDestroy:T,mouseLeaveDelay:l,popupStyle:f(f({},u),j?.root),mouseEnterDelay:s,arrow:re},F),function(){var e=Y.Children.only(m)?.props||{},t=f(f({},e),{},{"aria-describedby":ne?N:null});return Y.cloneElement(m,t)}())});function Vt(e){let{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,i=t/2,a=i,o=+r/Math.sqrt(2),s=i-r*(1-1/Math.sqrt(2)),c=i-1/Math.sqrt(2)*n,l=r*(Math.sqrt(2)-1)+1/Math.sqrt(2)*n,u=2*i-c,d=l,f=2*i-o,p=s,m=2*i,h=a,g=i*Math.sqrt(2)+r*(Math.sqrt(2)-2),_=r*(Math.sqrt(2)-1),v=`polygon(${_}px 100%, 50% ${_}px, ${2*i-_}px 100%, ${_}px 100%)`;return{arrowShadowWidth:g,arrowPath:`path('M 0 ${a} A ${r} ${r} 0 0 0 ${o} ${s} L ${c} ${l} A ${n} ${n} 0 0 1 ${u} ${d} L ${f} ${p} A ${r} ${r} 0 0 0 ${m} ${h} Z')`,arrowPolygon:v}}var Ht=(e,t,n)=>{let{sizePopupArrow:r,arrowPolygon:i,arrowPath:a,arrowShadowWidth:o,borderRadiusXS:s,calc:c}=e;return{pointerEvents:`none`,width:r,height:r,overflow:`hidden`,"&::before":{position:`absolute`,bottom:0,insetInlineStart:0,width:r,height:c(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,a]},content:`""`},"&::after":{content:`""`,position:`absolute`,width:o,height:o,bottom:0,insetInline:0,margin:`auto`,borderRadius:{_skip_check_:!0,value:`0 0 ${K(s)} 0`},transform:`translateY(50%) rotate(-135deg)`,boxShadow:n,zIndex:0,background:`transparent`}}};function Ut(e){let{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?8:r}}function Wt(e,t){return e?t:{}}function Gt(e,t,n){let{componentCls:r,boxShadowPopoverArrow:i,arrowOffsetVertical:a,arrowOffsetHorizontal:o}=e,{arrowDistance:s=0,arrowPlacement:c={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:Object.assign(Object.assign(Object.assign(Object.assign({[`${r}-arrow`]:[Object.assign(Object.assign({position:`absolute`,zIndex:1,display:`block`},Ht(e,t,i)),{"&:before":{background:t}})]},Wt(!!c.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(`,`)]:{bottom:s,transform:`translateY(100%) rotate(180deg)`},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(100%) rotate(180deg)`},"&-placement-topLeft":{"--arrow-offset-horizontal":o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${K(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}})),Wt(!!c.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(`,`)]:{top:s,transform:`translateY(-100%)`},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:`50%`},transform:`translateX(-50%) translateY(-100%)`},"&-placement-bottomLeft":{"--arrow-offset-horizontal":o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${K(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}})),Wt(!!c.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(`,`)]:{right:{_skip_check_:!0,value:s},transform:`translateX(100%) rotate(90deg)`},[`&-placement-left > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(100%) rotate(90deg)`},[`&-placement-leftTop > ${r}-arrow`]:{top:a},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:a}})),Wt(!!c.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(`,`)]:{left:{_skip_check_:!0,value:s},transform:`translateX(-100%) rotate(-90deg)`},[`&-placement-right > ${r}-arrow`]:{top:{_skip_check_:!0,value:`50%`},transform:`translateY(-50%) translateX(-100%) rotate(-90deg)`},[`&-placement-rightTop > ${r}-arrow`]:{top:a},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:a}}))}}function Kt(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};let i=r&&typeof r==`object`?r:{},a={};switch(e){case`top`:case`bottom`:a.shiftX=t.arrowOffsetHorizontal*2+n,a.shiftY=!0,a.adjustY=!0;break;case`left`:case`right`:a.shiftY=t.arrowOffsetVertical*2+n,a.shiftX=!0,a.adjustX=!0}let o=Object.assign(Object.assign({},a),i);return o.shiftX||(o.adjustX=!0),o.shiftY||(o.adjustY=!0),o}var qt={left:{points:[`cr`,`cl`]},right:{points:[`cl`,`cr`]},top:{points:[`bc`,`tc`]},bottom:{points:[`tc`,`bc`]},topLeft:{points:[`bl`,`tl`]},leftTop:{points:[`tr`,`tl`]},topRight:{points:[`br`,`tr`]},rightTop:{points:[`tl`,`tr`]},bottomRight:{points:[`tr`,`br`]},rightBottom:{points:[`bl`,`br`]},bottomLeft:{points:[`tl`,`bl`]},leftBottom:{points:[`br`,`bl`]}},Jt={topLeft:{points:[`bl`,`tc`]},leftTop:{points:[`tr`,`cl`]},topRight:{points:[`br`,`tc`]},rightTop:{points:[`tl`,`cr`]},bottomRight:{points:[`tr`,`bc`]},rightBottom:{points:[`bl`,`cr`]},bottomLeft:{points:[`tl`,`bc`]},leftBottom:{points:[`br`,`cl`]}},Yt=new Set([`topLeft`,`topRight`,`bottomLeft`,`bottomRight`,`leftTop`,`leftBottom`,`rightTop`,`rightBottom`]);function Xt(e){let{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:i,borderRadius:a,visibleFirst:o}=e,s=t/2,c={},l=Ut({contentRadius:a,limitVerticalRadius:!0});return Object.keys(qt).forEach(e=>{let a=r&&Jt[e]||qt[e],u=Object.assign(Object.assign({},a),{offset:[0,0],dynamicInset:!0});switch(c[e]=u,Yt.has(e)&&(u.autoArrow=!1),e){case`top`:case`topLeft`:case`topRight`:u.offset[1]=-s-i;break;case`bottom`:case`bottomLeft`:case`bottomRight`:u.offset[1]=s+i;break;case`left`:case`leftTop`:case`leftBottom`:u.offset[0]=-s-i;break;case`right`:case`rightTop`:case`rightBottom`:u.offset[0]=s+i}if(r)switch(e){case`topLeft`:case`bottomLeft`:u.offset[0]=-l.arrowOffsetHorizontal-s;break;case`topRight`:case`bottomRight`:u.offset[0]=l.arrowOffsetHorizontal+s;break;case`leftTop`:case`rightTop`:u.offset[1]=-l.arrowOffsetHorizontal*2+s;break;case`leftBottom`:case`rightBottom`:u.offset[1]=l.arrowOffsetHorizontal*2-s}u.overflow=Kt(e,l,t,n),o&&(u.htmlRegion=`visibleFirst`)}),c}var Zt=e=>{let{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:i,tooltipBg:a,tooltipBorderRadius:o,zIndexPopup:s,controlHeight:c,boxShadowSecondary:l,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:p}=e,m=t(o).add(p).add(f).equal(),h=t(o).mul(2).add(p).equal();return[{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},A(e)),{position:`absolute`,zIndex:s,display:`block`,width:`max-content`,maxWidth:r,visibility:`visible`,"--valid-offset-x":`var(--arrow-offset-horizontal, var(--arrow-x))`,transformOrigin:`var(--valid-offset-x, 50%) var(--arrow-y, 50%)`,"&-hidden":{display:`none`},"--antd-arrow-background-color":a,[`${n}-inner`]:{minWidth:h,minHeight:c,padding:`${K(e.calc(u).div(2).equal())} ${K(d)}`,color:`var(--ant-tooltip-color, ${i})`,textAlign:`start`,textDecoration:`none`,wordWrap:`break-word`,backgroundColor:a,borderRadius:o,boxShadow:l,boxSizing:`border-box`},"&-placement-topLeft,&-placement-topRight,&-placement-bottomLeft,&-placement-bottomRight":{minWidth:m},"&-placement-left,&-placement-leftTop,&-placement-leftBottom,&-placement-right,&-placement-rightTop,&-placement-rightBottom":{[`${n}-inner`]:{borderRadius:e.min(o,8)}},[`${n}-content`]:{position:`relative`}}),D(e,(e,{darkColor:t})=>({[`&${n}-${e}`]:{[`${n}-inner`]:{backgroundColor:t},[`${n}-arrow`]:{"--antd-arrow-background-color":t}}}))),{"&-rtl":{direction:`rtl`}})},Gt(e,`var(--antd-arrow-background-color)`),{[`${n}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow}}]},Qt=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},Ut({contentRadius:e.borderRadius,limitVerticalRadius:!0})),Vt(W(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),$t=(e,t=!0)=>k(`Tooltip`,e=>{let{borderRadius:t,colorTextLightSolid:n,colorBgSpotlight:r}=e;return[Zt(W(e,{tooltipMaxWidth:250,tooltipColor:n,tooltipBorderRadius:t,tooltipBg:r})),de(e,`zoom-big-fast`)]},Qt,{resetStyle:!1,injectStyle:t})(e);function en(e,t){let n=x(t),r=(0,J.default)({[`${e}-${t}`]:t&&n}),i={},a={},o=Ze(t).toRgb(),s=(.299*o.r+.587*o.g+.114*o.b)/255<.5?`#FFF`:`#000`;return t&&!n&&(i.background=t,i[`--ant-tooltip-color`]=s,a[`--antd-arrow-background-color`]=t),{className:r,overlayStyle:i,arrowStyle:a}}var tn=e=>{let{prefixCls:t,className:n,placement:r=`top`,title:i,color:a,overlayInnerStyle:o}=e,{getPrefixCls:s}=Y.useContext(F),c=s(`tooltip`,t),[l,u,d]=$t(c),f=en(c,a),p=f.arrowStyle,m=Object.assign(Object.assign({},o),f.overlayStyle),h=(0,J.default)(u,d,c,`${c}-pure`,`${c}-placement-${r}`,n,f.className);return l(Y.createElement(`div`,{className:h,style:p},Y.createElement(`div`,{className:`${c}-arrow`}),Y.createElement(Pt,Object.assign({},e,{className:u,prefixCls:c,overlayInnerStyle:m}),i)))},nn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},rn=Y.forwardRef((e,t)=>{let{prefixCls:r,openClassName:i,getTooltipContainer:a,color:o,overlayInnerStyle:s,children:c,afterOpenChange:l,afterVisibleChange:u,destroyTooltipOnHide:d,destroyOnHidden:f,arrow:p=!0,title:m,overlay:g,builtinPlacements:_,arrowPointAtCenter:v=!1,autoAdjustOverflow:y=!0,motion:b,getPopupContainer:ee,placement:x=`top`,mouseEnterDelay:S=.1,mouseLeaveDelay:T=.1,overlayStyle:E,rootClassName:D,overlayClassName:ne,styles:O,classNames:k}=e,re=nn(e,`prefixCls.openClassName.getTooltipContainer.color.overlayInnerStyle.children.afterOpenChange.afterVisibleChange.destroyTooltipOnHide.destroyOnHidden.arrow.title.overlay.builtinPlacements.arrowPointAtCenter.autoAdjustOverflow.motion.getPopupContainer.placement.mouseEnterDelay.mouseLeaveDelay.overlayStyle.rootClassName.overlayClassName.styles.classNames`.split(`.`)),A=!!p,[,j]=n(),{getPopupContainer:N,getPrefixCls:P,direction:F,className:I,style:L,classNames:R,styles:z}=G(`tooltip`),ae=M(`Tooltip`),B=Y.useRef(null),oe=()=>{var e;(e=B.current)==null||e.forceAlign()};Y.useImperativeHandle(t,()=>({forceAlign:oe,forcePopupAlign:()=>{ae.deprecated(!1,`forcePopupAlign`,`forceAlign`),oe()},nativeElement:B.current?.nativeElement,popupElement:B.current?.popupElement}));let[se,V]=ce(!1,{value:e.open??e.visible,defaultValue:e.defaultOpen??e.defaultVisible}),H=!m&&!g&&m!==0,U=t=>{var n,r;V(!H&&t),H||((n=e.onOpenChange)==null||n.call(e,t),(r=e.onVisibleChange)==null||r.call(e,t))},le=Y.useMemo(()=>{let e=v;return typeof p==`object`&&(e=p.pointAtCenter??p.arrowPointAtCenter??v),_||Xt({arrowPointAtCenter:e,autoAdjustOverflow:y,arrowWidth:A?j.sizePopupArrow:0,borderRadius:j.borderRadius,offset:j.marginXXS,visibleFirst:!0})},[v,p,_,j]),W=Y.useMemo(()=>m===0?m:g||m||``,[g,m]),ue=Y.createElement(te,{space:!0},typeof W==`function`?W():W),de=P(`tooltip`,r),K=P(),pe=e[`data-popover-inject`],q=se;!(`open`in e)&&!(`visible`in e)&&H&&(q=!1);let me=Y.isValidElement(c)&&!h(c)?c:Y.createElement(`span`,null,c),he=me.props,ge=!he.className||typeof he.className==`string`?(0,J.default)(he.className,i||`${de}-open`):he.className,[_e,ve,ye]=$t(de,!pe),be=en(de,o),X=be.arrowStyle,xe=(0,J.default)(ne,{[`${de}-rtl`]:F===`rtl`},be.className,D,ve,ye,I,R.root,k?.root),Se=(0,J.default)(R.body,k?.body),[Ce,Z]=fe(`Tooltip`,re.zIndex),Q=Y.createElement(Bt,Object.assign({},re,{zIndex:Ce,showArrow:A,placement:x,mouseEnterDelay:S,mouseLeaveDelay:T,prefixCls:de,classNames:{root:xe,body:Se},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},X),z.root),L),E),O?.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},z.body),s),O?.body),be.overlayStyle)},getTooltipContainer:ee||a||N,ref:B,builtinPlacements:le,overlay:ue,visible:q,onVisibleChange:U,afterVisibleChange:l??u,arrowContent:Y.createElement(`span`,{className:`${de}-arrow-content`}),motion:{motionName:C(K,`zoom-big-fast`,e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:f??!!d}),q?ie(me,{className:ge}):me);return _e(Y.createElement(w.Provider,{value:Z},Q))});rn._InternalPanelDoNotUseOrYouWillBeFired=tn;function an(e){return W(e,{inputAffixPadding:e.paddingXXS})}var on=e=>{let{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:i,controlHeightSM:a,controlHeightLG:o,fontSizeLG:s,lineHeightLG:c,paddingSM:l,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:p,colorPrimary:m,controlOutlineWidth:h,controlOutline:g,colorErrorOutline:_,colorWarningOutline:v,colorBgContainer:y,inputFontSize:b,inputFontSizeLG:ee,inputFontSizeSM:x}=e,S=b||n,C=x||S,w=ee||s,T=Math.round((t-S*r)/2*10)/10-i,E=Math.round((a-C*r)/2*10)/10-i,D=Math.ceil((o-w*c)/2*10)/10-i;return{paddingBlock:Math.max(T,0),paddingBlockSM:Math.max(E,0),paddingBlockLG:Math.max(D,0),paddingInline:l-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:f,activeBorderColor:m,hoverBorderColor:p,activeShadow:`0 0 0 ${h}px ${g}`,errorActiveShadow:`0 0 0 ${h}px ${_}`,warningActiveShadow:`0 0 0 ${h}px ${v}`,hoverBg:y,activeBg:y,inputFontSize:S,inputFontSizeLG:w,inputFontSizeSM:C}},sn=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),cn=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:`none`,cursor:`not-allowed`,opacity:1,"input[disabled], textarea[disabled]":{cursor:`not-allowed`},"&:hover:not([disabled])":Object.assign({},sn(W(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),ln=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),un=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},ln(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),dn=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ln(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},cn(e))}),un(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),un(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),fn=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),pn=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${K(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},fn(e,{status:`error`,addonBorderColor:e.colorError,addonColor:e.colorErrorText})),fn(e,{status:`warning`,addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},cn(e))}})}),mn=(e,t)=>{let{componentCls:n}=e;return{"&-borderless":Object.assign({background:`transparent`,border:`none`,"&:focus, &:focus-within":{outline:`none`},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},hn=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:`transparent`,"input&, & input, textarea&, & textarea":{color:t?.inputColor??`unset`},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),gn=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},hn(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),_n=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},hn(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},cn(e))}),gn(e,{status:`error`,bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),gn(e,{status:`warning`,bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),vn=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),yn=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:`static`}}},vn(e,{status:`error`,addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),vn(e,{status:`warning`,addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${K(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${K(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${K(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${K(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${K(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${K(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),bn=(e,t)=>({background:e.colorBgContainer,borderWidth:`${K(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),xn=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},bn(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),Sn=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},bn(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:`none`,cursor:`not-allowed`,"&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:`not-allowed`}}),xn(e,{status:`error`,borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),xn(e,{status:`warning`,borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),Cn=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:`none`},"&:placeholder-shown":{textOverflow:`ellipsis`}}),wn=e=>{let{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:i}=e;return{padding:`${K(t)} ${K(i)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},Tn=e=>({padding:`${K(e.paddingBlockSM)} ${K(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),En=e=>Object.assign(Object.assign({position:`relative`,display:`inline-block`,width:`100%`,minWidth:0,padding:`${K(e.paddingBlock)} ${K(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},Cn(e.colorTextPlaceholder)),{"&-lg":Object.assign({},wn(e)),"&-sm":Object.assign({},Tn(e)),"&-rtl, &-textarea-rtl":{direction:`rtl`}}),Dn=e=>{let{componentCls:t,antCls:n}=e;return{position:`relative`,display:`table`,width:`100%`,borderCollapse:`separate`,borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},wn(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},Tn(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:`table-cell`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:`table-cell`,width:1,whiteSpace:`nowrap`,verticalAlign:`middle`,"&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:`block !important`},"&-addon":{position:`relative`,padding:`0 ${K(e.paddingInline)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.inputFontSize,textAlign:`center`,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${K(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${K(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:`inherit`,border:`${K(e.lineWidth)} ${e.lineType} transparent`,boxShadow:`none`}}},[`${n}-cascader-picker`]:{margin:`-9px ${K(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:`transparent`,[`${n}-cascader-input`]:{textAlign:`start`,border:0,boxShadow:`none`}}}},[t]:{width:`100%`,marginBottom:0,textAlign:`inherit`,"&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:`block`},p()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:`inline-flex`,float:`none`,verticalAlign:`top`,borderRadius:0},[`
|
|
& > ${t}-affix-wrapper,
|
|
& > ${t}-number-affix-wrapper,
|
|
& > ${n}-picker-range
|
|
`]:{display:`inline-flex`},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:`none`},[`& > ${n}-select > ${n}-select-selector,
|
|
& > ${n}-select-auto-complete ${t},
|
|
& > ${n}-cascader-picker ${t},
|
|
& > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
& > ${n}-select:first-child > ${n}-select-selector,
|
|
& > ${n}-select-auto-complete:first-child ${t},
|
|
& > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
|
|
& > ${n}-select:last-child > ${n}-select-selector,
|
|
& > ${n}-cascader-picker:last-child ${t},
|
|
& > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:`top`},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},On=e=>{let{componentCls:t,controlHeightSM:n,lineWidth:r,calc:i}=e,a=i(n).sub(i(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},A(e)),En(e)),dn(e)),_n(e)),mn(e)),Sn(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:`none`}})}},kn=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:`pointer`,transition:`color ${e.motionDurationSlow}`,border:`none`,outline:`none`,backgroundColor:`transparent`,"&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:`hidden`},"&-has-suffix":{margin:`0 ${K(e.inputAffixPadding)}`}}}},An=e=>{let{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:i,colorIcon:a,colorIconHover:o,iconCls:s}=e,c=`${t}-affix-wrapper`,l=`${t}-affix-wrapper-disabled`;return{[c]:Object.assign(Object.assign(Object.assign(Object.assign({},En(e)),{display:`inline-flex`,[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:`inherit`,border:`none`,borderRadius:0,outline:`none`,background:`transparent`,color:`inherit`,"&::-ms-reveal":{display:`none`},"&:focus":{boxShadow:`none !important`}},"&::before":{display:`inline-block`,width:0,visibility:`hidden`,content:`"\\a0"`},[t]:{"&-prefix, &-suffix":{display:`flex`,flex:`none`,alignItems:`center`,"> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:`ltr`},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),kn(e)),{[`${s}${t}-password-icon`]:{color:a,cursor:`pointer`,transition:`all ${i}`,"&:hover":{color:o}}}),[`${t}-underlined`]:{borderRadius:0},[l]:{[`${s}${t}-password-icon`]:{color:a,cursor:`not-allowed`,"&:hover":{color:a}}}}},jn=e=>{let{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},A(e)),Dn(e)),{"&-rtl":{direction:`rtl`},"&-wrapper":Object.assign(Object.assign(Object.assign({display:`inline-block`,width:`100%`,textAlign:`start`,verticalAlign:`top`,"&-rtl":{direction:`rtl`},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}}},pn(e)),yn(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},Mn=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[t]:{"&:not([disabled]):hover, &:not([disabled]):focus":{[`+ ${t}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:`none`},[`${r}-button:not(${n}-btn-color-primary)`]:{color:e.colorTextDescription,"&:not([disabled]):hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:`rtl`},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,
|
|
> ${t},
|
|
${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},Nn=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Pn=k([`Input`,`Shared`],e=>{let t=W(e,an(e));return[On(t),An(t)]},on,{resetFont:!1}),Fn=k([`Input`,`Component`],e=>{let t=W(e,an(e));return[jn(t),Mn(t),Nn(t),se(t)]},on,{resetFont:!1});function In(e){return!!(e.addonBefore||e.addonAfter)}function Ln(e){return!!(e.prefix||e.suffix||e.allowClear)}function Rn(e,t,n){var r=t.cloneNode(!0),i=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart==`number`&&typeof t.selectionEnd==`number`&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function zn(e,t,n,r){if(n){var i=t;t.type===`click`?(i=Rn(t,e,``),n(i)):(e.type!==`file`&&r!==void 0&&(i=Rn(t,e,r)),n(i))}}function Bn(e,t){if(e){e.focus(t);var n=(t||{}).cursor;if(n){var r=e.value.length;switch(n){case`start`:e.setSelectionRange(0,0);break;case`end`:e.setSelectionRange(r,r);break;default:e.setSelectionRange(0,r)}}}}var Vn=Y.forwardRef(function(e,t){var n=e.inputElement,r=e.children,i=e.prefixCls,a=e.prefix,o=e.suffix,s=e.addonBefore,c=e.addonAfter,l=e.className,u=e.style,d=e.disabled,p=e.readOnly,m=e.focused,h=e.triggerFocus,g=e.allowClear,_=e.value,v=e.handleReset,b=e.hidden,ee=e.classes,x=e.classNames,S=e.dataAttrs,C=e.styles,w=e.components,T=e.onClear,E=r??n,D=w?.affixWrapper||`span`,te=w?.groupWrapper||`span`,ne=w?.wrapper||`span`,O=w?.groupAddon||`span`,k=(0,Y.useRef)(null),re=function(e){var t;(t=k.current)!=null&&t.contains(e.target)&&h?.()},A=Ln(e),M=(0,Y.cloneElement)(E,{value:_,className:(0,J.default)(E.props?.className,!A&&x?.variant)||null}),N=(0,Y.useRef)(null);if(Y.useImperativeHandle(t,function(){return{nativeElement:N.current||k.current}}),A){var P=null;if(g){var F=!d&&!p&&_,I=`${i}-clear-icon`,L=j(g)===`object`&&g!=null&&g.clearIcon?g.clearIcon:`✖`;P=Y.createElement(`button`,{type:`button`,tabIndex:-1,onClick:function(e){v?.(e),T?.()},onMouseDown:function(e){return e.preventDefault()},className:(0,J.default)(I,U(U({},`${I}-hidden`,!F),`${I}-has-suffix`,!!o))},L)}var R=`${i}-affix-wrapper`,z=(0,J.default)(R,U(U(U(U(U({},`${i}-disabled`,d),`${R}-disabled`,d),`${R}-focused`,m),`${R}-readonly`,p),`${R}-input-with-clear-btn`,o&&g&&_),ee?.affixWrapper,x?.affixWrapper,x?.variant),ie=(o||g)&&Y.createElement(`span`,{className:(0,J.default)(`${i}-suffix`,x?.suffix),style:C?.suffix},P,o);M=Y.createElement(D,y({className:z,style:C?.affixWrapper,onClick:re},S?.affixWrapper,{ref:k}),a&&Y.createElement(`span`,{className:(0,J.default)(`${i}-prefix`,x?.prefix),style:C?.prefix},a),M,ie)}if(In(e)){var ae=`${i}-group`,B=`${ae}-addon`,oe=`${ae}-wrapper`,se=(0,J.default)(`${i}-wrapper`,ae,ee?.wrapper,x?.wrapper),ce=(0,J.default)(oe,U({},`${oe}-disabled`,d),ee?.group,x?.groupWrapper);M=Y.createElement(te,{className:ce,ref:N},Y.createElement(ne,{className:se},s&&Y.createElement(O,{className:B},s),M,c&&Y.createElement(O,{className:B},c)))}return Y.cloneElement(M,{className:(0,J.default)(M.props?.className,l)||null,style:f(f({},M.props?.style),u),hidden:b})}),Hn=[`show`];function Un(e,t){return Y.useMemo(function(){var n={};t&&(n.show=j(t)===`object`&&t.formatter?t.formatter:!!t),n=f(f({},n),e);var r=n,i=r.show,a=o(r,Hn);return f(f({},a),{},{show:!!i,showFormatter:typeof i==`function`?i:void 0,strategy:a.strategy||function(e){return e.length}})},[e,t])}var Wn=[`autoComplete`,`onChange`,`onFocus`,`onBlur`,`onPressEnter`,`onKeyDown`,`onKeyUp`,`prefixCls`,`disabled`,`htmlSize`,`className`,`maxLength`,`suffix`,`showCount`,`count`,`type`,`classes`,`classNames`,`styles`,`onCompositionStart`,`onCompositionEnd`],Gn=(0,Y.forwardRef)(function(e,t){var n=e.autoComplete,i=e.onChange,a=e.onFocus,s=e.onBlur,c=e.onPressEnter,l=e.onKeyDown,u=e.onKeyUp,d=e.prefixCls,p=d===void 0?`rc-input`:d,m=e.disabled,h=e.htmlSize,g=e.className,v=e.maxLength,b=e.suffix,ee=e.showCount,x=e.count,S=e.type,C=S===void 0?`text`:S,w=e.classes,T=e.classNames,E=e.styles,D=e.onCompositionStart,te=e.onCompositionEnd,ne=o(e,Wn),O=(0,Y.useState)(!1),k=_(O,2),re=k[0],A=k[1],j=(0,Y.useRef)(!1),M=(0,Y.useRef)(!1),N=(0,Y.useRef)(null),P=(0,Y.useRef)(null),F=function(e){N.current&&Bn(N.current,e)},I=ce(e.defaultValue,{value:e.value}),L=_(I,2),R=L[0],z=L[1],ie=R==null?``:String(R),ae=(0,Y.useState)(null),B=_(ae,2),oe=B[0],se=B[1],V=Un(x,ee),H=V.max||v,le=V.strategy(ie),W=!!H&&le>H;(0,Y.useImperativeHandle)(t,function(){return{focus:F,blur:function(){var e;(e=N.current)==null||e.blur()},setSelectionRange:function(e,t,n){var r;(r=N.current)==null||r.setSelectionRange(e,t,n)},select:function(){var e;(e=N.current)==null||e.select()},input:N.current,nativeElement:P.current?.nativeElement||N.current}}),(0,Y.useEffect)(function(){M.current&&=!1,A(function(e){return e&&m?!1:e})},[m]);var ue=function(e,t,n){var r=t;if(!j.current&&V.exceedFormatter&&V.max&&V.strategy(t)>V.max)r=V.exceedFormatter(t,{max:V.max}),t!==r&&se([N.current?.selectionStart||0,N.current?.selectionEnd||0]);else if(n.source===`compositionEnd`)return;z(r),N.current&&zn(N.current,e,i,r)};(0,Y.useEffect)(function(){if(oe){var e;(e=N.current)==null||e.setSelectionRange.apply(e,r(oe))}},[oe]);var G=function(e){ue(e,e.target.value,{source:`change`})},de=function(e){j.current=!1,ue(e,e.currentTarget.value,{source:`compositionEnd`}),te?.(e)},K=function(e){c&&e.key===`Enter`&&!M.current&&(M.current=!0,c(e)),l?.(e)},fe=function(e){e.key===`Enter`&&(M.current=!1),u?.(e)},q=function(e){A(!0),a?.(e)},me=function(e){M.current&&=!1,A(!1),s?.(e)},he=function(e){z(``),F(),N.current&&zn(N.current,e,i)},ge=W&&`${p}-out-of-range`;return Y.createElement(Vn,y({},ne,{prefixCls:p,className:(0,J.default)(g,ge),handleReset:he,value:ie,focused:re,triggerFocus:F,suffix:function(){var e=Number(H)>0;if(b||V.show){var t=V.showFormatter?V.showFormatter({value:ie,count:le,maxLength:H}):`${le}${e?` / ${H}`:``}`;return Y.createElement(Y.Fragment,null,V.show&&Y.createElement(`span`,{className:(0,J.default)(`${p}-show-count-suffix`,U({},`${p}-show-count-has-suffix`,!!b),T?.count),style:f({},E?.count)},t),b)}return null}(),disabled:m,classes:w,classNames:T,styles:E,ref:P}),function(){var t=pe(e,[`prefixCls`,`onPressEnter`,`addonBefore`,`addonAfter`,`prefix`,`suffix`,`allowClear`,`defaultValue`,`showCount`,`count`,`classes`,`htmlSize`,`styles`,`classNames`,`onClear`]);return Y.createElement(`input`,y({autoComplete:n},t,{onChange:G,onFocus:q,onBlur:me,onKeyDown:K,onKeyUp:fe,className:(0,J.default)(p,U({},`${p}-disabled`,m),T?.input),style:E?.input,ref:N,size:h,type:C,onCompositionStart:function(e){j.current=!0,D?.(e)},onCompositionEnd:de}))}())}),Kn=e=>{let t;return typeof e==`object`&&e?.clearIcon?t=e:e&&(t={clearIcon:Y.createElement(u,null)}),t},qn=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important;
|
|
pointer-events: none !important;
|
|
`,Jn=[`letter-spacing`,`line-height`,`padding-top`,`padding-bottom`,`font-family`,`font-weight`,`font-size`,`font-variant`,`text-rendering`,`text-transform`,`width`,`text-indent`,`padding-left`,`padding-right`,`border-width`,`box-sizing`,`word-break`,`white-space`],Yn={},Xn;function Zn(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=e.getAttribute(`id`)||e.getAttribute(`data-reactid`)||e.getAttribute(`name`);if(t&&Yn[n])return Yn[n];var r=window.getComputedStyle(e),i=r.getPropertyValue(`box-sizing`)||r.getPropertyValue(`-moz-box-sizing`)||r.getPropertyValue(`-webkit-box-sizing`),a=parseFloat(r.getPropertyValue(`padding-bottom`))+parseFloat(r.getPropertyValue(`padding-top`)),o=parseFloat(r.getPropertyValue(`border-bottom-width`))+parseFloat(r.getPropertyValue(`border-top-width`)),s={sizingStyle:Jn.map(function(e){return`${e}:${r.getPropertyValue(e)}`}).join(`;`),paddingSize:a,borderSize:o,boxSizing:i};return t&&n&&(Yn[n]=s),s}function Qn(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Xn||(Xn=document.createElement(`textarea`),Xn.setAttribute(`tab-index`,`-1`),Xn.setAttribute(`aria-hidden`,`true`),Xn.setAttribute(`name`,`hiddenTextarea`),document.body.appendChild(Xn)),e.getAttribute(`wrap`)?Xn.setAttribute(`wrap`,e.getAttribute(`wrap`)):Xn.removeAttribute(`wrap`);var i=Zn(e,t),a=i.paddingSize,o=i.borderSize,s=i.boxSizing,c=i.sizingStyle;Xn.setAttribute(`style`,`${c};${qn}`),Xn.value=e.value||e.placeholder||``;var l=void 0,u=void 0,d,f=Xn.scrollHeight;if(s===`border-box`?f+=o:s===`content-box`&&(f-=a),n!==null||r!==null){Xn.value=` `;var p=Xn.scrollHeight-a;n!==null&&(l=p*n,s===`border-box`&&(l=l+a+o),f=Math.max(l,f)),r!==null&&(u=p*r,s===`border-box`&&(u=u+a+o),d=f>u?``:`hidden`,f=Math.min(u,f))}var m={height:f,overflowY:d,resize:`none`};return l&&(m.minHeight=l),u&&(m.maxHeight=u),m}var $n=[`prefixCls`,`defaultValue`,`value`,`autoSize`,`onResize`,`className`,`style`,`disabled`,`onChange`,`onInternalAutoSize`],er=0,tr=1,nr=2,rr=Y.forwardRef(function(e,t){var n=e,r=n.prefixCls,i=n.defaultValue,a=n.value,s=n.autoSize,c=n.onResize,l=n.className,u=n.style,d=n.disabled,p=n.onChange;n.onInternalAutoSize;var m=o(n,$n),h=ce(i,{value:a,postState:function(e){return e??``}}),g=_(h,2),v=g[0],b=g[1],ee=function(e){b(e.target.value),p?.(e)},x=Y.useRef();Y.useImperativeHandle(t,function(){return{textArea:x.current}});var C=Y.useMemo(function(){return s&&j(s)===`object`?[s.minRows,s.maxRows]:[]},[s]),w=_(C,2),T=w[0],E=w[1],D=!!s,te=Y.useState(nr),ne=_(te,2),O=ne[0],k=ne[1],re=Y.useState(),A=_(re,2),M=A[0],N=A[1],P=function(){k(er)};S(function(){D&&P()},[a,T,E,D]),S(function(){if(O===er)k(tr);else if(O===tr){var e=Qn(x.current,!1,T,E);k(nr),N(e)}},[O]);var F=Y.useRef(),I=function(){ae.cancel(F.current)},L=function(e){O===nr&&(c?.(e),s&&(I(),F.current=ae(function(){P()})))};Y.useEffect(function(){return I},[]);var R=D?M:null,z=f(f({},u),R);return(O===er||O===tr)&&(z.overflowY=`hidden`,z.overflowX=`hidden`),Y.createElement(Xe,{onResize:L,disabled:!(s||c)},Y.createElement(`textarea`,y({},m,{ref:x,style:z,className:(0,J.default)(r,l,U({},`${r}-disabled`,d)),disabled:d,value:v,onChange:ee})))}),ir=[`defaultValue`,`value`,`onFocus`,`onBlur`,`onChange`,`allowClear`,`maxLength`,`onCompositionStart`,`onCompositionEnd`,`suffix`,`prefixCls`,`showCount`,`count`,`className`,`style`,`disabled`,`hidden`,`classNames`,`styles`,`onResize`,`onClear`,`onPressEnter`,`readOnly`,`autoSize`,`onKeyDown`],ar=Y.forwardRef(function(e,t){var n=e.defaultValue,i=e.value,a=e.onFocus,s=e.onBlur,c=e.onChange,l=e.allowClear,u=e.maxLength,d=e.onCompositionStart,p=e.onCompositionEnd,m=e.suffix,h=e.prefixCls,g=h===void 0?`rc-textarea`:h,v=e.showCount,b=e.count,ee=e.className,x=e.style,S=e.disabled,C=e.hidden,w=e.classNames,T=e.styles,E=e.onResize,D=e.onClear,te=e.onPressEnter,ne=e.readOnly,O=e.autoSize,k=e.onKeyDown,re=o(e,ir),A=ce(n,{value:i,defaultValue:n}),j=_(A,2),M=j[0],N=j[1],P=M==null?``:String(M),F=Y.useState(!1),I=_(F,2),L=I[0],R=I[1],z=Y.useRef(!1),ie=Y.useState(null),ae=_(ie,2),B=ae[0],oe=ae[1],se=(0,Y.useRef)(null),V=(0,Y.useRef)(null),H=function(){return V.current?.textArea},le=function(){H().focus()};(0,Y.useImperativeHandle)(t,function(){return{resizableTextArea:V.current,focus:le,blur:function(){H().blur()},nativeElement:se.current?.nativeElement||H()}}),(0,Y.useEffect)(function(){R(function(e){return!S&&e})},[S]);var W=Y.useState(null),ue=_(W,2),G=ue[0],de=ue[1];Y.useEffect(function(){if(G){var e;(e=H()).setSelectionRange.apply(e,r(G))}},[G]);var K=Un(b,v),fe=K.max??u,pe=Number(fe)>0,q=K.strategy(P),me=!!fe&&q>fe,he=function(e,t){var n=t;!z.current&&K.exceedFormatter&&K.max&&K.strategy(t)>K.max&&(n=K.exceedFormatter(t,{max:K.max}),t!==n&&de([H().selectionStart||0,H().selectionEnd||0])),N(n),zn(e.currentTarget,e,c,n)},ge=function(e){z.current=!0,d?.(e)},_e=function(e){z.current=!1,he(e,e.currentTarget.value),p?.(e)},ve=function(e){he(e,e.target.value)},ye=function(e){e.key===`Enter`&&te&&te(e),k?.(e)},be=function(e){R(!0),a?.(e)},X=function(e){R(!1),s?.(e)},xe=function(e){N(``),le(),zn(H(),e,c)},Se=m,Ce;K.show&&(Ce=K.showFormatter?K.showFormatter({value:P,count:q,maxLength:fe}):`${q}${pe?` / ${fe}`:``}`,Se=Y.createElement(Y.Fragment,null,Se,Y.createElement(`span`,{className:(0,J.default)(`${g}-data-count`,w?.count),style:T?.count},Ce)));var Z=function(e){var t;E?.(e),(t=H())!=null&&t.style.height&&oe(!0)},Q=!O&&!v&&!l;return Y.createElement(Vn,{ref:se,value:P,allowClear:l,handleReset:xe,suffix:Se,prefixCls:g,classNames:f(f({},w),{},{affixWrapper:(0,J.default)(w?.affixWrapper,U(U({},`${g}-show-count`,v),`${g}-textarea-allow-clear`,l))}),disabled:S,focused:L,className:(0,J.default)(ee,me&&`${g}-out-of-range`),style:f(f({},x),B&&!Q?{height:`auto`}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ce==`string`?Ce:void 0}},hidden:C,readOnly:ne,onClear:D},Y.createElement(rr,y({},re,{autoSize:O,maxLength:u,onKeyDown:ye,onChange:ve,onFocus:be,onBlur:X,onCompositionStart:ge,onCompositionEnd:_e,className:(0,J.default)(w?.textarea),style:f(f({},T?.textarea),{},{resize:x?.resize}),disabled:S,prefixCls:g,onResize:Z,ref:V,readOnly:ne})))}),or=e=>{let{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:`100%`,height:`auto`,minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:`bottom`,transition:`all ${e.motionDurationSlow}`,resize:`vertical`,[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:`auto`},[r]:{position:`relative`,"&-show-count":{[`${t}-data-count`]:{position:`absolute`,bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:`nowrap`,pointerEvents:`none`}},[`
|
|
&-allow-clear > ${t},
|
|
&-affix-wrapper${r}-has-feedback ${t}
|
|
`]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:`inherit`,border:`none`,outline:`none`,background:`transparent`,minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:`none !important`}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:`absolute`,insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:`absolute`,top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:`inline-flex`,alignItems:`center`,margin:`auto`,pointerEvents:`none`}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:`ltr`,insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},sr=k([`Input`,`TextArea`],e=>or(W(e,an(e))),on,{resetFont:!1}),cr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},lr=(0,Y.forwardRef)((e,t)=>{let{prefixCls:n,bordered:r=!0,size:i,disabled:a,status:o,allowClear:s,classNames:c,rootClassName:l,className:u,style:d,styles:f,variant:p,showCount:m,onMouseDown:h,onResize:g}=e,_=cr(e,[`prefixCls`,`bordered`,`size`,`disabled`,`status`,`allowClear`,`classNames`,`rootClassName`,`className`,`style`,`styles`,`variant`,`showCount`,`onMouseDown`,`onResize`]),{getPrefixCls:v,direction:y,allowClear:b,autoComplete:ee,className:x,style:S,classNames:C,styles:w}=G(`textArea`),E=Y.useContext(V),D=a??E,{status:te,hasFeedback:ne,feedbackIcon:O}=Y.useContext(T),k=At(te,o),re=Y.useRef(null);Y.useImperativeHandle(t,()=>({resizableTextArea:re.current?.resizableTextArea,focus:e=>{Bn(re.current?.resizableTextArea?.textArea,e)},blur:()=>re.current?.blur()}));let A=v(`input`,n),j=B(A),[M,P,F]=Pn(A,l),[L]=sr(A,j),{compactSize:R,compactItemClassnames:z}=I(A,y),ie=N(e=>i??R??e),[ae,oe]=jt(`textArea`,p,r),se=Kn(s??b),[ce,H]=Y.useState(!1),[U,le]=Y.useState(!1),W=e=>{H(!0),h?.(e);let t=()=>{H(!1),document.removeEventListener(`mouseup`,t)};document.addEventListener(`mouseup`,t)},ue=e=>{if(g?.(e),ce&&typeof getComputedStyle==`function`){let e=(re.current?.nativeElement)?.querySelector(`textarea`);e&&getComputedStyle(e).resize===`both`&&le(!0)}};return M(L(Y.createElement(ar,Object.assign({autoComplete:ee},_,{style:Object.assign(Object.assign({},S),d),styles:Object.assign(Object.assign({},w),f),disabled:D,allowClear:se,className:(0,J.default)(F,j,u,l,z,x,U&&`${A}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),C),{textarea:(0,J.default)({[`${A}-sm`]:ie===`small`,[`${A}-lg`]:ie===`large`},P,c?.textarea,C.textarea,ce&&`${A}-mouse-active`),variant:(0,J.default)({[`${A}-${ae}`]:oe},kt(A,k)),affixWrapper:(0,J.default)(`${A}-textarea-affix-wrapper`,{[`${A}-affix-wrapper-rtl`]:y===`rtl`,[`${A}-affix-wrapper-sm`]:ie===`small`,[`${A}-affix-wrapper-lg`]:ie===`large`,[`${A}-textarea-show-count`]:m||e.count?.show},P)}),prefixCls:A,suffix:ne&&Y.createElement(`span`,{className:`${A}-textarea-suffix`},O),showCount:m,ref:re,onResize:ue,onMouseDown:W}))))});export{tt as C,Ot as S,Xe as T,Pt as _,Tn as a,At as b,ln as c,an as d,rn as f,Vt as g,Gt as h,En as i,cn as l,Ut as m,Kn as n,Fn as o,Xt as p,Gn as r,Pn as s,lr as t,on as u,Nt as v,et as w,kt as x,jt as y}; |