e-virt-table 1.2.9 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,29 +1,29 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(":root{--evt-header-font: 12px normal Arial;--evt-body-font: 12px normal Arial;--evt-color-white: #fff;--evt-color-black: #000000;--evt-color-primary: rgb(82, 146, 247);--evt-text-color-primary: #333;--evt-text-color-regular: #666;--evt-text-color-secondary: #999;--evt-box-shadow: 0 2px 12px 0 #0000001a;--evt-editor-bg-color: #fff;--evt-editor-text-color: #333;--evt-border-color: #e1e6eb;--evt-stripe-color: #fafafa;--evt-placeholder-color: #cdd0dc;--evt-header-bg-color: #f8faff;--evt-body-bg-color: #fff;--evt-header-text-color: #1d2129;--evt-body-text-color: #4e5969;--evt-footer-text-color: #4e5969;--evt-loading-icon-color: #4e5969;--evt-expand-icon-color: #4e5969;--evt-shrink-icon-color: #4e5969;--evt-error-tip-icon-color: red;--evt-cell-hover-icon-bg-color: #fff;--evt-cell-hover-icon-border-color: #dde0ea;--evt-scroller-color: #dee0e3;--evt-scroller-track-color: #fff;--evt-scroller-focus-color: #bbbec4;--evt-select-border-color: var(--evt-color-primary);--evt-select-area-color: rgba(82, 146, 247, .1);--evt-select-row-col-bg-color: transparent;--evt-autofill-point-border-color: #fff;--evt-edit-bg-color: #fcf6ed;--evt-checkbox-color: var(--evt-color-primary);--evt-readonly-color: #fff;--evt-readonly-text-color: var(--evt-body-text-color);--evt-error-tip-color: #ed3f14;--evt-footer-bg-color: #fafafa;--evt-highlight-hover-row-color: rgba(186, 203, 231, .1);--evt-highlight-selected-row-color: rgba(82, 146, 247, .1);--evt-tooltip-bg-color: #303133;--evt-tooltip-text-color: #fff;--evt-resize-row-line-color: #e1e6eb;--evt-resize-column-line-color: #e1e6eb}.dark{--evt-border-color: #363637;--evt-header-bg-color: #141414;--evt-body-bg-color: #141414;--evt-header-text-color: #a3a6ad;--evt-scroller-color: #414243;--evt-scroller-track-color: #141414;--evt-scroller-focus-color: #a3a6ad;--evt-edit-bg-color: #141414;--evt-readonly-text-color: #cfd3dc;--evt-footer-bg-color: #262727;--evt-autofill-point-border-color: #fff;--evt-editor-bg-color: #434343;--evt-editor-text-color: #cfd3dc}.e-virt-table-container{position:relative;outline:none}.e-virt-table-stage{position:relative;overflow:hidden;outline:none;box-sizing:border-box;z-index:10;border-radius:8px;border:1px solid var(--evt-border-color)}.e-virt-table-canvas{position:absolute;left:0;top:0;box-sizing:border-box;border:none;outline:none;z-index:10}.e-virt-table-editor{position:absolute;top:-10000px;left:-10000px;text-align:left;height:auto;line-height:0;z-index:100;overflow:hidden;background-color:var(--evt-editor-bg-color);border:2px solid var(--evt-color-primary);box-sizing:border-box;box-shadow:var(--evt-box-shadow);display:flex;align-items:center}.e-virt-table-overlayer{position:absolute;left:0;top:0;overflow:hidden;z-index:100;pointer-events:none}.e-virt-table-editor-textarea{width:100%;box-sizing:border-box;outline:none;font-weight:400;padding:8px;font-size:12px;color:inherit;white-space:pre-wrap;word-wrap:break-word;word-break:break-all;line-height:1.5;margin:0;border:none;vertical-align:middle;background:var(--evt-editor-bg-color);color:var(--evt-editor-text-color);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--evt-text-color-regular);background-color:var(--evt-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--evt-box-shadow);width:fit-content;padding:6px 0;z-index:9999;left:-99999px;top:-99999px}.e-virt-table-context-menu-item{cursor:pointer;padding:8px 24px;color:var(--evt-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--evt-color-primary);background-color:#f5f7fa}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
2
  var be = Object.defineProperty;
3
- var ve = (a, t, e) => t in a ? be(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
4
- var l = (a, t, e) => ve(a, typeof t != "symbol" ? t + "" : t, e);
3
+ var ve = (l, t, e) => t in l ? be(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
4
+ var a = (l, t, e) => ve(l, typeof t != "symbol" ? t + "" : t, e);
5
5
  function q() {
6
- return q = Object.assign ? Object.assign.bind() : function(a) {
6
+ return q = Object.assign ? Object.assign.bind() : function(l) {
7
7
  for (var t = 1; t < arguments.length; t++) {
8
8
  var e = arguments[t];
9
9
  for (var i in e)
10
- Object.prototype.hasOwnProperty.call(e, i) && (a[i] = e[i]);
10
+ Object.prototype.hasOwnProperty.call(e, i) && (l[i] = e[i]);
11
11
  }
12
- return a;
12
+ return l;
13
13
  }, q.apply(this, arguments);
14
14
  }
15
- function Re(a, t) {
16
- a.prototype = Object.create(t.prototype), a.prototype.constructor = a, st(a, t);
15
+ function Re(l, t) {
16
+ l.prototype = Object.create(t.prototype), l.prototype.constructor = l, st(l, t);
17
17
  }
18
- function Et(a) {
18
+ function Et(l) {
19
19
  return Et = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
20
20
  return e.__proto__ || Object.getPrototypeOf(e);
21
- }, Et(a);
21
+ }, Et(l);
22
22
  }
23
- function st(a, t) {
23
+ function st(l, t) {
24
24
  return st = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, s) {
25
25
  return i.__proto__ = s, i;
26
- }, st(a, t);
26
+ }, st(l, t);
27
27
  }
28
28
  function _e() {
29
29
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
@@ -35,7 +35,7 @@ function _e() {
35
35
  return !1;
36
36
  }
37
37
  }
38
- function dt(a, t, e) {
38
+ function dt(l, t, e) {
39
39
  return _e() ? dt = Reflect.construct.bind() : dt = function(s, r, o) {
40
40
  var n = [null];
41
41
  n.push.apply(n, r);
@@ -43,10 +43,10 @@ function dt(a, t, e) {
43
43
  return o && st(c, o.prototype), c;
44
44
  }, dt.apply(null, arguments);
45
45
  }
46
- function Ie(a) {
47
- return Function.toString.call(a).indexOf("[native code]") !== -1;
46
+ function Ie(l) {
47
+ return Function.toString.call(l).indexOf("[native code]") !== -1;
48
48
  }
49
- function Ct(a) {
49
+ function Ct(l) {
50
50
  var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
51
51
  return Ct = function(i) {
52
52
  if (i === null || !Ie(i)) return i;
@@ -67,7 +67,7 @@ function Ct(a) {
67
67
  configurable: !0
68
68
  }
69
69
  }), st(s, i);
70
- }, Ct(a);
70
+ }, Ct(l);
71
71
  }
72
72
  var Oe = /%[sdj%]/g, Ut = function() {
73
73
  };
@@ -76,22 +76,22 @@ typeof process < "u" && process.env && process.env.NODE_ENV !== "production" &&
76
76
  return typeof i == "string";
77
77
  }) && console.warn(t, e);
78
78
  });
