@antv/s2-vue 1.0.0

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 (79) hide show
  1. package/README.md +389 -0
  2. package/dist/index.min.js +2 -0
  3. package/dist/index.min.js.map +1 -0
  4. package/dist/style.min.css +1 -0
  5. package/esm/common/constant/index.d.ts +3 -0
  6. package/esm/common/constant/index.d.ts.map +1 -0
  7. package/esm/common/constant/options.d.ts +3 -0
  8. package/esm/common/constant/options.d.ts.map +1 -0
  9. package/esm/common/constant/sort.d.ts +15 -0
  10. package/esm/common/constant/sort.d.ts.map +1 -0
  11. package/esm/components/index.d.ts +5 -0
  12. package/esm/components/index.d.ts.map +1 -0
  13. package/esm/components/pagination/index.vue.d.ts +43 -0
  14. package/esm/components/pagination/index.vue.d.ts.map +1 -0
  15. package/esm/components/sheets/base-sheet.vue.d.ts +287 -0
  16. package/esm/components/sheets/base-sheet.vue.d.ts.map +1 -0
  17. package/esm/components/sheets/index.vue.d.ts +432 -0
  18. package/esm/components/sheets/index.vue.d.ts.map +1 -0
  19. package/esm/components/sheets/pivot-sheet.vue.d.ts +217 -0
  20. package/esm/components/sheets/pivot-sheet.vue.d.ts.map +1 -0
  21. package/esm/components/sheets/table-sheet.vue.d.ts +217 -0
  22. package/esm/components/sheets/table-sheet.vue.d.ts.map +1 -0
  23. package/esm/components/tooltip/components/detail.vue.d.ts +7 -0
  24. package/esm/components/tooltip/components/detail.vue.d.ts.map +1 -0
  25. package/esm/components/tooltip/components/head-info.vue.d.ts +7 -0
  26. package/esm/components/tooltip/components/head-info.vue.d.ts.map +1 -0
  27. package/esm/components/tooltip/components/infos.vue.d.ts +7 -0
  28. package/esm/components/tooltip/components/infos.vue.d.ts.map +1 -0
  29. package/esm/components/tooltip/components/operator/index.d.ts +4 -0
  30. package/esm/components/tooltip/components/operator/index.d.ts.map +1 -0
  31. package/esm/components/tooltip/components/operator/index.vue.d.ts +11 -0
  32. package/esm/components/tooltip/components/operator/index.vue.d.ts.map +1 -0
  33. package/esm/components/tooltip/components/operator/menu.vue.d.ts +12 -0
  34. package/esm/components/tooltip/components/operator/menu.vue.d.ts.map +1 -0
  35. package/esm/components/tooltip/components/operator/title.vue.d.ts +11 -0
  36. package/esm/components/tooltip/components/operator/title.vue.d.ts.map +1 -0
  37. package/esm/components/tooltip/components/simple-tips.vue.d.ts +7 -0
  38. package/esm/components/tooltip/components/simple-tips.vue.d.ts.map +1 -0
  39. package/esm/components/tooltip/components/summary.vue.d.ts +9 -0
  40. package/esm/components/tooltip/components/summary.vue.d.ts.map +1 -0
  41. package/esm/components/tooltip/custom-tooltip.d.ts +7 -0
  42. package/esm/components/tooltip/custom-tooltip.d.ts.map +1 -0
  43. package/esm/components/tooltip/index.vue.d.ts +8 -0
  44. package/esm/components/tooltip/index.vue.d.ts.map +1 -0
  45. package/esm/components/tooltip/interface.d.ts +9 -0
  46. package/esm/components/tooltip/interface.d.ts.map +1 -0
  47. package/esm/hooks/useEvents.d.ts +5 -0
  48. package/esm/hooks/useEvents.d.ts.map +1 -0
  49. package/esm/hooks/useExpose.d.ts +6 -0
  50. package/esm/hooks/useExpose.d.ts.map +1 -0
  51. package/esm/hooks/useLoading.d.ts +7 -0
  52. package/esm/hooks/useLoading.d.ts.map +1 -0
  53. package/esm/hooks/usePagination.d.ts +14 -0
  54. package/esm/hooks/usePagination.d.ts.map +1 -0
  55. package/esm/hooks/useResize.d.ts +8 -0
  56. package/esm/hooks/useResize.d.ts.map +1 -0
  57. package/esm/hooks/useSheetUpdate.d.ts +5 -0
  58. package/esm/hooks/useSheetUpdate.d.ts.map +1 -0
  59. package/esm/hooks/useSpreadSheet.d.ts +19 -0
  60. package/esm/hooks/useSpreadSheet.d.ts.map +1 -0
  61. package/esm/index.d.ts +4 -0
  62. package/esm/index.d.ts.map +1 -0
  63. package/esm/index.js +2379 -0
  64. package/esm/index.js.map +1 -0
  65. package/esm/interface.d.ts +36 -0
  66. package/esm/interface.d.ts.map +1 -0
  67. package/esm/style.css +208 -0
  68. package/esm/utils/extendLocale.d.ts +2 -0
  69. package/esm/utils/extendLocale.d.ts.map +1 -0
  70. package/esm/utils/initPropAndEmits.d.ts +137 -0
  71. package/esm/utils/initPropAndEmits.d.ts.map +1 -0
  72. package/esm/utils/options.d.ts +3 -0
  73. package/esm/utils/options.d.ts.map +1 -0
  74. package/esm/utils/traverse.d.ts +2 -0
  75. package/esm/utils/traverse.d.ts.map +1 -0
  76. package/lib/index.js +2385 -0
  77. package/lib/index.js.map +1 -0
  78. package/lib/style.css +208 -0
  79. package/package.json +88 -0
