st-comp 0.0.279 → 0.0.280

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.
Files changed (229) hide show
  1. package/es/ChartLayout.cjs +1 -1
  2. package/es/ChartLayout.js +13 -14
  3. package/es/CustomFunction.cjs +2 -2
  4. package/es/CustomFunction.js +342 -547
  5. package/es/FactorWarning.cjs +1 -1
  6. package/es/FactorWarning.js +294 -294
  7. package/es/Kline.cjs +1 -1
  8. package/es/Kline.js +19 -19
  9. package/es/KlineBasic.cjs +1 -1
  10. package/es/KlineBasic.js +253 -253
  11. package/es/KlineConfig.cjs +1 -1
  12. package/es/KlineConfig.js +579 -553
  13. package/es/KlineNew.cjs +1 -1
  14. package/es/KlineNew.js +17 -17
  15. package/es/KlinePlus.cjs +2 -2
  16. package/es/KlinePlus.js +23 -24
  17. package/es/MonacoEditor.cjs +1 -1
  18. package/es/MonacoEditor.js +30 -29
  19. package/es/Pagination.cjs +1 -1
  20. package/es/Pagination.js +517 -425
  21. package/es/PasswordPrompt.cjs +1 -1
  22. package/es/PasswordPrompt.js +3 -3
  23. package/es/Table.cjs +1 -1
  24. package/es/Table.js +46 -46
  25. package/es/User.cjs +1 -1
  26. package/es/User.js +898 -866
  27. package/es/VarSelectDialog.cjs +3 -3
  28. package/es/VarSelectDialog.js +110 -109
  29. package/es/VarietyAiHelper.cjs +7 -7
  30. package/es/VarietyAiHelper.js +605 -443
  31. package/es/VarietyAutoComplete.cjs +1 -1
  32. package/es/VarietyAutoComplete.js +11 -11
  33. package/es/VarietySearch.cjs +18 -18
  34. package/es/VarietySearch.js +3079 -2913
  35. package/es/{VarietySelect-d58eee29.cjs → VarietySelect-aa082a9c.cjs} +1 -1
  36. package/es/{VarietySelect-41daac7b.js → VarietySelect-c402bade.js} +5 -5
  37. package/es/VarietyTextCopy.cjs +3 -3
  38. package/es/VarietyTextCopy.js +51 -51
  39. package/es/VirtualTable.cjs +13 -1
  40. package/es/VirtualTable.js +1929 -2261
  41. package/es/_baseClone-10bdb989.cjs +1 -0
  42. package/es/_baseClone-98af8b33.js +210 -0
  43. package/es/base-d987e5c9.cjs +5 -0
  44. package/es/base-dd156b8e.js +790 -0
  45. package/es/{castArray-7741a212.js → castArray-18eb6a41.js} +1 -1
  46. package/es/{castArray-35947698.cjs → castArray-d9ffe84a.cjs} +1 -1
  47. package/es/clamp-17c4d8aa.cjs +1 -0
  48. package/es/clamp-c7512966.js +10 -0
  49. package/es/config-provider-33a127c4.cjs +1 -0
  50. package/es/config-provider-563023c9.js +86 -0
  51. package/es/debounce-0a98a9c6.js +57 -0
  52. package/es/debounce-37b17615.cjs +1 -0
  53. package/es/dropdown-ce7496c7.cjs +1 -0
  54. package/es/dropdown-feea8702.js +178 -0
  55. package/es/el-autocomplete-d9253bba.cjs +1 -0
  56. package/es/el-autocomplete-eac54f9f.js +434 -0
  57. package/es/el-button-8259594b.cjs +1 -0
  58. package/es/el-button-8a9721f8.js +343 -0
  59. package/es/el-checkbox-6303fc92.cjs +1 -0
  60. package/es/el-checkbox-c328b097.js +566 -0
  61. package/es/el-dialog-67536fac.js +252 -0
  62. package/es/el-dialog-8788bcc1.cjs +1 -0
  63. package/es/el-divider-3f0320be.cjs +1 -0
  64. package/es/el-divider-c5d72961.js +51 -0
  65. package/es/el-empty-552baf04.js +159 -0
  66. package/es/el-empty-58bc2a10.cjs +1 -0
  67. package/es/el-form-item-8efcf2c3.js +1265 -0
  68. package/es/el-form-item-95e68669.cjs +12 -0
  69. package/es/el-input-c8a9bb71.cjs +1 -0
  70. package/es/el-input-e66500b7.js +761 -0
  71. package/es/el-input-number-68ee0d65.js +390 -0
  72. package/es/el-input-number-d7a81922.cjs +1 -0
  73. package/es/el-loading-62132db2.cjs +1 -0
  74. package/es/el-loading-db4c6d13.js +190 -0
  75. package/es/el-menu-item-4b8e7794.cjs +1 -0
  76. package/es/el-menu-item-c2523d82.js +824 -0
  77. package/es/el-message-box-7c13546c.js +481 -0
  78. package/es/el-message-box-fed174f0.cjs +1 -0
  79. package/es/el-overlay-17299785.cjs +1 -0
  80. package/es/el-overlay-36f223e9.js +444 -0
  81. package/es/el-popconfirm-520b2928.cjs +1 -0
  82. package/es/el-popconfirm-a857c54a.js +190 -0
  83. package/es/el-popper-852446fd.js +2235 -0
  84. package/es/el-popper-f824c63b.cjs +1 -0
  85. package/es/{el-scrollbar-323542e7.js → el-scrollbar-0a42c1d0.js} +4 -9
  86. package/es/{el-scrollbar-bc3f790d.cjs → el-scrollbar-225c6c9e.cjs} +1 -1
  87. package/es/el-segmented-45dcc036.cjs +1 -0
  88. package/es/el-segmented-bf08279f.js +168 -0
  89. package/es/el-select-a34348e1.js +1535 -0
  90. package/es/el-select-d2958ae8.cjs +1 -0
  91. package/es/el-table-column-ad70ee0e.cjs +14 -0
  92. package/es/el-table-column-e2be313e.js +3651 -0
  93. package/es/el-tag-527f06f0.cjs +1 -0
  94. package/es/el-tag-9bcfae32.js +77 -0
  95. package/es/el-text-f9379288.js +84 -0
  96. package/es/el-text-fc345ffd.cjs +1 -0
  97. package/es/index-2419d69a.js +468 -0
  98. package/es/index-3806160e.js +710 -0
  99. package/es/index-3a0a7c36.cjs +1 -0
  100. package/es/index-3e7d5ffb.cjs +1 -0
  101. package/es/index-3ed0c678.cjs +1 -0
  102. package/es/index-47d30a52.js +372 -0
  103. package/es/index-5dec535a.cjs +1 -0
  104. package/es/index-5e76a22d.cjs +1 -0
  105. package/es/{index-eb96e074.js → index-60900c6c.js} +223 -254
  106. package/es/{index-a33b2fb8.js → index-69d2353a.js} +5090 -5090
  107. package/es/index-71ba4c28.cjs +1 -0
  108. package/es/index-7711aa69.cjs +1 -0
  109. package/es/index-7c4d8f5d.js +47 -0
  110. package/es/index-86678b72.js +131 -0
  111. package/es/index-99bb359f.cjs +1 -0
  112. package/es/index-99d4335d.cjs +1 -0
  113. package/es/index-a0522466.js +413 -0
  114. package/es/index-a181f161.js +429 -0
  115. package/es/index-b9a26e7f.js +141 -0
  116. package/es/{index-a9246d17.cjs → index-bb0bc131.cjs} +109 -109
  117. package/es/index-d372e68f.cjs +5 -0
  118. package/es/index-de9ad85c.js +12 -0
  119. package/es/{index-44a382a5.js → index-dfb34e00.js} +12 -12
  120. package/es/index-f5474dcc.cjs +3 -0
  121. package/es/{python-8a1664e6.js → python-6eafa04b.js} +32 -31
  122. package/es/{python-a3db9620.cjs → python-922eca89.cjs} +1 -1
  123. package/es/{raf-8249652f.cjs → raf-735cc598.cjs} +1 -1
  124. package/es/{raf-80ef0c0a.js → raf-b4fd1e12.js} +1 -1
  125. package/es/scroll-07bade1e.cjs +1 -0
  126. package/es/scroll-70271cb1.js +35 -0
  127. package/es/style.css +1 -1
  128. package/es/toNumber-b47ceb68.cjs +1 -0
  129. package/es/toNumber-f077c66a.js +31 -0
  130. package/es/use-form-item-0a831287.cjs +2 -0
  131. package/es/use-form-item-187cd7db.js +422 -0
  132. package/es/use-global-config-17dafd40.js +71 -0
  133. package/es/use-global-config-c90c91f7.cjs +1 -0
  134. package/es/{validator-c60a8956.js → validator-800ed2ba.js} +1 -1
  135. package/es/validator-ee5bc3eb.cjs +1 -0
  136. package/es/vnode-6f7b84f0.cjs +1 -0
  137. package/es/vnode-8ee9bf4e.js +12 -0
  138. package/es/{zh-cn-b59a0910.js → zh-cn-26cc7233.js} +36 -33
  139. package/es/zh-cn-a22a6792.cjs +1 -0
  140. package/lib/bundle.js +1 -1
  141. package/lib/bundle.umd.cjs +271 -252
  142. package/lib/{index-62fa175a.js → index-74ed48c6.js} +54107 -52151
  143. package/lib/{python-4a48fa39.js → python-7aaa84e4.js} +1 -1
  144. package/lib/style.css +1 -1
  145. package/package.json +1 -1
  146. package/es/_initCloneObject-5e73c9c8.js +0 -81
  147. package/es/_initCloneObject-a5832933.cjs +0 -1
  148. package/es/base-a5af3db3.js +0 -288
  149. package/es/base-ef747d02.cjs +0 -5
  150. package/es/config-provider-06ea6b42.cjs +0 -1
  151. package/es/config-provider-88b637a8.js +0 -59
  152. package/es/dayjs.min-2c20abe6.cjs +0 -1
  153. package/es/dayjs.min-8313b006.js +0 -299
  154. package/es/debounce-62f5b6e8.cjs +0 -1
  155. package/es/debounce-8d53f4dd.js +0 -83
  156. package/es/dropdown-4ce4c3e2.cjs +0 -1
  157. package/es/dropdown-72fbc15d.js +0 -178
  158. package/es/el-autocomplete-6cafcdf1.js +0 -329
  159. package/es/el-autocomplete-e0857c5b.cjs +0 -1
  160. package/es/el-button-613e0bb2.cjs +0 -1
  161. package/es/el-button-94d3de38.js +0 -272
  162. package/es/el-checkbox-6d4cb393.js +0 -459
  163. package/es/el-checkbox-e90762df.cjs +0 -1
  164. package/es/el-dialog-02942e22.cjs +0 -1
  165. package/es/el-dialog-5e30161f.js +0 -276
  166. package/es/el-divider-4713d74c.cjs +0 -1
  167. package/es/el-divider-4e059794.js +0 -45
  168. package/es/el-empty-1697ded8.cjs +0 -1
  169. package/es/el-empty-33cb66f1.js +0 -183
  170. package/es/el-form-item-44f060d8.cjs +0 -12
  171. package/es/el-form-item-9e8969ea.js +0 -1269
  172. package/es/el-input-342b2def.js +0 -531
  173. package/es/el-input-9a9a7f7f.cjs +0 -1
  174. package/es/el-input-number-65c847d6.cjs +0 -1
  175. package/es/el-input-number-c22b803a.js +0 -311
  176. package/es/el-loading-8179b497.cjs +0 -1
  177. package/es/el-loading-bcc51e3d.js +0 -203
  178. package/es/el-menu-item-339baf6d.js +0 -768
  179. package/es/el-menu-item-83186444.cjs +0 -1
  180. package/es/el-message-box-035b699c.js +0 -489
  181. package/es/el-message-box-c62d3217.cjs +0 -1
  182. package/es/el-overlay-3e17604b.js +0 -324
  183. package/es/el-overlay-8f1da9e8.cjs +0 -1
  184. package/es/el-popconfirm-4e32ec1b.cjs +0 -1
  185. package/es/el-popconfirm-f8a86e2c.js +0 -162
  186. package/es/el-popper-a4f3ae4d.cjs +0 -1
  187. package/es/el-popper-fbd0dcea.js +0 -2094
  188. package/es/el-segmented-56bd58a8.js +0 -142
  189. package/es/el-segmented-833ac177.cjs +0 -1
  190. package/es/el-select-44fa547d.js +0 -1256
  191. package/es/el-select-70806166.cjs +0 -1
  192. package/es/el-table-column-3e2cdfca.cjs +0 -14
  193. package/es/el-table-column-b74a857d.js +0 -3432
  194. package/es/el-tag-66c83156.js +0 -117
  195. package/es/el-tag-9c2f329f.cjs +0 -1
  196. package/es/el-text-034bd3f4.js +0 -67
  197. package/es/el-text-6b2374bb.cjs +0 -1
  198. package/es/index-00f6ca75.cjs +0 -1
  199. package/es/index-185792a7.cjs +0 -1
  200. package/es/index-1e2a38ab.js +0 -113
  201. package/es/index-2e331d74.js +0 -10
  202. package/es/index-3153c1db.cjs +0 -1
  203. package/es/index-5216d5f5.js +0 -406
  204. package/es/index-5c0dd943.cjs +0 -1
  205. package/es/index-657047bb.js +0 -513
  206. package/es/index-870b6c9d.cjs +0 -1
  207. package/es/index-8c2d7e05.js +0 -368
  208. package/es/index-960806da.js +0 -314
  209. package/es/index-9780a537.cjs +0 -1
  210. package/es/index-9d16cea8.cjs +0 -1
  211. package/es/index-ac8dc53d.cjs +0 -1
  212. package/es/index-bb833443.cjs +0 -1
  213. package/es/index-c5f2d372.js +0 -326
  214. package/es/index-c6584658.js +0 -163
  215. package/es/index-d77a7336.js +0 -204
  216. package/es/index-eea0bcb3.cjs +0 -1
  217. package/es/index-f034b910.js +0 -60
  218. package/es/index-f1c702f6.cjs +0 -1
  219. package/es/index-f58b2920.cjs +0 -1
  220. package/es/scroll-679bd6bf.js +0 -35
  221. package/es/scroll-b108dabd.cjs +0 -1
  222. package/es/use-form-common-props-ac666630.cjs +0 -1
  223. package/es/use-form-common-props-ed72e914.js +0 -364
  224. package/es/use-global-config-23472471.cjs +0 -1
  225. package/es/use-global-config-ee406d58.js +0 -72
  226. package/es/validator-366dbf39.cjs +0 -1
  227. package/es/vnode-5ddb7ed1.js +0 -14
  228. package/es/vnode-b906ae6d.cjs +0 -1
  229. package/es/zh-cn-c21d12d8.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";const i=require("./base-d987e5c9.cjs"),C=require("./el-popper-f824c63b.cjs"),P=require("./index-d372e68f.cjs"),t=require("vue"),A=require("./castArray-d9ffe84a.cjs"),L=require("./index-3ed0c678.cjs"),z=require("./use-form-item-0a831287.cjs"),kt=require("./vnode-6f7b84f0.cjs"),pe=require("./index-3e7d5ffb.cjs"),fe=require("./index-3a0a7c36.cjs"),me=require("./index-5e76a22d.cjs"),Vt=require("./scroll-07bade1e.cjs"),Fe=require("./index-7711aa69.cjs"),Bt=require("./el-tag-527f06f0.cjs"),Nt=require("./toNumber-b47ceb68.cjs"),Dt=require("./clamp-17c4d8aa.cjs");var Ae=1/0,It=17976931348623157e292;function Mt(e){if(!e)return e===0?e:0;if(e=Nt.toNumber(e),e===Ae||e===-Ae){var o=e<0?-1:1;return o*It}return e===e?e:0}function zt(e){var o=Mt(e),s=o%1;return o===o?s?o-s:o:0}function Rt(e,o,s,c){for(var d=e.length,p=s+(c?1:-1);c?p--:++p<d;)if(o(e[p],p,e))return p;return-1}var Pt=Math.max,$t=Math.min;function Lt(e,o,s){var c=e==null?0:e.length;if(!c)return-1;var d=c-1;return s!==void 0&&(d=zt(s),d=s<0?Pt(c+d,0):$t(d,c-1)),Rt(e,Bt.baseIteratee(o),d,!0)}const F=new Map;if(i.isClient){let e;document.addEventListener("mousedown",o=>e=o),document.addEventListener("mouseup",o=>{if(e){for(const s of F.values())for(const{documentHandler:c}of s)c(o,e);e=void 0}})}function We(e,o){let s=[];return i.isArray(o.arg)?s=o.arg:i.isElement(o.arg)&&s.push(o.arg),function(c,d){const p=o.instance.popperRef,m=c.target,n=d==null?void 0:d.target,w=!o||!o.instance,v=!m||!n,g=e.contains(m)||e.contains(n),T=e===m,O=s.length&&s.some(y=>y==null?void 0:y.contains(m))||s.length&&s.includes(n),h=p&&(p.contains(m)||p.contains(n));w||v||g||T||O||h||o.value(c,d)}}const Ke={beforeMount(e,o){F.has(e)||F.set(e,[]),F.get(e).push({documentHandler:We(e,o),bindingFn:o.value})},updated(e,o){F.has(e)||F.set(e,[]);const s=F.get(e),c=s.findIndex(p=>p.bindingFn===o.oldValue),d={documentHandler:We(e,o),bindingFn:o.value};c>=0?s.splice(c,1,d):s.push(d)},unmounted(e){F.delete(e)}};function Ft(){const e=t.shallowRef(),o=t.ref(0),s=t.computed(()=>({minWidth:`${Math.max(o.value,11)}px`})),c=()=>{var d;o.value=((d=e.value)==null?void 0:d.getBoundingClientRect().width)??0};return z.useResizeObserver(e,c),{calculatorRef:e,calculatorWidth:o,inputStyle:s}}const At=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),qe=Symbol("ElSelectGroup"),se=Symbol("ElSelect"),ve={label:"label",value:"value",disabled:"disabled",options:"options"};function Wt(e){const o=t.ref({...ve,...e.props});let s={...e.props};return t.watch(()=>e.props,n=>{L.isEqual(n,s)||(o.value={...ve,...n},s={...n})},{deep:!0}),{aliasProps:o,getLabel:n=>P.get(n,o.value.label),getValue:n=>P.get(n,o.value.value),getDisabled:n=>P.get(n,o.value.disabled),getOptions:n=>P.get(n,o.value.options)}}const Ht=i.buildProps({name:String,id:String,modelValue:{type:i.definePropType([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:z.useSizeProp,effect:{type:i.definePropType(String),default:"light"},disabled:{type:Boolean,default:void 0},clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:i.definePropType([String,Array,Object,Boolean]),default:""},popperStyle:{type:i.definePropType([String,Array,Object,Boolean]),default:void 0},popperOptions:{type:i.definePropType(Object),default:()=>({})},remote:Boolean,debounce:{type:Number,default:300},loadingText:String,noMatchText:String,noDataText:String,remoteMethod:{type:i.definePropType(Function)},filterMethod:{type:i.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,tagTooltip:{type:i.definePropType(Object),default:()=>({})},maxCollapseTags:{type:Number,default:1},teleported:C.useTooltipContentProps.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:z.iconPropType,default:pe.circle_close_default},fitInputWidth:Boolean,suffixIcon:{type:z.iconPropType,default:pe.arrow_down_default},tagType:{...me.tagProps.type,default:"info"},tagEffect:{...me.tagProps.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:i.definePropType(String),values:C.Ee,default:"bottom-start"},fallbackPlacements:{type:i.definePropType(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:C.useTooltipContentProps.appendTo,options:{type:i.definePropType(Array)},props:{type:i.definePropType(Object),default:()=>ve},...L.useEmptyValuesProps,...C.useAriaProps(["ariaLabel"])}),Kt={[C.UPDATE_MODEL_EVENT]:e=>!0,[C.CHANGE_EVENT]:e=>!0,"popup-scroll":fe.scrollbarEmits.scroll,"end-reached":fe.scrollbarEmits["end-reached"],"remove-tag":e=>!0,"visible-change":e=>!0,focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0},ge="ElOption",qt=i.buildProps({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function jt(e,o){const s=t.inject(se);s||i.throwError(ge,"usage: <el-select><el-option /></el-select/>");const c=t.inject(qe,{disabled:!1}),d=t.computed(()=>g(A.castArray(s.props.modelValue),e.value)),p=t.computed(()=>{if(s.props.multiple){const h=A.castArray(s.props.modelValue??[]);return!d.value&&h.length>=s.props.multipleLimit&&s.props.multipleLimit>0}else return!1}),m=t.computed(()=>e.label??(i.isObject(e.value)?"":e.value)),n=t.computed(()=>e.value||e.label||""),w=t.computed(()=>e.disabled||o.groupDisabled||p.value),v=t.getCurrentInstance(),g=(h=[],y)=>{if(i.isObject(e.value)){const S=s.props.valueKey;return h&&h.some(b=>t.toRaw(P.get(b,S))===P.get(y,S))}else return h&&h.includes(y)},T=()=>{w.value||(s.states.hoveringIndex=s.optionsArray.indexOf(v.proxy))},O=h=>{o.visible=new RegExp(At(h),"i").test(String(m.value))||e.created};return t.watch(()=>m.value,()=>{!e.created&&!s.props.remote&&s.setSelected()}),t.watch(()=>e.value,(h,y)=>{const{remote:S,valueKey:b}=s.props;if((S?h!==y:!L.isEqual(h,y))&&(s.onOptionDestroy(y,v.proxy),s.onOptionCreate(v.proxy)),!e.created&&!S){if(b&&i.isObject(h)&&i.isObject(y)&&h[b]===y[b])return;s.setSelected()}}),t.watch(()=>c.disabled,()=>{o.groupDisabled=c.disabled},{immediate:!0}),{select:s,currentLabel:m,currentValue:n,itemSelected:d,isDisabled:w,hoverItem:T,updateOption:O}}var Ut=t.defineComponent({name:ge,componentName:ge,props:qt,setup(e){const o=i.useNamespace("select"),s=P.useId(),c=t.computed(()=>[o.be("dropdown","item"),o.is("disabled",t.unref(w)),o.is("selected",t.unref(n)),o.is("hovering",t.unref(h))]),d=t.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),p=i.isIOS?null:"mousemove",{currentLabel:m,itemSelected:n,isDisabled:w,select:v,hoverItem:g,updateOption:T}=jt(e,d),{visible:O,hover:h}=t.toRefs(d),y=t.getCurrentInstance().proxy;v.onOptionCreate(y),t.onBeforeUnmount(()=>{const N=y.value;t.nextTick(()=>{const{selected:f}=v.states,u=f.some(k=>k.value===y.value);v.states.cachedOptions.get(N)===y&&!u&&v.states.cachedOptions.delete(N)}),v.onOptionDestroy(N,y)});function S(){w.value||v.handleOptionSelect(y)}return{ns:o,id:s,containerKls:c,currentLabel:m,itemSelected:n,isDisabled:w,select:v,visible:O,hover:h,states:d,mouseMoveEventName:p,hoverItem:g,handleMousedown:N=>{let f=N.target;const u=N.currentTarget;for(;f&&f!==u;){if(i.isFocusable(f))return;f=f.parentElement}N.preventDefault()},updateOption:T,selectOptionClick:S}}});const Gt=["id","aria-disabled","aria-selected"];function Qt(e,o,s,c,d,p){return t.withDirectives((t.openBlock(),t.createElementBlock("li",t.mergeProps({id:e.id,class:e.containerKls,role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected},{[t.toHandlerKey(e.mouseMoveEventName)]:o[0]||(o[0]=(...m)=>e.hoverItem&&e.hoverItem(...m))},{onMousedown:o[1]||(o[1]=(...m)=>e.handleMousedown&&e.handleMousedown(...m)),onClick:o[2]||(o[2]=t.withModifiers((...m)=>e.selectOptionClick&&e.selectOptionClick(...m),["stop"]))}),[t.renderSlot(e.$slots,"default",{},()=>[t.createElementVNode("span",null,t.toDisplayString(e.currentLabel),1)])],16,Gt)),[[t.vShow,e.visible]])}var he=C._plugin_vue_export_helper_default(Ut,[["render",Qt]]),Xt=t.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const o=i.useNamespace("select"),s=t.ref(),c=t.getCurrentInstance(),d=t.ref([]);t.provide(qe,t.reactive({...t.toRefs(e)}));const p=t.computed(()=>d.value.some(v=>v.visible===!0)),m=v=>{var g;return v.type.name==="ElOption"&&!!((g=v.component)!=null&&g.proxy)},n=v=>{const g=A.castArray(v),T=[];return g.forEach(O=>{var h;t.isVNode(O)&&(m(O)?T.push(O.component.proxy):i.isArray(O.children)&&O.children.length?T.push(...n(O.children)):(h=O.component)!=null&&h.subTree&&T.push(...n(O.component.subTree)))}),T},w=()=>{d.value=n(c.subTree)};return t.onMounted(()=>{w()}),z.useMutationObserver(s,w,{attributes:!0,subtree:!0,childList:!0}),{groupRef:s,visible:p,ns:o}}});function Yt(e,o,s,c,d,p){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 be=C._plugin_vue_export_helper_default(Xt,[["render",Yt]]),Jt=t.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=t.inject(se),o=i.useNamespace("select"),s=t.computed(()=>e.props.popperClass),c=t.computed(()=>e.props.multiple),d=t.computed(()=>e.props.fitInputWidth),p=t.ref("");function m(){var w;const n=(w=e.selectRef)==null?void 0:w.offsetWidth;n?p.value=`${n-2}px`:p.value=""}return t.onMounted(()=>{m(),z.useResizeObserver(e.selectRef,m)}),{ns:o,minWidth:p,popperClass:s,isMultiple:c,isFitInputWidth:d}}});function Zt(e,o,s,c,d,p){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 xt=C._plugin_vue_export_helper_default(Jt,[["render",Zt]]);const _t=(e,o)=>{const{t:s}=P.useLocale(),c=t.useSlots(),d=P.useId(),p=i.useNamespace("select"),m=i.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}),w=t.ref(),v=t.ref(),g=t.ref(),T=t.ref(),O=t.ref(),h=t.ref(),y=t.ref(),S=t.ref(),b=t.ref(),N=t.ref(),f=t.ref(),u=t.ref(!1),k=t.ref(),$=t.ref(!1),{form:D,formItem:R}=z.useFormItem(),{inputId:J}=z.useFormItemInputId(e,{formItemContext:R}),{valueOnClear:Z,isEmptyValue:x}=L.useEmptyValues(e),{isComposing:H,handleCompositionStart:_,handleCompositionUpdate:I,handleCompositionEnd:K}=Fe.useComposition({afterComposition:l=>Ve(l)}),q=z.useFormDisabled(),{wrapperRef:ye,isFocused:ie,handleBlur:je}=Fe.useFocusController(O,{disabled:q,afterFocus(){e.automaticDropdown&&!u.value&&(u.value=!0,n.menuVisibleOnFocus=!0)},beforeBlur(l){var a,r;return((a=g.value)==null?void 0:a.isFocusInsideContent(l))||((r=T.value)==null?void 0:r.isFocusInsideContent(l))},afterBlur(){var l;u.value=!1,n.menuVisibleOnFocus=!1,e.validateEvent&&((l=R==null?void 0:R.validate)==null||l.call(R,"blur").catch(i.NOOP))}}),re=t.computed(()=>i.isArray(e.modelValue)?e.modelValue.length>0:!x(e.modelValue)),Ue=t.computed(()=>(D==null?void 0:D.statusIcon)??!1),Ge=t.computed(()=>e.clearable&&!q.value&&re.value&&(ie.value||n.inputHovering)),Ee=t.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),Qe=t.computed(()=>p.is("reverse",!!(Ee.value&&u.value))),ue=t.computed(()=>(R==null?void 0:R.validateState)||""),Xe=t.computed(()=>ue.value&&z.ValidateComponentsMap[ue.value]),Ye=t.computed(()=>e.remote?e.debounce:0),Je=t.computed(()=>e.remote&&!n.inputValue&&n.options.size===0),Ze=t.computed(()=>e.loading?e.loadingText||s("el.select.loading"):e.filterable&&n.inputValue&&n.options.size>0&&j.value===0?e.noMatchText||s("el.select.noMatch"):n.options.size===0?e.noDataText||s("el.select.noData"):null),j=t.computed(()=>M.value.filter(l=>l.visible).length),M=t.computed(()=>{const l=Array.from(n.options.values()),a=[];return n.optionValues.forEach(r=>{const E=l.findIndex(V=>V.value===r);E>-1&&a.push(l[E])}),a.length>=l.length?a:l}),xe=t.computed(()=>Array.from(n.cachedOptions.values())),_e=t.computed(()=>{const l=M.value.filter(a=>!a.created).some(a=>a.currentLabel===n.inputValue);return e.filterable&&e.allowCreate&&n.inputValue!==""&&!l}),Ce=()=>{e.filterable&&i.isFunction(e.filterMethod)||e.filterable&&e.remote&&i.isFunction(e.remoteMethod)||M.value.forEach(l=>{var a;(a=l.updateOption)==null||a.call(l,n.inputValue)})},Se=z.useFormSize(),et=t.computed(()=>["small"].includes(Se.value)?"small":"default"),Oe=t.computed({get(){return u.value&&(e.loading||!Je.value||e.remote&&!!c.empty)&&(!$.value||!i.isEmpty(n.previousQuery)||n.options.size>0)},set(l){u.value=l}}),tt=t.computed(()=>{if(e.multiple&&!i.isUndefined(e.modelValue))return A.castArray(e.modelValue).length===0&&!n.inputValue;const l=i.isArray(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||i.isUndefined(l)?!n.inputValue:!0}),lt=t.computed(()=>{const l=e.placeholder??s("el.select.placeholder");return e.multiple||!re.value?l:n.selectedLabel}),nt=i.isIOS?null:"mouseenter";t.watch(()=>e.modelValue,(l,a)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(n.inputValue="",ee("")),te(),!L.isEqual(l,a)&&e.validateEvent&&(R==null||R.validate("change").catch(i.NOOP))},{flush:"post",deep:!0}),t.watch(()=>u.value,l=>{l?ee(n.inputValue):(n.inputValue="",n.previousQuery=null,n.isBeforeHide=!0,n.menuVisibleOnFocus=!1)}),t.watch(()=>n.options.entries(),()=>{i.isClient&&(te(),e.defaultFirstOption&&(e.filterable||e.remote)&&j.value&&we())},{flush:"post"}),t.watch([()=>n.hoveringIndex,M],([l])=>{i.isNumber(l)&&l>-1?k.value=M.value[l]||{}:k.value={},M.value.forEach(a=>{a.hover=k.value===a})}),t.watchEffect(()=>{n.isBeforeHide||Ce()});const ee=l=>{n.previousQuery===l||H.value||(n.previousQuery=l,e.filterable&&i.isFunction(e.filterMethod)?e.filterMethod(l):e.filterable&&e.remote&&i.isFunction(e.remoteMethod)&&e.remoteMethod(l),e.defaultFirstOption&&(e.filterable||e.remote)&&j.value?t.nextTick(we):t.nextTick(ot))},we=()=>{const l=M.value.filter(E=>E.visible&&!E.disabled&&!E.states.groupDisabled),a=l.find(E=>E.created),r=l[0];n.hoveringIndex=Me(M.value.map(E=>E.value),a||r)},te=()=>{if(e.multiple)n.selectedLabel="";else{const a=de(i.isArray(e.modelValue)?e.modelValue[0]:e.modelValue);n.selectedLabel=a.currentLabel,n.selected=[a];return}const l=[];i.isUndefined(e.modelValue)||A.castArray(e.modelValue).forEach(a=>{l.push(de(a))}),n.selected=l},de=l=>{let a;const r=i.isPlainObject$1(l);for(let V=n.cachedOptions.size-1;V>=0;V--){const B=xe.value[V];if(r?P.get(B.value,e.valueKey)===P.get(l,e.valueKey):B.value===l){a={index:M.value.filter(W=>!W.created).indexOf(B),value:l,currentLabel:B.currentLabel,get isDisabled(){return B.isDisabled}};break}}if(a)return a;const E=n.selected.find(V=>r?P.get(V.value,e.valueKey)===P.get(l,e.valueKey):V.value===l);return{index:-1,value:l,currentLabel:r?l.label:E?E.currentLabel:l??""}},ot=()=>{const l=n.selected.length;if(l>0){const a=n.selected[l-1];n.hoveringIndex=M.value.findIndex(r=>ne(a)===ne(r))}else n.hoveringIndex=-1},at=()=>{n.selectionWidth=Number.parseFloat(window.getComputedStyle(v.value).width)},st=()=>{n.collapseItemWidth=N.value.getBoundingClientRect().width},ce=()=>{var l,a;(a=(l=g.value)==null?void 0:l.updatePopper)==null||a.call(l)},Te=()=>{var l,a;(a=(l=T.value)==null?void 0:l.updatePopper)==null||a.call(l)},ke=()=>{n.inputValue.length>0&&!u.value&&(u.value=!0),ee(n.inputValue)},Ve=l=>{if(n.inputValue=l.target.value,e.remote)$.value=!0,Be();else return ke()},Be=i.useDebounceFn(()=>{ke(),$.value=!1},Ye),U=l=>{L.isEqual(e.modelValue,l)||o(C.CHANGE_EVENT,l)},it=l=>Lt(l,a=>{const r=n.cachedOptions.get(a);return!(r!=null&&r.disabled)&&!(r!=null&&r.states.groupDisabled)}),Ne=l=>{const a=C.getEventCode(l);if(e.multiple&&a!==C.EVENT_CODE.delete&&l.target.value.length<=0){const r=A.castArray(e.modelValue).slice(),E=it(r);if(E<0)return;const V=r[E];r.splice(E,1),o(C.UPDATE_MODEL_EVENT,r),U(r),o("remove-tag",V)}},rt=(l,a)=>{const r=n.selected.indexOf(a);if(r>-1&&!q.value){const E=A.castArray(e.modelValue).slice();E.splice(r,1),o(C.UPDATE_MODEL_EVENT,E),U(E),o("remove-tag",a.value)}l.stopPropagation(),le()},De=l=>{l.stopPropagation();const a=e.multiple?[]:Z.value;if(e.multiple)for(const r of n.selected)r.isDisabled&&a.push(r.value);o(C.UPDATE_MODEL_EVENT,a),U(a),n.hoveringIndex=-1,u.value=!1,o("clear"),le()},Ie=l=>{if(e.multiple){const a=A.castArray(e.modelValue??[]).slice(),r=Me(a,l);r>-1?a.splice(r,1):(e.multipleLimit<=0||a.length<e.multipleLimit)&&a.push(l.value),o(C.UPDATE_MODEL_EVENT,a),U(a),l.created&&ee(""),e.filterable&&(l.created||!e.reserveKeyword)&&(n.inputValue="")}else!L.isEqual(e.modelValue,l.value)&&o("update:modelValue",l.value),U(l.value),u.value=!1;le(),!u.value&&t.nextTick(()=>{G(l)})},Me=(l,a)=>i.isUndefined(a)?-1:i.isObject(a.value)?l.findIndex(r=>L.isEqual(P.get(r,e.valueKey),ne(a))):l.indexOf(a.value),G=l=>{var E,V,B,W,Le;const a=i.isArray(l)?l[l.length-1]:l;let r=null;if(!i.isNil(a==null?void 0:a.value)){const X=M.value.filter(Tt=>Tt.value===a.value);X.length>0&&(r=X[0].$el)}if(g.value&&r){const X=(W=(B=(V=(E=g.value)==null?void 0:E.popperRef)==null?void 0:V.contentRef)==null?void 0:B.querySelector)==null?void 0:W.call(B,`.${p.be("dropdown","wrap")}`);X&&Vt.scrollIntoView(X,r)}(Le=f.value)==null||Le.handleScroll()},ut=l=>{n.options.set(l.value,l),n.cachedOptions.set(l.value,l)},dt=(l,a)=>{n.options.get(l)===a&&n.options.delete(l)},ct=t.computed(()=>{var l,a;return(a=(l=g.value)==null?void 0:l.popperRef)==null?void 0:a.contentRef}),pt=()=>{n.isBeforeHide=!1,t.nextTick(()=>{var l;(l=f.value)==null||l.update(),G(n.selected)})},le=()=>{var l;(l=O.value)==null||l.focus()},ft=()=>{var l;if(u.value){u.value=!1,t.nextTick(()=>{var a;return(a=O.value)==null?void 0:a.blur()});return}(l=O.value)==null||l.blur()},mt=l=>{De(l)},vt=l=>{if(u.value=!1,ie.value){const a=new FocusEvent("blur",l);t.nextTick(()=>je(a))}},ze=()=>{n.inputValue.length>0?n.inputValue="":u.value=!1},Re=l=>{var a;q.value||e.filterable&&u.value&&l&&!((a=y.value)!=null&&a.contains(l.target))||(i.isIOS&&(n.inputHovering=!0),n.menuVisibleOnFocus?n.menuVisibleOnFocus=!1:u.value=!u.value)},Pe=()=>{if(!u.value)Re();else{const l=M.value[n.hoveringIndex];l&&!l.isDisabled&&Ie(l)}},ne=l=>i.isObject(l.value)?P.get(l.value,e.valueKey):l.value,gt=t.computed(()=>M.value.filter(l=>l.visible).every(l=>l.isDisabled)),ht=t.computed(()=>e.multiple?e.collapseTags?n.selected.slice(0,e.maxCollapseTags):n.selected:[]),bt=t.computed(()=>e.multiple?e.collapseTags?n.selected.slice(e.maxCollapseTags):[]:[]),oe=l=>{if(!u.value){u.value=!0;return}if(!(n.options.size===0||j.value===0||H.value)&&!gt.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 a=M.value[n.hoveringIndex];(a.isDisabled||!a.visible)&&oe(l),t.nextTick(()=>G(k.value))}},$e=(l,a,r,E)=>{for(let V=a;V>=0&&V<E;V+=r){const B=l[V];if(!(B!=null&&B.isDisabled)&&(B!=null&&B.visible))return V}return null},ae=(l,a)=>{const r=n.options.size;if(r===0)return;const E=Dt.clamp(l,0,r-1),V=M.value,B=a==="up"?-1:1,W=$e(V,E,B,r)??$e(V,E-B,-B,r);W!=null&&(n.hoveringIndex=W,t.nextTick(()=>G(k.value)))},yt=l=>{const a=C.getEventCode(l);let r=!0;switch(a){case C.EVENT_CODE.up:oe("prev");break;case C.EVENT_CODE.down:oe("next");break;case C.EVENT_CODE.enter:case C.EVENT_CODE.numpadEnter:H.value||Pe();break;case C.EVENT_CODE.esc:ze();break;case C.EVENT_CODE.backspace:r=!1,Ne(l);return;case C.EVENT_CODE.home:if(!u.value)return;ae(0,"down");break;case C.EVENT_CODE.end:if(!u.value)return;ae(n.options.size-1,"up");break;case C.EVENT_CODE.pageUp:if(!u.value)return;ae(n.hoveringIndex-10,"up");break;case C.EVENT_CODE.pageDown:if(!u.value)return;ae(n.hoveringIndex+10,"down");break;default:r=!1;break}r&&(l.preventDefault(),l.stopPropagation())},Et=()=>{if(!v.value)return 0;const l=window.getComputedStyle(v.value);return Number.parseFloat(l.gap||"6px")},Ct=t.computed(()=>{const l=Et(),a=e.filterable?l+11:0;return{maxWidth:`${N.value&&e.maxCollapseTags===1?n.selectionWidth-n.collapseItemWidth-l-a:n.selectionWidth-a}px`}}),St=t.computed(()=>({maxWidth:`${n.selectionWidth}px`})),Ot=l=>{o("popup-scroll",l)},wt=l=>{o("end-reached",l)};z.useResizeObserver(v,at),z.useResizeObserver(ye,ce),z.useResizeObserver(b,Te),z.useResizeObserver(N,st);let Q;return t.watch(()=>Oe.value,l=>{l?Q=z.useResizeObserver(S,ce).stop:(Q==null||Q(),Q=void 0),o("visible-change",l)}),t.onMounted(()=>{te()}),{inputId:J,contentId:d,nsSelect:p,nsInput:m,states:n,isFocused:ie,expanded:u,optionsArray:M,hoverOption:k,selectSize:Se,filteredOptionsCount:j,updateTooltip:ce,updateTagTooltip:Te,debouncedOnInputChange:Be,onInput:Ve,deletePrevTag:Ne,deleteTag:rt,deleteSelected:De,handleOptionSelect:Ie,scrollToOption:G,hasModelValue:re,shouldShowPlaceholder:tt,currentPlaceholder:lt,mouseEnterEventName:nt,needStatusIcon:Ue,showClearBtn:Ge,iconComponent:Ee,iconReverse:Qe,validateState:ue,validateIcon:Xe,showNewOption:_e,updateOptions:Ce,collapseTagSize:et,setSelected:te,selectDisabled:q,emptyText:Ze,handleCompositionStart:_,handleCompositionUpdate:I,handleCompositionEnd:K,handleKeydown:yt,onOptionCreate:ut,onOptionDestroy:dt,handleMenuEnter:pt,focus:le,blur:ft,handleClearClick:mt,handleClickOutside:vt,handleEsc:ze,toggleMenu:Re,selectOption:Pe,getValueKey:ne,navigateOptions:oe,dropdownMenuVisible:Oe,showTagList:ht,collapseTagList:bt,popupScroll:Ot,getOption:de,endReached:wt,tagStyle:Ct,collapseTagStyle:St,popperRef:ct,inputRef:O,tooltipRef:g,tagTooltipRef:T,prefixRef:h,suffixRef:y,selectRef:w,wrapperRef:ye,selectionRef:v,scrollbarRef:f,menuRef:S,tagMenuRef:b,collapseItemRef:N}};var el=t.defineComponent({name:"ElOptions",setup(e,{slots:o}){const s=t.inject(se);let c=[];return()=>{var n,w;const d=(n=o.default)==null?void 0:n.call(o),p=[];function m(v){i.isArray(v)&&v.forEach(g=>{var O,h,y,S;const T=(O=(g==null?void 0:g.type)||{})==null?void 0:O.name;T==="ElOptionGroup"?m(!i.isString(g.children)&&!i.isArray(g.children)&&i.isFunction((h=g.children)==null?void 0:h.default)?(y=g.children)==null?void 0:y.default():g.children):T==="ElOption"?p.push((S=g.props)==null?void 0:S.value):i.isArray(g.children)&&m(g.children)})}return d.length&&m((w=d[0])==null?void 0:w.children),L.isEqual(p,c)||(c=p,s&&(s.states.optionValues=p)),d}}});const He="ElSelect",Y=new WeakMap,tl=e=>(...o)=>{var d,p;const s=o[0];if(!s||s.includes('Slot "default" invoked outside of the render function')&&((d=o[2])!=null&&d.includes("ElTreeSelect")))return;const c=(p=Y.get(e))==null?void 0:p.originalWarnHandler;if(c){c(...o);return}console.warn(...o)},ll=e=>{let o=Y.get(e);return o||(o={originalWarnHandler:e.config.warnHandler,handler:tl(e),count:0},Y.set(e,o)),o};var nl=t.defineComponent({name:He,componentName:He,components:{ElSelectMenu:xt,ElOption:he,ElOptions:el,ElOptionGroup:be,ElTag:me.ElTag,ElScrollbar:fe.ElScrollbar,ElTooltip:C.ElTooltip,ElIcon:pe.ElIcon},directives:{ClickOutside:Ke},props:Ht,emits:Kt,setup(e,{emit:o,slots:s}){const c=t.getCurrentInstance(),d=ll(c.appContext);d.count+=1,c.appContext.config.warnHandler=d.handler;const p=t.computed(()=>{const{modelValue:f,multiple:u}=e,k=u?[]:void 0;return i.isArray(f)?u?f:k:u?k:f}),m=t.reactive({...t.toRefs(e),modelValue:p}),n=_t(m,o),{calculatorRef:w,inputStyle:v}=Ft(),{getLabel:g,getValue:T,getOptions:O,getDisabled:h}=Wt(e),y=f=>({label:g(f),value:T(f),disabled:h(f)}),S=f=>f.reduce((u,k)=>(u.push(k),k.children&&k.children.length>0&&u.push(...S(k.children)),u),[]),b=f=>{kt.flattedChildren(f||[]).forEach(u=>{var k;if(i.isObject(u)&&(u.type.name==="ElOption"||u.type.name==="ElTree")){const $=u.type.name;if($==="ElTree")S(((k=u.props)==null?void 0:k.data)||[]).forEach(D=>{D.currentLabel=D.label??(i.isObject(D.value)?"":D.value),n.onOptionCreate(D)});else if($==="ElOption"){const D={...u.props};D.currentLabel=D.label??(i.isObject(D.value)?"":D.value),n.onOptionCreate(D)}}})};t.watch(()=>{var f;return[e.persistent||n.expanded.value||!s.default||(f=s.default)==null?void 0:f.call(s),p.value]},()=>{var f;e.persistent||n.expanded.value||s.default&&(n.states.options.clear(),b((f=s.default)==null?void 0:f.call(s)))},{immediate:!0}),t.provide(se,t.reactive({props:m,states:n.states,selectRef:n.selectRef,optionsArray:n.optionsArray,setSelected:n.setSelected,handleOptionSelect:n.handleOptionSelect,onOptionCreate:n.onOptionCreate,onOptionDestroy:n.onOptionDestroy}));const N=t.computed(()=>e.multiple?n.states.selected.map(f=>f.currentLabel):n.states.selectedLabel);return t.onBeforeUnmount(()=>{const f=Y.get(c.appContext);f&&(f.count-=1,f.count<=0&&(c.appContext.config.warnHandler=f.originalWarnHandler,Y.delete(c.appContext)))}),{...n,modelValue:p,selectedLabel:N,calculatorRef:w,inputStyle:v,getLabel:g,getValue:T,getOptions:O,getDisabled:h,getOptionProps:y}}});const ol=["id","value","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],al=["textContent"],sl={key:1};function il(e,o,s,c,d,p){const m=t.resolveComponent("el-tag"),n=t.resolveComponent("el-tooltip"),w=t.resolveComponent("el-icon"),v=t.resolveComponent("el-option"),g=t.resolveComponent("el-option-group"),T=t.resolveComponent("el-options"),O=t.resolveComponent("el-scrollbar"),h=t.resolveComponent("el-select-menu"),y=t.resolveDirective("click-outside");return t.withDirectives((t.openBlock(),t.createElementBlock("div",t.mergeProps({ref:"selectRef",class:[e.nsSelect.b(),e.nsSelect.m(e.selectSize)]},{[t.toHandlerKey(e.mouseEnterEventName)]:o[11]||(o[11]=S=>e.states.inputHovering=!0)},{onMouseleave:o[12]||(o[12]=S=>e.states.inputHovering=!1)}),[t.createVNode(n,{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:o[10]||(o[10]=S=>e.states.isBeforeHide=!1)},{default:t.withCtx(()=>{var S;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:o[7]||(o[7]=t.withModifiers((...b)=>e.toggleMenu&&e.toggleMenu(...b),["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},()=>{var b,N,f,u,k,$,D,R,J,Z,x,H,_;return[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.showTagList,I=>(t.openBlock(),t.createElementBlock("div",{key:e.getValueKey(I),class:t.normalizeClass(e.nsSelect.e("selected-item"))},[t.createVNode(m,{closable:!e.selectDisabled&&!I.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:t.normalizeStyle(e.tagStyle),onClose:K=>e.deleteTag(K,I)},{default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(e.nsSelect.e("tags-text"))},[t.renderSlot(e.$slots,"label",{index:I.index,label:I.currentLabel,value:I.value},()=>[t.createTextVNode(t.toDisplayString(I.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(n,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":((b=e.tagTooltip)==null?void 0:b.fallbackPlacements)??["bottom","top","right","left"],effect:((N=e.tagTooltip)==null?void 0:N.effect)??e.effect,placement:((f=e.tagTooltip)==null?void 0:f.placement)??"bottom","popper-class":((u=e.tagTooltip)==null?void 0:u.popperClass)??e.popperClass,"popper-style":((k=e.tagTooltip)==null?void 0:k.popperStyle)??e.popperStyle,teleported:(($=e.tagTooltip)==null?void 0:$.teleported)??e.teleported,"append-to":((D=e.tagTooltip)==null?void 0:D.appendTo)??e.appendTo,"popper-options":((R=e.tagTooltip)==null?void 0:R.popperOptions)??e.popperOptions,transition:(J=e.tagTooltip)==null?void 0:J.transition,"show-after":(Z=e.tagTooltip)==null?void 0:Z.showAfter,"hide-after":(x=e.tagTooltip)==null?void 0:x.hideAfter,"auto-close":(H=e.tagTooltip)==null?void 0:H.autoClose,offset:(_=e.tagTooltip)==null?void 0:_.offset},{default:t.withCtx(()=>[t.createElementVNode("div",{ref:"collapseItemRef",class:t.normalizeClass(e.nsSelect.e("selected-item"))},[t.createVNode(m,{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,I=>(t.openBlock(),t.createElementBlock("div",{key:e.getValueKey(I),class:t.normalizeClass(e.nsSelect.e("selected-item"))},[t.createVNode(m,{class:"in-tooltip",closable:!e.selectDisabled&&!I.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:K=>e.deleteTag(K,I)},{default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(e.nsSelect.e("tags-text"))},[t.renderSlot(e.$slots,"label",{index:I.index,label:I.currentLabel,value:I.value},()=>[t.createTextVNode(t.toDisplayString(I.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","fallback-placements","effect","placement","popper-class","popper-style","teleported","append-to","popper-options","transition","show-after","hide-after","auto-close","offset"])):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||e.selectDisabled||e.multiple&&!e.states.inputValue&&!e.isFocused)])},[t.createElementVNode("input",{id:e.inputId,ref:"inputRef",value:e.states.inputValue,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":((S=e.hoverOption)==null?void 0:S.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:o[0]||(o[0]=(...b)=>e.handleKeydown&&e.handleKeydown(...b)),onCompositionstart:o[1]||(o[1]=(...b)=>e.handleCompositionStart&&e.handleCompositionStart(...b)),onCompositionupdate:o[2]||(o[2]=(...b)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...b)),onCompositionend:o[3]||(o[3]=(...b)=>e.handleCompositionEnd&&e.handleCompositionEnd(...b)),onInput:o[4]||(o[4]=(...b)=>e.onInput&&e.onInput(...b)),onChange:o[5]||(o[5]=t.withModifiers(()=>{},["stop"])),onClick:o[6]||(o[6]=t.withModifiers((...b)=>e.toggleMenu&&e.toggleMenu(...b),["stop"]))},null,46,ol),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,al)):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",sl,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(w,{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(w,{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(w,{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)],2)]}),content:t.withCtx(()=>[t.createVNode(h,{ref:"menuRef"},{default:t.withCtx(()=>[e.$slots.header?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.nsSelect.be("dropdown","header")),onClick:o[8]||(o[8]=t.withModifiers(()=>{},["stop"]))},[t.renderSlot(e.$slots,"header")],2)):t.createCommentVNode("v-if",!0),t.withDirectives(t.createVNode(O,{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,onEndReached:e.endReached},{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(T,null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(S,b)=>{var N;return t.openBlock(),t.createElementBlock(t.Fragment,{key:b},[(N=e.getOptions(S))!=null&&N.length?(t.openBlock(),t.createBlock(g,{key:0,label:e.getLabel(S),disabled:e.getDisabled(S)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.getOptions(S),f=>(t.openBlock(),t.createBlock(v,t.mergeProps({key:e.getValue(f)},{ref_for:!0},e.getOptionProps(f)),null,16))),128))]),_:2},1032,["label","disabled"])):(t.openBlock(),t.createBlock(v,t.mergeProps({key:1,ref_for:!0},e.getOptionProps(S)),null,16))],64)}),128))])]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll","onEndReached"]),[[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:o[9]||(o[9]=t.withModifiers(()=>{},["stop"]))},[t.renderSlot(e.$slots,"footer")],2)):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"])],16)),[[y,e.handleClickOutside,e.popperRef]])}var rl=C._plugin_vue_export_helper_default(nl,[["render",il]]);const ul=i.withInstall(rl,{Option:he,OptionGroup:be}),dl=i.withNoopInstall(he);i.withNoopInstall(be);exports.ClickOutside=Ke;exports.ElOption=dl;exports.ElSelect=ul;
@@ -0,0 +1,14 @@
1
+ "use strict";const y=require("./base-d987e5c9.cjs"),de=require("./index-d372e68f.cjs"),Le=require("./index-3a0a7c36.cjs"),Me=require("./use-global-config-c90c91f7.cjs"),ge=require("./use-form-item-0a831287.cjs"),le=require("./el-popper-f824c63b.cjs"),t=require("vue"),be=require("./index-3ed0c678.cjs"),xe=require("./_baseClone-10bdb989.cjs"),yl=require("./el-tag-527f06f0.cjs"),Ft=require("./castArray-d9ffe84a.cjs"),je=require("./debounce-37b17615.cjs"),Fe=require("./el-checkbox-6303fc92.cjs"),ye=require("./index-3e7d5ffb.cjs"),bl=require("./raf-735cc598.cjs");function wl(e,l){return le.setToString(le.overRest(e,l,le.identity),e+"")}function Sl(e,l,n){if(!y.isObject$1(n))return!1;var r=typeof l;return(r=="number"?be.isArrayLike(n)&&ge.isIndex(l,n.length):r=="string"&&l in n)?de.eq(n[l],e):!1}function xl(e){return wl(function(l,n){var r=-1,o=n.length,c=o>1?n[o-1]:void 0,d=o>2?n[2]:void 0;for(c=e.length>3&&typeof c=="function"?(o--,c):void 0,d&&Sl(n[0],n[1],d)&&(c=o<3?void 0:c,o=1),l=Object(l);++r<o;){var a=n[r];a&&e(l,a,r,c)}return l})}function El(e){return function(l,n,r){for(var o=-1,c=Object(l),d=r(l),a=d.length;a--;){var s=d[e?a:++o];if(n(c[s],s,c)===!1)break}return l}}var Nl=El();const Mt=Nl;function Rl(e,l){return e&&Mt(e,l,be.keys)}function Ol(e,l){return function(n,r){if(n==null)return n;if(!be.isArrayLike(n))return e(n,r);for(var o=n.length,c=l?o:-1,d=Object(n);(l?c--:++c<o)&&r(d[c],c,d)!==!1;);return n}}var kl=Ol(Rl);const Tl=kl;function Ue(e,l,n){(n!==void 0&&!de.eq(e[l],n)||n===void 0&&!(l in e))&&y.baseAssignValue(e,l,n)}function Ll(e){return y.isObjectLike(e)&&be.isArrayLike(e)}function Ye(e,l){if(!(l==="constructor"&&typeof e[l]=="function")&&l!="__proto__")return e[l]}function Fl(e){return xe.copyObject(e,xe.keysIn(e))}function Ml(e,l,n,r,o,c,d){var a=Ye(e,n),s=Ye(l,n),i=d.get(s);if(i){Ue(e,n,i);return}var u=c?c(a,s,n+"",e,l,d):void 0,f=u===void 0;if(f){var v=de.isArray(s),p=!v&&be.isBuffer(s),g=!v&&!p&&be.isTypedArray(s);u=s,v||p||g?de.isArray(a)?u=a:Ll(a)?u=xe.copyArray(a):p?(f=!1,u=xe.cloneBuffer(s,!0)):g?(f=!1,u=xe.cloneTypedArray(s,!0)):u=[]:y.isPlainObject(s)||ge.isArguments(s)?(u=a,ge.isArguments(a)?u=Fl(a):(!y.isObject$1(a)||y.isFunction$1(a))&&(u=xe.initCloneObject(s))):f=!1}f&&(d.set(s,u),o(u,s,r,c,d),d.delete(s)),Ue(e,n,u)}function At(e,l,n,r,o){e!==l&&Mt(l,function(c,d){if(o||(o=new be.Stack),y.isObject$1(c))Ml(e,l,d,n,At,r,o);else{var a=r?r(Ye(e,d),c,d+"",e,l,o):void 0;a===void 0&&(a=c),Ue(e,d,a)}},xe.keysIn)}function Al(e,l){var n=-1,r=be.isArrayLike(e)?Array(e.length):[];return Tl(e,function(o,c,d){r[++n]=l(o,c,d)}),r}function Wl(e,l){var n=de.isArray(e)?de.arrayMap:Al;return n(e,yl.baseIteratee(l))}function Wt(e,l){return le.baseFlatten(Wl(e,l),1)}function _e(e){return e===null}var Bl=xl(function(e,l,n){At(e,l,n)});const Bt=Bl;var yt=!1,Se,Xe,Ge,$e,Ve,Ht,Ke,Qe,Je,Ze,zt,et,tt,It,$t;function ae(){if(!yt){yt=!0;var e=navigator.userAgent,l=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),n=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(et=/\b(iPhone|iP[ao]d)/.exec(e),tt=/\b(iP[ao]d)/.exec(e),Ze=/Android/i.exec(e),It=/FBAN\/\w+;/i.exec(e),$t=/Mobile/i.exec(e),zt=!!/Win64/.exec(e),l){Se=l[1]?parseFloat(l[1]):l[5]?parseFloat(l[5]):NaN,Se&&document&&document.documentMode&&(Se=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(e);Ht=r?parseFloat(r[1])+4:Se,Xe=l[2]?parseFloat(l[2]):NaN,Ge=l[3]?parseFloat(l[3]):NaN,$e=l[4]?parseFloat(l[4]):NaN,$e?(l=/(?:Chrome\/(\d+\.\d+))/.exec(e),Ve=l&&l[1]?parseFloat(l[1]):NaN):Ve=NaN}else Se=Xe=Ge=Ve=$e=NaN;if(n){if(n[1]){var o=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);Ke=o?parseFloat(o[1].replace("_",".")):!0}else Ke=!1;Qe=!!n[2],Je=!!n[3]}else Ke=Qe=Je=!1}}var lt={ie:function(){return ae()||Se},ieCompatibilityMode:function(){return ae()||Ht>Se},ie64:function(){return lt.ie()&&zt},firefox:function(){return ae()||Xe},opera:function(){return ae()||Ge},webkit:function(){return ae()||$e},safari:function(){return lt.webkit()},chrome:function(){return ae()||Ve},windows:function(){return ae()||Qe},osx:function(){return ae()||Ke},linux:function(){return ae()||Je},iphone:function(){return ae()||et},mobile:function(){return ae()||et||tt||Ze||$t},nativeApp:function(){return ae()||It},android:function(){return ae()||Ze},ipad:function(){return ae()||tt}},Hl=lt,Ie=!!(typeof window<"u"&&window.document&&window.document.createElement),zl={canUseDOM:Ie,canUseWorkers:typeof Worker<"u",canUseEventListeners:Ie&&!!(window.addEventListener||window.attachEvent),canUseViewport:Ie&&!!window.screen,isInWorker:!Ie},Vt=zl,Kt;Vt.canUseDOM&&(Kt=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function Il(e,l){if(!Vt.canUseDOM||l&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var o=document.createElement("div");o.setAttribute(n,"return;"),r=typeof o[n]=="function"}return!r&&Kt&&e==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var $l=Il,bt=10,wt=40,St=800;function Dt(e){var l=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(l=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(l=n,n=0),r=l*bt,o=n*bt,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(e.deltaMode==1?(r*=wt,o*=wt):(r*=St,o*=St)),r&&!l&&(l=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:l,spinY:n,pixelX:r,pixelY:o}}Dt.getEventType=function(){return Hl.firefox()?"DOMMouseScroll":$l("wheel")?"wheel":"mousewheel"};var Vl=Dt;/**
2
+ * Checks if an event is supported in the current execution environment.
3
+ *
4
+ * NOTE: This will not work correctly for non-generic events such as `change`,
5
+ * `reset`, `load`, `error`, and `select`.
6
+ *
7
+ * Borrows from Modernizr.
8
+ *
9
+ * @param {string} eventNameSuffix Event name, e.g. "click".
10
+ * @param {?boolean} capture Check if the capture phase is supported.
11
+ * @return {boolean} True if the event is supported.
12
+ * @internal
13
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
14
+ */const nt="_Mousewheel",xt=function(e,l){if(e&&e.addEventListener){Pt(e);const n=function(r){const o=Vl(r);l&&Reflect.apply(l,this,[r,o])};e[nt]={wheelHandler:n},e.addEventListener("wheel",n,{passive:!0})}},Pt=e=>{var l;(l=e._Mousewheel)!=null&&l.wheelHandler&&(e.removeEventListener("wheel",e[nt].wheelHandler),e[nt]=null)},Et={beforeMount(e,l){xt(e,l.value)},unmounted(e){Pt(e)},updated(e,l){l.value!==l.oldValue&&xt(e,l.value)}},Kl={data:{type:Array,default:()=>[]},size:ge.useSizeProp,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,rowExpandable:{type:Function},defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:[String,Object,Array,Boolean],default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0},allowDragLastColumn:{type:Boolean,default:!0},preserveExpandedContent:Boolean,nativeScrollbar:Boolean};let Dl=1,Pl=1;const jl=e=>`${e}-table_${Dl++}`,_l=e=>`${e}_column_${Pl++}`,qe=function(e){var l;return(l=e.target)==null?void 0:l.closest("td")},ql=function(e,l,n,r,o){if(!l&&!r&&(!o||y.isArray(o)&&!o.length))return e;y.isString(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const c=r?null:function(a,s){return o?Wt(Ft.castArray(o),i=>y.isString(i)?de.get(a,i):i(a,s,e)):(l!=="$key"&&y.isObject(a)&&"$value"in a&&(a=a.$value),[y.isObject(a)?l?de.get(a,l):null:a])},d=function(a,s){var i,u,f,v,p;if(r)return r(a.value,s.value);for(let g=0,S=((i=a.key)==null?void 0:i.length)??0;g<S;g++){if(((u=a.key)==null?void 0:u[g])<((f=s.key)==null?void 0:f[g]))return-1;if(((v=a.key)==null?void 0:v[g])>((p=s.key)==null?void 0:p[g]))return 1}return 0};return e.map((a,s)=>({value:a,index:s,key:c?c(a,s):null})).sort((a,s)=>{let i=d(a,s);return i||(i=a.index-s.index),i*+n}).map(a=>a.value)},jt=function(e,l){let n=null;return e.columns.forEach(r=>{r.id===l&&(n=r)}),n},Ul=function(e,l){let n=null;for(let r=0;r<e.columns.length;r++){const o=e.columns[r];if(o.columnKey===l){n=o;break}}return n||y.throwError("ElTable",`No column matching with column-key: ${l}`),n},Nt=function(e,l,n){const r=(l.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return r?jt(e,r[0]):null},q=(e,l)=>{if(!e)throw new Error("Row is required when get row identity");if(y.isString(l)){if(!l.includes("."))return`${e[l]}`;const n=l.split(".");let r=e;for(const o of n)r=r[o];return`${r}`}else if(y.isFunction(l))return l.call(null,e);return""},Ne=function(e,l,n=!1,r="children"){const o=e||[],c={};return o.forEach((d,a)=>{if(c[q(d,l)]={row:d,index:a},n){const s=d[r];y.isArray(s)&&Object.assign(c,Ne(s,l,!0,r))}}),c};function Yl(e,l){const n={};let r;for(r in e)n[r]=e[r];for(r in l)if(y.hasOwn(l,r)){const o=l[r];y.isUndefined(o)||(n[r]=o)}return n}function at(e){return e===""||y.isUndefined(e)||(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function _t(e){return e===""||y.isUndefined(e)||(e=at(e),Number.isNaN(e)&&(e=80)),e}function Xl(e){return y.isNumber(e)?e:y.isString(e)?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function Gl(...e){return e.length===0?l=>l:e.length===1?e[0]:e.reduce((l,n)=>(...r)=>l(n(...r)))}function Ee(e,l,n,r,o,c,d){let a=c??0,s=!1;const u=(()=>{if(!d)return e.indexOf(l);const S=q(l,d);return e.findIndex(x=>q(x,d)===S)})(),f=u!==-1,v=o==null?void 0:o.call(null,l,a),p=S=>{S==="add"?e.push(l):e.splice(u,1),s=!0},g=S=>{let x=0;const L=(r==null?void 0:r.children)&&S[r.children];return L&&y.isArray(L)&&(x+=L.length,L.forEach(k=>{x+=g(k)})),x};return(!o||v)&&(y.isBoolean(n)?n&&!f?p("add"):!n&&f&&p("remove"):p(f?"remove":"add")),!(r!=null&&r.checkStrictly)&&(r!=null&&r.children)&&y.isArray(l[r.children])&&l[r.children].forEach(S=>{const x=Ee(e,S,n??!f,r,o,a+1,d);a+=g(S)+1,x&&(s=x)}),s}function Ql(e,l,n="children",r="hasChildren",o=!1){const c=a=>!(y.isArray(a)&&a.length);function d(a,s,i){l(a,s,i),s.forEach(u=>{if(u[r]&&o){l(u,null,i+1);return}const f=u[n];c(f)||d(u,f,i+1)})}e.forEach(a=>{if(a[r]&&o){l(a,null,0);return}const s=a[n];c(s)||d(a,s,0)})}const Jl=(e,l,n,r)=>{const o=y.isFunction(r==null?void 0:r.tooltipFormatter)?r.tooltipFormatter({row:n,column:r,cellValue:Me.getProp(n,r.property).value}):void 0;return t.isVNode(o)?{slotContent:o,content:null,strategy:"fixed",...e}:{slotContent:null,content:o??l,strategy:"fixed",...e}};let _=null;function Zl(e,l,n,r,o,c){var p;const d=Jl(e,l,n,r),a={...d,slotContent:void 0};if((_==null?void 0:_.trigger)===o){const g=(p=_.vm)==null?void 0:p.component;Bt(g==null?void 0:g.props,a),g&&d.slotContent&&(g.slots.content=()=>[d.slotContent]);return}_==null||_();const s=c==null?void 0:c.refs.tableWrapper,i=s==null?void 0:s.dataset.prefix,u=t.createVNode(le.ElTooltip,{virtualTriggering:!0,virtualRef:o,appendTo:s,placement:"top",transition:"none",offset:0,hideAfter:0,...a},d.slotContent?{content:()=>d.slotContent}:void 0);u.appContext={...c.appContext,...c};const f=document.createElement("div");t.render(u,f),u.component.exposed.onOpen();const v=s==null?void 0:s.querySelector(`.${i}-scrollbar__wrap`);_=()=>{var S,x;(x=(S=u.component)==null?void 0:S.exposed)!=null&&x.onClose&&u.component.exposed.onClose(),t.render(null,f);const g=_;v==null||v.removeEventListener("scroll",g),g.trigger=void 0,g.vm=void 0,_=null},_.trigger=o??void 0,_.vm=u,v==null||v.addEventListener("scroll",_)}function qt(e){return e.children?Wt(e.children,qt):[e]}function Rt(e,l){return e+l.colSpan}const Ut=(e,l,n,r)=>{let o=0,c=e;const d=n.states.columns.value;if(r){const s=qt(r[e]);o=d.slice(0,d.indexOf(s[0])).reduce(Rt,0),c=o+s.reduce(Rt,0)-1}else o=e;let a;switch(l){case"left":c<n.states.fixedLeafColumnsLength.value&&(a="left");break;case"right":o>=d.length-n.states.rightFixedLeafColumnsLength.value&&(a="right");break;default:c<n.states.fixedLeafColumnsLength.value?a="left":o>=d.length-n.states.rightFixedLeafColumnsLength.value&&(a="right")}return a?{direction:a,start:o,after:c}:{}},st=(e,l,n,r,o,c=0)=>{const d=[],{direction:a,start:s,after:i}=Ut(l,n,r,o);if(a){const u=a==="left";d.push(`${e}-fixed-column--${a}`),u&&i+c===r.states.fixedLeafColumnsLength.value-1?d.push("is-last-column"):!u&&s-c===r.states.columns.value.length-r.states.rightFixedLeafColumnsLength.value&&d.push("is-first-column")}return d};function Ot(e,l){return e+(_e(l.realWidth)||Number.isNaN(l.realWidth)?Number(l.width):l.realWidth)}const it=(e,l,n,r)=>{const{direction:o,start:c=0,after:d=0}=Ut(e,l,n,r);if(!o)return;const a={},s=o==="left",i=n.states.columns.value;return s?a.left=i.slice(0,c).reduce(Ot,0):a.right=i.slice(d+1).reverse().reduce(Ot,0),a},Re=(e,l)=>{e&&(Number.isNaN(e[l])||(e[l]=`${e[l]}px`))};function Yt(e){return e.some(l=>t.isVNode(l)?!(l.type===t.Comment||l.type===t.Fragment&&!Yt(l.children)):!0)?e:null}function en(e){const l=t.getCurrentInstance(),n=t.ref(!1),r=t.ref([]),o=(i,u)=>{const f=l.store.states.rowExpandable.value;return(f==null?void 0:f(i,u))??!0};return{updateExpandRows:()=>{const i=e.data.value||[],u=e.rowKey.value;if(n.value)r.value=l.store.states.rowExpandable.value?i.filter(o):i.slice();else if(u){const f=Ne(r.value,u);r.value=i.filter((v,p)=>!!f[q(v,u)]&&o(v,p))}else r.value=[]},toggleRowExpansion:(i,u)=>{const f=(e.data.value||[]).indexOf(i);f>-1&&!o(i,f)||Ee(r.value,i,u,void 0,void 0,void 0,e.rowKey.value)&&l.emit("expand-change",i,r.value.slice())},setExpandRowKeys:i=>{l.store.assertRowKey();const u=e.data.value||[],f=e.rowKey.value,v=Ne(u,f);r.value=i.reduce((p,g)=>{const S=v[g];return S&&o(S.row,S.index)&&p.push(S.row),p},[])},isRowExpanded:i=>{const u=e.rowKey.value;return u?!!Ne(r.value,u)[q(i,u)]:r.value.includes(i)},states:{expandRows:r,defaultExpandAll:n}}}function tn(e){const l=t.getCurrentInstance(),n=t.ref(null),r=t.ref(null),o=i=>{l.store.assertRowKey(),n.value=i,d(i)},c=()=>{n.value=null},d=i=>{const{data:u,rowKey:f}=e,v=r.value;let p=null;f.value&&(p=(t.unref(u)||[]).find(g=>q(g,f.value)===i)??null),r.value=p??null,l.emit("current-change",r.value,v)};return{setCurrentRowKey:o,restoreCurrentRowKey:c,setCurrentRowByKey:d,updateCurrentRow:i=>{const u=r.value;if(i&&i!==u){r.value=i,l.emit("current-change",r.value,u);return}!i&&u&&(r.value=null,l.emit("current-change",null,u))},updateCurrentRowData:()=>{const i=e.rowKey.value,u=e.data.value||[],f=r.value;f&&!u.includes(f)?i?d(q(f,i)):(r.value=null,l.emit("current-change",null,f)):n.value&&(d(n.value),c())},states:{_currentRowKey:n,currentRow:r}}}function ln(e){const l=t.ref([]),n=t.ref({}),r=t.ref(16),o=t.ref(!1),c=t.ref({}),d=t.ref("hasChildren"),a=t.ref("children"),s=t.ref(!1),i=t.getCurrentInstance(),u=t.computed(()=>e.rowKey.value?v(e.data.value||[]):{}),f=t.computed(()=>{const h=e.rowKey.value,m=Object.keys(c.value),b={};return m.length&&m.forEach(w=>{if(c.value[w].length){const C={children:[]};c.value[w].forEach(E=>{const R=q(E,h);C.children.push(R),E[d.value]&&!b[R]&&(b[R]={children:[]})}),b[w]=C}}),b}),v=h=>{const m=e.rowKey.value,b={};return Ql(h,(w,C,E)=>{const R=q(w,m);y.isArray(C)?b[R]={children:C.map(A=>q(A,m)),level:E}:o.value&&(b[R]={children:[],lazy:!0,level:E})},a.value,d.value,o.value),b},p=(h=!1,m)=>{var R,A;m||(m=(R=i.store)==null?void 0:R.states.defaultExpandAll.value);const b=u.value,w=f.value,C=Object.keys(b),E={};if(C.length){const K=t.unref(n),D=[],U=(T,I)=>{if(h)return l.value?m||l.value.includes(I):!!(m||T!=null&&T.expanded);{const H=m||l.value&&l.value.includes(I);return!!(T!=null&&T.expanded||H)}};C.forEach(T=>{const I=K[T],H={...b[T]};if(H.expanded=U(I,T),H.lazy){const{loaded:F=!1,loading:P=!1}=I||{};H.loaded=!!F,H.loading=!!P,D.push(T)}E[T]=H});const M=Object.keys(w);o.value&&M.length&&D.length&&M.forEach(T=>{var F;const I=K[T],H=w[T].children;if(D.includes(T)){if(((F=E[T].children)==null?void 0:F.length)!==0)throw new Error("[ElTable]children must be an empty array.");E[T].children=H}else{const{loaded:P=!1,loading:X=!1}=I||{};E[T]={lazy:!0,loaded:!!P,loading:!!X,expanded:U(I,T),children:H,level:void 0}}})}n.value=E,(A=i.store)==null||A.updateTableScrollY()};t.watch(()=>l.value,()=>{p(!0)},{deep:!0}),t.watch(()=>u.value,()=>{p()}),t.watch(()=>f.value,()=>{p()});const g=h=>{l.value=h,p()},S=h=>o.value&&h&&"loaded"in h&&!h.loaded,x=(h,m)=>{i.store.assertRowKey();const b=e.rowKey.value,w=q(h,b),C=w&&n.value[w];if(w&&C&&"expanded"in C){const E=C.expanded;m=y.isUndefined(m)?!C.expanded:m,n.value[w].expanded=m,E!==m&&i.emit("expand-change",h,m),m&&S(C)&&k(h,w,C),i.store.updateTableScrollY()}},L=h=>{i.store.assertRowKey();const m=e.rowKey.value,b=q(h,m),w=n.value[b];S(w)?k(h,b,w):x(h,void 0)},k=(h,m,b)=>{const{load:w}=i.props;w&&!n.value[m].loaded&&(n.value[m].loading=!0,w(h,b,C=>{if(!y.isArray(C))throw new TypeError("[ElTable] data must be an array");n.value[m].loading=!1,n.value[m].loaded=!0,n.value[m].expanded=!0,C.length&&(c.value={...c.value,[m]:C}),i.emit("expand-change",h,!0)}))};return{loadData:k,loadOrToggle:L,toggleTreeExpansion:x,updateTreeExpandKeys:g,updateTreeData:p,updateKeyChildren:(h,m)=>{const{lazy:b,rowKey:w}=i.props;if(b){if(!w)throw new Error("[Table] rowKey is required in updateKeyChild");c.value[h]&&(c.value={...c.value,[h]:m})}},normalize:v,states:{expandRowKeys:l,treeData:n,indent:r,lazy:o,lazyTreeNodeMap:c,lazyColumnIdentifier:d,childrenColumnName:a,checkStrictly:s}}}const nn=(e,l)=>{const n=l.sortingColumn;return!n||y.isString(n.sortable)?e:ql(e,l.sortProp,l.sortOrder,n.sortMethod,n.sortBy)},De=e=>{const l=[];return e.forEach(n=>{n.children&&n.children.length>0?l.push.apply(l,De(n.children)):l.push(n)}),l};function rn(){var mt;const e=t.getCurrentInstance(),{size:l}=t.toRefs((mt=e.proxy)==null?void 0:mt.$props),n=t.ref(null),r=t.ref([]),o=t.ref([]),c=t.ref(!1),d=t.ref([]),a=t.ref([]),s=t.ref([]),i=t.ref([]),u=t.ref([]),f=t.ref([]),v=t.ref([]),p=t.ref([]),g=[],S=t.ref(0),x=t.ref(0),L=t.ref(0),k=t.ref(!1),O=t.ref([]),h=t.ref({}),m=t.ref(!1),b=t.ref(!1),w=t.ref(null),C=t.ref(null),E=t.ref({}),R=t.ref(null),A=t.ref(null),K=t.ref(null),D=t.ref(null),U=t.ref(null);let M=[];const T=t.computed(()=>n.value?Ne(O.value,n.value):void 0),I=N=>{var j;const{childrenColumnName:W,lazyTreeNodeMap:z}=e.store.states,B=N[W.value]??[];if(!n.value)return B;const V=q(N,n.value);return[...((j=z.value)==null?void 0:j[V])??[],...B]};t.watch(r,()=>{var N;e.state&&(X(!1),e.props.tableLayout==="auto"&&((N=e.refs.tableHeaderRef)==null||N.updateFixedColumnStyle()))},{deep:!0});const H=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},F=N=>{var W;(W=N.children)==null||W.forEach(z=>{z.fixed=N.fixed,F(z)})},P=()=>{d.value.forEach($=>{F($)}),i.value=d.value.filter($=>[!0,"left"].includes($.fixed));const N=d.value.find($=>$.type==="selection");let W;N&&N.fixed!=="right"&&!i.value.includes(N)&&d.value.indexOf(N)===0&&i.value.length&&(i.value.unshift(N),W=!0),u.value=d.value.filter($=>$.fixed==="right");const z=d.value.filter($=>(W?$.type!=="selection":!0)&&!$.fixed);a.value=Array.from(i.value).concat(z).concat(u.value);const B=De(z),V=De(i.value),j=De(u.value);S.value=B.length,x.value=V.length,L.value=j.length,s.value=Array.from(V).concat(B).concat(j),c.value=i.value.length>0||u.value.length>0},X=(N,W=!1)=>{N&&P(),W?e.state.doLayout():e.state.debouncedUpdateLayout()},Y=N=>T.value?!!T.value[q(N,n.value)]:O.value.includes(N),J=t.computed(()=>{const N=new Map;if(!n.value||!w.value)return N;let W=0;const z=B=>{y.isArray(B)&&B.forEach(V=>{const j=q(V,n.value);N.set(j,W),W+=1;const $=I(V);$.length&&z($)})};return z(r.value||[]),N}),G=(N={})=>{const{emitChange:W=!0}=N;if(re.checkStrictly.value||!n.value){h.value={},M=[];return}const z=n.value,B=N.rowIndexMap??J.value,V=w.value,j=new WeakMap,$=ce=>{const te=j.get(ce);if(te)return te;const me=q(ce,z);return j.set(ce,me),me},Z={},ee=[],Q=new Set(O.value.map(ce=>$(ce))),oe=[];let pe=!1;const Cl=(ce,te,me)=>{const Ce=Q.has(te);me&&!Ce?(oe.push(ce),Q.add(te),pe=!0):!me&&Ce&&(Q.delete(te),pe=!0)},gt=ce=>{let te=0,me=0;return y.isArray(ce)?(ce.forEach(Ce=>{const Be=$(Ce),vt=I(Ce);let He=0,ze=0;if(vt.length){const Te=gt(vt);He=Te.selectedCount,ze=Te.selectableCount}const Ct=V?V.call(null,Ce,B.get(Be)??0):!0;if(Ct&&ze>0){const Te=He===ze;!Te&&He!==0&&(Z[Be]=!0,ee.push(Ce)),Cl(Ce,Be,Te)}Ct&&(me+=1,Q.has(Be)&&(te+=1)),te+=He,me+=ze}),{selectedCount:te,selectableCount:me}):{selectedCount:te,selectableCount:me}};if(gt(r.value||[]),pe){const ce=O.value.filter(te=>Q.has($(te)));oe.forEach(te=>{Q.has($(te))&&ce.push(te)}),O.value=ce}h.value=Z,M=ee,pe&&W&&e.emit("selection-change",O.value?O.value.slice():[])},ne=()=>{k.value=!1;const N=O.value;O.value=[],h.value={},M=[],N.length&&e.emit("selection-change",[])},se=()=>{var W,z;let N;if(n.value){N=[];const B=(z=(W=e==null?void 0:e.store)==null?void 0:W.states)==null?void 0:z.childrenColumnName.value,V=Ne(r.value,n.value,!0,B),{lazyTreeNodeMap:j}=e.store.states;j.value&&Object.entries(j.value).forEach(([$,Z])=>{V[$]&&Z.forEach(ee=>{const Q=q(ee,n.value);V[Q]||(V[Q]={row:ee,index:-1})})});for(const $ in T.value)y.hasOwn(T.value,$)&&!V[$]&&N.push(T.value[$].row)}else N=O.value.filter(B=>!r.value.includes(B));if(N.length){const B=O.value.filter(V=>!N.includes(V));O.value=B,G({emitChange:!1}),e.emit("selection-change",[...B])}},ie=()=>(O.value||[]).slice(),fe=()=>M.slice(),ve=(N,W,z)=>{var Q;if(!n.value||re.checkStrictly.value||!re.lazy.value)return;const{lazyTreeNodeMap:B,childrenColumnName:V}=e.store.states,j=q(N,n.value),$=((Q=B.value)==null?void 0:Q[j])??[],Z=N[V.value]??[],ee={children:V.value,checkStrictly:!1};for(const oe of $){const pe=z.get(q(oe,n.value))??0;Ee(O.value,oe,W,ee,w.value,pe,n.value),ve(oe,W,z)}for(const oe of Z)ve(oe,W,z)},Ae=(N,W,z=!0,B=!1)=>{var j,$,Z,ee;const V={children:($=(j=e==null?void 0:e.store)==null?void 0:j.states)==null?void 0:$.childrenColumnName.value,checkStrictly:(ee=(Z=e==null?void 0:e.store)==null?void 0:Z.states)==null?void 0:ee.checkStrictly.value};if(Ee(O.value,N,W,V,B?void 0:w.value,r.value.indexOf(N),n.value)){re.lazy.value&&!re.checkStrictly.value?(ve(N,W??Y(N),J.value),G({emitChange:!1,rowIndexMap:J.value})):G({emitChange:!1});const Q=(O.value||[]).slice();z&&e.emit("select",Q,N),e.emit("selection-change",Q)}},We=()=>{var Z,ee;const N=b.value?!k.value:!(k.value||O.value.length);k.value=N;let W=!1,z=0;const B=(ee=(Z=e==null?void 0:e.store)==null?void 0:Z.states)==null?void 0:ee.rowKey.value,{childrenColumnName:V}=e.store.states,j={children:V.value,checkStrictly:!1};r.value.forEach((Q,oe)=>{const pe=oe+z;Ee(O.value,Q,N,j,w.value,pe,B)&&(W=!0),z+=we(q(Q,B))});const $=J.value;if(re.lazy.value&&!re.checkStrictly.value&&B)for(const Q of Object.values(re.lazyTreeNodeMap.value))for(const oe of Q){const pe=$.get(q(oe,B))??0;Ee(O.value,oe,N,j,w.value,pe,B)&&(W=!0),ve(oe,N,$)}G({emitChange:!1,rowIndexMap:$}),W&&e.emit("selection-change",O.value?[...O.value]:[]),e.emit("select-all",(O.value||[]).slice())},Oe=()=>{var V;if(((V=r.value)==null?void 0:V.length)===0){k.value=!1;return}let N=0,W=0;const z=j=>{for(const $ of j){const Z=w.value&&w.value.call(null,$,N);if(Y($))W++;else if(!w.value||Z)return!1;N++;const ee=I($);if(ee.length&&!z(ee))return!1}return!0},B=z(r.value||[]);k.value=W===0?!1:B},ue=N=>{if(!n.value)return!1;const W=q(N,n.value);return!!h.value[W]},we=N=>{var V;if(!e||!e.store)return 0;const{treeData:W}=e.store.states;let z=0;const B=(V=W.value[N])==null?void 0:V.children;return B&&(z+=B.length,B.forEach(j=>{z+=we(j)})),z},ke=(N,W)=>{const z={};return Ft.castArray(N).forEach(B=>{E.value[B.id]=W,z[B.columnKey||B.id]=W}),z},dt=(N,W,z)=>{A.value&&A.value!==N&&(A.value.order=null),A.value=N,K.value=W,D.value=z},ft=()=>{let N=t.unref(o);Object.keys(E.value).forEach(W=>{const z=E.value[W];if(!z||z.length===0)return;const B=jt({columns:s.value},W);B&&B.filterMethod&&(N=N.filter(V=>z.some(j=>B.filterMethod.call(null,j,V,B))))}),R.value=N},ht=()=>{r.value=nn(R.value??[],{sortingColumn:A.value,sortProp:K.value,sortOrder:D.value})},el=(N=void 0)=>{N!=null&&N.filter||ft(),ht()},tl=N=>{const{tableHeaderRef:W}=e.refs;if(!W)return;const z=Object.assign({},W.filterPanels),B=Object.keys(z);if(B.length)if(y.isString(N)&&(N=[N]),y.isArray(N)){const V=N.map(j=>Ul({columns:s.value},j));B.forEach(j=>{const $=V.find(Z=>Z.id===j);$&&($.filteredValue=[])}),e.store.commit("filterChange",{column:V,values:[],silent:!0,multi:!0})}else B.forEach(V=>{const j=s.value.find($=>$.id===V);j&&(j.filteredValue=[])}),E.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},ll=()=>{A.value&&(dt(null,null,null),e.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:nl,toggleRowExpansion:pt,updateExpandRows:rl,states:ol,isRowExpanded:al}=en({data:r,rowKey:n}),{updateTreeExpandKeys:sl,toggleTreeExpansion:il,updateTreeData:ul,updateKeyChildren:cl,loadOrToggle:dl,states:re}=ln({data:r,rowKey:n}),{updateCurrentRowData:fl,updateCurrentRow:hl,setCurrentRowKey:pl,states:ml}=tn({data:r,rowKey:n}),gl=N=>{nl(N),sl(N)},vl=(N,W)=>{s.value.some(({type:z})=>z==="expand")?pt(N,W):il(N,W)};return t.watch(()=>re.checkStrictly.value,N=>{N?(h.value={},M=[]):G({emitChange:!1}),Oe()}),t.watch(()=>re.lazyTreeNodeMap.value,()=>{var B;if(!re.lazy.value||re.checkStrictly.value||!n.value)return;const N=J.value,W=O.value.length;for(const V of Object.keys(re.lazyTreeNodeMap.value))(B=T.value)!=null&&B[V]&&ve(T.value[V].row,!0,N);const z=O.value.length!==W;G({emitChange:!z,rowIndexMap:N}),Oe(),z&&e.emit("selection-change",[...O.value])}),{assertRowKey:H,updateColumns:P,scheduleLayout:X,isSelected:Y,clearSelection:ne,cleanSelection:se,getSelectionRows:ie,getHalfSelectionRows:fe,toggleRowSelection:Ae,_toggleAllSelection:We,toggleAllSelection:null,updateAllSelected:Oe,updateSelectionByChildren:G,getRowIndeterminate:ue,updateFilters:ke,updateCurrentRow:hl,updateSort:dt,execFilter:ft,execSort:ht,execQuery:el,clearFilter:tl,clearSort:ll,toggleRowExpansion:pt,setExpandRowKeysAdapter:gl,setCurrentRowKey:pl,toggleRowExpansionAdapter:vl,isRowExpanded:al,updateExpandRows:rl,updateCurrentRowData:fl,loadOrToggle:dl,updateTreeData:ul,updateKeyChildren:cl,states:{tableSize:l,rowKey:n,data:r,_data:o,isComplex:c,_columns:d,originColumns:a,columns:s,fixedColumns:i,rightFixedColumns:u,leafColumns:f,fixedLeafColumns:v,rightFixedLeafColumns:p,updateOrderFns:g,leafColumnsLength:S,fixedLeafColumnsLength:x,rightFixedLeafColumnsLength:L,isAllSelected:k,selection:O,selectionIndeterminate:h,reserveSelection:m,selectOnIndeterminate:b,selectable:w,rowExpandable:C,filters:E,filteredData:R,sortingColumn:A,sortProp:K,sortOrder:D,hoverRow:U,...ol,...re,...ml}}}function rt(e,l){return e.map(n=>{var r;return n.id===l.id?l:((r=n.children)!=null&&r.length&&(n.children=rt(n.children,l)),n)})}function ot(e){e.forEach(l=>{var n,r;l.no=(n=l.getColumnIndex)==null?void 0:n.call(l),(r=l.children)!=null&&r.length&&ot(l.children)}),e.sort((l,n)=>l.no-n.no)}function on(){const e=t.getCurrentInstance(),l=rn(),n=y.useNamespace("table"),{t:r}=de.useLocale();return{ns:n,t:r,...l,mutations:{setData(a,s){const i=t.unref(a._data)!==s;a.data.value=s,a._data.value=s,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),t.unref(a.reserveSelection)?e.store.assertRowKey():i?e.store.clearSelection():e.store.cleanSelection(),e.store.updateSelectionByChildren({emitChange:!1}),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(a,s,i,u){var p;const f=t.unref(a._columns);let v=[];i?(i&&!i.children&&(i.children=[]),(p=i.children)==null||p.push(s),v=rt(f,i)):(f.push(s),v=f),ot(v),a._columns.value=v,a.updateOrderFns.push(u),s.type==="selection"&&(a.selectable.value=s.selectable,a.reserveSelection.value=s.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(a,s){var i;((i=s.getColumnIndex)==null?void 0:i.call(s))!==s.no&&(ot(a._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(a,s,i,u){var p;const f=t.unref(a._columns)||[];if(i)(p=i.children)==null||p.splice(i.children.findIndex(g=>g.id===s.id),1),t.nextTick(()=>{var g;((g=i.children)==null?void 0:g.length)===0&&delete i.children}),a._columns.value=rt(f,i);else{const g=f.indexOf(s);g>-1&&(f.splice(g,1),a._columns.value=f)}const v=a.updateOrderFns.indexOf(u);v>-1&&a.updateOrderFns.splice(v,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(a,s){const{prop:i,order:u,init:f}=s;if(i){const v=t.unref(a.columns).find(p=>p.property===i);v&&(v.order=u,e.store.updateSort(v,i,u),e.store.commit("changeSortCondition",{init:f}))}},changeSortCondition(a,s){const{sortingColumn:i,sortProp:u,sortOrder:f}=a,v=t.unref(i),p=t.unref(u),g=t.unref(f);_e(g)&&(a.sortingColumn.value=null,a.sortProp.value=null),e.store.execQuery({filter:!0}),(!s||!(s.silent||s.init))&&e.emit("sort-change",{column:v,prop:p,order:g}),e.store.updateTableScrollY()},filterChange(a,s){const{column:i,values:u,silent:f}=s,v=e.store.updateFilters(i,u);e.store.execQuery(),f||e.emit("filter-change",v),e.store.updateTableScrollY()},toggleAllSelection(){var a,s;(s=(a=e.store).toggleAllSelection)==null||s.call(a)},rowSelectedChanged(a,s){e.store.toggleRowSelection(s),e.store.updateAllSelected()},setHoverRow(a,s){a.hoverRow.value=s},setCurrentRow(a,s){e.store.updateCurrentRow(s)}},commit:function(a,...s){const i=e.store.mutations;if(i[a])i[a].apply(e,[e.store.states,...s]);else throw new Error(`Action not found: ${a}`)},updateTableScrollY:function(){t.nextTick(()=>e.layout.updateScrollY.apply(e.layout))}}}const ut={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",rowExpandable:"rowExpandable",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function an(e,l){if(!e)throw new Error("Table is required.");const n=on();return n.toggleAllSelection=je.debounce(n._toggleAllSelection,10),Object.keys(ut).forEach(r=>{Xt(Gt(l,r),r,n)}),sn(n,l),n}function sn(e,l){Object.keys(ut).forEach(n=>{t.watch(()=>Gt(l,n),r=>{Xt(r,n,e)})})}function Xt(e,l,n){let r=e,o=ut[l];y.isObject(o)&&(r=r||o.default,o=o.key),n.states[o].value=r}function Gt(e,l){if(l.includes(".")){const n=l.split(".");let r=e;return n.forEach(o=>{r=r[o]}),r}else return e[l]}var un=class{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.heightMap={},this.height=t.ref(null),this.scrollX=t.ref(!1),this.scrollY=t.ref(!1),this.bodyWidth=t.ref(null),this.fixedWidth=t.ref(null),this.rightFixedWidth=t.ref(null),this.gutterWidth=0;for(const l in e)y.hasOwn(e,l)&&(t.isRef(this[l])?this[l].value=e[l]:this[l]=e[l]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){const e=this.height.value;if(_e(e))return!1;const l=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(l!=null&&l.wrapRef)){let n=!0;const r=this.scrollY.value;return n=l.wrapRef.scrollHeight>l.wrapRef.clientHeight,this.scrollY.value=n,r!==n}return!1}setHeight(e,l="height"){if(!y.isClient)return;const n=this.table.vnode.el;if(e=Xl(e),this.height.value=Number(e),this.heightMap[l]=e,!n&&(e||e===0)){t.nextTick(()=>{this.heightMap[l]===e&&this.setHeight(e,l)});return}n&&y.isNumber(e)?(n.style[l]=`${e}px`,this.updateElsHeight()):n&&y.isString(e)&&(n.style[l]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach(l=>{l.isColumnGroup?e.push.apply(e,l.columns):e.push(l)}),e}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(e){if(!e)return!0;let l=e;for(;l.tagName!=="DIV";){if(getComputedStyle(l).display==="none")return!0;l=l.parentElement}return!1}updateColumnsWidth(){var a;if(!y.isClient)return;const e=this.fit,l=(a=this.table.vnode.el)==null?void 0:a.clientWidth;let n=0;const r=this.getFlattenColumns(),o=r.filter(s=>!y.isNumber(s.width));if(r.forEach(s=>{y.isNumber(s.width)&&s.realWidth&&(s.realWidth=null)}),o.length>0&&e){if(r.forEach(s=>{n+=Number(s.width||s.minWidth||80)}),n<=l){this.scrollX.value=!1;const s=l-n;if(o.length===1)o[0].realWidth=Number(o[0].minWidth||80)+s;else{const i=s/o.reduce((f,v)=>f+Number(v.minWidth||80),0);let u=0;o.forEach((f,v)=>{if(v===0)return;const p=Math.floor(Number(f.minWidth||80)*i);u+=p,f.realWidth=Number(f.minWidth||80)+p}),o[0].realWidth=Number(o[0].minWidth||80)+s-u}}else this.scrollX.value=!0,o.forEach(s=>{s.realWidth=Number(s.minWidth)});this.bodyWidth.value=Math.max(n,l),this.table.state.resizeState.value.width=this.bodyWidth.value}else r.forEach(s=>{!s.width&&!s.minWidth?s.realWidth=80:s.realWidth=Number(s.width||s.minWidth),n+=s.realWidth}),this.scrollX.value=n>l,this.bodyWidth.value=n;const c=this.store.states.fixedColumns.value;if(c.length>0){let s=0;c.forEach(i=>{s+=Number(i.realWidth||i.width)}),this.fixedWidth.value=s}const d=this.store.states.rightFixedColumns.value;if(d.length>0){let s=0;d.forEach(i=>{s+=Number(i.realWidth||i.width)}),this.rightFixedWidth.value=s}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const l=this.observers.indexOf(e);l!==-1&&this.observers.splice(l,1)}notifyObservers(e){this.observers.forEach(l=>{var n,r;switch(e){case"columns":(n=l.state)==null||n.onColumnsChange(this);break;case"scrollable":(r=l.state)==null||r.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}})}};const he=Symbol("ElTable"),Qt=e=>{const l=[];return e.forEach(n=>{n.children?(l.push(n),l.push.apply(l,Qt(n.children))):l.push(n)}),l},Jt=e=>{let l=1;const n=(o,c)=>{if(c&&(o.level=c.level+1,l<o.level&&(l=o.level)),o.children){let d=0;o.children.forEach(a=>{n(a,o),d+=a.colSpan}),o.colSpan=d}else o.colSpan=1};e.forEach(o=>{o.level=1,n(o,void 0)});const r=[];for(let o=0;o<l;o++)r.push([]);return Qt(e).forEach(o=>{o.children?(o.rowSpan=1,o.children.forEach(c=>c.isSubColumn=!0)):o.rowSpan=l-o.level+1,r[o.level-1].push(o)}),r};function cn(e){const l=t.inject(he),n=t.computed(()=>Jt(e.store.states.originColumns.value));return{isGroup:t.computed(()=>{const c=n.value.length>1;return c&&l&&(l.state.isGroup.value=!0),c}),toggleAllSelection:c=>{c.stopPropagation(),l==null||l.store.commit("toggleAllSelection")},columnRows:n}}var dn=t.defineComponent({name:"ElTableFilterPanel",components:{ElCheckbox:Fe.ElCheckbox,ElCheckboxGroup:Fe.ElCheckboxGroup,ElScrollbar:Le.ElScrollbar,ElTooltip:le.ElTooltip,ElIcon:ye.ElIcon,ArrowDown:ye.arrow_down_default,ArrowUp:ye.arrow_up_default},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:le.useTooltipContentProps.appendTo},setup(e){const l=t.getCurrentInstance(),{t:n}=de.useLocale(),r=y.useNamespace("table-filter"),o=l==null?void 0:l.parent;e.column&&!o.filterPanels.value[e.column.id]&&(o.filterPanels.value[e.column.id]=l);const c=t.ref(null),d=t.ref(null),a=t.ref(0),s=t.computed(()=>e.column&&e.column.filters),i=t.computed(()=>e.column&&e.column.filterClassName?`${r.b()} ${e.column.filterClassName}`:r.b()),u=t.computed({get:()=>{var w;return(((w=e.column)==null?void 0:w.filteredValue)||[])[0]},set:w=>{var C;if(e.column){const E=[...e.column.filteredValue??[]];y.isPropAbsent(w)?E.splice(0,1):E.splice(0,1,w),(C=e.upDataColumn)==null||C.call(e,"filteredValue",E)}}}),f=t.computed({get(){return e.column?e.column.filteredValue||[]:[]},set(w){var C;e.column&&((C=e.upDataColumn)==null||C.call(e,"filteredValue",w))}}),v=t.computed(()=>e.column?e.column.filterMultiple:!0),p=w=>w.value===u.value,g=()=>{var w;(w=c.value)==null||w.onClose()},S=()=>{k(f.value),g()},x=()=>{f.value=[],k(f.value),g()},L=(w,C)=>{u.value=w,a.value=C,y.isPropAbsent(w)?k([]):k(f.value),g()},k=w=>{var C,E;(C=e.store)==null||C.commit("filterChange",{column:e.column,values:w}),(E=e.store)==null||E.updateAllSelected()},O=()=>{var w,C;(w=d.value)==null||w.focus(),!v.value&&m(),e.column&&((C=e.upDataColumn)==null||C.call(e,"filterOpened",!0))},h=()=>{var w;e.column&&((w=e.upDataColumn)==null||w.call(e,"filterOpened",!1))},m=()=>{if(y.isPropAbsent(u)){a.value=0;return}const w=(s.value||[]).findIndex(C=>C.value===u.value);a.value=w>=0?w+1:0},b=w=>{var K,D;const C=le.getEventCode(w),E=(s.value?s.value.length:0)+1;let R=a.value,A=!0;switch(C){case le.EVENT_CODE.down:case le.EVENT_CODE.right:R=(R+1)%E;break;case le.EVENT_CODE.up:case le.EVENT_CODE.left:R=(R-1+E)%E;break;case le.EVENT_CODE.tab:g(),A=!1;break;case le.EVENT_CODE.enter:case le.EVENT_CODE.space:if(R===0)L(null,0);else{const U=(s.value||[])[R-1];U.value&&L(U.value,R)}break;default:A=!1;break}A&&w.preventDefault(),a.value=R,(D=(K=d.value)==null?void 0:K.querySelector(`.${r.e("list-item")}:nth-child(${R+1})`))==null||D.focus()};return{multiple:v,filterClassName:i,filteredValue:f,filterValue:u,filters:s,handleConfirm:S,handleReset:x,handleSelect:L,isPropAbsent:y.isPropAbsent,isActive:p,t:n,ns:r,tooltipRef:c,rootRef:d,checkedIndex:a,handleShowTooltip:O,handleHideTooltip:h,handleKeydown:b}}});const fn=["disabled"],hn=["tabindex","aria-checked"],pn=["tabindex","aria-checked","onClick"],mn=["aria-label"];function gn(e,l,n,r,o,c){const d=t.resolveComponent("el-checkbox"),a=t.resolveComponent("el-checkbox-group"),s=t.resolveComponent("el-scrollbar"),i=t.resolveComponent("arrow-up"),u=t.resolveComponent("arrow-down"),f=t.resolveComponent("el-icon"),v=t.resolveComponent("el-tooltip");return t.openBlock(),t.createBlock(v,{ref:"tooltipRef",offset:0,placement:e.placement,"show-arrow":!1,trigger:"click",role:"dialog",teleported:"",effect:"light",pure:"",loop:"","popper-class":e.filterClassName,persistent:"","append-to":e.appendTo,onShow:e.handleShowTooltip,onHide:e.handleHideTooltip},{content:t.withCtx(()=>[e.multiple?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"rootRef",tabindex:"-1",class:t.normalizeClass(e.ns.e("multiple"))},[t.createElementVNode("div",{class:t.normalizeClass(e.ns.e("content"))},[t.createVNode(s,{"wrap-class":e.ns.e("wrap")},{default:t.withCtx(()=>[t.createVNode(a,{modelValue:e.filteredValue,"onUpdate:modelValue":l[0]||(l[0]=p=>e.filteredValue=p),class:t.normalizeClass(e.ns.e("checkbox-group"))},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filters,p=>(t.openBlock(),t.createBlock(d,{key:p.value,value:p.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(p.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),t.createElementVNode("div",{class:t.normalizeClass(e.ns.e("bottom"))},[t.createElementVNode("button",{class:t.normalizeClass(e.ns.is("disabled",e.filteredValue.length===0)),disabled:e.filteredValue.length===0,type:"button",onClick:l[1]||(l[1]=(...p)=>e.handleConfirm&&e.handleConfirm(...p))},t.toDisplayString(e.t("el.table.confirmFilter")),11,fn),t.createElementVNode("button",{type:"button",onClick:l[2]||(l[2]=(...p)=>e.handleReset&&e.handleReset(...p))},t.toDisplayString(e.t("el.table.resetFilter")),1)],2)],2)):(t.openBlock(),t.createElementBlock("ul",{key:1,ref:"rootRef",tabindex:"-1",role:"radiogroup",class:t.normalizeClass(e.ns.e("list")),onKeydown:l[4]||(l[4]=(...p)=>e.handleKeydown&&e.handleKeydown(...p))},[t.createElementVNode("li",{role:"radio",class:t.normalizeClass([e.ns.e("list-item"),e.ns.is("active",e.isPropAbsent(e.filterValue))]),tabindex:e.checkedIndex===0?0:-1,"aria-checked":e.isPropAbsent(e.filterValue),onClick:l[3]||(l[3]=p=>e.handleSelect(null,0))},t.toDisplayString(e.t("el.table.clearFilter")),11,hn),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filters,(p,g)=>(t.openBlock(),t.createElementBlock("li",{key:p.value,role:"radio",class:t.normalizeClass([e.ns.e("list-item"),e.ns.is("active",e.isActive(p))]),tabindex:e.checkedIndex===g+1?0:-1,"aria-checked":e.isActive(p),onClick:S=>e.handleSelect(p.value,g+1)},t.toDisplayString(p.text),11,pn))),128))],34))]),default:t.withCtx(()=>{var p;return[t.createElementVNode("button",{type:"button",class:t.normalizeClass(`${e.ns.namespace.value}-table__column-filter-trigger`),"aria-label":e.t("el.table.filterLabel",{column:((p=e.column)==null?void 0:p.label)||""})},[t.createVNode(f,null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"filter-icon",{},()=>{var g;return[(g=e.column)!=null&&g.filterOpened?(t.openBlock(),t.createBlock(i,{key:0})):(t.openBlock(),t.createBlock(u,{key:1}))]})]),_:3})],10,mn)]}),_:3},8,["placement","popper-class","append-to","onShow","onHide"])}var vn=le._plugin_vue_export_helper_default(dn,[["render",gn]]);function ct(e){const l=t.getCurrentInstance();t.onBeforeMount(()=>{n.value.addObserver(l)}),t.onMounted(()=>{r(n.value),o(n.value)}),t.onUpdated(()=>{r(n.value),o(n.value)}),t.onUnmounted(()=>{n.value.removeObserver(l)});const n=t.computed(()=>{const c=e.layout;if(!c)throw new Error("Can not find table layout.");return c}),r=c=>{var i;const d=((i=e.vnode.el)==null?void 0:i.querySelectorAll("colgroup > col"))||[];if(!d.length)return;const a=c.getFlattenColumns(),s={};a.forEach(u=>{s[u.id]=u});for(let u=0,f=d.length;u<f;u++){const v=d[u],p=s[v.getAttribute("name")];p&&v.setAttribute("width",p.realWidth||p.width)}},o=c=>{var s,i;const d=((s=e.vnode.el)==null?void 0:s.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let u=0,f=d.length;u<f;u++)d[u].setAttribute("width",c.scrollY.value?c.gutterWidth:"0");const a=((i=e.vnode.el)==null?void 0:i.querySelectorAll("th.gutter"))||[];for(let u=0,f=a.length;u<f;u++){const v=a[u];v.style.width=c.scrollY.value?`${c.gutterWidth}px`:"0",v.style.display=c.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:r,onScrollableChange:o}}function Cn(e,l){const n=t.getCurrentInstance(),r=t.inject(he),o=S=>{S.stopPropagation()},c=(S,x)=>{!x.filters&&x.sortable?g(S,x,!1):x.filterable&&!x.sortable&&o(S),r==null||r.emit("header-click",x,S)},d=(S,x)=>{r==null||r.emit("header-contextmenu",x,S)},a=t.ref(null),s=t.ref(!1),i=t.ref(),u=(S,x)=>{var L,k,O;if(y.isClient&&!(x.children&&x.children.length>0)&&a.value&&e.border&&a.value.id===x.id){s.value=!0;const h=r;l("set-drag-visible",!0);const m=(L=h==null?void 0:h.vnode.el)==null?void 0:L.getBoundingClientRect().left,b=(O=(k=n==null?void 0:n.vnode)==null?void 0:k.el)==null?void 0:O.querySelector(`th.${x.id}`),w=b.getBoundingClientRect(),C=w.left-m+30;y.addClass(b,"noclick"),i.value={startMouseLeft:S.clientX,startLeft:w.right-m,startColumnLeft:w.left-m,tableLeft:m};const E=h==null?void 0:h.refs.resizeProxy;E.style.left=`${i.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const R=K=>{const D=K.clientX-i.value.startMouseLeft,U=i.value.startLeft+D;E.style.left=`${Math.max(C,U)}px`},A=()=>{if(s.value){const{startColumnLeft:K,startLeft:D}=i.value;x.width=x.realWidth=Number.parseInt(E.style.left,10)-K,h==null||h.emit("header-dragend",x.width,D-K,x,S),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",s.value=!1,a.value=null,i.value=void 0,l("set-drag-visible",!1)}document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",A),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{y.removeClass(b,"noclick")},0)};document.addEventListener("mousemove",R),document.addEventListener("mouseup",A)}},f=(S,x)=>{var E;if(!e.border||x.children&&x.children.length>0)return;const L=S.target,k=y.isElement(L)?L.closest("th"):null;if(!k)return;const O=y.hasClass(k,"is-sortable");if(O){const R=s.value?"col-resize":"";k.style.cursor=R;const A=k.querySelector(".caret-wrapper");A&&(A.style.cursor=R)}if(!x.resizable||s.value){a.value=null;return}const h=k.getBoundingClientRect(),m=((E=k.parentNode)==null?void 0:E.lastElementChild)===k,b=e.allowDragLastColumn||!m,w=h.width>12&&h.right-S.clientX<8&&b,C=w?"col-resize":"";document.body.style.cursor=C,a.value=w?x:null,O&&(k.style.cursor=C)},v=()=>{!y.isClient||s.value||(document.body.style.cursor="")},p=({order:S,sortOrders:x})=>{if(S==="")return x[0];const L=x.indexOf(S||null);return x[L>x.length-2?0:L+1]},g=(S,x,L)=>{var E;S.stopPropagation();const k=x.order===L?null:L||p(x),O=(E=S.target)==null?void 0:E.closest("th");if(O&&y.hasClass(O,"noclick")){y.removeClass(O,"noclick");return}if(!x.sortable)return;const h=S.currentTarget;if(["ascending","descending"].some(R=>y.hasClass(h,R)&&!x.sortOrders.includes(R)))return;const m=e.store.states;let b=m.sortProp.value,w;const C=m.sortingColumn.value;(C!==x||C===x&&_e(C.order))&&(C&&(C.order=null),m.sortingColumn.value=x,b=x.property??null),k?w=x.order=k:w=x.order=null,m.sortProp.value=b,m.sortOrder.value=w,r==null||r.store.commit("changeSortCondition")};return{handleHeaderClick:c,handleHeaderContextMenu:d,handleMouseDown:u,handleMouseMove:f,handleMouseOut:v,handleSortClick:g,handleFilterClick:o}}function yn(e){const l=t.inject(he),n=y.useNamespace("table");return{getHeaderRowStyle:a=>{const s=l==null?void 0:l.props.headerRowStyle;return y.isFunction(s)?s.call(null,{rowIndex:a}):s},getHeaderRowClass:a=>{const s=[],i=l==null?void 0:l.props.headerRowClassName;return y.isString(i)?s.push(i):y.isFunction(i)&&s.push(i.call(null,{rowIndex:a})),s.join(" ")},getHeaderCellStyle:(a,s,i,u)=>{let f=(l==null?void 0:l.props.headerCellStyle)??{};y.isFunction(f)&&(f=f.call(null,{rowIndex:a,columnIndex:s,row:i,column:u}));const v=it(s,u.fixed,e.store,i);return Re(v,"left"),Re(v,"right"),Object.assign({},f,v)},getHeaderCellClass:(a,s,i,u)=>{const f=st(n.b(),s,u.fixed,e.store,i),v=[u.id,u.order,u.headerAlign,u.className,u.labelClassName,...f];u.children||v.push("is-leaf"),u.sortable&&v.push("is-sortable");const p=l==null?void 0:l.props.headerCellClassName;return y.isString(p)?v.push(p):y.isFunction(p)&&v.push(p.call(null,{rowIndex:a,columnIndex:s,row:i,column:u})),v.push(n.e("cell")),v.filter(g=>!!g).join(" ")}}}var kt=t.defineComponent({name:"ElTableHeader",components:{ElCheckbox:Fe.ElCheckbox},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String},allowDragLastColumn:{type:Boolean}},setup(e,{emit:l}){const n=t.getCurrentInstance(),r=t.inject(he),o=y.useNamespace("table"),c=t.ref({}),{onColumnsChange:d,onScrollableChange:a}=ct(r),s=(r==null?void 0:r.props.tableLayout)==="auto",i=t.reactive(new Map),u=t.ref();let f;const v=()=>{f&&(clearTimeout(f),f=void 0),f=setTimeout(()=>{f=void 0;const K=u.value;K&&i.size>0&&(i.forEach((D,U)=>{const M=K.querySelector(`.${U.replace(/\s/g,".")}`);M&&(D.width=M.getBoundingClientRect().width||D.width)}),i.clear())})};t.watch(i,v),t.onBeforeUnmount(()=>{f&&(clearTimeout(f),f=void 0)}),t.onMounted(async()=>{await t.nextTick(),await t.nextTick();const{prop:K,order:D}=e.defaultSort;r==null||r.store.commit("sort",{prop:K,order:D,init:!0}),v()});const{handleHeaderClick:p,handleHeaderContextMenu:g,handleMouseDown:S,handleMouseMove:x,handleMouseOut:L,handleSortClick:k,handleFilterClick:O}=Cn(e,l),{getHeaderRowStyle:h,getHeaderRowClass:m,getHeaderCellStyle:b,getHeaderCellClass:w}=yn(e),{isGroup:C,toggleAllSelection:E,columnRows:R}=cn(e),{t:A}=de.useLocale();return n.state={onColumnsChange:d,onScrollableChange:a},n.filterPanels=c,{ns:o,t:A,filterPanels:c,onColumnsChange:d,onScrollableChange:a,columnRows:R,getHeaderRowClass:m,getHeaderRowStyle:h,getHeaderCellClass:w,getHeaderCellStyle:b,handleHeaderClick:p,handleHeaderContextMenu:g,handleMouseDown:S,handleMouseMove:x,handleMouseOut:L,handleSortClick:k,handleFilterClick:O,isGroup:C,toggleAllSelection:E,saveIndexSelection:i,isTableLayoutAuto:s,theadRef:u,updateFixedColumnStyle:v}},render(){const{ns:e,t:l,isGroup:n,columnRows:r,getHeaderCellStyle:o,getHeaderCellClass:c,getHeaderRowClass:d,getHeaderRowStyle:a,handleHeaderClick:s,handleHeaderContextMenu:i,handleMouseDown:u,handleMouseMove:f,handleSortClick:v,handleMouseOut:p,store:g,$parent:S,saveIndexSelection:x,isTableLayoutAuto:L}=this;let k=1;return t.h("thead",{ref:"theadRef",class:e.is("group",n)},r.map((O,h)=>t.h("tr",{class:d(h),key:h,style:a(h)},O.map((m,b)=>{m.rowSpan>k&&(k=m.rowSpan);const w=c(h,b,O,m);return L&&m.fixed&&x.set(w,m),t.h("th",{class:w,colspan:m.colSpan,key:`${m.id}-thead`,rowspan:m.rowSpan,scope:m.colSpan>1?"colgroup":"col",ariaSort:m.sortable?m.order:void 0,style:o(h,b,O,m),onClick:C=>{var E;(E=C.currentTarget)!=null&&E.classList.contains("noclick")||s(C,m)},onContextmenu:C=>i(C,m),onMousedown:C=>u(C,m),onMousemove:C=>f(C,m),onMouseout:p},[t.h("div",{class:["cell",m.filteredValue&&m.filteredValue.length>0?"highlight":""]},[m.renderHeader?m.renderHeader({column:m,$index:b,store:g,_self:S}):m.label,m.sortable&&t.h("button",{type:"button",class:"caret-wrapper","aria-label":l("el.table.sortLabel",{column:m.label||""}),onClick:C=>v(C,m)},[t.h("i",{onClick:C=>v(C,m,"ascending"),class:"sort-caret ascending"}),t.h("i",{onClick:C=>v(C,m,"descending"),class:"sort-caret descending"})]),m.filterable&&t.h(vn,{store:g,placement:m.filterPlacement||"bottom-start",appendTo:S==null?void 0:S.appendFilterPanelTo,column:m,upDataColumn:(C,E)=>{m[C]=E}},{"filter-icon":()=>m.renderFilterIcon?m.renderFilterIcon({filterOpened:m.filterOpened}):null})])])}))))}});function bn(e){const l=t.inject(he),n=t.ref(""),r=t.ref(t.h("div")),o=(g,S,x)=>{var m,b;const L=l,k=qe(g);let O=null;const h=(m=L==null?void 0:L.vnode.el)==null?void 0:m.dataset.prefix;k&&(O=Nt({columns:((b=e.store)==null?void 0:b.states.columns.value)??[]},k,h),O&&(L==null||L.emit(`cell-${x}`,S,O,k,g))),L==null||L.emit(`row-${x}`,S,O,g)},c=(g,S)=>{o(g,S,"dblclick")},d=(g,S)=>{var x;(x=e.store)==null||x.commit("setCurrentRow",S),o(g,S,"click")},a=(g,S)=>{o(g,S,"contextmenu")},s=je.debounce(g=>{var S;(S=e.store)==null||S.commit("setHoverRow",g)},30),i=je.debounce(()=>{var g;(g=e.store)==null||g.commit("setHoverRow",null)},30),u=g=>{const S=window.getComputedStyle(g,null);return{left:Number.parseInt(S.paddingLeft,10)||0,right:Number.parseInt(S.paddingRight,10)||0,top:Number.parseInt(S.paddingTop,10)||0,bottom:Number.parseInt(S.paddingBottom,10)||0}},f=(g,S,x)=>{var k;let L=(k=S==null?void 0:S.target)==null?void 0:k.parentNode;for(;g>1&&(L=L==null?void 0:L.nextSibling,!(!L||L.nodeName!=="TR"));)x(L,"hover-row hover-fixed-row"),g--};return{handleDoubleClick:c,handleClick:d,handleContextMenu:a,handleMouseEnter:s,handleMouseLeave:i,handleCellMouseEnter:(g,S,x)=>{var I,H,F;if(!l)return;const L=l,k=qe(g),O=(I=L==null?void 0:L.vnode.el)==null?void 0:I.dataset.prefix;let h=null;if(k){if(h=Nt({columns:((H=e.store)==null?void 0:H.states.columns.value)??[]},k,O),!h)return;k.rowSpan>1&&f(k.rowSpan,g,y.addClass);const P=L.hoverState={cell:k,column:h,row:S};L==null||L.emit("cell-mouse-enter",P.row,P.column,P.cell,g)}if(!x){(_==null?void 0:_.trigger)===k&&(_==null||_());return}const m=g.target.querySelector(".cell");if(!(y.hasClass(m,`${O}-tooltip`)&&m.childNodes.length&&((F=m.textContent)!=null&&F.trim())))return;const b=document.createRange();b.setStart(m,0),b.setEnd(m,m.childNodes.length);const{width:w,height:C}=b.getBoundingClientRect(),{width:E,height:R}=m.getBoundingClientRect(),{top:A,left:K,right:D,bottom:U}=u(m),M=K+D,T=A+U;Le.isGreaterThan(w+M,E)||Le.isGreaterThan(C+T,R)||Le.isGreaterThan(m.scrollWidth,E)?Zl(x,((k==null?void 0:k.innerText)||(k==null?void 0:k.textContent))??"",S,h,k,L):(_==null?void 0:_.trigger)===k&&(_==null||_())},handleCellMouseLeave:g=>{const S=qe(g);if(!S)return;S.rowSpan>1&&f(S.rowSpan,g,y.removeClass);const x=l==null?void 0:l.hoverState;l==null||l.emit("cell-mouse-leave",x==null?void 0:x.row,x==null?void 0:x.column,x==null?void 0:x.cell,g)},tooltipContent:n,tooltipTrigger:r}}function wn(e){const l=t.inject(he),n=y.useNamespace("table");return{getRowStyle:(i,u)=>{const f=l==null?void 0:l.props.rowStyle;return y.isFunction(f)?f.call(null,{row:i,rowIndex:u}):f||null},getRowClass:(i,u,f)=>{var g;const v=[n.e("row")];l!=null&&l.props.highlightCurrentRow&&i===((g=e.store)==null?void 0:g.states.currentRow.value)&&v.push("current-row"),e.stripe&&f%2===1&&v.push(n.em("row","striped"));const p=l==null?void 0:l.props.rowClassName;return y.isString(p)?v.push(p):y.isFunction(p)&&v.push(p.call(null,{row:i,rowIndex:u})),v},getCellStyle:(i,u,f,v)=>{const p=l==null?void 0:l.props.cellStyle;let g=p??{};y.isFunction(p)&&(g=p.call(null,{rowIndex:i,columnIndex:u,row:f,column:v}));const S=it(u,e==null?void 0:e.fixed,e.store);return Re(S,"left"),Re(S,"right"),Object.assign({},g,S)},getCellClass:(i,u,f,v,p)=>{const g=st(n.b(),u,e==null?void 0:e.fixed,e.store,void 0,p),S=[v.id,v.align,v.className,...g],x=l==null?void 0:l.props.cellClassName;return y.isString(x)?S.push(x):y.isFunction(x)&&S.push(x.call(null,{rowIndex:i,columnIndex:u,row:f,column:v})),S.push(n.e("cell")),S.filter(L=>!!L).join(" ")},getSpan:(i,u,f,v)=>{let p=1,g=1;const S=l==null?void 0:l.props.spanMethod;if(y.isFunction(S)){const x=S({row:i,column:u,rowIndex:f,columnIndex:v});y.isArray(x)?(p=x[0],g=x[1]):y.isObject(x)&&(p=x.rowspan,g=x.colspan)}return{rowspan:p,colspan:g}},getColspanRealWidth:(i,u,f)=>{if(u<1)return i[f].realWidth;const v=i.map(({realWidth:p,width:g})=>p||g).slice(f,f+u);return Number(v.reduce((p,g)=>Number(p)+Number(g),-1))}}}const Sn=["colspan","rowspan"];var xn=t.defineComponent({name:"TableTdWrapper",__name:"td-wrapper",props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(e){return(l,n)=>(t.openBlock(),t.createElementBlock("td",{colspan:e.colspan,rowspan:e.rowspan},[t.renderSlot(l.$slots,"default")],8,Sn))}}),En=xn;function Nn(e){const l=t.inject(he),n=y.useNamespace("table"),{handleDoubleClick:r,handleClick:o,handleContextMenu:c,handleMouseEnter:d,handleMouseLeave:a,handleCellMouseEnter:s,handleCellMouseLeave:i,tooltipContent:u,tooltipTrigger:f}=bn(e),{getRowStyle:v,getRowClass:p,getCellStyle:g,getCellClass:S,getSpan:x,getColspanRealWidth:L}=wn(e);let k=-1;const O=t.computed(()=>{var C;return(C=e.store)==null?void 0:C.states.columns.value.findIndex(({type:E})=>E==="default")}),h=(C,E)=>{var A;const R=(A=l==null?void 0:l.props)==null?void 0:A.rowKey;return R?q(C,R):E},m=(C,E,R,A=!1)=>{const{tooltipEffect:K,tooltipOptions:D,store:U}=e,{indent:M,columns:T}=U.states,I=[];let H=!0;return R&&(I.push(n.em("row",`level-${R.level}`)),H=!!R.display),E===0&&(k=-1),e.stripe&&H&&k++,I.push(...p(C,E,k)),t.h("tr",{style:[H?null:{display:"none"},v(C,E)],class:I,key:h(C,E),onDblclick:F=>r(F,C),onClick:F=>o(F,C),onContextmenu:F=>c(F,C),onMouseenter:()=>d(E),onMouseleave:a},T.value.map((F,P)=>{const{rowspan:X,colspan:Y}=x(C,F,E,P);if(!X||!Y)return null;const J=Object.assign({},F);J.realWidth=L(T.value,Y,P);const G={store:U,_self:e.context||l,column:J,row:C,$index:E,cellIndex:P,expanded:A};P===O.value&&R&&(G.treeNode={indent:R.level&&R.level*M.value,level:R.level},y.isBoolean(R.expanded)&&(G.treeNode.expanded=R.expanded,"loading"in R&&(G.treeNode.loading=R.loading),"noLazyChildren"in R&&(G.treeNode.noLazyChildren=R.noLazyChildren)));const ne=`${h(C,E)},${P}`,se=J.columnKey||J.rawColumnKey||"",ie=F.showOverflowTooltip&&Bt({effect:K},D,F.showOverflowTooltip);return t.h(En,{style:g(E,P,C,F),class:S(E,P,C,F,Y-1),key:`${se}${ne}`,rowspan:X,colspan:Y,onMouseenter:fe=>s(fe,C,ie),onMouseleave:i},{default:()=>b(P,F,G)})}))},b=(C,E,R)=>E.renderCell(R);return{wrappedRowRender:(C,E)=>{const R=e.store,{isRowExpanded:A,assertRowKey:K}=R,{treeData:D,lazyTreeNodeMap:U,childrenColumnName:M,rowKey:T}=R.states,I=R.states.columns.value;if(I.some(({type:H})=>H==="expand")){const H=A(C),F=m(C,E,void 0,H),P=l==null?void 0:l.renderExpanded;if(!P)return console.error("[Element Error]renderExpanded is required."),F;const X=[[F]];return(l.props.preserveExpandedContent||H)&&X[0].push(t.h("tr",{key:`expanded-row__${F.key}`,style:{display:H?"":"none"}},[t.h("td",{colspan:I.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[P({row:C,$index:E,store:R,expanded:H})])])),X}else if(Object.keys(D.value).length){K();const H=q(C,T.value);let F=D.value[H],P=null;F&&(P={expanded:F.expanded,level:F.level,display:!0,noLazyChildren:void 0,loading:void 0},y.isBoolean(F.lazy)&&(P&&y.isBoolean(F.loaded)&&F.loaded&&(P.noLazyChildren=!(F.children&&F.children.length)),P.loading=F.loading));const X=[m(C,E,P??void 0)];if(F){let Y=0;const J=(G,ne)=>{G&&G.length&&ne&&G.forEach(se=>{const ie={display:ne.display&&ne.expanded,level:ne.level+1,expanded:!1,noLazyChildren:!1,loading:!1},fe=q(se,T.value);if(y.isPropAbsent(fe))throw new Error("For nested data item, row-key is required.");F={...D.value[fe]},F&&(ie.expanded=F.expanded,F.level=F.level||ie.level,F.display=!!(F.expanded&&ie.display),y.isBoolean(F.lazy)&&(y.isBoolean(F.loaded)&&F.loaded&&(ie.noLazyChildren=!(F.children&&F.children.length)),ie.loading=F.loading)),Y++,X.push(m(se,E+Y,ie)),F&&J(U.value[fe]||se[M.value],F)})};F.display=!0,J(U.value[H]||C[M.value],F)}return X}else return m(C,E,void 0)},tooltipContent:u,tooltipTrigger:f}}const Rn={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var On=t.defineComponent({name:"ElTableBody",props:Rn,setup(e){var u;const l=t.getCurrentInstance(),n=t.inject(he),r=y.useNamespace("table"),{wrappedRowRender:o,tooltipContent:c,tooltipTrigger:d}=Nn(e),{onColumnsChange:a,onScrollableChange:s}=ct(n),i=[];return t.watch((u=e.store)==null?void 0:u.states.hoverRow,(f,v)=>{var L,k;const p=l==null?void 0:l.vnode.el,g=Array.from((p==null?void 0:p.children)||[]).filter(O=>O==null?void 0:O.classList.contains(`${r.e("row")}`));let S=f;const x=(L=g[S])==null?void 0:L.childNodes;if(x!=null&&x.length){let O=0;Array.from(x).reduce((h,m,b)=>{var w,C;return((w=x[b])==null?void 0:w.colSpan)>1&&(O=(C=x[b])==null?void 0:C.colSpan),m.nodeName!=="TD"&&O===0&&h.push(b),O>0&&O--,h},[]).forEach(h=>{var m;for(S=f;S>0;){const b=(m=g[S-1])==null?void 0:m.childNodes;if(b[h]&&b[h].nodeName==="TD"&&b[h].rowSpan>1){y.addClass(b[h],"hover-cell"),i.push(b[h]);break}S--}})}else i.forEach(O=>y.removeClass(O,"hover-cell")),i.length=0;!((k=e.store)!=null&&k.states.isComplex.value)||!y.isClient||bl.rAF(()=>{const O=g[v],h=g[f];O&&!O.classList.contains("hover-fixed-row")&&y.removeClass(O,"hover-row"),h&&y.addClass(h,"hover-row")})}),t.onUnmounted(()=>{_==null||_()}),{ns:r,onColumnsChange:a,onScrollableChange:s,wrappedRowRender:o,tooltipContent:c,tooltipTrigger:d}},render(){const{wrappedRowRender:e,store:l}=this;return t.h("tbody",{tabIndex:-1},[((l==null?void 0:l.states.data.value)||[]).reduce((n,r)=>n.concat(e(r,n.length)),[])])}});function kn(){var l;const e=(l=t.inject(he))==null?void 0:l.store;return{leftFixedLeafCount:t.computed(()=>(e==null?void 0:e.states.fixedLeafColumnsLength.value)??0),rightFixedLeafCount:t.computed(()=>(e==null?void 0:e.states.rightFixedColumns.value.length)??0),columnsCount:t.computed(()=>(e==null?void 0:e.states.columns.value.length)??0),leftFixedCount:t.computed(()=>(e==null?void 0:e.states.fixedColumns.value.length)??0),rightFixedCount:t.computed(()=>(e==null?void 0:e.states.rightFixedColumns.value.length)??0),columns:t.computed(()=>(e==null?void 0:e.states.columns.value)??[])}}function Tn(e){const{columns:l}=kn(),n=y.useNamespace("table");return{getCellClasses:(c,d)=>{const a=c[d],s=[n.e("cell"),a.id,a.align,a.labelClassName,...st(n.b(),d,a.fixed,e.store)];return a.className&&s.push(a.className),a.children||s.push(n.is("leaf")),s},getCellStyles:(c,d)=>{const a=it(d,c.fixed,e.store);return Re(a,"left"),Re(a,"right"),a},columns:l}}var Tt=t.defineComponent({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const l=t.inject(he),n=y.useNamespace("table"),{getCellClasses:r,getCellStyles:o,columns:c}=Tn(e),{onScrollableChange:d,onColumnsChange:a}=ct(l);return{ns:n,onScrollableChange:d,onColumnsChange:a,getCellClasses:r,getCellStyles:o,columns:c}},render(){const{columns:e,getCellStyles:l,getCellClasses:n,summaryMethod:r,sumText:o}=this,c=this.store.states.data.value;let d=[];return r?d=r({columns:e,data:c}):e.forEach((a,s)=>{if(s===0){d[s]=o;return}const i=c.map(p=>Number(p[a.property])),u=[];let f=!0;i.forEach(p=>{if(!Number.isNaN(+p)){f=!1;const g=`${p}`.split(".")[1];u.push(g?g.length:0)}});const v=Math.max.apply(null,u);f?d[s]="":d[s]=i.reduce((p,g)=>{const S=Number(g);return Number.isNaN(+S)?p:Number.parseFloat((p+g).toFixed(Math.min(v,20)))},0)}),t.h(t.h("tfoot",[t.h("tr",{},[...e.map((a,s)=>t.h("td",{key:s,colspan:a.colSpan,rowspan:a.rowSpan,class:n(e,s),style:l(a,s)},[t.h("div",{class:["cell",a.labelClassName]},[d[s]])]))])]))}});function Ln(e){return{setCurrentRow:v=>{e.commit("setCurrentRow",v)},getSelectionRows:()=>e.getSelectionRows(),getHalfSelectionRows:()=>e.getHalfSelectionRows(),toggleRowSelection:(v,p,g=!0)=>{e.toggleRowSelection(v,p,!1,g),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:v=>{e.clearFilter(v)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(v,p)=>{e.toggleRowExpansionAdapter(v,p)},clearSort:()=>{e.clearSort()},sort:(v,p)=>{e.commit("sort",{prop:v,order:p})},updateKeyChildren:(v,p)=>{e.updateKeyChildren(v,p)}}}function Fn(e,l,n,r){const o=t.ref(!1),c=t.ref(null),d=t.ref(!1),a=M=>{d.value=M},s=t.ref({width:null,height:null,headerHeight:null}),i=t.ref(!1),u={display:"inline-block",verticalAlign:"middle"},f=t.ref(),v=t.ref(0),p=t.ref(0),g=t.ref(0),S=t.ref(0),x=t.ref(0);t.watch(()=>e.height,M=>{l.setHeight(M??null)},{immediate:!0}),t.watch(()=>e.maxHeight,M=>{l.setMaxHeight(M??null)},{immediate:!0}),t.watch(()=>[e.currentRowKey,n.states.rowKey],([M,T])=>{!t.unref(T)||!t.unref(M)||n.setCurrentRowKey(`${M}`)},{immediate:!0}),t.watch(()=>e.data,M=>{r.store.commit("setData",M)},{immediate:!0,deep:!0}),t.watchEffect(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const L=()=>{r.store.commit("setHoverRow",null),r.hoverState&&(r.hoverState=null)},k=(M,T)=>{const{pixelX:I,pixelY:H}=T;Math.abs(I)>=Math.abs(H)&&(r.refs.bodyWrapper.scrollLeft+=T.pixelX/5)},O=t.computed(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),h=t.computed(()=>({width:l.bodyWidth.value?`${l.bodyWidth.value}px`:""})),m=()=>{O.value&&l.updateElsHeight(),l.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame(E)};t.onMounted(async()=>{await t.nextTick(),n.updateColumns(),R(),requestAnimationFrame(m);const M=r.vnode.el,T=r.refs.headerWrapper;e.flexible&&M&&M.parentElement&&(M.parentElement.style.minWidth="0"),s.value={width:f.value=M.offsetWidth,height:M.offsetHeight,headerHeight:e.showHeader&&T?T.offsetHeight:null},n.states.columns.value.forEach(I=>{I.filteredValue&&I.filteredValue.length&&r.store.commit("filterChange",{column:I,values:I.filteredValue,silent:!0})}),r.$ready=!0});const b=(M,T)=>{if(!M)return;const I=Array.from(M.classList).filter(H=>!H.startsWith("is-scrolling-"));I.push(l.scrollX.value?T:"is-scrolling-none"),M.className=I.join(" ")},w=M=>{const{tableWrapper:T}=r.refs;b(T,M)},C=M=>{const{tableWrapper:T}=r.refs;return!!(T&&T.classList.contains(M))},E=function(){if(!r.refs.scrollBarRef)return;if(!l.scrollX.value){const X="is-scrolling-none";C(X)||w(X);return}const M=r.refs.scrollBarRef.wrapRef;if(!M)return;const{scrollLeft:T,offsetWidth:I,scrollWidth:H}=M,{headerWrapper:F,footerWrapper:P}=r.refs;F&&(F.scrollLeft=T),P&&(P.scrollLeft=T),T>=H-I-1?w("is-scrolling-right"):w(T===0?"is-scrolling-left":"is-scrolling-middle")},R=()=>{r.refs.scrollBarRef&&(r.refs.scrollBarRef.wrapRef&&ge.useEventListener(r.refs.scrollBarRef.wrapRef,"scroll",E,{passive:!0}),e.fit?ge.useResizeObserver(r.vnode.el,A):ge.useEventListener(window,"resize",A),ge.useResizeObserver(r.refs.tableInnerWrapper,()=>{var M,T;A(),(T=(M=r.refs)==null?void 0:M.scrollBarRef)==null||T.update()}))},A=()=>{var J,G,ne,se;const M=r.vnode.el;if(!r.$ready||!M)return;let T=!1;const{width:I,height:H,headerHeight:F}=s.value,P=f.value=M.offsetWidth;I!==P&&(T=!0);const X=M.offsetHeight;(e.height||O.value)&&H!==X&&(T=!0);const Y=e.tableLayout==="fixed"?r.refs.headerWrapper:(J=r.refs.tableHeaderRef)==null?void 0:J.$el;e.showHeader&&(Y==null?void 0:Y.offsetHeight)!==F&&(T=!0),v.value=((G=r.refs.tableWrapper)==null?void 0:G.scrollHeight)||0,g.value=(Y==null?void 0:Y.scrollHeight)||0,S.value=((ne=r.refs.footerWrapper)==null?void 0:ne.offsetHeight)||0,x.value=((se=r.refs.appendWrapper)==null?void 0:se.offsetHeight)||0,p.value=v.value-g.value-S.value-x.value,T&&(s.value={width:P,height:X,headerHeight:e.showHeader&&(Y==null?void 0:Y.offsetHeight)||0},m())},K=ge.useFormSize(),D=t.computed(()=>{const{bodyWidth:M,scrollY:T,gutterWidth:I}=l;return M.value?`${M.value-(T.value?I:0)}px`:""}),U=t.computed(()=>e.maxHeight?"fixed":e.tableLayout);return{isHidden:o,renderExpanded:c,setDragVisible:a,isGroup:i,handleMouseLeave:L,handleHeaderFooterMousewheel:k,tableSize:K,emptyBlockStyle:t.computed(()=>{if(e.data&&e.data.length)return;let M="100%";e.height&&p.value&&(M=`${p.value}px`);const T=f.value;return{width:T?`${T}px`:"",height:M}}),resizeProxyVisible:d,bodyWidth:D,resizeState:s,doLayout:m,tableBodyStyles:h,tableLayout:U,scrollbarViewStyle:u,scrollbarStyle:t.computed(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${g.value+S.value}px)`}:{maxHeight:`${+e.maxHeight-g.value-S.value}px`}:{})}}function Mn(e){let l;const n=()=>{const r=e.vnode.el.querySelector(".hidden-columns"),o={childList:!0,subtree:!0},c=e.store.states.updateOrderFns;l=new MutationObserver(()=>{c.forEach(d=>d())}),l.observe(r,o)};t.onMounted(()=>{n()}),t.onUnmounted(()=>{l==null||l.disconnect()})}function Pe(e){const l=e.tableLayout==="auto";let n=e.columns||[];l&&n.every(({width:o})=>y.isUndefined(o))&&(n=[]);const r=o=>{const c={key:`${e.tableLayout}_${o.id}`,style:{},name:void 0};return l?c.style={width:`${o.width}px`}:c.name=o.id,c};return t.h("colgroup",{},n.map(o=>t.h("col",r(o))))}Pe.props=["columns","tableLayout"];const An=()=>{const e=t.ref(),l=(c,d)=>{const a=e.value;a&&a.scrollTo(c,d)},n=(c,d)=>{const a=e.value;a&&y.isNumber(d)&&["Top","Left"].includes(c)&&a[`setScroll${c}`](d)};return{scrollBarRef:e,scrollTo:l,setScrollTop:c=>n("Top",c),setScrollLeft:c=>n("Left",c)}},Wn=["data-prefix"],Bn={ref:"hiddenColumns",class:"hidden-columns"};var Hn=t.defineComponent({name:"ElTable",__name:"table",props:Kl,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-dblclick","cell-contextmenu","cell-click","row-dblclick","row-click","row-contextmenu","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(e,{expose:l}){const n=e,{t:r}=de.useLocale(),o=y.useNamespace("table"),c=Me.useGlobalConfig("table"),d=t.getCurrentInstance();t.provide(he,d);const a=an(d,n);d.store=a;const s=new un({store:d.store,table:d,fit:n.fit,showHeader:n.showHeader});d.layout=s;const i=t.computed(()=>(a.states.data.value||[]).length===0),{setCurrentRow:u,getSelectionRows:f,getHalfSelectionRows:v,toggleRowSelection:p,clearSelection:g,clearFilter:S,toggleAllSelection:x,toggleRowExpansion:L,clearSort:k,sort:O,updateKeyChildren:h}=Ln(a),{isHidden:m,renderExpanded:b,setDragVisible:w,isGroup:C,handleMouseLeave:E,handleHeaderFooterMousewheel:R,tableSize:A,emptyBlockStyle:K,resizeProxyVisible:D,bodyWidth:U,resizeState:M,doLayout:T,tableBodyStyles:I,tableLayout:H,scrollbarViewStyle:F,scrollbarStyle:P}=Fn(n,s,a,d),{scrollBarRef:X,scrollTo:Y,setScrollLeft:J,setScrollTop:G}=An(),ne=je.debounce(T,50),se=jl(o.namespace.value),ie=d;d.tableId=se,d.state={isGroup:C,resizeState:M,doLayout:T,debouncedUpdateLayout:ne};const fe=t.computed(()=>n.sumText??r("el.table.sumText")),ve=t.computed(()=>n.emptyText??r("el.table.emptyText")),Ae=t.computed(()=>{var ue;return n.tooltipEffect??((ue=c.value)==null?void 0:ue.tooltipEffect)}),We=t.computed(()=>{var ue;return n.tooltipOptions??((ue=c.value)==null?void 0:ue.tooltipOptions)}),Oe=t.computed(()=>Jt(a.states.originColumns.value)[0]);return Mn(d),t.onBeforeUnmount(()=>{ne.cancel()}),l({ns:o,layout:s,store:a,columns:Oe,handleHeaderFooterMousewheel:R,handleMouseLeave:E,tableId:se,tableSize:A,isHidden:m,isEmpty:i,renderExpanded:b,resizeProxyVisible:D,resizeState:M,isGroup:C,bodyWidth:U,tableBodyStyles:I,emptyBlockStyle:K,debouncedUpdateLayout:ne,setCurrentRow:u,getSelectionRows:f,getHalfSelectionRows:v,toggleRowSelection:p,clearSelection:g,clearFilter:S,toggleAllSelection:x,toggleRowExpansion:L,clearSort:k,doLayout:T,sort:O,updateKeyChildren:h,t:r,setDragVisible:w,context:ie,computedSumText:fe,computedEmptyText:ve,computedTooltipEffect:Ae,computedTooltipOptions:We,tableLayout:H,scrollbarViewStyle:F,scrollbarStyle:P,scrollBarRef:X,scrollTo:Y,setScrollLeft:J,setScrollTop:G,allowDragLastColumn:n.allowDragLastColumn}),(ue,we)=>(t.openBlock(),t.createElementBlock("div",{ref:"tableWrapper",class:t.normalizeClass([{[t.unref(o).m("fit")]:e.fit,[t.unref(o).m("striped")]:e.stripe,[t.unref(o).m("border")]:e.border||t.unref(C),[t.unref(o).m("hidden")]:t.unref(m),[t.unref(o).m("group")]:t.unref(C),[t.unref(o).m("fluid-height")]:e.maxHeight,[t.unref(o).m("scrollable-x")]:t.unref(s).scrollX.value,[t.unref(o).m("scrollable-y")]:t.unref(s).scrollY.value,[t.unref(o).m("enable-row-hover")]:!t.unref(a).states.isComplex.value,[t.unref(o).m("enable-row-transition")]:(t.unref(a).states.data.value||[]).length!==0&&(t.unref(a).states.data.value||[]).length<100,"has-footer":e.showSummary},t.unref(o).m(t.unref(A)),e.className,t.unref(o).b(),t.unref(o).m(`layout-${t.unref(H)}`)]),style:t.normalizeStyle(e.style),"data-prefix":t.unref(o).namespace.value,onMouseleave:we[1]||(we[1]=(...ke)=>t.unref(E)&&t.unref(E)(...ke))},[t.createElementVNode("div",{ref:"tableInnerWrapper",class:t.normalizeClass(t.unref(o).e("inner-wrapper"))},[t.createElementVNode("div",Bn,[t.renderSlot(ue.$slots,"default")],512),e.showHeader&&t.unref(H)==="fixed"?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,ref:"headerWrapper",class:t.normalizeClass(t.unref(o).e("header-wrapper"))},[t.createElementVNode("table",{ref:"tableHeader",class:t.normalizeClass(t.unref(o).e("header")),style:t.normalizeStyle(t.unref(I)),border:"0",cellpadding:"0",cellspacing:"0"},[t.createVNode(t.unref(Pe),{columns:t.unref(a).states.columns.value,"table-layout":t.unref(H)},null,8,["columns","table-layout"]),t.createVNode(t.unref(kt),{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:t.unref(a),"append-filter-panel-to":e.appendFilterPanelTo,"allow-drag-last-column":e.allowDragLastColumn,onSetDragVisible:t.unref(w)},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[t.unref(Et),t.unref(R)]]):t.createCommentVNode("v-if",!0),t.createElementVNode("div",{ref:"bodyWrapper",class:t.normalizeClass(t.unref(o).e("body-wrapper"))},[t.createVNode(t.unref(Le.ElScrollbar),{ref_key:"scrollBarRef",ref:X,"view-style":t.unref(F),"wrap-style":t.unref(P),always:e.scrollbarAlwaysOn,tabindex:e.scrollbarTabindex,native:e.nativeScrollbar,onScroll:we[0]||(we[0]=ke=>ue.$emit("scroll",ke))},{default:t.withCtx(()=>[t.createElementVNode("table",{ref:"tableBody",class:t.normalizeClass(t.unref(o).e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:t.normalizeStyle({width:t.unref(U),tableLayout:t.unref(H)})},[t.createVNode(t.unref(Pe),{columns:t.unref(a).states.columns.value,"table-layout":t.unref(H)},null,8,["columns","table-layout"]),e.showHeader&&t.unref(H)==="auto"?(t.openBlock(),t.createBlock(t.unref(kt),{key:0,ref:"tableHeaderRef",class:t.normalizeClass(t.unref(o).e("body-header")),border:e.border,"default-sort":e.defaultSort,store:t.unref(a),"append-filter-panel-to":e.appendFilterPanelTo,onSetDragVisible:t.unref(w)},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):t.createCommentVNode("v-if",!0),t.createVNode(t.unref(On),{context:t.unref(ie),highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":Ae.value,"tooltip-options":We.value,"row-style":e.rowStyle,store:t.unref(a),stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&t.unref(H)==="auto"?(t.openBlock(),t.createBlock(t.unref(Tt),{key:1,class:t.normalizeClass(t.unref(o).e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:t.unref(a),"sum-text":fe.value,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):t.createCommentVNode("v-if",!0)],6),i.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"emptyBlock",style:t.normalizeStyle(t.unref(K)),class:t.normalizeClass(t.unref(o).e("empty-block"))},[t.createElementVNode("span",{class:t.normalizeClass(t.unref(o).e("empty-text"))},[t.renderSlot(ue.$slots,"empty",{},()=>[t.createTextVNode(t.toDisplayString(ve.value),1)])],2)],6)):t.createCommentVNode("v-if",!0),ue.$slots.append?(t.openBlock(),t.createElementBlock("div",{key:1,ref:"appendWrapper",class:t.normalizeClass(t.unref(o).e("append-wrapper"))},[t.renderSlot(ue.$slots,"append")],2)):t.createCommentVNode("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","native"])],2),e.showSummary&&t.unref(H)==="fixed"?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:1,ref:"footerWrapper",class:t.normalizeClass(t.unref(o).e("footer-wrapper"))},[t.createElementVNode("table",{class:t.normalizeClass(t.unref(o).e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:t.normalizeStyle(t.unref(I))},[t.createVNode(t.unref(Pe),{columns:t.unref(a).states.columns.value,"table-layout":t.unref(H)},null,8,["columns","table-layout"]),t.createVNode(t.unref(Tt),{border:e.border,"default-sort":e.defaultSort,store:t.unref(a),"sum-text":fe.value,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[t.vShow,!i.value],[t.unref(Et),t.unref(R)]]):t.createCommentVNode("v-if",!0),e.border||t.unref(C)?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(t.unref(o).e("border-left-patch"))},null,2)):t.createCommentVNode("v-if",!0)],2),t.withDirectives(t.createElementVNode("div",{ref:"resizeProxy",class:t.normalizeClass(t.unref(o).e("column-resize-proxy"))},null,2),[[t.vShow,t.unref(D)]])],46,Wn))}}),zn=Hn;const In={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(l=>["ascending","descending",null].includes(l))}},$n={selection:"table-column--selection",expand:"table__expand-column"},Vn={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},Kn=e=>$n[e]||"",Dn={selection:{renderHeader({store:e}){function l(){return e.states.data.value&&e.states.data.value.length===0}return t.h(Fe.ElCheckbox,{disabled:l(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection??void 0,modelValue:e.states.isAllSelected.value,ariaLabel:e.t("el.table.selectAllLabel")})},renderCell({row:e,column:l,store:n,$index:r}){return t.h(Fe.ElCheckbox,{disabled:l.selectable?!l.selectable.call(null,e,r):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:o=>o.stopPropagation(),modelValue:n.isSelected(e),indeterminate:n.getRowIndeterminate(e),ariaLabel:n.t("el.table.selectRowLabel")})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:l}){let n=l+1;const r=e.index;return y.isNumber(r)?n=l+r:y.isFunction(r)&&(n=r(l)),t.h("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({column:e,row:l,store:n,expanded:r,$index:o}){var i,u;const{ns:c}=n,d=[c.e("expand-icon")];!e.renderExpand&&r&&d.push(c.em("expand-icon","expanded"));const a=function(f){f.stopPropagation(),n.toggleRowExpansion(l)},s=((u=(i=n.states.rowExpandable).value)==null?void 0:u.call(i,l,o))??!0;return s||d.push(c.is("disabled")),t.h("button",{type:"button",disabled:!s,"aria-label":n.t(r?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":r,class:d,onClick:a},{default:()=>e.renderExpand?[e.renderExpand({expanded:r,expandable:s})]:[t.h(ye.ElIcon,null,{default:()=>[t.h(ye.arrow_right_default)]})]})},sortable:!1,resizable:!1}};function Pn({row:e,column:l,$index:n}){var c;const r=l.property,o=r&&Me.getProp(e,r).value;return l&&l.formatter?l.formatter(e,l,o,n):((c=o==null?void 0:o.toString)==null?void 0:c.call(o))||""}function jn({row:e,treeNode:l,store:n},r=!1){const{ns:o}=n;if(!l)return r?[t.h("span",{class:o.e("placeholder")})]:null;const c=[],d=function(a){a.stopPropagation(),!l.loading&&n.loadOrToggle(e)};if(l.indent&&c.push(t.h("span",{class:o.e("indent"),style:{"padding-left":`${l.indent}px`}})),y.isBoolean(l.expanded)&&!l.noLazyChildren){const a=[o.e("expand-icon"),l.expanded?o.em("expand-icon","expanded"):""];let s=ye.arrow_right_default;l.loading&&(s=ye.loading_default),c.push(t.h("button",{type:"button","aria-label":n.t(l.expanded?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":l.expanded,class:a,onClick:d},{default:()=>[t.h(ye.ElIcon,{class:o.is("loading",l.loading)},{default:()=>[t.h(s)]})]}))}else c.push(t.h("span",{class:o.e("placeholder")}));return c}function Lt(e,l){return e.reduce((n,r)=>(n[r]=r,n),l)}function _n(e,l){const n=t.getCurrentInstance();return{registerComplexWatchers:()=>{const c=["fixed"],d={realWidth:"width",realMinWidth:"minWidth"},a=Lt(c,d);Object.keys(a).forEach(s=>{const i=d[s];y.hasOwn(l,i)&&t.watch(()=>l[i],u=>{let f=u;i==="width"&&s==="realWidth"&&(f=at(u)),i==="minWidth"&&s==="realMinWidth"&&(f=_t(u)),n.columnConfig.value[i]=f,n.columnConfig.value[s]=f;const v=i==="fixed";e.value.store.scheduleLayout(v)})})},registerNormalWatchers:()=>{const c=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter","resizable"],d=["showOverflowTooltip"],a={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},s=Lt(c,a);Object.keys(s).forEach(u=>{const f=a[u];y.hasOwn(l,f)&&t.watch(()=>l[f],v=>{n.columnConfig.value[u]=v,(u==="filters"||u==="filterMethod")&&(n.columnConfig.value.filterable=!!(n.columnConfig.value.filters||n.columnConfig.value.filterMethod))})}),d.forEach(u=>{y.hasOwn(e.value.props,u)&&t.watch(()=>e.value.props[u],f=>{n.columnConfig.value.type!=="selection"&&y.isUndefined(l[u])&&(n.columnConfig.value[u]=f)})});const i=Me.useGlobalConfig("table");i.value&&y.hasOwn(i.value,"showOverflowTooltip")&&t.watch(()=>{var u;return(u=i.value)==null?void 0:u.showOverflowTooltip},u=>{n.columnConfig.value.type!=="selection"&&(!y.isUndefined(l.showOverflowTooltip)||!y.isUndefined(e.value.props.showOverflowTooltip)||(n.columnConfig.value.showOverflowTooltip=u))})}}}function qn(e,l,n){const r=t.getCurrentInstance(),o=t.ref(""),c=t.ref(!1),d=t.ref(),a=t.ref(),s=y.useNamespace("table");t.watchEffect(()=>{d.value=e.align?`is-${e.align}`:null,d.value}),t.watchEffect(()=>{a.value=e.headerAlign?`is-${e.headerAlign}`:d.value,a.value});const i=t.computed(()=>{let h=r.vnode.vParent||r.parent;for(;h&&!h.tableId&&!h.columnId;)h=h.vnode.vParent||h.parent;return h}),u=t.computed(()=>{const{store:h}=r.parent;if(!h)return!1;const{treeData:m}=h.states,b=m.value;return b&&Object.keys(b).length>0}),f=t.ref(at(e.width)),v=t.ref(_t(e.minWidth)),p=h=>(f.value&&(h.width=f.value),v.value&&(h.minWidth=v.value),!f.value&&v.value&&(h.width=void 0),h.minWidth||(h.minWidth=80),h.realWidth=Number(y.isUndefined(h.width)?h.minWidth:h.width),h),g=h=>{const m=h.type,b=Dn[m]||{};Object.keys(b).forEach(C=>{const E=b[C];C!=="className"&&!y.isUndefined(E)&&(h[C]=E)});const w=Kn(m);if(w){const C=`${t.unref(s.namespace)}-${w}`;h.className=h.className?`${h.className} ${C}`:C}return h},S=h=>{y.isArray(h)?h.forEach(b=>m(b)):m(h);function m(b){var w;((w=b==null?void 0:b.type)==null?void 0:w.name)==="ElTableColumn"&&(b.vParent=r)}};return{columnId:o,realAlign:d,isSubColumn:c,realHeaderAlign:a,columnOrTableParent:i,setColumnWidth:p,setColumnForcedProps:g,setColumnRenders:h=>{e.renderHeader?y.debugWarn("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):h.type!=="selection"&&(h.renderHeader=b=>{if(r.columnConfig.value.label,l.header){const w=l.header(b);if(Yt(w))return t.h(t.Fragment,w)}return t.createTextVNode(h.label)}),l["filter-icon"]&&(h.renderFilterIcon=b=>t.renderSlot(l,"filter-icon",b)),l.expand&&(h.renderExpand=b=>t.renderSlot(l,"expand",b));let m=h.renderCell;return h.type==="expand"?(h.renderCell=b=>t.h("div",{class:"cell"},[m(b)]),n.value.renderExpanded=b=>l.default?l.default(b):l.default):(m=m||Pn,h.renderCell=b=>{let w=null;if(l.default){const K=l.default(b);w=K.some(D=>D.type!==t.Comment)?K:m(b)}else w=m(b);const{columns:C}=n.value.store.states,E=C.value.findIndex(K=>K.type==="default"),R=jn(b,u.value&&b.cellIndex===E),A={class:"cell",style:{}};return h.showOverflowTooltip&&(A.class=`${A.class} ${t.unref(s.namespace)}-tooltip`,A.style={width:`${(b.column.realWidth||Number(b.column.width))-1}px`}),S(w),t.h("div",A,[R,w])}),h},getPropsData:(...h)=>h.reduce((m,b)=>(y.isArray(b)&&b.forEach(w=>{m[w]=e[w]}),m),{}),getColumnElIndex:(h,m)=>Array.prototype.indexOf.call(h,m),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",r.columnConfig.value)}}}var Un=t.defineComponent({name:"ElTableColumn",__name:"index",props:In,setup(e){const l=e,n=t.useSlots(),r=t.getCurrentInstance(),o=Me.useGlobalConfig("table"),c=t.ref({}),d=t.computed(()=>{let b=r.parent;for(;b&&!b.tableId;)b=b.parent;return b}),{registerNormalWatchers:a,registerComplexWatchers:s}=_n(d,l),{columnId:i,isSubColumn:u,realHeaderAlign:f,columnOrTableParent:v,setColumnWidth:p,setColumnForcedProps:g,setColumnRenders:S,getPropsData:x,getColumnElIndex:L,realAlign:k,updateColumnOrder:O}=qn(l,n,d),h=v.value;i.value=_l("tableId"in h?h.tableId:h.columnId),t.onBeforeMount(()=>{var K,D;u.value=d.value!==h;const b=l.type||"default",w=l.sortable===""?!0:l.sortable,C=b==="selection"?!1:y.isUndefined(l.showOverflowTooltip)?h.props.showOverflowTooltip??((K=o.value)==null?void 0:K.showOverflowTooltip):l.showOverflowTooltip,E=y.isUndefined(l.tooltipFormatter)?h.props.tooltipFormatter??((D=o.value)==null?void 0:D.tooltipFormatter):l.tooltipFormatter,R={...Vn[b],id:i.value,type:b,property:l.prop||l.property,align:k,headerAlign:f,showOverflowTooltip:C,tooltipFormatter:E,filterable:l.filters||l.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:w,index:l.index,rawColumnKey:r.vnode.key};let A=x(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);A=Yl(R,A),A=Gl(S,p,g)(A),c.value=A,a(),s()}),t.onMounted(()=>{var E,R;const b=v.value,w=u.value?(E=b.vnode.el)==null?void 0:E.children:(R=b.refs.hiddenColumns)==null?void 0:R.children,C=()=>L(w||[],r.vnode.el);c.value.getColumnIndex=C,C()>-1&&d.value.store.commit("insertColumn",c.value,u.value?"columnConfig"in b&&b.columnConfig.value:null,O)}),t.onBeforeUnmount(()=>{const b=c.value.getColumnIndex;(b?b():-1)>-1&&d.value.store.commit("removeColumn",c.value,u.value?"columnConfig"in h&&h.columnConfig.value:null,O)}),r.columnId=i.value,r.columnConfig=c;const m=()=>{var b,w;try{const C=(b=n.default)==null?void 0:b.call(n,{row:{},column:{},$index:-1}),E=[];if(y.isArray(C))for(const R of C)((w=R.type)==null?void 0:w.name)==="ElTableColumn"||R.shapeFlag&2?E.push(R):R.type===t.Fragment&&y.isArray(R.children)&&R.children.forEach(A=>{(A==null?void 0:A.patchFlag)!==1024&&!y.isString(A==null?void 0:A.children)&&E.push(A)});return t.h("div",E)}catch{return t.h("div",[])}};return(b,w)=>(t.openBlock(),t.createBlock(m))}}),Yn=Un,Xn=Yn,Zt=Xn;const Gn=y.withInstall(zn,{TableColumn:Zt}),Qn=y.withNoopInstall(Zt);exports.ElTable=Gn;exports.ElTableColumn=Qn;