e-virt-table 0.1.3 → 0.1.5

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,7 +1,7 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(':root{--e-virt-table-color-white: #fff;--e-virt-table-color-black: #000000;--e-virt-table-color-primary: rgb(82, 146, 247);--e-virt-table-text-color-primary: #333;--e-virt-table-text-color-regular: #666;--e-virt-table-text-color-secondary: #999;--e-virt-table-box-shadow: 0 2px 12px 0 #0000001a;--e-virt-table-editor-bg-color: #fff;--e-virt-table-border-color: #e1e6eb}.e-virt-table-container{position:relative;outline:none}.e-virt-table-stage{position:relative;overflow:hidden;outline:none;z-index:10;border-radius:8px;border:1px solid var(--e-virt-table-border-color)}.e-virt-table-canvas{position:absolute;left:0;top:0;box-sizing:border-box;border:none;outline:none}.e-virt-table-editor{position:absolute;top:-10000px;left:-10000px;text-align:left;line-height:0;z-index:100;overflow:hidden;background-color:var(--e-virt-table-editor-bg-color);border:2px solid var(--e-virt-table-color-primary);box-sizing:border-box;box-shadow:var(--e-virt-table-box-shadow);display:flex;align-items:center}.e-virt-table-overlayer{position:"absolute";left:0;top:0;overflow:hidden;z-index:10}.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(--e-virt-table-color-white);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--e-virt-table-text-color-regular);background-color:var(--e-virt-table-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--e-virt-table-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(--e-virt-table-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--e-virt-table-color-primary);background-color:#f5f7fa}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(':root{--e-virt-table-color-white: #fff;--e-virt-table-color-black: #000000;--e-virt-table-color-primary: rgb(82, 146, 247);--e-virt-table-text-color-primary: #333;--e-virt-table-text-color-regular: #666;--e-virt-table-text-color-secondary: #999;--e-virt-table-box-shadow: 0 2px 12px 0 #0000001a;--e-virt-table-editor-bg-color: #fff;--e-virt-table-border-color: #e1e6eb}.e-virt-table-container{position:relative;outline:none}.e-virt-table-stage{position:relative;overflow:hidden;outline:none;z-index:10;border-radius:8px;border:1px solid var(--e-virt-table-border-color)}.e-virt-table-canvas{position:absolute;left:0;top:0;box-sizing:border-box;border:none;outline:none;z-index:10px}.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(--e-virt-table-editor-bg-color);border:2px solid var(--e-virt-table-color-primary);box-sizing:border-box;box-shadow:var(--e-virt-table-box-shadow);display:flex;align-items:center}.e-virt-table-overlayer{position:"absolute";left:0;top:0;overflow:hidden;z-index:10}.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(--e-virt-table-color-white);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--e-virt-table-text-color-regular);background-color:var(--e-virt-table-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--e-virt-table-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(--e-virt-table-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--e-virt-table-color-primary);background-color:#f5f7fa}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
2
  var me = Object.defineProperty;
3
3
  var Ee = (n, t, e) => t in n ? me(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
4
- var l = (n, t, e) => Ee(n, typeof t != "symbol" ? t + "" : t, e);
4
+ var h = (n, t, e) => Ee(n, typeof t != "symbol" ? t + "" : t, e);
5
5
  function $() {
6
6
  return $ = Object.assign ? Object.assign.bind() : function(n) {
7
7
  for (var t = 1; t < arguments.length; t++) {
@@ -39,8 +39,8 @@ function dt(n, t, e) {
39
39
  return Ce() ? dt = Reflect.construct.bind() : dt = function(s, r, o) {
40
40
  var a = [null];
41
41
  a.push.apply(a, r);
42
- var c = Function.bind.apply(s, a), h = new c();
43
- return o && st(h, o.prototype), h;
42
+ var l = Function.bind.apply(s, a), c = new l();
43
+ return o && st(c, o.prototype), c;
44
44
  }, dt.apply(null, arguments);
45
45
  }
46
46
  function ve(n) {
@@ -69,9 +69,9 @@ function bt(n) {
69
69
  }), st(s, i);
70
70
  }, bt(n);
71
71
  }
72
- var Re = /%[sdj%]/g, Jt = function() {
72
+ var Re = /%[sdj%]/g, Gt = function() {
73
73
  };
74
- typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (Jt = function(t, e) {
74
+ typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (Gt = function(t, e) {
75
75
  typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && e.every(function(i) {
76
76
  return typeof i == "string";
77
77
  }) && console.warn(t, e);
@@ -131,7 +131,7 @@ function Ie(n, t, e) {
131
131
  t(a, o);
132
132
  });
133
133
  }
134
- function Yt(n, t, e) {
134
+ function Xt(n, t, e) {
135
135
  var i = 0, s = n.length;
136
136
  function r(o) {
137
137
  if (o && o.length) {
@@ -149,7 +149,7 @@ function Oe(n) {
149
149
  t.push.apply(t, n[e] || []);
150
150
  }), t;
151
151
  }
152
- var Kt = /* @__PURE__ */ function(n) {
152
+ var Ft = /* @__PURE__ */ function(n) {
153
153
  be(t, n);
154
154
  function t(e, i) {
155
155
  var s;
@@ -157,33 +157,33 @@ var Kt = /* @__PURE__ */ function(n) {
157
157
  }
158
158
  return t;
159
159
  }(/* @__PURE__ */ bt(Error));
160
- function Te(n, t, e, i, s) {
160
+ function Se(n, t, e, i, s) {
161
161
  if (t.first) {
162
162
  var r = new Promise(function(x, u) {
163
163
  var g = function(y) {
164
- return i(y), y.length ? u(new Kt(y, Ct(y))) : x(s);
164
+ return i(y), y.length ? u(new Ft(y, Ct(y))) : x(s);
165
165
  }, w = Oe(n);
166
- Yt(w, e, g);
166
+ Xt(w, e, g);
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(n) : t.firstFields || [], a = Object.keys(n), c = a.length, h = 0, f = [], d = new Promise(function(x, u) {
172
+ var o = t.firstFields === !0 ? Object.keys(n) : t.firstFields || [], a = Object.keys(n), l = a.length, c = 0, f = [], d = new Promise(function(x, u) {
173
173
  var g = function(p) {
174
- if (f.push.apply(f, p), h++, h === c)
175
- return i(f), f.length ? u(new Kt(f, Ct(f))) : x(s);
174
+ if (f.push.apply(f, p), c++, c === l)
175
+ return i(f), f.length ? u(new Ft(f, Ct(f))) : x(s);
176
176
  };
177
177
  a.length || (i(f), x(s)), a.forEach(function(w) {
178
178
  var p = n[w];
179
- o.indexOf(w) !== -1 ? Yt(p, e, g) : Ie(p, e, g);
179
+ o.indexOf(w) !== -1 ? Xt(p, e, g) : Ie(p, e, g);
180
180
  });
181
181
  });
182
182
  return d.catch(function(x) {
183
183
  return x;
184
184
  }), d;
185
185
  }
186
- function Se(n) {
186
+ function Te(n) {
187
187
  return !!(n && n.message !== void 0);
188
188
  }
189
189
  function Ae(n, t) {
@@ -194,17 +194,17 @@ function Ae(n, t) {
194
194
  }
195
195
  return e;
196
196
  }
197
- function Bt(n, t) {
197
+ function kt(n, t) {
198
198
  return function(e) {
199
199
  var i;
200
- return n.fullFields ? i = Ae(t, n.fullFields) : i = t[e.field || n.fullField], Se(e) ? (e.field = e.field || n.fullField, e.fieldValue = i, e) : {
200
+ return n.fullFields ? i = Ae(t, n.fullFields) : i = t[e.field || n.fullField], Te(e) ? (e.field = e.field || n.fullField, e.fieldValue = i, e) : {
201
201
  message: typeof e == "function" ? e() : e,
202
202
  fieldValue: i,
203
203
  field: e.field || n.fullField
204
204
  };
205
205
  };
206
206
  }
207
- function Wt(n, t) {
207
+ function Nt(n, t) {
208
208
  if (t) {
209
209
  for (var e in t)
210
210
  if (t.hasOwnProperty(e)) {
@@ -214,13 +214,13 @@ function Wt(n, t) {
214
214
  }
215
215
  return n;
216
216
  }
217
- var Qt = function(t, e, i, s, r, o) {
217
+ var jt = function(t, e, i, s, r, o) {
218
218
  t.required && (!i.hasOwnProperty(t.field) || _(e, o || t.type)) && s.push(M(r.messages.required, t.fullField));
219
219
  }, Le = function(t, e, i, s, r) {
220
220
  (/^\s+$/.test(e) || e === "") && s.push(M(r.messages.whitespace, t.fullField));
221
- }, ht, Me = function() {
222
- if (ht)
223
- return ht;
221
+ }, ct, Me = function() {
222
+ if (ct)
223
+ return ct;
224
224
  var n = "[a-fA-F\\d:]", t = function(E) {
225
225
  return E && E.includeBoundaries ? "(?:(?<=\\s|^)(?=" + n + ")|(?<=" + n + ")(?=\\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 = (`
@@ -234,17 +234,17 @@ var Qt = 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 + "$"), a = new RegExp("^" + s + "$"), c = function(E) {
237
+ `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), r = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), o = new RegExp("^" + e + "$"), a = new RegExp("^" + s + "$"), l = function(E) {
238
238
  return E && E.exact ? r : new RegExp("(?:" + t(E) + e + t(E) + ")|(?:" + t(E) + s + t(E) + ")", "g");
239
239
  };
240
- c.v4 = function(m) {
240
+ l.v4 = function(m) {
241
241
  return m && m.exact ? o : new RegExp("" + t(m) + e + t(m), "g");
242
- }, c.v6 = function(m) {
242
+ }, l.v6 = function(m) {
243
243
  return m && m.exact ? a : new RegExp("" + t(m) + s + t(m), "g");
244
244
  };
245
- var h = "(?:(?:[a-z]+:)?//)", f = "(?:\\S+(?::\\S*)?@)?", d = c.v4().source, x = c.v6().source, u = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", g = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", w = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", p = "(?::\\d{2,5})?", y = '(?:[/?#][^\\s"]*)?', b = "(?:" + h + "|www\\.)" + f + "(?:localhost|" + d + "|" + x + "|" + u + g + w + ")" + p + y;
246
- return ht = new RegExp("(?:^" + b + "$)", "i"), ht;
247
- }, Pt = {
245
+ var c = "(?:(?:[a-z]+:)?//)", f = "(?:\\S+(?::\\S*)?@)?", d = l.v4().source, x = l.v6().source, u = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", g = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", w = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", p = "(?::\\d{2,5})?", y = '(?:[/?#][^\\s"]*)?', b = "(?:" + c + "|www\\.)" + f + "(?:localhost|" + d + "|" + x + "|" + u + g + w + ")" + p + y;
246
+ return ct = new RegExp("(?:^" + b + "$)", "i"), ct;
247
+ }, Yt = {
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,}))$/,
250
250
  // url: new RegExp(
@@ -284,26 +284,26 @@ var Qt = function(t, e, i, s, r, o) {
284
284
  return typeof t == "function";
285
285
  },
286
286
  email: function(t) {
287
- return typeof t == "string" && t.length <= 320 && !!t.match(Pt.email);
287
+ return typeof t == "string" && t.length <= 320 && !!t.match(Yt.email);
288
288
  },
289
289
  url: function(t) {
290
290
  return typeof t == "string" && t.length <= 2048 && !!t.match(Me());
291
291
  },
292
292
  hex: function(t) {
293
- return typeof t == "string" && !!t.match(Pt.hex);
293
+ return typeof t == "string" && !!t.match(Yt.hex);
294
294
  }
295
295
  }, He = function(t, e, i, s, r) {
296
296
  if (t.required && e === void 0) {
297
- Qt(t, e, i, s, r);
297
+ jt(t, e, i, s, r);
298
298
  return;
299
299
  }
300
300
  var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], a = t.type;
301
301
  o.indexOf(a) > -1 ? et[a](e) || s.push(M(r.messages.types[a], t.fullField, t.type)) : a && typeof e !== t.type && s.push(M(r.messages.types[a], t.fullField, t.type));
302
302
  }, De = function(t, e, i, s, r) {
303
- var o = typeof t.len == "number", a = typeof t.min == "number", c = typeof t.max == "number", h = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, f = e, d = null, x = typeof e == "number", u = typeof e == "string", g = Array.isArray(e);
303
+ var o = typeof t.len == "number", a = typeof t.min == "number", l = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, f = e, d = null, x = typeof e == "number", u = typeof e == "string", g = Array.isArray(e);
304
304
  if (x ? d = "number" : u ? d = "string" : g && (d = "array"), !d)
305
305
  return !1;
306
- g && (f = e.length), u && (f = e.replace(h, "_").length), o ? f !== t.len && s.push(M(r.messages[d].len, t.fullField, t.len)) : a && !c && f < t.min ? s.push(M(r.messages[d].min, t.fullField, t.min)) : c && !a && f > t.max ? s.push(M(r.messages[d].max, t.fullField, t.max)) : a && c && (f < t.min || f > t.max) && s.push(M(r.messages[d].range, t.fullField, t.min, t.max));
306
+ g && (f = e.length), u && (f = e.replace(c, "_").length), o ? f !== t.len && s.push(M(r.messages[d].len, t.fullField, t.len)) : a && !l && f < t.min ? s.push(M(r.messages[d].min, t.fullField, t.min)) : l && !a && f > t.max ? s.push(M(r.messages[d].max, t.fullField, t.max)) : a && l && (f < t.min || f > t.max) && s.push(M(r.messages[d].range, t.fullField, t.min, t.max));
307
307
  }, j = "enum", Xe = function(t, e, i, s, r) {
308
308
  t[j] = Array.isArray(t[j]) ? t[j] : [], t[j].indexOf(e) === -1 && s.push(M(r.messages[j], t.fullField, t[j].join(", ")));
309
309
  }, Fe = function(t, e, i, s, r) {
@@ -316,7 +316,7 @@ var Qt = function(t, e, i, s, r, o) {
316
316
  }
317
317
  }
318
318
  }, v = {
319
- required: Qt,
319
+ required: jt,
320
320
  whitespace: Le,
321
321
  type: He,
322
322
  range: De,
@@ -416,8 +416,8 @@ var Qt = function(t, e, i, s, r, o) {
416
416
  if (_(e, "date") && !t.required)
417
417
  return i();
418
418
  if (v.required(t, e, s, o, r), !_(e, "date")) {
419
- var c;
420
- e instanceof Date ? c = e : c = new Date(e), v.type(t, c, s, o, r), c && v.range(t, c.getTime(), s, o, r);
419
+ var l;
420
+ e instanceof Date ? l = e : l = new Date(e), v.type(t, l, s, o, r), l && v.range(t, l.getTime(), s, o, r);
421
421
  }
422
422
  }
423
423
  i(o);
@@ -425,8 +425,8 @@ var Qt = function(t, e, i, s, r, o) {
425
425
  var o = [], a = Array.isArray(e) ? "array" : typeof e;
426
426
  v.required(t, e, s, o, r, a), i(o);
427
427
  }, yt = function(t, e, i, s, r) {
428
- var o = t.type, a = [], c = t.required || !t.required && s.hasOwnProperty(t.field);
429
- if (c) {
428
+ var o = t.type, a = [], l = t.required || !t.required && s.hasOwnProperty(t.field);
429
+ if (l) {
430
430
  if (_(e, o) && !t.required)
431
431
  return i();
432
432
  v.required(t, e, s, a, r, o), _(e, o) || v.type(t, e, s, a, r);
@@ -528,14 +528,14 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
528
528
  s.rules[r] = Array.isArray(o) ? o : [o];
529
529
  });
530
530
  }, t.messages = function(i) {
531
- return i && (this._messages = Wt(vt(), i)), this._messages;
531
+ return i && (this._messages = Nt(vt(), i)), this._messages;
532
532
  }, t.validate = function(i, s, r) {
533
533
  var o = this;
534
534
  s === void 0 && (s = {}), r === void 0 && (r = function() {
535
535
  });
536
- var a = i, c = s, h = r;
537
- if (typeof c == "function" && (h = c, c = {}), !this.rules || Object.keys(this.rules).length === 0)
538
- return h && h(null, a), Promise.resolve(a);
536
+ var a = i, l = s, c = r;
537
+ if (typeof l == "function" && (c = l, l = {}), !this.rules || Object.keys(this.rules).length === 0)
538
+ return c && c(null, a), Promise.resolve(a);
539
539
  function f(w) {
540
540
  var p = [], y = {};
541
541
  function b(E) {
@@ -547,14 +547,14 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
547
547
  }
548
548
  for (var m = 0; m < w.length; m++)
549
549
  b(w[m]);
550
- p.length ? (y = Ct(p), h(p, y)) : h(null, a);
550
+ p.length ? (y = Ct(p), c(p, y)) : c(null, a);
551
551
  }
552
- if (c.messages) {
552
+ if (l.messages) {
553
553
  var d = this.messages();
554
- d === Rt && (d = vt()), Wt(d, c.messages), c.messages = d;
554
+ d === Rt && (d = vt()), Nt(d, l.messages), l.messages = d;
555
555
  } else
556
- c.messages = this.messages();
557
- var x = {}, u = c.keys || Object.keys(this.rules);
556
+ l.messages = this.messages();
557
+ var x = {}, u = l.keys || Object.keys(this.rules);
558
558
  u.forEach(function(w) {
559
559
  var p = o.rules[w], y = a[w];
560
560
  p.forEach(function(b) {
@@ -570,51 +570,51 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
570
570
  });
571
571
  });
572
572
  var g = {};
573
- return Te(x, c, function(w, p) {
573
+ return Se(x, l, function(w, p) {
574
574
  var y = w.rule, b = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
575
575
  b = b && (y.required || !y.required && w.value), y.field = w.field;
576
- function m(R, T) {
577
- return $({}, T, {
576
+ function m(R, S) {
577
+ return $({}, S, {
578
578
  fullField: y.fullField + "." + R,
579
579
  fullFields: y.fullFields ? [].concat(y.fullFields, [R]) : [R]
580
580
  });
581
581
  }
582
582
  function E(R) {
583
583
  R === void 0 && (R = []);
584
- var T = Array.isArray(R) ? R : [R];
585
- !c.suppressWarning && T.length && n.warning("async-validator:", T), T.length && y.message !== void 0 && (T = [].concat(y.message));
586
- var A = T.map(Bt(y, a));
587
- if (c.first && A.length)
584
+ var S = Array.isArray(R) ? R : [R];
585
+ !l.suppressWarning && S.length && n.warning("async-validator:", S), S.length && y.message !== void 0 && (S = [].concat(y.message));
586
+ var A = S.map(kt(y, a));
587
+ if (l.first && A.length)
588
588
  return g[y.field] = 1, p(A);
589
589
  if (!b)
590
590
  p(A);
591
591
  else {
592
592
  if (y.required && !w.value)
593
- return y.message !== void 0 ? A = [].concat(y.message).map(Bt(y, a)) : c.error && (A = [c.error(y, M(c.messages.required, y.field))]), p(A);
593
+ return y.message !== void 0 ? A = [].concat(y.message).map(kt(y, a)) : l.error && (A = [l.error(y, M(l.messages.required, y.field))]), p(A);
594
594
  var L = {};
595
595
  y.defaultField && Object.keys(w.value).map(function(I) {
596
596
  L[I] = y.defaultField;
597
597
  }), L = $({}, L, w.rule.fields);
598
598
  var D = {};
599
599
  Object.keys(L).forEach(function(I) {
600
- var S = L[I], O = Array.isArray(S) ? S : [S];
600
+ var T = L[I], O = Array.isArray(T) ? T : [T];
601
601
  D[I] = O.map(m.bind(null, I));
602
602
  });
603
603
  var B = new n(D);
604
- B.messages(c.messages), w.rule.options && (w.rule.options.messages = c.messages, w.rule.options.error = c.error), B.validate(w.value, w.rule.options || c, function(I) {
605
- var S = [];
606
- A && A.length && S.push.apply(S, A), I && I.length && S.push.apply(S, I), p(S.length ? S : null);
604
+ B.messages(l.messages), w.rule.options && (w.rule.options.messages = l.messages, w.rule.options.error = l.error), B.validate(w.value, w.rule.options || l, function(I) {
605
+ var T = [];
606
+ A && A.length && T.push.apply(T, A), I && I.length && T.push.apply(T, I), p(T.length ? T : null);
607
607
  });
608
608
  }
609
609
  }
610
610
  var C;
611
611
  if (y.asyncValidator)
612
- C = y.asyncValidator(y, w.value, E, w.source, c);
612
+ C = y.asyncValidator(y, w.value, E, w.source, l);
613
613
  else if (y.validator) {
614
614
  try {
615
- C = y.validator(y, w.value, E, w.source, c);
615
+ C = y.validator(y, w.value, E, w.source, l);
616
616
  } catch (R) {
617
- console.error == null || console.error(R), c.suppressValidatorError || setTimeout(function() {
617
+ console.error == null || console.error(R), l.suppressValidatorError || setTimeout(function() {
618
618
  throw R;
619
619
  }, 0), E(R.message);
620
620
  }
@@ -644,16 +644,16 @@ nt.register = function(t, e) {
644
644
  throw new Error("Cannot register a validator by type, validator is not a function");
645
645
  it[t] = e;
646
646
  };
647
- nt.warning = Jt;
647
+ nt.warning = Gt;
648
648
  nt.messages = Rt;
649
649
  nt.validators = it;
650
- function te() {
650
+ function Ut() {
651
651
  return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(n) {
652
652
  const t = Math.random() * 16 | 0;
653
653
  return (n === "x" ? t : t & 3 | 8).toString(16);
654
654
  });
655
655
  }
656
- function ee(n, t) {
656
+ function Zt(n, t) {
657
657
  let e = 0, i;
658
658
  return function(...s) {
659
659
  const r = (/* @__PURE__ */ new Date()).getTime(), o = r - e;
@@ -662,8 +662,8 @@ function ee(n, t) {
662
662
  }, t - o));
663
663
  };
664
664
  }
665
- function ie(n) {
666
- return n ? n.map((t) => ie(t.children) + 1).sort((t, e) => e - t)[0] : 0;
665
+ function Jt(n) {
666
+ return n ? n.map((t) => Jt(t.children) + 1).sort((t, e) => e - t)[0] : 0;
667
667
  }
668
668
  function Je(n = []) {
669
669
  let t = [], e = [], i = [];
@@ -675,14 +675,14 @@ function Je(n = []) {
675
675
  ...i.sort((s, r) => s.sort - r.sort)
676
676
  ];
677
677
  }
678
- function se(n = [], t = 1, e = 0) {
678
+ function Qt(n = [], t = 1, e = 0) {
679
679
  return n.map((i) => {
680
680
  if (i.children) {
681
681
  let s = 0, r = i.fixed;
682
682
  i.children.forEach((a) => {
683
683
  a.fixed = r;
684
684
  });
685
- const o = se(i.children, t - 1, e + 1);
685
+ const o = Qt(i.children, t - 1, e + 1);
686
686
  return o && o.forEach((a) => {
687
687
  s += a.colspan;
688
688
  }), {
@@ -708,26 +708,26 @@ function _t(n = []) {
708
708
  e.children ? t = t.concat(_t(e.children)) : t.push(e);
709
709
  }), t;
710
710
  }
711
- const Vt = /^(\r\n|\n\r|\r|\n)/, Qe = /^[^\t\r\n]+/, zt = /^\t/;
711
+ const Kt = /^(\r\n|\n\r|\r|\n)/, Qe = /^[^\t\r\n]+/, Bt = /^\t/;
712
712
  function ti(n) {
713
713
  let t = [[""]];
714
714
  if (n.length === 0)
715
715
  return t;
716
716
  let e = 0, i = 0, s;
717
717
  for (; n.length > 0 && s !== n.length; )
718
- if (s = n.length, n.match(zt))
719
- n = n.replace(zt, ""), e += 1, t[i][e] = "";
720
- else if (n.match(Vt))
721
- n = n.replace(Vt, ""), e = 0, i += 1, t[i] = [""];
718
+ if (s = n.length, n.match(Bt))
719
+ n = n.replace(Bt, ""), e += 1, t[i][e] = "";
720
+ else if (n.match(Kt))
721
+ n = n.replace(Kt, ""), e = 0, i += 1, t[i] = [""];
722
722
  else {
723
723
  let r = "";
724
724
  if (n.startsWith('"')) {
725
725
  let o = 0, a = !0;
726
726
  for (; a; ) {
727
- const c = n.slice(0, 1);
728
- c === '"' && (o += 1), r += c, n = n.slice(1), (n.length === 0 || n.match(/^[\t\r\n]/) && o % 2 === 0) && (a = !1);
727
+ const l = n.slice(0, 1);
728
+ l === '"' && (o += 1), r += l, n = n.slice(1), (n.length === 0 || n.match(/^[\t\r\n]/) && o % 2 === 0) && (a = !1);
729
729
  }
730
- r = r.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (c) => new Array(Math.floor(c.length / 2)).fill('"').join(""));
730
+ r = r.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (l) => new Array(Math.floor(l.length / 2)).fill('"').join(""));
731
731
  } else {
732
732
  const o = n.match(Qe);
733
733
  r = o ? o[0] : "", n = n.slice(r.length);
@@ -750,24 +750,24 @@ function ei(n) {
750
750
  class ii {
751
751
  //虚拟滚动位置
752
752
  constructor(t, e) {
753
- l(this, "loading", !1);
754
- l(this, "ctx");
755
- l(this, "data");
756
- l(this, "columns");
757
- l(this, "footerData", []);
758
- l(this, "rowKeyMap", /* @__PURE__ */ new Map());
759
- l(this, "colIndexKeyMap", /* @__PURE__ */ new Map());
760
- l(this, "headerMap", /* @__PURE__ */ new Map());
761
- l(this, "rowIndexRowKeyMap", /* @__PURE__ */ new Map());
762
- l(this, "checkboxKeyMap", /* @__PURE__ */ new Map());
763
- l(this, "originalDataMap", /* @__PURE__ */ new Map());
764
- l(this, "changedDataMap", /* @__PURE__ */ new Map());
765
- l(this, "validationErrorMap", /* @__PURE__ */ new Map());
766
- l(this, "itemRowKeyMap", /* @__PURE__ */ new WeakMap());
767
- l(this, "bufferData", []);
768
- l(this, "sumHeight", 0);
769
- l(this, "filterMethod");
770
- l(this, "positions", []);
753
+ h(this, "loading", !1);
754
+ h(this, "ctx");
755
+ h(this, "data");
756
+ h(this, "columns");
757
+ h(this, "footerData", []);
758
+ h(this, "rowKeyMap", /* @__PURE__ */ new Map());
759
+ h(this, "colIndexKeyMap", /* @__PURE__ */ new Map());
760
+ h(this, "headerMap", /* @__PURE__ */ new Map());
761
+ h(this, "rowIndexRowKeyMap", /* @__PURE__ */ new Map());
762
+ h(this, "checkboxKeyMap", /* @__PURE__ */ new Map());
763
+ h(this, "originalDataMap", /* @__PURE__ */ new Map());
764
+ h(this, "changedDataMap", /* @__PURE__ */ new Map());
765
+ h(this, "validationErrorMap", /* @__PURE__ */ new Map());
766
+ h(this, "itemRowKeyMap", /* @__PURE__ */ new WeakMap());
767
+ h(this, "bufferData", []);
768
+ h(this, "sumHeight", 0);
769
+ h(this, "filterMethod");
770
+ h(this, "positions", []);
771
771
  this.ctx = t;
772
772
  const { data: i = [], columns: s = [], footerData: r = [] } = e;
773
773
  this.data = i, this.footerData = r, this.columns = s, this.setLoading(!0), this.init();
@@ -790,11 +790,11 @@ class ii {
790
790
  t.forEach((i, s) => {
791
791
  let r = !1;
792
792
  Array.isArray(i.children) && (r = !0, this.initData(i.children, e + 1));
793
- const { ROW_KEY: o = "", DEFAULT_EXPAND_ALL: a, CELL_HEIGHT: c, SELECTABLE_METHOD: h, CHECKBOX_KEY: f } = this.ctx.config, d = i[o], x = d ?? te();
793
+ const { ROW_KEY: o = "", DEFAULT_EXPAND_ALL: a, CELL_HEIGHT: l, SELECTABLE_METHOD: c, CHECKBOX_KEY: f } = this.ctx.config, d = i[o], x = d ?? Ut();
794
794
  this.itemRowKeyMap.set(i, x);
795
- const u = i._height || c, g = i._readonly;
795
+ const u = i._height || l, g = i._readonly;
796
796
  let w = !0;
797
- if (typeof h == "function" && (w = h), f) {
797
+ if (typeof c == "function" && (w = c), f) {
798
798
  const p = i[f];
799
799
  if (this.checkboxKeyMap.has(p)) {
800
800
  const y = this.checkboxKeyMap.get(p);
@@ -874,12 +874,12 @@ class ii {
874
874
  const i = (r) => {
875
875
  r.forEach((o) => {
876
876
  t.push(o);
877
- const a = this.itemRowKeyMap.get(o), { expand: c, hasChildren: h, height: f } = this.rowKeyMap.get(a), d = this.sumHeight;
877
+ const a = this.itemRowKeyMap.get(o), { expand: l, hasChildren: c, height: f } = this.rowKeyMap.get(a), d = this.sumHeight;
878
878
  this.sumHeight += f, this.rowIndexRowKeyMap.set(e, a), this.positions.push({
879
879
  top: d,
880
880
  height: f,
881
881
  bottom: this.sumHeight
882
- }), e += 1, c && h && i(o.children);
882
+ }), e += 1, l && c && i(o.children);
883
883
  });
884
884
  };
885
885
  this.rowIndexRowKeyMap.clear();
@@ -1002,9 +1002,9 @@ class ii {
1002
1002
  let i = [];
1003
1003
  const s = /* @__PURE__ */ new Set();
1004
1004
  t.forEach((a) => {
1005
- const { value: c, rowKey: h, key: f } = a, { oldValue: d, newValue: x } = this.setItemValue(h, f, c);
1006
- s.add(h), i.push({
1007
- rowKey: h,
1005
+ const { value: l, rowKey: c, key: f } = a, { oldValue: d, newValue: x } = this.setItemValue(c, f, l);
1006
+ s.add(c), i.push({
1007
+ rowKey: c,
1008
1008
  key: f,
1009
1009
  oldValue: d,
1010
1010
  newValue: x
@@ -1012,12 +1012,12 @@ class ii {
1012
1012
  });
1013
1013
  let r = [];
1014
1014
  const o = i.map((a) => {
1015
- const c = this.ctx.database.getRowDataItemForRowKey(a.rowKey);
1015
+ const l = this.ctx.database.getRowDataItemForRowKey(a.rowKey);
1016
1016
  return {
1017
1017
  rowKey: a.rowKey,
1018
1018
  key: a.key,
1019
1019
  value: a.newValue,
1020
- row: c
1020
+ row: l
1021
1021
  };
1022
1022
  });
1023
1023
  return s.forEach((a) => {
@@ -1043,15 +1043,15 @@ class ii {
1043
1043
  if (!this.rowKeyMap.has(t))
1044
1044
  return {};
1045
1045
  const { item: a } = this.rowKeyMap.get(t);
1046
- let c = a[e];
1046
+ let l = a[e];
1047
1047
  if (this.ctx.database.getReadonly(t, e))
1048
1048
  return {
1049
- oldValue: c,
1050
- newValue: c
1049
+ oldValue: l,
1050
+ newValue: l
1051
1051
  };
1052
- a[e] !== null && typeof a[e] == "object" && (c = JSON.parse(JSON.stringify(a[e])));
1053
- const h = `${t}_${e}`;
1054
- if (this.originalDataMap.has(h) || this.originalDataMap.set(h, c), this.changedDataMap.set(h, i), a[e] = i, o) {
1052
+ a[e] !== null && typeof a[e] == "object" && (l = JSON.parse(JSON.stringify(a[e])));
1053
+ const c = `${t}_${e}`;
1054
+ if (this.originalDataMap.has(c) || this.originalDataMap.set(c, l), this.changedDataMap.set(c, i), a[e] = i, o) {
1055
1055
  const f = this.ctx.database.getRowDataItemForRowKey(t), d = {
1056
1056
  rowKey: t,
1057
1057
  key: e,
@@ -1061,18 +1061,18 @@ class ii {
1061
1061
  this.ctx.emit("change", [d], [f]), this.ctx.emit("editChange", {
1062
1062
  rowKey: t,
1063
1063
  key: e,
1064
- oldValue: c,
1064
+ oldValue: l,
1065
1065
  value: i,
1066
- originalValue: this.originalDataMap.get(h),
1066
+ originalValue: this.originalDataMap.get(c),
1067
1067
  row: f
1068
1068
  });
1069
1069
  }
1070
1070
  return this.ctx.hasEvent("iterationChange") && this.ctx.emit("iterationChange", {
1071
1071
  rowKey: t,
1072
1072
  key: e,
1073
- oldValue: c,
1073
+ oldValue: l,
1074
1074
  value: i,
1075
- originalValue: this.originalDataMap.get(h),
1075
+ originalValue: this.originalDataMap.get(c),
1076
1076
  row: this.ctx.database.getRowDataItemForRowKey(t)
1077
1077
  }), s && this.ctx.history.pushState({
1078
1078
  type: "single",
@@ -1082,12 +1082,12 @@ class ii {
1082
1082
  {
1083
1083
  rowKey: t,
1084
1084
  key: e,
1085
- oldValue: c,
1085
+ oldValue: l,
1086
1086
  newValue: i
1087
1087
  }
1088
1088
  ]
1089
- }), r && this.ctx.emit("draw"), {
1090
- oldValue: c,
1089
+ }), this.getValidator(t, e), r && this.ctx.emit("draw"), {
1090
+ oldValue: l,
1091
1091
  newValue: i
1092
1092
  };
1093
1093
  }
@@ -1114,8 +1114,8 @@ class ii {
1114
1114
  return !1;
1115
1115
  const { item: s } = this.rowKeyMap.get(t), r = s[i];
1116
1116
  this.checkboxKeyMap.has(r) && this.checkboxKeyMap.get(r).forEach((a) => {
1117
- const c = this.rowKeyMap.get(a);
1118
- c.check = e;
1117
+ const l = this.rowKeyMap.get(a);
1118
+ l.check = e;
1119
1119
  });
1120
1120
  }
1121
1121
  }
@@ -1230,7 +1230,7 @@ class ii {
1230
1230
  getChangedData() {
1231
1231
  let t = [];
1232
1232
  return this.changedDataMap.forEach((e, i) => {
1233
- const s = this.originalDataMap.get(i), r = i.split("_")[0], o = i.split("_")[1];
1233
+ const s = this.originalDataMap.get(i), r = i.split("_")[0], o = i.split("_")[1];
1234
1234
  s !== e && t.push({
1235
1235
  rowKey: r,
1236
1236
  colKey: o,
@@ -1243,7 +1243,7 @@ class ii {
1243
1243
  getChangedRows() {
1244
1244
  const t = /* @__PURE__ */ new Set();
1245
1245
  this.changedDataMap.forEach((i, s) => {
1246
- const r = this.originalDataMap.get(s), o = s.split("_")[0];
1246
+ const r = this.originalDataMap.get(s), o = s.split("_")[0];
1247
1247
  r !== i && t.add(o);
1248
1248
  });
1249
1249
  let e = [];
@@ -1258,7 +1258,7 @@ class ii {
1258
1258
  * @returns
1259
1259
  */
1260
1260
  isHasChangedData(t, e) {
1261
- const i = `${t}_${e}`;
1261
+ const i = `${t}_${e}`;
1262
1262
  if (!this.changedDataMap.has(i))
1263
1263
  return !1;
1264
1264
  const s = this.originalDataMap.get(i), r = this.changedDataMap.get(i);
@@ -1277,15 +1277,15 @@ class ii {
1277
1277
  getReadonly(t, e) {
1278
1278
  const i = this.rowKeyMap.get(t), s = this.headerMap.get(e), r = i == null ? void 0 : i.readonly, o = s == null ? void 0 : s.readonly, { CELL_READONLY_METHOD: a } = this.ctx.config;
1279
1279
  if (typeof a == "function") {
1280
- const h = a({
1280
+ const c = a({
1281
1281
  row: i.item,
1282
1282
  rowIndex: i.rowIndex,
1283
1283
  colIndex: s.colIndex,
1284
1284
  column: s.column,
1285
1285
  value: this.getItemValue(t, e)
1286
1286
  });
1287
- if (h !== void 0)
1288
- return h;
1287
+ if (c !== void 0)
1288
+ return c;
1289
1289
  }
1290
1290
  return o || r;
1291
1291
  }
@@ -1295,7 +1295,7 @@ class ii {
1295
1295
  getValidator(t, e) {
1296
1296
  return new Promise((i) => {
1297
1297
  const s = this.rowKeyMap.get(t), r = this.headerMap.get(e), { CELL_RULES_METHOD: o } = this.ctx.config, a = r.column;
1298
- let c = a.rules;
1298
+ let l = a.rules;
1299
1299
  if (typeof o == "function") {
1300
1300
  const f = o({
1301
1301
  row: s.item,
@@ -1304,28 +1304,28 @@ class ii {
1304
1304
  column: a,
1305
1305
  value: this.getItemValue(t, e)
1306
1306
  });
1307
- f && (c = f);
1307
+ f && (l = f);
1308
1308
  }
1309
- if (c) {
1310
- let h = {}, f = {};
1311
- if (f[e] = this.getItemValue(t, e), Array.isArray(c) && c.length) {
1312
- const x = c.map((u) => ({
1309
+ if (l) {
1310
+ let c = {}, f = {};
1311
+ if (f[e] = this.getItemValue(t, e), Array.isArray(l) && l.length) {
1312
+ const x = l.map((u) => ({
1313
1313
  ...u,
1314
1314
  row: s.item,
1315
1315
  column: a,
1316
1316
  rowIndex: s.rowIndex,
1317
1317
  colIndex: r.colIndex
1318
1318
  }));
1319
- h[e] = x;
1319
+ c[e] = x;
1320
1320
  } else
1321
- h[e] = {
1322
- ...c,
1321
+ c[e] = {
1322
+ ...l,
1323
1323
  row: s.item,
1324
1324
  column: a,
1325
1325
  rowIndex: s.rowIndex,
1326
1326
  colIndex: r.colIndex
1327
1327
  };
1328
- new nt(h).validate(f).then(() => {
1328
+ new nt(c).validate(f).then(() => {
1329
1329
  this.setValidationError(t, e, []), i([]);
1330
1330
  }).catch(({ errors: x }) => {
1331
1331
  const u = x.map((g) => ({
@@ -1356,7 +1356,7 @@ class ii {
1356
1356
  return this.loading;
1357
1357
  }
1358
1358
  setValidationErrorByRowIndex(t, e, i) {
1359
- const r = `${this.rowIndexRowKeyMap.get(t)}_${e}`, o = [
1359
+ const r = `${this.rowIndexRowKeyMap.get(t)}_${e}`, o = [
1360
1360
  {
1361
1361
  message: i
1362
1362
  }
@@ -1364,19 +1364,19 @@ class ii {
1364
1364
  this.validationErrorMap.set(r, o);
1365
1365
  }
1366
1366
  setValidationError(t, e, i) {
1367
- const s = `${t}_${e}`;
1367
+ const s = `${t}_${e}`;
1368
1368
  this.validationErrorMap.set(s, i);
1369
1369
  }
1370
1370
  getValidationError(t, e) {
1371
- const i = `${t}_${e}`;
1371
+ const i = `${t}_${e}`;
1372
1372
  return this.validationErrorMap.get(i) || [];
1373
1373
  }
1374
1374
  }
1375
1375
  class si {
1376
1376
  constructor(t) {
1377
- l(this, "ctx");
1378
- l(this, "history", []);
1379
- l(this, "historyIndex", -1);
1377
+ h(this, "ctx");
1378
+ h(this, "history", []);
1379
+ h(this, "historyIndex", -1);
1380
1380
  this.ctx = t, this.init();
1381
1381
  }
1382
1382
  init() {
@@ -1431,8 +1431,8 @@ class si {
1431
1431
  }
1432
1432
  class ri {
1433
1433
  constructor(t) {
1434
- l(this, "eventTasks", /* @__PURE__ */ new Map());
1435
- l(this, "ctx");
1434
+ h(this, "eventTasks", /* @__PURE__ */ new Map());
1435
+ h(this, "ctx");
1436
1436
  this.ctx = t, this.init();
1437
1437
  }
1438
1438
  init() {
@@ -1486,7 +1486,7 @@ class ri {
1486
1486
  }
1487
1487
  class oi {
1488
1488
  constructor() {
1489
- l(this, "events", /* @__PURE__ */ new Map());
1489
+ h(this, "events", /* @__PURE__ */ new Map());
1490
1490
  }
1491
1491
  has(t) {
1492
1492
  return this.events.has(t);
@@ -1524,7 +1524,7 @@ class oi {
1524
1524
  }
1525
1525
  class ni {
1526
1526
  constructor(t) {
1527
- l(this, "ctx");
1527
+ h(this, "ctx");
1528
1528
  const e = t.getContext("2d");
1529
1529
  if (!e) throw new Error("canvas context not found");
1530
1530
  this.ctx = e;
@@ -1558,21 +1558,21 @@ class ni {
1558
1558
  * @param {string} color - 阴影的颜色
1559
1559
  */
1560
1560
  drawShadow(t, e, i, s, r) {
1561
- const { fillColor: o, side: a, shadowWidth: c, colorStart: h, colorEnd: f } = r;
1561
+ const { fillColor: o, side: a, shadowWidth: l, colorStart: c, colorEnd: f } = r;
1562
1562
  this.ctx.save(), o && (this.ctx.fillStyle = o, this.ctx.fillRect(t, e, i, s));
1563
1563
  let d;
1564
1564
  switch (a) {
1565
1565
  case "left":
1566
- d = this.ctx.createLinearGradient(t - c, e, t, e), d.addColorStop(0, h), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t - c, e, c, s);
1566
+ d = this.ctx.createLinearGradient(t - l, e, t, e), d.addColorStop(0, c), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t - l, e, l, s);
1567
1567
  break;
1568
1568
  case "right":
1569
- d = this.ctx.createLinearGradient(t + i, e, t + i + c, e), d.addColorStop(0, h), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t + i, e, c, s);
1569
+ d = this.ctx.createLinearGradient(t + i, e, t + i + l, e), d.addColorStop(0, c), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t + i, e, l, s);
1570
1570
  break;
1571
1571
  case "top":
1572
- d = this.ctx.createLinearGradient(t, e - c, t, e), d.addColorStop(0, h), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t, e - c, i, c);
1572
+ d = this.ctx.createLinearGradient(t, e - l, t, e), d.addColorStop(0, c), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t, e - l, i, l);
1573
1573
  break;
1574
1574
  case "bottom":
1575
- d = this.ctx.createLinearGradient(t, e + s, t, e + s + c), d.addColorStop(0, h), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t, e + s, i, c);
1575
+ d = this.ctx.createLinearGradient(t, e + s, t, e + s + l), d.addColorStop(0, c), d.addColorStop(1, f), this.ctx.fillStyle = d, this.ctx.fillRect(t, e + s, i, l);
1576
1576
  break;
1577
1577
  default:
1578
1578
  console.error("Invalid side specified for shadow");
@@ -1593,12 +1593,12 @@ class ni {
1593
1593
  drawImage(t, e, i, s, r) {
1594
1594
  this.ctx.save(), this.ctx.drawImage(t, e, i, s, r), this.ctx.restore();
1595
1595
  }
1596
- drawRect(t, e, i, s, { borderWidth: r = 1, borderColor: o, fillColor: a, radius: c = 0 } = {}) {
1597
- if (this.ctx.save(), this.ctx.beginPath(), a !== void 0 && (this.ctx.fillStyle = a), o !== void 0 && (this.ctx.lineWidth = r, this.ctx.strokeStyle = o), c === 0)
1596
+ drawRect(t, e, i, s, { borderWidth: r = 1, borderColor: o, fillColor: a, radius: l = 0 } = {}) {
1597
+ if (this.ctx.save(), this.ctx.beginPath(), a !== void 0 && (this.ctx.fillStyle = a), o !== void 0 && (this.ctx.lineWidth = r, this.ctx.strokeStyle = o), l === 0)
1598
1598
  this.ctx.rect(t - 0.5, e - 0.5, i, s);
1599
1599
  else {
1600
- const [h, f, d, x] = typeof c == "number" ? [c, c, c, c] : c;
1601
- this.ctx.moveTo(t + h, e), this.ctx.arcTo(t + i, e, t + i, e + f, f), this.ctx.arcTo(t + i, e + s, t + i - d, e + s, d), this.ctx.arcTo(t, e + s, t, e + s - x, x), this.ctx.arcTo(t, e, t + h, e, h);
1600
+ const [c, f, d, x] = typeof l == "number" ? [l, l, l, l] : l;
1601
+ this.ctx.moveTo(t + c, e), this.ctx.arcTo(t + i, e, t + i, e + f, f), this.ctx.arcTo(t + i, e + s, t + i - d, e + s, d), this.ctx.arcTo(t, e + s, t, e + s - x, x), this.ctx.arcTo(t, e, t + c, e, c);
1602
1602
  }
1603
1603
  a !== void 0 && this.ctx.fill(), o !== void 0 && this.ctx.stroke(), this.ctx.restore();
1604
1604
  }
@@ -1616,16 +1616,16 @@ class ni {
1616
1616
  this.ctx.save();
1617
1617
  const {
1618
1618
  font: a = "12px Arial",
1619
- align: c = "center",
1620
- color: h = "#495060",
1619
+ align: l = "center",
1620
+ color: c = "#495060",
1621
1621
  padding: f = 0,
1622
1622
  verticalAlign: d = "middle"
1623
1623
  } = o;
1624
- this.ctx.font = a, this.ctx.fillStyle = h, this.ctx.textBaseline = d, this.ctx.textAlign = c;
1624
+ this.ctx.font = a, this.ctx.fillStyle = c, this.ctx.textBaseline = d, this.ctx.textAlign = l;
1625
1625
  let x = 0;
1626
1626
  d === "top" ? x = i + f : d === "bottom" ? x = i + r - f : x = i + (r + 1) / 2;
1627
1627
  let u = 0;
1628
- c === "left" ? u = e + f : c === "right" ? u = e + s - f : u = e + s / 2;
1628
+ l === "left" ? u = e + f : l === "right" ? u = e + s - f : u = e + s / 2;
1629
1629
  const { _text: g, ellipsis: w } = this.handleEllipsis(t, s, f, a);
1630
1630
  return this.ctx.fillText(g, u, x), this.ctx.restore(), w;
1631
1631
  }
@@ -1636,12 +1636,12 @@ class ni {
1636
1636
  _text: "",
1637
1637
  ellipsis: r
1638
1638
  };
1639
- const a = this.ctx.measureText("...").width, c = this.ctx.measureText(t).width;
1640
- if (c && c + a >= e - i * 2) {
1639
+ const a = this.ctx.measureText("...").width, l = this.ctx.measureText(t).width;
1640
+ if (l && l + a >= e - i * 2) {
1641
1641
  r = !0;
1642
- let h = 0;
1642
+ let c = 0;
1643
1643
  for (let f = 0; f < t.length; f++)
1644
- if (h += this.ctx.measureText(t[f]).width, h >= e - i * 2 - a) {
1644
+ if (c += this.ctx.measureText(t[f]).width, c >= e - i * 2 - a) {
1645
1645
  o = t.slice(0, f) + "...";
1646
1646
  break;
1647
1647
  }
@@ -1652,131 +1652,131 @@ class ni {
1652
1652
  };
1653
1653
  }
1654
1654
  }
1655
- class $t {
1655
+ class Wt {
1656
1656
  constructor(t) {
1657
- l(this, "PROCESSOR_NUM", 50);
1658
- l(this, "CSS_PREFIX", "e-virt-table");
1659
- l(this, "ICONS", []);
1660
- l(this, "ROW_KEY", "");
1661
- l(this, "HEADER_FONT", "12px normal Arial");
1662
- l(this, "BODY_FONT", "12px normal Arial");
1663
- l(this, "BORDER_COLOR", "#e1e6eb");
1664
- l(this, "WIDTH", 0);
1665
- l(this, "RESIZE_MIN_WIDTH", 40);
1666
- l(this, "HEIGHT", 0);
1667
- l(this, "EMPTY_BODY_HEIGHT", 120);
1668
- l(this, "EMPTY_CUSTOM", !1);
1669
- l(this, "EMPTY_CUSTOM_STYLE", {});
1670
- l(this, "EMPTY_TEXT", "暂无数据");
1671
- l(this, "MAX_HEIGHT", 1e3);
1672
- l(this, "BORDER_RADIUS", 8);
1673
- l(this, "ENABLE_OFFSET_HEIGHT", !1);
1674
- l(this, "OFFSET_HEIGHT", 0);
1675
- l(this, "HEADER_HEIGHT", 36);
1676
- l(this, "ENABLE_HEADER_STICKY", !1);
1657
+ h(this, "PROCESSOR_NUM", 50);
1658
+ h(this, "CSS_PREFIX", "e-virt-table");
1659
+ h(this, "ICONS", []);
1660
+ h(this, "ROW_KEY", "");
1661
+ h(this, "HEADER_FONT", "12px normal Arial");
1662
+ h(this, "BODY_FONT", "12px normal Arial");
1663
+ h(this, "BORDER_COLOR", "#e1e6eb");
1664
+ h(this, "WIDTH", 0);
1665
+ h(this, "RESIZE_MIN_WIDTH", 40);
1666
+ h(this, "HEIGHT", 0);
1667
+ h(this, "EMPTY_BODY_HEIGHT", 120);
1668
+ h(this, "EMPTY_CUSTOM", !1);
1669
+ h(this, "EMPTY_CUSTOM_STYLE", {});
1670
+ h(this, "EMPTY_TEXT", "暂无数据");
1671
+ h(this, "MAX_HEIGHT", 1e3);
1672
+ h(this, "BORDER_RADIUS", 8);
1673
+ h(this, "ENABLE_OFFSET_HEIGHT", !1);
1674
+ h(this, "OFFSET_HEIGHT", 0);
1675
+ h(this, "HEADER_HEIGHT", 36);
1676
+ h(this, "ENABLE_HEADER_STICKY", !1);
1677
1677
  // 启用头部固定,需要外面实现覆盖层,或者所有表头都要是元素
1678
- l(this, "HEADER_BG_COLOR", "#F8FAFF");
1679
- l(this, "BODY_BG_COLOR", "#FFF");
1680
- l(this, "HEADER_TEXT_COLOR", "#1D2129");
1681
- l(this, "LOADING_ICON_SVG", "");
1682
- l(this, "LOADING_ICON_COLOR", "#4E5969");
1683
- l(this, "EXPAND_ICON_SVG", "");
1684
- l(this, "SHRINK_ICON_SVG", "");
1685
- l(this, "EXPAND_ICON_COLOR", "#4E5969");
1686
- l(this, "SHRINK_ICON_COLOR", "#4E5969");
1687
- l(this, "ERROR_TIP_ICON_COLOR", "red");
1688
- l(this, "ERROR_TIP_ICON_SIZE", 6);
1689
- l(this, "EXPAND_LAZY", !0);
1690
- l(this, "DEFAULT_EXPAND_ALL", !1);
1691
- l(this, "CELL_WIDTH", 100);
1692
- l(this, "CELL_HEIGHT", 36);
1693
- l(this, "CELL_PADDING", 8);
1694
- l(this, "CELL_HOVER_ICON_SIZE", 20);
1695
- l(this, "SCROLLER_TRACK_SIZE", 14);
1696
- l(this, "SCROLLER_SIZE", 8);
1697
- l(this, "SCROLLER_COLOR", "#dee0e3");
1698
- l(this, "SCROLLER_TRACK_COLOR", "#fff");
1699
- l(this, "SCROLLER_FOCUS_COLOR", "#bbbec4");
1700
- l(this, "SELECT_BORDER_COLOR", "rgb(82,146,247)");
1701
- l(this, "SELECT_AREA_COLOR", "rgba(82,146,247,0.1)");
1702
- l(this, "SELECT_BG_COLOR", "rgba(82,146,247,0.1)");
1703
- l(this, "EDIT_BG_COLOR", "#fcf6ed");
1704
- l(this, "CHECKBOX_KEY", "");
1705
- l(this, "CHECKBOX_COLOR", "rgb(82,146,247)");
1706
- l(this, "CHECKBOX_SIZE", 20);
1707
- l(this, "CHECKBOX_DISABLED_SVG", "");
1708
- l(this, "CHECKBOX_CHECK_SVG", "");
1709
- l(this, "CHECKBOX_UNCHECK_SVG", "");
1710
- l(this, "CHECKBOX_INDETERMINATE_SVG", "");
1711
- l(this, "READONLY_COLOR", "#fff");
1712
- l(this, "READONLY_TEXT_COLOR", "#4E5969");
1713
- l(this, "ERROR_TIP_COLOR", "#ED3F14");
1714
- l(this, "FOOTER_BG_COLOR", "#fafafa");
1715
- l(this, "FOOTER_FIXED", !0);
1716
- l(this, "CELL_FOOTER_HEIGHT", 36);
1717
- l(this, "ENABLE_SELECTOR", !1);
1718
- l(this, "ENABLE_EDIT_SINGLE_CLICK", !1);
1678
+ h(this, "HEADER_BG_COLOR", "#F8FAFF");
1679
+ h(this, "BODY_BG_COLOR", "#FFF");
1680
+ h(this, "HEADER_TEXT_COLOR", "#1D2129");
1681
+ h(this, "LOADING_ICON_SVG", "");
1682
+ h(this, "LOADING_ICON_COLOR", "#4E5969");
1683
+ h(this, "EXPAND_ICON_SVG", "");
1684
+ h(this, "SHRINK_ICON_SVG", "");
1685
+ h(this, "EXPAND_ICON_COLOR", "#4E5969");
1686
+ h(this, "SHRINK_ICON_COLOR", "#4E5969");
1687
+ h(this, "ERROR_TIP_ICON_COLOR", "red");
1688
+ h(this, "ERROR_TIP_ICON_SIZE", 6);
1689
+ h(this, "EXPAND_LAZY", !0);
1690
+ h(this, "DEFAULT_EXPAND_ALL", !1);
1691
+ h(this, "CELL_WIDTH", 100);
1692
+ h(this, "CELL_HEIGHT", 36);
1693
+ h(this, "CELL_PADDING", 8);
1694
+ h(this, "CELL_HOVER_ICON_SIZE", 20);
1695
+ h(this, "SCROLLER_TRACK_SIZE", 14);
1696
+ h(this, "SCROLLER_SIZE", 8);
1697
+ h(this, "SCROLLER_COLOR", "#dee0e3");
1698
+ h(this, "SCROLLER_TRACK_COLOR", "#fff");
1699
+ h(this, "SCROLLER_FOCUS_COLOR", "#bbbec4");
1700
+ h(this, "SELECT_BORDER_COLOR", "rgb(82,146,247)");
1701
+ h(this, "SELECT_AREA_COLOR", "rgba(82,146,247,0.1)");
1702
+ h(this, "SELECT_BG_COLOR", "rgba(82,146,247,0.1)");
1703
+ h(this, "EDIT_BG_COLOR", "#fcf6ed");
1704
+ h(this, "CHECKBOX_KEY", "");
1705
+ h(this, "CHECKBOX_COLOR", "rgb(82,146,247)");
1706
+ h(this, "CHECKBOX_SIZE", 20);
1707
+ h(this, "CHECKBOX_DISABLED_SVG", "");
1708
+ h(this, "CHECKBOX_CHECK_SVG", "");
1709
+ h(this, "CHECKBOX_UNCHECK_SVG", "");
1710
+ h(this, "CHECKBOX_INDETERMINATE_SVG", "");
1711
+ h(this, "READONLY_COLOR", "#fff");
1712
+ h(this, "READONLY_TEXT_COLOR", "#4E5969");
1713
+ h(this, "ERROR_TIP_COLOR", "#ED3F14");
1714
+ h(this, "FOOTER_BG_COLOR", "#fafafa");
1715
+ h(this, "FOOTER_FIXED", !0);
1716
+ h(this, "CELL_FOOTER_HEIGHT", 36);
1717
+ h(this, "ENABLE_SELECTOR", !1);
1718
+ h(this, "ENABLE_EDIT_SINGLE_CLICK", !1);
1719
1719
  // 启用单点击立马编辑
1720
- l(this, "ENABLE_EDIT_CLICK_SELECTOR", !0);
1720
+ h(this, "ENABLE_EDIT_CLICK_SELECTOR", !0);
1721
1721
  // 启用点击选择器编辑
1722
- l(this, "SELECTOR_AREA_MIN_X", 0);
1722
+ h(this, "SELECTOR_AREA_MIN_X", 0);
1723
1723
  // 选择器X最小范围
1724
- l(this, "SELECTOR_AREA_MAX_X_OFFSET", 0);
1724
+ h(this, "SELECTOR_AREA_MAX_X_OFFSET", 0);
1725
1725
  // 选择器X最大范围colMax - offset
1726
- l(this, "SELECTOR_AREA_MAX_X", 0);
1726
+ h(this, "SELECTOR_AREA_MAX_X", 0);
1727
1727
  // 选择器X最大范围,0默认最大colMax
1728
- l(this, "SELECTOR_AREA_MIN_Y", 0);
1728
+ h(this, "SELECTOR_AREA_MIN_Y", 0);
1729
1729
  // 选择器Y最小范围
1730
- l(this, "SELECTOR_AREA_MAX_Y", 0);
1730
+ h(this, "SELECTOR_AREA_MAX_Y", 0);
1731
1731
  // 选择器Y最大范围,0默认rowMax
1732
- l(this, "SELECTOR_AREA_MAX_Y_OFFSET", 0);
1732
+ h(this, "SELECTOR_AREA_MAX_Y_OFFSET", 0);
1733
1733
  // 选择器Y最大范围,0默认rowMax
1734
- l(this, "ENABLE_SELECTOR_SINGLE", !1);
1735
- l(this, "ENABLE_SELECTOR_SPAN_COL", !0);
1736
- l(this, "ENABLE_SELECTOR_SPAN_ROW", !0);
1737
- l(this, "ENABLE_SELECTOR_ALL_ROWS", !0);
1738
- l(this, "ENABLE_SELECTOR_ALL_COLS", !0);
1739
- l(this, "ENABLE_AUTOFILL", !1);
1740
- l(this, "ENABLE_CONTEXT_MENU", !1);
1741
- l(this, "ENABLE_COPY", !0);
1742
- l(this, "ENABLE_PASTER", !0);
1743
- l(this, "ENABLE_RESIZE_ROW", !0);
1744
- l(this, "ENABLE_RESIZE_COLUMN", !0);
1745
- l(this, "RESIZE_ROW_LINE_COLOR", "#e1e6eb");
1746
- l(this, "RESIZE_COLUMN_LINE_COLOR", "#e1e6eb");
1747
- l(this, "RESIZE_ROW_MIN_HEIGHT", 36);
1748
- l(this, "RESIZE_COLUMN_MIN_WIDTH", 40);
1749
- l(this, "ENABLE_KEYBOARD", !0);
1750
- l(this, "ENABLE_HISTORY", !1);
1751
- l(this, "ENABLE_VALIDATOR_IMMEDIATE", !0);
1752
- l(this, "HISTORY_NUM", 50);
1753
- l(this, "HIGHLIGHT_HOVER_ROW", !1);
1754
- l(this, "HIGHLIGHT_HOVER_ROW_COLOR", "rgba(186,203,231,0.1)");
1755
- l(this, "HIGHLIGHT_SELECTED_ROW", !1);
1756
- l(this, "HIGHLIGHT_SELECTED_ROW_COLOR", "rgba(82,146,247,0.1)");
1757
- l(this, "TOOLTIP_BG_COLOR", "#303133");
1758
- l(this, "TOOLTIP_TEXT_COLOR", "#fff");
1759
- l(this, "TOOLTIP_ZINDEX", 3e3);
1760
- l(this, "TOOLTIP_CUSTOM_STYLE", {});
1761
- l(this, "CONTEXT_MENU", [
1734
+ h(this, "ENABLE_SELECTOR_SINGLE", !1);
1735
+ h(this, "ENABLE_SELECTOR_SPAN_COL", !0);
1736
+ h(this, "ENABLE_SELECTOR_SPAN_ROW", !0);
1737
+ h(this, "ENABLE_SELECTOR_ALL_ROWS", !0);
1738
+ h(this, "ENABLE_SELECTOR_ALL_COLS", !0);
1739
+ h(this, "ENABLE_AUTOFILL", !1);
1740
+ h(this, "ENABLE_CONTEXT_MENU", !1);
1741
+ h(this, "ENABLE_COPY", !0);
1742
+ h(this, "ENABLE_PASTER", !0);
1743
+ h(this, "ENABLE_RESIZE_ROW", !0);
1744
+ h(this, "ENABLE_RESIZE_COLUMN", !0);
1745
+ h(this, "RESIZE_ROW_LINE_COLOR", "#e1e6eb");
1746
+ h(this, "RESIZE_COLUMN_LINE_COLOR", "#e1e6eb");
1747
+ h(this, "RESIZE_ROW_MIN_HEIGHT", 36);
1748
+ h(this, "RESIZE_COLUMN_MIN_WIDTH", 40);
1749
+ h(this, "ENABLE_KEYBOARD", !0);
1750
+ h(this, "ENABLE_HISTORY", !1);
1751
+ h(this, "ENABLE_VALIDATOR_IMMEDIATE", !0);
1752
+ h(this, "HISTORY_NUM", 50);
1753
+ h(this, "HIGHLIGHT_HOVER_ROW", !1);
1754
+ h(this, "HIGHLIGHT_HOVER_ROW_COLOR", "rgba(186,203,231,0.1)");
1755
+ h(this, "HIGHLIGHT_SELECTED_ROW", !1);
1756
+ h(this, "HIGHLIGHT_SELECTED_ROW_COLOR", "rgba(82,146,247,0.1)");
1757
+ h(this, "TOOLTIP_BG_COLOR", "#303133");
1758
+ h(this, "TOOLTIP_TEXT_COLOR", "#fff");
1759
+ h(this, "TOOLTIP_ZINDEX", 3e3);
1760
+ h(this, "TOOLTIP_CUSTOM_STYLE", {});
1761
+ h(this, "CONTEXT_MENU", [
1762
1762
  { label: "复制", value: "copy" },
1763
1763
  { label: "剪切", value: "cut" },
1764
1764
  { label: "粘贴", value: "paste" },
1765
1765
  { label: "清空选中内容", value: "clearSelected" }
1766
1766
  ]);
1767
- l(this, "HEADER_CELL_STYLE_METHOD");
1768
- l(this, "BODY_CELL_STYLE_METHOD");
1769
- l(this, "FOOTER_CELL_STYLE_METHOD");
1770
- l(this, "CELL_READONLY_METHOD");
1771
- l(this, "CELL_FORMATTER_METHOD");
1772
- l(this, "CELL_RULES_METHOD");
1773
- l(this, "CELL_TYPE_METHOD");
1774
- l(this, "CELL_EDITOR_TYPE_METHOD");
1775
- l(this, "CELL_RENDER_METHOD");
1776
- l(this, "CELL_HOVER_ICON_METHOD");
1777
- l(this, "SPAN_METHOD");
1778
- l(this, "SELECTABLE_METHOD");
1779
- l(this, "EXPAND_LAZY_METHOD");
1767
+ h(this, "HEADER_CELL_STYLE_METHOD");
1768
+ h(this, "BODY_CELL_STYLE_METHOD");
1769
+ h(this, "FOOTER_CELL_STYLE_METHOD");
1770
+ h(this, "CELL_READONLY_METHOD");
1771
+ h(this, "CELL_FORMATTER_METHOD");
1772
+ h(this, "CELL_RULES_METHOD");
1773
+ h(this, "CELL_TYPE_METHOD");
1774
+ h(this, "CELL_EDITOR_TYPE_METHOD");
1775
+ h(this, "CELL_RENDER_METHOD");
1776
+ h(this, "CELL_HOVER_ICON_METHOD");
1777
+ h(this, "SPAN_METHOD");
1778
+ h(this, "SELECTABLE_METHOD");
1779
+ h(this, "EXPAND_LAZY_METHOD");
1780
1780
  Object.assign(this, t);
1781
1781
  }
1782
1782
  init(t) {
@@ -1785,8 +1785,8 @@ class $t {
1785
1785
  }
1786
1786
  class ai {
1787
1787
  constructor(t) {
1788
- l(this, "ctx");
1789
- l(this, "list", [
1788
+ h(this, "ctx");
1789
+ h(this, "list", [
1790
1790
  {
1791
1791
  name: "loading",
1792
1792
  configName: "LOADING_ICON_SVG",
@@ -1848,7 +1848,7 @@ class ai {
1848
1848
  color: ""
1849
1849
  }
1850
1850
  ]);
1851
- l(this, "icons", /* @__PURE__ */ new Map());
1851
+ h(this, "icons", /* @__PURE__ */ new Map());
1852
1852
  this.ctx = t, this.init();
1853
1853
  }
1854
1854
  async init() {
@@ -1877,15 +1877,15 @@ class ai {
1877
1877
  }
1878
1878
  async createImageFromSVG(t, e) {
1879
1879
  const r = new DOMParser().parseFromString(t, "image/svg+xml").documentElement;
1880
- e && r.querySelectorAll("*").forEach((h) => {
1881
- h.setAttribute("fill", e);
1880
+ e && r.querySelectorAll("*").forEach((c) => {
1881
+ c.setAttribute("fill", e);
1882
1882
  });
1883
1883
  const o = new Image(), a = new Blob([new XMLSerializer().serializeToString(r)], {
1884
1884
  type: "image/svg+xml"
1885
- }), c = URL.createObjectURL(a);
1886
- return o.src = c, new Promise((h, f) => {
1885
+ }), l = URL.createObjectURL(a);
1886
+ return o.src = l, new Promise((c, f) => {
1887
1887
  o.onerror = () => f(new Error("Failed to load image")), o.onload = () => {
1888
- h(o);
1888
+ c(o);
1889
1889
  };
1890
1890
  });
1891
1891
  }
@@ -1893,15 +1893,15 @@ class ai {
1893
1893
  return this.icons.get(t);
1894
1894
  }
1895
1895
  }
1896
- class re {
1896
+ class te {
1897
1897
  constructor(t, e, i, s, r, o, a) {
1898
- l(this, "ctx");
1899
- l(this, "x", 0);
1900
- l(this, "y", 0);
1901
- l(this, "width", 0);
1902
- l(this, "height", 0);
1903
- l(this, "fixed");
1904
- l(this, "cellType");
1898
+ h(this, "ctx");
1899
+ h(this, "x", 0);
1900
+ h(this, "y", 0);
1901
+ h(this, "width", 0);
1902
+ h(this, "height", 0);
1903
+ h(this, "fixed");
1904
+ h(this, "cellType");
1905
1905
  this.ctx = t, this.x = e, this.y = i, this.width = s, this.height = r, this.fixed = o, this.cellType = a;
1906
1906
  }
1907
1907
  isHorizontalVisible() {
@@ -1939,57 +1939,57 @@ class re {
1939
1939
  getRightFixedX() {
1940
1940
  }
1941
1941
  }
1942
- class oe extends re {
1943
- constructor(e, i, s, r, o, a, c, h, f, d = "body") {
1944
- super(e, r, o, a, c, h.fixed, d);
1945
- l(this, "formatter");
1946
- l(this, "hoverIconName", "");
1947
- l(this, "operation", !1);
1948
- l(this, "align");
1949
- l(this, "verticalAlign");
1950
- l(this, "fixed");
1951
- l(this, "type");
1952
- l(this, "editorType");
1953
- l(this, "cellType");
1954
- l(this, "level");
1955
- l(this, "colspan", 1);
1956
- l(this, "rowspan", 1);
1957
- l(this, "key");
1958
- l(this, "column");
1959
- l(this, "rowIndex");
1960
- l(this, "colIndex");
1961
- l(this, "rowKey");
1962
- l(this, "row");
1963
- l(this, "value");
1964
- l(this, "render");
1965
- l(this, "renderFooter");
1966
- l(this, "style", {});
1967
- l(this, "rules", {});
1968
- l(this, "message", "");
1969
- l(this, "text", "");
1970
- l(this, "displayText", "");
1971
- l(this, "visibleWidth", 0);
1972
- l(this, "visibleHeight", 0);
1973
- l(this, "drawX", 0);
1974
- l(this, "drawY", 0);
1975
- l(this, "drawCellBgColor", "");
1976
- l(this, "drawCellSkyBgColor", "");
1977
- l(this, "drawTextColor", "");
1978
- l(this, "drawTextX", 0);
1979
- l(this, "drawTextY", 0);
1980
- l(this, "drawImageX", 0);
1981
- l(this, "drawImageY", 0);
1982
- l(this, "drawImageWidth", 0);
1983
- l(this, "drawImageHeight", 0);
1984
- l(this, "drawImageName", "");
1985
- l(this, "drawImageSource");
1986
- l(this, "ellipsis", !1);
1987
- l(this, "rowExpand", !1);
1988
- l(this, "rowHasChildren", !1);
1989
- l(this, "overflowTooltipShow", !0);
1990
- l(this, "overflowTooltipMaxWidth", 500);
1991
- l(this, "overflowTooltipPlacement", "top");
1992
- this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = h.key, this.type = h.type || "text", this.editorType = h.editorType || "text", this.cellType = d, this.align = h.align || "center", this.verticalAlign = h.verticalAlign || "middle", this.fixed = h.fixed, this.level = h.level, this.operation = h.operation || !1, this.column = h, this.rules = h.rules, this.row = f, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = h.render, this.overflowTooltipShow = h.overflowTooltipShow !== !1, this.overflowTooltipMaxWidth = h.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = h.overflowTooltipPlacement || "top", this.renderFooter = h.renderFooter, this.hoverIconName = h.hoverIconName, this.formatter = h.formatter, this.update();
1942
+ class ee extends te {
1943
+ constructor(e, i, s, r, o, a, l, c, f, d = "body") {
1944
+ super(e, r, o, a, l, c.fixed, d);
1945
+ h(this, "formatter");
1946
+ h(this, "hoverIconName", "");
1947
+ h(this, "operation", !1);
1948
+ h(this, "align");
1949
+ h(this, "verticalAlign");
1950
+ h(this, "fixed");
1951
+ h(this, "type");
1952
+ h(this, "editorType");
1953
+ h(this, "cellType");
1954
+ h(this, "level");
1955
+ h(this, "colspan", 1);
1956
+ h(this, "rowspan", 1);
1957
+ h(this, "key");
1958
+ h(this, "column");
1959
+ h(this, "rowIndex");
1960
+ h(this, "colIndex");
1961
+ h(this, "rowKey");
1962
+ h(this, "row");
1963
+ h(this, "value");
1964
+ h(this, "render");
1965
+ h(this, "renderFooter");
1966
+ h(this, "style", {});
1967
+ h(this, "rules", {});
1968
+ h(this, "message", "");
1969
+ h(this, "text", "");
1970
+ h(this, "displayText", "");
1971
+ h(this, "visibleWidth", 0);
1972
+ h(this, "visibleHeight", 0);
1973
+ h(this, "drawX", 0);
1974
+ h(this, "drawY", 0);
1975
+ h(this, "drawCellBgColor", "");
1976
+ h(this, "drawCellSkyBgColor", "");
1977
+ h(this, "drawTextColor", "");
1978
+ h(this, "drawTextX", 0);
1979
+ h(this, "drawTextY", 0);
1980
+ h(this, "drawImageX", 0);
1981
+ h(this, "drawImageY", 0);
1982
+ h(this, "drawImageWidth", 0);
1983
+ h(this, "drawImageHeight", 0);
1984
+ h(this, "drawImageName", "");
1985
+ h(this, "drawImageSource");
1986
+ h(this, "ellipsis", !1);
1987
+ h(this, "rowExpand", !1);
1988
+ h(this, "rowHasChildren", !1);
1989
+ h(this, "overflowTooltipShow", !0);
1990
+ h(this, "overflowTooltipMaxWidth", 500);
1991
+ h(this, "overflowTooltipPlacement", "top");
1992
+ this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = c.key, this.type = c.type || "text", this.editorType = c.editorType || "text", this.cellType = d, this.align = c.align || "center", this.verticalAlign = c.verticalAlign || "middle", this.fixed = c.fixed, this.level = c.level, this.operation = c.operation || !1, this.column = c, this.rules = c.rules, this.row = f, 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.update();
1993
1993
  }
1994
1994
  getValidationMessage() {
1995
1995
  const e = this.ctx.database.getValidationError(this.rowKey, this.key);
@@ -2083,13 +2083,13 @@ class oe extends re {
2083
2083
  const { CELL_PADDING: e = 0 } = this.ctx.config, { rowKey: i, cellType: s } = this;
2084
2084
  let r, o = 0, a = "";
2085
2085
  if (this.type === "tree" && s === "body") {
2086
- const c = this.ctx.database.getRowForRowKey(i), { expand: h = !1, hasChildren: f = !1, expandLoading: d = !1, level: x = 0 } = c || {};
2087
- if (this.rowExpand = h, this.rowHasChildren = f, d) {
2086
+ const l = this.ctx.database.getRowForRowKey(i), { expand: c = !1, hasChildren: f = !1, expandLoading: d = !1, level: x = 0 } = l || {};
2087
+ if (this.rowExpand = c, this.rowHasChildren = f, d) {
2088
2088
  const u = this.ctx.icons.get("loading");
2089
2089
  a = "loading", r = u, o = x * 8;
2090
2090
  } else if (f) {
2091
2091
  const u = this.ctx.icons.get("expand"), g = this.ctx.icons.get("shrink");
2092
- r = h ? g : u, a = h ? "shrink" : "expand", o = x * 8;
2092
+ r = c ? g : u, a = c ? "shrink" : "expand", o = x * 8;
2093
2093
  } else
2094
2094
  o = x * 8;
2095
2095
  if (r) {
@@ -2106,8 +2106,8 @@ class oe extends re {
2106
2106
  FOOTER_CELL_STYLE_METHOD: r,
2107
2107
  READONLY_TEXT_COLOR: o,
2108
2108
  FOOTER_BG_COLOR: a,
2109
- HIGHLIGHT_SELECTED_ROW: c,
2110
- HIGHLIGHT_SELECTED_ROW_COLOR: h,
2109
+ HIGHLIGHT_SELECTED_ROW: l,
2110
+ HIGHLIGHT_SELECTED_ROW_COLOR: c,
2111
2111
  HIGHLIGHT_HOVER_ROW: f,
2112
2112
  HIGHLIGHT_HOVER_ROW_COLOR: d
2113
2113
  } = this.ctx.config;
@@ -2128,7 +2128,7 @@ class oe extends re {
2128
2128
  }
2129
2129
  let x = "transparent";
2130
2130
  const u = this.ctx.focusCell, g = this.ctx.hoverCell;
2131
- f && (g == null ? void 0 : g.rowKey) === this.rowKey && (x = d), c && (u == null ? void 0 : u.rowKey) === this.rowKey && (x = h), this.drawCellSkyBgColor = x;
2131
+ f && (g == null ? void 0 : g.rowKey) === this.rowKey && (x = d), l && (u == null ? void 0 : u.rowKey) === this.rowKey && (x = c), this.drawCellSkyBgColor = x;
2132
2132
  let w = e, p = o;
2133
2133
  if (["index", "index-selection", "selection"].includes(this.type)) {
2134
2134
  this.drawCellBgColor = e, this.drawTextColor = o;
@@ -2147,24 +2147,24 @@ class oe extends re {
2147
2147
  this.drawCellBgColor = w, this.drawTextColor = p;
2148
2148
  }
2149
2149
  updateSelection() {
2150
- const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: r, cellType: o, type: a, rowIndex: c, rowKey: h } = this;
2150
+ const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: r, cellType: o, type: a, rowIndex: l, rowKey: c } = this;
2151
2151
  if (!(s === 0 || r === 0) && o !== "footer" && ["index-selection", "selection"].includes(a)) {
2152
- const f = this.ctx.database.getRowSelection(h), d = this.ctx.database.getRowSelectable(h), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, u = this.drawX + (e - x) / 2, g = this.drawY + (i - x) / 2;
2152
+ const f = this.ctx.database.getRowSelection(c), d = this.ctx.database.getRowSelectable(c), { CHECKBOX_SIZE: x = 0 } = this.ctx.config, u = this.drawX + (e - x) / 2, g = this.drawY + (i - x) / 2;
2153
2153
  let w = this.ctx.icons.get("checkbox-uncheck"), p = "checkbox-uncheck";
2154
- f && d ? (w = this.ctx.icons.get("checkbox-check"), p = "checkbox-check") : f && d ? (w = this.ctx.icons.get("checkbox-check-disabled"), p = "checkbox-check-disabled") : !f && d ? (w = this.ctx.icons.get("checkbox-uncheck"), p = "checkbox-uncheck") : (w = this.ctx.icons.get("checkbox-disabled"), p = "checkbox-disabled"), w && a == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === c || ["checkbox-disabled", "checkbox-check"].includes(p)) && (this.drawImageX = u, this.drawImageY = g, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = p, this.drawImageSource = w) : w && a === "selection" && (this.drawImageX = u, this.drawImageY = g, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = p, this.drawImageSource = w);
2154
+ f && d ? (w = this.ctx.icons.get("checkbox-check"), p = "checkbox-check") : f && d ? (w = this.ctx.icons.get("checkbox-check-disabled"), p = "checkbox-check-disabled") : !f && d ? (w = this.ctx.icons.get("checkbox-uncheck"), p = "checkbox-uncheck") : (w = this.ctx.icons.get("checkbox-disabled"), p = "checkbox-disabled"), w && a == "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === l || ["checkbox-disabled", "checkbox-check"].includes(p)) && (this.drawImageX = u, this.drawImageY = g, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = p, this.drawImageSource = w) : w && a === "selection" && (this.drawImageX = u, this.drawImageY = g, this.drawImageWidth = x, this.drawImageHeight = x, this.drawImageName = p, this.drawImageSource = w);
2155
2155
  }
2156
2156
  }
2157
2157
  updateHoverIcon() {
2158
2158
  const { CELL_HOVER_ICON_METHOD: e, CELL_HOVER_ICON_SIZE: i, CELL_PADDING: s } = this.ctx.config;
2159
2159
  if (typeof e == "function") {
2160
- const c = e({
2160
+ const l = e({
2161
2161
  row: this.row,
2162
2162
  rowIndex: this.rowIndex,
2163
2163
  colIndex: this.colIndex,
2164
2164
  column: this.column,
2165
2165
  value: this.getValue()
2166
2166
  });
2167
- c !== void 0 && (this.hoverIconName = c);
2167
+ l !== void 0 && (this.hoverIconName = l);
2168
2168
  }
2169
2169
  const r = this.drawX + this.width - i - s, o = this.drawY + (this.height - i) / 2;
2170
2170
  if (this.hoverIconName && this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === this.rowIndex) {
@@ -2280,8 +2280,8 @@ class oe extends re {
2280
2280
  const { SELECT_BORDER_COLOR: e, ENABLE_AUTOFILL: i, ENABLE_SELECTOR: s } = this.ctx.config;
2281
2281
  if (!s || !i)
2282
2282
  return;
2283
- const { xArr: r, yArr: o } = this.ctx.selector, a = r[1], c = o[1], { colIndex: h, rowIndex: f, drawX: d, drawY: x } = this;
2284
- h === a && f === c && this.ctx.paint.drawRect(d + this.width - 6, x + this.height - 6, 6, 6, {
2283
+ const { xArr: r, yArr: o } = this.ctx.selector, a = r[1], l = o[1], { colIndex: c, rowIndex: f, drawX: d, drawY: x } = this;
2284
+ c === a && f === l && this.ctx.paint.drawRect(d + this.width - 6, x + this.height - 6, 6, 6, {
2285
2285
  borderColor: "#fff",
2286
2286
  fillColor: e
2287
2287
  });
@@ -2336,31 +2336,31 @@ class oe extends re {
2336
2336
  }
2337
2337
  drawBorder(e) {
2338
2338
  const { drawX: i, drawY: s, width: r, rowIndex: o, colIndex: a } = this;
2339
- let c = i + 0.5, h = s + 0.5, f = this.height;
2340
- o === 0 && (h = this.y + 1, f = f - 1), a === this.ctx.maxColIndex && (c = c - 1);
2339
+ let l = i + 0.5, c = s + 0.5, f = this.height;
2340
+ o === 0 && (c = this.y + 1, f = f - 1), a === this.ctx.maxColIndex && (l = l - 1);
2341
2341
  const { xArr: d, yArr: x, lineDash: u = [], borderWidth: g = 1, borderColor: w, fillColor: p } = e, y = d[0], b = d[1], m = x[0], E = x[1];
2342
- a >= y && a <= b && o === m && this.ctx.paint.drawLine([c, h, c + r - 2, h], {
2342
+ a >= y && a <= b && o === m && this.ctx.paint.drawLine([l, c, l + r - 2, c], {
2343
2343
  borderColor: w,
2344
2344
  fillColor: p,
2345
2345
  borderWidth: g,
2346
2346
  lineCap: "round",
2347
2347
  lineJoin: "round",
2348
2348
  lineDash: u
2349
- }), a >= y && a <= b && o === E && this.ctx.paint.drawLine([c, h + f - 1.5, c + r, h + f - 1.5], {
2349
+ }), a >= y && a <= b && o === E && this.ctx.paint.drawLine([l, c + f - 1.5, l + r, c + f - 1.5], {
2350
2350
  borderColor: w,
2351
2351
  fillColor: p,
2352
2352
  borderWidth: g,
2353
2353
  lineCap: "round",
2354
2354
  lineJoin: "round",
2355
2355
  lineDash: u
2356
- }), a === y && o >= m && o <= E && this.ctx.paint.drawLine([c, h, c, h + f - 1], {
2356
+ }), a === y && o >= m && o <= E && this.ctx.paint.drawLine([l, c, l, c + f - 1], {
2357
2357
  borderColor: w,
2358
2358
  fillColor: p,
2359
2359
  borderWidth: g,
2360
2360
  lineCap: "round",
2361
2361
  lineJoin: "round",
2362
2362
  lineDash: u
2363
- }), a === b && o >= m && o <= E && this.ctx.paint.drawLine([c + r - 1.5, h, c + r - 1.5, h + f - 1.5], {
2363
+ }), a === b && o >= m && o <= E && this.ctx.paint.drawLine([l + r - 1.5, c, l + r - 1.5, c + f - 1.5], {
2364
2364
  borderColor: w,
2365
2365
  fillColor: p,
2366
2366
  borderWidth: g,
@@ -2370,43 +2370,43 @@ class oe extends re {
2370
2370
  });
2371
2371
  }
2372
2372
  }
2373
- class ne extends re {
2374
- constructor(e, i, s, r, o, a, c) {
2375
- super(e, s, r, o, a, c.fixed, "header");
2376
- l(this, "align");
2377
- l(this, "verticalAlign", "middle");
2378
- l(this, "fixed");
2379
- l(this, "widthFillDisable");
2380
- l(this, "type");
2381
- l(this, "operation", !1);
2382
- l(this, "editorType");
2383
- l(this, "level");
2384
- l(this, "text");
2385
- l(this, "displayText", "");
2386
- l(this, "colspan");
2387
- l(this, "rowspan");
2388
- l(this, "key");
2389
- l(this, "required", !1);
2390
- l(this, "readonly", !1);
2391
- l(this, "children", []);
2392
- l(this, "column");
2393
- l(this, "colIndex");
2394
- l(this, "rowKey");
2395
- l(this, "rules");
2396
- l(this, "hasChildren");
2397
- l(this, "render");
2398
- l(this, "style", {});
2399
- l(this, "drawX", 0);
2400
- l(this, "drawY", 0);
2401
- l(this, "drawCellBgColor", "");
2402
- l(this, "drawTextColor", "");
2403
- l(this, "drawImageX", 0);
2404
- l(this, "drawImageY", 0);
2405
- l(this, "drawImageWidth", 0);
2406
- l(this, "drawImageHeight", 0);
2407
- l(this, "drawImageName", "");
2408
- l(this, "drawImageSource");
2409
- this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = a, this.colIndex = i, this.key = c.key, this.type = c.type, this.editorType = c.editorType || "text", this.align = c.align || "center", this.verticalAlign = c.verticalAlign || "middle", this.fixed = c.fixed, this.level = c.level, this.operation = c.operation || !1, this.text = c.title, this.column = c, this.colspan = c.colspan, this.widthFillDisable = c.widthFillDisable, this.rowspan = c.rowspan, this.rules = c.rules, this.readonly = c.readonly, this.required = c.required, this.rowKey = te(), this.hasChildren = c.children && c.children.length > 0 || !1, this.render = c.renderHeader;
2373
+ class ie extends te {
2374
+ constructor(e, i, s, r, o, a, l) {
2375
+ super(e, s, r, o, a, l.fixed, "header");
2376
+ h(this, "align");
2377
+ h(this, "verticalAlign", "middle");
2378
+ h(this, "fixed");
2379
+ h(this, "widthFillDisable");
2380
+ h(this, "type");
2381
+ h(this, "operation", !1);
2382
+ h(this, "editorType");
2383
+ h(this, "level");
2384
+ h(this, "text");
2385
+ h(this, "displayText", "");
2386
+ h(this, "colspan");
2387
+ h(this, "rowspan");
2388
+ h(this, "key");
2389
+ h(this, "required", !1);
2390
+ h(this, "readonly", !1);
2391
+ h(this, "children", []);
2392
+ h(this, "column");
2393
+ h(this, "colIndex");
2394
+ h(this, "rowKey");
2395
+ h(this, "rules");
2396
+ h(this, "hasChildren");
2397
+ h(this, "render");
2398
+ h(this, "style", {});
2399
+ h(this, "drawX", 0);
2400
+ h(this, "drawY", 0);
2401
+ h(this, "drawCellBgColor", "");
2402
+ h(this, "drawTextColor", "");
2403
+ h(this, "drawImageX", 0);
2404
+ h(this, "drawImageY", 0);
2405
+ h(this, "drawImageWidth", 0);
2406
+ h(this, "drawImageHeight", 0);
2407
+ h(this, "drawImageName", "");
2408
+ h(this, "drawImageSource");
2409
+ this.ctx = e, this.x = s, this.y = r, this.width = o, this.height = a, this.colIndex = i, this.key = l.key, this.type = l.type, this.editorType = l.editorType || "text", this.align = l.align || "center", this.verticalAlign = l.verticalAlign || "middle", this.fixed = l.fixed, this.level = l.level, this.operation = l.operation || !1, this.text = l.title, this.column = l, this.colspan = l.colspan, this.widthFillDisable = l.widthFillDisable, this.rowspan = l.rowspan, this.rules = l.rules, this.readonly = l.readonly, this.required = l.required, this.rowKey = Ut(), this.hasChildren = l.children && l.children.length > 0 || !1, this.render = l.renderHeader;
2410
2410
  }
2411
2411
  /**
2412
2412
  * 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
@@ -2426,11 +2426,11 @@ class ne extends re {
2426
2426
  const { HEADER_CELL_STYLE_METHOD: e, HEADER_BG_COLOR: i, HEADER_TEXT_COLOR: s } = this.ctx.config;
2427
2427
  let r = i, o = s;
2428
2428
  if (typeof e == "function") {
2429
- const a = e, { backgroundColor: c, color: h } = a({
2429
+ const a = e, { backgroundColor: l, color: c } = a({
2430
2430
  colIndex: this.colIndex,
2431
2431
  column: this.column
2432
2432
  }) || {};
2433
- c && (r = c), h && (o = h);
2433
+ l && (r = l), c && (o = c);
2434
2434
  }
2435
2435
  this.drawCellBgColor = r, this.drawTextColor = o;
2436
2436
  }
@@ -2441,11 +2441,11 @@ class ne extends re {
2441
2441
  const {
2442
2442
  paint: e,
2443
2443
  config: { BORDER_COLOR: i, CELL_PADDING: s, HEADER_FONT: r }
2444
- } = this.ctx, { drawX: o, drawY: a, displayText: c } = this;
2444
+ } = this.ctx, { drawX: o, drawY: a, displayText: l } = this;
2445
2445
  e.drawRect(o, a, this.width, this.height, {
2446
2446
  borderColor: i,
2447
2447
  fillColor: this.drawCellBgColor
2448
- }), e.drawText(c, o, a, this.width, this.height, {
2448
+ }), e.drawText(l, o, a, this.width, this.height, {
2449
2449
  font: r,
2450
2450
  padding: s,
2451
2451
  color: this.drawTextColor,
@@ -2456,9 +2456,9 @@ class ne extends re {
2456
2456
  drawSelection() {
2457
2457
  const { width: e, height: i, type: s } = this;
2458
2458
  if (["index-selection", "selection"].includes(s)) {
2459
- const { indeterminate: r, check: o, selectable: a } = this.ctx.database.getCheckedState(), { CHECKBOX_SIZE: c = 0 } = this.ctx.config, h = this.drawX + (e - c) / 2, f = this.drawY + (i - c) / 2;
2459
+ const { indeterminate: r, check: o, selectable: a } = this.ctx.database.getCheckedState(), { CHECKBOX_SIZE: l = 0 } = this.ctx.config, c = this.drawX + (e - l) / 2, f = this.drawY + (i - l) / 2;
2460
2460
  let d = this.ctx.icons.get("checkbox-uncheck"), x = "checkbox-uncheck";
2461
- r ? (d = this.ctx.icons.get("checkbox-indeterminate"), x = "checkbox-indeterminate") : o && a ? (d = this.ctx.icons.get("checkbox-check"), x = "checkbox-check") : o && a ? (d = this.ctx.icons.get("checkbox-check-disabled"), x = "checkbox-check-disabled") : !o && a ? (d = this.ctx.icons.get("checkbox-uncheck"), x = "checkbox-uncheck") : (d = this.ctx.icons.get("checkbox-disabled"), x = "checkbox-disabled"), d && (this.drawImageX = h, this.drawImageY = f, this.drawImageWidth = c, this.drawImageHeight = c, this.drawImageName = x, this.drawImageSource = d, this.ctx.paint.drawImage(
2461
+ r ? (d = this.ctx.icons.get("checkbox-indeterminate"), x = "checkbox-indeterminate") : o && a ? (d = this.ctx.icons.get("checkbox-check"), x = "checkbox-check") : o && a ? (d = this.ctx.icons.get("checkbox-check-disabled"), x = "checkbox-check-disabled") : !o && a ? (d = this.ctx.icons.get("checkbox-uncheck"), x = "checkbox-uncheck") : (d = this.ctx.icons.get("checkbox-disabled"), x = "checkbox-disabled"), d && (this.drawImageX = c, this.drawImageY = f, this.drawImageWidth = l, this.drawImageHeight = l, this.drawImageName = x, this.drawImageSource = d, this.ctx.paint.drawImage(
2462
2462
  this.drawImageSource,
2463
2463
  this.drawImageX,
2464
2464
  this.drawImageY,
@@ -2485,11 +2485,11 @@ class ne extends re {
2485
2485
  };
2486
2486
  }
2487
2487
  }
2488
- class li {
2488
+ class hi {
2489
2489
  constructor(t) {
2490
- l(this, "ctx");
2491
- l(this, "visibleHoverCell");
2492
- l(this, "resizeObserver");
2490
+ h(this, "ctx");
2491
+ h(this, "visibleHoverCell");
2492
+ h(this, "resizeObserver");
2493
2493
  this.ctx = t, this.init();
2494
2494
  }
2495
2495
  init() {
@@ -2557,7 +2557,7 @@ class li {
2557
2557
  */
2558
2558
  selectionClick(t) {
2559
2559
  if (["selection", "index-selection"].includes(t.type) && this.ctx.isPointer)
2560
- if (t instanceof ne)
2560
+ if (t instanceof ie)
2561
2561
  t.drawImageName === "checkbox-uncheck" || t.drawImageName === "checkbox-indeterminate" ? this.ctx.database.toggleAllSelection() : t.drawImageName === "checkbox-check" && this.ctx.database.clearSelection();
2562
2562
  else {
2563
2563
  if (!this.ctx.database.getRowSelectable(t.rowKey))
@@ -2579,10 +2579,10 @@ class li {
2579
2579
  colIndex: t.colIndex,
2580
2580
  column: t.column,
2581
2581
  value: t.getValue()
2582
- }).then((c) => {
2583
- this.ctx.database.setExpandChildren(t.rowKey, c), this.ctx.database.expandLoading(t.rowKey, !1);
2584
- }).catch((c) => {
2585
- this.ctx.database.expandLoading(t.rowKey, !1), console.error(c);
2582
+ }).then((l) => {
2583
+ this.ctx.database.setExpandChildren(t.rowKey, l), this.ctx.database.expandLoading(t.rowKey, !1);
2584
+ }).catch((l) => {
2585
+ this.ctx.database.expandLoading(t.rowKey, !1), console.error(l);
2586
2586
  }));
2587
2587
  else {
2588
2588
  const a = this.ctx.database.getIsExpand(t.rowKey);
@@ -2597,7 +2597,7 @@ class li {
2597
2597
  */
2598
2598
  imageEnterAndLeave(t, e) {
2599
2599
  const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), r = i, o = s;
2600
- o > t.drawImageX && o < t.drawImageX + t.drawImageWidth && r > t.drawImageY && r < t.drawImageY + t.drawImageHeight ? (this.ctx.stageElement.style.cursor = "pointer", this.ctx.isPointer = !0, t instanceof oe && ["selection", "index-selection"].includes(t.type) && (this.ctx.database.getRowSelectable(t.rowKey) || (this.ctx.stageElement.style.cursor = "not-allowed"))) : (this.ctx.isPointer = !1, this.ctx.stageElement.style.cursor === "pointer" && (this.ctx.stageElement.style.cursor = "default"));
2600
+ o > t.drawImageX && o < t.drawImageX + t.drawImageWidth && r > t.drawImageY && r < t.drawImageY + t.drawImageHeight ? (this.ctx.stageElement.style.cursor = "pointer", this.ctx.isPointer = !0, t instanceof ee && ["selection", "index-selection"].includes(t.type) && (this.ctx.database.getRowSelectable(t.rowKey) || (this.ctx.stageElement.style.cursor = "not-allowed"))) : (this.ctx.isPointer = !1, this.ctx.stageElement.style.cursor === "pointer" && (this.ctx.stageElement.style.cursor = "default"));
2601
2601
  }
2602
2602
  isBusy(t) {
2603
2603
  const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = e, r = i;
@@ -2609,15 +2609,15 @@ class li {
2609
2609
  handleBodyEvent(t, e, i, s, r = !1) {
2610
2610
  for (const o of i) {
2611
2611
  const a = o.fixedCells.concat(o.noFixedCells);
2612
- for (const c of a) {
2613
- const h = c.getDrawX(), f = c.getDrawY();
2612
+ for (const l of a) {
2613
+ const c = l.getDrawX(), f = l.getDrawY();
2614
2614
  if (r) {
2615
- if (t > h && t < h + c.visibleWidth && e > f && e < f + c.visibleHeight) {
2616
- s(c);
2615
+ if (t > c && t < c + l.visibleWidth && e > f && e < f + l.visibleHeight) {
2616
+ s(l);
2617
2617
  return;
2618
2618
  }
2619
- } else if (t > h && t < h + c.width && e > f && e < f + c.height) {
2620
- s(c);
2619
+ } else if (t > c && t < c + l.width && e > f && e < f + l.height) {
2620
+ s(l);
2621
2621
  return;
2622
2622
  }
2623
2623
  }
@@ -2636,51 +2636,51 @@ class li {
2636
2636
  this.resizeObserver.unobserve(this.ctx.stageElement);
2637
2637
  }
2638
2638
  }
2639
- class ci {
2639
+ class li {
2640
2640
  constructor(t, e) {
2641
- l(this, "eventBus");
2642
- l(this, "eventBrowser");
2643
- l(this, "eventTable");
2644
- l(this, "containerElement");
2645
- l(this, "stageElement");
2646
- l(this, "canvasElement");
2647
- l(this, "overlayerElement");
2648
- l(this, "editorElement");
2649
- l(this, "stageWidth", 0);
2650
- l(this, "stageHeight", 0);
2651
- l(this, "paint");
2652
- l(this, "icons");
2653
- l(this, "isInsideTargetContainer", !1);
2654
- l(this, "mousedown", !1);
2655
- l(this, "isPointer", !1);
2656
- l(this, "rowResizing", !1);
2641
+ h(this, "eventBus");
2642
+ h(this, "eventBrowser");
2643
+ h(this, "eventTable");
2644
+ h(this, "containerElement");
2645
+ h(this, "stageElement");
2646
+ h(this, "canvasElement");
2647
+ h(this, "overlayerElement");
2648
+ h(this, "editorElement");
2649
+ h(this, "stageWidth", 0);
2650
+ h(this, "stageHeight", 0);
2651
+ h(this, "paint");
2652
+ h(this, "icons");
2653
+ h(this, "isInsideTargetContainer", !1);
2654
+ h(this, "mousedown", !1);
2655
+ h(this, "isPointer", !1);
2656
+ h(this, "rowResizing", !1);
2657
2657
  // 行调整大小中
2658
- l(this, "columnResizing", !1);
2658
+ h(this, "columnResizing", !1);
2659
2659
  // 列调整大小中
2660
- l(this, "scrollerMove", !1);
2660
+ h(this, "scrollerMove", !1);
2661
2661
  // 滚动条移动中
2662
- l(this, "scrollerFocus", !1);
2662
+ h(this, "scrollerFocus", !1);
2663
2663
  // 滚动条focus中
2664
- l(this, "autofillMove", !1);
2664
+ h(this, "autofillMove", !1);
2665
2665
  // 自动填充移动中
2666
- l(this, "selectorMove", !1);
2666
+ h(this, "selectorMove", !1);
2667
2667
  // 选择器移动中
2668
- l(this, "editing", !1);
2668
+ h(this, "editing", !1);
2669
2669
  // 编辑中
2670
- l(this, "scrollY", 0);
2671
- l(this, "scrollX", 0);
2672
- l(this, "fixedLeftWidth", 0);
2673
- l(this, "fixedRightWidth", 0);
2674
- l(this, "maxColIndex", 0);
2675
- l(this, "maxRowIndex", 0);
2676
- l(this, "hoverRow");
2677
- l(this, "clickCell");
2678
- l(this, "focusCell");
2679
- l(this, "hoverCell");
2680
- l(this, "clickCellHeader");
2681
- l(this, "focusCellHeader");
2682
- l(this, "hoverCellHeader");
2683
- l(this, "body", {
2670
+ h(this, "scrollY", 0);
2671
+ h(this, "scrollX", 0);
2672
+ h(this, "fixedLeftWidth", 0);
2673
+ h(this, "fixedRightWidth", 0);
2674
+ h(this, "maxColIndex", 0);
2675
+ h(this, "maxRowIndex", 0);
2676
+ h(this, "hoverRow");
2677
+ h(this, "clickCell");
2678
+ h(this, "focusCell");
2679
+ h(this, "hoverCell");
2680
+ h(this, "clickCellHeader");
2681
+ h(this, "focusCellHeader");
2682
+ h(this, "hoverCellHeader");
2683
+ h(this, "body", {
2684
2684
  x: 0,
2685
2685
  y: 0,
2686
2686
  width: 0,
@@ -2693,7 +2693,7 @@ class ci {
2693
2693
  renderRows: [],
2694
2694
  data: []
2695
2695
  });
2696
- l(this, "footer", {
2696
+ h(this, "footer", {
2697
2697
  x: 0,
2698
2698
  y: 0,
2699
2699
  width: 0,
@@ -2702,7 +2702,7 @@ class ci {
2702
2702
  visibleWidth: 0,
2703
2703
  renderRows: []
2704
2704
  });
2705
- l(this, "header", {
2705
+ h(this, "header", {
2706
2706
  x: 0,
2707
2707
  y: 0,
2708
2708
  width: 0,
@@ -2717,26 +2717,26 @@ class ci {
2717
2717
  fixedRightCellHeaders: [],
2718
2718
  renderCenterCellHeaders: []
2719
2719
  });
2720
- l(this, "selector", {
2720
+ h(this, "selector", {
2721
2721
  enable: !1,
2722
2722
  xArr: [-1, -1],
2723
2723
  yArr: [-1, -1],
2724
2724
  xArrCopy: [-1, -1],
2725
2725
  yArrCopy: [-1, -1]
2726
2726
  });
2727
- l(this, "autofill", {
2727
+ h(this, "autofill", {
2728
2728
  enable: !1,
2729
2729
  xArr: [-1, -1],
2730
2730
  yArr: [-1, -1]
2731
2731
  });
2732
- l(this, "database");
2733
- l(this, "history");
2734
- l(this, "config");
2732
+ h(this, "database");
2733
+ h(this, "history");
2734
+ h(this, "config");
2735
2735
  const { containerElement: i, stageElement: s, canvasElement: r, overlayerElement: o, editorElement: a } = t;
2736
- this.containerElement = i, this.stageElement = s, this.canvasElement = r, this.overlayerElement = o, this.editorElement = a, this.config = new $t(e.config || {}), this.eventBus = new oi(), this.eventBrowser = new ri(this), this.eventTable = new li(this), this.paint = new ni(this.canvasElement), this.database = new ii(this, e), this.history = new si(this), this.icons = new ai(this);
2736
+ this.containerElement = i, this.stageElement = s, this.canvasElement = r, this.overlayerElement = o, this.editorElement = a, this.config = new Wt(e.config || {}), this.eventBus = new oi(), this.eventBrowser = new ri(this), this.eventTable = new hi(this), this.paint = new ni(this.canvasElement), this.database = new ii(this, e), this.history = new si(this), this.icons = new ai(this);
2737
2737
  }
2738
2738
  setConfig(t) {
2739
- this.config = new $t(t);
2739
+ this.config = new Wt(t);
2740
2740
  }
2741
2741
  setFocusCell(t) {
2742
2742
  var e;
@@ -2768,7 +2768,7 @@ class ci {
2768
2768
  for (let r = 0; r <= e[1] - e[0]; r++) {
2769
2769
  const o = [];
2770
2770
  for (let a = 0; a <= i[1] - i[0]; a++) {
2771
- const c = r + e[0], h = a + i[0], f = this.database.getItemValueForRowIndexAndColIndex(c, h);
2771
+ const l = r + e[0], c = a + i[0], f = this.database.getItemValueForRowIndexAndColIndex(l, c);
2772
2772
  f && o.push(f.value);
2773
2773
  }
2774
2774
  s += `${o.join(" ")}\r`, t.push(o);
@@ -2827,31 +2827,31 @@ class ci {
2827
2827
  this.eventTable.destroy(), this.eventBrowser.destroy(), this.eventBus.destroy();
2828
2828
  }
2829
2829
  }
2830
- class qt {
2830
+ class Pt {
2831
2831
  constructor(t, e) {
2832
- l(this, "ctx");
2833
- l(this, "type");
2834
- l(this, "isFocus", !1);
2835
- l(this, "trackX", 0);
2836
- l(this, "trackY", 0);
2837
- l(this, "trackWidth", 0);
2838
- l(this, "trackHeight", 0);
2839
- l(this, "splitPoints", []);
2832
+ h(this, "ctx");
2833
+ h(this, "type");
2834
+ h(this, "isFocus", !1);
2835
+ h(this, "trackX", 0);
2836
+ h(this, "trackY", 0);
2837
+ h(this, "trackWidth", 0);
2838
+ h(this, "trackHeight", 0);
2839
+ h(this, "splitPoints", []);
2840
2840
  //分割线
2841
- l(this, "barX", 0);
2842
- l(this, "barY", 0);
2843
- l(this, "barWidth", 0);
2844
- l(this, "barHeight", 0);
2845
- l(this, "distance", 0);
2841
+ h(this, "barX", 0);
2842
+ h(this, "barY", 0);
2843
+ h(this, "barWidth", 0);
2844
+ h(this, "barHeight", 0);
2845
+ h(this, "distance", 0);
2846
2846
  // 滚动条的长度
2847
- l(this, "visibleDistance", 0);
2847
+ h(this, "visibleDistance", 0);
2848
2848
  //可见区域的长度
2849
- l(this, "clientX", 0);
2850
- l(this, "clientY", 0);
2851
- l(this, "dragStart", 0);
2849
+ h(this, "clientX", 0);
2850
+ h(this, "clientY", 0);
2851
+ h(this, "dragStart", 0);
2852
2852
  // 拖拽开始的位置
2853
- l(this, "isDragging", !1);
2854
- l(this, "scroll", 0);
2853
+ h(this, "isDragging", !1);
2854
+ h(this, "scroll", 0);
2855
2855
  this.ctx = t, this.type = e, this.type === "vertical" ? this.scroll = this.ctx.scrollY : this.scroll = this.ctx.scrollX;
2856
2856
  }
2857
2857
  onWheel(t) {
@@ -2904,19 +2904,19 @@ class qt {
2904
2904
  stageHeight: i,
2905
2905
  stageWidth: s,
2906
2906
  config: { SCROLLER_TRACK_SIZE: r = 0, SCROLLER_SIZE: o = 0 }
2907
- } = this.ctx, a = s, c = i, h = e.height, f = e.width, d = t.height, x = this.ctx.footer.height;
2907
+ } = this.ctx, a = s, l = i, c = e.height, f = e.width, d = t.height, x = this.ctx.footer.height;
2908
2908
  if (this.type === "vertical") {
2909
- this.visibleDistance = c - r - h, this.distance = d - this.visibleDistance + x, this.trackX = a - r, this.trackY = 0, this.splitPoints = [this.trackX, h, this.trackX + r, h], this.trackWidth = r, this.trackHeight = c, this.barX = this.trackX - 0.5 + (r - o) / 2, this.barWidth = o;
2909
+ this.visibleDistance = l - r - c, this.distance = d - this.visibleDistance + x, this.trackX = a - r, this.trackY = 0, this.splitPoints = [this.trackX, c, this.trackX + r, c], this.trackWidth = r, this.trackHeight = l, this.barX = this.trackX - 0.5 + (r - o) / 2, this.barWidth = o;
2910
2910
  const u = this.distance ? this.visibleDistance / d : 0;
2911
2911
  let g = Math.floor(u * this.visibleDistance);
2912
- g < 30 ? g = 30 : g > this.visibleDistance && (g = 0), this.barHeight = g, this.barY = h + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
2912
+ g < 30 ? g = 30 : g > this.visibleDistance && (g = 0), this.barHeight = g, this.barY = c + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
2913
2913
  } else {
2914
2914
  this.visibleDistance = a - r, this.distance = f - this.visibleDistance, this.splitPoints = [
2915
2915
  a - r,
2916
- c - r,
2916
+ l - r,
2917
2917
  a - r,
2918
- c
2919
- ], this.trackX = 0, this.trackY = c - r, this.trackWidth = a, this.trackHeight = r;
2918
+ l
2919
+ ], this.trackX = 0, this.trackY = l - r, this.trackWidth = a, this.trackHeight = r;
2920
2920
  const u = this.distance ? this.visibleDistance / f : 0;
2921
2921
  let g = Math.floor(u * this.visibleDistance);
2922
2922
  this.barY = this.trackY - 0.5 + (r - o) / 2, g < 30 ? g = 30 : g >= this.visibleDistance && (g = 0), this.barWidth = g, this.barHeight = o, this.barX = this.scroll / this.distance * (this.visibleDistance - this.barWidth), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
@@ -2938,12 +2938,12 @@ class qt {
2938
2938
  }), this.ctx.scrollerFocus = this.isFocus;
2939
2939
  }
2940
2940
  }
2941
- class hi {
2941
+ class ci {
2942
2942
  constructor(t) {
2943
- l(this, "ctx");
2944
- l(this, "verticalScrollbar");
2945
- l(this, "horizontalScrollbar");
2946
- this.ctx = t, this.verticalScrollbar = new qt(t, "vertical"), this.horizontalScrollbar = new qt(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("setScroll", (e, i) => {
2943
+ h(this, "ctx");
2944
+ h(this, "verticalScrollbar");
2945
+ h(this, "horizontalScrollbar");
2946
+ this.ctx = t, this.verticalScrollbar = new Pt(t, "vertical"), this.horizontalScrollbar = new Pt(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("setScroll", (e, i) => {
2947
2947
  this.setScroll(e, i);
2948
2948
  }), this.ctx.on("setScrollX", (e) => {
2949
2949
  this.setScrollX(e);
@@ -2996,44 +2996,44 @@ class hi {
2996
2996
  }
2997
2997
  class di {
2998
2998
  constructor(t) {
2999
- l(this, "ctx");
2999
+ h(this, "ctx");
3000
3000
  // 上下文
3001
- l(this, "x", 0);
3001
+ h(this, "x", 0);
3002
3002
  // x坐标
3003
- l(this, "y", 0);
3003
+ h(this, "y", 0);
3004
3004
  // y坐标
3005
- l(this, "width", 0);
3005
+ h(this, "width", 0);
3006
3006
  // 宽度
3007
- l(this, "height", 0);
3007
+ h(this, "height", 0);
3008
3008
  // 高度
3009
- l(this, "resizeTarget", null);
3009
+ h(this, "resizeTarget", null);
3010
3010
  //调整表头
3011
- l(this, "resizeNum", 0);
3011
+ h(this, "resizeNum", 0);
3012
3012
  // 调整列的数量
3013
- l(this, "isResizing", !1);
3013
+ h(this, "isResizing", !1);
3014
3014
  // 是否移动中
3015
- l(this, "clientX", 0);
3015
+ h(this, "clientX", 0);
3016
3016
  // 鼠标按下时的x轴位置
3017
- l(this, "resizeDiff", 0);
3017
+ h(this, "resizeDiff", 0);
3018
3018
  // 是否移动中
3019
- l(this, "columnIndex", 0);
3020
- l(this, "isMouseDown", !1);
3019
+ h(this, "columnIndex", 0);
3020
+ h(this, "isMouseDown", !1);
3021
3021
  // 是否按下
3022
- l(this, "columns");
3023
- l(this, "visibleLeafColumns", []);
3024
- l(this, "visibleHeight", 0);
3025
- l(this, "visibleWidth", 0);
3026
- l(this, "allCellHeaders", []);
3027
- l(this, "leafCellHeaders", []);
3028
- l(this, "renderLeafCellHeaders", []);
3029
- l(this, "fixedLeftCellHeaders", []);
3030
- l(this, "centerCellHeaders", []);
3031
- l(this, "fixedRightCellHeaders", []);
3032
- l(this, "renderCenterCellHeaders", []);
3033
- l(this, "renderFixedCellHeaders", []);
3022
+ h(this, "columns");
3023
+ h(this, "visibleLeafColumns", []);
3024
+ h(this, "visibleHeight", 0);
3025
+ h(this, "visibleWidth", 0);
3026
+ h(this, "allCellHeaders", []);
3027
+ h(this, "leafCellHeaders", []);
3028
+ h(this, "renderLeafCellHeaders", []);
3029
+ h(this, "fixedLeftCellHeaders", []);
3030
+ h(this, "centerCellHeaders", []);
3031
+ h(this, "fixedRightCellHeaders", []);
3032
+ h(this, "renderCenterCellHeaders", []);
3033
+ h(this, "renderFixedCellHeaders", []);
3034
3034
  this.ctx = t, this.ctx.on(
3035
3035
  "resetHeader",
3036
- ee(() => {
3036
+ Zt(() => {
3037
3037
  this.init(), this.ctx.emit("draw");
3038
3038
  }, 100)
3039
3039
  ), this.init(), this.initResizeColumn();
@@ -3043,19 +3043,19 @@ class di {
3043
3043
  config: { HEADER_HEIGHT: t, SCROLLER_TRACK_SIZE: e }
3044
3044
  } = this.ctx, i = this.ctx.database.getColumns();
3045
3045
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
3046
- const s = ie(i), r = _t(i);
3046
+ const s = Jt(i), r = _t(i);
3047
3047
  this.height = t * s, this.width = r.reduce((d, x) => d + ((x == null ? void 0 : x.width) || 100), 0), this.visibleHeight = this.height;
3048
- const o = Je(se(i, s));
3048
+ const o = Je(Qt(i, s));
3049
3049
  this.columnIndex = 0, this.resizeNum = 0, this.render(o, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
3050
3050
  const a = this.ctx.containerElement.getBoundingClientRect();
3051
3051
  this.resizeNum > 0 ? this.ctx.stageWidth = Math.floor(a.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;
3052
- const c = this.visibleWidth - this.width;
3053
- if (this.resizeNum && c > 0) {
3054
- const d = Math.floor(c / this.resizeNum * 100) / 100;
3052
+ const l = this.visibleWidth - this.width;
3053
+ if (this.resizeNum && l > 0) {
3054
+ const d = Math.floor(l / this.resizeNum * 100) / 100;
3055
3055
  this.resizeAllColumn(d);
3056
3056
  }
3057
- const h = this.fixedLeftCellHeaders.filter((d) => !d.hasChildren);
3058
- this.ctx.fixedLeftWidth = h.reduce((d, x) => d + x.width, 0);
3057
+ const c = this.fixedLeftCellHeaders.filter((d) => !d.hasChildren);
3058
+ this.ctx.fixedLeftWidth = c.reduce((d, x) => d + x.width, 0);
3059
3059
  const f = this.fixedRightCellHeaders.filter((d) => !d.hasChildren);
3060
3060
  this.ctx.fixedRightWidth = f.reduce((d, x) => d + x.width, e), this.ctx.maxColIndex = this.leafCellHeaders.length - 1, this.ctx.header.x = this.x, this.ctx.header.y = this.y, this.ctx.header.width = this.width, this.ctx.header.height = this.height, this.ctx.header.visibleWidth = this.visibleWidth, this.ctx.header.visibleHeight = this.visibleHeight;
3061
3061
  }
@@ -3084,9 +3084,9 @@ class di {
3084
3084
  this.ctx.stageElement.style.cursor === "col-resize" && (this.ctx.stageElement.style.cursor = "default");
3085
3085
  const r = [...this.renderFixedCellHeaders, ...this.renderCenterCellHeaders];
3086
3086
  for (const o of r) {
3087
- const { offsetX: a, offsetY: c } = this.ctx.getOffset(e), h = a, f = o.getDrawX();
3088
- h > f + o.width - 5 && h < f + o.width + 4 && h < i - 4 && // 视窗中最后一列不允许调整宽
3089
- o.colspan <= 1 && this.ctx.isTarget() && c <= this.height && (this.ctx.stageElement.style.cursor = "col-resize", this.resizeTarget = o);
3087
+ const { offsetX: a, offsetY: l } = this.ctx.getOffset(e), c = a, f = o.getDrawX();
3088
+ c > f + o.width - 5 && c < f + o.width + 4 && c < i - 4 && // 视窗中最后一列不允许调整宽
3089
+ o.colspan <= 1 && this.ctx.isTarget() && l <= this.height && (this.ctx.stageElement.style.cursor = "col-resize", this.resizeTarget = o);
3090
3090
  }
3091
3091
  }
3092
3092
  }));
@@ -3140,10 +3140,10 @@ class di {
3140
3140
  let s = e;
3141
3141
  const { HEADER_HEIGHT: r = 0 } = this.ctx.config;
3142
3142
  for (let o = 0; o < i; o++) {
3143
- const a = t[o], c = r * (a.rowspan || 1), h = r * a.level;
3143
+ const a = t[o], l = r * (a.rowspan || 1), c = r * a.level;
3144
3144
  let f = a.width || 100;
3145
3145
  a.children && (f = _t(a.children).reduce((u, g) => u + ((g == null ? void 0 : g.width) || 100), 0));
3146
- const d = new ne(this.ctx, this.columnIndex, s, h, f, c, a);
3146
+ const d = new ie(this.ctx, this.columnIndex, s, c, f, l, a);
3147
3147
  this.ctx.database.setHeader(a.key, d), this.allCellHeaders.push(d), a.children || (this.leafCellHeaders.push(d), d.column.widthFillDisable || this.resizeNum++), a.fixed === "left" ? this.fixedLeftCellHeaders.push(d) : a.fixed === "right" ? this.fixedRightCellHeaders.push(d) : this.centerCellHeaders.push(d), !a.children && this.columnIndex++, a.children && this.render(a.children, s), s += f;
3148
3148
  }
3149
3149
  }
@@ -3175,8 +3175,8 @@ class di {
3175
3175
  colorStart: "rgba(0,0,0,0.1)",
3176
3176
  colorEnd: "rgba(0,0,0,0)"
3177
3177
  }), i < Math.floor(s.width - r - 1) && e !== a) {
3178
- const c = s.width - (this.x + this.width) + r - e;
3179
- this.ctx.paint.drawShadow(c + 1, this.y, e, this.height, {
3178
+ const l = s.width - (this.x + this.width) + r - e;
3179
+ this.ctx.paint.drawShadow(l + 1, this.y, e, this.height, {
3180
3180
  fillColor: o,
3181
3181
  side: "left",
3182
3182
  shadowWidth: 4,
@@ -3203,26 +3203,26 @@ class di {
3203
3203
  }), this.drawTipLine();
3204
3204
  }
3205
3205
  }
3206
- class ae {
3207
- constructor(t, e, i = 0, s = 0, r = 0, o = 0, a, c = "body") {
3208
- l(this, "ctx");
3209
- l(this, "x", 0);
3210
- l(this, "y", 0);
3211
- l(this, "width", 0);
3212
- l(this, "height");
3213
- l(this, "cells", []);
3214
- l(this, "fixedCells", []);
3215
- l(this, "noFixedCells", []);
3216
- l(this, "rowIndex", 0);
3217
- l(this, "rowKey", "");
3218
- l(this, "rowType", "body");
3219
- l(this, "data");
3220
- 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 = c, this.data = a, this.update();
3206
+ class se {
3207
+ constructor(t, e, i = 0, s = 0, r = 0, o = 0, a, l = "body") {
3208
+ h(this, "ctx");
3209
+ h(this, "x", 0);
3210
+ h(this, "y", 0);
3211
+ h(this, "width", 0);
3212
+ h(this, "height");
3213
+ h(this, "cells", []);
3214
+ h(this, "fixedCells", []);
3215
+ h(this, "noFixedCells", []);
3216
+ h(this, "rowIndex", 0);
3217
+ h(this, "rowKey", "");
3218
+ h(this, "rowType", "body");
3219
+ h(this, "data");
3220
+ 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 = l, this.data = a, this.update();
3221
3221
  }
3222
3222
  update() {
3223
3223
  const { header: t } = this.ctx, e = [], i = [], s = [];
3224
3224
  t.renderLeafCellHeaders.forEach((r) => {
3225
- const o = new oe(
3225
+ const o = new ee(
3226
3226
  this.ctx,
3227
3227
  this.rowIndex,
3228
3228
  r.colIndex,
@@ -3257,28 +3257,28 @@ class ae {
3257
3257
  }
3258
3258
  class fi {
3259
3259
  constructor(t) {
3260
- l(this, "resizeTarget", null);
3260
+ h(this, "resizeTarget", null);
3261
3261
  //调整行大小的目标
3262
- l(this, "isMouseDown", !1);
3262
+ h(this, "isMouseDown", !1);
3263
3263
  // 是否按下
3264
- l(this, "resizeDiff", 0);
3264
+ h(this, "resizeDiff", 0);
3265
3265
  // 是否移动中
3266
- l(this, "clientY", 0);
3266
+ h(this, "clientY", 0);
3267
3267
  // 鼠标按下时的y轴位置
3268
- l(this, "ctx");
3269
- l(this, "x", 0);
3270
- l(this, "y", 0);
3271
- l(this, "width", 0);
3272
- l(this, "height", 0);
3273
- l(this, "headIndex", 0);
3274
- l(this, "tailIndex", 0);
3275
- l(this, "isResizing", !1);
3268
+ h(this, "ctx");
3269
+ h(this, "x", 0);
3270
+ h(this, "y", 0);
3271
+ h(this, "width", 0);
3272
+ h(this, "height", 0);
3273
+ h(this, "headIndex", 0);
3274
+ h(this, "tailIndex", 0);
3275
+ h(this, "isResizing", !1);
3276
3276
  //是否正在调整大小
3277
- l(this, "renderRows", []);
3278
- l(this, "visibleRows", []);
3279
- l(this, "visibleHeight", 0);
3280
- l(this, "visibleWidth", 0);
3281
- l(this, "data", []);
3277
+ h(this, "renderRows", []);
3278
+ h(this, "visibleRows", []);
3279
+ h(this, "visibleHeight", 0);
3280
+ h(this, "visibleWidth", 0);
3281
+ h(this, "data", []);
3282
3282
  this.ctx = t, this.init(), this.initResizeRow();
3283
3283
  }
3284
3284
  init() {
@@ -3291,8 +3291,8 @@ class fi {
3291
3291
  SCROLLER_TRACK_SIZE: r = 0,
3292
3292
  HEIGHT: o,
3293
3293
  EMPTY_BODY_HEIGHT: a = 0,
3294
- MAX_HEIGHT: c = 0,
3295
- ENABLE_OFFSET_HEIGHT: h = 0,
3294
+ MAX_HEIGHT: l = 0,
3295
+ ENABLE_OFFSET_HEIGHT: c = 0,
3296
3296
  OFFSET_HEIGHT: f = 0
3297
3297
  }
3298
3298
  } = this.ctx;
@@ -3318,9 +3318,9 @@ class fi {
3318
3318
  let p = this.height + e.height + r;
3319
3319
  p += g;
3320
3320
  let y = 0;
3321
- this.data.length && h ? (y = window.innerHeight - u - f, y < 0 && (y = 32, console.error(
3321
+ this.data.length && c ? (y = window.innerHeight - u - f, y < 0 && (y = 32, console.error(
3322
3322
  "There is an error in the height calculation ENABLE_OFFSET_HEIGHT and OFFSET_HEIGHT are invalid"
3323
- ))) : this.data.length && o ? y = o : this.data.length && c && p > c ? y = c : y = p, y > 0 && (this.ctx.stageHeight = Math.floor(y), this.ctx.stageElement.style.height = `${this.ctx.stageHeight - 0.5}px`);
3323
+ ))) : this.data.length && o ? y = o : this.data.length && l && p > l ? y = l : y = p, y > 0 && (this.ctx.stageHeight = Math.floor(y), this.ctx.stageElement.style.height = `${this.ctx.stageHeight - 0.5}px`);
3324
3324
  let b = this.ctx.stageHeight - e.height - r;
3325
3325
  s ? this.visibleHeight = b - g : this.visibleHeight = b, 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 = d;
3326
3326
  const m = window.devicePixelRatio || 1, E = this.ctx.stageWidth * m, C = this.ctx.stageHeight * m;
@@ -3343,8 +3343,8 @@ class fi {
3343
3343
  }), this.ctx.on("mousemove", (e) => {
3344
3344
  if (this.ctx.editing) return;
3345
3345
  const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), r = i, o = s, a = e.clientY, {
3346
- stageHeight: c,
3347
- scrollY: h,
3346
+ stageHeight: l,
3347
+ scrollY: c,
3348
3348
  config: { RESIZE_ROW_MIN_HEIGHT: f = 0 }
3349
3349
  } = this.ctx;
3350
3350
  if (this.isResizing && this.resizeTarget) {
@@ -3357,7 +3357,7 @@ class fi {
3357
3357
  this.ctx.stageElement.style.cursor === "row-resize" && (this.ctx.stageElement.style.cursor = "default");
3358
3358
  for (let d = 0; d < this.renderRows.length; d++) {
3359
3359
  const x = this.renderRows[d];
3360
- if (r > x.y - h + x.height - 1.5 && r < x.y - h + x.height + 1.5 && r < c - 4)
3360
+ if (r > x.y - c + x.height - 1.5 && r < x.y - c + x.height + 1.5 && r < l - 4)
3361
3361
  for (let g = 0; g < x.cells.length; g++) {
3362
3362
  const w = x.cells[g];
3363
3363
  o > w.drawX + 10 && o < w.drawX + w.width - 10 && w.rowspan === 1 && (this.ctx.stageElement.style.cursor = "row-resize", this.resizeTarget = x);
@@ -3406,8 +3406,8 @@ class fi {
3406
3406
  colorStart: "rgba(0,0,0,0.1)",
3407
3407
  colorEnd: "rgba(0,0,0,0)"
3408
3408
  }), i < Math.floor(s.width - r - 1) && e !== a) {
3409
- const c = s.width - (this.x + this.width) + r - e;
3410
- this.ctx.paint.drawShadow(c + 1, this.y, e, this.height, {
3409
+ const l = s.width - (this.x + this.width) + r - e;
3410
+ this.ctx.paint.drawShadow(l + 1, this.y, e, this.height, {
3411
3411
  fillColor: o,
3412
3412
  side: "left",
3413
3413
  shadowWidth: 4,
@@ -3431,14 +3431,14 @@ class fi {
3431
3431
  const { header: t, database: e, scrollY: i } = this.ctx, s = i, { data: r, positions: o } = e.getData();
3432
3432
  this.ctx.maxRowIndex = r.length - 1;
3433
3433
  const a = this.binarySearch(o, s);
3434
- let c = this.binarySearch(o, s + this.visibleHeight);
3435
- c === -1 && (c = r.length), this.headIndex = Math.max(0, a), this.tailIndex = Math.min(this.ctx.maxRowIndex, c + 1), this.visibleRows = r.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
3436
- const h = [];
3434
+ let l = this.binarySearch(o, s + this.visibleHeight);
3435
+ l === -1 && (l = r.length), this.headIndex = Math.max(0, a), this.tailIndex = Math.min(this.ctx.maxRowIndex, l + 1), this.visibleRows = r.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
3436
+ const c = [];
3437
3437
  for (let f = 0; f < this.visibleRows.length; f++) {
3438
- const d = this.headIndex + f, x = this.visibleRows[f], { height: u, top: g } = this.ctx.database.getPositionForRowIndex(d), w = new ae(this.ctx, d, 0, g + this.y, t.width, u, x);
3439
- h.push(w);
3438
+ const d = this.headIndex + f, x = this.visibleRows[f], { height: u, top: g } = this.ctx.database.getPositionForRowIndex(d), w = new se(this.ctx, d, 0, g + this.y, t.width, u, x);
3439
+ c.push(w);
3440
3440
  }
3441
- this.renderRows = h, this.ctx.body.renderRows = h;
3441
+ this.renderRows = c, this.ctx.body.renderRows = c;
3442
3442
  }
3443
3443
  draw() {
3444
3444
  this.renderRows.forEach((t) => {
@@ -3450,15 +3450,15 @@ class fi {
3450
3450
  }
3451
3451
  class xi {
3452
3452
  constructor(t) {
3453
- l(this, "ctx");
3454
- l(this, "renderRows", []);
3455
- l(this, "data", []);
3456
- l(this, "x", 0);
3457
- l(this, "y", 0);
3458
- l(this, "width", 0);
3459
- l(this, "height", 0);
3460
- l(this, "visibleWidth", 0);
3461
- l(this, "visibleHeight", 0);
3453
+ h(this, "ctx");
3454
+ h(this, "renderRows", []);
3455
+ h(this, "data", []);
3456
+ h(this, "x", 0);
3457
+ h(this, "y", 0);
3458
+ h(this, "width", 0);
3459
+ h(this, "height", 0);
3460
+ h(this, "visibleWidth", 0);
3461
+ h(this, "visibleHeight", 0);
3462
3462
  this.ctx = t, this.init();
3463
3463
  }
3464
3464
  init() {
@@ -3479,16 +3479,16 @@ class xi {
3479
3479
  stageWidth: r,
3480
3480
  config: { HEADER_BG_COLOR: o, SCROLLER_TRACK_SIZE: a }
3481
3481
  } = this.ctx;
3482
- let c = this.y;
3483
- if (this.ctx.config.FOOTER_FIXED || (c = this.y - this.ctx.scrollY), i > 0 && t !== 0 && this.ctx.paint.drawShadow(this.x, c, t, this.height, {
3482
+ let l = this.y;
3483
+ if (this.ctx.config.FOOTER_FIXED || (l = this.y - this.ctx.scrollY), i > 0 && t !== 0 && this.ctx.paint.drawShadow(this.x, l, t, this.height, {
3484
3484
  fillColor: o,
3485
3485
  side: "right",
3486
3486
  shadowWidth: 4,
3487
3487
  colorStart: "rgba(0,0,0,0.1)",
3488
3488
  colorEnd: "rgba(0,0,0,0)"
3489
3489
  }), i < Math.floor(s.width - r - 1) && e !== a) {
3490
- const h = s.width - (this.x + this.width) + r - e;
3491
- this.ctx.paint.drawShadow(h + 1, c, e, this.height, {
3490
+ const c = s.width - (this.x + this.width) + r - e;
3491
+ this.ctx.paint.drawShadow(c + 1, l, e, this.height, {
3492
3492
  fillColor: o,
3493
3493
  side: "left",
3494
3494
  shadowWidth: 4,
@@ -3503,7 +3503,7 @@ class xi {
3503
3503
  let e = this.y;
3504
3504
  const i = [];
3505
3505
  this.data.forEach((s, r) => {
3506
- const o = new ae(
3506
+ const o = new se(
3507
3507
  this.ctx,
3508
3508
  r,
3509
3509
  0,
@@ -3525,23 +3525,22 @@ class xi {
3525
3525
  }
3526
3526
  }
3527
3527
  class ui {
3528
+ // 垂直滚动定时器
3528
3529
  constructor(t) {
3529
- l(this, "isCut", !1);
3530
- l(this, "isMultipleRow", !1);
3531
- l(this, "ctx");
3532
- l(this, "adjustPositionX", "");
3533
- l(this, "adjustPositionY", "");
3534
- l(this, "timerX", 0);
3530
+ h(this, "isCut", !1);
3531
+ h(this, "isMultipleRow", !1);
3532
+ h(this, "ctx");
3533
+ h(this, "adjustPositionX", "");
3534
+ h(this, "adjustPositionY", "");
3535
+ h(this, "timerX", 0);
3535
3536
  // 水平滚动定时器
3536
- l(this, "timerY", 0);
3537
- // 垂直滚动定时器
3538
- l(this, "adjustTimer", 0);
3537
+ h(this, "timerY", 0);
3539
3538
  this.ctx = t, this.init();
3540
3539
  }
3541
3540
  init() {
3542
3541
  this.ctx.on(
3543
3542
  "mousemove",
3544
- ee((t) => {
3543
+ Zt((t) => {
3545
3544
  const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = this.ctx.isTarget() && i > 0 && i < this.ctx.body.visibleWidth && e > this.ctx.header.visibleHeight && e < this.ctx.header.visibleHeight + this.ctx.body.visibleHeight;
3546
3545
  (this.ctx.selectorMove || this.ctx.autofillMove) && (s ? this.stopAdjustPosition() : this.startAdjustPosition(t));
3547
3546
  }, 100)
@@ -3630,12 +3629,12 @@ class ui {
3630
3629
  this.ctx.mousedown && (this.ctx.selectorMove = !0), this.ctx.selector.enable = !0;
3631
3630
  const {
3632
3631
  SELECTOR_AREA_MIN_X: a,
3633
- SELECTOR_AREA_MAX_X: c,
3634
- SELECTOR_AREA_MIN_Y: h,
3632
+ SELECTOR_AREA_MAX_X: l,
3633
+ SELECTOR_AREA_MIN_Y: c,
3635
3634
  SELECTOR_AREA_MAX_Y: f,
3636
3635
  SELECTOR_AREA_MAX_X_OFFSET: d,
3637
3636
  SELECTOR_AREA_MAX_Y_OFFSET: x
3638
- } = this.ctx.config, u = a, g = c || this.ctx.maxColIndex - d, w = h, p = f || this.ctx.maxRowIndex - x;
3637
+ } = this.ctx.config, u = a, g = l || this.ctx.maxColIndex - d, w = c, p = f || this.ctx.maxRowIndex - x;
3639
3638
  let [y, b] = r, [m, E] = o;
3640
3639
  if (y < u || b > g || m < w || E > p)
3641
3640
  return;
@@ -3653,15 +3652,15 @@ class ui {
3653
3652
  if (this.ctx.mousedown && this.ctx.focusCellHeader) {
3654
3653
  const { colIndex: a } = this.ctx.focusCellHeader;
3655
3654
  if (this.ctx.clearSelector(), t.colIndex >= a) {
3656
- const c = [a, t.colIndex + t.colspan - 1], h = [r, o];
3657
- this.setSelector(c, h);
3655
+ const l = [a, t.colIndex + t.colspan - 1], c = [r, o];
3656
+ this.setSelector(l, c);
3658
3657
  } else {
3659
- const c = [t.colIndex, a], h = [r, o];
3660
- this.setSelector(c, h);
3658
+ const l = [t.colIndex, a], c = [r, o];
3659
+ this.setSelector(l, c);
3661
3660
  }
3662
3661
  } else {
3663
- const a = [t.colIndex, t.colIndex + t.colspan - 1], c = [r, o];
3664
- this.setSelector(a, c);
3662
+ const a = [t.colIndex, t.colIndex + t.colspan - 1], l = [r, o];
3663
+ this.setSelector(a, l);
3665
3664
  }
3666
3665
  }
3667
3666
  selectAll() {
@@ -3675,8 +3674,8 @@ class ui {
3675
3674
  SELECTOR_AREA_MIN_Y: r,
3676
3675
  SELECTOR_AREA_MAX_Y: o,
3677
3676
  SELECTOR_AREA_MAX_X_OFFSET: a,
3678
- SELECTOR_AREA_MAX_Y_OFFSET: c
3679
- } = this.ctx.config, h = i, f = s || this.ctx.maxColIndex - a, d = r, x = o || this.ctx.maxRowIndex - c, u = [h, f], g = [d, x];
3677
+ SELECTOR_AREA_MAX_Y_OFFSET: l
3678
+ } = this.ctx.config, c = i, f = s || this.ctx.maxColIndex - a, d = r, x = o || this.ctx.maxRowIndex - l, u = [c, f], g = [d, x];
3680
3679
  this.setSelector(u, g);
3681
3680
  }
3682
3681
  }
@@ -3686,17 +3685,17 @@ class ui {
3686
3685
  const { SELECTOR_AREA_MIN_X: i, SELECTOR_AREA_MAX_X: s, SELECTOR_AREA_MAX_X_OFFSET: r } = this.ctx.config, o = s || this.ctx.maxColIndex - r, a = i;
3687
3686
  if (e) {
3688
3687
  this.ctx.setFocusCell(t);
3689
- const c = [a, o], h = [t.rowIndex, t.rowIndex];
3690
- this.setSelector(c, h);
3688
+ const l = [a, o], c = [t.rowIndex, t.rowIndex];
3689
+ this.setSelector(l, c);
3691
3690
  }
3692
3691
  if (this.ctx.focusCell && this.ctx.mousedown) {
3693
- const { rowIndex: c } = this.ctx.focusCell;
3694
- if (t.rowIndex >= c) {
3695
- const h = [a, o], f = [c, t.rowIndex];
3696
- this.setSelector(h, f);
3692
+ const { rowIndex: l } = this.ctx.focusCell;
3693
+ if (t.rowIndex >= l) {
3694
+ const c = [a, o], f = [l, t.rowIndex];
3695
+ this.setSelector(c, f);
3697
3696
  } else {
3698
- const h = [a, o], f = [t.rowIndex, c];
3699
- this.setSelector(h, f);
3697
+ const c = [a, o], f = [t.rowIndex, l];
3698
+ this.setSelector(c, f);
3700
3699
  }
3701
3700
  }
3702
3701
  }
@@ -3705,7 +3704,7 @@ class ui {
3705
3704
  return;
3706
3705
  const { mousedown: t, focusCell: e, hoverCell: i } = this.ctx;
3707
3706
  if (t && e && i) {
3708
- const { rowIndex: s, colIndex: r } = e, o = Math.min(i.colIndex, r), a = Math.max(i.colIndex, r), c = Math.min(i.rowIndex, s), h = Math.max(i.rowIndex, s), f = [o, a], d = [c, h];
3707
+ const { rowIndex: s, colIndex: r } = e, o = Math.min(i.colIndex, r), a = Math.max(i.colIndex, r), l = Math.min(i.rowIndex, s), c = Math.max(i.rowIndex, s), f = [o, a], d = [l, c];
3709
3708
  this.setSelector(f, d);
3710
3709
  }
3711
3710
  }
@@ -3713,7 +3712,7 @@ class ui {
3713
3712
  const { focusCell: e, clickCell: i } = this.ctx;
3714
3713
  if (e && this.isInSettingRange(e.rowIndex, e.colIndex))
3715
3714
  if (this.ctx.selector.enable = !0, i && t) {
3716
- const { colIndex: s, rowIndex: r } = i, { colIndex: o, rowIndex: a } = e, c = Math.min(o, s), h = Math.max(o, s), f = Math.min(a, r), d = Math.max(a, r), x = [c, h], u = [f, d];
3715
+ const { colIndex: s, rowIndex: r } = i, { colIndex: o, rowIndex: a } = e, l = Math.min(o, s), c = Math.max(o, s), f = Math.min(a, r), d = Math.max(a, r), x = [l, c], u = [f, d];
3717
3716
  this.setSelector(x, u);
3718
3717
  } else {
3719
3718
  this.ctx.emit("cellSelectedClick", e);
@@ -3750,8 +3749,8 @@ class ui {
3750
3749
  let s = [];
3751
3750
  const r = /* @__PURE__ */ new Set();
3752
3751
  for (let a = 0; a <= e[1] - e[0]; a++)
3753
- for (let c = 0; c <= t[1] - t[0]; c++) {
3754
- const h = a + e[0], f = c + t[0], d = this.ctx.database.getItemValueForRowIndexAndColIndex(h, f);
3752
+ for (let l = 0; l <= t[1] - t[0]; l++) {
3753
+ const c = a + e[0], f = l + t[0], d = this.ctx.database.getItemValueForRowIndexAndColIndex(c, f);
3755
3754
  if (d) {
3756
3755
  const { rowKey: x, key: u } = d;
3757
3756
  this.ctx.database.getReadonly(x, u) || (r.add(x), s.push({
@@ -3783,10 +3782,10 @@ class ui {
3783
3782
  const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
3784
3783
  navigator.clipboard.readText().then((r) => {
3785
3784
  let o = ti(r), a = [];
3786
- for (let h = 0; h <= o.length - 1; h++) {
3787
- const f = o[h].length;
3785
+ for (let c = 0; c <= o.length - 1; c++) {
3786
+ const f = o[c].length;
3788
3787
  for (let d = 0; d <= f - 1; d++) {
3789
- const x = h + e, u = d + i, g = o[h][d], w = this.ctx.database.getItemValueForRowIndexAndColIndex(
3788
+ const x = c + e, u = d + i, g = o[c][d], w = this.ctx.database.getItemValueForRowIndexAndColIndex(
3790
3789
  x,
3791
3790
  u
3792
3791
  );
@@ -3803,23 +3802,23 @@ class ui {
3803
3802
  }
3804
3803
  }
3805
3804
  if (this.isCut) {
3806
- const h = this.clearSelectedData(
3805
+ const c = this.clearSelectedData(
3807
3806
  this.ctx.selector.xArrCopy,
3808
3807
  this.ctx.selector.yArrCopy,
3809
3808
  !0
3810
3809
  // 忽略设置,只返回数据,用于cut,实现历史回退需要返回两次问题
3811
3810
  ), f = a.map((d) => `${d.rowKey}-${d.key}`);
3812
- h.forEach((d) => {
3811
+ c.forEach((d) => {
3813
3812
  f.includes(`${d.rowKey}-${d.key}`) || a.unshift(d);
3814
3813
  }), this.isCut = !1;
3815
3814
  }
3816
3815
  if (!a.length)
3817
3816
  return;
3818
3817
  this.ctx.database.batchSetItemValue(a, !0);
3819
- let c = [];
3820
- s.forEach((h) => {
3821
- c.push(this.ctx.database.getRowDataItemForRowKey(h));
3822
- }), this.ctx.emit("pasteChange", a, c), this.clearCopyLine(), this.ctx.emit("drawView");
3818
+ let l = [];
3819
+ s.forEach((c) => {
3820
+ l.push(this.ctx.database.getRowDataItemForRowKey(c));
3821
+ }), this.ctx.emit("pasteChange", a, l), this.clearCopyLine(), this.ctx.emit("drawView");
3823
3822
  }).catch((r) => {
3824
3823
  console.error("获取剪贴板内容失败:", r);
3825
3824
  });
@@ -3835,7 +3834,7 @@ class ui {
3835
3834
  if (!e)
3836
3835
  return;
3837
3836
  let { colIndex: i = 0, rowIndex: s = 0 } = e;
3838
- const r = 0, o = 0, a = this.ctx.maxColIndex, c = this.ctx.maxRowIndex;
3837
+ const r = 0, o = 0, a = this.ctx.maxColIndex, l = this.ctx.maxRowIndex;
3839
3838
  switch (t) {
3840
3839
  case "LEFT":
3841
3840
  i > r && i--;
@@ -3847,11 +3846,11 @@ class ui {
3847
3846
  i < a && i++;
3848
3847
  break;
3849
3848
  case "BOTTOM":
3850
- s < c && s++;
3849
+ s < l && s++;
3851
3850
  break;
3852
3851
  }
3853
- const h = [i, i], f = [s, s], d = this.getCell(s, i);
3854
- d && (d.operation || this.isInSettingRange(d.rowIndex, d.colIndex) && (this.ctx.setFocusCell(d), this.setSelector(h, f), this.adjustBoundaryPosition(), this.ctx.emit("drawView")));
3852
+ const c = [i, i], f = [s, s], d = this.getCell(s, i);
3853
+ d && (d.operation || this.isInSettingRange(d.rowIndex, d.colIndex) && (this.ctx.setFocusCell(d), this.setSelector(c, f), this.adjustBoundaryPosition(), this.ctx.emit("drawView")));
3855
3854
  }
3856
3855
  stopAdjustPosition() {
3857
3856
  this.adjustPositionX = "", this.adjustPositionY = "", this.timerX && (clearInterval(this.timerX), this.timerX = 0), this.timerY && (clearInterval(this.timerY), this.timerY = 0);
@@ -3864,9 +3863,9 @@ class ui {
3864
3863
  SELECTOR_AREA_MIN_Y: r,
3865
3864
  SELECTOR_AREA_MAX_Y: o,
3866
3865
  SELECTOR_AREA_MAX_X_OFFSET: a,
3867
- SELECTOR_AREA_MAX_Y_OFFSET: c
3868
- } = this.ctx.config, h = i, f = s || this.ctx.maxColIndex - a, d = r, x = o || this.ctx.maxRowIndex - c;
3869
- return !(e < h || e > f || t < d || t > x);
3866
+ SELECTOR_AREA_MAX_Y_OFFSET: l
3867
+ } = this.ctx.config, c = i, f = s || this.ctx.maxColIndex - a, d = r, x = o || this.ctx.maxRowIndex - l;
3868
+ return !(e < c || e > f || t < d || t > x);
3870
3869
  }
3871
3870
  /**
3872
3871
  * 调整滚动条位置,让到达边界时自动滚动
@@ -3879,8 +3878,8 @@ class ui {
3879
3878
  let a = 10 * (s === "left" ? -1 : 1);
3880
3879
  this.timerX && (clearInterval(this.timerX), this.timerX = 0), this.timerX = setInterval(() => {
3881
3880
  a *= 1.5;
3882
- const { scrollX: c } = this.ctx, h = c + a;
3883
- (h < 0 || h > this.ctx.body.width) && (clearInterval(this.timerX), this.timerX = 0), this.ctx.setScrollX(h);
3881
+ const { scrollX: l } = this.ctx, c = l + a;
3882
+ (c < 0 || c > this.ctx.body.width) && (clearInterval(this.timerX), this.timerX = 0), this.ctx.setScrollX(c);
3884
3883
  }, 100);
3885
3884
  }
3886
3885
  if (r && this.adjustPositionY !== r) {
@@ -3888,8 +3887,8 @@ class ui {
3888
3887
  let a = 10 * (r === "top" ? -1 : 1);
3889
3888
  this.timerY && (clearInterval(this.timerY), this.timerY = 0), this.timerY = setInterval(() => {
3890
3889
  a *= 1.5;
3891
- const { scrollY: c } = this.ctx, h = c + a;
3892
- (h < 0 || h > this.ctx.body.height) && (clearInterval(this.timerY), this.timerY = 0), this.ctx.setScrollY(h);
3890
+ const { scrollY: l } = this.ctx, c = l + a;
3891
+ (c < 0 || c > this.ctx.body.height) && (clearInterval(this.timerY), this.timerY = 0), this.ctx.setScrollY(c);
3893
3892
  }, 100);
3894
3893
  }
3895
3894
  }
@@ -3905,18 +3904,17 @@ class ui {
3905
3904
  fixedLeftWidth: r,
3906
3905
  header: o,
3907
3906
  footer: a,
3908
- scrollX: c,
3909
- scrollY: h
3907
+ scrollX: l,
3908
+ scrollY: c,
3909
+ config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: d }
3910
3910
  } = this.ctx;
3911
- if (!i)
3911
+ if (!i || i.height > t)
3912
3912
  return;
3913
- const { SCROLLER_TRACK_SIZE: f = 0, FOOTER_FIXED: d } = this.ctx.config;
3914
3913
  let x = 0;
3915
- d && (x = a.visibleHeight);
3914
+ if (d && (x = a.visibleHeight), i.fixed || !(i.drawX < r || i.drawX + i.width > e - s || i.drawY < this.ctx.header.height || i.drawY + i.height > t - x - f))
3915
+ return;
3916
3916
  const u = r - i.drawX + 1, g = i.drawX + i.width - (e - s) + 1, w = o.height - i.drawY, p = i.drawY + i.height - (t - x - f);
3917
- this.adjustTimer && (clearTimeout(this.adjustTimer), this.adjustTimer = 0), this.adjustTimer = setTimeout(() => {
3918
- this.ctx.editing || (g > 0 && !i.fixed ? this.ctx.setScrollX(c + g) : u > 0 && !i.fixed && this.ctx.setScrollX(c - u), w > 0 ? this.ctx.setScrollY(h - w) : p > 0 && this.ctx.setScrollY(h + p));
3919
- }, 167);
3917
+ this.ctx.editing || (g > 0 && !i.fixed ? this.ctx.setScrollX(l + g) : u > 0 && !i.fixed && this.ctx.setScrollX(l - u), w > 0 ? this.ctx.setScrollY(c - w) : p > 0 && this.ctx.setScrollY(c + p));
3920
3918
  }
3921
3919
  destroy() {
3922
3920
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
@@ -3924,14 +3922,14 @@ class ui {
3924
3922
  }
3925
3923
  class gi {
3926
3924
  constructor(t) {
3927
- l(this, "ctx");
3925
+ h(this, "ctx");
3928
3926
  this.ctx = t, this.init();
3929
3927
  }
3930
3928
  init() {
3931
3929
  this.ctx.on("cellMouseenter", (t, e) => {
3932
3930
  this.ctx.stageElement.style.cursor === "crosshair" && (this.ctx.stageElement.style.cursor = "default");
3933
- const { offsetX: i, offsetY: s } = this.ctx.getOffset(e), { xArr: r, yArr: o } = this.ctx.selector, a = r[1], c = o[1], { colIndex: h, rowIndex: f, drawX: d, drawY: x, width: u, height: g } = t;
3934
- if (this.ctx.config.ENABLE_AUTOFILL && h === a && f === c) {
3931
+ const { offsetX: i, offsetY: s } = this.ctx.getOffset(e), { xArr: r, yArr: o } = this.ctx.selector, a = r[1], l = o[1], { colIndex: c, rowIndex: f, drawX: d, drawY: x, width: u, height: g } = t;
3932
+ if (this.ctx.config.ENABLE_AUTOFILL && c === a && f === l) {
3935
3933
  const p = d + u - 6, y = x + g - 6;
3936
3934
  i > p && s > y && (this.ctx.stageElement.style.cursor = "crosshair");
3937
3935
  }
@@ -3964,22 +3962,22 @@ class gi {
3964
3962
  return;
3965
3963
  let o = t, a = e;
3966
3964
  if (!r) {
3967
- const [c] = a;
3968
- a = [c, c];
3965
+ const [l] = a;
3966
+ a = [l, l];
3969
3967
  }
3970
3968
  if (!s) {
3971
- const [c] = o;
3972
- o = [c, c];
3969
+ const [l] = o;
3970
+ o = [l, l];
3973
3971
  }
3974
3972
  if (JSON.stringify(this.ctx.autofill.xArr) !== JSON.stringify(o) || JSON.stringify(this.ctx.autofill.yArr) !== JSON.stringify(a)) {
3975
3973
  const {
3976
- SELECTOR_AREA_MIN_X: c,
3977
- SELECTOR_AREA_MAX_X: h,
3974
+ SELECTOR_AREA_MIN_X: l,
3975
+ SELECTOR_AREA_MAX_X: c,
3978
3976
  SELECTOR_AREA_MIN_Y: f,
3979
3977
  SELECTOR_AREA_MAX_Y: d,
3980
3978
  SELECTOR_AREA_MAX_X_OFFSET: x,
3981
3979
  SELECTOR_AREA_MAX_Y_OFFSET: u
3982
- } = this.ctx.config, g = c, w = h || this.ctx.maxColIndex - x, p = f, y = d || this.ctx.maxRowIndex - u;
3980
+ } = this.ctx.config, g = l, w = c || this.ctx.maxColIndex - x, p = f, y = d || this.ctx.maxRowIndex - u;
3983
3981
  let [b, m] = o, [E, C] = a;
3984
3982
  if (b < g || E < p)
3985
3983
  return;
@@ -3996,14 +3994,14 @@ class gi {
3996
3994
  const u = d + e.yArr[0], g = x + e.xArr[0];
3997
3995
  i.set(`${u}-${g}`, !0);
3998
3996
  }
3999
- const { value: s } = e, r = s[0].length, o = s.length, a = this.ctx.autofill.xArr, c = this.ctx.autofill.yArr;
4000
- let h = [];
4001
- for (let d = 0; d <= c[1] - c[0]; d++)
3997
+ const { value: s } = e, r = s[0].length, o = s.length, a = this.ctx.autofill.xArr, l = this.ctx.autofill.yArr;
3998
+ let c = [];
3999
+ for (let d = 0; d <= l[1] - l[0]; d++)
4002
4000
  for (let x = 0; x <= a[1] - a[0]; x++) {
4003
- const u = x + a[0], g = d + c[0], w = s[d % o][x % r], p = this.ctx.database.getItemValueForRowIndexAndColIndex(g, u), y = `${g}-${u}`;
4001
+ const u = x + a[0], g = d + l[0], w = s[d % o][x % r], p = this.ctx.database.getItemValueForRowIndexAndColIndex(g, u), y = `${g}-${u}`;
4004
4002
  if (p && !i.has(y)) {
4005
4003
  const { rowKey: b, key: m } = p;
4006
- this.ctx.database.getReadonly(b, m) || (t.add(b), h.push({
4004
+ this.ctx.database.getReadonly(b, m) || (t.add(b), c.push({
4007
4005
  rowKey: b,
4008
4006
  key: m,
4009
4007
  value: w,
@@ -4011,13 +4009,13 @@ class gi {
4011
4009
  }));
4012
4010
  }
4013
4011
  }
4014
- if (!h.length)
4012
+ if (!c.length)
4015
4013
  return;
4016
- this.ctx.database.batchSetItemValue(h, !0);
4014
+ this.ctx.database.batchSetItemValue(c, !0);
4017
4015
  let f = [];
4018
4016
  t.forEach((d) => {
4019
4017
  f.push(this.ctx.database.getRowDataItemForRowKey(d));
4020
- }), this.ctx.emit("autofillChange", h, f), this.ctx.selector.xArr = this.ctx.autofill.xArr, this.ctx.selector.yArr = this.ctx.autofill.yArr, this.ctx.emit("draw");
4018
+ }), this.ctx.emit("autofillChange", c, f), this.ctx.selector.xArr = this.ctx.autofill.xArr, this.ctx.selector.yArr = this.ctx.autofill.yArr, this.ctx.emit("draw");
4021
4019
  }
4022
4020
  mouseenter(t) {
4023
4021
  if (["index", "selection", "index-selection"].includes(t.type))
@@ -4052,10 +4050,10 @@ function at(n, t) {
4052
4050
  function q(n) {
4053
4051
  return n.split("-")[0];
4054
4052
  }
4055
- function lt(n) {
4053
+ function ht(n) {
4056
4054
  return n.split("-")[1];
4057
4055
  }
4058
- function le(n) {
4056
+ function re(n) {
4059
4057
  return n === "x" ? "y" : "x";
4060
4058
  }
4061
4059
  function Lt(n) {
@@ -4065,11 +4063,11 @@ function J(n) {
4065
4063
  return ["top", "bottom"].includes(q(n)) ? "y" : "x";
4066
4064
  }
4067
4065
  function Mt(n) {
4068
- return le(J(n));
4066
+ return re(J(n));
4069
4067
  }
4070
4068
  function yi(n, t, e) {
4071
4069
  e === void 0 && (e = !1);
4072
- const i = lt(n), s = Mt(n), r = Lt(s);
4070
+ const i = ht(n), s = Mt(n), r = Lt(s);
4073
4071
  let o = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
4074
4072
  return t.reference[r] > t.floating[r] && (o = xt(o)), [o, xt(o)];
4075
4073
  }
@@ -4094,7 +4092,7 @@ function Ei(n, t, e) {
4094
4092
  }
4095
4093
  }
4096
4094
  function bi(n, t, e, i) {
4097
- const s = lt(n);
4095
+ const s = ht(n);
4098
4096
  let r = Ei(q(n), e === "start", i);
4099
4097
  return s && (r = r.map((o) => o + "-" + s), t && (r = r.concat(r.map(Ot)))), r;
4100
4098
  }
@@ -4110,7 +4108,7 @@ function Ci(n) {
4110
4108
  ...n
4111
4109
  };
4112
4110
  }
4113
- function ce(n) {
4111
+ function oe(n) {
4114
4112
  return typeof n != "number" ? Ci(n) : {
4115
4113
  top: n,
4116
4114
  right: n,
@@ -4136,14 +4134,14 @@ function ut(n) {
4136
4134
  y: e
4137
4135
  };
4138
4136
  }
4139
- function Gt(n, t, e) {
4137
+ function Vt(n, t, e) {
4140
4138
  let {
4141
4139
  reference: i,
4142
4140
  floating: s
4143
4141
  } = n;
4144
- const r = J(t), o = Mt(t), a = Lt(o), c = q(t), h = r === "y", f = i.x + i.width / 2 - s.width / 2, d = i.y + i.height / 2 - s.height / 2, x = i[a] / 2 - s[a] / 2;
4142
+ const r = J(t), o = Mt(t), a = Lt(o), l = q(t), c = r === "y", f = i.x + i.width / 2 - s.width / 2, d = i.y + i.height / 2 - s.height / 2, x = i[a] / 2 - s[a] / 2;
4145
4143
  let u;
4146
- switch (c) {
4144
+ switch (l) {
4147
4145
  case "top":
4148
4146
  u = {
4149
4147
  x: f,
@@ -4174,12 +4172,12 @@ function Gt(n, t, e) {
4174
4172
  y: i.y
4175
4173
  };
4176
4174
  }
4177
- switch (lt(t)) {
4175
+ switch (ht(t)) {
4178
4176
  case "start":
4179
- u[o] -= x * (e && h ? -1 : 1);
4177
+ u[o] -= x * (e && c ? -1 : 1);
4180
4178
  break;
4181
4179
  case "end":
4182
- u[o] += x * (e && h ? -1 : 1);
4180
+ u[o] += x * (e && c ? -1 : 1);
4183
4181
  break;
4184
4182
  }
4185
4183
  return u;
@@ -4190,15 +4188,15 @@ const vi = async (n, t, e) => {
4190
4188
  strategy: s = "absolute",
4191
4189
  middleware: r = [],
4192
4190
  platform: o
4193
- } = e, a = r.filter(Boolean), c = await (o.isRTL == null ? void 0 : o.isRTL(t));
4194
- let h = await o.getElementRects({
4191
+ } = e, a = r.filter(Boolean), l = await (o.isRTL == null ? void 0 : o.isRTL(t));
4192
+ let c = await o.getElementRects({
4195
4193
  reference: n,
4196
4194
  floating: t,
4197
4195
  strategy: s
4198
4196
  }), {
4199
4197
  x: f,
4200
4198
  y: d
4201
- } = Gt(h, i, c), x = i, u = {}, g = 0;
4199
+ } = Vt(c, i, l), x = i, u = {}, g = 0;
4202
4200
  for (let w = 0; w < a.length; w++) {
4203
4201
  const {
4204
4202
  name: p,
@@ -4215,7 +4213,7 @@ const vi = async (n, t, e) => {
4215
4213
  placement: x,
4216
4214
  strategy: s,
4217
4215
  middlewareData: u,
4218
- rects: h,
4216
+ rects: c,
4219
4217
  platform: o,
4220
4218
  elements: {
4221
4219
  reference: n,
@@ -4228,14 +4226,14 @@ const vi = async (n, t, e) => {
4228
4226
  ...u[p],
4229
4227
  ...E
4230
4228
  }
4231
- }, C && g <= 50 && (g++, typeof C == "object" && (C.placement && (x = C.placement), C.rects && (h = C.rects === !0 ? await o.getElementRects({
4229
+ }, C && g <= 50 && (g++, typeof C == "object" && (C.placement && (x = C.placement), C.rects && (c = C.rects === !0 ? await o.getElementRects({
4232
4230
  reference: n,
4233
4231
  floating: t,
4234
4232
  strategy: s
4235
4233
  }) : C.rects), {
4236
4234
  x: f,
4237
4235
  y: d
4238
- } = Gt(h, x, c)), w = -1);
4236
+ } = Vt(c, x, l)), w = -1);
4239
4237
  }
4240
4238
  return {
4241
4239
  x: f,
@@ -4245,7 +4243,7 @@ const vi = async (n, t, e) => {
4245
4243
  middlewareData: u
4246
4244
  };
4247
4245
  };
4248
- async function he(n, t) {
4246
+ async function ne(n, t) {
4249
4247
  var e;
4250
4248
  t === void 0 && (t = {});
4251
4249
  const {
@@ -4254,18 +4252,18 @@ async function he(n, t) {
4254
4252
  platform: r,
4255
4253
  rects: o,
4256
4254
  elements: a,
4257
- strategy: c
4255
+ strategy: l
4258
4256
  } = n, {
4259
- boundary: h = "clippingAncestors",
4257
+ boundary: c = "clippingAncestors",
4260
4258
  rootBoundary: f = "viewport",
4261
4259
  elementContext: d = "floating",
4262
4260
  altBoundary: x = !1,
4263
4261
  padding: u = 0
4264
- } = at(t, n), g = ce(u), p = a[x ? d === "floating" ? "reference" : "floating" : d], y = ut(await r.getClippingRect({
4262
+ } = at(t, n), g = oe(u), p = a[x ? d === "floating" ? "reference" : "floating" : d], y = ut(await r.getClippingRect({
4265
4263
  element: (e = await (r.isElement == null ? void 0 : r.isElement(p))) == null || e ? p : p.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
4266
- boundary: h,
4264
+ boundary: c,
4267
4265
  rootBoundary: f,
4268
- strategy: c
4266
+ strategy: l
4269
4267
  })), b = d === "floating" ? {
4270
4268
  x: i,
4271
4269
  y: s,
@@ -4281,7 +4279,7 @@ async function he(n, t) {
4281
4279
  elements: a,
4282
4280
  rect: b,
4283
4281
  offsetParent: m,
4284
- strategy: c
4282
+ strategy: l
4285
4283
  }) : b);
4286
4284
  return {
4287
4285
  top: (y.top - C.top + g.top) / E.y,
@@ -4301,20 +4299,20 @@ const Ri = (n) => ({
4301
4299
  rects: r,
4302
4300
  platform: o,
4303
4301
  elements: a,
4304
- middlewareData: c
4302
+ middlewareData: l
4305
4303
  } = t, {
4306
- element: h,
4304
+ element: c,
4307
4305
  padding: f = 0
4308
4306
  } = at(n, t) || {};
4309
- if (h == null)
4307
+ if (c == null)
4310
4308
  return {};
4311
- const d = ce(f), x = {
4309
+ const d = oe(f), x = {
4312
4310
  x: e,
4313
4311
  y: i
4314
- }, u = Mt(s), g = Lt(u), w = await o.getDimensions(h), p = u === "y", y = p ? "top" : "left", b = p ? "bottom" : "right", m = p ? "clientHeight" : "clientWidth", E = r.reference[g] + r.reference[u] - x[u] - r.floating[g], C = x[u] - r.reference[u], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(h));
4315
- let T = R ? R[m] : 0;
4316
- (!T || !await (o.isElement == null ? void 0 : o.isElement(R))) && (T = a.floating[m] || r.floating[g]);
4317
- const A = E / 2 - C / 2, L = T / 2 - w[g] / 2 - 1, D = rt(d[y], L), B = rt(d[b], L), I = D, S = T - w[g] - B, O = T / 2 - w[g] / 2 + A, G = It(I, O, S), Y = !c.arrow && lt(s) != null && O !== G && r.reference[g] / 2 - (O < I ? D : B) - w[g] / 2 < 0, k = Y ? O < I ? O - I : O - S : 0;
4312
+ }, u = Mt(s), g = Lt(u), w = await o.getDimensions(c), p = u === "y", y = p ? "top" : "left", b = p ? "bottom" : "right", m = p ? "clientHeight" : "clientWidth", E = r.reference[g] + r.reference[u] - x[u] - r.floating[g], C = x[u] - r.reference[u], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
4313
+ let S = R ? R[m] : 0;
4314
+ (!S || !await (o.isElement == null ? void 0 : o.isElement(R))) && (S = a.floating[m] || r.floating[g]);
4315
+ const A = E / 2 - C / 2, L = S / 2 - w[g] / 2 - 1, D = rt(d[y], L), B = rt(d[b], L), I = D, T = S - w[g] - B, O = S / 2 - w[g] / 2 + A, G = It(I, O, T), Y = !l.arrow && ht(s) != null && O !== G && r.reference[g] / 2 - (O < I ? D : B) - w[g] / 2 < 0, k = Y ? O < I ? O - I : O - T : 0;
4318
4316
  return {
4319
4317
  [u]: x[u] + k,
4320
4318
  data: {
@@ -4338,8 +4336,8 @@ const Ri = (n) => ({
4338
4336
  middlewareData: r,
4339
4337
  rects: o,
4340
4338
  initialPlacement: a,
4341
- platform: c,
4342
- elements: h
4339
+ platform: l,
4340
+ elements: c
4343
4341
  } = t, {
4344
4342
  mainAxis: f = !0,
4345
4343
  crossAxis: d = !0,
@@ -4351,9 +4349,9 @@ const Ri = (n) => ({
4351
4349
  } = at(n, t);
4352
4350
  if ((e = r.arrow) != null && e.alignmentOffset)
4353
4351
  return {};
4354
- const y = q(s), b = J(a), m = q(a) === a, E = await (c.isRTL == null ? void 0 : c.isRTL(h.floating)), C = x || (m || !w ? [xt(a)] : mi(a)), R = g !== "none";
4352
+ const y = q(s), b = J(a), m = q(a) === a, E = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), C = x || (m || !w ? [xt(a)] : mi(a)), R = g !== "none";
4355
4353
  !x && R && C.push(...bi(a, w, g, E));
4356
- const T = [a, ...C], A = await he(t, p), L = [];
4354
+ const S = [a, ...C], A = await ne(t, p), L = [];
4357
4355
  let D = ((i = r.flip) == null ? void 0 : i.overflows) || [];
4358
4356
  if (f && L.push(A[y]), d) {
4359
4357
  const O = yi(s, o, E);
@@ -4364,7 +4362,7 @@ const Ri = (n) => ({
4364
4362
  overflows: L
4365
4363
  }], !L.every((O) => O <= 0)) {
4366
4364
  var B, I;
4367
- const O = (((B = r.flip) == null ? void 0 : B.index) || 0) + 1, G = T[O];
4365
+ const O = (((B = r.flip) == null ? void 0 : B.index) || 0) + 1, G = S[O];
4368
4366
  if (G)
4369
4367
  return {
4370
4368
  data: {
@@ -4379,8 +4377,8 @@ const Ri = (n) => ({
4379
4377
  if (!Y)
4380
4378
  switch (u) {
4381
4379
  case "bestFit": {
4382
- var S;
4383
- const k = (S = D.filter((W) => {
4380
+ var T;
4381
+ const k = (T = D.filter((W) => {
4384
4382
  if (R) {
4385
4383
  const P = J(W.placement);
4386
4384
  return P === b || // Create a bias to the `y` side axis due to horizontal
@@ -4388,7 +4386,7 @@ const Ri = (n) => ({
4388
4386
  P === "y";
4389
4387
  }
4390
4388
  return !0;
4391
- }).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, ye) => P + ye, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 : S[0];
4389
+ }).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, ye) => P + ye, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 : T[0];
4392
4390
  k && (Y = k);
4393
4391
  break;
4394
4392
  }
@@ -4412,7 +4410,7 @@ async function Ii(n, t) {
4412
4410
  placement: e,
4413
4411
  platform: i,
4414
4412
  elements: s
4415
- } = n, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = q(e), a = lt(e), c = J(e) === "y", h = ["left", "top"].includes(o) ? -1 : 1, f = r && c ? -1 : 1, d = at(t, n);
4413
+ } = n, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = q(e), a = ht(e), l = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, f = r && l ? -1 : 1, d = at(t, n);
4416
4414
  let {
4417
4415
  mainAxis: x,
4418
4416
  crossAxis: u,
@@ -4426,11 +4424,11 @@ async function Ii(n, t) {
4426
4424
  crossAxis: d.crossAxis || 0,
4427
4425
  alignmentAxis: d.alignmentAxis
4428
4426
  };
4429
- return a && typeof g == "number" && (u = a === "end" ? g * -1 : g), c ? {
4427
+ return a && typeof g == "number" && (u = a === "end" ? g * -1 : g), l ? {
4430
4428
  x: u * f,
4431
- y: x * h
4429
+ y: x * c
4432
4430
  } : {
4433
- x: x * h,
4431
+ x: x * c,
4434
4432
  y: u * f
4435
4433
  };
4436
4434
  }
@@ -4445,18 +4443,18 @@ const Oi = function(n) {
4445
4443
  y: r,
4446
4444
  placement: o,
4447
4445
  middlewareData: a
4448
- } = t, c = await Ii(t, n);
4446
+ } = t, l = await Ii(t, n);
4449
4447
  return o === ((e = a.offset) == null ? void 0 : e.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
4450
- x: s + c.x,
4451
- y: r + c.y,
4448
+ x: s + l.x,
4449
+ y: r + l.y,
4452
4450
  data: {
4453
- ...c,
4451
+ ...l,
4454
4452
  placement: o
4455
4453
  }
4456
4454
  };
4457
4455
  }
4458
4456
  };
4459
- }, Ti = function(n) {
4457
+ }, Si = function(n) {
4460
4458
  return n === void 0 && (n = {}), {
4461
4459
  name: "shift",
4462
4460
  options: n,
@@ -4480,12 +4478,12 @@ const Oi = function(n) {
4480
4478
  };
4481
4479
  }
4482
4480
  },
4483
- ...c
4484
- } = at(n, t), h = {
4481
+ ...l
4482
+ } = at(n, t), c = {
4485
4483
  x: e,
4486
4484
  y: i
4487
- }, f = await he(t, c), d = J(q(s)), x = le(d);
4488
- let u = h[x], g = h[d];
4485
+ }, f = await ne(t, l), d = J(q(s)), x = re(d);
4486
+ let u = c[x], g = c[d];
4489
4487
  if (r) {
4490
4488
  const p = x === "y" ? "top" : "left", y = x === "y" ? "bottom" : "right", b = u + f[p], m = u - f[y];
4491
4489
  u = It(b, u, m);
@@ -4517,7 +4515,7 @@ function gt() {
4517
4515
  return typeof window < "u";
4518
4516
  }
4519
4517
  function tt(n) {
4520
- return de(n) ? (n.nodeName || "").toLowerCase() : "#document";
4518
+ return ae(n) ? (n.nodeName || "").toLowerCase() : "#document";
4521
4519
  }
4522
4520
  function H(n) {
4523
4521
  var t;
@@ -4525,9 +4523,9 @@ function H(n) {
4525
4523
  }
4526
4524
  function K(n) {
4527
4525
  var t;
4528
- return (t = (de(n) ? n.ownerDocument : n.document) || window.document) == null ? void 0 : t.documentElement;
4526
+ return (t = (ae(n) ? n.ownerDocument : n.document) || window.document) == null ? void 0 : t.documentElement;
4529
4527
  }
4530
- function de(n) {
4528
+ function ae(n) {
4531
4529
  return gt() ? n instanceof Node || n instanceof H(n).Node : !1;
4532
4530
  }
4533
4531
  function X(n) {
@@ -4536,10 +4534,10 @@ function X(n) {
4536
4534
  function N(n) {
4537
4535
  return gt() ? n instanceof HTMLElement || n instanceof H(n).HTMLElement : !1;
4538
4536
  }
4539
- function jt(n) {
4537
+ function zt(n) {
4540
4538
  return !gt() || typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof H(n).ShadowRoot;
4541
4539
  }
4542
- function ct(n) {
4540
+ function lt(n) {
4543
4541
  const {
4544
4542
  overflow: t,
4545
4543
  overflowX: e,
@@ -4548,7 +4546,7 @@ function ct(n) {
4548
4546
  } = F(n);
4549
4547
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
4550
4548
  }
4551
- function Si(n) {
4549
+ function Ti(n) {
4552
4550
  return ["table", "td", "th"].includes(tt(n));
4553
4551
  }
4554
4552
  function wt(n) {
@@ -4600,29 +4598,29 @@ function z(n) {
4600
4598
  // Step into the shadow DOM of the parent of a slotted node.
4601
4599
  n.assignedSlot || // DOM Element detected.
4602
4600
  n.parentNode || // ShadowRoot detected.
4603
- jt(n) && n.host || // Fallback.
4601
+ zt(n) && n.host || // Fallback.
4604
4602
  K(n)
4605
4603
  );
4606
- return jt(t) ? t.host : t;
4604
+ return zt(t) ? t.host : t;
4607
4605
  }
4608
- function fe(n) {
4606
+ function he(n) {
4609
4607
  const t = z(n);
4610
- return Q(t) ? n.ownerDocument ? n.ownerDocument.body : n.body : N(t) && ct(t) ? t : fe(t);
4608
+ return Q(t) ? n.ownerDocument ? n.ownerDocument.body : n.body : N(t) && lt(t) ? t : he(t);
4611
4609
  }
4612
- function Tt(n, t, e) {
4610
+ function St(n, t, e) {
4613
4611
  var i;
4614
4612
  t === void 0 && (t = []), e === void 0 && (e = !0);
4615
- const s = fe(n), r = s === ((i = n.ownerDocument) == null ? void 0 : i.body), o = H(s);
4613
+ const s = he(n), r = s === ((i = n.ownerDocument) == null ? void 0 : i.body), o = H(s);
4616
4614
  if (r) {
4617
- const a = St(o);
4618
- return t.concat(o, o.visualViewport || [], ct(s) ? s : [], a && e ? Tt(a) : []);
4615
+ const a = Tt(o);
4616
+ return t.concat(o, o.visualViewport || [], lt(s) ? s : [], a && e ? St(a) : []);
4619
4617
  }
4620
- return t.concat(s, Tt(s, [], e));
4618
+ return t.concat(s, St(s, [], e));
4621
4619
  }
4622
- function St(n) {
4620
+ function Tt(n) {
4623
4621
  return n.parent && Object.getPrototypeOf(n.parent) ? n.frameElement : null;
4624
4622
  }
4625
- function xe(n) {
4623
+ function le(n) {
4626
4624
  const t = F(n);
4627
4625
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
4628
4626
  const s = N(n), r = s ? n.offsetWidth : e, o = s ? n.offsetHeight : i, a = ft(e) !== r || ft(i) !== o;
@@ -4632,18 +4630,18 @@ function xe(n) {
4632
4630
  $: a
4633
4631
  };
4634
4632
  }
4635
- function ue(n) {
4633
+ function ce(n) {
4636
4634
  return X(n) ? n : n.contextElement;
4637
4635
  }
4638
4636
  function Z(n) {
4639
- const t = ue(n);
4637
+ const t = ce(n);
4640
4638
  if (!N(t))
4641
4639
  return V(1);
4642
4640
  const e = t.getBoundingClientRect(), {
4643
4641
  width: i,
4644
4642
  height: s,
4645
4643
  $: r
4646
- } = xe(t);
4644
+ } = le(t);
4647
4645
  let o = (r ? ft(e.width) : e.width) / i, a = (r ? ft(e.height) : e.height) / s;
4648
4646
  return (!o || !Number.isFinite(o)) && (o = 1), (!a || !Number.isFinite(a)) && (a = 1), {
4649
4647
  x: o,
@@ -4651,7 +4649,7 @@ function Z(n) {
4651
4649
  };
4652
4650
  }
4653
4651
  const Li = /* @__PURE__ */ V(0);
4654
- function ge(n) {
4652
+ function de(n) {
4655
4653
  const t = H(n);
4656
4654
  return !Dt() || !t.visualViewport ? Li : {
4657
4655
  x: t.visualViewport.offsetLeft,
@@ -4663,24 +4661,24 @@ function Mi(n, t, e) {
4663
4661
  }
4664
4662
  function ot(n, t, e, i) {
4665
4663
  t === void 0 && (t = !1), e === void 0 && (e = !1);
4666
- const s = n.getBoundingClientRect(), r = ue(n);
4664
+ const s = n.getBoundingClientRect(), r = ce(n);
4667
4665
  let o = V(1);
4668
4666
  t && (i ? X(i) && (o = Z(i)) : o = Z(n));
4669
- const a = Mi(r, e, i) ? ge(r) : V(0);
4670
- let c = (s.left + a.x) / o.x, h = (s.top + a.y) / o.y, f = s.width / o.x, d = s.height / o.y;
4667
+ const a = Mi(r, e, i) ? de(r) : V(0);
4668
+ let l = (s.left + a.x) / o.x, c = (s.top + a.y) / o.y, f = s.width / o.x, d = s.height / o.y;
4671
4669
  if (r) {
4672
4670
  const x = H(r), u = i && X(i) ? H(i) : i;
4673
- let g = x, w = St(g);
4671
+ let g = x, w = Tt(g);
4674
4672
  for (; w && i && u !== g; ) {
4675
4673
  const p = Z(w), y = w.getBoundingClientRect(), b = F(w), m = y.left + (w.clientLeft + parseFloat(b.paddingLeft)) * p.x, E = y.top + (w.clientTop + parseFloat(b.paddingTop)) * p.y;
4676
- c *= p.x, h *= p.y, f *= p.x, d *= p.y, c += m, h += E, g = H(w), w = St(g);
4674
+ l *= p.x, c *= p.y, f *= p.x, d *= p.y, l += m, c += E, g = H(w), w = Tt(g);
4677
4675
  }
4678
4676
  }
4679
4677
  return ut({
4680
4678
  width: f,
4681
4679
  height: d,
4682
- x: c,
4683
- y: h
4680
+ x: l,
4681
+ y: c
4684
4682
  });
4685
4683
  }
4686
4684
  function Hi(n) {
@@ -4693,20 +4691,20 @@ function Hi(n) {
4693
4691
  const r = s === "fixed", o = K(i), a = t ? wt(t.floating) : !1;
4694
4692
  if (i === o || a && r)
4695
4693
  return e;
4696
- let c = {
4694
+ let l = {
4697
4695
  scrollLeft: 0,
4698
4696
  scrollTop: 0
4699
- }, h = V(1);
4697
+ }, c = V(1);
4700
4698
  const f = V(0), d = N(i);
4701
- if ((d || !d && !r) && ((tt(i) !== "body" || ct(o)) && (c = pt(i)), N(i))) {
4699
+ if ((d || !d && !r) && ((tt(i) !== "body" || lt(o)) && (l = pt(i)), N(i))) {
4702
4700
  const x = ot(i);
4703
- h = Z(i), f.x = x.x + i.clientLeft, f.y = x.y + i.clientTop;
4701
+ c = Z(i), f.x = x.x + i.clientLeft, f.y = x.y + i.clientTop;
4704
4702
  }
4705
4703
  return {
4706
- width: e.width * h.x,
4707
- height: e.height * h.y,
4708
- x: e.x * h.x - c.scrollLeft * h.x + f.x,
4709
- y: e.y * h.y - c.scrollTop * h.y + f.y
4704
+ width: e.width * c.x,
4705
+ height: e.height * c.y,
4706
+ x: e.x * c.x - l.scrollLeft * c.x + f.x,
4707
+ y: e.y * c.y - l.scrollTop * c.y + f.y
4710
4708
  };
4711
4709
  }
4712
4710
  function Di(n) {
@@ -4729,29 +4727,29 @@ function Xi(n) {
4729
4727
  }
4730
4728
  function Fi(n, t) {
4731
4729
  const e = H(n), i = K(n), s = e.visualViewport;
4732
- let r = i.clientWidth, o = i.clientHeight, a = 0, c = 0;
4730
+ let r = i.clientWidth, o = i.clientHeight, a = 0, l = 0;
4733
4731
  if (s) {
4734
4732
  r = s.width, o = s.height;
4735
- const h = Dt();
4736
- (!h || h && t === "fixed") && (a = s.offsetLeft, c = s.offsetTop);
4733
+ const c = Dt();
4734
+ (!c || c && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
4737
4735
  }
4738
4736
  return {
4739
4737
  width: r,
4740
4738
  height: o,
4741
4739
  x: a,
4742
- y: c
4740
+ y: l
4743
4741
  };
4744
4742
  }
4745
4743
  function ki(n, t) {
4746
- const e = ot(n, !0, t === "fixed"), i = e.top + n.clientTop, s = e.left + n.clientLeft, r = N(n) ? Z(n) : V(1), o = n.clientWidth * r.x, a = n.clientHeight * r.y, c = s * r.x, h = i * r.y;
4744
+ const e = ot(n, !0, t === "fixed"), i = e.top + n.clientTop, s = e.left + n.clientLeft, r = N(n) ? Z(n) : V(1), o = n.clientWidth * r.x, a = n.clientHeight * r.y, l = s * r.x, c = i * r.y;
4747
4745
  return {
4748
4746
  width: o,
4749
4747
  height: a,
4750
- x: c,
4751
- y: h
4748
+ x: l,
4749
+ y: c
4752
4750
  };
4753
4751
  }
4754
- function Ut(n, t, e) {
4752
+ function $t(n, t, e) {
4755
4753
  let i;
4756
4754
  if (t === "viewport")
4757
4755
  i = Fi(n, e);
@@ -4760,7 +4758,7 @@ function Ut(n, t, e) {
4760
4758
  else if (X(t))
4761
4759
  i = ki(t, e);
4762
4760
  else {
4763
- const s = ge(n);
4761
+ const s = de(n);
4764
4762
  i = {
4765
4763
  ...t,
4766
4764
  x: t.x - s.x,
@@ -4769,20 +4767,20 @@ function Ut(n, t, e) {
4769
4767
  }
4770
4768
  return ut(i);
4771
4769
  }
4772
- function we(n, t) {
4770
+ function fe(n, t) {
4773
4771
  const e = z(n);
4774
- return e === t || !X(e) || Q(e) ? !1 : F(e).position === "fixed" || we(e, t);
4772
+ return e === t || !X(e) || Q(e) ? !1 : F(e).position === "fixed" || fe(e, t);
4775
4773
  }
4776
4774
  function Ni(n, t) {
4777
4775
  const e = t.get(n);
4778
4776
  if (e)
4779
4777
  return e;
4780
- let i = Tt(n, [], !1).filter((a) => X(a) && tt(a) !== "body"), s = null;
4778
+ let i = St(n, [], !1).filter((a) => X(a) && tt(a) !== "body"), s = null;
4781
4779
  const r = F(n).position === "fixed";
4782
4780
  let o = r ? z(n) : n;
4783
4781
  for (; X(o) && !Q(o); ) {
4784
- const a = F(o), c = Ht(o);
4785
- !c && a.position === "fixed" && (s = null), (r ? !c && !s : !c && a.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ct(o) && !c && we(n, o)) ? i = i.filter((f) => f !== o) : s = a, o = z(o);
4782
+ const a = F(o), l = Ht(o);
4783
+ !l && a.position === "fixed" && (s = null), (r ? !l && !s : !l && a.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || lt(o) && !l && fe(n, o)) ? i = i.filter((f) => f !== o) : s = a, o = z(o);
4786
4784
  }
4787
4785
  return t.set(n, i), i;
4788
4786
  }
@@ -4793,22 +4791,22 @@ function Yi(n) {
4793
4791
  rootBoundary: i,
4794
4792
  strategy: s
4795
4793
  } = n;
4796
- const o = [...e === "clippingAncestors" ? wt(t) ? [] : Ni(t, this._c) : [].concat(e), i], a = o[0], c = o.reduce((h, f) => {
4797
- const d = Ut(t, f, s);
4798
- return h.top = U(d.top, h.top), h.right = rt(d.right, h.right), h.bottom = rt(d.bottom, h.bottom), h.left = U(d.left, h.left), h;
4799
- }, Ut(t, a, s));
4794
+ const o = [...e === "clippingAncestors" ? wt(t) ? [] : Ni(t, this._c) : [].concat(e), i], a = o[0], l = o.reduce((c, f) => {
4795
+ const d = $t(t, f, s);
4796
+ return c.top = U(d.top, c.top), c.right = rt(d.right, c.right), c.bottom = rt(d.bottom, c.bottom), c.left = U(d.left, c.left), c;
4797
+ }, $t(t, a, s));
4800
4798
  return {
4801
- width: c.right - c.left,
4802
- height: c.bottom - c.top,
4803
- x: c.left,
4804
- y: c.top
4799
+ width: l.right - l.left,
4800
+ height: l.bottom - l.top,
4801
+ x: l.left,
4802
+ y: l.top
4805
4803
  };
4806
4804
  }
4807
4805
  function Ki(n) {
4808
4806
  const {
4809
4807
  width: t,
4810
4808
  height: e
4811
- } = xe(n);
4809
+ } = le(n);
4812
4810
  return {
4813
4811
  width: t,
4814
4812
  height: e
@@ -4820,19 +4818,19 @@ function Bi(n, t, e) {
4820
4818
  scrollLeft: 0,
4821
4819
  scrollTop: 0
4822
4820
  };
4823
- const c = V(0);
4821
+ const l = V(0);
4824
4822
  if (i || !i && !r)
4825
- if ((tt(t) !== "body" || ct(s)) && (a = pt(t)), i) {
4823
+ if ((tt(t) !== "body" || lt(s)) && (a = pt(t)), i) {
4826
4824
  const u = ot(t, !0, r, t);
4827
- c.x = u.x + t.clientLeft, c.y = u.y + t.clientTop;
4828
- } else s && (c.x = At(s));
4829
- let h = 0, f = 0;
4825
+ l.x = u.x + t.clientLeft, l.y = u.y + t.clientTop;
4826
+ } else s && (l.x = At(s));
4827
+ let c = 0, f = 0;
4830
4828
  if (s && !i && !r) {
4831
4829
  const u = s.getBoundingClientRect();
4832
- f = u.top + a.scrollTop, h = u.left + a.scrollLeft - // RTL <body> scrollbar.
4830
+ f = u.top + a.scrollTop, c = u.left + a.scrollLeft - // RTL <body> scrollbar.
4833
4831
  At(s, u);
4834
4832
  }
4835
- const d = o.left + a.scrollLeft - c.x - h, x = o.top + a.scrollTop - c.y - f;
4833
+ const d = o.left + a.scrollLeft - l.x - c, x = o.top + a.scrollTop - l.y - f;
4836
4834
  return {
4837
4835
  x: d,
4838
4836
  y: x,
@@ -4843,7 +4841,7 @@ function Bi(n, t, e) {
4843
4841
  function mt(n) {
4844
4842
  return F(n).position === "static";
4845
4843
  }
4846
- function Zt(n, t) {
4844
+ function qt(n, t) {
4847
4845
  if (!N(n) || F(n).position === "fixed")
4848
4846
  return null;
4849
4847
  if (t)
@@ -4851,7 +4849,7 @@ function Zt(n, t) {
4851
4849
  let e = n.offsetParent;
4852
4850
  return K(n) === e && (e = e.ownerDocument.body), e;
4853
4851
  }
4854
- function pe(n, t) {
4852
+ function xe(n, t) {
4855
4853
  const e = H(n);
4856
4854
  if (wt(n))
4857
4855
  return e;
@@ -4864,13 +4862,13 @@ function pe(n, t) {
4864
4862
  }
4865
4863
  return e;
4866
4864
  }
4867
- let i = Zt(n, t);
4868
- for (; i && Si(i) && mt(i); )
4869
- i = Zt(i, t);
4865
+ let i = qt(n, t);
4866
+ for (; i && Ti(i) && mt(i); )
4867
+ i = qt(i, t);
4870
4868
  return i && Q(i) && mt(i) && !Ht(i) ? e : i || Ai(n) || e;
4871
4869
  }
4872
4870
  const Wi = async function(n) {
4873
- const t = this.getOffsetParent || pe, e = this.getDimensions, i = await e(n.floating);
4871
+ const t = this.getOffsetParent || xe, e = this.getDimensions, i = await e(n.floating);
4874
4872
  return {
4875
4873
  reference: Bi(n.reference, await t(n.floating), n.strategy),
4876
4874
  floating: {
@@ -4888,14 +4886,14 @@ const Vi = {
4888
4886
  convertOffsetParentRelativeRectToViewportRelativeRect: Hi,
4889
4887
  getDocumentElement: K,
4890
4888
  getClippingRect: Yi,
4891
- getOffsetParent: pe,
4889
+ getOffsetParent: xe,
4892
4890
  getElementRects: Wi,
4893
4891
  getClientRects: Di,
4894
4892
  getDimensions: Ki,
4895
4893
  getScale: Z,
4896
4894
  isElement: X,
4897
4895
  isRTL: Pi
4898
- }, Xt = Oi, Ft = Ti, kt = _i, zi = Ri, Nt = (n, t, e) => {
4896
+ }, ue = Oi, ge = Si, we = _i, zi = Ri, pe = (n, t, e) => {
4899
4897
  const i = /* @__PURE__ */ new Map(), s = {
4900
4898
  platform: Vi,
4901
4899
  ...e
@@ -4910,11 +4908,11 @@ const Vi = {
4910
4908
  };
4911
4909
  let $i = class {
4912
4910
  constructor(t) {
4913
- l(this, "ctx");
4914
- l(this, "enable", !1);
4915
- l(this, "contentEl");
4916
- l(this, "floatingEl");
4917
- l(this, "arrowEl");
4911
+ h(this, "ctx");
4912
+ h(this, "enable", !1);
4913
+ h(this, "contentEl");
4914
+ h(this, "floatingEl");
4915
+ h(this, "arrowEl");
4918
4916
  this.ctx = t;
4919
4917
  const { TOOLTIP_BG_COLOR: e, TOOLTIP_TEXT_COLOR: i, TOOLTIP_ZINDEX: s, TOOLTIP_CUSTOM_STYLE: r, CSS_PREFIX: o } = this.ctx.config;
4920
4918
  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`;
@@ -4929,7 +4927,7 @@ let $i = class {
4929
4927
  borderRadius: "4px",
4930
4928
  fontSize: "12px",
4931
4929
  ...r
4932
- }, c = {
4930
+ }, l = {
4933
4931
  position: "absolute",
4934
4932
  width: "10px",
4935
4933
  height: "10px",
@@ -4938,7 +4936,7 @@ let $i = class {
4938
4936
  transform: "rotate(45deg)",
4939
4937
  zIndex: a.zIndex
4940
4938
  };
4941
- Object.assign(this.arrowEl.style, c), Object.assign(this.floatingEl.style, a), this.floatingEl.appendChild(this.contentEl), this.floatingEl.appendChild(this.arrowEl), this.ctx.containerElement.appendChild(this.floatingEl), this.init();
4939
+ Object.assign(this.arrowEl.style, l), Object.assign(this.floatingEl.style, a), this.floatingEl.appendChild(this.contentEl), this.floatingEl.appendChild(this.arrowEl), this.ctx.containerElement.appendChild(this.floatingEl), this.init();
4942
4940
  }
4943
4941
  init() {
4944
4942
  this.ctx.on("mousemove", (t) => {
@@ -4965,7 +4963,7 @@ let $i = class {
4965
4963
  return;
4966
4964
  this.enable = !0, this.contentEl.style.maxWidth = `${t.overflowTooltipMaxWidth || 500}px`, this.contentEl.style.width = "100%", this.contentEl.style.display = "inline-block", this.contentEl.style.wordBreak = "break-all", this.contentEl.style.lineHeight = "1.5", this.contentEl.innerText = e;
4967
4965
  const s = t.drawX + i.x, r = t.drawY + i.y;
4968
- Nt({
4966
+ pe({
4969
4967
  getBoundingClientRect() {
4970
4968
  return {
4971
4969
  width: t.visibleWidth,
@@ -4980,12 +4978,12 @@ let $i = class {
4980
4978
  }
4981
4979
  }, this.floatingEl, {
4982
4980
  placement: t.overflowTooltipPlacement,
4983
- middleware: [Ft(), kt(), Xt(6), zi({ element: this.arrowEl })]
4981
+ middleware: [ge(), we(), ue(6), zi({ element: this.arrowEl })]
4984
4982
  }).then((a) => {
4985
- const { x: c, y: h, placement: f, middlewareData: d } = a;
4983
+ const { x: l, y: c, placement: f, middlewareData: d } = a;
4986
4984
  if (Object.assign(this.floatingEl.style, {
4987
- top: `${h}px`,
4988
- left: `${c}px`
4985
+ top: `${c}px`,
4986
+ left: `${l}px`
4989
4987
  }), d.arrow) {
4990
4988
  const x = d.arrow;
4991
4989
  ["left", "left-start", "left-end"].includes(f) ? Object.assign(this.arrowEl.style, {
@@ -5021,11 +5019,13 @@ let $i = class {
5021
5019
  };
5022
5020
  class qi {
5023
5021
  constructor(t) {
5024
- l(this, "editorEl");
5025
- l(this, "inputEl");
5026
- l(this, "enable", !1);
5027
- l(this, "cellTarget", null);
5028
- l(this, "ctx");
5022
+ h(this, "editorEl");
5023
+ h(this, "inputEl");
5024
+ h(this, "enable", !1);
5025
+ h(this, "cellTarget", null);
5026
+ h(this, "ctx");
5027
+ h(this, "drawY", 0);
5028
+ h(this, "drawX", 0);
5029
5029
  this.ctx = t, this.initTextEditor(), this.init();
5030
5030
  }
5031
5031
  init() {
@@ -5091,50 +5091,41 @@ class qi {
5091
5091
  }), this.editorEl = this.ctx.editorElement, this.inputEl.className = "e-virt-table-editor-textarea", this.editorEl.appendChild(this.inputEl), this.ctx.containerElement.appendChild(this.editorEl);
5092
5092
  }
5093
5093
  autoSize() {
5094
- const t = this.inputEl.scrollHeight;
5095
- this.inputEl.style.height = "auto", this.inputEl.style.height = `${t}px`;
5094
+ let t = this.inputEl.scrollHeight;
5095
+ this.inputEl.style.height = "auto";
5096
+ let e = this.ctx.body.visibleHeight;
5097
+ t > e && (t = e);
5098
+ const {
5099
+ stageHeight: i,
5100
+ footer: s,
5101
+ header: r,
5102
+ config: { SCROLLER_TRACK_SIZE: o }
5103
+ } = this.ctx, a = i - s.height - o;
5104
+ this.editorEl.style.bottom = "auto", (this.drawY + t > a || this.drawY < r.height) && (this.editorEl.style.left = `${this.drawX}px`, this.editorEl.style.top = "auto", this.editorEl.style.bottom = `${i - a}px`), this.inputEl.style.height = `${t}px`;
5096
5105
  }
5097
5106
  startEditByInput(t) {
5098
- const e = t.getValue(), { width: i } = t, s = t.getDrawX();
5099
- let r = t.getDrawY(), { height: o } = t;
5107
+ const e = t.getValue(), { width: i, editorType: s } = t, r = t.getDrawX();
5108
+ let o = t.getDrawY();
5109
+ this.drawX = r, this.drawY = o;
5110
+ let { height: a } = t;
5100
5111
  const {
5101
- config: { CELL_PADDING: a }
5112
+ config: { CELL_PADDING: l },
5113
+ header: c
5102
5114
  } = this.ctx;
5103
- let c = window.innerHeight / 2;
5104
- c > this.ctx.body.visibleHeight && (c = this.ctx.body.visibleHeight);
5105
- const { left: h, top: f } = this.ctx.containerElement.getBoundingClientRect(), d = f + r - 1.5, x = h + s - 1.5, u = {
5106
- getBoundingClientRect: () => ({
5107
- x: 0,
5108
- y: 0,
5109
- width: 0,
5110
- height: 0,
5111
- top: d,
5112
- left: x,
5113
- right: 0,
5114
- bottom: 0
5115
- }),
5116
- contextElement: document.body
5117
- };
5118
- if (Nt(u, this.editorEl, {
5119
- placement: "right-start",
5120
- middleware: [Xt(), Ft(), kt()]
5121
- }).then(({ x: g, y: w }) => {
5122
- this.editorEl.style.left = `${g}px`, this.editorEl.style.top = `${w}px`;
5123
- }), t.editorType !== "text") {
5115
+ let f = this.ctx.body.visibleHeight;
5116
+ if (a > f && (a = f), this.editorEl.style.left = `${r}px`, this.editorEl.style.top = `${o}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxHeight = `${f}px`, s === "text") {
5117
+ this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${i - 1}px`, this.inputEl.style.minHeight = `${a - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${i - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${l}px`, e !== null && (this.inputEl.value = e), this.inputEl.focus();
5118
+ const d = this.inputEl.value.length;
5119
+ this.inputEl.setSelectionRange(d, d);
5120
+ } else
5124
5121
  this.inputEl.style.display = "none";
5125
- return;
5126
- }
5127
- this.inputEl.style.display = "block", this.inputEl.style.minWidth = `${i - 1}px`, this.inputEl.style.minHeight = `${o - 1}px`, this.inputEl.style.maxHeight = `${c}px`, this.inputEl.style.width = `${i - 1}px`, this.inputEl.style.height = `${o - 1}px`, this.inputEl.style.padding = `${a}px`, e !== null && (this.inputEl.value = e), requestAnimationFrame(() => {
5128
- this.inputEl.focus();
5129
- const g = this.inputEl.value.length;
5130
- this.inputEl.setSelectionRange(g, g), this.inputEl.scrollHeight > o && this.autoSize();
5131
- });
5122
+ (this.inputEl.scrollHeight > a || o < c.height) && this.autoSize();
5132
5123
  }
5133
5124
  doneEditByInput() {
5134
- if (!this.cellTarget || (this.editorEl.style.left = "-10000px", this.editorEl.style.top = "-10000px", this.cellTarget.editorType !== "text"))
5135
- return;
5136
- const { rowKey: t, key: e } = this.cellTarget, i = this.cellTarget.getValue(), s = this.inputEl.value;
5137
- s !== i && !(s === "" && i === null) && this.ctx.database.setItemValue(t, e, s, !0, !0, !0), this.inputEl.value = "";
5125
+ if (this.cellTarget && (this.editorEl.style.left = "-10000px", this.editorEl.style.top = "-10000px", this.editorEl.style.bottom = "atuo", this.cellTarget.editorType === "text")) {
5126
+ const { rowKey: t, key: e } = this.cellTarget, i = this.cellTarget.getValue(), s = this.inputEl.value;
5127
+ s !== i && !(s === "" && i === null) && this.ctx.database.setItemValue(t, e, s, !0, !0, !0), this.inputEl.value = "";
5128
+ }
5138
5129
  }
5139
5130
  startEdit() {
5140
5131
  const { ENABLE_EDIT_CLICK_SELECTOR: t } = this.ctx.config;
@@ -5147,21 +5138,21 @@ class qi {
5147
5138
  e && !r && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = e, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
5148
5139
  }
5149
5140
  editCell(t, e) {
5150
- const i = this.ctx.body.renderRows.find((h) => h.rowIndex === t);
5141
+ const i = this.ctx.body.renderRows.find((c) => c.rowIndex === t);
5151
5142
  if (!i)
5152
5143
  return;
5153
- const s = i.cells.find((h) => h.colIndex === e);
5144
+ const s = i.cells.find((c) => c.colIndex === e);
5154
5145
  if (!s)
5155
5146
  return;
5156
5147
  this.ctx.emit("setSelectorCell", s);
5157
5148
  const r = this.ctx.focusCell;
5158
5149
  if (!r || ["index", "index-selection", "selection"].includes(r.type) || this.enable)
5159
5150
  return;
5160
- const { rowKey: o, key: a } = r, c = this.ctx.database.getReadonly(o, a);
5161
- r && !c && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = r, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
5151
+ const { rowKey: o, key: a } = r, l = this.ctx.database.getReadonly(o, a);
5152
+ r && !l && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = r, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
5162
5153
  }
5163
5154
  doneEdit() {
5164
- this.enable && this.cellTarget && (this.ctx.emit("doneEdit", this.cellTarget), this.doneEditByInput(), this.enable = !1, this.ctx.stageElement.focus(), this.ctx.editing = !1, this.cellTarget = null, this.ctx.emit("draw"));
5155
+ this.enable && this.cellTarget && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.stageElement.focus(), this.ctx.editing = !1, this.cellTarget = null, this.ctx.emit("draw"));
5165
5156
  }
5166
5157
  destroy() {
5167
5158
  var t;
@@ -5170,14 +5161,14 @@ class qi {
5170
5161
  }
5171
5162
  class Gi {
5172
5163
  constructor(t) {
5173
- l(this, "ctx");
5174
- l(this, "emptyEl");
5164
+ h(this, "ctx");
5165
+ h(this, "emptyEl");
5175
5166
  this.ctx = t;
5176
5167
  const { EMPTY_TEXT: e, EMPTY_CUSTOM: i, EMPTY_CUSTOM_STYLE: s, CSS_PREFIX: r } = this.ctx.config;
5177
- this.emptyEl = document.createElement("div"), this.emptyEl.className = `${r}-empty`, this.emptyEl.style.display = "none", this.emptyEl.innerText = e, this.ctx.containerElement.appendChild(this.emptyEl), this.ctx.on("emptyChange", ({ type: o, headerHeight: a, bodyHeight: c, footerHeight: h }) => {
5168
+ this.emptyEl = document.createElement("div"), this.emptyEl.className = `${r}-empty`, this.emptyEl.style.display = "none", this.emptyEl.innerText = e, this.ctx.containerElement.appendChild(this.emptyEl), this.ctx.on("emptyChange", ({ type: o, headerHeight: a, bodyHeight: l, footerHeight: c }) => {
5178
5169
  if (i)
5179
5170
  return;
5180
- const f = a + (c + h) / 2, d = {
5171
+ const f = a + (l + c) / 2, d = {
5181
5172
  display: o === "empty" ? "block" : "none",
5182
5173
  position: "absolute",
5183
5174
  fontSize: "14px",
@@ -5196,7 +5187,7 @@ class Gi {
5196
5187
  }
5197
5188
  class ji {
5198
5189
  constructor(t) {
5199
- l(this, "ctx");
5190
+ h(this, "ctx");
5200
5191
  this.ctx = t;
5201
5192
  }
5202
5193
  draw() {
@@ -5210,26 +5201,11 @@ class ji {
5210
5201
  });
5211
5202
  }
5212
5203
  getContainer() {
5213
- const {
5214
- stageWidth: t,
5215
- stageHeight: e,
5216
- config: { SCROLLER_TRACK_SIZE: i }
5217
- } = this.ctx, s = t - i, r = e - i, o = this.getHeader(), a = this.getBody(), c = this.getFooter();
5218
- let h = [o, a, c];
5219
- const { FOOTER_FIXED: f } = this.ctx.config;
5220
- return f || (h = [o, a]), {
5221
- style: {
5222
- position: "absolute",
5223
- left: "0px",
5224
- top: "0px",
5225
- userSelect: "none",
5226
- overflow: "hidden",
5227
- width: `${s}px`,
5228
- height: `${r}px`,
5229
- zIndex: 10
5230
- },
5231
- class: "e-virt-table-overlayer",
5232
- views: h
5204
+ const t = this.getHeader(), e = this.getBody(), i = this.getFooter();
5205
+ let s = [t, e, i];
5206
+ const { FOOTER_FIXED: r } = this.ctx.config;
5207
+ return r || (s = [t, e]), {
5208
+ views: s
5233
5209
  };
5234
5210
  }
5235
5211
  getHeader() {
@@ -5238,9 +5214,9 @@ class ji {
5238
5214
  fixedRightWidth: e,
5239
5215
  config: { SCROLLER_TRACK_SIZE: i, CSS_PREFIX: s }
5240
5216
  } = this.ctx, { visibleWidth: r, visibleHeight: o, renderCellHeaders: a } = this.ctx.header;
5241
- let c = [], h = [], f = [];
5217
+ let l = [], c = [], f = [];
5242
5218
  a.forEach((p) => {
5243
- p.render && (p.fixed === "left" ? h.push(p) : p.fixed === "right" ? f.push(p) : c.push(p));
5219
+ p.render && (p.fixed === "left" ? c.push(p) : p.fixed === "right" ? f.push(p) : l.push(p));
5244
5220
  });
5245
5221
  const d = e - i, x = {
5246
5222
  key: "left",
@@ -5252,7 +5228,7 @@ class ji {
5252
5228
  width: `${t}px`,
5253
5229
  height: `${o}px`
5254
5230
  },
5255
- cells: h
5231
+ cells: c
5256
5232
  }, u = {
5257
5233
  key: "center",
5258
5234
  style: {
@@ -5263,7 +5239,7 @@ class ji {
5263
5239
  width: `${r - t - d + 1}px`,
5264
5240
  height: `${o}px`
5265
5241
  },
5266
- cells: c
5242
+ cells: l
5267
5243
  }, g = {
5268
5244
  key: "right",
5269
5245
  style: {
@@ -5299,8 +5275,8 @@ class ji {
5299
5275
  const {
5300
5276
  fixedLeftWidth: r,
5301
5277
  fixedRightWidth: o,
5302
- config: { SCROLLER_TRACK_SIZE: a, CSS_PREFIX: c }
5303
- } = this.ctx, { visibleWidth: h, visibleHeight: f } = this.ctx.body, d = o - a, x = {
5278
+ config: { SCROLLER_TRACK_SIZE: a, CSS_PREFIX: l }
5279
+ } = this.ctx, { visibleWidth: c, visibleHeight: f } = this.ctx.body, d = o - a, x = {
5304
5280
  key: "left",
5305
5281
  style: {
5306
5282
  position: "absolute",
@@ -5318,7 +5294,7 @@ class ji {
5318
5294
  top: `${0.5}px`,
5319
5295
  left: `${r - 0.5}px`,
5320
5296
  overflow: "hidden",
5321
- width: `${h - r - d}px`,
5297
+ width: `${c - r - d}px`,
5322
5298
  height: `${f}px`
5323
5299
  },
5324
5300
  cells: t
@@ -5336,11 +5312,11 @@ class ji {
5336
5312
  };
5337
5313
  return {
5338
5314
  type: "body",
5339
- class: `${c}-overlayer-body`,
5315
+ class: `${l}-overlayer-body`,
5340
5316
  style: {
5341
5317
  position: "relative",
5342
5318
  overflow: "hidden",
5343
- width: `${h}px`,
5319
+ width: `${c}px`,
5344
5320
  height: `${f}px`
5345
5321
  },
5346
5322
  views: [x, u, g]
@@ -5357,7 +5333,7 @@ class ji {
5357
5333
  fixedLeftWidth: s,
5358
5334
  fixedRightWidth: r,
5359
5335
  config: { SCROLLER_TRACK_SIZE: o, CSS_PREFIX: a }
5360
- } = this.ctx, { visibleWidth: c, visibleHeight: h } = this.ctx.footer, f = r - o, d = {
5336
+ } = this.ctx, { visibleWidth: l, visibleHeight: c } = this.ctx.footer, f = r - o, d = {
5361
5337
  key: "left",
5362
5338
  style: {
5363
5339
  position: "absolute",
@@ -5365,7 +5341,7 @@ class ji {
5365
5341
  left: `${0.5}px`,
5366
5342
  overflow: "hidden",
5367
5343
  width: `${s}px`,
5368
- height: `${h}px`
5344
+ height: `${c}px`
5369
5345
  },
5370
5346
  cells: e
5371
5347
  }, x = {
@@ -5375,8 +5351,8 @@ class ji {
5375
5351
  top: `${0.5}px`,
5376
5352
  left: `${s - 0.5}px`,
5377
5353
  overflow: "hidden",
5378
- width: `${c - s - f}px`,
5379
- height: `${h}px`
5354
+ width: `${l - s - f}px`,
5355
+ height: `${c}px`
5380
5356
  },
5381
5357
  cells: t
5382
5358
  }, u = {
@@ -5387,7 +5363,7 @@ class ji {
5387
5363
  right: `${0.5}px`,
5388
5364
  overflow: "hidden",
5389
5365
  width: `${f}px`,
5390
- height: `${h}px`
5366
+ height: `${c}px`
5391
5367
  },
5392
5368
  cells: i
5393
5369
  };
@@ -5397,8 +5373,8 @@ class ji {
5397
5373
  style: {
5398
5374
  position: "relative",
5399
5375
  overflow: "hidden",
5400
- width: `${c}px`,
5401
- height: `${h}px`
5376
+ width: `${l}px`,
5377
+ height: `${c}px`
5402
5378
  },
5403
5379
  views: [d, x, u]
5404
5380
  };
@@ -5406,16 +5382,16 @@ class ji {
5406
5382
  }
5407
5383
  class Ui {
5408
5384
  constructor(t) {
5409
- l(this, "ctx");
5410
- l(this, "contextMenuEl");
5385
+ h(this, "ctx");
5386
+ h(this, "contextMenuEl");
5411
5387
  this.ctx = t, this.contextMenuEl = document.createElement("div"), this.createContextMenu(), this.init();
5412
5388
  }
5413
5389
  init() {
5414
5390
  this.ctx.on("cellContextMenuClick", (t, e) => {
5415
5391
  if (!this.ctx.config.ENABLE_CONTEXT_MENU) return;
5416
5392
  e.preventDefault();
5417
- const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [a, c] = s, { rowIndex: h, colIndex: f } = t;
5418
- h >= a && h <= c && f >= r && f <= o || this.ctx.emit("setSelectorCell", t, e);
5393
+ const { xArr: i, yArr: s } = this.ctx.selector, [r, o] = i, [a, l] = s, { rowIndex: c, colIndex: f } = t;
5394
+ c >= a && c <= l && f >= r && f <= o || this.ctx.emit("setSelectorCell", t, e);
5419
5395
  const x = {
5420
5396
  getBoundingClientRect: () => ({
5421
5397
  width: 0,
@@ -5429,9 +5405,9 @@ class Ui {
5429
5405
  }),
5430
5406
  contextElement: document.body
5431
5407
  };
5432
- Nt(x, this.contextMenuEl, {
5408
+ pe(x, this.contextMenuEl, {
5433
5409
  placement: "right-start",
5434
- middleware: [Xt(), Ft(), kt()]
5410
+ middleware: [ue(), ge(), we()]
5435
5411
  }).then(({ x: u, y: g }) => {
5436
5412
  this.show(u, g);
5437
5413
  });
@@ -5489,22 +5465,22 @@ class Ui {
5489
5465
  }
5490
5466
  class Qi {
5491
5467
  constructor(t, e) {
5492
- l(this, "options");
5493
- l(this, "scroller");
5494
- l(this, "header");
5495
- l(this, "body");
5496
- l(this, "footer");
5497
- l(this, "selector");
5498
- l(this, "autofill");
5499
- l(this, "tooltip");
5500
- l(this, "editor");
5501
- l(this, "empty");
5502
- l(this, "overlayer");
5503
- l(this, "contextMenu");
5504
- l(this, "ctx");
5468
+ h(this, "options");
5469
+ h(this, "scroller");
5470
+ h(this, "header");
5471
+ h(this, "body");
5472
+ h(this, "footer");
5473
+ h(this, "selector");
5474
+ h(this, "autofill");
5475
+ h(this, "tooltip");
5476
+ h(this, "editor");
5477
+ h(this, "empty");
5478
+ h(this, "overlayer");
5479
+ h(this, "contextMenu");
5480
+ h(this, "ctx");
5505
5481
  this.options = e;
5506
5482
  const { overlayerElement: i, editorElement: s } = e, r = this.createContainer(t, i, s);
5507
- this.ctx = new ci(r, this.options), this.header = new di(this.ctx), this.body = new fi(this.ctx), this.footer = new xi(this.ctx), this.scroller = new hi(this.ctx), this.selector = new ui(this.ctx), this.autofill = new gi(this.ctx), this.tooltip = new $i(this.ctx), this.empty = new Gi(this.ctx), this.editor = new qi(this.ctx), this.overlayer = new ji(this.ctx), this.contextMenu = new Ui(this.ctx), this.ctx.on("draw", () => {
5483
+ this.ctx = new li(r, this.options), this.header = new di(this.ctx), this.body = new fi(this.ctx), this.footer = new xi(this.ctx), this.scroller = new ci(this.ctx), this.selector = new ui(this.ctx), this.autofill = new gi(this.ctx), this.tooltip = new $i(this.ctx), this.empty = new Gi(this.ctx), this.editor = new qi(this.ctx), this.overlayer = new ji(this.ctx), this.contextMenu = new Ui(this.ctx), this.ctx.on("draw", () => {
5508
5484
  this.draw();
5509
5485
  }), this.ctx.on("drawView", () => {
5510
5486
  this.draw(!0);
@@ -5585,8 +5561,8 @@ class Qi {
5585
5561
  if (t && Array.isArray(s) && s.length) {
5586
5562
  const [r] = s;
5587
5563
  if (Array.isArray(r) && r.length) {
5588
- const [o] = r, { rowKey: a, key: c } = o;
5589
- this.scrollToRowkey(a), this.scrollToColkey(c);
5564
+ const [o] = r, { rowKey: a, key: l } = o;
5565
+ this.scrollToRowkey(a), this.scrollToColkey(l);
5590
5566
  }
5591
5567
  }
5592
5568
  i(s);
@@ -5611,7 +5587,7 @@ class Qi {
5611
5587
  let r = [];
5612
5588
  for (let o = 0; o < i.length; o++)
5613
5589
  for (let a = 0; a < s.length; a++) {
5614
- const c = this.ctx.database.getRowKeyByItem(i[o]), f = s[a].key, d = await this.ctx.database.getValidator(c, f);
5590
+ const l = this.ctx.database.getRowKeyByItem(i[o]), f = s[a].key, d = await this.ctx.database.getValidator(l, f);
5615
5591
  Array.isArray(d) && d.length && r.push(d);
5616
5592
  }
5617
5593
  r.length ? (e(r), this.ctx.emit("draw")) : (t([]), this.ctx.emit("draw"));