package/esm/index.js ADDED
@@ -0,0 +1,2379 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { customMerge, DEFAULT_OPTIONS, extendLocale, S2Event, i18n, S2_PREFIX_CLS, TOOLTIP_PREFIX_CLS, getIcon, getTooltipDefaultOptions, BaseTooltip, getBaseCellData, TableSheet as TableSheet$1, PivotSheet as PivotSheet$1 } from "@antv/s2";
21
+ import { shallowRef, ref, computed, watch, defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createElementVNode, toDisplayString, Fragment, renderList, createCommentVNode, createTextVNode, createBlock, withCtx, render, onMounted, reactive, isProxy, onBeforeUnmount, toRaw, resolveDynamicComponent } from "vue";
22
+ import { Pagination, Menu, Dropdown, Spin } from "ant-design-vue";
23
+ const SHEET_COMPONENT_DEFAULT_OPTIONS = {
24
+ tooltip: {
25
+ showTooltip: true,
26
+ autoAdjustBoundary: "body",
27
+ operation: {
28
+ hiddenColumns: true,
29
+ trend: false,
30
+ sort: true
31
+ }
32
+ },
33
+ showDefaultHeaderActionIcon: true
34
+ };
35
+ const getBaseSheetComponentOptions = (...options) => customMerge(DEFAULT_OPTIONS, SHEET_COMPONENT_DEFAULT_OPTIONS, ...options);
36
+ var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
37
+ var freeGlobal$1 = freeGlobal;
38
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
39
+ var root = freeGlobal$1 || freeSelf || Function("return this")();
40
+ var root$1 = root;
41
+ var Symbol$1 = root$1.Symbol;
42
+ var Symbol$2 = Symbol$1;
43
+ var objectProto$c = Object.prototype;
44
+ var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
45
+ var nativeObjectToString$1 = objectProto$c.toString;
46
+ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
47
+ function getRawTag(value) {
48
+ var isOwn = hasOwnProperty$9.call(value, symToStringTag$1), tag = value[symToStringTag$1];
49
+ try {
50
+ value[symToStringTag$1] = void 0;
51
+ var unmasked = true;
52
+ } catch (e) {
53
+ }
54
+ var result = nativeObjectToString$1.call(value);
55
+ if (unmasked) {
56
+ if (isOwn) {
57
+ value[symToStringTag$1] = tag;
58
+ } else {
59
+ delete value[symToStringTag$1];
60
+ }
61
+ }
62
+ return result;
63
+ }
64
+ var objectProto$b = Object.prototype;
65
+ var nativeObjectToString = objectProto$b.toString;
66
+ function objectToString(value) {
67
+ return nativeObjectToString.call(value);
68
+ }
69
+ var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
70
+ var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
71
+ function baseGetTag(value) {
72
+ if (value == null) {
73
+ return value === void 0 ? undefinedTag : nullTag;
74
+ }
75
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
76
+ }
77
+ function isObjectLike(value) {
78
+ return value != null && typeof value == "object";
79
+ }
80
+ var symbolTag$1 = "[object Symbol]";
81
+ function isSymbol(value) {
82
+ return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$1;
83
+ }
84
+ function arrayMap(array, iteratee) {
85
+ var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
86
+ while (++index2 < length) {
87
+ result[index2] = iteratee(array[index2], index2, array);
88
+ }
89
+ return result;
90
+ }
91
+ var isArray = Array.isArray;
92
+ var isArray$1 = isArray;
93
+ var INFINITY$1 = 1 / 0;
94
+ var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$1 ? symbolProto$1.toString : void 0;
95
+ function baseToString(value) {
96
+ if (typeof value == "string") {
97
+ return value;
98
+ }
99
+ if (isArray$1(value)) {
100
+ return arrayMap(value, baseToString) + "";
101
+ }
102
+ if (isSymbol(value)) {
103
+ return symbolToString ? symbolToString.call(value) : "";
104
+ }
105
+ var result = value + "";
106
+ return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
107
+ }
108
+ var reWhitespace = /\s/;
109
+ function trimmedEndIndex(string) {
110
+ var index2 = string.length;
111
+ while (index2-- && reWhitespace.test(string.charAt(index2))) {
112
+ }
113
+ return index2;
114
+ }
115
+ var reTrimStart = /^\s+/;
116
+ function baseTrim(string) {
117
+ return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
118
+ }
119
+ function isObject(value) {
120
+ var type = typeof value;
121
+ return value != null && (type == "object" || type == "function");
122
+ }
123
+ var NAN = 0 / 0;
124
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
125
+ var reIsBinary = /^0b[01]+$/i;
126
+ var reIsOctal = /^0o[0-7]+$/i;
127
+ var freeParseInt = parseInt;
128
+ function toNumber(value) {
129
+ if (typeof value == "number") {
130
+ return value;
131
+ }
132
+ if (isSymbol(value)) {
133
+ return NAN;
134
+ }
135
+ if (isObject(value)) {
136
+ var other = typeof value.valueOf == "function" ? value.valueOf() : value;
137
+ value = isObject(other) ? other + "" : other;
138
+ }
139
+ if (typeof value != "string") {
140
+ return value === 0 ? value : +value;
141
+ }
142
+ value = baseTrim(value);
143
+ var isBinary = reIsBinary.test(value);
144
+ return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
145
+ }
146
+ function identity(value) {
147
+ return value;
148
+ }
149
+ var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
150
+ function isFunction(value) {
151
+ if (!isObject(value)) {
152
+ return false;
153
+ }
154
+ var tag = baseGetTag(value);
155
+ return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
156
+ }
157
+ var coreJsData = root$1["__core-js_shared__"];
158
+ var coreJsData$1 = coreJsData;
159
+ var maskSrcKey = function() {
160
+ var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
161
+ return uid ? "Symbol(src)_1." + uid : "";
162
+ }();
163
+ function isMasked(func) {
164
+ return !!maskSrcKey && maskSrcKey in func;
165
+ }
166
+ var funcProto$1 = Function.prototype;
167
+ var funcToString$1 = funcProto$1.toString;
168
+ function toSource(func) {
169
+ if (func != null) {
170
+ try {
171
+ return funcToString$1.call(func);
172
+ } catch (e) {
173
+ }
174
+ try {
175
+ return func + "";
176
+ } catch (e) {
177
+ }
178
+ }
179
+ return "";
180
+ }
181
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
182
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
183
+ var funcProto = Function.prototype, objectProto$a = Object.prototype;
184
+ var funcToString = funcProto.toString;
185
+ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
186
+ var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$8).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
187
+ function baseIsNative(value) {
188
+ if (!isObject(value) || isMasked(value)) {
189
+ return false;
190
+ }
191
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
192
+ return pattern.test(toSource(value));
193
+ }
194
+ function getValue(object, key) {
195
+ return object == null ? void 0 : object[key];
196
+ }
197
+ function getNative(object, key) {
198
+ var value = getValue(object, key);
199
+ return baseIsNative(value) ? value : void 0;
200
+ }
201
+ var WeakMap = getNative(root$1, "WeakMap");
202
+ var WeakMap$1 = WeakMap;
203
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
204
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
205
+ function isIndex(value, length) {
206
+ var type = typeof value;
207
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
208
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
209
+ }
210
+ function eq(value, other) {
211
+ return value === other || value !== value && other !== other;
212
+ }
213
+ var MAX_SAFE_INTEGER = 9007199254740991;
214
+ function isLength(value) {
215
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
216
+ }
217
+ function isArrayLike(value) {
218
+ return value != null && isLength(value.length) && !isFunction(value);
219
+ }
220
+ var objectProto$9 = Object.prototype;
221
+ function isPrototype(value) {
222
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$9;
223
+ return value === proto;
224
+ }
225
+ function baseTimes(n, iteratee) {
226
+ var index2 = -1, result = Array(n);
227
+ while (++index2 < n) {
228
+ result[index2] = iteratee(index2);
229
+ }
230
+ return result;
231
+ }
232
+ var argsTag$2 = "[object Arguments]";
233
+ function baseIsArguments(value) {
234
+ return isObjectLike(value) && baseGetTag(value) == argsTag$2;
235
+ }
236
+ var objectProto$8 = Object.prototype;
237
+ var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
238
+ var propertyIsEnumerable$1 = objectProto$8.propertyIsEnumerable;
239
+ var isArguments = baseIsArguments(function() {
240
+ return arguments;
241
+ }()) ? baseIsArguments : function(value) {
242
+ return isObjectLike(value) && hasOwnProperty$7.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
243
+ };
244
+ var isArguments$1 = isArguments;
245
+ function stubFalse() {
246
+ return false;
247
+ }
248
+ var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
249
+ var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
250
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
251
+ var Buffer2 = moduleExports$1 ? root$1.Buffer : void 0;
252
+ var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
253
+ var isBuffer = nativeIsBuffer || stubFalse;
254
+ var isBuffer$1 = isBuffer;
255
+ var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$2 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", mapTag$4 = "[object Map]", numberTag$1 = "[object Number]", objectTag$2 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$4 = "[object Set]", stringTag$2 = "[object String]", weakMapTag$1 = "[object WeakMap]";
256
+ var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[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]";
257
+ var typedArrayTags = {};
258
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
259
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$2] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$4] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] = typedArrayTags[weakMapTag$1] = false;
260
+ function baseIsTypedArray(value) {
261
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
262
+ }
263
+ function baseUnary(func) {
264
+ return function(value) {
265
+ return func(value);
266
+ };
267
+ }
268
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
269
+ var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
270
+ var moduleExports = freeModule && freeModule.exports === freeExports;
271
+ var freeProcess = moduleExports && freeGlobal$1.process;
272
+ var nodeUtil = function() {
273
+ try {
274
+ var types = freeModule && freeModule.require && freeModule.require("util").types;
275
+ if (types) {
276
+ return types;
277
+ }
278
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
279
+ } catch (e) {
280
+ }
281
+ }();
282
+ var nodeUtil$1 = nodeUtil;
283
+ var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
284
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
285
+ var isTypedArray$1 = isTypedArray;
286
+ var objectProto$7 = Object.prototype;
287
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
288
+ function arrayLikeKeys(value, inherited) {
289
+ var isArr = isArray$1(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
290
+ for (var key in value) {
291
+ if ((inherited || hasOwnProperty$6.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
292
+ result.push(key);
293
+ }
294
+ }
295
+ return result;
296
+ }
297
+ function overArg(func, transform) {
298
+ return function(arg) {
299
+ return func(transform(arg));
300
+ };
301
+ }
302
+ var nativeKeys = overArg(Object.keys, Object);
303
+ var nativeKeys$1 = nativeKeys;
304
+ var objectProto$6 = Object.prototype;
305
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
306
+ function baseKeys(object) {
307
+ if (!isPrototype(object)) {
308
+ return nativeKeys$1(object);
309
+ }
310
+ var result = [];
311
+ for (var key in Object(object)) {
312
+ if (hasOwnProperty$5.call(object, key) && key != "constructor") {
313
+ result.push(key);
314
+ }
315
+ }
316
+ return result;
317
+ }
318
+ function keys(object) {
319
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
320
+ }
321
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
322
+ function isKey(value, object) {
323
+ if (isArray$1(value)) {
324
+ return false;
325
+ }
326
+ var type = typeof value;
327
+ if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
328
+ return true;
329
+ }
330
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
331
+ }
332
+ var nativeCreate = getNative(Object, "create");
333
+ var nativeCreate$1 = nativeCreate;
334
+ function hashClear() {
335
+ this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
336
+ this.size = 0;
337
+ }
338
+ function hashDelete(key) {
339
+ var result = this.has(key) && delete this.__data__[key];
340
+ this.size -= result ? 1 : 0;
341
+ return result;
342
+ }
343
+ var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
344
+ var objectProto$5 = Object.prototype;
345
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
346
+ function hashGet(key) {
347
+ var data = this.__data__;
348
+ if (nativeCreate$1) {
349
+ var result = data[key];
350
+ return result === HASH_UNDEFINED$2 ? void 0 : result;
351
+ }
352
+ return hasOwnProperty$4.call(data, key) ? data[key] : void 0;
353
+ }
354
+ var objectProto$4 = Object.prototype;
355
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
356
+ function hashHas(key) {
357
+ var data = this.__data__;
358
+ return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$3.call(data, key);
359
+ }
360
+ var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
361
+ function hashSet(key, value) {
362
+ var data = this.__data__;
363
+ this.size += this.has(key) ? 0 : 1;
364
+ data[key] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED$1 : value;
365
+ return this;
366
+ }
367
+ function Hash(entries) {
368
+ var index2 = -1, length = entries == null ? 0 : entries.length;
369
+ this.clear();
370
+ while (++index2 < length) {
371
+ var entry = entries[index2];
372
+ this.set(entry[0], entry[1]);
373
+ }
374
+ }
375
+ Hash.prototype.clear = hashClear;
376
+ Hash.prototype["delete"] = hashDelete;
377
+ Hash.prototype.get = hashGet;
378
+ Hash.prototype.has = hashHas;
379
+ Hash.prototype.set = hashSet;
380
+ function listCacheClear() {
381
+ this.__data__ = [];
382
+ this.size = 0;
383
+ }
384
+ function assocIndexOf(array, key) {
385
+ var length = array.length;
386
+ while (length--) {
387
+ if (eq(array[length][0], key)) {
388
+ return length;
389
+ }
390
+ }
391
+ return -1;
392
+ }
393
+ var arrayProto = Array.prototype;
394
+ var splice = arrayProto.splice;
395
+ function listCacheDelete(key) {
396
+ var data = this.__data__, index2 = assocIndexOf(data, key);
397
+ if (index2 < 0) {
398
+ return false;
399
+ }
400
+ var lastIndex = data.length - 1;
401
+ if (index2 == lastIndex) {
402
+ data.pop();
403
+ } else {
404
+ splice.call(data, index2, 1);
405
+ }
406
+ --this.size;
407
+ return true;
408
+ }
409
+ function listCacheGet(key) {
410
+ var data = this.__data__, index2 = assocIndexOf(data, key);
411
+ return index2 < 0 ? void 0 : data[index2][1];
412
+ }
413
+ function listCacheHas(key) {
414
+ return assocIndexOf(this.__data__, key) > -1;
415
+ }
416
+ function listCacheSet(key, value) {
417
+ var data = this.__data__, index2 = assocIndexOf(data, key);
418
+ if (index2 < 0) {
419
+ ++this.size;
420
+ data.push([key, value]);
421
+ } else {
422
+ data[index2][1] = value;
423
+ }
424
+ return this;
425
+ }
426
+ function ListCache(entries) {
427
+ var index2 = -1, length = entries == null ? 0 : entries.length;
428
+ this.clear();
429
+ while (++index2 < length) {
430
+ var entry = entries[index2];
431
+ this.set(entry[0], entry[1]);
432
+ }
433
+ }
434
+ ListCache.prototype.clear = listCacheClear;
435
+ ListCache.prototype["delete"] = listCacheDelete;
436
+ ListCache.prototype.get = listCacheGet;
437
+ ListCache.prototype.has = listCacheHas;
438
+ ListCache.prototype.set = listCacheSet;
439
+ var Map = getNative(root$1, "Map");
440
+ var Map$1 = Map;
441
+ function mapCacheClear() {
442
+ this.size = 0;
443
+ this.__data__ = {
444
+ "hash": new Hash(),
445
+ "map": new (Map$1 || ListCache)(),
446
+ "string": new Hash()
447
+ };
448
+ }
449
+ function isKeyable(value) {
450
+ var type = typeof value;
451
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
452
+ }
453
+ function getMapData(map, key) {
454
+ var data = map.__data__;
455
+ return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
456
+ }
457
+ function mapCacheDelete(key) {
458
+ var result = getMapData(this, key)["delete"](key);
459
+ this.size -= result ? 1 : 0;
460
+ return result;
461
+ }
462
+ function mapCacheGet(key) {
463
+ return getMapData(this, key).get(key);
464
+ }
465
+ function mapCacheHas(key) {
466
+ return getMapData(this, key).has(key);
467
+ }
468
+ function mapCacheSet(key, value) {
469
+ var data = getMapData(this, key), size2 = data.size;
470
+ data.set(key, value);
471
+ this.size += data.size == size2 ? 0 : 1;
472
+ return this;
473
+ }
474
+ function MapCache(entries) {
475
+ var index2 = -1, length = entries == null ? 0 : entries.length;
476
+ this.clear();
477
+ while (++index2 < length) {
478
+ var entry = entries[index2];
479
+ this.set(entry[0], entry[1]);
480
+ }
481
+ }
482
+ MapCache.prototype.clear = mapCacheClear;
483
+ MapCache.prototype["delete"] = mapCacheDelete;
484
+ MapCache.prototype.get = mapCacheGet;
485
+ MapCache.prototype.has = mapCacheHas;
486
+ MapCache.prototype.set = mapCacheSet;
487
+ var FUNC_ERROR_TEXT$1 = "Expected a function";
488
+ function memoize(func, resolver) {
489
+ if (typeof func != "function" || resolver != null && typeof resolver != "function") {
490
+ throw new TypeError(FUNC_ERROR_TEXT$1);
491
+ }
492
+ var memoized = function() {
493
+ var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
494
+ if (cache.has(key)) {
495
+ return cache.get(key);
496
+ }
497
+ var result = func.apply(this, args);
498
+ memoized.cache = cache.set(key, result) || cache;
499
+ return result;
500
+ };
501
+ memoized.cache = new (memoize.Cache || MapCache)();
502
+ return memoized;
503
+ }
504
+ memoize.Cache = MapCache;
505
+ var MAX_MEMOIZE_SIZE = 500;
506
+ function memoizeCapped(func) {
507
+ var result = memoize(func, function(key) {
508
+ if (cache.size === MAX_MEMOIZE_SIZE) {
509
+ cache.clear();
510
+ }
511
+ return key;
512
+ });
513
+ var cache = result.cache;
514
+ return result;
515
+ }
516
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
517
+ var reEscapeChar = /\\(\\)?/g;
518
+ var stringToPath = memoizeCapped(function(string) {
519
+ var result = [];
520
+ if (string.charCodeAt(0) === 46) {
521
+ result.push("");
522
+ }
523
+ string.replace(rePropName, function(match, number, quote, subString) {
524
+ result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
525
+ });
526
+ return result;
527
+ });
528
+ var stringToPath$1 = stringToPath;
529
+ function toString(value) {
530
+ return value == null ? "" : baseToString(value);
531
+ }
532
+ function castPath(value, object) {
533
+ if (isArray$1(value)) {
534
+ return value;
535
+ }
536
+ return isKey(value, object) ? [value] : stringToPath$1(toString(value));
537
+ }
538
+ var INFINITY = 1 / 0;
539
+ function toKey(value) {
540
+ if (typeof value == "string" || isSymbol(value)) {
541
+ return value;
542
+ }
543
+ var result = value + "";
544
+ return result == "0" && 1 / value == -INFINITY ? "-0" : result;
545
+ }
546
+ function baseGet(object, path) {
547
+ path = castPath(path, object);
548
+ var index2 = 0, length = path.length;
549
+ while (object != null && index2 < length) {
550
+ object = object[toKey(path[index2++])];
551
+ }
552
+ return index2 && index2 == length ? object : void 0;
553
+ }
554
+ function get(object, path, defaultValue) {
555
+ var result = object == null ? void 0 : baseGet(object, path);
556
+ return result === void 0 ? defaultValue : result;
557
+ }
558
+ function arrayPush(array, values) {
559
+ var index2 = -1, length = values.length, offset = array.length;
560
+ while (++index2 < length) {
561
+ array[offset + index2] = values[index2];
562
+ }
563
+ return array;
564
+ }
565
+ var rsAstralRange$1 = "\\ud800-\\udfff", rsComboMarksRange$1 = "\\u0300-\\u036f", reComboHalfMarksRange$1 = "\\ufe20-\\ufe2f", rsComboSymbolsRange$1 = "\\u20d0-\\u20ff", rsComboRange$1 = rsComboMarksRange$1 + reComboHalfMarksRange$1 + rsComboSymbolsRange$1, rsVarRange$1 = "\\ufe0e\\ufe0f";
566
+ var rsZWJ$1 = "\\u200d";
567
+ var reHasUnicode = RegExp("[" + rsZWJ$1 + rsAstralRange$1 + rsComboRange$1 + rsVarRange$1 + "]");
568
+ function hasUnicode(string) {
569
+ return reHasUnicode.test(string);
570
+ }
571
+ function arrayReduce(array, iteratee, accumulator, initAccum) {
572
+ var index2 = -1, length = array == null ? 0 : array.length;
573
+ if (initAccum && length) {
574
+ accumulator = array[++index2];
575
+ }
576
+ while (++index2 < length) {
577
+ accumulator = iteratee(accumulator, array[index2], index2, array);
578
+ }
579
+ return accumulator;
580
+ }
581
+ function stackClear() {
582
+ this.__data__ = new ListCache();
583
+ this.size = 0;
584
+ }
585
+ function stackDelete(key) {
586
+ var data = this.__data__, result = data["delete"](key);
587
+ this.size = data.size;
588
+ return result;
589
+ }
590
+ function stackGet(key) {
591
+ return this.__data__.get(key);
592
+ }
593
+ function stackHas(key) {
594
+ return this.__data__.has(key);
595
+ }
596
+ var LARGE_ARRAY_SIZE = 200;
597
+ function stackSet(key, value) {
598
+ var data = this.__data__;
599
+ if (data instanceof ListCache) {
600
+ var pairs = data.__data__;
601
+ if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE - 1) {
602
+ pairs.push([key, value]);
603
+ this.size = ++data.size;
604
+ return this;
605
+ }
606
+ data = this.__data__ = new MapCache(pairs);
607
+ }
608
+ data.set(key, value);
609
+ this.size = data.size;
610
+ return this;
611
+ }
612
+ function Stack(entries) {
613
+ var data = this.__data__ = new ListCache(entries);
614
+ this.size = data.size;
615
+ }
616
+ Stack.prototype.clear = stackClear;
617
+ Stack.prototype["delete"] = stackDelete;
618
+ Stack.prototype.get = stackGet;
619
+ Stack.prototype.has = stackHas;
620
+ Stack.prototype.set = stackSet;
621
+ function arrayFilter(array, predicate) {
622
+ var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
623
+ while (++index2 < length) {
624
+ var value = array[index2];
625
+ if (predicate(value, index2, array)) {
626
+ result[resIndex++] = value;
627
+ }
628
+ }
629
+ return result;
630
+ }
631
+ function stubArray() {
632
+ return [];
633
+ }
634
+ var objectProto$3 = Object.prototype;
635
+ var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
636
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
637
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
638
+ if (object == null) {
639
+ return [];
640
+ }
641
+ object = Object(object);
642
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
643
+ return propertyIsEnumerable.call(object, symbol);
644
+ });
645
+ };
646
+ var getSymbols$1 = getSymbols;
647
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
648
+ var result = keysFunc(object);
649
+ return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
650
+ }
651
+ function getAllKeys(object) {
652
+ return baseGetAllKeys(object, keys, getSymbols$1);
653
+ }
654
+ var DataView = getNative(root$1, "DataView");
655
+ var DataView$1 = DataView;
656
+ var Promise$1 = getNative(root$1, "Promise");
657
+ var Promise$2 = Promise$1;
658
+ var Set = getNative(root$1, "Set");
659
+ var Set$1 = Set;
660
+ var mapTag$3 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$3 = "[object Set]", weakMapTag = "[object WeakMap]";
661
+ var dataViewTag$1 = "[object DataView]";
662
+ var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$1);
663
+ var getTag = baseGetTag;
664
+ if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$1 || Map$1 && getTag(new Map$1()) != mapTag$3 || Promise$2 && getTag(Promise$2.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$3 || WeakMap$1 && getTag(new WeakMap$1()) != weakMapTag) {
665
+ getTag = function(value) {
666
+ var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
667
+ if (ctorString) {
668
+ switch (ctorString) {
669
+ case dataViewCtorString:
670
+ return dataViewTag$1;
671
+ case mapCtorString:
672
+ return mapTag$3;
673
+ case promiseCtorString:
674
+ return promiseTag;
675
+ case setCtorString:
676
+ return setTag$3;
677
+ case weakMapCtorString:
678
+ return weakMapTag;
679
+ }
680
+ }
681
+ return result;
682
+ };
683
+ }
684
+ var getTag$1 = getTag;
685
+ var Uint8Array2 = root$1.Uint8Array;
686
+ var Uint8Array$1 = Uint8Array2;
687
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
688
+ function setCacheAdd(value) {
689
+ this.__data__.set(value, HASH_UNDEFINED);
690
+ return this;
691
+ }
692
+ function setCacheHas(value) {
693
+ return this.__data__.has(value);
694
+ }
695
+ function SetCache(values) {
696
+ var index2 = -1, length = values == null ? 0 : values.length;
697
+ this.__data__ = new MapCache();
698
+ while (++index2 < length) {
699
+ this.add(values[index2]);
700
+ }
701
+ }
702
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
703
+ SetCache.prototype.has = setCacheHas;
704
+ function arraySome(array, predicate) {
705
+ var index2 = -1, length = array == null ? 0 : array.length;
706
+ while (++index2 < length) {
707
+ if (predicate(array[index2], index2, array)) {
708
+ return true;
709
+ }
710
+ }
711
+ return false;
712
+ }
713
+ function cacheHas(cache, key) {
714
+ return cache.has(key);
715
+ }
716
+ var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2;
717
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
718
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length;
719
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
720
+ return false;
721
+ }
722
+ var arrStacked = stack.get(array);
723
+ var othStacked = stack.get(other);
724
+ if (arrStacked && othStacked) {
725
+ return arrStacked == other && othStacked == array;
726
+ }
727
+ var index2 = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
728
+ stack.set(array, other);
729
+ stack.set(other, array);
730
+ while (++index2 < arrLength) {
731
+ var arrValue = array[index2], othValue = other[index2];
732
+ if (customizer) {
733
+ var compared = isPartial ? customizer(othValue, arrValue, index2, other, array, stack) : customizer(arrValue, othValue, index2, array, other, stack);
734
+ }
735
+ if (compared !== void 0) {
736
+ if (compared) {
737
+ continue;
738
+ }
739
+ result = false;
740
+ break;
741
+ }
742
+ if (seen) {
743
+ if (!arraySome(other, function(othValue2, othIndex) {
744
+ if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
745
+ return seen.push(othIndex);
746
+ }
747
+ })) {
748
+ result = false;
749
+ break;
750
+ }
751
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
752
+ result = false;
753
+ break;
754
+ }
755
+ }
756
+ stack["delete"](array);
757
+ stack["delete"](other);
758
+ return result;
759
+ }
760
+ function mapToArray(map) {
761
+ var index2 = -1, result = Array(map.size);
762
+ map.forEach(function(value, key) {
763
+ result[++index2] = [key, value];
764
+ });
765
+ return result;
766
+ }
767
+ function setToArray(set) {
768
+ var index2 = -1, result = Array(set.size);
769
+ set.forEach(function(value) {
770
+ result[++index2] = value;
771
+ });
772
+ return result;
773
+ }
774
+ var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
775
+ var boolTag$1 = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag$2 = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag = "[object Symbol]";
776
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
777
+ var symbolProto = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
778
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
779
+ switch (tag) {
780
+ case dataViewTag:
781
+ if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
782
+ return false;
783
+ }
784
+ object = object.buffer;
785
+ other = other.buffer;
786
+ case arrayBufferTag:
787
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
788
+ return false;
789
+ }
790
+ return true;
791
+ case boolTag$1:
792
+ case dateTag:
793
+ case numberTag:
794
+ return eq(+object, +other);
795
+ case errorTag:
796
+ return object.name == other.name && object.message == other.message;
797
+ case regexpTag:
798
+ case stringTag$1:
799
+ return object == other + "";
800
+ case mapTag$2:
801
+ var convert = mapToArray;
802
+ case setTag$2:
803
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
804
+ convert || (convert = setToArray);
805
+ if (object.size != other.size && !isPartial) {
806
+ return false;
807
+ }
808
+ var stacked = stack.get(object);
809
+ if (stacked) {
810
+ return stacked == other;
811
+ }
812
+ bitmask |= COMPARE_UNORDERED_FLAG$2;
813
+ stack.set(object, other);
814
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
815
+ stack["delete"](object);
816
+ return result;
817
+ case symbolTag:
818
+ if (symbolValueOf) {
819
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
820
+ }
821
+ }
822
+ return false;
823
+ }
824
+ var COMPARE_PARTIAL_FLAG$3 = 1;
825
+ var objectProto$2 = Object.prototype;
826
+ var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
827
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
828
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
829
+ if (objLength != othLength && !isPartial) {
830
+ return false;
831
+ }
832
+ var index2 = objLength;
833
+ while (index2--) {
834
+ var key = objProps[index2];
835
+ if (!(isPartial ? key in other : hasOwnProperty$2.call(other, key))) {
836
+ return false;
837
+ }
838
+ }
839
+ var objStacked = stack.get(object);
840
+ var othStacked = stack.get(other);
841
+ if (objStacked && othStacked) {
842
+ return objStacked == other && othStacked == object;
843
+ }
844
+ var result = true;
845
+ stack.set(object, other);
846
+ stack.set(other, object);
847
+ var skipCtor = isPartial;
848
+ while (++index2 < objLength) {
849
+ key = objProps[index2];
850
+ var objValue = object[key], othValue = other[key];
851
+ if (customizer) {
852
+ var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
853
+ }
854
+ if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
855
+ result = false;
856
+ break;
857
+ }
858
+ skipCtor || (skipCtor = key == "constructor");
859
+ }
860
+ if (result && !skipCtor) {
861
+ var objCtor = object.constructor, othCtor = other.constructor;
862
+ if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
863
+ result = false;
864
+ }
865
+ }
866
+ stack["delete"](object);
867
+ stack["delete"](other);
868
+ return result;
869
+ }
870
+ var COMPARE_PARTIAL_FLAG$2 = 1;
871
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
872
+ var objectProto$1 = Object.prototype;
873
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
874
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
875
+ var objIsArr = isArray$1(object), othIsArr = isArray$1(other), objTag = objIsArr ? arrayTag : getTag$1(object), othTag = othIsArr ? arrayTag : getTag$1(other);
876
+ objTag = objTag == argsTag ? objectTag : objTag;
877
+ othTag = othTag == argsTag ? objectTag : othTag;
878
+ var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
879
+ if (isSameTag && isBuffer$1(object)) {
880
+ if (!isBuffer$1(other)) {
881
+ return false;
882
+ }
883
+ objIsArr = true;
884
+ objIsObj = false;
885
+ }
886
+ if (isSameTag && !objIsObj) {
887
+ stack || (stack = new Stack());
888
+ return objIsArr || isTypedArray$1(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
889
+ }
890
+ if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
891
+ var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
892
+ if (objIsWrapped || othIsWrapped) {
893
+ var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
894
+ stack || (stack = new Stack());
895
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
896
+ }
897
+ }
898
+ if (!isSameTag) {
899
+ return false;
900
+ }
901
+ stack || (stack = new Stack());
902
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
903
+ }
904
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
905
+ if (value === other) {
906
+ return true;
907
+ }
908
+ if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
909
+ return value !== value && other !== other;
910
+ }
911
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
912
+ }
913
+ var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
914
+ function baseIsMatch(object, source, matchData, customizer) {
915
+ var index2 = matchData.length, length = index2, noCustomizer = !customizer;
916
+ if (object == null) {
917
+ return !length;
918
+ }
919
+ object = Object(object);
920
+ while (index2--) {
921
+ var data = matchData[index2];
922
+ if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
923
+ return false;
924
+ }
925
+ }
926
+ while (++index2 < length) {
927
+ data = matchData[index2];
928
+ var key = data[0], objValue = object[key], srcValue = data[1];
929
+ if (noCustomizer && data[2]) {
930
+ if (objValue === void 0 && !(key in object)) {
931
+ return false;
932
+ }
933
+ } else {
934
+ var stack = new Stack();
935
+ if (customizer) {
936
+ var result = customizer(objValue, srcValue, key, object, source, stack);
937
+ }
938
+ if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
939
+ return false;
940
+ }
941
+ }
942
+ }
943
+ return true;
944
+ }
945
+ function isStrictComparable(value) {
946
+ return value === value && !isObject(value);
947
+ }
948
+ function getMatchData(object) {
949
+ var result = keys(object), length = result.length;
950
+ while (length--) {
951
+ var key = result[length], value = object[key];
952
+ result[length] = [key, value, isStrictComparable(value)];
953
+ }
954
+ return result;
955
+ }
956
+ function matchesStrictComparable(key, srcValue) {
957
+ return function(object) {
958
+ if (object == null) {
959
+ return false;
960
+ }
961
+ return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
962
+ };
963
+ }
964
+ function baseMatches(source) {
965
+ var matchData = getMatchData(source);
966
+ if (matchData.length == 1 && matchData[0][2]) {
967
+ return matchesStrictComparable(matchData[0][0], matchData[0][1]);
968
+ }
969
+ return function(object) {
970
+ return object === source || baseIsMatch(object, source, matchData);
971
+ };
972
+ }
973
+ function baseHasIn(object, key) {
974
+ return object != null && key in Object(object);
975
+ }
976
+ function hasPath(object, path, hasFunc) {
977
+ path = castPath(path, object);
978
+ var index2 = -1, length = path.length, result = false;
979
+ while (++index2 < length) {
980
+ var key = toKey(path[index2]);
981
+ if (!(result = object != null && hasFunc(object, key))) {
982
+ break;
983
+ }
984
+ object = object[key];
985
+ }
986
+ if (result || ++index2 != length) {
987
+ return result;
988
+ }
989
+ length = object == null ? 0 : object.length;
990
+ return !!length && isLength(length) && isIndex(key, length) && (isArray$1(object) || isArguments$1(object));
991
+ }
992
+ function hasIn(object, path) {
993
+ return object != null && hasPath(object, path, baseHasIn);
994
+ }
995
+ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
996
+ function baseMatchesProperty(path, srcValue) {
997
+ if (isKey(path) && isStrictComparable(srcValue)) {
998
+ return matchesStrictComparable(toKey(path), srcValue);
999
+ }
1000
+ return function(object) {
1001
+ var objValue = get(object, path);
1002
+ return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
1003
+ };
1004
+ }
1005
+ function baseProperty(key) {
1006
+ return function(object) {
1007
+ return object == null ? void 0 : object[key];
1008
+ };
1009
+ }
1010
+ function basePropertyDeep(path) {
1011
+ return function(object) {
1012
+ return baseGet(object, path);
1013
+ };
1014
+ }
1015
+ function property(path) {
1016
+ return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
1017
+ }
1018
+ function baseIteratee(value) {
1019
+ if (typeof value == "function") {
1020
+ return value;
1021
+ }
1022
+ if (value == null) {
1023
+ return identity;
1024
+ }
1025
+ if (typeof value == "object") {
1026
+ return isArray$1(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
1027
+ }
1028
+ return property(value);
1029
+ }
1030
+ function createBaseFor(fromRight) {
1031
+ return function(object, iteratee, keysFunc) {
1032
+ var index2 = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
1033
+ while (length--) {
1034
+ var key = props[fromRight ? length : ++index2];
1035
+ if (iteratee(iterable[key], key, iterable) === false) {
1036
+ break;
1037
+ }
1038
+ }
1039
+ return object;
1040
+ };
1041
+ }
1042
+ var baseFor = createBaseFor();
1043
+ var baseFor$1 = baseFor;
1044
+ function baseForOwn(object, iteratee) {
1045
+ return object && baseFor$1(object, iteratee, keys);
1046
+ }
1047
+ function createBaseEach(eachFunc, fromRight) {
1048
+ return function(collection, iteratee) {
1049
+ if (collection == null) {
1050
+ return collection;
1051
+ }
1052
+ if (!isArrayLike(collection)) {
1053
+ return eachFunc(collection, iteratee);
1054
+ }
1055
+ var length = collection.length, index2 = fromRight ? length : -1, iterable = Object(collection);
1056
+ while (fromRight ? index2-- : ++index2 < length) {
1057
+ if (iteratee(iterable[index2], index2, iterable) === false) {
1058
+ break;
1059
+ }
1060
+ }
1061
+ return collection;
1062
+ };
1063
+ }
1064
+ var baseEach = createBaseEach(baseForOwn);
1065
+ var baseEach$1 = baseEach;
1066
+ var now = function() {
1067
+ return root$1.Date.now();
1068
+ };
1069
+ var now$1 = now;
1070
+ var FUNC_ERROR_TEXT = "Expected a function";
1071
+ var nativeMax = Math.max, nativeMin = Math.min;
1072
+ function debounce(func, wait, options) {
1073
+ var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
1074
+ if (typeof func != "function") {
1075
+ throw new TypeError(FUNC_ERROR_TEXT);
1076
+ }
1077
+ wait = toNumber(wait) || 0;
1078
+ if (isObject(options)) {
1079
+ leading = !!options.leading;
1080
+ maxing = "maxWait" in options;
1081
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
1082
+ trailing = "trailing" in options ? !!options.trailing : trailing;
1083
+ }
1084
+ function invokeFunc(time) {
1085
+ var args = lastArgs, thisArg = lastThis;
1086
+ lastArgs = lastThis = void 0;
1087
+ lastInvokeTime = time;
1088
+ result = func.apply(thisArg, args);
1089
+ return result;
1090
+ }
1091
+ function leadingEdge(time) {
1092
+ lastInvokeTime = time;
1093
+ timerId = setTimeout(timerExpired, wait);
1094
+ return leading ? invokeFunc(time) : result;
1095
+ }
1096
+ function remainingWait(time) {
1097
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
1098
+ return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
1099
+ }
1100
+ function shouldInvoke(time) {
1101
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
1102
+ return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
1103
+ }
1104
+ function timerExpired() {
1105
+ var time = now$1();
1106
+ if (shouldInvoke(time)) {
1107
+ return trailingEdge(time);
1108
+ }
1109
+ timerId = setTimeout(timerExpired, remainingWait(time));
1110
+ }
1111
+ function trailingEdge(time) {
1112
+ timerId = void 0;
1113
+ if (trailing && lastArgs) {
1114
+ return invokeFunc(time);
1115
+ }
1116
+ lastArgs = lastThis = void 0;
1117
+ return result;
1118
+ }
1119
+ function cancel() {
1120
+ if (timerId !== void 0) {
1121
+ clearTimeout(timerId);
1122
+ }
1123
+ lastInvokeTime = 0;
1124
+ lastArgs = lastCallTime = lastThis = timerId = void 0;
1125
+ }
1126
+ function flush() {
1127
+ return timerId === void 0 ? result : trailingEdge(now$1());
1128
+ }
1129
+ function debounced() {
1130
+ var time = now$1(), isInvoking = shouldInvoke(time);
1131
+ lastArgs = arguments;
1132
+ lastThis = this;
1133
+ lastCallTime = time;
1134
+ if (isInvoking) {
1135
+ if (timerId === void 0) {
1136
+ return leadingEdge(lastCallTime);
1137
+ }
1138
+ if (maxing) {
1139
+ clearTimeout(timerId);
1140
+ timerId = setTimeout(timerExpired, wait);
1141
+ return invokeFunc(lastCallTime);
1142
+ }
1143
+ }
1144
+ if (timerId === void 0) {
1145
+ timerId = setTimeout(timerExpired, wait);
1146
+ }
1147
+ return result;
1148
+ }
1149
+ debounced.cancel = cancel;
1150
+ debounced.flush = flush;
1151
+ return debounced;
1152
+ }
1153
+ var stringTag = "[object String]";
1154
+ function isString(value) {
1155
+ return typeof value == "string" || !isArray$1(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
1156
+ }
1157
+ var boolTag = "[object Boolean]";
1158
+ function isBoolean(value) {
1159
+ return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
1160
+ }
1161
+ var mapTag$1 = "[object Map]", setTag$1 = "[object Set]";
1162
+ var objectProto = Object.prototype;
1163
+ var hasOwnProperty = objectProto.hasOwnProperty;
1164
+ function isEmpty(value) {
1165
+ if (value == null) {
1166
+ return true;
1167
+ }
1168
+ if (isArrayLike(value) && (isArray$1(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer$1(value) || isTypedArray$1(value) || isArguments$1(value))) {
1169
+ return !value.length;
1170
+ }
1171
+ var tag = getTag$1(value);
1172
+ if (tag == mapTag$1 || tag == setTag$1) {
1173
+ return !value.size;
1174
+ }
1175
+ if (isPrototype(value)) {
1176
+ return !baseKeys(value).length;
1177
+ }
1178
+ for (var key in value) {
1179
+ if (hasOwnProperty.call(value, key)) {
1180
+ return false;
1181
+ }
1182
+ }
1183
+ return true;
1184
+ }
1185
+ var asciiSize = baseProperty("length");
1186
+ var asciiSize$1 = asciiSize;
1187
+ var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = "\\ufe0e\\ufe0f";
1188
+ var rsAstral = "[" + rsAstralRange + "]", rsCombo = "[" + rsComboRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsZWJ = "\\u200d";
1189
+ var reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
1190
+ var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
1191
+ function unicodeSize(string) {
1192
+ var result = reUnicode.lastIndex = 0;
1193
+ while (reUnicode.test(string)) {
1194
+ ++result;
1195
+ }
1196
+ return result;
1197
+ }
1198
+ function stringSize(string) {
1199
+ return hasUnicode(string) ? unicodeSize(string) : asciiSize$1(string);
1200
+ }
1201
+ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
1202
+ eachFunc(collection, function(value, index2, collection2) {
1203
+ accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index2, collection2);
1204
+ });
1205
+ return accumulator;
1206
+ }
1207
+ function reduce(collection, iteratee, accumulator) {
1208
+ var func = isArray$1(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
1209
+ return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach$1);
1210
+ }
1211
+ var mapTag = "[object Map]", setTag = "[object Set]";
1212
+ function size(collection) {
1213
+ if (collection == null) {
1214
+ return 0;
1215
+ }
1216
+ if (isArrayLike(collection)) {
1217
+ return isString(collection) ? stringSize(collection) : collection.length;
1218
+ }
1219
+ var tag = getTag$1(collection);
1220
+ if (tag == mapTag || tag == setTag) {
1221
+ return collection.size;
1222
+ }
1223
+ return baseKeys(collection).length;
1224
+ }
1225
+ const RESIZE_RENDER_DELAY = 200;
1226
+ const analyzeAdaptive = (paramsContainer, adaptive) => {
1227
+ var _a, _b, _c;
1228
+ let container = paramsContainer;
1229
+ let adaptiveWidth = true;
1230
+ let adaptiveHeight = false;
1231
+ if (typeof adaptive !== "boolean") {
1232
+ container = ((_a = adaptive == null ? void 0 : adaptive.getContainer) == null ? void 0 : _a.call(adaptive)) || paramsContainer;
1233
+ adaptiveWidth = (_b = adaptive == null ? void 0 : adaptive.width) != null ? _b : true;
1234
+ adaptiveHeight = (_c = adaptive == null ? void 0 : adaptive.height) != null ? _c : true;
1235
+ }
1236
+ return { container, adaptiveWidth, adaptiveHeight };
1237
+ };
1238
+ const createResizeObserver = (params) => {
1239
+ let isFirstRender = true;
1240
+ const { s2, adaptive, container, wrapper } = params;
1241
+ const {
1242
+ container: actualWrapper,
1243
+ adaptiveWidth,
1244
+ adaptiveHeight
1245
+ } = analyzeAdaptive(wrapper, adaptive);
1246
+ if (!actualWrapper || !container || !adaptive || !s2) {
1247
+ return;
1248
+ }
1249
+ const render2 = (width, height) => {
1250
+ s2 == null ? void 0 : s2.changeSheetSize(width, height);
1251
+ s2 == null ? void 0 : s2.render(false);
1252
+ };
1253
+ const debounceRender = debounce(render2, RESIZE_RENDER_DELAY);
1254
+ const onResize = () => {
1255
+ const { width: nodeWidth, height: nodeHeight } = container == null ? void 0 : container.getBoundingClientRect();
1256
+ const width = adaptiveWidth ? Math.floor(nodeWidth != null ? nodeWidth : s2.options.width) : s2.options.width;
1257
+ const height = adaptiveHeight ? Math.floor(nodeHeight != null ? nodeHeight : s2.options.height) : s2.options.height;
1258
+ if (!adaptiveWidth && !adaptiveHeight) {
1259
+ return;
1260
+ }
1261
+ if (isFirstRender) {
1262
+ render2(width, height);
1263
+ isFirstRender = false;
1264
+ return;
1265
+ }
1266
+ debounceRender(width, height);
1267
+ };
1268
+ const resizeObserver = new ResizeObserver(([entry] = []) => {
1269
+ if (entry) {
1270
+ onResize();
1271
+ }
1272
+ });
1273
+ resizeObserver.observe(actualWrapper, {
1274
+ box: "border-box"
1275
+ });
1276
+ return () => {
1277
+ resizeObserver.unobserve(actualWrapper);
1278
+ };
1279
+ };
1280
+ const EN_US = {
1281
+ \u9009\u62E9\u5206\u6790\u4FE1\u606F: "Select Analysis Information",
1282
+ \u5207\u6362\u6307\u6807: "Switch indicator",
1283
+ \u786E\u5B9A: "Ok",
1284
+ \u53D6\u6D88: "Cancel",
1285
+ \u91CD\u7F6E: "Reset",
1286
+ \u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "Please enter a keyword search",
1287
+ \u641C\u7D22: "Search",
1288
+ \u6062\u590D: "Recover",
1289
+ "\u5DF2\u9009 {} \u9879": "selected {} item",
1290
+ \u6240\u9009\u9879: "selected items",
1291
+ \u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "Select drill down dimension",
1292
+ \u6062\u590D\u9ED8\u8BA4: "Restore default",
1293
+ \u641C\u7D22\u5B57\u6BB5: "Search field",
1294
+ \u884C\u5217\u5207\u6362: "Switch Dimensions",
1295
+ \u884C\u5934: "Rows",
1296
+ \u5217\u5934: "Cols",
1297
+ \u503C: "Values",
1298
+ \u5C55\u5F00\u5B50\u9879: "Expand Children",
1299
+ \u9996\u5B57\u6BCD: "Alphabetical order",
1300
+ \u624B\u52A8\u6392\u5E8F: "Custom order",
1301
+ \u5176\u4ED6\u5B57\u6BB5: "Other field",
1302
+ \u9AD8\u7EA7\u6392\u5E8F: "Advanced order",
1303
+ \u8BBE\u7F6E\u987A\u5E8F: "SetManual",
1304
+ \u53EF\u9009\u5B57\u6BB5: "Fields",
1305
+ "\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09": "Order according to the following rules (from low to high priority)",
1306
+ \u6309: "By",
1307
+ \u8BF4\u660E: "Description"
1308
+ };
1309
+ const ZH_CN = {
1310
+ \u9009\u62E9\u5206\u6790\u4FE1\u606F: "\u9009\u62E9\u5206\u6790\u4FE1\u606F",
1311
+ \u5207\u6362\u6307\u6807: "\u5207\u6362\u6307\u6807",
1312
+ \u786E\u5B9A: "\u786E\u5B9A",
1313
+ \u53D6\u6D88: "\u53D6\u6D88",
1314
+ \u91CD\u7F6E: "\u91CD\u7F6E",
1315
+ \u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22",
1316
+ \u641C\u7D22: "\u641C\u7D22",
1317
+ \u6062\u590D: "\u6062\u590D",
1318
+ "\u5DF2\u9009 {} \u9879": "\u5DF2\u9009 {} \u9879",
1319
+ \u6240\u9009\u9879: "\u6240\u9009\u9879",
1320
+ \u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6: "\u9009\u62E9\u4E0B\u94BB\u7EF4\u5EA6",
1321
+ \u6062\u590D\u9ED8\u8BA4: "\u6062\u590D\u9ED8\u8BA4",
1322
+ \u641C\u7D22\u5B57\u6BB5: "\u641C\u7D22\u5B57\u6BB5",
1323
+ \u884C\u5217\u5207\u6362: "\u884C\u5217\u5207\u6362",
1324
+ \u884C\u5934: "\u884C\u5934",
1325
+ \u5217\u5934: "\u5217\u5934",
1326
+ \u503C: "\u503C",
1327
+ \u5C55\u5F00\u5B50\u9879: "\u5C55\u5F00\u5B50\u9879",
1328
+ \u9996\u5B57\u6BCD: "\u9996\u5B57\u6BCD",
1329
+ \u624B\u52A8\u6392\u5E8F: "\u624B\u52A8\u6392\u5E8F",
1330
+ \u5176\u4ED6\u5B57\u6BB5: "\u5176\u4ED6\u5B57\u6BB5",
1331
+ \u9AD8\u7EA7\u6392\u5E8F: "\u9AD8\u7EA7\u6392\u5E8F",
1332
+ \u8BBE\u7F6E\u987A\u5E8F: "\u8BBE\u7F6E\u987A\u5E8F",
1333
+ \u53EF\u9009\u5B57\u6BB5: "\u53EF\u9009\u5B57\u6BB5",
1334
+ "\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09": "\u6309\u4EE5\u4E0B\u89C4\u5219\u8FDB\u884C\u6392\u5E8F\uFF08\u4F18\u5148\u7EA7\u7531\u4F4E\u5230\u9AD8\uFF09",
1335
+ \u6309: "\u6309",
1336
+ \u8BF4\u660E: "\u8BF4\u660E"
1337
+ };
1338
+ const Locale = {
1339
+ zh_CN: ZH_CN,
1340
+ en_US: EN_US
1341
+ };
1342
+ extendLocale(Locale);
1343
+ const useExpose = (expose) => {
1344
+ const s2Ref = shallowRef();
1345
+ expose({
1346
+ get instance() {
1347
+ var _a;
1348
+ return (_a = s2Ref.value) == null ? void 0 : _a.instance;
1349
+ }
1350
+ });
1351
+ return s2Ref;
1352
+ };
1353
+ const DEFAULT_PAGE_NUMBER = 1;
1354
+ const DEFAULT_PAGE_SIZE = 10;
1355
+ const usePagination = (s2Ref, props) => {
1356
+ var _a, _b, _c, _d, _e, _f;
1357
+ const current = ref((_c = (_b = (_a = props.options) == null ? void 0 : _a.pagination) == null ? void 0 : _b.current) != null ? _c : DEFAULT_PAGE_NUMBER);
1358
+ const pageSize = ref((_f = (_e = (_d = props.options) == null ? void 0 : _d.pagination) == null ? void 0 : _e.pageSize) != null ? _f : DEFAULT_PAGE_SIZE);
1359
+ const total = ref(0);
1360
+ const change = (nextCurrent) => {
1361
+ current.value = nextCurrent;
1362
+ };
1363
+ const showSizeChange = (nextPageSize) => {
1364
+ pageSize.value = nextPageSize;
1365
+ };
1366
+ const visible = computed(() => {
1367
+ var _a2;
1368
+ return props.showPagination && !isEmpty((_a2 = props.options) == null ? void 0 : _a2.pagination);
1369
+ });
1370
+ watch([current, pageSize], () => {
1371
+ var _a2;
1372
+ if (!s2Ref.value) {
1373
+ return;
1374
+ }
1375
+ const nextPagination = isEmpty((_a2 = props.options) == null ? void 0 : _a2.pagination) ? null : {
1376
+ current: current.value,
1377
+ pageSize: pageSize.value
1378
+ };
1379
+ s2Ref.value.updatePagination(nextPagination);
1380
+ s2Ref.value.render(false);
1381
+ });
1382
+ watch([() => {
1383
+ var _a2;
1384
+ return (_a2 = props.options) == null ? void 0 : _a2.pagination;
1385
+ }, s2Ref], () => {
1386
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g, _h, _i;
1387
+ current.value = (_c2 = (_b2 = (_a2 = props.options) == null ? void 0 : _a2.pagination) == null ? void 0 : _b2.current) != null ? _c2 : DEFAULT_PAGE_NUMBER;
1388
+ pageSize.value = (_f2 = (_e2 = (_d2 = props.options) == null ? void 0 : _d2.pagination) == null ? void 0 : _e2.pageSize) != null ? _f2 : DEFAULT_PAGE_SIZE;
1389
+ total.value = (_i = (_h = (_g = s2Ref.value) == null ? void 0 : _g.facet) == null ? void 0 : _h.viewCellHeights.getTotalLength()) != null ? _i : 0;
1390
+ }, {
1391
+ immediate: true
1392
+ });
1393
+ watch(s2Ref, (value, oldValue, onCleanup) => {
1394
+ if (!s2Ref.value) {
1395
+ return;
1396
+ }
1397
+ const totalUpdateCallback = (data) => {
1398
+ var _a2;
1399
+ if (isEmpty((_a2 = props.options) == null ? void 0 : _a2.pagination)) {
1400
+ return;
1401
+ }
1402
+ total.value = data.total;
1403
+ };
1404
+ s2Ref.value.on(S2Event.LAYOUT_PAGINATION, totalUpdateCallback);
1405
+ onCleanup(() => {
1406
+ var _a2;
1407
+ (_a2 = s2Ref.value) == null ? void 0 : _a2.off(S2Event.LAYOUT_PAGINATION, totalUpdateCallback);
1408
+ });
1409
+ });
1410
+ return {
1411
+ visible,
1412
+ current,
1413
+ pageSize,
1414
+ total,
1415
+ change,
1416
+ showSizeChange
1417
+ };
1418
+ };
1419
+ var _export_sfc = (sfc, props) => {
1420
+ const target = sfc.__vccOpts || sfc;
1421
+ for (const [key, val] of props) {
1422
+ target[key] = val;
1423
+ }
1424
+ return target;
1425
+ };
1426
+ const PRE_CLASS = `${S2_PREFIX_CLS}-pagination`;
1427
+ const _sfc_main$d = defineComponent({
1428
+ name: "s2-pagination",
1429
+ props: {
1430
+ current: {
1431
+ type: Number,
1432
+ default: DEFAULT_PAGE_NUMBER
1433
+ },
1434
+ total: {
1435
+ type: Number,
1436
+ default: 0
1437
+ },
1438
+ pageSize: {
1439
+ type: Number,
1440
+ default: DEFAULT_PAGE_SIZE
1441
+ }
1442
+ },
1443
+ emits: ["change", "showSizeChange"],
1444
+ setup: (props) => {
1445
+ const showQuickJumper = computed(() => {
1446
+ return props.total / props.pageSize > 5;
1447
+ });
1448
+ return {
1449
+ showQuickJumper,
1450
+ PRE_CLASS,
1451
+ i18n
1452
+ };
1453
+ },
1454
+ components: {
1455
+ AntDPagination: Pagination
1456
+ }
1457
+ });
1458
+ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
1459
+ const _component_AntDPagination = resolveComponent("AntDPagination");
1460
+ return openBlock(), createElementBlock("div", {
1461
+ class: normalizeClass(_ctx.PRE_CLASS)
1462
+ }, [
1463
+ createVNode(_component_AntDPagination, {
1464
+ "default-current": 1,
1465
+ current: _ctx.current,
1466
+ total: _ctx.total,
1467
+ pageSize: _ctx.pageSize,
1468
+ showSizeChanger: true,
1469
+ onShowSizeChange: _cache[0] || (_cache[0] = (_, size2) => _ctx.$emit("showSizeChange", size2)),
1470
+ size: "small",
1471
+ showQuickJumper: _ctx.showQuickJumper,
1472
+ onChange: _cache[1] || (_cache[1] = (current) => _ctx.$emit("change", current))
1473
+ }, null, 8, ["current", "total", "pageSize", "showQuickJumper"]),
1474
+ createElementVNode("span", {
1475
+ class: normalizeClass(`${_ctx.PRE_CLASS}-count`)
1476
+ }, toDisplayString(_ctx.i18n("\u5171\u8BA1")) + " " + toDisplayString(_ctx.total || " - ") + " " + toDisplayString(_ctx.i18n("\u6761")), 3)
1477
+ ], 2);
1478
+ }
1479
+ var S2Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$d]]);
1480
+ const _sfc_main$c = defineComponent({
1481
+ name: "TooltipDetail",
1482
+ props: ["list"],
1483
+ setup() {
1484
+ return {
1485
+ TOOLTIP_PREFIX_CLS
1486
+ };
1487
+ }
1488
+ });
1489
+ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
1490
+ return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.list, (item, index2) => {
1491
+ return openBlock(), createElementBlock("div", {
1492
+ key: `${item.value}-${index2}`,
1493
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-detail-list`)
1494
+ }, [
1495
+ createElementVNode("div", {
1496
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-detail-item`)
1497
+ }, [
1498
+ createElementVNode("span", {
1499
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-detail-item-key`)
1500
+ }, toDisplayString(item.name), 3),
1501
+ createElementVNode("span", {
1502
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-detail-item-val ${_ctx.TOOLTIP_PREFIX_CLS}-highlight`)
1503
+ }, toDisplayString(item.value), 3)
1504
+ ], 2)
1505
+ ], 2);
1506
+ }), 128);
1507
+ }
1508
+ var TooltipDetail = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$c]]);
1509
+ const _sfc_main$b = defineComponent({
1510
+ name: "TooltipHeadInfo",
1511
+ props: ["rows", "cols"],
1512
+ setup() {
1513
+ return {
1514
+ TOOLTIP_PREFIX_CLS
1515
+ };
1516
+ },
1517
+ components: {}
1518
+ });
1519
+ const _hoisted_1$1 = { key: 0 };
1520
+ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
1521
+ var _a, _b, _c, _d;
1522
+ return ((_a = _ctx.cols) == null ? void 0 : _a.length) || ((_b = _ctx.rows) == null ? void 0 : _b.length) ? (openBlock(), createElementBlock("div", {
1523
+ key: 0,
1524
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-head-info-list`)
1525
+ }, [
1526
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.cols, (col) => {
1527
+ return openBlock(), createElementBlock("span", {
1528
+ key: col.value
1529
+ }, toDisplayString(col.value) + "/", 1);
1530
+ }), 128)),
1531
+ ((_c = _ctx.cols) == null ? void 0 : _c.length) > 0 && ((_d = _ctx.rows) == null ? void 0 : _d.length) > 0 ? (openBlock(), createElementBlock("span", _hoisted_1$1, "\uFF0C")) : createCommentVNode("", true),
1532
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.rows, (row) => {
1533
+ return openBlock(), createElementBlock("span", {
1534
+ key: row.value
1535
+ }, toDisplayString(row.value) + "/", 1);
1536
+ }), 128))
1537
+ ], 2)) : createCommentVNode("", true);
1538
+ }
1539
+ var TooltipHeadInfo = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$b]]);
1540
+ const _sfc_main$a = defineComponent({
1541
+ name: "TooltipInfos",
1542
+ props: ["infos"],
1543
+ setup() {
1544
+ return {
1545
+ TOOLTIP_PREFIX_CLS
1546
+ };
1547
+ },
1548
+ components: {}
1549
+ });
1550
+ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
1551
+ return openBlock(), createElementBlock("div", {
1552
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-infos`)
1553
+ }, toDisplayString(_ctx.infos), 3);
1554
+ }
1555
+ var TooltipInfos = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$a]]);
1556
+ const _sfc_main$9 = defineComponent({
1557
+ name: "TooltipSimpleTips",
1558
+ props: ["name", "tips"],
1559
+ setup() {
1560
+ return {
1561
+ TOOLTIP_PREFIX_CLS
1562
+ };
1563
+ },
1564
+ components: {}
1565
+ });
1566
+ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
1567
+ return openBlock(), createElementBlock(Fragment, null, [
1568
+ _ctx.name ? (openBlock(), createElementBlock("div", {
1569
+ key: 0,
1570
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-name`)
1571
+ }, toDisplayString(_ctx.name), 3)) : createCommentVNode("", true),
1572
+ _ctx.tips ? (openBlock(), createElementBlock("div", {
1573
+ key: 1,
1574
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-tips`)
1575
+ }, toDisplayString(_ctx.tips), 3)) : createCommentVNode("", true)
1576
+ ], 64);
1577
+ }
1578
+ var TooltipSimpleTips = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$9]]);
1579
+ const _sfc_main$8 = defineComponent({
1580
+ name: "TooltipSummary",
1581
+ props: ["summaries"],
1582
+ setup(props) {
1583
+ const count = computed(() => reduce(props.summaries, (pre, next) => pre + size(next == null ? void 0 : next.selectedData), 0));
1584
+ return {
1585
+ count: count.value,
1586
+ i18n,
1587
+ TOOLTIP_PREFIX_CLS
1588
+ };
1589
+ },
1590
+ components: {}
1591
+ });
1592
+ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
1593
+ return openBlock(), createElementBlock("div", {
1594
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary`)
1595
+ }, [
1596
+ createElementVNode("div", {
1597
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-item`)
1598
+ }, [
1599
+ createElementVNode("span", {
1600
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-selected`)
1601
+ }, toDisplayString(_ctx.count) + " " + toDisplayString(_ctx.i18n("\u9879")), 3),
1602
+ createTextVNode(" " + toDisplayString(_ctx.i18n("\u5DF2\u9009\u62E9")), 1)
1603
+ ], 2),
1604
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.summaries, (summary) => {
1605
+ return openBlock(), createElementBlock("div", {
1606
+ key: `${summary.name}-${summary.value}`,
1607
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-item`)
1608
+ }, [
1609
+ createElementVNode("span", {
1610
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-key`)
1611
+ }, toDisplayString(summary.name) + " " + toDisplayString(_ctx.i18n("\u603B\u548C")), 3),
1612
+ createElementVNode("span", {
1613
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-summary-val ${_ctx.TOOLTIP_PREFIX_CLS}-bold`)
1614
+ }, toDisplayString(summary.value), 3)
1615
+ ], 2);
1616
+ }), 128))
1617
+ ], 2);
1618
+ }
1619
+ var TooltipSummary = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$8]]);
1620
+ const _sfc_main$7 = defineComponent({
1621
+ name: "TooltipOperatorTitle",
1622
+ props: ["menu"],
1623
+ setup(props) {
1624
+ const icon = computed(() => getIcon(props.menu.icon));
1625
+ return {
1626
+ TOOLTIP_PREFIX_CLS,
1627
+ icon
1628
+ };
1629
+ }
1630
+ });
1631
+ const _hoisted_1 = ["innerHTML"];
1632
+ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
1633
+ return openBlock(), createElementBlock("span", null, [
1634
+ _ctx.icon ? (openBlock(), createElementBlock("span", {
1635
+ key: 0,
1636
+ innerHTML: _ctx.icon,
1637
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-icon`)
1638
+ }, null, 10, _hoisted_1)) : createCommentVNode("", true),
1639
+ createElementVNode("span", {
1640
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-text`)
1641
+ }, toDisplayString(_ctx.menu.text), 3)
1642
+ ]);
1643
+ }
1644
+ var TooltipOperatorTitle = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$7]]);
1645
+ const _sfc_main$6 = defineComponent({
1646
+ name: "TooltipOperatorMenu",
1647
+ props: ["menu", "cell"],
1648
+ setup(props) {
1649
+ const onMenuTitleClick = () => {
1650
+ var _a, _b;
1651
+ (_b = (_a = props.menu).onClick) == null ? void 0 : _b.call(_a, props.cell);
1652
+ };
1653
+ return {
1654
+ onMenuTitleClick,
1655
+ TOOLTIP_PREFIX_CLS
1656
+ };
1657
+ },
1658
+ components: {
1659
+ MenuItem: Menu.Item,
1660
+ SubMenu: Menu.SubMenu,
1661
+ TooltipOperatorTitle
1662
+ }
1663
+ });
1664
+ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
1665
+ const _component_TooltipOperatorTitle = resolveComponent("TooltipOperatorTitle");
1666
+ const _component_TooltipOperatorMenu = resolveComponent("TooltipOperatorMenu");
1667
+ const _component_MenuItem = resolveComponent("MenuItem");
1668
+ const _component_SubMenu = resolveComponent("SubMenu");
1669
+ return openBlock(), createBlock(_component_SubMenu, {
1670
+ key: _ctx.menu.key,
1671
+ popupClassName: `${_ctx.TOOLTIP_PREFIX_CLS}-operator-submenu-popup`,
1672
+ onTitleClick: _ctx.onMenuTitleClick
1673
+ }, {
1674
+ title: withCtx(() => [
1675
+ createVNode(_component_TooltipOperatorTitle, {
1676
+ menu: _ctx.menu,
1677
+ onClick: _ctx.onMenuTitleClick
1678
+ }, null, 8, ["menu", "onClick"])
1679
+ ]),
1680
+ default: withCtx(() => [
1681
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menu.children, (subMenu) => {
1682
+ var _a;
1683
+ return openBlock(), createElementBlock(Fragment, {
1684
+ key: subMenu.key
1685
+ }, [
1686
+ ((_a = subMenu == null ? void 0 : subMenu.children) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_TooltipOperatorMenu, {
1687
+ key: 0,
1688
+ menu: subMenu,
1689
+ cell: _ctx.cell
1690
+ }, null, 8, ["menu", "cell"])) : (openBlock(), createBlock(_component_MenuItem, {
1691
+ title: subMenu.text,
1692
+ key: subMenu.key
1693
+ }, {
1694
+ default: withCtx(() => [
1695
+ createVNode(_component_TooltipOperatorTitle, {
1696
+ menu: subMenu,
1697
+ onClick: _ctx.onMenuTitleClick
1698
+ }, null, 8, ["menu", "onClick"])
1699
+ ]),
1700
+ _: 2
1701
+ }, 1032, ["title"]))
1702
+ ], 64);
1703
+ }), 128))
1704
+ ]),
1705
+ _: 1
1706
+ }, 8, ["popupClassName", "onTitleClick"]);
1707
+ }
1708
+ var TooltipOperatorMenu = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6]]);
1709
+ var index_vue_vue_type_style_index_0_lang$1 = "";
1710
+ const _sfc_main$5 = defineComponent({
1711
+ name: "TooltipOperator",
1712
+ props: [
1713
+ "menus",
1714
+ "onlyMenu",
1715
+ "onClick",
1716
+ "cell"
1717
+ ],
1718
+ setup() {
1719
+ return {
1720
+ TOOLTIP_PREFIX_CLS
1721
+ };
1722
+ },
1723
+ components: {
1724
+ Menu,
1725
+ Dropdown,
1726
+ TooltipOperatorTitle,
1727
+ TooltipOperatorMenu
1728
+ }
1729
+ });
1730
+ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
1731
+ const _component_TooltipOperatorMenu = resolveComponent("TooltipOperatorMenu");
1732
+ const _component_Menu = resolveComponent("Menu");
1733
+ const _component_TooltipOperatorTitle = resolveComponent("TooltipOperatorTitle");
1734
+ const _component_Dropdown = resolveComponent("Dropdown");
1735
+ return openBlock(), createElementBlock("div", {
1736
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator`)
1737
+ }, [
1738
+ _ctx.onlyMenu ? (openBlock(), createBlock(_component_Menu, {
1739
+ key: 0,
1740
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
1741
+ onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$.emit("click"))
1742
+ }, {
1743
+ default: withCtx(() => [
1744
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menus, (menu) => {
1745
+ return openBlock(), createBlock(_component_TooltipOperatorMenu, {
1746
+ key: menu.key,
1747
+ menu,
1748
+ cell: _ctx.cell
1749
+ }, null, 8, ["menu", "cell"]);
1750
+ }), 128))
1751
+ ]),
1752
+ _: 1
1753
+ }, 8, ["class"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.menus, (menu) => {
1754
+ return openBlock(), createBlock(_component_Dropdown, {
1755
+ key: menu.key,
1756
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-dropdown`)
1757
+ }, {
1758
+ overlay: withCtx(() => {
1759
+ var _a;
1760
+ return [
1761
+ ((_a = menu == null ? void 0 : menu.children) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_component_Menu, {
1762
+ key: 0,
1763
+ class: normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
1764
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$.emit("click"))
1765
+ }, {
1766
+ default: withCtx(() => [
1767
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menus, (menu2) => {
1768
+ return openBlock(), createBlock(_component_TooltipOperatorMenu, {
1769
+ key: menu2.key,
1770
+ menu: menu2,
1771
+ cell: _ctx.cell
1772
+ }, null, 8, ["menu", "cell"]);
1773
+ }), 128))
1774
+ ]),
1775
+ _: 2
1776
+ }, 1032, ["class"])) : createCommentVNode("", true)
1777
+ ];
1778
+ }),
1779
+ default: withCtx(() => [
1780
+ createVNode(_component_TooltipOperatorTitle, {
1781
+ menu,
1782
+ onClick: ($event) => {
1783
+ var _a;
1784
+ return (_a = menu.onClick) == null ? void 0 : _a.call(menu, _ctx.cell);
1785
+ }
1786
+ }, null, 8, ["menu", "onClick"])
1787
+ ]),
1788
+ _: 2
1789
+ }, 1032, ["class"]);
1790
+ }), 128))
1791
+ ], 2);
1792
+ }
1793
+ var TooltipOperator = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
1794
+ var index_vue_vue_type_style_index_0_lang = "";
1795
+ const _sfc_main$4 = defineComponent({
1796
+ name: "TooltipComponent",
1797
+ props: [
1798
+ "content",
1799
+ "data",
1800
+ "options",
1801
+ "cell",
1802
+ "position",
1803
+ "event"
1804
+ ],
1805
+ setup(props) {
1806
+ const { operator, onlyMenu } = getTooltipDefaultOptions(props.options);
1807
+ return {
1808
+ operator,
1809
+ onlyMenu
1810
+ };
1811
+ },
1812
+ components: {
1813
+ TooltipDetail,
1814
+ TooltipHeadInfo,
1815
+ TooltipInfos,
1816
+ TooltipSimpleTips,
1817
+ TooltipSummary,
1818
+ TooltipOperator
1819
+ }
1820
+ });
1821
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
1822
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
1823
+ const _component_TooltipOperator = resolveComponent("TooltipOperator");
1824
+ const _component_TooltipSimpleTips = resolveComponent("TooltipSimpleTips");
1825
+ const _component_TooltipSummary = resolveComponent("TooltipSummary");
1826
+ const _component_TooltipHeadInfo = resolveComponent("TooltipHeadInfo");
1827
+ const _component_TooltipDetail = resolveComponent("TooltipDetail");
1828
+ const _component_TooltipInfos = resolveComponent("TooltipInfos");
1829
+ return _ctx.onlyMenu ? (openBlock(), createBlock(_component_TooltipOperator, {
1830
+ key: 0,
1831
+ menus: ((_a = _ctx.operator) == null ? void 0 : _a.menus) || [],
1832
+ onlyMenu: true,
1833
+ cell: _ctx.cell,
1834
+ onClick: (_b = _ctx.operator) == null ? void 0 : _b.onClick
1835
+ }, null, 8, ["menus", "cell", "onClick"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1836
+ createVNode(_component_TooltipOperator, {
1837
+ menus: ((_c = _ctx.operator) == null ? void 0 : _c.menus) || [],
1838
+ onlyMenu: false,
1839
+ cell: _ctx.cell,
1840
+ onClick: (_d = _ctx.operator) == null ? void 0 : _d.onClick
1841
+ }, null, 8, ["menus", "cell", "onClick"]),
1842
+ _ctx.content ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1843
+ createTextVNode(toDisplayString(_ctx.content), 1)
1844
+ ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1845
+ createVNode(_component_TooltipSimpleTips, {
1846
+ name: (_e = _ctx.data) == null ? void 0 : _e.name,
1847
+ tips: (_f = _ctx.data) == null ? void 0 : _f.tips
1848
+ }, null, 8, ["name", "tips"]),
1849
+ ((_h = (_g = _ctx.data) == null ? void 0 : _g.summaries) == null ? void 0 : _h.length) ? (openBlock(), createBlock(_component_TooltipSummary, {
1850
+ key: 0,
1851
+ summaries: (_i = _ctx.data) == null ? void 0 : _i.summaries
1852
+ }, null, 8, ["summaries"])) : createCommentVNode("", true),
1853
+ createVNode(_component_TooltipHeadInfo, {
1854
+ rows: ((_k = (_j = _ctx.data) == null ? void 0 : _j.headInfo) == null ? void 0 : _k.rows) || [],
1855
+ cols: ((_m = (_l = _ctx.data) == null ? void 0 : _l.headInfo) == null ? void 0 : _m.cols) || []
1856
+ }, null, 8, ["rows", "cols"]),
1857
+ createVNode(_component_TooltipDetail, {
1858
+ list: ((_n = _ctx.data) == null ? void 0 : _n.details) || []
1859
+ }, null, 8, ["list"]),
1860
+ ((_o = _ctx.data) == null ? void 0 : _o.infos) ? (openBlock(), createBlock(_component_TooltipInfos, {
1861
+ key: 1,
1862
+ infos: (_p = _ctx.data) == null ? void 0 : _p.infos
1863
+ }, null, 8, ["infos"])) : createCommentVNode("", true)
1864
+ ], 64))
1865
+ ], 64));
1866
+ }
1867
+ var TooltipComponent = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4]]);
1868
+ class CustomTooltip extends BaseTooltip {
1869
+ constructor(spreadsheet) {
1870
+ super(spreadsheet);
1871
+ }
1872
+ renderContent() {
1873
+ var _a, _b;
1874
+ const { tooltip } = this.spreadsheet.options;
1875
+ const showOptions = this.options;
1876
+ const cell = this.spreadsheet.getCell((_a = showOptions.event) == null ? void 0 : _a.target);
1877
+ const content = (_b = showOptions.content) != null ? _b : tooltip == null ? void 0 : tooltip.content;
1878
+ const tooltipProps = __spreadProps(__spreadValues({}, showOptions), {
1879
+ cell,
1880
+ content
1881
+ });
1882
+ const tooltipVNode = createVNode(TooltipComponent, tooltipProps);
1883
+ render(null, this.container);
1884
+ render(tooltipVNode, this.container);
1885
+ }
1886
+ destroy() {
1887
+ super.destroy();
1888
+ if (this.container) {
1889
+ render(null, this.container);
1890
+ }
1891
+ }
1892
+ }
1893
+ const RENDER_TOOLTIP_OPTION = {
1894
+ tooltip: {
1895
+ renderTooltip: (spreadsheet) => new CustomTooltip(spreadsheet)
1896
+ }
1897
+ };
1898
+ [
1899
+ {
1900
+ name: i18n("\u5347\u5E8F"),
1901
+ value: "ASC"
1902
+ },
1903
+ {
1904
+ name: i18n("\u964D\u5E8F"),
1905
+ value: "DESC"
1906
+ }
1907
+ ];
1908
+ [
1909
+ {
1910
+ label: i18n("\u9996\u5B57\u6BCD"),
1911
+ value: "sortMethod"
1912
+ },
1913
+ {
1914
+ label: i18n("\u624B\u52A8\u6392\u5E8F"),
1915
+ value: "sortBy"
1916
+ },
1917
+ {
1918
+ label: i18n("\u5176\u4ED6\u5B57\u6BB5"),
1919
+ value: "sortByMeasure",
1920
+ children: []
1921
+ }
1922
+ ];
1923
+ const getSheetComponentOptions = (...options) => getBaseSheetComponentOptions(RENDER_TOOLTIP_OPTION, ...options);
1924
+ const useCellEvent = (s2Ref, emit, eventName, emitName) => {
1925
+ var _a;
1926
+ const handler = (event) => {
1927
+ const param = getBaseCellData(event);
1928
+ emit(emitName, param);
1929
+ };
1930
+ (_a = s2Ref.value) == null ? void 0 : _a.on(eventName, handler);
1931
+ };
1932
+ const useS2Event = (s2Ref, emit, eventName, emitName) => {
1933
+ var _a;
1934
+ const handler = (params) => {
1935
+ emit(emitName, params);
1936
+ };
1937
+ (_a = s2Ref.value) == null ? void 0 : _a.on(eventName, handler);
1938
+ };
1939
+ const useEvents = (s2Ref, emit) => {
1940
+ onMounted(() => {
1941
+ if (!s2Ref.value) {
1942
+ return;
1943
+ }
1944
+ useCellEvent(s2Ref, emit, S2Event.ROW_CELL_HOVER, "rowCellHover");
1945
+ useCellEvent(s2Ref, emit, S2Event.ROW_CELL_CLICK, "rowCellClick");
1946
+ useCellEvent(s2Ref, emit, S2Event.ROW_CELL_DOUBLE_CLICK, "rowCellDoubleClick");
1947
+ useCellEvent(s2Ref, emit, S2Event.ROW_CELL_CONTEXT_MENU, "rowCellContextMenu");
1948
+ useCellEvent(s2Ref, emit, S2Event.ROW_CELL_MOUSE_DOWN, "rowCellMouseDown");
1949
+ useCellEvent(s2Ref, emit, S2Event.ROW_CELL_MOUSE_UP, "rowCellMouseUp");
1950
+ useCellEvent(s2Ref, emit, S2Event.ROW_CELL_MOUSE_MOVE, "rowCellMouseMove");
1951
+ useS2Event(s2Ref, emit, S2Event.ROW_CELL_COLLAPSE_TREE_ROWS, "rowCellCollapseTreeRows");
1952
+ useCellEvent(s2Ref, emit, S2Event.COL_CELL_HOVER, "colCellHover");
1953
+ useCellEvent(s2Ref, emit, S2Event.COL_CELL_CLICK, "colCellClick");
1954
+ useCellEvent(s2Ref, emit, S2Event.COL_CELL_DOUBLE_CLICK, "colCellDoubleClick");
1955
+ useCellEvent(s2Ref, emit, S2Event.COL_CELL_CONTEXT_MENU, "colCellContextMenu");
1956
+ useCellEvent(s2Ref, emit, S2Event.COL_CELL_MOUSE_DOWN, "colCellMouseDown");
1957
+ useCellEvent(s2Ref, emit, S2Event.COL_CELL_MOUSE_UP, "colCellMouseUp");
1958
+ useCellEvent(s2Ref, emit, S2Event.COL_CELL_MOUSE_MOVE, "colCellMouseMove");
1959
+ useCellEvent(s2Ref, emit, S2Event.DATA_CELL_HOVER, "dataCellHover");
1960
+ useCellEvent(s2Ref, emit, S2Event.DATA_CELL_CLICK, "dataCellClick");
1961
+ useCellEvent(s2Ref, emit, S2Event.DATA_CELL_DOUBLE_CLICK, "dataCellDoubleClick");
1962
+ useCellEvent(s2Ref, emit, S2Event.DATA_CELL_CONTEXT_MENU, "dataCellContextMenu");
1963
+ useCellEvent(s2Ref, emit, S2Event.DATA_CELL_MOUSE_DOWN, "dataCellMouseDown");
1964
+ useCellEvent(s2Ref, emit, S2Event.DATA_CELL_MOUSE_UP, "dataCellMouseUp");
1965
+ useCellEvent(s2Ref, emit, S2Event.DATA_CELL_MOUSE_MOVE, "dataCellMouseMove");
1966
+ useS2Event(s2Ref, emit, S2Event.DATA_CELL_TREND_ICON_CLICK, "dataCellTrendIconClick");
1967
+ useS2Event(s2Ref, emit, S2Event.DATE_CELL_BRUSH_SELECTION, "dataCellBrushSelection");
1968
+ useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_HOVER, "cornerCellHover");
1969
+ useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_CLICK, "cornerCellClick");
1970
+ useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_DOUBLE_CLICK, "cornerCellDoubleClick");
1971
+ useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_CONTEXT_MENU, "cornerCellContextMenu");
1972
+ useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_MOUSE_DOWN, "cornerCellMouseDown");
1973
+ useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_MOUSE_UP, "cornerCellMouseUp");
1974
+ useCellEvent(s2Ref, emit, S2Event.CORNER_CELL_MOUSE_MOVE, "cornerCellMouseMove");
1975
+ useCellEvent(s2Ref, emit, S2Event.MERGED_CELLS_HOVER, "mergedCellsHover");
1976
+ useCellEvent(s2Ref, emit, S2Event.MERGED_CELLS_CLICK, "mergedCellsClick");
1977
+ useCellEvent(s2Ref, emit, S2Event.MERGED_CELLS_DOUBLE_CLICK, "mergedCellsDoubleClick");
1978
+ useCellEvent(s2Ref, emit, S2Event.MERGED_CELLS_CONTEXT_MENU, "mergedCellsContextMenu");
1979
+ useCellEvent(s2Ref, emit, S2Event.MERGED_CELLS_MOUSE_DOWN, "mergedCellsMouseDown");
1980
+ useCellEvent(s2Ref, emit, S2Event.MERGED_CELLS_MOUSE_UP, "mergedCellsMouseUp");
1981
+ useCellEvent(s2Ref, emit, S2Event.MERGED_CELLS_MOUSE_MOVE, "mergedCellsMouseMove");
1982
+ useS2Event(s2Ref, emit, S2Event.RANGE_SORT, "rangeSort");
1983
+ useS2Event(s2Ref, emit, S2Event.RANGE_SORTED, "rangeSorted");
1984
+ useS2Event(s2Ref, emit, S2Event.RANGE_FILTER, "rangeFilter");
1985
+ useS2Event(s2Ref, emit, S2Event.RANGE_FILTERED, "rangeFiltered");
1986
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_AFTER_HEADER_LAYOUT, "layoutAfterHeaderLayout");
1987
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_PAGINATION, "layoutPagination");
1988
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_CELL_SCROLL, "layoutCellScroll");
1989
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_AFTER_COLLAPSE_ROWS, "layoutAfterCollapseRows");
1990
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_TREE_ROWS_COLLAPSE_ALL, "collapseRowsAll");
1991
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_COLS_EXPANDED, "layoutColsExpanded");
1992
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_COLS_HIDDEN, "layoutColsHidden");
1993
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_BEFORE_RENDER, "beforeRender");
1994
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_AFTER_RENDER, "afterRender");
1995
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_DESTROY, "destroy");
1996
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_RESIZE, "layoutResize");
1997
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_RESIZE_SERIES_WIDTH, "layoutResizeSeriesWidth");
1998
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_RESIZE_ROW_WIDTH, "layoutResizeRowWidth");
1999
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_RESIZE_ROW_HEIGHT, "layoutResizeRowHeight");
2000
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_RESIZE_COL_WIDTH, "layoutResizeColWidth");
2001
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_RESIZE_COL_HEIGHT, "layoutResizeColHeight");
2002
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_RESIZE_TREE_WIDTH, "layoutResizeTreeWidth");
2003
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_RESIZE_MOUSE_DOWN, "layoutResizeMouseDown");
2004
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_RESIZE_MOUSE_UP, "layoutResizeMouseUp");
2005
+ useS2Event(s2Ref, emit, S2Event.LAYOUT_RESIZE_MOUSE_MOVE, "layoutResizeMouseMove");
2006
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_KEYBOARD_DOWN, "keyBoardDown");
2007
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_KEYBOARD_UP, "keyBoardUp");
2008
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_COPIED, "copied");
2009
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_ACTION_ICON_HOVER, "actionIconHover");
2010
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_ACTION_ICON_CLICK, "actionIconClick");
2011
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_CONTEXT_MENU, "contextMenu");
2012
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_HOVER, "mouseHover");
2013
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_CLICK, "click");
2014
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_DOUBLE_CLICK, "doubleClick");
2015
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_SELECTED, "selected");
2016
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_MOUSE_UP, "mouseUp");
2017
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_RESET, "reset");
2018
+ useS2Event(s2Ref, emit, S2Event.GLOBAL_LINK_FIELD_JUMP, "linkFieldJump");
2019
+ });
2020
+ };
2021
+ const useLoading = (s2Ref, loadingProp = false) => {
2022
+ const loading = ref(loadingProp);
2023
+ const setLoading = (updated) => {
2024
+ loading.value = updated;
2025
+ };
2026
+ watch(s2Ref, (s2) => {
2027
+ s2 == null ? void 0 : s2.on(S2Event.LAYOUT_BEFORE_RENDER, () => {
2028
+ setLoading(true);
2029
+ });
2030
+ s2 == null ? void 0 : s2.on(S2Event.LAYOUT_AFTER_RENDER, () => {
2031
+ setLoading(false);
2032
+ });
2033
+ });
2034
+ return { loading, setLoading };
2035
+ };
2036
+ const useSheetUpdate = (s2Ref, props) => {
2037
+ const updateFlag = reactive({
2038
+ rerender: false,
2039
+ reloadData: false,
2040
+ rebuildDataset: false
2041
+ });
2042
+ watch(() => props.options, (options, prevOptions) => {
2043
+ var _a, _b;
2044
+ updateFlag.rerender = true;
2045
+ if (!Object.is(prevOptions == null ? void 0 : prevOptions.hierarchyType, options == null ? void 0 : options.hierarchyType)) {
2046
+ updateFlag.reloadData = true;
2047
+ updateFlag.rebuildDataset = true;
2048
+ }
2049
+ (_a = s2Ref.value) == null ? void 0 : _a.setOptions(options);
2050
+ (_b = s2Ref.value) == null ? void 0 : _b.changeSheetSize(options == null ? void 0 : options.width, options == null ? void 0 : options.height);
2051
+ }, { deep: isProxy(props.options) });
2052
+ watch(() => props.dataCfg, (dataCfg) => {
2053
+ var _a;
2054
+ updateFlag.rerender = true;
2055
+ updateFlag.reloadData = true;
2056
+ (_a = s2Ref.value) == null ? void 0 : _a.setDataCfg(dataCfg);
2057
+ }, { deep: isProxy(props.dataCfg) });
2058
+ watch(() => props.themeCfg, (themeCfg) => {
2059
+ var _a;
2060
+ updateFlag.rerender = true;
2061
+ (_a = s2Ref.value) == null ? void 0 : _a.setThemeCfg(themeCfg);
2062
+ }, {
2063
+ deep: isProxy(props.themeCfg)
2064
+ });
2065
+ watch(updateFlag, (flag) => {
2066
+ var _a;
2067
+ if (!flag.rerender) {
2068
+ return;
2069
+ }
2070
+ (_a = s2Ref.value) == null ? void 0 : _a.render(flag.reloadData, {
2071
+ reBuildDataSet: flag.rebuildDataset
2072
+ });
2073
+ flag.rerender = false;
2074
+ flag.reloadData = false;
2075
+ flag.rebuildDataset = false;
2076
+ });
2077
+ };
2078
+ const useResize = (s2Ref, props, dom) => {
2079
+ const unobserve = ref();
2080
+ watch([s2Ref, () => props.adaptive], ([s2, adaptive], _, onCleanup) => {
2081
+ if (!s2) {
2082
+ return;
2083
+ }
2084
+ unobserve.value = createResizeObserver({
2085
+ s2,
2086
+ adaptive,
2087
+ wrapper: dom.wrapperRef.value,
2088
+ container: dom.containerRef.value
2089
+ });
2090
+ onCleanup(() => {
2091
+ var _a;
2092
+ (_a = unobserve.value) == null ? void 0 : _a.call(unobserve);
2093
+ });
2094
+ }, { deep: true });
2095
+ };
2096
+ function useSpreadSheet(props, emit) {
2097
+ const {
2098
+ dataCfg,
2099
+ options,
2100
+ themeCfg,
2101
+ loading: loadingProps,
2102
+ sheetType,
2103
+ onSpreadsheet,
2104
+ onGetSpreadSheet
2105
+ } = props;
2106
+ const wrapperRef = ref();
2107
+ const containerRef = ref();
2108
+ const s2Ref = shallowRef();
2109
+ const { loading, setLoading } = useLoading(s2Ref, loadingProps);
2110
+ const pagination = usePagination(s2Ref, props);
2111
+ const renderSpreadSheet = (container) => {
2112
+ const rawDataCfg = toRaw(dataCfg);
2113
+ const rawOptions = toRaw(options);
2114
+ const s2Options = getSheetComponentOptions(rawOptions);
2115
+ const s2Constructor = [container, rawDataCfg, s2Options];
2116
+ if (onSpreadsheet) {
2117
+ return onSpreadsheet(...s2Constructor);
2118
+ }
2119
+ if (sheetType === "table") {
2120
+ return new TableSheet$1(container, rawDataCfg, s2Options);
2121
+ }
2122
+ return new PivotSheet$1(container, rawDataCfg, s2Options);
2123
+ };
2124
+ const buildSpreadSheet = () => {
2125
+ setLoading(true);
2126
+ s2Ref.value = renderSpreadSheet(containerRef.value);
2127
+ s2Ref.value.setThemeCfg(toRaw(themeCfg));
2128
+ s2Ref.value.render();
2129
+ setLoading(false);
2130
+ onGetSpreadSheet == null ? void 0 : onGetSpreadSheet(s2Ref.value);
2131
+ };
2132
+ onMounted(buildSpreadSheet);
2133
+ useEvents(s2Ref, emit);
2134
+ useSheetUpdate(s2Ref, props);
2135
+ useResize(s2Ref, props, { wrapperRef, containerRef });
2136
+ onBeforeUnmount(() => {
2137
+ var _a;
2138
+ (_a = s2Ref.value) == null ? void 0 : _a.destroy();
2139
+ });
2140
+ return {
2141
+ wrapperRef,
2142
+ containerRef,
2143
+ s2Ref,
2144
+ loading,
2145
+ setLoading,
2146
+ pagination
2147
+ };
2148
+ }
2149
+ const initBaseSheetProps = () => ({
2150
+ sheetType: String,
2151
+ dataCfg: Object,
2152
+ themeCfg: Object,
2153
+ showPagination: {
2154
+ type: Object,
2155
+ default: false
2156
+ },
2157
+ loading: Boolean,
2158
+ partDrillDown: Object,
2159
+ header: Object,
2160
+ options: {
2161
+ type: Object,
2162
+ default: {}
2163
+ },
2164
+ adaptive: {
2165
+ type: Object,
2166
+ default: false
2167
+ },
2168
+ onSpreadsheet: Function,
2169
+ onGetSpreadSheet: Function
2170
+ });
2171
+ const initBaseSheetEmits = () => {
2172
+ const keys2 = [
2173
+ "spreadsheet",
2174
+ "getSpreadSheet",
2175
+ "rowCellHover",
2176
+ "rowCellClick",
2177
+ "rowCellDoubleClick",
2178
+ "rowCellMouseDown",
2179
+ "rowCellMouseUp",
2180
+ "rowCellMouseMove",
2181
+ "rowCellCollapseTreeRows",
2182
+ "colCellHover",
2183
+ "colCellClick",
2184
+ "colCellDoubleClick",
2185
+ "colCellMouseDown",
2186
+ "colCellMouseUp",
2187
+ "colCellMouseMove",
2188
+ "dataCellHover",
2189
+ "dataCellClick",
2190
+ "dataCellDoubleClick",
2191
+ "dataCellMouseDown",
2192
+ "dataCellMouseUp",
2193
+ "dataCellMouseMove",
2194
+ "dataCellTrendIconClick",
2195
+ "dataCellBrushSelection",
2196
+ "cornerCellHover",
2197
+ "cornerCellClick",
2198
+ "cornerCellDoubleClick",
2199
+ "cornerCellMouseDown",
2200
+ "cornerCellMouseUp",
2201
+ "cornerCellMouseMove",
2202
+ "mergedCellsHover",
2203
+ "mergedCellsClick",
2204
+ "mergedCellsDoubleClick",
2205
+ "mergedCellsMouseDown",
2206
+ "mergedCellsMouseUp",
2207
+ "mergedCellsMouseMove",
2208
+ "rangeSort",
2209
+ "rangeSorted",
2210
+ "rangeFilter",
2211
+ "rangeFiltered",
2212
+ "layoutAfterHeaderLayout",
2213
+ "layoutPagination",
2214
+ "layoutCellScroll",
2215
+ "layoutAfterCollapseRows",
2216
+ "collapseRowsAll",
2217
+ "layoutColsExpanded",
2218
+ "layoutColsHidden",
2219
+ "beforeRender",
2220
+ "afterRender",
2221
+ "destroy",
2222
+ "layoutResize",
2223
+ "layoutResizeSeriesWidth",
2224
+ "layoutResizeRowWidth",
2225
+ "layoutResizeRowHeight",
2226
+ "layoutResizeColWidth",
2227
+ "layoutResizeColHeight",
2228
+ "layoutResizeTreeWidth",
2229
+ "layoutResizeMouseDown",
2230
+ "layoutResizeMouseUp",
2231
+ "layoutResizeMouseMove",
2232
+ "keyBoardDown",
2233
+ "keyBoardUp",
2234
+ "copied",
2235
+ "actionIconHover",
2236
+ "contextMenu",
2237
+ "actionIconClick",
2238
+ "mouseHover",
2239
+ "mouseUp",
2240
+ "selected",
2241
+ "reset",
2242
+ "linkFieldJump"
2243
+ ];
2244
+ return keys2;
2245
+ };
2246
+ var baseSheet_vue_vue_type_style_index_0_lang = "";
2247
+ const _sfc_main$3 = defineComponent({
2248
+ name: "BaseSheet",
2249
+ props: initBaseSheetProps(),
2250
+ emits: initBaseSheetEmits(),
2251
+ setup(props, ctx) {
2252
+ const { wrapperRef, containerRef, s2Ref, loading, pagination } = useSpreadSheet(props, ctx.emit);
2253
+ ctx.expose({
2254
+ get instance() {
2255
+ return s2Ref.value;
2256
+ }
2257
+ });
2258
+ const handlePageChange = (nextCurrent) => {
2259
+ var _a, _b;
2260
+ if (props.showPagination && !isBoolean(props.showPagination)) {
2261
+ (_b = (_a = props.showPagination).onChange) == null ? void 0 : _b.call(_a, nextCurrent);
2262
+ }
2263
+ pagination.change(nextCurrent);
2264
+ };
2265
+ const handlePageSizeChange = (nextSize) => {
2266
+ var _a, _b;
2267
+ if (props.showPagination && !isBoolean(props.showPagination)) {
2268
+ (_b = (_a = props.showPagination).onShowSizeChange) == null ? void 0 : _b.call(_a, nextSize);
2269
+ }
2270
+ pagination.showSizeChange(nextSize);
2271
+ };
2272
+ return {
2273
+ S2_PREFIX_CLS,
2274
+ wrapperRef,
2275
+ containerRef,
2276
+ s2Ref,
2277
+ loading,
2278
+ pagination,
2279
+ handlePageChange,
2280
+ handlePageSizeChange
2281
+ };
2282
+ },
2283
+ components: {
2284
+ Spin,
2285
+ S2Pagination
2286
+ }
2287
+ });
2288
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
2289
+ const _component_S2Pagination = resolveComponent("S2Pagination");
2290
+ const _component_Spin = resolveComponent("Spin");
2291
+ return openBlock(), createBlock(_component_Spin, {
2292
+ wrapperClassName: _ctx.S2_PREFIX_CLS + "-spin",
2293
+ spinning: _ctx.loading
2294
+ }, {
2295
+ default: withCtx(() => [
2296
+ createElementVNode("div", {
2297
+ ref: "wrapperRef",
2298
+ class: normalizeClass(_ctx.S2_PREFIX_CLS + "-wrapper")
2299
+ }, [
2300
+ createElementVNode("div", {
2301
+ ref: "containerRef",
2302
+ class: normalizeClass(_ctx.S2_PREFIX_CLS + "-container")
2303
+ }, null, 2),
2304
+ _ctx.pagination.visible.value ? (openBlock(), createBlock(_component_S2Pagination, {
2305
+ key: 0,
2306
+ current: _ctx.pagination.current.value,
2307
+ pageSize: _ctx.pagination.pageSize.value,
2308
+ total: _ctx.pagination.total.value,
2309
+ onChange: _ctx.handlePageChange,
2310
+ onShowSizeChange: _ctx.handlePageSizeChange
2311
+ }, null, 8, ["current", "pageSize", "total", "onChange", "onShowSizeChange"])) : createCommentVNode("", true)
2312
+ ], 2)
2313
+ ]),
2314
+ _: 1
2315
+ }, 8, ["wrapperClassName", "spinning"]);
2316
+ }
2317
+ var BaseSheet = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
2318
+ const _sfc_main$2 = defineComponent({
2319
+ name: "PivotSheet",
2320
+ props: [],
2321
+ emits: [],
2322
+ setup(props, ctx) {
2323
+ const s2Ref = useExpose(ctx.expose);
2324
+ return { s2Ref };
2325
+ },
2326
+ components: {
2327
+ BaseSheet
2328
+ }
2329
+ });
2330
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
2331
+ const _component_BaseSheet = resolveComponent("BaseSheet");
2332
+ return openBlock(), createBlock(_component_BaseSheet, { ref: "s2Ref" }, null, 512);
2333
+ }
2334
+ var PivotSheet = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
2335
+ const _sfc_main$1 = defineComponent({
2336
+ name: "TableSheet",
2337
+ props: [],
2338
+ emits: [],
2339
+ setup(props, ctx) {
2340
+ const s2Ref = useExpose(ctx.expose);
2341
+ return { s2Ref };
2342
+ },
2343
+ components: {
2344
+ BaseSheet
2345
+ }
2346
+ });
2347
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
2348
+ const _component_BaseSheet = resolveComponent("BaseSheet");
2349
+ return openBlock(), createBlock(_component_BaseSheet, { ref: "s2Ref" }, null, 512);
2350
+ }
2351
+ var TableSheet = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
2352
+ const _sfc_main = defineComponent({
2353
+ name: "Sheet",
2354
+ props: [],
2355
+ emits: [],
2356
+ setup(props, ctx) {
2357
+ const s2Ref = useExpose(ctx.expose);
2358
+ const sheetType = computed(() => {
2359
+ const type = ctx.attrs.sheetType;
2360
+ switch (type) {
2361
+ case "table":
2362
+ return TableSheet;
2363
+ default:
2364
+ return PivotSheet;
2365
+ }
2366
+ });
2367
+ return { s2Ref, sheetType };
2368
+ },
2369
+ components: {
2370
+ PivotSheet,
2371
+ TableSheet
2372
+ }
2373
+ });
2374
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
2375
+ return openBlock(), createBlock(resolveDynamicComponent(_ctx.sheetType), { ref: "s2Ref" }, null, 512);
2376
+ }
2377
+ var index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
2378
+ export { BaseSheet, PivotSheet, index as Sheet, TableSheet, useExpose };
2379
+ //# sourceMappingURL=index.js.map