1import{a5 as R,m as L,aG as ce,aP as De,ax as qe,d as ge,R as Se,bZ as ue,bJ as le,r as Te,H as q,x as Je,l as Ae,V as $e,au as ve,c as T,a8 as Z,bD as xe,aL as pe,bW as Qe,aT as ye,as as J,aj as et,aC as tt,aF as Oe,aS as ke,F as nt,bi as ot,aY as te,aq as Be,a9 as re,aZ as Ee,aX as _e,aM as Fe,aJ as me,aH as lt,aI as at,ar as st,b1 as it,aE as rt,b4 as ut,b5 as ct,da as dt}from"./CbxQnmvl.js";import{d as Ie,u as ft,T as vt,i as Ce,a as ht,e as mt,f as pt,h as gt,t as bt,B as St,b as yt,c as Ot,g as wt}from"./DS0X2xDO.js";import{R as Mt}from"./DmPP3jaF.js";import{u as It}from"./C7WWVgeC.js";import{u as Ct,F as Tt}from"./BnQrO_U7.js";import{g as xt,a as Vt}from"./D7DKV15d.js";const we=(e,a)=>{let{height:r,offset:n,prefixCls:t,onInnerResize:o}=e,{slots:c}=a;var s;let d={},i={display:"flex",flexDirection:"column"};return n!==void 0&&(d={height:`${r}px`,position:"relative",overflow:"hidden"},i=R(R({},i),{transform:`translateY(${n}px)`,position:"absolute",left:0,right:0,top:0})),L("div",{style:d},[L(Mt,{onResize:v=>{let{offsetHeight:m}=v;m&&o&&o()}},{default:()=>[L("div",{style:i,class:ce({[`${t}-holder-inner`]:t})},[(s=c.default)===null||s===void 0?void 0:s.call(c)])]})])};we.displayName="Filter";we.inheritAttrs=!1;we.props={prefixCls:String,height:Number,offset:Number,onInnerResize:Function};const je=(e,a)=>{let{setRef:r}=e,{slots:n}=a;var t;const o=De((t=n.default)===null||t===void 0?void 0:t.call(n));return o&&o.length?qe(o[0],{ref:r}):o};je.props={setRef:{type:Function,default:()=>{}}};const Ht=20;function Pe(e){return"touches"in e?e.touches[0].pageY:e.pageY}const Rt=ge({compatConfig:{MODE:3},name:"ScrollBar",inheritAttrs:!1,props:{prefixCls:String,scrollTop:Number,scrollHeight:Number,height:Number,count:Number,onScroll:{type:Function},onStartMove:{type:Function},onStopMove:{type:Function}},setup(){return{moveRaf:null,scrollbarRef:Ie(),thumbRef:Ie(),visibleTimeout:null,state:Se({dragging:!1,pageY:null,startTop:null,visible:!1})}},watch:{scrollTop:{handler(){this.delayHidden()},flush:"post"}},mounted(){var e,a;(e=this.scrollbarRef.current)===null||e===void 0||e.addEventListener("touchstart",this.onScrollbarTouchStart,ue?{passive:!1}:!1),(a=this.thumbRef.current)===null||a===void 0||a.addEventListener("touchstart",this.onMouseDown,ue?{passive:!1}:!1)},beforeUnmount(){this.removeEvents(),clearTimeout(this.visibleTimeout)},methods:{delayHidden(){clearTimeout(this.visibleTimeout),this.state.visible=!0,this.visibleTimeout=setTimeout(()=>{this.state.visible=!1},2e3)},onScrollbarTouchStart(e){e.preventDefault()},onContainerMouseDown(e){e.stopPropagation(),e.preventDefault()},patchEvents(){window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),this.thumbRef.current.addEventListener("touchmove",this.onMouseMove,ue?{passive:!1}:!1),this.thumbRef.current.addEventListener("touchend",this.onMouseUp)},removeEvents(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),this.scrollbarRef.current.removeEventListener("touchstart",this.onScrollbarTouchStart,ue?{passive:!1}:!1),this.thumbRef.current&&(this.thumbRef.current.removeEventListener("touchstart",this.onMouseDown,ue?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchmove",this.onMouseMove,ue?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchend",this.onMouseUp)),le.cancel(this.moveRaf)},onMouseDown(e){const{onStartMove:a}=this.$props;R(this.state,{dragging:!0,pageY:Pe(e),startTop:this.getTop()}),a(),this.patchEvents(),e.stopPropagation(),e.preventDefault()},onMouseMove(e){const{dragging:a,pageY:r,startTop:n}=this.state,{onScroll:t}=this.$props;if(le.cancel(this.moveRaf),a){const o=Pe(e)-r,c=n+o,s=this.getEnableScrollRange(),d=this.getEnableHeightRange(),i=d?c/d:0,v=Math.ceil(i*s);this.moveRaf=le(()=>{t(v)})}},onMouseUp(){const{onStopMove:e}=this.$props;this.state.dragging=!1,e(),this.removeEvents()},getSpinHeight(){const{height:e,scrollHeight:a}=this.$props;let r=e/a*100;return r=Math.max(r,Ht),r=Math.min(r,e/2),Math.floor(r)},getEnableScrollRange(){const{scrollHeight:e,height:a}=this.$props;return e-a||0},getEnableHeightRange(){const{height:e}=this.$props,a=this.getSpinHeight();return e-a||0},getTop(){const{scrollTop:e}=this.$props,a=this.getEnableScrollRange(),r=this.getEnableHeightRange();return e===0||a===0?0:e/a*r},showScroll(){const{height:e,scrollHeight:a}=this.$props;return a>e}},render(){const{dragging:e,visible:a}=this.state,{prefixCls:r}=this.$props,n=this.getSpinHeight()+"px",t=this.getTop()+"px",o=this.showScroll(),c=o&&a;return L("div",{ref:this.scrollbarRef,class:ce(`${r}-scrollbar`,{[`${r}-scrollbar-show`]:o}),style:{width:"8px",top:0,bottom:0,right:0,position:"absolute",display:c?void 0:"none"},onMousedown:this.onContainerMouseDown,onMousemove:this.delayHidden},[L("div",{ref:this.thumbRef,class:ce(`${r}-scrollbar-thumb`,{[`${r}-scrollbar-thumb-moving`]:e}),style:{width:"100%",height:n,top:t,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:"99px",cursor:"pointer",userSelect:"none"},onMousedown:this.onMouseDown},null)])}});function Et(e,a,r,n){const t=new Map,o=new Map,c=Te(Symbol("update"));q(e,()=>{c.value=Symbol("update")});let s;function d(){le.cancel(s)}function i(){d(),s=le(()=>{t.forEach((m,g)=>{if(m&&m.offsetParent){const{offsetHeight:I}=m;o.get(g)!==I&&(c.value=Symbol("update"),o.set(g,m.offsetHeight))}})})}function v(m,g){const I=a(m);t.get(I),g?(t.set(I,g.$el||g),i()):t.delete(I)}return Je(()=>{d()}),[v,i,o,c]}function _t(e,a,r,n,t,o,c,s){let d;return i=>{if(i==null){s();return}le.cancel(d);const v=a.value,m=n.itemHeight;if(typeof i=="number")c(i);else if(i&&typeof i=="object"){let g;const{align:I}=i;"index"in i?{index:g}=i:g=v.findIndex(H=>t(H)===i.key);const{offset:w=0}=i,x=(H,P)=>{if(H<0||!e.value)return;const Y=e.value.clientHeight;let D=!1,_=P;if(Y){const f=P||I;let C=0,V=0,S=0;const F=Math.min(v.length,g);for(let z=0;z<=F;z+=1){const W=t(v[z]);V=C;const $=r.get(W);S=V+($===void 0?m:$),C=S,z===g&&$===void 0&&(D=!0)}const k=e.value.scrollTop;let N=null;switch(f){case"top":N=V-w;break;case"bottom":N=S-Y+w;break;default:{const z=k+Y;V<k?_="top":S>z&&(_="bottom")}}N!==null&&N!==k&&c(N)}d=le(()=>{D&&o(),x(H-1,_)},2)};x(5)}}}const Ft=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),ze=(e,a)=>{let r=!1,n=null;function t(){clearTimeout(n),r=!0,n=setTimeout(()=>{r=!1},50)}return function(o){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const s=o<0&&e.value||o>0&&a.value;return c&&s?(clearTimeout(n),r=!1):(!s||r)&&t(),!r&&s}};function Pt(e,a,r,n){let t=0,o=null,c=null,s=!1;const d=ze(a,r);function i(m){if(!e.value)return;le.cancel(o);const{deltaY:g}=m;t+=g,c=g,!d(g)&&(Ft||m.preventDefault(),o=le(()=>{n(t*(s?10:1)),t=0}))}function v(m){e.value&&(s=m.detail===c)}return[i,v]}const Nt=14/15;function Lt(e,a,r){let n=!1,t=0,o=null,c=null;const s=()=>{o&&(o.removeEventListener("touchmove",d),o.removeEventListener("touchend",i))},d=g=>{if(n){const I=Math.ceil(g.touches[0].pageY);let w=t-I;t=I,r(w)&&g.preventDefault(),clearInterval(c),c=setInterval(()=>{w*=Nt,(!r(w,!0)||Math.abs(w)<=.1)&&clearInterval(c)},16)}},i=()=>{n=!1,s()},v=g=>{s(),g.touches.length===1&&!n&&(n=!0,t=Math.ceil(g.touches[0].pageY),o=g.target,o.addEventListener("touchmove",d,{passive:!1}),o.addEventListener("touchend",i))},m=()=>{};Ae(()=>{document.addEventListener("touchmove",m,{passive:!1}),q(e,g=>{a.value.removeEventListener("touchstart",v),s(),clearInterval(c),g&&a.value.addEventListener("touchstart",v,{passive:!1})},{immediate:!0})}),$e(()=>{document.removeEventListener("touchmove",m)})}var Dt=function(e,a){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,n=Object.getOwnPropertySymbols(e);t<n.length;t++)a.indexOf(n[t])<0&&Object.prototype.propertyIsEnumerable.call(e,n[t])&&(r[n[t]]=e[n[t]]);return r};const At=[],$t={overflowY:"auto",overflowAnchor:"none"};function kt(e,a,r,n,t,o){let{getKey:c}=o;return e.slice(a,r+1).map((s,d)=>{const i=a+d,v=t(s,i,{}),m=c(s);return L(je,{key:m,setRef:g=>n(s,g)},{default:()=>[v]})})}const Bt=ge({compatConfig:{MODE:3},name:"List",inheritAttrs:!1,props:{prefixCls:String,data:ve.array,height:Number,itemHeight:Number,fullHeight:{type:Boolean,default:void 0},itemKey:{type:[String,Number,Function],required:!0},component:{type:[String,Object]},virtual:{type:Boolean,default:void 0},children:Function,onScroll:Function,onMousedown:Function,onMouseenter:Function,onVisibleChange:Function},setup(e,a){let{expose:r}=a;const n=T(()=>{const{height:u,itemHeight:M,virtual:E}=e;return!!(E!==!1&&u&&M)}),t=T(()=>{const{height:u,itemHeight:M,data:E}=e;return n.value&&E&&M*E.length>u}),o=Se({scrollTop:0,scrollMoving:!1}),c=T(()=>e.data||At),s=Z([]);q(c,()=>{s.value=xe(c.value).slice()},{immediate:!0});const d=Z(u=>{});q(()=>e.itemKey,u=>{typeof u=="function"?d.value=u:d.value=M=>M==null?void 0:M[u]},{immediate:!0});const i=Z(),v=Z(),m=Z(),g=u=>d.value(u),I={getKey:g};function w(u){let M;typeof u=="function"?M=u(o.scrollTop):M=u;const E=C(M);i.value&&(i.value.scrollTop=E),o.scrollTop=E}const[x,H,P,Y]=Et(s,g),D=Se({scrollHeight:void 0,start:0,end:0,offset:void 0}),_=Z(0);Ae(()=>{pe(()=>{var u;_.value=((u=v.value)===null||u===void 0?void 0:u.offsetHeight)||0})}),Qe(()=>{pe(()=>{var u;_.value=((u=v.value)===null||u===void 0?void 0:u.offsetHeight)||0})}),q([n,s],()=>{n.value||R(D,{scrollHeight:void 0,start:0,end:s.value.length-1,offset:void 0})},{immediate:!0}),q([n,s,_,t],()=>{n.value&&!t.value&&R(D,{scrollHeight:_.value,start:0,end:s.value.length-1,offset:void 0}),i.value&&(o.scrollTop=i.value.scrollTop)},{immediate:!0}),q([t,n,()=>o.scrollTop,s,Y,()=>e.height,_],()=>{if(!n.value||!t.value)return;let u=0,M,E,O;const B=s.value.length,K=s.value,G=o.scrollTop,{itemHeight:Q,height:ee}=e,de=G+ee;for(let l=0;l<B;l+=1){const h=K[l],b=g(h);let y=P.get(b);y===void 0&&(y=Q);const p=u+y;M===void 0&&p>=G&&(M=l,E=u),O===void 0&&p>de&&(O=l),u=p}M===void 0&&(M=0,E=0,O=Math.ceil(ee/Q)),O===void 0&&(O=B-1),O=Math.min(O+1,B),R(D,{scrollHeight:u,start:M,end:O,offset:E})},{immediate:!0});const f=T(()=>D.scrollHeight-e.height);function C(u){let M=u;return Number.isNaN(f.value)||(M=Math.min(M,f.value)),M=Math.max(M,0),M}const V=T(()=>o.scrollTop<=0),S=T(()=>o.scrollTop>=f.value),F=ze(V,S);function k(u){w(u)}function N(u){var M;const{scrollTop:E}=u.currentTarget;E!==o.scrollTop&&w(E),(M=e.onScroll)===null||M===void 0||M.call(e,u)}const[z,W]=Pt(n,V,S,u=>
1{w(M=>M+u)});Lt(n,i,(u,M)=>F(u,M)?!1:(z({preventDefault(){},deltaY:u}),!0));function $(u){n.value&&u.preventDefault()}const ae=()=>{i.value&&(i.value.removeEventListener("wheel",z,ue?{passive:!1}:!1),i.value.removeEventListener("DOMMouseScroll",W),i.value.removeEventListener("MozMousePixelScroll",$))};ye(()=>{pe(()=>{i.value&&(ae(),i.value.addEventListener("wheel",z,ue?{passive:!1}:!1),i.value.addEventListener("DOMMouseScroll",W),i.value.addEventListener("MozMousePixelScroll",$))})}),$e(()=>{ae()});const U=_t(i,s,P,e,g,H,w,()=>{var u;(u=m.value)===null||u===void 0||u.delayHidden()});r({scrollTo:U});const ne=T(()=>{let u=null;return e.height&&(u=R({[e.fullHeight?"height":"maxHeight"]:e.height+"px"},$t),n.value&&(u.overflowY="hidden",o.scrollMoving&&(u.pointerEvents="none"))),u});return q([()=>D.start,()=>D.end,s],()=>{if(e.onVisibleChange){const u=s.value.slice(D.start,D.end+1);e.onVisibleChange(u,s.value)}},{flush:"post"}),{state:o,mergedData:s,componentStyle:ne,onFallbackScroll:N,onScrollBar:k,componentRef:i,useVirtual:n,calRes:D,collectHeight:H,setInstance:x,sharedConfig:I,scrollBarRef:m,fillerInnerRef:v,delayHideScrollBar:()=>{var u;(u=m.value)===null||u===void 0||u.delayHidden()}}},render(){const e=R(R({},this.$props),this.$attrs),{prefixCls:a="rc-virtual-list",height:r,itemHeight:n,fullHeight:t,data:o,itemKey:c,virtual:s,component:d="div",onScroll:i,children:v=this.$slots.default,style:m,class:g}=e,I=Dt(e,["prefixCls","height","itemHeight","fullHeight","data","itemKey","virtual","component","onScroll","children","style","class"]),w=ce(a,g),{scrollTop:x}=this.state,{scrollHeight:H,offset:P,start:Y,end:D}=this.calRes,{componentStyle:_,onFallbackScroll:f,onScrollBar:C,useVirtual:V,collectHeight:S,sharedConfig:F,setInstance:k,mergedData:N,delayHideScrollBar:z}=this;return L("div",J({style:R(R({},m),{position:"relative"}),class:w},I),[L(d,{class:`${a}-holder`,style:_,ref:"componentRef",onScroll:f,onMouseenter:z},{default:()=>[L(we,{prefixCls:a,height:H,offset:P,onInnerResize:S,ref:"fillerInnerRef"},{default:()=>kt(N,Y,D,k,v,F)})]}),V&&L(Rt,{ref:"scrollBarRef",prefixCls:a,scrollTop:x,height:r,scrollHeight:H,count:N.length,onScroll:C,onStartMove:()=>{this.state.scrollMoving=!0},onStopMove:()=>{this.state.scrollMoving=!1}},null)])}});function jt(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}const Ke=Symbol("SelectContextKey");function zt(e){return et(Ke,e)}function Kt(){return tt(Ke,{})}var Ut=function(e,a){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,n=Object.getOwnPropertySymbols(e);t<n.length;t++)a.indexOf(n[t])<0&&Object.prototype.propertyIsEnumerable.call(e,n[t])&&(r[n[t]]=e[n[t]]);return r};function Ne(e){return typeof e=="string"||typeof e=="number"}const Yt=ge({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(e,a){let{expose:r,slots:n}=a;const t=ft(),o=Kt(),c=T(()=>`${t.prefixCls}-item`),s=It(()=>o.flattenOptions,[()=>t.open,()=>o.flattenOptions],f=>f[0]),d=Ie(),i=f=>{f.preventDefault()},v=f=>{d.current&&d.current.scrollTo(typeof f=="number"?{index:f}:f)},m=function(f){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const V=s.value.length;for(let S=0;S<V;S+=1){const F=(f+S*C+V)%V,{group:k,data:N}=s.value[F];if(!k&&!N.disabled)return F}return-1},g=Se({activeIndex:m(0)}),I=function(f){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;g.activeIndex=f;const V={source:C?"keyboard":"mouse"},S=s.value[f];if(!S){o.onActiveValue(null,-1,V);return}o.onActiveValue(S.value,f,V)};q([()=>s.value.length,()=>t.searchValue],()=>{I(o.defaultActiveFirstOption!==!1?m(0):-1)},{immediate:!0});const w=f=>o.rawValues.has(f)&&t.mode!=="combobox";q([()=>t.open,()=>t.searchValue],()=>{if(!t.multiple&&t.open&&o.rawValues.size===1){const f=Array.from(o.rawValues)[0],C=xe(s.value).findIndex(V=>{let{data:S}=V;return S[o.fieldNames.value]===f});C!==-1&&(I(C),pe(()=>{v(C)}))}t.open&&pe(()=>{var f;(f=d.current)===null||f===void 0||f.scrollTo(void 0)})},{immediate:!0,flush:"post"});const x=f=>{f!==void 0&&o.onSelect(f,{selected:!o.rawValues.has(f)}),t.multiple||t.toggleOpen(!1)},H=f=>typeof f.label=="function"?f.label():f.label;function P(f){const C=s.value[f];if(!C)return null;const V=C.data||{},{value:S}=V,{group:F}=C,k=ot(V,!0),N=H(C);return C?L("div",J(J({"aria-label":typeof N=="string"&&!F?N:null},k),{},{key:f,role:F?"presentation":"option",id:`${t.id}_list_${f}`,"aria-selected":w(S)}),[S]):null}return r({onKeydown:f=>{const{which:C,ctrlKey:V}=f;switch(C){case te.N:case te.P:case te.UP:case te.DOWN:{let S=0;if(C===te.UP?S=-1:C===te.DOWN?S=1:jt()&&V&&(C===te.N?S=1:C===te.P&&(S=-1)),S!==0){const F=m(g.activeIndex+S,S);v(F),I(F,!0)}break}case te.ENTER:{const S=s.value[g.activeIndex];S&&!S.data.disabled?x(S.value):x(void 0),t.open&&f.preventDefault();break}case te.ESC:t.toggleOpen(!1),t.open&&f.stopPropagation()}},onKeyup:()=>{},scrollTo:f=>{v(f)}}),()=>{const{id:f,notFoundContent:C,onPopupScroll:V}=t,{menuItemSelectedIcon:S,fieldNames:F,virtual:k,listHeight:N,listItemHeight:z}=o,W=n.option,{activeIndex:$}=g,ae=Object.keys(F).map(U=>F[U]);return s.value.length===0?L("div",{role:"listbox",id:`${f}_list`,class:`${c.value}-empty`,onMousedown:i}
1,[C]):L(nt,null,[L("div",{role:"listbox",id:`${f}_list`,style:{height:0,width:0,overflow:"hidden"}},[P($-1),P($),P($+1)]),L(Bt,{itemKey:"key",ref:d,data:s.value,height:N,itemHeight:z,fullHeight:!1,onMousedown:i,onScroll:V,virtual:k},{default:(U,ne)=>{var se;const{group:u,groupOption:M,data:E,value:O}=U,{key:B}=E,K=typeof U.label=="function"?U.label():U.label;if(u){const fe=(se=E.title)!==null&&se!==void 0?se:Ne(K)&&K;return L("div",{class:ce(c.value,`${c.value}-group`),title:fe},[W?W(E):K!==void 0?K:B])}const{disabled:G,title:Q,children:ee,style:de,class:l,className:h}=E,b=Ut(E,["disabled","title","children","style","class","className"]),y=Oe(b,ae),p=w(O),j=`${c.value}-option`,ie=ce(c.value,j,l,h,{[`${j}-grouped`]:M,[`${j}-active`]:$===ne&&!G,[`${j}-disabled`]:G,[`${j}-selected`]:p}),X=H(U),he=!S||typeof S=="function"||p,A=typeof X=="number"?X:X||O;let be=Ne(A)?A.toString():void 0;return Q!==void 0&&(be=Q),L("div",J(J({},y),{},{"aria-selected":p,class:ie,title:be,onMousemove:fe=>{b.onMousemove&&b.onMousemove(fe),!($===ne||G)&&I(ne)},onClick:fe=>{G||x(O),b.onClick&&b.onClick(fe)},style:de}),[L("div",{class:`${j}-content`},[W?W(E):A]),ke(S)||p,he&&L(vt,{class:`${c.value}-option-state`,customizeIcon:S,customizeIconProps:{isSelected:p}},{default:()=>[p?"â":null]})])}})])}}});var Wt=function(e,a){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&a.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,n=Object.getOwnPropertySymbols(e);t<n.length;t++)a.indexOf(n[t])<0&&Object.prototype.propertyIsEnumerable.call(e,n[t])&&(r[n[t]]=e[n[t]]);return r};function Gt(e){const a=e,{key:r,children:n}=a,t=a.props,{value:o,disabled:c}=t,s=Wt(t,["value","disabled"]),d=n==null?void 0:n.default;return R({key:r,value:o!==void 0?o:r,children:d,disabled:c||c===""},s)}function Ue(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return De(e).map((n,t)=>{var o;if(!ke(n)||!n.type)return null;const{type:{isSelectOptGroup:c},key:s,children:d,props:i}=n;if(a||!c)return Gt(n);const v=d&&d.default?d.default():void 0,m=(i==null?void 0:i.label)||((o=d.label)===null||o===void 0?void 0:o.call(d))||s;return R(R({key:`__RC_SELECT_GRP__${s===null?t:String(s)}__`},i),{label:m,options:Ue(v||[])})}).filter(n=>n)}function Xt(e,a,r){const n=Z(),t=Z(),o=Z(),c=Z([]);return q([e,a],()=>{e.value?c.value=xe(e.value).slice():c.value=Ue(a.value)},{immediate:!0,deep:!0}),ye(()=>{const s=c.value,d=new Map,i=new Map,v=r.value;function m(g){let I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(let w=0;w<g.length;w+=1){const x=g[w];!x[v.options]||I?(d.set(x[v.value],x),i.set(x[v.label],x)):m(x[v.options],!0)}}m(s),n.value=s,t.value=d,o.value=i}),{options:n,valueOptions:t,labelOptions:o}}function Ye(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Me(e,a){return Ye(e).join("").toUpperCase().includes(a)}const Zt=(e,a,r,n,t)=>T(()=>{const o=r.value,c=t==null?void 0:t.value,s=n==null?void 0:n.value;if(!o||s===!1)return e.value;const{options:d,label:i,value:v}=a.value,m=[],g=typeof s=="function",I=o.toUpperCase(),w=g?s:(H,P)=>c?Me(P[c],I):P[d]?Me(P[i!=="children"?i:"label"],I):Me(P[v],I),x=g?H=>Ce(H):H=>H;return e.value.forEach(H=>{if(H[d]){if(w(o,x(H)))m.push(H);else{const Y=H[d].filter(D=>w(o,x(D)));Y.length&&m.push(R(R({},H),{[d]:Y}))}return}w(o,x(H))&&m.push(H)}),m}),qt=(e,a)=>{const r=Z({values:new Map,options:new Map});return[T(()=>{const{values:o,options:c}=r.value,s=e.value.map(v=>{var m;return v.label===void 0?R(R({},v),{label:(m=o.get(v.value))===null||m===void 0?void 0:m.label}):v}),d=new Map,i=new Map;return s.forEach(v=>{d.set(v.value,v),i.set(v.value,a.value.get(v.value)||c.get(v.value))}),r.value.values=d,r.value.options=i,s}),o=>a.value.get(o)||r.value.options.get(o)]},Jt=["inputValue"];function We(){return R(R({},yt()),{prefixCls:String,id:String,backfill:{type:Boolean,default:void 0},fieldNames:Object,inputValue:String,searchValue:String,onSearch:Function,autoClearSearchValue:{type:Boolean,default:void 0},onSelect:Function,onDeselect:Function,filterOption:{type:[Boolean,Function],default:void 0}
1,filterSort:Function,optionFilterProp:String,optionLabelProp:String,options:Array,defaultActiveFirstOption:{type:Boolean,default:void 0},virtual:{type:Boolean,default:void 0},listHeight:Number,listItemHeight:Number,menuItemSelectedIcon:ve.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:ve.any,defaultValue:ve.any,onChange:Function,children:Array})}function Qt(e){return!e||typeof e!="object"}const en=ge({compatConfig:{MODE:3},name:"VcSelect",inheritAttrs:!1,props:Be(We(),{prefixCls:"vc-select",autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup(e,a){let{expose:r,attrs:n,slots:t}=a;const o=ht(re(e,"id")),c=T(()=>mt(e.mode)),s=T(()=>!!(!e.options&&e.children)),d=T(()=>e.filterOption===void 0&&e.mode==="combobox"?!1:e.filterOption),i=T(()=>pt(e.fieldNames,s.value)),[v,m]=Ee("",{value:T(()=>e.searchValue!==void 0?e.searchValue:e.inputValue),postState:l=>l||""}),g=Xt(re(e,"options"),re(e,"children"),i),{valueOptions:I,labelOptions:w,options:x}=g,H=l=>Ye(l).map(b=>{var y,p;let j,ie,X,he;Qt(b)?j=b:(X=b.key,ie=b.label,j=(y=b.value)!==null&&y!==void 0?y:X);const A=I.value.get(j);return A&&(ie===void 0&&(ie=A==null?void 0:A[e.optionLabelProp||i.value.label]),X===void 0&&(X=(p=A==null?void 0:A.key)!==null&&p!==void 0?p:j),he=A==null?void 0:A.disabled),{label:ie,value:j,key:X,disabled:he,option:A}}),[P,Y]=Ee(e.defaultValue,{value:re(e,"value")}),D=T(()=>{var l;const h=H(P.value);return e.mode==="combobox"&&!(!((l=h[0])===null||l===void 0)&&l.value)?[]:h}),[_,f]=qt(D,I),C=T(()=>{if(!e.mode&&_.value.length===1){const l=_.value[0];if(l.value===null&&(l.label===null||l.label===void 0))return[]}return _.value.map(l=>{var h;return R(R({},l),{label:(h=typeof l.label=="function"?l.label():l.label)!==null&&h!==void 0?h:l.value})})}),V=T(()=>new Set(_.value.map(l=>l.value)));ye(()=>{var l;if(e.mode==="combobox"){const h=(l=_.value[0])===null||l===void 0?void 0:l.value;h!=null&&m(String(h))}},{flush:"post"});const S=(l,h)=>{const b=h??l;return{[i.value.value]:l,[i.value.label]:b}},F=Z();ye(()=>{if(e.mode!=="tags"){F.value=x.value;return}const l=x.value.slice(),h=b=>I.value.has(b);[..._.value].sort((b,y)=>b.value<y.value?-1:1).forEach(b=>{const y=b.value;h(y)||l.push(S(y,b.label))}),F.value=l});const k=Zt(F,i,v,d,re(e,"optionFilterProp")),N=T(()=>e.mode!=="tags"||!v.value||k.value.some(l=>l[e.optionFilterProp||"value"]===v.value)?k.value:[S(v.value),...k.value]),z=T(()=>e.filterSort?[...N.value].sort((l,h)=>e.filterSort(l,h)):N.value),W=T(()=>gt(z.value,{fieldNames:i.value,childrenAsData:s.value})),$=l=>{const h=H(l);if(Y(h),e.onChange&&(h.length!==_.value.length||h.some((b,y)=>{var p;return((p=_.value[y])===null||p===void 0?void 0:p.value)!==(b==null?void 0:b.value)}))){const b=e.labelInValue?h.map(p=>R(R({},p),{originLabel:p.label,label:typeof p.label=="function"?p.label():p.label})):h.map(p=>p.value),y=h.map(p=>Ce(f(p.value)));e.onChange(c.value?b:b[0],c.value?y:y[0])}},[ae,U]=_e(null),[ne,se]=_e(0),u=T(()=>e.defaultActiveFirstOption!==void 0?e.defaultActiveFirstOption:e.mode!=="combobox"),M=function(l,h){let{source:b="keyboard"}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};se(h),e.backfill&&e.mode==="combobox"&&l!==null&&b==="keyboard"&&U(String(l))},E=(l,h)=>{const b=()=>{var y;const p=f(l),j=p==null?void 0:p[i.value.label];return[e.labelInValue?{label:typeof j=="function"?j():j,originLabel:j,value:l,key:(y=p==null?void 0:p.key)!==null&&y!==void 0?y:l}:l,Ce(p)]};if(h&&e.onSelect){const[y,p]=b();e.onSelect(y,p)}else if(!h&&e.onDeselect){const[y,p]=b();e.onDeselect(y,p)}},O=(l,h)=>{let b;const y=c.value?h.selected:!0;y?b=c.value?[..._.value,l]:[l]:b=_.value.filter(p=>p.value!==l),$(b),E(l,y),e.mode==="combobox"?U(""):(!c.value||e.autoClearSearchValue)&&(m(""),U(""))},B=(l,h)=>{$(l),(h.type==="remove"||h.type==="clear")&&h.values.forEach(b=>{E(b.value,!1)})},K=(l,h)=>{var b;if(m(l),U(null),h.source==="submit"){const y=(l||"").trim();if(y){const p=Array.from(new Set([...V.value,y]));$(p),E(y,!0),m("")}return}h.source!=="blur"&&(e.mode==="combobox"&&$(l),(b=e.onSearch)===null||b===void 0||b.call(e,l))},G=l=>{let h=l;e.mode!=="tags"&&(h=l.map(y=>{const p=w.value.get(y);return p==null?void 0:p.value}).filter(y=>y!==void 0));const b=Array.from(new Set([...V.value,...h]));$(b),b.forEach(y=>{E(y,!0)})},Q=T(()=>e.virtual!==!1&&e.dropdownMatchSelectWidth!==!1);zt(bt(R(R({},g),{flattenOptions:W,onActiveValue:M,defaultActiveFirstOption:u,onSelect:O,menuItemSelectedIcon:re(e,"menuItemSelectedIcon"),rawValues:V,fieldNames:i,virtual:Q,listHeight:re(e,"listHeight"),listItemHeight:re(e,"listItemHeight"),childrenAsData:s})));const ee=Te();r({focus(){var l;(l=ee.value)===null||l===void 0||l.focus()},blur(){var l;(l=ee.value)===null||l===void 0||l.blur()},scrollTo(l){var h;(h=ee.value)===null||h===void 0||h.scrollTo(l)}});const de=T(()=>Oe(e,["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"]));return()=>L(St,J(J(J({},de.value),n),{},{id:o,prefixCls:e.prefixCls,ref:ee,omitDomProps:Jt,mode:e.mode,displayValues:C.value,onDisplayValuesChange:B,searchValue:v.value,onSearch:K,onSearchSplit:G,dropdownMatchSelectWidth:e.dropdownMatchSelectWidth,OptionList:Yt,emptyOptions:!W.value.length,activeValue:ae.value,activeDescendantId:`${o}_list_${ne.value}`}),t)}}),Ve=()=>null;Ve.isSelectOption=!0;Ve.displayName="ASelectOption";const He=()=>null;He.isSelectOptGroup=!0;He.displayName="ASelectOptGroup";const tn=()=>R(R({},Oe(We(),["inputIcon","mode","getInputElement","getRawInputElement","backfill"])),{value:Fe([Array,Object,String,Number]),defaultValue:Fe([Array,Object,String,Number]),notFoundContent:ve.any,suffixIcon:ve.any,itemIcon:ve.any,size:me(),mode:me(),bordered:lt(!0),transitionName:String,choiceTransitionName:me(""),popupClassName:String,dropdownClassName:String,placement:me(),status:me(),"onUpdate:value":at()}),Le="SECRET_COMBOBOX_MODE_DO_NOT_USE",oe=ge({compatConfig:{MODE:3}
1,name:"ASelect",Option:Ve,OptGroup:He,inheritAttrs:!1,props:Be(tn(),{listHeight:256,listItemHeight:24}),SECRET_COMBOBOX_MODE_DO_NOT_USE:Le,slots:Object,setup(e,a){let{attrs:r,emit:n,slots:t,expose:o}=a;const c=Te(),s=Ct(),d=Tt.useInject(),i=T(()=>xt(d.status,e.status)),v=()=>{var O;(O=c.value)===null||O===void 0||O.focus()},m=()=>{var O;(O=c.value)===null||O===void 0||O.blur()},g=O=>{var B;(B=c.value)===null||B===void 0||B.scrollTo(O)},I=T(()=>{const{mode:O}=e;if(O!=="combobox")return O===Le?"combobox":O}),{prefixCls:w,direction:x,configProvider:H,renderEmpty:P,size:Y,getPrefixCls:D,getPopupContainer:_,disabled:f,select:C}=st("select",e),{compactSize:V,compactItemClassnames:S}=it(w,x),F=T(()=>V.value||Y.value),k=rt(),N=T(()=>{var O;return(O=f.value)!==null&&O!==void 0?O:k.value}),[z,W]=Ot(w),$=T(()=>D()),ae=T(()=>e.placement!==void 0?e.placement:x.value==="rtl"?"bottomRight":"bottomLeft"),U=T(()=>ut($.value,ct(ae.value),e.transitionName)),ne=T(()=>ce({[`${w.value}-lg`]:F.value==="large",[`${w.value}-sm`]:F.value==="small",[`${w.value}-rtl`]:x.value==="rtl",[`${w.value}-borderless`]:!e.bordered,[`${w.value}-in-form-item`]:d.isFormItemInput},Vt(w.value,i.value,d.hasFeedback),S.value,W.value)),se=function(){for(var O=arguments.length,B=new Array(O),K=0;K<O;K++)B[K]=arguments[K];n("update:value",B[0]),n("change",...B),s.onFieldChange()},u=O=>{n("blur",O),s.onFieldBlur()};o({blur:m,focus:v,scrollTo:g});const M=T(()=>I.value==="multiple"||I.value==="tags"),E=T(()=>e.showArrow!==void 0?e.showArrow:e.loading||!(M.value||I.value==="combobox"));return()=>{var O,B,K,G;const{notFoundContent:Q,listHeight:ee=256,listItemHeight:de=24,popupClassName:l,dropdownClassName:h,virtual:b,dropdownMatchSelectWidth:y,id:p=s.id.value,placeholder:j=(O=t.placeholder)===null||O===void 0?void 0:O.call(t),showArrow:ie}=e,{hasFeedback:X,feedbackIcon:he}=d;let A;Q!==void 0?A=Q:t.notFoundContent?A=t.notFoundContent():I.value==="combobox"?A=null:A=(P==null?void 0:P("Select"))||L(dt,{componentName:"Select"},null);const{suffixIcon:be,itemIcon:fe,removeIcon:Ge,clearIcon:Xe}=wt(R(R({},e),{multiple:M.value,prefixCls:w.value,hasFeedback:X,feedbackIcon:he,showArrow:E.value}),t),Re=Oe(e,["prefixCls","suffixIcon","itemIcon","removeIcon","clearIcon","size","bordered","status"]),Ze=ce(l||h,{[`${w.value}-dropdown-${x.value}`]:x.value==="rtl"},W.value);return z(L(en,J(J(J({ref:c,virtual:b,dropdownMatchSelectWidth:y},Re),r),{},{showSearch:(B=e.showSearch)!==null&&B!==void 0?B:(K=C==null?void 0:C.value)===null||K===void 0?void 0:K.showSearch,placeholder:j,listHeight:ee,listItemHeight:de,mode:I.value,prefixCls:w.value,direction:x.value,inputIcon:be,menuItemSelectedIcon:fe,removeIcon:Ge,clearIcon:Xe,notFoundContent:A,class:[ne.value,r.class],getPopupContainer:_==null?void 0:_.value,dropdownClassName:Ze,onChange:se,onBlur:u,id:p,dropdownRender:Re.dropdownRender||t.dropdownRender,transitionName:U.value,children:(G=t.default)===null||G===void 0?void 0:G.call(t),tagRender:e.tagRender||t.tagRender,optionLabelRender:t.optionLabel,maxTagPlaceholder:e.maxTagPlaceholder||t.maxTagPlaceholder,showArrow:X||ie,disabled:N.value}),{option:t.option}))}}});oe.install=function(e){return e.component(oe.name,oe),e.component(oe.Option.displayName,oe.Option),e.component(oe.OptGroup.displayName,oe.OptGroup),e};const un=oe.Option;oe.OptGroup;export{Bt as L,oe as S,un as a,tn as s};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.