fangguo-component 1.1.2 → 1.1.4

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 (150) hide show
  1. package/dist/ArgHover.css +20 -1
  2. package/dist/ArgHover.vue_vue_type_style_index_0_lang-CSymSDRl.js +56 -0
  3. package/dist/ButtonGroup-DqViorHX.js +134 -0
  4. package/dist/ButtonGroup.css +35 -1
  5. package/dist/CitySelect.vue_vue_type_script_setup_true_lang-DZp6834K.js +224 -0
  6. package/dist/ContentTitle-By0Zk1u7.js +30 -0
  7. package/dist/ContentTitle.css +6 -1
  8. package/dist/CustomInputV2-BqhBSO53.js +157 -0
  9. package/dist/CustomInputV2.css +5 -1
  10. package/dist/CustomMultipleInput-DRMTUtkE.js +125 -0
  11. package/dist/CustomMultipleInput.css +8 -1
  12. package/dist/DragResizable.css +126 -1
  13. package/dist/DragResizable.vue_vue_type_style_index_0_lang-BePpQHve.js +331 -0
  14. package/dist/DragSort-5WetnkmW.js +98 -0
  15. package/dist/DragSort.css +5 -1
  16. package/dist/ErrorImage-Ao9kEEUg.js +36 -0
  17. package/dist/ErrorImage.css +4 -1
  18. package/dist/FgCascader.css +37 -1
  19. package/dist/FgCascader.vue_vue_type_style_index_0_lang-CM8FxFLJ.js +2424 -0
  20. package/dist/HSelect-BFkWiCFi.js +671 -0
  21. package/dist/HSelect.css +80 -1
  22. package/dist/HSelectAll.vue_vue_type_script_setup_true_lang-BZX7ch2I.js +50 -0
  23. package/dist/HSelectSJ-DZmtdyjF.js +671 -0
  24. package/dist/HSelectSJ.css +88 -1
  25. package/dist/IdentifyAddress.vue_vue_type_script_setup_true_lang-BCIOF-Oy.js +5202 -0
  26. package/dist/ImageLoupe.vue_vue_type_script_setup_true_lang-BaXHYlDu.js +92 -0
  27. package/dist/LazyComponent.vue_vue_type_script_setup_true_lang-D5KGqlj4.js +107 -0
  28. package/dist/LazyPopover.vue_vue_type_script_setup_true_lang-B2vtU4f4.js +34 -0
  29. package/dist/LoadingBtn-DWm2cY9k.js +87 -0
  30. package/dist/LoadingBtn.css +12 -1
  31. package/dist/MInput-s_P63myh.js +114 -0
  32. package/dist/MInput.css +21 -1
  33. package/dist/MyTable-CHvxPYgk.js +94 -0
  34. package/dist/MyTable.css +33 -1
  35. package/dist/NoRender.vue_vue_type_script_setup_true_lang-B0G6jxPg.js +31 -0
  36. package/dist/SelectAddress-CCepDxu8.js +254 -0
  37. package/dist/SelectAddress.css +18 -1
  38. package/dist/SelectAll.vue_vue_type_script_setup_true_lang-CyzY8ams.js +101 -0
  39. package/dist/SelectAll2.vue_vue_type_script_setup_true_lang-CrsaohxU.js +103 -0
  40. package/dist/SelectCustomAll.css +8 -1
  41. package/dist/SelectCustomAll.vue_vue_type_style_index_0_lang-BEZwlGXa.js +111 -0
  42. package/dist/SelectTimePicker.vue_vue_type_script_setup_true_lang-Dk4TpTBN.js +48 -0
  43. package/dist/SelectTree-DHbWogEU.js +1276 -0
  44. package/dist/SelectTree.css +74 -1
  45. package/dist/SvgIcon-DIg0upEk.js +33 -0
  46. package/dist/TextCopy-th0FAxwl.js +44 -0
  47. package/dist/TextCopy.css +7 -1
  48. package/dist/TextEllipsisTooltip.vue_vue_type_script_setup_true_lang-DVE1CxPm.js +174 -0
  49. package/dist/VirtualTable-Cm_L7q9W.js +703 -0
  50. package/dist/VirtualTable.css +185 -1
  51. package/dist/_commonjsHelpers-DnzVkjQg.js +38 -0
  52. package/dist/_plugin-vue_export-helper-1tPrXgE0.js +10 -0
  53. package/dist/common-B1nSpTGn.js +9669 -0
  54. package/dist/components/VirtualTable/index.js +2 -2
  55. package/dist/components/argHover/index.js +2 -2
  56. package/dist/components/buttonGroup/index.js +2 -2
  57. package/dist/components/cascader/index.js +2 -2
  58. package/dist/components/citySelect/index.js +2 -2
  59. package/dist/components/contentTitle/index.js +2 -2
  60. package/dist/components/customInputV2/index.js +2 -2
  61. package/dist/components/customMultipleInput/index.js +2 -2
  62. package/dist/components/dragResizable/index.js +2 -2
  63. package/dist/components/dragSort/index.js +2 -2
  64. package/dist/components/errorImage/index.js +2 -2
  65. package/dist/components/hSelect/index.js +2 -2
  66. package/dist/components/hSelectAll/index.js +2 -2
  67. package/dist/components/hSelectSJ/index.js +2 -2
  68. package/dist/components/identifyAddress/index.js +2 -2
  69. package/dist/components/imageLoupe/index.js +2 -2
  70. package/dist/components/index.js +62 -62
  71. package/dist/components/lazyComponent/index.js +2 -2
  72. package/dist/components/lazyPopover/index.js +2 -2
  73. package/dist/components/loadingBtn/index.js +2 -2
  74. package/dist/components/mInput/index.js +2 -2
  75. package/dist/components/myTable/index.js +2 -2
  76. package/dist/components/noRender/index.js +2 -2
  77. package/dist/components/selectAddress/index.js +2 -2
  78. package/dist/components/selectAll/index.js +2 -2
  79. package/dist/components/selectAll2/index.js +2 -2
  80. package/dist/components/selectCustomAll/index.js +2 -2
  81. package/dist/components/selectTimePicker/index.js +2 -2
  82. package/dist/components/selectTree/index.js +2 -2
  83. package/dist/components/svgIcon/index.js +2 -2
  84. package/dist/components/textCopy/index.js +2 -2
  85. package/dist/components/textEllipsisTooltip/index.js +2 -2
  86. package/dist/dateShortcuts-DjFC_Txu.js +27 -0
  87. package/dist/directive/index.js +2 -2
  88. package/dist/directive/loading/index.js +2 -2
  89. package/dist/hooks/index.js +2 -2
  90. package/dist/hooks/usePagination/index.js +2 -2
  91. package/dist/index-BPnixsfc.js +103 -0
  92. package/dist/index-C9zyi90j.js +165 -0
  93. package/dist/index-CSMWzzp0.js +8 -0
  94. package/dist/index-DfQiknXJ.js +8 -0
  95. package/dist/index-DzdLpetc.js +29184 -0
  96. package/dist/index-uQXqC9BF.js +68 -0
  97. package/dist/index.css +1 -1
  98. package/dist/index.js +204 -194
  99. package/dist/loading-CGrVcnNl.js +47 -0
  100. package/dist/loading.css +110 -1
  101. package/dist/tools/ImageParserUtils/index.js +17239 -9074
  102. package/dist/tools/common/index.js +86 -86
  103. package/dist/tools/index.js +95 -95
  104. package/dist/usePagination-C63IRXjZ.js +29 -0
  105. package/dist/vue-virtual-scroller.esm-ZgBoGAjX.js +1507 -0
  106. package/package.json +1 -1
  107. package/dist/ArgHover.vue_vue_type_style_index_0_lang-CMhRP09M.js +0 -54
  108. package/dist/ButtonGroup-C0yZEkxK.js +0 -103
  109. package/dist/CitySelect.vue_vue_type_script_setup_true_lang-8EbHD3Nt.js +0 -159
  110. package/dist/ContentTitle-mqrusLjx.js +0 -24
  111. package/dist/CustomInputV2-uARhbFc8.js +0 -135
  112. package/dist/CustomMultipleInput-DDaqoHVU.js +0 -109
  113. package/dist/DragResizable.vue_vue_type_style_index_0_lang-CHv0gJmo.js +0 -179
  114. package/dist/DragSort-CfDeFAIG.js +0 -66
  115. package/dist/ErrorImage-CTP_5sal.js +0 -32
  116. package/dist/FgCascader.vue_vue_type_style_index_0_lang-BUZDDcVn.js +0 -1656
  117. package/dist/HSelect-Drf6YBwO.js +0 -468
  118. package/dist/HSelectAll.vue_vue_type_script_setup_true_lang-Blq9xpfa.js +0 -36
  119. package/dist/HSelectSJ-D3GrXmvj.js +0 -462
  120. package/dist/IdentifyAddress.vue_vue_type_script_setup_true_lang-BJheMI1q.js +0 -4743
  121. package/dist/ImageLoupe.vue_vue_type_script_setup_true_lang-BlX4VbRi.js +0 -79
  122. package/dist/LazyComponent.vue_vue_type_script_setup_true_lang-vNk68D8E.js +0 -82
  123. package/dist/LazyPopover.vue_vue_type_script_setup_true_lang-DcOrcH0T.js +0 -33
  124. package/dist/LoadingBtn-BhbhNboo.js +0 -66
  125. package/dist/MInput-CpoW17Wh.js +0 -101
  126. package/dist/MyTable-DmwyEVJb.js +0 -68
  127. package/dist/NoRender.vue_vue_type_script_setup_true_lang-Do36nSsV.js +0 -30
  128. package/dist/SelectAddress-B4oK5erq.js +0 -173
  129. package/dist/SelectAll.vue_vue_type_script_setup_true_lang-BC3q2U8f.js +0 -79
  130. package/dist/SelectAll2.vue_vue_type_script_setup_true_lang-CaET5eli.js +0 -74
  131. package/dist/SelectCustomAll.vue_vue_type_style_index_0_lang-_wCRO217.js +0 -83
  132. package/dist/SelectTimePicker.vue_vue_type_script_setup_true_lang-Bj0KMOKv.js +0 -45
  133. package/dist/SelectTree-Dm5259kY.js +0 -911
  134. package/dist/SvgIcon-C2ah8E0Z.js +0 -30
  135. package/dist/TextCopy-hOj-Wj2H.js +0 -41
  136. package/dist/TextEllipsisTooltip.vue_vue_type_script_setup_true_lang-aZbEQmbM.js +0 -112
  137. package/dist/VirtualTable-BWugJiQ5.js +0 -349
  138. package/dist/_commonjsHelpers-ByYUsBRP.js +0 -33
  139. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  140. package/dist/common-BIEgCXbl.js +0 -7030
  141. package/dist/dateShortcuts-DDPtAhDI.js +0 -26
  142. package/dist/index-BRcBDlVs.js +0 -68
  143. package/dist/index-CeWudY6u.js +0 -8
  144. package/dist/index-DIX8TpoT.js +0 -118
  145. package/dist/index-DpPsTMp0.js +0 -8
  146. package/dist/index-epuVZjZV.js +0 -103
  147. package/dist/index-uf7oyYDF.js +0 -16847
  148. package/dist/loading-DJVNc0eN.js +0 -36
  149. package/dist/usePagination-CwShBEjA.js +0 -20
  150. package/dist/vue-virtual-scroller.esm-CH-jx4ri.js +0 -1051
