import{r,f as pt}from"./jsx-runtime-CgWCn3gT.js";import{c as Ue,a as Z,f as ht,af as Yn,e as qn,X as Lt,_ as nt,ag as Qn,N as Ge,ah as Zn,b as Et,ab as ct,a2 as Jn,a3 as kn,L as on,ai as er,a9 as tr,C as En,r as qt,t as jt,m as Pt,i as xe,aj as xn,g as nr,R as rr,S as or,k as ar,T as ir}from"./useTranslation-CksCcIr-.js";import{b as It,_ as W,a as Y,r as an}from"./i18nInstance-C_7vXBXC.js";import{cs as L,cw as lr,cx as ur,cy as cr,cz as sr,au as Kt,co as $n,av as On,cv as dr,cA as fr,cB as vr,cC as mr,cD as gr,cE as ln,cF as un,cn as pr,cu as hr,aM as br,R as Sr,cG as Cr,cr as wr,aF as Ir,cq as yr,ax as Rr,cp as Er,cH as xr,cI as $r,cJ as Or}from"./legacy-shell-D4JdMu14.js";import{u as Mr,g as Dr,a as Pr}from"./useVariants-DSpotrXM.js";import{E as Dt,R as Tr}from"./SearchOutlined-4CAPyJbl.js";var zt=function(t){var n=t.className,o=t.customizeIcon,a=t.customizeIconProps,i=t.children,l=t.onMouseDown,u=t.onClick,s=typeof o=="function"?o(a):o;return r.createElement("span",{className:n,onMouseDown:function(m){m.preventDefault(),l?.(m)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:u,"aria-hidden":!0},s!==void 0?s:r.createElement("span",{className:Ue(n.split(/\s+/).map(function(d){return"".concat(d,"-icon")}))},i))},Nr=function(t,n,o,a,i){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,u=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,d=pt.useMemo(function(){if(It(a)==="object")return a.clearIcon;if(i)return i},[a,i]),m=pt.useMemo(function(){return!!(!l&&a&&(o.length||u)&&!(s==="combobox"&&u===""))},[a,l,o.length,u,s]);return{allowClear:m,clearIcon:pt.createElement(zt,{className:"".concat(t,"-clear"),onMouseDown:n,customizeIcon:d},"×")}},Mn=r.createContext(null);function _r(){return r.useContext(Mn)}function Br(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=r.useState(!1),n=Z(t,2),o=n[0],a=n[1],i=r.useRef(null),l=function(){window.clearTimeout(i.current)};r.useEffect(function(){return l},[]);var u=function(d,m){l(),i.current=window.setTimeout(function(){a(d),m&&m()},e)};return[o,u,l]}function Dn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=r.useRef(null),n=r.useRef(null);r.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function o(a){(a||t.current===null)&&(t.current=a),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},o]}function Lr(e,t,n,o){var a=r.useRef(null);a.current={open:t,triggerOpen:n,customizedTrigger:o},r.useEffect(function(){function i(l){var u;if(!((u=a.current)!==null&&u!==void 0&&u.customizedTrigger)){var s=l.target;s.shadowRoot&&l.composed&&(s=l.composedPath()[0]||s),a.current.open&&e().filter(function(d){return d}).every(function(d){return!d.contains(s)&&d!==s})&&a.current.triggerOpen(!1)}}return window.addEventListener("mousedown",i),function(){return window.removeEventListener("mousedown",i)}},[])}function zr(e){return e&&![L.ESC,L.SHIFT,L.BACKSPACE,L.TAB,L.WIN_KEY,L.ALT,L.META,L.WIN_KEY_RIGHT,L.CTRL,L.SEMICOLON,L.EQUALS,L.CAPS_LOCK,L.CONTEXT_MENU,L.F1,L.F2,L.F3,L.F4,L.F5,L.F6,L.F7,L.F8,L.F9,L.F10,L.F11,L.F12].includes(e)}function Hr(e,t,n){var o=W(W({},e),t);return Object.keys(t).forEach(function(a){var i=t[a];typeof i=="function"&&(o[a]=function(){for(var l,u=arguments.length,s=new Array(u),d=0;d<u;d++)s[d]=arguments[d];return i.apply(void 0,s),(l=e[a])===null||l===void 0?void 0:l.call.apply(l,[e].concat(s))})}),o}var Ar=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Vr=function(t,n){var o=t.prefixCls,a=t.id,i=t.inputElement,l=t.autoFocus,u=t.autoComplete,s=t.editable,d=t.activeDescendantId,m=t.value,f=t.open,p=t.attrs,c=ht(t,Ar),g=i||r.createElement("input",null),v=g,h=v.ref,b=v.props;return Yn(!("maxLength"in g.props)),g=r.cloneElement(g,W(W(W({type:"search"},Hr(c,b)),{},{id:a,ref:qn(n,h),autoComplete:u||"off",autoFocus:l,className:Ue("".concat(o,"-selection-search-input"),b?.className),role:"combobox","aria-expanded":f||!1,"aria-haspopup":"listbox","aria-owns":"".concat(a,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(a,"_list"),"aria-activedescendant":f?d:void 0},p),{},{value:s?m:"",readOnly:!s,unselectable:s?null:"on",style:W(W({},b.style),{},{opacity:s?null:0})})),g},Pn=r.forwardRef(Vr);function Tn(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var Fr=typeof window<"u"&&window.document&&window.document.documentElement,Wr=Fr;function jr(e){return e!=null}function Kr(e){return!e&&e!==0}function cn(e){return["string","number"].includes(It(e))}function Nn(e){var t=void 0;return e&&(cn(e.title)?t=e.title.toString():cn(e.label)&&(t=e.label.toString())),t}function Ur(e,t){Wr?r.useLayoutEffect(e,t):r.useEffect(e,t)}function Xr(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var sn=function(t){t.preventDefault(),t.stopPropagation()},Gr=function(t){var n=t.id,o=t.prefixCls,a=t.values,i=t.open,l=t.searchValue,u=t.autoClearSearchValue,s=t.inputRef,d=t.placeholder,m=t.disabled,f=t.mode,p=t.showSearch,c=t.autoFocus,g=t.autoComplete,v=t.activeDescendantId,h=t.tabIndex,b=t.removeIcon,C=t.maxTagCount,$=t.maxTagTextLength,w=t.maxTagPlaceholder,A=w===void 0?function(F){return"+ ".concat(F.length," ...")}:w,V=t.tagRender,T=t.onToggleOpen,U=t.onRemove,j=t.onInputChange,le=t.onInputPaste,X=t.onInputKeyDown,q=t.onInputMouseDown,oe=t.onInputCompositionStart,ce=t.onInputCompositionEnd,ae=t.onInputBlur,Q=r.useRef(null),se=r.useState(0),te=Z(se,2),ie=te[0],B=te[1],D=r.useState(!1),J=Z(D,2),k=J[0],me=J[1],ue="".concat(o,"-selection"),Oe=i||f==="multiple"&&u===!1||f==="tags"?l:"",ge=f==="tags"||f==="multiple"&&u===!1||p&&(i||k);Ur(function(){B(Q.current.scrollWidth)},[Oe]);var $e=function(I,_,ne,z,ee){return r.createElement("span",{title:Nn(I),className:Ue("".concat(ue,"-item"),Y({},"".concat(ue,"-item-disabled"),ne))},r.createElement("span",{className:"".concat(ue,"-item-content")},_),z&&r.createElement(zt,{className:"".concat(ue,"-item-remove"),onMouseDown:sn,onClick:ee,customizeIcon:b},"×"))},Se=function(I,_,ne,z,ee,fe){var _e=function(De){sn(De),T(!i)};return r.createElement("span",{onMouseDown:_e},V({label:_,value:I,disabled:ne,closable:z,onClose:ee,isMaxTag:!!fe}))},Ce=function(I){var _=I.disabled,ne=I.label,z=I.value,ee=!m&&!_,fe=ne;if(typeof $=="number"&&(typeof ne=="string"||typeof ne=="number")){var _e=String(fe);_e.length>$&&(fe="".concat(_e.slice(0,$),"..."))}var Re=function(ve){ve&&ve.stopPropagation(),U(I)};return typeof V=="function"?Se(z,fe,_,ee,Re):$e(I,fe,_,ee,Re)},O=function(I){if(!a.length)return null;var _=typeof A=="function"?A(I):A;return typeof V=="function"?Se(void 0,_,!1,!1,void 0,!0):$e({title:_},_,!1)},S=r.createElement("div",{className:"".concat(ue,"-search"),style:{width:ie},onFocus:function(){me(!0)},onBlur:function(){me(!1)}},r.createElement(Pn,{ref:s,open:i,prefixCls:o,id:n,inputElement:null,disabled:m,autoFocus:c,autoComplete:g,editable:ge,activeDescendantId:v,value:Oe,onKeyDown:X,onMouseDown:q,onChange:j,onPaste:le,onCompositionStart:oe,onCompositionEnd:ce,onBlur:ae,tabIndex:h,attrs:Lt(t,!0)}),r.createElement("span",{ref:Q,className:"".concat(ue,"-search-mirror"),"aria-hidden":!0},Oe," ")),E=r.createElement(lr,{prefixCls:"".concat(ue,"-overflow"),data:a,renderItem:Ce,renderRest:O,suffix:S,itemKey:Xr,maxCount:C});return r.createElement("span",{className:"".concat(ue,"-wrap")},E,!a.length&&!Oe&&r.createElement("span",{className:"".concat(ue,"-placeholder")},d))},Yr=function(t){var n=t.inputElement,o=t.prefixCls,a=t.id,i=t.inputRef,l=t.disabled,u=t.autoFocus,s=t.autoComplete,d=t.activeDescendantId,m=t.mode,f=t.open,p=t.values,c=t.placeholder,g=t.tabIndex,v=t.showSearch,h=t.searchValue,b=t.activeValue,C=t.maxLength,$=t.onInputKeyDown,w=t.onInputMouseDown,A=t.onInputChange,V=t.onInputPaste,T=t.onInputCompositionStart,U=t.onInputCompositionEnd,j=t.onInputBlur,le=t.title,X=r.useState(!1),q=Z(X,2),oe=q[0],ce=q[1],ae=m==="combobox",Q=ae||v,se=p[0],te=h||"";ae&&b&&!oe&&(te=b),r.useEffect(function(){ae&&ce(!1)},[ae,b]);var ie=m!=="combobox"&&!f&&!v?!1:!!te,B=le===void 0?Nn(se):le,D=r.useMemo(function(){return se?null:r.createElement("span",{className:"".concat(o,"-selection-placeholder"),style:ie?{visibility:"hidden"}:void 0},c)},[se,ie,c,o]);return r.createElement("span",{className:"".concat(o,"-selection-wrap")},r.createElement("span",{className:"".concat(o,"-selection-search")},r.createElement(Pn,{ref:i,prefixCls:o,id:a,open:f,inputElement:n,disabled:l,autoFocus:u,autoComplete:s,editable:Q,activeDescendantId:d,value:te,onKeyDown:$,onMouseDown:w,onChange:function(k){ce(!0),A(k)},onPaste:V,onCompositionStart:T,onCompositionEnd:U,onBlur:j,tabIndex:g,attrs:Lt(t,!0),maxLength:ae?C:void 0})),!ae&&se?r.createElement("span",{className:"".concat(o,"-selection-item"),title:B,style:ie?{visibility:"hidden"}:void 0},se.label):null,D)},qr=function(t,n){var o=r.useRef(null),a=r.useRef(!1),i=t.prefixCls,l=t.open,u=t.mode,s=t.showSearch,d=t.tokenWithEnter,m=t.disabled,f=t.prefix,p=t.autoClearSearchValue,c=t.onSearch,g=t.onSearchSubmit,v=t.onToggleOpen,h=t.onInputKeyDown,b=t.onInputBlur,C=t.domRef;r.useImperativeHandle(n,function(){return{focus:function(B){o.current.focus(B)},blur:function(){o.current.blur()}}});var $=Dn(0),w=Z($,2),A=w[0],V=w[1],T=function(B){var D=B.which,J=o.current instanceof HTMLTextAreaElement;!J&&l&&(D===L.UP||D===L.DOWN)&&B.preventDefault(),h&&h(B),D===L.ENTER&&u==="tags"&&!a.current&&!l&&g?.(B.target.value),!(J&&!l&&~[L.UP,L.DOWN,L.LEFT,L.RIGHT].indexOf(D))&&zr(D)&&v(!0)},U=function(){V(!0)},j=r.useRef(null),le=function(B){c(B,!0,a.current)!==!1&&v(!0)},X=function(){a.current=!0},q=function(B){a.current=!1,u!=="combobox"&&le(B.target.value)},oe=function(B){var D=B.target.value;if(d&&j.current&&/[\r\n]/.test(j.current)){var J=j.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");D=D.replace(J,j.current)}j.current=null,le(D)},ce=function(B){var D=B.clipboardData,J=D?.getData("text");j.current=J||""},ae=function(B){var D=B.target;if(D!==o.current){var J=document.body.style.msTouchAction!==void 0;J?setTimeout(function(){o.current.focus()}):o.current.focus()}},Q=function(B){var D=A();B.target!==o.current&&!D&&!(u==="combobox"&&m)&&B.preventDefault(),(u!=="combobox"&&(!s||!D)||!l)&&(l&&p!==!1&&c("",!0,!1),v())},se={inputRef:o,onInputKeyDown:T,onInputMouseDown:U,onInputChange:oe,onInputPaste:ce,onInputCompositionStart:X,onInputCompositionEnd:q,onInputBlur:b},te=u==="multiple"||u==="tags"?r.createElement(Gr,nt({},t,se)):r.createElement(Yr,nt({},t,se));return r.createElement("div",{ref:C,className:"".concat(i,"-selector"),onClick:ae,onMouseDown:Q},f&&r.createElement("div",{className:"".concat(i,"-prefix")},f),te)},Qr=r.forwardRef(qr),Zr=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Jr=function(t){var n=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1},htmlRegion:"scroll"}}},kr=function(t,n){var o=t.prefixCls;t.disabled;var a=t.visible,i=t.children,l=t.popupElement,u=t.animation,s=t.transitionName,d=t.dropdownStyle,m=t.dropdownClassName,f=t.direction,p=f===void 0?"ltr":f,c=t.placement,g=t.builtinPlacements,v=t.dropdownMatchSelectWidth,h=t.dropdownRender,b=t.dropdownAlign,C=t.getPopupContainer,$=t.empty,w=t.getTriggerDOMNode,A=t.onPopupVisibleChange,V=t.onPopupMouseEnter,T=ht(t,Zr),U="".concat(o,"-dropdown"),j=l;h&&(j=h(l));var le=r.useMemo(function(){return g||Jr(v)},[g,v]),X=u?"".concat(U,"-").concat(u):s,q=typeof v=="number",oe=r.useMemo(function(){return q?null:v===!1?"minWidth":"width"},[v,q]),ce=d;q&&(ce=W(W({},ce),{},{width:v}));var ae=r.useRef(null);return r.useImperativeHandle(n,function(){return{getPopupElement:function(){var se;return(se=ae.current)===null||se===void 0?void 0:se.popupElement}}}),r.createElement(ur,nt({},T,{showAction:A?["click"]:[],hideAction:A?["click"]:[],popupPlacement:c||(p==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:le,prefixCls:U,popupTransitionName:X,popup:r.createElement("div",{onMouseEnter:V},j),ref:ae,stretch:oe,popupAlign:b,popupVisible:a,getPopupContainer:C,popupClassName:Ue(m,Y({},"".concat(U,"-empty"),$)),popupStyle:ce,getTriggerDOMNode:w,onPopupVisibleChange:A}),i)},eo=r.forwardRef(kr);function dn(e,t){var n=e.key,o;return"value"in e&&(o=e.value),n??(o!==void 0?o:"rc-index-key-".concat(t))}function Ut(e){return typeof e<"u"&&!Number.isNaN(e)}function _n(e,t){var n=e||{},o=n.label,a=n.value,i=n.options,l=n.groupLabel,u=o||(t?"children":"label");return{label:u,value:a||"value",options:i||"options",groupLabel:l||u}}function to(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.fieldNames,o=t.childrenAsData,a=[],i=_n(n,!1),l=i.label,u=i.value,s=i.options,d=i.groupLabel;function m(f,p){Array.isArray(f)&&f.forEach(function(c){if(p||!(s in c)){var g=c[u];a.push({key:dn(c,a.length),groupOption:p,data:c,label:c[l],value:g})}else{var v=c[d];v===void 0&&o&&(v=c.label),a.push({key:dn(c,a.length),group:!0,data:c,label:v}),m(c[s],!0)}})}return m(e,!1),a}function Xt(e){var t=W({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Qn(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var no=function(t,n,o){if(!n||!n.length)return null;var a=!1,i=function u(s,d){var m=cr(d),f=m[0],p=m.slice(1);if(!f)return[s];var c=s.split(f);return a=a||c.length>1,c.reduce(function(g,v){return[].concat(Ge(g),Ge(u(v,p)))},[]).filter(Boolean)},l=i(t,n);return a?typeof o<"u"?l.slice(0,o):l:null},Qt=r.createContext(null);function ro(e){var t=e.visible,n=e.values;if(!t)return null;var o=50;return r.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,o).map(function(a){var i=a.label,l=a.value;return["number","string"].includes(It(i))?i:l}).join(", ")),n.length>o?", ...":null)}var oo=["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","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],ao=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Gt=function(t){return t==="tags"||t==="multiple"},io=r.forwardRef(function(e,t){var n,o=e.id,a=e.prefixCls,i=e.className,l=e.showSearch,u=e.tagRender,s=e.direction,d=e.omitDomProps,m=e.displayValues,f=e.onDisplayValuesChange,p=e.emptyOptions,c=e.notFoundContent,g=c===void 0?"Not Found":c,v=e.onClear,h=e.mode,b=e.disabled,C=e.loading,$=e.getInputElement,w=e.getRawInputElement,A=e.open,V=e.defaultOpen,T=e.onDropdownVisibleChange,U=e.activeValue,j=e.onActiveValueChange,le=e.activeDescendantId,X=e.searchValue,q=e.autoClearSearchValue,oe=e.onSearch,ce=e.onSearchSplit,ae=e.tokenSeparators,Q=e.allowClear,se=e.prefix,te=e.suffixIcon,ie=e.clearIcon,B=e.OptionList,D=e.animation,J=e.transitionName,k=e.dropdownStyle,me=e.dropdownClassName,ue=e.dropdownMatchSelectWidth,Oe=e.dropdownRender,ge=e.dropdownAlign,$e=e.placement,Se=e.builtinPlacements,Ce=e.getPopupContainer,O=e.showAction,S=O===void 0?[]:O,E=e.onFocus,F=e.onBlur,I=e.onKeyUp,_=e.onKeyDown,ne=e.onMouseDown,z=ht(e,oo),ee=Gt(h),fe=(l!==void 0?l:ee)||h==="combobox",_e=W({},z);ao.forEach(function(re){delete _e[re]}),d?.forEach(function(re){delete _e[re]});var Re=r.useState(!1),De=Z(Re,2),ve=De[0],Ae=De[1];r.useEffect(function(){Ae(sr())},[]);var Xe=r.useRef(null),pe=r.useRef(null),Ee=r.useRef(null),he=r.useRef(null),we=r.useRef(null),Pe=r.useRef(!1),rt=Br(),Le=Z(rt,3),Ve=Le[0],ye=Le[1],bt=Le[2];r.useImperativeHandle(t,function(){var re,H;return{focus:(re=he.current)===null||re===void 0?void 0:re.focus,blur:(H=he.current)===null||H===void 0?void 0:H.blur,scrollTo:function(Ke){var Ne;return(Ne=we.current)===null||Ne===void 0?void 0:Ne.scrollTo(Ke)},nativeElement:Xe.current||pe.current}});var ze=r.useMemo(function(){var re;if(h!=="combobox")return X;var H=(re=m[0])===null||re===void 0?void 0:re.value;return typeof H=="string"||typeof H=="number"?String(H):""},[X,h,m]),st=h==="combobox"&&typeof $=="function"&&$()||null,Be=typeof w=="function"&&w(),St=Zn(pe,Be==null||(n=Be.props)===null||n===void 0?void 0:n.ref),Ze=r.useState(!1),ot=Z(Ze,2),dt=ot[0],mt=ot[1];Et(function(){mt(!0)},[]);var Je=Kt(!1,{defaultValue:V,value:A}),Fe=Z(Je,2),at=Fe[0],it=Fe[1],Ie=dt?at:!1,lt=!g&&p;(b||lt&&Ie&&h==="combobox")&&(Ie=!1);var Ye=lt?!1:Ie,y=r.useCallback(function(re){var H=re!==void 0?re:!Ie;b||(it(H),Ie!==H&&T?.(H))},[b,Ie,it,T]),N=r.useMemo(function(){return(ae||[]).some(function(re){return[`
`,`\r
`].includes(re)})},[ae]),P=r.useContext(Qt)||{},x=P.maxCount,G=P.rawValues,be=function(H,je,Ke){if(!(ee&&Ut(x)&&G?.size>=x)){var Ne=!0,He=H;j?.(null);var vt=no(H,ae,Ut(x)?x-G.size:void 0),ut=Ke?null:vt;return h!=="combobox"&&ut&&(He="",ce?.(ut),y(!1),Ne=!1),oe&&ze!==He&&oe(He,{source:je?"typing":"effect"}),Ne}},qe=function(H){!H||!H.trim()||oe(H,{source:"submit"})};r.useEffect(function(){!Ie&&!ee&&h!=="combobox"&&be("",!1,!1)},[Ie]),r.useEffect(function(){at&&b&&it(!1),b&&!Pe.current&&ye(!1)},[b]);var We=Dn(),ke=Z(We,2),Me=ke[0],et=ke[1],gt=r.useRef(!1),xt=function(H){var je=Me(),Ke=H.key,Ne=Ke==="Enter";if(Ne&&(h!=="combobox"&&H.preventDefault(),Ie||y(!0)),et(!!ze),Ke==="Backspace"&&!je&&ee&&!ze&&m.length){for(var He=Ge(m),vt=null,ut=He.length-1;ut>=0;ut-=1){var Ct=He[ut];if(!Ct.disabled){He.splice(ut,1),vt=Ct;break}}vt&&f(He,{type:"remove",values:[vt]})}for(var Rt=arguments.length,wt=new Array(Rt>1?Rt-1:0),_t=1;_t<Rt;_t++)wt[_t-1]=arguments[_t];if(Ie&&(!Ne||!gt.current)){var Bt;Ne&&(gt.current=!0),(Bt=we.current)===null||Bt===void 0||Bt.onKeyDown.apply(Bt,[H].concat(wt))}_?.apply(void 0,[H].concat(wt))},Nt=function(H){for(var je=arguments.length,Ke=new Array(je>1?je-1:0),Ne=1;Ne<je;Ne++)Ke[Ne-1]=arguments[Ne];if(Ie){var He;(He=we.current)===null||He===void 0||He.onKeyUp.apply(He,[H].concat(Ke))}H.key==="Enter"&&(gt.current=!1),I?.apply(void 0,[H].concat(Ke))},tt=function(H){var je=m.filter(function(Ke){return Ke!==H});f(je,{type:"remove",values:[H]})},Qe=function(){gt.current=!1},M=r.useRef(!1),R=function(){ye(!0),b||(E&&!M.current&&E.apply(void 0,arguments),S.includes("focus")&&y(!0)),M.current=!0},K=function(){Pe.current=!0,ye(!1,function(){M.current=!1,Pe.current=!1,y(!1)}),!b&&(ze&&(h==="tags"?oe(ze,{source:"submit"}):h==="multiple"&&oe("",{source:"blur"})),F&&F.apply(void 0,arguments))},de=[];r.useEffect(function(){return function(){de.forEach(function(re){return clearTimeout(re)}),de.splice(0,de.length)}},[]);var Te=function(H){var je,Ke=H.target,Ne=(je=Ee.current)===null||je===void 0?void 0:je.getPopupElement();if(Ne&&Ne.contains(Ke)){var He=setTimeout(function(){var Rt=de.indexOf(He);if(Rt!==-1&&de.splice(Rt,1),bt(),!ve&&!Ne.contains(document.activeElement)){var wt;(wt=he.current)===null||wt===void 0||wt.focus()}});de.push(He)}for(var vt=arguments.length,ut=new Array(vt>1?vt-1:0),Ct=1;Ct<vt;Ct++)ut[Ct-1]=arguments[Ct];ne?.apply(void 0,[H].concat(ut))},yt=r.useState({}),ft=Z(yt,2),$t=ft[1];function Ht(){$t({})}var Ot;Be&&(Ot=function(H){y(H)}),Lr(function(){var re;return[Xe.current,(re=Ee.current)===null||re===void 0?void 0:re.getPopupElement()]},Ye,y,!!Be);var Mt=r.useMemo(function(){return W(W({},e),{},{notFoundContent:g,open:Ie,triggerOpen:Ye,id:o,showSearch:fe,multiple:ee,toggleOpen:y})},[e,g,Ye,Ie,o,fe,ee,y]),en=!!te||C,tn;en&&(tn=r.createElement(zt,{className:Ue("".concat(a,"-arrow"),Y({},"".concat(a,"-arrow-loading"),C)),customizeIcon:te,customizeIconProps:{loading:C,searchValue:ze,open:Ie,focused:Ve,showSearch:fe}}));var jn=function(){var H;v?.(),(H=he.current)===null||H===void 0||H.focus(),f([],{type:"clear",values:m}),be("",!1,!1)},nn=Nr(a,jn,m,Q,ie,b,ze,h),Kn=nn.allowClear,Un=nn.clearIcon,Xn=r.createElement(B,{ref:we}),Gn=Ue(a,i,Y(Y(Y(Y(Y(Y(Y(Y(Y(Y({},"".concat(a,"-focused"),Ve),"".concat(a,"-multiple"),ee),"".concat(a,"-single"),!ee),"".concat(a,"-allow-clear"),Q),"".concat(a,"-show-arrow"),en),"".concat(a,"-disabled"),b),"".concat(a,"-loading"),C),"".concat(a,"-open"),Ie),"".concat(a,"-customize-input"),st),"".concat(a,"-show-search"),fe)),rn=r.createElement(eo,{ref:Ee,disabled:b,prefixCls:a,visible:Ye,popupElement:Xn,animation:D,transitionName:J,dropdownStyle:k,dropdownClassName:me,direction:s,dropdownMatchSelectWidth:ue,dropdownRender:Oe,dropdownAlign:ge,placement:$e,builtinPlacements:Se,getPopupContainer:Ce,empty:p,getTriggerDOMNode:function(H){return pe.current||H},onPopupVisibleChange:Ot,onPopupMouseEnter:Ht},Be?r.cloneElement(Be,{ref:St}):r.createElement(Qr,nt({},e,{domRef:pe,prefixCls:a,inputElement:st,ref:he,id:o,prefix:se,showSearch:fe,autoClearSearchValue:q,mode:h,activeDescendantId:le,tagRender:u,values:m,open:Ie,onToggleOpen:y,activeValue:U,searchValue:ze,onSearch:be,onSearchSubmit:qe,onRemove:tt,tokenWithEnter:N,onInputBlur:Qe}))),At;return Be?At=rn:At=r.createElement("div",nt({className:Gn},_e,{ref:Xe,onMouseDown:Te,onKeyDown:xt,onKeyUp:Nt,onFocus:R,onBlur:K}),r.createElement(ro,{visible:Ve&&!Ie,values:m}),rn,tn,Kn&&Un),r.createElement(Mn.Provider,{value:Mt},At)}),Zt=function(){return null};Zt.isSelectOptGroup=!0;var Jt=function(){return null};Jt.isSelectOption=!0;var Bn=r.forwardRef(function(e,t){var n=e.height,o=e.offsetY,a=e.offsetX,i=e.children,l=e.prefixCls,u=e.onInnerResize,s=e.innerProps,d=e.rtl,m=e.extra,f={},p={display:"flex",flexDirection:"column"};return o!==void 0&&(f={height:n,position:"relative",overflow:"hidden"},p=W(W({},p),{},Y(Y(Y(Y(Y({transform:"translateY(".concat(o,"px)")},d?"marginRight":"marginLeft",-a),"position","absolute"),"left",0),"right",0),"top",0))),r.createElement("div",{style:f},r.createElement($n,{onResize:function(g){var v=g.offsetHeight;v&&u&&u()}},r.createElement("div",nt({style:p,className:Ue(Y({},"".concat(l,"-holder-inner"),l)),ref:t},s),i,m)))});Bn.displayName="Filler";function lo(e){var t=e.children,n=e.setRef,o=r.useCallback(function(a){n(a)},[]);return r.cloneElement(t,{ref:o})}function uo(e,t,n,o,a,i,l,u){var s=u.getKey;return e.slice(t,n+1).map(function(d,m){var f=t+m,p=l(d,f,{style:{width:o},offsetX:a}),c=s(d);return r.createElement(lo,{key:c,setRef:function(v){return i(d,v)}},p)})}function co(e,t,n){var o=e.length,a=t.length,i,l;if(o===0&&a===0)return null;o<a?(i=e,l=t):(i=t,l=e);var u={__EMPTY_ITEM__:!0};function s(g){return g!==void 0?n(g):u}for(var d=null,m=Math.abs(o-a)!==1,f=0;f<l.length;f+=1){var p=s(i[f]),c=s(l[f]);if(p!==c){d=f,m=m||p!==s(l[f+1]);break}}return d===null?null:{index:d,multiple:m}}function so(e,t,n){var o=r.useState(e),a=Z(o,2),i=a[0],l=a[1],u=r.useState(null),s=Z(u,2),d=s[0],m=s[1];return r.useEffect(function(){var f=co(i||[],e||[],t);f?.index!==void 0&&m(e[f.index]),l(e)},[e]),[d]}var fn=(typeof navigator>"u"?"undefined":It(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const Ln=(function(e,t,n,o){var a=r.useRef(!1),i=r.useRef(null);function l(){clearTimeout(i.current),a.current=!0,i.current=setTimeout(function(){a.current=!1},50)}var u=r.useRef({top:e,bottom:t,left:n,right:o});return u.current.top=e,u.current.bottom=t,u.current.left=n,u.current.right=o,function(s,d){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,f=s?d<0&&u.current.left||d>0&&u.current.right:d<0&&u.current.top||d>0&&u.current.bottom;return m&&f?(clearTimeout(i.current),a.current=!1):(!f||a.current)&&l(),!a.current&&f}});function fo(e,t,n,o,a,i,l){var u=r.useRef(0),s=r.useRef(null),d=r.useRef(null),m=r.useRef(!1),f=Ln(t,n,o,a);function p(C,$){if(ct.cancel(s.current),!f(!1,$)){var w=C;if(!w._virtualHandled)w._virtualHandled=!0;else return;u.current+=$,d.current=$,fn||w.preventDefault(),s.current=ct(function(){var A=m.current?10:1;l(u.current*A,!1),u.current=0})}}function c(C,$){l($,!0),fn||C.preventDefault()}var g=r.useRef(null),v=r.useRef(null);function h(C){if(e){ct.cancel(v.current),v.current=ct(function(){g.current=null},2);var $=C.deltaX,w=C.deltaY,A=C.shiftKey,V=$,T=w;(g.current==="sx"||!g.current&&A&&w&&!$)&&(V=w,T=0,g.current="sx");var U=Math.abs(V),j=Math.abs(T);g.current===null&&(g.current=i&&U>j?"x":"y"),g.current==="y"?p(C,T):c(C,V)}}function b(C){e&&(m.current=C.detail===d.current)}return[h,b]}function vo(e,t,n,o){var a=r.useMemo(function(){return[new Map,[]]},[e,n.id,o]),i=Z(a,2),l=i[0],u=i[1],s=function(m){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:m,p=l.get(m),c=l.get(f);if(p===void 0||c===void 0)for(var g=e.length,v=u.length;v<g;v+=1){var h,b=e[v],C=t(b);l.set(C,v);var $=(h=n.get(C))!==null&&h!==void 0?h:o;if(u[v]=(u[v-1]||0)+$,C===m&&(p=v),C===f&&(c=v),p!==void 0&&c!==void 0)break}return{top:u[p-1]||0,bottom:u[c]}};return s}var mo=(function(){function e(){kn(this,e),Y(this,"maps",void 0),Y(this,"id",0),Y(this,"diffRecords",new Map),this.maps=Object.create(null)}return Jn(e,[{key:"set",value:function(n,o){this.diffRecords.set(n,this.maps[n]),this.maps[n]=o,this.id+=1}},{key:"get",value:function(n){return this.maps[n]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e})();function vn(e){var t=parseFloat(e);return isNaN(t)?0:t}function go(e,t,n){var o=r.useState(0),a=Z(o,2),i=a[0],l=a[1],u=r.useRef(new Map),s=r.useRef(new mo),d=r.useRef(0);function m(){d.current+=1}function f(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;m();var g=function(){var b=!1;u.current.forEach(function(C,$){if(C&&C.offsetParent){var w=C.offsetHeight,A=getComputedStyle(C),V=A.marginTop,T=A.marginBottom,U=vn(V),j=vn(T),le=w+U+j;s.current.get($)!==le&&(s.current.set($,le),b=!0)}}),b&&l(function(C){return C+1})};if(c)g();else{d.current+=1;var v=d.current;Promise.resolve().then(function(){v===d.current&&g()})}}function p(c,g){var v=e(c);u.current.get(v),g?(u.current.set(v,g),f()):u.current.delete(v)}return r.useEffect(function(){return m},[]),[p,f,s.current,i]}var mn=14/15;function po(e,t,n){var o=r.useRef(!1),a=r.useRef(0),i=r.useRef(0),l=r.useRef(null),u=r.useRef(null),s,d=function(c){if(o.current){var g=Math.ceil(c.touches[0].pageX),v=Math.ceil(c.touches[0].pageY),h=a.current-g,b=i.current-v,C=Math.abs(h)>Math.abs(b);C?a.current=g:i.current=v;var $=n(C,C?h:b,!1,c);$&&c.preventDefault(),clearInterval(u.current),$&&(u.current=setInterval(function(){C?h*=mn:b*=mn;var w=Math.floor(C?h:b);(!n(C,w,!0)||Math.abs(w)<=.1)&&clearInterval(u.current)},16))}},m=function(){o.current=!1,s()},f=function(c){s(),c.touches.length===1&&!o.current&&(o.current=!0,a.current=Math.ceil(c.touches[0].pageX),i.current=Math.ceil(c.touches[0].pageY),l.current=c.target,l.current.addEventListener("touchmove",d,{passive:!1}),l.current.addEventListener("touchend",m,{passive:!0}))};s=function(){l.current&&(l.current.removeEventListener("touchmove",d),l.current.removeEventListener("touchend",m))},Et(function(){return e&&t.current.addEventListener("touchstart",f,{passive:!0}),function(){var p;(p=t.current)===null||p===void 0||p.removeEventListener("touchstart",f),s(),clearInterval(u.current)}},[e])}function gn(e){return Math.floor(Math.pow(e,.5))}function Yt(e,t){var n="touches"in e?e.touches[0]:e;return n[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function ho(e,t,n){r.useEffect(function(){var o=t.current;if(e&&o){var a=!1,i,l,u=function(){ct.cancel(i)},s=function p(){u(),i=ct(function(){n(l),p()})},d=function(){a=!1,u()},m=function(c){if(!(c.target.draggable||c.button!==0)){var g=c;g._virtualHandled||(g._virtualHandled=!0,a=!0)}},f=function(c){if(a){var g=Yt(c,!1),v=o.getBoundingClientRect(),h=v.top,b=v.bottom;if(g<=h){var C=h-g;l=-gn(C),s()}else if(g>=b){var $=g-b;l=gn($),s()}else u()}};return o.addEventListener("mousedown",m),o.ownerDocument.addEventListener("mouseup",d),o.ownerDocument.addEventListener("mousemove",f),o.ownerDocument.addEventListener("dragend",d),function(){o.removeEventListener("mousedown",m),o.ownerDocument.removeEventListener("mouseup",d),o.ownerDocument.removeEventListener("mousemove",f),o.ownerDocument.removeEventListener("dragend",d),u()}}},[e])}var bo=10;function So(e,t,n,o,a,i,l,u){var s=r.useRef(),d=r.useState(null),m=Z(d,2),f=m[0],p=m[1];return Et(function(){if(f&&f.times<bo){if(!e.current){p(function(ie){return W({},ie)});return}i();var c=f.targetAlign,g=f.originAlign,v=f.index,h=f.offset,b=e.current.clientHeight,C=!1,$=c,w=null;if(b){for(var A=c||g,V=0,T=0,U=0,j=Math.min(t.length-1,v),le=0;le<=j;le+=1){var X=a(t[le]);T=V;var q=n.get(X);U=T+(q===void 0?o:q),V=U}for(var oe=A==="top"?h:b-h,ce=j;ce>=0;ce-=1){var ae=a(t[ce]),Q=n.get(ae);if(Q===void 0){C=!0;break}if(oe-=Q,oe<=0)break}switch(A){case"top":w=T-h;break;case"bottom":w=U-b+h;break;default:{var se=e.current.scrollTop,te=se+b;T<se?$="top":U>te&&($="bottom")}}w!==null&&l(w),w!==f.lastTop&&(C=!0)}C&&p(W(W({},f),{},{times:f.times+1,targetAlign:$,lastTop:w}))}},[f,e.current]),function(c){if(c==null){u();return}if(ct.cancel(s.current),typeof c=="number")l(c);else if(c&&It(c)==="object"){var g,v=c.align;"index"in c?g=c.index:g=t.findIndex(function(C){return a(C)===c.key});var h=c.offset,b=h===void 0?0:h;p({times:0,index:g,offset:b,originAlign:v})}}}var pn=r.forwardRef(function(e,t){var n=e.prefixCls,o=e.rtl,a=e.scrollOffset,i=e.scrollRange,l=e.onStartMove,u=e.onStopMove,s=e.onScroll,d=e.horizontal,m=e.spinSize,f=e.containerSize,p=e.style,c=e.thumbStyle,g=e.showScrollBar,v=r.useState(!1),h=Z(v,2),b=h[0],C=h[1],$=r.useState(null),w=Z($,2),A=w[0],V=w[1],T=r.useState(null),U=Z(T,2),j=U[0],le=U[1],X=!o,q=r.useRef(),oe=r.useRef(),ce=r.useState(g),ae=Z(ce,2),Q=ae[0],se=ae[1],te=r.useRef(),ie=function(){g===!0||g===!1||(clearTimeout(te.current),se(!0),te.current=setTimeout(function(){se(!1)},3e3))},B=i-f||0,D=f-m||0,J=r.useMemo(function(){if(a===0||B===0)return 0;var O=a/B;return O*D},[a,B,D]),k=function(S){S.stopPropagation(),S.preventDefault()},me=r.useRef({top:J,dragging:b,pageY:A,startTop:j});me.current={top:J,dragging:b,pageY:A,startTop:j};var ue=function(S){C(!0),V(Yt(S,d)),le(me.current.top),l(),S.stopPropagation(),S.preventDefault()};r.useEffect(function(){var O=function(I){I.preventDefault()},S=q.current,E=oe.current;return S.addEventListener("touchstart",O,{passive:!1}),E.addEventListener("touchstart",ue,{passive:!1}),function(){S.removeEventListener("touchstart",O),E.removeEventListener("touchstart",ue)}},[]);var Oe=r.useRef();Oe.current=B;var ge=r.useRef();ge.current=D,r.useEffect(function(){if(b){var O,S=function(I){var _=me.current,ne=_.dragging,z=_.pageY,ee=_.startTop;ct.cancel(O);var fe=q.current.getBoundingClientRect(),_e=f/(d?fe.width:fe.height);if(ne){var Re=(Yt(I,d)-z)*_e,De=ee;!X&&d?De-=Re:De+=Re;var ve=Oe.current,Ae=ge.current,Xe=Ae?De/Ae:0,pe=Math.ceil(Xe*ve);pe=Math.max(pe,0),pe=Math.min(pe,ve),O=ct(function(){s(pe,d)})}},E=function(){C(!1),u()};return window.addEventListener("mousemove",S,{passive:!0}),window.addEventListener("touchmove",S,{passive:!0}),window.addEventListener("mouseup",E,{passive:!0}),window.addEventListener("touchend",E,{passive:!0}),function(){window.removeEventListener("mousemove",S),window.removeEventListener("touchmove",S),window.removeEventListener("mouseup",E),window.removeEventListener("touchend",E),ct.cancel(O)}}},[b]),r.useEffect(function(){return ie(),function(){clearTimeout(te.current)}},[a]),r.useImperativeHandle(t,function(){return{delayHidden:ie}});var $e="".concat(n,"-scrollbar"),Se={position:"absolute",visibility:Q?null:"hidden"},Ce={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return d?(Object.assign(Se,{height:8,left:0,right:0,bottom:0}),Object.assign(Ce,Y({height:"100%",width:m},X?"left":"right",J))):(Object.assign(Se,Y({width:8,top:0,bottom:0},X?"right":"left",0)),Object.assign(Ce,{width:"100%",height:m,top:J})),r.createElement("div",{ref:q,className:Ue($e,Y(Y(Y({},"".concat($e,"-horizontal"),d),"".concat($e,"-vertical"),!d),"".concat($e,"-visible"),Q)),style:W(W({},Se),p),onMouseDown:k,onMouseMove:ie},r.createElement("div",{ref:oe,className:Ue("".concat($e,"-thumb"),Y({},"".concat($e,"-thumb-moving"),b)),style:W(W({},Ce),c),onMouseDown:ue}))}),Co=20;function hn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,Co),Math.floor(n)}var wo=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Io=[],yo={overflowY:"auto",overflowAnchor:"none"};function Ro(e,t){var n=e.prefixCls,o=n===void 0?"rc-virtual-list":n,a=e.className,i=e.height,l=e.itemHeight,u=e.fullHeight,s=u===void 0?!0:u,d=e.style,m=e.data,f=e.children,p=e.itemKey,c=e.virtual,g=e.direction,v=e.scrollWidth,h=e.component,b=h===void 0?"div":h,C=e.onScroll,$=e.onVirtualScroll,w=e.onVisibleChange,A=e.innerProps,V=e.extraRender,T=e.styles,U=e.showScrollBar,j=U===void 0?"optional":U,le=ht(e,wo),X=r.useCallback(function(M){return typeof p=="function"?p(M):M?.[p]},[p]),q=go(X),oe=Z(q,4),ce=oe[0],ae=oe[1],Q=oe[2],se=oe[3],te=!!(c!==!1&&i&&l),ie=r.useMemo(function(){return Object.values(Q.maps).reduce(function(M,R){return M+R},0)},[Q.id,Q.maps]),B=te&&m&&(Math.max(l*m.length,ie)>i||!!v),D=g==="rtl",J=Ue(o,Y({},"".concat(o,"-rtl"),D),a),k=m||Io,me=r.useRef(),ue=r.useRef(),Oe=r.useRef(),ge=r.useState(0),$e=Z(ge,2),Se=$e[0],Ce=$e[1],O=r.useState(0),S=Z(O,2),E=S[0],F=S[1],I=r.useState(!1),_=Z(I,2),ne=_[0],z=_[1],ee=function(){z(!0)},fe=function(){z(!1)},_e={getKey:X};function Re(M){Ce(function(R){var K;typeof M=="function"?K=M(R):K=M;var de=mt(K);return me.current.scrollTop=de,de})}var De=r.useRef({start:0,end:k.length}),ve=r.useRef(),Ae=so(k,X),Xe=Z(Ae,1),pe=Xe[0];ve.current=pe;var Ee=r.useMemo(function(){if(!te)return{scrollHeight:void 0,start:0,end:k.length-1,offset:void 0};if(!B){var M;return{scrollHeight:((M=ue.current)===null||M===void 0?void 0:M.offsetHeight)||0,start:0,end:k.length-1,offset:void 0}}for(var R=0,K,de,Te,yt=k.length,ft=0;ft<yt;ft+=1){var $t=k[ft],Ht=X($t),Ot=Q.get(Ht),Mt=R+(Ot===void 0?l:Ot);Mt>=Se&&K===void 0&&(K=ft,de=R),Mt>Se+i&&Te===void 0&&(Te=ft),R=Mt}return K===void 0&&(K=0,de=0,Te=Math.ceil(i/l)),Te===void 0&&(Te=k.length-1),Te=Math.min(Te+1,k.length-1),{scrollHeight:R,start:K,end:Te,offset:de}},[B,te,Se,k,se,i]),he=Ee.scrollHeight,we=Ee.start,Pe=Ee.end,rt=Ee.offset;De.current.start=we,De.current.end=Pe,r.useLayoutEffect(function(){var M=Q.getRecord();if(M.size===1){var R=Array.from(M.keys())[0],K=M.get(R),de=k[we];if(de&&K===void 0){var Te=X(de);if(Te===R){var yt=Q.get(R),ft=yt-l;Re(function($t){return $t+ft})}}}Q.resetRecord()},[he]);var Le=r.useState({width:0,height:i}),Ve=Z(Le,2),ye=Ve[0],bt=Ve[1],ze=function(R){bt({width:R.offsetWidth,height:R.offsetHeight})},st=r.useRef(),Be=r.useRef(),St=r.useMemo(function(){return hn(ye.width,v)},[ye.width,v]),Ze=r.useMemo(function(){return hn(ye.height,he)},[ye.height,he]),ot=he-i,dt=r.useRef(ot);dt.current=ot;function mt(M){var R=M;return Number.isNaN(dt.current)||(R=Math.min(R,dt.current)),R=Math.max(R,0),R}var Je=Se<=0,Fe=Se>=ot,at=E<=0,it=E>=v,Ie=Ln(Je,Fe,at,it),lt=function(){return{x:D?-E:E,y:Se}},Ye=r.useRef(lt()),y=on(function(M){if($){var R=W(W({},lt()),M);(Ye.current.x!==R.x||Ye.current.y!==R.y)&&($(R),Ye.current=R)}});function N(M,R){var K=M;R?(an.flushSync(function(){F(K)}),y()):Re(K)}function P(M){var R=M.currentTarget.scrollTop;R!==Se&&Re(R),C?.(M),y()}var x=function(R){var K=R,de=v?v-ye.width:0;return K=Math.max(K,0),K=Math.min(K,de),K},G=on(function(M,R){R?(an.flushSync(function(){F(function(K){var de=K+(D?-M:M);return x(de)})}),y()):Re(function(K){var de=K+M;return de})}),be=fo(te,Je,Fe,at,it,!!v,G),qe=Z(be,2),We=qe[0],ke=qe[1];po(te,me,function(M,R,K,de){var Te=de;return Ie(M,R,K)?!1:!Te||!Te._virtualHandled?(Te&&(Te._virtualHandled=!0),We({preventDefault:function(){},deltaX:M?R:0,deltaY:M?0:R}),!0):!1}),ho(B,me,function(M){Re(function(R){return R+M})}),Et(function(){function M(K){var de=Je&&K.detail<0,Te=Fe&&K.detail>0;te&&!de&&!Te&&K.preventDefault()}var R=me.current;return R.addEventListener("wheel",We,{passive:!1}),R.addEventListener("DOMMouseScroll",ke,{passive:!0}),R.addEventListener("MozMousePixelScroll",M,{passive:!1}),function(){R.removeEventListener("wheel",We),R.removeEventListener("DOMMouseScroll",ke),R.removeEventListener("MozMousePixelScroll",M)}},[te,Je,Fe]),Et(function(){if(v){var M=x(E);F(M),y({x:M})}},[ye.width,v]);var Me=function(){var R,K;(R=st.current)===null||R===void 0||R.delayHidden(),(K=Be.current)===null||K===void 0||K.delayHidden()},et=So(me,k,Q,l,X,function(){return ae(!0)},Re,Me);r.useImperativeHandle(t,function(){return{nativeElement:Oe.current,getScrollInfo:lt,scrollTo:function(R){function K(de){return de&&It(de)==="object"&&("left"in de||"top"in de)}K(R)?(R.left!==void 0&&F(x(R.left)),et(R.top)):et(R)}}}),Et(function(){if(w){var M=k.slice(we,Pe+1);w(M,k)}},[we,Pe,k]);var gt=vo(k,X,Q,l),xt=V?.({start:we,end:Pe,virtual:B,offsetX:E,offsetY:rt,rtl:D,getSize:gt}),Nt=uo(k,we,Pe,v,E,ce,f,_e),tt=null;i&&(tt=W(Y({},s?"height":"maxHeight",i),yo),te&&(tt.overflowY="hidden",v&&(tt.overflowX="hidden"),ne&&(tt.pointerEvents="none")));var Qe={};return D&&(Qe.dir="rtl"),r.createElement("div",nt({ref:Oe,style:W(W({},d),{},{position:"relative"}),className:J},Qe,le),r.createElement($n,{onResize:ze},r.createElement(b,{className:"".concat(o,"-holder"),style:tt,ref:me,onScroll:P,onMouseEnter:Me},r.createElement(Bn,{prefixCls:o,height:he,offsetX:E,offsetY:rt,scrollWidth:v,onInnerResize:ae,ref:ue,innerProps:A,rtl:D,extra:xt},Nt))),B&&he>i&&r.createElement(pn,{ref:st,prefixCls:o,scrollOffset:Se,scrollRange:he,rtl:D,onScroll:N,onStartMove:ee,onStopMove:fe,spinSize:Ze,containerSize:ye.height,style:T?.verticalScrollBar,thumbStyle:T?.verticalScrollBarThumb,showScrollBar:j}),B&&v>ye.width&&r.createElement(pn,{ref:Be,prefixCls:o,scrollOffset:E,scrollRange:v,rtl:D,onScroll:N,onStartMove:ee,onStopMove:fe,spinSize:St,containerSize:ye.width,horizontal:!0,style:T?.horizontalScrollBar,thumbStyle:T?.horizontalScrollBarThumb,showScrollBar:j}))}var zn=r.forwardRef(Ro);zn.displayName="List";function Eo(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var xo=["disabled","title","children","style","className"];function bn(e){return typeof e=="string"||typeof e=="number"}var $o=function(t,n){var o=_r(),a=o.prefixCls,i=o.id,l=o.open,u=o.multiple,s=o.mode,d=o.searchValue,m=o.toggleOpen,f=o.notFoundContent,p=o.onPopupScroll,c=r.useContext(Qt),g=c.maxCount,v=c.flattenOptions,h=c.onActiveValue,b=c.defaultActiveFirstOption,C=c.onSelect,$=c.menuItemSelectedIcon,w=c.rawValues,A=c.fieldNames,V=c.virtual,T=c.direction,U=c.listHeight,j=c.listItemHeight,le=c.optionRender,X="".concat(a,"-item"),q=er(function(){return v},[l,v],function(O,S){return S[0]&&O[1]!==S[1]}),oe=r.useRef(null),ce=r.useMemo(function(){return u&&Ut(g)&&w?.size>=g},[u,g,w?.size]),ae=function(S){S.preventDefault()},Q=function(S){var E;(E=oe.current)===null||E===void 0||E.scrollTo(typeof S=="number"?{index:S}:S)},se=r.useCallback(function(O){return s==="combobox"?!1:w.has(O)},[s,Ge(w).toString(),w.size]),te=function(S){for(var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=q.length,I=0;I<F;I+=1){var _=(S+I*E+F)%F,ne=q[_]||{},z=ne.group,ee=ne.data;if(!z&&!(ee!=null&&ee.disabled)&&(se(ee.value)||!ce))return _}return-1},ie=r.useState(function(){return te(0)}),B=Z(ie,2),D=B[0],J=B[1],k=function(S){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;J(S);var F={source:E?"keyboard":"mouse"},I=q[S];if(!I){h(null,-1,F);return}h(I.value,S,F)};r.useEffect(function(){k(b!==!1?te(0):-1)},[q.length,d]);var me=r.useCallback(function(O){return s==="combobox"?String(O).toLowerCase()===d.toLowerCase():w.has(O)},[s,d,Ge(w).toString(),w.size]);r.useEffect(function(){var O=setTimeout(function(){if(!u&&l&&w.size===1){var E=Array.from(w)[0],F=q.findIndex(function(I){var _=I.data;return d?String(_.value).startsWith(d):_.value===E});F!==-1&&(k(F),Q(F))}});if(l){var S;(S=oe.current)===null||S===void 0||S.scrollTo(void 0)}return function(){return clearTimeout(O)}},[l,d]);var ue=function(S){S!==void 0&&C(S,{selected:!w.has(S)}),u||m(!1)};if(r.useImperativeHandle(n,function(){return{onKeyDown:function(S){var E=S.which,F=S.ctrlKey;switch(E){case L.N:case L.P:case L.UP:case L.DOWN:{var I=0;if(E===L.UP?I=-1:E===L.DOWN?I=1:Eo()&&F&&(E===L.N?I=1:E===L.P&&(I=-1)),I!==0){var _=te(D+I,I);Q(_),k(_,!0)}break}case L.TAB:case L.ENTER:{var ne,z=q[D];z&&!(z!=null&&(ne=z.data)!==null&&ne!==void 0&&ne.disabled)&&!ce?ue(z.value):ue(void 0),l&&S.preventDefault();break}case L.ESC:m(!1),l&&S.stopPropagation()}},onKeyUp:function(){},scrollTo:function(S){Q(S)}}}),q.length===0)return r.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(X,"-empty"),onMouseDown:ae},f);var Oe=Object.keys(A).map(function(O){return A[O]}),ge=function(S){return S.label};function $e(O,S){var E=O.group;return{role:E?"presentation":"option",id:"".concat(i,"_list_").concat(S)}}var Se=function(S){var E=q[S];if(!E)return null;var F=E.data||{},I=F.value,_=E.group,ne=Lt(F,!0),z=ge(E);return E?r.createElement("div",nt({"aria-label":typeof z=="string"&&!_?z:null},ne,{key:S},$e(E,S),{"aria-selected":me(I)}),I):null},Ce={role:"listbox",id:"".concat(i,"_list")};return r.createElement(r.Fragment,null,V&&r.createElement("div",nt({},Ce,{style:{height:0,width:0,overflow:"hidden"}}),Se(D-1),Se(D),Se(D+1)),r.createElement(zn,{itemKey:"key",ref:oe,data:q,height:U,itemHeight:j,fullHeight:!1,onMouseDown:ae,onScroll:p,virtual:V,direction:T,innerProps:V?null:Ce},function(O,S){var E=O.group,F=O.groupOption,I=O.data,_=O.label,ne=O.value,z=I.key;if(E){var ee,fe=(ee=I.title)!==null&&ee!==void 0?ee:bn(_)?_.toString():void 0;return r.createElement("div",{className:Ue(X,"".concat(X,"-group"),I.className),title:fe},_!==void 0?_:z)}var _e=I.disabled,Re=I.title;I.children;var De=I.style,ve=I.className,Ae=ht(I,xo),Xe=On(Ae,Oe),pe=se(ne),Ee=_e||!pe&&ce,he="".concat(X,"-option"),we=Ue(X,he,ve,Y(Y(Y(Y({},"".concat(he,"-grouped"),F),"".concat(he,"-active"),D===S&&!Ee),"".concat(he,"-disabled"),Ee),"".concat(he,"-selected"),pe)),Pe=ge(O),rt=!$||typeof $=="function"||pe,Le=typeof Pe=="number"?Pe:Pe||ne,Ve=bn(Le)?Le.toString():void 0;return Re!==void 0&&(Ve=Re),r.createElement("div",nt({},Lt(Xe),V?{}:$e(O,S),{"aria-selected":me(ne),className:we,title:Ve,onMouseMove:function(){D===S||Ee||k(S)},onClick:function(){Ee||ue(ne)},style:De}),r.createElement("div",{className:"".concat(he,"-content")},typeof le=="function"?le(O,{index:S}):Le),r.isValidElement($)||pe,rt&&r.createElement(zt,{className:"".concat(X,"-option-state"),customizeIcon:$,customizeIconProps:{value:ne,disabled:Ee,isSelected:pe}},pe?"✓":null))}))},Oo=r.forwardRef($o);const Mo=(function(e,t){var n=r.useRef({values:new Map,options:new Map}),o=r.useMemo(function(){var i=n.current,l=i.values,u=i.options,s=e.map(function(f){if(f.label===void 0){var p;return W(W({},f),{},{label:(p=l.get(f.value))===null||p===void 0?void 0:p.label})}return f}),d=new Map,m=new Map;return s.forEach(function(f){d.set(f.value,f),m.set(f.value,t.get(f.value)||u.get(f.value))}),n.current.values=d,n.current.options=m,s},[e,t]),a=r.useCallback(function(i){return t.get(i)||n.current.options.get(i)},[t]);return[o,a]});function Vt(e,t){return Tn(e).join("").toUpperCase().includes(t)}const Do=(function(e,t,n,o,a){return r.useMemo(function(){if(!n||o===!1)return e;var i=t.options,l=t.label,u=t.value,s=[],d=typeof o=="function",m=n.toUpperCase(),f=d?o:function(c,g){return a?Vt(g[a],m):g[i]?Vt(g[l!=="children"?l:"label"],m):Vt(g[u],m)},p=d?function(c){return Xt(c)}:function(c){return c};return e.forEach(function(c){if(c[i]){var g=f(n,p(c));if(g)s.push(c);else{var v=c[i].filter(function(h){return f(n,p(h))});v.length&&s.push(W(W({},c),{},Y({},i,v)))}return}f(n,p(c))&&s.push(c)}),s},[e,o,a,n,t])});var Sn=0,Po=tr();function To(){var e;return Po?(e=Sn,Sn+=1):e="TEST_OR_SSR",e}function No(e){var t=r.useState(),n=Z(t,2),o=n[0],a=n[1];return r.useEffect(function(){a("rc_select_".concat(To()))},[]),e||o}var _o=["children","value"],Bo=["children"];function Lo(e){var t=e,n=t.key,o=t.props,a=o.children,i=o.value,l=ht(o,_o);return W({key:n,value:i!==void 0?i:n,children:a},l)}function Hn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return dr(e).map(function(n,o){if(!r.isValidElement(n)||!n.type)return null;var a=n,i=a.type.isSelectOptGroup,l=a.key,u=a.props,s=u.children,d=ht(u,Bo);return t||!i?Lo(n):W(W({key:"__RC_SELECT_GRP__".concat(l===null?o:l,"__"),label:l},d),{},{options:Hn(s)})}).filter(function(n){return n})}var zo=function(t,n,o,a,i){return r.useMemo(function(){var l=t,u=!t;u&&(l=Hn(n));var s=new Map,d=new Map,m=function(c,g,v){v&&typeof v=="string"&&c.set(g[v],g)},f=function p(c){for(var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=0;v<c.length;v+=1){var h=c[v];!h[o.options]||g?(s.set(h[o.value],h),m(d,h,o.label),m(d,h,a),m(d,h,i)):p(h[o.options],!0)}};return f(l),{options:l,valueOptions:s,labelOptions:d}},[t,n,o,a,i])};function Cn(e){var t=r.useRef();t.current=e;var n=r.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}var Ho=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],Ao=["inputValue"];function Vo(e){return!e||It(e)!=="object"}var Fo=r.forwardRef(function(e,t){var n=e.id,o=e.mode,a=e.prefixCls,i=a===void 0?"rc-select":a,l=e.backfill,u=e.fieldNames,s=e.inputValue,d=e.searchValue,m=e.onSearch,f=e.autoClearSearchValue,p=f===void 0?!0:f,c=e.onSelect,g=e.onDeselect,v=e.dropdownMatchSelectWidth,h=v===void 0?!0:v,b=e.filterOption,C=e.filterSort,$=e.optionFilterProp,w=e.optionLabelProp,A=e.options,V=e.optionRender,T=e.children,U=e.defaultActiveFirstOption,j=e.menuItemSelectedIcon,le=e.virtual,X=e.direction,q=e.listHeight,oe=q===void 0?200:q,ce=e.listItemHeight,ae=ce===void 0?20:ce,Q=e.labelRender,se=e.value,te=e.defaultValue,ie=e.labelInValue,B=e.onChange,D=e.maxCount,J=ht(e,Ho),k=No(n),me=Gt(o),ue=!!(!A&&T),Oe=r.useMemo(function(){return b===void 0&&o==="combobox"?!1:b},[b,o]),ge=r.useMemo(function(){return _n(u,ue)},[JSON.stringify(u),ue]),$e=Kt("",{value:d!==void 0?d:s,postState:function(N){return N||""}}),Se=Z($e,2),Ce=Se[0],O=Se[1],S=zo(A,T,ge,$,w),E=S.valueOptions,F=S.labelOptions,I=S.options,_=r.useCallback(function(y){var N=Tn(y);return N.map(function(P){var x,G,be,qe,We;if(Vo(P))x=P;else{var ke;be=P.key,G=P.label,x=(ke=P.value)!==null&&ke!==void 0?ke:be}var Me=E.get(x);if(Me){var et;G===void 0&&(G=Me?.[w||ge.label]),be===void 0&&(be=(et=Me?.key)!==null&&et!==void 0?et:x),qe=Me?.disabled,We=Me?.title}return{label:G,value:x,key:be,disabled:qe,title:We}})},[ge,w,E]),ne=Kt(te,{value:se}),z=Z(ne,2),ee=z[0],fe=z[1],_e=r.useMemo(function(){var y,N=me&&ee===null?[]:ee,P=_(N);return o==="combobox"&&Kr((y=P[0])===null||y===void 0?void 0:y.value)?[]:P},[ee,_,o,me]),Re=Mo(_e,E),De=Z(Re,2),ve=De[0],Ae=De[1],Xe=r.useMemo(function(){if(!o&&ve.length===1){var y=ve[0];if(y.value===null&&(y.label===null||y.label===void 0))return[]}return ve.map(function(N){var P;return W(W({},N),{},{label:(P=typeof Q=="function"?Q(N):N.label)!==null&&P!==void 0?P:N.value})})},[o,ve,Q]),pe=r.useMemo(function(){return new Set(ve.map(function(y){return y.value}))},[ve]);r.useEffect(function(){if(o==="combobox"){var y,N=(y=ve[0])===null||y===void 0?void 0:y.value;O(jr(N)?String(N):"")}},[ve]);var Ee=Cn(function(y,N){var P=N??y;return Y(Y({},ge.value,y),ge.label,P)}),he=r.useMemo(function(){if(o!=="tags")return I;var y=Ge(I),N=function(x){return E.has(x)};return Ge(ve).sort(function(P,x){return P.value<x.value?-1:1}).forEach(function(P){var x=P.value;N(x)||y.push(Ee(x,P.label))}),y},[Ee,I,E,ve,o]),we=Do(he,ge,Ce,Oe,$),Pe=r.useMemo(function(){return o!=="tags"||!Ce||we.some(function(y){return y[$||"value"]===Ce})||we.some(function(y){return y[ge.value]===Ce})?we:[Ee(Ce)].concat(Ge(we))},[Ee,$,o,we,Ce,ge]),rt=function y(N){var P=Ge(N).sort(function(x,G){return C(x,G,{searchValue:Ce})});return P.map(function(x){return Array.isArray(x.options)?W(W({},x),{},{options:x.options.length>0?y(x.options):x.options}):x})},Le=r.useMemo(function(){return C?rt(Pe):Pe},[Pe,C,Ce]),Ve=r.useMemo(function(){return to(Le,{fieldNames:ge,childrenAsData:ue})},[Le,ge,ue]),ye=function(N){var P=_(N);if(fe(P),B&&(P.length!==ve.length||P.some(function(be,qe){var We;return((We=ve[qe])===null||We===void 0?void 0:We.value)!==be?.value}))){var x=ie?P:P.map(function(be){return be.value}),G=P.map(function(be){return Xt(Ae(be.value))});B(me?x:x[0],me?G:G[0])}},bt=r.useState(null),ze=Z(bt,2),st=ze[0],Be=ze[1],St=r.useState(0),Ze=Z(St,2),ot=Ze[0],dt=Ze[1],mt=U!==void 0?U:o!=="combobox",Je=r.useCallback(function(y,N){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=P.source,G=x===void 0?"keyboard":x;dt(N),l&&o==="combobox"&&y!==null&&G==="keyboard"&&Be(String(y))},[l,o]),Fe=function(N,P,x){var G=function(){var tt,Qe=Ae(N);return[ie?{label:Qe?.[ge.label],value:N,key:(tt=Qe?.key)!==null&&tt!==void 0?tt:N}:N,Xt(Qe)]};if(P&&c){var be=G(),qe=Z(be,2),We=qe[0],ke=qe[1];c(We,ke)}else if(!P&&g&&x!=="clear"){var Me=G(),et=Z(Me,2),gt=et[0],xt=et[1];g(gt,xt)}},at=Cn(function(y,N){var P,x=me?N.selected:!0;x?P=me?[].concat(Ge(ve),[y]):[y]:P=ve.filter(function(G){return G.value!==y}),ye(P),Fe(y,x),o==="combobox"?Be(""):(!Gt||p)&&(O(""),Be(""))}),it=function(N,P){ye(N);var x=P.type,G=P.values;(x==="remove"||x==="clear")&&G.forEach(function(be){Fe(be.value,!1,x)})},Ie=function(N,P){if(O(N),Be(null),P.source==="submit"){var x=(N||"").trim();if(x){var G=Array.from(new Set([].concat(Ge(pe),[x])));ye(G),Fe(x,!0),O("")}return}P.source!=="blur"&&(o==="combobox"&&ye(N),m?.(N))},lt=function(N){var P=N;o!=="tags"&&(P=N.map(function(G){var be=F.get(G);return be?.value}).filter(function(G){return G!==void 0}));var x=Array.from(new Set([].concat(Ge(pe),Ge(P))));ye(x),x.forEach(function(G){Fe(G,!0)})},Ye=r.useMemo(function(){var y=le!==!1&&h!==!1;return W(W({},S),{},{flattenOptions:Ve,onActiveValue:Je,defaultActiveFirstOption:mt,onSelect:at,menuItemSelectedIcon:j,rawValues:pe,fieldNames:ge,virtual:y,direction:X,listHeight:oe,listItemHeight:ae,childrenAsData:ue,maxCount:D,optionRender:V})},[D,S,Ve,Je,mt,at,j,pe,ge,le,h,X,oe,ae,ue,V]);return r.createElement(Qt.Provider,{value:Ye},r.createElement(io,nt({},J,{id:k,prefixCls:i,ref:t,omitDomProps:Ao,mode:o,displayValues:Xe,onDisplayValuesChange:it,direction:X,searchValue:Ce,onSearch:Ie,autoClearSearchValue:p,onSearchSplit:lt,dropdownMatchSelectWidth:h,OptionList:Oo,emptyOptions:!Ve.length,activeValue:st,activeDescendantId:"".concat(k,"_list_").concat(ot)})))}),kt=Fo;kt.Option=Jt;kt.OptGroup=Zt;const Wo=e=>{const{componentName:t}=e,{getPrefixCls:n}=r.useContext(En),o=n("empty");switch(t){case"Table":case"List":return pt.createElement(Dt,{image:Dt.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return pt.createElement(Dt,{image:Dt.PRESENTED_IMAGE_SIMPLE,className:`${o}-small`});case"Table.filter":return null;default:return pt.createElement(Dt,null)}},jo=e=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},n),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},n),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},n),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},n),{points:["br","tr"],offset:[0,-4]})}};function Ko(e,t){return e||jo(t)}const wn=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:o,optionPadding:a}=e;return{position:"relative",display:"block",minHeight:t,padding:a,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:o,boxSizing:"border-box"}},Uo=e=>{const{antCls:t,componentCls:n}=e,o=`${n}-item`,a=`&${t}-slide-up-enter${t}-slide-up-enter-active`,i=`&${t}-slide-up-appear${t}-slide-up-appear-active`,l=`&${t}-slide-up-leave${t}-slide-up-leave-active`,u=`${n}-dropdown-placement-`,s=`${o}-option-selected`;return[{[`${n}-dropdown`]:Object.assign(Object.assign({},qt(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
          ${a}${u}bottomLeft,
          ${i}${u}bottomLeft
        `]:{animationName:gr},[`
          ${a}${u}topLeft,
          ${i}${u}topLeft,
          ${a}${u}topRight,
          ${i}${u}topRight
        `]:{animationName:mr},[`${l}${u}bottomLeft`]:{animationName:vr},[`
          ${l}${u}topLeft,
          ${l}${u}topRight
        `]:{animationName:fr},"&-hidden":{display:"none"},[o]:Object.assign(Object.assign({},wn(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},jt),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${o}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${o}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${o}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${o}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},wn(e)),{color:e.colorTextDisabled})}),[`${s}:has(+ ${s})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${s}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},ln(e,"slide-up"),ln(e,"slide-down"),un(e,"move-up"),un(e,"move-down")]},Xo=e=>{const{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:o,INTERNAL_FIXED_ITEM_MARGIN:a}=e,i=e.max(e.calc(n).sub(o).equal(),0),l=e.max(e.calc(i).sub(a).equal(),0);return{basePadding:i,containerPadding:l,itemHeight:xe(t),itemLineHeight:xe(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},Go=e=>{const{multipleSelectItemHeight:t,selectHeight:n,lineWidth:o}=e;return e.calc(n).sub(t).div(2).sub(o).equal()},Yo=e=>{const{componentCls:t,iconCls:n,borderRadiusSM:o,motionDurationSlow:a,paddingXS:i,multipleItemColorDisabled:l,multipleItemBorderColorDisabled:u,colorIcon:s,colorIconHover:d,INTERNAL_FIXED_ITEM_MARGIN:m}=e;return{[`${t}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"calc(100% - 4px)",display:"inline-flex"},[`${t}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:m,borderRadius:o,cursor:"default",transition:`font-size ${a}, line-height ${a}, height ${a}`,marginInlineEnd:e.calc(m).mul(2).equal(),paddingInlineStart:i,paddingInlineEnd:e.calc(i).div(2).equal(),[`${t}-disabled&`]:{color:l,borderColor:u,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(i).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},xn()),{display:"inline-flex",alignItems:"center",color:s,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:d}})}}}},qo=(e,t)=>{const{componentCls:n,INTERNAL_FIXED_ITEM_MARGIN:o}=e,a=`${n}-selection-overflow`,i=e.multipleSelectItemHeight,l=Go(e),u=t?`${n}-${t}`:"",s=Xo(e);return{[`${n}-multiple${u}`]:Object.assign(Object.assign({},Yo(e)),{[`${n}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:s.basePadding,paddingBlock:s.containerPadding,borderRadius:e.borderRadius,[`${n}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${xe(o)} 0`,lineHeight:xe(i),visibility:"hidden",content:'"\\a0"'}},[`${n}-selection-item`]:{height:s.itemHeight,lineHeight:xe(s.itemLineHeight)},[`${n}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:xe(i),marginBlock:o}},[`${n}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(s.basePadding).equal()},[`${a}-item + ${a}-item,
        ${n}-prefix + ${n}-selection-wrap
      `]:{[`${n}-selection-search`]:{marginInlineStart:0},[`${n}-selection-placeholder`]:{insetInlineStart:0}},[`${a}-item-suffix`]:{minHeight:s.itemHeight,marginBlock:o},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(l).equal(),"\n          &-input,\n          &-mirror\n        ":{height:i,fontFamily:e.fontFamily,lineHeight:xe(i),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(s.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function Ft(e,t){const{componentCls:n}=e,o=t?`${n}-${t}`:"",a={[`${n}-multiple${o}`]:{fontSize:e.fontSize,[`${n}-selector`]:{[`${n}-show-search&`]:{cursor:"text"}},[`
        &${n}-show-arrow ${n}-selector,
        &${n}-allow-clear ${n}-selector
      `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[qo(e,t),a]}const Qo=e=>{const{componentCls:t}=e,n=Pt(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),o=Pt(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[Ft(e),Ft(n,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},Ft(o,"lg")]};function Wt(e,t){const{componentCls:n,inputPaddingHorizontalBase:o,borderRadius:a}=e,i=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),l=t?`${n}-${t}`:"";return{[`${n}-single${l}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${n}-selector`]:Object.assign(Object.assign({},qt(e,!0)),{display:"flex",borderRadius:a,flex:"1 1 auto",[`${n}-selection-wrap:after`]:{lineHeight:xe(i)},[`${n}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
          ${n}-selection-item,
          ${n}-selection-placeholder
        `]:{display:"block",padding:0,lineHeight:xe(i),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${n}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${n}-selection-item:empty:after`,`${n}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
        &${n}-show-arrow ${n}-selection-item,
        &${n}-show-arrow ${n}-selection-search,
        &${n}-show-arrow ${n}-selection-placeholder
      `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${n}-open ${n}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${xe(o)}`,[`${n}-selection-search-input`]:{height:i,fontSize:e.fontSize},"&:after":{lineHeight:xe(i)}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${xe(o)}`,"&:after":{display:"none"}}}}}}}function Zo(e){const{componentCls:t}=e,n=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Wt(e),Wt(Pt(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${xe(n)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(n).add(e.calc(e.fontSize).mul(1.5)).equal()},[`
            &${t}-show-arrow ${t}-selection-item,
            &${t}-show-arrow ${t}-selection-placeholder
          `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},Wt(Pt(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const Jo=e=>{const{fontSize:t,lineHeight:n,lineWidth:o,controlHeight:a,controlHeightSM:i,controlHeightLG:l,paddingXXS:u,controlPaddingHorizontal:s,zIndexPopupBase:d,colorText:m,fontWeightStrong:f,controlItemBgActive:p,controlItemBgHover:c,colorBgContainer:g,colorFillSecondary:v,colorBgContainerDisabled:h,colorTextDisabled:b,colorPrimaryHover:C,colorPrimary:$,controlOutline:w}=e,A=u*2,V=o*2,T=Math.min(a-A,a-V),U=Math.min(i-A,i-V),j=Math.min(l-A,l-V);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(u/2),zIndexPopup:d+50,optionSelectedColor:m,optionSelectedFontWeight:f,optionSelectedBg:p,optionActiveBg:c,optionPadding:`${(a-t*n)/2}px ${s}px`,optionFontSize:t,optionLineHeight:n,optionHeight:a,selectorBg:g,clearBg:g,singleItemHeightLG:l,multipleItemBg:v,multipleItemBorderColor:"transparent",multipleItemHeight:T,multipleItemHeightSM:U,multipleItemHeightLG:j,multipleSelectorBgDisabled:h,multipleItemColorDisabled:b,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:C,activeBorderColor:$,activeOutlineColor:w,selectAffixPadding:u}},An=(e,t)=>{const{componentCls:n,antCls:o,controlOutlineWidth:a}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{border:`${xe(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${n}-disabled):not(${n}-customize-input):not(${o}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:t.hoverBorderHover},[`${n}-focused& ${n}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${xe(a)} ${t.activeOutlineColor}`,outline:0},[`${n}-prefix`]:{color:t.color}}}},In=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},An(e,t))}),ko=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},An(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),In(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),In(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${xe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),Vn=(e,t)=>{const{componentCls:n,antCls:o}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{background:t.bg,border:`${xe(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${n}-disabled):not(${n}-customize-input):not(${o}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{background:t.hoverBg},[`${n}-focused& ${n}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},yn=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},Vn(e,t))}),ea=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},Vn(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),yn(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),yn(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${xe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),ta=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${xe(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${xe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),Fn=(e,t)=>{const{componentCls:n,antCls:o}=e;return{[`&:not(${n}-customize-input) ${n}-selector`]:{borderWidth:`${xe(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,background:e.selectorBg,borderRadius:0},[`&:not(${n}-disabled):not(${n}-customize-input):not(${o}-pagination-size-changer)`]:{[`&:hover ${n}-selector`]:{borderColor:`transparent transparent ${t.hoverBorderHover} transparent`},[`${n}-focused& ${n}-selector`]:{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0},[`${n}-prefix`]:{color:t.color}}}},Rn=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},Fn(e,t))}),na=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},Fn(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),Rn(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),Rn(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${xe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),ra=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},ko(e)),ea(e)),ta(e)),na(e))}),oa=e=>{const{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},aa=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},ia=e=>{const{antCls:t,componentCls:n,inputPaddingHorizontalBase:o,iconCls:a}=e,i={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[n]:Object.assign(Object.assign({},qt(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${n}-customize-input) ${n}-selector`]:Object.assign(Object.assign({},oa(e)),aa(e)),[`${n}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},jt),{[`> ${t}-typography`]:{display:"inline"}}),[`${n}-selection-placeholder`]:Object.assign(Object.assign({},jt),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${n}-arrow`]:Object.assign(Object.assign({},xn()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:o,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[a]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${n}-suffix)`]:{pointerEvents:"auto"}},[`${n}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${n}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:o,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":i,"&:hover":i}),[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(o).add(e.fontSize).add(e.paddingXS).equal()}}}}}},la=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},ia(e),Zo(e),Qo(e),Uo(e),{[`${t}-rtl`]:{direction:"rtl"}},pr(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},ua=nr("Select",(e,{rootPrefixCls:t})=>{const n=Pt(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[la(n),ra(n)]},Jo,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});function ca({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:o,loading:a,multiple:i,hasFeedback:l,prefixCls:u,showSuffixIcon:s,feedbackIcon:d,showArrow:m,componentName:f}){const p=t??r.createElement(rr,null),c=b=>e===null&&!l&&!m?null:r.createElement(r.Fragment,null,s!==!1&&b,l&&d);let g=null;if(e!==void 0)g=c(e);else if(a)g=c(r.createElement(br,{spin:!0}));else{const b=`${u}-suffix`;g=({open:C,showSearch:$})=>c(C&&$?r.createElement(Tr,{className:b}):r.createElement(Sr,{className:b}))}let v=null;n!==void 0?v=n:i?v=r.createElement(hr,null):v=null;let h=null;return o!==void 0?h=o:h=r.createElement(or,null),{clearIcon:p,suffixIcon:g,itemIcon:v,removeIcon:h}}function sa(e){return pt.useMemo(()=>{if(e)return(...t)=>pt.createElement(Cr,{space:!0},e.apply(void 0,t))},[e])}function da(e,t){return t!==void 0?t:e!==null}var fa=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(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]]);return n};const Wn="SECRET_COMBOBOX_MODE_DO_NOT_USE",va=(e,t)=>{var n,o,a,i,l;const{prefixCls:u,bordered:s,className:d,rootClassName:m,getPopupContainer:f,popupClassName:p,dropdownClassName:c,listHeight:g=256,placement:v,listItemHeight:h,size:b,disabled:C,notFoundContent:$,status:w,builtinPlacements:A,dropdownMatchSelectWidth:V,popupMatchSelectWidth:T,direction:U,style:j,allowClear:le,variant:X,dropdownStyle:q,transitionName:oe,tagRender:ce,maxCount:ae,prefix:Q,dropdownRender:se,popupRender:te,onDropdownVisibleChange:ie,onOpenChange:B,styles:D,classNames:J}=e,k=fa(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:me,getPrefixCls:ue,renderEmpty:Oe,direction:ge,virtual:$e,popupMatchSelectWidth:Se,popupOverflow:Ce}=r.useContext(En),{showSearch:O,style:S,styles:E,className:F,classNames:I}=ar("select"),[,_]=ir(),ne=h??_?.controlHeight,z=ue("select",u),ee=ue(),fe=U??ge,{compactSize:_e,compactItemClassnames:Re}=wr(z,fe),[De,ve]=Mr("select",X,s),Ae=Ir(z),[Xe,pe,Ee]=ua(z,Ae),he=r.useMemo(()=>{const{mode:x}=e;if(x!=="combobox")return x===Wn?"combobox":x},[e.mode]),we=he==="multiple"||he==="tags",Pe=da(e.suffixIcon,e.showArrow),rt=(n=T??V)!==null&&n!==void 0?n:Se,Le=((o=D?.popup)===null||o===void 0?void 0:o.root)||((a=E.popup)===null||a===void 0?void 0:a.root)||q,Ve=sa(te||se),ye=B||ie,{status:bt,hasFeedback:ze,isFormItemInput:st,feedbackIcon:Be}=r.useContext(yr),St=Pr(bt,w);let Ze;$!==void 0?Ze=$:he==="combobox"?Ze=null:Ze=Oe?.("Select")||r.createElement(Wo,{componentName:"Select"});const{suffixIcon:ot,itemIcon:dt,removeIcon:mt,clearIcon:Je}=ca(Object.assign(Object.assign({},k),{multiple:we,hasFeedback:ze,feedbackIcon:Be,showSuffixIcon:Pe,prefixCls:z,componentName:"Select"})),Fe=le===!0?{clearIcon:Je}:le,at=On(k,["suffixIcon","itemIcon"]),it=Ue(((i=J?.popup)===null||i===void 0?void 0:i.root)||((l=I?.popup)===null||l===void 0?void 0:l.root)||p||c,{[`${z}-dropdown-${fe}`]:fe==="rtl"},m,I.root,J?.root,Ee,Ae,pe),Ie=Rr(x=>{var G;return(G=b??_e)!==null&&G!==void 0?G:x}),lt=r.useContext(Er),Ye=C??lt,y=Ue({[`${z}-lg`]:Ie==="large",[`${z}-sm`]:Ie==="small",[`${z}-rtl`]:fe==="rtl",[`${z}-${De}`]:ve,[`${z}-in-form-item`]:st},Dr(z,St,ze),Re,F,d,I.root,J?.root,m,Ee,Ae,pe),N=r.useMemo(()=>v!==void 0?v:fe==="rtl"?"bottomRight":"bottomLeft",[v,fe]),[P]=xr("SelectLike",Le?.zIndex);return Xe(r.createElement(kt,Object.assign({ref:t,virtual:$e,showSearch:O},at,{style:Object.assign(Object.assign(Object.assign(Object.assign({},E.root),D?.root),S),j),dropdownMatchSelectWidth:rt,transitionName:$r(ee,"slide-up",oe),builtinPlacements:Ko(A,Ce),listHeight:g,listItemHeight:ne,mode:he,prefixCls:z,placement:N,direction:fe,prefix:Q,suffixIcon:ot,menuItemSelectedIcon:dt,removeIcon:mt,allowClear:Fe,notFoundContent:Ze,className:y,getPopupContainer:f||me,dropdownClassName:it,disabled:Ye,dropdownStyle:Object.assign(Object.assign({},Le),{zIndex:P}),maxCount:we?ae:void 0,tagRender:we?ce:void 0,dropdownRender:Ve,onDropdownVisibleChange:ye})))},Tt=r.forwardRef(va),ma=Or(Tt,"dropdownAlign");Tt.SECRET_COMBOBOX_MODE_DO_NOT_USE=Wn;Tt.Option=Jt;Tt.OptGroup=Zt;Tt._InternalPanelDoNotUseOrYouWillBeFired=ma;export{io as B,Wo as D,zn as L,Tt as S,Xo as a,_r as b,No as c,ua as d,sa as e,da as f,Yo as g,Ko as m,ca as u};
