e-virt-table 1.2.20 → 1.2.21

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,8 +1,8 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(":root{--evt-header-font: 12px normal Arial;--evt-body-font: 12px normal Arial;--evt-color-white: #fff;--evt-color-black: #000000;--evt-color-primary: rgb(82, 146, 247);--evt-text-color-primary: #333;--evt-text-color-regular: #666;--evt-text-color-secondary: #999;--evt-box-shadow: 0 2px 12px 0 #0000001a;--evt-editor-bg-color: #fff;--evt-editor-text-color: #333;--evt-border-color: #e1e6eb;--evt-stripe-color: #fafafa;--evt-placeholder-color: #cdd0dc;--evt-header-bg-color: #f8faff;--evt-body-bg-color: #fff;--evt-header-text-color: #1d2129;--evt-body-text-color: #4e5969;--evt-footer-text-color: #4e5969;--evt-loading-icon-color: #4e5969;--evt-expand-icon-color: #4e5969;--evt-shrink-icon-color: #4e5969;--evt-error-tip-icon-color: red;--evt-cell-hover-icon-bg-color: #fff;--evt-cell-hover-icon-border-color: #dde0ea;--evt-scroller-color: #dee0e3;--evt-scroller-track-color: #fff;--evt-scroller-focus-color: #bbbec4;--evt-select-border-color: var(--evt-color-primary);--evt-select-area-color: rgba(82, 146, 247, .1);--evt-select-row-col-bg-color: transparent;--evt-autofill-point-border-color: #fff;--evt-edit-bg-color: #fcf6ed;--evt-checkbox-color: var(--evt-color-primary);--evt-readonly-color: #fff;--evt-readonly-text-color: var(--evt-body-text-color);--evt-error-tip-color: #ed3f14;--evt-footer-bg-color: #fafafa;--evt-highlight-hover-row-color: rgba(186, 203, 231, .1);--evt-highlight-selected-row-color: rgba(82, 146, 247, .1);--evt-tooltip-bg-color: #303133;--evt-tooltip-text-color: #fff;--evt-resize-row-line-color: #e1e6eb;--evt-resize-column-line-color: #e1e6eb}.dark{--evt-border-color: #363637;--evt-header-bg-color: #141414;--evt-body-bg-color: #141414;--evt-header-text-color: #a3a6ad;--evt-scroller-color: #414243;--evt-scroller-track-color: #141414;--evt-scroller-focus-color: #a3a6ad;--evt-edit-bg-color: #141414;--evt-readonly-text-color: #cfd3dc;--evt-footer-bg-color: #262727;--evt-autofill-point-border-color: #fff;--evt-editor-bg-color: #434343;--evt-editor-text-color: #cfd3dc}.e-virt-table-container{position:relative;outline:none}.e-virt-table-stage{position:relative;overflow:hidden;outline:none;box-sizing:border-box;z-index:10;border-radius:8px;border:1px solid var(--evt-border-color)}.e-virt-table-canvas{position:absolute;left:0;top:0;box-sizing:border-box;border:none;outline:none;z-index:10}.e-virt-table-editor{position:absolute;top:-10000px;left:-10000px;text-align:left;height:auto;line-height:0;z-index:100;overflow:hidden;background-color:var(--evt-editor-bg-color);border:2px solid var(--evt-color-primary);box-sizing:border-box;box-shadow:var(--evt-box-shadow);display:flex;align-items:center}.e-virt-table-overlayer{position:absolute;left:0;top:0;overflow:hidden;z-index:100;pointer-events:none}.e-virt-table-editor-textarea{width:100%;box-sizing:border-box;outline:none;font-weight:400;padding:8px;font-size:12px;color:inherit;white-space:pre-wrap;word-wrap:break-word;word-break:break-all;line-height:1.5;margin:0;border:none;vertical-align:middle;background:var(--evt-editor-bg-color);color:var(--evt-editor-text-color);overflow-y:auto;resize:none}.e-virt-table-context-menu{position:absolute;font-size:14px;color:var(--evt-text-color-regular);background-color:var(--evt-color-white);border-radius:4px;border:1px solid #e4e7ed;box-shadow:var(--evt-box-shadow);width:fit-content;padding:6px 0;z-index:9999;left:-99999px;top:-99999px}.e-virt-table-context-menu-item{cursor:pointer;padding:8px 24px;color:var(--evt-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--evt-color-primary);background-color:#f5f7fa}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- var Jt = Object.defineProperty;
3
- var Qt = (c, t, e) => t in c ? Jt(c, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[t] = e;
4
- var n = (c, t, e) => Qt(c, typeof t != "symbol" ? t + "" : t, e);
5
- class te {
2
+ var ee = Object.defineProperty;
3
+ var ie = (c, t, e) => t in c ? ee(c, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[t] = e;
4
+ var n = (c, t, e) => ie(c, typeof t != "symbol" ? t + "" : t, e);
5
+ class se {
6
6
  constructor(t) {
7
7
  n(this, "rules");
8
8
  this.rules = t;
@@ -11,8 +11,6 @@ class te {
11
11
  const e = [], { column: i, row: s, key: o, rowKey: r, colIndex: l, rowIndex: a, value: h, field: d, fieldValue: f } = t;
12
12
  Array.isArray(this.rules) || (this.rules = [this.rules]);
13
13
  for (const x of this.rules) {
14
- if (!x.required && (h == null || h === ""))
15
- return e;
16
14
  if (x.validator) {
17
15
  const u = {
18
16
  field: d,
@@ -33,6 +31,8 @@ class te {
33
31
  });
34
32
  });
35
33
  }
34
+ if (!x.required && (h == null || h === ""))
35
+ return e;
36
36
  x.pattern && !x.pattern.test(h) && e.push({
37
37
  value: h,
38
38
  column: i,
@@ -60,13 +60,13 @@ class te {
60
60
  return e;
61
61
  }
62
62
  }
63
- function St() {
63
+ function Lt() {
64
64
  return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(c) {
65
65
  const t = Math.random() * 16 | 0;
66
66
  return (c === "x" ? t : t & 3 | 8).toString(16);
67
67
  });
68
68
  }
69
- function Lt(c, t) {
69
+ function Tt(c, t) {
70
70
  let e = 0, i;
71
71
  return function(...s) {
72
72
  const o = (/* @__PURE__ */ new Date()).getTime(), r = o - e;
@@ -75,10 +75,10 @@ function Lt(c, t) {
75
75
  }, t - r));
76
76
  };
77
77
  }
78
- function Tt(c = []) {
79
- return c.length ? c.map((t) => Tt(t.children) + 1).sort((t, e) => e - t)[0] : 0;
78
+ function At(c = []) {
79
+ return c.length ? c.map((t) => At(t.children) + 1).sort((t, e) => e - t)[0] : 0;
80
80
  }
81
- function ee(c = []) {
81
+ function oe(c = []) {
82
82
  let t = [], e = [], i = [];
83
83
  return c.forEach((s) => {
84
84
  s.fixed === "left" ? t.push(s) : s.fixed === "right" ? i.push(s) : e.push(s);
@@ -88,14 +88,14 @@ function ee(c = []) {
88
88
  ...i.sort((s, o) => (s.sort ?? 0) - (o.sort ?? 0))
89
89
  ];
90
90
  }
91
- function At(c = [], t = 1, e = 0) {
91
+ function Mt(c = [], t = 1, e = 0) {
92
92
  return c.map((i) => {
93
93
  if (i.children) {
94
94
  let s = 0, o = i.fixed;
95
95
  i.children.forEach((l) => {
96
96
  l.fixed = o;
97
97
  });
98
- const r = At(i.children, t - 1, e + 1);
98
+ const r = Mt(i.children, t - 1, e + 1);
99
99
  return r && r.forEach((l) => {
100
100
  s += l.colspan ?? 0;
101
101
  }), {
@@ -121,17 +121,17 @@ function et(c = []) {
121
121
  e.children ? t = t.concat(et(e.children)) : t.push(e);
122
122
  }), t;
123
123
  }
124
- const mt = /^(\r\n|\n\r|\r|\n)/, ie = /^[^\t\r\n]+/, yt = /^\t/;
125
- function se(c) {
124
+ const Et = /^(\r\n|\n\r|\r|\n)/, re = /^[^\t\r\n]+/, mt = /^\t/;
125
+ function ne(c) {
126
126
  let t = [[""]];
127
127
  if (c.length === 0)
128
128
  return t;
129
129
  let e = 0, i = 0, s;
130
130
  for (; c.length > 0 && s !== c.length; )
131
- if (s = c.length, c.match(yt))
132
- c = c.replace(yt, ""), e += 1, t[i][e] = "";
133
- else if (c.match(mt))
134
- c = c.replace(mt, ""), e = 0, i += 1, t[i] = [""];
131
+ if (s = c.length, c.match(mt))
132
+ c = c.replace(mt, ""), e += 1, t[i][e] = "";
133
+ else if (c.match(Et))
134
+ c = c.replace(Et, ""), e = 0, i += 1, t[i] = [""];
135
135
  else {
136
136
  let o = "";
137
137
  if (c.startsWith('"')) {
@@ -142,14 +142,14 @@ function se(c) {
142
142
  }
143
143
  o = o.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (a) => new Array(Math.floor(a.length / 2)).fill('"').join(""));
144
144
  } else {
145
- const r = c.match(ie);
145
+ const r = c.match(re);
146
146
  o = r ? r[0] : "", c = c.slice(o.length);
147
147
  }
148
148
  t[i][e] = o;
149
149
  }
150
150
  return Array.isArray(t) && t.length > 1 && t[t.length - 1].length === 1 && t[t.length - 1][0] === "" && (t = t.slice(0, t.length - 1)), t;
151
151
  }
152
- function oe(c) {
152
+ function le(c) {
153
153
  let t, e, i, s, o = "", r;
154
154
  for (t = 0, e = c.length; t < e; t += 1) {
155
155
  for (s = c[t].length, i = 0; i < s; i += 1)
@@ -160,7 +160,7 @@ function oe(c) {
160
160
  }
161
161
  return o;
162
162
  }
163
- function Mt(c, t, e = []) {
163
+ function Ht(c, t, e = []) {
164
164
  let i = 0;
165
165
  const s = [];
166
166
  return c.forEach((o, r) => {
@@ -172,15 +172,15 @@ function Mt(c, t, e = []) {
172
172
  }
173
173
  }), s;
174
174
  }
175
- function Ht(c, t) {
175
+ function Dt(c, t) {
176
176
  let e = "", i = "";
177
177
  const s = {};
178
178
  return t.forEach((o, r) => {
179
179
  r === 0 ? (e = o.key, i = o.key, s[o.key] = 1) : c[o.key] === c[e] ? (s[o.key] = 0, s[i] += 1) : (s[o.key] = 1, e = o.key, i = o.key);
180
180
  }), s;
181
181
  }
182
- function re(c, t, e = []) {
183
- const { visibleRows: i, rowIndex: s, headIndex: o } = c, r = Mt(i, t, e);
182
+ function ae(c, t, e = []) {
183
+ const { visibleRows: i, rowIndex: s, headIndex: o } = c, r = Ht(i, t, e);
184
184
  return r[s - o] === 0 ? {
185
185
  rowspan: 0,
186
186
  colspan: 0,
@@ -193,10 +193,10 @@ function re(c, t, e = []) {
193
193
  mergeRow: !0
194
194
  };
195
195
  }
196
- function ne(c, t = []) {
196
+ function he(c, t = []) {
197
197
  const { column: e, row: i, visibleLeafColumns: s } = c, o = s.filter((r) => t.includes(r.key));
198
198
  if (t.includes(e.key)) {
199
- const r = Ht(i, o);
199
+ const r = Dt(i, o);
200
200
  return r[e.key] === 0 ? {
201
201
  rowspan: 0,
202
202
  colspan: 0,
@@ -210,11 +210,11 @@ function ne(c, t = []) {
210
210
  };
211
211
  }
212
212
  }
213
- function le(c, t = document.documentElement) {
213
+ function ce(c, t = document.documentElement) {
214
214
  const e = c.startsWith("--") ? c : `--${c}`;
215
215
  return getComputedStyle(t).getPropertyValue(e).trim();
216
216
  }
217
- class Dt {
217
+ class kt {
218
218
  constructor(t, e, i, s, o, r, l) {
219
219
  n(this, "ctx");
220
220
  n(this, "x", 0);
@@ -260,7 +260,7 @@ class Dt {
260
260
  getRightFixedX() {
261
261
  }
262
262
  }
263
- class ut extends Dt {
263
+ class ft extends kt {
264
264
  constructor(e, i, s, o, r, l, a, h, d, f = "body") {
265
265
  super(e, o, r, l, a, f, h.fixed);
266
266
  n(this, "formatter");
@@ -470,7 +470,7 @@ class ut extends Dt {
470
470
  if (this.cellType === "footer") {
471
471
  let _ = h, S = a;
472
472
  if (typeof o == "function") {
473
- const I = o, { backgroundColor: b, color: O } = I({
473
+ const v = o, { backgroundColor: b, color: O } = v({
474
474
  row: this.row,
475
475
  rowIndex: this.rowIndex,
476
476
  colIndex: this.colIndex,
@@ -490,9 +490,9 @@ class ut extends Dt {
490
490
  m = S[0], R = S[1];
491
491
  }
492
492
  x && E && (E.rowKey === this.rowKey && (w = u), E.rowIndex >= m && E.rowIndex <= R && (w = u)), d && y && (y.rowKey === this.rowKey && (w = f), y.rowIndex >= m && y.rowIndex <= R && (w = f)), this.drawCellSkyBgColor = w;
493
- let C = e, v = l;
494
- if (this.ctx.database.getReadonly(this.rowKey, this.key) || (C = i, v = r), p && (this.rowIndex % 2 ? C = g : C = e), typeof s == "function") {
495
- const _ = s, { backgroundColor: S, color: I } = _({
493
+ let C = e, I = l;
494
+ if (this.ctx.database.getReadonly(this.rowKey, this.key) || (C = i, I = r), p && (this.rowIndex % 2 ? C = g : C = e), typeof s == "function") {
495
+ const _ = s, { backgroundColor: S, color: v } = _({
496
496
  row: this.row,
497
497
  rowIndex: this.rowIndex,
498
498
  colIndex: this.colIndex,
@@ -500,9 +500,9 @@ class ut extends Dt {
500
500
  isHasChanged: this.isHasChanged,
501
501
  value: this.getValue()
502
502
  }) || {};
503
- S && (C = S), I && (v = I);
503
+ S && (C = S), v && (I = v);
504
504
  }
505
- this.drawCellBgColor = C, this.drawTextColor = v;
505
+ this.drawCellBgColor = C, this.drawTextColor = I;
506
506
  }
507
507
  updateSelection() {
508
508
  const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: o, cellType: r, type: l, rowIndex: a, rowKey: h } = this;
@@ -764,8 +764,8 @@ class ut extends Dt {
764
764
  let h = i, d = s;
765
765
  const { xArr: f, yArr: x, lineDash: u = [], borderWidth: p = 1, borderColor: g, fillColor: w } = e, E = f[0], y = f[1], m = x[0], R = x[1];
766
766
  if (r >= E && r <= y && o === m) {
767
- const C = r === y ? 1 : 0, v = r === E ? 1 : 0;
768
- this.ctx.paint.drawLine([h + v, d + 1, h + a - C, d + 1], {
767
+ const C = r === y ? 1 : 0, I = r === E ? 1 : 0;
768
+ this.ctx.paint.drawLine([h + I, d + 1, h + a - C, d + 1], {
769
769
  borderColor: g,
770
770
  fillColor: w,
771
771
  borderWidth: p,
@@ -775,8 +775,8 @@ class ut extends Dt {
775
775
  });
776
776
  }
777
777
  if (r === y && o >= m && o <= R) {
778
- const C = o === m ? 1 : 0, v = o === R ? 1 : 0;
779
- this.ctx.paint.drawLine([h + a - 1, d + C, h + a - 1, d + l - v], {
778
+ const C = o === m ? 1 : 0, I = o === R ? 1 : 0;
779
+ this.ctx.paint.drawLine([h + a - 1, d + C, h + a - 1, d + l - I], {
780
780
  borderColor: g,
781
781
  fillColor: w,
782
782
  borderWidth: p,
@@ -786,8 +786,8 @@ class ut extends Dt {
786
786
  });
787
787
  }
788
788
  if (r >= E && r <= y && o === R) {
789
- const C = r === y ? 1 : 0, v = r === E ? 1 : 0;
790
- this.ctx.paint.drawLine([h + v, d + l - 1, h + a - C, d + l - 1], {
789
+ const C = r === y ? 1 : 0, I = r === E ? 1 : 0;
790
+ this.ctx.paint.drawLine([h + I, d + l - 1, h + a - C, d + l - 1], {
791
791
  borderColor: g,
792
792
  fillColor: w,
793
793
  borderWidth: p,
@@ -797,8 +797,8 @@ class ut extends Dt {
797
797
  });
798
798
  }
799
799
  if (r === E && o >= m && o <= R) {
800
- const C = o === R ? 1 : 0, v = o === m ? 1 : 0;
801
- this.ctx.paint.drawLine([h + 1, d + v, h + 1, d + l - C], {
800
+ const C = o === R ? 1 : 0, I = o === m ? 1 : 0;
801
+ this.ctx.paint.drawLine([h + 1, d + I, h + 1, d + l - C], {
802
802
  borderColor: g,
803
803
  fillColor: w,
804
804
  borderWidth: p,
@@ -809,7 +809,7 @@ class ut extends Dt {
809
809
  }
810
810
  }
811
811
  }
812
- class ae {
812
+ class de {
813
813
  //虚拟滚动位置
814
814
  constructor(t, e) {
815
815
  n(this, "loading", !1);
@@ -868,7 +868,7 @@ class ae {
868
868
  initData(t, e = 0, i = []) {
869
869
  t.forEach((s, o) => {
870
870
  var E;
871
- const { ROW_KEY: r = "", DEFAULT_EXPAND_ALL: l, CELL_HEIGHT: a, SELECTABLE_METHOD: h, CHECKBOX_KEY: d } = this.ctx.config, f = s[r], x = f != null ? `${f}` : St();
871
+ const { ROW_KEY: r = "", DEFAULT_EXPAND_ALL: l, CELL_HEIGHT: a, SELECTABLE_METHOD: h, CHECKBOX_KEY: d } = this.ctx.config, f = s[r], x = f != null ? `${f}` : Lt();
872
872
  this.itemRowKeyMap.set(s, x);
873
873
  const u = s._height || a, p = s._readonly;
874
874
  let g = !0;
@@ -1512,7 +1512,7 @@ class ae {
1512
1512
  value: this.getItemValue(t, e),
1513
1513
  field: e,
1514
1514
  fieldValue: this.getItemValue(t, e)
1515
- }, f = new te(a).validate(h);
1515
+ }, f = new se(a).validate(h);
1516
1516
  this.setValidationError(t, e, f), i(f);
1517
1517
  } else
1518
1518
  this.clearValidationError(t, e), i([]);
@@ -1562,29 +1562,29 @@ class ae {
1562
1562
  }
1563
1563
  ]
1564
1564
  };
1565
- let w = e, E = e, y = l, m = l, R = [], C = 0, v = 0, _ = 0, S = 0;
1565
+ let w = e, E = e, y = l, m = l, R = [], C = 0, I = 0, _ = 0, S = 0;
1566
1566
  if (d !== 1 && p) {
1567
1567
  S = x;
1568
- const I = a.reduce((b, O) => {
1568
+ const v = a.reduce((b, O) => {
1569
1569
  const L = this.getItemValue(s, O) ?? "";
1570
1570
  return `${b}${L}`;
1571
1571
  }, "");
1572
1572
  for (let b = e - 1; b >= 0; b--) {
1573
1573
  const O = this.rowIndexRowKeyMap.get(b) || "", L = a.reduce((M, T) => {
1574
- const k = this.getItemValue(O, T) ?? "";
1575
- return `${M}${k}`;
1574
+ const H = this.getItemValue(O, T) ?? "";
1575
+ return `${M}${H}`;
1576
1576
  }, "");
1577
- if (I === L)
1577
+ if (v === L)
1578
1578
  w = b;
1579
1579
  else
1580
1580
  break;
1581
1581
  }
1582
1582
  for (let b = e; b <= this.ctx.maxRowIndex; b++) {
1583
1583
  const O = this.rowIndexRowKeyMap.get(b) || "", L = a.reduce((M, T) => {
1584
- const k = this.getItemValue(O, T) ?? "";
1585
- return `${M}${k}`;
1584
+ const H = this.getItemValue(O, T) ?? "";
1585
+ return `${M}${H}`;
1586
1586
  }, "");
1587
- if (I === L)
1587
+ if (v === L)
1588
1588
  E = b;
1589
1589
  else
1590
1590
  break;
@@ -1607,34 +1607,34 @@ class ae {
1607
1607
  }
1608
1608
  if (u !== 1 && g) {
1609
1609
  _ = f;
1610
- for (let I = l - 1; I >= 0; I--) {
1611
- const b = this.getColumnByColIndex(I);
1610
+ for (let v = l - 1; v >= 0; v--) {
1611
+ const b = this.getColumnByColIndex(v);
1612
1612
  if (!b)
1613
1613
  break;
1614
1614
  const O = this.getItemValue(s, i), L = this.getItemValue(s, b.key);
1615
1615
  if (O === L && h.includes(b.key))
1616
- y = I;
1616
+ y = v;
1617
1617
  else
1618
1618
  break;
1619
1619
  }
1620
- for (let I = l; I <= this.ctx.maxColIndex; I++) {
1621
- const b = this.getColumnByColIndex(I);
1620
+ for (let v = l; v <= this.ctx.maxColIndex; v++) {
1621
+ const b = this.getColumnByColIndex(v);
1622
1622
  if (!b)
1623
1623
  break;
1624
1624
  const O = this.getItemValue(s, i), L = this.getItemValue(s, b.key);
1625
1625
  if (O === L && h.includes(b.key))
1626
- m = I;
1626
+ m = v;
1627
1627
  else
1628
1628
  break;
1629
1629
  }
1630
- for (let I = y; I < l; I++) {
1631
- const b = this.getColumnByColIndex(I);
1630
+ for (let v = y; v < l; v++) {
1631
+ const b = this.getColumnByColIndex(v);
1632
1632
  if (!b)
1633
1633
  break;
1634
- v += b.width || 100;
1634
+ I += b.width || 100;
1635
1635
  }
1636
- for (let I = y; I <= m; I++) {
1637
- const b = this.getColumnByColIndex(I);
1636
+ for (let v = y; v <= m; v++) {
1637
+ const b = this.getColumnByColIndex(v);
1638
1638
  if (!b)
1639
1639
  break;
1640
1640
  S += b.width || 100, R.push({
@@ -1653,7 +1653,7 @@ class ae {
1653
1653
  height: _,
1654
1654
  width: S,
1655
1655
  offsetTop: C,
1656
- offsetLeft: v,
1656
+ offsetLeft: I,
1657
1657
  dataList: R
1658
1658
  };
1659
1659
  }
@@ -1698,7 +1698,7 @@ class ae {
1698
1698
  // 获取虚拟单元格,只针对可见的
1699
1699
  getVirtualBodyCell(t, e) {
1700
1700
  const i = this.getColumnByColIndex(e), s = this.getRowForRowIndex(t);
1701
- return !i || !s ? void 0 : new ut(this.ctx, t, e, 0, 0, 0, 0, i, s.item, "body");
1701
+ return !i || !s ? void 0 : new ft(this.ctx, t, e, 0, 0, 0, 0, i, s.item, "body");
1702
1702
  }
1703
1703
  getVirtualBodyCellByKey(t, e) {
1704
1704
  const i = this.getRowIndexForRowKey(t), s = this.getColIndexForKey(e);
@@ -1718,7 +1718,7 @@ class ae {
1718
1718
  return i;
1719
1719
  }
1720
1720
  }
1721
- class he {
1721
+ class fe {
1722
1722
  constructor(t) {
1723
1723
  n(this, "ctx");
1724
1724
  n(this, "history", []);
@@ -1773,7 +1773,7 @@ class he {
1773
1773
  this.history = [], this.historyIndex = -1;
1774
1774
  }
1775
1775
  }
1776
- class ce {
1776
+ class xe {
1777
1777
  constructor(t) {
1778
1778
  n(this, "eventTasks", /* @__PURE__ */ new Map());
1779
1779
  n(this, "ctx");
@@ -1849,7 +1849,7 @@ class ce {
1849
1849
  t.removeEventListener(e, i), this.eventTasks.delete(e);
1850
1850
  }
1851
1851
  }
1852
- class de {
1852
+ class ue {
1853
1853
  constructor() {
1854
1854
  n(this, "events", /* @__PURE__ */ new Map());
1855
1855
  }
@@ -1887,7 +1887,7 @@ class de {
1887
1887
  this.events.clear();
1888
1888
  }
1889
1889
  }
1890
- class fe {
1890
+ class ge {
1891
1891
  constructor(t) {
1892
1892
  n(this, "ctx");
1893
1893
  const e = t.getContext("2d");
@@ -2017,7 +2017,7 @@ class fe {
2017
2017
  };
2018
2018
  }
2019
2019
  }
2020
- class Ct {
2020
+ class yt {
2021
2021
  constructor(t) {
2022
2022
  n(this, "_config", {});
2023
2023
  /** CSS 类名前缀 */
@@ -2286,14 +2286,14 @@ class Ct {
2286
2286
  let t = {};
2287
2287
  Object.keys(this).forEach((e) => {
2288
2288
  if (e.endsWith("_COLOR") || e.endsWith("_FONT")) {
2289
- const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s = le(i);
2289
+ const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s = ce(i);
2290
2290
  t[e] = s;
2291
2291
  }
2292
2292
  }), Object.assign(this, t, this._config);
2293
2293
  }
2294
2294
  }
2295
- const bt = '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>';
2296
- class xe {
2295
+ const Ct = '<svg t="1724122044148" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4551" width="32" height="32"><path d="M707.648 401.28L489.28 560.704l22.656 30.976 22.656-30.976L316.16 401.216q-3.072-2.24-6.464-3.84-3.456-1.536-7.104-2.432-3.712-0.896-7.488-1.088-3.776-0.128-7.488 0.448-3.776 0.64-7.296 1.92-3.584 1.28-6.784 3.2-3.2 1.984-6.016 4.544-2.816 2.56-5.056 5.632-2.176 3.072-3.84 6.464-1.536 3.456-2.432 7.104-0.896 3.712-1.088 7.488-0.128 3.776 0.448 7.488 0.64 3.776 1.92 7.296 1.28 3.584 3.2 6.784 1.984 3.2 4.544 6.016 2.56 2.752 5.632 4.992l218.368 159.552q4.928 3.584 10.752 5.504 5.76 1.92 11.904 1.92 6.08 0 11.904-1.92 5.76-1.92 10.752-5.504l218.368-159.552q3.008-2.24 5.568-4.992 2.56-2.816 4.544-6.016 1.92-3.2 3.264-6.784 1.28-3.52 1.92-7.296 0.576-3.712 0.384-7.488-0.128-3.84-1.024-7.488-0.896-3.648-2.496-7.04-1.6-3.456-3.84-6.528-2.24-3.072-4.992-5.632-2.816-2.56-6.016-4.48-3.2-1.984-6.784-3.328-3.584-1.28-7.296-1.856-3.712-0.64-7.488-0.448-3.84 0.192-7.488 1.088-3.648 0.896-7.04 2.496-3.456 1.536-6.528 3.84z m61.056 30.976q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.472-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.72-3.584-3.456-1.408-7.168-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.656 3.584-3.136 2.112-5.76 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.584 6.656-1.408 3.52-2.176 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.176 7.168 1.472 3.52 3.584 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.168-2.176 3.52-1.408 6.656-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.048-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z m-436.736 0q0-3.84-0.768-7.488-0.704-3.712-2.176-7.232-1.408-3.456-3.52-6.656-2.112-3.136-4.8-5.76-2.688-2.688-5.76-4.8-3.2-2.112-6.656-3.584-3.52-1.408-7.232-2.176-3.712-0.704-7.488-0.704-3.84 0-7.488 0.704-3.712 0.768-7.232 2.176-3.456 1.472-6.592 3.584-3.2 2.112-5.824 4.8-2.688 2.624-4.8 5.76-2.112 3.2-3.52 6.656-1.472 3.52-2.24 7.232-0.704 3.712-0.704 7.488 0 3.776 0.704 7.488 0.768 3.712 2.24 7.168 1.408 3.52 3.52 6.656 2.112 3.2 4.8 5.824 2.624 2.688 5.76 4.8 3.2 2.112 6.656 3.52 3.52 1.472 7.232 2.176 3.712 0.768 7.488 0.768 3.776 0 7.488-0.768 3.712-0.704 7.232-2.176 3.456-1.408 6.592-3.52 3.2-2.112 5.824-4.8 2.688-2.688 4.8-5.76 2.112-3.2 3.52-6.72 1.472-3.456 2.176-7.168 0.768-3.712 0.768-7.488z" p-id="4552"></path></svg>';
2296
+ class we {
2297
2297
  constructor(t) {
2298
2298
  n(this, "ctx");
2299
2299
  n(this, "list", [
@@ -2315,7 +2315,7 @@ class xe {
2315
2315
  name: "shrink",
2316
2316
  configName: "CHECKBOX_UNCHECK_SVG",
2317
2317
  configColorName: "SHRINK_ICON_COLOR",
2318
- svg: bt,
2318
+ svg: Ct,
2319
2319
  color: "#4E5969"
2320
2320
  },
2321
2321
  {
@@ -2367,7 +2367,7 @@ class xe {
2367
2367
  name: "icon-select",
2368
2368
  configName: "CHECKBOX_UNCHECK_SVG",
2369
2369
  configColorName: "SHRINK_ICON_COLOR",
2370
- svg: bt,
2370
+ svg: Ct,
2371
2371
  color: "#4E5969"
2372
2372
  }
2373
2373
  ]);
@@ -2426,7 +2426,7 @@ class xe {
2426
2426
  return this.icons.get(t);
2427
2427
  }
2428
2428
  }
2429
- class kt extends Dt {
2429
+ class Xt extends kt {
2430
2430
  constructor(e, i, s, o, r, l, a) {
2431
2431
  super(e, s, o, r, l, "header", a.fixed);
2432
2432
  n(this, "align");
@@ -2469,7 +2469,7 @@ class kt extends Dt {
2469
2469
  n(this, "drawImageHeight", 0);
2470
2470
  n(this, "drawImageName", "");
2471
2471
  n(this, "drawImageSource");
2472
- this.ctx = e, this.x = s, this.y = o, this.width = r, this.height = l, this.visibleWidth = r, this.visibleHeight = l, this.colIndex = i, this.key = a.key, this.minWidth = a.minWidth, this.maxWidth = a.maxWidth, this.type = a.type || "", this.editorType = a.editorType || "text", this.align = a.align || "center", this.verticalAlign = a.verticalAlign || "middle", this.fixed = a.fixed, this.level = a.level || 0, this.operation = a.operation || !1, this.text = a.title, this.column = a, this.colspan = a.colspan || 1, this.widthFillDisable = a.widthFillDisable || !1, this.rowspan = a.rowspan || 1, this.rules = a.rules, this.readonly = a.readonly || !1, this.required = a.required || !1, this.rowKey = St(), this.overflowTooltipShow = a.overflowTooltipHeaderShow !== !1, this.hasChildren = a.children && a.children.length > 0 || !1, this.render = a.renderHeader;
2472
+ this.ctx = e, this.x = s, this.y = o, this.width = r, this.height = l, this.visibleWidth = r, this.visibleHeight = l, this.colIndex = i, this.key = a.key, this.minWidth = a.minWidth, this.maxWidth = a.maxWidth, this.type = a.type || "", this.editorType = a.editorType || "text", this.align = a.align || "center", this.verticalAlign = a.verticalAlign || "middle", this.fixed = a.fixed, this.level = a.level || 0, this.operation = a.operation || !1, this.text = a.title, this.column = a, this.colspan = a.colspan || 1, this.widthFillDisable = a.widthFillDisable || !1, this.rowspan = a.rowspan || 1, this.rules = a.rules, this.readonly = a.readonly || !1, this.required = a.required || !1, this.rowKey = Lt(), this.overflowTooltipShow = a.overflowTooltipHeaderShow !== !1, this.hasChildren = a.children && a.children.length > 0 || !1, this.render = a.renderHeader;
2473
2473
  }
2474
2474
  /**
2475
2475
  * 是否可见,覆盖基类方法,表头是跟y滚动条没有关系的所以不需要加滚动参数
@@ -2560,7 +2560,7 @@ class kt extends Dt {
2560
2560
  };
2561
2561
  }
2562
2562
  }
2563
- class ue {
2563
+ class pe {
2564
2564
  constructor(t) {
2565
2565
  n(this, "ctx");
2566
2566
  n(this, "visibleHoverCell");
@@ -2646,7 +2646,7 @@ class ue {
2646
2646
  */
2647
2647
  selectionClick(t) {
2648
2648
  if (["selection", "index-selection"].includes(t.type) && this.ctx.isPointer)
2649
- if (t instanceof kt)
2649
+ if (t instanceof Xt)
2650
2650
  t.drawImageName === "checkbox-uncheck" || t.drawImageName === "checkbox-indeterminate" ? this.ctx.database.toggleAllSelection() : t.drawImageName === "checkbox-check" && this.ctx.database.clearSelection(!0);
2651
2651
  else {
2652
2652
  if (!this.ctx.database.getRowSelectable(t.rowKey))
@@ -2690,7 +2690,7 @@ class ue {
2690
2690
  }
2691
2691
  selectionEnterAndLeave(t, e) {
2692
2692
  const { offsetY: i, offsetX: s } = this.ctx.getOffset(e), o = i, r = s;
2693
- r > t.drawImageX && r < t.drawImageX + t.drawImageWidth && o > t.drawImageY && o < t.drawImageY + t.drawImageHeight && t instanceof ut && ["selection", "index-selection"].includes(t.type) && (this.ctx.stageElement.style.cursor = "pointer", this.ctx.isPointer = !0, this.ctx.database.getRowSelectable(t.rowKey) || (this.ctx.stageElement.style.cursor = "not-allowed"));
2693
+ r > t.drawImageX && r < t.drawImageX + t.drawImageWidth && o > t.drawImageY && o < t.drawImageY + t.drawImageHeight && t instanceof ft && ["selection", "index-selection"].includes(t.type) && (this.ctx.stageElement.style.cursor = "pointer", this.ctx.isPointer = !0, this.ctx.database.getRowSelectable(t.rowKey) || (this.ctx.stageElement.style.cursor = "not-allowed"));
2694
2694
  }
2695
2695
  isBusy(t) {
2696
2696
  const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = e, o = i;
@@ -2733,7 +2733,7 @@ class ue {
2733
2733
  this.resizeObserver.unobserve(this.ctx.stageElement), this.mutationObserver.disconnect();
2734
2734
  }
2735
2735
  }
2736
- class ge {
2736
+ class Ee {
2737
2737
  constructor(t, e) {
2738
2738
  n(this, "eventBus");
2739
2739
  n(this, "eventBrowser");
@@ -2853,10 +2853,10 @@ class ge {
2853
2853
  emptyElement: a,
2854
2854
  contextMenuElement: h
2855
2855
  } = t;
2856
- this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = l, this.emptyElement = a, this.contextMenuElement = h, this.config = new Ct(e.config || {}), this.eventBus = new de(), this.eventBrowser = new ce(this), this.eventTable = new ue(this), this.paint = new fe(this.canvasElement), this.database = new ae(this, e), this.history = new he(this), this.icons = new xe(this);
2856
+ this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = l, this.emptyElement = a, this.contextMenuElement = h, this.config = new yt(e.config || {}), this.eventBus = new ue(), this.eventBrowser = new xe(this), this.eventTable = new pe(this), this.paint = new ge(this.canvasElement), this.database = new de(this, e), this.history = new fe(this), this.icons = new we(this);
2857
2857
  }
2858
2858
  setConfig(t) {
2859
- this.config = new Ct(t);
2859
+ this.config = new yt(t);
2860
2860
  }
2861
2861
  setItemValueByEditor(t, e, i, s = !0, o = !0, r = !0) {
2862
2862
  if (this.config.ENABLE_MERGE_CELL_LINK) {
@@ -2981,7 +2981,7 @@ class ge {
2981
2981
  this.eventTable.destroy(), this.eventBrowser.destroy(), this.eventBus.destroy();
2982
2982
  }
2983
2983
  }
2984
- class Rt {
2984
+ class bt {
2985
2985
  constructor(t, e) {
2986
2986
  n(this, "ctx");
2987
2987
  n(this, "type");
@@ -3108,12 +3108,12 @@ class Rt {
3108
3108
  }), this.ctx.scrollerFocus = this.isFocus;
3109
3109
  }
3110
3110
  }
3111
- class we {
3111
+ class me {
3112
3112
  constructor(t) {
3113
3113
  n(this, "ctx");
3114
3114
  n(this, "verticalScrollbar");
3115
3115
  n(this, "horizontalScrollbar");
3116
- this.ctx = t, this.verticalScrollbar = new Rt(t, "vertical"), this.horizontalScrollbar = new Rt(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) => {
3116
+ this.ctx = t, this.verticalScrollbar = new bt(t, "vertical"), this.horizontalScrollbar = new bt(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) => {
3117
3117
  this.onTouchstart(e);
3118
3118
  }), this.ctx.on("setScroll", (e, i) => {
3119
3119
  this.setScroll(e, i);
@@ -3175,7 +3175,7 @@ class we {
3175
3175
  this.setScrollY(o - e.visibleHeight / 2);
3176
3176
  }
3177
3177
  }
3178
- class pe {
3178
+ class ye {
3179
3179
  constructor(t) {
3180
3180
  n(this, "ctx");
3181
3181
  // 上下文
@@ -3214,7 +3214,7 @@ class pe {
3214
3214
  n(this, "renderFixedCellHeaders", []);
3215
3215
  this.ctx = t, this.ctx.on(
3216
3216
  "resetHeader",
3217
- Lt(() => {
3217
+ Tt(() => {
3218
3218
  this.init(), this.ctx.emit("draw");
3219
3219
  }, 100)
3220
3220
  ), this.init(), this.initResizeColumn();
@@ -3224,12 +3224,12 @@ class pe {
3224
3224
  config: { HEADER_HEIGHT: t, SCROLLER_TRACK_SIZE: e }
3225
3225
  } = this.ctx, i = this.ctx.database.getColumns();
3226
3226
  this.columns = i, this.allCellHeaders = [], this.leafCellHeaders = [], this.fixedLeftCellHeaders = [], this.fixedRightCellHeaders = [], this.centerCellHeaders = [];
3227
- const s = Tt(i), o = et(i);
3227
+ const s = At(i), o = et(i);
3228
3228
  this.height = t * s, this.width = o.reduce((f, x) => {
3229
3229
  const u = x.width || 100, { maxWidth: p, minWidth: g } = x;
3230
3230
  return p && u > p ? f + p : g && u < g ? f + g : f + u;
3231
3231
  }, 0), this.visibleHeight = this.height;
3232
- const r = ee(At(i, s));
3232
+ const r = oe(Mt(i, s));
3233
3233
  this.columnIndex = 0, this.resizeNum = 0, this.render(r, 0), this.ctx.database.updateColIndexKeyMap(this.leafCellHeaders);
3234
3234
  const l = this.ctx.containerElement.getBoundingClientRect();
3235
3235
  this.resizeNum > 0 ? this.ctx.stageWidth = Math.floor(l.width) : this.ctx.stageWidth = Math.floor(this.width + e), this.ctx.stageElement.style.width = this.ctx.stageWidth + "px", this.visibleWidth = this.ctx.stageWidth - e;
@@ -3331,7 +3331,7 @@ class pe {
3331
3331
  const l = t[r], a = o * (l.rowspan || 0), h = o * (l.level || 0);
3332
3332
  let { minWidth: d, maxWidth: f } = l, x = l.width || 100;
3333
3333
  d && x < d && (x = d), f && x > f && (x = f), l.children && (x = et(l.children).reduce((g, w) => g + ((w == null ? void 0 : w.width) || 100), 0));
3334
- const u = new kt(this.ctx, this.columnIndex, s, h, x, a, l);
3334
+ const u = new Xt(this.ctx, this.columnIndex, s, h, x, a, l);
3335
3335
  this.ctx.database.setHeader(l.key, u), this.allCellHeaders.push(u), l.children || (this.leafCellHeaders.push(u), u.column.widthFillDisable || this.resizeNum++), l.fixed === "left" ? this.fixedLeftCellHeaders.push(u) : l.fixed === "right" ? this.fixedRightCellHeaders.push(u) : this.centerCellHeaders.push(u), !l.children && this.columnIndex++, l.children && this.render(l.children, s), s += x;
3336
3336
  }
3337
3337
  }
@@ -3405,7 +3405,7 @@ class pe {
3405
3405
  }), this.drawTipLine(), this.drawBottomLine();
3406
3406
  }
3407
3407
  }
3408
- class Xt {
3408
+ class Bt {
3409
3409
  constructor(t, e, i = 0, s = 0, o = 0, r = 0, l, a = "body") {
3410
3410
  n(this, "ctx");
3411
3411
  n(this, "x", 0);
@@ -3424,7 +3424,7 @@ class Xt {
3424
3424
  update() {
3425
3425
  const { header: t } = this.ctx, e = [], i = [], s = [];
3426
3426
  t.renderLeafCellHeaders.forEach((o) => {
3427
- const r = new ut(
3427
+ const r = new ft(
3428
3428
  this.ctx,
3429
3429
  this.rowIndex,
3430
3430
  o.colIndex,
@@ -3460,7 +3460,7 @@ class Xt {
3460
3460
  });
3461
3461
  }
3462
3462
  }
3463
- class Ee {
3463
+ class Ce {
3464
3464
  constructor(t) {
3465
3465
  n(this, "resizeTarget", null);
3466
3466
  //调整行大小的目标
@@ -3522,8 +3522,8 @@ class Ee {
3522
3522
  E > 0 && (this.ctx.stageHeight = Math.floor(E), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
3523
3523
  let R = this.ctx.stageHeight - e.height - r;
3524
3524
  o ? this.visibleHeight = R - g : this.visibleHeight = R, this.data.length || (this.height = this.visibleHeight), this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = u;
3525
- const C = window.devicePixelRatio || 1, v = this.ctx.stageWidth * C, _ = this.ctx.stageHeight * C;
3526
- t.width = Math.round(v), t.height = Math.round(_);
3525
+ const C = window.devicePixelRatio || 1, I = this.ctx.stageWidth * C, _ = this.ctx.stageHeight * C;
3526
+ t.width = Math.round(I), t.height = Math.round(_);
3527
3527
  const S = this.data.length ? "not-empty" : "empty";
3528
3528
  this.ctx.emit("emptyChange", {
3529
3529
  isEmpty: S,
@@ -3534,8 +3534,8 @@ class Ee {
3534
3534
  width: this.width,
3535
3535
  height: this.data.length ? 0 : a + g
3536
3536
  });
3537
- const I = Math.round(t.width / C * 1e4) / 1e4, b = Math.round(t.height / C * 1e4) / 1e4;
3538
- this.ctx.canvasElement.setAttribute("style", `height:${b}px;width:${I}px;`), this.ctx.paint.scale(C);
3537
+ const v = Math.round(t.width / C * 1e4) / 1e4, b = Math.round(t.height / C * 1e4) / 1e4;
3538
+ this.ctx.canvasElement.setAttribute("style", `height:${b}px;width:${v}px;`), this.ctx.paint.scale(C);
3539
3539
  }
3540
3540
  // 调整行的高度
3541
3541
  initResizeRow() {
@@ -3661,7 +3661,7 @@ class Ee {
3661
3661
  this.headIndex = Math.max(0, a), this.tailIndex = Math.min(this.ctx.maxRowIndex, h + 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;
3662
3662
  const d = [];
3663
3663
  for (let f = 0; f < this.visibleRows.length; f++) {
3664
- const x = this.headIndex + f, u = this.visibleRows[f], { height: p, top: g } = this.ctx.database.getPositionForRowIndex(x), w = new Xt(this.ctx, x, 0, g + this.y, t.width, p, u);
3664
+ const x = this.headIndex + f, u = this.visibleRows[f], { height: p, top: g } = this.ctx.database.getPositionForRowIndex(x), w = new Bt(this.ctx, x, 0, g + this.y, t.width, p, u);
3665
3665
  d.push(w);
3666
3666
  }
3667
3667
  this.renderRows = d, this.ctx.body.renderRows = d;
@@ -3678,7 +3678,7 @@ class Ee {
3678
3678
  }), this.drawTipLine();
3679
3679
  }
3680
3680
  }
3681
- class me {
3681
+ class be {
3682
3682
  constructor(t) {
3683
3683
  n(this, "ctx");
3684
3684
  n(this, "renderRows", []);
@@ -3733,7 +3733,7 @@ class me {
3733
3733
  let e = this.y;
3734
3734
  const i = [];
3735
3735
  this.data.forEach((s, o) => {
3736
- const r = new Xt(this.ctx, o, 0, e, this.width, t, s, "footer");
3736
+ const r = new Bt(this.ctx, o, 0, e, this.width, t, s, "footer");
3737
3737
  e += t, i.push(r);
3738
3738
  }), this.renderRows = i, this.ctx.footer.renderRows = this.renderRows;
3739
3739
  }
@@ -3759,7 +3759,7 @@ class me {
3759
3759
  }), this.drawTopLine();
3760
3760
  }
3761
3761
  }
3762
- class ye {
3762
+ class Re {
3763
3763
  // 垂直滚动定时器
3764
3764
  constructor(t) {
3765
3765
  n(this, "isCut", !1);
@@ -3778,7 +3778,7 @@ class ye {
3778
3778
  this.moveFocus(t);
3779
3779
  }), this.ctx.on(
3780
3780
  "mousemove",
3781
- Lt((t) => {
3781
+ Tt((t) => {
3782
3782
  const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = this.ctx.isTarget(t) && i > 0 && i < this.ctx.body.visibleWidth && e > this.ctx.header.visibleHeight && e < this.ctx.header.visibleHeight + this.ctx.body.visibleHeight;
3783
3783
  (this.ctx.selectorMove || this.ctx.autofillMove) && (!s && !this.mousedownHeader ? this.startAdjustPosition(t) : this.stopAdjustPosition());
3784
3784
  }, 100)
@@ -3886,8 +3886,8 @@ class ye {
3886
3886
  if (E < u || y > p || m < g || R > w)
3887
3887
  return;
3888
3888
  if (this.ctx.stageElement.focus({ preventScroll: !0 }), this.ctx.config.ENABLE_MERGE_CELL_LINK) {
3889
- const v = this.adjustMergeCells(o, r);
3890
- m = v.yArr[0], R = v.yArr[1], E = v.xArr[0], y = v.xArr[1], this.ctx.onlyMergeCell = v.onlyMergeCell;
3889
+ const I = this.adjustMergeCells(o, r);
3890
+ m = I.yArr[0], R = I.yArr[1], E = I.xArr[0], y = I.xArr[1], this.ctx.onlyMergeCell = I.onlyMergeCell;
3891
3891
  }
3892
3892
  E === y && m === R ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, o = [Math.max(u, E), Math.min(p, y)], r = [Math.max(g, m), Math.min(w, R)];
3893
3893
  const { BEFORE_SET_SELECTOR_METHOD: C } = this.ctx.config;
@@ -4069,7 +4069,7 @@ class ye {
4069
4069
  return;
4070
4070
  t = l.data;
4071
4071
  }
4072
- const o = oe(t);
4072
+ const o = le(t);
4073
4073
  navigator.clipboard ? navigator.clipboard.writeText(o).then(() => {
4074
4074
  this.ctx.selector.xArrCopy = this.ctx.selector.xArr.slice(), this.ctx.selector.yArrCopy = this.ctx.selector.yArr.slice(), this.ctx.emit("copyChange", {
4075
4075
  xArr: this.ctx.selector.xArrCopy,
@@ -4114,7 +4114,7 @@ class ye {
4114
4114
  if (this.ctx.selector.enable && t) {
4115
4115
  const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
4116
4116
  navigator.clipboard.readText().then(async (o) => {
4117
- let r = se(o);
4117
+ let r = ne(o);
4118
4118
  const l = [i, i + r[0].length - 1], a = [e, e + r.length - 1], [h, d] = a, [f, x] = l, u = d - this.ctx.maxRowIndex, p = x - this.ctx.maxColIndex;
4119
4119
  (u > 0 || p > 0) && this.ctx.emit("onPastedDataOverflow", {
4120
4120
  maxY: d,
@@ -4138,12 +4138,12 @@ class ye {
4138
4138
  for (let m = 0; m <= r.length - 1; m++) {
4139
4139
  const R = r[m].length;
4140
4140
  for (let C = 0; C <= R - 1; C++) {
4141
- const v = m + e, _ = C + i, S = r[m][C], I = this.ctx.database.getItemValueForRowIndexAndColIndex(
4142
- v,
4141
+ const I = m + e, _ = C + i, S = r[m][C], v = this.ctx.database.getItemValueForRowIndexAndColIndex(
4142
+ I,
4143
4143
  _
4144
4144
  );
4145
- if (I) {
4146
- const { rowKey: b, key: O } = I;
4145
+ if (v) {
4146
+ const { rowKey: b, key: O } = v;
4147
4147
  this.ctx.database.getReadonly(b, O) || (s.add(b), w.push({
4148
4148
  rowKey: b,
4149
4149
  key: O,
@@ -4278,19 +4278,19 @@ class ye {
4278
4278
  return;
4279
4279
  p && this.ctx.onlyMergeCell && i.updateSpanInfo();
4280
4280
  const { drawX: g, drawY: w, width: E, height: y, fixed: m } = i, R = o - g + 1, C = i.drawX + E - (e - s) + 1;
4281
- let v = r.height - w, _ = y;
4281
+ let I = r.height - w, _ = y;
4282
4282
  _ > a.visibleHeight && (_ = a.visibleHeight);
4283
4283
  let S = 0;
4284
- x && (u === "top" ? v = r.height + l.height - w : S = l.visibleHeight);
4285
- const I = w + _ - (t - S - f);
4284
+ x && (u === "top" ? I = r.height + l.height - w : S = l.visibleHeight);
4285
+ const v = w + _ - (t - S - f);
4286
4286
  let b = h, O = d;
4287
- C > 0 && !m ? b = Math.floor(h + C) : R > 0 && !m && (b = Math.floor(h - R)), v > 0 ? O = Math.floor(d - v) : I > 0 && (O = Math.floor(d + I)), (Math.abs(h - b) > 2 || Math.abs(d - O) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(b, O), this.ctx.emit("adjustBoundaryPosition", i));
4287
+ C > 0 && !m ? b = Math.floor(h + C) : R > 0 && !m && (b = Math.floor(h - R)), I > 0 ? O = Math.floor(d - I) : v > 0 && (O = Math.floor(d + v)), (Math.abs(h - b) > 2 || Math.abs(d - O) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.setScroll(b, O), this.ctx.emit("adjustBoundaryPosition", i));
4288
4288
  }
4289
4289
  destroy() {
4290
4290
  this.timerX && (clearTimeout(this.timerX), this.timerX = 0), this.timerY && (clearTimeout(this.timerY), this.timerY = 0);
4291
4291
  }
4292
4292
  }
4293
- class Ce {
4293
+ class ve {
4294
4294
  constructor(t) {
4295
4295
  n(this, "ctx");
4296
4296
  n(this, "maxColRowCell");
@@ -4353,9 +4353,9 @@ class Ce {
4353
4353
  if (y < p || R < w)
4354
4354
  return;
4355
4355
  r = [Math.max(p, y), Math.min(g, m)], l = [Math.max(w, R), Math.min(E, C)];
4356
- const { BEFORE_SET_AUTOFILL_METHOD: v } = this.ctx.config;
4357
- if (typeof v == "function") {
4358
- const S = v({
4356
+ const { BEFORE_SET_AUTOFILL_METHOD: I } = this.ctx.config;
4357
+ if (typeof I == "function") {
4358
+ const S = I({
4359
4359
  focusCell: this.ctx.focusCell,
4360
4360
  xArr: r,
4361
4361
  yArr: l
@@ -4433,77 +4433,78 @@ class Ce {
4433
4433
  destroy() {
4434
4434
  }
4435
4435
  }
4436
- const Z = Math.min, z = Math.max, it = Math.round, W = (c) => ({
4436
+ const Z = Math.min, $ = Math.max, it = Math.round, K = (c) => ({
4437
4437
  x: c,
4438
4438
  y: c
4439
- }), be = {
4439
+ }), Ie = {
4440
4440
  left: "right",
4441
4441
  right: "left",
4442
4442
  bottom: "top",
4443
4443
  top: "bottom"
4444
- }, Re = {
4444
+ }, _e = {
4445
4445
  start: "end",
4446
4446
  end: "start"
4447
4447
  };
4448
4448
  function ht(c, t, e) {
4449
- return z(c, Z(t, e));
4449
+ return $(c, Z(t, e));
4450
4450
  }
4451
4451
  function J(c, t) {
4452
4452
  return typeof c == "function" ? c(t) : c;
4453
4453
  }
4454
- function P(c) {
4454
+ function z(c) {
4455
4455
  return c.split("-")[0];
4456
4456
  }
4457
4457
  function Q(c) {
4458
4458
  return c.split("-")[1];
4459
4459
  }
4460
- function Bt(c) {
4460
+ function Kt(c) {
4461
4461
  return c === "x" ? "y" : "x";
4462
4462
  }
4463
- function gt(c) {
4463
+ function xt(c) {
4464
4464
  return c === "y" ? "height" : "width";
4465
4465
  }
4466
- function G(c) {
4467
- return ["top", "bottom"].includes(P(c)) ? "y" : "x";
4466
+ const Oe = /* @__PURE__ */ new Set(["top", "bottom"]);
4467
+ function V(c) {
4468
+ return Oe.has(z(c)) ? "y" : "x";
4468
4469
  }
4469
- function wt(c) {
4470
- return Bt(G(c));
4470
+ function ut(c) {
4471
+ return Kt(V(c));
4471
4472
  }
4472
- function Ie(c, t, e) {
4473
+ function Se(c, t, e) {
4473
4474
  e === void 0 && (e = !1);
4474
- const i = Q(c), s = wt(c), o = gt(s);
4475
+ const i = Q(c), s = ut(c), o = xt(s);
4475
4476
  let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
4476
4477
  return t.reference[o] > t.floating[o] && (r = st(r)), [r, st(r)];
4477
4478
  }
4478
- function ve(c) {
4479
+ function Le(c) {
4479
4480
  const t = st(c);
4480
4481
  return [ct(c), t, ct(t)];
4481
4482
  }
4482
4483
  function ct(c) {
4483
- return c.replace(/start|end/g, (t) => Re[t]);
4484
+ return c.replace(/start|end/g, (t) => _e[t]);
4484
4485
  }
4485
- function _e(c, t, e) {
4486
- const i = ["left", "right"], s = ["right", "left"], o = ["top", "bottom"], r = ["bottom", "top"];
4486
+ const Rt = ["left", "right"], vt = ["right", "left"], Te = ["top", "bottom"], Ae = ["bottom", "top"];
4487
+ function Me(c, t, e) {
4487
4488
  switch (c) {
4488
4489
  case "top":
4489
4490
  case "bottom":
4490
- return e ? t ? s : i : t ? i : s;
4491
+ return e ? t ? vt : Rt : t ? Rt : vt;
4491
4492
  case "left":
4492
4493
  case "right":
4493
- return t ? o : r;
4494
+ return t ? Te : Ae;
4494
4495
  default:
4495
4496
  return [];
4496
4497
  }
4497
4498
  }
4498
- function Oe(c, t, e, i) {
4499
+ function He(c, t, e, i) {
4499
4500
  const s = Q(c);
4500
- let o = _e(P(c), e === "start", i);
4501
+ let o = Me(z(c), e === "start", i);
4501
4502
  return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(ct)))), o;
4502
4503
  }
4503
4504
  function st(c) {
4504
- return c.replace(/left|right|bottom|top/g, (t) => be[t]);
4505
+ return c.replace(/left|right|bottom|top/g, (t) => Ie[t]);
4505
4506
  }
4506
- function Se(c) {
4507
+ function De(c) {
4507
4508
  return {
4508
4509
  top: 0,
4509
4510
  right: 0,
@@ -4512,8 +4513,8 @@ function Se(c) {
4512
4513
  ...c
4513
4514
  };
4514
4515
  }
4515
- function Kt(c) {
4516
- return typeof c != "number" ? Se(c) : {
4516
+ function Nt(c) {
4517
+ return typeof c != "number" ? De(c) : {
4517
4518
  top: c,
4518
4519
  right: c,
4519
4520
  bottom: c,
@@ -4543,7 +4544,7 @@ function It(c, t, e) {
4543
4544
  reference: i,
4544
4545
  floating: s
4545
4546
  } = c;
4546
- const o = G(t), r = wt(t), l = gt(r), a = P(t), h = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, x = i[l] / 2 - s[l] / 2;
4547
+ const o = V(t), r = ut(t), l = xt(r), a = z(t), h = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, x = i[l] / 2 - s[l] / 2;
4547
4548
  let u;
4548
4549
  switch (a) {
4549
4550
  case "top":
@@ -4586,7 +4587,7 @@ function It(c, t, e) {
4586
4587
  }
4587
4588
  return u;
4588
4589
  }
4589
- const Le = async (c, t, e) => {
4590
+ const ke = async (c, t, e) => {
4590
4591
  const {
4591
4592
  placement: i = "bottom",
4592
4593
  strategy: s = "absolute",
@@ -4647,7 +4648,7 @@ const Le = async (c, t, e) => {
4647
4648
  middlewareData: u
4648
4649
  };
4649
4650
  };
4650
- async function Nt(c, t) {
4651
+ async function Yt(c, t) {
4651
4652
  var e;
4652
4653
  t === void 0 && (t = {});
4653
4654
  const {
@@ -4663,7 +4664,7 @@ async function Nt(c, t) {
4663
4664
  elementContext: f = "floating",
4664
4665
  altBoundary: x = !1,
4665
4666
  padding: u = 0
4666
- } = J(t, c), p = Kt(u), w = l[x ? f === "floating" ? "reference" : "floating" : f], E = ot(await o.getClippingRect({
4667
+ } = J(t, c), p = Nt(u), w = l[x ? f === "floating" ? "reference" : "floating" : f], E = ot(await o.getClippingRect({
4667
4668
  element: (e = await (o.isElement == null ? void 0 : o.isElement(w))) == null || e ? w : w.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(l.floating)),
4668
4669
  boundary: h,
4669
4670
  rootBoundary: d,
@@ -4692,7 +4693,7 @@ async function Nt(c, t) {
4692
4693
  right: (C.right - E.right + p.right) / R.x
4693
4694
  };
4694
4695
  }
4695
- const Te = (c) => ({
4696
+ const Xe = (c) => ({
4696
4697
  name: "arrow",
4697
4698
  options: c,
4698
4699
  async fn(t) {
@@ -4710,26 +4711,26 @@ const Te = (c) => ({
4710
4711
  } = J(c, t) || {};
4711
4712
  if (h == null)
4712
4713
  return {};
4713
- const f = Kt(d), x = {
4714
+ const f = Nt(d), x = {
4714
4715
  x: e,
4715
4716
  y: i
4716
- }, u = wt(s), p = gt(u), g = await r.getDimensions(h), w = u === "y", E = w ? "top" : "left", y = w ? "bottom" : "right", m = w ? "clientHeight" : "clientWidth", R = o.reference[p] + o.reference[u] - x[u] - o.floating[p], C = x[u] - o.reference[u], v = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
4717
- let _ = v ? v[m] : 0;
4718
- (!_ || !await (r.isElement == null ? void 0 : r.isElement(v))) && (_ = l.floating[m] || o.floating[p]);
4719
- const S = R / 2 - C / 2, I = _ / 2 - g[p] / 2 - 1, b = Z(f[E], I), O = Z(f[y], I), L = b, M = _ - g[p] - O, T = _ / 2 - g[p] / 2 + S, k = ht(L, T, M), K = !a.arrow && Q(s) != null && T !== k && o.reference[p] / 2 - (T < L ? b : O) - g[p] / 2 < 0, X = K ? T < L ? T - L : T - M : 0;
4717
+ }, u = ut(s), p = xt(u), g = await r.getDimensions(h), w = u === "y", E = w ? "top" : "left", y = w ? "bottom" : "right", m = w ? "clientHeight" : "clientWidth", R = o.reference[p] + o.reference[u] - x[u] - o.floating[p], C = x[u] - o.reference[u], I = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
4718
+ let _ = I ? I[m] : 0;
4719
+ (!_ || !await (r.isElement == null ? void 0 : r.isElement(I))) && (_ = l.floating[m] || o.floating[p]);
4720
+ const S = R / 2 - C / 2, v = _ / 2 - g[p] / 2 - 1, b = Z(f[E], v), O = Z(f[y], v), L = b, M = _ - g[p] - O, T = _ / 2 - g[p] / 2 + S, H = ht(L, T, M), Y = !a.arrow && Q(s) != null && T !== H && o.reference[p] / 2 - (T < L ? b : O) - g[p] / 2 < 0, D = Y ? T < L ? T - L : T - M : 0;
4720
4721
  return {
4721
- [u]: x[u] + X,
4722
+ [u]: x[u] + D,
4722
4723
  data: {
4723
- [u]: k,
4724
- centerOffset: T - k - X,
4725
- ...K && {
4726
- alignmentOffset: X
4724
+ [u]: H,
4725
+ centerOffset: T - H - D,
4726
+ ...Y && {
4727
+ alignmentOffset: D
4727
4728
  }
4728
4729
  },
4729
- reset: K
4730
+ reset: Y
4730
4731
  };
4731
4732
  }
4732
- }), Ae = function(c) {
4733
+ }), Be = function(c) {
4733
4734
  return c === void 0 && (c = {}), {
4734
4735
  name: "flip",
4735
4736
  options: c,
@@ -4753,68 +4754,70 @@ const Te = (c) => ({
4753
4754
  } = J(c, t);
4754
4755
  if ((e = o.arrow) != null && e.alignmentOffset)
4755
4756
  return {};
4756
- const E = P(s), y = G(l), m = P(l) === l, R = await (a.isRTL == null ? void 0 : a.isRTL(h.floating)), C = x || (m || !g ? [st(l)] : ve(l)), v = p !== "none";
4757
- !x && v && C.push(...Oe(l, g, p, R));
4758
- const _ = [l, ...C], S = await Nt(t, w), I = [];
4757
+ const E = z(s), y = V(l), m = z(l) === l, R = await (a.isRTL == null ? void 0 : a.isRTL(h.floating)), C = x || (m || !g ? [st(l)] : Le(l)), I = p !== "none";
4758
+ !x && I && C.push(...He(l, g, p, R));
4759
+ const _ = [l, ...C], S = await Yt(t, w), v = [];
4759
4760
  let b = ((i = o.flip) == null ? void 0 : i.overflows) || [];
4760
- if (d && I.push(S[E]), f) {
4761
- const T = Ie(s, r, R);
4762
- I.push(S[T[0]], S[T[1]]);
4761
+ if (d && v.push(S[E]), f) {
4762
+ const T = Se(s, r, R);
4763
+ v.push(S[T[0]], S[T[1]]);
4763
4764
  }
4764
4765
  if (b = [...b, {
4765
4766
  placement: s,
4766
- overflows: I
4767
- }], !I.every((T) => T <= 0)) {
4767
+ overflows: v
4768
+ }], !v.every((T) => T <= 0)) {
4768
4769
  var O, L;
4769
- const T = (((O = o.flip) == null ? void 0 : O.index) || 0) + 1, k = _[T];
4770
- if (k)
4770
+ const T = (((O = o.flip) == null ? void 0 : O.index) || 0) + 1, H = _[T];
4771
+ if (H && (!(f === "alignment" ? y !== V(H) : !1) || // We leave the current main axis only if every placement on that axis
4772
+ // overflows the main axis.
4773
+ b.every((k) => V(k.placement) === y ? k.overflows[0] > 0 : !0)))
4771
4774
  return {
4772
4775
  data: {
4773
4776
  index: T,
4774
4777
  overflows: b
4775
4778
  },
4776
4779
  reset: {
4777
- placement: k
4780
+ placement: H
4778
4781
  }
4779
4782
  };
4780
- let K = (L = b.filter((X) => X.overflows[0] <= 0).sort((X, Y) => X.overflows[1] - Y.overflows[1])[0]) == null ? void 0 : L.placement;
4781
- if (!K)
4783
+ let Y = (L = b.filter((D) => D.overflows[0] <= 0).sort((D, k) => D.overflows[1] - k.overflows[1])[0]) == null ? void 0 : L.placement;
4784
+ if (!Y)
4782
4785
  switch (u) {
4783
4786
  case "bestFit": {
4784
4787
  var M;
4785
- const X = (M = b.filter((Y) => {
4786
- if (v) {
4787
- const F = G(Y.placement);
4788
- return F === y || // Create a bias to the `y` side axis due to horizontal
4788
+ const D = (M = b.filter((k) => {
4789
+ if (I) {
4790
+ const W = V(k.placement);
4791
+ return W === y || // Create a bias to the `y` side axis due to horizontal
4789
4792
  // reading directions favoring greater width.
4790
- F === "y";
4793
+ W === "y";
4791
4794
  }
4792
4795
  return !0;
4793
- }).map((Y) => [Y.placement, Y.overflows.filter((F) => F > 0).reduce((F, qt) => F + qt, 0)]).sort((Y, F) => Y[1] - F[1])[0]) == null ? void 0 : M[0];
4794
- X && (K = X);
4796
+ }).map((k) => [k.placement, k.overflows.filter((W) => W > 0).reduce((W, te) => W + te, 0)]).sort((k, W) => k[1] - W[1])[0]) == null ? void 0 : M[0];
4797
+ D && (Y = D);
4795
4798
  break;
4796
4799
  }
4797
4800
  case "initialPlacement":
4798
- K = l;
4801
+ Y = l;
4799
4802
  break;
4800
4803
  }
4801
- if (s !== K)
4804
+ if (s !== Y)
4802
4805
  return {
4803
4806
  reset: {
4804
- placement: K
4807
+ placement: Y
4805
4808
  }
4806
4809
  };
4807
4810
  }
4808
4811
  return {};
4809
4812
  }
4810
4813
  };
4811
- };
4812
- async function Me(c, t) {
4814
+ }, Ke = /* @__PURE__ */ new Set(["left", "top"]);
4815
+ async function Ne(c, t) {
4813
4816
  const {
4814
4817
  placement: e,
4815
4818
  platform: i,
4816
4819
  elements: s
4817
- } = c, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = P(e), l = Q(e), a = G(e) === "y", h = ["left", "top"].includes(r) ? -1 : 1, d = o && a ? -1 : 1, f = J(t, c);
4820
+ } = c, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = z(e), l = Q(e), a = V(e) === "y", h = Ke.has(r) ? -1 : 1, d = o && a ? -1 : 1, f = J(t, c);
4818
4821
  let {
4819
4822
  mainAxis: x,
4820
4823
  crossAxis: u,
@@ -4836,7 +4839,7 @@ async function Me(c, t) {
4836
4839
  y: u * d
4837
4840
  };
4838
4841
  }
4839
- const He = function(c) {
4842
+ const Ye = function(c) {
4840
4843
  return c === void 0 && (c = 0), {
4841
4844
  name: "offset",
4842
4845
  options: c,
@@ -4847,7 +4850,7 @@ const He = function(c) {
4847
4850
  y: o,
4848
4851
  placement: r,
4849
4852
  middlewareData: l
4850
- } = t, a = await Me(t, c);
4853
+ } = t, a = await Ne(t, c);
4851
4854
  return r === ((e = l.offset) == null ? void 0 : e.placement) && (i = l.arrow) != null && i.alignmentOffset ? {} : {
4852
4855
  x: s + a.x,
4853
4856
  y: o + a.y,
@@ -4858,7 +4861,7 @@ const He = function(c) {
4858
4861
  };
4859
4862
  }
4860
4863
  };
4861
- }, De = function(c) {
4864
+ }, Fe = function(c) {
4862
4865
  return c === void 0 && (c = {}), {
4863
4866
  name: "shift",
4864
4867
  options: c,
@@ -4886,7 +4889,7 @@ const He = function(c) {
4886
4889
  } = J(c, t), h = {
4887
4890
  x: e,
4888
4891
  y: i
4889
- }, d = await Nt(t, a), f = G(P(s)), x = Bt(f);
4892
+ }, d = await Yt(t, a), f = V(z(s)), x = Kt(f);
4890
4893
  let u = h[x], p = h[f];
4891
4894
  if (o) {
4892
4895
  const w = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right", y = u + d[w], m = u - d[E];
@@ -4919,42 +4922,45 @@ function rt() {
4919
4922
  return typeof window < "u";
4920
4923
  }
4921
4924
  function j(c) {
4922
- return Yt(c) ? (c.nodeName || "").toLowerCase() : "#document";
4925
+ return Ft(c) ? (c.nodeName || "").toLowerCase() : "#document";
4923
4926
  }
4924
4927
  function A(c) {
4925
4928
  var t;
4926
4929
  return (c == null || (t = c.ownerDocument) == null ? void 0 : t.defaultView) || window;
4927
4930
  }
4928
- function N(c) {
4931
+ function F(c) {
4929
4932
  var t;
4930
- return (t = (Yt(c) ? c.ownerDocument : c.document) || window.document) == null ? void 0 : t.documentElement;
4933
+ return (t = (Ft(c) ? c.ownerDocument : c.document) || window.document) == null ? void 0 : t.documentElement;
4931
4934
  }
4932
- function Yt(c) {
4935
+ function Ft(c) {
4933
4936
  return rt() ? c instanceof Node || c instanceof A(c).Node : !1;
4934
4937
  }
4935
- function H(c) {
4938
+ function X(c) {
4936
4939
  return rt() ? c instanceof Element || c instanceof A(c).Element : !1;
4937
4940
  }
4938
- function B(c) {
4941
+ function N(c) {
4939
4942
  return rt() ? c instanceof HTMLElement || c instanceof A(c).HTMLElement : !1;
4940
4943
  }
4941
- function vt(c) {
4944
+ function _t(c) {
4942
4945
  return !rt() || typeof ShadowRoot > "u" ? !1 : c instanceof ShadowRoot || c instanceof A(c).ShadowRoot;
4943
4946
  }
4947
+ const We = /* @__PURE__ */ new Set(["inline", "contents"]);
4944
4948
  function tt(c) {
4945
4949
  const {
4946
4950
  overflow: t,
4947
4951
  overflowX: e,
4948
4952
  overflowY: i,
4949
4953
  display: s
4950
- } = D(c);
4951
- return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !["inline", "contents"].includes(s);
4954
+ } = B(c);
4955
+ return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !We.has(s);
4952
4956
  }
4953
- function ke(c) {
4954
- return ["table", "td", "th"].includes(j(c));
4957
+ const Ve = /* @__PURE__ */ new Set(["table", "td", "th"]);
4958
+ function Pe(c) {
4959
+ return Ve.has(j(c));
4955
4960
  }
4961
+ const ze = [":popover-open", ":modal"];
4956
4962
  function nt(c) {
4957
- return [":popover-open", ":modal"].some((t) => {
4963
+ return ze.some((t) => {
4958
4964
  try {
4959
4965
  return c.matches(t);
4960
4966
  } catch {
@@ -4962,32 +4968,34 @@ function nt(c) {
4962
4968
  }
4963
4969
  });
4964
4970
  }
4965
- function pt(c) {
4966
- const t = Et(), e = H(c) ? D(c) : c;
4967
- 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));
4971
+ const $e = ["transform", "translate", "scale", "rotate", "perspective"], Ge = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ue = ["paint", "layout", "strict", "content"];
4972
+ function gt(c) {
4973
+ const t = wt(), e = X(c) ? B(c) : c;
4974
+ return $e.some((i) => e[i] ? e[i] !== "none" : !1) || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || Ge.some((i) => (e.willChange || "").includes(i)) || Ue.some((i) => (e.contain || "").includes(i));
4968
4975
  }
4969
- function Xe(c) {
4970
- let t = V(c);
4971
- for (; B(t) && !U(t); ) {
4972
- if (pt(t))
4976
+ function je(c) {
4977
+ let t = P(c);
4978
+ for (; N(t) && !U(t); ) {
4979
+ if (gt(t))
4973
4980
  return t;
4974
4981
  if (nt(t))
4975
4982
  return null;
4976
- t = V(t);
4983
+ t = P(t);
4977
4984
  }
4978
4985
  return null;
4979
4986
  }
4980
- function Et() {
4987
+ function wt() {
4981
4988
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
4982
4989
  }
4990
+ const Ze = /* @__PURE__ */ new Set(["html", "body", "#document"]);
4983
4991
  function U(c) {
4984
- return ["html", "body", "#document"].includes(j(c));
4992
+ return Ze.has(j(c));
4985
4993
  }
4986
- function D(c) {
4994
+ function B(c) {
4987
4995
  return A(c).getComputedStyle(c);
4988
4996
  }
4989
4997
  function lt(c) {
4990
- return H(c) ? {
4998
+ return X(c) ? {
4991
4999
  scrollLeft: c.scrollLeft,
4992
5000
  scrollTop: c.scrollTop
4993
5001
  } : {
@@ -4995,87 +5003,83 @@ function lt(c) {
4995
5003
  scrollTop: c.scrollY
4996
5004
  };
4997
5005
  }
4998
- function V(c) {
5006
+ function P(c) {
4999
5007
  if (j(c) === "html")
5000
5008
  return c;
5001
5009
  const t = (
5002
5010
  // Step into the shadow DOM of the parent of a slotted node.
5003
5011
  c.assignedSlot || // DOM Element detected.
5004
5012
  c.parentNode || // ShadowRoot detected.
5005
- vt(c) && c.host || // Fallback.
5006
- N(c)
5013
+ _t(c) && c.host || // Fallback.
5014
+ F(c)
5007
5015
  );
5008
- return vt(t) ? t.host : t;
5016
+ return _t(t) ? t.host : t;
5009
5017
  }
5010
- function Ft(c) {
5011
- const t = V(c);
5012
- return U(t) ? c.ownerDocument ? c.ownerDocument.body : c.body : B(t) && tt(t) ? t : Ft(t);
5018
+ function Wt(c) {
5019
+ const t = P(c);
5020
+ return U(t) ? c.ownerDocument ? c.ownerDocument.body : c.body : N(t) && tt(t) ? t : Wt(t);
5013
5021
  }
5014
- function dt(c, t, e) {
5022
+ function Vt(c, t, e) {
5015
5023
  var i;
5016
- t === void 0 && (t = []), e === void 0 && (e = !0);
5017
- const s = Ft(c), o = s === ((i = c.ownerDocument) == null ? void 0 : i.body), r = A(s);
5018
- if (o) {
5019
- const l = ft(r);
5020
- return t.concat(r, r.visualViewport || [], tt(s) ? s : [], l && e ? dt(l) : []);
5021
- }
5022
- return t.concat(s, dt(s, [], e));
5024
+ t === void 0 && (t = []);
5025
+ const s = Wt(c), o = s === ((i = c.ownerDocument) == null ? void 0 : i.body), r = A(s);
5026
+ return o ? (dt(r), t.concat(r, r.visualViewport || [], tt(s) ? s : [], [])) : t.concat(s, Vt(s, []));
5023
5027
  }
5024
- function ft(c) {
5028
+ function dt(c) {
5025
5029
  return c.parent && Object.getPrototypeOf(c.parent) ? c.frameElement : null;
5026
5030
  }
5027
- function Wt(c) {
5028
- const t = D(c);
5031
+ function Pt(c) {
5032
+ const t = B(c);
5029
5033
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
5030
- const s = B(c), o = s ? c.offsetWidth : e, r = s ? c.offsetHeight : i, l = it(e) !== o || it(i) !== r;
5034
+ const s = N(c), o = s ? c.offsetWidth : e, r = s ? c.offsetHeight : i, l = it(e) !== o || it(i) !== r;
5031
5035
  return l && (e = o, i = r), {
5032
5036
  width: e,
5033
5037
  height: i,
5034
5038
  $: l
5035
5039
  };
5036
5040
  }
5037
- function Vt(c) {
5038
- return H(c) ? c : c.contextElement;
5041
+ function zt(c) {
5042
+ return X(c) ? c : c.contextElement;
5039
5043
  }
5040
- function $(c) {
5041
- const t = Vt(c);
5042
- if (!B(t))
5043
- return W(1);
5044
+ function G(c) {
5045
+ const t = zt(c);
5046
+ if (!N(t))
5047
+ return K(1);
5044
5048
  const e = t.getBoundingClientRect(), {
5045
5049
  width: i,
5046
5050
  height: s,
5047
5051
  $: o
5048
- } = Wt(t);
5052
+ } = Pt(t);
5049
5053
  let r = (o ? it(e.width) : e.width) / i, l = (o ? it(e.height) : e.height) / s;
5050
5054
  return (!r || !Number.isFinite(r)) && (r = 1), (!l || !Number.isFinite(l)) && (l = 1), {
5051
5055
  x: r,
5052
5056
  y: l
5053
5057
  };
5054
5058
  }
5055
- const Be = /* @__PURE__ */ W(0);
5056
- function Pt(c) {
5059
+ const qe = /* @__PURE__ */ K(0);
5060
+ function $t(c) {
5057
5061
  const t = A(c);
5058
- return !Et() || !t.visualViewport ? Be : {
5062
+ return !wt() || !t.visualViewport ? qe : {
5059
5063
  x: t.visualViewport.offsetLeft,
5060
5064
  y: t.visualViewport.offsetTop
5061
5065
  };
5062
5066
  }
5063
- function Ke(c, t, e) {
5067
+ function Je(c, t, e) {
5064
5068
  return t === void 0 && (t = !1), !e || t && e !== A(c) ? !1 : t;
5065
5069
  }
5066
5070
  function q(c, t, e, i) {
5067
5071
  t === void 0 && (t = !1), e === void 0 && (e = !1);
5068
- const s = c.getBoundingClientRect(), o = Vt(c);
5069
- let r = W(1);
5070
- t && (i ? H(i) && (r = $(i)) : r = $(c));
5071
- const l = Ke(o, e, i) ? Pt(o) : W(0);
5072
+ const s = c.getBoundingClientRect(), o = zt(c);
5073
+ let r = K(1);
5074
+ t && (i ? X(i) && (r = G(i)) : r = G(c));
5075
+ const l = Je(o, e, i) ? $t(o) : K(0);
5072
5076
  let a = (s.left + l.x) / r.x, h = (s.top + l.y) / r.y, d = s.width / r.x, f = s.height / r.y;
5073
5077
  if (o) {
5074
- const x = A(o), u = i && H(i) ? A(i) : i;
5075
- let p = x, g = ft(p);
5078
+ const x = A(o), u = i && X(i) ? A(i) : i;
5079
+ let p = x, g = dt(p);
5076
5080
  for (; g && i && u !== p; ) {
5077
- const w = $(g), E = g.getBoundingClientRect(), y = D(g), m = E.left + (g.clientLeft + parseFloat(y.paddingLeft)) * w.x, R = E.top + (g.clientTop + parseFloat(y.paddingTop)) * w.y;
5078
- a *= w.x, h *= w.y, d *= w.x, f *= w.y, a += m, h += R, p = A(g), g = ft(p);
5081
+ const w = G(g), E = g.getBoundingClientRect(), y = B(g), m = E.left + (g.clientLeft + parseFloat(y.paddingLeft)) * w.x, R = E.top + (g.clientTop + parseFloat(y.paddingTop)) * w.y;
5082
+ a *= w.x, h *= w.y, d *= w.x, f *= w.y, a += m, h += R, p = A(g), g = dt(p);
5079
5083
  }
5080
5084
  }
5081
5085
  return ot({
@@ -5085,56 +5089,68 @@ function q(c, t, e, i) {
5085
5089
  y: h
5086
5090
  });
5087
5091
  }
5088
- function Ne(c) {
5092
+ function pt(c, t) {
5093
+ const e = lt(c).scrollLeft;
5094
+ return t ? t.left + e : q(F(c)).left + e;
5095
+ }
5096
+ function Gt(c, t, e) {
5097
+ e === void 0 && (e = !1);
5098
+ const i = c.getBoundingClientRect(), s = i.left + t.scrollLeft - (e ? 0 : (
5099
+ // RTL <body> scrollbar.
5100
+ pt(c, i)
5101
+ )), o = i.top + t.scrollTop;
5102
+ return {
5103
+ x: s,
5104
+ y: o
5105
+ };
5106
+ }
5107
+ function Qe(c) {
5089
5108
  let {
5090
5109
  elements: t,
5091
5110
  rect: e,
5092
5111
  offsetParent: i,
5093
5112
  strategy: s
5094
5113
  } = c;
5095
- const o = s === "fixed", r = N(i), l = t ? nt(t.floating) : !1;
5114
+ const o = s === "fixed", r = F(i), l = t ? nt(t.floating) : !1;
5096
5115
  if (i === r || l && o)
5097
5116
  return e;
5098
5117
  let a = {
5099
5118
  scrollLeft: 0,
5100
5119
  scrollTop: 0
5101
- }, h = W(1);
5102
- const d = W(0), f = B(i);
5103
- if ((f || !f && !o) && ((j(i) !== "body" || tt(r)) && (a = lt(i)), B(i))) {
5104
- const x = q(i);
5105
- h = $(i), d.x = x.x + i.clientLeft, d.y = x.y + i.clientTop;
5120
+ }, h = K(1);
5121
+ const d = K(0), f = N(i);
5122
+ if ((f || !f && !o) && ((j(i) !== "body" || tt(r)) && (a = lt(i)), N(i))) {
5123
+ const u = q(i);
5124
+ h = G(i), d.x = u.x + i.clientLeft, d.y = u.y + i.clientTop;
5106
5125
  }
5126
+ const x = r && !f && !o ? Gt(r, a, !0) : K(0);
5107
5127
  return {
5108
5128
  width: e.width * h.x,
5109
5129
  height: e.height * h.y,
5110
- x: e.x * h.x - a.scrollLeft * h.x + d.x,
5111
- y: e.y * h.y - a.scrollTop * h.y + d.y
5130
+ x: e.x * h.x - a.scrollLeft * h.x + d.x + x.x,
5131
+ y: e.y * h.y - a.scrollTop * h.y + d.y + x.y
5112
5132
  };
5113
5133
  }
5114
- function Ye(c) {
5134
+ function ti(c) {
5115
5135
  return Array.from(c.getClientRects());
5116
5136
  }
5117
- function xt(c, t) {
5118
- const e = lt(c).scrollLeft;
5119
- return t ? t.left + e : q(N(c)).left + e;
5120
- }
5121
- function Fe(c) {
5122
- const t = N(c), e = lt(c), i = c.ownerDocument.body, s = z(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = z(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5123
- let r = -e.scrollLeft + xt(c);
5137
+ function ei(c) {
5138
+ const t = F(c), e = lt(c), i = c.ownerDocument.body, s = $(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = $(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
5139
+ let r = -e.scrollLeft + pt(c);
5124
5140
  const l = -e.scrollTop;
5125
- return D(i).direction === "rtl" && (r += z(t.clientWidth, i.clientWidth) - s), {
5141
+ return B(i).direction === "rtl" && (r += $(t.clientWidth, i.clientWidth) - s), {
5126
5142
  width: s,
5127
5143
  height: o,
5128
5144
  x: r,
5129
5145
  y: l
5130
5146
  };
5131
5147
  }
5132
- function We(c, t) {
5133
- const e = A(c), i = N(c), s = e.visualViewport;
5148
+ function ii(c, t) {
5149
+ const e = A(c), i = F(c), s = e.visualViewport;
5134
5150
  let o = i.clientWidth, r = i.clientHeight, l = 0, a = 0;
5135
5151
  if (s) {
5136
5152
  o = s.width, r = s.height;
5137
- const h = Et();
5153
+ const h = wt();
5138
5154
  (!h || h && t === "fixed") && (l = s.offsetLeft, a = s.offsetTop);
5139
5155
  }
5140
5156
  return {
@@ -5144,8 +5160,9 @@ function We(c, t) {
5144
5160
  y: a
5145
5161
  };
5146
5162
  }
5147
- function Ve(c, t) {
5148
- const e = q(c, !0, t === "fixed"), i = e.top + c.clientTop, s = e.left + c.clientLeft, o = B(c) ? $(c) : W(1), r = c.clientWidth * o.x, l = c.clientHeight * o.y, a = s * o.x, h = i * o.y;
5163
+ const si = /* @__PURE__ */ new Set(["absolute", "fixed"]);
5164
+ function oi(c, t) {
5165
+ const e = q(c, !0, t === "fixed"), i = e.top + c.clientTop, s = e.left + c.clientLeft, o = N(c) ? G(c) : K(1), r = c.clientWidth * o.x, l = c.clientHeight * o.y, a = s * o.x, h = i * o.y;
5149
5166
  return {
5150
5167
  width: r,
5151
5168
  height: l,
@@ -5153,52 +5170,53 @@ function Ve(c, t) {
5153
5170
  y: h
5154
5171
  };
5155
5172
  }
5156
- function _t(c, t, e) {
5173
+ function Ot(c, t, e) {
5157
5174
  let i;
5158
5175
  if (t === "viewport")
5159
- i = We(c, e);
5176
+ i = ii(c, e);
5160
5177
  else if (t === "document")
5161
- i = Fe(N(c));
5162
- else if (H(t))
5163
- i = Ve(t, e);
5178
+ i = ei(F(c));
5179
+ else if (X(t))
5180
+ i = oi(t, e);
5164
5181
  else {
5165
- const s = Pt(c);
5182
+ const s = $t(c);
5166
5183
  i = {
5167
- ...t,
5168
5184
  x: t.x - s.x,
5169
- y: t.y - s.y
5185
+ y: t.y - s.y,
5186
+ width: t.width,
5187
+ height: t.height
5170
5188
  };
5171
5189
  }
5172
5190
  return ot(i);
5173
5191
  }
5174
- function zt(c, t) {
5175
- const e = V(c);
5176
- return e === t || !H(e) || U(e) ? !1 : D(e).position === "fixed" || zt(e, t);
5192
+ function Ut(c, t) {
5193
+ const e = P(c);
5194
+ return e === t || !X(e) || U(e) ? !1 : B(e).position === "fixed" || Ut(e, t);
5177
5195
  }
5178
- function Pe(c, t) {
5196
+ function ri(c, t) {
5179
5197
  const e = t.get(c);
5180
5198
  if (e)
5181
5199
  return e;
5182
- let i = dt(c, [], !1).filter((l) => H(l) && j(l) !== "body"), s = null;
5183
- const o = D(c).position === "fixed";
5184
- let r = o ? V(c) : c;
5185
- for (; H(r) && !U(r); ) {
5186
- const l = D(r), a = pt(r);
5187
- !a && l.position === "fixed" && (s = null), (o ? !a && !s : !a && l.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || tt(r) && !a && zt(c, r)) ? i = i.filter((d) => d !== r) : s = l, r = V(r);
5200
+ let i = Vt(c, []).filter((l) => X(l) && j(l) !== "body"), s = null;
5201
+ const o = B(c).position === "fixed";
5202
+ let r = o ? P(c) : c;
5203
+ for (; X(r) && !U(r); ) {
5204
+ const l = B(r), a = gt(r);
5205
+ !a && l.position === "fixed" && (s = null), (o ? !a && !s : !a && l.position === "static" && !!s && si.has(s.position) || tt(r) && !a && Ut(c, r)) ? i = i.filter((d) => d !== r) : s = l, r = P(r);
5188
5206
  }
5189
5207
  return t.set(c, i), i;
5190
5208
  }
5191
- function ze(c) {
5209
+ function ni(c) {
5192
5210
  let {
5193
5211
  element: t,
5194
5212
  boundary: e,
5195
5213
  rootBoundary: i,
5196
5214
  strategy: s
5197
5215
  } = c;
5198
- const r = [...e === "clippingAncestors" ? nt(t) ? [] : Pe(t, this._c) : [].concat(e), i], l = r[0], a = r.reduce((h, d) => {
5199
- const f = _t(t, d, s);
5200
- return h.top = z(f.top, h.top), h.right = Z(f.right, h.right), h.bottom = Z(f.bottom, h.bottom), h.left = z(f.left, h.left), h;
5201
- }, _t(t, l, s));
5216
+ const r = [...e === "clippingAncestors" ? nt(t) ? [] : ri(t, this._c) : [].concat(e), i], l = r[0], a = r.reduce((h, d) => {
5217
+ const f = Ot(t, d, s);
5218
+ return h.top = $(f.top, h.top), h.right = Z(f.right, h.right), h.bottom = Z(f.bottom, h.bottom), h.left = $(f.left, h.left), h;
5219
+ }, Ot(t, l, s));
5202
5220
  return {
5203
5221
  width: a.right - a.left,
5204
5222
  height: a.bottom - a.top,
@@ -5206,35 +5224,33 @@ function ze(c) {
5206
5224
  y: a.top
5207
5225
  };
5208
5226
  }
5209
- function $e(c) {
5227
+ function li(c) {
5210
5228
  const {
5211
5229
  width: t,
5212
5230
  height: e
5213
- } = Wt(c);
5231
+ } = Pt(c);
5214
5232
  return {
5215
5233
  width: t,
5216
5234
  height: e
5217
5235
  };
5218
5236
  }
5219
- function Ge(c, t, e) {
5220
- const i = B(t), s = N(t), o = e === "fixed", r = q(c, !0, o, t);
5237
+ function ai(c, t, e) {
5238
+ const i = N(t), s = F(t), o = e === "fixed", r = q(c, !0, o, t);
5221
5239
  let l = {
5222
5240
  scrollLeft: 0,
5223
5241
  scrollTop: 0
5224
5242
  };
5225
- const a = W(0);
5243
+ const a = K(0);
5244
+ function h() {
5245
+ a.x = pt(s);
5246
+ }
5226
5247
  if (i || !i && !o)
5227
5248
  if ((j(t) !== "body" || tt(s)) && (l = lt(t)), i) {
5228
5249
  const u = q(t, !0, o, t);
5229
5250
  a.x = u.x + t.clientLeft, a.y = u.y + t.clientTop;
5230
- } else s && (a.x = xt(s));
5231
- let h = 0, d = 0;
5232
- if (s && !i && !o) {
5233
- const u = s.getBoundingClientRect();
5234
- d = u.top + l.scrollTop, h = u.left + l.scrollLeft - // RTL <body> scrollbar.
5235
- xt(s, u);
5236
- }
5237
- const f = r.left + l.scrollLeft - a.x - h, x = r.top + l.scrollTop - a.y - d;
5251
+ } else s && h();
5252
+ o && !i && s && h();
5253
+ const d = s && !i && !o ? Gt(s, l) : K(0), f = r.left + l.scrollLeft - a.x - d.x, x = r.top + l.scrollTop - a.y - d.y;
5238
5254
  return {
5239
5255
  x: f,
5240
5256
  y: x,
@@ -5243,38 +5259,38 @@ function Ge(c, t, e) {
5243
5259
  };
5244
5260
  }
5245
5261
  function at(c) {
5246
- return D(c).position === "static";
5262
+ return B(c).position === "static";
5247
5263
  }
5248
- function Ot(c, t) {
5249
- if (!B(c) || D(c).position === "fixed")
5264
+ function St(c, t) {
5265
+ if (!N(c) || B(c).position === "fixed")
5250
5266
  return null;
5251
5267
  if (t)
5252
5268
  return t(c);
5253
5269
  let e = c.offsetParent;
5254
- return N(c) === e && (e = e.ownerDocument.body), e;
5270
+ return F(c) === e && (e = e.ownerDocument.body), e;
5255
5271
  }
5256
- function $t(c, t) {
5272
+ function jt(c, t) {
5257
5273
  const e = A(c);
5258
5274
  if (nt(c))
5259
5275
  return e;
5260
- if (!B(c)) {
5261
- let s = V(c);
5276
+ if (!N(c)) {
5277
+ let s = P(c);
5262
5278
  for (; s && !U(s); ) {
5263
- if (H(s) && !at(s))
5279
+ if (X(s) && !at(s))
5264
5280
  return s;
5265
- s = V(s);
5281
+ s = P(s);
5266
5282
  }
5267
5283
  return e;
5268
5284
  }
5269
- let i = Ot(c, t);
5270
- for (; i && ke(i) && at(i); )
5271
- i = Ot(i, t);
5272
- return i && U(i) && at(i) && !pt(i) ? e : i || Xe(c) || e;
5285
+ let i = St(c, t);
5286
+ for (; i && Pe(i) && at(i); )
5287
+ i = St(i, t);
5288
+ return i && U(i) && at(i) && !gt(i) ? e : i || je(c) || e;
5273
5289
  }
5274
- const Ue = async function(c) {
5275
- const t = this.getOffsetParent || $t, e = this.getDimensions, i = await e(c.floating);
5290
+ const hi = async function(c) {
5291
+ const t = this.getOffsetParent || jt, e = this.getDimensions, i = await e(c.floating);
5276
5292
  return {
5277
- reference: Ge(c.reference, await t(c.floating), c.strategy),
5293
+ reference: ai(c.reference, await t(c.floating), c.strategy),
5278
5294
  floating: {
5279
5295
  x: 0,
5280
5296
  y: 0,
@@ -5283,34 +5299,34 @@ const Ue = async function(c) {
5283
5299
  }
5284
5300
  };
5285
5301
  };
5286
- function je(c) {
5287
- return D(c).direction === "rtl";
5302
+ function ci(c) {
5303
+ return B(c).direction === "rtl";
5288
5304
  }
5289
- const Ze = {
5290
- convertOffsetParentRelativeRectToViewportRelativeRect: Ne,
5291
- getDocumentElement: N,
5292
- getClippingRect: ze,
5293
- getOffsetParent: $t,
5294
- getElementRects: Ue,
5295
- getClientRects: Ye,
5296
- getDimensions: $e,
5297
- getScale: $,
5298
- isElement: H,
5299
- isRTL: je
5300
- }, Gt = He, Ut = De, jt = Ae, qe = Te, Zt = (c, t, e) => {
5305
+ const di = {
5306
+ convertOffsetParentRelativeRectToViewportRelativeRect: Qe,
5307
+ getDocumentElement: F,
5308
+ getClippingRect: ni,
5309
+ getOffsetParent: jt,
5310
+ getElementRects: hi,
5311
+ getClientRects: ti,
5312
+ getDimensions: li,
5313
+ getScale: G,
5314
+ isElement: X,
5315
+ isRTL: ci
5316
+ }, Zt = Ye, qt = Fe, Jt = Be, fi = Xe, Qt = (c, t, e) => {
5301
5317
  const i = /* @__PURE__ */ new Map(), s = {
5302
- platform: Ze,
5318
+ platform: di,
5303
5319
  ...e
5304
5320
  }, o = {
5305
5321
  ...s.platform,
5306
5322
  _c: i
5307
5323
  };
5308
- return Le(c, t, {
5324
+ return ke(c, t, {
5309
5325
  ...s,
5310
5326
  platform: o
5311
5327
  });
5312
5328
  };
5313
- let Je = class {
5329
+ let xi = class {
5314
5330
  constructor(t) {
5315
5331
  n(this, "ctx");
5316
5332
  n(this, "enable", !1);
@@ -5372,7 +5388,7 @@ let Je = class {
5372
5388
  return;
5373
5389
  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;
5374
5390
  const s = t.drawX + i.x, o = t.drawY + i.y;
5375
- Zt({
5391
+ Qt({
5376
5392
  getBoundingClientRect() {
5377
5393
  return {
5378
5394
  width: t.visibleWidth,
@@ -5387,7 +5403,7 @@ let Je = class {
5387
5403
  }
5388
5404
  }, this.floatingEl, {
5389
5405
  placement: t.overflowTooltipPlacement,
5390
- middleware: [Ut(), jt(), Gt(6), qe({ element: this.arrowEl })]
5406
+ middleware: [qt(), Jt(), Zt(6), fi({ element: this.arrowEl })]
5391
5407
  }).then((l) => {
5392
5408
  const { x: a, y: h, placement: d, middlewareData: f } = l;
5393
5409
  if (Object.assign(this.floatingEl.style, {
@@ -5426,7 +5442,7 @@ let Je = class {
5426
5442
  this.contentEl.remove(), this.arrowEl.remove(), this.floatingEl.remove();
5427
5443
  }
5428
5444
  };
5429
- class Qe {
5445
+ class ui {
5430
5446
  constructor(t) {
5431
5447
  n(this, "editorEl");
5432
5448
  n(this, "inputEl");
@@ -5628,7 +5644,7 @@ class Qe {
5628
5644
  (t = this.editorEl) == null || t.remove();
5629
5645
  }
5630
5646
  }
5631
- class ti {
5647
+ class gi {
5632
5648
  constructor(t) {
5633
5649
  n(this, "ctx");
5634
5650
  n(this, "emptyEl");
@@ -5652,7 +5668,7 @@ class ti {
5652
5668
  this.emptyEl.remove();
5653
5669
  }
5654
5670
  }
5655
- class ei {
5671
+ class wi {
5656
5672
  constructor(t) {
5657
5673
  n(this, "ctx");
5658
5674
  this.ctx = t;
@@ -5847,7 +5863,7 @@ class ei {
5847
5863
  };
5848
5864
  }
5849
5865
  }
5850
- class ii {
5866
+ class pi {
5851
5867
  constructor(t) {
5852
5868
  n(this, "ctx");
5853
5869
  n(this, "contextMenuEl");
@@ -5873,9 +5889,9 @@ class ii {
5873
5889
  }),
5874
5890
  contextElement: document.body
5875
5891
  };
5876
- Zt(x, this.contextMenuEl, {
5892
+ Qt(x, this.contextMenuEl, {
5877
5893
  placement: "right-start",
5878
- middleware: [Gt(), Ut(), jt()]
5894
+ middleware: [Zt(), qt(), Jt()]
5879
5895
  }).then(({ x: u, y: p }) => {
5880
5896
  this.show(u, p);
5881
5897
  });
@@ -5933,7 +5949,7 @@ class ii {
5933
5949
  this.contextMenuEl.remove();
5934
5950
  }
5935
5951
  }
5936
- class ri {
5952
+ class yi {
5937
5953
  constructor(t, e) {
5938
5954
  n(this, "options");
5939
5955
  n(this, "scroller");
@@ -5956,7 +5972,7 @@ class ri {
5956
5972
  o,
5957
5973
  r
5958
5974
  );
5959
- this.ctx = new ge(l, this.options), this.header = new pe(this.ctx), this.footer = new me(this.ctx), this.body = new Ee(this.ctx), this.scroller = new we(this.ctx), this.selector = new ye(this.ctx), this.autofill = new Ce(this.ctx), this.tooltip = new Je(this.ctx), this.empty = new ti(this.ctx), this.editor = new Qe(this.ctx), this.overlayer = new ei(this.ctx), this.contextMenu = new ii(this.ctx), this.ctx.on("draw", () => {
5975
+ this.ctx = new Ee(l, this.options), this.header = new ye(this.ctx), this.footer = new be(this.ctx), this.body = new Ce(this.ctx), this.scroller = new me(this.ctx), this.selector = new Re(this.ctx), this.autofill = new ve(this.ctx), this.tooltip = new xi(this.ctx), this.empty = new gi(this.ctx), this.editor = new ui(this.ctx), this.overlayer = new wi(this.ctx), this.contextMenu = new pi(this.ctx), this.ctx.on("draw", () => {
5960
5976
  this.draw();
5961
5977
  }), this.ctx.on("drawView", () => {
5962
5978
  this.draw(!0);
@@ -6196,10 +6212,10 @@ class ri {
6196
6212
  }
6197
6213
  getUtils() {
6198
6214
  return {
6199
- mergeColCell: ne,
6200
- mergeRowCell: re,
6201
- getSpanArrByRow: Mt,
6202
- getSpanObjByColumn: Ht
6215
+ mergeColCell: he,
6216
+ mergeRowCell: ae,
6217
+ getSpanArrByRow: Ht,
6218
+ getSpanObjByColumn: Dt
6203
6219
  };
6204
6220
  }
6205
6221
  getColumnByKey(t) {
@@ -6214,6 +6230,6 @@ class ri {
6214
6230
  }
6215
6231
  }
6216
6232
  export {
6217
- ri as default
6233
+ yi as default
6218
6234
  };
6219
6235
  //# sourceMappingURL=index.es.js.map