e-virt-table 1.0.4 → 1.0.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
@@ -2,23 +2,23 @@
2
2
  var Ce = Object.defineProperty;
3
3
  var be = (a, t, e) => t in a ? Ce(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
4
4
  var l = (a, t, e) => be(a, typeof t != "symbol" ? t + "" : t, e);
5
- function q() {
6
- return q = Object.assign ? Object.assign.bind() : function(a) {
5
+ function G() {
6
+ return G = Object.assign ? Object.assign.bind() : function(a) {
7
7
  for (var t = 1; t < arguments.length; t++) {
8
8
  var e = arguments[t];
9
9
  for (var i in e)
10
10
  Object.prototype.hasOwnProperty.call(e, i) && (a[i] = e[i]);
11
11
  }
12
12
  return a;
13
- }, q.apply(this, arguments);
13
+ }, G.apply(this, arguments);
14
14
  }
15
15
  function ve(a, t) {
16
16
  a.prototype = Object.create(t.prototype), a.prototype.constructor = a, st(a, t);
17
17
  }
18
- function mt(a) {
19
- return mt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
18
+ function Et(a) {
19
+ return Et = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
20
20
  return e.__proto__ || Object.getPrototypeOf(e);
21
- }, mt(a);
21
+ }, Et(a);
22
22
  }
23
23
  function st(a, t) {
24
24
  return st = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(i, s) {
@@ -57,7 +57,7 @@ function Ct(a) {
57
57
  t.set(i, s);
58
58
  }
59
59
  function s() {
60
- return dt(i, arguments, mt(this).constructor);
60
+ return dt(i, arguments, Et(this).constructor);
61
61
  }
62
62
  return s.prototype = Object.create(i.prototype, {
63
63
  constructor: {
@@ -122,7 +122,7 @@ function Oe(a) {
122
122
  function H(a, t) {
123
123
  return !!(a == null || t === "array" && Array.isArray(a) && !a.length || Oe(t) && typeof a == "string" && !a);
124
124
  }
125
- function Ae(a, t, e) {
125
+ function Se(a, t, e) {
126
126
  var i = [], s = 0, r = a.length;
127
127
  function o(n) {
128
128
  i.push.apply(i, n || []), s++, s === r && e(i);
@@ -131,7 +131,7 @@ function Ae(a, t, e) {
131
131
  t(n, o);
132
132
  });
133
133
  }
134
- function kt(a, t, e) {
134
+ function Xt(a, t, e) {
135
135
  var i = 0, s = a.length;
136
136
  function r(o) {
137
137
  if (o && o.length) {
@@ -149,7 +149,7 @@ function Le(a) {
149
149
  t.push.apply(t, a[e] || []);
150
150
  }), t;
151
151
  }
152
- var Xt = /* @__PURE__ */ function(a) {
152
+ var kt = /* @__PURE__ */ function(a) {
153
153
  ve(t, a);
154
154
  function t(e, i) {
155
155
  var s;
@@ -157,13 +157,13 @@ var Xt = /* @__PURE__ */ function(a) {
157
157
  }
158
158
  return t;
159
159
  }(/* @__PURE__ */ Ct(Error));
160
- function Se(a, t, e, i, s) {
160
+ function Ae(a, t, e, i, s) {
161
161
  if (t.first) {
162
162
  var r = new Promise(function(u, x) {
163
163
  var p = function(y) {
164
- return i(y), y.length ? x(new Xt(y, bt(y))) : u(s);
164
+ return i(y), y.length ? x(new kt(y, bt(y))) : u(s);
165
165
  }, g = Le(a);
166
- kt(g, e, p);
166
+ Xt(g, e, p);
167
167
  });
168
168
  return r.catch(function(u) {
169
169
  return u;
@@ -172,11 +172,11 @@ function Se(a, t, e, i, s) {
172
172
  var o = t.firstFields === !0 ? Object.keys(a) : t.firstFields || [], n = Object.keys(a), h = n.length, c = 0, d = [], f = new Promise(function(u, x) {
173
173
  var p = function(w) {
174
174
  if (d.push.apply(d, w), c++, c === h)
175
- return i(d), d.length ? x(new Xt(d, bt(d))) : u(s);
175
+ return i(d), d.length ? x(new kt(d, bt(d))) : u(s);
176
176
  };
177
177
  n.length || (i(d), u(s)), n.forEach(function(g) {
178
178
  var w = a[g];
179
- o.indexOf(g) !== -1 ? kt(w, e, p) : Ae(w, e, p);
179
+ o.indexOf(g) !== -1 ? Xt(w, e, p) : Se(w, e, p);
180
180
  });
181
181
  });
182
182
  return f.catch(function(u) {
@@ -209,7 +209,7 @@ function Kt(a, t) {
209
209
  for (var e in t)
210
210
  if (t.hasOwnProperty(e)) {
211
211
  var i = t[e];
212
- typeof i == "object" && typeof a[e] == "object" ? a[e] = q({}, a[e], i) : a[e] = i;
212
+ typeof i == "object" && typeof a[e] == "object" ? a[e] = G({}, a[e], i) : a[e] = i;
213
213
  }
214
214
  }
215
215
  return a;
@@ -237,13 +237,13 @@ var Ut = function(t, e, i, s, r, o) {
237
237
  `).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), r = new RegExp("(?:^" + e + "$)|(?:^" + s + "$)"), o = new RegExp("^" + e + "$"), n = new RegExp("^" + s + "$"), h = function(C) {
238
238
  return C && C.exact ? r : new RegExp("(?:" + t(C) + e + t(C) + ")|(?:" + t(C) + s + t(C) + ")", "g");
239
239
  };
240
- h.v4 = function(E) {
241
- return E && E.exact ? o : new RegExp("" + t(E) + e + t(E), "g");
242
- }, h.v6 = function(E) {
243
- return E && E.exact ? n : new RegExp("" + t(E) + s + t(E), "g");
240
+ h.v4 = function(m) {
241
+ return m && m.exact ? o : new RegExp("" + t(m) + e + t(m), "g");
242
+ }, h.v6 = function(m) {
243
+ return m && m.exact ? n : new RegExp("" + t(m) + s + t(m), "g");
244
244
  };
245
- var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", f = h.v4().source, u = h.v6().source, x = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", g = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", y = '(?:[/?#][^\\s"]*)?', m = "(?:" + c + "|www\\.)" + d + "(?:localhost|" + f + "|" + u + "|" + x + p + g + ")" + w + y;
246
- return ct = new RegExp("(?:^" + m + "$)", "i"), ct;
245
+ var c = "(?:(?:[a-z]+:)?//)", d = "(?:\\S+(?::\\S*)?@)?", f = h.v4().source, u = h.v6().source, x = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", p = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", g = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", w = "(?::\\d{2,5})?", y = '(?:[/?#][^\\s"]*)?', E = "(?:" + c + "|www\\.)" + d + "(?:localhost|" + f + "|" + u + "|" + x + p + g + ")" + w + y;
246
+ return ct = new RegExp("(?:^" + E + "$)", "i"), ct;
247
247
  }, Bt = {
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,}))$/,
@@ -299,12 +299,12 @@ var Ut = function(t, e, i, s, r, o) {
299
299
  }
300
300
  var o = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], n = t.type;
301
301
  o.indexOf(n) > -1 ? et[n](e) || s.push(D(r.messages.types[n], t.fullField, t.type)) : n && typeof e !== t.type && s.push(D(r.messages.types[n], t.fullField, t.type));
302
- }, ke = function(t, e, i, s, r) {
302
+ }, Xe = function(t, e, i, s, r) {
303
303
  var o = typeof t.len == "number", n = typeof t.min == "number", h = typeof t.max == "number", c = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, d = e, f = null, u = typeof e == "number", x = typeof e == "string", p = Array.isArray(e);
304
304
  if (u ? f = "number" : x ? f = "string" : p && (f = "array"), !f)
305
305
  return !1;
306
306
  p && (d = e.length), x && (d = e.replace(c, "_").length), o ? d !== t.len && s.push(D(r.messages[f].len, t.fullField, t.len)) : n && !h && d < t.min ? s.push(D(r.messages[f].min, t.fullField, t.min)) : h && !n && d > t.max ? s.push(D(r.messages[f].max, t.fullField, t.max)) : n && h && (d < t.min || d > t.max) && s.push(D(r.messages[f].range, t.fullField, t.min, t.max));
307
- }, j = "enum", Xe = function(t, e, i, s, r) {
307
+ }, j = "enum", ke = function(t, e, i, s, r) {
308
308
  t[j] = Array.isArray(t[j]) ? t[j] : [], t[j].indexOf(e) === -1 && s.push(D(r.messages[j], t.fullField, t[j].join(", ")));
309
309
  }, Ne = function(t, e, i, s, r) {
310
310
  if (t.pattern) {
@@ -319,8 +319,8 @@ var Ut = function(t, e, i, s, r, o) {
319
319
  required: Ut,
320
320
  whitespace: He,
321
321
  type: Fe,
322
- range: ke,
323
- enum: Xe,
322
+ range: Xe,
323
+ enum: ke,
324
324
  pattern: Ne
325
325
  }, Ke = function(t, e, i, s, r) {
326
326
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
@@ -386,7 +386,7 @@ var Ut = function(t, e, i, s, r, o) {
386
386
  _.required(t, e, s, o, r, "array"), e != null && (_.type(t, e, s, o, r), _.range(t, e, s, o, r));
387
387
  }
388
388
  i(o);
389
- }, qe = function(t, e, i, s, r) {
389
+ }, Ge = function(t, e, i, s, r) {
390
390
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
391
391
  if (n) {
392
392
  if (H(e) && !t.required)
@@ -394,12 +394,12 @@ var Ut = function(t, e, i, s, r, o) {
394
394
  _.required(t, e, s, o, r), e !== void 0 && _.type(t, e, s, o, r);
395
395
  }
396
396
  i(o);
397
- }, Ge = "enum", je = function(t, e, i, s, r) {
397
+ }, qe = "enum", je = function(t, e, i, s, r) {
398
398
  var o = [], n = t.required || !t.required && s.hasOwnProperty(t.field);
399
399
  if (n) {
400
400
  if (H(e) && !t.required)
401
401
  return i();
402
- _.required(t, e, s, o, r), e !== void 0 && _[Ge](t, e, s, o, r);
402
+ _.required(t, e, s, o, r), e !== void 0 && _[qe](t, e, s, o, r);
403
403
  }
404
404
  i(o);
405
405
  }, Ue = function(t, e, i, s, r) {
@@ -449,7 +449,7 @@ var Ut = function(t, e, i, s, r, o) {
449
449
  integer: Pe,
450
450
  float: ze,
451
451
  array: $e,
452
- object: qe,
452
+ object: Ge,
453
453
  enum: je,
454
454
  pattern: Ue,
455
455
  date: Ze,
@@ -538,15 +538,15 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
538
538
  return c && c(null, n), Promise.resolve(n);
539
539
  function d(g) {
540
540
  var w = [], y = {};
541
- function m(C) {
541
+ function E(C) {
542
542
  if (Array.isArray(C)) {
543
543
  var b;
544
544
  w = (b = w).concat.apply(b, C);
545
545
  } else
546
546
  w.push(C);
547
547
  }
548
- for (var E = 0; E < g.length; E++)
549
- m(g[E]);
548
+ for (var m = 0; m < g.length; m++)
549
+ E(g[m]);
550
550
  w.length ? (y = bt(w), c(w, y)) : c(null, n);
551
551
  }
552
552
  if (h.messages) {
@@ -557,12 +557,12 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
557
557
  var u = {}, x = h.keys || Object.keys(this.rules);
558
558
  x.forEach(function(g) {
559
559
  var w = o.rules[g], y = n[g];
560
- w.forEach(function(m) {
561
- var E = m;
562
- typeof E.transform == "function" && (n === i && (n = q({}, n)), y = n[g] = E.transform(y)), typeof E == "function" ? E = {
563
- validator: E
564
- } : E = q({}, E), E.validator = o.getValidationMethod(E), E.validator && (E.field = g, E.fullField = E.fullField || g, E.type = o.getType(E), u[g] = u[g] || [], u[g].push({
565
- rule: E,
560
+ w.forEach(function(E) {
561
+ var m = E;
562
+ typeof m.transform == "function" && (n === i && (n = G({}, n)), y = n[g] = m.transform(y)), typeof m == "function" ? m = {
563
+ validator: m
564
+ } : m = G({}, m), m.validator = o.getValidationMethod(m), m.validator && (m.field = g, m.fullField = m.fullField || g, m.type = o.getType(m), u[g] = u[g] || [], u[g].push({
565
+ rule: m,
566
566
  value: y,
567
567
  source: n,
568
568
  field: g
@@ -570,23 +570,23 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
570
570
  });
571
571
  });
572
572
  var p = {};
573
- return Se(u, h, function(g, w) {
574
- var y = g.rule, m = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
575
- m = m && (y.required || !y.required && g.value), y.field = g.field;
576
- function E(R, A) {
577
- return q({}, A, {
573
+ return Ae(u, h, function(g, w) {
574
+ var y = g.rule, E = (y.type === "object" || y.type === "array") && (typeof y.fields == "object" || typeof y.defaultField == "object");
575
+ E = E && (y.required || !y.required && g.value), y.field = g.field;
576
+ function m(R, S) {
577
+ return G({}, S, {
578
578
  fullField: y.fullField + "." + R,
579
579
  fullFields: y.fullFields ? [].concat(y.fullFields, [R]) : [R]
580
580
  });
581
581
  }
582
582
  function C(R) {
583
583
  R === void 0 && (R = []);
584
- var A = Array.isArray(R) ? R : [R];
585
- !h.suppressWarning && A.length && a.warning("async-validator:", A), A.length && y.message !== void 0 && (A = [].concat(y.message));
586
- var L = A.map(Nt(y, n));
584
+ var S = Array.isArray(R) ? R : [R];
585
+ !h.suppressWarning && S.length && a.warning("async-validator:", S), S.length && y.message !== void 0 && (S = [].concat(y.message));
586
+ var L = S.map(Nt(y, n));
587
587
  if (h.first && L.length)
588
588
  return p[y.field] = 1, w(L);
589
- if (!m)
589
+ if (!E)
590
590
  w(L);
591
591
  else {
592
592
  if (y.required && !g.value)
@@ -594,14 +594,14 @@ var Rt = vt(), nt = /* @__PURE__ */ function() {
594
594
  var I = {};
595
595
  y.defaultField && Object.keys(g.value).map(function(O) {
596
596
  I[O] = y.defaultField;
597
- }), I = q({}, I, g.rule.fields);
597
+ }), I = G({}, I, g.rule.fields);
598
598
  var v = {};
599
599
  Object.keys(I).forEach(function(O) {
600
600
  var M = I[O], T = Array.isArray(M) ? M : [M];
601
- v[O] = T.map(E.bind(null, O));
601
+ v[O] = T.map(m.bind(null, O));
602
602
  });
603
- var S = new a(v);
604
- S.messages(h.messages), g.rule.options && (g.rule.options.messages = h.messages, g.rule.options.error = h.error), S.validate(g.value, g.rule.options || h, function(O) {
603
+ var A = new a(v);
604
+ A.messages(h.messages), g.rule.options && (g.rule.options.messages = h.messages, g.rule.options.error = h.error), A.validate(g.value, g.rule.options || h, function(O) {
605
605
  var M = [];
606
606
  L && L.length && M.push.apply(M, L), O && O.length && M.push.apply(M, O), w(M.length ? M : null);
607
607
  });
@@ -1046,18 +1046,18 @@ class Tt extends se {
1046
1046
  HIGHLIGHT_HOVER_ROW_COLOR: f
1047
1047
  } = this.ctx.config;
1048
1048
  if (this.cellType === "footer") {
1049
- let y = n, m = o;
1049
+ let y = n, E = o;
1050
1050
  if (typeof r == "function") {
1051
- const E = r, { backgroundColor: C, color: b } = E({
1051
+ const m = r, { backgroundColor: C, color: b } = m({
1052
1052
  row: this.row,
1053
1053
  rowIndex: this.rowIndex,
1054
1054
  colIndex: this.colIndex,
1055
1055
  column: this.column,
1056
1056
  value: this.getValue()
1057
1057
  }) || {};
1058
- C && (y = C), b && (m = b);
1058
+ C && (y = C), b && (E = b);
1059
1059
  }
1060
- this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = y, this.drawTextColor = m;
1060
+ this.drawCellSkyBgColor = "transparent", this.drawCellBgColor = y, this.drawTextColor = E;
1061
1061
  return;
1062
1062
  }
1063
1063
  let u = "transparent";
@@ -1069,7 +1069,7 @@ class Tt extends se {
1069
1069
  return;
1070
1070
  }
1071
1071
  if (this.ctx.database.getReadonly(this.rowKey, this.key) || (g = i, w = o), typeof s == "function") {
1072
- const y = s, { backgroundColor: m, color: E } = y({
1072
+ const y = s, { backgroundColor: E, color: m } = y({
1073
1073
  row: this.row,
1074
1074
  rowIndex: this.rowIndex,
1075
1075
  colIndex: this.colIndex,
@@ -1077,7 +1077,7 @@ class Tt extends se {
1077
1077
  isHasChanged: this.isHasChanged,
1078
1078
  value: this.getValue()
1079
1079
  }) || {};
1080
- m && (g = m), E && (w = E);
1080
+ E && (g = E), m && (w = m);
1081
1081
  }
1082
1082
  this.drawCellBgColor = g, this.drawTextColor = w;
1083
1083
  }
@@ -1248,23 +1248,31 @@ class Tt extends se {
1248
1248
  xArr: r,
1249
1249
  yArr: o,
1250
1250
  borderColor: this.ctx.config.SELECT_BORDER_COLOR || "rgb(82,146,247)",
1251
- fillColor: this.ctx.config.SELECT_AREA_COLOR || "rgba(82,146,247,0.1)",
1251
+ fillColor: "transparent",
1252
1252
  borderWidth: 1,
1253
1253
  lineDash: [4, 4]
1254
1254
  }), this.drawBorder({
1255
1255
  xArr: this.ctx.autofill.xArr,
1256
1256
  yArr: this.ctx.autofill.yArr,
1257
1257
  borderColor: this.ctx.config.SELECT_BORDER_COLOR || "rgb(82,146,247)",
1258
- fillColor: this.ctx.config.SELECT_AREA_COLOR || "rgba(82,146,247,0.1)",
1258
+ fillColor: "transparent",
1259
1259
  borderWidth: 1,
1260
1260
  lineDash: [4, 4]
1261
1261
  }), this.drawBorder({
1262
1262
  xArr: i,
1263
1263
  yArr: s,
1264
1264
  borderColor: this.ctx.config.SELECT_BORDER_COLOR || "rgb(82,146,247)",
1265
- fillColor: this.ctx.config.SELECT_AREA_COLOR || "rgba(82,146,247,0.1)",
1265
+ fillColor: "transparent",
1266
1266
  borderWidth: 1
1267
1267
  });
1268
+ const [n, h] = i, [c, d] = s;
1269
+ !(n === h && c === d) && this.colIndex >= n && this.colIndex <= h && this.rowIndex >= c && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.visibleWidth, this.visibleHeight, {
1270
+ borderColor: "transparent",
1271
+ fillColor: this.ctx.config.SELECT_AREA_COLOR || "rgba(82,146,247,0.1)"
1272
+ }), this.operation && this.rowIndex >= c && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.visibleWidth, this.visibleHeight, {
1273
+ borderColor: "transparent",
1274
+ fillColor: this.ctx.config.SELECT_ROW_COL_BG_COLOR || "transparent"
1275
+ });
1268
1276
  }
1269
1277
  drawErrorTip() {
1270
1278
  if (this.cellType === "footer" || !this.message || this.rowspan === 0 || this.colspan === 0)
@@ -1289,29 +1297,29 @@ class Tt extends se {
1289
1297
  const { drawX: i, drawY: s, width: r, rowIndex: o, colIndex: n } = this;
1290
1298
  let h = i + 0.5, c = s + 0.5, d = this.height;
1291
1299
  o === 0 && (c = this.y + 1, d = d - 1), n === this.ctx.maxColIndex && (h = h - 1);
1292
- const { xArr: f, yArr: u, lineDash: x = [], borderWidth: p = 1, borderColor: g, fillColor: w } = e, y = f[0], m = f[1], E = u[0], C = u[1];
1293
- n >= y && n <= m && o === E && this.ctx.paint.drawLine([h, c, h + r - 2, c], {
1300
+ const { xArr: f, yArr: u, lineDash: x = [], borderWidth: p = 1, borderColor: g, fillColor: w } = e, y = f[0], E = f[1], m = u[0], C = u[1];
1301
+ n >= y && n <= E && o === m && this.ctx.paint.drawLine([h, c, h + r - 2, c], {
1294
1302
  borderColor: g,
1295
1303
  fillColor: w,
1296
1304
  borderWidth: p,
1297
1305
  lineCap: "round",
1298
1306
  lineJoin: "round",
1299
1307
  lineDash: x
1300
- }), n >= y && n <= m && o === C && this.ctx.paint.drawLine([h, c + d - 1.5, h + r, c + d - 1.5], {
1308
+ }), n >= y && n <= E && o === C && this.ctx.paint.drawLine([h, c + d - 1.5, h + r, c + d - 1.5], {
1301
1309
  borderColor: g,
1302
1310
  fillColor: w,
1303
1311
  borderWidth: p,
1304
1312
  lineCap: "round",
1305
1313
  lineJoin: "round",
1306
1314
  lineDash: x
1307
- }), n === y && o >= E && o <= C && this.ctx.paint.drawLine([h, c, h, c + d - 1], {
1315
+ }), n === y && o >= m && o <= C && this.ctx.paint.drawLine([h, c, h, c + d - 1], {
1308
1316
  borderColor: g,
1309
1317
  fillColor: w,
1310
1318
  borderWidth: p,
1311
1319
  lineCap: "round",
1312
1320
  lineJoin: "round",
1313
1321
  lineDash: x
1314
- }), n === m && o >= E && o <= C && this.ctx.paint.drawLine([h + r - 1.5, c, h + r - 1.5, c + d - 1.5], {
1322
+ }), n === E && o >= m && o <= C && this.ctx.paint.drawLine([h + r - 1.5, c, h + r - 1.5, c + d - 1.5], {
1315
1323
  borderColor: g,
1316
1324
  fillColor: w,
1317
1325
  borderWidth: p,
@@ -2039,16 +2047,16 @@ class ni {
2039
2047
  }
2040
2048
  ]
2041
2049
  };
2042
- let w = e, y = e, m = n, E = n, C = [], b = 0, R = 0, A = 0, L = 0;
2050
+ let w = e, y = e, E = n, m = n, C = [], b = 0, R = 0, S = 0, L = 0;
2043
2051
  if (d !== 1 && p) {
2044
2052
  L = u;
2045
- const I = h.reduce((v, S) => {
2046
- const O = this.getItemValue(s, S) ?? "";
2053
+ const I = h.reduce((v, A) => {
2054
+ const O = this.getItemValue(s, A) ?? "";
2047
2055
  return `${v}${O}`;
2048
2056
  }, "");
2049
2057
  for (let v = e - 1; v >= 0; v--) {
2050
- const S = this.rowIndexRowKeyMap.get(v) || "", O = h.reduce((M, T) => {
2051
- const N = this.getItemValue(S, T) ?? "";
2058
+ const A = this.rowIndexRowKeyMap.get(v) || "", O = h.reduce((M, T) => {
2059
+ const N = this.getItemValue(A, T) ?? "";
2052
2060
  return `${M}${N}`;
2053
2061
  }, "");
2054
2062
  if (I === O)
@@ -2057,8 +2065,8 @@ class ni {
2057
2065
  break;
2058
2066
  }
2059
2067
  for (let v = e; v <= this.ctx.maxRowIndex; v++) {
2060
- const S = this.rowIndexRowKeyMap.get(v) || "", O = h.reduce((M, T) => {
2061
- const N = this.getItemValue(S, T) ?? "";
2068
+ const A = this.rowIndexRowKeyMap.get(v) || "", O = h.reduce((M, T) => {
2069
+ const N = this.getItemValue(A, T) ?? "";
2062
2070
  return `${M}${N}`;
2063
2071
  }, "");
2064
2072
  if (I === O)
@@ -2067,12 +2075,12 @@ class ni {
2067
2075
  break;
2068
2076
  }
2069
2077
  for (let v = w; v < e; v++) {
2070
- const { height: S } = this.positions[v];
2071
- b += S;
2078
+ const { height: A } = this.positions[v];
2079
+ b += A;
2072
2080
  }
2073
2081
  for (let v = w; v <= y; v++) {
2074
- const { height: S } = this.positions[v];
2075
- A += S;
2082
+ const { height: A } = this.positions[v];
2083
+ S += A;
2076
2084
  const O = this.rowIndexRowKeyMap.get(v) || "", { item: M } = this.rowKeyMap.get(O), T = this.getItemValue(O, i);
2077
2085
  C.push({
2078
2086
  rowKey: O,
@@ -2083,14 +2091,14 @@ class ni {
2083
2091
  }
2084
2092
  }
2085
2093
  if (x !== 1 && g) {
2086
- A = f;
2094
+ S = f;
2087
2095
  for (let I = n - 1; I >= 0; I--) {
2088
2096
  const v = this.getColumnByColIndex(I);
2089
2097
  if (!v)
2090
2098
  break;
2091
- const S = this.getItemValue(s, i), O = this.getItemValue(s, v.key);
2092
- if (S === O && c.includes(v.key))
2093
- m = I;
2099
+ const A = this.getItemValue(s, i), O = this.getItemValue(s, v.key);
2100
+ if (A === O && c.includes(v.key))
2101
+ E = I;
2094
2102
  else
2095
2103
  break;
2096
2104
  }
@@ -2098,19 +2106,19 @@ class ni {
2098
2106
  const v = this.getColumnByColIndex(I);
2099
2107
  if (!v)
2100
2108
  break;
2101
- const S = this.getItemValue(s, i), O = this.getItemValue(s, v.key);
2102
- if (S === O && c.includes(v.key))
2103
- E = I;
2109
+ const A = this.getItemValue(s, i), O = this.getItemValue(s, v.key);
2110
+ if (A === O && c.includes(v.key))
2111
+ m = I;
2104
2112
  else
2105
2113
  break;
2106
2114
  }
2107
- for (let I = m; I < n; I++) {
2115
+ for (let I = E; I < n; I++) {
2108
2116
  const v = this.getColumnByColIndex(I);
2109
2117
  if (!v)
2110
2118
  break;
2111
2119
  R += v.width || 100;
2112
2120
  }
2113
- for (let I = m; I <= E; I++) {
2121
+ for (let I = E; I <= m; I++) {
2114
2122
  const v = this.getColumnByColIndex(I);
2115
2123
  if (!v)
2116
2124
  break;
@@ -2123,11 +2131,11 @@ class ni {
2123
2131
  }
2124
2132
  }
2125
2133
  return {
2126
- xArr: [m, E],
2134
+ xArr: [E, m],
2127
2135
  yArr: [w, y],
2128
2136
  rowspan: d,
2129
2137
  colspan: x,
2130
- height: A,
2138
+ height: S,
2131
2139
  width: L,
2132
2140
  offsetTop: b,
2133
2141
  offsetLeft: R,
@@ -2240,7 +2248,7 @@ class li {
2240
2248
  this.ctx = t, this.init();
2241
2249
  }
2242
2250
  init() {
2243
- this.bind(window, "resize", this.handleResize.bind(this)), this.bind(window, "mouseup", this.handleMouseUp.bind(this)), this.bind(window, "mousemove", this.handleMousemove.bind(this)), this.bind(this.ctx.stageElement, "click", this.handleClick.bind(this)), this.bind(window, "keydown", this.handleKeydown.bind(this)), this.bind(this.ctx.stageElement, "wheel", this.handleWheel.bind(this)), this.bind(this.ctx.stageElement, "contextmenu", this.handleContextMenu.bind(this)), this.bind(this.ctx.stageElement, "mousedown", this.handleMouseDown.bind(this)), this.bind(this.ctx.stageElement, "dblclick", this.handleDblclick.bind(this)), this.bind(this.ctx.stageElement, "mouseover", this.handleMouseover.bind(this)), this.bind(this.ctx.stageElement, "mouseout", this.handleMouseout.bind(this));
2251
+ this.bind(window, "resize", this.handleResize.bind(this)), this.bind(window, "mouseup", this.handleMouseUp.bind(this)), this.bind(window, "mousemove", this.handleMousemove.bind(this)), this.bind(this.ctx.stageElement, "click", this.handleClick.bind(this)), this.bind(window, "keydown", this.handleKeydown.bind(this)), this.bind(this.ctx.stageElement, "wheel", this.handleWheel.bind(this)), this.bind(this.ctx.stageElement, "touchstart", this.handleTouchstart.bind(this)), this.bind(this.ctx.stageElement, "touchend", this.handleTouchend.bind(this)), this.bind(this.ctx.stageElement, "touchmove", this.handleTouchmove.bind(this)), this.bind(this.ctx.stageElement, "contextmenu", this.handleContextMenu.bind(this)), this.bind(this.ctx.stageElement, "mousedown", this.handleMouseDown.bind(this)), this.bind(this.ctx.stageElement, "dblclick", this.handleDblclick.bind(this)), this.bind(this.ctx.stageElement, "mouseover", this.handleMouseover.bind(this)), this.bind(this.ctx.stageElement, "mouseout", this.handleMouseout.bind(this));
2244
2252
  }
2245
2253
  destroy() {
2246
2254
  this.eventTasks.forEach((t, e) => {
@@ -2269,6 +2277,15 @@ class li {
2269
2277
  handleWheel(t) {
2270
2278
  this.ctx.emit("wheel", t);
2271
2279
  }
2280
+ handleTouchstart(t) {
2281
+ this.ctx.emit("touchstart", t);
2282
+ }
2283
+ handleTouchend(t) {
2284
+ this.ctx.emit("touchend", t);
2285
+ }
2286
+ handleTouchmove(t) {
2287
+ this.ctx.emit("touchmove", t);
2288
+ }
2272
2289
  handleContextMenu(t) {
2273
2290
  this.ctx.emit("contextMenu", t);
2274
2291
  }
@@ -2503,7 +2520,7 @@ class Wt {
2503
2520
  l(this, "SCROLLER_FOCUS_COLOR", "#bbbec4");
2504
2521
  l(this, "SELECT_BORDER_COLOR", "rgb(82,146,247)");
2505
2522
  l(this, "SELECT_AREA_COLOR", "rgba(82,146,247,0.1)");
2506
- l(this, "SELECT_BG_COLOR", "rgba(82,146,247,0.1)");
2523
+ l(this, "SELECT_ROW_COL_BG_COLOR", "transparent");
2507
2524
  l(this, "AUTOFILL_POINT_BORDER_COLOR", "#fff");
2508
2525
  l(this, "EDIT_BG_COLOR", "#fcf6ed");
2509
2526
  l(this, "CHECKBOX_KEY", "");
@@ -2669,15 +2686,19 @@ class di {
2669
2686
  const t = [];
2670
2687
  for (let e = 0; e < this.list.length; e++) {
2671
2688
  const i = this.list[e];
2672
- let s = i.color;
2689
+ let s = i.color, r = i.svg;
2673
2690
  if (i.configColorName) {
2674
- const o = this.ctx.config[i.configColorName];
2675
- o && (s = o);
2691
+ const n = this.ctx.config[i.configColorName];
2692
+ n && (s = n);
2676
2693
  }
2677
- const r = this.createImageFromSVG(i.svg, s).then((o) => {
2678
- this.icons.set(i.name, o);
2694
+ if (i.configName) {
2695
+ const n = this.ctx.config[i.configName];
2696
+ n && (r = n);
2697
+ }
2698
+ const o = this.createImageFromSVG(r, s).then((n) => {
2699
+ this.icons.set(i.name, n);
2679
2700
  });
2680
- t.push(r);
2701
+ t.push(o);
2681
2702
  }
2682
2703
  for (let e = 0; e < this.ctx.config.ICONS.length; e++) {
2683
2704
  const i = this.ctx.config.ICONS[e];
@@ -2789,7 +2810,17 @@ class re extends se {
2789
2810
  color: this.drawTextColor,
2790
2811
  align: this.align,
2791
2812
  verticalAlign: this.verticalAlign
2792
- }), this.drawSelection();
2813
+ }), this.drawSelection(), this.drawSelector();
2814
+ }
2815
+ drawSelector() {
2816
+ const { ENABLE_SELECTOR: e } = this.ctx.config;
2817
+ if (!e)
2818
+ return;
2819
+ const { xArr: i } = this.ctx.selector, [s, r] = i;
2820
+ this.colIndex >= s && this.colIndex <= r && this.ctx.paint.drawRect(this.drawX, this.drawY, this.width, this.height, {
2821
+ borderColor: "transparent",
2822
+ fillColor: this.ctx.config.SELECT_ROW_COL_BG_COLOR || "transparent"
2823
+ });
2793
2824
  }
2794
2825
  drawSelection() {
2795
2826
  const { width: e, height: i, type: s } = this;
@@ -3244,6 +3275,15 @@ class Pt {
3244
3275
  onWheel(t) {
3245
3276
  this.updateScroll(t);
3246
3277
  }
3278
+ onTouchmove(t) {
3279
+ const { clientY: e, clientX: i } = t.touches[0], s = e - this.clientY, r = i - this.clientX;
3280
+ let o = 0;
3281
+ this.type === "vertical" ? (o = Math.max(0, Math.min(this.dragStart - s, this.distance)), this.hasScrollbar() && !(o === 0 && s > 0 || o === this.distance && s < 0) && t.preventDefault()) : this.type === "horizontal" && (o = Math.max(0, Math.min(this.dragStart - r, this.distance))), this.scroll = o;
3282
+ }
3283
+ onTouchstart(t) {
3284
+ const { clientY: e, clientX: i } = t.touches[0];
3285
+ this.clientX = i, this.clientY = e, this.dragStart = this.scroll;
3286
+ }
3247
3287
  onMouseDown(t) {
3248
3288
  if (!(t.target instanceof Element) || !this.ctx.isTarget())
3249
3289
  return;
@@ -3263,12 +3303,16 @@ class Pt {
3263
3303
  this.isDragging = !1, this.isFocus = !1, this.clientX = 0, this.clientY = 0;
3264
3304
  }
3265
3305
  onMouseMove(t) {
3266
- const { offsetX: e, offsetY: i, clientX: s, clientY: r } = t;
3306
+ const { offsetX: e, offsetY: i, clientX: s, clientY: r, buttons: o } = t;
3307
+ if (o === 0) {
3308
+ this.onMouseUp();
3309
+ return;
3310
+ }
3267
3311
  if (this.isOnScrollbar(e, i) && t.target === this.ctx.canvasElement ? this.isFocus = !0 : this.isFocus = !1, s == this.clientX && r == this.clientY) return;
3268
- let o = 0;
3269
- if (this.type === "horizontal" ? o = s - this.clientX : o = r - this.clientY, this.isDragging && o !== 0) {
3270
- let n = 0;
3271
- this.type === "vertical" ? n = this.dragStart + o / (this.visibleDistance - this.barHeight) * this.distance : n = this.dragStart + o / (this.visibleDistance - this.barWidth) * this.distance, this.scroll = Math.max(0, Math.min(n, this.distance));
3312
+ let n = 0;
3313
+ if (this.type === "horizontal" ? n = s - this.clientX : n = r - this.clientY, this.isDragging && n !== 0) {
3314
+ let h = 0;
3315
+ this.type === "vertical" ? h = this.dragStart + n / (this.visibleDistance - this.barHeight) * this.distance : h = this.dragStart + n / (this.visibleDistance - this.barWidth) * this.distance, this.scroll = Math.max(0, Math.min(h, this.distance));
3272
3316
  }
3273
3317
  }
3274
3318
  isPointInElement(t, e, i, s, r, o) {
@@ -3333,7 +3377,9 @@ class ui {
3333
3377
  l(this, "ctx");
3334
3378
  l(this, "verticalScrollbar");
3335
3379
  l(this, "horizontalScrollbar");
3336
- 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) => {
3380
+ 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("touchmove", (e) => this.onTouchmove(e)), this.ctx.on("touchstart", (e) => {
3381
+ this.onTouchstart(e);
3382
+ }), this.ctx.on("setScroll", (e, i) => {
3337
3383
  this.setScroll(e, i);
3338
3384
  }), this.ctx.on("setScrollX", (e) => {
3339
3385
  this.setScrollX(e);
@@ -3344,6 +3390,12 @@ class ui {
3344
3390
  onWheel(t) {
3345
3391
  this.verticalScrollbar.onWheel(t), this.horizontalScrollbar.onWheel(t), this.draw();
3346
3392
  }
3393
+ onTouchmove(t) {
3394
+ this.verticalScrollbar.onTouchmove(t), this.horizontalScrollbar.onTouchmove(t), this.draw();
3395
+ }
3396
+ onTouchstart(t) {
3397
+ this.verticalScrollbar.onTouchstart(t), this.horizontalScrollbar.onTouchstart(t), this.draw();
3398
+ }
3347
3399
  onMouseDown(t) {
3348
3400
  this.verticalScrollbar.onMouseDown(t), this.horizontalScrollbar.onMouseDown(t), this.draw();
3349
3401
  }
@@ -3707,16 +3759,16 @@ class wi {
3707
3759
  width: this.width,
3708
3760
  height: this.data.length ? 0 : h + w
3709
3761
  });
3710
- let m = this.height + e.height + o;
3711
- m += w;
3712
- let E = 0;
3713
- this.data.length && d ? (E = window.innerHeight - g - f, E < 0 && (E = 32, console.error(
3762
+ let E = this.height + e.height + o;
3763
+ E += w;
3764
+ let m = 0;
3765
+ this.data.length && d ? (m = window.innerHeight - g - f, m < 0 && (m = 32, console.error(
3714
3766
  "There is an error in the height calculation ENABLE_OFFSET_HEIGHT and OFFSET_HEIGHT are invalid"
3715
- ))) : this.data.length && n ? E = n : this.data.length && c && m > c ? E = c : E = m, E > 0 && (this.ctx.stageHeight = Math.floor(E), this.ctx.stageElement.style.height = `${this.ctx.stageHeight - 0.5}px`);
3767
+ ))) : this.data.length && n ? m = n : this.data.length && c && E > c ? m = c : m = E, m > 0 && (this.ctx.stageHeight = Math.floor(m), this.ctx.stageElement.style.height = `${this.ctx.stageHeight - 0.5}px`);
3716
3768
  let C = this.ctx.stageHeight - e.height - o;
3717
3769
  r ? this.visibleHeight = C - w : this.visibleHeight = C, 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 = x;
3718
- const b = window.devicePixelRatio || 1, R = this.ctx.stageWidth * b, A = this.ctx.stageHeight * b;
3719
- t.width = Math.floor(R), t.height = Math.floor(A), this.ctx.canvasElement.setAttribute(
3770
+ const b = window.devicePixelRatio || 1, R = this.ctx.stageWidth * b, S = this.ctx.stageHeight * b;
3771
+ t.width = Math.floor(R), t.height = Math.floor(S), this.ctx.canvasElement.setAttribute(
3720
3772
  "style",
3721
3773
  ` height:${this.ctx.stageHeight}px;width:${this.ctx.stageWidth}px;`
3722
3774
  ), this.ctx.paint.scale(b);
@@ -4026,24 +4078,24 @@ class yi {
4026
4078
  SELECTOR_AREA_MAX_X_OFFSET: f,
4027
4079
  SELECTOR_AREA_MAX_Y_OFFSET: u
4028
4080
  } = this.ctx.config, x = n, p = h || this.ctx.maxColIndex - f, g = c, w = d || this.ctx.maxRowIndex - u;
4029
- let [y, m] = r, [E, C] = o;
4030
- if (y < x || m > p || E < g || C > w)
4081
+ let [y, E] = r, [m, C] = o;
4082
+ if (y < x || E > p || m < g || C > w)
4031
4083
  return;
4032
4084
  if (this.ctx.stageElement.focus(), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
4033
4085
  const R = this.adjustMergeCells(r, o);
4034
- E = R.yArr[0], C = R.yArr[1], y = R.xArr[0], m = R.xArr[1], this.ctx.onlyMergeCell = R.onlyMergeCell;
4086
+ m = R.yArr[0], C = R.yArr[1], y = R.xArr[0], E = R.xArr[1], this.ctx.onlyMergeCell = R.onlyMergeCell;
4035
4087
  }
4036
- y === m && E === C ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, r = [Math.max(x, y), Math.min(p, m)], o = [Math.max(g, E), Math.min(w, C)];
4088
+ y === E && m === C ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, r = [Math.max(x, y), Math.min(p, E)], o = [Math.max(g, m), Math.min(w, C)];
4037
4089
  const { BEFORE_SET_SELECTOR_METHOD: b } = this.ctx.config;
4038
4090
  if (typeof b == "function") {
4039
- const A = b({
4091
+ const S = b({
4040
4092
  focusCell: this.ctx.focusCell,
4041
4093
  xArr: r,
4042
4094
  yArr: o
4043
4095
  });
4044
- if (!A)
4096
+ if (!S)
4045
4097
  return;
4046
- r = A.xArr, o = A.yArr;
4098
+ r = S.xArr, o = S.yArr;
4047
4099
  }
4048
4100
  this.ctx.selector.xArr = r, this.ctx.selector.yArr = o, this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("drawView");
4049
4101
  }
@@ -4054,13 +4106,13 @@ class yi {
4054
4106
  let n = [], h = [];
4055
4107
  for (let g = 0; g <= e[1] - e[0]; g++)
4056
4108
  for (let w = 0; w <= t[1] - t[0]; w++) {
4057
- const y = g + e[0], m = w + t[0], E = this.ctx.database.getVirtualBodyCell(y, m);
4058
- E && ((y === i || y === s) && n.push(E), (m === r || m === o) && h.push(E));
4109
+ const y = g + e[0], E = w + t[0], m = this.ctx.database.getVirtualBodyCell(y, E);
4110
+ m && ((y === i || y === s) && n.push(m), (E === r || E === o) && h.push(m));
4059
4111
  }
4060
4112
  const c = n.reduce(
4061
4113
  (g, w) => {
4062
- const { yArr: y } = w.getSpanInfo(), [m, E] = y;
4063
- return g.minY = Math.min(g.minY, m), g.maxY = Math.max(g.maxY, E), g;
4114
+ const { yArr: y } = w.getSpanInfo(), [E, m] = y;
4115
+ return g.minY = Math.min(g.minY, E), g.maxY = Math.max(g.maxY, m), g;
4064
4116
  },
4065
4117
  {
4066
4118
  minY: i,
@@ -4068,8 +4120,8 @@ class yi {
4068
4120
  }
4069
4121
  ), d = h.reduce(
4070
4122
  (g, w) => {
4071
- const { xArr: y } = w.getSpanInfo(), [m, E] = y;
4072
- return g.minX = Math.min(g.minX, m), g.maxX = Math.max(g.maxX, E), g;
4123
+ const { xArr: y } = w.getSpanInfo(), [E, m] = y;
4124
+ return g.minX = Math.min(g.minX, E), g.maxX = Math.max(g.maxX, m), g;
4073
4125
  },
4074
4126
  {
4075
4127
  minX: r,
@@ -4270,16 +4322,16 @@ class yi {
4270
4322
  for (let x = 0; x <= o.length - 1; x++) {
4271
4323
  const p = o[x].length;
4272
4324
  for (let g = 0; g <= p - 1; g++) {
4273
- const w = x + e, y = g + i, m = o[x][g], E = this.ctx.database.getItemValueForRowIndexAndColIndex(
4325
+ const w = x + e, y = g + i, E = o[x][g], m = this.ctx.database.getItemValueForRowIndexAndColIndex(
4274
4326
  w,
4275
4327
  y
4276
4328
  );
4277
- if (E) {
4278
- const { rowKey: C, key: b } = E;
4329
+ if (m) {
4330
+ const { rowKey: C, key: b } = m;
4279
4331
  this.ctx.database.getReadonly(C, b) || (s.add(C), d.push({
4280
4332
  rowKey: C,
4281
4333
  key: b,
4282
- value: m,
4334
+ value: E,
4283
4335
  row: {}
4284
4336
  //内部有设置
4285
4337
  }));
@@ -4409,20 +4461,20 @@ class yi {
4409
4461
  if (!i)
4410
4462
  return;
4411
4463
  p && this.ctx.onlyMergeCell && i.updateSpanInfo();
4412
- const { drawX: g, drawY: w, width: y, height: m, fixed: E } = i, C = r - g + 1, b = i.drawX + y - (e - s) + 1;
4413
- let R = o.height - w, A = m;
4414
- A > h.visibleHeight && (A = h.visibleHeight);
4464
+ const { drawX: g, drawY: w, width: y, height: E, fixed: m } = i, C = r - g + 1, b = i.drawX + y - (e - s) + 1;
4465
+ let R = o.height - w, S = E;
4466
+ S > h.visibleHeight && (S = h.visibleHeight);
4415
4467
  let L = 0;
4416
4468
  u && (x === "top" ? R = o.height + n.height - w : L = n.visibleHeight);
4417
- const I = w + A - (t - L - f);
4418
- let v = c, S = d;
4419
- b > 0 && !E ? v = Math.floor(c + b) : C > 0 && !E && (v = Math.floor(c - C)), R > 0 ? S = Math.floor(d - R) : I > 0 && (S = Math.floor(d + I)), (Math.abs(c - v) > 2 || Math.abs(d - S) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(v, S), this.ctx.emit("adjustBoundaryPosition", i));
4469
+ const I = w + S - (t - L - f);
4470
+ let v = c, A = d;
4471
+ b > 0 && !m ? v = Math.floor(c + b) : C > 0 && !m && (v = Math.floor(c - C)), R > 0 ? A = Math.floor(d - R) : I > 0 && (A = Math.floor(d + I)), (Math.abs(c - v) > 2 || Math.abs(d - A) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(v, A), this.ctx.emit("adjustBoundaryPosition", i));
4420
4472
  }
4421
4473
  destroy() {
4422
4474
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
4423
4475
  }
4424
4476
  }
4425
- class Ei {
4477
+ class mi {
4426
4478
  constructor(t) {
4427
4479
  l(this, "ctx");
4428
4480
  this.ctx = t, this.init();
@@ -4480,10 +4532,10 @@ class Ei {
4480
4532
  SELECTOR_AREA_MAX_X_OFFSET: u,
4481
4533
  SELECTOR_AREA_MAX_Y_OFFSET: x
4482
4534
  } = this.ctx.config, p = h, g = c || this.ctx.maxColIndex - u, w = d, y = f || this.ctx.maxRowIndex - x;
4483
- let [m, E] = o, [C, b] = n;
4484
- if (m < p || C < w)
4535
+ let [E, m] = o, [C, b] = n;
4536
+ if (E < p || C < w)
4485
4537
  return;
4486
- o = [Math.max(p, m), Math.min(g, E)], n = [Math.max(w, C), Math.min(y, b)];
4538
+ o = [Math.max(p, E), Math.min(g, m)], n = [Math.max(w, C), Math.min(y, b)];
4487
4539
  const { BEFORE_SET_AUTOFILL_METHOD: R } = this.ctx.config;
4488
4540
  if (typeof R == "function") {
4489
4541
  const L = R({
@@ -4520,9 +4572,9 @@ class Ei {
4520
4572
  let d = [];
4521
4573
  for (let x = 0; x <= h[1] - h[0]; x++)
4522
4574
  for (let p = 0; p <= n[1] - n[0]; p++) {
4523
- const g = p + n[0], w = x + h[0], y = s[x % o][p % r], m = this.ctx.database.getItemValueForRowIndexAndColIndex(w, g), E = `${w}-${g}`;
4524
- if (m && !i.has(E)) {
4525
- const { rowKey: C, key: b } = m;
4575
+ const g = p + n[0], w = x + h[0], y = s[x % o][p % r], E = this.ctx.database.getItemValueForRowIndexAndColIndex(w, g), m = `${w}-${g}`;
4576
+ if (E && !i.has(m)) {
4577
+ const { rowKey: C, key: b } = E;
4526
4578
  this.ctx.database.getReadonly(C, b) || (t.add(C), d.push({
4527
4579
  rowKey: C,
4528
4580
  key: b,
@@ -4567,7 +4619,7 @@ class Ei {
4567
4619
  const rt = Math.min, U = Math.max, ft = Math.round, z = (a) => ({
4568
4620
  x: a,
4569
4621
  y: a
4570
- }), mi = {
4622
+ }), Ei = {
4571
4623
  left: "right",
4572
4624
  right: "left",
4573
4625
  bottom: "top",
@@ -4582,7 +4634,7 @@ function _t(a, t, e) {
4582
4634
  function at(a, t) {
4583
4635
  return typeof a == "function" ? a(t) : a;
4584
4636
  }
4585
- function G(a) {
4637
+ function q(a) {
4586
4638
  return a.split("-")[0];
4587
4639
  }
4588
4640
  function lt(a) {
@@ -4595,7 +4647,7 @@ function Mt(a) {
4595
4647
  return a === "y" ? "height" : "width";
4596
4648
  }
4597
4649
  function J(a) {
4598
- return ["top", "bottom"].includes(G(a)) ? "y" : "x";
4650
+ return ["top", "bottom"].includes(q(a)) ? "y" : "x";
4599
4651
  }
4600
4652
  function Ht(a) {
4601
4653
  return ne(J(a));
@@ -4628,11 +4680,11 @@ function Ri(a, t, e) {
4628
4680
  }
4629
4681
  function Ii(a, t, e, i) {
4630
4682
  const s = lt(a);
4631
- let r = Ri(G(a), e === "start", i);
4683
+ let r = Ri(q(a), e === "start", i);
4632
4684
  return s && (r = r.map((o) => o + "-" + s), t && (r = r.concat(r.map(Ot)))), r;
4633
4685
  }
4634
4686
  function xt(a) {
4635
- return a.replace(/left|right|bottom|top/g, (t) => mi[t]);
4687
+ return a.replace(/left|right|bottom|top/g, (t) => Ei[t]);
4636
4688
  }
4637
4689
  function _i(a) {
4638
4690
  return {
@@ -4674,7 +4726,7 @@ function zt(a, t, e) {
4674
4726
  reference: i,
4675
4727
  floating: s
4676
4728
  } = a;
4677
- const r = J(t), o = Ht(t), n = Mt(o), h = G(t), c = r === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, u = i[n] / 2 - s[n] / 2;
4729
+ const r = J(t), o = Ht(t), n = Mt(o), h = q(t), c = r === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, u = i[n] / 2 - s[n] / 2;
4678
4730
  let x;
4679
4731
  switch (h) {
4680
4732
  case "top":
@@ -4737,8 +4789,8 @@ const Oi = async (a, t, e) => {
4737
4789
  name: w,
4738
4790
  fn: y
4739
4791
  } = n[g], {
4740
- x: m,
4741
- y: E,
4792
+ x: E,
4793
+ y: m,
4742
4794
  data: C,
4743
4795
  reset: b
4744
4796
  } = await y({
@@ -4755,7 +4807,7 @@ const Oi = async (a, t, e) => {
4755
4807
  floating: t
4756
4808
  }
4757
4809
  });
4758
- d = m ?? d, f = E ?? f, x = {
4810
+ d = E ?? d, f = m ?? f, x = {
4759
4811
  ...x,
4760
4812
  [w]: {
4761
4813
  ...x[w],
@@ -4799,12 +4851,12 @@ async function le(a, t) {
4799
4851
  boundary: c,
4800
4852
  rootBoundary: d,
4801
4853
  strategy: h
4802
- })), m = f === "floating" ? {
4854
+ })), E = f === "floating" ? {
4803
4855
  x: i,
4804
4856
  y: s,
4805
4857
  width: o.floating.width,
4806
4858
  height: o.floating.height
4807
- } : o.reference, E = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(n.floating)), C = await (r.isElement == null ? void 0 : r.isElement(E)) ? await (r.getScale == null ? void 0 : r.getScale(E)) || {
4859
+ } : o.reference, m = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(n.floating)), C = await (r.isElement == null ? void 0 : r.isElement(m)) ? await (r.getScale == null ? void 0 : r.getScale(m)) || {
4808
4860
  x: 1,
4809
4861
  y: 1
4810
4862
  } : {
@@ -4812,10 +4864,10 @@ async function le(a, t) {
4812
4864
  y: 1
4813
4865
  }, b = ut(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
4814
4866
  elements: n,
4815
- rect: m,
4816
- offsetParent: E,
4867
+ rect: E,
4868
+ offsetParent: m,
4817
4869
  strategy: h
4818
- }) : m);
4870
+ }) : E);
4819
4871
  return {
4820
4872
  top: (y.top - b.top + p.top) / C.y,
4821
4873
  bottom: (b.bottom - y.bottom + p.bottom) / C.y,
@@ -4823,7 +4875,7 @@ async function le(a, t) {
4823
4875
  right: (b.right - y.right + p.right) / C.x
4824
4876
  };
4825
4877
  }
4826
- const Ai = (a) => ({
4878
+ const Si = (a) => ({
4827
4879
  name: "arrow",
4828
4880
  options: a,
4829
4881
  async fn(t) {
@@ -4844,10 +4896,10 @@ const Ai = (a) => ({
4844
4896
  const f = ae(d), u = {
4845
4897
  x: e,
4846
4898
  y: i
4847
- }, x = Ht(s), p = Mt(x), g = await o.getDimensions(c), w = x === "y", y = w ? "top" : "left", m = w ? "bottom" : "right", E = w ? "clientHeight" : "clientWidth", C = r.reference[p] + r.reference[x] - u[x] - r.floating[p], b = u[x] - r.reference[x], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
4848
- let A = R ? R[E] : 0;
4849
- (!A || !await (o.isElement == null ? void 0 : o.isElement(R))) && (A = n.floating[E] || r.floating[p]);
4850
- const L = C / 2 - b / 2, I = A / 2 - g[p] / 2 - 1, v = rt(f[y], I), S = rt(f[m], I), O = v, M = A - g[p] - S, T = A / 2 - g[p] / 2 + L, N = _t(O, T, M), Y = !h.arrow && lt(s) != null && T !== N && r.reference[p] / 2 - (T < O ? v : S) - g[p] / 2 < 0, K = Y ? T < O ? T - O : T - M : 0;
4899
+ }, x = Ht(s), p = Mt(x), g = await o.getDimensions(c), w = x === "y", y = w ? "top" : "left", E = w ? "bottom" : "right", m = w ? "clientHeight" : "clientWidth", C = r.reference[p] + r.reference[x] - u[x] - r.floating[p], b = u[x] - r.reference[x], R = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(c));
4900
+ let S = R ? R[m] : 0;
4901
+ (!S || !await (o.isElement == null ? void 0 : o.isElement(R))) && (S = n.floating[m] || r.floating[p]);
4902
+ const L = C / 2 - b / 2, I = S / 2 - g[p] / 2 - 1, v = rt(f[y], I), A = rt(f[E], I), O = v, M = S - g[p] - A, T = S / 2 - g[p] / 2 + L, N = _t(O, T, M), Y = !h.arrow && lt(s) != null && T !== N && r.reference[p] / 2 - (T < O ? v : A) - g[p] / 2 < 0, K = Y ? T < O ? T - O : T - M : 0;
4851
4903
  return {
4852
4904
  [x]: u[x] + K,
4853
4905
  data: {
@@ -4884,9 +4936,9 @@ const Ai = (a) => ({
4884
4936
  } = at(a, t);
4885
4937
  if ((e = r.arrow) != null && e.alignmentOffset)
4886
4938
  return {};
4887
- const y = G(s), m = J(n), E = G(n) === n, C = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), b = u || (E || !g ? [xt(n)] : vi(n)), R = p !== "none";
4939
+ const y = q(s), E = J(n), m = q(n) === n, C = await (h.isRTL == null ? void 0 : h.isRTL(c.floating)), b = u || (m || !g ? [xt(n)] : vi(n)), R = p !== "none";
4888
4940
  !u && R && b.push(...Ii(n, g, p, C));
4889
- const A = [n, ...b], L = await le(t, w), I = [];
4941
+ const S = [n, ...b], L = await le(t, w), I = [];
4890
4942
  let v = ((i = r.flip) == null ? void 0 : i.overflows) || [];
4891
4943
  if (d && I.push(L[y]), f) {
4892
4944
  const T = bi(s, o, C);
@@ -4896,8 +4948,8 @@ const Ai = (a) => ({
4896
4948
  placement: s,
4897
4949
  overflows: I
4898
4950
  }], !I.every((T) => T <= 0)) {
4899
- var S, O;
4900
- const T = (((S = r.flip) == null ? void 0 : S.index) || 0) + 1, N = A[T];
4951
+ var A, O;
4952
+ const T = (((A = r.flip) == null ? void 0 : A.index) || 0) + 1, N = S[T];
4901
4953
  if (N)
4902
4954
  return {
4903
4955
  data: {
@@ -4916,12 +4968,12 @@ const Ai = (a) => ({
4916
4968
  const K = (M = v.filter((W) => {
4917
4969
  if (R) {
4918
4970
  const P = J(W.placement);
4919
- return P === m || // Create a bias to the `y` side axis due to horizontal
4971
+ return P === E || // Create a bias to the `y` side axis due to horizontal
4920
4972
  // reading directions favoring greater width.
4921
4973
  P === "y";
4922
4974
  }
4923
4975
  return !0;
4924
- }).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, me) => P + me, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 : M[0];
4976
+ }).map((W) => [W.placement, W.overflows.filter((P) => P > 0).reduce((P, Ee) => P + Ee, 0)]).sort((W, P) => W[1] - P[1])[0]) == null ? void 0 : M[0];
4925
4977
  K && (Y = K);
4926
4978
  break;
4927
4979
  }
@@ -4940,12 +4992,12 @@ const Ai = (a) => ({
4940
4992
  }
4941
4993
  };
4942
4994
  };
4943
- async function Si(a, t) {
4995
+ async function Ai(a, t) {
4944
4996
  const {
4945
4997
  placement: e,
4946
4998
  platform: i,
4947
4999
  elements: s
4948
- } = a, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = G(e), n = lt(e), h = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, d = r && h ? -1 : 1, f = at(t, a);
5000
+ } = a, r = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), o = q(e), n = lt(e), h = J(e) === "y", c = ["left", "top"].includes(o) ? -1 : 1, d = r && h ? -1 : 1, f = at(t, a);
4949
5001
  let {
4950
5002
  mainAxis: u,
4951
5003
  crossAxis: x,
@@ -4978,7 +5030,7 @@ const Ti = function(a) {
4978
5030
  y: r,
4979
5031
  placement: o,
4980
5032
  middlewareData: n
4981
- } = t, h = await Si(t, a);
5033
+ } = t, h = await Ai(t, a);
4982
5034
  return o === ((e = n.offset) == null ? void 0 : e.placement) && (i = n.arrow) != null && i.alignmentOffset ? {} : {
4983
5035
  x: s + h.x,
4984
5036
  y: r + h.y,
@@ -5005,11 +5057,11 @@ const Ti = function(a) {
5005
5057
  fn: (w) => {
5006
5058
  let {
5007
5059
  x: y,
5008
- y: m
5060
+ y: E
5009
5061
  } = w;
5010
5062
  return {
5011
5063
  x: y,
5012
- y: m
5064
+ y: E
5013
5065
  };
5014
5066
  }
5015
5067
  },
@@ -5017,15 +5069,15 @@ const Ti = function(a) {
5017
5069
  } = at(a, t), c = {
5018
5070
  x: e,
5019
5071
  y: i
5020
- }, d = await le(t, h), f = J(G(s)), u = ne(f);
5072
+ }, d = await le(t, h), f = J(q(s)), u = ne(f);
5021
5073
  let x = c[u], p = c[f];
5022
5074
  if (r) {
5023
- const w = u === "y" ? "top" : "left", y = u === "y" ? "bottom" : "right", m = x + d[w], E = x - d[y];
5024
- x = _t(m, x, E);
5075
+ const w = u === "y" ? "top" : "left", y = u === "y" ? "bottom" : "right", E = x + d[w], m = x - d[y];
5076
+ x = _t(E, x, m);
5025
5077
  }
5026
5078
  if (o) {
5027
- const w = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", m = p + d[w], E = p - d[y];
5028
- p = _t(m, p, E);
5079
+ const w = f === "y" ? "top" : "left", y = f === "y" ? "bottom" : "right", E = p + d[w], m = p - d[y];
5080
+ p = _t(E, p, m);
5029
5081
  }
5030
5082
  const g = n.fn({
5031
5083
  ...t,
@@ -5063,7 +5115,7 @@ function V(a) {
5063
5115
  function he(a) {
5064
5116
  return gt() ? a instanceof Node || a instanceof F(a).Node : !1;
5065
5117
  }
5066
- function k(a) {
5118
+ function X(a) {
5067
5119
  return gt() ? a instanceof Element || a instanceof F(a).Element : !1;
5068
5120
  }
5069
5121
  function B(a) {
@@ -5078,7 +5130,7 @@ function ht(a) {
5078
5130
  overflowX: e,
5079
5131
  overflowY: i,
5080
5132
  display: s
5081
- } = X(a);
5133
+ } = k(a);
5082
5134
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
5083
5135
  }
5084
5136
  function Hi(a) {
@@ -5094,7 +5146,7 @@ function wt(a) {
5094
5146
  });
5095
5147
  }
5096
5148
  function Dt(a) {
5097
- const t = Ft(), e = k(a) ? X(a) : a;
5149
+ const t = Ft(), e = X(a) ? k(a) : a;
5098
5150
  return e.transform !== "none" || e.perspective !== "none" || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (e.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (e.contain || "").includes(i));
5099
5151
  }
5100
5152
  function Di(a) {
@@ -5114,11 +5166,11 @@ function Ft() {
5114
5166
  function Q(a) {
5115
5167
  return ["html", "body", "#document"].includes(tt(a));
5116
5168
  }
5117
- function X(a) {
5169
+ function k(a) {
5118
5170
  return F(a).getComputedStyle(a);
5119
5171
  }
5120
5172
  function pt(a) {
5121
- return k(a) ? {
5173
+ return X(a) ? {
5122
5174
  scrollLeft: a.scrollLeft,
5123
5175
  scrollTop: a.scrollTop
5124
5176
  } : {
@@ -5142,21 +5194,21 @@ function ce(a) {
5142
5194
  const t = $(a);
5143
5195
  return Q(t) ? a.ownerDocument ? a.ownerDocument.body : a.body : B(t) && ht(t) ? t : ce(t);
5144
5196
  }
5145
- function At(a, t, e) {
5197
+ function St(a, t, e) {
5146
5198
  var i;
5147
5199
  t === void 0 && (t = []), e === void 0 && (e = !0);
5148
5200
  const s = ce(a), r = s === ((i = a.ownerDocument) == null ? void 0 : i.body), o = F(s);
5149
5201
  if (r) {
5150
5202
  const n = Lt(o);
5151
- return t.concat(o, o.visualViewport || [], ht(s) ? s : [], n && e ? At(n) : []);
5203
+ return t.concat(o, o.visualViewport || [], ht(s) ? s : [], n && e ? St(n) : []);
5152
5204
  }
5153
- return t.concat(s, At(s, [], e));
5205
+ return t.concat(s, St(s, [], e));
5154
5206
  }
5155
5207
  function Lt(a) {
5156
5208
  return a.parent && Object.getPrototypeOf(a.parent) ? a.frameElement : null;
5157
5209
  }
5158
5210
  function de(a) {
5159
- const t = X(a);
5211
+ const t = k(a);
5160
5212
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5161
5213
  const s = B(a), r = s ? a.offsetWidth : e, o = s ? a.offsetHeight : i, n = ft(e) !== r || ft(i) !== o;
5162
5214
  return n && (e = r, i = o), {
@@ -5166,7 +5218,7 @@ function de(a) {
5166
5218
  };
5167
5219
  }
5168
5220
  function fe(a) {
5169
- return k(a) ? a : a.contextElement;
5221
+ return X(a) ? a : a.contextElement;
5170
5222
  }
5171
5223
  function Z(a) {
5172
5224
  const t = fe(a);
@@ -5191,22 +5243,22 @@ function xe(a) {
5191
5243
  y: t.visualViewport.offsetTop
5192
5244
  };
5193
5245
  }
5194
- function ki(a, t, e) {
5246
+ function Xi(a, t, e) {
5195
5247
  return t === void 0 && (t = !1), !e || t && e !== F(a) ? !1 : t;
5196
5248
  }
5197
5249
  function ot(a, t, e, i) {
5198
5250
  t === void 0 && (t = !1), e === void 0 && (e = !1);
5199
5251
  const s = a.getBoundingClientRect(), r = fe(a);
5200
5252
  let o = z(1);
5201
- t && (i ? k(i) && (o = Z(i)) : o = Z(a));
5202
- const n = ki(r, e, i) ? xe(r) : z(0);
5253
+ t && (i ? X(i) && (o = Z(i)) : o = Z(a));
5254
+ const n = Xi(r, e, i) ? xe(r) : z(0);
5203
5255
  let h = (s.left + n.x) / o.x, c = (s.top + n.y) / o.y, d = s.width / o.x, f = s.height / o.y;
5204
5256
  if (r) {
5205
- const u = F(r), x = i && k(i) ? F(i) : i;
5257
+ const u = F(r), x = i && X(i) ? F(i) : i;
5206
5258
  let p = u, g = Lt(p);
5207
5259
  for (; g && i && x !== p; ) {
5208
- const w = Z(g), y = g.getBoundingClientRect(), m = X(g), E = y.left + (g.clientLeft + parseFloat(m.paddingLeft)) * w.x, C = y.top + (g.clientTop + parseFloat(m.paddingTop)) * w.y;
5209
- h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += E, c += C, p = F(g), g = Lt(p);
5260
+ const w = Z(g), y = g.getBoundingClientRect(), E = k(g), m = y.left + (g.clientLeft + parseFloat(E.paddingLeft)) * w.x, C = y.top + (g.clientTop + parseFloat(E.paddingTop)) * w.y;
5261
+ h *= w.x, c *= w.y, d *= w.x, f *= w.y, h += m, c += C, p = F(g), g = Lt(p);
5210
5262
  }
5211
5263
  }
5212
5264
  return ut({
@@ -5216,7 +5268,7 @@ function ot(a, t, e, i) {
5216
5268
  y: c
5217
5269
  });
5218
5270
  }
5219
- function Xi(a) {
5271
+ function ki(a) {
5220
5272
  let {
5221
5273
  elements: t,
5222
5274
  rect: e,
@@ -5245,15 +5297,15 @@ function Xi(a) {
5245
5297
  function Ni(a) {
5246
5298
  return Array.from(a.getClientRects());
5247
5299
  }
5248
- function St(a, t) {
5300
+ function At(a, t) {
5249
5301
  const e = pt(a).scrollLeft;
5250
5302
  return t ? t.left + e : ot(V(a)).left + e;
5251
5303
  }
5252
5304
  function Ki(a) {
5253
5305
  const t = V(a), e = pt(a), i = a.ownerDocument.body, s = U(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), r = U(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5254
- let o = -e.scrollLeft + St(a);
5306
+ let o = -e.scrollLeft + At(a);
5255
5307
  const n = -e.scrollTop;
5256
- return X(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5308
+ return k(i).direction === "rtl" && (o += U(t.clientWidth, i.clientWidth) - s), {
5257
5309
  width: s,
5258
5310
  height: r,
5259
5311
  x: o,
@@ -5284,13 +5336,13 @@ function Yi(a, t) {
5284
5336
  y: c
5285
5337
  };
5286
5338
  }
5287
- function qt(a, t, e) {
5339
+ function Gt(a, t, e) {
5288
5340
  let i;
5289
5341
  if (t === "viewport")
5290
5342
  i = Bi(a, e);
5291
5343
  else if (t === "document")
5292
5344
  i = Ki(V(a));
5293
- else if (k(t))
5345
+ else if (X(t))
5294
5346
  i = Yi(t, e);
5295
5347
  else {
5296
5348
  const s = xe(a);
@@ -5304,17 +5356,17 @@ function qt(a, t, e) {
5304
5356
  }
5305
5357
  function ue(a, t) {
5306
5358
  const e = $(a);
5307
- return e === t || !k(e) || Q(e) ? !1 : X(e).position === "fixed" || ue(e, t);
5359
+ return e === t || !X(e) || Q(e) ? !1 : k(e).position === "fixed" || ue(e, t);
5308
5360
  }
5309
5361
  function Vi(a, t) {
5310
5362
  const e = t.get(a);
5311
5363
  if (e)
5312
5364
  return e;
5313
- let i = At(a, [], !1).filter((n) => k(n) && tt(n) !== "body"), s = null;
5314
- const r = X(a).position === "fixed";
5365
+ let i = St(a, [], !1).filter((n) => X(n) && tt(n) !== "body"), s = null;
5366
+ const r = k(a).position === "fixed";
5315
5367
  let o = r ? $(a) : a;
5316
- for (; k(o) && !Q(o); ) {
5317
- const n = X(o), h = Dt(o);
5368
+ for (; X(o) && !Q(o); ) {
5369
+ const n = k(o), h = Dt(o);
5318
5370
  !h && n.position === "fixed" && (s = null), (r ? !h && !s : !h && n.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || ht(o) && !h && ue(a, o)) ? i = i.filter((d) => d !== o) : s = n, o = $(o);
5319
5371
  }
5320
5372
  return t.set(a, i), i;
@@ -5327,9 +5379,9 @@ function Wi(a) {
5327
5379
  strategy: s
5328
5380
  } = a;
5329
5381
  const o = [...e === "clippingAncestors" ? wt(t) ? [] : Vi(t, this._c) : [].concat(e), i], n = o[0], h = o.reduce((c, d) => {
5330
- const f = qt(t, d, s);
5382
+ const f = Gt(t, d, s);
5331
5383
  return c.top = U(f.top, c.top), c.right = rt(f.right, c.right), c.bottom = rt(f.bottom, c.bottom), c.left = U(f.left, c.left), c;
5332
- }, qt(t, n, s));
5384
+ }, Gt(t, n, s));
5333
5385
  return {
5334
5386
  width: h.right - h.left,
5335
5387
  height: h.bottom - h.top,
@@ -5358,12 +5410,12 @@ function zi(a, t, e) {
5358
5410
  if ((tt(t) !== "body" || ht(s)) && (n = pt(t)), i) {
5359
5411
  const x = ot(t, !0, r, t);
5360
5412
  h.x = x.x + t.clientLeft, h.y = x.y + t.clientTop;
5361
- } else s && (h.x = St(s));
5413
+ } else s && (h.x = At(s));
5362
5414
  let c = 0, d = 0;
5363
5415
  if (s && !i && !r) {
5364
5416
  const x = s.getBoundingClientRect();
5365
5417
  d = x.top + n.scrollTop, c = x.left + n.scrollLeft - // RTL <body> scrollbar.
5366
- St(s, x);
5418
+ At(s, x);
5367
5419
  }
5368
5420
  const f = o.left + n.scrollLeft - h.x - c, u = o.top + n.scrollTop - h.y - d;
5369
5421
  return {
@@ -5373,11 +5425,11 @@ function zi(a, t, e) {
5373
5425
  height: o.height
5374
5426
  };
5375
5427
  }
5376
- function Et(a) {
5377
- return X(a).position === "static";
5428
+ function mt(a) {
5429
+ return k(a).position === "static";
5378
5430
  }
5379
- function Gt(a, t) {
5380
- if (!B(a) || X(a).position === "fixed")
5431
+ function qt(a, t) {
5432
+ if (!B(a) || k(a).position === "fixed")
5381
5433
  return null;
5382
5434
  if (t)
5383
5435
  return t(a);
@@ -5391,16 +5443,16 @@ function ge(a, t) {
5391
5443
  if (!B(a)) {
5392
5444
  let s = $(a);
5393
5445
  for (; s && !Q(s); ) {
5394
- if (k(s) && !Et(s))
5446
+ if (X(s) && !mt(s))
5395
5447
  return s;
5396
5448
  s = $(s);
5397
5449
  }
5398
5450
  return e;
5399
5451
  }
5400
- let i = Gt(a, t);
5401
- for (; i && Hi(i) && Et(i); )
5402
- i = Gt(i, t);
5403
- return i && Q(i) && Et(i) && !Dt(i) ? e : i || Di(a) || e;
5452
+ let i = qt(a, t);
5453
+ for (; i && Hi(i) && mt(i); )
5454
+ i = qt(i, t);
5455
+ return i && Q(i) && mt(i) && !Dt(i) ? e : i || Di(a) || e;
5404
5456
  }
5405
5457
  const $i = async function(a) {
5406
5458
  const t = this.getOffsetParent || ge, e = this.getDimensions, i = await e(a.floating);
@@ -5414,11 +5466,11 @@ const $i = async function(a) {
5414
5466
  }
5415
5467
  };
5416
5468
  };
5417
- function qi(a) {
5418
- return X(a).direction === "rtl";
5469
+ function Gi(a) {
5470
+ return k(a).direction === "rtl";
5419
5471
  }
5420
- const Gi = {
5421
- convertOffsetParentRelativeRectToViewportRelativeRect: Xi,
5472
+ const qi = {
5473
+ convertOffsetParentRelativeRectToViewportRelativeRect: ki,
5422
5474
  getDocumentElement: V,
5423
5475
  getClippingRect: Wi,
5424
5476
  getOffsetParent: ge,
@@ -5426,11 +5478,11 @@ const Gi = {
5426
5478
  getClientRects: Ni,
5427
5479
  getDimensions: Pi,
5428
5480
  getScale: Z,
5429
- isElement: k,
5430
- isRTL: qi
5431
- }, we = Ti, pe = Mi, ye = Li, ji = Ai, Ee = (a, t, e) => {
5481
+ isElement: X,
5482
+ isRTL: Gi
5483
+ }, we = Ti, pe = Mi, ye = Li, ji = Si, me = (a, t, e) => {
5432
5484
  const i = /* @__PURE__ */ new Map(), s = {
5433
- platform: Gi,
5485
+ platform: qi,
5434
5486
  ...e
5435
5487
  }, r = {
5436
5488
  ...s.platform,
@@ -5498,7 +5550,7 @@ let Ui = class {
5498
5550
  return;
5499
5551
  this.enable = !0, this.contentEl.style.maxWidth = `${t.overflowTooltipMaxWidth || 500}px`, this.contentEl.style.minWidth = "100px", 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;
5500
5552
  const s = t.drawX + i.x, r = t.drawY + i.y;
5501
- Ee({
5553
+ me({
5502
5554
  getBoundingClientRect() {
5503
5555
  return {
5504
5556
  width: t.visibleWidth,
@@ -5610,7 +5662,7 @@ class Zi {
5610
5662
  const { xArr: e, yArr: i } = this.ctx.selector;
5611
5663
  this.selectorArrStr = JSON.stringify(e) + JSON.stringify(i);
5612
5664
  }), this.ctx.on("cellClick", (t) => {
5613
- if (t.editorType === "none" || this.ctx.adjustPositioning || !this.isInSelectorRange(t.rowIndex, t.colIndex))
5665
+ if (this.ctx.adjustPositioning || !this.isInSelectorRange(t.rowIndex, t.colIndex))
5614
5666
  return;
5615
5667
  const { xArr: e, yArr: i } = this.ctx.selector, s = JSON.stringify(e) + JSON.stringify(i);
5616
5668
  if (this.selectorArrStr === s && this.cellTarget) {
@@ -5695,8 +5747,11 @@ class Zi {
5695
5747
  const e = this.ctx.focusCell;
5696
5748
  if (!e || ["index", "index-selection", "selection"].includes(e.type) || this.enable)
5697
5749
  return;
5698
- const { rowKey: i, key: s } = e, r = this.ctx.database.getReadonly(i, s);
5699
- e && !r && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = e, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
5750
+ const { rowKey: i, key: s, editorType: r } = e;
5751
+ if (r === "none")
5752
+ return;
5753
+ const o = this.ctx.database.getReadonly(i, s);
5754
+ e && !o && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = e, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
5700
5755
  }
5701
5756
  editCell(t, e) {
5702
5757
  const i = this.ctx.body.renderRows.find((c) => c.rowIndex === t);
@@ -5713,7 +5768,7 @@ class Zi {
5713
5768
  r && !h && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = r, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget));
5714
5769
  }
5715
5770
  doneEdit() {
5716
- this.enable && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.ctx.emit("draw"));
5771
+ this.enable && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.ctx.emit("drawView"));
5717
5772
  }
5718
5773
  destroy() {
5719
5774
  var t;
@@ -5965,7 +6020,7 @@ class ts {
5965
6020
  }),
5966
6021
  contextElement: document.body
5967
6022
  };
5968
- Ee(u, this.contextMenuEl, {
6023
+ me(u, this.contextMenuEl, {
5969
6024
  placement: "right-start",
5970
6025
  middleware: [we(), pe(), ye()]
5971
6026
  }).then(({ x, y: p }) => {
@@ -6046,7 +6101,7 @@ class ss {
6046
6101
  r,
6047
6102
  o
6048
6103
  );
6049
- this.ctx = new xi(n, this.options), this.header = new gi(this.ctx), this.footer = new pi(this.ctx), this.body = new wi(this.ctx), this.scroller = new ui(this.ctx), this.selector = new yi(this.ctx), this.autofill = new Ei(this.ctx), this.tooltip = new Ui(this.ctx), this.empty = new Ji(this.ctx), this.editor = new Zi(this.ctx), this.overlayer = new Qi(this.ctx), this.contextMenu = new ts(this.ctx), this.ctx.on("draw", () => {
6104
+ this.ctx = new xi(n, this.options), this.header = new gi(this.ctx), this.footer = new pi(this.ctx), this.body = new wi(this.ctx), this.scroller = new ui(this.ctx), this.selector = new yi(this.ctx), this.autofill = new mi(this.ctx), this.tooltip = new Ui(this.ctx), this.empty = new Ji(this.ctx), this.editor = new Zi(this.ctx), this.overlayer = new Qi(this.ctx), this.contextMenu = new ts(this.ctx), this.ctx.on("draw", () => {
6050
6105
  this.draw();
6051
6106
  }), this.ctx.on("drawView", () => {
6052
6107
  this.draw(!0);