Files
filecodebox/fcb-fronted/dist/assets/el-select-3CzptGtE.js
T
2024-07-28 22:19:45 +08:00

2 lines
37 KiB
Python

import{bw as Vl,b6 as Le,bx as Bl,bu as pt,b8 as zl,bc as ke,b9 as vt,by as Vt,bz as Bt,bm as x,bA as Nl,bB as Hl,b as Me,_ as oe,d as J,l as ce,u as se,t as T,a as y,U as zt,bq as Ke,aB as mt,o as C,e as F,w as N,B as fe,W as P,f as O,g as W,h as ae,D as Pe,T as Wl,G as Nt,Y as A,C as G,ab as Ue,k as be,q as ue,aI as gt,R as Y,b5 as _,n as X,p as Ge,v as he,S as De,aX as Fl,r as V,i as Ie,Z as D,s as ne,j as Ht,bf as Wt,aQ as qe,y as Ft,$ as q,X as K,a6 as de,ap as kl,bC as Kl,am as Q,bD as Ul,bE as bt,a5 as Gl,aH as ql,bF as He,E as Xl,H as Ql,ag as Yl,aL as ht,aV as Jl,b2 as Zl,bG as jl,M as _l,V as le,bo as xl,ac as yt,a1 as St,a0 as ge,bH as en,bI as tn,bJ as ln,al as kt}from"./index-B8Am18SQ.js";import{r as nn,j as an,t as sn,e as Kt,u as Ut,v as on,w as rn,f as un,g as dn,c as fn,h as cn,U as j,C as Gt,b as pn}from"./el-input-DklOLKsm.js";import{U as wt,t as Ot,p as Et,b as Ct,S as Re,d as vn,k as mn,u as gn,v as bn,E as hn,C as yn,l as Sn}from"./el-popper-CE96w3Lg.js";import{s as wn,t as Tt,E as On}from"./el-tag-m5-RVRsg.js";var En=/\s/;function Cn(e){for(var t=e.length;t--&&En.test(e.charAt(t)););return t}var Tn=/^\s+/;function In(e){return e&&e.slice(0,Cn(e)+1).replace(Tn,"")}var It=NaN,Rn=/^[-+]0x[0-9a-f]+$/i,Ln=/^0b[01]+$/i,$n=/^0o[0-7]+$/i,An=parseInt;function Rt(e){if(typeof e=="number")return e;if(Vl(e))return It;if(Le(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Le(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=In(e);var a=Ln.test(e);return a||$n.test(e)?An(e.slice(2),a?2:8):Rn.test(e)?It:+e}function Mn(e,t,a,s){e.length;for(var i=a+1;i--;)if(t(e[i],i,e))return i;return-1}var Pn="__lodash_hash_undefined__";function Dn(e){return this.__data__.set(e,Pn),this}function Vn(e){return this.__data__.has(e)}function $e(e){var t=-1,a=e==null?0:e.length;for(this.__data__=new Bl;++t<a;)this.add(e[t])}$e.prototype.add=$e.prototype.push=Dn;$e.prototype.has=Vn;function Bn(e,t){for(var a=-1,s=e==null?0:e.length;++a<s;)if(t(e[a],a,e))return!0;return!1}function zn(e,t){return e.has(t)}var Nn=1,Hn=2;function qt(e,t,a,s,i,r){var l=a&Nn,c=e.length,u=t.length;if(c!=u&&!(l&&u>c))return!1;var v=r.get(e),b=r.get(t);if(v&&b)return v==t&&b==e;var f=-1,p=!0,m=a&Hn?new $e:void 0;for(r.set(e,t),r.set(t,e);++f<c;){var g=e[f],d=t[f];if(s)var E=l?s(d,g,f,t,e,r):s(g,d,f,e,t,r);if(E!==void 0){if(E)continue;p=!1;break}if(m){if(!Bn(t,function(L,I){if(!zn(m,I)&&(g===L||i(g,L,a,s,r)))return m.push(I)})){p=!1;break}}else if(!(g===d||i(g,d,a,s,r))){p=!1;break}}return r.delete(e),r.delete(t),p}function Wn(e){var t=-1,a=Array(e.size);return e.forEach(function(s,i){a[++t]=[i,s]}),a}function Fn(e){var t=-1,a=Array(e.size);return e.forEach(function(s){a[++t]=s}),a}var kn=1,Kn=2,Un="[object Boolean]",Gn="[object Date]",qn="[object Error]",Xn="[object Map]",Qn="[object Number]",Yn="[object RegExp]",Jn="[object Set]",Zn="[object String]",jn="[object Symbol]",_n="[object ArrayBuffer]",xn="[object DataView]",Lt=pt?pt.prototype:void 0,We=Lt?Lt.valueOf:void 0;function ea(e,t,a,s,i,r,l){switch(a){case xn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _n:return!(e.byteLength!=t.byteLength||!r(new wt(e),new wt(t)));case Un:case Gn:case Qn:return zl(+e,+t);case qn:return e.name==t.name&&e.message==t.message;case Yn:case Zn:return e==t+"";case Xn:var c=Wn;case Jn:var u=s&kn;if(c||(c=Fn),e.size!=t.size&&!u)return!1;var v=l.get(e);if(v)return v==t;s|=Kn,l.set(e,t);var b=qt(c(e),c(t),s,i,r,l);return l.delete(e),b;case jn:if(We)return We.call(e)==We.call(t)}return!1}var ta=1,la=Object.prototype,na=la.hasOwnProperty;function aa(e,t,a,s,i,r){var l=a&ta,c=Ot(e),u=c.length,v=Ot(t),b=v.length;if(u!=b&&!l)return!1;for(var f=u;f--;){var p=c[f];if(!(l?p in t:na.call(t,p)))return!1}var m=r.get(e),g=r.get(t);if(m&&g)return m==t&&g==e;var d=!0;r.set(e,t),r.set(t,e);for(var E=l;++f<u;){p=c[f];var L=e[p],I=t[p];if(s)var h=l?s(I,L,p,t,e,r):s(L,I,p,e,t,r);if(!(h===void 0?L===I||i(L,I,a,s,r):h)){d=!1;break}E||(E=p=="constructor")}if(d&&!E){var B=e.constructor,H=t.constructor;B!=H&&"constructor"in e&&"constructor"in t&&!(typeof B=="function"&&B instanceof B&&typeof H=="function"&&H instanceof H)&&(d=!1)}return r.delete(e),r.delete(t),d}var sa=1,$t="[object Arguments]",At="[object Array]",Te="[object Object]",oa=Object.prototype,Mt=oa.hasOwnProperty;function ia(e,t,a,s,i,r){var l=ke(e),c=ke(t),u=l?At:Et(e),v=c?At:Et(t);u=u==$t?Te:u,v=v==$t?Te:v;var b=u==Te,f=v==Te,p=u==v;if(p&&Ct(e)){if(!Ct(t))return!1;l=!0,b=!1}if(p&&!b)return r||(r=new Re),l||vn(e)?qt(e,t,a,s,i,r):ea(e,t,u,a,s,i,r);if(!(a&sa)){var m=b&&Mt.call(e,"__wrapped__"),g=f&&Mt.call(t,"__wrapped__");if(m||g){var d=m?e.value():e,E=g?t.value():t;return r||(r=new Re),i(d,E,a,s,r)}}return p?(r||(r=new Re),aa(e,t,a,s,i,r)):!1}function Ve(e,t,a,s,i){return e===t?!0:e==null||t==null||!vt(e)&&!vt(t)?e!==e&&t!==t:ia(e,t,a,s,Ve,i)}var ra=1,ua=2;function da(e,t,a,s){var i=a.length,r=i;if(e==null)return!r;for(e=Object(e);i--;){var l=a[i];if(l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<r;){l=a[i];var c=l[0],u=e[c],v=l[1];if(l[2]){if(u===void 0&&!(c in e))return!1}else{var b=new Re,f;if(!(f===void 0?Ve(v,u,ra|ua,s,b):f))return!1}}return!0}function Xt(e){return e===e&&!Le(e)}function fa(e){for(var t=mn(e),a=t.length;a--;){var s=t[a],i=e[s];t[a]=[s,i,Xt(i)]}return t}function Qt(e,t){return function(a){return a==null?!1:a[e]===t&&(t!==void 0||e in Object(a))}}function ca(e){var t=fa(e);return t.length==1&&t[0][2]?Qt(t[0][0],t[0][1]):function(a){return a===e||da(a,e,t)}}var pa=1,va=2;function ma(e,t){return Vt(e)&&Xt(t)?Qt(Bt(e),t):function(a){var s=x(a,e);return s===void 0&&s===t?nn(a,e):Ve(t,s,pa|va)}}function ga(e){return function(t){return t==null?void 0:t[e]}}function ba(e){return function(t){return Nl(t,e)}}function ha(e){return Vt(e)?ga(Bt(e)):ba(e)}function ya(e){return typeof e=="function"?e:e==null?an:typeof e=="object"?ke(e)?ma(e[0],e[1]):ca(e):ha(e)}var Fe=function(){return Hl.Date.now()},Sa="Expected a function",wa=Math.max,Oa=Math.min;function Ea(e,t,a){var s,i,r,l,c,u,v=0,b=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(Sa);t=Rt(t)||0,Le(a)&&(b=!!a.leading,f="maxWait"in a,r=f?wa(Rt(a.maxWait)||0,t):r,p="trailing"in a?!!a.trailing:p);function m(S){var w=s,M=i;return s=i=void 0,v=S,l=e.apply(M,w),l}function g(S){return v=S,c=setTimeout(L,t),b?m(S):l}function d(S){var w=S-u,M=S-v,U=t-w;return f?Oa(U,r-M):U}function E(S){var w=S-u,M=S-v;return u===void 0||w>=t||w<0||f&&M>=r}function L(){var S=Fe();if(E(S))return I(S);c=setTimeout(L,d(S))}function I(S){return c=void 0,p&&s?m(S):(s=i=void 0,l)}function h(){c!==void 0&&clearTimeout(c),v=0,s=u=i=c=void 0}function B(){return c===void 0?l:I(Fe())}function H(){var S=Fe(),w=E(S);if(s=arguments,i=this,u=S,w){if(c===void 0)return g(u);if(f)return clearTimeout(c),c=setTimeout(L,t),m(u)}return c===void 0&&(c=setTimeout(L,t)),l}return H.cancel=h,H.flush=B,H}function Ca(e,t,a){var s=e==null?0:e.length;if(!s)return-1;var i=s-1;return Mn(e,ya(t),i)}function Ae(e,t){return Ve(e,t)}const Ta=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),re=4,Ia={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},Ra=({move:e,size:t,bar:a})=>({[a.size]:t,transform:`translate${a.axis}(${e}%)`}),Xe=Symbol("scrollbarContextKey"),La=Me({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),$a="Thumb",Aa=J({__name:"thumb",props:La,setup(e){const t=e,a=ce(Xe),s=se("scrollbar");a||sn($a,"can not inject scrollbar context");const i=T(),r=T(),l=T({}),c=T(!1);let u=!1,v=!1,b=Nt?document.onselectstart:null;const f=y(()=>Ia[t.vertical?"vertical":"horizontal"]),p=y(()=>Ra({size:t.size,move:t.move,bar:f.value})),m=y(()=>i.value[f.value.offset]**2/a.wrapElement[f.value.scrollSize]/t.ratio/r.value[f.value.offset]),g=S=>{var w;if(S.stopPropagation(),S.ctrlKey||[1,2].includes(S.button))return;(w=window.getSelection())==null||w.removeAllRanges(),E(S);const M=S.currentTarget;M&&(l.value[f.value.axis]=M[f.value.offset]-(S[f.value.client]-M.getBoundingClientRect()[f.value.direction]))},d=S=>{if(!r.value||!i.value||!a.wrapElement)return;const w=Math.abs(S.target.getBoundingClientRect()[f.value.direction]-S[f.value.client]),M=r.value[f.value.offset]/2,U=(w-M)*100*m.value/i.value[f.value.offset];a.wrapElement[f.value.scroll]=U*a.wrapElement[f.value.scrollSize]/100},E=S=>{S.stopImmediatePropagation(),u=!0,document.addEventListener("mousemove",L),document.addEventListener("mouseup",I),b=document.onselectstart,document.onselectstart=()=>!1},L=S=>{if(!i.value||!r.value||u===!1)return;const w=l.value[f.value.axis];if(!w)return;const M=(i.value.getBoundingClientRect()[f.value.direction]-S[f.value.client])*-1,U=r.value[f.value.offset]-w,ee=(M-U)*100*m.value/i.value[f.value.offset];a.wrapElement[f.value.scroll]=ee*a.wrapElement[f.value.scrollSize]/100},I=()=>{u=!1,l.value[f.value.axis]=0,document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",I),H(),v&&(c.value=!1)},h=()=>{v=!1,c.value=!!t.size},B=()=>{v=!0,c.value=u};zt(()=>{H(),document.removeEventListener("mouseup",I)});const H=()=>{document.onselectstart!==b&&(document.onselectstart=b)};return Ke(mt(a,"scrollbarElement"),"mousemove",h),Ke(mt(a,"scrollbarElement"),"mouseleave",B),(S,w)=>(C(),F(Wl,{name:W(s).b("fade"),persisted:""},{default:N(()=>[fe(P("div",{ref_key:"instance",ref:i,class:O([W(s).e("bar"),W(s).is(W(f).key)]),onMousedown:d},[P("div",{ref_key:"thumb",ref:r,class:O(W(s).e("thumb")),style:ae(W(p)),onMousedown:g},null,38)],34),[[Pe,S.always||c.value]])]),_:1},8,["name"]))}});var Pt=oe(Aa,[["__file","thumb.vue"]]);const Ma=Me({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),Pa=J({__name:"bar",props:Ma,setup(e,{expose:t}){const a=e,s=ce(Xe),i=T(0),r=T(0),l=T(""),c=T(""),u=T(1),v=T(1);return t({handleScroll:p=>{if(p){const m=p.offsetHeight-re,g=p.offsetWidth-re;r.value=p.scrollTop*100/m*u.value,i.value=p.scrollLeft*100/g*v.value}},update:()=>{const p=s==null?void 0:s.wrapElement;if(!p)return;const m=p.offsetHeight-re,g=p.offsetWidth-re,d=m**2/p.scrollHeight,E=g**2/p.scrollWidth,L=Math.max(d,a.minSize),I=Math.max(E,a.minSize);u.value=d/(m-d)/(L/(m-L)),v.value=E/(g-E)/(I/(g-I)),c.value=L+re<m?`${L}px`:"",l.value=I+re<g?`${I}px`:""}}),(p,m)=>(C(),A(Ue,null,[G(Pt,{move:i.value,ratio:v.value,size:l.value,always:p.always},null,8,["move","ratio","size","always"]),G(Pt,{move:r.value,ratio:u.value,size:c.value,vertical:"",always:p.always},null,8,["move","ratio","size","always"])],64))}});var Da=oe(Pa,[["__file","bar.vue"]]);const Va=Me({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:be([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},id:String,role:String,...Kt(["ariaLabel","ariaOrientation"])}),Ba={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(ue)},za="ElScrollbar",Na=J({name:za}),Ha=J({...Na,props:Va,emits:Ba,setup(e,{expose:t,emit:a}){const s=e,i=se("scrollbar");let r,l;const c=T(),u=T(),v=T(),b=T(),f=y(()=>{const h={};return s.height&&(h.height=gt(s.height)),s.maxHeight&&(h.maxHeight=gt(s.maxHeight)),[s.wrapStyle,h]}),p=y(()=>[s.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!s.native}]),m=y(()=>[i.e("view"),s.viewClass]),g=()=>{var h;u.value&&((h=b.value)==null||h.handleScroll(u.value),a("scroll",{scrollTop:u.value.scrollTop,scrollLeft:u.value.scrollLeft}))};function d(h,B){ne(h)?u.value.scrollTo(h):ue(h)&&ue(B)&&u.value.scrollTo(h,B)}const E=h=>{ue(h)&&(u.value.scrollTop=h)},L=h=>{ue(h)&&(u.value.scrollLeft=h)},I=()=>{var h;(h=b.value)==null||h.update()};return Y(()=>s.noresize,h=>{h?(r==null||r(),l==null||l()):({stop:r}=_(v,I),l=Ke("resize",I))},{immediate:!0}),Y(()=>[s.maxHeight,s.height],()=>{s.native||X(()=>{var h;I(),u.value&&((h=b.value)==null||h.handleScroll(u.value))})}),Ge(Xe,he({scrollbarElement:c,wrapElement:u})),De(()=>{s.native||X(()=>{I()})}),Fl(()=>I()),t({wrapRef:u,update:I,scrollTo:d,setScrollTop:E,setScrollLeft:L,handleScroll:g}),(h,B)=>(C(),A("div",{ref_key:"scrollbarRef",ref:c,class:O(W(i).b())},[P("div",{ref_key:"wrapRef",ref:u,class:O(W(p)),style:ae(W(f)),onScroll:g},[(C(),F(Ie(h.tag),{id:h.id,ref_key:"resizeRef",ref:v,class:O(W(m)),style:ae(h.viewStyle),role:h.role,"aria-label":h.ariaLabel,"aria-orientation":h.ariaOrientation},{default:N(()=>[V(h.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),h.native?D("v-if",!0):(C(),F(Da,{key:0,ref_key:"barRef",ref:b,always:h.always,"min-size":h.minSize},null,8,["always","min-size"]))],2))}});var Wa=oe(Ha,[["__file","scrollbar.vue"]]);const Fa=Ht(Wa),Yt=Symbol("ElSelectGroup"),Be=Symbol("ElSelect");function ka(e,t){const a=ce(Be),s=ce(Yt,{disabled:!1}),i=y(()=>a.props.multiple?b(a.props.modelValue,e.value):b([a.props.modelValue],e.value)),r=y(()=>{if(a.props.multiple){const m=a.props.modelValue||[];return!i.value&&m.length>=a.props.multipleLimit&&a.props.multipleLimit>0}else return!1}),l=y(()=>e.label||(ne(e.value)?"":e.value)),c=y(()=>e.value||e.label||""),u=y(()=>e.disabled||t.groupDisabled||r.value),v=qe(),b=(m=[],g)=>{if(ne(e.value)){const d=a.props.valueKey;return m&&m.some(E=>Wt(x(E,d))===x(g,d))}else return m&&m.includes(g)},f=()=>{!e.disabled&&!s.disabled&&(a.states.hoveringIndex=a.optionsArray.indexOf(v.proxy))},p=m=>{const g=new RegExp(Ta(m),"i");t.visible=g.test(l.value)||e.created};return Y(()=>l.value,()=>{!e.created&&!a.props.remote&&a.setSelected()}),Y(()=>e.value,(m,g)=>{const{remote:d,valueKey:E}=a.props;if(Ae(m,g)||(a.onOptionDestroy(g,v.proxy),a.onOptionCreate(v.proxy)),!e.created&&!d){if(E&&ne(m)&&ne(g)&&m[E]===g[E])return;a.setSelected()}}),Y(()=>s.disabled,()=>{t.groupDisabled=s.disabled},{immediate:!0}),{select:a,currentLabel:l,currentValue:c,itemSelected:i,isDisabled:u,hoverItem:f,updateOption:p}}const Ka=J({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=se("select"),a=Ut(),s=y(()=>[t.be("dropdown","item"),t.is("disabled",W(c)),t.is("selected",W(l)),t.is("hovering",W(p))]),i=he({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:r,itemSelected:l,isDisabled:c,select:u,hoverItem:v,updateOption:b}=ka(e,i),{visible:f,hover:p}=Ft(i),m=qe().proxy;u.onOptionCreate(m),zt(()=>{const d=m.value,{selected:E}=u.states,I=(u.props.multiple?E:[E]).some(h=>h.value===m.value);X(()=>{u.states.cachedOptions.get(d)===m&&!I&&u.states.cachedOptions.delete(d)}),u.onOptionDestroy(d,m)});function g(){e.disabled!==!0&&i.groupDisabled!==!0&&u.handleOptionSelect(m)}return{ns:t,id:a,containerKls:s,currentLabel:r,itemSelected:l,isDisabled:c,select:u,hoverItem:v,updateOption:b,visible:f,hover:p,selectOptionClick:g,states:i}}}),Ua=["id","aria-disabled","aria-selected"];function Ga(e,t,a,s,i,r){return fe((C(),A("li",{id:e.id,class:O(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...l)=>e.hoverItem&&e.hoverItem(...l)),onClick:t[1]||(t[1]=K((...l)=>e.selectOptionClick&&e.selectOptionClick(...l),["stop"]))},[V(e.$slots,"default",{},()=>[P("span",null,q(e.currentLabel),1)])],42,Ua)),[[Pe,e.visible]])}var Qe=oe(Ka,[["render",Ga],["__file","option.vue"]]);const qa=J({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=ce(Be),t=se("select"),a=y(()=>e.props.popperClass),s=y(()=>e.props.multiple),i=y(()=>e.props.fitInputWidth),r=T("");function l(){var c;r.value=`${(c=e.selectRef)==null?void 0:c.offsetWidth}px`}return De(()=>{l(),_(e.selectRef,l)}),{ns:t,minWidth:r,popperClass:a,isMultiple:s,isFitInputWidth:i}}});function Xa(e,t,a,s,i,r){return C(),A("div",{class:O([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:ae({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(C(),A("div",{key:0,class:O(e.ns.be("dropdown","header"))},[V(e.$slots,"header")],2)):D("v-if",!0),V(e.$slots,"default"),e.$slots.footer?(C(),A("div",{key:1,class:O(e.ns.be("dropdown","footer"))},[V(e.$slots,"footer")],2)):D("v-if",!0)],6)}var Qa=oe(qa,[["render",Xa],["__file","select-dropdown.vue"]]);function Ya(e){const t=T(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:r=>{const l=r.target.value,c=l[l.length-1]||"";t.value=!on(c)},handleCompositionEnd:r=>{t.value&&(t.value=!1,de(e)&&e(r))}}}const Ja=11,Za=(e,t)=>{const{t:a}=kl(),s=Ut(),i=se("select"),r=se("input"),l=he({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:e.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),c=T(null),u=T(null),v=T(null),b=T(null),f=T(null),p=T(null),m=T(null),g=T(null),d=T(null),E=T(null),L=T(null),I=T(null),{wrapperRef:h,isFocused:B,handleFocus:H,handleBlur:S}=rn(f,{afterFocus(){e.automaticDropdown&&!w.value&&(w.value=!0,l.menuVisibleOnFocus=!0)},beforeBlur(n){var o,R;return((o=v.value)==null?void 0:o.isFocusInsideContent(n))||((R=b.value)==null?void 0:R.isFocusInsideContent(n))},afterBlur(){w.value=!1,l.menuVisibleOnFocus=!1}}),w=T(!1),M=T(),{form:U,formItem:ee}=un(),{inputId:Zt}=dn(e,{formItemContext:ee}),{valueOnClear:jt,isEmptyValue:_t}=Kl(e),ye=y(()=>e.disabled||(U==null?void 0:U.disabled)),ze=y(()=>e.multiple?Q(e.modelValue)&&e.modelValue.length>0:!_t(e.modelValue)),xt=y(()=>e.clearable&&!ye.value&&l.inputHovering&&ze.value),Ye=y(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),el=y(()=>i.is("reverse",Ye.value&&w.value)),Je=y(()=>(ee==null?void 0:ee.validateState)||""),tl=y(()=>Ul[Je.value]),ll=y(()=>e.remote?300:0),Ze=y(()=>e.loading?e.loadingText||a("el.select.loading"):e.remote&&!l.inputValue&&l.options.size===0?!1:e.filterable&&l.inputValue&&l.options.size>0&&pe.value===0?e.noMatchText||a("el.select.noMatch"):l.options.size===0?e.noDataText||a("el.select.noData"):null),pe=y(()=>z.value.filter(n=>n.visible).length),z=y(()=>{const n=Array.from(l.options.values()),o=[];return l.optionValues.forEach(R=>{const $=n.findIndex(Z=>Z.value===R);$>-1&&o.push(n[$])}),o.length>=n.length?o:n}),nl=y(()=>Array.from(l.cachedOptions.values())),al=y(()=>{const n=z.value.filter(o=>!o.created).some(o=>o.currentLabel===l.inputValue);return e.filterable&&e.allowCreate&&l.inputValue!==""&&!n}),je=()=>{e.filterable&&de(e.filterMethod)||e.filterable&&e.remote&&de(e.remoteMethod)||z.value.forEach(n=>{var o;(o=n.updateOption)==null||o.call(n,l.inputValue)})},_e=fn(),sl=y(()=>["small"].includes(_e.value)?"small":"default"),ol=y({get(){return w.value&&Ze.value!==!1},set(n){w.value=n}}),il=y(()=>Q(e.modelValue)?e.modelValue.length===0&&!l.inputValue:e.filterable?!l.inputValue:!0),rl=y(()=>{var n;const o=(n=e.placeholder)!=null?n:a("el.select.placeholder");return e.multiple||!ze.value?o:l.selectedLabel}),ul=y(()=>bt?null:"mouseenter");Y(()=>e.modelValue,(n,o)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(l.inputValue="",Se("")),we(),!Ae(n,o)&&e.validateEvent&&(ee==null||ee.validate("change").catch(R=>cn()))},{flush:"post",deep:!0}),Y(()=>w.value,n=>{n?Se(l.inputValue):(l.inputValue="",l.previousQuery=null,l.isBeforeHide=!0),t("visible-change",n)}),Y(()=>l.options.entries(),()=>{var n;if(!Nt)return;const o=((n=c.value)==null?void 0:n.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!Gl(e.modelValue)||!Array.from(o).includes(document.activeElement))&&we(),e.defaultFirstOption&&(e.filterable||e.remote)&&pe.value&&xe()},{flush:"post"}),Y(()=>l.hoveringIndex,n=>{ue(n)&&n>-1?M.value=z.value[n]||{}:M.value={},z.value.forEach(o=>{o.hover=M.value===o})}),ql(()=>{l.isBeforeHide||je()});const Se=n=>{l.previousQuery!==n&&(l.previousQuery=n,e.filterable&&de(e.filterMethod)?e.filterMethod(n):e.filterable&&e.remote&&de(e.remoteMethod)&&e.remoteMethod(n),e.defaultFirstOption&&(e.filterable||e.remote)&&pe.value?X(xe):X(dl))},xe=()=>{const n=z.value.filter($=>$.visible&&!$.disabled&&!$.states.groupDisabled),o=n.find($=>$.created),R=n[0];l.hoveringIndex=rt(z.value,o||R)},we=()=>{if(e.multiple)l.selectedLabel="";else{const o=et(e.modelValue);l.selectedLabel=o.currentLabel,l.selected=o;return}const n=[];Q(e.modelValue)&&e.modelValue.forEach(o=>{n.push(et(o))}),l.selected=n},et=n=>{let o;const R=He(n).toLowerCase()==="object",$=He(n).toLowerCase()==="null",Z=He(n).toLowerCase()==="undefined";for(let te=l.cachedOptions.size-1;te>=0;te--){const k=nl.value[te];if(R?x(k.value,e.valueKey)===x(n,e.valueKey):k.value===n){o={value:n,currentLabel:k.currentLabel,get isDisabled(){return k.isDisabled}};break}}if(o)return o;const ie=R?n.label:!$&&!Z?n:"";return{value:n,currentLabel:ie}},dl=()=>{e.multiple?l.hoveringIndex=z.value.findIndex(n=>l.selected.some(o=>me(o)===me(n))):l.hoveringIndex=z.value.findIndex(n=>me(n)===me(l.selected))},fl=()=>{l.selectionWidth=u.value.getBoundingClientRect().width},tt=()=>{l.calculatorWidth=p.value.getBoundingClientRect().width},cl=()=>{l.collapseItemWidth=L.value.getBoundingClientRect().width},Ne=()=>{var n,o;(o=(n=v.value)==null?void 0:n.updatePopper)==null||o.call(n)},lt=()=>{var n,o;(o=(n=b.value)==null?void 0:n.updatePopper)==null||o.call(n)},nt=()=>{l.inputValue.length>0&&!w.value&&(w.value=!0),Se(l.inputValue)},at=n=>{if(l.inputValue=n.target.value,e.remote)st();else return nt()},st=Ea(()=>{nt()},ll.value),ve=n=>{Ae(e.modelValue,n)||t(Gt,n)},pl=n=>Ca(n,o=>!l.disabledOptions.has(o)),vl=n=>{if(e.multiple&&n.code!==Xl.delete&&n.target.value.length<=0){const o=e.modelValue.slice(),R=pl(o);if(R<0)return;const $=o[R];o.splice(R,1),t(j,o),ve(o),t("remove-tag",$)}},ml=(n,o)=>{const R=l.selected.indexOf(o);if(R>-1&&!ye.value){const $=e.modelValue.slice();$.splice(R,1),t(j,$),ve($),t("remove-tag",o.value)}n.stopPropagation(),Ee()},ot=n=>{n.stopPropagation();const o=e.multiple?[]:jt.value;if(e.multiple)for(const R of l.selected)R.isDisabled&&o.push(R.value);t(j,o),ve(o),l.hoveringIndex=-1,w.value=!1,t("clear"),Ee()},it=n=>{if(e.multiple){const o=(e.modelValue||[]).slice(),R=rt(o,n.value);R>-1?o.splice(R,1):(e.multipleLimit<=0||o.length<e.multipleLimit)&&o.push(n.value),t(j,o),ve(o),n.created&&Se(""),e.filterable&&!e.reserveKeyword&&(l.inputValue="")}else t(j,n.value),ve(n.value),w.value=!1;Ee(),!w.value&&X(()=>{Oe(n)})},rt=(n=[],o)=>{if(!ne(o))return n.indexOf(o);const R=e.valueKey;let $=-1;return n.some((Z,ie)=>Wt(x(Z,R))===x(o,R)?($=ie,!0):!1),$},Oe=n=>{var o,R,$,Z,ie;const Ce=Q(n)?n[0]:n;let te=null;if(Ce!=null&&Ce.value){const k=z.value.filter(ct=>ct.value===Ce.value);k.length>0&&(te=k[0].$el)}if(v.value&&te){const k=(Z=($=(R=(o=v.value)==null?void 0:o.popperRef)==null?void 0:R.contentRef)==null?void 0:$.querySelector)==null?void 0:Z.call($,`.${i.be("dropdown","wrap")}`);k&&wn(k,te)}(ie=I.value)==null||ie.handleScroll()},gl=n=>{l.options.set(n.value,n),l.cachedOptions.set(n.value,n),n.disabled&&l.disabledOptions.set(n.value,n)},bl=(n,o)=>{l.options.get(n)===o&&l.options.delete(n)},{handleCompositionStart:hl,handleCompositionUpdate:yl,handleCompositionEnd:Sl}=Ya(n=>at(n)),wl=y(()=>{var n,o;return(o=(n=v.value)==null?void 0:n.popperRef)==null?void 0:o.contentRef}),Ol=()=>{l.isBeforeHide=!1,X(()=>Oe(l.selected))},Ee=()=>{var n;(n=f.value)==null||n.focus()},El=()=>{ut()},Cl=n=>{ot(n)},ut=n=>{if(w.value=!1,B.value){const o=new FocusEvent("focus",n);X(()=>S(o))}},Tl=()=>{l.inputValue.length>0?l.inputValue="":w.value=!1},dt=()=>{ye.value||(bt&&(l.inputHovering=!0),l.menuVisibleOnFocus?l.menuVisibleOnFocus=!1:w.value=!w.value)},Il=()=>{w.value?z.value[l.hoveringIndex]&&it(z.value[l.hoveringIndex]):dt()},me=n=>ne(n.value)?x(n.value,e.valueKey):n.value,Rl=y(()=>z.value.filter(n=>n.visible).every(n=>n.disabled)),Ll=y(()=>e.multiple?e.collapseTags?l.selected.slice(0,e.maxCollapseTags):l.selected:[]),$l=y(()=>e.multiple?e.collapseTags?l.selected.slice(e.maxCollapseTags):[]:[]),ft=n=>{if(!w.value){w.value=!0;return}if(!(l.options.size===0||pe.value===0)&&!Rl.value){n==="next"?(l.hoveringIndex++,l.hoveringIndex===l.options.size&&(l.hoveringIndex=0)):n==="prev"&&(l.hoveringIndex--,l.hoveringIndex<0&&(l.hoveringIndex=l.options.size-1));const o=z.value[l.hoveringIndex];(o.disabled===!0||o.states.groupDisabled===!0||!o.visible)&&ft(n),X(()=>Oe(M.value))}},Al=()=>{if(!u.value)return 0;const n=window.getComputedStyle(u.value);return Number.parseFloat(n.gap||"6px")},Ml=y(()=>{const n=Al();return{maxWidth:`${L.value&&e.maxCollapseTags===1?l.selectionWidth-l.collapseItemWidth-n:l.selectionWidth}px`}}),Pl=y(()=>({maxWidth:`${l.selectionWidth}px`})),Dl=y(()=>({width:`${Math.max(l.calculatorWidth,Ja)}px`}));return e.multiple&&!Q(e.modelValue)&&t(j,[]),!e.multiple&&Q(e.modelValue)&&t(j,""),_(u,fl),_(p,tt),_(d,Ne),_(h,Ne),_(E,lt),_(L,cl),De(()=>{we()}),{inputId:Zt,contentId:s,nsSelect:i,nsInput:r,states:l,isFocused:B,expanded:w,optionsArray:z,hoverOption:M,selectSize:_e,filteredOptionsCount:pe,resetCalculatorWidth:tt,updateTooltip:Ne,updateTagTooltip:lt,debouncedOnInputChange:st,onInput:at,deletePrevTag:vl,deleteTag:ml,deleteSelected:ot,handleOptionSelect:it,scrollToOption:Oe,hasModelValue:ze,shouldShowPlaceholder:il,currentPlaceholder:rl,mouseEnterEventName:ul,showClose:xt,iconComponent:Ye,iconReverse:el,validateState:Je,validateIcon:tl,showNewOption:al,updateOptions:je,collapseTagSize:sl,setSelected:we,selectDisabled:ye,emptyText:Ze,handleCompositionStart:hl,handleCompositionUpdate:yl,handleCompositionEnd:Sl,onOptionCreate:gl,onOptionDestroy:bl,handleMenuEnter:Ol,handleFocus:H,focus:Ee,blur:El,handleBlur:S,handleClearClick:Cl,handleClickOutside:ut,handleEsc:Tl,toggleMenu:dt,selectOption:Il,getValueKey:me,navigateOptions:ft,dropdownMenuVisible:ol,showTagList:Ll,collapseTagList:$l,tagStyle:Ml,collapseTagStyle:Pl,inputStyle:Dl,popperRef:wl,inputRef:f,tooltipRef:v,tagTooltipRef:b,calculatorRef:p,prefixRef:m,suffixRef:g,selectRef:c,wrapperRef:h,selectionRef:u,scrollbarRef:I,menuRef:d,tagMenuRef:E,collapseItemRef:L}};var ja=J({name:"ElOptions",setup(e,{slots:t}){const a=ce(Be);let s=[];return()=>{var i,r;const l=(i=t.default)==null?void 0:i.call(t),c=[];function u(v){Q(v)&&v.forEach(b=>{var f,p,m,g;const d=(f=(b==null?void 0:b.type)||{})==null?void 0:f.name;d==="ElOptionGroup"?u(!Ql(b.children)&&!Q(b.children)&&de((p=b.children)==null?void 0:p.default)?(m=b.children)==null?void 0:m.default():b.children):d==="ElOption"?c.push((g=b.props)==null?void 0:g.value):Q(b.children)&&u(b.children)})}return l.length&&u((r=l[0])==null?void 0:r.children),Ae(c,s)||(s=c,a&&(a.states.optionValues=c)),l}}});const _a=Me({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Yl,effect:{type:be(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:be(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:gn.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:ht,default:Jl},fitInputWidth:Boolean,suffixIcon:{type:ht,default:Zl},tagType:{...Tt.type,default:"info"},tagEffect:{...Tt.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:be(String),values:bn,default:"bottom-start"},fallbackPlacements:{type:be(Array),default:["bottom-start","top-start","right","left"]},...jl,...Kt(["ariaLabel"])}),Dt="ElSelect",xa=J({name:Dt,componentName:Dt,components:{ElInput:pn,ElSelectMenu:Qa,ElOption:Qe,ElOptions:ja,ElTag:On,ElScrollbar:Fa,ElTooltip:hn,ElIcon:_l},directives:{ClickOutside:yn},props:_a,emits:[j,Gt,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const a=Za(e,t);return Ge(Be,he({props:e,states:a.states,optionsArray:a.optionsArray,handleOptionSelect:a.handleOptionSelect,onOptionCreate:a.onOptionCreate,onOptionDestroy:a.onOptionDestroy,selectRef:a.selectRef,setSelected:a.setSelected})),{...a}}}),es=["id","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],ts=["textContent"],ls={key:1};function ns(e,t,a,s,i,r){const l=le("el-tag"),c=le("el-tooltip"),u=le("el-icon"),v=le("el-option"),b=le("el-options"),f=le("el-scrollbar"),p=le("el-select-menu"),m=xl("click-outside");return fe((C(),A("div",{ref:"selectRef",class:O([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[tn(e.mouseEnterEventName)]:t[16]||(t[16]=g=>e.states.inputHovering=!0),onMouseleave:t[17]||(t[17]=g=>e.states.inputHovering=!1),onClick:t[18]||(t[18]=K((...g)=>e.toggleMenu&&e.toggleMenu(...g),["prevent","stop"]))},[G(c,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[15]||(t[15]=g=>e.states.isBeforeHide=!1)},{default:N(()=>{var g;return[P("div",{ref:"wrapperRef",class:O([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)])},[e.$slots.prefix?(C(),A("div",{key:0,ref:"prefixRef",class:O(e.nsSelect.e("prefix"))},[V(e.$slots,"prefix")],2)):D("v-if",!0),P("div",{ref:"selectionRef",class:O([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?V(e.$slots,"tag",{key:0},()=>[(C(!0),A(Ue,null,yt(e.showTagList,d=>(C(),A("div",{key:e.getValueKey(d),class:O(e.nsSelect.e("selected-item"))},[G(l,{closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:ae(e.tagStyle),onClose:E=>e.deleteTag(E,d)},{default:N(()=>[P("span",{class:O(e.nsSelect.e("tags-text"))},[V(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[St(q(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(C(),F(c,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:N(()=>[P("div",{ref:"collapseItemRef",class:O(e.nsSelect.e("selected-item"))},[G(l,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:ae(e.collapseTagStyle)},{default:N(()=>[P("span",{class:O(e.nsSelect.e("tags-text"))}," + "+q(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:N(()=>[P("div",{ref:"tagMenuRef",class:O(e.nsSelect.e("selection"))},[(C(!0),A(Ue,null,yt(e.collapseTagList,d=>(C(),A("div",{key:e.getValueKey(d),class:O(e.nsSelect.e("selected-item"))},[G(l,{class:"in-tooltip",closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:E=>e.deleteTag(E,d)},{default:N(()=>[P("span",{class:O(e.nsSelect.e("tags-text"))},[V(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[St(q(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):D("v-if",!0)]):D("v-if",!0),e.selectDisabled?D("v-if",!0):(C(),A("div",{key:1,class:O([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[fe(P("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=d=>e.states.inputValue=d),type:"text",name:e.name,class:O([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:ae(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((g=e.hoverOption)==null?void 0:g.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:t[1]||(t[1]=(...d)=>e.handleFocus&&e.handleFocus(...d)),onBlur:t[2]||(t[2]=(...d)=>e.handleBlur&&e.handleBlur(...d)),onKeydown:[t[3]||(t[3]=ge(K(d=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[4]||(t[4]=ge(K(d=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),t[5]||(t[5]=ge(K((...d)=>e.handleEsc&&e.handleEsc(...d),["stop","prevent"]),["esc"])),t[6]||(t[6]=ge(K((...d)=>e.selectOption&&e.selectOption(...d),["stop","prevent"]),["enter"])),t[7]||(t[7]=ge(K((...d)=>e.deletePrevTag&&e.deletePrevTag(...d),["stop"]),["delete"]))],onCompositionstart:t[8]||(t[8]=(...d)=>e.handleCompositionStart&&e.handleCompositionStart(...d)),onCompositionupdate:t[9]||(t[9]=(...d)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...d)),onCompositionend:t[10]||(t[10]=(...d)=>e.handleCompositionEnd&&e.handleCompositionEnd(...d)),onInput:t[11]||(t[11]=(...d)=>e.onInput&&e.onInput(...d)),onClick:t[12]||(t[12]=K((...d)=>e.toggleMenu&&e.toggleMenu(...d),["stop"]))},null,46,es),[[en,e.states.inputValue]]),e.filterable?(C(),A("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:O(e.nsSelect.e("input-calculator")),textContent:q(e.states.inputValue)},null,10,ts)):D("v-if",!0)],2)),e.shouldShowPlaceholder?(C(),A("div",{key:2,class:O([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?V(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[P("span",null,q(e.currentPlaceholder),1)]):(C(),A("span",ls,q(e.currentPlaceholder),1))],2)):D("v-if",!0)],2),P("div",{ref:"suffixRef",class:O(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(C(),F(u,{key:0,class:O([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:N(()=>[(C(),F(Ie(e.iconComponent)))]),_:1},8,["class"])):D("v-if",!0),e.showClose&&e.clearIcon?(C(),F(u,{key:1,class:O([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:N(()=>[(C(),F(Ie(e.clearIcon)))]),_:1},8,["class","onClick"])):D("v-if",!0),e.validateState&&e.validateIcon?(C(),F(u,{key:2,class:O([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:N(()=>[(C(),F(Ie(e.validateIcon)))]),_:1},8,["class"])):D("v-if",!0)],2)],2)]}),content:N(()=>[G(p,{ref:"menuRef"},{default:N(()=>[e.$slots.header?(C(),A("div",{key:0,class:O(e.nsSelect.be("dropdown","header")),onClick:t[13]||(t[13]=K(()=>{},["stop"]))},[V(e.$slots,"header")],2)):D("v-if",!0),fe(G(f,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:O([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:N(()=>[e.showNewOption?(C(),F(v,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):D("v-if",!0),G(b,null,{default:N(()=>[V(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[Pe,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(C(),A("div",{key:1,class:O(e.nsSelect.be("dropdown","loading"))},[V(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(C(),A("div",{key:2,class:O(e.nsSelect.be("dropdown","empty"))},[V(e.$slots,"empty",{},()=>[P("span",null,q(e.emptyText),1)])],2)):D("v-if",!0),e.$slots.footer?(C(),A("div",{key:3,class:O(e.nsSelect.be("dropdown","footer")),onClick:t[14]||(t[14]=K(()=>{},["stop"]))},[V(e.$slots,"footer")],2)):D("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","onBeforeShow"])],16)),[[m,e.handleClickOutside,e.popperRef]])}var as=oe(xa,[["render",ns],["__file","select.vue"]]);const ss=J({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=se("select"),a=T(null),s=qe(),i=T([]);Ge(Yt,he({...Ft(e)}));const r=y(()=>i.value.some(v=>v.visible===!0)),l=v=>{var b,f;return((b=v.type)==null?void 0:b.name)==="ElOption"&&!!((f=v.component)!=null&&f.proxy)},c=v=>{const b=Sn(v),f=[];return b.forEach(p=>{var m,g;l(p)?f.push(p.component.proxy):(m=p.children)!=null&&m.length?f.push(...c(p.children)):(g=p.component)!=null&&g.subTree&&f.push(...c(p.component.subTree))}),f},u=()=>{i.value=c(s.subTree)};return De(()=>{u()}),ln(a,u,{attributes:!0,subtree:!0,childList:!0}),{groupRef:a,visible:r,ns:t}}});function os(e,t,a,s,i,r){return fe((C(),A("ul",{ref:"groupRef",class:O(e.ns.be("group","wrap"))},[P("li",{class:O(e.ns.be("group","title"))},q(e.label),3),P("li",null,[P("ul",{class:O(e.ns.b("group"))},[V(e.$slots,"default")],2)])],2)),[[Pe,e.visible]])}var Jt=oe(ss,[["render",os],["__file","option-group.vue"]]);const fs=Ht(as,{Option:Qe,OptionGroup:Jt}),cs=kt(Qe);kt(Jt);export{fs as E,cs as a,ya as b,Fa as c,Ea as d,Ae as i};