79
- function bt(a) {
80
- if (!a || !a.length) return null;
79
+ function bt(l) {
80
+ if (!l || !l.length) return null;
81
81
  var t = {};
82
- return a.forEach(function(e) {
82
+ return l.forEach(function(e) {
83
83
  var i = e.field;
84
84
  t[i] = t[i] || [], t[i].push(e);
85
85
  }), t;
86
86
  }
87
- function D(a) {
87
+ function D(l) {
88
88
  for (var t = arguments.length, e = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
89
89
  e[i - 1] = arguments[i];
90
90
  var s = 0, r = e.length;
91
- if (typeof a == "function")
92
- return a.apply(null, e);
93
- if (typeof a == "string") {
94
- var o = a.replace(Oe, function(n) {
91
+ if (typeof l == "function")
92
+ return l.apply(null, e);
93
+ if (typeof l == "string") {
94
+ var o = l.replace(Oe, function(n) {
95
95
  if (n === "%%")
96
96
  return "%";
97
97
  if (s >= r)
@@ -114,105 +114,105 @@ function D(a) {
114
114
  });
115
115
  return o;
116
116
  }
117
- return a;
117
+ return l;
118
118
  }
119
- function Le(a) {
120
- return a === "string" || a === "url" || a === "hex" || a === "email" || a === "date" || a === "pattern";
119
+ function Le(l) {
120
+ return l === "string" || l === "url" || l === "hex" || l === "email" || l === "date" || l === "pattern";
121
121
  }
122
- function H(a, t) {
123
- return !!(a == null || t === "array" && Array.isArray(a) && !a.length || Le(t) && typeof a == "string" && !a);
122
+ function H(l, t) {
123
+ return !!(l == null || t === "array" && Array.isArray(l) && !l.length || Le(t) && typeof l == "string" && !l);
124
124
  }
125
- function Se(a, t, e) {
126
- var i = [], s = 0, r = a.length;
125
+ function Se(l, t, e) {
126
+ var i = [], s = 0, r = l.length;
127
127
  function o(n) {
128
128
  i.push.apply(i, n || []), s++, s === r && e(i);
129
129
  }
130
- a.forEach(function(n) {
130
+ l.forEach(function(n) {
131
131
  t(n, o);
132
132
  });
133
133
  }
134
- function Nt(a, t, e) {
135
- var i = 0, s = a.length;
134
+ function Bt(l, t, e) {
135
+ var i = 0, s = l.length;
136
136
  function r(o) {
137
137
  if (o && o.length) {
138
138
  e(o);
139
139
  return;
140
140
  }
141
141
  var n = i;
142
- i = i + 1, n < s ? t(a[n], r) : e([]);
142
+ i = i + 1, n < s ? t(l[n], r) : e([]);
143
143
  }
144
144
  r([]);
145
145
  }
146
- function Te(a) {
146
+ function Te(l) {
147
147
  var t = [];
148
- return Object.keys(a).forEach(function(e) {
149
- t.push.apply(t, a[e] || []);
148
+ return Object.keys(l).forEach(function(e) {
149
+ t.push.apply(t, l[e] || []);
150
150
  }), t;
151
151
  }
152
- var Ft = /* @__PURE__ */ function(a) {
153
- Re(t, a);
152
+ var Ft = /* @__PURE__ */ function(l) {
153
+ Re(t, l);
154
154
  function t(e, i) {
155
155
  var s;
156
- return s = a.call(this, "Async Validation Error") || this, s.errors = e, s.fields = i, s;
156
+ return s = l.call(this, "Async Validation Error") || this, s.errors = e, s.fields = i, s;
157
157
  }
158
158
  return t;
159
159
  }(/* @__PURE__ */ Ct(Error));
160
- function Ae(a, t, e, i, s) {
160
+ function Ae(l, t, e, i, s) {
161
161
  if (t.first) {
162
162
  var r = new Promise(function(x, g) {
163
- var m = function(p) {
164
- return i(p), p.length ? g(new Ft(p, bt(p))) : x(s);
165
- }, u = Te(a);
166
- Nt(u, e, m);
163
+ var p = function(m) {
164
+ return i(m), m.length ? g(new Ft(m, bt(m))) : x(s);
165
+ }, u = Te(l);
166
+ Bt(u, e, p);
167
167
  });
168
168
  return r.catch(function(x) {
169
169
  return x;
170
170
  }), r;
171
171
  }
172
- var o = t.firstFields === !0 ? Object.keys(a) : t.firstFields || [], n = Object.keys(a), h = n.length, c = 0, d = [], f = new Promise(function(x, g) {
173
- var m = function(w) {
172
+ var o = t.firstFields === !0 ? Object.keys(l) : t.firstFields || [], n = Object.keys(l), h = n.length, c = 0, d = [], f = new Promise(function(x, g) {
173
+ var p = function(w) {
174
174
  if (d.push.apply(d, w), c++, c === h)
175
175
  return i(d), d.length ? g(new Ft(d, bt(d))) : x(s);
176
176
  };
177
177
  n.length || (i(d), x(s)), n.forEach(function(u) {
178
- var w = a[u];
179
- o.indexOf(u) !== -1 ? Nt(w, e, m) : Se(w, e, m);
178
+ var w = l[u];
179
+ o.indexOf(u) !== -1 ? Bt(w, e, p) : Se(w, e, p);
180
180
  });
181
181
  });
182
182
  return f.catch(function(x) {
183
183
  return x;
184
184
  }), f;
185
185
  }
186
- function Me(a) {
187
- return !!(a && a.message !== void 0);
186
+ function Me(l) {
187
+ return !!(l && l.message !== void 0);
188
188
  }
189
- function He(a, t) {
190
- for (var e = a, i = 0; i < t.length; i++) {
189
+ function He(l, t) {
190
+ for (var e = l, i = 0; i < t.length; i++) {
191
191
  if (e == null)
192
192
  return e;
193
193
  e = e[t[i]];
194
194
  }
195
195
  return e;
196
196
  }
197
- function Bt(a, t) {
197
+ function Nt(l, t) {
198
198
  return function(e) {
199
199
  var i;
200
- return a.fullFields ? i = He(t, a.fullFields) : i = t[e.field || a.fullField], Me(e) ? (e.field = e.field || a.fullField, e.fieldValue = i, e) : {
200
+ return l.fullFields ? i = He(t, l.fullFields) : i = t[e.field || l.fullField], Me(e) ? (e.field = e.field || l.fullField, e.fieldValue = i, e) : {
201
201
  message: typeof e == "function" ? e() : e,
202
202
  fieldValue: i,
203
- field: e.field || a.fullField
203
+ field: e.field || l.fullField
204
204
  };
205
205
  };
206
206
  }
207
- function kt(a, t) {
207
+ function kt(l, t) {
208
208
  if (t) {
209
209
  for (var e in t)
210
210
  if (t.hasOwnProperty(e)) {
211
211
  var i = t[e];
212
- typeof i == "object" && typeof a[e] == "object" ? a[e] = q({}, a[e], i) : a[e] = i;
212
+ typeof i == "object" && typeof l[e] == "object" ? l[e] = q({}, l[e], i) : l[e] = i;
213
213
  }
214
214
  }
215
- return a;
215
+ return l;
216
216
  }
217
217
  var Zt = function(t, e, i, s, r, o) {
218
218
  t.required && (!i.hasOwnProperty(t.field) || H(e, o || t.type)) && s.push(D(r.messages.required, t.fullField));
@@ -221,8 +221,8 @@ var Zt = function(t, e, i, s, r, o) {
221
221
  }, ct, Xe = function() {
222
222
  if (ct)
223
223
  return ct;
224
- var a = "[a-fA-F\\d:]", t = function(b) {
225
- return b && b.includeBoundaries ? "(?:(?<=\\s|^)(?=" + a + ")|(?<=" + a + ")(?=\\s|$))" : "";
224
+ var l = "[a-fA-F\\d:]", t = function(C) {
225
+ return C && C.includeBoundaries ? "(?:(?<=\\s|^)(?=" + l + ")|(?<=" + l + ")(?=\\s|$))" : "";
226
226
  }, e = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", i = "[a-fA-F\\d]{1,4}", s = (`
227
227
  (?:
228
228
  (?:` + i + ":){7}(?:" + i + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
@@ -234,16 +234,16 @@ var Zt = function(t, e, i, s, r, o) {
234
234
  (?:` + i + ":){1}(?:(?::" + i + "){0,4}:" + e + "|(?::" + i + `){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
235
235
  (?::(?:(?::` + i + "){0,5}:" + e + "|(?::" + i + `){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
236
236
  )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
237
- `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), r = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), o = new RegExp("^" + e + "$"), n = new RegExp("^" + s + "$"), h = function(b) {
238
- return b && b.exact ? r : new RegExp("(?:" + t(b) + e + t(b) + ")|(?:" + t(b) + s + t(b) + ")", "g");
237
+ `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), r = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), o = new RegExp("^" + e + "$"), n = new RegExp("^" + s + "$"), h = function(C) {
238
+ return C && C.exact ? r : new RegExp("(?:" + t(C) + e + t(C) + ")|(?:" + t(C) + s + t(C) + ")", "g");
239
239
  };
240
240
  h.v4 = function(y) {
241
241
  return y && y.exact ? o : new RegExp("" + t(y) + e + t(y), "g");
242
242
  }, h.v6 = function(y) {
243
243
  return y && y.exact ? n : new RegExp("" + t(y) + s + t(y), "g");
244
244
  };
245
- var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", f = h.v4().source, x = h.v6().source, g = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", m = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", u = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", p = '(?:[/?#][^\\s"]*)?', C = "(?:" + c + "|www\\.)" + d + "(?:localhost|" + f + "|" + x + "|" + g + m + u + ")" + w + p;
246
- return ct = new RegExp("(?:^" + C + "$)", "i"), ct;
245
+ var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", f = h.v4().source, x = h.v6().source, g = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", u = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", m = '(?:[/?#][^\\s"]*)?', b = "(?:" + c + "|www\\.)" + d + "(?:localhost|" + f + "|" + x + "|" + g + p + u + ")" + w + m;
246
+ return ct = new RegExp("(?:^" + b + "$)", "i"), ct;
247
247
  }, Kt = {
248
248
  // http://emailregex.com/
249
249
  email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
@@ -292,7 +292,7 @@ var Zt = function(t, e, i, s, r, o) {
292
292
  hex: function(t) {
293
293
  return typeof t == "string" && !!t.match(Kt.hex);
294
294
  }
295
- }, Ne = function(t, e, i, s, r) {
295
+ }, Be = function(t, e, i, s, r) {
296
296
  if (t.required && e === void 0) {
297
297
  Zt(t, e, i, s, r);
298
298
  return;
@@ -300,11 +300,11 @@ var Zt = function(t, e, i, s, r, o) {
300
300
  var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], n = t.type;
301
301
  o.indexOf(n) > -1 ? et[n](e) || s.push(D(r.messages.types[n], t.fullField, t.type)) : n && typeof e !== t.type && s.push(D(r.messages.types[n], t.fullField, t.type));
302
302
  }, Fe = function(t, e, i, s, r) {
303
- var o = typeof t.len == "number", n = typeof t.min == "number", h = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = e, f = null, x = typeof e == "number", g = typeof e == "string", m = Array.isArray(e);
304
- if (x ? f = "number" : g ? f = "string" : m && (f = "array"), !f)
303
+ var o = typeof t.len == "number", n = typeof t.min == "number", h = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = e, f = null, x = typeof e == "number", g = typeof e == "string", p = Array.isArray(e);
304
+ if (x ? f = "number" : g ? f = "string" : p && (f = "array"), !f)
305
305
  return !1;
306
- m && (d = e.length), g && (d = e.replace(c, "_").length), o ? d !== t.len && s.push(D(r.messages[f].len, t.fullField, t.len)) : n && !h && d < t.min ? s.push(D(r.messages[f].min, t.fullField, t.min)) : h && !n && d > t.max ? s.push(D(r.messages[f].max, t.fullField, t.max)) : n && h && (d < t.min || d > t.max) && s.push(D(r.messages[f].range, t.fullField, t.min, t.max));
307
- }, j = "enum", Be = function(t, e, i, s, r) {
306
+ p && (d = e.length), g && (d = e.replace(c, "_").length), o ? d !== t.len && s.push(D(r.messages[f].len, t.fullField, t.len)) : n && !h && d < t.min ? s.push(D(r.messages[f].min, t.fullField, t.min)) : h && !n && d > t.max ? s.push(D(r.messages[f].max, t.fullField, t.max)) : n && h && (d < t.min || d > t.max) && s.push(D(r.messages[f].range, t.fullField, t.min, t.max));
307
+ }, j = "enum", Ne = function(t, e, i, s, r) {
308
308
  t[j] = Array.isArray(t[j]) ? t[j] : [], t[j].indexOf(e) === -1 && s.push(D(r.messages[j], t.fullField, t[j].join(", ")));
309
309
  }, ke = function(t, e, i, s, r) {
310
310
  if (t.pattern) {
@@ -318,9 +318,9 @@ var Zt = function(t, e, i, s, r, o) {
318
318
  }, L = {
319
319
  required: Zt,
320
320
  whitespace: De,
321
- type: Ne,
321
+ type: Be,
322
322
  range: Fe,
323
- enum: Be,
323
+ enum: Ne,
324
324
  pattern: ke
325
325
  }, Ke = function(t, e, i, s, r) {
326
326
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
@@ -513,10 +513,10 @@ function vt() {
513
513
  };
514
514
  }
515
515
  var Rt = vt(), nt = /* @__PURE__ */ function() {
516
- function a(e) {
516
+ function l(e) {
517
517
  this.rules = null, this._messages = Rt, this.define(e);
518
518
  }
519
- var t = a.prototype;
519
+ var t = l.prototype;
520
520
  return t.define = function(i) {
521
521
  var s = this;
522
522
  if (!i)
@@ -537,17 +537,17 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
537
537
  if (typeof h == "function" && (c = h, h = {}), !this.rules || Object.keys(this.rules).length === 0)
538
538
  return c && c(null, n), Promise.resolve(n);
539
539
  function d(u) {
540
- var w = [], p = {};
541
- function C(b) {
542
- if (Array.isArray(b)) {
540
+ var w = [], m = {};
541
+ function b(C) {
542
+ if (Array.isArray(C)) {
543
543
  var E;
544
- w = (E = w).concat.apply(E, b);
544
+ w = (E = w).concat.apply(E, C);
545
545
  } else
546
- w.push(b);
546
+ w.push(C);
547
547
  }
548
548
  for (var y = 0; y < u.length; y++)
549
- C(u[y]);
550
- w.length ? (p = bt(w), c(w, p)) : c(null, n);
549
+ b(u[y]);
550
+ w.length ? (m = bt(w), c(w, m)) : c(null, n);
551
551
  }
552
552
  if (h.messages) {
553
553
  var f = this.messages();
@@ -556,51 +556,51 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
556
556
  h.messages = this.messages();
557
557
  var x = {}, g = h.keys || Object.keys(this.rules);
558
558
  g.forEach(function(u) {
559
- var w = o.rules[u], p = n[u];
560
- w.forEach(function(C) {
561
- var y = C;
562
- typeof y.transform == "function" && (n === i && (n = q({}, n)), p = n[u] = y.transform(p)), typeof y == "function" ? y = {
559
+ var w = o.rules[u], m = n[u];
560
+ w.forEach(function(b) {
561
+ var y = b;
562
+ typeof y.transform == "function" && (n === i && (n = q({}, n)), m = n[u] = y.transform(m)), typeof y == "function" ? y = {
563
563
  validator: y
564
564
  } : y = q({}, y), y.validator = o.getValidationMethod(y), y.validator && (y.field = u, y.fullField = y.fullField || u, y.type = o.getType(y), x[u] = x[u] || [], x[u].push({
565
565
  rule: y,
566
- value: p,
566
+ value: m,
567
567
  source: n,
568
568
  field: u
569
569
  }));
570
570
  });
571
571
  });
572
- var m = {};
572
+ var p = {};
573
573
  return Ae(x, h, function(u, w) {
574
- var p = u.rule, C = (p.type === "object" || p.type === "array") && (typeof p.fields == "object" || typeof p.defaultField == "object");
575
- C = C && (p.required || !p.required && u.value), p.field = u.field;
574
+ var m = u.rule, b = (m.type === "object" || m.type === "array") && (typeof m.fields == "object" || typeof m.defaultField == "object");
575
+ b = b && (m.required || !m.required && u.value), m.field = u.field;
576
576
  function y(R, O) {
577
577
  return q({}, O, {
578
- fullField: p.fullField + "." + R,
579
- fullFields: p.fullFields ? [].concat(p.fullFields, [R]) : [R]
578
+ fullField: m.fullField + "." + R,
579
+ fullFields: m.fullFields ? [].concat(m.fullFields, [R]) : [R]
580
580
  });
581
581
  }
582
- function b(R) {
582
+ function C(R) {
583
583
  R === void 0 && (R = []);
584
584
  var O = Array.isArray(R) ? R : [R];
585
- !h.suppressWarning && O.length && a.warning("async-validator:", O), O.length && p.message !== void 0 && (O = [].concat(p.message));
586
- var I = O.map(Bt(p, n));
585
+ !h.suppressWarning && O.length && l.warning("async-validator:", O), O.length && m.message !== void 0 && (O = [].concat(m.message));
586
+ var I = O.map(Nt(m, n));
587
587
  if (h.first && I.length)
588
- return m[p.field] = 1, w(I);
589
- if (!C)
588
+ return p[m.field] = 1, w(I);
589
+ if (!b)
590
590
  w(I);
591
591
  else {
592
- if (p.required && !u.value)
593
- return p.message !== void 0 ? I = [].concat(p.message).map(Bt(p, n)) : h.error && (I = [h.error(p, D(h.messages.required, p.field))]), w(I);
592
+ if (m.required && !u.value)
593
+ return m.message !== void 0 ? I = [].concat(m.message).map(Nt(m, n)) : h.error && (I = [h.error(m, D(h.messages.required, m.field))]), w(I);
594
594
  var _ = {};
595
- p.defaultField && Object.keys(u.value).map(function(T) {
596
- _[T] = p.defaultField;
595
+ m.defaultField && Object.keys(u.value).map(function(T) {
596
+ _[T] = m.defaultField;
597
597
  }), _ = q({}, _, u.rule.fields);
598
598
  var v = {};
599
599
  Object.keys(_).forEach(function(T) {
600
600
  var M = _[T], A = Array.isArray(M) ? M : [M];
601
601
  v[T] = A.map(y.bind(null, T));
602
602
  });
603
- var S = new a(v);
603
+ var S = new l(v);
604
604
  S.messages(h.messages), u.rule.options && (u.rule.options.messages = h.messages, u.rule.options.error = h.error), S.validate(u.value, u.rule.options || h, function(T) {
605
605
  var M = [];
606
606
  I && I.length && M.push.apply(M, I), T && T.length && M.push.apply(M, T), w(M.length ? M : null);
@@ -608,22 +608,22 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
608
608
  }
609
609
  }
610
610
  var E;
611
- if (p.asyncValidator)
612
- E = p.asyncValidator(p, u.value, b, u.source, h);
613
- else if (p.validator) {
611
+ if (m.asyncValidator)
612
+ E = m.asyncValidator(m, u.value, C, u.source, h);
613
+ else if (m.validator) {
614
614
  try {
615
- E = p.validator(p, u.value, b, u.source, h);
615
+ E = m.validator(m, u.value, C, u.source, h);
616
616
  } catch (R) {
617
617
  console.error == null || console.error(R), h.suppressValidatorError || setTimeout(function() {
618
618
  throw R;
619
- }, 0), b(R.message);
619
+ }, 0), C(R.message);
620
620
  }
621
- E === !0 ? b() : E === !1 ? b(typeof p.message == "function" ? p.message(p.fullField || p.field) : p.message || (p.fullField || p.field) + " fails") : E instanceof Array ? b(E) : E instanceof Error && b(E.message);
621
+ E === !0 ? C() : E === !1 ? C(typeof m.message == "function" ? m.message(m.fullField || m.field) : m.message || (m.fullField || m.field) + " fails") : E instanceof Array ? C(E) : E instanceof Error && C(E.message);
622
622
  }
623
623
  E && E.then && E.then(function() {
624
- return b();
624
+ return C();
625
625
  }, function(R) {
626
- return b(R);
626
+ return C(R);
627
627
  });
628
628
  }, function(u) {
629
629
  d(u);
@@ -637,7 +637,7 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
637
637
  return i.validator;
638
638
  var s = Object.keys(i), r = s.indexOf("message");
639
639
  return r !== -1 && s.splice(r, 1), s.length === 1 && s[0] === "required" ? it.required : it[this.getType(i)] || void 0;
640
- }, a;
640
+ }, l;
641
641
  }();
642
642
  nt.register = function(t, e) {
643
643
  if (typeof e != "function")
@@ -648,26 +648,26 @@ nt.warning = Ut;
648
648
  nt.messages = Rt;
649
649
  nt.validators = it;
650
650
  function Jt() {
651
- return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(a) {
651
+ return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(l) {
652
652
  const t = Math.random() * 16 | 0;
653
- return (a === "x" ? t : t & 3 | 8).toString(16);
653
+ return (l === "x" ? t : t & 3 | 8).toString(16);
654
654
  });
655
655
  }
656
- function Qt(a, t) {
656
+ function Qt(l, t) {
657
657
  let e = 0, i;
658
658
  return function(...s) {
659
659
  const r = (/* @__PURE__ */ new Date()).getTime(), o = r - e;
660
- !e || o >= t ? (a.apply(this, s), e = r) : i || (i = setTimeout(() => {
661
- a.apply(this, s), e = (/* @__PURE__ */ new Date()).getTime(), i = void 0;
660
+ !e || o >= t ? (l.apply(this, s), e = r) : i || (i = setTimeout(() => {
661
+ l.apply(this, s), e = (/* @__PURE__ */ new Date()).getTime(), i = void 0;
662
662
  }, t - o));
663
663
  };
664
664
  }
665
- function te(a = []) {
666
- return a.length ? a.map((t) => te(t.children) + 1).sort((t, e) => e - t)[0] : 0;
665
+ function te(l = []) {
666
+ return l.length ? l.map((t) => te(t.children) + 1).sort((t, e) => e - t)[0] : 0;
667
667
  }
668
- function ei(a = []) {
668
+ function ei(l = []) {
669
669
  let t = [], e = [], i = [];
670
- return a.forEach((s) => {
670
+ return l.forEach((s) => {
671
671
  s.fixed === "left" ? t.push(s) : s.fixed === "right" ? i.push(s) : e.push(s);
672
672
  }), [
673
673
  ...t.sort((s, r) => (s.sort ?? 0) - (r.sort ?? 0)),
@@ -675,8 +675,8 @@ function ei(a = []) {
675
675
  ...i.sort((s, r) => (s.sort ?? 0) - (r.sort ?? 0))
676
676
  ];
677
677
  }
678
- function ee(a = [], t = 1, e = 0) {
679
- return a.map((i) => {
678
+ function ee(l = [], t = 1, e = 0) {
679
+ return l.map((i) => {
680
680
  if (i.children) {
681
681
  let s = 0, r = i.fixed;
682
682
  i.children.forEach((n) => {
@@ -702,72 +702,72 @@ function ee(a = [], t = 1, e = 0) {
702
702
  };
703
703
  });
704
704
  }
705
- function _t(a = []) {
705
+ function _t(l = []) {
706
706
  let t = [];
707
- return a.forEach((e) => {
707
+ return l.forEach((e) => {
708
708
  e.children ? t = t.concat(_t(e.children)) : t.push(e);
709
709
  }), t;
710
710
  }
711
711
  const Yt = /^(\r\n|\n\r|\r|\n)/, ii = /^[^\t\r\n]+/, Vt = /^\t/;
712
- function si(a) {
712
+ function si(l) {
713
713
  let t = [[""]];
714
- if (a.length === 0)
714
+ if (l.length === 0)
715
715
  return t;
716
716
  let e = 0, i = 0, s;
717
- for (; a.length > 0 && s !== a.length; )
718
- if (s = a.length, a.match(Vt))
719
- a = a.replace(Vt, ""), e += 1, t[i][e] = "";
720
- else if (a.match(Yt))
721
- a = a.replace(Yt, ""), e = 0, i += 1, t[i] = [""];
717
+ for (; l.length > 0 && s !== l.length; )
718
+ if (s = l.length, l.match(Vt))
719
+ l = l.replace(Vt, ""), e += 1, t[i][e] = "";
720
+ else if (l.match(Yt))
721
+ l = l.replace(Yt, ""), e = 0, i += 1, t[i] = [""];
722
722
  else {
723
723
  let r = "";
724
- if (a.startsWith('"')) {
724
+ if (l.startsWith('"')) {
725
725
  let o = 0, n = !0;
726
726
  for (; n; ) {
727
- const h = a.slice(0, 1);
728
- h === '"' && (o += 1), r += h, a = a.slice(1), (a.length === 0 || a.match(/^[\t\r\n]/) && o % 2 === 0) && (n = !1);
727
+ const h = l.slice(0, 1);
728
+ h === '"' && (o += 1), r += h, l = l.slice(1), (l.length === 0 || l.match(/^[\t\r\n]/) && o % 2 === 0) && (n = !1);
729
729
  }
730
730
  r = r.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (h) => new Array(Math.floor(h.length / 2)).fill('"').join(""));
731
731
  } else {
732
- const o = a.match(ii);
733
- r = o ? o[0] : "", a = a.slice(r.length);
732
+ const o = l.match(ii);
733
+ r = o ? o[0] : "", l = l.slice(r.length);
734
734
  }
735
735
  t[i][e] = r;
736
736
  }
737
737
  return Array.isArray(t) && t.length > 1 && t[t.length - 1].length === 1 && t[t.length - 1][0] === "" && (t = t.slice(0, t.length - 1)), t;
738
738
  }
739
- function ri(a) {
739
+ function ri(l) {
740
740
  let t, e, i, s, r = "", o;
741
- for (t = 0, e = a.length; t < e; t += 1) {
742
- for (s = a[t].length, i = 0; i < s; i += 1)
743
- i > 0 && (r += " "), o = a[t][i], typeof o == "string" ? o.indexOf(`
741
+ for (t = 0, e = l.length; t < e; t += 1) {
742
+ for (s = l[t].length, i = 0; i < s; i += 1)
743
+ i > 0 && (r += " "), o = l[t][i], typeof o == "string" ? o.indexOf(`
744
744
  `) > -1 ? r += `"${o.replace(/"/g, '""')}"` : r += o : o == null ? r += "" : r += o;
745
745
  t !== e - 1 && (r += `
746
746
  `);
747
747
  }
748
748
  return r;
749
749
  }
750
- function ie(a, t, e = []) {
750
+ function ie(l, t, e = []) {
751
751
  let i = 0;
752
752
  const s = [];
753
- return a.forEach((r, o) => {
753
+ return l.forEach((r, o) => {
754
754
  if (o === 0)
755
755
  s.push(1);
756
756
  else {
757
- const n = e.reduce((c, d) => `${c}${r[d] ?? ""}`, "") || r[t], h = e.reduce((c, d) => `${c}${a[o - 1][d] ?? ""}`, "") || a[o - 1][t];
757
+ const n = e.reduce((c, d) => `${c}${r[d] ?? ""}`, "") || r[t], h = e.reduce((c, d) => `${c}${l[o - 1][d] ?? ""}`, "") || l[o - 1][t];
758
758
  n === h ? (s[i] += 1, s.push(0)) : (s.push(1), i = o);
759
759
  }
760
760
  }), s;
761
761
  }
762
- function se(a, t) {
762
+ function se(l, t) {
763
763
  let e = "", i = "";
764
764
  const s = {};
765
765
  return t.forEach((r, o) => {
766
- o === 0 ? (e = r.key, i = r.key, s[r.key] = 1) : a[r.key] === a[e] ? (s[r.key] = 0, s[i] += 1) : (s[r.key] = 1, e = r.key, i = r.key);
766
+ o === 0 ? (e = r.key, i = r.key, s[r.key] = 1) : l[r.key] === l[e] ? (s[r.key] = 0, s[i] += 1) : (s[r.key] = 1, e = r.key, i = r.key);
767
767
  }), s;
768
768
  }
769
- function oi(a, t, e = []) {
770
- const { visibleRows: i, rowIndex: s, headIndex: r } = a, o = ie(i, t, e);
769
+ function oi(l, t, e = []) {
770
+ const { visibleRows: i, rowIndex: s, headIndex: r } = l, o = ie(i, t, e);
771
771
  return o[s - r] === 0 ? {
772
772
  rowspan: 0,
773
773
  colspan: 0,
@@ -780,8 +780,8 @@ function oi(a, t, e = []) {
780
780
  mergeRow: !0
781
781
  };
782
782
  }
783
- function ni(a, t = []) {
784
- const { column: e, row: i, visibleLeafColumns: s } = a, r = s.filter((o) => t.includes(o.key));
783
+ function ni(l, t = []) {
784
+ const { column: e, row: i, visibleLeafColumns: s } = l, r = s.filter((o) => t.includes(o.key));
785
785
  if (t.includes(e.key)) {
786
786
  const o = se(i, r);
787
787
  return o[e.key] === 0 ? {
@@ -797,19 +797,19 @@ function ni(a, t = []) {
797
797
  };
798
798
  }
799
799
  }
800
- function ai(a, t = document.documentElement) {
801
- const e = a.startsWith("--") ? a : `--${a}`;
800
+ function ai(l, t = document.documentElement) {
801
+ const e = l.startsWith("--") ? l : `--${l}`;
802
802
  return getComputedStyle(t).getPropertyValue(e).trim();
803
803
  }
804
804
  class re {
805
805
  constructor(t, e, i, s, r, o, n) {
806
- l(this, "ctx");
807
- l(this, "x", 0);
808
- l(this, "y", 0);
809
- l(this, "width", 0);
810
- l(this, "height", 0);
811
- l(this, "fixed");
812
- l(this, "cellType");
806
+ a(this, "ctx");
807
+ a(this, "x", 0);
808
+ a(this, "y", 0);
809
+ a(this, "width", 0);
810
+ a(this, "height", 0);
811
+ a(this, "fixed");
812
+ a(this, "cellType");
813
813
  this.ctx = t, this.x = e, this.y = i, this.width = s, this.height = r, this.fixed = n, this.cellType = o;
814
814
  }
815
815
  isHorizontalVisible() {
@@ -850,62 +850,62 @@ class re {
850
850
  class At extends re {
851
851
  constructor(e, i, s, r, o, n, h, c, d, f = "body") {
852
852
  super(e, r, o, n, h, f, c.fixed);
853
- l(this, "formatter");
854
- l(this, "formatterFooter");
855
- l(this, "hoverIconName", "");
856
- l(this, "operation", !1);
857
- l(this, "align");
858
- l(this, "verticalAlign");
859
- l(this, "fixed");
860
- l(this, "type");
861
- l(this, "editorType");
862
- l(this, "editorProps");
863
- l(this, "cellType");
864
- l(this, "level");
865
- l(this, "colspan", 1);
866
- l(this, "rowspan", 1);
867
- l(this, "mergeRow", !1);
868
- l(this, "mergeCol", !1);
869
- l(this, "relationRowKeys", []);
853
+ a(this, "formatter");
854
+ a(this, "formatterFooter");
855
+ a(this, "hoverIconName", "");
856
+ a(this, "operation", !1);
857
+ a(this, "align");
858
+ a(this, "verticalAlign");
859
+ a(this, "fixed");
860
+ a(this, "type");
861
+ a(this, "editorType");
862
+ a(this, "editorProps");
863
+ a(this, "cellType");
864
+ a(this, "level");
865
+ a(this, "colspan", 1);
866
+ a(this, "rowspan", 1);
867
+ a(this, "mergeRow", !1);
868
+ a(this, "mergeCol", !1);
869
+ a(this, "relationRowKeys", []);
870
870
  // 合并单元格关联key
871
- l(this, "relationColKeys", []);
871
+ a(this, "relationColKeys", []);
872
872
  // 合并单元格关联key
873
- l(this, "key");
874
- l(this, "column");
875
- l(this, "rowIndex");
876
- l(this, "colIndex");
877
- l(this, "rowKey");
878
- l(this, "row");
879
- l(this, "value");
880
- l(this, "render");
881
- l(this, "renderFooter");
882
- l(this, "style", {});
883
- l(this, "rules", []);
884
- l(this, "message", "");
885
- l(this, "text", "");
886
- l(this, "displayText", "");
887
- l(this, "visibleWidth", 0);
888
- l(this, "visibleHeight", 0);
889
- l(this, "isHasChanged", !1);
890
- l(this, "drawX", 0);
891
- l(this, "drawY", 0);
892
- l(this, "drawCellBgColor", "");
893
- l(this, "drawCellSkyBgColor", "");
894
- l(this, "drawTextColor", "");
895
- l(this, "drawTextX", 0);
896
- l(this, "drawTextY", 0);
897
- l(this, "drawImageX", 0);
898
- l(this, "drawImageY", 0);
899
- l(this, "drawImageWidth", 0);
900
- l(this, "drawImageHeight", 0);
901
- l(this, "drawImageName", "");
902
- l(this, "drawImageSource");
903
- l(this, "ellipsis", !1);
904
- l(this, "rowExpand", !1);
905
- l(this, "rowHasChildren", !1);
906
- l(this, "overflowTooltipShow", !0);
907
- l(this, "overflowTooltipMaxWidth", 500);
908
- l(this, "overflowTooltipPlacement", "top");
873
+ a(this, "key");
874
+ a(this, "column");
875
+ a(this, "rowIndex");
876
+ a(this, "colIndex");
877
+ a(this, "rowKey");
878
+ a(this, "row");
879
+ a(this, "value");
880
+ a(this, "render");
881
+ a(this, "renderFooter");
882
+ a(this, "style", {});
883
+ a(this, "rules", []);
884
+ a(this, "message", "");
885
+ a(this, "text", "");
886
+ a(this, "displayText", "");
887
+ a(this, "visibleWidth", 0);
888
+ a(this, "visibleHeight", 0);
889
+ a(this, "isHasChanged", !1);
890
+ a(this, "drawX", 0);
891
+ a(this, "drawY", 0);
892
+ a(this, "drawCellBgColor", "");
893
+ a(this, "drawCellSkyBgColor", "");
894
+ a(this, "drawTextColor", "");
895
+ a(this, "drawTextX", 0);
896
+ a(this, "drawTextY", 0);
897
+ a(this, "drawImageX", 0);
898
+ a(this, "drawImageY", 0);
899
+ a(this, "drawImageWidth", 0);
900
+ a(this, "drawImageHeight", 0);
901
+ a(this, "drawImageName", "");
902
+ a(this, "drawImageSource");
903
+ a(this, "ellipsis", !1);
904
+ a(this, "rowExpand", !1);
905
+ a(this, "rowHasChildren", !1);
906
+ a(this, "overflowTooltipShow", !0);
907
+ a(this, "overflowTooltipMaxWidth", 500);
908
+ a(this, "overflowTooltipPlacement", "top");
909
909
  this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = c.key, this.type = c.type || "", this.editorType = c.editorType || "text", this.editorProps = c.editorProps || {}, this.cellType = f, this.align = c.align || "center", this.verticalAlign = c.verticalAlign || "middle", this.fixed = c.fixed, this.level = c.level || 0, this.operation = c.operation || !1, this.column = c, this.rules = c.rules || [], this.row = d, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = c.render, this.overflowTooltipShow = c.overflowTooltipShow !== !1, this.overflowTooltipMaxWidth = c.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = c.overflowTooltipPlacement || "top", this.renderFooter = c.renderFooter, this.hoverIconName = c.hoverIconName, this.formatter = c.formatter, this.formatterFooter = c.formatterFooter, this.update();
910
910
  }
911
911
  setWidthHeight(e, i) {
@@ -1028,10 +1028,10 @@ class At extends re {
1028
1028
  r = c ? w : u, n = c ? "shrink" : "expand", o = x * 8;
1029
1029
  } else
1030
1030
  o = x * 8;
1031
- let g = 20, m = 20;
1031
+ let g = 20, p = 20;
1032
1032
  if (r) {
1033
- let u = this.drawX + o + e, w = this.drawY + (this.visibleHeight - m) / 2;
1034
- this.ctx.paint.drawImage(r, u, w, g, m), this.drawImageX = u, this.drawImageY = w, this.drawImageWidth = g, this.drawImageHeight = m, this.drawImageName = n, this.drawImageSource = r;
1033
+ let u = this.drawX + o + e, w = this.drawY + (this.visibleHeight - p) / 2;
1034
+ this.ctx.paint.drawImage(r, u, w, g, p), this.drawImageX = u, this.drawImageY = w, this.drawImageWidth = g, this.drawImageHeight = p, this.drawImageName = n, this.drawImageSource = r;
1035
1035
  }
1036
1036
  this.align = "left", this.drawTextX = o + this.drawX + g - 0.5;
1037
1037
  }
@@ -1050,7 +1050,7 @@ class At extends re {
1050
1050
  HIGHLIGHT_SELECTED_ROW_COLOR: f,
1051
1051
  HIGHLIGHT_HOVER_ROW: x,
1052
1052
  HIGHLIGHT_HOVER_ROW_COLOR: g,
1053
- STRIPE: m,
1053
+ STRIPE: p,
1054
1054
  STRIPE_COLOR: u
1055
1055
  } = this.ctx.config;
1056
1056
  if (this.cellType === "footer") {
@@ -1069,15 +1069,15 @@ class At extends re {
1069
1069
  return;
1070
1070
  }
1071
1071
  let w = "transparent";
1072
- const p = this.ctx.focusCell, C = this.ctx.hoverCell;
1073
- let y = this.rowIndex, b = this.rowIndex;
1072
+ const m = this.ctx.hoverCell, b = this.ctx.currentCell;
1073
+ let y = this.rowIndex, C = this.rowIndex;
1074
1074
  if (this.rowspan !== 1 && (x || d)) {
1075
1075
  const O = this.getSpanInfo(), { yArr: I } = O;
1076
- y = I[0], b = I[1];
1076
+ y = I[0], C = I[1];
1077
1077
  }
1078
- x && C && (C.rowKey === this.rowKey && (w = g), C.rowIndex >= y && C.rowIndex <= b && (w = g)), d && p && (p.rowKey === this.rowKey && (w = f), p.rowIndex >= y && p.rowIndex <= b && (w = f)), this.drawCellSkyBgColor = w;
1078
+ x && m && (m.rowKey === this.rowKey && (w = g), m.rowIndex >= y && m.rowIndex <= C && (w = g)), d && b && (b.rowKey === this.rowKey && (w = f), b.rowIndex >= y && b.rowIndex <= C && (w = f)), this.drawCellSkyBgColor = w;
1079
1079
  let E = e, R = n;
1080
- if (this.ctx.database.getReadonly(this.rowKey, this.key) || (E = i, R = o), m && (this.rowIndex % 2 ? E = u : E = e), typeof s == "function") {
1080
+ if (this.ctx.database.getReadonly(this.rowKey, this.key) || (E = i, R = o), p && (this.rowIndex % 2 ? E = u : E = e), typeof s == "function") {
1081
1081
  const O = s, { backgroundColor: I, color: _ } = O({
1082
1082
  row: this.row,
1083
1083
  rowIndex: this.rowIndex,
@@ -1093,9 +1093,9 @@ class At extends re {
1093
1093
  updateSelection() {
1094
1094
  const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: r, cellType: o, type: n, rowIndex: h, rowKey: c } = this;
1095
1095
  if (!(s === 0 || r === 0) && o !== "footer" && ["index-selection", "selection"].includes(n)) {
1096
- const d = this.ctx.database.getRowSelection(c), f = this.ctx.database.getRowSelectable(c), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, g = this.drawX + (e - x) / 2, m = this.drawY + (i - x) / 2;
1096
+ const d = this.ctx.database.getRowSelection(c), f = this.ctx.database.getRowSelectable(c), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, g = this.drawX + (e - x) / 2, p = this.drawY + (i - x) / 2;
1097
1097
  let u = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck";
1098
- d && f ? (u = this.ctx.icons.get("checkbox-check"), w = "checkbox-check") : d && f ? (u = this.ctx.icons.get("checkbox-check-disabled"), w = "checkbox-check-disabled") : !d && f ? (u = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck") : (u = this.ctx.icons.get("checkbox-disabled"), w = "checkbox-disabled"), u && n == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === h || ["checkbox-disabled", "checkbox-check"].includes(w)) && (this.drawImageX = g, this.drawImageY = m, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = u) : u && n === "selection" && (this.drawImageX = g, this.drawImageY = m, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = u);
1098
+ d && f ? (u = this.ctx.icons.get("checkbox-check"), w = "checkbox-check") : d && f ? (u = this.ctx.icons.get("checkbox-check-disabled"), w = "checkbox-check-disabled") : !d && f ? (u = this.ctx.icons.get("checkbox-uncheck"), w = "checkbox-uncheck") : (u = this.ctx.icons.get("checkbox-disabled"), w = "checkbox-disabled"), u && n == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === h || ["checkbox-disabled", "checkbox-check"].includes(w)) && (this.drawImageX = g, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = u) : u && n === "selection" && (this.drawImageX = g, this.drawImageY = p, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = w, this.drawImageSource = u);
1099
1099
  }
1100
1100
  }
1101
1101
  updateHoverIcon() {
@@ -1116,10 +1116,10 @@ class At extends re {
1116
1116
  if (this.hoverIconName && !this.ctx.editing && n) {
1117
1117
  let h = 0, c = 0;
1118
1118
  if (n.rowKey === this.rowKey && (h = this.drawX + this.width - s - r, c = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && o) {
1119
- const f = this.getSpanInfo(), { yArr: x } = f, g = x[0], m = x[1];
1120
- if (n.rowIndex >= g && n.rowIndex <= m) {
1121
- const { width: u, height: w, offsetTop: p, offsetLeft: C } = f;
1122
- h = this.drawX - C + u - s - r, c = this.drawY - p + (w - s) / 2;
1119
+ const f = this.getSpanInfo(), { yArr: x } = f, g = x[0], p = x[1];
1120
+ if (n.rowIndex >= g && n.rowIndex <= p) {
1121
+ const { width: u, height: w, offsetTop: m, offsetLeft: b } = f;
1122
+ h = this.drawX - b + u - s - r, c = this.drawY - m + (w - s) / 2;
1123
1123
  }
1124
1124
  }
1125
1125
  const d = this.ctx.icons.get(this.hoverIconName);
@@ -1348,46 +1348,46 @@ class At extends re {
1348
1348
  drawBorder(e) {
1349
1349
  const { drawX: i, drawY: s, rowIndex: r, colIndex: o, height: n, width: h } = this;
1350
1350
  let c = i, d = s;
1351
- const { xArr: f, yArr: x, lineDash: g = [], borderWidth: m = 1, borderColor: u, fillColor: w } = e, p = f[0], C = f[1], y = x[0], b = x[1];
1352
- if (o >= p && o <= C && r === y) {
1353
- const E = o === C ? 1 : 0, R = o === p ? 1 : 0;
1351
+ const { xArr: f, yArr: x, lineDash: g = [], borderWidth: p = 1, borderColor: u, fillColor: w } = e, m = f[0], b = f[1], y = x[0], C = x[1];
1352
+ if (o >= m && o <= b && r === y) {
1353
+ const E = o === b ? 1 : 0, R = o === m ? 1 : 0;
1354
1354
  this.ctx.paint.drawLine([c + R, d + 1, c + h - E, d + 1], {
1355
1355
  borderColor: u,
1356
1356
  fillColor: w,
1357
- borderWidth: m,
1357
+ borderWidth: p,
1358
1358
  lineCap: "round",
1359
1359
  lineJoin: "round",
1360
1360
  lineDash: g
1361
1361
  });
1362
1362
  }
1363
- if (o === C && r >= y && r <= b) {
1364
- const E = r === y ? 1 : 0, R = r === b ? 1 : 0;
1363
+ if (o === b && r >= y && r <= C) {
1364
+ const E = r === y ? 1 : 0, R = r === C ? 1 : 0;
1365
1365
  this.ctx.paint.drawLine([c + h - 1, d + E, c + h - 1, d + n - R], {
1366
1366
  borderColor: u,
1367
1367
  fillColor: w,
1368
- borderWidth: m,
1368
+ borderWidth: p,
1369
1369
  lineCap: "round",
1370
1370
  lineJoin: "round",
1371
1371
  lineDash: g
1372
1372
  });
1373
1373
  }
1374
- if (o >= p && o <= C && r === b) {
1375
- const E = o === C ? 1 : 0, R = o === p ? 1 : 0;
1374
+ if (o >= m && o <= b && r === C) {
1375
+ const E = o === b ? 1 : 0, R = o === m ? 1 : 0;
1376
1376
  this.ctx.paint.drawLine([c + R, d + n - 1, c + h - E, d + n - 1], {
1377
1377
  borderColor: u,
1378
1378
  fillColor: w,
1379
- borderWidth: m,
1379
+ borderWidth: p,
1380
1380
  lineCap: "round",
1381
1381
  lineJoin: "round",
1382
1382
  lineDash: g
1383
1383
  });
1384
1384
  }
1385
- if (o === p && r >= y && r <= b) {
1386
- const E = r === b ? 1 : 0, R = r === y ? 1 : 0;
1385
+ if (o === m && r >= y && r <= C) {
1386
+ const E = r === C ? 1 : 0, R = r === y ? 1 : 0;
1387
1387
  this.ctx.paint.drawLine([c + 1, d + R, c + 1, d + n - E], {
1388
1388
  borderColor: u,
1389
1389
  fillColor: w,
1390
- borderWidth: m,
1390
+ borderWidth: p,
1391
1391
  lineCap: "round",
1392
1392
  lineJoin: "round",
1393
1393
  lineDash: g
@@ -1398,40 +1398,39 @@ class At extends re {
1398
1398
  class li {
1399
1399
  //虚拟滚动位置
1400
1400
  constructor(t, e) {
1401
- l(this, "loading", !1);
1402
- l(this, "ctx");
1403
- l(this, "data");
1404
- l(this, "columns");
1405
- l(this, "footerData", []);
1406
- l(this, "rowKeyMap", /* @__PURE__ */ new Map());
1407
- l(this, "colIndexKeyMap", /* @__PURE__ */ new Map());
1408
- l(this, "headerMap", /* @__PURE__ */ new Map());
1409
- l(this, "rowIndexRowKeyMap", /* @__PURE__ */ new Map());
1410
- l(this, "rowKeyRowIndexMap", /* @__PURE__ */ new Map());
1411
- l(this, "checkboxKeyMap", /* @__PURE__ */ new Map());
1412
- l(this, "selectionMap", /* @__PURE__ */ new Map());
1413
- l(this, "originalDataMap", /* @__PURE__ */ new Map());
1414
- l(this, "changedDataMap", /* @__PURE__ */ new Map());
1415
- l(this, "validationErrorMap", /* @__PURE__ */ new Map());
1416
- l(this, "itemRowKeyMap", /* @__PURE__ */ new WeakMap());
1417
- l(this, "bufferData", []);
1418
- l(this, "bufferCheckState", {
1401
+ a(this, "loading", !1);
1402
+ a(this, "ctx");
1403
+ a(this, "data");
1404
+ a(this, "columns");
1405
+ a(this, "footerData", []);
1406
+ a(this, "rowKeyMap", /* @__PURE__ */ new Map());
1407
+ a(this, "colIndexKeyMap", /* @__PURE__ */ new Map());
1408
+ a(this, "headerMap", /* @__PURE__ */ new Map());
1409
+ a(this, "rowIndexRowKeyMap", /* @__PURE__ */ new Map());
1410
+ a(this, "rowKeyRowIndexMap", /* @__PURE__ */ new Map());
1411
+ a(this, "checkboxKeyMap", /* @__PURE__ */ new Map());
1412
+ a(this, "selectionMap", /* @__PURE__ */ new Map());
1413
+ a(this, "expandMap", /* @__PURE__ */ new Map());
1414
+ a(this, "originalDataMap", /* @__PURE__ */ new Map());
1415
+ a(this, "changedDataMap", /* @__PURE__ */ new Map());
1416
+ a(this, "validationErrorMap", /* @__PURE__ */ new Map());
1417
+ a(this, "itemRowKeyMap", /* @__PURE__ */ new WeakMap());
1418
+ a(this, "bufferData", []);
1419
+ a(this, "bufferCheckState", {
1419
1420
  buffer: !1,
1420
1421
  check: !1,
1421
1422
  indeterminate: !1,
1422
1423
  selectable: !0
1423
1424
  });
1424
- l(this, "sumHeight", 0);
1425
- l(this, "filterMethod");
1426
- l(this, "positions", []);
1425
+ a(this, "sumHeight", 0);
1426
+ a(this, "filterMethod");
1427
+ a(this, "positions", []);
1427
1428
  this.ctx = t;
1428
1429
  const { data: i = [], columns: s = [], footerData: r = [] } = e;
1429
1430
  this.data = i, this.footerData = r, this.columns = s, this.setLoading(!0), this.init();
1430
1431
  }
1431
1432
  init() {
1432
- this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear(), this.originalDataMap.clear(), this.changedDataMap.clear(), this.validationErrorMap.clear(), this.itemRowKeyMap = /* @__PURE__ */ new WeakMap();
1433
- const { ROW_KEY: t, ENABLE_RESERVE_SELECTION: e } = this.ctx.config;
1434
- e && t || this.selectionMap.clear(), this.initData(this.data), this.getData(), this.bufferCheckState.buffer = !1;
1433
+ this.clearBufferData(), this.rowKeyMap.clear(), this.checkboxKeyMap.clear(), this.colIndexKeyMap.clear(), this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear(), this.originalDataMap.clear(), this.changedDataMap.clear(), this.validationErrorMap.clear(), this.itemRowKeyMap = /* @__PURE__ */ new WeakMap(), this.initData(this.data), this.getData(), this.bufferCheckState.buffer = !1;
1435
1434
  }
1436
1435
  /**
1437
1436
  * 清除缓存数据
@@ -1446,34 +1445,40 @@ class li {
1446
1445
  */
1447
1446
  initData(t, e = 0) {
1448
1447
  t.forEach((i, s) => {
1449
- var w;
1450
- let r = i._hasChildren || !1;
1451
- Array.isArray(i.children) && i.children.length && (r = !0, this.initData(i.children, e + 1));
1448
+ var m, b;
1449
+ let r = !1;
1450
+ Array.isArray(i.children) && (r = i._hasChildren, i.children.length && (r = !0, this.initData(i.children, e + 1)));
1452
1451
  const { ROW_KEY: o = "", DEFAULT_EXPAND_ALL: n, CELL_HEIGHT: h, SELECTABLE_METHOD: c, CHECKBOX_KEY: d } = this.ctx.config, f = i[o], x = f != null ? `${f}` : Jt();
1453
1452
  this.itemRowKeyMap.set(i, x);
1454
- const g = i._height || h, m = i._readonly;
1453
+ const g = i._height || h, p = i._readonly;
1455
1454
  let u = !0;
1456
1455
  if (typeof c == "function" && (u = c), d) {
1457
- const p = i[d];
1458
- if (this.checkboxKeyMap.has(p)) {
1459
- const C = this.checkboxKeyMap.get(p) || [];
1460
- C.push(x), this.checkboxKeyMap.set(p, C);
1456
+ const y = i[d];
1457
+ if (this.checkboxKeyMap.has(y)) {
1458
+ const C = this.checkboxKeyMap.get(y) || [];
1459
+ C.push(x), this.checkboxKeyMap.set(y, C);
1461
1460
  } else
1462
- this.checkboxKeyMap.set(p, [x]);
1461
+ this.checkboxKeyMap.set(y, [x]);
1463
1462
  }
1464
1463
  this.selectionMap.set(x, {
1465
1464
  key: d ? i[d] : x,
1466
1465
  row: i,
1467
- check: ((w = this.selectionMap.get(x)) == null ? void 0 : w.check) || !1
1466
+ check: ((m = this.selectionMap.get(x)) == null ? void 0 : m.check) || !1
1467
+ });
1468
+ const w = n || ((b = this.expandMap.get(x)) == null ? void 0 : b.expand) || i._expand || !1;
1469
+ this.expandMap.set(x, {
1470
+ key: x,
1471
+ row: i,
1472
+ expand: w
1468
1473
  }), this.rowKeyMap.set(x, {
1469
- readonly: m,
1474
+ readonly: p,
1470
1475
  index: s,
1471
1476
  rowIndex: s,
1472
1477
  level: e,
1473
1478
  height: g,
1474
1479
  check: !1,
1475
1480
  selectable: u,
1476
- expand: n,
1481
+ expand: w,
1477
1482
  expandLazy: !1,
1478
1483
  hasChildren: r,
1479
1484
  expandLoading: !1,
@@ -1581,12 +1586,20 @@ class li {
1581
1586
  */
1582
1587
  expandItem(t, e = !1) {
1583
1588
  const i = this.rowKeyMap.get(t);
1584
- i.expand = e, this.clearBufferData(), this.ctx.emit("draw");
1589
+ i.expand = e, this.expandMap.set(t, {
1590
+ key: t,
1591
+ row: i.item,
1592
+ expand: e
1593
+ }), this.clearBufferData(), this.ctx.emit("draw");
1585
1594
  }
1586
1595
  setExpandRowKeys(t, e = !0) {
1587
1596
  t.forEach((i) => {
1588
1597
  const s = this.rowKeyMap.get(i);
1589
- s.expand = e;
1598
+ this.expandMap.set(i, {
1599
+ key: i,
1600
+ row: s.item,
1601
+ expand: e
1602
+ }), s.expand = e;
1590
1603
  }), this.clearBufferData(), this.ctx.emit("draw");
1591
1604
  }
1592
1605
  getExpandRowKeys() {
@@ -1597,7 +1610,11 @@ class li {
1597
1610
  }
1598
1611
  expandAll(t) {
1599
1612
  this.rowKeyMap.forEach((e) => {
1600
- e.expand = t;
1613
+ e.expand = t, this.expandMap.set(e.key, {
1614
+ key: e.key,
1615
+ row: e.item,
1616
+ expand: t
1617
+ });
1601
1618
  }), this.clearBufferData(), this.ctx.emit("draw");
1602
1619
  }
1603
1620
  expandLoading(t, e = !1) {
@@ -1606,7 +1623,11 @@ class li {
1606
1623
  }
1607
1624
  setExpandChildren(t, e) {
1608
1625
  const i = this.rowKeyMap.get(t);
1609
- i.expand = !0, i.expandLazy = !0, i.item.children = e, this.initData(i.item.children, i.level + 1), this.clearBufferData();
1626
+ i.expand = !0, this.expandMap.set(t, {
1627
+ key: t,
1628
+ row: i.item,
1629
+ expand: !0
1630
+ }), i.expandLazy = !0, i.item.children = e, this.initData(i.item.children, i.level + 1), this.clearBufferData();
1610
1631
  }
1611
1632
  getIsExpandLoading(t) {
1612
1633
  return this.rowKeyMap.get(t).expandLoading;
@@ -1685,16 +1706,16 @@ class li {
1685
1706
  const s = /* @__PURE__ */ new Set();
1686
1707
  let r = [], o = t.map((d) => {
1687
1708
  const { rowKey: f, key: x } = d;
1688
- let g = d.value, m = g;
1689
- const u = this.getRowDataItemForRowKey(f), w = this.getItemValue(f, x), p = this.getVirtualBodyCellByKey(f, x);
1690
- return (p == null ? void 0 : p.type) === "number" && (["", void 0, null].includes(g) ? m = null : /^-?\d+(\.\d+)?$/.test(`${g}`) ? m = Number(g) : (m = w, r.push({
1709
+ let g = d.value, p = g;
1710
+ const u = this.getRowDataItemForRowKey(f), w = this.getItemValue(f, x), m = this.getVirtualBodyCellByKey(f, x);
1711
+ return (m == null ? void 0 : m.type) === "number" && (["", void 0, null].includes(g) ? p = null : /^-?\d+(\.\d+)?$/.test(`${g}`) ? p = Number(g) : (p = w, r.push({
1691
1712
  ...d,
1692
- value: m,
1713
+ value: p,
1693
1714
  oldValue: w,
1694
1715
  row: u
1695
1716
  }))), {
1696
1717
  ...d,
1697
- value: m,
1718
+ value: p,
1698
1719
  oldValue: w,
1699
1720
  row: u
1700
1721
  };
@@ -1711,11 +1732,11 @@ class li {
1711
1732
  return;
1712
1733
  const { BEFORE_VALUE_CHANGE_METHOD: n } = this.ctx.config;
1713
1734
  typeof n == "function" && (o = await n(o)), o.forEach((d) => {
1714
- const { value: f, rowKey: x, key: g, oldValue: m } = d;
1735
+ const { value: f, rowKey: x, key: g, oldValue: p } = d;
1715
1736
  s.add(x), this.setItemValue(x, g, f), i.push({
1716
1737
  rowKey: x,
1717
1738
  key: g,
1718
- oldValue: m,
1739
+ oldValue: p,
1719
1740
  newValue: f
1720
1741
  });
1721
1742
  });
@@ -1786,9 +1807,9 @@ class li {
1786
1807
  oldValue: h,
1787
1808
  newValue: h
1788
1809
  };
1789
- const { BEFORE_VALUE_CHANGE_METHOD: m } = this.ctx.config;
1790
- if (typeof m == "function") {
1791
- const p = await m([
1810
+ const { BEFORE_VALUE_CHANGE_METHOD: p } = this.ctx.config;
1811
+ if (typeof p == "function") {
1812
+ const m = await p([
1792
1813
  {
1793
1814
  rowKey: t,
1794
1815
  key: e,
@@ -1797,7 +1818,7 @@ class li {
1797
1818
  row: x
1798
1819
  }
1799
1820
  ]);
1800
- p && p.length && (c = p[0].value);
1821
+ m && m.length && (c = m[0].value);
1801
1822
  }
1802
1823
  this.changedDataMap.set(d, c), n[e] = c;
1803
1824
  const u = {
@@ -1958,11 +1979,11 @@ class li {
1958
1979
  this.rowKeyMap.forEach((x, g) => {
1959
1980
  var u;
1960
1981
  (u = this.selectionMap.get(g)) != null && u.check && (s += 1);
1961
- let m = x.selectable;
1962
- typeof m == "function" && (m = m({
1982
+ let p = x.selectable;
1983
+ typeof p == "function" && (p = p({
1963
1984
  row: x.item,
1964
1985
  rowIndex: x.rowIndex
1965
- })), m && (r += 1);
1986
+ })), p && (r += 1);
1966
1987
  });
1967
1988
  const h = o > i && s === 0 && n, c = r && r > s && s > 0 || h, d = r !== 0, f = !!r && r === s;
1968
1989
  return this.bufferCheckState = {
@@ -2122,8 +2143,8 @@ class li {
2122
2143
  new nt(c).validate(d).then(() => {
2123
2144
  this.clearValidationError(t, e), i([]);
2124
2145
  }).catch(({ errors: x }) => {
2125
- const g = x.map((m) => ({
2126
- ...m,
2146
+ const g = x.map((p) => ({
2147
+ ...p,
2127
2148
  column: n,
2128
2149
  key: e,
2129
2150
  row: s.item,
@@ -2157,7 +2178,7 @@ class li {
2157
2178
  height: f,
2158
2179
  width: x,
2159
2180
  colspan: g,
2160
- mergeRow: m,
2181
+ mergeRow: p,
2161
2182
  mergeCol: u
2162
2183
  } = t;
2163
2184
  if (d === 1 && g === 1)
@@ -2179,8 +2200,8 @@ class li {
2179
2200
  }
2180
2201
  ]
2181
2202
  };
2182
- let w = e, p = e, C = n, y = n, b = [], E = 0, R = 0, O = 0, I = 0;
2183
- if (d !== 1 && m) {
2203
+ let w = e, m = e, b = n, y = n, C = [], E = 0, R = 0, O = 0, I = 0;
2204
+ if (d !== 1 && p) {
2184
2205
  I = x;
2185
2206
  const _ = h.reduce((v, S) => {
2186
2207
  const T = this.getItemValue(s, S) ?? "";
@@ -2188,8 +2209,8 @@ class li {
2188
2209
  }, "");
2189
2210
  for (let v = e - 1; v >= 0; v--) {
2190
2211
  const S = this.rowIndexRowKeyMap.get(v) || "", T = h.reduce((M, A) => {
2191
- const B = this.getItemValue(S, A) ?? "";
2192
- return `${M}${B}`;
2212
+ const N = this.getItemValue(S, A) ?? "";
2213
+ return `${M}${N}`;
2193
2214
  }, "");
2194
2215
  if (_ === T)
2195
2216
  w = v;
@@ -2198,11 +2219,11 @@ class li {
2198
2219
  }
2199
2220
  for (let v = e; v <= this.ctx.maxRowIndex; v++) {
2200
2221
  const S = this.rowIndexRowKeyMap.get(v) || "", T = h.reduce((M, A) => {
2201
- const B = this.getItemValue(S, A) ?? "";
2202
- return `${M}${B}`;
2222
+ const N = this.getItemValue(S, A) ?? "";
2223
+ return `${M}${N}`;
2203
2224
  }, "");
2204
2225
  if (_ === T)
2205
- p = v;
2226
+ m = v;
2206
2227
  else
2207
2228
  break;
2208
2229
  }
@@ -2210,11 +2231,11 @@ class li {
2210
2231
  const { height: S } = this.positions[v];
2211
2232
  E += S;
2212
2233
  }
2213
- for (let v = w; v <= p; v++) {
2234
+ for (let v = w; v <= m; v++) {
2214
2235
  const { height: S } = this.positions[v];
2215
2236
  O += S;
2216
2237
  const T = this.rowIndexRowKeyMap.get(v) || "", { item: M } = this.rowKeyMap.get(T), A = this.getItemValue(T, i);
2217
- b.push({
2238
+ C.push({
2218
2239
  rowKey: T,
2219
2240
  key: i,
2220
2241
  value: A,
@@ -2230,7 +2251,7 @@ class li {
2230
2251
  break;
2231
2252
  const S = this.getItemValue(s, i), T = this.getItemValue(s, v.key);
2232
2253
  if (S === T && c.includes(v.key))
2233
- C = _;
2254
+ b = _;
2234
2255
  else
2235
2256
  break;
2236
2257
  }
@@ -2244,17 +2265,17 @@ class li {
2244
2265
  else
2245
2266
  break;
2246
2267
  }
2247
- for (let _ = C; _ < n; _++) {
2268
+ for (let _ = b; _ < n; _++) {
2248
2269
  const v = this.getColumnByColIndex(_);
2249
2270
  if (!v)
2250
2271
  break;
2251
2272
  R += v.width || 100;
2252
2273
  }
2253
- for (let _ = C; _ <= y; _++) {
2274
+ for (let _ = b; _ <= y; _++) {
2254
2275
  const v = this.getColumnByColIndex(_);
2255
2276
  if (!v)
2256
2277
  break;
2257
- I += v.width || 100, b.push({
2278
+ I += v.width || 100, C.push({
2258
2279
  rowKey: s,
2259
2280
  key: v.key,
2260
2281
  value: this.getItemValue(s, v.key),
@@ -2263,15 +2284,15 @@ class li {
2263
2284
  }
2264
2285
  }
2265
2286
  return {
2266
- xArr: [C, y],
2267
- yArr: [w, p],
2287
+ xArr: [b, y],
2288
+ yArr: [w, m],
2268
2289
  rowspan: d,
2269
2290
  colspan: g,
2270
2291
  height: O,
2271
2292
  width: I,
2272
2293
  offsetTop: E,
2273
2294
  offsetLeft: R,
2274
- dataList: b
2295
+ dataList: C
2275
2296
  };
2276
2297
  }
2277
2298
  setLoading(t) {
@@ -2325,9 +2346,9 @@ class li {
2325
2346
  }
2326
2347
  class hi {
2327
2348
  constructor(t) {
2328
- l(this, "ctx");
2329
- l(this, "history", []);
2330
- l(this, "historyIndex", -1);
2349
+ a(this, "ctx");
2350
+ a(this, "history", []);
2351
+ a(this, "historyIndex", -1);
2331
2352
  this.ctx = t, this.init();
2332
2353
  }
2333
2354
  init() {
@@ -2380,8 +2401,8 @@ class hi {
2380
2401
  }
2381
2402
  class ci {
2382
2403
  constructor(t) {
2383
- l(this, "eventTasks", /* @__PURE__ */ new Map());
2384
- l(this, "ctx");
2404
+ a(this, "eventTasks", /* @__PURE__ */ new Map());
2405
+ a(this, "ctx");
2385
2406
  this.ctx = t, this.init();
2386
2407
  }
2387
2408
  init() {
@@ -2424,7 +2445,7 @@ class ci {
2424
2445
  this.ctx.emit("touchmove", t);
2425
2446
  }
2426
2447
  handleContextMenu(t) {
2427
- this.ctx.emit("contextMenu", t);
2448
+ t.preventDefault(), this.ctx.emit("contextMenu", t);
2428
2449
  }
2429
2450
  handleMouseover(t) {
2430
2451
  this.ctx.isMouseoverTargetContainer = !0, this.ctx.emit("mouseover", t);
@@ -2447,7 +2468,7 @@ class ci {
2447
2468
  }
2448
2469
  class di {
2449
2470
  constructor() {
2450
- l(this, "events", /* @__PURE__ */ new Map());
2471
+ a(this, "events", /* @__PURE__ */ new Map());
2451
2472
  }
2452
2473
  has(t) {
2453
2474
  return this.events.has(t);
@@ -2485,13 +2506,13 @@ class di {
2485
2506
  }
2486
2507
  class fi {
2487
2508
  constructor(t) {
2488
- l(this, "ctx");
2509
+ a(this, "ctx");
2489
2510
  const e = t.getContext("2d");
2490
2511
  if (!e) throw new Error("canvas context not found");
2491
2512
  this.ctx = e;
2492
2513
  }
2493
2514
  scale(t) {
2494
- this.ctx.scale(t, t);
2515
+ this.ctx.setTransform(1, 0, 0, 1, 0, 0), this.ctx.scale(t, t);
2495
2516
  }
2496
2517
  save() {
2497
2518
  this.ctx.save();
@@ -2587,8 +2608,8 @@ class fi {
2587
2608
  f === "top" ? x = i + d : f === "bottom" ? x = i + r - d : x = i + (r + 1) / 2;
2588
2609
  let g = 0;
2589
2610
  h === "left" ? g = e + d : h === "right" ? g = e + s - d : g = e + s / 2;
2590
- const { _text: m, ellipsis: u } = this.handleEllipsis(t, s, d, n);
2591
- return this.ctx.fillText(m, g, x), this.ctx.restore(), u;
2611
+ const { _text: p, ellipsis: u } = this.handleEllipsis(t, s, d, n);
2612
+ return this.ctx.fillText(p, g, x), this.ctx.restore(), u;
2592
2613
  }
2593
2614
  handleEllipsis(t, e, i = 0, s = "12px Arial") {
2594
2615
  let r = !1, o = t;
@@ -2615,153 +2636,151 @@ class fi {
2615
2636
  }
2616
2637
  class Wt {
2617
2638
  constructor(t) {
2618
- l(this, "_config", {});
2619
- l(this, "CSS_PREFIX", "e-virt-table");
2620
- l(this, "ICONS", []);
2621
- l(this, "ROW_KEY", "");
2622
- l(this, "DISABLED", !1);
2639
+ a(this, "_config", {});
2640
+ a(this, "CSS_PREFIX", "e-virt-table");
2641
+ a(this, "ICONS", []);
2642
+ a(this, "ROW_KEY", "");
2643
+ a(this, "DISABLED", !1);
2623
2644
  //禁用编辑,优先等级最高
2624
- l(this, "HEADER_FONT", "12px normal Arial");
2625
- l(this, "BODY_FONT", "12px normal Arial");
2626
- l(this, "BORDER", !0);
2627
- l(this, "STRIPE", !1);
2645
+ a(this, "HEADER_FONT", "12px normal Arial");
2646
+ a(this, "BODY_FONT", "12px normal Arial");
2647
+ a(this, "BORDER", !0);
2648
+ a(this, "STRIPE", !1);
2628
2649
  //斑马纹
2629
- l(this, "STRIPE_COLOR", "#fafafa");
2650
+ a(this, "STRIPE_COLOR", "#fafafa");
2630
2651
  //斑马纹颜色
2631
- l(this, "BORDER_COLOR", "#e1e6eb");
2632
- l(this, "WIDTH", 0);
2633
- l(this, "RESIZE_MIN_WIDTH", 40);
2634
- l(this, "HEIGHT", 0);
2635
- l(this, "PLACEHOLDER_COLOR", "#CDD0DC");
2636
- l(this, "EMPTY_BODY_HEIGHT", 120);
2637
- l(this, "EMPTY_CUSTOM_STYLE", {});
2638
- l(this, "EMPTY_TEXT", "暂无数据");
2639
- l(this, "MAX_HEIGHT", 1e3);
2640
- l(this, "BORDER_RADIUS", 8);
2641
- l(this, "ENABLE_OFFSET_HEIGHT", !1);
2642
- l(this, "OFFSET_HEIGHT", 0);
2643
- l(this, "HEADER_HEIGHT", 36);
2644
- l(this, "ENABLE_RESERVE_SELECTION", !1);
2645
- // 启用保留选中行
2646
- l(this, "ENABLE_HEADER_STICKY", !1);
2652
+ a(this, "BORDER_COLOR", "#e1e6eb");
2653
+ a(this, "WIDTH", 0);
2654
+ a(this, "RESIZE_MIN_WIDTH", 40);
2655
+ a(this, "HEIGHT", 0);
2656
+ a(this, "PLACEHOLDER_COLOR", "#CDD0DC");
2657
+ a(this, "EMPTY_BODY_HEIGHT", 120);
2658
+ a(this, "EMPTY_CUSTOM_STYLE", {});
2659
+ a(this, "EMPTY_TEXT", "暂无数据");
2660
+ a(this, "MAX_HEIGHT", 1e3);
2661
+ a(this, "BORDER_RADIUS", 8);
2662
+ a(this, "ENABLE_OFFSET_HEIGHT", !1);
2663
+ a(this, "OFFSET_HEIGHT", 0);
2664
+ a(this, "HEADER_HEIGHT", 36);
2665
+ a(this, "ENABLE_HEADER_STICKY", !1);
2647
2666
  // 启用头部固定,需要外面实现覆盖层,或者所有表头都要是元素
2648
- l(this, "HEADER_BG_COLOR", "#F8FAFF");
2649
- l(this, "BODY_BG_COLOR", "#FFF");
2650
- l(this, "HEADER_TEXT_COLOR", "#1D2129");
2651
- l(this, "BODY_TEXT_COLOR", "#4E5969");
2652
- l(this, "FOOTER_TEXT_COLOR", "#4E5969");
2653
- l(this, "LOADING_ICON_SVG", "");
2654
- l(this, "LOADING_ICON_COLOR", "#4E5969");
2655
- l(this, "EXPAND_ICON_SVG", "");
2656
- l(this, "SHRINK_ICON_SVG", "");
2657
- l(this, "EXPAND_ICON_COLOR", "#4E5969");
2658
- l(this, "SHRINK_ICON_COLOR", "#4E5969");
2659
- l(this, "ERROR_TIP_ICON_COLOR", "red");
2660
- l(this, "ERROR_TIP_ICON_SIZE", 6);
2661
- l(this, "EXPAND_LAZY", !0);
2662
- l(this, "DEFAULT_EXPAND_ALL", !1);
2663
- l(this, "CELL_WIDTH", 100);
2664
- l(this, "CELL_HEIGHT", 36);
2665
- l(this, "CELL_PADDING", 8);
2666
- l(this, "CELL_HOVER_ICON_SIZE", 14);
2667
- l(this, "CELL_HOVER_ICON_BG_COLOR", "#fff");
2668
- l(this, "CELL_HOVER_ICON_BORDER_COLOR", "#DDE0EA");
2669
- l(this, "SCROLLER_TRACK_SIZE", 14);
2670
- l(this, "SCROLLER_SIZE", 8);
2671
- l(this, "SCROLLER_COLOR", "#dee0e3");
2672
- l(this, "SCROLLER_TRACK_COLOR", "#fff");
2673
- l(this, "SCROLLER_FOCUS_COLOR", "#bbbec4");
2674
- l(this, "SELECT_BORDER_COLOR", "rgb(82,146,247)");
2675
- l(this, "SELECT_AREA_COLOR", "rgba(82,146,247,0.1)");
2676
- l(this, "SELECT_ROW_COL_BG_COLOR", "transparent");
2677
- l(this, "AUTOFILL_POINT_BORDER_COLOR", "#fff");
2678
- l(this, "EDIT_BG_COLOR", "#fcf6ed");
2679
- l(this, "CHECKBOX_KEY", "");
2680
- l(this, "CHECKBOX_COLOR", "rgb(82,146,247)");
2681
- l(this, "CHECKBOX_SIZE", 20);
2682
- l(this, "CHECKBOX_DISABLED_SVG", "");
2683
- l(this, "CHECKBOX_CHECK_SVG", "");
2684
- l(this, "CHECKBOX_UNCHECK_SVG", "");
2685
- l(this, "CHECKBOX_INDETERMINATE_SVG", "");
2686
- l(this, "READONLY_COLOR", "#fff");
2687
- l(this, "READONLY_TEXT_COLOR", "#4E5969");
2688
- l(this, "ERROR_TIP_COLOR", "#ED3F14");
2689
- l(this, "FOOTER_BG_COLOR", "#fafafa");
2690
- l(this, "FOOTER_FIXED", !0);
2691
- l(this, "FOOTER_POSITION", "bottom");
2692
- l(this, "CELL_FOOTER_HEIGHT", 36);
2693
- l(this, "ENABLE_SELECTOR", !0);
2694
- l(this, "ENABLE_EDIT_SINGLE_CLICK", !1);
2667
+ a(this, "HEADER_BG_COLOR", "#F8FAFF");
2668
+ a(this, "BODY_BG_COLOR", "#FFF");
2669
+ a(this, "HEADER_TEXT_COLOR", "#1D2129");
2670
+ a(this, "BODY_TEXT_COLOR", "#4E5969");
2671
+ a(this, "FOOTER_TEXT_COLOR", "#4E5969");
2672
+ a(this, "LOADING_ICON_SVG", "");
2673
+ a(this, "LOADING_ICON_COLOR", "#4E5969");
2674
+ a(this, "EXPAND_ICON_SVG", "");
2675
+ a(this, "SHRINK_ICON_SVG", "");
2676
+ a(this, "EXPAND_ICON_COLOR", "#4E5969");
2677
+ a(this, "SHRINK_ICON_COLOR", "#4E5969");
2678
+ a(this, "ERROR_TIP_ICON_COLOR", "red");
2679
+ a(this, "ERROR_TIP_ICON_SIZE", 6);
2680
+ a(this, "EXPAND_LAZY", !0);
2681
+ a(this, "DEFAULT_EXPAND_ALL", !1);
2682
+ a(this, "CELL_WIDTH", 100);
2683
+ a(this, "CELL_HEIGHT", 36);
2684
+ a(this, "CELL_PADDING", 8);
2685
+ a(this, "CELL_HOVER_ICON_SIZE", 14);
2686
+ a(this, "CELL_HOVER_ICON_BG_COLOR", "#fff");
2687
+ a(this, "CELL_HOVER_ICON_BORDER_COLOR", "#DDE0EA");
2688
+ a(this, "SCROLLER_TRACK_SIZE", 14);
2689
+ a(this, "SCROLLER_SIZE", 8);
2690
+ a(this, "SCROLLER_COLOR", "#dee0e3");
2691
+ a(this, "SCROLLER_TRACK_COLOR", "#fff");
2692
+ a(this, "SCROLLER_FOCUS_COLOR", "#bbbec4");
2693
+ a(this, "SELECT_BORDER_COLOR", "rgb(82,146,247)");
2694
+ a(this, "SELECT_AREA_COLOR", "rgba(82,146,247,0.1)");
2695
+ a(this, "SELECT_ROW_COL_BG_COLOR", "transparent");
2696
+ a(this, "AUTOFILL_POINT_BORDER_COLOR", "#fff");
2697
+ a(this, "EDIT_BG_COLOR", "#fcf6ed");
2698
+ a(this, "CHECKBOX_KEY", "");
2699
+ a(this, "CHECKBOX_COLOR", "rgb(82,146,247)");
2700
+ a(this, "CHECKBOX_SIZE", 20);
2701
+ a(this, "CHECKBOX_DISABLED_SVG", "");
2702
+ a(this, "CHECKBOX_CHECK_SVG", "");
2703
+ a(this, "CHECKBOX_UNCHECK_SVG", "");
2704
+ a(this, "CHECKBOX_INDETERMINATE_SVG", "");
2705
+ a(this, "READONLY_COLOR", "#fff");
2706
+ a(this, "READONLY_TEXT_COLOR", "#4E5969");
2707
+ a(this, "ERROR_TIP_COLOR", "#ED3F14");
2708
+ a(this, "FOOTER_BG_COLOR", "#fafafa");
2709
+ a(this, "FOOTER_FIXED", !0);
2710
+ a(this, "FOOTER_POSITION", "bottom");
2711
+ a(this, "CELL_FOOTER_HEIGHT", 36);
2712
+ a(this, "ENABLE_SELECTOR", !0);
2713
+ a(this, "ENABLE_EDIT_SINGLE_CLICK", !1);
2695
2714
  // 启用单点击立马编辑
2696
- l(this, "ENABLE_EDIT_CLICK_SELECTOR", !0);
2715
+ a(this, "ENABLE_EDIT_CLICK_SELECTOR", !0);
2697
2716
  // 启用点击选择器编辑
2698
- l(this, "SELECTOR_AREA_MIN_X", 0);
2717
+ a(this, "SELECTOR_AREA_MIN_X", 0);
2699
2718
  // 选择器X最小范围
2700
- l(this, "SELECTOR_AREA_MAX_X_OFFSET", 0);
2719
+ a(this, "SELECTOR_AREA_MAX_X_OFFSET", 0);
2701
2720
  // 选择器X最大范围colMax - offset
2702
- l(this, "SELECTOR_AREA_MAX_X", 0);
2721
+ a(this, "SELECTOR_AREA_MAX_X", 0);
2703
2722
  // 选择器X最大范围,0默认最大colMax
2704
- l(this, "SELECTOR_AREA_MIN_Y", 0);
2723
+ a(this, "SELECTOR_AREA_MIN_Y", 0);
2705
2724
  // 选择器Y最小范围
2706
- l(this, "SELECTOR_AREA_MAX_Y", 0);
2725
+ a(this, "SELECTOR_AREA_MAX_Y", 0);
2707
2726
  // 选择器Y最大范围,0默认rowMax
2708
- l(this, "SELECTOR_AREA_MAX_Y_OFFSET", 0);
2727
+ a(this, "SELECTOR_AREA_MAX_Y_OFFSET", 0);
2709
2728
  // 选择器Y最大范围,0默认rowMax
2710
- l(this, "ENABLE_AUTO_THEME", !0);
2711
- l(this, "ENABLE_SELECTOR_SINGLE", !1);
2712
- l(this, "ENABLE_SELECTOR_SPAN_COL", !0);
2713
- l(this, "ENABLE_SELECTOR_SPAN_ROW", !0);
2714
- l(this, "ENABLE_SELECTOR_ALL_ROWS", !0);
2715
- l(this, "ENABLE_SELECTOR_ALL_COLS", !0);
2716
- l(this, "ENABLE_MERGE_CELL_LINK", !1);
2729
+ a(this, "ENABLE_AUTO_THEME", !0);
2730
+ a(this, "ENABLE_SELECTOR_SINGLE", !1);
2731
+ a(this, "ENABLE_SELECTOR_SPAN_COL", !0);
2732
+ a(this, "ENABLE_SELECTOR_SPAN_ROW", !0);
2733
+ a(this, "ENABLE_SELECTOR_ALL_ROWS", !0);
2734
+ a(this, "ENABLE_SELECTOR_ALL_COLS", !0);
2735
+ a(this, "ENABLE_MERGE_CELL_LINK", !1);
2717
2736
  // 启用合并选择器关联
2718
- l(this, "ENABLE_AUTOFILL", !1);
2719
- l(this, "ENABLE_CONTEXT_MENU", !1);
2720
- l(this, "ENABLE_COPY", !0);
2721
- l(this, "ENABLE_PASTER", !0);
2722
- l(this, "ENABLE_RESIZE_ROW", !0);
2723
- l(this, "ENABLE_RESIZE_COLUMN", !0);
2724
- l(this, "RESIZE_ROW_LINE_COLOR", "#e1e6eb");
2725
- l(this, "RESIZE_COLUMN_LINE_COLOR", "#e1e6eb");
2726
- l(this, "RESIZE_ROW_MIN_HEIGHT", 36);
2727
- l(this, "RESIZE_COLUMN_MIN_WIDTH", 40);
2728
- l(this, "ENABLE_KEYBOARD", !0);
2729
- l(this, "ENABLE_HISTORY", !1);
2730
- l(this, "ENABLE_VALIDATOR_IMMEDIATE", !0);
2731
- l(this, "HISTORY_NUM", 50);
2732
- l(this, "HIGHLIGHT_HOVER_ROW", !1);
2733
- l(this, "HIGHLIGHT_HOVER_ROW_COLOR", "rgba(186,203,231,0.1)");
2734
- l(this, "HIGHLIGHT_SELECTED_ROW", !1);
2735
- l(this, "HIGHLIGHT_SELECTED_ROW_COLOR", "rgba(82,146,247,0.1)");
2736
- l(this, "TOOLTIP_BG_COLOR", "#303133");
2737
- l(this, "TOOLTIP_TEXT_COLOR", "#fff");
2738
- l(this, "TOOLTIP_ZINDEX", 3e3);
2739
- l(this, "TOOLTIP_CUSTOM_STYLE", {});
2740
- l(this, "CONTEXT_MENU", [
2737
+ a(this, "ENABLE_AUTOFILL", !1);
2738
+ a(this, "ENABLE_CONTEXT_MENU", !1);
2739
+ a(this, "ENABLE_COPY", !0);
2740
+ a(this, "ENABLE_PASTER", !0);
2741
+ a(this, "ENABLE_RESIZE_ROW", !0);
2742
+ a(this, "ENABLE_RESIZE_COLUMN", !0);
2743
+ a(this, "RESIZE_ROW_LINE_COLOR", "#e1e6eb");
2744
+ a(this, "RESIZE_COLUMN_LINE_COLOR", "#e1e6eb");
2745
+ a(this, "RESIZE_ROW_MIN_HEIGHT", 36);
2746
+ a(this, "RESIZE_COLUMN_MIN_WIDTH", 40);
2747
+ a(this, "ENABLE_KEYBOARD", !0);
2748
+ a(this, "ENABLE_HISTORY", !1);
2749
+ a(this, "ENABLE_VALIDATOR_IMMEDIATE", !0);
2750
+ a(this, "HISTORY_NUM", 50);
2751
+ a(this, "HIGHLIGHT_HOVER_ROW", !1);
2752
+ a(this, "HIGHLIGHT_HOVER_ROW_COLOR", "rgba(186,203,231,0.1)");
2753
+ a(this, "HIGHLIGHT_SELECTED_ROW", !1);
2754
+ a(this, "HIGHLIGHT_SELECTED_ROW_COLOR", "rgba(82,146,247,0.1)");
2755
+ a(this, "TOOLTIP_BG_COLOR", "#303133");
2756
+ a(this, "TOOLTIP_TEXT_COLOR", "#fff");
2757
+ a(this, "TOOLTIP_ZINDEX", 3e3);
2758
+ a(this, "TOOLTIP_CUSTOM_STYLE", {});
2759
+ a(this, "CONTEXT_MENU", [
2741
2760
  { label: "复制", value: "copy" },
2742
2761
  { label: "剪切", value: "cut" },
2743
2762
  { label: "粘贴", value: "paste" },
2744
2763
  { label: "清空选中内容", value: "clearSelected" }
2745
2764
  ]);
2746
- l(this, "HEADER_CELL_STYLE_METHOD");
2747
- l(this, "BODY_CELL_STYLE_METHOD");
2748
- l(this, "FOOTER_CELL_STYLE_METHOD");
2749
- l(this, "BODY_CELL_READONLY_METHOD");
2750
- l(this, "BODY_CELL_FORMATTER_METHOD");
2751
- l(this, "BODY_CELL_RULES_METHOD");
2752
- l(this, "BODY_CELL_TYPE_METHOD");
2753
- l(this, "BODY_CELL_EDITOR_METHOD");
2754
- l(this, "BODY_CELL_RENDER_METHOD");
2755
- l(this, "BODY_CELL_HOVER_ICON_METHOD");
2756
- l(this, "SPAN_METHOD");
2757
- l(this, "SELECTABLE_METHOD");
2758
- l(this, "EXPAND_LAZY_METHOD");
2759
- l(this, "BEFORE_VALUE_CHANGE_METHOD");
2760
- l(this, "BEFORE_PASTE_DATA_METHOD");
2761
- l(this, "BEFORE_AUTOFILL_DATA_METHOD");
2762
- l(this, "BEFORE_SET_SELECTOR_METHOD");
2763
- l(this, "BEFORE_SET_AUTOFILL_METHOD");
2764
- l(this, "BEFORE_COPY_METHOD");
2765
+ a(this, "HEADER_CELL_STYLE_METHOD");
2766
+ a(this, "BODY_CELL_STYLE_METHOD");
2767
+ a(this, "FOOTER_CELL_STYLE_METHOD");
2768
+ a(this, "BODY_CELL_READONLY_METHOD");
2769
+ a(this, "BODY_CELL_FORMATTER_METHOD");
2770
+ a(this, "BODY_CELL_RULES_METHOD");
2771
+ a(this, "BODY_CELL_TYPE_METHOD");
2772
+ a(this, "BODY_CELL_EDITOR_METHOD");
2773
+ a(this, "BODY_CELL_RENDER_METHOD");
2774
+ a(this, "BODY_CELL_HOVER_ICON_METHOD");
2775
+ a(this, "SPAN_METHOD");
2776
+ a(this, "SELECTABLE_METHOD");
2777
+ a(this, "EXPAND_LAZY_METHOD");
2778
+ a(this, "BEFORE_VALUE_CHANGE_METHOD");
2779
+ a(this, "BEFORE_PASTE_DATA_METHOD");
2780
+ a(this, "BEFORE_AUTOFILL_DATA_METHOD");
2781
+ a(this, "BEFORE_SET_SELECTOR_METHOD");
2782
+ a(this, "BEFORE_SET_AUTOFILL_METHOD");
2783
+ a(this, "BEFORE_COPY_METHOD");
2765
2784
  this._config = t, this.updateCssVar();
2766
2785
  }
2767
2786
  init(t) {
@@ -2781,8 +2800,8 @@ class Wt {
2781
2800
  const Pt = '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>';
2782
2801
  class xi {
2783
2802
  constructor(t) {
2784
- l(this, "ctx");
2785
- l(this, "list", [
2803
+ a(this, "ctx");
2804
+ a(this, "list", [
2786
2805
  {
2787
2806
  name: "loading",
2788
2807
  configName: "LOADING_ICON_SVG",
@@ -2857,7 +2876,7 @@ class xi {
2857
2876
  color: "#4E5969"
2858
2877
  }
2859
2878
  ]);
2860
- l(this, "icons", /* @__PURE__ */ new Map());
2879
+ a(this, "icons", /* @__PURE__ */ new Map());
2861
2880
  this.ctx = t, this.init();
2862
2881
  }
2863
2882
  async init() {
@@ -2915,41 +2934,43 @@ class xi {
2915
2934
  class oe extends re {
2916
2935
  constructor(e, i, s, r, o, n, h) {
2917
2936
  super(e, s, r, o, n, "header", h.fixed);
2918
- l(this, "align");
2919
- l(this, "verticalAlign", "middle");
2920
- l(this, "fixed");
2921
- l(this, "widthFillDisable");
2922
- l(this, "type");
2923
- l(this, "operation", !1);
2924
- l(this, "editorType");
2925
- l(this, "level");
2926
- l(this, "text");
2927
- l(this, "displayText", "");
2928
- l(this, "colspan");
2929
- l(this, "rowspan");
2930
- l(this, "row");
2931
- l(this, "key");
2932
- l(this, "required", !1);
2933
- l(this, "readonly", !1);
2934
- l(this, "children", []);
2935
- l(this, "column");
2936
- l(this, "colIndex");
2937
- l(this, "rowKey");
2938
- l(this, "rules");
2939
- l(this, "hasChildren");
2940
- l(this, "render");
2941
- l(this, "style", {});
2942
- l(this, "drawX", 0);
2943
- l(this, "drawY", 0);
2944
- l(this, "drawCellBgColor", "");
2945
- l(this, "drawTextColor", "");
2946
- l(this, "drawImageX", 0);
2947
- l(this, "drawImageY", 0);
2948
- l(this, "drawImageWidth", 0);
2949
- l(this, "drawImageHeight", 0);
2950
- l(this, "drawImageName", "");
2951
- l(this, "drawImageSource");
2952
- this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = n, this.colIndex = i, this.key = h.key, this.type = h.type || "", this.editorType = h.editorType || "text", this.align = h.align || "center", this.verticalAlign = h.verticalAlign || "middle", this.fixed = h.fixed, this.level = h.level || 0, this.operation = h.operation || !1, this.text = h.title, this.column = h, this.colspan = h.colspan || 1, this.widthFillDisable = h.widthFillDisable || !1, this.rowspan = h.rowspan || 1, this.rules = h.rules, this.readonly = h.readonly || !1, this.required = h.required || !1, this.rowKey = Jt(), this.hasChildren = h.children && h.children.length > 0 || !1, this.render = h.renderHeader;
2937
+ a(this, "align");
2938
+ a(this, "verticalAlign", "middle");
2939
+ a(this, "fixed");
2940
+ a(this, "minWidth");
2941
+ a(this, "maxWidth");
2942
+ a(this, "widthFillDisable");
2943
+ a(this, "type");
2944
+ a(this, "operation", !1);
2945
+ a(this, "editorType");
2946
+ a(this, "level");
2947
+ a(this, "text");
2948
+ a(this, "displayText", "");
2949
+ a(this, "colspan");
2950
+ a(this, "rowspan");
2951
+ a(this, "row");
2952
+ a(this, "key");
2953
+ a(this, "required", !1);
2954
+ a(this, "readonly", !1);
2955
+ a(this, "children", []);
2956
+ a(this, "column");
2957
+ a(this, "colIndex");
2958
+ a(this, "rowKey");
2959
+ a(this, "rules");
2960
+ a(this, "hasChildren");
2961
+ a(this, "render");
2962
+ a(this, "style", {});
2963
+ a(this, "drawX", 0);
2964
+ a(this, "drawY", 0);
2965
+ a(this, "drawCellBgColor", "");
2966
+ a(this, "drawTextColor", "");
2967
+ a(this, "drawImageX", 0);
2968
+ a(this, "drawImageY", 0);
2969
+ a(this, "drawImageWidth", 0);
2970
+ a(this, "drawImageHeight", 0);
2971
+ a(this, "drawImageName", "");
2972
+ a(this, "drawImageSource");
2973
+ this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = n, this.colIndex = i, this.key = h.key, this.minWidth = h.minWidth, this.maxWidth = h.maxWidth, this.type = h.type || "", this.editorType = h.editorType || "text", this.align = h.align || "center", this.verticalAlign = h.verticalAlign || "middle", this.fixed = h.fixed, this.level = h.level || 0, this.operation = h.operation || !1, this.text = h.title, this.column = h, this.colspan = h.colspan || 1, this.widthFillDisable = h.widthFillDisable || !1, this.rowspan = h.rowspan || 1, this.rules = h.rules, this.readonly = h.readonly || !1, this.required = h.required || !1, this.rowKey = Jt(), this.hasChildren = h.children && h.children.length > 0 || !1, this.render = h.renderHeader;
2953
2974
  }
2954
2975
  /**
2955
2976
  * 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
@@ -3042,10 +3063,10 @@ class oe extends re {
3042
3063
  }
3043
3064
  class ui {
3044
3065
  constructor(t) {
3045
- l(this, "ctx");
3046
- l(this, "visibleHoverCell");
3047
- l(this, "resizeObserver");
3048
- l(this, "mutationObserver");
3066
+ a(this, "ctx");
3067
+ a(this, "visibleHoverCell");
3068
+ a(this, "resizeObserver");
3069
+ a(this, "mutationObserver");
3049
3070
  this.ctx = t, this.init();
3050
3071
  }
3051
3072
  init() {
@@ -3215,58 +3236,59 @@ class ui {
3215
3236
  }
3216
3237
  class gi {
3217
3238
  constructor(t, e) {
3218
- l(this, "eventBus");
3219
- l(this, "eventBrowser");
3220
- l(this, "eventTable");
3221
- l(this, "containerElement");
3222
- l(this, "stageElement");
3223
- l(this, "canvasElement");
3224
- l(this, "overlayerElement");
3225
- l(this, "editorElement");
3226
- l(this, "emptyElement");
3227
- l(this, "contextMenuElement");
3228
- l(this, "stageWidth", 0);
3229
- l(this, "stageHeight", 0);
3230
- l(this, "paint");
3231
- l(this, "icons");
3232
- l(this, "isMouseoverTargetContainer", !1);
3233
- l(this, "mousedown", !1);
3234
- l(this, "isPointer", !1);
3235
- l(this, "rowResizing", !1);
3239
+ a(this, "eventBus");
3240
+ a(this, "eventBrowser");
3241
+ a(this, "eventTable");
3242
+ a(this, "containerElement");
3243
+ a(this, "stageElement");
3244
+ a(this, "canvasElement");
3245
+ a(this, "overlayerElement");
3246
+ a(this, "editorElement");
3247
+ a(this, "emptyElement");
3248
+ a(this, "contextMenuElement");
3249
+ a(this, "stageWidth", 0);
3250
+ a(this, "stageHeight", 0);
3251
+ a(this, "paint");
3252
+ a(this, "icons");
3253
+ a(this, "isMouseoverTargetContainer", !1);
3254
+ a(this, "mousedown", !1);
3255
+ a(this, "isPointer", !1);
3256
+ a(this, "rowResizing", !1);
3236
3257
  // 行调整大小中
3237
- l(this, "columnResizing", !1);
3258
+ a(this, "columnResizing", !1);
3238
3259
  // 列调整大小中
3239
- l(this, "scrollerMove", !1);
3260
+ a(this, "scrollerMove", !1);
3240
3261
  // 滚动条移动中
3241
- l(this, "scrollerFocus", !1);
3262
+ a(this, "scrollerFocus", !1);
3242
3263
  // 滚动条focus中
3243
- l(this, "autofillMove", !1);
3264
+ a(this, "autofillMove", !1);
3244
3265
  // 自动填充移动中
3245
- l(this, "selectorMove", !1);
3266
+ a(this, "selectorMove", !1);
3246
3267
  // 选择器移动中
3247
- l(this, "adjustPositioning", !1);
3268
+ a(this, "adjustPositioning", !1);
3248
3269
  // 调整位置中
3249
- l(this, "editing", !1);
3270
+ a(this, "editing", !1);
3250
3271
  // 编辑中
3251
- l(this, "onlyMergeCell", !1);
3272
+ a(this, "onlyMergeCell", !1);
3252
3273
  // 只有合并单元格
3253
- l(this, "selectOnlyOne", !1);
3274
+ a(this, "selectOnlyOne", !1);
3254
3275
  // 只选择一个
3255
- l(this, "scrollY", 0);
3256
- l(this, "scrollX", 0);
3257
- l(this, "fixedLeftWidth", 0);
3258
- l(this, "fixedRightWidth", 0);
3259
- l(this, "lastCenterColIndex", 0);
3260
- l(this, "maxColIndex", 0);
3261
- l(this, "maxRowIndex", 0);
3262
- l(this, "hoverRow");
3263
- l(this, "clickCell");
3264
- l(this, "focusCell");
3265
- l(this, "hoverCell");
3266
- l(this, "clickCellHeader");
3267
- l(this, "focusCellHeader");
3268
- l(this, "hoverCellHeader");
3269
- l(this, "body", {
3276
+ a(this, "scrollY", 0);
3277
+ a(this, "scrollX", 0);
3278
+ a(this, "fixedLeftWidth", 0);
3279
+ a(this, "fixedRightWidth", 0);
3280
+ a(this, "lastCenterColIndex", 0);
3281
+ a(this, "maxColIndex", 0);
3282
+ a(this, "maxRowIndex", 0);
3283
+ a(this, "hoverRow");
3284
+ a(this, "clickCell");
3285
+ a(this, "focusCell");
3286
+ a(this, "currentCell");
3287
+ a(this, "hoverCell");
3288
+ a(this, "clickCellHeader");
3289
+ a(this, "focusCellHeader");
3290
+ a(this, "hoverCellHeader");
3291
+ a(this, "body", {
3270
3292
  x: 0,
3271
3293
  y: 0,
3272
3294
  width: 0,
@@ -3279,7 +3301,7 @@ class gi {
3279
3301
  renderRows: [],
3280
3302
  data: []
3281
3303
  });
3282
- l(this, "footer", {
3304
+ a(this, "footer", {
3283
3305
  x: 0,
3284
3306
  y: 0,
3285
3307
  width: 0,
@@ -3288,7 +3310,7 @@ class gi {
3288
3310
  visibleWidth: 0,
3289
3311
  renderRows: []
3290
3312
  });
3291
- l(this, "header", {
3313
+ a(this, "header", {
3292
3314
  x: 0,
3293
3315
  y: 0,
3294
3316
  width: 0,
@@ -3303,21 +3325,21 @@ class gi {
3303
3325
  fixedRightCellHeaders: [],
3304
3326
  renderCenterCellHeaders: []
3305
3327
  });
3306
- l(this, "selector", {
3328
+ a(this, "selector", {
3307
3329
  enable: !1,
3308
3330
  xArr: [-1, -1],
3309
3331
  yArr: [-1, -1],
3310
3332
  xArrCopy: [-1, -1],
3311
3333
  yArrCopy: [-1, -1]
3312
3334
  });
3313
- l(this, "autofill", {
3335
+ a(this, "autofill", {
3314
3336
  enable: !1,
3315
3337
  xArr: [-1, -1],
3316
3338
  yArr: [-1, -1]
3317
3339
  });
3318
- l(this, "database");
3319
- l(this, "history");
3320
- l(this, "config");
3340
+ a(this, "database");
3341
+ a(this, "history");
3342
+ a(this, "config");
3321
3343
  const {
3322
3344
  containerElement: i,
3323
3345
  stageElement: s,
@@ -3360,7 +3382,18 @@ class gi {
3360
3382
  }
3361
3383
  setFocusCell(t) {
3362
3384
  var e;
3363
- this.focusCell !== t && (((e = this.focusCell) == null ? void 0 : e.rowKey) !== t.rowKey && (this.focusCell = t, this.emit("rowFocusChange", t)), this.focusCell = t, this.emit("cellFocusChange", t));
3385
+ if (this.focusCell !== t) {
3386
+ if (((e = this.focusCell) == null ? void 0 : e.rowKey) !== t.rowKey) {
3387
+ this.currentCell = t, this.emit("rowFocusChange", t);
3388
+ const i = {
3389
+ rowIndex: t.rowIndex,
3390
+ rowKey: t.rowKey,
3391
+ row: t.row
3392
+ };
3393
+ this.emit("currentRowChange", i);
3394
+ }
3395
+ this.focusCell = t, this.emit("cellFocusChange", t);
3396
+ }
3364
3397
  }
3365
3398
  clearSelector() {
3366
3399
  this.selector.enable = !1, this.selector.xArr = [-1, -1], this.selector.yArr = [-1, -1], this.emit("clearSelector");
@@ -3446,29 +3479,29 @@ class gi {
3446
3479
  }
3447
3480
  class zt {
3448
3481
  constructor(t, e) {
3449
- l(this, "ctx");
3450
- l(this, "type");
3451
- l(this, "isFocus", !1);
3452
- l(this, "trackX", 0);
3453
- l(this, "trackY", 0);
3454
- l(this, "trackWidth", 0);
3455
- l(this, "trackHeight", 0);
3456
- l(this, "splitPoints", []);
3482
+ a(this, "ctx");
3483
+ a(this, "type");
3484
+ a(this, "isFocus", !1);
3485
+ a(this, "trackX", 0);
3486
+ a(this, "trackY", 0);
3487
+ a(this, "trackWidth", 0);
3488
+ a(this, "trackHeight", 0);
3489
+ a(this, "splitPoints", []);
3457
3490
  //分割线
3458
- l(this, "barX", 0);
3459
- l(this, "barY", 0);
3460
- l(this, "barWidth", 0);
3461
- l(this, "barHeight", 0);
3462
- l(this, "distance", 0);
3491
+ a(this, "barX", 0);
3492
+ a(this, "barY", 0);
3493
+ a(this, "barWidth", 0);
3494
+ a(this, "barHeight", 0);
3495
+ a(this, "distance", 0);
3463
3496
  // 滚动条的长度
3464
- l(this, "visibleDistance", 0);
3497
+ a(this, "visibleDistance", 0);
3465
3498
  //可见区域的长度
3466
- l(this, "clientX", 0);
3467
- l(this, "clientY", 0);
3468
- l(this, "dragStart", 0);
3499
+ a(this, "clientX", 0);
3500
+ a(this, "clientY", 0);
3501
+ a(this, "dragStart", 0);
3469
3502
  // 拖拽开始的位置
3470
- l(this, "isDragging", !1);
3471
- l(this, "scroll", 0);
3503
+ a(this, "isDragging", !1);
3504
+ a(this, "scroll", 0);
3472
3505
  this.ctx = t, this.type = e, this.type === "vertical" ? this.scroll = this.ctx.scrollY : this.scroll = this.ctx.scrollX;
3473
3506
  }
3474
3507
  onWheel(t) {
@@ -3536,8 +3569,8 @@ class zt {
3536
3569
  } = this.ctx, h = s, c = i, d = e.height, f = e.width, x = t.height, g = this.ctx.footer.height;
3537
3570
  if (this.type === "vertical") {
3538
3571
  this.visibleDistance = c - r - d, this.distance = x - this.visibleDistance + g, this.trackX = h - r, this.trackY = 0, this.splitPoints = [this.trackX, d, this.trackX + r, d], this.trackWidth = r, this.trackHeight = c, this.barX = this.trackX - 1 + (r - o) / 2, this.barWidth = o;
3539
- const m = this.distance ? this.visibleDistance / (x + g) : 0;
3540
- let u = Math.floor(m * this.visibleDistance);
3572
+ const p = this.distance ? this.visibleDistance / (x + g) : 0;
3573
+ let u = Math.floor(p * this.visibleDistance);
3541
3574
  u < 30 ? u = 30 : u > this.visibleDistance && (u = 0), this.barHeight = u, this.barY = d + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
3542
3575
  } else {
3543
3576
  this.visibleDistance = h - r, this.distance = f - this.visibleDistance, this.splitPoints = [
@@ -3546,8 +3579,8 @@ class zt {
3546
3579
  h - r,
3547
3580
  c
3548
3581
  ];
3549
- const m = n ? 0 : 0.5;
3550
- this.trackX = 0, this.trackY = c - r + m, this.trackWidth = h, this.trackHeight = r;
3582
+ const p = n ? 0 : 0.5;
3583
+ this.trackX = 0, this.trackY = c - r + p, this.trackWidth = h, this.trackHeight = r;
3551
3584
  const u = this.distance ? this.visibleDistance / f : 0;
3552
3585
  let w = Math.floor(u * this.visibleDistance);
3553
3586
  this.barY = this.trackY - 1 + (r - o) / 2, w < 30 ? w = 30 : w >= this.visibleDistance && (w = 0), this.barWidth = w, this.barHeight = o, this.barX = this.scroll / this.distance * (this.visibleDistance - this.barWidth), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
@@ -3573,9 +3606,9 @@ class zt {
3573
3606
  }
3574
3607
  class wi {
3575
3608
  constructor(t) {
3576
- l(this, "ctx");
3577
- l(this, "verticalScrollbar");
3578
- l(this, "horizontalScrollbar");
3609
+ a(this, "ctx");
3610
+ a(this, "verticalScrollbar");
3611
+ a(this, "horizontalScrollbar");
3579
3612
  this.ctx = t, this.verticalScrollbar = new zt(t, "vertical"), this.horizontalScrollbar = new zt(t, "horizontal"), this.ctx.on("wheel", (e) => this.onWheel(e)), this.ctx.on("mousedown", (e) => this.onMouseDown(e)), this.ctx.on("mousemove", (e) => this.onMouseMove(e)), this.ctx.on("mouseup", () => this.onMouseUp()), this.ctx.on("touchmove", (e) => this.onTouchmove(e)), this.ctx.on("touchstart", (e) => {
3580
3613
  this.onTouchstart(e);
3581
3614
  }), this.ctx.on("setScroll", (e, i) => {
@@ -3640,41 +3673,41 @@ class wi {
3640
3673
  }
3641
3674
  class pi {
3642
3675
  constructor(t) {
3643
- l(this, "ctx");
3676
+ a(this, "ctx");
3644
3677
  // 上下文
3645
- l(this, "x", 0);
3678
+ a(this, "x", 0);
3646
3679
  // x坐标
3647
- l(this, "y", 0);
3680
+ a(this, "y", 0);
3648
3681
  // y坐标
3649
- l(this, "width", 0);
3682
+ a(this, "width", 0);
3650
3683
  // 宽度
3651
- l(this, "height", 0);
3684
+ a(this, "height", 0);
3652
3685
  // 高度
3653
- l(this, "resizeTarget", null);
3686
+ a(this, "resizeTarget", null);
3654
3687
  //调整表头
3655
- l(this, "resizeNum", 0);
3688
+ a(this, "resizeNum", 0);
3656
3689
  // 调整列的数量
3657
- l(this, "isResizing", !1);
3690
+ a(this, "isResizing", !1);
3658
3691
  // 是否移动中
3659
- l(this, "clientX", 0);
3692
+ a(this, "clientX", 0);
3660
3693
  // 鼠标按下时的x轴位置
3661
- l(this, "resizeDiff", 0);
3694
+ a(this, "resizeDiff", 0);
3662
3695
  // 是否移动中
3663
- l(this, "columnIndex", 0);
3664
- l(this, "isMouseDown", !1);
3696
+ a(this, "columnIndex", 0);
3697
+ a(this, "isMouseDown", !1);
3665
3698
  // 是否按下
3666
- l(this, "columns");
3667
- l(this, "visibleLeafColumns", []);
3668
- l(this, "visibleHeight", 0);
3669
- l(this, "visibleWidth", 0);
3670
- l(this, "allCellHeaders", []);
3671
- l(this, "leafCellHeaders", []);
3672
- l(this, "renderLeafCellHeaders", []);
3673
- l(this, "fixedLeftCellHeaders", []);
3674
- l(this, "centerCellHeaders", []);
3675
- l(this, "fixedRightCellHeaders", []);
3676
- l(this, "renderCenterCellHeaders", []);
3677
- l(this, "renderFixedCellHeaders", []);
3699
+ a(this, "columns");
3700
+ a(this, "visibleLeafColumns", []);
3701
+ a(this, "visibleHeight", 0);
3702
+ a(this, "visibleWidth", 0);
3703
+ a(this, "allCellHeaders", []);
3704
+ a(this, "leafCellHeaders", []);
3705
+ a(this, "renderLeafCellHeaders", []);
3706
+ a(this, "fixedLeftCellHeaders", []);
3707
+ a(this, "centerCellHeaders", []);
3708
+ a(this, "fixedRightCellHeaders", []);
3709
+ a(this, "renderCenterCellHeaders", []);
3710
+ a(this, "renderFixedCellHeaders", []);
3678
3711
  this.ctx = t, this.ctx.on(
3679
3712
  "resetHeader",
3680
3713
  Qt(() => {
@@ -3688,11 +3721,14 @@ class pi {
3688
3721
  } = this.ctx, i = this.ctx.database.getColumns();
3689
3722
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
3690
3723
  const s = te(i), r = _t(i);
3691
- this.height = t * s, this.width = r.reduce((f, x) => f + ((x == null ? void 0 : x.width) || 100), 0), this.visibleHeight = this.height;
3724
+ this.height = t * s, this.width = r.reduce((f, x) => {
3725
+ const { width: g = 100, maxWidth: p, minWidth: u } = x;
3726
+ return p && g > p ? f + p : u && g < u ? f + u : f + g;
3727
+ }, 0), this.visibleHeight = this.height;
3692
3728
  const o = ei(ee(i, s));
3693
3729
  this.columnIndex = 0, this.resizeNum = 0, this.render(o, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
3694
3730
  const n = this.ctx.containerElement.getBoundingClientRect();
3695
- this.resizeNum > 0 ? this.ctx.stageWidth = Math.floor(n.width) : this.ctx.stageWidth = Math.floor(this.width + e), this.ctx.stageElement.style.width = this.ctx.stageWidth - 0.5 + "px", this.visibleWidth = this.ctx.stageWidth - e;
3731
+ this.resizeNum > 0 ? this.ctx.stageWidth = Math.floor(n.width) : this.ctx.stageWidth = Math.floor(this.width + e), this.ctx.stageElement.style.width = this.ctx.stageWidth + "px", this.visibleWidth = this.ctx.stageWidth - e;
3696
3732
  const h = this.visibleWidth - this.width;
3697
3733
  if (this.resizeNum && h > 0) {
3698
3734
  const f = Math.floor(h / this.resizeNum * 100) / 100;
@@ -3711,7 +3747,7 @@ class pi {
3711
3747
  t && (this.ctx.on("mousedown", (e) => {
3712
3748
  this.ctx.isTarget(e) && (this.clientX = e.clientX, this.resizeTarget ? (this.isResizing = !0, this.ctx.columnResizing = !0) : this.isResizing = !1, this.isMouseDown = !0);
3713
3749
  }), this.ctx.on("mouseup", () => {
3714
- this.isMouseDown = !1, this.resizeDiff !== 0 && this.resizeTarget && this.resizeColumn(this.resizeTarget, this.resizeDiff), this.resizeTarget = null, this.isResizing = !1, this.ctx.columnResizing = !1, this.clientX = 0;
3750
+ this.isMouseDown = !1, this.resizeDiff !== 0 && this.resizeTarget && this.resizeColumn(this.resizeTarget, this.resizeDiff), this.resizeTarget = null, this.isResizing = !1, this.isMouseDown = !1, this.ctx.columnResizing = !1, this.clientX = 0, this.resizeDiff = 0;
3715
3751
  }), this.ctx.on("mousemove", (e) => {
3716
3752
  if (this.ctx.editing) return;
3717
3753
  const {
@@ -3719,9 +3755,9 @@ class pi {
3719
3755
  config: { RESIZE_COLUMN_MIN_WIDTH: s }
3720
3756
  } = this.ctx;
3721
3757
  if (this.isResizing && this.resizeTarget) {
3722
- const r = this.resizeTarget.width;
3723
- let o = e.clientX - this.clientX;
3724
- o + r < s && (o = -(r - s)), this.resizeDiff = o, this.ctx.emit("draw");
3758
+ const r = this.resizeTarget.width, o = this.resizeTarget.minWidth, n = this.resizeTarget.maxWidth;
3759
+ let h = e.clientX - this.clientX;
3760
+ h + r < s && (h = -(r - s)), o && h + r < o && (h = -(r - o)), n && h + r > n && (h = n - r), this.resizeDiff = h, this.ctx.emit("draw");
3725
3761
  } else {
3726
3762
  if (this.resizeTarget = null, this.isMouseDown)
3727
3763
  return;
@@ -3789,10 +3825,10 @@ class pi {
3789
3825
  const { HEADER_HEIGHT: r = 0 } = this.ctx.config;
3790
3826
  for (let o = 0; o < i; o++) {
3791
3827
  const n = t[o], h = r * (n.rowspan || 0), c = r * (n.level || 0);
3792
- let d = n.width || 100;
3793
- n.children && (d = _t(n.children).reduce((g, m) => g + ((m == null ? void 0 : m.width) || 100), 0));
3794
- const f = new oe(this.ctx, this.columnIndex, s, c, d, h, n);
3795
- this.ctx.database.setHeader(n.key, f), this.allCellHeaders.push(f), n.children || (this.leafCellHeaders.push(f), f.column.widthFillDisable || this.resizeNum++), n.fixed === "left" ? this.fixedLeftCellHeaders.push(f) : n.fixed === "right" ? this.fixedRightCellHeaders.push(f) : this.centerCellHeaders.push(f), !n.children && this.columnIndex++, n.children && this.render(n.children, s), s += d;
3828
+ let { minWidth: d, maxWidth: f } = n, x = n.width || 100;
3829
+ d && x < d && (x = d), f && x > f && (x = f), n.children && (x = _t(n.children).reduce((u, w) => u + ((w == null ? void 0 : w.width) || 100), 0));
3830
+ const g = new oe(this.ctx, this.columnIndex, s, c, x, h, n);
3831
+ this.ctx.database.setHeader(n.key, g), this.allCellHeaders.push(g), n.children || (this.leafCellHeaders.push(g), g.column.widthFillDisable || this.resizeNum++), n.fixed === "left" ? this.fixedLeftCellHeaders.push(g) : n.fixed === "right" ? this.fixedRightCellHeaders.push(g) : this.centerCellHeaders.push(g), !n.children && this.columnIndex++, n.children && this.render(n.children, s), s += x;
3796
3832
  }
3797
3833
  }
3798
3834
  drawTipLine() {
@@ -3867,18 +3903,18 @@ class pi {
3867
3903
  }
3868
3904
  class ne {
3869
3905
  constructor(t, e, i = 0, s = 0, r = 0, o = 0, n, h = "body") {
3870
- l(this, "ctx");
3871
- l(this, "x", 0);
3872
- l(this, "y", 0);
3873
- l(this, "width", 0);
3874
- l(this, "height");
3875
- l(this, "cells", []);
3876
- l(this, "fixedCells", []);
3877
- l(this, "noFixedCells", []);
3878
- l(this, "rowIndex", 0);
3879
- l(this, "rowKey", "");
3880
- l(this, "rowType", "body");
3881
- l(this, "data");
3906
+ a(this, "ctx");
3907
+ a(this, "x", 0);
3908
+ a(this, "y", 0);
3909
+ a(this, "width", 0);
3910
+ a(this, "height");
3911
+ a(this, "cells", []);
3912
+ a(this, "fixedCells", []);
3913
+ a(this, "noFixedCells", []);
3914
+ a(this, "rowIndex", 0);
3915
+ a(this, "rowKey", "");
3916
+ a(this, "rowType", "body");
3917
+ a(this, "data");
3882
3918
  this.ctx = t, this.x = i, this.y = s, this.width = r, this.height = o, this.rowIndex = e, this.rowKey = t.database.getRowKeyForRowIndex(e) || "", this.rowType = h, this.data = n, this.update();
3883
3919
  }
3884
3920
  update() {
@@ -3922,29 +3958,29 @@ class ne {
3922
3958
  }
3923
3959
  class mi {
3924
3960
  constructor(t) {
3925
- l(this, "resizeTarget", null);
3961
+ a(this, "resizeTarget", null);
3926
3962
  //调整行大小的目标
3927
- l(this, "isMouseDown", !1);
3963
+ a(this, "isMouseDown", !1);
3928
3964
  // 是否按下
3929
- l(this, "resizeDiff", 0);
3965
+ a(this, "resizeDiff", 0);
3930
3966
  // 是否移动中
3931
- l(this, "clientY", 0);
3967
+ a(this, "clientY", 0);
3932
3968
  // 鼠标按下时的y轴位置
3933
- l(this, "ctx");
3934
- l(this, "x", 0);
3935
- l(this, "y", 0);
3936
- l(this, "width", 0);
3937
- l(this, "height", 0);
3938
- l(this, "headIndex", 0);
3939
- l(this, "tailIndex", 0);
3940
- l(this, "isResizing", !1);
3969
+ a(this, "ctx");
3970
+ a(this, "x", 0);
3971
+ a(this, "y", 0);
3972
+ a(this, "width", 0);
3973
+ a(this, "height", 0);
3974
+ a(this, "headIndex", 0);
3975
+ a(this, "tailIndex", 0);
3976
+ a(this, "isResizing", !1);
3941
3977
  //是否正在调整大小
3942
- l(this, "renderRows", []);
3943
- l(this, "visibleRows", []);
3944
- l(this, "visibleHeight", 0);
3945
- l(this, "visibleWidth", 0);
3946
- l(this, "containerRect");
3947
- l(this, "data", []);
3978
+ a(this, "renderRows", []);
3979
+ a(this, "visibleRows", []);
3980
+ a(this, "visibleHeight", 0);
3981
+ a(this, "visibleWidth", 0);
3982
+ a(this, "containerRect");
3983
+ a(this, "data", []);
3948
3984
  this.ctx = t, this.init(), this.initResizeRow();
3949
3985
  }
3950
3986
  init() {
@@ -3967,23 +4003,23 @@ class mi {
3967
4003
  if (!e.width)
3968
4004
  return;
3969
4005
  this.x = 0, x === "top" && r ? this.y = e.height + i.height : this.y = e.height;
3970
- const { data: g, sumHeight: m } = s.getData();
3971
- this.height = m, this.data = g, this.width = e.width, this.visibleWidth = this.ctx.stageWidth - o;
4006
+ const { data: g, sumHeight: p } = s.getData();
4007
+ this.height = p, this.data = g, this.width = e.width, this.visibleWidth = this.ctx.stageWidth - o;
3972
4008
  const u = this.ctx.footer.height;
3973
4009
  !this.data.length && !n ? this.height = h : !this.data.length && n && (this.height = n - e.height - u - o);
3974
4010
  let w = this.height + e.height + o;
3975
4011
  w += u;
3976
- let p = w;
3977
- const C = window.innerHeight, { top: y } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
3978
- if (C > y && d && !n) {
3979
- const v = C - y - f;
3980
- v > e.height + o ? p = v : w > c && (p = c);
3981
- } else this.data.length && n ? p = n : this.data.length && c && w > c && (p = c);
3982
- p > 0 && (this.ctx.stageHeight = Math.floor(p), this.ctx.stageElement.style.height = `${this.ctx.stageHeight - 0.5}px`);
3983
- let b = this.ctx.stageHeight - e.height - o;
3984
- r ? this.visibleHeight = b - u : this.visibleHeight = b, this.data.length || (this.height = this.visibleHeight), this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = g;
4012
+ let m = w;
4013
+ const b = window.innerHeight, { top: y } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
4014
+ if (b > y && d && !n) {
4015
+ const T = b - y - f;
4016
+ T > e.height + o ? m = T : w > c && (m = c);
4017
+ } else this.data.length && n ? m = n : this.data.length && c && w > c && (m = c);
4018
+ m > 0 && (this.ctx.stageHeight = Math.floor(m), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
4019
+ let C = this.ctx.stageHeight - e.height - o;
4020
+ r ? this.visibleHeight = C - u : this.visibleHeight = C, this.data.length || (this.height = this.visibleHeight), this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = g;
3985
4021
  const E = window.devicePixelRatio || 1, R = this.ctx.stageWidth * E, O = this.ctx.stageHeight * E;
3986
- t.width = Math.floor(R), t.height = Math.floor(O);
4022
+ t.width = Math.round(R), t.height = Math.round(O);
3987
4023
  const I = this.data.length ? "not-empty" : "empty";
3988
4024
  this.ctx.emit("emptyChange", {
3989
4025
  isEmpty: I,
@@ -3993,10 +4029,9 @@ class mi {
3993
4029
  footerHeight: u,
3994
4030
  width: this.width,
3995
4031
  height: this.data.length ? 0 : h + u
3996
- }), this.ctx.canvasElement.setAttribute(
3997
- "style",
3998
- ` height:${this.ctx.stageHeight}px;width:${this.ctx.stageWidth}px;`
3999
- ), this.ctx.paint.scale(E);
4032
+ });
4033
+ const _ = Math.round(t.width / E * 1e4) / 1e4, v = Math.round(t.height / E * 1e4) / 1e4;
4034
+ this.ctx.canvasElement.setAttribute("style", `height:${v}px;width:${_}px;`), this.ctx.paint.scale(E);
4000
4035
  }
4001
4036
  // 调整行的高度
4002
4037
  initResizeRow() {
@@ -4037,8 +4072,8 @@ class mi {
4037
4072
  for (let f = 0; f < this.renderRows.length; f++) {
4038
4073
  const x = this.renderRows[f];
4039
4074
  if (r > x.y - c + x.height - 1.5 && r < x.y - c + x.height + 1.5 && r < h - 4)
4040
- for (let m = 0; m < x.cells.length; m++) {
4041
- const u = x.cells[m];
4075
+ for (let p = 0; p < x.cells.length; p++) {
4076
+ const u = x.cells[p];
4042
4077
  o > u.drawX + 10 && o < u.drawX + u.width - 10 && u.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = x);
4043
4078
  }
4044
4079
  }
@@ -4122,7 +4157,7 @@ class mi {
4122
4157
  this.headIndex = Math.max(0, h), this.tailIndex = Math.min(this.ctx.maxRowIndex, c + 1), this.visibleRows = o.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
4123
4158
  const d = [];
4124
4159
  for (let f = 0; f < this.visibleRows.length; f++) {
4125
- const x = this.headIndex + f, g = this.visibleRows[f], { height: m, top: u } = this.ctx.database.getPositionForRowIndex(x), w = new ne(this.ctx, x, 0, u + this.y, t.width, m, g);
4160
+ const x = this.headIndex + f, g = this.visibleRows[f], { height: p, top: u } = this.ctx.database.getPositionForRowIndex(x), w = new ne(this.ctx, x, 0, u + this.y, t.width, p, g);
4126
4161
  d.push(w);
4127
4162
  }
4128
4163
  this.renderRows = d, this.ctx.body.renderRows = d;
@@ -4141,15 +4176,15 @@ class mi {
4141
4176
  }
4142
4177
  class yi {
4143
4178
  constructor(t) {
4144
- l(this, "ctx");
4145
- l(this, "renderRows", []);
4146
- l(this, "data", []);
4147
- l(this, "x", 0);
4148
- l(this, "y", 0);
4149
- l(this, "width", 0);
4150
- l(this, "height", 0);
4151
- l(this, "visibleWidth", 0);
4152
- l(this, "visibleHeight", 0);
4179
+ a(this, "ctx");
4180
+ a(this, "renderRows", []);
4181
+ a(this, "data", []);
4182
+ a(this, "x", 0);
4183
+ a(this, "y", 0);
4184
+ a(this, "width", 0);
4185
+ a(this, "height", 0);
4186
+ a(this, "visibleWidth", 0);
4187
+ a(this, "visibleHeight", 0);
4153
4188
  this.ctx = t, this.init();
4154
4189
  }
4155
4190
  init() {
@@ -4223,15 +4258,15 @@ class yi {
4223
4258
  class Ei {
4224
4259
  // 垂直滚动定时器
4225
4260
  constructor(t) {
4226
- l(this, "isCut", !1);
4227
- l(this, "isMultipleRow", !1);
4228
- l(this, "mousedownHeader", !1);
4229
- l(this, "ctx");
4230
- l(this, "adjustPositionX", "");
4231
- l(this, "adjustPositionY", "");
4232
- l(this, "timerX", 0);
4261
+ a(this, "isCut", !1);
4262
+ a(this, "isMultipleRow", !1);
4263
+ a(this, "mousedownHeader", !1);
4264
+ a(this, "ctx");
4265
+ a(this, "adjustPositionX", "");
4266
+ a(this, "adjustPositionY", "");
4267
+ a(this, "timerX", 0);
4233
4268
  // 水平滚动定时器
4234
- l(this, "timerY", 0);
4269
+ a(this, "timerY", 0);
4235
4270
  this.ctx = t, this.init();
4236
4271
  }
4237
4272
  init() {
@@ -4340,15 +4375,15 @@ class Ei {
4340
4375
  SELECTOR_AREA_MAX_Y: d,
4341
4376
  SELECTOR_AREA_MAX_X_OFFSET: f,
4342
4377
  SELECTOR_AREA_MAX_Y_OFFSET: x
4343
- } = this.ctx.config, g = n, m = h || this.ctx.maxColIndex - f, u = c, w = d || this.ctx.maxRowIndex - x;
4344
- let [p, C] = r, [y, b] = o;
4345
- if (p < g || C > m || y < u || b > w)
4378
+ } = this.ctx.config, g = n, p = h || this.ctx.maxColIndex - f, u = c, w = d || this.ctx.maxRowIndex - x;
4379
+ let [m, b] = r, [y, C] = o;
4380
+ if (m < g || b > p || y < u || C > w)
4346
4381
  return;
4347
4382
  if (this.ctx.stageElement.focus({ preventScroll: !0 }), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
4348
4383
  const R = this.adjustMergeCells(r, o);
4349
- y = R.yArr[0], b = R.yArr[1], p = R.xArr[0], C = R.xArr[1], this.ctx.onlyMergeCell = R.onlyMergeCell;
4384
+ y = R.yArr[0], C = R.yArr[1], m = R.xArr[0], b = R.xArr[1], this.ctx.onlyMergeCell = R.onlyMergeCell;
4350
4385
  }
4351
- p === C && y === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, r = [Math.max(g, p), Math.min(m, C)], o = [Math.max(u, y), Math.min(w, b)];
4386
+ m === b && y === C ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, r = [Math.max(g, m), Math.min(p, b)], o = [Math.max(u, y), Math.min(w, C)];
4352
4387
  const { BEFORE_SET_SELECTOR_METHOD: E } = this.ctx.config;
4353
4388
  if (typeof E == "function") {
4354
4389
  const O = E({
@@ -4364,18 +4399,18 @@ class Ei {
4364
4399
  }
4365
4400
  }
4366
4401
  adjustMergeCells(t, e) {
4367
- var m;
4402
+ var p;
4368
4403
  const [i, s] = e, [r, o] = t;
4369
4404
  let n = [], h = [];
4370
4405
  for (let u = 0; u <= e[1] - e[0]; u++)
4371
4406
  for (let w = 0; w <= t[1] - t[0]; w++) {
4372
- const p = u + e[0], C = w + t[0], y = this.ctx.database.getVirtualBodyCell(p, C);
4373
- y && ((p === i || p === s) && n.push(y), (C === r || C === o) && h.push(y));
4407
+ const m = u + e[0], b = w + t[0], y = this.ctx.database.getVirtualBodyCell(m, b);
4408
+ y && ((m === i || m === s) && n.push(y), (b === r || b === o) && h.push(y));
4374
4409
  }
4375
4410
  const c = n.reduce(
4376
4411
  (u, w) => {
4377
- const { yArr: p } = w.getSpanInfo(), [C, y] = p;
4378
- return u.minY = Math.min(u.minY, C), u.maxY = Math.max(u.maxY, y), u;
4412
+ const { yArr: m } = w.getSpanInfo(), [b, y] = m;
4413
+ return u.minY = Math.min(u.minY, b), u.maxY = Math.max(u.maxY, y), u;
4379
4414
  },
4380
4415
  {
4381
4416
  minY: i,
@@ -4383,8 +4418,8 @@ class Ei {
4383
4418
  }
4384
4419
  ), d = h.reduce(
4385
4420
  (u, w) => {
4386
- const { xArr: p } = w.getSpanInfo(), [C, y] = p;
4387
- return u.minX = Math.min(u.minX, C), u.maxX = Math.max(u.maxX, y), u;
4421
+ const { xArr: m } = w.getSpanInfo(), [b, y] = m;
4422
+ return u.minX = Math.min(u.minX, b), u.maxX = Math.max(u.maxX, y), u;
4388
4423
  },
4389
4424
  {
4390
4425
  minX: r,
@@ -4393,7 +4428,7 @@ class Ei {
4393
4428
  ), f = [d.minX, d.maxX], x = [c.minY, c.maxY];
4394
4429
  let g = !1;
4395
4430
  if (d.minX !== d.maxX || c.minY !== c.maxY) {
4396
- const u = JSON.stringify(f) + JSON.stringify(x), w = (m = this.ctx.focusCell) == null ? void 0 : m.getSpanInfo();
4431
+ const u = JSON.stringify(f) + JSON.stringify(x), w = (p = this.ctx.focusCell) == null ? void 0 : p.getSpanInfo();
4397
4432
  g = (w && JSON.stringify(w.xArr) + JSON.stringify(w.yArr)) === u;
4398
4433
  }
4399
4434
  return {
@@ -4436,8 +4471,8 @@ class Ei {
4436
4471
  SELECTOR_AREA_MAX_Y: o,
4437
4472
  SELECTOR_AREA_MAX_X_OFFSET: n,
4438
4473
  SELECTOR_AREA_MAX_Y_OFFSET: h
4439
- } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, x = o || this.ctx.maxRowIndex - h, g = [c, d], m = [f, x];
4440
- this.setSelector(g, m);
4474
+ } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - n, f = r, x = o || this.ctx.maxRowIndex - h, g = [c, d], p = [f, x];
4475
+ this.setSelector(g, p);
4441
4476
  }
4442
4477
  }
4443
4478
  selectRows(t, e = !0) {
@@ -4574,14 +4609,14 @@ class Ei {
4574
4609
  const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
4575
4610
  navigator.clipboard.readText().then(async (r) => {
4576
4611
  let o = si(r);
4577
- const n = [i, i + o[0].length - 1], h = [e, e + o.length - 1], [c, d] = h, [f, x] = n, g = d - this.ctx.maxRowIndex, m = x - this.ctx.maxColIndex;
4578
- (g > 0 || m > 0) && this.ctx.emit("onPastedDataOverflow", {
4612
+ const n = [i, i + o[0].length - 1], h = [e, e + o.length - 1], [c, d] = h, [f, x] = n, g = d - this.ctx.maxRowIndex, p = x - this.ctx.maxColIndex;
4613
+ (g > 0 || p > 0) && this.ctx.emit("onPastedDataOverflow", {
4579
4614
  maxY: d,
4580
4615
  maxX: x,
4581
4616
  minY: c,
4582
4617
  minX: f,
4583
4618
  overflowRowCount: g,
4584
- overflowColCount: m,
4619
+ overflowColCount: p,
4585
4620
  textArr: o
4586
4621
  });
4587
4622
  const u = o.length === 1 && o[0].length === 1;
@@ -4595,8 +4630,8 @@ class Ei {
4595
4630
  }
4596
4631
  let w = [];
4597
4632
  for (let y = 0; y <= o.length - 1; y++) {
4598
- const b = o[y].length;
4599
- for (let E = 0; E <= b - 1; E++) {
4633
+ const C = o[y].length;
4634
+ for (let E = 0; E <= C - 1; E++) {
4600
4635
  const R = y + e, O = E + i, I = o[y][E], _ = this.ctx.database.getItemValueForRowIndexAndColIndex(
4601
4636
  R,
4602
4637
  O
@@ -4619,30 +4654,30 @@ class Ei {
4619
4654
  this.ctx.selector.yArrCopy,
4620
4655
  !0
4621
4656
  // 忽略设置,只返回数据,用于cut,实现历史回退需要返回两次问题
4622
- ), b = w.map((E) => `${E.rowKey}-${E.key}`);
4657
+ ), C = w.map((E) => `${E.rowKey}-${E.key}`);
4623
4658
  y.forEach((E) => {
4624
- b.includes(`${E.rowKey}-${E.key}`) || w.unshift(E);
4659
+ C.includes(`${E.rowKey}-${E.key}`) || w.unshift(E);
4625
4660
  }), this.isCut = !1;
4626
4661
  }
4627
4662
  if (!w.length)
4628
4663
  return;
4629
- const { BEFORE_PASTE_DATA_METHOD: p } = this.ctx.config;
4630
- if (typeof p == "function") {
4631
- const y = p, b = w.map((E) => ({
4664
+ const { BEFORE_PASTE_DATA_METHOD: m } = this.ctx.config;
4665
+ if (typeof m == "function") {
4666
+ const y = m, C = w.map((E) => ({
4632
4667
  rowKey: E.rowKey,
4633
4668
  key: E.key,
4634
4669
  value: E.value,
4635
4670
  oldValue: this.ctx.database.getItemValue(E.rowKey, E.key),
4636
4671
  row: this.ctx.database.getRowDataItemForRowKey(E.rowKey)
4637
4672
  }));
4638
- if (w = await y(b, n, h, o), w && !w.length)
4673
+ if (w = await y(C, n, h, o), w && !w.length)
4639
4674
  return;
4640
4675
  }
4641
4676
  this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(w, !0);
4642
- let C = [];
4677
+ let b = [];
4643
4678
  s.forEach((y) => {
4644
- C.push(this.ctx.database.getRowDataItemForRowKey(y));
4645
- }), this.ctx.emit("pasteChange", w, C);
4679
+ b.push(this.ctx.database.getRowDataItemForRowKey(y));
4680
+ }), this.ctx.emit("pasteChange", w, b);
4646
4681
  }).catch((r) => {
4647
4682
  console.error("Failed to get the clipboard content:", r);
4648
4683
  });
@@ -4731,19 +4766,19 @@ class Ei {
4731
4766
  body: h,
4732
4767
  scrollX: c,
4733
4768
  scrollY: d,
4734
- config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: x, FOOTER_POSITION: g, ENABLE_MERGE_CELL_LINK: m }
4769
+ config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: x, FOOTER_POSITION: g, ENABLE_MERGE_CELL_LINK: p }
4735
4770
  } = this.ctx;
4736
4771
  if (!i)
4737
4772
  return;
4738
- m && this.ctx.onlyMergeCell && i.updateSpanInfo();
4739
- const { drawX: u, drawY: w, width: p, height: C, fixed: y } = i, b = r - u + 1, E = i.drawX + p - (e - s) + 1;
4740
- let R = o.height - w, O = C;
4773
+ p && this.ctx.onlyMergeCell && i.updateSpanInfo();
4774
+ const { drawX: u, drawY: w, width: m, height: b, fixed: y } = i, C = r - u + 1, E = i.drawX + m - (e - s) + 1;
4775
+ let R = o.height - w, O = b;
4741
4776
  O > h.visibleHeight && (O = h.visibleHeight);
4742
4777
  let I = 0;
4743
4778
  x && (g === "top" ? R = o.height + n.height - w : I = n.visibleHeight);
4744
4779
  const _ = w + O - (t - I - f);
4745
4780
  let v = c, S = d;
4746
- E > 0 && !y ? v = Math.floor(c + E) : b > 0 && !y && (v = Math.floor(c - b)), R > 0 ? S = Math.floor(d - R) : _ > 0 && (S = Math.floor(d + _)), (Math.abs(c - v) > 2 || Math.abs(d - S) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(v, S), this.ctx.emit("adjustBoundaryPosition", i));
4781
+ E > 0 && !y ? v = Math.floor(c + E) : C > 0 && !y && (v = Math.floor(c - C)), R > 0 ? S = Math.floor(d - R) : _ > 0 && (S = Math.floor(d + _)), (Math.abs(c - v) > 2 || Math.abs(d - S) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(v, S), this.ctx.emit("adjustBoundaryPosition", i));
4747
4782
  }
4748
4783
  destroy() {
4749
4784
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
@@ -4751,8 +4786,8 @@ class Ei {
4751
4786
  }
4752
4787
  class Ci {
4753
4788
  constructor(t) {
4754
- l(this, "ctx");
4755
- l(this, "maxColRowCell");
4789
+ a(this, "ctx");
4790
+ a(this, "maxColRowCell");
4756
4791
  this.ctx = t, this.init();
4757
4792
  }
4758
4793
  init() {
@@ -4807,11 +4842,11 @@ class Ci {
4807
4842
  SELECTOR_AREA_MAX_Y: f,
4808
4843
  SELECTOR_AREA_MAX_X_OFFSET: x,
4809
4844
  SELECTOR_AREA_MAX_Y_OFFSET: g
4810
- } = this.ctx.config, m = h, u = c || this.ctx.maxColIndex - x, w = d, p = f || this.ctx.maxRowIndex - g;
4811
- let [C, y] = o, [b, E] = n;
4812
- if (C < m || b < w)
4845
+ } = this.ctx.config, p = h, u = c || this.ctx.maxColIndex - x, w = d, m = f || this.ctx.maxRowIndex - g;
4846
+ let [b, y] = o, [C, E] = n;
4847
+ if (b < p || C < w)
4813
4848
  return;
4814
- o = [Math.max(m, C), Math.min(u, y)], n = [Math.max(w, b), Math.min(p, E)];
4849
+ o = [Math.max(p, b), Math.min(u, y)], n = [Math.max(w, C), Math.min(m, E)];
4815
4850
  const { BEFORE_SET_AUTOFILL_METHOD: R } = this.ctx.config;
4816
4851
  if (typeof R == "function") {
4817
4852
  const I = R({
@@ -4832,8 +4867,8 @@ class Ci {
4832
4867
  async autofillData() {
4833
4868
  const t = /* @__PURE__ */ new Set(), e = this.ctx.getSelectedData(), i = /* @__PURE__ */ new Map();
4834
4869
  for (let g = 0; g <= e.yArr[1] - e.yArr[0]; g++)
4835
- for (let m = 0; m <= e.xArr[1] - e.xArr[0]; m++) {
4836
- const u = g + e.yArr[0], w = m + e.xArr[0];
4870
+ for (let p = 0; p <= e.xArr[1] - e.xArr[0]; p++) {
4871
+ const u = g + e.yArr[0], w = p + e.xArr[0];
4837
4872
  i.set(`${u}-${w}`, !0);
4838
4873
  }
4839
4874
  const { value: s } = e, r = s[0].length, o = s.length, n = this.ctx.autofill.xArr, h = this.ctx.autofill.yArr, c = r === 1 && o === 1;
@@ -4847,14 +4882,14 @@ class Ci {
4847
4882
  }
4848
4883
  let d = [];
4849
4884
  for (let g = 0; g <= h[1] - h[0]; g++)
4850
- for (let m = 0; m <= n[1] - n[0]; m++) {
4851
- const u = m + n[0], w = g + h[0], p = s[g % o][m % r], C = this.ctx.database.getItemValueForRowIndexAndColIndex(w, u), y = `${w}-${u}`;
4852
- if (C && !i.has(y)) {
4853
- const { rowKey: b, key: E } = C;
4854
- this.ctx.database.getReadonly(b, E) || (t.add(b), d.push({
4855
- rowKey: b,
4885
+ for (let p = 0; p <= n[1] - n[0]; p++) {
4886
+ const u = p + n[0], w = g + h[0], m = s[g % o][p % r], b = this.ctx.database.getItemValueForRowIndexAndColIndex(w, u), y = `${w}-${u}`;
4887
+ if (b && !i.has(y)) {
4888
+ const { rowKey: C, key: E } = b;
4889
+ this.ctx.database.getReadonly(C, E) || (t.add(C), d.push({
4890
+ rowKey: C,
4856
4891
  key: E,
4857
- value: p,
4892
+ value: m,
4858
4893
  row: {}
4859
4894
  }));
4860
4895
  }
@@ -4864,14 +4899,14 @@ class Ci {
4864
4899
  this.ctx.selector.xArr = this.ctx.autofill.xArr, this.ctx.selector.yArr = this.ctx.autofill.yArr;
4865
4900
  const { BEFORE_AUTOFILL_DATA_METHOD: f } = this.ctx.config;
4866
4901
  if (typeof f == "function") {
4867
- const g = f, m = d.map((u) => ({
4902
+ const g = f, p = d.map((u) => ({
4868
4903
  rowKey: u.rowKey,
4869
4904
  key: u.key,
4870
4905
  value: u.value,
4871
4906
  oldValue: this.ctx.database.getItemValue(u.rowKey, u.key),
4872
4907
  row: this.ctx.database.getRowDataItemForRowKey(u.rowKey)
4873
4908
  }));
4874
- if (d = await g(m, n, h), d && !d.length)
4909
+ if (d = await g(p, n, h), d && !d.length)
4875
4910
  return;
4876
4911
  }
4877
4912
  this.ctx.batchSetItemValueByEditor(d, !0);
@@ -4892,9 +4927,9 @@ class Ci {
4892
4927
  destroy() {
4893
4928
  }
4894
4929
  }
4895
- const rt = Math.min, U = Math.max, ft = Math.round, z = (a) => ({
4896
- x: a,
4897
- y: a
4930
+ const rt = Math.min, U = Math.max, ft = Math.round, z = (l) => ({
4931
+ x: l,
4932
+ y: l
4898
4933
  }), bi = {
4899
4934
  left: "right",
4900
4935
  right: "left",
@@ -4904,46 +4939,46 @@ const rt = Math.min, U = Math.max, ft = Math.round, z = (a) => ({
4904
4939
  start: "end",
4905
4940
  end: "start"
4906
4941
  };
4907
- function It(a, t, e) {
4908
- return U(a, rt(t, e));
4942
+ function It(l, t, e) {
4943
+ return U(l, rt(t, e));
4909
4944
  }
4910
- function at(a, t) {
4911
- return typeof a == "function" ? a(t) : a;
4945
+ function at(l, t) {
4946
+ return typeof l == "function" ? l(t) : l;
4912
4947
  }
4913
- function G(a) {
4914
- return a.split("-")[0];
4948
+ function G(l) {
4949
+ return l.split("-")[0];
4915
4950
  }
4916
- function lt(a) {
4917
- return a.split("-")[1];
4951
+ function lt(l) {
4952
+ return l.split("-")[1];
4918
4953
  }
4919
- function ae(a) {
4920
- return a === "x" ? "y" : "x";
4954
+ function ae(l) {
4955
+ return l === "x" ? "y" : "x";
4921
4956
  }
4922
- function Mt(a) {
4923
- return a === "y" ? "height" : "width";
4957
+ function Mt(l) {
4958
+ return l === "y" ? "height" : "width";
4924
4959
  }
4925
- function J(a) {
4926
- return ["top", "bottom"].includes(G(a)) ? "y" : "x";
4960
+ function J(l) {
4961
+ return ["top", "bottom"].includes(G(l)) ? "y" : "x";
4927
4962
  }
4928
- function Ht(a) {
4929
- return ae(J(a));
4963
+ function Ht(l) {
4964
+ return ae(J(l));
4930
4965
  }
4931
- function Ri(a, t, e) {
4966
+ function Ri(l, t, e) {
4932
4967
  e === void 0 && (e = !1);
4933
- const i = lt(a), s = Ht(a), r = Mt(s);
4968
+ const i = lt(l), s = Ht(l), r = Mt(s);
4934
4969
  let o = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
4935
4970
  return t.reference[r] > t.floating[r] && (o = xt(o)), [o, xt(o)];
4936
4971
  }
4937
- function _i(a) {
4938
- const t = xt(a);
4939
- return [Ot(a), t, Ot(t)];
4972
+ function _i(l) {
4973
+ const t = xt(l);
4974
+ return [Ot(l), t, Ot(t)];
4940
4975
  }
4941
- function Ot(a) {
4942
- return a.replace(/start|end/g, (t) => vi[t]);
4976
+ function Ot(l) {
4977
+ return l.replace(/start|end/g, (t) => vi[t]);
4943
4978
  }
4944
- function Ii(a, t, e) {
4979
+ function Ii(l, t, e) {
4945
4980
  const i = ["left", "right"], s = ["right", "left"], r = ["top", "bottom"], o = ["bottom", "top"];
4946
- switch (a) {
4981
+ switch (l) {
4947
4982
  case "top":
4948
4983
  case "bottom":
4949
4984
  return e ? t ? s : i : t ? i : s;
@@ -4954,38 +4989,38 @@ function Ii(a, t, e) {
4954
4989
  return [];
4955
4990
  }
4956
4991
  }
4957
- function Oi(a, t, e, i) {
4958
- const s = lt(a);
4959
- let r = Ii(G(a), e === "start", i);
4992
+ function Oi(l, t, e, i) {
4993
+ const s = lt(l);
4994
+ let r = Ii(G(l), e === "start", i);
4960
4995
  return s && (r = r.map((o) => o + "-" + s), t && (r = r.concat(r.map(Ot)))), r;
4961
4996
  }
4962
- function xt(a) {
4963
- return a.replace(/left|right|bottom|top/g, (t) => bi[t]);
4997
+ function xt(l) {
4998
+ return l.replace(/left|right|bottom|top/g, (t) => bi[t]);
4964
4999
  }
4965
- function Li(a) {
5000
+ function Li(l) {
4966
5001
  return {
4967
5002
  top: 0,
4968
5003
  right: 0,
4969
5004
  bottom: 0,
4970
5005
  left: 0,
4971
- ...a
5006
+ ...l
4972
5007
  };
4973
5008
  }
4974
- function le(a) {
4975
- return typeof a != "number" ? Li(a) : {
4976
- top: a,
4977
- right: a,
4978
- bottom: a,
4979
- left: a
5009
+ function le(l) {
5010
+ return typeof l != "number" ? Li(l) : {
5011
+ top: l,
5012
+ right: l,
5013
+ bottom: l,
5014
+ left: l
4980
5015
  };
4981
5016
  }
4982
- function ut(a) {
5017
+ function ut(l) {
4983
5018
  const {
4984
5019
  x: t,
4985
5020
  y: e,
4986
5021
  width: i,
4987
5022
  height: s
4988
- } = a;
5023
+ } = l;
4989
5024
  return {
4990
5025
  width: i,
4991
5026
  height: s,
@@ -4997,11 +5032,11 @@ function ut(a) {
4997
5032
  y: e
4998
5033
  };
4999
5034
  }
5000
- function $t(a, t, e) {
5035
+ function $t(l, t, e) {
5001
5036
  let {
5002
5037
  reference: i,
5003
5038
  floating: s
5004
- } = a;
5039
+ } = l;
5005
5040
  const r = J(t), o = Ht(t), n = Mt(o), h = G(t), c = r === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, x = i[n] / 2 - s[n] / 2;
5006
5041
  let g;
5007
5042
  switch (h) {
@@ -5045,7 +5080,7 @@ function $t(a, t, e) {
5045
5080
  }
5046
5081
  return g;
5047
5082
  }
5048
- const Si = async (a, t, e) => {
5083
+ const Si = async (l, t, e) => {
5049
5084
  const {
5050
5085
  placement: i = "bottom",
5051
5086
  strategy: s = "absolute",
@@ -5053,23 +5088,23 @@ const Si = async (a, t, e) => {
5053
5088
  platform: o
5054
5089
  } = e, n = r.filter(Boolean), h = await (o.isRTL == null ? void 0 : o.isRTL(t));
5055
5090
  let c = await o.getElementRects({
5056
- reference: a,
5091
+ reference: l,
5057
5092
  floating: t,
5058
5093
  strategy: s
5059
5094
  }), {
5060
5095
  x: d,
5061
5096
  y: f
5062
- } = $t(c, i, h), x = i, g = {}, m = 0;
5097
+ } = $t(c, i, h), x = i, g = {}, p = 0;
5063
5098
  for (let u = 0; u < n.length; u++) {
5064
5099
  const {
5065
5100
  name: w,
5066
- fn: p
5101
+ fn: m
5067
5102
  } = n[u], {
5068
- x: C,
5103
+ x: b,
5069
5104
  y,
5070
- data: b,
5105
+ data: C,
5071
5106
  reset: E
5072
- } = await p({
5107
+ } = await m({
5073
5108
  x: d,
5074
5109
  y: f,
5075
5110
  initialPlacement: i,
@@ -5079,18 +5114,18 @@ const Si = async (a, t, e) => {
5079
5114
  rects: c,
5080
5115
  platform: o,
5081
5116
  elements: {
5082
- reference: a,
5117
+ reference: l,
5083
5118
  floating: t
5084
5119
  }
5085
5120
  });
5086
- d = C ?? d, f = y ?? f, g = {
5121
+ d = b ?? d, f = y ?? f, g = {
5087
5122
  ...g,
5088
5123
  [w]: {
5089
5124
  ...g[w],
5090
- ...b
5125
+ ...C
5091
5126
  }
5092
- }, E && m <= 50 && (m++, typeof E == "object" && (E.placement && (x = E.placement), E.rects && (c = E.rects === !0 ? await o.getElementRects({
5093
- reference: a,
5127
+ }, E && p <= 50 && (p++, typeof E == "object" && (E.placement && (x = E.placement), E.rects && (c = E.rects === !0 ? await o.getElementRects({
5128
+ reference: l,
5094
5129
  floating: t,
5095
5130
  strategy: s
5096
5131
  }) : E.rects), {
@@ -5106,7 +5141,7 @@ const Si = async (a, t, e) => {
5106
5141
  middlewareData: g
5107
5142
  };
5108
5143
  };
5109
- async function he(a, t) {
5144
+ async function he(l, t) {
5110
5145
  var e;
5111
5146
  t === void 0 && (t = {});
5112
5147
  const {
@@ -5116,23 +5151,23 @@ async function he(a, t) {
5116
5151
  rects: o,
5117
5152
  elements: n,
5118
5153
  strategy: h
5119
- } = a, {
5154
+ } = l, {
5120
5155
  boundary: c = "clippingAncestors",
5121
5156
  rootBoundary: d = "viewport",
5122
5157
  elementContext: f = "floating",
5123
5158
  altBoundary: x = !1,
5124
5159
  padding: g = 0
5125
- } = at(t, a), m = le(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], p = ut(await r.getClippingRect({
5160
+ } = at(t, l), p = le(g), w = n[x ? f === "floating" ? "reference" : "floating" : f], m = ut(await r.getClippingRect({
5126
5161
  element: (e = await (r.isElement == null ? void 0 : r.isElement(w))) == null || e ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(n.floating)),
5127
5162
  boundary: c,
5128
5163
  rootBoundary: d,
5129
5164
  strategy: h
5130
- })), C = f === "floating" ? {
5165
+ })), b = f === "floating" ? {
5131
5166
  x: i,
5132
5167
  y: s,
5133
5168
  width: o.floating.width,
5134
5169
  height: o.floating.height
5135
- } : o.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(n.floating)), b = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
5170
+ } : o.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(n.floating)), C = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
5136
5171
  x: 1,
5137
5172
  y: 1
5138
5173
  } : {
@@ -5140,20 +5175,20 @@ async function he(a, t) {
5140
5175
  y: 1
5141
5176
  }, E = ut(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
5142
5177
  elements: n,
5143
- rect: C,
5178
+ rect: b,
5144
5179
  offsetParent: y,
5145
5180
  strategy: h
5146
- }) : C);
5181
+ }) : b);
5147
5182
  return {
5148
- top: (p.top - E.top + m.top) / b.y,
5149
- bottom: (E.bottom - p.bottom + m.bottom) / b.y,
5150
- left: (p.left - E.left + m.left) / b.x,
5151
- right: (E.right - p.right + m.right) / b.x
5183
+ top: (m.top - E.top + p.top) / C.y,
5184
+ bottom: (E.bottom - m.bottom + p.bottom) / C.y,
5185
+ left: (m.left - E.left + p.left) / C.x,
5186
+ right: (E.right - m.right + p.right) / C.x
5152
5187
  };
5153
5188
  }
5154
- const Ti = (a) => ({
5189
+ const Ti = (l) => ({
5155
5190
  name: "arrow",
5156
- options: a,
5191
+ options: l,
5157
5192
  async fn(t) {
5158
5193
  const {
5159
5194
  x: e,
@@ -5166,21 +5201,21 @@ const Ti = (a) => ({
5166
5201
  } = t, {
5167
5202
  element: c,
5168
5203
  padding: d = 0
5169
- } = at(a, t) || {};
5204
+ } = at(l, t) || {};
5170
5205
  if (c == null)
5171
5206
  return {};
5172
5207
  const f = le(d), x = {
5173
5208
  x: e,
5174
5209
  y: i
5175
- }, g = Ht(s), m = Mt(g), u = await o.getDimensions(c), w = g === "y", p = w ? "top" : "left", C = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = r.reference[m] + r.reference[g] - x[g] - r.floating[m], E = x[g] - r.reference[g], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
5210
+ }, g = Ht(s), p = Mt(g), u = await o.getDimensions(c), w = g === "y", m = w ? "top" : "left", b = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", C = r.reference[p] + r.reference[g] - x[g] - r.floating[p], E = x[g] - r.reference[g], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
5176
5211
  let O = R ? R[y] : 0;
5177
- (!O || !await (o.isElement == null ? void 0 : o.isElement(R))) && (O = n.floating[y] || r.floating[m]);
5178
- const I = b / 2 - E / 2, _ = O / 2 - u[m] / 2 - 1, v = rt(f[p], _), S = rt(f[C], _), T = v, M = O - u[m] - S, A = O / 2 - u[m] / 2 + I, B = It(T, A, M), Y = !h.arrow && lt(s) != null && A !== B && r.reference[m] / 2 - (A < T ? v : S) - u[m] / 2 < 0, k = Y ? A < T ? A - T : A - M : 0;
5212
+ (!O || !await (o.isElement == null ? void 0 : o.isElement(R))) && (O = n.floating[y] || r.floating[p]);
5213
+ const I = C / 2 - E / 2, _ = O / 2 - u[p] / 2 - 1, v = rt(f[m], _), S = rt(f[b], _), T = v, M = O - u[p] - S, A = O / 2 - u[p] / 2 + I, N = It(T, A, M), Y = !h.arrow && lt(s) != null && A !== N && r.reference[p] / 2 - (A < T ? v : S) - u[p] / 2 < 0, k = Y ? A < T ? A - T : A - M : 0;
5179
5214
  return {
5180
5215
  [g]: x[g] + k,
5181
5216
  data: {
5182
- [g]: B,
5183
- centerOffset: A - B - k,
5217
+ [g]: N,
5218
+ centerOffset: A - N - k,
5184
5219
  ...Y && {
5185
5220
  alignmentOffset: k
5186
5221
  }
@@ -5188,10 +5223,10 @@ const Ti = (a) => ({
5188
5223
  reset: Y
5189
5224
  };
5190
5225
  }
5191
- }), Ai = function(a) {
5192
- return a === void 0 && (a = {}), {
5226
+ }), Ai = function(l) {
5227
+ return l === void 0 && (l = {}), {
5193
5228
  name: "flip",
5194
- options: a,
5229
+ options: l,
5195
5230
  async fn(t) {
5196
5231
  var e, i;
5197
5232
  const {
@@ -5206,18 +5241,18 @@ const Ti = (a) => ({
5206
5241
  crossAxis: f = !0,
5207
5242
  fallbackPlacements: x,
5208
5243
  fallbackStrategy: g = "bestFit",
5209
- fallbackAxisSideDirection: m = "none",
5244
+ fallbackAxisSideDirection: p = "none",
5210
5245
  flipAlignment: u = !0,
5211
5246
  ...w
5212
- } = at(a, t);
5247
+ } = at(l, t);
5213
5248
  if ((e = r.arrow) != null && e.alignmentOffset)
5214
5249
  return {};
5215
- const p = G(s), C = J(n), y = G(n) === n, b = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), E = x || (y || !u ? [xt(n)] : _i(n)), R = m !== "none";
5216
- !x && R && E.push(...Oi(n, u, m, b));
5250
+ const m = G(s), b = J(n), y = G(n) === n, C = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), E = x || (y || !u ? [xt(n)] : _i(n)), R = p !== "none";
5251
+ !x && R && E.push(...Oi(n, u, p, C));
5217
5252
  const O = [n, ...E], I = await he(t, w), _ = [];
5218
5253
  let v = ((i = r.flip) == null ? void 0 : i.overflows) || [];
5219
- if (d && _.push(I[p]), f) {
5220
- const A = Ri(s, o, b);
5254
+ if (d && _.push(I[m]), f) {
5255
+ const A = Ri(s, o, C);
5221
5256
  _.push(I[A[0]], I[A[1]]);
5222
5257
  }
5223
5258
  if (v = [...v, {
@@ -5225,15 +5260,15 @@ const Ti = (a) => ({
5225
5260
  overflows: _
5226
5261
  }], !_.every((A) => A <= 0)) {
5227
5262
  var S, T;
5228
- const A = (((S = r.flip) == null ? void 0 : S.index) || 0) + 1, B = O[A];
5229
- if (B)
5263
+ const A = (((S = r.flip) == null ? void 0 : S.index) || 0) + 1, N = O[A];
5264
+ if (N)
5230
5265
  return {
5231
5266
  data: {
5232
5267
  index: A,
5233
5268
  overflows: v
5234
5269
  },
5235
5270
  reset: {
5236
- placement: B
5271
+ placement: N
5237
5272
  }
5238
5273
  };
5239
5274
  let Y = (T = v.filter((k) => k.overflows[0] <= 0).sort((k, W) => k.overflows[1] - W.overflows[1])[0]) == null ? void 0 : T.placement;
@@ -5244,7 +5279,7 @@ const Ti = (a) => ({
5244
5279
  const k = (M = v.filter((W) => {
5245
5280
  if (R) {
5246
5281
  const P = J(W.placement);
5247
- return P === C || // Create a bias to the `y` side axis due to horizontal
5282
+ return P === b || // Create a bias to the `y` side axis due to horizontal
5248
5283
  // reading directions favoring greater width.
5249
5284
  P === "y";
5250
5285
  }
@@ -5268,16 +5303,16 @@ const Ti = (a) => ({
5268
5303
  }
5269
5304
  };
5270
5305
  };
5271
- async function Mi(a, t) {
5306
+ async function Mi(l, t) {
5272
5307
  const {
5273
5308
  placement: e,
5274
5309
  platform: i,
5275
5310
  elements: s
5276
- } = a, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = G(e), n = lt(e), h = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, d = r && h ? -1 : 1, f = at(t, a);
5311
+ } = l, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = G(e), n = lt(e), h = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, d = r && h ? -1 : 1, f = at(t, l);
5277
5312
  let {
5278
5313
  mainAxis: x,
5279
5314
  crossAxis: g,
5280
- alignmentAxis: m
5315
+ alignmentAxis: p
5281
5316
  } = typeof f == "number" ? {
5282
5317
  mainAxis: f,
5283
5318
  crossAxis: 0,
@@ -5287,7 +5322,7 @@ async function Mi(a, t) {
5287
5322
  crossAxis: f.crossAxis || 0,
5288
5323
  alignmentAxis: f.alignmentAxis
5289
5324
  };
5290
- return n && typeof m == "number" && (g = n === "end" ? m * -1 : m), h ? {
5325
+ return n && typeof p == "number" && (g = n === "end" ? p * -1 : p), h ? {
5291
5326
  x: g * d,
5292
5327
  y: x * c
5293
5328
  } : {
@@ -5295,10 +5330,10 @@ async function Mi(a, t) {
5295
5330
  y: g * d
5296
5331
  };
5297
5332
  }
5298
- const Hi = function(a) {
5299
- return a === void 0 && (a = 0), {
5333
+ const Hi = function(l) {
5334
+ return l === void 0 && (l = 0), {
5300
5335
  name: "offset",
5301
- options: a,
5336
+ options: l,
5302
5337
  async fn(t) {
5303
5338
  var e, i;
5304
5339
  const {
@@ -5306,7 +5341,7 @@ const Hi = function(a) {
5306
5341
  y: r,
5307
5342
  placement: o,
5308
5343
  middlewareData: n
5309
- } = t, h = await Mi(t, a);
5344
+ } = t, h = await Mi(t, l);
5310
5345
  return o === ((e = n.offset) == null ? void 0 : e.placement) && (i = n.arrow) != null && i.alignmentOffset ? {} : {
5311
5346
  x: s + h.x,
5312
5347
  y: r + h.y,
@@ -5317,10 +5352,10 @@ const Hi = function(a) {
5317
5352
  };
5318
5353
  }
5319
5354
  };
5320
- }, Di = function(a) {
5321
- return a === void 0 && (a = {}), {
5355
+ }, Di = function(l) {
5356
+ return l === void 0 && (l = {}), {
5322
5357
  name: "shift",
5323
- options: a,
5358
+ options: l,
5324
5359
  async fn(t) {
5325
5360
  const {
5326
5361
  x: e,
@@ -5332,33 +5367,33 @@ const Hi = function(a) {
5332
5367
  limiter: n = {
5333
5368
  fn: (w) => {
5334
5369
  let {
5335
- x: p,
5336
- y: C
5370
+ x: m,
5371
+ y: b
5337
5372
  } = w;
5338
5373
  return {
5339
- x: p,
5340
- y: C
5374
+ x: m,
5375
+ y: b
5341
5376
  };
5342
5377
  }
5343
5378
  },
5344
5379
  ...h
5345
- } = at(a, t), c = {
5380
+ } = at(l, t), c = {
5346
5381
  x: e,
5347
5382
  y: i
5348
5383
  }, d = await he(t, h), f = J(G(s)), x = ae(f);
5349
- let g = c[x], m = c[f];
5384
+ let g = c[x], p = c[f];
5350
5385
  if (r) {
5351
- const w = x === "y" ? "top" : "left", p = x === "y" ? "bottom" : "right", C = g + d[w], y = g - d[p];
5352
- g = It(C, g, y);
5386
+ const w = x === "y" ? "top" : "left", m = x === "y" ? "bottom" : "right", b = g + d[w], y = g - d[m];
5387
+ g = It(b, g, y);
5353
5388
  }
5354
5389
  if (o) {
5355
- const w = f === "y" ? "top" : "left", p = f === "y" ? "bottom" : "right", C = m + d[w], y = m - d[p];
5356
- m = It(C, m, y);
5390
+ const w = f === "y" ? "top" : "left", m = f === "y" ? "bottom" : "right", b = p + d[w], y = p - d[m];
5391
+ p = It(b, p, y);
5357
5392
  }
5358
5393
  const u = n.fn({
5359
5394
  ...t,
5360
5395
  [x]: g,
5361
- [f]: m
5396
+ [f]: p
5362
5397
  });
5363
5398
  return {
5364
5399
  ...u,
@@ -5377,56 +5412,56 @@ const Hi = function(a) {
5377
5412
  function gt() {
5378
5413
  return typeof window < "u";
5379
5414
  }
5380
- function tt(a) {
5381
- return ce(a) ? (a.nodeName || "").toLowerCase() : "#document";
5415
+ function tt(l) {
5416
+ return ce(l) ? (l.nodeName || "").toLowerCase() : "#document";
5382
5417
  }
5383
- function X(a) {
5418
+ function X(l) {
5384
5419
  var t;
5385
- return (a == null || (t = a.ownerDocument) == null ? void 0 : t.defaultView) || window;
5420
+ return (l == null || (t = l.ownerDocument) == null ? void 0 : t.defaultView) || window;
5386
5421
  }
5387
- function V(a) {
5422
+ function V(l) {
5388
5423
  var t;
5389
- return (t = (ce(a) ? a.ownerDocument : a.document) || window.document) == null ? void 0 : t.documentElement;
5424
+ return (t = (ce(l) ? l.ownerDocument : l.document) || window.document) == null ? void 0 : t.documentElement;
5390
5425
  }
5391
- function ce(a) {
5392
- return gt() ? a instanceof Node || a instanceof X(a).Node : !1;
5426
+ function ce(l) {
5427
+ return gt() ? l instanceof Node || l instanceof X(l).Node : !1;
5393
5428
  }
5394
- function N(a) {
5395
- return gt() ? a instanceof Element || a instanceof X(a).Element : !1;
5429
+ function B(l) {
5430
+ return gt() ? l instanceof Element || l instanceof X(l).Element : !1;
5396
5431
  }
5397
- function K(a) {
5398
- return gt() ? a instanceof HTMLElement || a instanceof X(a).HTMLElement : !1;
5432
+ function K(l) {
5433
+ return gt() ? l instanceof HTMLElement || l instanceof X(l).HTMLElement : !1;
5399
5434
  }
5400
- function qt(a) {
5401
- return !gt() || typeof ShadowRoot > "u" ? !1 : a instanceof ShadowRoot || a instanceof X(a).ShadowRoot;
5435
+ function qt(l) {
5436
+ return !gt() || typeof ShadowRoot > "u" ? !1 : l instanceof ShadowRoot || l instanceof X(l).ShadowRoot;
5402
5437
  }
5403
- function ht(a) {
5438
+ function ht(l) {
5404
5439
  const {
5405
5440
  overflow: t,
5406
5441
  overflowX: e,
5407
5442
  overflowY: i,
5408
5443
  display: s
5409
- } = F(a);
5444
+ } = F(l);
5410
5445
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
5411
5446
  }
5412
- function Xi(a) {
5413
- return ["table", "td", "th"].includes(tt(a));
5447
+ function Xi(l) {
5448
+ return ["table", "td", "th"].includes(tt(l));
5414
5449
  }
5415
- function wt(a) {
5450
+ function wt(l) {
5416
5451
  return [":popover-open", ":modal"].some((t) => {
5417
5452
  try {
5418
- return a.matches(t);
5453
+ return l.matches(t);
5419
5454
  } catch {
5420
5455
  return !1;
5421
5456
  }
5422
5457
  });
5423
5458
  }
5424
- function Dt(a) {
5425
- const t = Xt(), e = N(a) ? F(a) : a;
5459
+ function Dt(l) {
5460
+ const t = Xt(), e = B(l) ? F(l) : l;
5426
5461
  return e.transform !== "none" || e.perspective !== "none" || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (e.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (e.contain || "").includes(i));
5427
5462
  }
5428
- function Ni(a) {
5429
- let t = $(a);
5463
+ function Bi(l) {
5464
+ let t = $(l);
5430
5465
  for (; K(t) && !Q(t); ) {
5431
5466
  if (Dt(t))
5432
5467
  return t;
@@ -5439,65 +5474,65 @@ function Ni(a) {
5439
5474
  function Xt() {
5440
5475
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
5441
5476
  }
5442
- function Q(a) {
5443
- return ["html", "body", "#document"].includes(tt(a));
5477
+ function Q(l) {
5478
+ return ["html", "body", "#document"].includes(tt(l));
5444
5479
  }
5445
- function F(a) {
5446
- return X(a).getComputedStyle(a);
5480
+ function F(l) {
5481
+ return X(l).getComputedStyle(l);
5447
5482
  }
5448
- function pt(a) {
5449
- return N(a) ? {
5450
- scrollLeft: a.scrollLeft,
5451
- scrollTop: a.scrollTop
5483
+ function pt(l) {
5484
+ return B(l) ? {
5485
+ scrollLeft: l.scrollLeft,
5486
+ scrollTop: l.scrollTop
5452
5487
  } : {
5453
- scrollLeft: a.scrollX,
5454
- scrollTop: a.scrollY
5488
+ scrollLeft: l.scrollX,
5489
+ scrollTop: l.scrollY
5455
5490
  };
5456
5491
  }
5457
- function $(a) {
5458
- if (tt(a) === "html")
5459
- return a;
5492
+ function $(l) {
5493
+ if (tt(l) === "html")
5494
+ return l;
5460
5495
  const t = (
5461
5496
  // Step into the shadow DOM of the parent of a slotted node.
5462
- a.assignedSlot || // DOM Element detected.
5463
- a.parentNode || // ShadowRoot detected.
5464
- qt(a) && a.host || // Fallback.
5465
- V(a)
5497
+ l.assignedSlot || // DOM Element detected.
5498
+ l.parentNode || // ShadowRoot detected.
5499
+ qt(l) && l.host || // Fallback.
5500
+ V(l)
5466
5501
  );
5467
5502
  return qt(t) ? t.host : t;
5468
5503
  }
5469
- function de(a) {
5470
- const t = $(a);
5471
- return Q(t) ? a.ownerDocument ? a.ownerDocument.body : a.body : K(t) && ht(t) ? t : de(t);
5504
+ function de(l) {
5505
+ const t = $(l);
5506
+ return Q(t) ? l.ownerDocument ? l.ownerDocument.body : l.body : K(t) && ht(t) ? t : de(t);
5472
5507
  }
5473
- function Lt(a, t, e) {
5508
+ function Lt(l, t, e) {
5474
5509
  var i;
5475
5510
  t === void 0 && (t = []), e === void 0 && (e = !0);
5476
- const s = de(a), r = s === ((i = a.ownerDocument) == null ? void 0 : i.body), o = X(s);
5511
+ const s = de(l), r = s === ((i = l.ownerDocument) == null ? void 0 : i.body), o = X(s);
5477
5512
  if (r) {
5478
5513
  const n = St(o);
5479
5514
  return t.concat(o, o.visualViewport || [], ht(s) ? s : [], n && e ? Lt(n) : []);
5480
5515
  }
5481
5516
  return t.concat(s, Lt(s, [], e));
5482
5517
  }
5483
- function St(a) {
5484
- return a.parent && Object.getPrototypeOf(a.parent) ? a.frameElement : null;
5518
+ function St(l) {
5519
+ return l.parent && Object.getPrototypeOf(l.parent) ? l.frameElement : null;
5485
5520
  }
5486
- function fe(a) {
5487
- const t = F(a);
5521
+ function fe(l) {
5522
+ const t = F(l);
5488
5523
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5489
- const s = K(a), r = s ? a.offsetWidth : e, o = s ? a.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
5524
+ const s = K(l), r = s ? l.offsetWidth : e, o = s ? l.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
5490
5525
  return n && (e = r, i = o), {
5491
5526
  width: e,
5492
5527
  height: i,
5493
5528
  $: n
5494
5529
  };
5495
5530
  }
5496
- function xe(a) {
5497
- return N(a) ? a : a.contextElement;
5531
+ function xe(l) {
5532
+ return B(l) ? l : l.contextElement;
5498
5533
  }
5499
- function Z(a) {
5500
- const t = xe(a);
5534
+ function Z(l) {
5535
+ const t = xe(l);
5501
5536
  if (!K(t))
5502
5537
  return z(1);
5503
5538
  const e = t.getBoundingClientRect(), {
@@ -5512,29 +5547,29 @@ function Z(a) {
5512
5547
  };
5513
5548
  }
5514
5549
  const Fi = /* @__PURE__ */ z(0);
5515
- function ue(a) {
5516
- const t = X(a);
5550
+ function ue(l) {
5551
+ const t = X(l);
5517
5552
  return !Xt() || !t.visualViewport ? Fi : {
5518
5553
  x: t.visualViewport.offsetLeft,
5519
5554
  y: t.visualViewport.offsetTop
5520
5555
  };
5521
5556
  }
5522
- function Bi(a, t, e) {
5523
- return t === void 0 && (t = !1), !e || t && e !== X(a) ? !1 : t;
5557
+ function Ni(l, t, e) {
5558
+ return t === void 0 && (t = !1), !e || t && e !== X(l) ? !1 : t;
5524
5559
  }
5525
- function ot(a, t, e, i) {
5560
+ function ot(l, t, e, i) {
5526
5561
  t === void 0 && (t = !1), e === void 0 && (e = !1);
5527
- const s = a.getBoundingClientRect(), r = xe(a);
5562
+ const s = l.getBoundingClientRect(), r = xe(l);
5528
5563
  let o = z(1);
5529
- t && (i ? N(i) && (o = Z(i)) : o = Z(a));
5530
- const n = Bi(r, e, i) ? ue(r) : z(0);
5564
+ t && (i ? B(i) && (o = Z(i)) : o = Z(l));
5565
+ const n = Ni(r, e, i) ? ue(r) : z(0);
5531
5566
  let h = (s.left + n.x) / o.x, c = (s.top + n.y) / o.y, d = s.width / o.x, f = s.height / o.y;
5532
5567
  if (r) {
5533
- const x = X(r), g = i && N(i) ? X(i) : i;
5534
- let m = x, u = St(m);
5535
- for (; u && i && g !== m; ) {
5536
- const w = Z(u), p = u.getBoundingClientRect(), C = F(u), y = p.left + (u.clientLeft + parseFloat(C.paddingLeft)) * w.x, b = p.top + (u.clientTop + parseFloat(C.paddingTop)) * w.y;
5537
- h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += y, c += b, m = X(u), u = St(m);
5568
+ const x = X(r), g = i && B(i) ? X(i) : i;
5569
+ let p = x, u = St(p);
5570
+ for (; u && i && g !== p; ) {
5571
+ const w = Z(u), m = u.getBoundingClientRect(), b = F(u), y = m.left + (u.clientLeft + parseFloat(b.paddingLeft)) * w.x, C = m.top + (u.clientTop + parseFloat(b.paddingTop)) * w.y;
5572
+ h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += y, c += C, p = X(u), u = St(p);
5538
5573
  }
5539
5574
  }
5540
5575
  return ut({
@@ -5544,13 +5579,13 @@ function ot(a, t, e, i) {
5544
5579
  y: c
5545
5580
  });
5546
5581
  }
5547
- function ki(a) {
5582
+ function ki(l) {
5548
5583
  let {
5549
5584
  elements: t,
5550
5585
  rect: e,
5551
5586
  offsetParent: i,
5552
5587
  strategy: s
5553
- } = a;
5588
+ } = l;
5554
5589
  const r = s === "fixed", o = V(i), n = t ? wt(t.floating) : !1;
5555
5590
  if (i === o || n && r)
5556
5591
  return e;
@@ -5570,16 +5605,16 @@ function ki(a) {
5570
5605
  y: e.y * c.y - h.scrollTop * c.y + d.y
5571
5606
  };
5572
5607
  }
5573
- function Ki(a) {
5574
- return Array.from(a.getClientRects());
5608
+ function Ki(l) {
5609
+ return Array.from(l.getClientRects());
5575
5610
  }
5576
- function Tt(a, t) {
5577
- const e = pt(a).scrollLeft;
5578
- return t ? t.left + e : ot(V(a)).left + e;
5611
+ function Tt(l, t) {
5612
+ const e = pt(l).scrollLeft;
5613
+ return t ? t.left + e : ot(V(l)).left + e;
5579
5614
  }
5580
- function Yi(a) {
5581
- const t = V(a), e = pt(a), i = a.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5582
- let o = -e.scrollLeft + Tt(a);
5615
+ function Yi(l) {
5616
+ const t = V(l), e = pt(l), i = l.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5617
+ let o = -e.scrollLeft + Tt(l);
5583
5618
  const n = -e.scrollTop;
5584
5619
  return F(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5585
5620
  width: s,
@@ -5588,8 +5623,8 @@ function Yi(a) {
5588
5623
  y: n
5589
5624
  };
5590
5625
  }
5591
- function Vi(a, t) {
5592
- const e = X(a), i = V(a), s = e.visualViewport;
5626
+ function Vi(l, t) {
5627
+ const e = X(l), i = V(l), s = e.visualViewport;
5593
5628
  let r = i.clientWidth, o = i.clientHeight, n = 0, h = 0;
5594
5629
  if (s) {
5595
5630
  r = s.width, o = s.height;
@@ -5603,8 +5638,8 @@ function Vi(a, t) {
5603
5638
  y: h
5604
5639
  };
5605
5640
  }
5606
- function Wi(a, t) {
5607
- const e = ot(a, !0, t === "fixed"), i = e.top + a.clientTop, s = e.left + a.clientLeft, r = K(a) ? Z(a) : z(1), o = a.clientWidth * r.x, n = a.clientHeight * r.y, h = s * r.x, c = i * r.y;
5641
+ function Wi(l, t) {
5642
+ const e = ot(l, !0, t === "fixed"), i = e.top + l.clientTop, s = e.left + l.clientLeft, r = K(l) ? Z(l) : z(1), o = l.clientWidth * r.x, n = l.clientHeight * r.y, h = s * r.x, c = i * r.y;
5608
5643
  return {
5609
5644
  width: o,
5610
5645
  height: n,
@@ -5612,16 +5647,16 @@ function Wi(a, t) {
5612
5647
  y: c
5613
5648
  };
5614
5649
  }
5615
- function Gt(a, t, e) {
5650
+ function Gt(l, t, e) {
5616
5651
  let i;
5617
5652
  if (t === "viewport")
5618
- i = Vi(a, e);
5653
+ i = Vi(l, e);
5619
5654
  else if (t === "document")
5620
- i = Yi(V(a));
5621
- else if (N(t))
5655
+ i = Yi(V(l));
5656
+ else if (B(t))
5622
5657
  i = Wi(t, e);
5623
5658
  else {
5624
- const s = ue(a);
5659
+ const s = ue(l);
5625
5660
  i = {
5626
5661
  ...t,
5627
5662
  x: t.x - s.x,
@@ -5630,30 +5665,30 @@ function Gt(a, t, e) {
5630
5665
  }
5631
5666
  return ut(i);
5632
5667
  }
5633
- function ge(a, t) {
5634
- const e = $(a);
5635
- return e === t || !N(e) || Q(e) ? !1 : F(e).position === "fixed" || ge(e, t);
5668
+ function ge(l, t) {
5669
+ const e = $(l);
5670
+ return e === t || !B(e) || Q(e) ? !1 : F(e).position === "fixed" || ge(e, t);
5636
5671
  }
5637
- function Pi(a, t) {
5638
- const e = t.get(a);
5672
+ function Pi(l, t) {
5673
+ const e = t.get(l);
5639
5674
  if (e)
5640
5675
  return e;
5641
- let i = Lt(a, [], !1).filter((n) => N(n) && tt(n) !== "body"), s = null;
5642
- const r = F(a).position === "fixed";
5643
- let o = r ? $(a) : a;
5644
- for (; N(o) && !Q(o); ) {
5676
+ let i = Lt(l, [], !1).filter((n) => B(n) && tt(n) !== "body"), s = null;
5677
+ const r = F(l).position === "fixed";
5678
+ let o = r ? $(l) : l;
5679
+ for (; B(o) && !Q(o); ) {
5645
5680
  const n = F(o), h = Dt(o);
5646
- !h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ge(a, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
5681
+ !h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ge(l, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
5647
5682
  }
5648
- return t.set(a, i), i;
5683
+ return t.set(l, i), i;
5649
5684
  }
5650
- function zi(a) {
5685
+ function zi(l) {
5651
5686
  let {
5652
5687
  element: t,
5653
5688
  boundary: e,
5654
5689
  rootBoundary: i,
5655
5690
  strategy: s
5656
- } = a;
5691
+ } = l;
5657
5692
  const o = [...e === "clippingAncestors" ? wt(t) ? [] : Pi(t, this._c) : [].concat(e), i], n = o[0], h = o.reduce((c, d) => {
5658
5693
  const f = Gt(t, d, s);
5659
5694
  return c.top = U(f.top, c.top), c.right = rt(f.right, c.right), c.bottom = rt(f.bottom, c.bottom), c.left = U(f.left, c.left), c;
@@ -5665,18 +5700,18 @@ function zi(a) {
5665
5700
  y: h.top
5666
5701
  };
5667
5702
  }
5668
- function $i(a) {
5703
+ function $i(l) {
5669
5704
  const {
5670
5705
  width: t,
5671
5706
  height: e
5672
- } = fe(a);
5707
+ } = fe(l);
5673
5708
  return {
5674
5709
  width: t,
5675
5710
  height: e
5676
5711
  };
5677
5712
  }
5678
- function qi(a, t, e) {
5679
- const i = K(t), s = V(t), r = e === "fixed", o = ot(a, !0, r, t);
5713
+ function qi(l, t, e) {
5714
+ const i = K(t), s = V(t), r = e === "fixed", o = ot(l, !0, r, t);
5680
5715
  let n = {
5681
5716
  scrollLeft: 0,
5682
5717
  scrollTop: 0
@@ -5701,39 +5736,39 @@ function qi(a, t, e) {
5701
5736
  height: o.height
5702
5737
  };
5703
5738
  }
5704
- function yt(a) {
5705
- return F(a).position === "static";
5739
+ function yt(l) {
5740
+ return F(l).position === "static";
5706
5741
  }
5707
- function jt(a, t) {
5708
- if (!K(a) || F(a).position === "fixed")
5742
+ function jt(l, t) {
5743
+ if (!K(l) || F(l).position === "fixed")
5709
5744
  return null;
5710
5745
  if (t)
5711
- return t(a);
5712
- let e = a.offsetParent;
5713
- return V(a) === e && (e = e.ownerDocument.body), e;
5746
+ return t(l);
5747
+ let e = l.offsetParent;
5748
+ return V(l) === e && (e = e.ownerDocument.body), e;
5714
5749
  }
5715
- function we(a, t) {
5716
- const e = X(a);
5717
- if (wt(a))
5750
+ function we(l, t) {
5751
+ const e = X(l);
5752
+ if (wt(l))
5718
5753
  return e;
5719
- if (!K(a)) {
5720
- let s = $(a);
5754
+ if (!K(l)) {
5755
+ let s = $(l);
5721
5756
  for (; s && !Q(s); ) {
5722
- if (N(s) && !yt(s))
5757
+ if (B(s) && !yt(s))
5723
5758
  return s;
5724
5759
  s = $(s);
5725
5760
  }
5726
5761
  return e;
5727
5762
  }
5728
- let i = jt(a, t);
5763
+ let i = jt(l, t);
5729
5764
  for (; i && Xi(i) && yt(i); )
5730
5765
  i = jt(i, t);
5731
- return i && Q(i) && yt(i) && !Dt(i) ? e : i || Ni(a) || e;
5766
+ return i && Q(i) && yt(i) && !Dt(i) ? e : i || Bi(l) || e;
5732
5767
  }
5733
- const Gi = async function(a) {
5734
- const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(a.floating);
5768
+ const Gi = async function(l) {
5769
+ const t = this.getOffsetParent || we, e = this.getDimensions, i = await e(l.floating);
5735
5770
  return {
5736
- reference: qi(a.reference, await t(a.floating), a.strategy),
5771
+ reference: qi(l.reference, await t(l.floating), l.strategy),
5737
5772
  floating: {
5738
5773
  x: 0,
5739
5774
  y: 0,
@@ -5742,8 +5777,8 @@ const Gi = async function(a) {
5742
5777
  }
5743
5778
  };
5744
5779
  };
5745
- function ji(a) {
5746
- return F(a).direction === "rtl";
5780
+ function ji(l) {
5781
+ return F(l).direction === "rtl";
5747
5782
  }
5748
5783
  const Ui = {
5749
5784
  convertOffsetParentRelativeRectToViewportRelativeRect: ki,
@@ -5754,9 +5789,9 @@ const Ui = {
5754
5789
  getClientRects: Ki,
5755
5790
  getDimensions: $i,
5756
5791
  getScale: Z,
5757
- isElement: N,
5792
+ isElement: B,
5758
5793
  isRTL: ji
5759
- }, pe = Hi, me = Di, ye = Ai, Zi = Ti, Ee = (a, t, e) => {
5794
+ }, pe = Hi, me = Di, ye = Ai, Zi = Ti, Ee = (l, t, e) => {
5760
5795
  const i = /* @__PURE__ */ new Map(), s = {
5761
5796
  platform: Ui,
5762
5797
  ...e
@@ -5764,18 +5799,18 @@ const Ui = {
5764
5799
  ...s.platform,
5765
5800
  _c: i
5766
5801
  };
5767
- return Si(a, t, {
5802
+ return Si(l, t, {
5768
5803
  ...s,
5769
5804
  platform: r
5770
5805
  });
5771
5806
  };
5772
5807
  let Ji = class {
5773
5808
  constructor(t) {
5774
- l(this, "ctx");
5775
- l(this, "enable", !1);
5776
- l(this, "contentEl");
5777
- l(this, "floatingEl");
5778
- l(this, "arrowEl");
5809
+ a(this, "ctx");
5810
+ a(this, "enable", !1);
5811
+ a(this, "contentEl");
5812
+ a(this, "floatingEl");
5813
+ a(this, "arrowEl");
5779
5814
  this.ctx = t;
5780
5815
  const { TOOLTIP_BG_COLOR: e, TOOLTIP_TEXT_COLOR: i, TOOLTIP_ZINDEX: s, TOOLTIP_CUSTOM_STYLE: r, CSS_PREFIX: o } = this.ctx.config;
5781
5816
  this.contentEl = document.createElement("div"), this.arrowEl = document.createElement("div"), this.floatingEl = document.createElement("div"), this.floatingEl.className = `${o}-tooltip`, this.contentEl.className = `${o}-tooltip-content`, this.arrowEl.className = `${o}-tooltip-arrow`;
@@ -5882,15 +5917,15 @@ let Ji = class {
5882
5917
  };
5883
5918
  class Qi {
5884
5919
  constructor(t) {
5885
- l(this, "editorEl");
5886
- l(this, "inputEl");
5887
- l(this, "enable", !1);
5888
- l(this, "cellTarget", null);
5889
- l(this, "selectorArrStr", "");
5890
- l(this, "ctx");
5891
- l(this, "drawY", 0);
5892
- l(this, "drawX", 0);
5893
- l(this, "cancel", !1);
5920
+ a(this, "editorEl");
5921
+ a(this, "inputEl");
5922
+ a(this, "enable", !1);
5923
+ a(this, "cellTarget", null);
5924
+ a(this, "selectorArrStr", "");
5925
+ a(this, "ctx");
5926
+ a(this, "drawY", 0);
5927
+ a(this, "drawX", 0);
5928
+ a(this, "cancel", !1);
5894
5929
  this.ctx = t, this.initTextEditor(), this.init();
5895
5930
  }
5896
5931
  init() {
@@ -6084,8 +6119,8 @@ class Qi {
6084
6119
  }
6085
6120
  class ts {
6086
6121
  constructor(t) {
6087
- l(this, "ctx");
6088
- l(this, "emptyEl");
6122
+ a(this, "ctx");
6123
+ a(this, "emptyEl");
6089
6124
  this.ctx = t;
6090
6125
  const { EMPTY_TEXT: e, EMPTY_CUSTOM_STYLE: i } = this.ctx.config;
6091
6126
  this.ctx.emptyElement ? this.emptyEl = this.ctx.emptyElement : (this.emptyEl = document.createElement("div"), this.emptyEl.innerText = e), this.emptyEl.className = "e-virt-table-empty", this.emptyEl.style.display = "none", this.ctx.containerElement.appendChild(this.emptyEl), this.ctx.on("emptyChange", ({ type: s, headerHeight: r, bodyHeight: o, footerHeight: n }) => {
@@ -6108,7 +6143,7 @@ class ts {
6108
6143
  }
6109
6144
  class es {
6110
6145
  constructor(t) {
6111
- l(this, "ctx");
6146
+ a(this, "ctx");
6112
6147
  this.ctx = t;
6113
6148
  }
6114
6149
  draw() {
@@ -6161,7 +6196,7 @@ class es {
6161
6196
  height: `${o}px`
6162
6197
  },
6163
6198
  cells: h
6164
- }, m = {
6199
+ }, p = {
6165
6200
  key: "right",
6166
6201
  style: {
6167
6202
  position: "absolute",
@@ -6182,15 +6217,15 @@ class es {
6182
6217
  width: `${r}px`,
6183
6218
  height: `${o}px`
6184
6219
  },
6185
- views: [x, g, m]
6220
+ views: [x, g, p]
6186
6221
  };
6187
6222
  }
6188
6223
  getBody() {
6189
6224
  const t = [], e = [], i = [];
6190
6225
  let s = this.ctx.body.renderRows;
6191
6226
  this.ctx.config.FOOTER_FIXED || (s = s.concat(this.ctx.footer.renderRows)), s.forEach((w) => {
6192
- w.cells.forEach((p) => {
6193
- p.cellType === "footer" && (p.render = p.renderFooter), p.render && (p.fixed === "left" ? e.push(p) : p.fixed === "right" ? i.push(p) : t.push(p));
6227
+ w.cells.forEach((m) => {
6228
+ m.cellType === "footer" && (m.render = m.renderFooter), m.render && (m.fixed === "left" ? e.push(m) : m.fixed === "right" ? i.push(m) : t.push(m));
6194
6229
  });
6195
6230
  });
6196
6231
  const {
@@ -6219,7 +6254,7 @@ class es {
6219
6254
  height: `${d}px`
6220
6255
  },
6221
6256
  cells: t
6222
- }, m = {
6257
+ }, p = {
6223
6258
  key: "right",
6224
6259
  style: {
6225
6260
  position: "absolute",
@@ -6240,7 +6275,7 @@ class es {
6240
6275
  width: `${c}px`,
6241
6276
  height: `${d}px`
6242
6277
  },
6243
- views: [x, g, m]
6278
+ views: [x, g, p]
6244
6279
  };
6245
6280
  }
6246
6281
  getFooter() {
@@ -6303,9 +6338,9 @@ class es {
6303
6338
  }
6304
6339
  class is {
6305
6340
  constructor(t) {
6306
- l(this, "ctx");
6307
- l(this, "contextMenuEl");
6308
- l(this, "custom", !1);
6341
+ a(this, "ctx");
6342
+ a(this, "contextMenuEl");
6343
+ a(this, "custom", !1);
6309
6344
  this.ctx = t, this.ctx.contextMenuElement ? (this.custom = !0, this.contextMenuEl = this.ctx.contextMenuElement) : (this.custom = !1, this.contextMenuEl = document.createElement("div")), this.createContextMenu(), this.init();
6310
6345
  }
6311
6346
  init() {
@@ -6330,14 +6365,16 @@ class is {
6330
6365
  Ee(x, this.contextMenuEl, {
6331
6366
  placement: "right-start",
6332
6367
  middleware: [pe(), me(), ye()]
6333
- }).then(({ x: g, y: m }) => {
6334
- this.show(g, m);
6368
+ }).then(({ x: g, y: p }) => {
6369
+ this.show(g, p);
6335
6370
  });
6336
6371
  }), this.ctx.on("click", this.hide.bind(this)), this.ctx.on("onScroll", this.hide.bind(this)), this.ctx.on("resize", this.hide.bind(this));
6337
6372
  }
6338
6373
  //创建右键菜单,绑定子项点击事件
6339
6374
  createContextMenu() {
6340
- if (this.contextMenuEl.className = "e-virt-table-context-menu", this.ctx.containerElement.appendChild(this.contextMenuEl), this.custom) return;
6375
+ if (this.contextMenuEl.className = "e-virt-table-context-menu", this.contextMenuEl.addEventListener("contextmenu", function(e) {
6376
+ e.preventDefault();
6377
+ }), this.ctx.containerElement.appendChild(this.contextMenuEl), this.custom) return;
6341
6378
  const { CONTEXT_MENU: t } = this.ctx.config;
6342
6379
  this.createContextMenuItems(t, (e) => {
6343
6380
  switch (e.value) {
@@ -6387,19 +6424,19 @@ class is {
6387
6424
  }
6388
6425
  class os {
6389
6426
  constructor(t, e) {
6390
- l(this, "options");
6391
- l(this, "scroller");
6392
- l(this, "header");
6393
- l(this, "body");
6394
- l(this, "footer");
6395
- l(this, "selector");
6396
- l(this, "autofill");
6397
- l(this, "tooltip");
6398
- l(this, "editor");
6399
- l(this, "empty");
6400
- l(this, "overlayer");
6401
- l(this, "contextMenu");
6402
- l(this, "ctx");
6427
+ a(this, "options");
6428
+ a(this, "scroller");
6429
+ a(this, "header");
6430
+ a(this, "body");
6431
+ a(this, "footer");
6432
+ a(this, "selector");
6433
+ a(this, "autofill");
6434
+ a(this, "tooltip");
6435
+ a(this, "editor");
6436
+ a(this, "empty");
6437
+ a(this, "overlayer");
6438
+ a(this, "contextMenu");
6439
+ a(this, "ctx");
6403
6440
  this.options = e;
6404
6441
  const { overlayerElement: i, editorElement: s, emptyElement: r, contextMenuElement: o } = e, n = this.createContainer(
6405
6442
  t,
@@ -6487,6 +6524,21 @@ class os {
6487
6524
  getChangedRows() {
6488
6525
  return this.ctx.database.getChangedRows();
6489
6526
  }
6527
+ setCurrentRowByRowIndex(t) {
6528
+ this.ctx.currentCell = this.ctx.database.getVirtualBodyCell(t, 0), this.ctx.emit("draw");
6529
+ }
6530
+ setCurrentRow(t) {
6531
+ const e = this.ctx.database.getColumnByColIndex(0);
6532
+ e && (this.ctx.currentCell = this.ctx.database.getVirtualBodyCellByKey(t, e.key), this.ctx.emit("draw"));
6533
+ }
6534
+ getCurrentRow() {
6535
+ const t = this.ctx.currentCell;
6536
+ return t ? {
6537
+ row: t.row,
6538
+ rowIndex: t.rowIndex,
6539
+ rowKey: t.rowKey
6540
+ } : void 0;
6541
+ }
6490
6542
  clearValidate() {
6491
6543
  this.ctx.database.clearValidate(), this.ctx.emit("draw");
6492
6544
  }
@@ -6578,6 +6630,9 @@ class os {
6578
6630
  setExpandRowKeys(t, e = !0) {
6579
6631
  this.ctx.database.setExpandRowKeys(t, e);
6580
6632
  }
6633
+ getExpandRowKeys() {
6634
+ return this.ctx.database.getExpandRowKeys();
6635
+ }
6581
6636
  clearSelection() {
6582
6637
  this.ctx.database.clearSelection(), this.ctx.emit("draw");
6583
6638
  }