"use strict";(self.webpackChunkbeancount_web=self.webpackChunkbeancount_web||[]).push([[636],{3472:(e,t,n)=>{n.d(t,{A:()=>u});var o=n(9379),r=n(9284);const a={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"};var i=n(3768),l=function(e,t){return r.createElement(i.A,(0,o.A)((0,o.A)({},e),{},{ref:t,icon:a}))};const u=r.forwardRef(l)},4747:(e,t,n)=>{n.d(t,{A:()=>u});var o=n(9379),r=n(9284);const a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};var i=n(3768),l=function(e,t){return r.createElement(i.A,(0,o.A)((0,o.A)({},e),{},{ref:t,icon:a}))};const u=r.forwardRef(l)},6976:(e,t,n)=>{n.d(t,{A:()=>i});var o=n(9284),r=n(3135),a=n(5566);const i=function(e){return o.createElement(r.TG,null,(function(t){var n=(0,t.getPrefixCls)("empty");switch(e){case"Table":case"List":return o.createElement(a.A,{image:a.A.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return o.createElement(a.A,{image:a.A.PRESENTED_IMAGE_SIMPLE,className:"".concat(n,"-small")});default:return o.createElement(a.A,null)}}))}},5566:(e,t,n)=>{n.d(t,{A:()=>h});var o=n(4467),r=n(8168),a=n(4480),i=n.n(a),l=n(9284),u=n(3135),c=n(8627);const s=function(){var e=(0,l.useContext(u.QO).getPrefixCls)("empty-img-default");return l.createElement("svg",{className:e,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},l.createElement("g",{fill:"none",fillRule:"evenodd"},l.createElement("g",{transform:"translate(24 31.67)"},l.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),l.createElement("path",{className:"".concat(e,"-path-1"),d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),l.createElement("path",{className:"".concat(e,"-path-2"),d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",transform:"translate(13.56)"}),l.createElement("path",{className:"".concat(e,"-path-3"),d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),l.createElement("path",{className:"".concat(e,"-path-4"),d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})),l.createElement("path",{className:"".concat(e,"-path-5"),d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),l.createElement("g",{className:"".concat(e,"-g"),transform:"translate(149.65 15.383)"},l.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),l.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))};const f=function(){var e=(0,l.useContext(u.QO).getPrefixCls)("empty-img-simple");return l.createElement("svg",{className:e,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},l.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},l.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),l.createElement("g",{className:"".concat(e,"-g"),fillRule:"nonzero"},l.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),l.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",className:"".concat(e,"-path")}))))};var d=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{n.d(t,{A:()=>S});var o=n(4467),r=n(8168),a=n(4480),i=n.n(a),l=n(885),u=n(37),c=n(9284),s=n(3135),f=n(6976),d=n(1151),v=n(9416),p=n(713),m=n(259),h=n(6542),g=n(9333),A=n(4575),b=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{n.d(t,{A:()=>s});var o=n(3472),r=n(5252),a=n(5691),i=n(4747),l=n(5547),u=n(1893),c=n(9284);function s(e){var t=e.suffixIcon,n=e.clearIcon,s=e.menuItemSelectedIcon,f=e.removeIcon,d=e.loading,v=e.multiple,p=e.hasFeedback,m=e.prefixCls,h=e.showArrow,g=e.feedbackIcon,A=null!==n&&void 0!==n?n:c.createElement(r.A,null),b=function(e){return c.createElement(c.Fragment,null,!1!==h&&e,p&&g)},E=null;if(void 0!==t)E=b(t);else if(d)E=b(c.createElement(l.A,{spin:!0}));else{var y="".concat(m,"-suffix");E=function(e){var t=e.open,n=e.showSearch;return b(t&&n?c.createElement(u.A,{className:y}):c.createElement(i.A,{className:y}))}}return{clearIcon:A,suffixIcon:E,itemIcon:void 0!==s?s:v?c.createElement(o.A,null):null,removeIcon:void 0!==f?f:c.createElement(a.A,null)}}},3490:(e,t,n)=>{n.d(t,{A:()=>V});var o=n(8168),r=n(9379),a=n(5544),i=n(45),l=n(9284),u=n(4480),c=n.n(u),s=n(2773),f=n(909),d=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],v=void 0;function p(e,t){var n=e.prefixCls,a=e.invalidate,u=e.item,f=e.renderItem,p=e.responsive,m=e.responsiveDisabled,h=e.registerSize,g=e.itemKey,A=e.className,b=e.style,E=e.children,y=e.display,w=e.order,S=e.component,C=void 0===S?"div":S,x=(0,i.A)(e,d),M=p&&!y;function N(e){h(g,e)}l.useEffect((function(){return function(){N(null)}}),[]);var I,R=f&&u!==v?f(u):E;a||(I={opacity:M?0:1,height:M?0:v,overflowY:M?"hidden":v,order:p?w:v,pointerEvents:M?"none":v,position:M?"absolute":v});var O={};M&&(O["aria-hidden"]=!0);var D=l.createElement(C,(0,o.A)({className:c()(!a&&n,A),style:(0,r.A)((0,r.A)({},I),b)},O,x,{ref:t}),R);return p&&(D=l.createElement(s.A,{onResize:function(e){N(e.offsetWidth)},disabled:m},D)),D}var m=l.forwardRef(p);m.displayName="Item";const h=m;var g=n(7668),A=n(8681),b=n(8979);function E(){var e=l.useRef(null);return function(t){e.current||(e.current=[],function(e){if("undefined"===typeof MessageChannel)(0,b.A)(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}((function(){(0,A.unstable_batchedUpdates)((function(){e.current.forEach((function(e){e()})),e.current=null}))}))),e.current.push(t)}}function y(e,t){var n=l.useState(t),o=(0,a.A)(n,2),r=o[0],i=o[1];return[r,(0,g.A)((function(t){e((function(){i(t)}))}))]}var w=l.createContext(null),S=["component"],C=["className"],x=["className"],M=function(e,t){var n=l.useContext(w);if(!n){var r=e.component,a=void 0===r?"div":r,u=(0,i.A)(e,S);return l.createElement(a,(0,o.A)({},u,{ref:t}))}var s=n.className,f=(0,i.A)(n,C),d=e.className,v=(0,i.A)(e,x);return l.createElement(w.Provider,{value:null},l.createElement(h,(0,o.A)({ref:t,className:c()(s,d)},f,v)))},N=l.forwardRef(M);N.displayName="RawItem";const I=N;var R=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],O="responsive",D="invalidate";function P(e){return"+ ".concat(e.length," ...")}function T(e,t){var n=e.prefixCls,u=void 0===n?"rc-overflow":n,d=e.data,v=void 0===d?[]:d,p=e.renderItem,m=e.renderRawItem,g=e.itemKey,A=e.itemWidth,b=void 0===A?10:A,S=e.ssr,C=e.style,x=e.className,M=e.maxCount,N=e.renderRest,I=e.renderRawRest,T=e.suffix,k=e.component,V=void 0===k?"div":k,L=e.itemComponent,_=e.onVisibleChange,z=(0,i.A)(e,R),H="full"===S,F=E(),K=y(F,null),W=(0,a.A)(K,2),j=W[0],Y=W[1],B=j||0,X=y(F,new Map),U=(0,a.A)(X,2),G=U[0],Q=U[1],$=y(F,0),J=(0,a.A)($,2),q=J[0],Z=J[1],ee=y(F,0),te=(0,a.A)(ee,2),ne=te[0],oe=te[1],re=y(F,0),ae=(0,a.A)(re,2),ie=ae[0],le=ae[1],ue=(0,l.useState)(null),ce=(0,a.A)(ue,2),se=ce[0],fe=ce[1],de=(0,l.useState)(null),ve=(0,a.A)(de,2),pe=ve[0],me=ve[1],he=l.useMemo((function(){return null===pe&&H?Number.MAX_SAFE_INTEGER:pe||0}),[pe,j]),ge=(0,l.useState)(!1),Ae=(0,a.A)(ge,2),be=Ae[0],Ee=Ae[1],ye="".concat(u,"-item"),we=Math.max(q,ne),Se=M===O,Ce=v.length&&Se,xe=M===D,Me=Ce||"number"===typeof M&&v.length>M,Ne=(0,l.useMemo)((function(){var e=v;return Ce?e=null===j&&H?v:v.slice(0,Math.min(v.length,B/b)):"number"===typeof M&&(e=v.slice(0,M)),e}),[v,b,j,M,Ce]),Ie=(0,l.useMemo)((function(){return Ce?v.slice(he+1):v.slice(Ne.length)}),[v,Ne,Ce,he]),Re=(0,l.useCallback)((function(e,t){var n;return"function"===typeof g?g(e):null!==(n=g&&(null===e||void 0===e?void 0:e[g]))&&void 0!==n?n:t}),[g]),Oe=(0,l.useCallback)(p||function(e){return e},[p]);function De(e,t,n){(pe!==e||void 0!==t&&t!==se)&&(me(e),n||(Ee(eB){De(o-1,e-r-ie+ne);break}}T&&Te(0)+ie>B&&fe(null)}}),[B,G,ne,ie,Re,Ne]);var ke=be&&!!Ie.length,Ve={};null!==se&&Ce&&(Ve={position:"absolute",left:se,top:0});var Le,_e={prefixCls:ye,responsive:Ce,component:L,invalidate:xe},ze=m?function(e,t){var n=Re(e,t);return l.createElement(w.Provider,{key:n,value:(0,r.A)((0,r.A)({},_e),{},{order:t,item:e,itemKey:n,registerSize:Pe,display:t<=he})},m(e,t))}:function(e,t){var n=Re(e,t);return l.createElement(h,(0,o.A)({},_e,{order:t,key:n,item:e,renderItem:Oe,itemKey:n,registerSize:Pe,display:t<=he}))},He={order:ke?he:Number.MAX_SAFE_INTEGER,className:"".concat(ye,"-rest"),registerSize:function(e,t){oe(t),Z(ne)},display:ke};if(I)I&&(Le=l.createElement(w.Provider,{value:(0,r.A)((0,r.A)({},_e),He)},I(Ie)));else{var Fe=N||P;Le=l.createElement(h,(0,o.A)({},_e,He),"function"===typeof Fe?Fe(Ie):Fe)}var Ke=l.createElement(V,(0,o.A)({className:c()(!xe&&u,x),style:C,ref:t},z),Ne.map(ze),Me?Le:null,T&&l.createElement(h,(0,o.A)({},_e,{responsive:Se,responsiveDisabled:!Ce,order:he,className:"".concat(ye,"-suffix"),registerSize:function(e,t){le(t)},display:!0,style:Ve}),T));return Se&&(Ke=l.createElement(s.A,{onResize:function(e,t){Y(t.clientWidth)},disabled:!Ce},Ke)),Ke}var k=l.forwardRef(T);k.displayName="Overflow",k.Item=I,k.RESPONSIVE=O,k.INVALIDATE=D;const V=k},6659:(e,t,n)=>{n.d(t,{Ay:()=>u});var o=n(5544),r=n(9284),a=n(8078),i=0,l=(0,a.A)();function u(e){var t=r.useState(),n=(0,o.A)(t,2),a=n[0],u=n[1];return r.useEffect((function(){u("rc_select_".concat(function(){var e;return l?(e=i,i+=1):e="TEST_OR_SSR",e}()))}),[]),e||a}},885:(e,t,n)=>{n.d(t,{g3:()=>q,JM:()=>le,c$:()=>ce,Ay:()=>Xe,Vm:()=>E});var o=n(8168),r=n(436),a=n(4467),i=n(9379),l=n(5544),u=n(45),c=n(2284),s=n(4413),f=n(2042),d=n(9284),v=n(4480),p=n.n(v),m=n(909),h=n(7142),g=n(6184),A=n(7095),b=d.createContext(null);function E(){return d.useContext(b)}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=d.useRef(null),n=d.useRef(null);return d.useEffect((function(){return function(){window.clearTimeout(n.current)}}),[]),[function(){return t.current},function(o){(o||null===t.current)&&(t.current=o),window.clearTimeout(n.current),n.current=window.setTimeout((function(){t.current=null}),e)}]}var w=n(3209),S=n(3490);const C=function(e){var t,n=e.className,o=e.customizeIcon,r=e.customizeIconProps,a=e.onMouseDown,i=e.onClick,l=e.children;return t="function"===typeof o?o(r):o,d.createElement("span",{className:n,onMouseDown:function(e){e.preventDefault(),a&&a(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:i,"aria-hidden":!0},void 0!==t?t:d.createElement("span",{className:p()(n.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},l))};var x=function(e,t){var n,o,r=e.prefixCls,a=e.id,l=e.inputElement,u=e.disabled,c=e.tabIndex,s=e.autoFocus,v=e.autoComplete,m=e.editable,h=e.activeDescendantId,g=e.value,b=e.maxLength,E=e.onKeyDown,y=e.onMouseDown,w=e.onChange,S=e.onPaste,C=e.onCompositionStart,x=e.onCompositionEnd,M=e.open,N=e.attrs,I=l||d.createElement("input",null),R=I,O=R.ref,D=R.props,P=D.onKeyDown,T=D.onChange,k=D.onMouseDown,V=D.onCompositionStart,L=D.onCompositionEnd,_=D.style;return(0,f.$e)(!("maxLength"in I.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),I=d.cloneElement(I,(0,i.A)((0,i.A)((0,i.A)({type:"search"},D),{},{id:a,ref:(0,A.K4)(t,O),disabled:u,tabIndex:c,autoComplete:v||"off",autoFocus:s,className:p()("".concat(r,"-selection-search-input"),null===(n=I)||void 0===n||null===(o=n.props)||void 0===o?void 0:o.className),role:"combobox","aria-expanded":M,"aria-haspopup":"listbox","aria-owns":"".concat(a,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(a,"_list"),"aria-activedescendant":h},N),{},{value:m?g:"",maxLength:b,readOnly:!m,unselectable:m?null:"on",style:(0,i.A)((0,i.A)({},_),{},{opacity:m?null:0}),onKeyDown:function(e){E(e),P&&P(e)},onMouseDown:function(e){y(e),k&&k(e)},onChange:function(e){w(e),T&&T(e)},onCompositionStart:function(e){C(e),V&&V(e)},onCompositionEnd:function(e){x(e),L&&L(e)},onPaste:S}))},M=d.forwardRef(x);M.displayName="Input";const N=M;function I(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var R="undefined"!==typeof window&&window.document&&window.document.documentElement;function O(e){return["string","number"].includes((0,c.A)(e))}function D(e){var t=void 0;return e&&(O(e.title)?t=e.title.toString():O(e.label)&&(t=e.label.toString())),t}function P(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var T=function(e){e.preventDefault(),e.stopPropagation()};const k=function(e){var t,n,o=e.id,r=e.prefixCls,i=e.values,u=e.open,c=e.searchValue,s=e.autoClearSearchValue,f=e.inputRef,v=e.placeholder,m=e.disabled,h=e.mode,g=e.showSearch,A=e.autoFocus,b=e.autoComplete,E=e.activeDescendantId,y=e.tabIndex,x=e.removeIcon,M=e.maxTagCount,I=e.maxTagTextLength,O=e.maxTagPlaceholder,k=void 0===O?function(e){return"+ ".concat(e.length," ...")}:O,V=e.tagRender,L=e.onToggleOpen,_=e.onRemove,z=e.onInputChange,H=e.onInputPaste,F=e.onInputKeyDown,K=e.onInputMouseDown,W=e.onInputCompositionStart,j=e.onInputCompositionEnd,Y=d.useRef(null),B=(0,d.useState)(0),X=(0,l.A)(B,2),U=X[0],G=X[1],Q=(0,d.useState)(!1),$=(0,l.A)(Q,2),J=$[0],q=$[1],Z="".concat(r,"-selection"),ee=u||"multiple"===h&&!1===s||"tags"===h?c:"",te="tags"===h||"multiple"===h&&!1===s||g&&(u||J);function ne(e,t,n,o,r){return d.createElement("span",{className:p()("".concat(Z,"-item"),(0,a.A)({},"".concat(Z,"-item-disabled"),n)),title:D(e)},d.createElement("span",{className:"".concat(Z,"-item-content")},t),o&&d.createElement(C,{className:"".concat(Z,"-item-remove"),onMouseDown:T,onClick:r,customizeIcon:x},"\xd7"))}t=function(){G(Y.current.scrollWidth)},n=[ee],R?d.useLayoutEffect(t,n):d.useEffect(t,n);var oe=d.createElement("div",{className:"".concat(Z,"-search"),style:{width:U},onFocus:function(){q(!0)},onBlur:function(){q(!1)}},d.createElement(N,{ref:f,open:u,prefixCls:r,id:o,inputElement:null,disabled:m,autoFocus:A,autoComplete:b,editable:te,activeDescendantId:E,value:ee,onKeyDown:F,onMouseDown:K,onChange:z,onPaste:H,onCompositionStart:W,onCompositionEnd:j,tabIndex:y,attrs:(0,w.A)(e,!0)}),d.createElement("span",{ref:Y,className:"".concat(Z,"-search-mirror"),"aria-hidden":!0},ee,"\xa0")),re=d.createElement(S.A,{prefixCls:"".concat(Z,"-overflow"),data:i,renderItem:function(e){var t=e.disabled,n=e.label,o=e.value,r=!m&&!t,a=n;if("number"===typeof I&&("string"===typeof n||"number"===typeof n)){var i=String(a);i.length>I&&(a="".concat(i.slice(0,I),"..."))}var l=function(t){t&&t.stopPropagation(),_(e)};return"function"===typeof V?function(e,t,n,o,r){return d.createElement("span",{onMouseDown:function(e){T(e),L(!u)}},V({label:t,value:e,disabled:n,closable:o,onClose:r}))}(o,a,t,r,l):ne(e,a,t,r,l)},renderRest:function(e){var t="function"===typeof k?k(e):k;return ne({title:t},t,!1)},suffix:oe,itemKey:P,maxCount:M});return d.createElement(d.Fragment,null,re,!i.length&&!ee&&d.createElement("span",{className:"".concat(Z,"-placeholder")},v))};const V=function(e){var t=e.inputElement,n=e.prefixCls,o=e.id,r=e.inputRef,a=e.disabled,i=e.autoFocus,u=e.autoComplete,c=e.activeDescendantId,s=e.mode,f=e.open,v=e.values,p=e.placeholder,m=e.tabIndex,h=e.showSearch,g=e.searchValue,A=e.activeValue,b=e.maxLength,E=e.onInputKeyDown,y=e.onInputMouseDown,S=e.onInputChange,C=e.onInputPaste,x=e.onInputCompositionStart,M=e.onInputCompositionEnd,I=d.useState(!1),R=(0,l.A)(I,2),O=R[0],P=R[1],T="combobox"===s,k=T||h,V=v[0],L=g||"";T&&A&&!O&&(L=A),d.useEffect((function(){T&&P(!1)}),[T,A]);var _=!("combobox"!==s&&!f&&!h)&&!!L,z=D(V);return d.createElement(d.Fragment,null,d.createElement("span",{className:"".concat(n,"-selection-search")},d.createElement(N,{ref:r,prefixCls:n,id:o,open:f,inputElement:t,disabled:a,autoFocus:i,autoComplete:u,editable:k,activeDescendantId:c,value:L,onKeyDown:E,onMouseDown:y,onChange:function(e){P(!0),S(e)},onPaste:C,onCompositionStart:x,onCompositionEnd:M,tabIndex:m,attrs:(0,w.A)(e,!0),maxLength:T?b:void 0})),!T&&V?d.createElement("span",{className:"".concat(n,"-selection-item"),title:z,style:_?{visibility:"hidden"}:void 0},V.label):null,function(){if(V)return null;var e=_?{visibility:"hidden"}:void 0;return d.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:e},p)}())};var L=function(e,t){var n=(0,d.useRef)(null),r=(0,d.useRef)(!1),a=e.prefixCls,i=e.open,u=e.mode,c=e.showSearch,s=e.tokenWithEnter,f=e.autoClearSearchValue,v=e.onSearch,p=e.onSearchSubmit,m=e.onToggleOpen,h=e.onInputKeyDown,A=e.domRef;d.useImperativeHandle(t,(function(){return{focus:function(){n.current.focus()},blur:function(){n.current.blur()}}}));var b=y(0),E=(0,l.A)(b,2),w=E[0],S=E[1],C=(0,d.useRef)(null),x=function(e){!1!==v(e,!0,r.current)&&m(!0)},M={inputRef:n,onInputKeyDown:function(e){var t,n=e.which;n!==g.A.UP&&n!==g.A.DOWN||e.preventDefault(),h&&h(e),n!==g.A.ENTER||"tags"!==u||r.current||i||null===p||void 0===p||p(e.target.value),t=n,[g.A.ESC,g.A.SHIFT,g.A.BACKSPACE,g.A.TAB,g.A.WIN_KEY,g.A.ALT,g.A.META,g.A.WIN_KEY_RIGHT,g.A.CTRL,g.A.SEMICOLON,g.A.EQUALS,g.A.CAPS_LOCK,g.A.CONTEXT_MENU,g.A.F1,g.A.F2,g.A.F3,g.A.F4,g.A.F5,g.A.F6,g.A.F7,g.A.F8,g.A.F9,g.A.F10,g.A.F11,g.A.F12].includes(t)||m(!0)},onInputMouseDown:function(){S(!0)},onInputChange:function(e){var t=e.target.value;if(s&&C.current&&/[\r\n]/.test(C.current)){var n=C.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,C.current)}C.current=null,x(t)},onInputPaste:function(e){var t=e.clipboardData.getData("text");C.current=t},onInputCompositionStart:function(){r.current=!0},onInputCompositionEnd:function(e){r.current=!1,"combobox"!==u&&x(e.target.value)}},N="multiple"===u||"tags"===u?d.createElement(k,(0,o.A)({},e,M)):d.createElement(V,(0,o.A)({},e,M));return d.createElement("div",{ref:A,className:"".concat(a,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){n.current.focus()})):n.current.focus())},onMouseDown:function(e){var t=w();e.target===n.current||t||"combobox"===u||e.preventDefault(),("combobox"===u||c&&t)&&i||(i&&!1!==f&&v("",!0,!1),m())}},N)},_=d.forwardRef(L);_.displayName="Selector";const z=_;var H=n(9772),F=["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],K=function(e,t){var n=e.prefixCls,r=(e.disabled,e.visible),l=e.children,c=e.popupElement,s=e.containerWidth,f=e.animation,v=e.transitionName,m=e.dropdownStyle,h=e.dropdownClassName,g=e.direction,A=void 0===g?"ltr":g,b=e.placement,E=e.dropdownMatchSelectWidth,y=e.dropdownRender,w=e.dropdownAlign,S=e.getPopupContainer,C=e.empty,x=e.getTriggerDOMNode,M=e.onPopupVisibleChange,N=e.onPopupMouseEnter,I=(0,u.A)(e,F),R="".concat(n,"-dropdown"),O=c;y&&(O=y(c));var D=d.useMemo((function(){return function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}}(E)}),[E]),P=f?"".concat(R,"-").concat(f):v,T=d.useRef(null);d.useImperativeHandle(t,(function(){return{getPopupElement:function(){return T.current}}}));var k=(0,i.A)({minWidth:s},m);return"number"===typeof E?k.width=E:E&&(k.width=s),d.createElement(H.A,(0,o.A)({},I,{showAction:M?["click"]:[],hideAction:M?["click"]:[],popupPlacement:b||("rtl"===A?"bottomRight":"bottomLeft"),builtinPlacements:D,prefixCls:R,popupTransitionName:P,popup:d.createElement("div",{ref:T,onMouseEnter:N},O),popupAlign:w,popupVisible:r,getPopupContainer:S,popupClassName:p()(h,(0,a.A)({},"".concat(R,"-empty"),C)),popupStyle:k,getTriggerDOMNode:x,onPopupVisibleChange:M}),l)},W=d.forwardRef(K);W.displayName="SelectTrigger";const j=W;var Y=n(7695);function B(e,t){var n,o=e.key;return"value"in e&&(n=e.value),null!==o&&void 0!==o?o:void 0!==n?n:"rc-index-key-".concat(t)}function X(e,t){var n=e||{};return{label:n.label||(t?"children":"label"),value:n.value||"value",options:n.options||"options"}}function U(e){var t=(0,i.A)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return(0,f.Ay)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var G=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","showArrow","inputIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Q=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function $(e){return"tags"===e||"multiple"===e}var J=d.forwardRef((function(e,t){var n,f,v=e.id,E=e.prefixCls,w=e.className,S=e.showSearch,x=e.tagRender,M=e.direction,N=e.omitDomProps,I=e.displayValues,R=e.onDisplayValuesChange,O=e.emptyOptions,D=e.notFoundContent,P=void 0===D?"Not Found":D,T=e.onClear,k=e.mode,V=e.disabled,L=e.loading,_=e.getInputElement,H=e.getRawInputElement,F=e.open,K=e.defaultOpen,W=e.onDropdownVisibleChange,B=e.activeValue,X=e.onActiveValueChange,U=e.activeDescendantId,J=e.searchValue,q=e.autoClearSearchValue,Z=e.onSearch,ee=e.onSearchSplit,te=e.tokenSeparators,ne=e.allowClear,oe=e.showArrow,re=e.inputIcon,ae=e.clearIcon,ie=e.OptionList,le=e.animation,ue=e.transitionName,ce=e.dropdownStyle,se=e.dropdownClassName,fe=e.dropdownMatchSelectWidth,de=e.dropdownRender,ve=e.dropdownAlign,pe=e.placement,me=e.getPopupContainer,he=e.showAction,ge=void 0===he?[]:he,Ae=e.onFocus,be=e.onBlur,Ee=e.onKeyUp,ye=e.onKeyDown,we=e.onMouseDown,Se=(0,u.A)(e,G),Ce=$(k),xe=(void 0!==S?S:Ce)||"combobox"===k,Me=(0,i.A)({},Se);Q.forEach((function(e){delete Me[e]})),null===N||void 0===N||N.forEach((function(e){delete Me[e]}));var Ne=d.useState(!1),Ie=(0,l.A)(Ne,2),Re=Ie[0],Oe=Ie[1];d.useEffect((function(){Oe((0,h.A)())}),[]);var De=d.useRef(null),Pe=d.useRef(null),Te=d.useRef(null),ke=d.useRef(null),Ve=d.useRef(null),Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=d.useState(!1),n=(0,l.A)(t,2),o=n[0],r=n[1],a=d.useRef(null),i=function(){window.clearTimeout(a.current)};return d.useEffect((function(){return i}),[]),[o,function(t,n){i(),a.current=window.setTimeout((function(){r(t),n&&n()}),e)},i]}(),_e=(0,l.A)(Le,3),ze=_e[0],He=_e[1],Fe=_e[2];d.useImperativeHandle(t,(function(){var e,t;return{focus:null===(e=ke.current)||void 0===e?void 0:e.focus,blur:null===(t=ke.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=Ve.current)||void 0===t?void 0:t.scrollTo(e)}}}));var Ke=d.useMemo((function(){var e;if("combobox"!==k)return J;var t=null===(e=I[0])||void 0===e?void 0:e.value;return"string"===typeof t||"number"===typeof t?String(t):""}),[J,k,I]),We="combobox"===k&&"function"===typeof _&&_()||null,je="function"===typeof H&&H(),Ye=(0,A.xK)(Pe,null===je||void 0===je||null===(n=je.props)||void 0===n?void 0:n.ref),Be=(0,s.A)(void 0,{defaultValue:K,value:F}),Xe=(0,l.A)(Be,2),Ue=Xe[0],Ge=Xe[1],Qe=Ue,$e=!P&&O;(V||$e&&Qe&&"combobox"===k)&&(Qe=!1);var Je=!$e&&Qe,qe=d.useCallback((function(e){var t=void 0!==e?e:!Qe;V||(Ge(t),Qe!==t&&(null===W||void 0===W||W(t)))}),[V,Qe,Ge,W]),Ze=d.useMemo((function(){return(te||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[te]),et=function(e,t,n){var o=!0,a=e;null===X||void 0===X||X(null);var i=n?null:function(e,t){if(!t||!t.length)return null;var n=!1,o=function e(t,o){var a=(0,Y.A)(o),i=a[0],l=a.slice(1);if(!i)return[t];var u=t.split(i);return n=n||u.length>1,u.reduce((function(t,n){return[].concat((0,r.A)(t),(0,r.A)(e(n,l)))}),[]).filter((function(e){return e}))}(e,t);return n?o:null}(e,te);return"combobox"!==k&&i&&(a="",null===ee||void 0===ee||ee(i),qe(!1),o=!1),Z&&Ke!==a&&Z(a,{source:t?"typing":"effect"}),o};d.useEffect((function(){Qe||Ce||"combobox"===k||et("",!1,!1)}),[Qe]),d.useEffect((function(){Ue&&V&&Ge(!1),V&&He(!1)}),[V]);var tt=y(),nt=(0,l.A)(tt,2),ot=nt[0],rt=nt[1],at=d.useRef(!1),it=[];d.useEffect((function(){return function(){it.forEach((function(e){return clearTimeout(e)})),it.splice(0,it.length)}}),[]);var lt,ut=d.useState(null),ct=(0,l.A)(ut,2),st=ct[0],ft=ct[1],dt=d.useState({}),vt=(0,l.A)(dt,2)[1];(0,m.A)((function(){if(Je){var e,t=Math.ceil(null===(e=De.current)||void 0===e?void 0:e.offsetWidth);st===t||Number.isNaN(t)||ft(t)}}),[Je]),je&&(lt=function(e){qe(e)}),function(e,t,n,o){var r=d.useRef(null);r.current={open:t,triggerOpen:n,customizedTrigger:o},d.useEffect((function(){function t(t){var n;if(null===(n=r.current)||void 0===n||!n.customizedTrigger){var o=t.target;o.shadowRoot&&t.composed&&(o=t.composedPath()[0]||o),r.current.open&&e().filter((function(e){return e})).every((function(e){return!e.contains(o)&&e!==o}))&&r.current.triggerOpen(!1)}}return window.addEventListener("mousedown",t),function(){return window.removeEventListener("mousedown",t)}}),[])}((function(){var e;return[De.current,null===(e=Te.current)||void 0===e?void 0:e.getPopupElement()]}),Je,qe,!!je);var pt,mt,ht=d.useMemo((function(){return(0,i.A)((0,i.A)({},e),{},{notFoundContent:P,open:Qe,triggerOpen:Je,id:v,showSearch:xe,multiple:Ce,toggleOpen:qe})}),[e,P,Je,Qe,v,xe,Ce,qe]),gt=void 0!==oe?oe:L||!Ce&&"combobox"!==k;gt&&(pt=d.createElement(C,{className:p()("".concat(E,"-arrow"),(0,a.A)({},"".concat(E,"-arrow-loading"),L)),customizeIcon:re,customizeIconProps:{loading:L,searchValue:Ke,open:Qe,focused:ze,showSearch:xe}}));V||!ne||!I.length&&!Ke||"combobox"===k&&""===Ke||(mt=d.createElement(C,{className:"".concat(E,"-clear"),onMouseDown:function(){var e;null===T||void 0===T||T(),null===(e=ke.current)||void 0===e||e.focus(),R([],{type:"clear",values:I}),et("",!1,!1)},customizeIcon:ae},"\xd7"));var At,bt=d.createElement(ie,{ref:Ve}),Et=p()(E,w,(f={},(0,a.A)(f,"".concat(E,"-focused"),ze),(0,a.A)(f,"".concat(E,"-multiple"),Ce),(0,a.A)(f,"".concat(E,"-single"),!Ce),(0,a.A)(f,"".concat(E,"-allow-clear"),ne),(0,a.A)(f,"".concat(E,"-show-arrow"),gt),(0,a.A)(f,"".concat(E,"-disabled"),V),(0,a.A)(f,"".concat(E,"-loading"),L),(0,a.A)(f,"".concat(E,"-open"),Qe),(0,a.A)(f,"".concat(E,"-customize-input"),We),(0,a.A)(f,"".concat(E,"-show-search"),xe),f)),yt=d.createElement(j,{ref:Te,disabled:V,prefixCls:E,visible:Je,popupElement:bt,containerWidth:st,animation:le,transitionName:ue,dropdownStyle:ce,dropdownClassName:se,direction:M,dropdownMatchSelectWidth:fe,dropdownRender:de,dropdownAlign:ve,placement:pe,getPopupContainer:me,empty:O,getTriggerDOMNode:function(){return Pe.current},onPopupVisibleChange:lt,onPopupMouseEnter:function(){vt({})}},je?d.cloneElement(je,{ref:Ye}):d.createElement(z,(0,o.A)({},e,{domRef:Pe,prefixCls:E,inputElement:We,ref:ke,id:v,showSearch:xe,autoClearSearchValue:q,mode:k,activeDescendantId:U,tagRender:x,values:I,open:Qe,onToggleOpen:qe,activeValue:B,searchValue:Ke,onSearch:et,onSearchSubmit:function(e){e&&e.trim()&&Z(e,{source:"submit"})},onRemove:function(e){var t=I.filter((function(t){return t!==e}));R(t,{type:"remove",values:[e]})},tokenWithEnter:Ze})));return At=je?yt:d.createElement("div",(0,o.A)({className:Et},Me,{ref:De,onMouseDown:function(e){var t,n=e.target,o=null===(t=Te.current)||void 0===t?void 0:t.getPopupElement();if(o&&o.contains(n)){var r=setTimeout((function(){var e,t=it.indexOf(r);-1!==t&&it.splice(t,1),Fe(),Re||o.contains(document.activeElement)||null===(e=ke.current)||void 0===e||e.focus()}));it.push(r)}for(var a=arguments.length,i=new Array(a>1?a-1:0),l=1;l=0;l-=1){var u=a[l];if(!u.disabled){a.splice(l,1),i=u;break}}i&&R(a,{type:"remove",values:[i]})}for(var c=arguments.length,s=new Array(c>1?c-1:0),f=1;f1?t-1:0),o=1;o1&&void 0!==arguments[1]&&arguments[1];return(0,te.A)(e).map((function(e,n){if(!d.isValidElement(e)||!e.type)return null;var o=e,r=o.type.isSelectOptGroup,a=o.key,l=o.props,c=l.children,s=(0,u.A)(l,oe);return t||!r?function(e){var t=e,n=t.key,o=t.props,r=o.children,a=o.value,l=(0,u.A)(o,ne);return(0,i.A)({key:n,value:void 0!==a?a:n,children:r},l)}(e):(0,i.A)((0,i.A)({key:"__RC_SELECT_GRP__".concat(null===a?n:a,"__"),label:a},s),{},{options:re(c)})})).filter((function(e){return e}))}function ae(e){var t=d.useRef();t.current=e;var n=d.useCallback((function(){return t.current.apply(t,arguments)}),[]);return n}var ie=function(){return null};ie.isSelectOptGroup=!0;const le=ie;var ue=function(){return null};ue.isSelectOption=!0;const ce=ue;var se=n(37),fe=n(5568),de=n(2773),ve=n(8886),pe=n(8681),me=d.forwardRef((function(e,t){var n=e.height,r=e.offsetY,l=e.offsetX,u=e.children,c=e.prefixCls,s=e.onInnerResize,f=e.innerProps,v=e.rtl,m=e.extra,h={},g={display:"flex",flexDirection:"column"};return void 0!==r&&(h={height:n,position:"relative",overflow:"hidden"},g=(0,i.A)((0,i.A)({},g),{},(0,a.A)((0,a.A)((0,a.A)((0,a.A)((0,a.A)({transform:"translateY(".concat(r,"px)")},v?"marginRight":"marginLeft",-l),"position","absolute"),"left",0),"right",0),"top",0))),d.createElement("div",{style:h},d.createElement(de.A,{onResize:function(e){e.offsetHeight&&s&&s()}},d.createElement("div",(0,o.A)({style:g,className:p()((0,a.A)({},"".concat(c,"-holder-inner"),c)),ref:t},f),u,m)))}));me.displayName="Filler";const he=me;function ge(e){var t=e.children,n=e.setRef,o=d.useCallback((function(e){n(e)}),[]);return d.cloneElement(t,{ref:o})}function Ae(e,t,n){var o=d.useState(e),r=(0,l.A)(o,2),a=r[0],i=r[1],u=d.useState(null),c=(0,l.A)(u,2),s=c[0],f=c[1];return d.useEffect((function(){var o=function(e,t,n){var o,r,a=e.length,i=t.length;if(0===a&&0===i)return null;a2&&void 0!==arguments[2]&&arguments[2],o=e?t<0&&i.current.left||t>0&&i.current.right:t<0&&i.current.top||t>0&&i.current.bottom;return n&&o?(clearTimeout(a.current),r.current=!1):o&&!r.current||(clearTimeout(a.current),r.current=!0,a.current=setTimeout((function(){r.current=!1}),50)),!r.current&&o}};function we(e,t,n,o,r,a,i){var l=(0,d.useRef)(0),u=(0,d.useRef)(null),c=(0,d.useRef)(null),s=(0,d.useRef)(!1),f=ye(t,n,o,r);var v=(0,d.useRef)(null),p=(0,d.useRef)(null);return[function(t){if(e){be.A.cancel(p.current),p.current=(0,be.A)((function(){v.current=null}),2);var n=t.deltaX,o=t.deltaY,r=t.shiftKey,d=n,m=o;("sx"===v.current||!v.current&&r&&o&&!n)&&(d=o,m=0,v.current="sx");var h=Math.abs(d),g=Math.abs(m);null===v.current&&(v.current=a&&h>g?"x":"y"),"y"===v.current?function(e,t){if(be.A.cancel(u.current),!f(!1,t)){var n=e;n._virtualHandled||(n._virtualHandled=!0,l.current+=t,c.current=t,Ee||n.preventDefault(),u.current=(0,be.A)((function(){var e=s.current?10:1;i(l.current*e,!1),l.current=0})))}}(t,m):function(e,t){i(t,!0),Ee||e.preventDefault()}(t,d)}},function(t){e&&(s.current=t.detail===c.current)}]}var Se=n(7652),Ce=n(3029),xe=n(2901);const Me=function(){function e(){(0,Ce.A)(this,e),(0,a.A)(this,"maps",void 0),(0,a.A)(this,"id",0),this.maps=Object.create(null)}return(0,xe.A)(e,[{key:"set",value:function(e,t){this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}}]),e}();var Ne=14/15;function Ie(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]}const Re=d.forwardRef((function(e,t){var n=e.prefixCls,o=e.rtl,r=e.scrollOffset,u=e.scrollRange,c=e.onStartMove,s=e.onStopMove,f=e.onScroll,v=e.horizontal,m=e.spinSize,h=e.containerSize,g=e.style,A=e.thumbStyle,b=d.useState(!1),E=(0,l.A)(b,2),y=E[0],w=E[1],S=d.useState(null),C=(0,l.A)(S,2),x=C[0],M=C[1],N=d.useState(null),I=(0,l.A)(N,2),R=I[0],O=I[1],D=!o,P=d.useRef(),T=d.useRef(),k=d.useState(!1),V=(0,l.A)(k,2),L=V[0],_=V[1],z=d.useRef(),H=function(){clearTimeout(z.current),_(!0),z.current=setTimeout((function(){_(!1)}),3e3)},F=u-h||0,K=h-m||0,W=d.useMemo((function(){return 0===r||0===F?0:r/F*K}),[r,F,K]),j=d.useRef({top:W,dragging:y,pageY:x,startTop:R});j.current={top:W,dragging:y,pageY:x,startTop:R};var Y=function(e){w(!0),M(Ie(e,v)),O(j.current.top),c(),e.stopPropagation(),e.preventDefault()};d.useEffect((function(){var e=function(e){e.preventDefault()},t=P.current,n=T.current;return t.addEventListener("touchstart",e,{passive:!1}),n.addEventListener("touchstart",Y,{passive:!1}),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",Y)}}),[]);var B=d.useRef();B.current=F;var X=d.useRef();X.current=K,d.useEffect((function(){if(y){var e,t=function(t){var n=j.current,o=n.dragging,r=n.pageY,a=n.startTop;be.A.cancel(e);var i=P.current.getBoundingClientRect(),l=h/(v?i.width:i.height);if(o){var u=(Ie(t,v)-r)*l,c=a;!D&&v?c-=u:c+=u;var s=B.current,d=X.current,p=d?c/d:0,m=Math.ceil(p*s);m=Math.max(m,0),m=Math.min(m,s),e=(0,be.A)((function(){f(m,v)}))}},n=function(){w(!1),s()};return window.addEventListener("mousemove",t,{passive:!0}),window.addEventListener("touchmove",t,{passive:!0}),window.addEventListener("mouseup",n,{passive:!0}),window.addEventListener("touchend",n,{passive:!0}),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),be.A.cancel(e)}}}),[y]),d.useEffect((function(){return H(),function(){clearTimeout(z.current)}}),[r]),d.useImperativeHandle(t,(function(){return{delayHidden:H}}));var U="".concat(n,"-scrollbar"),G={position:"absolute",visibility:L?null:"hidden"},Q={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return v?(G.height=8,G.left=0,G.right=0,G.bottom=0,Q.height="100%",Q.width=m,D?Q.left=W:Q.right=W):(G.width=8,G.top=0,G.bottom=0,D?G.right=0:G.left=0,Q.width="100%",Q.height=m,Q.top=W),d.createElement("div",{ref:P,className:p()(U,(0,a.A)((0,a.A)((0,a.A)({},"".concat(U,"-horizontal"),v),"".concat(U,"-vertical"),!v),"".concat(U,"-visible"),L)),style:(0,i.A)((0,i.A)({},G),g),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:H},d.createElement("div",{ref:T,className:p()("".concat(U,"-thumb"),(0,a.A)({},"".concat(U,"-thumb-moving"),y)),style:(0,i.A)((0,i.A)({},Q),A),onMouseDown:Y}))}));function Oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e/(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)*e;return isNaN(t)&&(t=0),t=Math.max(t,20),Math.floor(t)}var De=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],Pe=[],Te={overflowY:"auto",overflowAnchor:"none"};function ke(e,t){var n=e.prefixCls,r=void 0===n?"rc-virtual-list":n,s=e.className,f=e.height,v=e.itemHeight,h=e.fullHeight,g=void 0===h||h,A=e.style,b=e.data,E=e.children,y=e.itemKey,w=e.virtual,S=e.direction,C=e.scrollWidth,x=e.component,M=void 0===x?"div":x,N=e.onScroll,I=e.onVirtualScroll,R=e.onVisibleChange,O=e.innerProps,D=e.extraRender,P=e.styles,T=(0,u.A)(e,De),k=d.useCallback((function(e){return"function"===typeof y?y(e):null===e||void 0===e?void 0:e[y]}),[y]),V=function(e,t,n){var o=d.useState(0),r=(0,l.A)(o,2),a=r[0],i=r[1],u=(0,d.useRef)(new Map),c=(0,d.useRef)(new Me),s=(0,d.useRef)();function f(){be.A.cancel(s.current)}function v(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];f();var t=function(){u.current.forEach((function(e,t){if(e&&e.offsetParent){var n=(0,Se.Ay)(e),o=n.offsetHeight;c.current.get(t)!==o&&c.current.set(t,n.offsetHeight)}})),i((function(e){return e+1}))};e?t():s.current=(0,be.A)(t)}return(0,d.useEffect)((function(){return f}),[]),[function(o,r){var a=e(o),i=u.current.get(a);r?(u.current.set(a,r),v()):u.current.delete(a),!i!==!r&&(r?null===t||void 0===t||t(o):null===n||void 0===n||n(o))},v,c.current,a]}(k,null,null),L=(0,l.A)(V,4),_=L[0],z=L[1],H=L[2],F=L[3],K=!(!1===w||!f||!v),W=d.useMemo((function(){return Object.values(H.maps).reduce((function(e,t){return e+t}),0)}),[H.id,H.maps]),j=K&&b&&(Math.max(v*b.length,W)>f||!!C),Y="rtl"===S,B=p()(r,(0,a.A)({},"".concat(r,"-rtl"),Y),s),X=b||Pe,U=(0,d.useRef)(),G=(0,d.useRef)(),Q=(0,d.useRef)(),$=(0,d.useState)(0),J=(0,l.A)($,2),q=J[0],Z=J[1],ee=(0,d.useState)(0),te=(0,l.A)(ee,2),ne=te[0],oe=te[1],re=(0,d.useState)(!1),ae=(0,l.A)(re,2),ie=ae[0],le=ae[1],ue=function(){le(!0)},ce=function(){le(!1)},se={getKey:k};function fe(e){Z((function(t){var n=function(e){var t=e;Number.isNaN(Ue.current)||(t=Math.min(t,Ue.current));return t=Math.max(t,0),t}("function"===typeof e?e(t):e);return U.current.scrollTop=n,n}))}var me=(0,d.useRef)({start:0,end:X.length}),Ee=(0,d.useRef)(),Ce=Ae(X,k),xe=(0,l.A)(Ce,1)[0];Ee.current=xe;var Ie=d.useMemo((function(){if(!K)return{scrollHeight:void 0,start:0,end:X.length-1,offset:void 0};var e;if(!j)return{scrollHeight:(null===(e=G.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:X.length-1,offset:void 0};for(var t,n,o,r=0,a=X.length,i=0;i=q&&void 0===t&&(t=i,n=r),s>q+f&&void 0===o&&(o=i),r=s}return void 0===t&&(t=0,n=0,o=Math.ceil(f/v)),void 0===o&&(o=X.length-1),{scrollHeight:r,start:t,end:o=Math.min(o+1,X.length-1),offset:n}}),[j,K,q,X,F,f]),ke=Ie.scrollHeight,Ve=Ie.start,Le=Ie.end,_e=Ie.offset;me.current.start=Ve,me.current.end=Le;var ze=d.useState({width:0,height:f}),He=(0,l.A)(ze,2),Fe=He[0],Ke=He[1],We=(0,d.useRef)(),je=(0,d.useRef)(),Ye=d.useMemo((function(){return Oe(Fe.width,C)}),[Fe.width,C]),Be=d.useMemo((function(){return Oe(Fe.height,ke)}),[Fe.height,ke]),Xe=ke-f,Ue=(0,d.useRef)(Xe);Ue.current=Xe;var Ge=q<=0,Qe=q>=Xe,$e=ne<=0,Je=ne>=C,qe=ye(Ge,Qe,$e,Je),Ze=function(){return{x:Y?-ne:ne,y:q}},et=(0,d.useRef)(Ze()),tt=(0,ve._q)((function(e){if(I){var t=(0,i.A)((0,i.A)({},Ze()),e);et.current.x===t.x&&et.current.y===t.y||(I(t),et.current=t)}}));function nt(e,t){var n=e;t?((0,pe.flushSync)((function(){oe(n)})),tt()):fe(n)}var ot=function(e){var t=e,n=C?C-Fe.width:0;return t=Math.max(t,0),t=Math.min(t,n)},rt=(0,ve._q)((function(e,t){t?((0,pe.flushSync)((function(){oe((function(t){return ot(t+(Y?-e:e))}))})),tt()):fe((function(t){return t+e}))})),at=we(K,Ge,Qe,$e,Je,!!C,rt),it=(0,l.A)(at,2),lt=it[0],ut=it[1];!function(e,t,n){var o,r=(0,d.useRef)(!1),a=(0,d.useRef)(0),i=(0,d.useRef)(0),l=(0,d.useRef)(null),u=(0,d.useRef)(null),c=function(e){if(r.current){var t=Math.ceil(e.touches[0].pageX),o=Math.ceil(e.touches[0].pageY),l=a.current-t,c=i.current-o,s=Math.abs(l)>Math.abs(c);s?a.current=t:i.current=o;var f=n(s,s?l:c,!1,e);f&&e.preventDefault(),clearInterval(u.current),f&&(u.current=setInterval((function(){s?l*=Ne:c*=Ne;var e=Math.floor(s?l:c);(!n(s,e,!0)||Math.abs(e)<=.1)&&clearInterval(u.current)}),16))}},s=function(){r.current=!1,o()},f=function(e){o(),1!==e.touches.length||r.current||(r.current=!0,a.current=Math.ceil(e.touches[0].pageX),i.current=Math.ceil(e.touches[0].pageY),l.current=e.target,l.current.addEventListener("touchmove",c,{passive:!1}),l.current.addEventListener("touchend",s,{passive:!0}))};o=function(){l.current&&(l.current.removeEventListener("touchmove",c),l.current.removeEventListener("touchend",s))},(0,m.A)((function(){return e&&t.current.addEventListener("touchstart",f,{passive:!0}),function(){var e;null===(e=t.current)||void 0===e||e.removeEventListener("touchstart",f),o(),clearInterval(u.current)}}),[e])}(K,U,(function(e,t,n,o){var r=o;return!qe(e,t,n)&&((!r||!r._virtualHandled)&&(r&&(r._virtualHandled=!0),lt({preventDefault:function(){},deltaX:e?t:0,deltaY:e?0:t}),!0))})),(0,m.A)((function(){function e(e){var t=Ge&&e.detail<0,n=Qe&&e.detail>0;!K||t||n||e.preventDefault()}var t=U.current;return t.addEventListener("wheel",lt,{passive:!1}),t.addEventListener("DOMMouseScroll",ut,{passive:!0}),t.addEventListener("MozMousePixelScroll",e,{passive:!1}),function(){t.removeEventListener("wheel",lt),t.removeEventListener("DOMMouseScroll",ut),t.removeEventListener("MozMousePixelScroll",e)}}),[K,Ge,Qe]),(0,m.A)((function(){if(C){var e=ot(ne);oe(e),tt({x:e})}}),[Fe.width,C]);var ct=function(){var e,t;null===(e=We.current)||void 0===e||e.delayHidden(),null===(t=je.current)||void 0===t||t.delayHidden()},st=function(e,t,n,o,r,a,u,s){var f=d.useRef(),v=d.useState(null),p=(0,l.A)(v,2),h=p[0],g=p[1];return(0,m.A)((function(){if(h&&h.times<10){if(!e.current)return void g((function(e){return(0,i.A)({},e)}));a();var l=h.targetAlign,c=h.originAlign,s=h.index,f=h.offset,d=e.current.clientHeight,v=!1,p=l,m=null;if(d){for(var A=l||c,b=0,E=0,y=0,w=Math.min(t.length-1,s),S=0;S<=w;S+=1){var C=r(t[S]);E=b;var x=n.get(C);b=y=E+(void 0===x?o:x)}for(var M="top"===A?f:d-f,N=w;N>=0;N-=1){var I=r(t[N]),R=n.get(I);if(void 0===R){v=!0;break}if((M-=R)<=0)break}switch(A){case"top":m=E-f;break;case"bottom":m=y-d+f;break;default:var O=e.current.scrollTop;EO+d&&(p="bottom")}null!==m&&u(m),m!==h.lastTop&&(v=!0)}v&&g((0,i.A)((0,i.A)({},h),{},{times:h.times+1,targetAlign:p,lastTop:m}))}}),[h,e.current]),function(e){if(null!==e&&void 0!==e){if(be.A.cancel(f.current),"number"===typeof e)u(e);else if(e&&"object"===(0,c.A)(e)){var n,o=e.align;n="index"in e?e.index:t.findIndex((function(t){return r(t)===e.key}));var a=e.offset;g({times:0,index:n,offset:void 0===a?0:a,originAlign:o})}}else s()}}(U,X,H,v,k,(function(){return z(!0)}),fe,ct);d.useImperativeHandle(t,(function(){return{nativeElement:Q.current,getScrollInfo:Ze,scrollTo:function(e){var t;(t=e)&&"object"===(0,c.A)(t)&&("left"in t||"top"in t)?(void 0!==e.left&&oe(ot(e.left)),st(e.top)):st(e)}}})),(0,m.A)((function(){if(R){var e=X.slice(Ve,Le+1);R(e,X)}}),[Ve,Le,X]);var ft=function(e,t,n,o){var r=d.useMemo((function(){return[new Map,[]]}),[e,n.id,o]),a=(0,l.A)(r,2),i=a[0],u=a[1];return function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,l=i.get(r),c=i.get(a);if(void 0===l||void 0===c)for(var s=e.length,f=u.length;ff&&d.createElement(Re,{ref:We,prefixCls:r,scrollOffset:q,scrollRange:ke,rtl:Y,onScroll:nt,onStartMove:ue,onStopMove:ce,spinSize:Be,containerSize:Fe.height,style:null===P||void 0===P?void 0:P.verticalScrollBar,thumbStyle:null===P||void 0===P?void 0:P.verticalScrollBarThumb}),j&&C>Fe.width&&d.createElement(Re,{ref:je,prefixCls:r,scrollOffset:ne,scrollRange:C,rtl:Y,onScroll:nt,onStartMove:ue,onStopMove:ce,spinSize:Ye,containerSize:Fe.width,horizontal:!0,style:null===P||void 0===P?void 0:P.horizontalScrollBar,thumbStyle:null===P||void 0===P?void 0:P.horizontalScrollBarThumb}))}var Ve=d.forwardRef(ke);Ve.displayName="List";const Le=Ve;const _e=d.createContext(null);var ze=["disabled","title","children","style","className"];function He(e){return"string"===typeof e||"number"===typeof e}var Fe=function(e,t){var n=E(),i=n.prefixCls,c=n.id,s=n.open,f=n.multiple,v=n.mode,m=n.searchValue,h=n.toggleOpen,A=n.notFoundContent,b=n.onPopupScroll,y=d.useContext(_e),S=y.flattenOptions,x=y.onActiveValue,M=y.defaultActiveFirstOption,N=y.onSelect,I=y.menuItemSelectedIcon,R=y.rawValues,O=y.fieldNames,D=y.virtual,P=y.listHeight,T=y.listItemHeight,k="".concat(i,"-item"),V=(0,fe.A)((function(){return S}),[s,S],(function(e,t){return t[0]&&e[1]!==t[1]})),L=d.useRef(null),_=function(e){e.preventDefault()},z=function(e){L.current&&L.current.scrollTo("number"===typeof e?{index:e}:e)},H=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=V.length,o=0;o1&&void 0!==arguments[1]&&arguments[1];j(e);var n={source:t?"keyboard":"mouse"},o=V[e];o?x(o.value,e,n):x(null,-1,n)};(0,d.useEffect)((function(){Y(!1!==M?H(0):-1)}),[V.length,m]);var B=d.useCallback((function(e){return R.has(e)&&"combobox"!==v}),[v,(0,r.A)(R).toString(),R.size]);(0,d.useEffect)((function(){var e,t=setTimeout((function(){if(!f&&s&&1===R.size){var e=Array.from(R)[0],t=V.findIndex((function(t){return t.data.value===e}));-1!==t&&(Y(t),z(t))}}));s&&(null===(e=L.current)||void 0===e||e.scrollTo(void 0));return function(){return clearTimeout(t)}}),[s,m]);var X=function(e){void 0!==e&&N(e,{selected:!R.has(e)}),f||h(!1)};if(d.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case g.A.N:case g.A.P:case g.A.UP:case g.A.DOWN:var o=0;if(t===g.A.UP?o=-1:t===g.A.DOWN?o=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===g.A.N?o=1:t===g.A.P&&(o=-1)),0!==o){var r=H(W+o,o);z(r),Y(r,!0)}break;case g.A.ENTER:var a=V[W];a&&!a.data.disabled?X(a.value):X(void 0),s&&e.preventDefault();break;case g.A.ESC:h(!1),s&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){z(e)}}})),0===V.length)return d.createElement("div",{role:"listbox",id:"".concat(c,"_list"),className:"".concat(k,"-empty"),onMouseDown:_},A);var U=Object.keys(O).map((function(e){return O[e]})),G=function(e){return e.label},Q=function(e){var t=V[e];if(!t)return null;var n=t.data||{},r=n.value,a=t.group,i=(0,w.A)(n,!0),l=G(t);return t?d.createElement("div",(0,o.A)({"aria-label":"string"!==typeof l||a?null:l},i,{key:e,role:a?"presentation":"option",id:"".concat(c,"_list_").concat(e),"aria-selected":B(r)}),r):null};return d.createElement(d.Fragment,null,d.createElement("div",{role:"listbox",id:"".concat(c,"_list"),style:{height:0,width:0,overflow:"hidden"}},Q(W-1),Q(W),Q(W+1)),d.createElement(Le,{itemKey:"key",ref:L,data:V,height:P,itemHeight:T,fullHeight:!1,onMouseDown:_,onScroll:b,virtual:D},(function(e,t){var n,r=e.group,i=e.groupOption,l=e.data,c=e.label,s=e.value,f=l.key;if(r){var v,m=null!==(v=l.title)&&void 0!==v?v:He(c)?c.toString():void 0;return d.createElement("div",{className:p()(k,"".concat(k,"-group")),title:m},void 0!==c?c:f)}var h=l.disabled,g=l.title,A=(l.children,l.style),b=l.className,E=(0,u.A)(l,ze),y=(0,se.A)(E,U),S=B(s),x="".concat(k,"-option"),M=p()(k,x,b,(n={},(0,a.A)(n,"".concat(x,"-grouped"),i),(0,a.A)(n,"".concat(x,"-active"),W===t&&!h),(0,a.A)(n,"".concat(x,"-disabled"),h),(0,a.A)(n,"".concat(x,"-selected"),S),n)),N=G(e),R=!I||"function"===typeof I||S,O="number"===typeof N?N:N||s,D=He(O)?O.toString():void 0;return void 0!==g&&(D=g),d.createElement("div",(0,o.A)({},(0,w.A)(y),{"aria-selected":S,className:M,title:D,onMouseMove:function(){W===t||h||Y(t)},onClick:function(){h||X(s)},style:A}),d.createElement("div",{className:"".concat(x,"-content")},O),d.isValidElement(I)||S,R&&d.createElement(C,{className:"".concat(k,"-option-state"),customizeIcon:I,customizeIconProps:{isSelected:S}},S?"\u2713":null))})))},Ke=d.forwardRef(Fe);Ke.displayName="OptionList";const We=Ke;var je=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],Ye=["inputValue"];var Be=d.forwardRef((function(e,t){var n=e.id,f=e.mode,v=e.prefixCls,p=void 0===v?"rc-select":v,m=e.backfill,h=e.fieldNames,g=e.inputValue,A=e.searchValue,b=e.onSearch,E=e.autoClearSearchValue,y=void 0===E||E,w=e.onSelect,S=e.onDeselect,C=e.dropdownMatchSelectWidth,x=void 0===C||C,M=e.filterOption,N=e.filterSort,R=e.optionFilterProp,O=e.optionLabelProp,D=e.options,P=e.children,T=e.defaultActiveFirstOption,k=e.menuItemSelectedIcon,V=e.virtual,L=e.listHeight,_=void 0===L?200:L,z=e.listItemHeight,H=void 0===z?20:z,F=e.value,K=e.defaultValue,W=e.labelInValue,j=e.onChange,Y=(0,u.A)(e,je),G=(0,ee.Ay)(n),Q=$(f),J=!(D||!P),te=d.useMemo((function(){return(void 0!==M||"combobox"!==f)&&M}),[M,f]),ne=d.useMemo((function(){return X(h,J)}),[JSON.stringify(h),J]),oe=(0,s.A)("",{value:void 0!==A?A:g,postState:function(e){return e||""}}),ie=(0,l.A)(oe,2),le=ie[0],ue=ie[1],ce=function(e,t,n,o,r){return d.useMemo((function(){var a=e;!e&&(a=re(t));var i=new Map,l=new Map,u=function(e,t,n){n&&"string"===typeof n&&e.set(t[n],t)};return function e(t){for(var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=0;c1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,o=t.childrenAsData,r=[],a=X(n,!1),i=a.label,l=a.value,u=a.options;return function e(t,n){t.forEach((function(t){var a=t[i];if(n||!(u in t)){var c=t[l];r.push({key:B(t,r.length),groupOption:n,data:t,label:a,value:c})}else{var s=a;void 0===s&&o&&(s=t.label),r.push({key:B(t,r.length),group:!0,data:t,label:s}),e(t[u],!0)}}))}(e,!1),r}(Ne,{fieldNames:ne,childrenAsData:J})}),[Ne,ne,J]),Re=function(e){var t=ve(e);if(ge(t),j&&(t.length!==Ee.length||t.some((function(e,t){var n;return(null===(n=Ee[t])||void 0===n?void 0:n.value)!==(null===e||void 0===e?void 0:e.value)})))){var n=W?t:t.map((function(e){return e.value})),o=t.map((function(e){return U(ye(e.value))}));j(Q?n:n[0],Q?o:o[0])}},Oe=d.useState(null),De=(0,l.A)(Oe,2),Pe=De[0],Te=De[1],ke=d.useState(0),Ve=(0,l.A)(ke,2),Le=Ve[0],ze=Ve[1],He=void 0!==T?T:"combobox"!==f,Fe=d.useCallback((function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).source,o=void 0===n?"keyboard":n;ze(t),m&&"combobox"===f&&null!==e&&"keyboard"===o&&Te(String(e))}),[m,f]),Ke=function(e,t,n){var o=function(){var t,n=ye(e);return[W?{label:null===n||void 0===n?void 0:n[ne.label],value:e,key:null!==(t=null===n||void 0===n?void 0:n.key)&&void 0!==t?t:e}:e,U(n)]};if(t&&w){var r=o(),a=(0,l.A)(r,2),i=a[0],u=a[1];w(i,u)}else if(!t&&S&&"clear"!==n){var c=o(),s=(0,l.A)(c,2),f=s[0],d=s[1];S(f,d)}},Be=ae((function(e,t){var n,o=!Q||t.selected;n=o?Q?[].concat((0,r.A)(Ee),[e]):[e]:Ee.filter((function(t){return t.value!==e})),Re(n),Ke(e,o),"combobox"===f?Te(""):$&&!y||(ue(""),Te(""))})),Xe=d.useMemo((function(){var e=!1!==V&&!1!==x;return(0,i.A)((0,i.A)({},ce),{},{flattenOptions:Ie,onActiveValue:Fe,defaultActiveFirstOption:He,onSelect:Be,menuItemSelectedIcon:k,rawValues:Se,fieldNames:ne,virtual:e,listHeight:_,listItemHeight:H,childrenAsData:J})}),[ce,Ie,Fe,He,Be,k,Se,ne,V,x,_,H,J]);return d.createElement(_e.Provider,{value:Xe},d.createElement(q,(0,o.A)({},Y,{id:G,prefixCls:p,ref:t,omitDomProps:Ye,mode:f,displayValues:we,onDisplayValuesChange:function(e,t){Re(e);var n=t.type,o=t.values;"remove"!==n&&"clear"!==n||o.forEach((function(e){Ke(e.value,!1,n)}))},searchValue:le,onSearch:function(e,t){if(ue(e),Te(null),"submit"!==t.source)"blur"!==t.source&&("combobox"===f&&Re(e),null===b||void 0===b||b(e));else{var n=(e||"").trim();if(n){var o=Array.from(new Set([].concat((0,r.A)(Se),[n])));Re(o),Ke(n,!0),ue("")}}},autoClearSearchValue:y,onSearchSplit:function(e){var t=e;"tags"!==f&&(t=e.map((function(e){var t=fe.get(e);return null===t||void 0===t?void 0:t.value})).filter((function(e){return void 0!==e})));var n=Array.from(new Set([].concat((0,r.A)(Se),(0,r.A)(t))));Re(n),n.forEach((function(e){Ke(e,!0)}))},dropdownMatchSelectWidth:x,OptionList:We,emptyOptions:!Ie.length,activeValue:Pe,activeDescendantId:"".concat(G,"_list_").concat(Le)})))}));Be.Option=ce,Be.OptGroup=le;const Xe=Be}}]);