st-comp 0.0.207 → 0.0.208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +1 -74
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +53 -56
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +45 -48
- package/es/HeatMap.cjs +1 -1
- package/es/HeatMap.js +1 -118
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +16 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +81 -84
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +161 -164
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +15 -18
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +18 -21
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +140 -143
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +2 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +55 -58
- package/es/User.cjs +1 -1
- package/es/User.js +85 -88
- package/es/VarSelectDialog.cjs +2 -2
- package/es/VarSelectDialog.js +53 -56
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +15 -17
- package/es/VarietySearch.cjs +10 -10
- package/es/VarietySearch.js +53 -56
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +33 -36
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +103 -106
- package/es/{_initCloneObject-eaef9418.js → _initCloneObject-c477c74d.js} +25 -26
- package/es/_initCloneObject-e660897e.cjs +1 -0
- package/es/base-7ba08794.cjs +5 -0
- package/es/{index-a871c3eb.js → base-aa512893.js} +454 -171
- package/es/{castArray-7741a212.js → castArray-1eb17278.js} +1 -1
- package/es/castArray-efa457a5.cjs +1 -0
- package/es/{config-provider-a584d81e.cjs → config-provider-18c0a68a.cjs} +1 -1
- package/es/{config-provider-b16efd62.js → config-provider-49c17381.js} +6 -6
- package/es/{debounce-8d53f4dd.js → debounce-33406a0d.js} +9 -9
- package/es/debounce-4aa22feb.cjs +1 -0
- package/es/{dropdown-071c5d7e.cjs → dropdown-3f1fe325.cjs} +1 -1
- package/es/{dropdown-a59bba73.js → dropdown-6e7b1df0.js} +15 -15
- package/es/el-autocomplete-609ac86d.cjs +1 -0
- package/es/{el-autocomplete-ba808eb6.js → el-autocomplete-87b7f461.js} +51 -53
- package/es/el-button-08310c06.cjs +1 -0
- package/es/{el-button-c95adb85.js → el-button-56624e61.js} +45 -46
- package/es/{el-checkbox-c25236a6.cjs → el-checkbox-09f3b57f.cjs} +1 -1
- package/es/{el-checkbox-7421ccd3.js → el-checkbox-f13560e9.js} +40 -40
- package/es/{el-dialog-41ab8417.js → el-dialog-1d5f5877.js} +9 -10
- package/es/el-dialog-ea480083.cjs +1 -0
- package/es/{el-divider-4e059794.js → el-divider-1cda1783.js} +1 -1
- package/es/{el-divider-4713d74c.cjs → el-divider-8a4c87e3.cjs} +1 -1
- package/es/{el-empty-33cb66f1.js → el-empty-04682b5d.js} +3 -3
- package/es/el-empty-b40fa7ea.cjs +1 -0
- package/es/el-form-item-338ea2f7.cjs +12 -0
- package/es/{el-form-item-c53c374d.js → el-form-item-505c0b70.js} +75 -76
- package/es/{el-input-2f75c4ba.js → el-input-262851e8.js} +84 -85
- package/es/el-input-b04b5bfc.cjs +1 -0
- package/es/el-input-number-7242c8b5.cjs +1 -0
- package/es/{el-input-number-5193fe6d.js → el-input-number-fdac2b86.js} +82 -83
- package/es/{el-loading-cfd86c15.cjs → el-loading-3cf7b796.cjs} +1 -1
- package/es/{el-loading-f6022062.js → el-loading-7440dc64.js} +2 -2
- package/es/{el-menu-item-7e881203.js → el-menu-item-36c3004c.js} +53 -54
- package/es/el-menu-item-7aca344e.cjs +1 -0
- package/es/el-message-05cd85bf.cjs +1 -0
- package/es/{el-message-e544a8f5.js → el-message-416bd265.js} +28 -29
- package/es/{el-message-box-a93d2f6a.js → el-message-box-8f5e34ca.js} +20 -22
- package/es/el-message-box-b7e9917e.cjs +1 -0
- package/es/{el-overlay-09ad71cd.js → el-overlay-04426e36.js} +52 -53
- package/es/el-overlay-60bc5a02.cjs +1 -0
- package/es/el-popconfirm-24b622c5.cjs +1 -0
- package/es/{el-popconfirm-81dcd202.js → el-popconfirm-3790cda2.js} +38 -39
- package/es/el-popper-1dd8f5b4.cjs +1 -0
- package/es/{el-popper-b4f97157.js → el-popper-49152708.js} +191 -192
- package/es/{el-segmented-b868d074.js → el-segmented-05509f9d.js} +12 -13
- package/es/el-segmented-a928d89b.cjs +1 -0
- package/es/el-select-5fd77a96.cjs +1 -0
- package/es/{el-select-95627997.js → el-select-700f3686.js} +292 -295
- package/es/{el-table-column-376cd907.js → el-table-column-44360700.js} +54 -57
- package/es/el-table-column-bf3ab2a6.cjs +14 -0
- package/es/{el-tag-66cab138.js → el-tag-55a172c9.js} +30 -31
- package/es/el-tag-d59f3463.cjs +1 -0
- package/es/{el-text-c20a9f48.cjs → el-text-5bcaffb6.cjs} +1 -1
- package/es/{el-text-ac60d0f2.js → el-text-ab6bfc40.js} +4 -4
- package/es/{index-1f7d4f70.js → index-0afedcbd.js} +11 -12
- package/es/{index-88546436.js → index-29418a8d.js} +18 -18
- package/es/index-3d0bc5da.js +566 -0
- package/es/{index-57672682.js → index-4e46f96c.js} +12 -13
- package/es/{index-844bdd85.js → index-66ad0d6a.js} +34 -34
- package/es/{index-f967d6c1.cjs → index-882d77d3.cjs} +1 -1
- package/es/index-a206f6eb.cjs +1 -0
- package/es/{index-298075cf.cjs → index-ae6c9d97.cjs} +1 -1
- package/es/index-b4700d83.cjs +1 -0
- package/es/index-c30cf7f9.cjs +1 -0
- package/es/{index-d91dc23f.js → index-cbbd78b4.js} +12 -12
- package/es/{index-11547a0c.cjs → index-d8294b1a.cjs} +1 -1
- package/es/{raf-8249652f.cjs → raf-336ef01e.cjs} +1 -1
- package/es/raf-d8c44079.js +6 -0
- package/es/{scroll-679bd6bf.js → scroll-0a48995c.js} +5 -5
- package/es/{scroll-b108dabd.cjs → scroll-19533c53.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/use-form-common-props-41182853.cjs +1 -0
- package/es/use-form-common-props-4cdda474.js +671 -0
- package/es/use-global-config-7bfbe48c.js +71 -0
- package/es/use-global-config-dc5527e8.cjs +1 -0
- package/es/{validator-1b8a6128.cjs → validator-28b22907.cjs} +1 -1
- package/es/{validator-764a9db0.js → validator-e35f7978.js} +1 -1
- package/es/{vnode-b906ae6d.cjs → vnode-8cb31692.cjs} +1 -1
- package/es/{vnode-5ddb7ed1.js → vnode-b62d0045.js} +1 -1
- package/es/{zh-cn-e963c628.js → zh-cn-346f3a73.js} +2 -2
- package/es/{zh-cn-90317f62.cjs → zh-cn-7c8640bb.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-f27d8c7a.js → index-da0f2951.js} +3 -3
- package/lib/{python-c345f0e2.js → python-c0a1e4ef.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/components/KlineTips/index.vue +1 -1
- package/es/_initCloneObject-52b6a510.cjs +0 -1
- package/es/base-a5af3db3.js +0 -288
- package/es/base-ef747d02.cjs +0 -5
- package/es/castArray-35947698.cjs +0 -1
- package/es/debounce-62f5b6e8.cjs +0 -1
- package/es/el-autocomplete-a07e9439.cjs +0 -1
- package/es/el-button-eec58cff.cjs +0 -1
- package/es/el-dialog-ae86edb8.cjs +0 -1
- package/es/el-empty-1697ded8.cjs +0 -1
- package/es/el-form-item-c3fe189b.cjs +0 -12
- package/es/el-input-7fd293af.cjs +0 -1
- package/es/el-input-number-22e21d16.cjs +0 -1
- package/es/el-menu-item-17dc717e.cjs +0 -1
- package/es/el-message-5e6a6be9.cjs +0 -1
- package/es/el-message-box-c10adb52.cjs +0 -1
- package/es/el-overlay-9e34965f.cjs +0 -1
- package/es/el-popconfirm-70a976bf.cjs +0 -1
- package/es/el-popper-b6c99b28.cjs +0 -1
- package/es/el-segmented-f8fce9ac.cjs +0 -1
- package/es/el-select-d8d91db1.cjs +0 -1
- package/es/el-table-column-c974cb96.cjs +0 -14
- package/es/el-tag-a33c4b22.cjs +0 -1
- package/es/index-098c2447.cjs +0 -1
- package/es/index-960806da.js +0 -314
- package/es/index-9780a537.cjs +0 -1
- package/es/index-9b9ef5dd.cjs +0 -1
- package/es/index-bb833443.cjs +0 -1
- package/es/index-c108567d.cjs +0 -1
- package/es/index-d77a7336.js +0 -204
- package/es/index-e5566b94.js +0 -368
- package/es/index-f3562b52.cjs +0 -1
- package/es/raf-80ef0c0a.js +0 -6
- package/es/use-form-common-props-815d48a6.js +0 -364
- package/es/use-form-common-props-fd9b61a0.cjs +0 -1
- package/es/use-global-config-30d7d8ce.cjs +0 -1
- package/es/use-global-config-b5e9d3d5.js +0 -72
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { defineComponent as w, ref as W, reactive as G, computed as u, watch as V, openBlock as v, createElementBlock as h, unref as l, normalizeClass as r, createElementVNode as m, normalizeStyle as M, Fragment as J, renderList as K, renderSlot as Q, createTextVNode as Z, toDisplayString as ee, createCommentVNode as te } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { b as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as be } from "./index-960806da.js";
|
|
2
|
+
import { u as se, d as ae, a as le, e as ne, f as oe, g as ie, h as re, j as de } from "./use-form-common-props-4cdda474.js";
|
|
3
|
+
import { b as ce, d as y, m as C, n as k, o as N, u as ue, _ as me, p as S, w as pe } from "./base-aa512893.js";
|
|
4
|
+
import { u as fe, U as z, C as B, d as be } from "./el-popper-49152708.js";
|
|
6
5
|
const P = {
|
|
7
6
|
label: "label",
|
|
8
7
|
value: "value",
|
|
9
8
|
disabled: "disabled"
|
|
10
|
-
}, ge =
|
|
9
|
+
}, ge = ce({
|
|
11
10
|
direction: {
|
|
12
11
|
type: y(String),
|
|
13
12
|
default: "horizontal"
|
|
@@ -33,7 +32,7 @@ const P = {
|
|
|
33
32
|
},
|
|
34
33
|
id: String,
|
|
35
34
|
name: String,
|
|
36
|
-
...
|
|
35
|
+
...fe(["ariaLabel"])
|
|
37
36
|
}), ve = {
|
|
38
37
|
[z]: (n) => C(n) || k(n) || N(n),
|
|
39
38
|
[B]: (n) => C(n) || k(n) || N(n)
|
|
@@ -44,9 +43,9 @@ const P = {
|
|
|
44
43
|
props: ge,
|
|
45
44
|
emits: ve,
|
|
46
45
|
setup(n, { emit: I }) {
|
|
47
|
-
const s = n, a =
|
|
46
|
+
const s = n, a = ue("segmented"), L = ae(), A = le(), F = ne(), { formItem: d } = oe(), { inputId: T, isLabeledByFormItem: E } = ie(s, {
|
|
48
47
|
formItemContext: d
|
|
49
|
-
}), c = W(null), $ =
|
|
48
|
+
}), c = W(null), $ = re(), t = G({
|
|
50
49
|
isInit: !1,
|
|
51
50
|
width: 0,
|
|
52
51
|
height: 0,
|
|
@@ -87,9 +86,9 @@ const P = {
|
|
|
87
86
|
a.is("disabled", b(X(s.modelValue))),
|
|
88
87
|
a.is("focus-visible", t.focusVisible)
|
|
89
88
|
]), H = u(() => s.name || L.value);
|
|
90
|
-
return
|
|
89
|
+
return de(c, g), V($, g), V(() => s.modelValue, () => {
|
|
91
90
|
var e;
|
|
92
|
-
g(), s.validateEvent && ((e = d == null ? void 0 : d.validate) == null || e.call(d, "change").catch((o) =>
|
|
91
|
+
g(), s.validateEvent && ((e = d == null ? void 0 : d.validate) == null || e.call(d, "change").catch((o) => be()));
|
|
93
92
|
}, {
|
|
94
93
|
flush: "post"
|
|
95
94
|
}), (e, o) => e.options.length ? (v(), h("div", {
|
|
@@ -135,8 +134,8 @@ const P = {
|
|
|
135
134
|
], 10, ["id", "aria-label", "aria-labelledby"])) : te("v-if", !0);
|
|
136
135
|
}
|
|
137
136
|
});
|
|
138
|
-
var Se = /* @__PURE__ */
|
|
139
|
-
const
|
|
137
|
+
var Se = /* @__PURE__ */ me(ye, [["__file", "segmented.vue"]]);
|
|
138
|
+
const ke = pe(Se);
|
|
140
139
|
export {
|
|
141
|
-
|
|
140
|
+
ke as E
|
|
142
141
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),i=require("./use-form-common-props-41182853.cjs"),n=require("./base-7ba08794.cjs"),d=require("./el-popper-1dd8f5b4.cjs"),y={label:"label",value:"value",disabled:"disabled"},D=n.buildProps({direction:{type:n.definePropType(String),default:"horizontal"},options:{type:n.definePropType(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},props:{type:n.definePropType(Object),default:()=>y},block:Boolean,size:i.useSizeProp,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...d.useAriaProps(["ariaLabel"])}),F={[d.UPDATE_MODEL_EVENT]:o=>n.isString(o)||n.isNumber(o)||n.isBoolean(o),[d.CHANGE_EVENT]:o=>n.isString(o)||n.isNumber(o)||n.isBoolean(o)},q=e.defineComponent({name:"ElSegmented"}),$=e.defineComponent({...q,props:D,emits:F,setup(o,{emit:v}){const l=o,a=n.useNamespace("segmented"),S=i.useId(),C=i.useFormSize(),I=i.useFormDisabled(),{formItem:u}=i.useFormItem(),{inputId:V,isLabeledByFormItem:h}=i.useFormItemInputId(l,{formItemContext:u}),m=e.ref(null),_=i.useActiveElement(),s=e.reactive({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),N=t=>{const r=f(t);v(d.UPDATE_MODEL_EVENT,r),v(d.CHANGE_EVENT,r)},p=e.computed(()=>({...y,...l.props})),k=t=>t,f=t=>n.isObject(t)?t[p.value.value]:t,z=t=>n.isObject(t)?t[p.value.label]:t,b=t=>!!(I.value||n.isObject(t)&&t[p.value.disabled]),E=t=>l.modelValue===f(t),B=t=>l.options.find(r=>f(r)===t),P=t=>[a.e("item"),a.is("selected",E(t)),a.is("disabled",b(t))],g=()=>{if(!m.value)return;const t=m.value.querySelector(".is-selected"),r=m.value.querySelector(".is-selected input");if(!t||!r){s.width=0,s.height=0,s.translateX=0,s.translateY=0,s.focusVisible=!1;return}s.isInit=!0,l.direction==="vertical"?(s.height=t.offsetHeight,s.translateY=t.offsetTop):(s.width=t.offsetWidth,s.translateX=t.offsetLeft);try{s.focusVisible=r.matches(":focus-visible")}catch{}},T=e.computed(()=>[a.b(),a.m(C.value),a.is("block",l.block)]),w=e.computed(()=>({width:l.direction==="vertical"?"100%":`${s.width}px`,height:l.direction==="vertical"?`${s.height}px`:"100%",transform:l.direction==="vertical"?`translateY(${s.translateY}px)`:`translateX(${s.translateX}px)`,display:s.isInit?"block":"none"})),A=e.computed(()=>[a.e("item-selected"),a.is("disabled",b(B(l.modelValue))),a.is("focus-visible",s.focusVisible)]),L=e.computed(()=>l.name||S.value);return i.useResizeObserver(m,g),e.watch(_,g),e.watch(()=>l.modelValue,()=>{var t;g(),l.validateEvent&&((t=u==null?void 0:u.validate)==null||t.call(u,"change").catch(r=>d.debugWarn()))},{flush:"post"}),(t,r)=>t.options.length?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(V),ref_key:"segmentedRef",ref:m,class:e.normalizeClass(e.unref(T)),role:"radiogroup","aria-label":e.unref(h)?void 0:t.ariaLabel||"segmented","aria-labelledby":e.unref(h)?e.unref(u).labelId:void 0},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a).e("group"),e.unref(a).m(l.direction)])},[e.createElementVNode("div",{style:e.normalizeStyle(e.unref(w)),class:e.normalizeClass(e.unref(A))},null,6),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(c,O)=>(e.openBlock(),e.createElementBlock("label",{key:O,class:e.normalizeClass(P(c))},[e.createElementVNode("input",{class:e.normalizeClass(e.unref(a).e("item-input")),type:"radio",name:e.unref(L),disabled:b(c),checked:E(c),onChange:j=>N(c)},null,42,["name","disabled","checked","onChange"]),e.createElementVNode("div",{class:e.normalizeClass(e.unref(a).e("item-label"))},[e.renderSlot(t.$slots,"default",{item:k(c)},()=>[e.createTextVNode(e.toDisplayString(z(c)),1)])],2)],2))),128))],2)],10,["id","aria-label","aria-labelledby"])):e.createCommentVNode("v-if",!0)}});var X=n._export_sfc($,[["__file","segmented.vue"]]);const Y=n.withInstall(X);exports.ElSegmented=Y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),V=require("./el-popper-1dd8f5b4.cjs"),Ve=require("./index-ae6c9d97.cjs"),te=require("./index-a206f6eb.cjs"),a=require("./base-7ba08794.cjs"),w=require("./index-c30cf7f9.cjs"),R=require("./castArray-efa457a5.cjs"),T=require("./use-form-common-props-41182853.cjs"),Ee=require("./index-d8294b1a.cjs"),bt=require("./scroll-19533c53.cjs"),ke=require("./debounce-4aa22feb.cjs"),Te=require("./el-tag-d59f3463.cjs"),gt=require("./vnode-8cb31692.cjs");var Oe=1/0,yt=17976931348623157e292;function Ct(e){if(!e)return e===0?e:0;if(e=ke.toNumber(e),e===Oe||e===-Oe){var s=e<0?-1:1;return s*yt}return e===e?e:0}function St(e){var s=Ct(e),i=s%1;return s===s?i?s-i:s:0}function Et(e,s,i,f){for(var d=e.length,v=i+(f?1:-1);f?v--:++v<d;)if(s(e[v],v,e))return v;return-1}var Ot=Math.max,wt=Math.min;function Vt(e,s,i){var f=e==null?0:e.length;if(!f)return-1;var d=f-1;return i!==void 0&&(d=St(i),d=i<0?Ot(f+d,0):wt(d,f-1)),Et(e,Te.baseIteratee(s),d,!0)}const Be=11,kt=2;function Tt(){const e=t.shallowRef(),s=t.ref(0),i=t.computed(()=>({minWidth:`${Math.max(s.value,Be)}px`})),f=()=>{var d,v;s.value=(v=(d=e.value)==null?void 0:d.getBoundingClientRect().width)!=null?v:0};return T.useResizeObserver(e,f),{calculatorRef:e,calculatorWidth:s,inputStyle:i}}const Ie={label:"label",value:"value",disabled:"disabled",options:"options"};function Bt(e){const s=t.computed(()=>({...Ie,...e.props}));return{aliasProps:s,getLabel:n=>w.get(n,s.value.label),getValue:n=>w.get(n,s.value.value),getDisabled:n=>w.get(n,s.value.disabled),getOptions:n=>w.get(n,s.value.options)}}const Ne=Symbol("ElSelectGroup"),Y=Symbol("ElSelect"),le="ElOption",It=a.buildProps({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean}),Nt=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d");function Dt(e,s){const i=t.inject(Y);i||V.throwError(le,"usage: <el-select><el-option /></el-select/>");const f=t.inject(Ne,{disabled:!1}),d=t.computed(()=>g(R.castArray(i.props.modelValue),e.value)),v=t.computed(()=>{var u;if(i.props.multiple){const C=R.castArray((u=i.props.modelValue)!=null?u:[]);return!d.value&&C.length>=i.props.multipleLimit&&i.props.multipleLimit>0}else return!1}),n=t.computed(()=>{var u;return(u=e.label)!=null?u:a.isObject(e.value)?"":e.value}),S=t.computed(()=>e.value||e.label||""),h=t.computed(()=>e.disabled||s.groupDisabled||v.value),y=t.getCurrentInstance(),g=(u=[],C)=>{if(a.isObject(e.value)){const k=i.props.valueKey;return u&&u.some(I=>t.toRaw(w.get(I,k))===w.get(C,k))}else return u&&u.includes(C)},m=()=>{!e.disabled&&!f.disabled&&(i.states.hoveringIndex=i.optionsArray.indexOf(y.proxy))},r=u=>{const C=new RegExp(Nt(u),"i");s.visible=C.test(String(n.value))||e.created};return t.watch(()=>n.value,()=>{!e.created&&!i.props.remote&&i.setSelected()}),t.watch(()=>e.value,(u,C)=>{const{remote:k,valueKey:I}=i.props;if((k?u!==C:!w.isEqual(u,C))&&(i.onOptionDestroy(C,y.proxy),i.onOptionCreate(y.proxy)),!e.created&&!k){if(I&&a.isObject(u)&&a.isObject(C)&&u[I]===C[I])return;i.setSelected()}}),t.watch(()=>f.disabled,()=>{s.groupDisabled=f.disabled},{immediate:!0}),{select:i,currentLabel:n,currentValue:S,itemSelected:d,isDisabled:h,hoverItem:m,updateOption:r}}const Mt=t.defineComponent({name:le,componentName:le,props:It,setup(e){const s=a.useNamespace("select"),i=T.useId(),f=t.computed(()=>[s.be("dropdown","item"),s.is("disabled",t.unref(S)),s.is("selected",t.unref(n)),s.is("hovering",t.unref(r))]),d=t.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:v,itemSelected:n,isDisabled:S,select:h,hoverItem:y,updateOption:g}=Dt(e,d),{visible:m,hover:r}=t.toRefs(d),u=t.getCurrentInstance().proxy;h.onOptionCreate(u),t.onBeforeUnmount(()=>{const k=u.value;t.nextTick(()=>{const{selected:I}=h.states,b=I.some(p=>p.value===u.value);h.states.cachedOptions.get(k)===u&&!b&&h.states.cachedOptions.delete(k)}),h.onOptionDestroy(k,u)});function C(){S.value||h.handleOptionSelect(u)}return{ns:s,id:i,containerKls:f,currentLabel:v,itemSelected:n,isDisabled:S,select:h,visible:m,hover:r,states:d,hoverItem:y,updateOption:g,selectOptionClick:C}}});function zt(e,s){return t.withDirectives((t.openBlock(),t.createElementBlock("li",{id:e.id,class:t.normalizeClass(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMousemove:e.hoverItem,onClick:t.withModifiers(e.selectOptionClick,["stop"])},[t.renderSlot(e.$slots,"default",{},()=>[t.createElementVNode("span",null,t.toDisplayString(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[t.vShow,e.visible]])}var ne=a._export_sfc(Mt,[["render",zt],["__file","option.vue"]]);const Rt=t.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=t.inject(Y),s=a.useNamespace("select"),i=t.computed(()=>e.props.popperClass),f=t.computed(()=>e.props.multiple),d=t.computed(()=>e.props.fitInputWidth),v=t.ref("");function n(){var S;const h=(S=e.selectRef)==null?void 0:S.offsetWidth;h?v.value=`${h-kt}px`:v.value=""}return t.onMounted(()=>{n(),T.useResizeObserver(e.selectRef,n)}),{ns:s,minWidth:v,popperClass:i,isMultiple:f,isFitInputWidth:d}}});function Pt(e,s,i,f,d,v){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:t.normalizeStyle({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.ns.be("dropdown","header"))},[t.renderSlot(e.$slots,"header")],2)):t.createCommentVNode("v-if",!0),t.renderSlot(e.$slots,"default"),e.$slots.footer?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.ns.be("dropdown","footer"))},[t.renderSlot(e.$slots,"footer")],2)):t.createCommentVNode("v-if",!0)],6)}var Lt=a._export_sfc(Rt,[["render",Pt],["__file","select-dropdown.vue"]]);const $t=(e,s)=>{const{t:i}=w.useLocale(),f=T.useId(),d=a.useNamespace("select"),v=a.useNamespace("input"),n=t.reactive({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),S=t.ref(),h=t.ref(),y=t.ref(),g=t.ref(),m=t.ref(),r=t.ref(),u=t.ref(),C=t.ref(),k=t.ref(),I=t.ref(),b=t.ref(),p=t.ref(!1),E=t.ref(),{form:P,formItem:D}=T.useFormItem(),{inputId:M}=T.useFormItemInputId(e,{formItemContext:D}),{valueOnClear:ae,isEmptyValue:L}=w.useEmptyValues(e),{isComposing:se,handleCompositionStart:De,handleCompositionUpdate:Me,handleCompositionEnd:ze}=Ee.useComposition({afterComposition:l=>me(l)}),F=t.computed(()=>e.disabled||!!(P!=null&&P.disabled)),{wrapperRef:ie,isFocused:Z,handleBlur:Re}=Ee.useFocusController(m,{disabled:F,afterFocus(){e.automaticDropdown&&!p.value&&(p.value=!0,n.menuVisibleOnFocus=!0)},beforeBlur(l){var o,c;return((o=y.value)==null?void 0:o.isFocusInsideContent(l))||((c=g.value)==null?void 0:c.isFocusInsideContent(l))},afterBlur(){var l;p.value=!1,n.menuVisibleOnFocus=!1,e.validateEvent&&((l=D==null?void 0:D.validate)==null||l.call(D,"blur").catch(o=>V.debugWarn()))}}),J=t.computed(()=>a.isArray(e.modelValue)?e.modelValue.length>0:!L(e.modelValue)),Pe=t.computed(()=>{var l;return(l=P==null?void 0:P.statusIcon)!=null?l:!1}),Le=t.computed(()=>e.clearable&&!F.value&&J.value&&(Z.value||n.inputHovering)),re=t.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),$e=t.computed(()=>d.is("reverse",!!(re.value&&p.value))),_=t.computed(()=>(D==null?void 0:D.validateState)||""),Ae=t.computed(()=>_.value&&T.ValidateComponentsMap[_.value]),Fe=t.computed(()=>e.remote?300:0),We=t.computed(()=>e.remote&&!n.inputValue&&n.options.size===0),Ke=t.computed(()=>e.loading?e.loadingText||i("el.select.loading"):e.filterable&&n.inputValue&&n.options.size>0&&W.value===0?e.noMatchText||i("el.select.noMatch"):n.options.size===0?e.noDataText||i("el.select.noData"):null),W=t.computed(()=>B.value.filter(l=>l.visible).length),B=t.computed(()=>{const l=Array.from(n.options.values()),o=[];return n.optionValues.forEach(c=>{const O=l.findIndex(N=>N.value===c);O>-1&&o.push(l[O])}),o.length>=l.length?o:l}),qe=t.computed(()=>Array.from(n.cachedOptions.values())),He=t.computed(()=>{const l=B.value.filter(o=>!o.created).some(o=>o.currentLabel===n.inputValue);return e.filterable&&e.allowCreate&&n.inputValue!==""&&!l}),ue=()=>{e.filterable&&a.isFunction(e.filterMethod)||e.filterable&&e.remote&&a.isFunction(e.remoteMethod)||B.value.forEach(l=>{var o;(o=l.updateOption)==null||o.call(l,n.inputValue)})},ce=T.useFormSize(),je=t.computed(()=>["small"].includes(ce.value)?"small":"default"),de=t.computed({get(){return p.value&&!We.value},set(l){p.value=l}}),Ue=t.computed(()=>{if(e.multiple&&!a.isUndefined(e.modelValue))return R.castArray(e.modelValue).length===0&&!n.inputValue;const l=a.isArray(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||a.isUndefined(l)?!n.inputValue:!0}),Ge=t.computed(()=>{var l;const o=(l=e.placeholder)!=null?l:i("el.select.placeholder");return e.multiple||!J.value?o:n.selectedLabel}),Qe=t.computed(()=>a.isIOS?null:"mouseenter");t.watch(()=>e.modelValue,(l,o)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(n.inputValue="",q("")),H(),!w.isEqual(l,o)&&e.validateEvent&&(D==null||D.validate("change").catch(c=>V.debugWarn()))},{flush:"post",deep:!0}),t.watch(()=>p.value,l=>{l?q(n.inputValue):(n.inputValue="",n.previousQuery=null,n.isBeforeHide=!0),s("visible-change",l)}),t.watch(()=>n.options.entries(),()=>{a.isClient&&(H(),e.defaultFirstOption&&(e.filterable||e.remote)&&W.value&&pe())},{flush:"post"}),t.watch([()=>n.hoveringIndex,B],([l])=>{a.isNumber(l)&&l>-1?E.value=B.value[l]||{}:E.value={},B.value.forEach(o=>{o.hover=E.value===o})}),t.watchEffect(()=>{n.isBeforeHide||ue()});const q=l=>{n.previousQuery===l||se.value||(n.previousQuery=l,e.filterable&&a.isFunction(e.filterMethod)?e.filterMethod(l):e.filterable&&e.remote&&a.isFunction(e.remoteMethod)&&e.remoteMethod(l),e.defaultFirstOption&&(e.filterable||e.remote)&&W.value?t.nextTick(pe):t.nextTick(Xe))},pe=()=>{const l=B.value.filter(N=>N.visible&&!N.disabled&&!N.states.groupDisabled),o=l.find(N=>N.created),c=l[0],O=B.value.map(N=>N.value);n.hoveringIndex=ye(O,o||c)},H=()=>{if(e.multiple)n.selectedLabel="";else{const o=a.isArray(e.modelValue)?e.modelValue[0]:e.modelValue,c=x(o);n.selectedLabel=c.currentLabel,n.selected=[c];return}const l=[];a.isUndefined(e.modelValue)||R.castArray(e.modelValue).forEach(o=>{l.push(x(o))}),n.selected=l},x=l=>{let o;const c=a.isPlainObject(l);for(let A=n.cachedOptions.size-1;A>=0;A--){const z=qe.value[A];if(c?w.get(z.value,e.valueKey)===w.get(l,e.valueKey):z.value===l){o={index:B.value.filter($=>!$.created).indexOf(z),value:l,currentLabel:z.currentLabel,get isDisabled(){return z.isDisabled}};break}}if(o)return o;const O=c?l.label:l??"";return{index:-1,value:l,currentLabel:O}},Xe=()=>{n.hoveringIndex=B.value.findIndex(l=>n.selected.some(o=>G(o)===G(l)))},Ye=()=>{n.selectionWidth=Number.parseFloat(window.getComputedStyle(h.value).width)},Ze=()=>{n.collapseItemWidth=I.value.getBoundingClientRect().width},ee=()=>{var l,o;(o=(l=y.value)==null?void 0:l.updatePopper)==null||o.call(l)},fe=()=>{var l,o;(o=(l=g.value)==null?void 0:l.updatePopper)==null||o.call(l)},ve=()=>{n.inputValue.length>0&&!p.value&&(p.value=!0),q(n.inputValue)},me=l=>{if(n.inputValue=l.target.value,e.remote)he();else return ve()},he=ke.debounce(()=>{ve()},Fe.value),K=l=>{w.isEqual(e.modelValue,l)||s(V.CHANGE_EVENT,l)},Je=l=>Vt(l,o=>{const c=n.cachedOptions.get(o);return c&&!c.disabled&&!c.states.groupDisabled}),_e=l=>{if(e.multiple&&l.code!==V.EVENT_CODE.delete&&l.target.value.length<=0){const o=R.castArray(e.modelValue).slice(),c=Je(o);if(c<0)return;const O=o[c];o.splice(c,1),s(V.UPDATE_MODEL_EVENT,o),K(o),s("remove-tag",O)}},xe=(l,o)=>{const c=n.selected.indexOf(o);if(c>-1&&!F.value){const O=R.castArray(e.modelValue).slice();O.splice(c,1),s(V.UPDATE_MODEL_EVENT,O),K(O),s("remove-tag",o.value)}l.stopPropagation(),U()},be=l=>{l.stopPropagation();const o=e.multiple?[]:ae.value;if(e.multiple)for(const c of n.selected)c.isDisabled&&o.push(c.value);s(V.UPDATE_MODEL_EVENT,o),K(o),n.hoveringIndex=-1,p.value=!1,s("clear"),U()},ge=l=>{var o;if(e.multiple){const c=R.castArray((o=e.modelValue)!=null?o:[]).slice(),O=ye(c,l);O>-1?c.splice(O,1):(e.multipleLimit<=0||c.length<e.multipleLimit)&&c.push(l.value),s(V.UPDATE_MODEL_EVENT,c),K(c),l.created&&q(""),e.filterable&&!e.reserveKeyword&&(n.inputValue="")}else!w.isEqual(e.modelValue,l.value)&&s(V.UPDATE_MODEL_EVENT,l.value),K(l.value),p.value=!1;U(),!p.value&&t.nextTick(()=>{j(l)})},ye=(l,o)=>a.isUndefined(o)?-1:a.isObject(o.value)?l.findIndex(c=>w.isEqual(w.get(c,e.valueKey),G(o))):l.indexOf(o.value),j=l=>{var o,c,O,N,A;const z=a.isArray(l)?l[0]:l;let X=null;if(z!=null&&z.value){const $=B.value.filter(ht=>ht.value===z.value);$.length>0&&(X=$[0].$el)}if(y.value&&X){const $=(N=(O=(c=(o=y.value)==null?void 0:o.popperRef)==null?void 0:c.contentRef)==null?void 0:O.querySelector)==null?void 0:N.call(O,`.${d.be("dropdown","wrap")}`);$&&bt.scrollIntoView($,X)}(A=b.value)==null||A.handleScroll()},et=l=>{n.options.set(l.value,l),n.cachedOptions.set(l.value,l)},tt=(l,o)=>{n.options.get(l)===o&&n.options.delete(l)},lt=t.computed(()=>{var l,o;return(o=(l=y.value)==null?void 0:l.popperRef)==null?void 0:o.contentRef}),nt=()=>{n.isBeforeHide=!1,t.nextTick(()=>{var l;(l=b.value)==null||l.update(),j(n.selected)})},U=()=>{var l;(l=m.value)==null||l.focus()},ot=()=>{var l;if(p.value){p.value=!1,t.nextTick(()=>{var o;return(o=m.value)==null?void 0:o.blur()});return}(l=m.value)==null||l.blur()},at=l=>{be(l)},st=l=>{if(p.value=!1,Z.value){const o=new FocusEvent("blur",l);t.nextTick(()=>Re(o))}},it=()=>{n.inputValue.length>0?n.inputValue="":p.value=!1},Ce=()=>{F.value||(a.isIOS&&(n.inputHovering=!0),n.menuVisibleOnFocus?n.menuVisibleOnFocus=!1:p.value=!p.value)},rt=()=>{if(!p.value)Ce();else{const l=B.value[n.hoveringIndex];l&&!l.isDisabled&&ge(l)}},G=l=>a.isObject(l.value)?w.get(l.value,e.valueKey):l.value,ut=t.computed(()=>B.value.filter(l=>l.visible).every(l=>l.isDisabled)),ct=t.computed(()=>e.multiple?e.collapseTags?n.selected.slice(0,e.maxCollapseTags):n.selected:[]),dt=t.computed(()=>e.multiple?e.collapseTags?n.selected.slice(e.maxCollapseTags):[]:[]),Se=l=>{if(!p.value){p.value=!0;return}if(!(n.options.size===0||W.value===0||se.value)&&!ut.value){l==="next"?(n.hoveringIndex++,n.hoveringIndex===n.options.size&&(n.hoveringIndex=0)):l==="prev"&&(n.hoveringIndex--,n.hoveringIndex<0&&(n.hoveringIndex=n.options.size-1));const o=B.value[n.hoveringIndex];(o.isDisabled||!o.visible)&&Se(l),t.nextTick(()=>j(E.value))}},pt=()=>{if(!h.value)return 0;const l=window.getComputedStyle(h.value);return Number.parseFloat(l.gap||"6px")},ft=t.computed(()=>{const l=pt(),o=e.filterable?l+Be:0;return{maxWidth:`${I.value&&e.maxCollapseTags===1?n.selectionWidth-n.collapseItemWidth-l-o:n.selectionWidth-o}px`}}),vt=t.computed(()=>({maxWidth:`${n.selectionWidth}px`})),mt=l=>{s("popup-scroll",l)};T.useResizeObserver(h,Ye),T.useResizeObserver(ie,ee),T.useResizeObserver(k,fe),T.useResizeObserver(I,Ze);let Q;return t.watch(()=>de.value,l=>{l?Q=T.useResizeObserver(C,ee).stop:(Q==null||Q(),Q=void 0)}),t.onMounted(()=>{H()}),{inputId:M,contentId:f,nsSelect:d,nsInput:v,states:n,isFocused:Z,expanded:p,optionsArray:B,hoverOption:E,selectSize:ce,filteredOptionsCount:W,updateTooltip:ee,updateTagTooltip:fe,debouncedOnInputChange:he,onInput:me,deletePrevTag:_e,deleteTag:xe,deleteSelected:be,handleOptionSelect:ge,scrollToOption:j,hasModelValue:J,shouldShowPlaceholder:Ue,currentPlaceholder:Ge,mouseEnterEventName:Qe,needStatusIcon:Pe,showClearBtn:Le,iconComponent:re,iconReverse:$e,validateState:_,validateIcon:Ae,showNewOption:He,updateOptions:ue,collapseTagSize:je,setSelected:H,selectDisabled:F,emptyText:Ke,handleCompositionStart:De,handleCompositionUpdate:Me,handleCompositionEnd:ze,onOptionCreate:et,onOptionDestroy:tt,handleMenuEnter:nt,focus:U,blur:ot,handleClearClick:at,handleClickOutside:st,handleEsc:it,toggleMenu:Ce,selectOption:rt,getValueKey:G,navigateOptions:Se,dropdownMenuVisible:de,showTagList:ct,collapseTagList:dt,popupScroll:mt,getOption:x,tagStyle:ft,collapseTagStyle:vt,popperRef:lt,inputRef:m,tooltipRef:y,tagTooltipRef:g,prefixRef:r,suffixRef:u,selectRef:S,wrapperRef:ie,selectionRef:h,scrollbarRef:b,menuRef:C,tagMenuRef:k,collapseItemRef:I}};var At=t.defineComponent({name:"ElOptions",setup(e,{slots:s}){const i=t.inject(Y);let f=[];return()=>{var d,v;const n=(d=s.default)==null?void 0:d.call(s),S=[];function h(y){a.isArray(y)&&y.forEach(g=>{var m,r,u,C;const k=(m=(g==null?void 0:g.type)||{})==null?void 0:m.name;k==="ElOptionGroup"?h(!a.isString(g.children)&&!a.isArray(g.children)&&a.isFunction((r=g.children)==null?void 0:r.default)?(u=g.children)==null?void 0:u.default():g.children):k==="ElOption"?S.push((C=g.props)==null?void 0:C.value):a.isArray(g.children)&&h(g.children)})}return n.length&&h((v=n[0])==null?void 0:v.children),w.isEqual(S,f)||(f=S,i&&(i.states.optionValues=S)),n}}});const Ft=a.buildProps({name:String,id:String,modelValue:{type:a.definePropType([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:T.useSizeProp,effect:{type:a.definePropType(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperStyle:{type:a.definePropType([String,Object])},popperOptions:{type:a.definePropType(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:{type:a.definePropType(Function)},filterMethod:{type:a.definePropType(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:V.useTooltipContentProps.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:T.iconPropType,default:a.circle_close_default},fitInputWidth:Boolean,suffixIcon:{type:T.iconPropType,default:a.arrow_down_default},tagType:{...te.tagProps.type,default:"info"},tagEffect:{...te.tagProps.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:a.definePropType(String),values:V.Ee,default:"bottom-start"},fallbackPlacements:{type:a.definePropType(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:V.useTooltipContentProps.appendTo,options:{type:a.definePropType(Array)},props:{type:a.definePropType(Object),default:()=>Ie},...w.useEmptyValuesProps,...V.useAriaProps(["ariaLabel"])});V.UPDATE_MODEL_EVENT+"",V.CHANGE_EVENT+"",Ve.scrollbarEmits.scroll;const Wt=t.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const s=a.useNamespace("select"),i=t.ref(),f=t.getCurrentInstance(),d=t.ref([]);t.provide(Ne,t.reactive({...t.toRefs(e)}));const v=t.computed(()=>d.value.some(y=>y.visible===!0)),n=y=>{var g;return y.type.name==="ElOption"&&!!((g=y.component)!=null&&g.proxy)},S=y=>{const g=R.castArray(y),m=[];return g.forEach(r=>{var u;t.isVNode(r)&&(n(r)?m.push(r.component.proxy):a.isArray(r.children)&&r.children.length?m.push(...S(r.children)):(u=r.component)!=null&&u.subTree&&m.push(...S(r.component.subTree)))}),m},h=()=>{d.value=S(f.subTree)};return t.onMounted(()=>{h()}),T.useMutationObserver(i,h,{attributes:!0,subtree:!0,childList:!0}),{groupRef:i,visible:v,ns:s}}});function Kt(e,s,i,f,d,v){return t.withDirectives((t.openBlock(),t.createElementBlock("ul",{ref:"groupRef",class:t.normalizeClass(e.ns.be("group","wrap"))},[t.createElementVNode("li",{class:t.normalizeClass(e.ns.be("group","title"))},t.toDisplayString(e.label),3),t.createElementVNode("li",null,[t.createElementVNode("ul",{class:t.normalizeClass(e.ns.b("group"))},[t.renderSlot(e.$slots,"default")],2)])],2)),[[t.vShow,e.visible]])}var oe=a._export_sfc(Wt,[["render",Kt],["__file","option-group.vue"]]);const we="ElSelect",qt=t.defineComponent({name:we,componentName:we,components:{ElSelectMenu:Lt,ElOption:ne,ElOptions:At,ElOptionGroup:oe,ElTag:te.ElTag,ElScrollbar:Ve.ElScrollbar,ElTooltip:V.ElTooltip,ElIcon:a.ElIcon},directives:{ClickOutside:Te.ClickOutside},props:Ft,emits:[V.UPDATE_MODEL_EVENT,V.CHANGE_EVENT,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(e,{emit:s,slots:i}){const f=t.getCurrentInstance();f.appContext.config.warnHandler=(...b)=>{!b[0]||b[0].includes('Slot "default" invoked outside of the render function')||console.warn(...b)};const d=t.computed(()=>{const{modelValue:b,multiple:p}=e,E=p?[]:void 0;return a.isArray(b)?p?b:E:p?E:b}),v=t.reactive({...t.toRefs(e),modelValue:d}),n=$t(v,s),{calculatorRef:S,inputStyle:h}=Tt(),{getLabel:y,getValue:g,getOptions:m,getDisabled:r}=Bt(e),u=b=>({label:y(b),value:g(b),disabled:r(b)}),C=b=>b.reduce((p,E)=>(p.push(E),E.children&&E.children.length>0&&p.push(...C(E.children)),p),[]),k=b=>{gt.flattedChildren(b||[]).forEach(E=>{var P;if(a.isObject(E)&&(E.type.name==="ElOption"||E.type.name==="ElTree")){const D=E.type.name;if(D==="ElTree"){const M=((P=E.props)==null?void 0:P.data)||[];C(M).forEach(L=>{L.currentLabel=L.label||(a.isObject(L.value)?"":L.value),n.onOptionCreate(L)})}else if(D==="ElOption"){const M={...E.props};M.currentLabel=M.label||(a.isObject(M.value)?"":M.value),n.onOptionCreate(M)}}})};t.watch(()=>{var b;return(b=i.default)==null?void 0:b.call(i)},b=>{e.persistent||k(b)},{immediate:!0}),t.provide(Y,t.reactive({props:v,states:n.states,selectRef:n.selectRef,optionsArray:n.optionsArray,setSelected:n.setSelected,handleOptionSelect:n.handleOptionSelect,onOptionCreate:n.onOptionCreate,onOptionDestroy:n.onOptionDestroy}));const I=t.computed(()=>e.multiple?n.states.selected.map(b=>b.currentLabel):n.states.selectedLabel);return t.onBeforeUnmount(()=>{f.appContext.config.warnHandler=void 0}),{...n,modelValue:d,selectedLabel:I,calculatorRef:S,inputStyle:h,getLabel:y,getValue:g,getOptions:m,getDisabled:r,getOptionProps:u}}});function Ht(e,s){const i=t.resolveComponent("el-tag"),f=t.resolveComponent("el-tooltip"),d=t.resolveComponent("el-icon"),v=t.resolveComponent("el-option"),n=t.resolveComponent("el-option-group"),S=t.resolveComponent("el-options"),h=t.resolveComponent("el-scrollbar"),y=t.resolveComponent("el-select-menu"),g=t.resolveDirective("click-outside");return t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref:"selectRef",class:t.normalizeClass([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[t.toHandlerKey(e.mouseEnterEventName)]:m=>e.states.inputHovering=!0,onMouseleave:m=>e.states.inputHovering=!1},[t.createVNode(f,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-style":e.popperStyle,"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,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:m=>e.states.isBeforeHide=!1},{default:t.withCtx(()=>{var m;return[t.createElementVNode("div",{ref:"wrapperRef",class:t.normalizeClass([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)]),onClick:t.withModifiers(e.toggleMenu,["prevent"])},[e.$slots.prefix?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"prefixRef",class:t.normalizeClass(e.nsSelect.e("prefix"))},[t.renderSlot(e.$slots,"prefix")],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{ref:"selectionRef",class:t.normalizeClass([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?t.renderSlot(e.$slots,"tag",{key:0,data:e.states.selected,deleteTag:e.deleteTag,selectDisabled:e.selectDisabled},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.showTagList,r=>(t.openBlock(),t.createElementBlock("div",{key:e.getValueKey(r),class:t.normalizeClass(e.nsSelect.e("selected-item"))},[t.createVNode(i,{closable:!e.selectDisabled&&!r.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:t.normalizeStyle(e.tagStyle),onClose:u=>e.deleteTag(u,r)},{default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(e.nsSelect.e("tags-text"))},[t.renderSlot(e.$slots,"label",{index:r.index,label:r.currentLabel,value:r.value},()=>[t.createTextVNode(t.toDisplayString(r.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(t.openBlock(),t.createBlock(f,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom","popper-class":e.popperClass,"popper-style":e.popperStyle,teleported:e.teleported},{default:t.withCtx(()=>[t.createElementVNode("div",{ref:"collapseItemRef",class:t.normalizeClass(e.nsSelect.e("selected-item"))},[t.createVNode(i,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:t.normalizeStyle(e.collapseTagStyle)},{default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(e.nsSelect.e("tags-text"))}," + "+t.toDisplayString(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:t.withCtx(()=>[t.createElementVNode("div",{ref:"tagMenuRef",class:t.normalizeClass(e.nsSelect.e("selection"))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.collapseTagList,r=>(t.openBlock(),t.createElementBlock("div",{key:e.getValueKey(r),class:t.normalizeClass(e.nsSelect.e("selected-item"))},[t.createVNode(i,{class:"in-tooltip",closable:!e.selectDisabled&&!r.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:u=>e.deleteTag(u,r)},{default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(e.nsSelect.e("tags-text"))},[t.renderSlot(e.$slots,"label",{index:r.index,label:r.currentLabel,value:r.value},()=>[t.createTextVNode(t.toDisplayString(r.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","popper-class","popper-style","teleported"])):t.createCommentVNode("v-if",!0)]):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{class:t.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[t.withDirectives(t.createElementVNode("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":r=>e.states.inputValue=r,type:"text",name:e.name,class:t.normalizeClass([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:t.normalizeStyle(e.inputStyle),tabindex:e.tabindex,role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((m=e.hoverOption)==null?void 0:m.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[t.withKeys(t.withModifiers(r=>e.navigateOptions("next"),["stop","prevent"]),["down"]),t.withKeys(t.withModifiers(r=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),t.withKeys(t.withModifiers(e.handleEsc,["stop","prevent"]),["esc"]),t.withKeys(t.withModifiers(e.selectOption,["stop","prevent"]),["enter"]),t.withKeys(t.withModifiers(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:t.withModifiers(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[t.vModelText,e.states.inputValue]]),e.filterable?(t.openBlock(),t.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:t.normalizeClass(e.nsSelect.e("input-calculator")),textContent:t.toDisplayString(e.states.inputValue)},null,10,["textContent"])):t.createCommentVNode("v-if",!0)],2),e.shouldShowPlaceholder?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?t.renderSlot(e.$slots,"label",{key:0,index:e.getOption(e.modelValue).index,label:e.currentPlaceholder,value:e.modelValue},()=>[t.createElementVNode("span",null,t.toDisplayString(e.currentPlaceholder),1)]):(t.openBlock(),t.createElementBlock("span",{key:1},t.toDisplayString(e.currentPlaceholder),1))],2)):t.createCommentVNode("v-if",!0)],2),t.createElementVNode("div",{ref:"suffixRef",class:t.normalizeClass(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClearBtn?(t.openBlock(),t.createBlock(d,{key:0,class:t.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0),e.showClearBtn&&e.clearIcon?(t.openBlock(),t.createBlock(d,{key:1,class:t.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.clearIcon)))]),_:1},8,["class","onClick"])):t.createCommentVNode("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(t.openBlock(),t.createBlock(d,{key:2,class:t.normalizeClass([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.validateIcon)))]),_:1},8,["class"])):t.createCommentVNode("v-if",!0)],2)],10,["onClick"])]}),content:t.withCtx(()=>[t.createVNode(y,{ref:"menuRef"},{default:t.withCtx(()=>[e.$slots.header?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.nsSelect.be("dropdown","header")),onClick:t.withModifiers(()=>{},["stop"])},[t.renderSlot(e.$slots,"header")],10,["onClick"])):t.createCommentVNode("v-if",!0),t.withDirectives(t.createVNode(h,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:t.normalizeClass([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical",onScroll:e.popupScroll},{default:t.withCtx(()=>[e.showNewOption?(t.openBlock(),t.createBlock(v,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):t.createCommentVNode("v-if",!0),t.createVNode(S,null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(m,r)=>{var u;return t.openBlock(),t.createElementBlock(t.Fragment,{key:r},[(u=e.getOptions(m))!=null&&u.length?(t.openBlock(),t.createBlock(n,{key:0,label:e.getLabel(m),disabled:e.getDisabled(m)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.getOptions(m),C=>(t.openBlock(),t.createBlock(v,t.mergeProps({key:e.getValue(C)},e.getOptionProps(C)),null,16))),128))]),_:2},1032,["label","disabled"])):(t.openBlock(),t.createBlock(v,t.normalizeProps(t.mergeProps({key:1},e.getOptionProps(m))),null,16))],64)}),128))])]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[t.vShow,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.nsSelect.be("dropdown","loading"))},[t.renderSlot(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.nsSelect.be("dropdown","empty"))},[t.renderSlot(e.$slots,"empty",{},()=>[t.createElementVNode("span",null,t.toDisplayString(e.emptyText),1)])],2)):t.createCommentVNode("v-if",!0),e.$slots.footer?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.nsSelect.be("dropdown","footer")),onClick:t.withModifiers(()=>{},["stop"])},[t.renderSlot(e.$slots,"footer")],10,["onClick"])):t.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-style","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[g,e.handleClickOutside,e.popperRef]])}var jt=a._export_sfc(qt,[["render",Ht],["__file","select.vue"]]);const Ut=a.withInstall(jt,{Option:ne,OptionGroup:oe}),Gt=a.withNoopInstall(ne);a.withNoopInstall(oe);exports.ElOption=Gt;exports.ElSelect=Ut;
|