mini-rbac/backend/static/assets/index.b49a664b.js

4 lines
46 KiB
JavaScript

import{m as B,_ as he,E as Oe,X as C,c as L,r as ie,e as _,D as oe,B as Ie,x as X,i as ke,a4 as Qn,y as je,a3 as Ve,H as Se,h as Qe,F as Be,R as Je,A as be,a$ as Zn,a as Ze,a0 as en,P as Le,b0 as qn,s as nn,n as xn,a5 as Jn,Z as Pn,Y as hn,af as et,O as Me,am as nt,aN as Pe,M as tt,N as ot,b1 as at,a_ as lt,ai as it,ap as ut,G as rt,at as ct}from"./index.ab0d47a4.js";import{_ as dt,b as st,u as ft}from"./index.5ec54e89.js";import{T as vt,O as pt,i as mt,u as bn,a as yn}from"./useState.01763bb3.js";import{K as E}from"./KeyCode.99f746d5.js";import{x as Tn,w as We}from"./useFlexGapSupport.f5eec5c4.js";import{p as tn,c as on,L as gt}from"./index.cef07818.js";function Sn(n,e){var a=n.key,t;return"value"in n&&(t=n.value),a!=null?a:t!==void 0?t:"rc-index-key-".concat(e)}function Fn(n,e){var a=n||{},t=a.label,o=a.value,i=a.options;return{label:t||(e?"children":"label"),value:o||"value",options:i||"options"}}function ht(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=e.fieldNames,t=e.childrenAsData,o=[],i=Fn(a,!1),u=i.label,d=i.value,s=i.options;function O(f,r){f.forEach(function(p){var h=p[u];if(r||!(s in p)){var w=p[d];o.push({key:Sn(p,o.length),groupOption:r,data:p,label:h,value:w})}else{var S=h;S===void 0&&t&&(S=p.label),o.push({key:Sn(p,o.length),group:!0,data:p,label:S}),O(p[s],!0)}})}return O(n,!1),o}function qe(n){var e=B({},n);return"props"in e||Object.defineProperty(e,"props",{get:function(){return e}}),e}function bt(n,e){if(!e||!e.length)return null;var a=!1;function t(i,u){var d=dt(u),s=d[0],O=d.slice(1);if(!s)return[i];var f=i.split(s);return a=a||f.length>1,f.reduce(function(r,p){return[].concat(he(r),he(t(p,O)))},[]).filter(function(r){return r})}var o=t(n,e);return a?o:null}var yt=globalThis&&globalThis.__rest||function(n,e){var a={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&e.indexOf(t)<0&&(a[t]=n[t]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(n);o<t.length;o++)e.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(n,t[o])&&(a[t[o]]=n[t[o]]);return a},St=function(e){var a=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:a,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:a,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:a,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:a,adjustY:1}}}},wt=Oe({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:C.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:C.oneOfType([Number,Boolean]).def(!0),popupElement:C.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function},setup:function(e,a){var t=a.slots,o=a.attrs,i=a.expose,u=L(function(){var s=e.dropdownMatchSelectWidth;return St(s)}),d=ie();return i({getPopupElement:function(){return d.value}}),function(){var s=B(B({},e),o),O=s.empty,f=O===void 0?!1:O,r=yt(s,["empty"]),p=r.visible,h=r.dropdownAlign,w=r.prefixCls,S=r.popupElement,R=r.dropdownClassName,V=r.dropdownStyle,K=r.direction,H=K===void 0?"ltr":K,k=r.placement,D=r.dropdownMatchSelectWidth,g=r.containerWidth,v=r.dropdownRender,M=r.animation,m=r.transitionName,b=r.getPopupContainer,x=r.getTriggerDOMNode,A=r.onPopupVisibleChange,G=r.onPopupMouseEnter,U="".concat(w,"-dropdown"),Y=S;v&&(Y=v({menuNode:S,props:e}));var $=M?"".concat(U,"-").concat(M):m,Q=B({minWidth:"".concat(g,"px")},V);return typeof D=="number"?Q.width="".concat(D,"px"):D&&(Q.width="".concat(g,"px")),_(vt,oe(oe({},e),{},{showAction:A?["click"]:[],hideAction:A?["click"]:[],popupPlacement:k||(H==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:u.value,prefixCls:U,popupTransitionName:$,popupAlign:h,popupVisible:p,getPopupContainer:b,popupClassName:Ie(R,X({},"".concat(U,"-empty"),f)),popupStyle:Q,getTriggerDOMNode:x,onPopupVisibleChange:A}),{default:t.default,popup:function(){return _("div",{ref:d,onMouseenter:G},[Y])}})}}});const Ct=wt;var He=function(e,a){var t=a.slots,o,i=e.class,u=e.customizeIcon,d=e.customizeIconProps,s=e.onMousedown,O=e.onClick,f;return typeof u=="function"?f=u(d):f=u,_("span",{class:i,onMousedown:function(p){p.preventDefault(),s&&s(p)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:O,"aria-hidden":!0},[f!==void 0?f:_("span",{class:i.split(/\s+/).map(function(r){return"".concat(r,"-icon")})},[(o=t.default)===null||o===void 0?void 0:o.call(t)])])};He.inheritAttrs=!1;He.displayName="TransBtn";He.props={class:String,customizeIcon:C.any,customizeIconProps:C.any,onMousedown:Function,onClick:Function};const Ke=He;var It={inputRef:C.any,prefixCls:String,id:String,inputElement:C.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:C.oneOfType([C.number,C.string]),attrs:C.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},Ot=Oe({name:"Input",inheritAttrs:!1,props:It,setup:function(e){var a=null,t=ke("VCSelectContainerEvent");return function(){var o,i=e.prefixCls,u=e.id,d=e.inputElement,s=e.disabled,O=e.tabindex,f=e.autofocus,r=e.autocomplete,p=e.editable,h=e.activeDescendantId,w=e.value,S=e.onKeydown,R=e.onMousedown,V=e.onChange,K=e.onPaste,H=e.onCompositionstart,k=e.onCompositionend,D=e.onFocus,g=e.onBlur,v=e.open,M=e.inputRef,m=e.attrs,b=d||Qn(_("input",null,null),[[st]]),x=b.props||{},A=x.onKeydown,G=x.onInput,U=x.onFocus,Y=x.onBlur,$=x.onMousedown,Q=x.onCompositionstart,q=x.onCompositionend,re=x.style;return b=Tn(b,B(B(B(B(B({type:"search"},x),{id:u,ref:M,disabled:s,tabindex:O,autocomplete:r||"off",autofocus:f,class:Ie("".concat(i,"-selection-search-input"),(o=b==null?void 0:b.props)===null||o===void 0?void 0:o.class),role:"combobox","aria-expanded":v,"aria-haspopup":"listbox","aria-owns":"".concat(u,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(u,"_list"),"aria-activedescendant":h}),m),{value:p?w:"",readonly:!p,unselectable:p?null:"on",style:B(B({},re),{opacity:p?null:0}),onKeydown:function(W){S(W),A&&A(W)},onMousedown:function(W){R(W),$&&$(W)},onInput:function(W){V(W),G&&G(W)},onCompositionstart:function(W){H(W),Q&&Q(W)},onCompositionend:function(W){k(W),q&&q(W)},onPaste:K,onFocus:function(){clearTimeout(a),U&&U(arguments.length<=0?void 0:arguments[0]),D&&D(arguments.length<=0?void 0:arguments[0]),t==null||t.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var W=arguments.length,ce=new Array(W),de=0;de<W;de++)ce[de]=arguments[de];a=setTimeout(function(){Y&&Y(ce[0]),g&&g(ce[0]),t==null||t.blur(ce[0])},100)}}),b.type==="textarea"?{}:{type:"search"}),!0,!0),b}}});const _n=Ot;var Dn=Symbol("TreeSelectLegacyContextPropsKey");function ho(n){return je(Dn,n)}function an(){return ke(Dn,{})}var xt={id:String,prefixCls:String,values:C.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:C.any,placeholder:C.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:C.oneOfType([C.number,C.string]),removeIcon:C.any,choiceTransitionName:String,maxTagCount:C.oneOfType([C.number,C.string]),maxTagTextLength:Number,maxTagPlaceholder:C.any.def(function(){return function(n){return"+ ".concat(n.length," ...")}}),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},wn=function(e){e.preventDefault(),e.stopPropagation()},Pt=Oe({name:"MultipleSelectSelector",inheritAttrs:!1,props:xt,setup:function(e){var a=ie(),t=ie(0),o=ie(!1),i=an(),u=L(function(){return"".concat(e.prefixCls,"-selection")}),d=L(function(){return e.open||e.mode==="tags"?e.searchValue:""}),s=L(function(){return e.mode==="tags"||e.showSearch&&(e.open||o.value)});Ve(function(){Se(d,function(){t.value=a.value.scrollWidth},{flush:"post",immediate:!0})});function O(h,w,S,R,V){return _("span",{class:Ie("".concat(u.value,"-item"),X({},"".concat(u.value,"-item-disabled"),S)),title:typeof h=="string"||typeof h=="number"?h.toString():void 0},[_("span",{class:"".concat(u.value,"-item-content")},[w]),R&&_(Ke,{class:"".concat(u.value,"-item-remove"),onMousedown:wn,onClick:V,customizeIcon:e.removeIcon},{default:function(){return[Qe("\xD7")]}})])}function f(h,w,S,R,V,K){var H,k=function(v){wn(v),e.onToggleOpen(!open)},D=K;return i.keyEntities&&(D=((H=i.keyEntities[h])===null||H===void 0?void 0:H.node)||{}),_("span",{key:h,onMousedown:k},[e.tagRender({label:w,value:h,disabled:S,closable:R,onClose:V,option:D})])}function r(h){var w=h.disabled,S=h.label,R=h.value,V=h.option,K=!e.disabled&&!w,H=S;if(typeof e.maxTagTextLength=="number"&&(typeof S=="string"||typeof S=="number")){var k=String(H);k.length>e.maxTagTextLength&&(H="".concat(k.slice(0,e.maxTagTextLength),"..."))}var D=function(v){var M;v&&v.stopPropagation(),(M=e.onRemove)===null||M===void 0||M.call(e,h)};return typeof e.tagRender=="function"?f(R,H,w,K,D,V):O(S,H,w,K,D)}function p(h){var w=e.maxTagPlaceholder,S=w===void 0?function(V){return"+ ".concat(V.length," ...")}:w,R=typeof S=="function"?S(h):S;return O(R,R,!1)}return function(){var h=e.id,w=e.prefixCls,S=e.values,R=e.open,V=e.inputRef,K=e.placeholder,H=e.disabled,k=e.autofocus,D=e.autocomplete,g=e.activeDescendantId,v=e.tabindex,M=e.onInputChange,m=e.onInputPaste,b=e.onInputKeyDown,x=e.onInputMouseDown,A=e.onInputCompositionStart,G=e.onInputCompositionEnd,U=_("div",{class:"".concat(u.value,"-search"),style:{width:t.value+"px"},key:"input"},[_(_n,{inputRef:V,open:R,prefixCls:w,id:h,inputElement:null,disabled:H,autofocus:k,autocomplete:D,editable:s.value,activeDescendantId:g,value:d.value,onKeydown:b,onMousedown:x,onChange:M,onPaste:m,onCompositionstart:A,onCompositionend:G,tabindex:v,attrs:tn(e,!0),onFocus:function(){return o.value=!0},onBlur:function(){return o.value=!1}},null),_("span",{ref:a,class:"".concat(u.value,"-search-mirror"),"aria-hidden":!0},[d.value,Qe("\xA0")])]),Y=_(pt,{prefixCls:"".concat(u.value,"-overflow"),data:S,renderItem:r,renderRest:p,suffix:U,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return _(Be,null,[Y,!S.length&&!d.value&&_("span",{class:"".concat(u.value,"-placeholder")},[K])])}}});const Tt=Pt;var Ft={inputElement:C.any,id:String,prefixCls:String,values:C.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:C.any,placeholder:C.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:C.oneOfType([C.number,C.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},ln=Oe({name:"SingleSelector",setup:function(e){var a=ie(!1),t=L(function(){return e.mode==="combobox"}),o=L(function(){return t.value||e.showSearch}),i=L(function(){var f=e.searchValue||"";return t.value&&e.activeValue&&!a.value&&(f=e.activeValue),f}),u=an();Se([t,function(){return e.activeValue}],function(){t.value&&(a.value=!1)},{immediate:!0});var d=L(function(){return e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!i.value}),s=L(function(){var f=e.values[0];return f&&(typeof f.label=="string"||typeof f.label=="number")?f.label.toString():void 0}),O=function(){if(e.values[0])return null;var r=d.value?{visibility:"hidden"}:void 0;return _("span",{class:"".concat(e.prefixCls,"-selection-placeholder"),style:r},[e.placeholder])};return function(){var f,r,p,h,w=e.inputElement,S=e.prefixCls,R=e.id,V=e.values,K=e.inputRef,H=e.disabled,k=e.autofocus,D=e.autocomplete,g=e.activeDescendantId,v=e.open,M=e.tabindex,m=e.optionLabelRender,b=e.onInputKeyDown,x=e.onInputMouseDown,A=e.onInputChange,G=e.onInputPaste,U=e.onInputCompositionStart,Y=e.onInputCompositionEnd,$=V[0],Q=null;if($&&u.customSlots){var q=(f=$.key)!==null&&f!==void 0?f:$.value,re=((r=u.keyEntities[q])===null||r===void 0?void 0:r.node)||{};Q=u.customSlots[(p=re.slots)===null||p===void 0?void 0:p.title]||u.customSlots.title||$.label,typeof Q=="function"&&(Q=Q(re))}else Q=m&&$?m($.option):$==null?void 0:$.label;return _(Be,null,[_("span",{class:"".concat(S,"-selection-search")},[_(_n,{inputRef:K,prefixCls:S,id:R,open:v,inputElement:w,disabled:H,autofocus:k,autocomplete:D,editable:o.value,activeDescendantId:g,value:i.value,onKeydown:b,onMousedown:x,onChange:function(W){a.value=!0,A(W)},onPaste:G,onCompositionstart:U,onCompositionend:Y,tabindex:M,attrs:tn(e,!0)},null)]),!t.value&&$&&!d.value&&_("span",{class:"".concat(S,"-selection-item"),title:s.value},[_(Be,{key:(h=$.key)!==null&&h!==void 0?h:$.value},[Q])]),O()])}}});ln.props=Ft;ln.inheritAttrs=!1;const _t=ln;function Dt(n){return![E.ESC,E.SHIFT,E.BACKSPACE,E.TAB,E.WIN_KEY,E.ALT,E.META,E.WIN_KEY_RIGHT,E.CTRL,E.SEMICOLON,E.EQUALS,E.CAPS_LOCK,E.CONTEXT_MENU,E.F1,E.F2,E.F3,E.F4,E.F5,E.F6,E.F7,E.F8,E.F9,E.F10,E.F11,E.F12].includes(n)}function Mn(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=null,a;Je(function(){clearTimeout(a)});function t(o){(o||e===null)&&(e=o),clearTimeout(a),a=setTimeout(function(){e=null},n)}return[function(){return e},t]}var Mt=Oe({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:C.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:C.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:C.oneOfType([C.number,C.string]),disabled:{type:Boolean,default:void 0},placeholder:C.any,removeIcon:C.any,maxTagCount:C.oneOfType([C.number,C.string]),maxTagTextLength:Number,maxTagPlaceholder:C.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup:function(e,a){var t=a.expose,o=on(),i=!1,u=Mn(0),d=be(u,2),s=d[0],O=d[1],f=function(D){var g=D.which;(g===E.UP||g===E.DOWN)&&D.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(D),g===E.ENTER&&e.mode==="tags"&&!i&&!e.open&&e.onSearchSubmit(D.target.value),Dt(g)&&e.onToggleOpen(!0)},r=function(){O(!0)},p=null,h=function(D){e.onSearch(D,!0,i)!==!1&&e.onToggleOpen(!0)},w=function(){i=!0},S=function(D){i=!1,e.mode!=="combobox"&&h(D.target.value)},R=function(D){var g=D.target.value;if(e.tokenWithEnter&&p&&/[\r\n]/.test(p)){var v=p.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");g=g.replace(v,p)}p=null,h(g)},V=function(D){var g=D.clipboardData,v=g.getData("text");p=v},K=function(D){var g=D.target;if(g!==o.current){var v=document.body.style.msTouchAction!==void 0;v?setTimeout(function(){o.current.focus()}):o.current.focus()}},H=function(D){var g=s();D.target!==o.current&&!g&&D.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!g)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return t({focus:function(){o.current.focus()},blur:function(){o.current.blur()}}),function(){var k=e.prefixCls,D=e.domRef,g=e.mode,v={inputRef:o,onInputKeyDown:f,onInputMouseDown:r,onInputChange:R,onInputPaste:V,onInputCompositionStart:w,onInputCompositionEnd:S},M=g==="multiple"||g==="tags"?_(Tt,oe(oe({},e),v),null):_(_t,oe(oe({},e),v),null);return _("div",{ref:D,class:"".concat(k,"-selector"),onClick:K,onMousedown:H},[M])}}});const Vt=Mt;function Nt(n,e,a){function t(o){var i,u,d,s=o.target;s.shadowRoot&&o.composed&&(s=o.composedPath()[0]||s);var O=[(i=n[0])===null||i===void 0?void 0:i.value,(d=(u=n[1])===null||u===void 0?void 0:u.value)===null||d===void 0?void 0:d.getPopupElement()];e.value&&O.every(function(f){return f&&!f.contains(s)&&f!==s})&&a(!1)}Ve(function(){window.addEventListener("mousedown",t)}),Je(function(){window.removeEventListener("mousedown",t)})}function Et(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=ie(!1),a,t=function(){clearTimeout(a)};Ve(function(){t()});var o=function(u,d){t(),a=setTimeout(function(){e.value=u,d&&d()},n)};return[e,o,t]}var Vn=Symbol("BaseSelectContextKey");function Rt(n){return je(Vn,n)}function At(){return ke(Vn,{})}function Nn(n){if(!Zn(n))return Ze(n);var e=new Proxy({},{get:function(t,o,i){return Reflect.get(n.value,o,i)},set:function(t,o,i){return n.value[o]=i,!0},deleteProperty:function(t,o){return Reflect.deleteProperty(n.value,o)},has:function(t,o){return Reflect.has(n.value,o)},ownKeys:function(){return Object.keys(n.value)},getOwnPropertyDescriptor:function(){return{enumerable:!0,configurable:!0}}});return Ze(e)}var Bt=globalThis&&globalThis.__rest||function(n,e){var a={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&e.indexOf(t)<0&&(a[t]=n[t]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(n);o<t.length;o++)e.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(n,t[o])&&(a[t[o]]=n[t[o]]);return a},Lt=["value","onChange","removeIcon","placeholder","autofocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabindex","OptionList","notFoundContent"],Kt=function(){return{prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:C.any,emptyOptions:Boolean}},En=function(){return{showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:C.any,placeholder:C.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:C.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:C.any,clearIcon:C.any,removeIcon:C.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}},kt=function(){return B(B({},Kt()),En())};function Rn(n){return n==="tags"||n==="multiple"}const jt=Oe({name:"BaseSelect",inheritAttrs:!1,props:en(kt(),{showAction:[],notFoundContent:"Not Found"}),setup:function(e,a){var t=a.attrs,o=a.expose,i=a.slots,u=L(function(){return Rn(e.mode)}),d=L(function(){return e.showSearch!==void 0?e.showSearch:u.value||e.mode==="combobox"}),s=ie(!1);Ve(function(){s.value=mt()});var O=an(),f=ie(null),r=on(),p=ie(null),h=ie(null),w=ie(null),S=Et(),R=be(S,3),V=R[0],K=R[1],H=R[2],k=function(){var l;(l=h.value)===null||l===void 0||l.focus()},D=function(){var l;(l=h.value)===null||l===void 0||l.blur()};o({focus:k,blur:D,scrollTo:function(l){var T;return(T=w.value)===null||T===void 0?void 0:T.scrollTo(l)}});var g=L(function(){var P;if(e.mode!=="combobox")return e.searchValue;var l=(P=e.displayValues[0])===null||P===void 0?void 0:P.value;return typeof l=="string"||typeof l=="number"?String(l):""}),v=e.open!==void 0?e.open:e.defaultOpen,M=ie(v),m=ie(v),b=function(l){M.value=e.open!==void 0?e.open:l,m.value=M.value};Se(function(){return e.open},function(){b(e.open)});var x=L(function(){return!e.notFoundContent&&e.emptyOptions});Le(function(){m.value=M.value,(e.disabled||x.value&&m.value&&e.mode==="combobox")&&(m.value=!1)});var A=L(function(){return x.value?!1:m.value}),G=function(l){var T=l!==void 0?l:!m.value;M.value!==T&&!e.disabled&&(b(T),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(T))},U=L(function(){return(e.tokenSeparators||[]).some(function(P){return[`
`,`\r
`].includes(P)})}),Y=function(l,T,ne){var z,Z,te=!0,le=l;(z=e.onActiveValueChange)===null||z===void 0||z.call(e,null);var F=ne?null:bt(l,e.tokenSeparators);return e.mode!=="combobox"&&F&&(le="",(Z=e.onSearchSplit)===null||Z===void 0||Z.call(e,F),G(!1),te=!1),e.onSearch&&g.value!==le&&e.onSearch(le,{source:T?"typing":"effect"}),te},$=function(l){var T;!l||!l.trim()||(T=e.onSearch)===null||T===void 0||T.call(e,l,{source:"submit"})};Se(m,function(){!m.value&&!u.value&&e.mode!=="combobox"&&Y("",!1,!1)},{immediate:!0,flush:"post"}),Se(function(){return e.disabled},function(){M.value&&!!e.disabled&&b(!1)},{immediate:!0});var Q=Mn(),q=be(Q,2),re=q[0],J=q[1],W=function(l){var T,ne,z=re(),Z=l.which;if(Z===E.ENTER&&(e.mode!=="combobox"&&l.preventDefault(),m.value||G(!0)),J(!!g.value),Z===E.BACKSPACE&&!z&&u.value&&!g.value&&e.displayValues.length){for(var te=he(e.displayValues),le=null,F=te.length-1;F>=0;F-=1){var c=te[F];if(!c.disabled){te.splice(F,1),le=c;break}}le&&e.onDisplayValuesChange(te,{type:"remove",values:[le]})}for(var y=arguments.length,I=new Array(y>1?y-1:0),N=1;N<y;N++)I[N-1]=arguments[N];if(m.value&&w.value){var j;(j=w.value).onKeydown.apply(j,[l].concat(I))}(ne=e.onKeydown)===null||ne===void 0||(T=ne).call.apply(T,[e,l].concat(I))},ce=function(l){for(var T=arguments.length,ne=new Array(T>1?T-1:0),z=1;z<T;z++)ne[z-1]=arguments[z];if(m.value&&w.value){var Z;(Z=w.value).onKeyup.apply(Z,[l].concat(ne))}e.onKeyup&&e.onKeyup.apply(e,[l].concat(ne))},de=function(l){var T=e.displayValues.filter(function(ne){return ne!==l});e.onDisplayValuesChange(T,{type:"remove",values:[l]})},ae=ie(!1),se=function(){K(!0),e.disabled||(e.onFocus&&!ae.value&&e.onFocus.apply(e,arguments),e.showAction&&e.showAction.includes("focus")&&G(!0)),ae.value=!0},pe=function(){if(K(!1,function(){ae.value=!1,G(!1)}),!e.disabled){var l=g.value;l&&(e.mode==="tags"?e.onSearch(l,{source:"submit"}):e.mode==="multiple"&&e.onSearch("",{source:"blur"})),e.onBlur&&e.onBlur.apply(e,arguments)}};je("VCSelectContainerEvent",{focus:se,blur:pe});var ee=[];Ve(function(){ee.forEach(function(P){return clearTimeout(P)}),ee.splice(0,ee.length)}),Je(function(){ee.forEach(function(P){return clearTimeout(P)}),ee.splice(0,ee.length)});var Te=function(l){var T,ne,z,Z=l.target,te=(ne=p.value)===null||ne===void 0?void 0:ne.getPopupElement();if(te&&te.contains(Z)){var le=setTimeout(function(){var I,N=ee.indexOf(le);N!==-1&&ee.splice(N,1),H(),!s.value&&!te.contains(document.activeElement)&&((I=h.value)===null||I===void 0||I.focus())});ee.push(le)}for(var F=arguments.length,c=new Array(F>1?F-1:0),y=1;y<F;y++)c[y-1]=arguments[y];(z=e.onMousedown)===null||z===void 0||(T=z).call.apply(T,[e,l].concat(c))},fe=ie(null),xe=Jn(),Fe=function(){xe.update()};return Ve(function(){Se(A,function(){var P;if(A.value){var l=Math.ceil((P=f.value)===null||P===void 0?void 0:P.offsetWidth);fe.value!==l&&!Number.isNaN(l)&&(fe.value=l)}},{immediate:!0,flush:"post"})}),Nt([f,p],A,G),Rt(Nn(B(B({},qn(e)),{open:m,triggerOpen:A,showSearch:d,multiple:u,toggleOpen:G}))),function(){var P,l=B(B({},e),t),T=l.prefixCls,ne=l.id;l.open,l.defaultOpen;var z=l.mode;l.showSearch,l.searchValue,l.onSearch;var Z=l.allowClear,te=l.clearIcon,le=l.showArrow,F=l.inputIcon,c=l.disabled,y=l.loading,I=l.getInputElement,N=l.getPopupContainer,j=l.placement,me=l.animation,ve=l.transitionName,we=l.dropdownStyle,_e=l.dropdownClassName,ue=l.dropdownMatchSelectWidth,$e=l.dropdownRender,cn=l.dropdownAlign;l.showAction;var Ne=l.direction;l.tokenSeparators;var Ce=l.tagRender,De=l.optionLabelRender;l.onPopupScroll,l.onDropdownVisibleChange,l.onFocus,l.onBlur,l.onKeyup,l.onKeydown,l.onMousedown;var ze=l.onClear,Ue=l.omitDomProps,dn=l.getRawInputElement,Re=l.displayValues,kn=l.onDisplayValuesChange,jn=l.emptyOptions,Wn=l.activeDescendantId,Hn=l.activeValue,$n=l.OptionList,zn=Bt(l,["prefixCls","id","open","defaultOpen","mode","showSearch","searchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","disabled","loading","getInputElement","getPopupContainer","placement","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","optionLabelRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyup","onKeydown","onMousedown","onClear","omitDomProps","getRawInputElement","displayValues","onDisplayValuesChange","emptyOptions","activeDescendantId","activeValue","OptionList"]),sn=z==="combobox"&&I&&I()||null,Ee=typeof dn=="function"&&dn(),Ge=B({},zn),fn;Ee&&(fn=function(Ae){G(Ae)}),Lt.forEach(function(ge){delete Ge[ge]}),Ue==null||Ue.forEach(function(ge){delete Ge[ge]});var vn=le!==void 0?le:y||!u.value&&z!=="combobox",pn;vn&&(pn=_(Ke,{class:Ie("".concat(T,"-arrow"),X({},"".concat(T,"-arrow-loading"),y)),customizeIcon:F,customizeIconProps:{loading:y,searchValue:g.value,open:m.value,focused:V.value,showSearch:d.value}},null));var mn,Un=function(){ze==null||ze(),kn([],{type:"clear",values:Re}),Y("",!1,!1)};!c&&Z&&(Re.length||g.value)&&(mn=_(Ke,{class:"".concat(T,"-clear"),onMousedown:Un,customizeIcon:te},{default:function(){return[Qe("\xD7")]}}));var Gn=_($n,{ref:w},B(B({},O.customSlots),{option:i.option})),Xn=Ie(T,t.class,(P={},X(P,"".concat(T,"-focused"),V.value),X(P,"".concat(T,"-multiple"),u.value),X(P,"".concat(T,"-single"),!u.value),X(P,"".concat(T,"-allow-clear"),Z),X(P,"".concat(T,"-show-arrow"),vn),X(P,"".concat(T,"-disabled"),c),X(P,"".concat(T,"-loading"),y),X(P,"".concat(T,"-open"),m.value),X(P,"".concat(T,"-customize-input"),sn),X(P,"".concat(T,"-show-search"),d.value),P)),gn=_(Ct,{ref:p,disabled:c,prefixCls:T,visible:A.value,popupElement:Gn,containerWidth:fe.value,animation:me,transitionName:ve,dropdownStyle:we,dropdownClassName:_e,direction:Ne,dropdownMatchSelectWidth:ue,dropdownRender:$e,dropdownAlign:cn,placement:j,getPopupContainer:N,empty:jn,getTriggerDOMNode:function(){return r.current},onPopupVisibleChange:fn,onPopupMouseEnter:Fe},{default:function(){return Ee?nn(Ee)&&Tn(Ee,{ref:r},!1,!0):_(Vt,oe(oe({},e),{},{domRef:r,prefixCls:T,inputElement:sn,ref:h,id:ne,showSearch:d.value,mode:z,activeDescendantId:Wn,tagRender:Ce,optionLabelRender:De,values:Re,open:m.value,onToggleOpen:G,activeValue:Hn,searchValue:g.value,onSearch:Y,onSearchSubmit:$,onRemove:de,tokenWithEnter:U.value}),null)}}),Xe;return Ee?Xe=gn:Xe=_("div",oe(oe({},Ge),{},{class:Xn,ref:f,onMousedown:Te,onKeydown:W,onKeyup:ce}),[V.value&&!m.value&&_("span",{style:{width:0,height:0,display:"flex",overflow:"hidden",opacity:0},"aria-live":"polite"},["".concat(Re.map(function(ge){var Ae=ge.label,Yn=ge.value;return["number","string"].includes(xn(Ae))?Ae:Yn}).join(", "))]),gn,pn,mn]),Xe}}});function Wt(n,e,a){var t=ie(n());return Se(e,function(o,i){a?a(o,i)&&(t.value=n()):t.value=n()}),t}function Ht(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var An=Symbol("SelectContextKey");function $t(n){return je(An,n)}function zt(){return ke(An,{})}var Ut=globalThis&&globalThis.__rest||function(n,e){var a={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&e.indexOf(t)<0&&(a[t]=n[t]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(n);o<t.length;o++)e.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(n,t[o])&&(a[t[o]]=n[t[o]]);return a};function Cn(n){return typeof n=="string"||typeof n=="number"}var Gt=Oe({name:"OptionList",inheritAttrs:!1,slots:["option"],setup:function(e,a){var t=a.expose,o=a.slots,i=At(),u=zt(),d=L(function(){return"".concat(i.prefixCls,"-item")}),s=Wt(function(){return u.flattenOptions},[function(){return i.open},function(){return u.flattenOptions}],function(g){return g[0]}),O=on(),f=function(v){v.preventDefault()},r=function(v){O.current&&O.current.scrollTo(typeof v=="number"?{index:v}:v)},p=function(v){for(var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,m=s.value.length,b=0;b<m;b+=1){var x=(v+b*M+m)%m,A=s.value[x],G=A.group,U=A.data;if(!G&&!U.disabled)return x}return-1},h=Ze({activeIndex:p(0)}),w=function(v){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;h.activeIndex=v;var m={source:M?"keyboard":"mouse"},b=s.value[v];if(!b){u.onActiveValue(null,-1,m);return}u.onActiveValue(b.value,v,m)};Se([function(){return s.value.length},function(){return i.searchValue}],function(){w(u.defaultActiveFirstOption!==!1?p(0):-1)},{immediate:!0});var S=function(v){return u.rawValues.has(v)&&i.mode!=="combobox"};Se([function(){return i.open},function(){return i.searchValue}],function(){if(!i.multiple&&i.open&&u.rawValues.size===1){var g=Array.from(u.rawValues)[0],v=Pn(s.value).findIndex(function(M){var m=M.data;return m[u.fieldNames.value]===g});v!==-1&&(w(v),hn(function(){r(v)}))}i.open&&hn(function(){var M;(M=O.current)===null||M===void 0||M.scrollTo(void 0)})},{immediate:!0,flush:"post"});var R=function(v){v!==void 0&&u.onSelect(v,{selected:!u.rawValues.has(v)}),i.multiple||i.toggleOpen(!1)},V=function(v){return typeof v.label=="function"?v.label():v.label};function K(g){var v=s.value[g];if(!v)return null;var M=v.data||{},m=M.value,b=v.group,x=tn(M,!0),A=V(v);return v?_("div",oe(oe({"aria-label":typeof A=="string"&&!b?A:null},x),{},{key:g,role:b?"presentation":"option",id:"".concat(i.id,"_list_").concat(g),"aria-selected":S(m)}),[m]):null}var H=function(v){var M=v.which,m=v.ctrlKey;switch(M){case E.N:case E.P:case E.UP:case E.DOWN:{var b=0;if(M===E.UP?b=-1:M===E.DOWN?b=1:Ht()&&m&&(M===E.N?b=1:M===E.P&&(b=-1)),b!==0){var x=p(h.activeIndex+b,b);r(x),w(x,!0)}break}case E.ENTER:{var A=s.value[h.activeIndex];A&&!A.data.disabled?R(A.value):R(void 0),i.open&&v.preventDefault();break}case E.ESC:i.toggleOpen(!1),i.open&&v.stopPropagation()}},k=function(){},D=function(v){r(v)};return t({onKeydown:H,onKeyup:k,scrollTo:D}),function(){var g=i.id,v=i.notFoundContent,M=i.onPopupScroll,m=u.menuItemSelectedIcon,b=u.fieldNames,x=u.virtual,A=u.listHeight,G=u.listItemHeight,U=o.option,Y=h.activeIndex,$=Object.keys(b).map(function(Q){return b[Q]});return s.value.length===0?_("div",{role:"listbox",id:"".concat(g,"_list"),class:"".concat(d.value,"-empty"),onMousedown:f},[v]):_(Be,null,[_("div",{role:"listbox",id:"".concat(g,"_list"),style:{height:0,width:0,overflow:"hidden"}},[K(Y-1),K(Y),K(Y+1)]),_(gt,{itemKey:"key",ref:O,data:s.value,height:A,itemHeight:G,fullHeight:!1,onMousedown:f,onScroll:M,virtual:x},{default:function(q,re){var J,W,ce=q.group,de=q.groupOption,ae=q.data,se=q.value,pe=ae.key,ee=typeof q.label=="function"?q.label():q.label;if(ce){var Te=(W=ae.title)!==null&&W!==void 0?W:Cn(ee)&&ee;return _("div",{class:Ie(d.value,"".concat(d.value,"-group")),title:Te},[U?U(ae):ee!==void 0?ee:pe])}var fe=ae.disabled,xe=ae.title;ae.children;var Fe=ae.style,P=ae.class,l=ae.className,T=Ut(ae,["disabled","title","children","style","class","className"]),ne=We(T,$),z=S(se),Z="".concat(d.value,"-option"),te=Ie(d.value,Z,P,l,(J={},X(J,"".concat(Z,"-grouped"),de),X(J,"".concat(Z,"-active"),Y===re&&!fe),X(J,"".concat(Z,"-disabled"),fe),X(J,"".concat(Z,"-selected"),z),J)),le=V(q),F=!m||typeof m=="function"||z,c=typeof le=="number"?le:le||se,y=Cn(c)?c.toString():void 0;return xe!==void 0&&(y=xe),_("div",oe(oe({},ne),{},{"aria-selected":z,class:te,title:y,onMousemove:function(N){T.onMousemove&&T.onMousemove(N),!(Y===re||fe)&&w(re)},onClick:function(N){fe||R(se),T.onClick&&T.onClick(N)},style:Fe}),[_("div",{class:"".concat(Z,"-content")},[U?U(ae):c]),nn(m)||z,F&&_(Ke,{class:"".concat(d.value,"-option-state"),customizeIcon:m,customizeIconProps:{isSelected:z}},{default:function(){return[z?"\u2713":null]}})])}})])}}});const Xt=Gt;var Yt=globalThis&&globalThis.__rest||function(n,e){var a={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&e.indexOf(t)<0&&(a[t]=n[t]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,t=Object.getOwnPropertySymbols(n);o<t.length;o++)e.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(n,t[o])&&(a[t[o]]=n[t[o]]);return a};function Qt(n){var e=n,a=e.key,t=e.children,o=e.props,i=o.value,u=o.disabled,d=Yt(o,["value","disabled"]),s=t==null?void 0:t.default;return B({key:a,value:i!==void 0?i:a,children:s,disabled:u||u===""},d)}function Bn(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=et(n).map(function(t,o){var i;if(!nn(t)||!t.type)return null;var u=t.type.isSelectOptGroup,d=t.key,s=t.children,O=t.props;if(e||!u)return Qt(t);var f=s&&s.default?s.default():void 0,r=(O==null?void 0:O.label)||((i=s.label)===null||i===void 0?void 0:i.call(s))||d;return B(B({key:"__RC_SELECT_GRP__".concat(d===null?o:String(d),"__")},O),{label:r,options:Bn(f||[])})}).filter(function(t){return t});return a}function Zt(n,e,a){var t=Me(),o=Me(),i=Me(),u=Me([]);return Se([n,e],function(){n.value?u.value=Pn(n.value).slice():u.value=Bn(e.value)},{immediate:!0,deep:!0}),Le(function(){var d=u.value,s=new Map,O=new Map,f=a.value;function r(p){for(var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,w=0;w<p.length;w+=1){var S=p[w];!S[f.options]||h?(s.set(S[f.value],S),O.set(S[f.label],S)):r(S[f.options],!0)}}r(d),t.value=d,o.value=s,i.value=O}),{options:t,valueOptions:o,labelOptions:i}}var In=0,qt=nt();function Jt(){var n;return qt?(n=In,In+=1):n="TEST_OR_SSR",n}function eo(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ie(""),e="rc_select_".concat(Jt());return n.value||e}function Ln(n){return Array.isArray(n)?n:n!==void 0?[n]:[]}function Ye(n,e){return Ln(n).join("").toUpperCase().includes(e)}const no=function(n,e,a,t,o){return L(function(){var i=a.value,u=o==null?void 0:o.value,d=t==null?void 0:t.value;if(!i||d===!1)return n.value;var s=e.value,O=s.options,f=s.label,r=s.value,p=[],h=typeof d=="function",w=i.toUpperCase(),S=h?d:function(V,K){return u?Ye(K[u],w):K[O]?Ye(K[f!=="children"?f:"label"],w):Ye(K[r],w)},R=h?function(V){return qe(V)}:function(V){return V};return n.value.forEach(function(V){if(V[O]){var K=S(i,R(V));if(K)p.push(V);else{var H=V[O].filter(function(k){return S(i,R(k))});H.length&&p.push(B(B({},V),X({},O,H)))}return}S(i,R(V))&&p.push(V)}),p})},to=function(n,e){var a=Me({values:new Map,options:new Map}),t=L(function(){var i=a.value,u=i.values,d=i.options,s=n.value.map(function(r){var p;return r.label===void 0?B(B({},r),{label:(p=u.get(r.value))===null||p===void 0?void 0:p.label}):r}),O=new Map,f=new Map;return s.forEach(function(r){O.set(r.value,r),f.set(r.value,e.value.get(r.value)||d.get(r.value))}),a.value.values=O,a.value.options=f,s}),o=function(u){return e.value.get(u)||a.value.options.get(u)};return[t,o]};var oo=["inputValue"];function Kn(){return B(B({},En()),{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},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:C.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:C.any,defaultValue:C.any,onChange:Function,children:Array})}function ao(n){return!n||xn(n)!=="object"}const lo=Oe({name:"Select",inheritAttrs:!1,props:en(Kn(),{prefixCls:"vc-select",autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup:function(e,a){var t=a.expose,o=a.attrs,i=a.slots,u=eo(Pe(e,"id")),d=L(function(){return Rn(e.mode)}),s=L(function(){return!!(!e.options&&e.children)}),O=L(function(){return e.filterOption===void 0&&e.mode==="combobox"?!1:e.filterOption}),f=L(function(){return Fn(e.fieldNames,s.value)}),r=bn("",{value:L(function(){return e.searchValue!==void 0?e.searchValue:e.inputValue}),postState:function(c){return c||""}}),p=be(r,2),h=p[0],w=p[1],S=Zt(Pe(e,"options"),Pe(e,"children"),f),R=S.valueOptions,V=S.labelOptions,K=S.options,H=function(c){var y=Ln(c);return y.map(function(I){var N,j,me,ve,we,_e;ao(I)?me=I:(we=I.key,ve=I.label,me=(N=I.value)!==null&&N!==void 0?N:we);var ue=R.value.get(me);return ue&&(ve===void 0&&(ve=ue==null?void 0:ue[e.optionLabelProp||f.value.label]),we===void 0&&(we=(j=ue==null?void 0:ue.key)!==null&&j!==void 0?j:me),_e=ue==null?void 0:ue.disabled),{label:ve,value:me,key:we,disabled:_e,option:ue}})},k=bn(e.defaultValue,{value:Pe(e,"value")}),D=be(k,2),g=D[0],v=D[1],M=L(function(){var F,c=H(g.value);return e.mode==="combobox"&&!(!((F=c[0])===null||F===void 0)&&F.value)?[]:c}),m=to(M,R),b=be(m,2),x=b[0],A=b[1],G=L(function(){if(!e.mode&&x.value.length===1){var F=x.value[0];if(F.value===null&&(F.label===null||F.label===void 0))return[]}return x.value.map(function(c){var y;return B(B({},c),{label:(y=typeof c.label=="function"?c.label():c.label)!==null&&y!==void 0?y:c.value})})}),U=L(function(){return new Set(x.value.map(function(F){return F.value}))});Le(function(){var F;if(e.mode==="combobox"){var c=(F=x.value[0])===null||F===void 0?void 0:F.value;c!=null&&w(String(c))}},{flush:"post"});var Y=function(c,y){var I,N=y!=null?y:c;return I={},X(I,f.value.value,c),X(I,f.value.label,N),I},$=Me();Le(function(){if(e.mode!=="tags"){$.value=K.value;return}var F=K.value.slice(),c=function(I){return R.value.has(I)};he(x.value).sort(function(y,I){return y.value<I.value?-1:1}).forEach(function(y){var I=y.value;c(I)||F.push(Y(I,y.label))}),$.value=F});var Q=no($,f,h,O,Pe(e,"optionFilterProp")),q=L(function(){return e.mode!=="tags"||!h.value||Q.value.some(function(F){return F[e.optionFilterProp||"value"]===h.value})?Q.value:[Y(h.value)].concat(he(Q.value))}),re=L(function(){return e.filterSort?he(q.value).sort(function(F,c){return e.filterSort(F,c)}):q.value}),J=L(function(){return ht(re.value,{fieldNames:f.value,childrenAsData:s.value})}),W=function(c){var y=H(c);if(v(y),e.onChange&&(y.length!==x.value.length||y.some(function(j,me){var ve;return((ve=x.value[me])===null||ve===void 0?void 0:ve.value)!==(j==null?void 0:j.value)}))){var I=e.labelInValue?y.map(function(j){return B(B({},j),{originLabel:j.label,label:typeof j.label=="function"?j.label():j.label})}):y.map(function(j){return j.value}),N=y.map(function(j){return qe(A(j.value))});e.onChange(d.value?I:I[0],d.value?N:N[0])}},ce=yn(null),de=be(ce,2),ae=de[0],se=de[1],pe=yn(0),ee=be(pe,2),Te=ee[0],fe=ee[1],xe=L(function(){return e.defaultActiveFirstOption!==void 0?e.defaultActiveFirstOption:e.mode!=="combobox"}),Fe=function(c,y){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},N=I.source,j=N===void 0?"keyboard":N;fe(y),e.backfill&&e.mode==="combobox"&&c!==null&&j==="keyboard"&&se(String(c))},P=function(c,y){var I=function(){var Ne,Ce=A(c),De=Ce==null?void 0:Ce[f.value.label];return[e.labelInValue?{label:typeof De=="function"?De():De,originLabel:De,value:c,key:(Ne=Ce==null?void 0:Ce.key)!==null&&Ne!==void 0?Ne:c}:c,qe(Ce)]};if(y&&e.onSelect){var N=I(),j=be(N,2),me=j[0],ve=j[1];e.onSelect(me,ve)}else if(!y&&e.onDeselect){var we=I(),_e=be(we,2),ue=_e[0],$e=_e[1];e.onDeselect(ue,$e)}},l=function(c,y){var I,N=d.value?y.selected:!0;N?I=d.value?[].concat(he(x.value),[c]):[c]:I=x.value.filter(function(j){return j.value!==c}),W(I),P(c,N),e.mode==="combobox"?se(""):(!d.value||e.autoClearSearchValue)&&(w(""),se(""))},T=function(c,y){W(c),(y.type==="remove"||y.type==="clear")&&y.values.forEach(function(I){P(I.value,!1)})},ne=function(c,y){var I;if(w(c),se(null),y.source==="submit"){var N=(c||"").trim();if(N){var j=Array.from(new Set([].concat(he(U.value),[N])));W(j),P(N,!0),w("")}return}y.source!=="blur"&&(e.mode==="combobox"&&W(c),(I=e.onSearch)===null||I===void 0||I.call(e,c))},z=function(c){var y=c;e.mode!=="tags"&&(y=c.map(function(N){var j=V.value.get(N);return j==null?void 0:j.value}).filter(function(N){return N!==void 0}));var I=Array.from(new Set([].concat(he(U.value),he(y))));W(I),I.forEach(function(N){P(N,!0)})},Z=L(function(){return e.virtual!==!1&&e.dropdownMatchSelectWidth!==!1});$t(Nn(B(B({},S),{flattenOptions:J,onActiveValue:Fe,defaultActiveFirstOption:xe,onSelect:l,menuItemSelectedIcon:Pe(e,"menuItemSelectedIcon"),rawValues:U,fieldNames:f,virtual:Z,listHeight:Pe(e,"listHeight"),listItemHeight:Pe(e,"listItemHeight"),childrenAsData:s})));var te=ie();t({focus:function(){var c;(c=te.value)===null||c===void 0||c.focus()},blur:function(){var c;(c=te.value)===null||c===void 0||c.blur()},scrollTo:function(c){var y;(y=te.value)===null||y===void 0||y.scrollTo(c)}});var le=L(function(){return We(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 function(){return _(jt,oe(oe(oe({},le.value),o),{},{id:u,prefixCls:e.prefixCls,ref:te,omitDomProps:oo,mode:e.mode,displayValues:G.value,onDisplayValuesChange:T,searchValue:h.value,onSearch:ne,onSearchSplit:z,dropdownMatchSelectWidth:e.dropdownMatchSelectWidth,OptionList:Xt,emptyOptions:!J.value.length,activeValue:ae.value,activeDescendantId:"".concat(u,"_list_").concat(Te.value)}),i)}}});var un=function(){return null};un.isSelectOption=!0;un.displayName="ASelectOption";const io=un;var rn=function(){return null};rn.isSelectOptGroup=!0;rn.displayName="ASelectOptGroup";const uo=rn;function ro(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.loading,t=n.multiple,o=n.prefixCls,i=n.suffixIcon||e.suffixIcon&&e.suffixIcon(),u=n.clearIcon||e.clearIcon&&e.clearIcon(),d=n.menuItemSelectedIcon||e.menuItemSelectedIcon&&e.menuItemSelectedIcon(),s=n.removeIcon||e.removeIcon&&e.removeIcon(),O=u;u||(O=_(tt,null,null));var f=null;if(i!==void 0)f=i;else if(a)f=_(ot,{spin:!0},null);else{var r="".concat(o,"-suffix");f=function(S){var R=S.open,V=S.showSearch;return R&&V?_(it,{class:r},null):_(ut,{class:r},null)}}var p=null;d!==void 0?p=d:t?p=_(at,null,null):p=null;var h=null;return s!==void 0?h=s:h=_(lt,null,null),{clearIcon:O,suffixIcon:f,itemIcon:p,removeIcon:h}}var co=function(){return B(B({},We(Kn(),["inputIcon","mode","getInputElement","getRawInputElement","backfill"])),{value:{type:[Array,Object,String,Number]},defaultValue:{type:[Array,Object,String,Number]},notFoundContent:C.any,suffixIcon:C.any,itemIcon:C.any,size:String,mode:String,bordered:{type:Boolean,default:!0},transitionName:String,choiceTransitionName:{type:String,default:""},"onUpdate:value":Function})},On="SECRET_COMBOBOX_MODE_DO_NOT_USE",ye=Oe({name:"ASelect",Option:io,OptGroup:uo,inheritAttrs:!1,props:en(co(),{listHeight:256,listItemHeight:24}),SECRET_COMBOBOX_MODE_DO_NOT_USE:On,slots:["notFoundContent","suffixIcon","itemIcon","removeIcon","clearIcon","dropdownRender","option","placeholder","tagRender","maxTagPlaceholder","optionLabel"],setup:function(e,a){var t=a.attrs,o=a.emit,i=a.slots,u=a.expose,d=ie(),s=ft(),O=function(){var b;(b=d.value)===null||b===void 0||b.focus()},f=function(){var b;(b=d.value)===null||b===void 0||b.blur()},r=function(b){var x;(x=d.value)===null||x===void 0||x.scrollTo(b)},p=L(function(){var m=e.mode;if(m!=="combobox")return m===On?"combobox":m}),h=rt("select",e),w=h.prefixCls,S=h.direction,R=h.configProvider,V=h.size,K=h.getPrefixCls,H=L(function(){return K()}),k=L(function(){return ct(H.value,"slide-up",e.transitionName)}),D=L(function(){var m;return Ie((m={},X(m,"".concat(w.value,"-lg"),V.value==="large"),X(m,"".concat(w.value,"-sm"),V.value==="small"),X(m,"".concat(w.value,"-rtl"),S.value==="rtl"),X(m,"".concat(w.value,"-borderless"),!e.bordered),m))}),g=function(){for(var b=arguments.length,x=new Array(b),A=0;A<b;A++)x[A]=arguments[A];o("update:value",x[0]),o.apply(void 0,["change"].concat(x)),s.onFieldChange()},v=function(b){o("blur",b),s.onFieldBlur()};u({blur:f,focus:O,scrollTo:r});var M=L(function(){return p.value==="multiple"||p.value==="tags"});return function(){var m,b,x=e.notFoundContent,A=e.listHeight,G=A===void 0?256:A,U=e.listItemHeight,Y=U===void 0?24:U,$=e.getPopupContainer,Q=e.dropdownClassName,q=e.virtual,re=e.dropdownMatchSelectWidth,J=e.id,W=J===void 0?s.id.value:J,ce=e.placeholder,de=ce===void 0?(m=i.placeholder)===null||m===void 0?void 0:m.call(i):ce,ae=R.renderEmpty,se=R.getPopupContainer,pe;x!==void 0?pe=x:i.notFoundContent?pe=i.notFoundContent():p.value==="combobox"?pe=null:pe=ae("Select");var ee=ro(B(B({},e),{multiple:M.value,prefixCls:w.value}),i),Te=ee.suffixIcon,fe=ee.itemIcon,xe=ee.removeIcon,Fe=ee.clearIcon,P=We(e,["prefixCls","suffixIcon","itemIcon","removeIcon","clearIcon","size","bordered"]),l=Ie(Q,X({},"".concat(w.value,"-dropdown-").concat(S.value),S.value==="rtl"));return _(lo,oe(oe(oe({ref:d,virtual:q,dropdownMatchSelectWidth:re},P),t),{},{placeholder:de,listHeight:G,listItemHeight:Y,mode:p.value,prefixCls:w.value,direction:S.value,inputIcon:Te,menuItemSelectedIcon:fe,removeIcon:xe,clearIcon:Fe,notFoundContent:pe,class:[D.value,t.class],getPopupContainer:$||se,dropdownClassName:l,onChange:g,onBlur:v,id:W,dropdownRender:P.dropdownRender||i.dropdownRender,transitionName:k.value,children:(b=i.default)===null||b===void 0?void 0:b.call(i),tagRender:e.tagRender||i.tagRender,optionLabelRender:i.optionLabel,maxTagPlaceholder:e.maxTagPlaceholder||i.maxTagPlaceholder}),{option:i.option})}}});ye.install=function(n){return n.component(ye.name,ye),n.component(ye.Option.displayName,ye.Option),n.component(ye.OptGroup.displayName,ye.OptGroup),n};var bo=ye.Option;ye.OptGroup;const yo=ye;export{jt as B,bo as S,yo as _,an as a,Wt as b,eo as c,ho as d,En as e,ro as g,co as s,Nn as t,At as u};