@@ -0,0 +1,1276 @@
1
+ import './SelectTree.css';var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { ElPopover, ElTreeV2, ElTag, ElIcon } from "element-plus/es";
22
+ import { _ as _sfc_main$1 } from "./LazyPopover.vue_vue_type_script_setup_true_lang-B2vtU4f4.js";
23
+ import { defineComponent, ref, computed, watch, nextTick, onMounted, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createElementVNode, normalizeStyle, normalizeClass, createTextVNode, withDirectives, withModifiers, vModelText, toRaw } from "vue";
24
+ import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
25
+ const global = globalThis || void 0 || self;
26
+ function listCacheClear() {
27
+ this.__data__ = [];
28
+ this.size = 0;
29
+ }
30
+ function eq(value, other) {
31
+ return value === other || value !== value && other !== other;
32
+ }
33
+ function assocIndexOf(array, key) {
34
+ var length = array.length;
35
+ while (length--) {
36
+ if (eq(array[length][0], key)) {
37
+ return length;
38
+ }
39
+ }
40
+ return -1;
41
+ }
42
+ var arrayProto = Array.prototype;
43
+ var splice = arrayProto.splice;
44
+ function listCacheDelete(key) {
45
+ var data = this.__data__, index = assocIndexOf(data, key);
46
+ if (index < 0) {
47
+ return false;
48
+ }
49
+ var lastIndex = data.length - 1;
50
+ if (index == lastIndex) {
51
+ data.pop();
52
+ } else {
53
+ splice.call(data, index, 1);
54
+ }
55
+ --this.size;
56
+ return true;
57
+ }
58
+ function listCacheGet(key) {
59
+ var data = this.__data__, index = assocIndexOf(data, key);
60
+ return index < 0 ? void 0 : data[index][1];
61
+ }
62
+ function listCacheHas(key) {
63
+ return assocIndexOf(this.__data__, key) > -1;
64
+ }
65
+ function listCacheSet(key, value) {
66
+ var data = this.__data__, index = assocIndexOf(data, key);
67
+ if (index < 0) {
68
+ ++this.size;
69
+ data.push([key, value]);
70
+ } else {
71
+ data[index][1] = value;
72
+ }
73
+ return this;
74
+ }
75
+ function ListCache(entries) {
76
+ var index = -1, length = entries == null ? 0 : entries.length;
77
+ this.clear();
78
+ while (++index < length) {
79
+ var entry = entries[index];
80
+ this.set(entry[0], entry[1]);
81
+ }
82
+ }
83
+ ListCache.prototype.clear = listCacheClear;
84
+ ListCache.prototype["delete"] = listCacheDelete;
85
+ ListCache.prototype.get = listCacheGet;
86
+ ListCache.prototype.has = listCacheHas;
87
+ ListCache.prototype.set = listCacheSet;
88
+ function stackClear() {
89
+ this.__data__ = new ListCache();
90
+ this.size = 0;
91
+ }
92
+ function stackDelete(key) {
93
+ var data = this.__data__, result = data["delete"](key);
94
+ this.size = data.size;
95
+ return result;
96
+ }
97
+ function stackGet(key) {
98
+ return this.__data__.get(key);
99
+ }
100
+ function stackHas(key) {
101
+ return this.__data__.has(key);
102
+ }
103
+ var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
104
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
105
+ var root = freeGlobal || freeSelf || Function("return this")();
106
+ var Symbol$1 = root.Symbol;
107
+ var objectProto$b = Object.prototype;
108
+ var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
109
+ var nativeObjectToString$1 = objectProto$b.toString;
110
+ var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
111
+ function getRawTag(value) {
112
+ var isOwn = hasOwnProperty$8.call(value, symToStringTag$1), tag = value[symToStringTag$1];
113
+ try {
114
+ value[symToStringTag$1] = void 0;
115
+ var unmasked = true;
116
+ } catch (e) {
117
+ }
118
+ var result = nativeObjectToString$1.call(value);
119
+ if (unmasked) {
120
+ if (isOwn) {
121
+ value[symToStringTag$1] = tag;
122
+ } else {
123
+ delete value[symToStringTag$1];
124
+ }
125
+ }
126
+ return result;
127
+ }
128
+ var objectProto$a = Object.prototype;
129
+ var nativeObjectToString = objectProto$a.toString;
130
+ function objectToString(value) {
131
+ return nativeObjectToString.call(value);
132
+ }
133
+ var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
134
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
135
+ function baseGetTag(value) {
136
+ if (value == null) {
137
+ return value === void 0 ? undefinedTag : nullTag;
138
+ }
139
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
140
+ }
141
+ function isObject(value) {
142
+ var type = typeof value;
143
+ return value != null && (type == "object" || type == "function");
144
+ }
145
+ var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
146
+ function isFunction(value) {
147
+ if (!isObject(value)) {
148
+ return false;
149
+ }
150
+ var tag = baseGetTag(value);
151
+ return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
152
+ }
153
+ var coreJsData = root["__core-js_shared__"];
154
+ var maskSrcKey = (function() {
155
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
156
+ return uid ? "Symbol(src)_1." + uid : "";
157
+ })();
158
+ function isMasked(func) {
159
+ return !!maskSrcKey && maskSrcKey in func;
160
+ }
161
+ var funcProto$1 = Function.prototype;
162
+ var funcToString$1 = funcProto$1.toString;
163
+ function toSource(func) {
164
+ if (func != null) {
165
+ try {
166
+ return funcToString$1.call(func);
167
+ } catch (e) {
168
+ }
169
+ try {
170
+ return func + "";
171
+ } catch (e) {
172
+ }
173
+ }
174
+ return "";
175
+ }
176
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
177
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
178
+ var funcProto = Function.prototype, objectProto$9 = Object.prototype;
179
+ var funcToString = funcProto.toString;
180
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
181
+ var reIsNative = RegExp(
182
+ "^" + funcToString.call(hasOwnProperty$7).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
183
+ );
184
+ function baseIsNative(value) {
185
+ if (!isObject(value) || isMasked(value)) {
186
+ return false;
187
+ }
188
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
189
+ return pattern.test(toSource(value));
190
+ }
191
+ function getValue(object, key) {
192
+ return object == null ? void 0 : object[key];
193
+ }
194
+ function getNative(object, key) {
195
+ var value = getValue(object, key);
196
+ return baseIsNative(value) ? value : void 0;
197
+ }
198
+ var Map = getNative(root, "Map");
199
+ var nativeCreate = getNative(Object, "create");
200
+ function hashClear() {
201
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
202
+ this.size = 0;
203
+ }
204
+ function hashDelete(key) {
205
+ var result = this.has(key) && delete this.__data__[key];
206
+ this.size -= result ? 1 : 0;
207
+ return result;
208
+ }
209
+ var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
210
+ var objectProto$8 = Object.prototype;
211
+ var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
212
+ function hashGet(key) {
213
+ var data = this.__data__;
214
+ if (nativeCreate) {
215
+ var result = data[key];
216
+ return result === HASH_UNDEFINED$1 ? void 0 : result;
217
+ }
218
+ return hasOwnProperty$6.call(data, key) ? data[key] : void 0;
219
+ }
220
+ var objectProto$7 = Object.prototype;
221
+ var hasOwnProperty$5 = objectProto$7.hasOwnProperty;
222
+ function hashHas(key) {
223
+ var data = this.__data__;
224
+ return nativeCreate ? data[key] !== void 0 : hasOwnProperty$5.call(data, key);
225
+ }
226
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
227
+ function hashSet(key, value) {
228
+ var data = this.__data__;
229
+ this.size += this.has(key) ? 0 : 1;
230
+ data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
231
+ return this;
232
+ }
233
+ function Hash(entries) {
234
+ var index = -1, length = entries == null ? 0 : entries.length;
235
+ this.clear();
236
+ while (++index < length) {
237
+ var entry = entries[index];
238
+ this.set(entry[0], entry[1]);
239
+ }
240
+ }
241
+ Hash.prototype.clear = hashClear;
242
+ Hash.prototype["delete"] = hashDelete;
243
+ Hash.prototype.get = hashGet;
244
+ Hash.prototype.has = hashHas;
245
+ Hash.prototype.set = hashSet;
246
+ function mapCacheClear() {
247
+ this.size = 0;
248
+ this.__data__ = {
249
+ "hash": new Hash(),
250
+ "map": new (Map || ListCache)(),
251
+ "string": new Hash()
252
+ };
253
+ }
254
+ function isKeyable(value) {
255
+ var type = typeof value;
256
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
257
+ }
258
+ function getMapData(map, key) {
259
+ var data = map.__data__;
260
+ return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
261
+ }
262
+ function mapCacheDelete(key) {
263
+ var result = getMapData(this, key)["delete"](key);
264
+ this.size -= result ? 1 : 0;
265
+ return result;
266
+ }
267
+ function mapCacheGet(key) {
268
+ return getMapData(this, key).get(key);
269
+ }
270
+ function mapCacheHas(key) {
271
+ return getMapData(this, key).has(key);
272
+ }
273
+ function mapCacheSet(key, value) {
274
+ var data = getMapData(this, key), size = data.size;
275
+ data.set(key, value);
276
+ this.size += data.size == size ? 0 : 1;
277
+ return this;
278
+ }
279
+ function MapCache(entries) {
280
+ var index = -1, length = entries == null ? 0 : entries.length;
281
+ this.clear();
282
+ while (++index < length) {
283
+ var entry = entries[index];
284
+ this.set(entry[0], entry[1]);
285
+ }
286
+ }
287
+ MapCache.prototype.clear = mapCacheClear;
288
+ MapCache.prototype["delete"] = mapCacheDelete;
289
+ MapCache.prototype.get = mapCacheGet;
290
+ MapCache.prototype.has = mapCacheHas;
291
+ MapCache.prototype.set = mapCacheSet;
292
+ var LARGE_ARRAY_SIZE = 200;
293
+ function stackSet(key, value) {
294
+ var data = this.__data__;
295
+ if (data instanceof ListCache) {
296
+ var pairs = data.__data__;
297
+ if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
298
+ pairs.push([key, value]);
299
+ this.size = ++data.size;
300
+ return this;
301
+ }
302
+ data = this.__data__ = new MapCache(pairs);
303
+ }
304
+ data.set(key, value);
305
+ this.size = data.size;
306
+ return this;
307
+ }
308
+ function Stack(entries) {
309
+ var data = this.__data__ = new ListCache(entries);
310
+ this.size = data.size;
311
+ }
312
+ Stack.prototype.clear = stackClear;
313
+ Stack.prototype["delete"] = stackDelete;
314
+ Stack.prototype.get = stackGet;
315
+ Stack.prototype.has = stackHas;
316
+ Stack.prototype.set = stackSet;
317
+ function arrayEach(array, iteratee) {
318
+ var index = -1, length = array == null ? 0 : array.length;
319
+ while (++index < length) {
320
+ if (iteratee(array[index], index, array) === false) {
321
+ break;
322
+ }
323
+ }
324
+ return array;
325
+ }
326
+ var defineProperty = (function() {
327
+ try {
328
+ var func = getNative(Object, "defineProperty");
329
+ func({}, "", {});
330
+ return func;
331
+ } catch (e) {
332
+ }
333
+ })();
334
+ function baseAssignValue(object, key, value) {
335
+ if (key == "__proto__" && defineProperty) {
336
+ defineProperty(object, key, {
337
+ "configurable": true,
338
+ "enumerable": true,
339
+ "value": value,
340
+ "writable": true
341
+ });
342
+ } else {
343
+ object[key] = value;
344
+ }
345
+ }
346
+ var objectProto$6 = Object.prototype;
347
+ var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
348
+ function assignValue(object, key, value) {
349
+ var objValue = object[key];
350
+ if (!(hasOwnProperty$4.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
351
+ baseAssignValue(object, key, value);
352
+ }
353
+ }
354
+ function baseTimes(n, iteratee) {
355
+ var index = -1, result = Array(n);
356
+ while (++index < n) {
357
+ result[index] = iteratee(index);
358
+ }
359
+ return result;
360
+ }
361
+ function isObjectLike(value) {
362
+ return value != null && typeof value == "object";
363
+ }
364
+ var argsTag$2 = "[object Arguments]";
365
+ function baseIsArguments(value) {
366
+ return isObjectLike(value) && baseGetTag(value) == argsTag$2;
367
+ }
368
+ var objectProto$5 = Object.prototype;
369
+ var hasOwnProperty$3 = objectProto$5.hasOwnProperty;
370
+ var propertyIsEnumerable$1 = objectProto$5.propertyIsEnumerable;
371
+ var isArguments = baseIsArguments(/* @__PURE__ */ (function() {
372
+ return arguments;
373
+ })()) ? baseIsArguments : function(value) {
374
+ return isObjectLike(value) && hasOwnProperty$3.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
375
+ };
376
+ var isArray = Array.isArray;
377
+ function stubFalse() {
378
+ return false;
379
+ }
380
+ var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
381
+ var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
382
+ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
383
+ var Buffer$1 = moduleExports$2 ? root.Buffer : void 0;
384
+ var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
385
+ var isBuffer = nativeIsBuffer || stubFalse;
386
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
387
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
388
+ function isIndex(value, length) {
389
+ var type = typeof value;
390
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
391
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
392
+ }
393
+ var MAX_SAFE_INTEGER = 9007199254740991;
394
+ function isLength(value) {
395
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
396
+ }
397
+ var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", errorTag$1 = "[object Error]", funcTag$1 = "[object Function]", mapTag$4 = "[object Map]", numberTag$2 = "[object Number]", objectTag$2 = "[object Object]", regexpTag$2 = "[object RegExp]", setTag$4 = "[object Set]", stringTag$2 = "[object String]", weakMapTag$2 = "[object WeakMap]";
398
+ var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$3 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
399
+ var typedArrayTags = {};
400
+ typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
401
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] = typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$2] = typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] = typedArrayTags[weakMapTag$2] = false;
402
+ function baseIsTypedArray(value) {
403
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
404
+ }
405
+ function baseUnary(func) {
406
+ return function(value) {
407
+ return func(value);
408
+ };
409
+ }
410
+ var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
411
+ var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
412
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
413
+ var freeProcess = moduleExports$1 && freeGlobal.process;
414
+ var nodeUtil = (function() {
415
+ try {
416
+ var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
417
+ if (types) {
418
+ return types;
419
+ }
420
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
421
+ } catch (e) {
422
+ }
423
+ })();
424
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
425
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
426
+ var objectProto$4 = Object.prototype;
427
+ var hasOwnProperty$2 = objectProto$4.hasOwnProperty;
428
+ function arrayLikeKeys(value, inherited) {
429
+ var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
430
+ for (var key in value) {
431
+ if (hasOwnProperty$2.call(value, key) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
432
+ (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
433
+ isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
434
+ isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
435
+ isIndex(key, length)))) {
436
+ result.push(key);
437
+ }
438
+ }
439
+ return result;
440
+ }
441
+ var objectProto$3 = Object.prototype;
442
+ function isPrototype(value) {
443
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$3;
444
+ return value === proto;
445
+ }
446
+ function overArg(func, transform) {
447
+ return function(arg) {
448
+ return func(transform(arg));
449
+ };
450
+ }
451
+ var nativeKeys = overArg(Object.keys, Object);
452
+ var objectProto$2 = Object.prototype;
453
+ var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
454
+ function baseKeys(object) {
455
+ if (!isPrototype(object)) {
456
+ return nativeKeys(object);
457
+ }
458
+ var result = [];
459
+ for (var key in Object(object)) {
460
+ if (hasOwnProperty$1.call(object, key) && key != "constructor") {
461
+ result.push(key);
462
+ }
463
+ }
464
+ return result;
465
+ }
466
+ function isArrayLike(value) {
467
+ return value != null && isLength(value.length) && !isFunction(value);
468
+ }
469
+ function keys(object) {
470
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
471
+ }
472
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
473
+ var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
474
+ var moduleExports = freeModule && freeModule.exports === freeExports;
475
+ var Buffer2 = moduleExports ? root.Buffer : void 0;
476
+ Buffer2 ? Buffer2.allocUnsafe : void 0;
477
+ function cloneBuffer(buffer, isDeep) {
478
+ {
479
+ return buffer.slice();
480
+ }
481
+ }
482
+ function arrayFilter(array, predicate) {
483
+ var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
484
+ while (++index < length) {
485
+ var value = array[index];
486
+ if (predicate(value, index, array)) {
487
+ result[resIndex++] = value;
488
+ }
489
+ }
490
+ return result;
491
+ }
492
+ function stubArray() {
493
+ return [];
494
+ }
495
+ var objectProto$1 = Object.prototype;
496
+ var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
497
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
498
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
499
+ if (object == null) {
500
+ return [];
501
+ }
502
+ object = Object(object);
503
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
504
+ return propertyIsEnumerable.call(object, symbol);
505
+ });
506
+ };
507
+ function arrayPush(array, values) {
508
+ var index = -1, length = values.length, offset = array.length;
509
+ while (++index < length) {
510
+ array[offset + index] = values[index];
511
+ }
512
+ return array;
513
+ }
514
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
515
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
516
+ var result = keysFunc(object);
517
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
518
+ }
519
+ function getAllKeys(object) {
520
+ return baseGetAllKeys(object, keys, getSymbols);
521
+ }
522
+ var DataView = getNative(root, "DataView");
523
+ var Promise$1 = getNative(root, "Promise");
524
+ var Set$1 = getNative(root, "Set");
525
+ var WeakMap = getNative(root, "WeakMap");
526
+ var mapTag$3 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$3 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
527
+ var dataViewTag$2 = "[object DataView]";
528
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap);
529
+ var getTag = baseGetTag;
530
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$2 || Map && getTag(new Map()) != mapTag$3 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$3 || WeakMap && getTag(new WeakMap()) != weakMapTag$1) {
531
+ getTag = function(value) {
532
+ var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
533
+ if (ctorString) {
534
+ switch (ctorString) {
535
+ case dataViewCtorString:
536
+ return dataViewTag$2;
537
+ case mapCtorString:
538
+ return mapTag$3;
539
+ case promiseCtorString:
540
+ return promiseTag;
541
+ case setCtorString:
542
+ return setTag$3;
543
+ case weakMapCtorString:
544
+ return weakMapTag$1;
545
+ }
546
+ }
547
+ return result;
548
+ };
549
+ }
550
+ var objectProto = Object.prototype;
551
+ var hasOwnProperty = objectProto.hasOwnProperty;
552
+ function initCloneArray(array) {
553
+ var length = array.length, result = new array.constructor(length);
554
+ if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
555
+ result.index = array.index;
556
+ result.input = array.input;
557
+ }
558
+ return result;
559
+ }
560
+ var Uint8Array2 = root.Uint8Array;
561
+ function cloneArrayBuffer(arrayBuffer) {
562
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
563
+ new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
564
+ return result;
565
+ }
566
+ function cloneDataView(dataView, isDeep) {
567
+ var buffer = cloneArrayBuffer(dataView.buffer);
568
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
569
+ }
570
+ var reFlags = /\w*$/;
571
+ function cloneRegExp(regexp) {
572
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
573
+ result.lastIndex = regexp.lastIndex;
574
+ return result;
575
+ }
576
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
577
+ function cloneSymbol(symbol) {
578
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
579
+ }
580
+ function cloneTypedArray(typedArray, isDeep) {
581
+ var buffer = cloneArrayBuffer(typedArray.buffer);
582
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
583
+ }
584
+ var boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]";
585
+ var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
586
+ function initCloneByTag(object, tag, isDeep) {
587
+ var Ctor = object.constructor;
588
+ switch (tag) {
589
+ case arrayBufferTag$1:
590
+ return cloneArrayBuffer(object);
591
+ case boolTag$1:
592
+ case dateTag$1:
593
+ return new Ctor(+object);
594
+ case dataViewTag$1:
595
+ return cloneDataView(object);
596
+ case float32Tag$1:
597
+ case float64Tag$1:
598
+ case int8Tag$1:
599
+ case int16Tag$1:
600
+ case int32Tag$1:
601
+ case uint8Tag$1:
602
+ case uint8ClampedTag$1:
603
+ case uint16Tag$1:
604
+ case uint32Tag$1:
605
+ return cloneTypedArray(object);
606
+ case mapTag$2:
607
+ return new Ctor();
608
+ case numberTag$1:
609
+ case stringTag$1:
610
+ return new Ctor(object);
611
+ case regexpTag$1:
612
+ return cloneRegExp(object);
613
+ case setTag$2:
614
+ return new Ctor();
615
+ case symbolTag$1:
616
+ return cloneSymbol(object);
617
+ }
618
+ }
619
+ var objectCreate = Object.create;
620
+ var baseCreate = /* @__PURE__ */ (function() {
621
+ function object() {
622
+ }
623
+ return function(proto) {
624
+ if (!isObject(proto)) {
625
+ return {};
626
+ }
627
+ if (objectCreate) {
628
+ return objectCreate(proto);
629
+ }
630
+ object.prototype = proto;
631
+ var result = new object();
632
+ object.prototype = void 0;
633
+ return result;
634
+ };
635
+ })();
636
+ function initCloneObject(object) {
637
+ return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
638
+ }
639
+ var mapTag$1 = "[object Map]";
640
+ function baseIsMap(value) {
641
+ return isObjectLike(value) && getTag(value) == mapTag$1;
642
+ }
643
+ var nodeIsMap = nodeUtil && nodeUtil.isMap;
644
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
645
+ var setTag$1 = "[object Set]";
646
+ function baseIsSet(value) {
647
+ return isObjectLike(value) && getTag(value) == setTag$1;
648
+ }
649
+ var nodeIsSet = nodeUtil && nodeUtil.isSet;
650
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
651
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]";
652
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
653
+ var cloneableTags = {};
654
+ cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
655
+ cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
656
+ function baseClone(value, bitmask, customizer, key, object, stack) {
657
+ var result;
658
+ if (result !== void 0) {
659
+ return result;
660
+ }
661
+ if (!isObject(value)) {
662
+ return value;
663
+ }
664
+ var isArr = isArray(value);
665
+ if (isArr) {
666
+ result = initCloneArray(value);
667
+ } else {
668
+ var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
669
+ if (isBuffer(value)) {
670
+ return cloneBuffer(value);
671
+ }
672
+ if (tag == objectTag || tag == argsTag || isFunc && !object) {
673
+ result = isFunc ? {} : initCloneObject(value);
674
+ } else {
675
+ if (!cloneableTags[tag]) {
676
+ return object ? value : {};
677
+ }
678
+ result = initCloneByTag(value, tag);
679
+ }
680
+ }
681
+ stack || (stack = new Stack());
682
+ var stacked = stack.get(value);
683
+ if (stacked) {
684
+ return stacked;
685
+ }
686
+ stack.set(value, result);
687
+ if (isSet(value)) {
688
+ value.forEach(function(subValue) {
689
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
690
+ });
691
+ } else if (isMap(value)) {
692
+ value.forEach(function(subValue, key2) {
693
+ result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
694
+ });
695
+ }
696
+ var keysFunc = getAllKeys;
697
+ var props = isArr ? void 0 : keysFunc(value);
698
+ arrayEach(props || value, function(subValue, key2) {
699
+ if (props) {
700
+ key2 = subValue;
701
+ subValue = value[key2];
702
+ }
703
+ assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
704
+ });
705
+ return result;
706
+ }
707
+ var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4;
708
+ function cloneDeep(value) {
709
+ return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
710
+ }
711
+ const _hoisted_1 = {
712
+ key: 0,
713
+ class: "select-tree-normal-value"
714
+ };
715
+ const _hoisted_2 = { class: "max-h-[280px] overflow-y-auto" };
716
+ const _hoisted_3 = { class: "select-tree-normal-placeholder cursor-default" };
717
+ const _hoisted_4 = ["disabled", "placeholder"];
718
+ const _hoisted_5 = ["title"];
719
+ const MIN_POPOVER_WIDTH = 120;
720
+ const TREE_NODE_PADDING = 56;
721
+ const TREE_LEVEL_INDENT = 18;
722
+ const _sfc_main = /* @__PURE__ */ defineComponent({
723
+ __name: "SelectTree",
724
+ props: {
725
+ modelValue: {},
726
+ placeholder: { default: "请选择" },
727
+ data: {},
728
+ checkoutAll: { type: Boolean, default: true },
729
+ multiple: { type: Boolean, default: true },
730
+ disabled: { type: Boolean, default: false },
731
+ props: {},
732
+ height: {},
733
+ width: {},
734
+ calcWidth: {},
735
+ filter: {},
736
+ wrapclass: {},
737
+ inputClass: {},
738
+ selectAllNode: { type: Boolean, default: false }
739
+ },
740
+ emits: ["update:modelValue", "change", "visible-change"],
741
+ setup(__props, { expose: __expose, emit: __emit }) {
742
+ const emit = __emit;
743
+ const prop = __props;
744
+ const options = ref([]);
745
+ const inputRef = ref(null);
746
+ const labelKey = computed(() => {
747
+ var _a;
748
+ return ((_a = prop.props) == null ? void 0 : _a.label) || "label";
749
+ });
750
+ const popoverWidth = ref(MIN_POPOVER_WIDTH);
751
+ const referenceStyle = computed(() => {
752
+ const width = prop.calcWidth || prop.width;
753
+ const normalizedWidth = normalizeCssWidth(width);
754
+ if (!normalizedWidth) {
755
+ return void 0;
756
+ }
757
+ return {
758
+ width: normalizedWidth
759
+ };
760
+ });
761
+ const wrapperWidthStyle = computed(() => {
762
+ if (prop.calcWidth) {
763
+ return "100%";
764
+ }
765
+ return normalizeCssWidth(prop.width);
766
+ });
767
+ const normalizeCssWidth = (width) => {
768
+ if (width === void 0 || width === null || width === "") {
769
+ return void 0;
770
+ }
771
+ if (typeof width === "number") {
772
+ return `${width}px`;
773
+ }
774
+ return /^\d+(\.\d+)?$/.test(width) ? `${width}px` : width;
775
+ };
776
+ const getNumericWidth = (width) => {
777
+ if (typeof width === "number") {
778
+ return width;
779
+ }
780
+ if (typeof width !== "string") {
781
+ return 0;
782
+ }
783
+ const parsedWidth = Number.parseFloat(width);
784
+ return Number.isFinite(parsedWidth) ? parsedWidth : 0;
785
+ };
786
+ let measureCanvas = null;
787
+ let cachedFont = "";
788
+ let cachedCtx = null;
789
+ const ensureMeasureContext = () => {
790
+ if (cachedCtx) return cachedCtx;
791
+ if (typeof document === "undefined") return null;
792
+ measureCanvas || (measureCanvas = document.createElement("canvas"));
793
+ cachedCtx = measureCanvas.getContext("2d");
794
+ return cachedCtx;
795
+ };
796
+ const refreshMeasureFont = () => {
797
+ if (typeof window === "undefined" || !inputRef.value) {
798
+ cachedFont = "14px sans-serif";
799
+ return;
800
+ }
801
+ const style = window.getComputedStyle(inputRef.value);
802
+ cachedFont = style.font || `${style.fontWeight} ${style.fontSize} ${style.fontFamily}`;
803
+ };
804
+ const getOptionLabel = (item) => {
805
+ const label = item == null ? void 0 : item[labelKey.value];
806
+ return label === void 0 || label === null ? "" : String(label);
807
+ };
808
+ const getMaxOptionWidth = (list = []) => {
809
+ let longest = "";
810
+ let longestDepth = 0;
811
+ const walk = (nodes, depth) => {
812
+ for (let i = 0; i < nodes.length; i++) {
813
+ const item = nodes[i];
814
+ const text = getOptionLabel(item);
815
+ const score = text.length + depth * 2;
816
+ const bestScore = longest.length + longestDepth * 2;
817
+ if (score > bestScore) {
818
+ longest = text;
819
+ longestDepth = depth;
820
+ }
821
+ if (Array.isArray(item == null ? void 0 : item.children)) {
822
+ walk(item.children, depth + 1);
823
+ }
824
+ }
825
+ };
826
+ walk(list, 0);
827
+ if (!longest) return 0;
828
+ const ctx = ensureMeasureContext();
829
+ if (!ctx) return longest.length * 14;
830
+ ctx.font = cachedFont;
831
+ const textWidth = Math.ceil(ctx.measureText(longest).width);
832
+ return textWidth + TREE_NODE_PADDING + longestDepth * TREE_LEVEL_INDENT + (prop.multiple ? 24 : 0);
833
+ };
834
+ let updateTimer = null;
835
+ const updatePopoverWidth = () => {
836
+ if (updateTimer) return;
837
+ updateTimer = setTimeout(() => {
838
+ updateTimer = null;
839
+ refreshMeasureFont();
840
+ const baseWidth = Math.max(getNumericWidth(prop.width), getNumericWidth(prop.calcWidth));
841
+ popoverWidth.value = Math.max(MIN_POPOVER_WIDTH, baseWidth, getMaxOptionWidth(options.value));
842
+ }, 0);
843
+ };
844
+ const defaultFilter = (query, node) => {
845
+ var _a, _b;
846
+ const label = labelKey.value;
847
+ return ((_a = (node[label] || "").toLowerCase()) == null ? void 0 : _a.includes(query.toLowerCase())) || ((_b = node.searchKey || "") == null ? void 0 : _b.toLocaleLowerCase().includes(query.toLowerCase()));
848
+ };
849
+ const isFocused = ref(false);
850
+ const tree = ref(null);
851
+ const checkedKeys = ref([]);
852
+ const _checkedNodes = ref([]);
853
+ const checkedNodes = ref([]);
854
+ const filterText = ref("");
855
+ const allSelected = ref(false);
856
+ const curLable = ref("");
857
+ watch(isFocused, (value) => {
858
+ tree.value.setExpandedKeys([]);
859
+ emit("visible-change", isFocused.value);
860
+ if (!value) {
861
+ filterText.value = "";
862
+ inputRef.value.blur();
863
+ if (tree.value) {
864
+ tree.value.filter("");
865
+ }
866
+ } else {
867
+ inputRef.value.focus();
868
+ }
869
+ if (prop.multiple) {
870
+ return;
871
+ }
872
+ filterText.value = curLable.value;
873
+ tree.value.filter("");
874
+ });
875
+ const filterHandle = (query) => {
876
+ tree.value.filter(query.target.value);
877
+ };
878
+ const currentChangeHandle = (e) => {
879
+ if (prop.multiple) {
880
+ return;
881
+ }
882
+ if (e.children) {
883
+ return;
884
+ }
885
+ curLable.value = e[prop.props && prop.props.label || "label"];
886
+ filterText.value = e[prop.props && prop.props.label || "label"];
887
+ isFocused.value = false;
888
+ emit("update:modelValue", e[valueKey.value]);
889
+ emit("change", e[valueKey.value], tree.value.getCheckedNodes());
890
+ };
891
+ const valueKey = computed(() => {
892
+ if (prop.props && prop.props.value) {
893
+ return prop.props.value;
894
+ }
895
+ return "id";
896
+ });
897
+ const closeHandle = (node) => {
898
+ tree.value.setChecked(node[valueKey.value], false);
899
+ setCurNodeData({
900
+ checkedKeys: tree.value.getCheckedKeys(),
901
+ checkedNodes: tree.value.getCheckedNodes()
902
+ });
903
+ emit(
904
+ "update:modelValue",
905
+ checkedNodes.value.map((item) => item[valueKey.value])
906
+ );
907
+ emit(
908
+ "change",
909
+ checkedNodes.value.map((item) => item[valueKey.value]),
910
+ tree.value.getCheckedNodes()
911
+ );
912
+ };
913
+ const setCurNodeData = (info) => {
914
+ checkedKeys.value = info.checkedKeys;
915
+ _checkedNodes.value = info.checkedNodes;
916
+ checkedNodes.value = info.checkedNodes.filter((item) => !item.children);
917
+ };
918
+ const checkHandle = (e, ee) => {
919
+ if (prop.multiple) {
920
+ inputRef.value.focus();
921
+ }
922
+ if (!prop.selectAllNode && e && e.children && filterText.value) {
923
+ const cc = e.children.filter((item) => (prop.filter || defaultFilter)(filterText.value, item)).map((ci) => ci[valueKey.value]);
924
+ if (!cc.length) {
925
+ initMultipleData();
926
+ return;
927
+ }
928
+ const checkedSet = new Set(checkedKeys.value);
929
+ const isCheck = !checkedSet.has(cc[0]);
930
+ const ccSet = new Set(cc);
931
+ const val = isCheck ? [...checkedNodes.value.map((item) => item[valueKey.value]), ...cc] : checkedNodes.value.map((item) => item[valueKey.value]).filter((cn) => !ccSet.has(cn));
932
+ emit("update:modelValue", val);
933
+ emit("change", val, tree.value.getCheckedNodes());
934
+ return;
935
+ }
936
+ setCurNodeData(ee);
937
+ emit(
938
+ "update:modelValue",
939
+ checkedNodes.value.map((item) => item[valueKey.value])
940
+ );
941
+ emit(
942
+ "change",
943
+ checkedNodes.value.map((item) => item[valueKey.value]),
944
+ tree.value.getCheckedNodes()
945
+ );
946
+ };
947
+ watch(allSelected, () => {
948
+ var _a;
949
+ if (allSelected.value) {
950
+ let ids = [];
951
+ let valids = [];
952
+ options.value.forEach((item) => {
953
+ if (prop.selectAllNode && (prop.filter || defaultFilter)(filterText.value, item)) {
954
+ const { children } = item;
955
+ ids.push(item[valueKey.value]);
956
+ ids = ids.concat(children.map((child) => child[valueKey.value]));
957
+ valids = valids.concat(children.map((child) => child[valueKey.value]));
958
+ } else {
959
+ const { children } = item;
960
+ const cids = [];
961
+ let isAllCheck = true;
962
+ children.forEach((child) => {
963
+ const isCheck = (prop.filter || defaultFilter)(filterText.value, child);
964
+ if (isCheck) {
965
+ cids.push(child[valueKey.value]);
966
+ } else {
967
+ isAllCheck = false;
968
+ }
969
+ });
970
+ isAllCheck && ids.push(item[valueKey.value]);
971
+ ids = ids.concat(cids);
972
+ valids = valids.concat(cids);
973
+ }
974
+ });
975
+ emit("update:modelValue", valids);
976
+ emit("change", valids, tree.value.getCheckedNodes());
977
+ } else {
978
+ (_a = tree.value) == null ? void 0 : _a.setCheckedKeys([]);
979
+ checkedKeys.value = [];
980
+ _checkedNodes.value = [];
981
+ checkedNodes.value = [];
982
+ emit(
983
+ "update:modelValue",
984
+ checkedNodes.value.map((item) => item[valueKey.value])
985
+ );
986
+ emit(
987
+ "change",
988
+ checkedNodes.value.map((item) => item[valueKey.value]),
989
+ tree.value.getCheckedNodes()
990
+ );
991
+ }
992
+ });
993
+ const clearCheaked = () => {
994
+ var _a;
995
+ if (!prop.multiple) {
996
+ curLable.value = "";
997
+ filterText.value = "";
998
+ emit("update:modelValue", "");
999
+ emit("change", "", tree.value.getCheckedNodes());
1000
+ return;
1001
+ }
1002
+ (_a = tree.value) == null ? void 0 : _a.setCheckedKeys([]);
1003
+ checkedKeys.value = [];
1004
+ _checkedNodes.value = [];
1005
+ checkedNodes.value = [];
1006
+ allSelected.value = false;
1007
+ emit(
1008
+ "update:modelValue",
1009
+ checkedNodes.value.map((item) => item[valueKey.value])
1010
+ );
1011
+ emit(
1012
+ "change",
1013
+ checkedNodes.value.map((item) => item[valueKey.value]),
1014
+ tree.value.getCheckedNodes()
1015
+ );
1016
+ };
1017
+ const initMultipleData = () => __async(null, null, function* () {
1018
+ var _a;
1019
+ if (prop.multiple) {
1020
+ const ids = [...prop.modelValue || []];
1021
+ (_a = tree.value) == null ? void 0 : _a.setCheckedKeys([...ids]);
1022
+ yield nextTick();
1023
+ setCurNodeData({
1024
+ checkedKeys: tree.value.getCheckedKeys(),
1025
+ checkedNodes: tree.value.getCheckedNodes()
1026
+ });
1027
+ }
1028
+ });
1029
+ const cloneTreeData = (data) => {
1030
+ const rawData = toRaw(data);
1031
+ if (!Array.isArray(rawData)) {
1032
+ return [];
1033
+ }
1034
+ try {
1035
+ return structuredClone(rawData);
1036
+ } catch (e) {
1037
+ return cloneDeep(rawData);
1038
+ }
1039
+ };
1040
+ watch(
1041
+ () => prop.data,
1042
+ () => __async(null, null, function* () {
1043
+ options.value = cloneTreeData(prop.data);
1044
+ yield nextTick();
1045
+ setFilterText();
1046
+ initMultipleData();
1047
+ updatePopoverWidth();
1048
+ })
1049
+ );
1050
+ watch(
1051
+ () => [prop.width, prop.calcWidth, prop.multiple, labelKey.value],
1052
+ () => {
1053
+ updatePopoverWidth();
1054
+ }
1055
+ );
1056
+ const setFilterText = () => {
1057
+ if (!options.value.length || prop.multiple) {
1058
+ return;
1059
+ }
1060
+ if (prop.modelValue === null || !String(prop.modelValue)) {
1061
+ return filterText.value = "";
1062
+ }
1063
+ getVal(options.value, prop.modelValue);
1064
+ };
1065
+ const getVal = (data, val) => {
1066
+ data.forEach((item) => {
1067
+ if (item.children) {
1068
+ return getVal(item.children, val);
1069
+ }
1070
+ item.id === val && (filterText.value = item[prop.props && prop.props.label || "label"]);
1071
+ });
1072
+ };
1073
+ const togglePopperVisible = (visibleStatus) => {
1074
+ isFocused.value = visibleStatus;
1075
+ };
1076
+ __expose({
1077
+ clearCheaked,
1078
+ togglePopperVisible
1079
+ });
1080
+ const getStringify = (e) => {
1081
+ try {
1082
+ return JSON.stringify(e);
1083
+ } catch (e2) {
1084
+ return e;
1085
+ }
1086
+ };
1087
+ watch(
1088
+ () => prop.modelValue,
1089
+ (e, e1) => __async(null, null, function* () {
1090
+ const _e = getStringify(e);
1091
+ const _e1 = getStringify(e1);
1092
+ if (_e === _e1) {
1093
+ return;
1094
+ }
1095
+ yield nextTick();
1096
+ setFilterText();
1097
+ initMultipleData();
1098
+ })
1099
+ );
1100
+ onMounted(() => __async(null, null, function* () {
1101
+ yield nextTick();
1102
+ options.value = cloneTreeData(prop.data);
1103
+ setFilterText();
1104
+ updatePopoverWidth();
1105
+ setTimeout(() => {
1106
+ initMultipleData();
1107
+ });
1108
+ }));
1109
+ return (_ctx, _cache) => {
1110
+ const _component_el_tag = ElTag;
1111
+ const _component_DynamicScrollerItem = resolveComponent("DynamicScrollerItem");
1112
+ const _component_DynamicScroller = resolveComponent("DynamicScroller");
1113
+ const _component_LazyPopover = _sfc_main$1;
1114
+ const _component_ArrowDown = resolveComponent("ArrowDown");
1115
+ const _component_el_icon = ElIcon;
1116
+ const _component_CircleClose = resolveComponent("CircleClose");
1117
+ const _component_el_tree_v2 = ElTreeV2;
1118
+ const _component_el_popover = ElPopover;
1119
+ return openBlock(), createBlock(_component_el_popover, {
1120
+ visible: isFocused.value,
1121
+ "onUpdate:visible": _cache[4] || (_cache[4] = ($event) => isFocused.value = $event),
1122
+ disabled: __props.disabled,
1123
+ placement: "bottom",
1124
+ trigger: "click",
1125
+ width: popoverWidth.value
1126
+ }, {
1127
+ reference: withCtx(() => [
1128
+ createElementVNode("div", {
1129
+ class: normalizeClass(["select-tree", __props.wrapclass]),
1130
+ style: normalizeStyle(referenceStyle.value)
1131
+ }, [
1132
+ createElementVNode("div", {
1133
+ class: normalizeClass(["select-tree-wrapper", { "is-focused": isFocused.value }]),
1134
+ style: normalizeStyle({ width: wrapperWidthStyle.value, backgroundColor: __props.disabled ? "#F5F9FF" : "" })
1135
+ }, [
1136
+ checkedNodes.value.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
1137
+ createVNode(_component_el_tag, {
1138
+ class: "m-val-tag mx-[5px]",
1139
+ type: "info",
1140
+ title: checkedNodes.value[0][__props.props && __props.props.label || "label"],
1141
+ closable: "",
1142
+ onClose: _cache[0] || (_cache[0] = ($event) => closeHandle(checkedNodes.value[0]))
1143
+ }, {
1144
+ default: withCtx(() => [
1145
+ createTextVNode(toDisplayString(checkedNodes.value[0][__props.props && __props.props.label || "label"]), 1)
1146
+ ]),
1147
+ _: 1
1148
+ }, 8, ["title"]),
1149
+ checkedNodes.value.length > 1 ? (openBlock(), createBlock(_component_LazyPopover, {
1150
+ key: 0,
1151
+ width: `${popoverWidth.value}px`
1152
+ }, {
1153
+ reference: withCtx(() => [
1154
+ createVNode(_component_el_tag, { type: "info" }, {
1155
+ default: withCtx(() => [
1156
+ createTextVNode("+ " + toDisplayString(checkedNodes.value.length - 1), 1)
1157
+ ]),
1158
+ _: 1
1159
+ })
1160
+ ]),
1161
+ default: withCtx(() => [
1162
+ createElementVNode("div", _hoisted_2, [
1163
+ createVNode(_component_DynamicScroller, {
1164
+ ref: "DynamicScrollerRef",
1165
+ class: "dynamic-scroller-ref",
1166
+ style: { height: "280px" },
1167
+ keyField: valueKey.value,
1168
+ items: checkedNodes.value.filter((_, index) => index !== 0),
1169
+ "min-item-size": 20
1170
+ }, {
1171
+ default: withCtx(({ item, index, active }) => [
1172
+ createVNode(_component_DynamicScrollerItem, {
1173
+ item,
1174
+ active,
1175
+ "data-index": index
1176
+ }, {
1177
+ default: withCtx(() => [
1178
+ createVNode(_component_el_tag, {
1179
+ class: "mr-[5px] mt-[5px]",
1180
+ closable: "",
1181
+ onClose: ($event) => closeHandle(item)
1182
+ }, {
1183
+ default: withCtx(() => [
1184
+ createTextVNode(toDisplayString(item[__props.props && __props.props.label || "label"]), 1)
1185
+ ]),
1186
+ _: 2
1187
+ }, 1032, ["onClose"])
1188
+ ]),
1189
+ _: 2
1190
+ }, 1032, ["item", "active", "data-index"])
1191
+ ]),
1192
+ _: 1
1193
+ }, 8, ["keyField", "items"])
1194
+ ])
1195
+ ]),
1196
+ _: 1
1197
+ }, 8, ["width"])) : createCommentVNode("", true)
1198
+ ])) : createCommentVNode("", true),
1199
+ createElementVNode("div", _hoisted_3, [
1200
+ withDirectives(createElementVNode("input", {
1201
+ ref_key: "inputRef",
1202
+ ref: inputRef,
1203
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => filterText.value = $event),
1204
+ class: normalizeClass(__props.inputClass),
1205
+ disabled: __props.disabled,
1206
+ style: { "height": "24px" },
1207
+ type: "text",
1208
+ placeholder: __props.placeholder,
1209
+ onKeydown: _cache[2] || (_cache[2] = withModifiers(() => {
1210
+ }, ["stop"])),
1211
+ onInput: filterHandle
1212
+ }, null, 42, _hoisted_4), [
1213
+ [vModelText, filterText.value]
1214
+ ])
1215
+ ]),
1216
+ createElementVNode("div", {
1217
+ class: normalizeClass(["select-tree-arrow", { "is-focused": isFocused.value }])
1218
+ }, [
1219
+ createVNode(_component_el_icon, null, {
1220
+ default: withCtx(() => [
1221
+ createVNode(_component_ArrowDown)
1222
+ ]),
1223
+ _: 1
1224
+ })
1225
+ ], 2),
1226
+ !__props.disabled && (__props.multiple && checkedNodes.value.length || !__props.multiple && __props.modelValue) ? (openBlock(), createElementBlock("div", {
1227
+ key: 1,
1228
+ class: "select-tree-clear",
1229
+ onClick: withModifiers(clearCheaked, ["stop"])
1230
+ }, [
1231
+ createVNode(_component_el_icon, null, {
1232
+ default: withCtx(() => [
1233
+ createVNode(_component_CircleClose)
1234
+ ]),
1235
+ _: 1
1236
+ })
1237
+ ])) : createCommentVNode("", true)
1238
+ ], 6)
1239
+ ], 6)
1240
+ ]),
1241
+ default: withCtx(() => [
1242
+ __props.multiple && __props.checkoutAll ? (openBlock(), createElementBlock("div", {
1243
+ key: 0,
1244
+ class: "px-[10px] pb-[10px] border-b-[1px] mb-[5px] border-b-[#f5f5f5] cursor-pointer",
1245
+ onClick: _cache[3] || (_cache[3] = ($event) => allSelected.value = !allSelected.value)
1246
+ }, toDisplayString(allSelected.value ? "全部取消" : "全部选择当前"), 1)) : createCommentVNode("", true),
1247
+ createVNode(_component_el_tree_v2, {
1248
+ ref_key: "tree",
1249
+ ref: tree,
1250
+ style: { "width": "100%" },
1251
+ class: "custom-select-tree-box",
1252
+ data: options.value,
1253
+ props: __props.props,
1254
+ "show-checkbox": __props.multiple,
1255
+ height: __props.height,
1256
+ "filter-method": __props.filter || defaultFilter,
1257
+ onNodeClick: currentChangeHandle,
1258
+ onCheck: checkHandle
1259
+ }, {
1260
+ default: withCtx(({ node }) => [
1261
+ createElementVNode("span", {
1262
+ title: node.label
1263
+ }, toDisplayString(node.label), 9, _hoisted_5)
1264
+ ]),
1265
+ _: 1
1266
+ }, 8, ["data", "props", "show-checkbox", "height", "filter-method"])
1267
+ ]),
1268
+ _: 1
1269
+ }, 8, ["visible", "disabled", "width"]);
1270
+ };
1271
+ }
1272
+ });
1273
+ const SelectTree = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-68f09ab5"]]);
1274
+ export {
1275
+ SelectTree as S
1276
+ };