e-virt-table 1.3.13 → 1.3.15

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,21 +1,21 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.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-required-color: #f56c6c;--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: rgba(82, 146, 247, .1);--evt-autofill-point-border-color: #fff;--evt-edit-bg-color: #fcf6ed;--evt-checkbox-color: var(--evt-color-primary);--evt-checkbox-uncheck-color: #dde0ea;--evt-checkbox-disabled-color: #f1f2f4;--evt-checkbox-check-disabled-color: #dde0ea;--evt-icon-edit-color: #4e5969;--evt-icon-select-color: #4e5969;--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-text-color: #fff;--evt-resize-column-text-bg-color: var(--evt-color-primary);--evt-resize-column-line-color: #e1e6eb;--evt-tree-line-color: #e1e6eb;--evt-sort-icon-color: var(--evt-color-primary);--evt-drag-tip-bg-color: rgba(82, 146, 247, .1);--evt-drag-tip-line-color: var(--evt-color-primary);--evt-context-menu-min-width: 150px;--evt-context-menu-max-width: 220px;--evt-context-menu-item-padding: 8px 12px;--evt-context-menu-bg-color: #fff;--evt-context-menu-text-color: #333;--evt-context-menu-item-hover-text-color: var(--evt-color-primary);--evt-context-menu-item-hover-bg-color: #f5f5f5;--evt-context-menu-text-size: 13px}.dark{--evt-border-color: #363637;--evt-header-bg-color: #141414;--evt-body-bg-color: #141414;--evt-header-text-color: #a3a6ad;--evt-body-text-color: #cfd3dc;--evt-readonly-text-color: #cfd3dc;--evt-footer-text-color: #cfd3dc;--evt-scroller-color: #414243;--evt-scroller-track-color: #141414;--evt-scroller-focus-color: #a3a6ad;--evt-edit-bg-color: #141414;--evt-footer-bg-color: #262727;--evt-autofill-point-border-color: #fff;--evt-editor-bg-color: #434343;--evt-editor-text-color: #cfd3dc;--evt-context-menu-bg-color: #141414;--evt-context-menu-text-color: #cfd3dc;--evt-context-menu-item-hover-text-color: var(--evt-color-primary);--evt-context-menu-item-hover-bg-color: #414243}.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:6px 24px;color:var(--evt-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--evt-color-primary);background-color:#f5f7fa}.e-virt-table-loading{display:none;position:absolute;left:0;top:0;right:0;bottom:0;width:100%;height:100%;z-index:2000;background-color:#fff6;display:flex;align-items:center;justify-content:center}.e-virt-table-loading-spinner{opacity:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.e-virt-table-loading-spinner svg{color:var(--evt-text-color-regular);animation:rotate 1s linear infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.e-virt-table-loading-text{margin:0;font-size:12px;color:var(--evt-text-color-regular)}.e-virt-table-main-menu,.e-virt-table-submenu{position:absolute;background:var(--evt-context-menu-bg-color);border-radius:4px;box-shadow:0 2px 8px #0000001a;min-width:var(--evt-context-menu-min-width);max-width:var(--evt-context-menu-max-width);color:var(--evt-text-color-primary)}.e-virt-table-main-menu{border:1px solid var(--evt-border-color);z-index:3000;left:-99999px;top:-99999px;display:none;position:fixed;background-color:var(--evt-body-bg-color)}.e-virt-table-submenu{border:1px solid var(--evt-border-color);z-index:1000;max-height:350px;overflow-y:auto;opacity:0;visibility:hidden;transform:translate(-10px);transition:opacity .2s,visibility .2s,transform .2s;-ms-overflow-style:none;scrollbar-width:none}.e-virt-table-submenu::-webkit-scrollbar{display:none}.e-virt-table-submenu.show{opacity:1;visibility:visible;transform:translate(0)}.e-virt-table-submenu:not(.show){transition:none}.e-virt-table-menu-item,.e-virt-table-submenu-item{position:relative;-webkit-user-select:none;user-select:none;padding:var(--evt-context-menu-item-padding);cursor:pointer;display:flex;justify-content:space-between;align-items:center;transition:background .2s,color .2s;color:var(--evt-context-menu-text-color);font-size:var(--evt-context-menu-text-size)}.e-virt-table-menu-item:last-child,.e-virt-table-submenu-item:last-child{border-bottom:none}.e-virt-table-menu-item:has(.e-virt-table-menu-item-icon){padding-left:8px}.e-virt-table-menu-item-content{display:flex;align-items:center;flex:1;min-width:0}.e-virt-table-menu-item-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-right:8px;flex-shrink:0}.e-virt-table-menu-item-icon svg{width:100%;height:100%;fill:currentColor}.e-virt-table-menu-item-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.e-virt-table-menu-arrow{display:inline-flex;align-items:center;justify-content:center;color:var(--evt-text-color-regular);transition:color .2s}.e-virt-table-menu-arrow svg{width:20px;height:20px;fill:currentColor}.e-virt-table-submenu-item:hover,.e-virt-table-menu-item:hover,.e-virt-table-menu-item.active{background:var(--evt-context-menu-item-hover-bg-color);color:var(--evt-context-menu-item-hover-text-color)}.e-virt-table-menu-item.disabled,.e-virt-table-submenu-item.disabled{cursor:not-allowed}.e-virt-table-finder-bar{position:absolute;top:8px;right:16px;display:none;z-index:10000;background:#fff;border:1px solid #dadce0;border-radius:12px;box-shadow:0 2px 6px #0003;padding:0 8px;height:48px;min-width:250px;align-items:center;font-size:12px}.e-virt-table-finder-bar.show{display:flex}.e-virt-table-finder-bar-input-wrapper{display:flex;align-items:center;flex:1;padding:0 8px;position:relative}.e-virt-table-finder-bar-input{border:none;outline:none;flex:1;font-size:12px;background:transparent;color:#333;min-width:150px;padding-left:0;position:relative}.e-virt-table-finder-bar-nav{display:flex;flex-direction:row;gap:8px;margin:0 8px;align-items:center}.e-virt-table-finder-bar-nav-btn{border:none;background:transparent;cursor:pointer;padding:0;color:#666;border-radius:50%;display:flex;align-items:center;justify-content:center}.e-virt-table-finder-bar-nav-btn svg{width:24px;height:24px}.e-virt-table-finder-bar-nav-btn.prev-btn{transform:rotate(-90deg)}.e-virt-table-finder-bar-nav-btn.next-btn{transform:rotate(90deg)}.e-virt-table-finder-bar-nav-btn.close-btn{font-size:24px;color:#666;line-height:1;width:24px;height:24px}.e-virt-table-finder-bar-nav-btn:hover{color:#666;background-color:#f0f0f0}.e-virt-table-finder-bar-count{color:#666;font-size:12px;margin:0 8px;white-space:nowrap;flex-shrink:0}.e-virt-table-finder-bar-count.no-results{color:#999}.e-virt-table-finder-bar-loading{display:none;position:absolute;left:8px;top:0;width:16px;height:16px;flex-shrink:0;pointer-events:none;z-index:0}.e-virt-table-finder-bar-loading.show{display:block}.e-virt-table-finder-bar-loading svg{width:100%;height:100%;color:#666;animation:rotate 1s linear infinite}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.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-body-bg-color: #fff;--evt-stripe-color: #fafafa;--evt-placeholder-color: #cdd0dc;--evt-header-bg-color: #f8faff;--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-required-color: #f56c6c;--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: rgba(82, 146, 247, .1);--evt-autofill-point-border-color: #fff;--evt-edit-bg-color: #fcf6ed;--evt-checkbox-color: var(--evt-color-primary);--evt-checkbox-uncheck-color: #dde0ea;--evt-checkbox-disabled-color: #f1f2f4;--evt-checkbox-check-disabled-color: #dde0ea;--evt-icon-edit-color: #4e5969;--evt-icon-select-color: #4e5969;--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-text-color: #fff;--evt-resize-column-text-bg-color: var(--evt-color-primary);--evt-resize-column-line-color: #e1e6eb;--evt-tree-line-color: #e1e6eb;--evt-sort-icon-color: var(--evt-color-primary);--evt-drag-tip-bg-color: rgba(82, 146, 247, .1);--evt-drag-tip-line-color: var(--evt-color-primary);--evt-context-menu-min-width: 150px;--evt-context-menu-max-width: 220px;--evt-context-menu-item-padding: 8px 12px;--evt-context-menu-bg-color: #fff;--evt-context-menu-text-color: #333;--evt-context-menu-item-hover-text-color: var(--evt-color-primary);--evt-context-menu-item-hover-bg-color: #f5f5f5;--evt-context-menu-text-size: 13px}.dark{--evt-border-color: #363637;--evt-header-bg-color: #141414;--evt-body-bg-color: #141414;--evt-header-text-color: #a3a6ad;--evt-body-text-color: #cfd3dc;--evt-readonly-text-color: #cfd3dc;--evt-footer-text-color: #cfd3dc;--evt-scroller-color: #414243;--evt-scroller-track-color: #141414;--evt-scroller-focus-color: #a3a6ad;--evt-edit-bg-color: #141414;--evt-footer-bg-color: #262727;--evt-autofill-point-border-color: #fff;--evt-editor-bg-color: #434343;--evt-editor-text-color: #cfd3dc;--evt-context-menu-bg-color: #141414;--evt-context-menu-text-color: #cfd3dc;--evt-context-menu-item-hover-text-color: var(--evt-color-primary);--evt-context-menu-item-hover-bg-color: #414243}.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;background-color:var(--evt-body-bg-color);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:6px 24px;color:var(--evt-text-color-regular)}.e-virt-table-context-menu-item:hover{color:var(--evt-color-primary);background-color:#f5f7fa}.e-virt-table-loading{display:none;position:absolute;left:0;top:0;right:0;bottom:0;width:100%;height:100%;z-index:2000;background-color:#fff6;display:flex;align-items:center;justify-content:center}.e-virt-table-loading-spinner{opacity:1;display:flex;flex-direction:column;align-items:center;justify-content:center}.e-virt-table-loading-spinner svg{color:var(--evt-text-color-regular);animation:rotate 1s linear infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.e-virt-table-loading-text{margin:0;font-size:12px;color:var(--evt-text-color-regular)}.e-virt-table-main-menu,.e-virt-table-submenu{position:absolute;background:var(--evt-context-menu-bg-color);border-radius:4px;box-shadow:0 2px 8px #0000001a;min-width:var(--evt-context-menu-min-width);max-width:var(--evt-context-menu-max-width);color:var(--evt-text-color-primary)}.e-virt-table-main-menu{border:1px solid var(--evt-border-color);z-index:3000;left:-99999px;top:-99999px;display:none;position:fixed;background-color:var(--evt-body-bg-color)}.e-virt-table-submenu{border:1px solid var(--evt-border-color);z-index:1000;max-height:350px;overflow-y:auto;opacity:0;visibility:hidden;transform:translate(-10px);transition:opacity .2s,visibility .2s,transform .2s;-ms-overflow-style:none;scrollbar-width:none}.e-virt-table-submenu::-webkit-scrollbar{display:none}.e-virt-table-submenu.show{opacity:1;visibility:visible;transform:translate(0)}.e-virt-table-submenu:not(.show){transition:none}.e-virt-table-menu-item,.e-virt-table-submenu-item{position:relative;-webkit-user-select:none;user-select:none;padding:var(--evt-context-menu-item-padding);cursor:pointer;display:flex;justify-content:space-between;align-items:center;transition:background .2s,color .2s;color:var(--evt-context-menu-text-color);font-size:var(--evt-context-menu-text-size)}.e-virt-table-menu-item:last-child,.e-virt-table-submenu-item:last-child{border-bottom:none}.e-virt-table-menu-item:has(.e-virt-table-menu-item-icon){padding-left:8px}.e-virt-table-menu-item-content{display:flex;align-items:center;flex:1;min-width:0}.e-virt-table-menu-item-icon{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-right:8px;flex-shrink:0}.e-virt-table-menu-item-icon svg{width:100%;height:100%;fill:currentColor}.e-virt-table-menu-item-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.e-virt-table-menu-arrow{display:inline-flex;align-items:center;justify-content:center;color:var(--evt-text-color-regular);transition:color .2s}.e-virt-table-menu-arrow svg{width:20px;height:20px;fill:currentColor}.e-virt-table-submenu-item:hover,.e-virt-table-menu-item:hover,.e-virt-table-menu-item.active{background:var(--evt-context-menu-item-hover-bg-color);color:var(--evt-context-menu-item-hover-text-color)}.e-virt-table-menu-item.disabled,.e-virt-table-submenu-item.disabled{cursor:not-allowed}.e-virt-table-finder-bar{position:absolute;top:8px;right:16px;display:none;z-index:10000;background:#fff;border:1px solid #dadce0;border-radius:12px;box-shadow:0 2px 6px #0003;padding:0 8px;height:48px;min-width:250px;align-items:center;font-size:12px}.e-virt-table-finder-bar.show{display:flex}.e-virt-table-finder-bar-input-wrapper{display:flex;align-items:center;flex:1;padding:0 8px;position:relative}.e-virt-table-finder-bar-input{border:none;outline:none;flex:1;font-size:12px;background:transparent;color:#333;min-width:150px;padding-left:0;position:relative}.e-virt-table-finder-bar-nav{display:flex;flex-direction:row;gap:8px;margin:0 8px;align-items:center}.e-virt-table-finder-bar-nav-btn{border:none;background:transparent;cursor:pointer;padding:0;color:#666;border-radius:50%;display:flex;align-items:center;justify-content:center}.e-virt-table-finder-bar-nav-btn svg{width:24px;height:24px}.e-virt-table-finder-bar-nav-btn.prev-btn{transform:rotate(-90deg)}.e-virt-table-finder-bar-nav-btn.next-btn{transform:rotate(90deg)}.e-virt-table-finder-bar-nav-btn.close-btn{font-size:24px;color:#666;line-height:1;width:24px;height:24px}.e-virt-table-finder-bar-nav-btn:hover{color:#666;background-color:#f0f0f0}.e-virt-table-finder-bar-count{color:#666;font-size:12px;margin:0 8px;white-space:nowrap;flex-shrink:0}.e-virt-table-finder-bar-count.no-results{color:#999}.e-virt-table-finder-bar-loading{display:none;position:absolute;left:8px;top:0;width:16px;height:16px;flex-shrink:0;pointer-events:none;z-index:0}.e-virt-table-finder-bar-loading.show{display:block}.e-virt-table-finder-bar-loading svg{width:100%;height:100%;color:#666;animation:rotate 1s linear infinite}.e-virt-table-empty{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:14px;color:#666;z-index:15}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  var de = Object.defineProperty;
3
- var fe = (h, t, e) => t in h ? de(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
4
- var n = (h, t, e) => fe(h, typeof t != "symbol" ? t + "" : t, e);
3
+ var fe = (c, t, e) => t in c ? de(c, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[t] = e;
4
+ var n = (c, t, e) => fe(c, typeof t != "symbol" ? t + "" : t, e);
5
5
  class ue {
6
6
  constructor(t) {
7
7
  n(this, "rules");
8
8
  this.rules = t;
9
9
  }
10
10
  validate(t) {
11
- const e = [], { column: i, row: s, key: o, rowKey: r, colIndex: a, rowIndex: l, value: c, field: d, fieldValue: f } = t;
11
+ const e = [], { column: i, row: s, key: o, rowKey: r, colIndex: a, rowIndex: l, 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
14
  if (x.validator) {
15
15
  const u = {
16
16
  field: d,
17
17
  fieldValue: f,
18
- value: c,
18
+ value: h,
19
19
  column: i,
20
20
  colIndex: a,
21
21
  rowIndex: l,
@@ -24,17 +24,17 @@ class ue {
24
24
  rowKey: r,
25
25
  ...x
26
26
  };
27
- x.validator(u, c, (g) => {
27
+ x.validator(u, h, (g) => {
28
28
  g && e.push({
29
29
  ...u,
30
30
  message: g
31
31
  });
32
32
  });
33
33
  }
34
- if (!x.required && (c == null || c === ""))
34
+ if (!x.required && (h == null || h === ""))
35
35
  return e;
36
- x.pattern && !x.pattern.test(c) && e.push({
37
- value: c,
36
+ x.pattern && !x.pattern.test(h) && e.push({
37
+ value: h,
38
38
  column: i,
39
39
  row: s,
40
40
  key: o,
@@ -44,8 +44,8 @@ class ue {
44
44
  field: d,
45
45
  fieldValue: f,
46
46
  message: x.message || `${o} is pattern validation error`
47
- }), x.required && (c == null || c === "") && e.push({
48
- value: c,
47
+ }), x.required && (h == null || h === "") && e.push({
48
+ value: h,
49
49
  column: i,
50
50
  row: s,
51
51
  key: o,
@@ -61,26 +61,26 @@ class ue {
61
61
  }
62
62
  }
63
63
  function $t() {
64
- return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(h) {
64
+ return "xxxxxxxxxxxxxxxxxx".replace(/[x]/g, function(c) {
65
65
  const t = Math.random() * 16 | 0;
66
- return (h === "x" ? t : t & 3 | 8).toString(16);
66
+ return (c === "x" ? t : t & 3 | 8).toString(16);
67
67
  });
68
68
  }
69
- function bt(h, t) {
69
+ function bt(c, t) {
70
70
  let e = 0, i;
71
71
  return function(...s) {
72
72
  const o = (/* @__PURE__ */ new Date()).getTime(), r = o - e, a = typeof t == "function" ? t() : t;
73
- !e || r >= a ? (h.apply(this, s), e = o) : i || (i = setTimeout(() => {
74
- h.apply(this, s), e = (/* @__PURE__ */ new Date()).getTime(), i = void 0;
73
+ !e || r >= a ? (c.apply(this, s), e = o) : i || (i = setTimeout(() => {
74
+ c.apply(this, s), e = (/* @__PURE__ */ new Date()).getTime(), i = void 0;
75
75
  }, a - r));
76
76
  };
77
77
  }
78
- function ot(h = []) {
79
- return h.length ? h.map((t) => ot(t.children) + 1).sort((t, e) => e - t)[0] : 0;
78
+ function ot(c = []) {
79
+ return c.length ? c.map((t) => ot(t.children) + 1).sort((t, e) => e - t)[0] : 0;
80
80
  }
81
- function xe(h = []) {
81
+ function xe(c = []) {
82
82
  let t = [], e = [], i = [];
83
- return h.forEach((s) => {
83
+ return c.forEach((s) => {
84
84
  s.fixed === "left" ? t.push(s) : s.fixed === "right" ? i.push(s) : e.push(s);
85
85
  }), [
86
86
  ...t.sort((s, o) => (s.sort ?? 0) - (o.sort ?? 0)),
@@ -88,8 +88,8 @@ function xe(h = []) {
88
88
  ...i.sort((s, o) => (s.sort ?? 0) - (o.sort ?? 0))
89
89
  ];
90
90
  }
91
- function rt(h = [], t = 1, e = 0, i = "") {
92
- return h.sort((s, o) => (s.sort ?? 0) - (o.sort ?? 0)).map((s) => {
91
+ function rt(c = [], t = 1, e = 0, i = "") {
92
+ return c.sort((s, o) => (s.sort ?? 0) - (o.sort ?? 0)).map((s) => {
93
93
  if (s.children) {
94
94
  let o = 0, r = s.fixed;
95
95
  s.children.forEach((l) => {
@@ -105,7 +105,7 @@ function rt(h = [], t = 1, e = 0, i = "") {
105
105
  rowspan: 1,
106
106
  colspan: o,
107
107
  parentKey: i,
108
- children: a.sort((l, c) => (l.sort ?? 0) - (c.sort ?? 0))
108
+ children: a.sort((l, h) => (l.sort ?? 0) - (h.sort ?? 0))
109
109
  };
110
110
  }
111
111
  return {
@@ -117,79 +117,79 @@ function rt(h = [], t = 1, e = 0, i = "") {
117
117
  };
118
118
  });
119
119
  }
120
- function J(h = []) {
120
+ function J(c = []) {
121
121
  let t = [];
122
- return h.forEach((e) => {
122
+ return c.forEach((e) => {
123
123
  e.children ? t = t.concat(J(e.children)) : t.push(e);
124
124
  }), t;
125
125
  }
126
- function Gt(h) {
127
- return h.filter((t) => !t.hide).map((t) => Array.isArray(t.children) && t.children.length > 0 ? {
126
+ function Gt(c) {
127
+ return c.filter((t) => !t.hide).map((t) => Array.isArray(t.children) && t.children.length > 0 ? {
128
128
  ...t,
129
129
  children: Gt(t.children)
130
130
  // 递归处理
131
131
  } : { ...t });
132
132
  }
133
133
  const At = /^(\r\n|\n\r|\r|\n)/, ge = /^[^\t\r\n]+/, Ht = /^\t/;
134
- function we(h) {
134
+ function we(c) {
135
135
  let t = [[""]];
136
- if (h.length === 0)
136
+ if (c.length === 0)
137
137
  return t;
138
138
  let e = 0, i = 0, s;
139
- for (; h.length > 0 && s !== h.length; )
140
- if (s = h.length, h.match(Ht))
141
- h = h.replace(Ht, ""), e += 1, t[i][e] = "";
142
- else if (h.match(At))
143
- h = h.replace(At, ""), e = 0, i += 1, t[i] = [""];
139
+ for (; c.length > 0 && s !== c.length; )
140
+ if (s = c.length, c.match(Ht))
141
+ c = c.replace(Ht, ""), e += 1, t[i][e] = "";
142
+ else if (c.match(At))
143
+ c = c.replace(At, ""), e = 0, i += 1, t[i] = [""];
144
144
  else {
145
145
  let o = "";
146
- if (h.startsWith('"')) {
146
+ if (c.startsWith('"')) {
147
147
  let r = 0, a = !0;
148
148
  for (; a; ) {
149
- const l = h.slice(0, 1);
150
- l === '"' && (r += 1), o += l, h = h.slice(1), (h.length === 0 || h.match(/^[\t\r\n]/) && r % 2 === 0) && (a = !1);
149
+ const l = c.slice(0, 1);
150
+ l === '"' && (r += 1), o += l, c = c.slice(1), (c.length === 0 || c.match(/^[\t\r\n]/) && r % 2 === 0) && (a = !1);
151
151
  }
152
152
  o = o.replace(/^"/, "").replace(/"$/, "").replace(/["]*/g, (l) => new Array(Math.floor(l.length / 2)).fill('"').join(""));
153
153
  } else {
154
- const r = h.match(ge);
155
- o = r ? r[0] : "", h = h.slice(o.length);
154
+ const r = c.match(ge);
155
+ o = r ? r[0] : "", c = c.slice(o.length);
156
156
  }
157
157
  t[i][e] = o;
158
158
  }
159
159
  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;
160
160
  }
161
- function me(h) {
161
+ function me(c) {
162
162
  let t, e, i, s, o = "", r;
163
- for (t = 0, e = h.length; t < e; t += 1) {
164
- for (s = h[t].length, i = 0; i < s; i += 1)
165
- i > 0 && (o += " "), r = h[t][i], typeof r == "string" ? r.indexOf(`
163
+ for (t = 0, e = c.length; t < e; t += 1) {
164
+ for (s = c[t].length, i = 0; i < s; i += 1)
165
+ i > 0 && (o += " "), r = c[t][i], typeof r == "string" ? r.indexOf(`
166
166
  `) > -1 ? o += `"${r.replace(/"/g, '""')}"` : o += r : r == null ? o += "" : o += r;
167
167
  t !== e - 1 && (o += `
168
168
  `);
169
169
  }
170
170
  return o;
171
171
  }
172
- function Ut(h, t, e = []) {
172
+ function Ut(c, t, e = []) {
173
173
  let i = 0;
174
174
  const s = [];
175
- return h.forEach((o, r) => {
175
+ return c.forEach((o, r) => {
176
176
  if (r === 0)
177
177
  s.push(1);
178
178
  else {
179
- const a = e.reduce((c, d) => `${c}${o[d] ?? ""}`, "") || o[t], l = e.reduce((c, d) => `${c}${h[r - 1][d] ?? ""}`, "") || h[r - 1][t];
179
+ const a = e.reduce((h, d) => `${h}${o[d] ?? ""}`, "") || o[t], l = e.reduce((h, d) => `${h}${c[r - 1][d] ?? ""}`, "") || c[r - 1][t];
180
180
  a === l ? (s[i] += 1, s.push(0)) : (s.push(1), i = r);
181
181
  }
182
182
  }), s;
183
183
  }
184
- function jt(h, t) {
184
+ function jt(c, t) {
185
185
  let e = "", i = "";
186
186
  const s = {};
187
187
  return t.forEach((o, r) => {
188
- r === 0 ? (e = o.key, i = o.key, s[o.key] = 1) : h[o.key] === h[e] ? (s[o.key] = 0, s[i] += 1) : (s[o.key] = 1, e = o.key, i = o.key);
188
+ 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);
189
189
  }), s;
190
190
  }
191
- function Ee(h, t, e = []) {
192
- const { visibleRows: i, rowIndex: s, headIndex: o } = h, r = Ut(i, t, e);
191
+ function Ee(c, t, e = []) {
192
+ const { visibleRows: i, rowIndex: s, headIndex: o } = c, r = Ut(i, t, e);
193
193
  return r[s - o] === 0 ? {
194
194
  rowspan: 0,
195
195
  colspan: 0,
@@ -202,8 +202,8 @@ function Ee(h, t, e = []) {
202
202
  mergeRow: !0
203
203
  };
204
204
  }
205
- function pe(h, t = []) {
206
- const { column: e, row: i, visibleLeafColumns: s } = h, o = s.filter((r) => t.includes(r.key));
205
+ function pe(c, t = []) {
206
+ const { column: e, row: i, visibleLeafColumns: s } = c, o = s.filter((r) => t.includes(r.key));
207
207
  if (t.includes(e.key)) {
208
208
  const r = jt(i, o);
209
209
  return r[e.key] === 0 ? {
@@ -219,15 +219,15 @@ function pe(h, t = []) {
219
219
  };
220
220
  }
221
221
  }
222
- function Ce(h, t = document.documentElement) {
223
- const e = h.startsWith("--") ? h : `--${h}`;
222
+ function ye(c, t = document.documentElement) {
223
+ const e = c.startsWith("--") ? c : `--${c}`;
224
224
  return getComputedStyle(t).getPropertyValue(e).trim();
225
225
  }
226
- function Dt(h) {
227
- if (!h) return /* @__PURE__ */ new Date(0);
228
- if (typeof h == "number")
229
- return new Date(h);
230
- const t = String(h).trim(), e = new Date(t);
226
+ function Dt(c) {
227
+ if (!c) return /* @__PURE__ */ new Date(0);
228
+ if (typeof c == "number")
229
+ return new Date(c);
230
+ const t = String(c).trim(), e = new Date(t);
231
231
  if (!isNaN(e.getTime()))
232
232
  return e;
233
233
  const i = [
@@ -261,24 +261,24 @@ function Dt(h) {
261
261
  if (o) {
262
262
  const r = o.slice(1).map(Number);
263
263
  if (s.source.includes("YYYY-MM-DD") || s.source.includes("YYYY/MM/DD") || s.source.includes("YYYY.MM.DD")) {
264
- const [a, l, c, d = 0, f = 0, x = 0] = r;
265
- return new Date(a, l - 1, c, d, f, x);
264
+ const [a, l, h, d = 0, f = 0, x = 0] = r;
265
+ return new Date(a, l - 1, h, d, f, x);
266
266
  } else if (s.source.includes("DD-MM-YYYY") || s.source.includes("DD/MM/YYYY") || s.source.includes("DD.MM.YYYY")) {
267
- const [a, l, c, d = 0, f = 0, x = 0] = r;
268
- return new Date(c, l - 1, a, d, f, x);
267
+ const [a, l, h, d = 0, f = 0, x = 0] = r;
268
+ return new Date(h, l - 1, a, d, f, x);
269
269
  } else if (s.source.includes("MM-DD-YYYY") || s.source.includes("MM/DD/YYYY") || s.source.includes("MM.DD.YYYY")) {
270
- const [a, l, c, d = 0, f = 0, x = 0] = r;
271
- return new Date(c, a - 1, l, d, f, x);
270
+ const [a, l, h, d = 0, f = 0, x = 0] = r;
271
+ return new Date(h, a - 1, l, d, f, x);
272
272
  } else if (s.source.includes("YYYYMMDD")) {
273
- const [a, l, c] = r;
274
- return new Date(a, l - 1, c);
273
+ const [a, l, h] = r;
274
+ return new Date(a, l - 1, h);
275
275
  }
276
276
  }
277
277
  }
278
278
  return /* @__PURE__ */ new Date(NaN);
279
279
  }
280
- function ye(h, t) {
281
- const e = Dt(h), i = Dt(t);
280
+ function Ce(c, t) {
281
+ const e = Dt(c), i = Dt(t);
282
282
  return isNaN(e.getTime()) && isNaN(i.getTime()) ? 0 : isNaN(e.getTime()) ? -1 : isNaN(i.getTime()) ? 1 : e.getTime() - i.getTime();
283
283
  }
284
284
  class qt {
@@ -328,8 +328,8 @@ class qt {
328
328
  }
329
329
  }
330
330
  class vt extends qt {
331
- constructor(e, i, s, o, r, a, l, c, d, f = "body", x = !0) {
332
- super(e, o, r, a, l, f, c.fixed);
331
+ constructor(e, i, s, o, r, a, l, h, d, f = "body", x = !0) {
332
+ super(e, o, r, a, l, f, h.fixed);
333
333
  n(this, "formatter");
334
334
  n(this, "formatterFooter");
335
335
  n(this, "hoverIconName", "");
@@ -411,7 +411,7 @@ class vt extends qt {
411
411
  n(this, "overflowTooltipMaxWidth", 500);
412
412
  n(this, "overflowTooltipPlacement", "top");
413
413
  n(this, "maxLineClamp", "auto");
414
- this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = c.key, this.type = c.type || "", this.editorType = c.editorType || "text", this.selectorCellValueType = c.selectorCellValueType || this.ctx.config.SELECTOR_CELL_VALUE_TYPE || "value", this.editorProps = c.editorProps || {}, this.cellType = f, this.align = c.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = c.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = c.fixed || "", this.level = c.level || 0, this.operation = c.operation || !1, this.column = c, this.rules = c.rules || [], this.row = d, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = c.render, this.overflowTooltipShow = c.overflowTooltipShow !== !1, this.autoRowHeight = c.autoRowHeight !== void 0 ? c.autoRowHeight : this.ctx.config.AUTO_ROW_HEIGHT, this.overflowTooltipMaxWidth = c.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = c.overflowTooltipPlacement || "top", this.renderFooter = c.renderFooter, this.hoverIconName = c.hoverIconName, this.formatter = c.formatter, this.formatterFooter = c.formatterFooter, this.maxLineClamp = c.maxLineClamp || "auto", x && this.update();
414
+ this.visibleWidth = this.width, this.visibleHeight = this.height, this.colIndex = s, this.rowIndex = i, this.key = h.key, this.type = h.type || "", this.editorType = h.editorType || "text", this.selectorCellValueType = h.selectorCellValueType || this.ctx.config.SELECTOR_CELL_VALUE_TYPE || "value", this.editorProps = h.editorProps || {}, this.cellType = f, this.align = h.align || this.ctx.config.COLUMNS_ALIGN, this.verticalAlign = h.verticalAlign || this.ctx.config.COLUMNS_VERTICAL_ALIGN, this.fixed = h.fixed || "", this.level = h.level || 0, this.operation = h.operation || !1, this.column = h, this.rules = h.rules || [], this.row = d, this.rowKey = this.cellType === "body" ? this.ctx.database.getRowKeyForRowIndex(i) : `${this.cellType}_${this.rowIndex}`, this.value = this.getValue(), this.render = h.render, this.overflowTooltipShow = h.overflowTooltipShow !== !1, this.autoRowHeight = h.autoRowHeight !== void 0 ? h.autoRowHeight : this.ctx.config.AUTO_ROW_HEIGHT, this.overflowTooltipMaxWidth = h.overflowTooltipMaxWidth || 500, this.overflowTooltipPlacement = h.overflowTooltipPlacement || "top", this.renderFooter = h.renderFooter, this.hoverIconName = h.hoverIconName, this.formatter = h.formatter, this.formatterFooter = h.formatterFooter, this.maxLineClamp = h.maxLineClamp || "auto", x && this.update();
415
415
  }
416
416
  setWidthHeight(e, i) {
417
417
  this.width = e, this.height = i;
@@ -438,7 +438,7 @@ class vt extends qt {
438
438
  relationRowKeys: r,
439
439
  relationColKeys: a,
440
440
  mergeRow: l = !1,
441
- mergeCol: c = !1
441
+ mergeCol: h = !1
442
442
  } = i({
443
443
  row: this.row,
444
444
  rowIndex: this.rowIndex,
@@ -451,7 +451,7 @@ class vt extends qt {
451
451
  visibleLeafColumns: this.ctx.header.visibleLeafColumns,
452
452
  rows: this.ctx.body.data
453
453
  }) || {};
454
- Array.isArray(r) && r.length > 0 ? this.relationRowKeys = r : this.relationRowKeys = [this.key], Array.isArray(a) && a.length > 0 ? this.relationColKeys = a : this.relationColKeys = [this.key], this.mergeCol = c, this.mergeRow = l, this.colspan = s, this.rowspan = o, this.visibleWidth = this.getWidthByColIndexColSpan(this.colIndex, this.colspan), this.visibleHeight = this.ctx.database.getHeightByRowIndexRowSpan(this.rowIndex, this.rowspan);
454
+ Array.isArray(r) && r.length > 0 ? this.relationRowKeys = r : this.relationRowKeys = [this.key], Array.isArray(a) && a.length > 0 ? this.relationColKeys = a : this.relationColKeys = [this.key], this.mergeCol = h, this.mergeRow = l, this.colspan = s, this.rowspan = o, this.visibleWidth = this.getWidthByColIndexColSpan(this.colIndex, this.colspan), this.visibleHeight = this.ctx.database.getHeightByRowIndexRowSpan(this.rowIndex, this.rowspan);
455
455
  }
456
456
  }
457
457
  updateSpanInfo() {
@@ -529,25 +529,25 @@ class vt extends qt {
529
529
  let o, r = 0, a = "";
530
530
  if (!(["tree", "selection-tree", "tree-selection"].includes(this.type) && s === "body"))
531
531
  return;
532
- const l = this.ctx.database.getRowForRowKey(i), { expand: c = !1, hasChildren: d = !1, expandLoading: f = !1, level: x = 0 } = l || {};
533
- this.rowExpand = c, this.rowHasChildren = d;
532
+ const l = this.ctx.database.getRowForRowKey(i), { expand: h = !1, hasChildren: d = !1, expandLoading: f = !1, level: x = 0 } = l || {};
533
+ this.rowExpand = h, this.rowHasChildren = d;
534
534
  const { TREE_INDENT: u = 16, CHECKBOX_SIZE: g, TREE_ICON_SIZE: m } = this.ctx.config;
535
535
  if (r = x * u, f) {
536
536
  const R = this.ctx.icons.get("loading");
537
537
  a = "loading", o = R;
538
538
  } else if (d) {
539
539
  const R = this.ctx.icons.get("expand"), S = this.ctx.icons.get("shrink");
540
- o = c ? S : R, a = c ? "shrink" : "expand";
540
+ o = h ? S : R, a = h ? "shrink" : "expand";
541
541
  }
542
542
  let w = m, E = m, p = this.drawX;
543
543
  (this.align === "center" || this.align === "right") && (p = this.drawX + (this.visibleWidth - w - 2 * e) / 2, this.align = "left");
544
- let C = p + r + e, b = this.drawY + (this.visibleHeight - E) / 2, y = r + this.drawX + w - 0.5;
545
- this.type === "selection-tree" ? (C = r + this.drawSelectionImageX + this.drawSelectionImageWidth, y = C + w - e / 2) : this.type === "tree-selection" ? y = C + g + w - e / 2 : y = C + w - e / 2, this.drawTextX = y, this.drawTextWidth = this.drawX + this.visibleWidth - y, !(C + w + e > this.drawX + this.visibleWidth) && (b + E + e > this.drawY + this.visibleHeight || (this.drawTreeImageX = C, this.drawTreeImageY = b, this.drawTreeImageWidth = w, this.drawTreeImageHeight = E, o ? (this.drawTreeImageName = a, this.drawTreeImageSource = o) : (this.drawTreeImageName = "", this.drawTreeImageSource = void 0)));
544
+ let y = p + r + e, b = this.drawY + (this.visibleHeight - E) / 2, C = r + this.drawX + w - 0.5;
545
+ this.type === "selection-tree" ? (y = r + this.drawSelectionImageX + this.drawSelectionImageWidth, C = y + w - e / 2) : this.type === "tree-selection" ? C = y + g + w - e / 2 : C = y + w - e / 2, this.drawTextX = C, this.drawTextWidth = this.drawX + this.visibleWidth - C, !(y + w + e > this.drawX + this.visibleWidth) && (b + E + e > this.drawY + this.visibleHeight || (this.drawTreeImageX = y, this.drawTreeImageY = b, this.drawTreeImageWidth = w, this.drawTreeImageHeight = E, o ? (this.drawTreeImageName = a, this.drawTreeImageSource = o) : (this.drawTreeImageName = "", this.drawTreeImageSource = void 0)));
546
546
  }
547
547
  drawTreeLine() {
548
548
  const { TREE_LINE: e, TREE_INDENT: i = 16, TREE_ICON_SIZE: s = 16, TREE_LINE_COLOR: o = "#e1e6eb" } = this.ctx.config;
549
549
  if (!e || this.cellType !== "body" || !["tree", "selection-tree", "tree-selection"].includes(this.type) || this.rowspan === 0 || this.colspan === 0) return;
550
- const r = this.ctx.database.getRowForRowKey(this.rowKey) || {}, a = r.level ?? 0, l = this.drawTreeImageX + this.drawTreeImageWidth / 2, c = this.drawTreeImageY + this.drawTreeImageHeight / 2;
550
+ const r = this.ctx.database.getRowForRowKey(this.rowKey) || {}, a = r.level ?? 0, l = this.drawTreeImageX + this.drawTreeImageWidth / 2, h = this.drawTreeImageY + this.drawTreeImageHeight / 2;
551
551
  let d = this.drawTreeImageX - a * i;
552
552
  const f = Array.isArray(r.parentRowKeys) ? r.parentRowKeys : [];
553
553
  if (a > 0) {
@@ -562,7 +562,7 @@ class vt extends qt {
562
562
  lineDashOffset: 0
563
563
  });
564
564
  }
565
- const x = Math.round(this.drawTreeImageX - i + s / 2), g = !!r.isLastChild ? c : this.drawY + this.visibleHeight;
565
+ const x = Math.round(this.drawTreeImageX - i + s / 2), g = !!r.isLastChild ? h : this.drawY + this.visibleHeight;
566
566
  this.ctx.paint.drawLine([x, this.drawY, x, g], {
567
567
  borderColor: o,
568
568
  borderWidth: 1,
@@ -570,7 +570,7 @@ class vt extends qt {
570
570
  lineDashOffset: 0
571
571
  });
572
572
  const m = Math.round(d + (a - 1) * i + s / 2);
573
- this.ctx.paint.drawLine([m, c, l, c], {
573
+ this.ctx.paint.drawLine([m, h, l, h], {
574
574
  borderColor: o,
575
575
  borderWidth: 1,
576
576
  lineDash: [4, 4],
@@ -596,7 +596,7 @@ class vt extends qt {
596
596
  READONLY_TEXT_COLOR: r,
597
597
  BODY_TEXT_COLOR: a,
598
598
  FOOTER_TEXT_COLOR: l,
599
- FOOTER_BG_COLOR: c,
599
+ FOOTER_BG_COLOR: h,
600
600
  HIGHLIGHT_SELECTED_ROW: d,
601
601
  HIGHLIGHT_SELECTED_ROW_COLOR: f,
602
602
  HIGHLIGHT_HOVER_ROW: x,
@@ -606,7 +606,7 @@ class vt extends qt {
606
606
  FINDER_CELL_BG_COLOR: w
607
607
  } = this.ctx.config;
608
608
  if (this.cellType === "footer") {
609
- let _ = c, T = l;
609
+ let _ = h, T = l;
610
610
  if (typeof o == "function") {
611
611
  const M = o, { backgroundColor: L, color: A, font: H } = M({
612
612
  row: this.row,
@@ -621,13 +621,13 @@ class vt extends qt {
621
621
  return;
622
622
  }
623
623
  let E = "transparent";
624
- const p = this.ctx.hoverCell, C = this.ctx.currentCell;
625
- let b = this.rowIndex, y = this.rowIndex;
624
+ const p = this.ctx.hoverCell, y = this.ctx.currentCell;
625
+ let b = this.rowIndex, C = this.rowIndex;
626
626
  if (this.rowspan !== 1 && (x || d)) {
627
627
  const _ = this.getSpanInfo(), { yArr: T } = _;
628
- b = T[0], y = T[1];
628
+ b = T[0], C = T[1];
629
629
  }
630
- x && p && (p.rowKey === this.rowKey && (E = u), p.rowIndex >= b && p.rowIndex <= y && (E = u)), d && C && (C.rowKey === this.rowKey && (E = f), C.rowIndex >= b && C.rowIndex <= y && (E = f)), this.drawCellSkyBgColor = E;
630
+ x && p && (p.rowKey === this.rowKey && (E = u), p.rowIndex >= b && p.rowIndex <= C && (E = u)), d && y && (y.rowKey === this.rowKey && (E = f), y.rowIndex >= b && y.rowIndex <= C && (E = f)), this.drawCellSkyBgColor = E;
631
631
  let R = e, S = a;
632
632
  if (this.ctx.database.getReadonly(this.rowKey, this.key) || (R = i, S = r), g && (this.rowIndex % 2 ? R = m : R = e), typeof s == "function") {
633
633
  const _ = s, { backgroundColor: T, color: M, font: L } = _({
@@ -644,25 +644,25 @@ class vt extends qt {
644
644
  O === this.rowIndex && v === this.colIndex && I === "body" && (R = w), this.drawCellBgColor = R, this.drawTextColor = S;
645
645
  }
646
646
  updateSelection() {
647
- const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: o, cellType: r, type: a, rowIndex: l, rowKey: c } = this;
647
+ const { visibleWidth: e, visibleHeight: i, rowspan: s, colspan: o, cellType: r, type: a, rowIndex: l, rowKey: h } = this;
648
648
  if (s === 0 || o === 0 || r === "footer" || !["index-selection", "selection", "selection-tree", "tree-selection"].includes(a))
649
649
  return;
650
- const d = this.ctx.database.getRowSelectable(c), { CHECKBOX_SIZE: f = 0, CELL_PADDING: x } = this.ctx.config;
650
+ const d = this.ctx.database.getRowSelectable(h), { CHECKBOX_SIZE: f = 0, CELL_PADDING: x } = this.ctx.config;
651
651
  let u = this.drawX + x;
652
652
  (this.align === "center" || this.align === "right") && (u = this.drawX + (e - f) / 2);
653
653
  let g = u, m = this.drawY + (i - f) / 2;
654
654
  if (a !== "selection-tree") {
655
655
  if (a === "tree-selection") {
656
- const { TREE_INDENT: p = 16, TREE_ICON_SIZE: C } = this.ctx.config, b = this.ctx.database.getRowForRowKey(c), { level: y = 0 } = b || {}, R = y * p;
657
- g = u + C + R;
656
+ const { TREE_INDENT: p = 16, TREE_ICON_SIZE: y } = this.ctx.config, b = this.ctx.database.getRowForRowKey(h), { level: C = 0 } = b || {}, R = C * p;
657
+ g = u + y + R;
658
658
  }
659
659
  }
660
660
  let w = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck";
661
661
  if (a === "selection-tree" || a === "tree-selection") {
662
- const p = this.ctx.database.getTreeSelectionState(c);
662
+ const p = this.ctx.database.getTreeSelectionState(h);
663
663
  p.indeterminate && d ? (w = this.ctx.icons.get("checkbox-indeterminate"), E = "checkbox-indeterminate") : p.checked && d ? (w = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : !p.checked && d ? (w = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (w = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
664
664
  } else {
665
- const p = this.ctx.database.getRowSelection(c);
665
+ const p = this.ctx.database.getRowSelection(h);
666
666
  p && d ? (w = this.ctx.icons.get("checkbox-check"), E = "checkbox-check") : p && !d ? (w = this.ctx.icons.get("checkbox-check-disabled"), E = "checkbox-check-disabled") : !p && d ? (w = this.ctx.icons.get("checkbox-uncheck"), E = "checkbox-uncheck") : (w = this.ctx.icons.get("checkbox-disabled"), E = "checkbox-disabled");
667
667
  }
668
668
  g + f + x > this.drawX + this.visibleWidth || m + f + x > this.drawY + this.visibleHeight || (a === "index-selection" ? (this.ctx.hoverCell && this.ctx.hoverCell.rowIndex === l || ["checkbox-disabled", "checkbox-check"].includes(E)) && (this.drawSelectionImageX = g, this.drawSelectionImageY = m, this.drawSelectionImageWidth = f, this.drawSelectionImageHeight = f, this.drawSelectionImageName = E, this.drawSelectionImageSource = w) : (this.drawSelectionImageX = g, this.drawSelectionImageY = m, this.drawSelectionImageWidth = f, this.drawSelectionImageHeight = f, this.drawSelectionImageName = E, this.drawSelectionImageSource = w));
@@ -672,27 +672,27 @@ class vt extends qt {
672
672
  return;
673
673
  const { BODY_CELL_HOVER_ICON_METHOD: i, CELL_HOVER_ICON_SIZE: s, CELL_PADDING: o, ENABLE_MERGE_CELL_LINK: r } = this.ctx.config;
674
674
  if (typeof i == "function") {
675
- const c = i({
675
+ const h = i({
676
676
  row: this.row,
677
677
  rowIndex: this.rowIndex,
678
678
  colIndex: this.colIndex,
679
679
  column: this.column,
680
680
  value: this.getValue()
681
681
  });
682
- c !== void 0 && (this.hoverIconName = c);
682
+ h !== void 0 && (this.hoverIconName = h);
683
683
  }
684
684
  const { hoverCell: a } = this.ctx;
685
685
  if (this.hoverIconName && !this.ctx.editing && a) {
686
- let l = 0, c = 0;
687
- if (a.rowKey === this.rowKey && (l = this.drawX + this.width - s - o, c = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && r) {
686
+ let l = 0, h = 0;
687
+ if (a.rowKey === this.rowKey && (l = this.drawX + this.width - s - o, h = this.drawY + (this.height - s) / 2), this.rowspan !== 1 && r) {
688
688
  const f = this.getSpanInfo(), { yArr: x } = f, u = x[0], g = x[1];
689
689
  if (a.rowIndex >= u && a.rowIndex <= g) {
690
690
  const { width: m, height: w, offsetTop: E, offsetLeft: p } = f;
691
- l = this.drawX - p + m - s - o, c = this.drawY - E + (w - s) / 2;
691
+ l = this.drawX - p + m - s - o, h = this.drawY - E + (w - s) / 2;
692
692
  }
693
693
  }
694
694
  const d = this.ctx.icons.get(this.hoverIconName);
695
- this.drawHoverImageX = l, this.drawHoverImageY = c, this.drawHoverImageWidth = s, this.drawHoverImageHeight = s, this.drawHoverImageName = this.hoverIconName, this.drawHoverImageSource = d;
695
+ this.drawHoverImageX = l, this.drawHoverImageY = h, this.drawHoverImageWidth = s, this.drawHoverImageHeight = s, this.drawHoverImageName = this.hoverIconName, this.drawHoverImageSource = d;
696
696
  }
697
697
  }
698
698
  /**
@@ -773,12 +773,19 @@ class vt extends qt {
773
773
  * 获取样式
774
774
  */
775
775
  getOverlayerViewsStyle() {
776
- let e = `${this.drawX - this.ctx.fixedLeftWidth}px`, i = `${this.drawY - this.ctx.body.y}px`;
777
- return this.fixed === "left" ? e = `${this.drawX}px` : this.fixed === "right" && (e = `${this.drawX - (this.ctx.stageWidth - this.ctx.fixedRightWidth)}px`), this.cellType === "footer" && this.ctx.config.FOOTER_FIXED && (i = `${this.drawY - this.ctx.footer.y}px`), this.autoRowHeight && this.ctx.database.getOverlayerAutoHeight(this.rowIndex, this.colIndex) === 0 && (e = "-99999px", i = "-99999px"), {
776
+ let e = this.drawX - this.ctx.fixedLeftWidth, i = this.drawY - this.ctx.body.y;
777
+ if (this.fixed === "left" ? e = this.drawX : this.fixed === "right" && (e = this.drawX - (this.ctx.stageWidth - this.ctx.fixedRightWidth)), this.cellType === "footer" && this.ctx.config.FOOTER_FIXED && (i = this.drawY - this.ctx.footer.y), this.autoRowHeight && this.render && this.verticalAlign === "middle") {
778
+ const s = this.ctx.database.getOverlayerAutoHeight(this.rowIndex, this.colIndex);
779
+ if (s < this.visibleHeight && s > 0) {
780
+ const o = (this.visibleHeight - s) / 2;
781
+ i = i + o;
782
+ }
783
+ }
784
+ return this.autoRowHeight && this.ctx.database.getOverlayerAutoHeight(this.rowIndex, this.colIndex) === 0 && (e = -99999, i = -99999), {
778
785
  position: "absolute",
779
786
  overflow: "hidden",
780
- left: e,
781
- top: i,
787
+ left: `${Math.round(e - 1)}px`,
788
+ top: `${Math.round(i - 1)}px`,
782
789
  width: `${this.visibleWidth}px`,
783
790
  height: this.autoRowHeight ? "auto" : `${this.visibleHeight}px`,
784
791
  // height: `${this.visibleHeight}px`,
@@ -815,8 +822,8 @@ class vt extends qt {
815
822
  const { SELECT_BORDER_COLOR: e, ENABLE_AUTOFILL: i, ENABLE_SELECTOR: s, AUTOFILL_POINT_BORDER_COLOR: o } = this.ctx.config;
816
823
  if (!s || !i || this.ctx.editing)
817
824
  return;
818
- const { xArr: r, yArr: a } = this.ctx.selector, l = r[1], c = a[1], { colIndex: d, rowIndex: f, drawX: x, drawY: u } = this;
819
- if (d === l && f === c) {
825
+ const { xArr: r, yArr: a } = this.ctx.selector, l = r[1], h = a[1], { colIndex: d, rowIndex: f, drawX: x, drawY: u } = this;
826
+ if (d === l && f === h) {
820
827
  const m = d === this.ctx.maxColIndex || f === this.ctx.maxRowIndex || d === this.ctx.lastCenterColIndex ? 6 : 4;
821
828
  this.ctx.paint.drawRect(x + this.width - m, u + this.height - m, 6, 6, {
822
829
  borderColor: o,
@@ -930,11 +937,11 @@ class vt extends qt {
930
937
  fillColor: "transparent",
931
938
  borderWidth: 1
932
939
  });
933
- const [a, l] = i, [c, d] = s;
934
- !(a === l && c === d) && this.colIndex >= a && this.colIndex <= l && this.rowIndex >= c && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.width, this.height, {
940
+ const [a, l] = i, [h, d] = s;
941
+ !(a === l && h === d) && this.colIndex >= a && this.colIndex <= l && this.rowIndex >= h && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.width, this.height, {
935
942
  borderColor: "transparent",
936
943
  fillColor: this.ctx.config.SELECT_AREA_COLOR || "rgba(82,146,247,0.1)"
937
- }), this.operation && this.rowIndex >= c && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.visibleWidth, this.visibleHeight, {
944
+ }), this.operation && this.rowIndex >= h && this.rowIndex <= d && this.ctx.paint.drawRect(this.drawX, this.drawY, this.visibleWidth, this.visibleHeight, {
938
945
  borderColor: "transparent",
939
946
  fillColor: this.ctx.config.SELECT_ROW_COL_BG_COLOR || "transparent"
940
947
  });
@@ -960,11 +967,11 @@ class vt extends qt {
960
967
  }
961
968
  drawBorder(e) {
962
969
  const { drawX: i, drawY: s, rowIndex: o, colIndex: r, height: a, width: l } = this;
963
- let c = i, d = s;
964
- const { xArr: f, yArr: x, lineDash: u = [], borderWidth: g = 1, borderColor: m, fillColor: w } = e, E = f[0], p = f[1], C = x[0], b = x[1];
965
- if (r >= E && r <= p && o === C) {
966
- const y = r === p ? 1 : 0, R = r === E ? 1 : 0;
967
- this.ctx.paint.drawLine([c + R, d + 1, c + l - y, d + 1], {
970
+ let h = i, d = s;
971
+ const { xArr: f, yArr: x, lineDash: u = [], borderWidth: g = 1, borderColor: m, fillColor: w } = e, E = f[0], p = f[1], y = x[0], b = x[1];
972
+ if (r >= E && r <= p && o === y) {
973
+ const C = r === p ? 1 : 0, R = r === E ? 1 : 0;
974
+ this.ctx.paint.drawLine([h + R, d + 1, h + l - C, d + 1], {
968
975
  borderColor: m,
969
976
  fillColor: w,
970
977
  borderWidth: g,
@@ -973,9 +980,9 @@ class vt extends qt {
973
980
  lineDash: u
974
981
  });
975
982
  }
976
- if (r === p && o >= C && o <= b) {
977
- const y = o === C ? 1 : 0, R = o === b ? 1 : 0;
978
- this.ctx.paint.drawLine([c + l - 1, d + y, c + l - 1, d + a - R], {
983
+ if (r === p && o >= y && o <= b) {
984
+ const C = o === y ? 1 : 0, R = o === b ? 1 : 0;
985
+ this.ctx.paint.drawLine([h + l - 1, d + C, h + l - 1, d + a - R], {
979
986
  borderColor: m,
980
987
  fillColor: w,
981
988
  borderWidth: g,
@@ -985,8 +992,8 @@ class vt extends qt {
985
992
  });
986
993
  }
987
994
  if (r >= E && r <= p && o === b) {
988
- const y = r === p ? 1 : 0, R = r === E ? 1 : 0;
989
- this.ctx.paint.drawLine([c + R, d + a - 1, c + l - y, d + a - 1], {
995
+ const C = r === p ? 1 : 0, R = r === E ? 1 : 0;
996
+ this.ctx.paint.drawLine([h + R, d + a - 1, h + l - C, d + a - 1], {
990
997
  borderColor: m,
991
998
  fillColor: w,
992
999
  borderWidth: g,
@@ -995,9 +1002,9 @@ class vt extends qt {
995
1002
  lineDash: u
996
1003
  });
997
1004
  }
998
- if (r === E && o >= C && o <= b) {
999
- const y = o === b ? 1 : 0, R = o === C ? 1 : 0;
1000
- this.ctx.paint.drawLine([c + 1, d + R, c + 1, d + a - y], {
1005
+ if (r === E && o >= y && o <= b) {
1006
+ const C = o === b ? 1 : 0, R = o === y ? 1 : 0;
1007
+ this.ctx.paint.drawLine([h + 1, d + R, h + 1, d + a - C], {
1001
1008
  borderColor: m,
1002
1009
  fillColor: w,
1003
1010
  borderWidth: g,
@@ -1079,28 +1086,28 @@ class be {
1079
1086
  DEFAULT_EXPAND_ALL: r,
1080
1087
  CELL_HEIGHT: a,
1081
1088
  SELECTABLE_METHOD: l,
1082
- CHECKBOX_KEY: c,
1089
+ CHECKBOX_KEY: h,
1083
1090
  TREE_CHILDREN_KEY: d
1084
1091
  } = this.ctx.config;
1085
1092
  t.forEach((f, x) => {
1086
- var C;
1093
+ var y;
1087
1094
  d !== "children" && (f.children = f[d]);
1088
1095
  const u = f[o], g = u != null ? `${u}` : $t();
1089
1096
  this.itemRowKeyMap.set(f, g);
1090
1097
  const m = f._height || a, w = f._readonly;
1091
1098
  let E = !0;
1092
- if (typeof l == "function" && (E = l), c) {
1093
- const b = f[c];
1099
+ if (typeof l == "function" && (E = l), h) {
1100
+ const b = f[h];
1094
1101
  if (this.checkboxKeyMap.has(b)) {
1095
- const y = this.checkboxKeyMap.get(b) || [];
1096
- y.push(g), this.checkboxKeyMap.set(b, y);
1102
+ const C = this.checkboxKeyMap.get(b) || [];
1103
+ C.push(g), this.checkboxKeyMap.set(b, C);
1097
1104
  } else
1098
1105
  this.checkboxKeyMap.set(b, [g]);
1099
1106
  }
1100
1107
  this.selectionMap.set(g, {
1101
- key: c ? f[c] : g,
1108
+ key: h ? f[h] : g,
1102
1109
  row: f,
1103
- check: ((C = this.selectionMap.get(g)) == null ? void 0 : C.check) || !1
1110
+ check: ((y = this.selectionMap.get(g)) == null ? void 0 : y.check) || !1
1104
1111
  });
1105
1112
  const p = r || this.expandMap.get(g) || f._expand || !1;
1106
1113
  this.expandMap.set(g, p), this.rowKeyMap.set(g, {
@@ -1147,7 +1154,7 @@ class be {
1147
1154
  }
1148
1155
  // 批量设置计算行高度
1149
1156
  setBatchCalculatedRowHeight(t) {
1150
- t.every(({ height: i, rowIndex: s }) => this.getPositionForRowIndex(s).calculatedHeight === i) || (t.forEach(({ rowIndex: i, height: s }) => {
1157
+ return t.every(({ height: i, rowIndex: s }) => this.getPositionForRowIndex(s).calculatedHeight === i) ? !1 : (t.forEach(({ rowIndex: i, height: s }) => {
1151
1158
  const o = this.rowIndexRowKeyMap.get(i);
1152
1159
  if (o) {
1153
1160
  const r = this.rowKeyMap.get(o);
@@ -1156,7 +1163,7 @@ class be {
1156
1163
  s > a && this.maxRowHeightMap.set(o, s);
1157
1164
  }
1158
1165
  }
1159
- }), this.clearBufferData(), this.getData(), this.ctx.emit("draw"));
1166
+ }), this.clearBufferData(), this.getData(), !0);
1160
1167
  }
1161
1168
  /**
1162
1169
  * 清除最大行高记录
@@ -1179,9 +1186,9 @@ class be {
1179
1186
  }
1180
1187
  generateColumns(t) {
1181
1188
  const e = (i) => i.map((s) => {
1182
- var c, d, f, x, u, g, m, w;
1189
+ var h, d, f, x, u, g, m, w;
1183
1190
  const o = s.children && Array.isArray(s.children) ? e(s.children) : void 0, r = {
1184
- hide: (d = (c = this.customHeader) == null ? void 0 : c.hideData) == null ? void 0 : d[s.key],
1191
+ hide: (d = (h = this.customHeader) == null ? void 0 : h.hideData) == null ? void 0 : d[s.key],
1185
1192
  fixed: (x = (f = this.customHeader) == null ? void 0 : f.fixedData) == null ? void 0 : x[s.key],
1186
1193
  sort: (g = (u = this.customHeader) == null ? void 0 : u.sortData) == null ? void 0 : g[s.key],
1187
1194
  width: (w = (m = this.customHeader) == null ? void 0 : m.resizableData) == null ? void 0 : w[s.key]
@@ -1223,7 +1230,7 @@ class be {
1223
1230
  const i = (o) => {
1224
1231
  o.forEach((r) => {
1225
1232
  t.push(r);
1226
- const a = this.itemRowKeyMap.get(r), { expand: l, hasChildren: c, height: d, calculatedHeight: f } = this.rowKeyMap.get(a), x = this.sumHeight;
1233
+ const a = this.itemRowKeyMap.get(r), { expand: l, hasChildren: h, height: d, calculatedHeight: f } = this.rowKeyMap.get(a), x = this.sumHeight;
1227
1234
  let u = Math.max(f, d);
1228
1235
  if (this.ctx.config.REMEMBER_MAX_ROW_HEIGHT) {
1229
1236
  const g = this.maxRowHeightMap.get(a) || d;
@@ -1234,7 +1241,7 @@ class be {
1234
1241
  height: u,
1235
1242
  bottom: this.sumHeight,
1236
1243
  calculatedHeight: f
1237
- }), e += 1, l && c && i(r.children);
1244
+ }), e += 1, l && h && i(r.children);
1238
1245
  });
1239
1246
  };
1240
1247
  this.rowIndexRowKeyMap.clear(), this.rowKeyRowIndexMap.clear();
@@ -1312,17 +1319,17 @@ class be {
1312
1319
  applySingleColumnSort(t, e, i, s) {
1313
1320
  return t.sort((o, r) => {
1314
1321
  const a = o[e], l = r[e];
1315
- let c = 0;
1322
+ let h = 0;
1316
1323
  if (typeof s == "function")
1317
- c = s(o, r);
1324
+ h = s(o, r);
1318
1325
  else if (s === "number") {
1319
1326
  const d = Number(a) || 0, f = Number(l) || 0;
1320
- c = d - f;
1327
+ h = d - f;
1321
1328
  } else if (s === "string") {
1322
1329
  const d = String(a || ""), f = String(l || "");
1323
- c = d.localeCompare(f);
1324
- } else s === "date" && (c = ye(a, l));
1325
- return i === "asc" ? c : -c;
1330
+ h = d.localeCompare(f);
1331
+ } else s === "date" && (h = Ce(a, l));
1332
+ return i === "asc" ? h : -h;
1326
1333
  });
1327
1334
  }
1328
1335
  /**
@@ -1434,23 +1441,23 @@ class be {
1434
1441
  async batchSetItemValue(t, e = !1, i = !0, s = "none") {
1435
1442
  let o = [], r = i;
1436
1443
  const a = /* @__PURE__ */ new Set();
1437
- let l = [], c = t.map((g) => {
1444
+ let l = [], h = t.map((g) => {
1438
1445
  const { rowKey: m, key: w } = g;
1439
1446
  let E = g.value, p = E;
1440
- const C = this.getRowDataItemForRowKey(m), b = this.getItemValue(m, w), y = this.getVirtualBodyCellByKey(m, w);
1441
- return (y == null ? void 0 : y.type) === "number" && (["", void 0, null].includes(E) ? p = null : /^-?\d+(\.\d+)?$/.test(`${E}`) ? p = Number(E) : (p = b, l.push({
1447
+ const y = this.getRowDataItemForRowKey(m), b = this.getItemValue(m, w), C = this.getVirtualBodyCellByKey(m, w);
1448
+ return (C == null ? void 0 : C.type) === "number" && (["", void 0, null].includes(E) ? p = null : /^-?\d+(\.\d+)?$/.test(`${E}`) ? p = Number(E) : (p = b, l.push({
1442
1449
  ...g,
1443
1450
  value: p,
1444
1451
  oldValue: b,
1445
- row: C
1452
+ row: y
1446
1453
  }))), {
1447
1454
  ...g,
1448
1455
  value: p,
1449
1456
  oldValue: b,
1450
- row: C
1457
+ row: y
1451
1458
  };
1452
1459
  });
1453
- if (c = c.filter((g) => !l.some((m) => g.rowKey === m.rowKey && g.key === m.key)), l.length) {
1460
+ if (h = h.filter((g) => !l.some((m) => g.rowKey === m.rowKey && g.key === m.key)), l.length) {
1454
1461
  const g = {
1455
1462
  code: "ERR_BATCH_SET_NUMBER_VALUE",
1456
1463
  message: "Assignment failed, not a numeric type",
@@ -1458,10 +1465,10 @@ class be {
1458
1465
  };
1459
1466
  this.ctx.emit("error", g);
1460
1467
  }
1461
- if (c = c.filter((g) => g.oldValue !== g.value), !c.length)
1468
+ if (h = h.filter((g) => g.oldValue !== g.value), !h.length)
1462
1469
  return;
1463
1470
  const { BEFORE_VALUE_CHANGE_METHOD: d } = this.ctx.config;
1464
- s === "none" && typeof d == "function" && (c = await d(c), r = !1), c.forEach((g) => {
1471
+ s === "none" && typeof d == "function" && (h = await d(h), r = !1), h.forEach((g) => {
1465
1472
  const { value: m, rowKey: w, key: E } = g, p = this.getItemValue(w, E);
1466
1473
  a.add(w), this.setItemValue(w, E, m, !1, !1, !1, r), o.push({
1467
1474
  rowKey: w,
@@ -1474,11 +1481,11 @@ class be {
1474
1481
  a.forEach((g) => {
1475
1482
  f.push(this.ctx.database.getRowDataItemForRowKey(g));
1476
1483
  });
1477
- const x = c.map(({ rowKey: g, key: m }) => this.getValidator(g, m));
1484
+ const x = h.map(({ rowKey: g, key: m }) => this.getValidator(g, m));
1478
1485
  Promise.all(x).then(() => {
1479
1486
  this.validationErrorMap.size === 0 && this.changedDataMap.size > 0 && this.ctx.emit("validateChangedData", this.getChangedData());
1480
1487
  });
1481
- const u = c.map((g) => {
1488
+ const u = h.map((g) => {
1482
1489
  const m = !!this.getValidationError(g.rowKey, g.key).length;
1483
1490
  return {
1484
1491
  ...g,
@@ -1507,15 +1514,15 @@ class be {
1507
1514
  if (!this.rowKeyMap.has(t))
1508
1515
  return {};
1509
1516
  const { item: l } = this.rowKeyMap.get(t);
1510
- let c = l[e], d = i;
1517
+ let h = l[e], d = i;
1511
1518
  if (a && this.ctx.database.getReadonly(t, e))
1512
1519
  return {
1513
- oldValue: c,
1514
- newValue: c
1520
+ oldValue: h,
1521
+ newValue: h
1515
1522
  };
1516
- l[e] !== null && typeof l[e] == "object" && (c = JSON.parse(JSON.stringify(l[e])));
1523
+ l[e] !== null && typeof l[e] == "object" && (h = JSON.parse(JSON.stringify(l[e])));
1517
1524
  const f = `${t}​_${e}`;
1518
- this.originalDataMap.has(f) || this.originalDataMap.set(f, c);
1525
+ this.originalDataMap.has(f) || this.originalDataMap.set(f, h);
1519
1526
  const x = this.originalDataMap.get(f), u = this.getRowDataItemForRowKey(t);
1520
1527
  if (r) {
1521
1528
  const g = this.getVirtualBodyCellByKey(t, e);
@@ -1525,7 +1532,7 @@ class be {
1525
1532
  else if (/^-?\d+(\.\d+)?$/.test(`${i}`))
1526
1533
  d = Number(i);
1527
1534
  else {
1528
- d = c;
1535
+ d = h;
1529
1536
  const w = {
1530
1537
  code: "ERR_SET_NUMBER_VALUE",
1531
1538
  message: "Assignment failed, not a numeric type",
@@ -1534,31 +1541,31 @@ class be {
1534
1541
  rowKey: t,
1535
1542
  key: e,
1536
1543
  value: d,
1537
- oldValue: c,
1544
+ oldValue: h,
1538
1545
  row: u
1539
1546
  }
1540
1547
  ]
1541
1548
  };
1542
1549
  this.ctx.emit("error", w);
1543
1550
  }
1544
- if (d === c)
1551
+ if (d === h)
1545
1552
  return {
1546
- oldValue: c,
1547
- newValue: c
1553
+ oldValue: h,
1554
+ newValue: h
1548
1555
  };
1549
1556
  let m = [
1550
1557
  {
1551
1558
  rowKey: t,
1552
1559
  key: e,
1553
1560
  value: d,
1554
- oldValue: c,
1561
+ oldValue: h,
1555
1562
  row: u
1556
1563
  }
1557
1564
  ];
1558
1565
  this.batchSetItemValue(m, s, !1), this.ctx.emit("editChange", {
1559
1566
  rowKey: t,
1560
1567
  key: e,
1561
- oldValue: c,
1568
+ oldValue: h,
1562
1569
  value: d,
1563
1570
  originalValue: x,
1564
1571
  row: u
@@ -1568,12 +1575,12 @@ class be {
1568
1575
  return this.ctx.hasEvent("iterationChange") && this.ctx.emit("iterationChange", {
1569
1576
  rowKey: t,
1570
1577
  key: e,
1571
- oldValue: c,
1578
+ oldValue: h,
1572
1579
  value: d,
1573
1580
  originalValue: this.originalDataMap.get(f),
1574
1581
  row: u
1575
1582
  }), o && this.ctx.emit("draw"), {
1576
- oldValue: c,
1583
+ oldValue: h,
1577
1584
  newValue: d
1578
1585
  };
1579
1586
  }
@@ -1647,7 +1654,7 @@ class be {
1647
1654
  const e = this.getTreeParent(t);
1648
1655
  if (!e)
1649
1656
  return;
1650
- const s = this.getTreeChildren(e).map((c) => this.selectionMap.get(c)), o = s.filter((c) => c == null ? void 0 : c.check).length, r = s.length;
1657
+ const s = this.getTreeChildren(e).map((h) => this.selectionMap.get(h)), o = s.filter((h) => h == null ? void 0 : h.check).length, r = s.length;
1651
1658
  let a = !1;
1652
1659
  r > 0 && (o === 0 ? a = !1 : o === r || this.ctx.config.TREE_SELECT_MODE === "auto" ? a = !0 : this.ctx.config.TREE_SELECT_MODE === "cautious" && (a = !1));
1653
1660
  const l = this.selectionMap.get(e);
@@ -1688,22 +1695,22 @@ class be {
1688
1695
  return { checked: s, indeterminate: !1 };
1689
1696
  let r = !1, a = s;
1690
1697
  if (this.ctx.config.TREE_SELECT_MODE === "auto") {
1691
- const c = (w) => {
1698
+ const h = (w) => {
1692
1699
  const E = this.getTreeChildren(w);
1693
1700
  let p = [];
1694
- for (const C of E)
1695
- p.push(C), p.push(...c(C));
1701
+ for (const y of E)
1702
+ p.push(y), p.push(...h(y));
1696
1703
  return p;
1697
- }, f = c(t).map((w) => this.selectionMap.get(w)), x = f.filter((w) => w == null ? void 0 : w.check).length, u = f.length, g = x > 0;
1704
+ }, f = h(t).map((w) => this.selectionMap.get(w)), x = f.filter((w) => w == null ? void 0 : w.check).length, u = f.length, g = x > 0;
1698
1705
  r = g && !(x === u), a = s || g, s && u > 0 && x === 0 && (a = !1, r = !1);
1699
1706
  } else if (this.ctx.config.TREE_SELECT_MODE === "cautious") {
1700
- const c = (w) => {
1707
+ const h = (w) => {
1701
1708
  const E = this.getTreeChildren(w);
1702
1709
  let p = [];
1703
- for (const C of E)
1704
- p.push(C), p.push(...c(C));
1710
+ for (const y of E)
1711
+ p.push(y), p.push(...h(y));
1705
1712
  return p;
1706
- }, f = c(t).map((w) => this.selectionMap.get(w)), x = f.filter((w) => w == null ? void 0 : w.check).length, u = f.length, g = x > 0, m = x === u;
1713
+ }, f = h(t).map((w) => this.selectionMap.get(w)), x = f.filter((w) => w == null ? void 0 : w.check).length, u = f.length, g = x > 0, m = x === u;
1707
1714
  r = g && !m, a = s || m, s && u > 0 && x === 0 && (a = !1, r = !1);
1708
1715
  } else this.ctx.config.TREE_SELECT_MODE === "strictly" && (r = !1, a = s);
1709
1716
  return { checked: a, indeterminate: r };
@@ -1730,9 +1737,9 @@ class be {
1730
1737
  for (const a of o.children) {
1731
1738
  if (this.getRowKeyByItem(a) === s)
1732
1739
  return r;
1733
- const c = e(o.children, s);
1734
- if (c)
1735
- return c;
1740
+ const h = e(o.children, s);
1741
+ if (h)
1742
+ return h;
1736
1743
  }
1737
1744
  }
1738
1745
  return null;
@@ -1815,15 +1822,15 @@ class be {
1815
1822
  rowIndex: x.rowIndex
1816
1823
  })), g && (o += 1);
1817
1824
  });
1818
- const l = r > i && s === 0 && a, c = o && o > s && s > 0 || l, d = o !== 0, f = !!o && o === s;
1825
+ const l = r > i && s === 0 && a, h = o && o > s && s > 0 || l, d = o !== 0, f = !!o && o === s;
1819
1826
  return this.bufferCheckState = {
1820
1827
  buffer: !0,
1821
1828
  check: f,
1822
- indeterminate: c,
1829
+ indeterminate: h,
1823
1830
  selectable: d
1824
1831
  }, {
1825
1832
  check: f,
1826
- indeterminate: c,
1833
+ indeterminate: h,
1827
1834
  selectable: d
1828
1835
  };
1829
1836
  }
@@ -1953,7 +1960,7 @@ class be {
1953
1960
  d && (l = d);
1954
1961
  }
1955
1962
  if (l) {
1956
- const c = {
1963
+ const h = {
1957
1964
  row: s.item,
1958
1965
  rowIndex: s.rowIndex,
1959
1966
  colIndex: o.colIndex,
@@ -1963,7 +1970,7 @@ class be {
1963
1970
  value: this.getItemValue(t, e),
1964
1971
  field: e,
1965
1972
  fieldValue: this.getItemValue(t, e)
1966
- }, f = new ue(l).validate(c);
1973
+ }, f = new ue(l).validate(h);
1967
1974
  this.setValidationError(t, e, f), i(f);
1968
1975
  } else
1969
1976
  this.clearValidationError(t, e), i([]);
@@ -1986,7 +1993,7 @@ class be {
1986
1993
  value: r,
1987
1994
  colIndex: a,
1988
1995
  relationRowKeys: l,
1989
- relationColKeys: c,
1996
+ relationColKeys: h,
1990
1997
  rowspan: d,
1991
1998
  height: f,
1992
1999
  width: x,
@@ -2013,7 +2020,7 @@ class be {
2013
2020
  }
2014
2021
  ]
2015
2022
  };
2016
- let w = e, E = e, p = a, C = a, b = [], y = 0, R = 0, S = 0, O = 0;
2023
+ let w = e, E = e, p = a, y = a, b = [], C = 0, R = 0, S = 0, O = 0;
2017
2024
  if (d !== 1 && g) {
2018
2025
  O = x;
2019
2026
  const v = l.reduce((I, _) => {
@@ -2042,7 +2049,7 @@ class be {
2042
2049
  }
2043
2050
  for (let I = w; I < e; I++) {
2044
2051
  const { height: _ } = this.positions[I];
2045
- y += _;
2052
+ C += _;
2046
2053
  }
2047
2054
  for (let I = w; I <= E; I++) {
2048
2055
  const { height: _ } = this.positions[I];
@@ -2063,7 +2070,7 @@ class be {
2063
2070
  if (!I)
2064
2071
  break;
2065
2072
  const _ = this.getItemValue(s, i), T = this.getItemValue(s, I.key);
2066
- if (_ === T && c.includes(I.key))
2073
+ if (_ === T && h.includes(I.key))
2067
2074
  p = v;
2068
2075
  else
2069
2076
  break;
@@ -2073,8 +2080,8 @@ class be {
2073
2080
  if (!I)
2074
2081
  break;
2075
2082
  const _ = this.getItemValue(s, i), T = this.getItemValue(s, I.key);
2076
- if (_ === T && c.includes(I.key))
2077
- C = v;
2083
+ if (_ === T && h.includes(I.key))
2084
+ y = v;
2078
2085
  else
2079
2086
  break;
2080
2087
  }
@@ -2084,7 +2091,7 @@ class be {
2084
2091
  break;
2085
2092
  R += I.width || 100;
2086
2093
  }
2087
- for (let v = p; v <= C; v++) {
2094
+ for (let v = p; v <= y; v++) {
2088
2095
  const I = this.getColumnByColIndex(v);
2089
2096
  if (!I)
2090
2097
  break;
@@ -2097,13 +2104,13 @@ class be {
2097
2104
  }
2098
2105
  }
2099
2106
  return {
2100
- xArr: [p, C],
2107
+ xArr: [p, y],
2101
2108
  yArr: [w, E],
2102
2109
  rowspan: d,
2103
2110
  colspan: u,
2104
2111
  height: S,
2105
2112
  width: O,
2106
- offsetTop: y,
2113
+ offsetTop: C,
2107
2114
  offsetLeft: R,
2108
2115
  dataList: b
2109
2116
  };
@@ -2112,7 +2119,7 @@ class be {
2112
2119
  const s = `${t}​_${e}`, o = this.getRowForRowKey(t), r = o == null ? void 0 : o.rowIndex, a = this.getColumnByKey(e);
2113
2120
  if (!t || !a || !o)
2114
2121
  return;
2115
- const l = this.getItemValue(t, e), c = [
2122
+ const l = this.getItemValue(t, e), h = [
2116
2123
  {
2117
2124
  key: e,
2118
2125
  rowKey: t,
@@ -2126,7 +2133,7 @@ class be {
2126
2133
  fieldValue: l
2127
2134
  }
2128
2135
  ];
2129
- this.validationErrorMap.set(s, c);
2136
+ this.validationErrorMap.set(s, h);
2130
2137
  }
2131
2138
  setValidationError(t, e, i) {
2132
2139
  const s = `${t}​_${e}`;
@@ -2229,10 +2236,10 @@ class be {
2229
2236
  const e = (s, o = {}) => {
2230
2237
  s.forEach((r) => {
2231
2238
  r.children && r.children.length > 0 && e(r.children, o);
2232
- const a = (l, c) => {
2239
+ const a = (l, h) => {
2233
2240
  var f, x;
2234
2241
  const d = (f = this.customHeader[l]) == null ? void 0 : f[r.key];
2235
- d !== void 0 && d !== c && (o[l] || (o[l] = {}), o[l][r.key] = d, l === "fixedData" && !d && !c && ((x = o[l]) == null || delete x[r.key]));
2242
+ d !== void 0 && d !== h && (o[l] || (o[l] = {}), o[l][r.key] = d, l === "fixedData" && !d && !h && ((x = o[l]) == null || delete x[r.key]));
2236
2243
  };
2237
2244
  a("fixedData", r.fixed), a("sortData", r.sort), a("hideData", r.hide), a("resizableData", r.width);
2238
2245
  });
@@ -2459,21 +2466,21 @@ class _e {
2459
2466
  * @param {string} color - 阴影的颜色
2460
2467
  */
2461
2468
  drawShadow(t, e, i, s, o) {
2462
- const { fillColor: r, side: a, shadowWidth: l, colorStart: c, colorEnd: d } = o;
2469
+ const { fillColor: r, side: a, shadowWidth: l, colorStart: h, colorEnd: d } = o;
2463
2470
  this.ctx.save(), r && (this.ctx.fillStyle = r, this.ctx.fillRect(t, e, i, s));
2464
2471
  let f;
2465
2472
  switch (a) {
2466
2473
  case "left":
2467
- f = this.ctx.createLinearGradient(t - l, e, t, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t - l, e, l, s);
2474
+ f = this.ctx.createLinearGradient(t - l, e, t, e), f.addColorStop(0, h), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t - l, e, l, s);
2468
2475
  break;
2469
2476
  case "right":
2470
- f = this.ctx.createLinearGradient(t + i, e, t + i + l, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t + i, e, l, s);
2477
+ f = this.ctx.createLinearGradient(t + i, e, t + i + l, e), f.addColorStop(0, h), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t + i, e, l, s);
2471
2478
  break;
2472
2479
  case "top":
2473
- f = this.ctx.createLinearGradient(t, e - l, t, e), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e - l, i, l);
2480
+ f = this.ctx.createLinearGradient(t, e - l, t, e), f.addColorStop(0, h), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e - l, i, l);
2474
2481
  break;
2475
2482
  case "bottom":
2476
- f = this.ctx.createLinearGradient(t, e + s, t, e + s + l), f.addColorStop(0, c), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e + s, i, l);
2483
+ f = this.ctx.createLinearGradient(t, e + s, t, e + s + l), f.addColorStop(0, h), f.addColorStop(1, d), this.ctx.fillStyle = f, this.ctx.fillRect(t, e + s, i, l);
2477
2484
  break;
2478
2485
  default:
2479
2486
  console.error("Invalid side specified for shadow");
@@ -2499,8 +2506,8 @@ class _e {
2499
2506
  if (this.ctx.save(), this.ctx.beginPath(), a !== void 0 && (this.ctx.fillStyle = a), r !== void 0 && (this.ctx.lineWidth = o, this.ctx.strokeStyle = r), l === 0)
2500
2507
  this.ctx.rect(t - 0.5, e - 0.5, i, s);
2501
2508
  else {
2502
- const [c, d, f, x] = typeof l == "number" ? [l, l, l, l] : l;
2503
- this.ctx.moveTo(t + c, e), this.ctx.arcTo(t + i, e, t + i, e + d, d), this.ctx.arcTo(t + i, e + s, t + i - f, e + s, f), this.ctx.arcTo(t, e + s, t, e + s - x, x), this.ctx.arcTo(t, e, t + c, e, c);
2509
+ const [h, d, f, x] = typeof l == "number" ? [l, l, l, l] : l;
2510
+ this.ctx.moveTo(t + h, e), this.ctx.arcTo(t + i, e, t + i, e + d, d), this.ctx.arcTo(t + i, e + s, t + i - f, e + s, f), this.ctx.arcTo(t, e + s, t, e + s - x, x), this.ctx.arcTo(t, e, t + h, e, h);
2504
2511
  }
2505
2512
  a !== void 0 && this.ctx.fill(), r !== void 0 && this.ctx.stroke(), this.ctx.restore();
2506
2513
  }
@@ -2520,7 +2527,7 @@ class _e {
2520
2527
  const {
2521
2528
  font: a = "12px Arial",
2522
2529
  align: l = "center",
2523
- color: c = "#495060",
2530
+ color: h = "#495060",
2524
2531
  padding: d = 0,
2525
2532
  verticalAlign: f = "middle",
2526
2533
  maxLineClamp: x = 1,
@@ -2528,29 +2535,29 @@ class _e {
2528
2535
  offsetLeft: g = 0,
2529
2536
  offsetRight: m = 0
2530
2537
  } = r;
2531
- if (this.ctx.font = a, this.ctx.fillStyle = c, this.ctx.textAlign = l, ["", null, void 0].includes(t))
2538
+ if (this.ctx.font = a, this.ctx.fillStyle = h, this.ctx.textAlign = l, ["", null, void 0].includes(t))
2532
2539
  return this.ctx.restore(), !1;
2533
2540
  const E = parseInt(((I = a.match(/\d+/)) == null ? void 0 : I[0]) || "12") * (r.lineHeight || 1.2), p = s - d * 2 - g - m;
2534
- let C = !1;
2541
+ let y = !1;
2535
2542
  const b = Math.round((o - 2 * d) / E);
2536
- let y = this.wrapText(t, p, r.cacheTextKey), R = Math.min(y.length, Math.max(b, 1));
2537
- x === "auto" && u ? R = y.length : typeof x == "number" && x < R && x !== 1 ? R = x : (x === 1 && (y = [t], R = 1), x === "auto" && b === 1 && (y = [t], R = 1));
2543
+ let C = this.wrapText(t, p, r.cacheTextKey), R = Math.min(C.length, Math.max(b, 1));
2544
+ x === "auto" && u ? R = C.length : typeof x == "number" && x < R && x !== 1 ? R = x : (x === 1 && (C = [t], R = 1), x === "auto" && b === 1 && (C = [t], R = 1));
2538
2545
  let S = i + d;
2539
2546
  const O = Math.round(R * E);
2540
2547
  f === "middle" ? S = i + (o - O) / 2 : f === "bottom" && (S = i + o - O - d);
2541
2548
  let v = e + d + g;
2542
2549
  l === "center" ? v = e + s / 2 : l === "right" && (v = e + s - d - m);
2543
- for (let _ = 0; _ < y.length; _++) {
2544
- const T = y[_], M = S + _ * E;
2550
+ for (let _ = 0; _ < C.length; _++) {
2551
+ const T = C[_], M = S + _ * E;
2545
2552
  if (this.ctx.textBaseline = "top", _ === R - 1) {
2546
- const A = y.slice(_).join(""), { _text: H, ellipsis: D } = this.handleEllipsis(A, s, d, a);
2547
- this.ctx.fillText(H, v, M), C = D;
2553
+ const A = C.slice(_).join(""), { _text: H, ellipsis: D } = this.handleEllipsis(A, s, d, a);
2554
+ this.ctx.fillText(H, v, M), y = D;
2548
2555
  break;
2549
2556
  }
2550
2557
  this.ctx.fillText(T, v, M);
2551
2558
  }
2552
- if (r.textCallback && y.length) {
2553
- const _ = y.reduce((H, D) => Math.max(H, this.ctx.measureText(D).width), 0), T = Math.round(_);
2559
+ if (r.textCallback && C.length) {
2560
+ const _ = C.reduce((H, D) => Math.max(H, this.ctx.measureText(D).width), 0), T = Math.round(_);
2554
2561
  let M = v, L = v + T;
2555
2562
  l === "center" ? (M = v - T / 2, L = v + T / 2) : l === "right" && (M = v - T, L = v);
2556
2563
  const A = {
@@ -2565,7 +2572,7 @@ class _e {
2565
2572
  };
2566
2573
  r.textCallback(A);
2567
2574
  }
2568
- return this.ctx.restore(), C;
2575
+ return this.ctx.restore(), y;
2569
2576
  }
2570
2577
  /**
2571
2578
  * 将文本按宽度换行
@@ -2585,12 +2592,12 @@ class _e {
2585
2592
  continue;
2586
2593
  }
2587
2594
  const l = a.split("");
2588
- let c = "";
2595
+ let h = "";
2589
2596
  for (const d of l) {
2590
- const f = c + d;
2591
- this.ctx.measureText(f).width <= e ? c = f : c ? (s.push(c), c = d) : (s.push(d), c = "");
2597
+ const f = h + d;
2598
+ this.ctx.measureText(f).width <= e ? h = f : h ? (s.push(h), h = d) : (s.push(d), h = "");
2592
2599
  }
2593
- c && s.push(c);
2600
+ h && s.push(h);
2594
2601
  }
2595
2602
  const r = s.length > 0 ? s : [""];
2596
2603
  return i && this.textCacheMap.set(i, r), r;
@@ -2610,10 +2617,10 @@ class _e {
2610
2617
  align: r = "center",
2611
2618
  color: a = "#495060",
2612
2619
  maxLineClamp: l = 1,
2613
- cacheTextKey: c = ""
2620
+ cacheTextKey: h = ""
2614
2621
  } = i;
2615
2622
  this.ctx.save(), this.ctx.font = s, this.ctx.fillStyle = a, this.ctx.textAlign = r;
2616
- const d = parseInt(((m = s.match(/\d+/)) == null ? void 0 : m[0]) || "12"), f = d * (i.lineHeight || 1.2), x = e - o * 2, u = this.wrapText(t, x, c);
2623
+ const d = parseInt(((m = s.match(/\d+/)) == null ? void 0 : m[0]) || "12"), f = d * (i.lineHeight || 1.2), x = e - o * 2, u = this.wrapText(t, x, h);
2617
2624
  let g = 1;
2618
2625
  return l === "auto" ? g = u.length : u.length > l ? g = l : g = u.length, this.ctx.restore(), Math.max(Math.floor(g * f + o * 2), Math.floor(d + o * 2));
2619
2626
  }
@@ -2631,12 +2638,12 @@ class _e {
2631
2638
  _text: "",
2632
2639
  ellipsis: !0
2633
2640
  };
2634
- const l = this.ctx.measureText(t).width, c = e - i * 2;
2635
- if (l && l >= c) {
2641
+ const l = this.ctx.measureText(t).width, h = e - i * 2;
2642
+ if (l && l >= h) {
2636
2643
  o = !0;
2637
2644
  let d = 0;
2638
2645
  for (let f = 0; f < t.length; f++)
2639
- if (d += this.ctx.measureText(t[f]).width, d >= c - a) {
2646
+ if (d += this.ctx.measureText(t[f]).width, d >= h - a) {
2640
2647
  r = t.slice(0, f) + "...", o = !0;
2641
2648
  break;
2642
2649
  }
@@ -2678,6 +2685,8 @@ class Nt {
2678
2685
  n(this, "EMPTY_BODY_HEIGHT", 120);
2679
2686
  /** 自定义空样式 */
2680
2687
  n(this, "EMPTY_CUSTOM_STYLE", {});
2688
+ /** 数字类型错误提示 */
2689
+ n(this, "NUMBER_ERROR_TIP", "只允许输入数字");
2681
2690
  /** 空数据文本 */
2682
2691
  n(this, "EMPTY_TEXT", "暂无数据");
2683
2692
  /** 加载文本 */
@@ -3004,7 +3013,7 @@ class Nt {
3004
3013
  let t = {};
3005
3014
  Object.keys(this).forEach((e) => {
3006
3015
  if (e.endsWith("_COLOR") || e.endsWith("_FONT")) {
3007
- const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s = Ce(i);
3016
+ const i = `--evt-${e.toLocaleLowerCase().replace(/_/g, "-")}`, s = ye(i);
3008
3017
  s && (t[e] = s);
3009
3018
  }
3010
3019
  }), Object.assign(this, t, this._config);
@@ -3138,22 +3147,22 @@ class Oe {
3138
3147
  }
3139
3148
  async createImageFromSVG(t, e, i = !1) {
3140
3149
  const r = new DOMParser().parseFromString(t, "image/svg+xml").documentElement;
3141
- e && r.querySelectorAll("*").forEach((c) => {
3142
- const d = c.getAttribute("fill");
3143
- (d === "currentColor" || d === null) && c.setAttribute("fill", e);
3150
+ e && r.querySelectorAll("*").forEach((h) => {
3151
+ const d = h.getAttribute("fill");
3152
+ (d === "currentColor" || d === null) && h.setAttribute("fill", e);
3144
3153
  });
3145
3154
  const a = new Image();
3146
3155
  let l = "";
3147
3156
  if (i) {
3148
- const c = new Blob([new XMLSerializer().serializeToString(r)], {
3157
+ const h = new Blob([new XMLSerializer().serializeToString(r)], {
3149
3158
  type: "image/svg+xml"
3150
3159
  });
3151
- l = URL.createObjectURL(c);
3160
+ l = URL.createObjectURL(h);
3152
3161
  } else
3153
3162
  l = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(r));
3154
- return a.src = l, new Promise((c, d) => {
3163
+ return a.src = l, new Promise((h, d) => {
3155
3164
  a.onerror = () => d(new Error("Failed to load image:" + t)), a.onload = () => {
3156
- c(a);
3165
+ h(a);
3157
3166
  };
3158
3167
  });
3159
3168
  }
@@ -3246,7 +3255,7 @@ class mt extends qt {
3246
3255
  const { HEADER_CELL_STYLE_METHOD: e, HEADER_BG_COLOR: i, HEADER_TEXT_COLOR: s } = this.ctx.config;
3247
3256
  let o = i, r = s;
3248
3257
  if (typeof e == "function") {
3249
- const c = e, { backgroundColor: d, color: f, font: x } = c({
3258
+ const h = e, { backgroundColor: d, color: f, font: x } = h({
3250
3259
  colIndex: this.colIndex,
3251
3260
  column: this.column
3252
3261
  }) || {};
@@ -3326,8 +3335,8 @@ class mt extends qt {
3326
3335
  const { indeterminate: e, check: i, selectable: s } = this.ctx.database.getCheckedState(), { CHECKBOX_SIZE: o = 0, CELL_PADDING: r } = this.ctx.config;
3327
3336
  let a = this.drawX + (this.width - o) / 2, l = this.drawY + (this.height - o) / 2;
3328
3337
  this.drawTextX = a + o - r / 2, this.drawTextWidth = this.drawX + this.visibleWidth - this.drawTextX, (this.align === "left" || this.align === "right") && (a = this.drawX + r, this.drawTextX = a + o - r / 2, this.drawTextWidth = this.drawX + this.visibleWidth - this.drawTextX), this.verticalAlign === "top" ? l = this.drawY + r / 2 : this.verticalAlign === "bottom" && (l = this.drawY + this.height - o - r / 2);
3329
- let c = this.ctx.icons.get("checkbox-uncheck"), d = "checkbox-uncheck";
3330
- e ? (c = this.ctx.icons.get("checkbox-indeterminate"), d = "checkbox-indeterminate") : i && s ? (c = this.ctx.icons.get("checkbox-check"), d = "checkbox-check") : i && !s ? (c = this.ctx.icons.get("checkbox-check-disabled"), d = "checkbox-check-disabled") : !i && s ? (c = this.ctx.icons.get("checkbox-uncheck"), d = "checkbox-uncheck") : (c = this.ctx.icons.get("checkbox-disabled"), d = "checkbox-disabled"), c && (this.drawSelectionImageX = a, this.drawSelectionImageY = l, this.drawSelectionImageWidth = o, this.drawSelectionImageHeight = o, this.drawSelectionImageName = d, this.drawSelectionImageSource = c, this.ctx.paint.drawImage(
3338
+ let h = this.ctx.icons.get("checkbox-uncheck"), d = "checkbox-uncheck";
3339
+ e ? (h = this.ctx.icons.get("checkbox-indeterminate"), d = "checkbox-indeterminate") : i && s ? (h = this.ctx.icons.get("checkbox-check"), d = "checkbox-check") : i && !s ? (h = this.ctx.icons.get("checkbox-check-disabled"), d = "checkbox-check-disabled") : !i && s ? (h = this.ctx.icons.get("checkbox-uncheck"), d = "checkbox-uncheck") : (h = this.ctx.icons.get("checkbox-disabled"), d = "checkbox-disabled"), h && (this.drawSelectionImageX = a, this.drawSelectionImageY = l, this.drawSelectionImageWidth = o, this.drawSelectionImageHeight = o, this.drawSelectionImageName = d, this.drawSelectionImageSource = h, this.ctx.paint.drawImage(
3331
3340
  this.drawSelectionImageSource,
3332
3341
  this.drawSelectionImageX,
3333
3342
  this.drawSelectionImageY,
@@ -3391,14 +3400,16 @@ class Le {
3391
3400
  attributeFilter: ["class"]
3392
3401
  // ✅ 只监听 class 更改
3393
3402
  }), this.ctx.on("mousedown", (t) => {
3394
- if (t.button !== 0 || this.isBusy(t))
3403
+ if (this.isBusy(t))
3395
3404
  return;
3396
- const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = e, o = i;
3397
- this.handleHeaderEvent(o, s, this.ctx.header.renderCellHeaders, (r) => {
3398
- this.ctx.focusCellHeader = r, this.ctx.focusCell = void 0, this.ctx.emit("cellHeaderMousedown", r, t);
3399
- }), this.handleBodyEvent(o, s, this.ctx.body.renderRows, (r) => {
3400
- this.ctx.setFocusCell(r), this.ctx.focusCellHeader = void 0, this.ctx.emit("cellMousedown", r, t);
3401
- });
3405
+ const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = e, o = i, {
3406
+ body: { height: r, visibleHeight: a, visibleWidth: l, y: h }
3407
+ } = this.ctx, d = Math.min(r, a);
3408
+ o > 0 && o < l && s > h && s < h + d || this.ctx.emit("mousedownBodyOutside", t), t.button === 0 && (this.handleHeaderEvent(o, s, this.ctx.header.renderCellHeaders, (x) => {
3409
+ this.ctx.focusCellHeader = x, this.ctx.focusCell = void 0, this.ctx.emit("cellHeaderMousedown", x, t);
3410
+ }), this.handleBodyEvent(o, s, this.ctx.body.renderRows, (x) => {
3411
+ this.ctx.setFocusCell(x), this.ctx.focusCellHeader = void 0, this.ctx.emit("cellMousedown", x, t);
3412
+ }));
3402
3413
  }), this.ctx.on("mouseup", (t) => {
3403
3414
  if (t.button !== 0 || this.isBusy(t))
3404
3415
  return;
@@ -3518,8 +3529,8 @@ class Le {
3518
3529
  t.drawTreeImageHeight
3519
3530
  ))
3520
3531
  return;
3521
- const l = this.ctx.database.getRowForRowKey(t.rowKey), { expand: c = !1, expandLazy: d = !1 } = l || {}, { EXPAND_LAZY: f, EXPAND_LAZY_METHOD: x } = this.ctx.config;
3522
- if (f && x && !c && !d)
3532
+ const l = this.ctx.database.getRowForRowKey(t.rowKey), { expand: h = !1, expandLazy: d = !1 } = l || {}, { EXPAND_LAZY: f, EXPAND_LAZY_METHOD: x } = this.ctx.config;
3533
+ if (f && x && !h && !d)
3523
3534
  typeof x == "function" && (this.ctx.database.expandLoading(t.rowKey, !0), x({
3524
3535
  row: t.row,
3525
3536
  rowIndex: t.rowIndex,
@@ -3633,13 +3644,13 @@ class Le {
3633
3644
  for (const r of i) {
3634
3645
  const a = r.fixedCells.concat(r.noFixedCells);
3635
3646
  for (const l of a) {
3636
- const c = l.getDrawX(), d = l.getDrawY();
3647
+ const h = l.getDrawX(), d = l.getDrawY();
3637
3648
  if (o) {
3638
- if (t > c && t < c + l.visibleWidth && e > d && e < d + l.visibleHeight) {
3649
+ if (t > h && t < h + l.visibleWidth && e > d && e < d + l.visibleHeight) {
3639
3650
  s(l);
3640
3651
  return;
3641
3652
  }
3642
- } else if (t > c && t < c + l.width && e > d && e < d + l.height) {
3653
+ } else if (t > h && t < h + l.width && e > d && e < d + l.height) {
3643
3654
  s(l);
3644
3655
  return;
3645
3656
  }
@@ -3659,13 +3670,13 @@ class Le {
3659
3670
  for (const r of i) {
3660
3671
  const a = r.fixedCells.concat(r.noFixedCells);
3661
3672
  for (const l of a) {
3662
- const c = l.getDrawX(), d = l.getDrawY();
3673
+ const h = l.getDrawX(), d = l.getDrawY();
3663
3674
  if (o) {
3664
- if (t > c && t < c + l.visibleWidth && e > d && e < d + l.visibleHeight) {
3675
+ if (t > h && t < h + l.visibleWidth && e > d && e < d + l.visibleHeight) {
3665
3676
  s(l);
3666
3677
  return;
3667
3678
  }
3668
- } else if (t > c && t < c + l.width && e > d && e < d + l.height) {
3679
+ } else if (t > h && t < h + l.width && e > d && e < d + l.height) {
3669
3680
  s(l);
3670
3681
  return;
3671
3682
  }
@@ -3823,10 +3834,10 @@ class Me {
3823
3834
  overlayerElement: r,
3824
3835
  editorElement: a,
3825
3836
  emptyElement: l,
3826
- loadingElement: c,
3837
+ loadingElement: h,
3827
3838
  contextMenuElement: d
3828
3839
  } = t;
3829
- this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = l, this.loadingElement = c, this.contextMenuElement = d, this.config = new Nt(e.config || {}), this.eventBus = new Re(), this.eventBrowser = new Ie(this), this.eventTable = new Le(this), this.paint = new _e(this.canvasElement), this.database = new be(this, e), this.history = new ve(this), this.icons = new Oe(this);
3840
+ this.containerElement = i, s.tabIndex = 0, this.stageElement = s, this.canvasElement = o, this.overlayerElement = r, this.editorElement = a, this.emptyElement = l, this.loadingElement = h, this.contextMenuElement = d, this.config = new Nt(e.config || {}), this.eventBus = new Re(), this.eventBrowser = new Ie(this), this.eventTable = new Le(this), this.paint = new _e(this.canvasElement), this.database = new be(this, e), this.history = new ve(this), this.icons = new Oe(this);
3830
3841
  }
3831
3842
  setConfig(t) {
3832
3843
  this.config = new Nt(t);
@@ -3835,8 +3846,8 @@ class Me {
3835
3846
  if (this.config.ENABLE_MERGE_CELL_LINK) {
3836
3847
  const a = this.database.getVirtualBodyCellByKey(t, e);
3837
3848
  if (a && (a.mergeRow || a.mergeCol)) {
3838
- const { dataList: l } = a.getSpanInfo(), c = l.map((d) => ({ ...d, value: i }));
3839
- this.database.batchSetItemValue(c, s, r);
3849
+ const { dataList: l } = a.getSpanInfo(), h = l.map((d) => ({ ...d, value: i }));
3850
+ this.database.batchSetItemValue(h, s, r);
3840
3851
  return;
3841
3852
  }
3842
3853
  }
@@ -3850,7 +3861,7 @@ class Me {
3850
3861
  if (r === void 0 || a === void 0) return;
3851
3862
  const l = this.database.getVirtualBodyCell(r, a);
3852
3863
  if (l) {
3853
- const { dataList: c } = l.getSpanInfo(), d = c.map((f) => ({ ...f, value: o.value }));
3864
+ const { dataList: h } = l.getSpanInfo(), d = h.map((f) => ({ ...f, value: o.value }));
3854
3865
  s.push(...d);
3855
3866
  }
3856
3867
  }), this.database.batchSetItemValue(s, e, i);
@@ -3895,7 +3906,7 @@ class Me {
3895
3906
  for (let o = 0; o <= e[1] - e[0]; o++) {
3896
3907
  const r = [];
3897
3908
  for (let a = 0; a <= i[1] - i[0]; a++) {
3898
- const l = o + e[0], c = a + i[0], d = this.database.getVirtualBodyCell(l, c);
3909
+ const l = o + e[0], h = a + i[0], d = this.database.getVirtualBodyCell(l, h);
3899
3910
  d && (d.selectorCellValueType === "displayText" ? r.push(d.displayText) : r.push(d.getValue()));
3900
3911
  }
3901
3912
  s += `${r.join(" ")}\r`, t.push(r);
@@ -4049,21 +4060,21 @@ class Xt {
4049
4060
  stageHeight: i,
4050
4061
  stageWidth: s,
4051
4062
  config: { SCROLLER_TRACK_SIZE: o = 0, SCROLLER_SIZE: r = 0, BORDER: a }
4052
- } = this.ctx, l = s, c = i, d = e.height, f = e.width, x = t.height, u = this.ctx.footer.height;
4063
+ } = this.ctx, l = s, h = i, d = e.height, f = e.width, x = t.height, u = this.ctx.footer.height;
4053
4064
  if (this.type === "vertical") {
4054
- this.visibleDistance = c - o - d, this.distance = x - this.visibleDistance + u, this.trackX = l - o, this.trackY = 0, this.splitPoints = [this.trackX, d, this.trackX + o, d], this.trackWidth = o, this.trackHeight = c, this.barX = this.trackX - 1 + (o - r) / 2, this.barWidth = r;
4065
+ this.visibleDistance = h - o - d, this.distance = x - this.visibleDistance + u, this.trackX = l - o, this.trackY = 0, this.splitPoints = [this.trackX, d, this.trackX + o, d], this.trackWidth = o, this.trackHeight = h, this.barX = this.trackX - 1 + (o - r) / 2, this.barWidth = r;
4055
4066
  const g = this.distance ? this.visibleDistance / (x + u) : 0;
4056
4067
  let m = Math.floor(g * this.visibleDistance);
4057
4068
  m < 30 ? m = 30 : m > this.visibleDistance && (m = 0), this.barHeight = m, this.barY = d + this.scroll / this.distance * (this.visibleDistance - this.barHeight), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
4058
4069
  } else {
4059
4070
  this.visibleDistance = l - o, this.distance = f - this.visibleDistance, this.splitPoints = [
4060
4071
  l - o,
4061
- c - o,
4072
+ h - o,
4062
4073
  l - o,
4063
- c
4074
+ h
4064
4075
  ];
4065
4076
  const g = a ? 0 : 0.5;
4066
- this.trackX = 0, this.trackY = c - o + g, this.trackWidth = l, this.trackHeight = o;
4077
+ this.trackX = 0, this.trackY = h - o + g, this.trackWidth = l, this.trackHeight = o;
4067
4078
  const m = this.distance ? this.visibleDistance / f : 0;
4068
4079
  let w = Math.floor(m * this.visibleDistance);
4069
4080
  this.barY = this.trackY - 1 + (o - r) / 2, w < 30 ? w = 30 : w >= this.visibleDistance && (w = 0), this.barWidth = w, this.barHeight = r, this.barX = this.scroll / this.distance * (this.visibleDistance - this.barWidth), this.scroll = Math.max(0, Math.min(this.scroll, this.distance));
@@ -4181,19 +4192,19 @@ class Ae {
4181
4192
  let s = "", o = "";
4182
4193
  if (((r = this.ctx.focusCell) == null ? void 0 : r.fixed) !== "left" && e < this.ctx.fixedLeftWidth ? s = "left" : ((a = this.ctx.focusCell) == null ? void 0 : a.fixed) !== "right" && e > this.ctx.body.visibleWidth - this.ctx.fixedRightWidth ? s = "right" : (s = "", this.stopAdjustPosition(!0, !1)), !this.mousedownHeader && i < this.ctx.header.visibleHeight ? o = "top" : i > this.ctx.header.visibleHeight + this.ctx.body.visibleHeight ? o = "bottom" : (o = "", this.stopAdjustPosition(!1, !0)), s && this.adjustPositionX !== s) {
4183
4194
  this.adjustPositionX = s;
4184
- let c = 10 * (s === "left" ? -1 : 1);
4195
+ let h = 10 * (s === "left" ? -1 : 1);
4185
4196
  this.timerX && (clearInterval(this.timerX), this.timerX = 0), this.timerX = setInterval(() => {
4186
- c *= 1.5;
4187
- const { scrollX: d } = this.ctx, f = d + c;
4197
+ h *= 1.5;
4198
+ const { scrollX: d } = this.ctx, f = d + h;
4188
4199
  (f < 0 || f > this.ctx.body.width) && (clearInterval(this.timerX), this.timerX = 0), this.ctx.setScrollX(f);
4189
4200
  }, 100);
4190
4201
  }
4191
4202
  if (o && this.adjustPositionY !== o) {
4192
4203
  this.adjustPositionY = o;
4193
- let c = 10 * (o === "top" ? -1 : 1);
4204
+ let h = 10 * (o === "top" ? -1 : 1);
4194
4205
  this.timerY && (clearInterval(this.timerY), this.timerY = 0), this.timerY = setInterval(() => {
4195
- c *= 1.5;
4196
- const { scrollY: d } = this.ctx, f = d + c;
4206
+ h *= 1.5;
4207
+ const { scrollY: d } = this.ctx, f = d + h;
4197
4208
  (f < 0 || f > this.ctx.body.height) && (clearInterval(this.timerY), this.timerY = 0), this.ctx.setScrollY(f);
4198
4209
  }, 100);
4199
4210
  }
@@ -4225,8 +4236,8 @@ class He {
4225
4236
  this.root.splice(r, 1);
4226
4237
  const l = this.findNodeWithParent(this.root, e[this.key]);
4227
4238
  if (!l) throw new Error("Target node not found");
4228
- const { parent: c, index: d } = l;
4229
- i === "before" ? c ? c[this.childrenKey].splice(d, 0, a) : this.root.splice(d, 0, a) : i === "after" && (c ? c[this.childrenKey].splice(d + 1, 0, a) : this.root.splice(d + 1, 0, a));
4239
+ const { parent: h, index: d } = l;
4240
+ i === "before" ? h ? h[this.childrenKey].splice(d, 0, a) : this.root.splice(d, 0, a) : i === "after" && (h ? h[this.childrenKey].splice(d + 1, 0, a) : this.root.splice(d + 1, 0, a));
4230
4241
  }
4231
4242
  /** 在树中找到节点及其父节点 */
4232
4243
  findNodeWithParent(t, e, i = null) {
@@ -4319,8 +4330,8 @@ class De {
4319
4330
  const f = Math.floor(l / this.resizeNum * 100) / 100;
4320
4331
  this.resizeAllColumn(f);
4321
4332
  }
4322
- const c = this.fixedLeftCellHeaders.filter((f) => !f.hasChildren);
4323
- this.ctx.fixedLeftWidth = c.reduce((f, x) => f + x.width, 0);
4333
+ const h = this.fixedLeftCellHeaders.filter((f) => !f.hasChildren);
4334
+ this.ctx.fixedLeftWidth = h.reduce((f, x) => f + x.width, 0);
4324
4335
  const d = this.fixedRightCellHeaders.filter((f) => !f.hasChildren);
4325
4336
  this.ctx.fixedRightWidth = d.reduce((f, x) => f + x.width, i), this.ctx.maxColIndex = this.leafCellHeaders.length - 1, this.ctx.header.x = this.x, this.ctx.header.y = this.y, this.ctx.header.width = this.width, this.ctx.header.height = this.height, this.ctx.header.allCellHeaders = this.allCellHeaders, this.ctx.header.visibleWidth = this.visibleWidth, this.ctx.header.visibleHeight = this.visibleHeight;
4326
4337
  }
@@ -4350,9 +4361,9 @@ class De {
4350
4361
  this.ctx.stageElement.style.cursor === "col-resize" && (this.ctx.stageElement.style.cursor = "default");
4351
4362
  const s = [...this.renderFixedCellHeaders, ...this.renderCenterCellHeaders];
4352
4363
  for (const o of s) {
4353
- const { offsetX: r, offsetY: a } = this.ctx.getOffset(t), l = r, c = a, d = o.getDrawX(), f = o.getDrawY();
4364
+ const { offsetX: r, offsetY: a } = this.ctx.getOffset(t), l = r, h = a, d = o.getDrawX(), f = o.getDrawY();
4354
4365
  if (l > d + o.width - 5 && l < d + o.width + 4 && l < e - 4 && // 视窗中最后一列不允许调整宽
4355
- c > f) {
4366
+ h > f) {
4356
4367
  const x = o.colIndex + o.colspan - 1, u = this.leafCellHeaders.find((g) => g.colIndex === x);
4357
4368
  if (!u || !u.fixed && this.ctx.stageWidth - this.ctx.fixedRightWidth < d + o.width)
4358
4369
  return;
@@ -4370,7 +4381,7 @@ class De {
4370
4381
  }), this.ctx.on("mouseup", () => {
4371
4382
  if (this.ctx.config.ENABLE_DRAG_COLUMN) {
4372
4383
  if (this.dragingCell && this.dragTarget) {
4373
- const t = (c, d = {}) => (c.forEach((f, x) => {
4384
+ const t = (h, d = {}) => (h.forEach((f, x) => {
4374
4385
  f.children && t(f.children, d), d[f.key] = x;
4375
4386
  }), d), e = this.ctx.database.getColumns(), i = rt(e, ot(e)), s = new He(i, {
4376
4387
  key: "key",
@@ -4475,10 +4486,10 @@ class De {
4475
4486
  let s = e;
4476
4487
  const { HEADER_HEIGHT: o = 0 } = this.ctx.config;
4477
4488
  for (let r = 0; r < i; r++) {
4478
- const a = t[r], l = o * (a.rowspan || 0), c = o * (a.level || 0);
4489
+ const a = t[r], l = o * (a.rowspan || 0), h = o * (a.level || 0);
4479
4490
  let { minWidth: d, maxWidth: f } = a, x = a.width || 100;
4480
4491
  d && x < d && (x = d), f && x > f && (x = f), a.children && (x = J(a.children).reduce((m, w) => m + ((w == null ? void 0 : w.width) || 100), 0));
4481
- const u = new mt(this.ctx, this.columnIndex, s, c, x, l, a);
4492
+ const u = new mt(this.ctx, this.columnIndex, s, h, x, l, a);
4482
4493
  this.ctx.database.setHeader(a.key, u), this.allCellHeaders.push(u), a.children || (this.leafCellHeaders.push(u), u.column.widthFillDisable || this.resizeNum++), a.fixed === "left" ? this.fixedLeftCellHeaders.push(u) : a.fixed === "right" ? this.fixedRightCellHeaders.push(u) : this.centerCellHeaders.push(u), !a.children && this.columnIndex++, a.children && this.render(a.children, s), s += x;
4483
4494
  }
4484
4495
  }
@@ -4492,8 +4503,8 @@ class De {
4492
4503
  RESIZE_COLUMN_TEXT_BG_COLOR: s,
4493
4504
  ENABLE_RESIZE_COLUMN_TEXT: o
4494
4505
  }
4495
- } = this.ctx, r = this.resizeTarget.getDrawX(), a = this.resizeTarget.width, l = r + a + this.resizeDiff - 0.5, c = [l - 0.5, 0, l - 0.5, t];
4496
- if (this.ctx.paint.drawLine(c, {
4506
+ } = this.ctx, r = this.resizeTarget.getDrawX(), a = this.resizeTarget.width, l = r + a + this.resizeDiff - 0.5, h = [l - 0.5, 0, l - 0.5, t];
4507
+ if (this.ctx.paint.drawLine(h, {
4497
4508
  borderColor: e
4498
4509
  }), o) {
4499
4510
  const f = `${Math.floor(a + this.resizeDiff)}px`, x = 45, u = 24;
@@ -4525,9 +4536,9 @@ class De {
4525
4536
  }
4526
4537
  ), this.dragingCell) {
4527
4538
  const { drawX: s, drawY: o, visibleWidth: r, colIndex: a } = this.dragingCell;
4528
- let l = s, c = o;
4539
+ let l = s, h = o;
4529
4540
  a > this.dragTarget.colIndex && (l = s + r), a === 0 && (l = l + 1), a === this.ctx.maxColIndex && (l = l - 1);
4530
- const d = [l, c, l, this.ctx.stageHeight], f = [l - 4, c, l + 4, c, l, c + 6, l - 4, c];
4541
+ const d = [l, h, l, this.ctx.stageHeight], f = [l - 4, h, l + 4, h, l, h + 6, l - 4, h];
4531
4542
  this.ctx.paint.drawLine(f, {
4532
4543
  borderColor: e,
4533
4544
  borderWidth: 1.2,
@@ -4696,7 +4707,7 @@ class Ne {
4696
4707
  SCROLLER_TRACK_SIZE: r = 0,
4697
4708
  HEIGHT: a,
4698
4709
  EMPTY_BODY_HEIGHT: l = 0,
4699
- MAX_HEIGHT: c = 0,
4710
+ MAX_HEIGHT: h = 0,
4700
4711
  ENABLE_OFFSET_HEIGHT: d = 0,
4701
4712
  OFFSET_HEIGHT: f = 0,
4702
4713
  FOOTER_POSITION: x
@@ -4712,15 +4723,15 @@ class Ne {
4712
4723
  let w = this.height + e.height + r;
4713
4724
  w += m;
4714
4725
  let E = w;
4715
- const p = window.innerHeight, { top: C } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
4716
- if (p > C && d && !a) {
4717
- const T = p - C - f;
4718
- T > e.height + r ? E = T : w > c && (E = c);
4719
- } else this.data.length && a ? E = a : this.data.length && c && w > c && (E = c);
4726
+ const p = window.innerHeight, { top: y } = this.containerRect || this.ctx.containerElement.getBoundingClientRect();
4727
+ if (p > y && d && !a) {
4728
+ const T = p - y - f;
4729
+ T > e.height + r ? E = T : w > h && (E = h);
4730
+ } else this.data.length && a ? E = a : this.data.length && h && w > h && (E = h);
4720
4731
  E > 0 && (this.ctx.stageHeight = Math.floor(E), this.ctx.stageElement.style.height = `${this.ctx.stageHeight}px`);
4721
4732
  let b = this.ctx.stageHeight - e.height - r;
4722
4733
  o ? this.visibleHeight = b - m : this.visibleHeight = b, this.data.length || (this.height = this.visibleHeight), this.ctx.body.x = this.x, this.ctx.body.y = this.y, this.ctx.body.width = this.width, this.ctx.body.height = this.height, this.ctx.body.visibleWidth = this.visibleWidth, this.ctx.body.visibleHeight = this.visibleHeight, this.ctx.body.data = u;
4723
- const y = window.devicePixelRatio || 1, R = this.ctx.stageWidth * y, S = this.ctx.stageHeight * y;
4734
+ const C = window.devicePixelRatio || 1, R = this.ctx.stageWidth * C, S = this.ctx.stageHeight * C;
4724
4735
  t.width = Math.round(R), t.height = Math.round(S);
4725
4736
  const O = this.data.length ? "not-empty" : "empty";
4726
4737
  this.ctx.emit("emptyChange", {
@@ -4732,8 +4743,8 @@ class Ne {
4732
4743
  width: this.width,
4733
4744
  height: this.data.length ? 0 : l + m
4734
4745
  });
4735
- const v = Math.round(t.width / y * 1e4) / 1e4, I = Math.round(t.height / y * 1e4) / 1e4;
4736
- this.ctx.canvasElement.setAttribute("style", `height:${I}px;width:${v}px;`), this.ctx.paint.scale(y);
4746
+ const v = Math.round(t.width / C * 1e4) / 1e4, I = Math.round(t.height / C * 1e4) / 1e4;
4747
+ this.ctx.canvasElement.setAttribute("style", `height:${I}px;width:${v}px;`), this.ctx.paint.scale(C);
4737
4748
  }
4738
4749
  // 调整行的高度
4739
4750
  initResizeRow() {
@@ -4752,12 +4763,12 @@ class Ne {
4752
4763
  const { offsetY: e, offsetX: i } = this.ctx.getOffset(t), s = e, o = i, r = t.clientY, {
4753
4764
  stageHeight: a,
4754
4765
  scrollY: l,
4755
- config: { RESIZE_ROW_MIN_HEIGHT: c = 0 }
4766
+ config: { RESIZE_ROW_MIN_HEIGHT: h = 0 }
4756
4767
  } = this.ctx;
4757
4768
  if (this.isResizing && this.resizeTarget) {
4758
4769
  const d = this.resizeTarget.height;
4759
4770
  let f = r - this.clientY;
4760
- const { calculatedHeight: x } = this.resizeTarget, u = x === -1 ? c : x;
4771
+ const { calculatedHeight: x } = this.resizeTarget, u = x === -1 ? h : x;
4761
4772
  f + d < u && (f = -(d - u)), this.resizeDiff = f, this.ctx.emit("draw");
4762
4773
  } else {
4763
4774
  if (this.resizeTarget = null, this.isMouseDown)
@@ -4849,12 +4860,12 @@ class Ne {
4849
4860
  config: { CELL_HEIGHT: s }
4850
4861
  } = this.ctx, o = i, { data: r, positions: a } = e.getData();
4851
4862
  this.ctx.maxRowIndex = r.length - 1;
4852
- let l = this.binarySearch(a, o), c = this.binarySearch(a, o + this.visibleHeight);
4853
- if (c === -1 && (c = this.ctx.maxRowIndex), l === -1 && c === this.ctx.maxRowIndex) {
4863
+ let l = this.binarySearch(a, o), h = this.binarySearch(a, o + this.visibleHeight);
4864
+ if (h === -1 && (h = this.ctx.maxRowIndex), l === -1 && h === this.ctx.maxRowIndex) {
4854
4865
  const f = Math.floor(this.visibleHeight / s);
4855
4866
  l = this.ctx.maxRowIndex - f;
4856
4867
  }
4857
- this.headIndex = Math.max(0, l), this.tailIndex = Math.min(this.ctx.maxRowIndex, c + 1), this.visibleRows = r.slice(this.headIndex, this.tailIndex + 1), this.ctx.body.headIndex = this.headIndex, this.ctx.body.tailIndex = this.tailIndex, this.ctx.body.visibleRows = this.visibleRows;
4868
+ this.headIndex = Math.max(0, l), 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;
4858
4869
  const d = [];
4859
4870
  for (let f = 0; f < this.visibleRows.length; f++) {
4860
4871
  const x = this.headIndex + f, u = this.visibleRows[f], { height: g, top: m } = this.ctx.database.getPositionForRowIndex(x), w = new Jt(this.ctx, x, 0, m + this.y, t.width, g, u);
@@ -4865,7 +4876,7 @@ class Ne {
4865
4876
  updateAutoHeight() {
4866
4877
  const t = this.ctx.body.renderRows;
4867
4878
  if (!t.some((s) => s.calculatedHeightCells.length > 0))
4868
- return;
4879
+ return !1;
4869
4880
  t.forEach((s) => {
4870
4881
  s.updateCalculatedHeight();
4871
4882
  });
@@ -4873,7 +4884,7 @@ class Ne {
4873
4884
  height: s.calculatedHeight,
4874
4885
  rowIndex: s.rowIndex
4875
4886
  }));
4876
- this.ctx.database.setBatchCalculatedRowHeight(i);
4887
+ return this.ctx.database.setBatchCalculatedRowHeight(i);
4877
4888
  }
4878
4889
  draw() {
4879
4890
  this.renderRows.forEach((t) => {
@@ -4926,8 +4937,8 @@ class ke {
4926
4937
  colorStart: "rgba(0,0,0,0.1)",
4927
4938
  colorEnd: "rgba(0,0,0,0)"
4928
4939
  }), i < Math.floor(s.width - o - 1) && e !== a) {
4929
- const c = s.width - (this.x + this.width) + o - e;
4930
- this.ctx.paint.drawShadow(c, l, e, this.height, {
4940
+ const h = s.width - (this.x + this.width) + o - e;
4941
+ this.ctx.paint.drawShadow(h, l, e, this.height, {
4931
4942
  fillColor: r,
4932
4943
  side: "left",
4933
4944
  shadowWidth: 4,
@@ -5080,22 +5091,22 @@ class Be {
5080
5091
  const {
5081
5092
  SELECTOR_AREA_MIN_X: a,
5082
5093
  SELECTOR_AREA_MAX_X: l,
5083
- SELECTOR_AREA_MIN_Y: c,
5094
+ SELECTOR_AREA_MIN_Y: h,
5084
5095
  SELECTOR_AREA_MAX_Y: d,
5085
5096
  SELECTOR_AREA_MAX_X_OFFSET: f,
5086
5097
  SELECTOR_AREA_MAX_Y_OFFSET: x
5087
- } = this.ctx.config, u = a, g = l || this.ctx.maxColIndex - f, m = c, w = d || this.ctx.maxRowIndex - x;
5088
- let [E, p] = o, [C, b] = r;
5089
- if (E < u || p > g || C < m || b > w)
5098
+ } = this.ctx.config, u = a, g = l || this.ctx.maxColIndex - f, m = h, w = d || this.ctx.maxRowIndex - x;
5099
+ let [E, p] = o, [y, b] = r;
5100
+ if (E < u || p > g || y < m || b > w)
5090
5101
  return;
5091
5102
  if (this.ctx.config.ENABLE_MERGE_CELL_LINK) {
5092
5103
  const R = this.adjustMergeCells(o, r);
5093
- C = R.yArr[0], b = R.yArr[1], E = R.xArr[0], p = R.xArr[1], this.ctx.onlyMergeCell = R.onlyMergeCell;
5104
+ y = R.yArr[0], b = R.yArr[1], E = R.xArr[0], p = R.xArr[1], this.ctx.onlyMergeCell = R.onlyMergeCell;
5094
5105
  }
5095
- E === p && C === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, o = [Math.max(u, E), Math.min(g, p)], r = [Math.max(m, C), Math.min(w, b)];
5096
- const { BEFORE_SET_SELECTOR_METHOD: y } = this.ctx.config;
5097
- if (typeof y == "function") {
5098
- const S = y({
5106
+ E === p && y === b ? this.ctx.selectOnlyOne = !0 : this.ctx.selectOnlyOne = !1, o = [Math.max(u, E), Math.min(g, p)], r = [Math.max(m, y), Math.min(w, b)];
5107
+ const { BEFORE_SET_SELECTOR_METHOD: C } = this.ctx.config;
5108
+ if (typeof C == "function") {
5109
+ const S = C({
5099
5110
  focusCell: this.ctx.focusCell,
5100
5111
  xArr: o,
5101
5112
  yArr: r
@@ -5104,7 +5115,7 @@ class Be {
5104
5115
  return;
5105
5116
  o = S.xArr, r = S.yArr;
5106
5117
  }
5107
- this.ctx.selector.xArr = o, this.ctx.selector.yArr = r, b === this.ctx.maxRowIndex && C === 0 ? this.ctx.selectColsIng = !0 : this.ctx.selectColsIng = !1, p === this.ctx.maxColIndex && E === 0 ? this.ctx.selectRowsIng = !0 : this.ctx.selectRowsIng = !1, this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("drawView");
5118
+ this.ctx.selector.xArr = o, this.ctx.selector.yArr = r, b === this.ctx.maxRowIndex && y === 0 ? this.ctx.selectColsIng = !0 : this.ctx.selectColsIng = !1, p === this.ctx.maxColIndex && E === 0 ? this.ctx.selectRowsIng = !0 : this.ctx.selectRowsIng = !1, this.ctx.emit("setSelector", this.ctx.selector), this.ctx.emit("drawView");
5108
5119
  }
5109
5120
  }
5110
5121
  adjustMergeCells(t, e) {
@@ -5119,13 +5130,13 @@ class Be {
5119
5130
  let a = [], l = [];
5120
5131
  for (let m = 0; m <= e[1] - e[0]; m++)
5121
5132
  for (let w = 0; w <= t[1] - t[0]; w++) {
5122
- const E = m + e[0], p = w + t[0], C = this.ctx.database.getVirtualBodyCell(E, p);
5123
- C && ((E === i || E === s) && a.push(C), (p === o || p === r) && l.push(C));
5133
+ const E = m + e[0], p = w + t[0], y = this.ctx.database.getVirtualBodyCell(E, p);
5134
+ y && ((E === i || E === s) && a.push(y), (p === o || p === r) && l.push(y));
5124
5135
  }
5125
- const c = a.reduce(
5136
+ const h = a.reduce(
5126
5137
  (m, w) => {
5127
- const { yArr: E } = w.getSpanInfo(), [p, C] = E;
5128
- return m.minY = Math.min(m.minY, p), m.maxY = Math.max(m.maxY, C), m;
5138
+ const { yArr: E } = w.getSpanInfo(), [p, y] = E;
5139
+ return m.minY = Math.min(m.minY, p), m.maxY = Math.max(m.maxY, y), m;
5129
5140
  },
5130
5141
  {
5131
5142
  minY: i,
@@ -5133,16 +5144,16 @@ class Be {
5133
5144
  }
5134
5145
  ), d = l.reduce(
5135
5146
  (m, w) => {
5136
- const { xArr: E } = w.getSpanInfo(), [p, C] = E;
5137
- return m.minX = Math.min(m.minX, p), m.maxX = Math.max(m.maxX, C), m;
5147
+ const { xArr: E } = w.getSpanInfo(), [p, y] = E;
5148
+ return m.minX = Math.min(m.minX, p), m.maxX = Math.max(m.maxX, y), m;
5138
5149
  },
5139
5150
  {
5140
5151
  minX: o,
5141
5152
  maxX: r
5142
5153
  }
5143
- ), f = [d.minX, d.maxX], x = [c.minY, c.maxY];
5154
+ ), f = [d.minX, d.maxX], x = [h.minY, h.maxY];
5144
5155
  let u = !1;
5145
- if (d.minX !== d.maxX || c.minY !== c.maxY) {
5156
+ if (d.minX !== d.maxX || h.minY !== h.maxY) {
5146
5157
  const m = JSON.stringify(f) + JSON.stringify(x), w = (g = this.ctx.focusCell) == null ? void 0 : g.getSpanInfo();
5147
5158
  u = (w && JSON.stringify(w.xArr) + JSON.stringify(w.yArr)) === m;
5148
5159
  }
@@ -5159,11 +5170,11 @@ class Be {
5159
5170
  if (this.ctx.focusCellHeader) {
5160
5171
  const { colIndex: a } = this.ctx.focusCellHeader;
5161
5172
  if (this.ctx.clearSelector(), this.ctx.mousedown && t.colIndex >= a) {
5162
- const l = [a, t.colIndex + t.colspan - 1], c = [o, r];
5163
- this.setSelector(l, c);
5173
+ const l = [a, t.colIndex + t.colspan - 1], h = [o, r];
5174
+ this.setSelector(l, h);
5164
5175
  } else {
5165
- const l = [t.colIndex, a + t.colspan - 1], c = [o, r];
5166
- this.setSelector(l, c);
5176
+ const l = [t.colIndex, a + t.colspan - 1], h = [o, r];
5177
+ this.setSelector(l, h);
5167
5178
  }
5168
5179
  }
5169
5180
  }
@@ -5179,7 +5190,7 @@ class Be {
5179
5190
  SELECTOR_AREA_MAX_Y: r,
5180
5191
  SELECTOR_AREA_MAX_X_OFFSET: a,
5181
5192
  SELECTOR_AREA_MAX_Y_OFFSET: l
5182
- } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - a, f = o, x = r || this.ctx.maxRowIndex - l, u = [c, d], g = [f, x];
5193
+ } = this.ctx.config, h = i, d = s || this.ctx.maxColIndex - a, f = o, x = r || this.ctx.maxRowIndex - l, u = [h, d], g = [f, x];
5183
5194
  this.setSelector(u, g);
5184
5195
  }
5185
5196
  }
@@ -5189,17 +5200,17 @@ class Be {
5189
5200
  const { SELECTOR_AREA_MIN_X: i, SELECTOR_AREA_MAX_X: s, SELECTOR_AREA_MAX_X_OFFSET: o } = this.ctx.config, r = s || this.ctx.maxColIndex - o, a = i;
5190
5201
  if (e) {
5191
5202
  this.ctx.setFocusCell(t);
5192
- const l = [a, r], c = [t.rowIndex, t.rowIndex];
5193
- this.setSelector(l, c);
5203
+ const l = [a, r], h = [t.rowIndex, t.rowIndex];
5204
+ this.setSelector(l, h);
5194
5205
  }
5195
5206
  if (this.ctx.focusCell && this.ctx.mousedown) {
5196
5207
  const { rowIndex: l } = this.ctx.focusCell;
5197
5208
  if (t.rowIndex >= l) {
5198
- const c = [a, r], d = [l, t.rowIndex];
5199
- this.setSelector(c, d);
5209
+ const h = [a, r], d = [l, t.rowIndex];
5210
+ this.setSelector(h, d);
5200
5211
  } else {
5201
- const c = [a, r], d = [t.rowIndex, l];
5202
- this.setSelector(c, d);
5212
+ const h = [a, r], d = [t.rowIndex, l];
5213
+ this.setSelector(h, d);
5203
5214
  }
5204
5215
  }
5205
5216
  }
@@ -5208,7 +5219,7 @@ class Be {
5208
5219
  return;
5209
5220
  const { mousedown: t, focusCell: e, hoverCell: i } = this.ctx;
5210
5221
  if (t && e && i) {
5211
- const { rowIndex: s, colIndex: o } = e, r = Math.min(i.colIndex, o), a = Math.max(i.colIndex, o), l = Math.min(i.rowIndex, s), c = Math.max(i.rowIndex, s), d = [r, a], f = [l, c];
5222
+ const { rowIndex: s, colIndex: o } = e, r = Math.min(i.colIndex, o), a = Math.max(i.colIndex, o), l = Math.min(i.rowIndex, s), h = Math.max(i.rowIndex, s), d = [r, a], f = [l, h];
5212
5223
  this.setSelector(d, f);
5213
5224
  }
5214
5225
  }
@@ -5218,7 +5229,7 @@ class Be {
5218
5229
  if (this.ctx.selector.enable = !0, i && t) {
5219
5230
  if (this.ctx.config.ENABLE_SELECTOR_SINGLE)
5220
5231
  return;
5221
- const { colIndex: s, rowIndex: o } = i, { colIndex: r, rowIndex: a } = e, l = Math.min(r, s), c = Math.max(r, s), d = Math.min(a, o), f = Math.max(a, o), x = [l, c], u = [d, f];
5232
+ const { colIndex: s, rowIndex: o } = i, { colIndex: r, rowIndex: a } = e, l = Math.min(r, s), h = Math.max(r, s), d = Math.min(a, o), f = Math.max(a, o), x = [l, h], u = [d, f];
5222
5233
  this.setSelector(x, u);
5223
5234
  } else {
5224
5235
  this.ctx.emit("cellSelectedClick", e);
@@ -5284,8 +5295,8 @@ class Be {
5284
5295
  let o = [];
5285
5296
  const r = /* @__PURE__ */ new Set();
5286
5297
  for (let l = 0; l <= e[1] - e[0]; l++)
5287
- for (let c = 0; c <= t[1] - t[0]; c++) {
5288
- const d = l + e[0], f = c + t[0], x = this.ctx.database.getItemValueForRowIndexAndColIndex(d, f);
5298
+ for (let h = 0; h <= t[1] - t[0]; h++) {
5299
+ const d = l + e[0], f = h + t[0], x = this.ctx.database.getItemValueForRowIndexAndColIndex(d, f);
5289
5300
  if (x) {
5290
5301
  const { rowKey: u, key: g } = x;
5291
5302
  this.ctx.database.getReadonly(u, g) || (r.add(u), o.push({
@@ -5317,11 +5328,11 @@ class Be {
5317
5328
  const e = this.ctx.selector.yArr[0], i = this.ctx.selector.xArr[0], s = /* @__PURE__ */ new Set();
5318
5329
  navigator.clipboard.readText().then(async (o) => {
5319
5330
  let r = we(o);
5320
- const a = [i, i + r[0].length - 1], l = [e, e + r.length - 1], [c, d] = l, [f, x] = a, u = d - this.ctx.maxRowIndex, g = x - this.ctx.maxColIndex;
5331
+ const a = [i, i + r[0].length - 1], l = [e, e + r.length - 1], [h, d] = l, [f, x] = a, u = d - this.ctx.maxRowIndex, g = x - this.ctx.maxColIndex;
5321
5332
  (u > 0 || g > 0) && this.ctx.emit("onPastedDataOverflow", {
5322
5333
  maxY: d,
5323
5334
  maxX: x,
5324
- minY: c,
5335
+ minY: h,
5325
5336
  minX: f,
5326
5337
  overflowRowCount: u,
5327
5338
  overflowColCount: g,
@@ -5329,18 +5340,18 @@ class Be {
5329
5340
  });
5330
5341
  const m = r.length === 1 && r[0].length === 1;
5331
5342
  if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(a, l) && !m) {
5332
- const C = {
5343
+ const y = {
5333
5344
  code: "ERR_MERGED_CELLS_PASTE",
5334
5345
  message: "Merged cells cannot span paste data"
5335
5346
  };
5336
- this.ctx.hasEvent("error") ? this.ctx.emit("error", C) : alert(C.message);
5347
+ this.ctx.hasEvent("error") ? this.ctx.emit("error", y) : alert(y.message);
5337
5348
  return;
5338
5349
  }
5339
5350
  let w = [];
5340
- for (let C = 0; C <= r.length - 1; C++) {
5341
- const b = r[C].length;
5342
- for (let y = 0; y <= b - 1; y++) {
5343
- const R = C + e, S = y + i, O = r[C][y], v = this.ctx.database.getItemValueForRowIndexAndColIndex(
5351
+ for (let y = 0; y <= r.length - 1; y++) {
5352
+ const b = r[y].length;
5353
+ for (let C = 0; C <= b - 1; C++) {
5354
+ const R = y + e, S = C + i, O = r[y][C], v = this.ctx.database.getItemValueForRowIndexAndColIndex(
5344
5355
  R,
5345
5356
  S
5346
5357
  );
@@ -5357,34 +5368,34 @@ class Be {
5357
5368
  }
5358
5369
  }
5359
5370
  if (this.isCut) {
5360
- const C = this.clearSelectedData(
5371
+ const y = this.clearSelectedData(
5361
5372
  this.ctx.selector.xArrCopy,
5362
5373
  this.ctx.selector.yArrCopy,
5363
5374
  !0
5364
5375
  // 忽略设置,只返回数据,用于cut,实现历史回退需要返回两次问题
5365
- ), b = w.map((y) => `${y.rowKey}-${y.key}`);
5366
- C.forEach((y) => {
5367
- b.includes(`${y.rowKey}-${y.key}`) || w.unshift(y);
5376
+ ), b = w.map((C) => `${C.rowKey}-${C.key}`);
5377
+ y.forEach((C) => {
5378
+ b.includes(`${C.rowKey}-${C.key}`) || w.unshift(C);
5368
5379
  }), this.isCut = !1;
5369
5380
  }
5370
5381
  if (!w.length)
5371
5382
  return;
5372
5383
  const { BEFORE_PASTE_DATA_METHOD: E } = this.ctx.config;
5373
5384
  if (typeof E == "function") {
5374
- const C = E, b = w.map((y) => ({
5375
- rowKey: y.rowKey,
5376
- key: y.key,
5377
- value: y.value,
5378
- oldValue: this.ctx.database.getItemValue(y.rowKey, y.key),
5379
- row: this.ctx.database.getRowDataItemForRowKey(y.rowKey)
5385
+ const y = E, b = w.map((C) => ({
5386
+ rowKey: C.rowKey,
5387
+ key: C.key,
5388
+ value: C.value,
5389
+ oldValue: this.ctx.database.getItemValue(C.rowKey, C.key),
5390
+ row: this.ctx.database.getRowDataItemForRowKey(C.rowKey)
5380
5391
  }));
5381
- if (w = await C(b, a, l, r), w && !w.length)
5392
+ if (w = await y(b, a, l, r), w && !w.length)
5382
5393
  return;
5383
5394
  }
5384
5395
  this.clearCopyLine(), this.ctx.batchSetItemValueByEditor(w, !0);
5385
5396
  let p = [];
5386
- s.forEach((C) => {
5387
- p.push(this.ctx.database.getRowDataItemForRowKey(C));
5397
+ s.forEach((y) => {
5398
+ p.push(this.ctx.database.getRowDataItemForRowKey(y));
5388
5399
  }), this.ctx.emit("pasteChange", w, p), this.ctx.emit("draw");
5389
5400
  }).catch((o) => {
5390
5401
  console.error("Failed to get the clipboard content:", o);
@@ -5416,8 +5427,8 @@ class Be {
5416
5427
  s < l && s++;
5417
5428
  break;
5418
5429
  }
5419
- const c = [i, i], d = [s, s], f = this.getCell(s, i);
5420
- f && (f.operation || this.isInSettingRange(f.rowIndex, f.colIndex) && (this.ctx.setFocusCell(f), this.setSelector(c, d), this.adjustBoundaryPosition(), this.ctx.emit("moveFocus", f), this.ctx.emit("draw")));
5430
+ const h = [i, i], d = [s, s], f = this.getCell(s, i);
5431
+ f && (f.operation || this.isInSettingRange(f.rowIndex, f.colIndex) && (this.ctx.setFocusCell(f), this.setSelector(h, d), this.adjustBoundaryPosition(), this.ctx.emit("moveFocus", f), this.ctx.emit("draw")));
5421
5432
  }
5422
5433
  // 判断是否在设置范围内
5423
5434
  isInSettingRange(t, e) {
@@ -5428,8 +5439,8 @@ class Be {
5428
5439
  SELECTOR_AREA_MAX_Y: r,
5429
5440
  SELECTOR_AREA_MAX_X_OFFSET: a,
5430
5441
  SELECTOR_AREA_MAX_Y_OFFSET: l
5431
- } = this.ctx.config, c = i, d = s || this.ctx.maxColIndex - a, f = o, x = r || this.ctx.maxRowIndex - l;
5432
- return !(e < c || e > d || t < f || t > x);
5442
+ } = this.ctx.config, h = i, d = s || this.ctx.maxColIndex - a, f = o, x = r || this.ctx.maxRowIndex - l;
5443
+ return !(e < h || e > d || t < f || t > x);
5433
5444
  }
5434
5445
  /**
5435
5446
  * 调整滚动条位置,让焦点单元格始终出现在可视区域内
@@ -5444,21 +5455,21 @@ class Be {
5444
5455
  header: r,
5445
5456
  footer: a,
5446
5457
  body: l,
5447
- scrollX: c,
5458
+ scrollX: h,
5448
5459
  scrollY: d,
5449
5460
  config: { SCROLLER_TRACK_SIZE: f, FOOTER_FIXED: x, FOOTER_POSITION: u, ENABLE_MERGE_CELL_LINK: g }
5450
5461
  } = this.ctx;
5451
5462
  if (!i)
5452
5463
  return;
5453
5464
  g && this.ctx.onlyMergeCell && i.updateSpanInfo();
5454
- const { drawX: m, drawY: w, width: E, height: p, fixed: C } = i, b = o - m + 1, y = i.drawX + E - (e - s) + 1;
5465
+ const { drawX: m, drawY: w, width: E, height: p, fixed: y } = i, b = o - m + 1, C = i.drawX + E - (e - s) + 1;
5455
5466
  let R = r.height - w, S = p;
5456
5467
  S > l.visibleHeight && (S = l.visibleHeight);
5457
5468
  let O = 0;
5458
5469
  x && (u === "top" ? R = r.height + a.height - w : O = a.visibleHeight);
5459
5470
  const v = w + S - (t - O - f);
5460
- let I = c, _ = d;
5461
- y > 0 && !C ? I = Math.floor(c + y) : b > 0 && !C && (I = Math.floor(c - b)), R > 0 ? _ = Math.floor(d - R) : v > 0 && (_ = Math.floor(d + v)), (Math.abs(c - I) > 2 || Math.abs(d - _) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.emit("adjustBoundaryPosition", i), this.ctx.setScroll(I, _));
5471
+ let I = h, _ = d;
5472
+ C > 0 && !y ? I = Math.floor(h + C) : b > 0 && !y && (I = Math.floor(h - b)), R > 0 ? _ = Math.floor(d - R) : v > 0 && (_ = Math.floor(d + v)), (Math.abs(h - I) > 2 || Math.abs(d - _) > 2) && (this.ctx.adjustPositioning = !0, this.ctx.emit("adjustBoundaryPosition", i), this.ctx.setScroll(I, _));
5462
5473
  }
5463
5474
  destroy() {
5464
5475
  }
@@ -5473,7 +5484,7 @@ class Xe {
5473
5484
  this.ctx.on("mousemove", (t) => {
5474
5485
  if (this.ctx.stageElement.style.cursor === "crosshair" && (this.ctx.stageElement.style.cursor = "default"), this.ctx.editing || !this.ctx.focusCell || !this.maxColRowCell)
5475
5486
  return;
5476
- const { offsetX: e, offsetY: i } = this.ctx.getOffset(t), { colIndex: s, rowIndex: o, drawX: r, drawY: a, width: l, height: c } = this.maxColRowCell, d = 6, f = s === this.ctx.maxColIndex || o === this.ctx.maxRowIndex ? 0 : 2, x = r + l - d + f, u = a + c - d + f;
5487
+ const { offsetX: e, offsetY: i } = this.ctx.getOffset(t), { colIndex: s, rowIndex: o, drawX: r, drawY: a, width: l, height: h } = this.maxColRowCell, d = 6, f = s === this.ctx.maxColIndex || o === this.ctx.maxRowIndex ? 0 : 2, x = r + l - d + f, u = a + h - d + f;
5477
5488
  e > x && i > u && e < x + d && i < u + d && (this.ctx.stageElement.style.cursor = "crosshair"), this.ctx.autofillMove && this.ctx.startAdjustPosition(t);
5478
5489
  }), this.ctx.on("cellMouseenter", (t) => {
5479
5490
  const { xArr: e, yArr: i } = this.ctx.selector, s = e[1], o = i[1], { colIndex: r, rowIndex: a } = t;
@@ -5507,8 +5518,8 @@ class Xe {
5507
5518
  if (!i)
5508
5519
  return;
5509
5520
  let r = t, a = e;
5510
- const l = this.ctx.selector.xArr, c = this.ctx.selector.yArr;
5511
- if (!(!o && JSON.stringify(c) !== JSON.stringify(a)) && !(!s && JSON.stringify(l) !== JSON.stringify(r)) && (JSON.stringify(this.ctx.autofill.xArr) !== JSON.stringify(r) || JSON.stringify(this.ctx.autofill.yArr) !== JSON.stringify(a))) {
5521
+ const l = this.ctx.selector.xArr, h = this.ctx.selector.yArr;
5522
+ if (!(!o && JSON.stringify(h) !== JSON.stringify(a)) && !(!s && JSON.stringify(l) !== JSON.stringify(r)) && (JSON.stringify(this.ctx.autofill.xArr) !== JSON.stringify(r) || JSON.stringify(this.ctx.autofill.yArr) !== JSON.stringify(a))) {
5512
5523
  const {
5513
5524
  SELECTOR_AREA_MIN_X: d,
5514
5525
  SELECTOR_AREA_MAX_X: f,
@@ -5516,11 +5527,11 @@ class Xe {
5516
5527
  SELECTOR_AREA_MAX_Y: u,
5517
5528
  SELECTOR_AREA_MAX_X_OFFSET: g,
5518
5529
  SELECTOR_AREA_MAX_Y_OFFSET: m
5519
- } = this.ctx.config, w = d, E = f || this.ctx.maxColIndex - g, p = x, C = u || this.ctx.maxRowIndex - m;
5520
- let [b, y] = r, [R, S] = a;
5530
+ } = this.ctx.config, w = d, E = f || this.ctx.maxColIndex - g, p = x, y = u || this.ctx.maxRowIndex - m;
5531
+ let [b, C] = r, [R, S] = a;
5521
5532
  if (b < w || R < p)
5522
5533
  return;
5523
- r = [Math.max(w, b), Math.min(E, y)], a = [Math.max(p, R), Math.min(C, S)];
5534
+ r = [Math.max(w, b), Math.min(E, C)], a = [Math.max(p, R), Math.min(y, S)];
5524
5535
  const { BEFORE_SET_AUTOFILL_METHOD: O } = this.ctx.config;
5525
5536
  if (typeof O == "function") {
5526
5537
  const I = O({
@@ -5545,8 +5556,8 @@ class Xe {
5545
5556
  const m = u + e.yArr[0], w = g + e.xArr[0];
5546
5557
  i.set(`${m}-${w}`, !0);
5547
5558
  }
5548
- const { value: s } = e, o = s[0].length, r = s.length, a = this.ctx.autofill.xArr, l = this.ctx.autofill.yArr, c = o === 1 && r === 1;
5549
- if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(a, l) && !c) {
5559
+ const { value: s } = e, o = s[0].length, r = s.length, a = this.ctx.autofill.xArr, l = this.ctx.autofill.yArr, h = o === 1 && r === 1;
5560
+ if (this.ctx.config.ENABLE_MERGE_CELL_LINK && this.ctx.database.hasMergeCell(a, l) && !h) {
5550
5561
  const u = {
5551
5562
  code: "ERR_MERGED_CELLS_AUTOFILL",
5552
5563
  message: "Merged cells cannot span autofill data"
@@ -5557,12 +5568,12 @@ class Xe {
5557
5568
  let d = [];
5558
5569
  for (let u = 0; u <= l[1] - l[0]; u++)
5559
5570
  for (let g = 0; g <= a[1] - a[0]; g++) {
5560
- const m = g + a[0], w = u + l[0], E = s[u % r][g % o], p = this.ctx.database.getItemValueForRowIndexAndColIndex(w, m), C = `${w}-${m}`;
5561
- if (p && !i.has(C)) {
5562
- const { rowKey: b, key: y } = p;
5563
- this.ctx.database.getReadonly(b, y) || (t.add(b), d.push({
5571
+ const m = g + a[0], w = u + l[0], E = s[u % r][g % o], p = this.ctx.database.getItemValueForRowIndexAndColIndex(w, m), y = `${w}-${m}`;
5572
+ if (p && !i.has(y)) {
5573
+ const { rowKey: b, key: C } = p;
5574
+ this.ctx.database.getReadonly(b, C) || (t.add(b), d.push({
5564
5575
  rowKey: b,
5565
- key: y,
5576
+ key: C,
5566
5577
  value: E,
5567
5578
  row: {}
5568
5579
  }));
@@ -5601,9 +5612,9 @@ class Xe {
5601
5612
  destroy() {
5602
5613
  }
5603
5614
  }
5604
- const j = Math.min, z = Math.max, at = Math.round, st = Math.floor, Y = (h) => ({
5605
- x: h,
5606
- y: h
5615
+ const j = Math.min, z = Math.max, at = Math.round, st = Math.floor, Y = (c) => ({
5616
+ x: c,
5617
+ y: c
5607
5618
  }), Ye = {
5608
5619
  left: "right",
5609
5620
  right: "left",
@@ -5613,47 +5624,47 @@ const j = Math.min, z = Math.max, at = Math.round, st = Math.floor, Y = (h) => (
5613
5624
  start: "end",
5614
5625
  end: "start"
5615
5626
  };
5616
- function Et(h, t, e) {
5617
- return z(h, j(t, e));
5627
+ function Et(c, t, e) {
5628
+ return z(c, j(t, e));
5618
5629
  }
5619
- function tt(h, t) {
5620
- return typeof h == "function" ? h(t) : h;
5630
+ function tt(c, t) {
5631
+ return typeof c == "function" ? c(t) : c;
5621
5632
  }
5622
- function $(h) {
5623
- return h.split("-")[0];
5633
+ function $(c) {
5634
+ return c.split("-")[0];
5624
5635
  }
5625
- function et(h) {
5626
- return h.split("-")[1];
5636
+ function et(c) {
5637
+ return c.split("-")[1];
5627
5638
  }
5628
- function Qt(h) {
5629
- return h === "x" ? "y" : "x";
5639
+ function Qt(c) {
5640
+ return c === "x" ? "y" : "x";
5630
5641
  }
5631
- function Rt(h) {
5632
- return h === "y" ? "height" : "width";
5642
+ function Rt(c) {
5643
+ return c === "y" ? "height" : "width";
5633
5644
  }
5634
5645
  const Fe = /* @__PURE__ */ new Set(["top", "bottom"]);
5635
- function V(h) {
5636
- return Fe.has($(h)) ? "y" : "x";
5646
+ function V(c) {
5647
+ return Fe.has($(c)) ? "y" : "x";
5637
5648
  }
5638
- function _t(h) {
5639
- return Qt(V(h));
5649
+ function _t(c) {
5650
+ return Qt(V(c));
5640
5651
  }
5641
- function We(h, t, e) {
5652
+ function We(c, t, e) {
5642
5653
  e === void 0 && (e = !1);
5643
- const i = et(h), s = _t(h), o = Rt(s);
5654
+ const i = et(c), s = _t(c), o = Rt(s);
5644
5655
  let r = s === "x" ? i === (e ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
5645
5656
  return t.reference[o] > t.floating[o] && (r = lt(r)), [r, lt(r)];
5646
5657
  }
5647
- function Ve(h) {
5648
- const t = lt(h);
5649
- return [pt(h), t, pt(t)];
5658
+ function Ve(c) {
5659
+ const t = lt(c);
5660
+ return [pt(c), t, pt(t)];
5650
5661
  }
5651
- function pt(h) {
5652
- return h.replace(/start|end/g, (t) => Ke[t]);
5662
+ function pt(c) {
5663
+ return c.replace(/start|end/g, (t) => Ke[t]);
5653
5664
  }
5654
5665
  const Yt = ["left", "right"], Kt = ["right", "left"], Pe = ["top", "bottom"], ze = ["bottom", "top"];
5655
- function $e(h, t, e) {
5656
- switch (h) {
5666
+ function $e(c, t, e) {
5667
+ switch (c) {
5657
5668
  case "top":
5658
5669
  case "bottom":
5659
5670
  return e ? t ? Kt : Yt : t ? Yt : Kt;
@@ -5664,38 +5675,38 @@ function $e(h, t, e) {
5664
5675
  return [];
5665
5676
  }
5666
5677
  }
5667
- function Ge(h, t, e, i) {
5668
- const s = et(h);
5669
- let o = $e($(h), e === "start", i);
5678
+ function Ge(c, t, e, i) {
5679
+ const s = et(c);
5680
+ let o = $e($(c), e === "start", i);
5670
5681
  return s && (o = o.map((r) => r + "-" + s), t && (o = o.concat(o.map(pt)))), o;
5671
5682
  }
5672
- function lt(h) {
5673
- return h.replace(/left|right|bottom|top/g, (t) => Ye[t]);
5683
+ function lt(c) {
5684
+ return c.replace(/left|right|bottom|top/g, (t) => Ye[t]);
5674
5685
  }
5675
- function Ue(h) {
5686
+ function Ue(c) {
5676
5687
  return {
5677
5688
  top: 0,
5678
5689
  right: 0,
5679
5690
  bottom: 0,
5680
5691
  left: 0,
5681
- ...h
5692
+ ...c
5682
5693
  };
5683
5694
  }
5684
- function te(h) {
5685
- return typeof h != "number" ? Ue(h) : {
5686
- top: h,
5687
- right: h,
5688
- bottom: h,
5689
- left: h
5695
+ function te(c) {
5696
+ return typeof c != "number" ? Ue(c) : {
5697
+ top: c,
5698
+ right: c,
5699
+ bottom: c,
5700
+ left: c
5690
5701
  };
5691
5702
  }
5692
- function ct(h) {
5703
+ function ht(c) {
5693
5704
  const {
5694
5705
  x: t,
5695
5706
  y: e,
5696
5707
  width: i,
5697
5708
  height: s
5698
- } = h;
5709
+ } = c;
5699
5710
  return {
5700
5711
  width: i,
5701
5712
  height: s,
@@ -5707,12 +5718,12 @@ function ct(h) {
5707
5718
  y: e
5708
5719
  };
5709
5720
  }
5710
- function Ft(h, t, e) {
5721
+ function Ft(c, t, e) {
5711
5722
  let {
5712
5723
  reference: i,
5713
5724
  floating: s
5714
- } = h;
5715
- const o = V(t), r = _t(t), a = Rt(r), l = $(t), c = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, x = i[a] / 2 - s[a] / 2;
5725
+ } = c;
5726
+ const o = V(t), r = _t(t), a = Rt(r), l = $(t), h = o === "y", d = i.x + i.width / 2 - s.width / 2, f = i.y + i.height / 2 - s.height / 2, x = i[a] / 2 - s[a] / 2;
5716
5727
  let u;
5717
5728
  switch (l) {
5718
5729
  case "top":
@@ -5747,38 +5758,38 @@ function Ft(h, t, e) {
5747
5758
  }
5748
5759
  switch (et(t)) {
5749
5760
  case "start":
5750
- u[r] -= x * (e && c ? -1 : 1);
5761
+ u[r] -= x * (e && h ? -1 : 1);
5751
5762
  break;
5752
5763
  case "end":
5753
- u[r] += x * (e && c ? -1 : 1);
5764
+ u[r] += x * (e && h ? -1 : 1);
5754
5765
  break;
5755
5766
  }
5756
5767
  return u;
5757
5768
  }
5758
- const je = async (h, t, e) => {
5769
+ const je = async (c, t, e) => {
5759
5770
  const {
5760
5771
  placement: i = "bottom",
5761
5772
  strategy: s = "absolute",
5762
5773
  middleware: o = [],
5763
5774
  platform: r
5764
5775
  } = e, a = o.filter(Boolean), l = await (r.isRTL == null ? void 0 : r.isRTL(t));
5765
- let c = await r.getElementRects({
5766
- reference: h,
5776
+ let h = await r.getElementRects({
5777
+ reference: c,
5767
5778
  floating: t,
5768
5779
  strategy: s
5769
5780
  }), {
5770
5781
  x: d,
5771
5782
  y: f
5772
- } = Ft(c, i, l), x = i, u = {}, g = 0;
5783
+ } = Ft(h, i, l), x = i, u = {}, g = 0;
5773
5784
  for (let m = 0; m < a.length; m++) {
5774
5785
  const {
5775
5786
  name: w,
5776
5787
  fn: E
5777
5788
  } = a[m], {
5778
5789
  x: p,
5779
- y: C,
5790
+ y,
5780
5791
  data: b,
5781
- reset: y
5792
+ reset: C
5782
5793
  } = await E({
5783
5794
  x: d,
5784
5795
  y: f,
@@ -5786,27 +5797,27 @@ const je = async (h, t, e) => {
5786
5797
  placement: x,
5787
5798
  strategy: s,
5788
5799
  middlewareData: u,
5789
- rects: c,
5800
+ rects: h,
5790
5801
  platform: r,
5791
5802
  elements: {
5792
- reference: h,
5803
+ reference: c,
5793
5804
  floating: t
5794
5805
  }
5795
5806
  });
5796
- d = p ?? d, f = C ?? f, u = {
5807
+ d = p ?? d, f = y ?? f, u = {
5797
5808
  ...u,
5798
5809
  [w]: {
5799
5810
  ...u[w],
5800
5811
  ...b
5801
5812
  }
5802
- }, y && g <= 50 && (g++, typeof y == "object" && (y.placement && (x = y.placement), y.rects && (c = y.rects === !0 ? await r.getElementRects({
5803
- reference: h,
5813
+ }, C && g <= 50 && (g++, typeof C == "object" && (C.placement && (x = C.placement), C.rects && (h = C.rects === !0 ? await r.getElementRects({
5814
+ reference: c,
5804
5815
  floating: t,
5805
5816
  strategy: s
5806
- }) : y.rects), {
5817
+ }) : C.rects), {
5807
5818
  x: d,
5808
5819
  y: f
5809
- } = Ft(c, x, l)), m = -1);
5820
+ } = Ft(h, x, l)), m = -1);
5810
5821
  }
5811
5822
  return {
5812
5823
  x: d,
@@ -5816,7 +5827,7 @@ const je = async (h, t, e) => {
5816
5827
  middlewareData: u
5817
5828
  };
5818
5829
  };
5819
- async function ee(h, t) {
5830
+ async function ee(c, t) {
5820
5831
  var e;
5821
5832
  t === void 0 && (t = {});
5822
5833
  const {
@@ -5826,15 +5837,15 @@ async function ee(h, t) {
5826
5837
  rects: r,
5827
5838
  elements: a,
5828
5839
  strategy: l
5829
- } = h, {
5830
- boundary: c = "clippingAncestors",
5840
+ } = c, {
5841
+ boundary: h = "clippingAncestors",
5831
5842
  rootBoundary: d = "viewport",
5832
5843
  elementContext: f = "floating",
5833
5844
  altBoundary: x = !1,
5834
5845
  padding: u = 0
5835
- } = tt(t, h), g = te(u), w = a[x ? f === "floating" ? "reference" : "floating" : f], E = ct(await o.getClippingRect({
5846
+ } = tt(t, c), g = te(u), w = a[x ? f === "floating" ? "reference" : "floating" : f], E = ht(await o.getClippingRect({
5836
5847
  element: (e = await (o.isElement == null ? void 0 : o.isElement(w))) == null || e ? w : w.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(a.floating)),
5837
- boundary: c,
5848
+ boundary: h,
5838
5849
  rootBoundary: d,
5839
5850
  strategy: l
5840
5851
  })), p = f === "floating" ? {
@@ -5842,28 +5853,28 @@ async function ee(h, t) {
5842
5853
  y: s,
5843
5854
  width: r.floating.width,
5844
5855
  height: r.floating.height
5845
- } : r.reference, C = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(a.floating)), b = await (o.isElement == null ? void 0 : o.isElement(C)) ? await (o.getScale == null ? void 0 : o.getScale(C)) || {
5856
+ } : r.reference, y = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(a.floating)), b = await (o.isElement == null ? void 0 : o.isElement(y)) ? await (o.getScale == null ? void 0 : o.getScale(y)) || {
5846
5857
  x: 1,
5847
5858
  y: 1
5848
5859
  } : {
5849
5860
  x: 1,
5850
5861
  y: 1
5851
- }, y = ct(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
5862
+ }, C = ht(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
5852
5863
  elements: a,
5853
5864
  rect: p,
5854
- offsetParent: C,
5865
+ offsetParent: y,
5855
5866
  strategy: l
5856
5867
  }) : p);
5857
5868
  return {
5858
- top: (E.top - y.top + g.top) / b.y,
5859
- bottom: (y.bottom - E.bottom + g.bottom) / b.y,
5860
- left: (E.left - y.left + g.left) / b.x,
5861
- right: (y.right - E.right + g.right) / b.x
5869
+ top: (E.top - C.top + g.top) / b.y,
5870
+ bottom: (C.bottom - E.bottom + g.bottom) / b.y,
5871
+ left: (E.left - C.left + g.left) / b.x,
5872
+ right: (C.right - E.right + g.right) / b.x
5862
5873
  };
5863
5874
  }
5864
- const qe = (h) => ({
5875
+ const qe = (c) => ({
5865
5876
  name: "arrow",
5866
- options: h,
5877
+ options: c,
5867
5878
  async fn(t) {
5868
5879
  const {
5869
5880
  x: e,
@@ -5874,18 +5885,18 @@ const qe = (h) => ({
5874
5885
  elements: a,
5875
5886
  middlewareData: l
5876
5887
  } = t, {
5877
- element: c,
5888
+ element: h,
5878
5889
  padding: d = 0
5879
- } = tt(h, t) || {};
5880
- if (c == null)
5890
+ } = tt(c, t) || {};
5891
+ if (h == null)
5881
5892
  return {};
5882
5893
  const f = te(d), x = {
5883
5894
  x: e,
5884
5895
  y: i
5885
- }, u = _t(s), g = Rt(u), m = await r.getDimensions(c), w = u === "y", E = w ? "top" : "left", p = w ? "bottom" : "right", C = w ? "clientHeight" : "clientWidth", b = o.reference[g] + o.reference[u] - x[u] - o.floating[g], y = x[u] - o.reference[u], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c));
5886
- let S = R ? R[C] : 0;
5887
- (!S || !await (r.isElement == null ? void 0 : r.isElement(R))) && (S = a.floating[C] || o.floating[g]);
5888
- const O = b / 2 - y / 2, v = S / 2 - m[g] / 2 - 1, I = j(f[E], v), _ = j(f[p], v), T = I, M = S - m[g] - _, L = S / 2 - m[g] / 2 + O, A = Et(T, L, M), H = !l.arrow && et(s) != null && L !== A && o.reference[g] / 2 - (L < T ? I : _) - m[g] / 2 < 0, D = H ? L < T ? L - T : L - M : 0;
5896
+ }, u = _t(s), g = Rt(u), m = await r.getDimensions(h), w = u === "y", E = w ? "top" : "left", p = w ? "bottom" : "right", y = w ? "clientHeight" : "clientWidth", b = o.reference[g] + o.reference[u] - x[u] - o.floating[g], C = x[u] - o.reference[u], R = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
5897
+ let S = R ? R[y] : 0;
5898
+ (!S || !await (r.isElement == null ? void 0 : r.isElement(R))) && (S = a.floating[y] || o.floating[g]);
5899
+ const O = b / 2 - C / 2, v = S / 2 - m[g] / 2 - 1, I = j(f[E], v), _ = j(f[p], v), T = I, M = S - m[g] - _, L = S / 2 - m[g] / 2 + O, A = Et(T, L, M), H = !l.arrow && et(s) != null && L !== A && o.reference[g] / 2 - (L < T ? I : _) - m[g] / 2 < 0, D = H ? L < T ? L - T : L - M : 0;
5889
5900
  return {
5890
5901
  [u]: x[u] + D,
5891
5902
  data: {
@@ -5898,10 +5909,10 @@ const qe = (h) => ({
5898
5909
  reset: H
5899
5910
  };
5900
5911
  }
5901
- }), Ze = function(h) {
5902
- return h === void 0 && (h = {}), {
5912
+ }), Ze = function(c) {
5913
+ return c === void 0 && (c = {}), {
5903
5914
  name: "flip",
5904
- options: h,
5915
+ options: c,
5905
5916
  async fn(t) {
5906
5917
  var e, i;
5907
5918
  const {
@@ -5910,7 +5921,7 @@ const qe = (h) => ({
5910
5921
  rects: r,
5911
5922
  initialPlacement: a,
5912
5923
  platform: l,
5913
- elements: c
5924
+ elements: h
5914
5925
  } = t, {
5915
5926
  mainAxis: d = !0,
5916
5927
  crossAxis: f = !0,
@@ -5919,12 +5930,12 @@ const qe = (h) => ({
5919
5930
  fallbackAxisSideDirection: g = "none",
5920
5931
  flipAlignment: m = !0,
5921
5932
  ...w
5922
- } = tt(h, t);
5933
+ } = tt(c, t);
5923
5934
  if ((e = o.arrow) != null && e.alignmentOffset)
5924
5935
  return {};
5925
- const E = $(s), p = V(a), C = $(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), y = x || (C || !m ? [lt(a)] : Ve(a)), R = g !== "none";
5926
- !x && R && y.push(...Ge(a, m, g, b));
5927
- const S = [a, ...y], O = await ee(t, w), v = [];
5936
+ const E = $(s), p = V(a), y = $(a) === a, b = await (l.isRTL == null ? void 0 : l.isRTL(h.floating)), C = x || (y || !m ? [lt(a)] : Ve(a)), R = g !== "none";
5937
+ !x && R && C.push(...Ge(a, m, g, b));
5938
+ const S = [a, ...C], O = await ee(t, w), v = [];
5928
5939
  let I = ((i = o.flip) == null ? void 0 : i.overflows) || [];
5929
5940
  if (d && v.push(O[E]), f) {
5930
5941
  const L = We(s, r, b);
@@ -5961,7 +5972,7 @@ const qe = (h) => ({
5961
5972
  W === "y";
5962
5973
  }
5963
5974
  return !0;
5964
- }).map((k) => [k.placement, k.overflows.filter((W) => W > 0).reduce((W, he) => W + he, 0)]).sort((k, W) => k[1] - W[1])[0]) == null ? void 0 : M[0];
5975
+ }).map((k) => [k.placement, k.overflows.filter((W) => W > 0).reduce((W, ce) => W + ce, 0)]).sort((k, W) => k[1] - W[1])[0]) == null ? void 0 : M[0];
5965
5976
  D && (H = D);
5966
5977
  break;
5967
5978
  }
@@ -5980,12 +5991,12 @@ const qe = (h) => ({
5980
5991
  }
5981
5992
  };
5982
5993
  }, Je = /* @__PURE__ */ new Set(["left", "top"]);
5983
- async function Qe(h, t) {
5994
+ async function Qe(c, t) {
5984
5995
  const {
5985
5996
  placement: e,
5986
5997
  platform: i,
5987
5998
  elements: s
5988
- } = h, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = $(e), a = et(e), l = V(e) === "y", c = Je.has(r) ? -1 : 1, d = o && l ? -1 : 1, f = tt(t, h);
5999
+ } = c, o = await (i.isRTL == null ? void 0 : i.isRTL(s.floating)), r = $(e), a = et(e), l = V(e) === "y", h = Je.has(r) ? -1 : 1, d = o && l ? -1 : 1, f = tt(t, c);
5989
6000
  let {
5990
6001
  mainAxis: x,
5991
6002
  crossAxis: u,
@@ -6001,16 +6012,16 @@ async function Qe(h, t) {
6001
6012
  };
6002
6013
  return a && typeof g == "number" && (u = a === "end" ? g * -1 : g), l ? {
6003
6014
  x: u * d,
6004
- y: x * c
6015
+ y: x * h
6005
6016
  } : {
6006
- x: x * c,
6017
+ x: x * h,
6007
6018
  y: u * d
6008
6019
  };
6009
6020
  }
6010
- const ti = function(h) {
6011
- return h === void 0 && (h = 0), {
6021
+ const ti = function(c) {
6022
+ return c === void 0 && (c = 0), {
6012
6023
  name: "offset",
6013
- options: h,
6024
+ options: c,
6014
6025
  async fn(t) {
6015
6026
  var e, i;
6016
6027
  const {
@@ -6018,7 +6029,7 @@ const ti = function(h) {
6018
6029
  y: o,
6019
6030
  placement: r,
6020
6031
  middlewareData: a
6021
- } = t, l = await Qe(t, h);
6032
+ } = t, l = await Qe(t, c);
6022
6033
  return r === ((e = a.offset) == null ? void 0 : e.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
6023
6034
  x: s + l.x,
6024
6035
  y: o + l.y,
@@ -6029,10 +6040,10 @@ const ti = function(h) {
6029
6040
  };
6030
6041
  }
6031
6042
  };
6032
- }, ei = function(h) {
6033
- return h === void 0 && (h = {}), {
6043
+ }, ei = function(c) {
6044
+ return c === void 0 && (c = {}), {
6034
6045
  name: "shift",
6035
- options: h,
6046
+ options: c,
6036
6047
  async fn(t) {
6037
6048
  const {
6038
6049
  x: e,
@@ -6054,18 +6065,18 @@ const ti = function(h) {
6054
6065
  }
6055
6066
  },
6056
6067
  ...l
6057
- } = tt(h, t), c = {
6068
+ } = tt(c, t), h = {
6058
6069
  x: e,
6059
6070
  y: i
6060
6071
  }, d = await ee(t, l), f = V($(s)), x = Qt(f);
6061
- let u = c[x], g = c[f];
6072
+ let u = h[x], g = h[f];
6062
6073
  if (o) {
6063
- const w = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right", p = u + d[w], C = u - d[E];
6064
- u = Et(p, u, C);
6074
+ const w = x === "y" ? "top" : "left", E = x === "y" ? "bottom" : "right", p = u + d[w], y = u - d[E];
6075
+ u = Et(p, u, y);
6065
6076
  }
6066
6077
  if (r) {
6067
- const w = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", p = g + d[w], C = g - d[E];
6068
- g = Et(p, g, C);
6078
+ const w = f === "y" ? "top" : "left", E = f === "y" ? "bottom" : "right", p = g + d[w], y = g - d[E];
6079
+ g = Et(p, g, y);
6069
6080
  }
6070
6081
  const m = a.fn({
6071
6082
  ...t,
@@ -6089,60 +6100,60 @@ const ti = function(h) {
6089
6100
  function ut() {
6090
6101
  return typeof window < "u";
6091
6102
  }
6092
- function Z(h) {
6093
- return ie(h) ? (h.nodeName || "").toLowerCase() : "#document";
6103
+ function Z(c) {
6104
+ return ie(c) ? (c.nodeName || "").toLowerCase() : "#document";
6094
6105
  }
6095
- function N(h) {
6106
+ function N(c) {
6096
6107
  var t;
6097
- return (h == null || (t = h.ownerDocument) == null ? void 0 : t.defaultView) || window;
6108
+ return (c == null || (t = c.ownerDocument) == null ? void 0 : t.defaultView) || window;
6098
6109
  }
6099
- function F(h) {
6110
+ function F(c) {
6100
6111
  var t;
6101
- return (t = (ie(h) ? h.ownerDocument : h.document) || window.document) == null ? void 0 : t.documentElement;
6112
+ return (t = (ie(c) ? c.ownerDocument : c.document) || window.document) == null ? void 0 : t.documentElement;
6102
6113
  }
6103
- function ie(h) {
6104
- return ut() ? h instanceof Node || h instanceof N(h).Node : !1;
6114
+ function ie(c) {
6115
+ return ut() ? c instanceof Node || c instanceof N(c).Node : !1;
6105
6116
  }
6106
- function B(h) {
6107
- return ut() ? h instanceof Element || h instanceof N(h).Element : !1;
6117
+ function B(c) {
6118
+ return ut() ? c instanceof Element || c instanceof N(c).Element : !1;
6108
6119
  }
6109
- function K(h) {
6110
- return ut() ? h instanceof HTMLElement || h instanceof N(h).HTMLElement : !1;
6120
+ function K(c) {
6121
+ return ut() ? c instanceof HTMLElement || c instanceof N(c).HTMLElement : !1;
6111
6122
  }
6112
- function Wt(h) {
6113
- return !ut() || typeof ShadowRoot > "u" ? !1 : h instanceof ShadowRoot || h instanceof N(h).ShadowRoot;
6123
+ function Wt(c) {
6124
+ return !ut() || typeof ShadowRoot > "u" ? !1 : c instanceof ShadowRoot || c instanceof N(c).ShadowRoot;
6114
6125
  }
6115
6126
  const ii = /* @__PURE__ */ new Set(["inline", "contents"]);
6116
- function it(h) {
6127
+ function it(c) {
6117
6128
  const {
6118
6129
  overflow: t,
6119
6130
  overflowX: e,
6120
6131
  overflowY: i,
6121
6132
  display: s
6122
- } = X(h);
6133
+ } = X(c);
6123
6134
  return /auto|scroll|overlay|hidden|clip/.test(t + i + e) && !ii.has(s);
6124
6135
  }
6125
6136
  const si = /* @__PURE__ */ new Set(["table", "td", "th"]);
6126
- function oi(h) {
6127
- return si.has(Z(h));
6137
+ function oi(c) {
6138
+ return si.has(Z(c));
6128
6139
  }
6129
6140
  const ri = [":popover-open", ":modal"];
6130
- function xt(h) {
6141
+ function xt(c) {
6131
6142
  return ri.some((t) => {
6132
6143
  try {
6133
- return h.matches(t);
6144
+ return c.matches(t);
6134
6145
  } catch {
6135
6146
  return !1;
6136
6147
  }
6137
6148
  });
6138
6149
  }
6139
6150
  const ni = ["transform", "translate", "scale", "rotate", "perspective"], ai = ["transform", "translate", "scale", "rotate", "perspective", "filter"], li = ["paint", "layout", "strict", "content"];
6140
- function St(h) {
6141
- const t = Tt(), e = B(h) ? X(h) : h;
6151
+ function St(c) {
6152
+ const t = Tt(), e = B(c) ? X(c) : c;
6142
6153
  return ni.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) || ai.some((i) => (e.willChange || "").includes(i)) || li.some((i) => (e.contain || "").includes(i));
6143
6154
  }
6144
- function ci(h) {
6145
- let t = P(h);
6155
+ function hi(c) {
6156
+ let t = P(c);
6146
6157
  for (; K(t) && !q(t); ) {
6147
6158
  if (St(t))
6148
6159
  return t;
@@ -6155,66 +6166,66 @@ function ci(h) {
6155
6166
  function Tt() {
6156
6167
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
6157
6168
  }
6158
- const hi = /* @__PURE__ */ new Set(["html", "body", "#document"]);
6159
- function q(h) {
6160
- return hi.has(Z(h));
6169
+ const ci = /* @__PURE__ */ new Set(["html", "body", "#document"]);
6170
+ function q(c) {
6171
+ return ci.has(Z(c));
6161
6172
  }
6162
- function X(h) {
6163
- return N(h).getComputedStyle(h);
6173
+ function X(c) {
6174
+ return N(c).getComputedStyle(c);
6164
6175
  }
6165
- function gt(h) {
6166
- return B(h) ? {
6167
- scrollLeft: h.scrollLeft,
6168
- scrollTop: h.scrollTop
6176
+ function gt(c) {
6177
+ return B(c) ? {
6178
+ scrollLeft: c.scrollLeft,
6179
+ scrollTop: c.scrollTop
6169
6180
  } : {
6170
- scrollLeft: h.scrollX,
6171
- scrollTop: h.scrollY
6181
+ scrollLeft: c.scrollX,
6182
+ scrollTop: c.scrollY
6172
6183
  };
6173
6184
  }
6174
- function P(h) {
6175
- if (Z(h) === "html")
6176
- return h;
6185
+ function P(c) {
6186
+ if (Z(c) === "html")
6187
+ return c;
6177
6188
  const t = (
6178
6189
  // Step into the shadow DOM of the parent of a slotted node.
6179
- h.assignedSlot || // DOM Element detected.
6180
- h.parentNode || // ShadowRoot detected.
6181
- Wt(h) && h.host || // Fallback.
6182
- F(h)
6190
+ c.assignedSlot || // DOM Element detected.
6191
+ c.parentNode || // ShadowRoot detected.
6192
+ Wt(c) && c.host || // Fallback.
6193
+ F(c)
6183
6194
  );
6184
6195
  return Wt(t) ? t.host : t;
6185
6196
  }
6186
- function se(h) {
6187
- const t = P(h);
6188
- return q(t) ? h.ownerDocument ? h.ownerDocument.body : h.body : K(t) && it(t) ? t : se(t);
6197
+ function se(c) {
6198
+ const t = P(c);
6199
+ return q(t) ? c.ownerDocument ? c.ownerDocument.body : c.body : K(t) && it(t) ? t : se(t);
6189
6200
  }
6190
- function Q(h, t, e) {
6201
+ function Q(c, t, e) {
6191
6202
  var i;
6192
6203
  t === void 0 && (t = []), e === void 0 && (e = !0);
6193
- const s = se(h), o = s === ((i = h.ownerDocument) == null ? void 0 : i.body), r = N(s);
6204
+ const s = se(c), o = s === ((i = c.ownerDocument) == null ? void 0 : i.body), r = N(s);
6194
6205
  if (o) {
6195
- const a = Ct(r);
6206
+ const a = yt(r);
6196
6207
  return t.concat(r, r.visualViewport || [], it(s) ? s : [], a && e ? Q(a) : []);
6197
6208
  }
6198
6209
  return t.concat(s, Q(s, [], e));
6199
6210
  }
6200
- function Ct(h) {
6201
- return h.parent && Object.getPrototypeOf(h.parent) ? h.frameElement : null;
6211
+ function yt(c) {
6212
+ return c.parent && Object.getPrototypeOf(c.parent) ? c.frameElement : null;
6202
6213
  }
6203
- function oe(h) {
6204
- const t = X(h);
6214
+ function oe(c) {
6215
+ const t = X(c);
6205
6216
  let e = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
6206
- const s = K(h), o = s ? h.offsetWidth : e, r = s ? h.offsetHeight : i, a = at(e) !== o || at(i) !== r;
6217
+ const s = K(c), o = s ? c.offsetWidth : e, r = s ? c.offsetHeight : i, a = at(e) !== o || at(i) !== r;
6207
6218
  return a && (e = o, i = r), {
6208
6219
  width: e,
6209
6220
  height: i,
6210
6221
  $: a
6211
6222
  };
6212
6223
  }
6213
- function Ot(h) {
6214
- return B(h) ? h : h.contextElement;
6224
+ function Ot(c) {
6225
+ return B(c) ? c : c.contextElement;
6215
6226
  }
6216
- function U(h) {
6217
- const t = Ot(h);
6227
+ function U(c) {
6228
+ const t = Ot(c);
6218
6229
  if (!K(t))
6219
6230
  return Y(1);
6220
6231
  const e = t.getBoundingClientRect(), {
@@ -6229,86 +6240,86 @@ function U(h) {
6229
6240
  };
6230
6241
  }
6231
6242
  const di = /* @__PURE__ */ Y(0);
6232
- function re(h) {
6233
- const t = N(h);
6243
+ function re(c) {
6244
+ const t = N(c);
6234
6245
  return !Tt() || !t.visualViewport ? di : {
6235
6246
  x: t.visualViewport.offsetLeft,
6236
6247
  y: t.visualViewport.offsetTop
6237
6248
  };
6238
6249
  }
6239
- function fi(h, t, e) {
6240
- return t === void 0 && (t = !1), !e || t && e !== N(h) ? !1 : t;
6250
+ function fi(c, t, e) {
6251
+ return t === void 0 && (t = !1), !e || t && e !== N(c) ? !1 : t;
6241
6252
  }
6242
- function G(h, t, e, i) {
6253
+ function G(c, t, e, i) {
6243
6254
  t === void 0 && (t = !1), e === void 0 && (e = !1);
6244
- const s = h.getBoundingClientRect(), o = Ot(h);
6255
+ const s = c.getBoundingClientRect(), o = Ot(c);
6245
6256
  let r = Y(1);
6246
- t && (i ? B(i) && (r = U(i)) : r = U(h));
6257
+ t && (i ? B(i) && (r = U(i)) : r = U(c));
6247
6258
  const a = fi(o, e, i) ? re(o) : Y(0);
6248
- let l = (s.left + a.x) / r.x, c = (s.top + a.y) / r.y, d = s.width / r.x, f = s.height / r.y;
6259
+ let l = (s.left + a.x) / r.x, h = (s.top + a.y) / r.y, d = s.width / r.x, f = s.height / r.y;
6249
6260
  if (o) {
6250
6261
  const x = N(o), u = i && B(i) ? N(i) : i;
6251
- let g = x, m = Ct(g);
6262
+ let g = x, m = yt(g);
6252
6263
  for (; m && i && u !== g; ) {
6253
- const w = U(m), E = m.getBoundingClientRect(), p = X(m), C = E.left + (m.clientLeft + parseFloat(p.paddingLeft)) * w.x, b = E.top + (m.clientTop + parseFloat(p.paddingTop)) * w.y;
6254
- l *= w.x, c *= w.y, d *= w.x, f *= w.y, l += C, c += b, g = N(m), m = Ct(g);
6264
+ const w = U(m), E = m.getBoundingClientRect(), p = X(m), y = E.left + (m.clientLeft + parseFloat(p.paddingLeft)) * w.x, b = E.top + (m.clientTop + parseFloat(p.paddingTop)) * w.y;
6265
+ l *= w.x, h *= w.y, d *= w.x, f *= w.y, l += y, h += b, g = N(m), m = yt(g);
6255
6266
  }
6256
6267
  }
6257
- return ct({
6268
+ return ht({
6258
6269
  width: d,
6259
6270
  height: f,
6260
6271
  x: l,
6261
- y: c
6272
+ y: h
6262
6273
  });
6263
6274
  }
6264
- function Lt(h, t) {
6265
- const e = gt(h).scrollLeft;
6266
- return t ? t.left + e : G(F(h)).left + e;
6275
+ function Lt(c, t) {
6276
+ const e = gt(c).scrollLeft;
6277
+ return t ? t.left + e : G(F(c)).left + e;
6267
6278
  }
6268
- function ne(h, t, e) {
6279
+ function ne(c, t, e) {
6269
6280
  e === void 0 && (e = !1);
6270
- const i = h.getBoundingClientRect(), s = i.left + t.scrollLeft - (e ? 0 : (
6281
+ const i = c.getBoundingClientRect(), s = i.left + t.scrollLeft - (e ? 0 : (
6271
6282
  // RTL <body> scrollbar.
6272
- Lt(h, i)
6283
+ Lt(c, i)
6273
6284
  )), o = i.top + t.scrollTop;
6274
6285
  return {
6275
6286
  x: s,
6276
6287
  y: o
6277
6288
  };
6278
6289
  }
6279
- function ui(h) {
6290
+ function ui(c) {
6280
6291
  let {
6281
6292
  elements: t,
6282
6293
  rect: e,
6283
6294
  offsetParent: i,
6284
6295
  strategy: s
6285
- } = h;
6296
+ } = c;
6286
6297
  const o = s === "fixed", r = F(i), a = t ? xt(t.floating) : !1;
6287
6298
  if (i === r || a && o)
6288
6299
  return e;
6289
6300
  let l = {
6290
6301
  scrollLeft: 0,
6291
6302
  scrollTop: 0
6292
- }, c = Y(1);
6303
+ }, h = Y(1);
6293
6304
  const d = Y(0), f = K(i);
6294
6305
  if ((f || !f && !o) && ((Z(i) !== "body" || it(r)) && (l = gt(i)), K(i))) {
6295
6306
  const u = G(i);
6296
- c = U(i), d.x = u.x + i.clientLeft, d.y = u.y + i.clientTop;
6307
+ h = U(i), d.x = u.x + i.clientLeft, d.y = u.y + i.clientTop;
6297
6308
  }
6298
6309
  const x = r && !f && !o ? ne(r, l, !0) : Y(0);
6299
6310
  return {
6300
- width: e.width * c.x,
6301
- height: e.height * c.y,
6302
- x: e.x * c.x - l.scrollLeft * c.x + d.x + x.x,
6303
- y: e.y * c.y - l.scrollTop * c.y + d.y + x.y
6311
+ width: e.width * h.x,
6312
+ height: e.height * h.y,
6313
+ x: e.x * h.x - l.scrollLeft * h.x + d.x + x.x,
6314
+ y: e.y * h.y - l.scrollTop * h.y + d.y + x.y
6304
6315
  };
6305
6316
  }
6306
- function xi(h) {
6307
- return Array.from(h.getClientRects());
6317
+ function xi(c) {
6318
+ return Array.from(c.getClientRects());
6308
6319
  }
6309
- function gi(h) {
6310
- const t = F(h), e = gt(h), i = h.ownerDocument.body, s = z(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = z(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight);
6311
- let r = -e.scrollLeft + Lt(h);
6320
+ function gi(c) {
6321
+ const t = F(c), e = gt(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);
6322
+ let r = -e.scrollLeft + Lt(c);
6312
6323
  const a = -e.scrollTop;
6313
6324
  return X(i).direction === "rtl" && (r += z(t.clientWidth, i.clientWidth) - s), {
6314
6325
  width: s,
@@ -6317,13 +6328,13 @@ function gi(h) {
6317
6328
  y: a
6318
6329
  };
6319
6330
  }
6320
- function wi(h, t) {
6321
- const e = N(h), i = F(h), s = e.visualViewport;
6331
+ function wi(c, t) {
6332
+ const e = N(c), i = F(c), s = e.visualViewport;
6322
6333
  let o = i.clientWidth, r = i.clientHeight, a = 0, l = 0;
6323
6334
  if (s) {
6324
6335
  o = s.width, r = s.height;
6325
- const c = Tt();
6326
- (!c || c && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
6336
+ const h = Tt();
6337
+ (!h || h && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
6327
6338
  }
6328
6339
  return {
6329
6340
  width: o,
@@ -6333,25 +6344,25 @@ function wi(h, t) {
6333
6344
  };
6334
6345
  }
6335
6346
  const mi = /* @__PURE__ */ new Set(["absolute", "fixed"]);
6336
- function Ei(h, t) {
6337
- const e = G(h, !0, t === "fixed"), i = e.top + h.clientTop, s = e.left + h.clientLeft, o = K(h) ? U(h) : Y(1), r = h.clientWidth * o.x, a = h.clientHeight * o.y, l = s * o.x, c = i * o.y;
6347
+ function Ei(c, t) {
6348
+ const e = G(c, !0, t === "fixed"), i = e.top + c.clientTop, s = e.left + c.clientLeft, o = K(c) ? U(c) : Y(1), r = c.clientWidth * o.x, a = c.clientHeight * o.y, l = s * o.x, h = i * o.y;
6338
6349
  return {
6339
6350
  width: r,
6340
6351
  height: a,
6341
6352
  x: l,
6342
- y: c
6353
+ y: h
6343
6354
  };
6344
6355
  }
6345
- function Vt(h, t, e) {
6356
+ function Vt(c, t, e) {
6346
6357
  let i;
6347
6358
  if (t === "viewport")
6348
- i = wi(h, e);
6359
+ i = wi(c, e);
6349
6360
  else if (t === "document")
6350
- i = gi(F(h));
6361
+ i = gi(F(c));
6351
6362
  else if (B(t))
6352
6363
  i = Ei(t, e);
6353
6364
  else {
6354
- const s = re(h);
6365
+ const s = re(c);
6355
6366
  i = {
6356
6367
  x: t.x - s.x,
6357
6368
  y: t.y - s.y,
@@ -6359,35 +6370,35 @@ function Vt(h, t, e) {
6359
6370
  height: t.height
6360
6371
  };
6361
6372
  }
6362
- return ct(i);
6373
+ return ht(i);
6363
6374
  }
6364
- function ae(h, t) {
6365
- const e = P(h);
6375
+ function ae(c, t) {
6376
+ const e = P(c);
6366
6377
  return e === t || !B(e) || q(e) ? !1 : X(e).position === "fixed" || ae(e, t);
6367
6378
  }
6368
- function pi(h, t) {
6369
- const e = t.get(h);
6379
+ function pi(c, t) {
6380
+ const e = t.get(c);
6370
6381
  if (e)
6371
6382
  return e;
6372
- let i = Q(h, [], !1).filter((a) => B(a) && Z(a) !== "body"), s = null;
6373
- const o = X(h).position === "fixed";
6374
- let r = o ? P(h) : h;
6383
+ let i = Q(c, [], !1).filter((a) => B(a) && Z(a) !== "body"), s = null;
6384
+ const o = X(c).position === "fixed";
6385
+ let r = o ? P(c) : c;
6375
6386
  for (; B(r) && !q(r); ) {
6376
6387
  const a = X(r), l = St(r);
6377
- !l && a.position === "fixed" && (s = null), (o ? !l && !s : !l && a.position === "static" && !!s && mi.has(s.position) || it(r) && !l && ae(h, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
6388
+ !l && a.position === "fixed" && (s = null), (o ? !l && !s : !l && a.position === "static" && !!s && mi.has(s.position) || it(r) && !l && ae(c, r)) ? i = i.filter((d) => d !== r) : s = a, r = P(r);
6378
6389
  }
6379
- return t.set(h, i), i;
6390
+ return t.set(c, i), i;
6380
6391
  }
6381
- function Ci(h) {
6392
+ function yi(c) {
6382
6393
  let {
6383
6394
  element: t,
6384
6395
  boundary: e,
6385
6396
  rootBoundary: i,
6386
6397
  strategy: s
6387
- } = h;
6388
- const r = [...e === "clippingAncestors" ? xt(t) ? [] : pi(t, this._c) : [].concat(e), i], a = r[0], l = r.reduce((c, d) => {
6398
+ } = c;
6399
+ const r = [...e === "clippingAncestors" ? xt(t) ? [] : pi(t, this._c) : [].concat(e), i], a = r[0], l = r.reduce((h, d) => {
6389
6400
  const f = Vt(t, d, s);
6390
- return c.top = z(f.top, c.top), c.right = j(f.right, c.right), c.bottom = j(f.bottom, c.bottom), c.left = z(f.left, c.left), c;
6401
+ return h.top = z(f.top, h.top), h.right = j(f.right, h.right), h.bottom = j(f.bottom, h.bottom), h.left = z(f.left, h.left), h;
6391
6402
  }, Vt(t, a, s));
6392
6403
  return {
6393
6404
  width: l.right - l.left,
@@ -6396,32 +6407,32 @@ function Ci(h) {
6396
6407
  y: l.top
6397
6408
  };
6398
6409
  }
6399
- function yi(h) {
6410
+ function Ci(c) {
6400
6411
  const {
6401
6412
  width: t,
6402
6413
  height: e
6403
- } = oe(h);
6414
+ } = oe(c);
6404
6415
  return {
6405
6416
  width: t,
6406
6417
  height: e
6407
6418
  };
6408
6419
  }
6409
- function bi(h, t, e) {
6410
- const i = K(t), s = F(t), o = e === "fixed", r = G(h, !0, o, t);
6420
+ function bi(c, t, e) {
6421
+ const i = K(t), s = F(t), o = e === "fixed", r = G(c, !0, o, t);
6411
6422
  let a = {
6412
6423
  scrollLeft: 0,
6413
6424
  scrollTop: 0
6414
6425
  };
6415
6426
  const l = Y(0);
6416
- function c() {
6427
+ function h() {
6417
6428
  l.x = Lt(s);
6418
6429
  }
6419
6430
  if (i || !i && !o)
6420
6431
  if ((Z(t) !== "body" || it(s)) && (a = gt(t)), i) {
6421
6432
  const u = G(t, !0, o, t);
6422
6433
  l.x = u.x + t.clientLeft, l.y = u.y + t.clientTop;
6423
- } else s && c();
6424
- o && !i && s && c();
6434
+ } else s && h();
6435
+ o && !i && s && h();
6425
6436
  const d = s && !i && !o ? ne(s, a) : Y(0), f = r.left + a.scrollLeft - l.x - d.x, x = r.top + a.scrollTop - l.y - d.y;
6426
6437
  return {
6427
6438
  x: f,
@@ -6430,23 +6441,23 @@ function bi(h, t, e) {
6430
6441
  height: r.height
6431
6442
  };
6432
6443
  }
6433
- function wt(h) {
6434
- return X(h).position === "static";
6444
+ function wt(c) {
6445
+ return X(c).position === "static";
6435
6446
  }
6436
- function Pt(h, t) {
6437
- if (!K(h) || X(h).position === "fixed")
6447
+ function Pt(c, t) {
6448
+ if (!K(c) || X(c).position === "fixed")
6438
6449
  return null;
6439
6450
  if (t)
6440
- return t(h);
6441
- let e = h.offsetParent;
6442
- return F(h) === e && (e = e.ownerDocument.body), e;
6451
+ return t(c);
6452
+ let e = c.offsetParent;
6453
+ return F(c) === e && (e = e.ownerDocument.body), e;
6443
6454
  }
6444
- function le(h, t) {
6445
- const e = N(h);
6446
- if (xt(h))
6455
+ function le(c, t) {
6456
+ const e = N(c);
6457
+ if (xt(c))
6447
6458
  return e;
6448
- if (!K(h)) {
6449
- let s = P(h);
6459
+ if (!K(c)) {
6460
+ let s = P(c);
6450
6461
  for (; s && !q(s); ) {
6451
6462
  if (B(s) && !wt(s))
6452
6463
  return s;
@@ -6454,15 +6465,15 @@ function le(h, t) {
6454
6465
  }
6455
6466
  return e;
6456
6467
  }
6457
- let i = Pt(h, t);
6468
+ let i = Pt(c, t);
6458
6469
  for (; i && oi(i) && wt(i); )
6459
6470
  i = Pt(i, t);
6460
- return i && q(i) && wt(i) && !St(i) ? e : i || ci(h) || e;
6471
+ return i && q(i) && wt(i) && !St(i) ? e : i || hi(c) || e;
6461
6472
  }
6462
- const vi = async function(h) {
6463
- const t = this.getOffsetParent || le, e = this.getDimensions, i = await e(h.floating);
6473
+ const vi = async function(c) {
6474
+ const t = this.getOffsetParent || le, e = this.getDimensions, i = await e(c.floating);
6464
6475
  return {
6465
- reference: bi(h.reference, await t(h.floating), h.strategy),
6476
+ reference: bi(c.reference, await t(c.floating), c.strategy),
6466
6477
  floating: {
6467
6478
  x: 0,
6468
6479
  y: 0,
@@ -6471,47 +6482,47 @@ const vi = async function(h) {
6471
6482
  }
6472
6483
  };
6473
6484
  };
6474
- function Ii(h) {
6475
- return X(h).direction === "rtl";
6485
+ function Ii(c) {
6486
+ return X(c).direction === "rtl";
6476
6487
  }
6477
6488
  const Ri = {
6478
6489
  convertOffsetParentRelativeRectToViewportRelativeRect: ui,
6479
6490
  getDocumentElement: F,
6480
- getClippingRect: Ci,
6491
+ getClippingRect: yi,
6481
6492
  getOffsetParent: le,
6482
6493
  getElementRects: vi,
6483
6494
  getClientRects: xi,
6484
- getDimensions: yi,
6495
+ getDimensions: Ci,
6485
6496
  getScale: U,
6486
6497
  isElement: B,
6487
6498
  isRTL: Ii
6488
6499
  };
6489
- function ce(h, t) {
6490
- return h.x === t.x && h.y === t.y && h.width === t.width && h.height === t.height;
6500
+ function he(c, t) {
6501
+ return c.x === t.x && c.y === t.y && c.width === t.width && c.height === t.height;
6491
6502
  }
6492
- function _i(h, t) {
6503
+ function _i(c, t) {
6493
6504
  let e = null, i;
6494
- const s = F(h);
6505
+ const s = F(c);
6495
6506
  function o() {
6496
6507
  var a;
6497
6508
  clearTimeout(i), (a = e) == null || a.disconnect(), e = null;
6498
6509
  }
6499
6510
  function r(a, l) {
6500
6511
  a === void 0 && (a = !1), l === void 0 && (l = 1), o();
6501
- const c = h.getBoundingClientRect(), {
6512
+ const h = c.getBoundingClientRect(), {
6502
6513
  left: d,
6503
6514
  top: f,
6504
6515
  width: x,
6505
6516
  height: u
6506
- } = c;
6517
+ } = h;
6507
6518
  if (a || t(), !x || !u)
6508
6519
  return;
6509
- const g = st(f), m = st(s.clientWidth - (d + x)), w = st(s.clientHeight - (f + u)), E = st(d), C = {
6520
+ const g = st(f), m = st(s.clientWidth - (d + x)), w = st(s.clientHeight - (f + u)), E = st(d), y = {
6510
6521
  rootMargin: -g + "px " + -m + "px " + -w + "px " + -E + "px",
6511
6522
  threshold: z(0, j(1, l)) || 1
6512
6523
  };
6513
6524
  let b = !0;
6514
- function y(R) {
6525
+ function C(R) {
6515
6526
  const S = R[0].intersectionRatio;
6516
6527
  if (S !== l) {
6517
6528
  if (!b)
@@ -6520,22 +6531,22 @@ function _i(h, t) {
6520
6531
  r(!1, 1e-7);
6521
6532
  }, 1e3);
6522
6533
  }
6523
- S === 1 && !ce(c, h.getBoundingClientRect()) && r(), b = !1;
6534
+ S === 1 && !he(h, c.getBoundingClientRect()) && r(), b = !1;
6524
6535
  }
6525
6536
  try {
6526
- e = new IntersectionObserver(y, {
6527
- ...C,
6537
+ e = new IntersectionObserver(C, {
6538
+ ...y,
6528
6539
  // Handle <iframe>s
6529
6540
  root: s.ownerDocument
6530
6541
  });
6531
6542
  } catch {
6532
- e = new IntersectionObserver(y, C);
6543
+ e = new IntersectionObserver(C, y);
6533
6544
  }
6534
- e.observe(h);
6545
+ e.observe(c);
6535
6546
  }
6536
6547
  return r(!0), o;
6537
6548
  }
6538
- function yt(h, t, e, i) {
6549
+ function Ct(c, t, e, i) {
6539
6550
  i === void 0 && (i = {});
6540
6551
  const {
6541
6552
  ancestorScroll: s = !0,
@@ -6543,26 +6554,26 @@ function yt(h, t, e, i) {
6543
6554
  elementResize: r = typeof ResizeObserver == "function",
6544
6555
  layoutShift: a = typeof IntersectionObserver == "function",
6545
6556
  animationFrame: l = !1
6546
- } = i, c = Ot(h), d = s || o ? [...c ? Q(c) : [], ...Q(t)] : [];
6557
+ } = i, h = Ot(c), d = s || o ? [...h ? Q(h) : [], ...Q(t)] : [];
6547
6558
  d.forEach((E) => {
6548
6559
  s && E.addEventListener("scroll", e, {
6549
6560
  passive: !0
6550
6561
  }), o && E.addEventListener("resize", e);
6551
6562
  });
6552
- const f = c && a ? _i(c, e) : null;
6563
+ const f = h && a ? _i(h, e) : null;
6553
6564
  let x = -1, u = null;
6554
6565
  r && (u = new ResizeObserver((E) => {
6555
6566
  let [p] = E;
6556
- p && p.target === c && u && (u.unobserve(t), cancelAnimationFrame(x), x = requestAnimationFrame(() => {
6557
- var C;
6558
- (C = u) == null || C.observe(t);
6567
+ p && p.target === h && u && (u.unobserve(t), cancelAnimationFrame(x), x = requestAnimationFrame(() => {
6568
+ var y;
6569
+ (y = u) == null || y.observe(t);
6559
6570
  })), e();
6560
- }), c && !l && u.observe(c), u.observe(t));
6561
- let g, m = l ? G(h) : null;
6571
+ }), h && !l && u.observe(h), u.observe(t));
6572
+ let g, m = l ? G(c) : null;
6562
6573
  l && w();
6563
6574
  function w() {
6564
- const E = G(h);
6565
- m && !ce(m, E) && e(), m = E, g = requestAnimationFrame(w);
6575
+ const E = G(c);
6576
+ m && !he(m, E) && e(), m = E, g = requestAnimationFrame(w);
6566
6577
  }
6567
6578
  return e(), () => {
6568
6579
  var E;
@@ -6571,7 +6582,7 @@ function yt(h, t, e, i) {
6571
6582
  }), f == null || f(), (E = u) == null || E.disconnect(), u = null, l && cancelAnimationFrame(g);
6572
6583
  };
6573
6584
  }
6574
- const ht = ti, dt = ei, Mt = Ze, Si = qe, ft = (h, t, e) => {
6585
+ const ct = ti, dt = ei, Mt = Ze, Si = qe, ft = (c, t, e) => {
6575
6586
  const i = /* @__PURE__ */ new Map(), s = {
6576
6587
  platform: Ri,
6577
6588
  ...e
@@ -6579,7 +6590,7 @@ const ht = ti, dt = ei, Mt = Ze, Si = qe, ft = (h, t, e) => {
6579
6590
  ...s.platform,
6580
6591
  _c: i
6581
6592
  };
6582
- return je(h, t, {
6593
+ return je(c, t, {
6583
6594
  ...s,
6584
6595
  platform: o
6585
6596
  });
@@ -6637,61 +6648,65 @@ let Ti = class {
6637
6648
  this.floatingEl.contains(e.target) || this.hide();
6638
6649
  }), this.ctx.on("cellFooterHoverChange", (t, e) => {
6639
6650
  this.floatingEl.contains(e.target) || t.ellipsis && this.show(t);
6651
+ }), this.ctx.on("cellShowTooltip", (t, e) => {
6652
+ this.show(t, e);
6653
+ }), this.ctx.on("cellHideTooltip", () => {
6654
+ this.hide();
6640
6655
  });
6641
6656
  }
6642
- show(t) {
6657
+ show(t, e) {
6643
6658
  if (this.ctx.contextMenuIng || !t.overflowTooltipShow || this.ctx.mousedown)
6644
6659
  return;
6645
6660
  this.floatingEl.style.display = "block";
6646
- let e = t.getText();
6647
- t.message && (e = t.message);
6648
- const i = this.ctx.containerElement.getBoundingClientRect();
6649
- if (!i)
6661
+ let i = t.getText();
6662
+ t.message && (i = t.message), e && (i = e);
6663
+ const s = this.ctx.containerElement.getBoundingClientRect();
6664
+ if (!s)
6650
6665
  return;
6651
- 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;
6652
- const s = t.drawX + i.x, o = t.drawY + i.y;
6666
+ 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 = i;
6667
+ const o = t.drawX + s.x, r = t.drawY + s.y;
6653
6668
  ft({
6654
6669
  getBoundingClientRect() {
6655
6670
  return {
6656
6671
  width: t.visibleWidth,
6657
6672
  height: t.visibleHeight,
6658
- x: s,
6659
- y: o,
6660
- left: s,
6661
- right: s + t.visibleWidth,
6662
- top: o,
6663
- bottom: o + t.visibleHeight
6673
+ x: o,
6674
+ y: r,
6675
+ left: o,
6676
+ right: o + t.visibleWidth,
6677
+ top: r,
6678
+ bottom: r + t.visibleHeight
6664
6679
  };
6665
6680
  }
6666
6681
  }, this.floatingEl, {
6667
6682
  placement: t.overflowTooltipPlacement,
6668
- middleware: [dt(), Mt(), ht(6), Si({ element: this.arrowEl })]
6669
- }).then((a) => {
6670
- const { x: l, y: c, placement: d, middlewareData: f } = a;
6683
+ middleware: [dt(), Mt(), ct(6), Si({ element: this.arrowEl })]
6684
+ }).then((l) => {
6685
+ const { x: h, y: d, placement: f, middlewareData: x } = l;
6671
6686
  if (Object.assign(this.floatingEl.style, {
6672
- top: `${c}px`,
6673
- left: `${l}px`
6674
- }), f.arrow) {
6675
- const x = f.arrow;
6676
- ["left", "left-start", "left-end"].includes(d) ? Object.assign(this.arrowEl.style, {
6677
- top: `${x.y}px`,
6687
+ top: `${d}px`,
6688
+ left: `${h}px`
6689
+ }), x.arrow) {
6690
+ const u = x.arrow;
6691
+ ["left", "left-start", "left-end"].includes(f) ? Object.assign(this.arrowEl.style, {
6692
+ top: `${u.y}px`,
6678
6693
  bottom: "",
6679
6694
  left: "",
6680
6695
  right: "-5px"
6681
- }) : ["right", "right-start", "right-end"].includes(d) ? Object.assign(this.arrowEl.style, {
6682
- top: `${x.y}px`,
6696
+ }) : ["right", "right-start", "right-end"].includes(f) ? Object.assign(this.arrowEl.style, {
6697
+ top: `${u.y}px`,
6683
6698
  bottom: "",
6684
6699
  left: "-5px",
6685
6700
  right: ""
6686
- }) : ["bottom", "bottom-start", "bottom-end"].includes(d) ? Object.assign(this.arrowEl.style, {
6701
+ }) : ["bottom", "bottom-start", "bottom-end"].includes(f) ? Object.assign(this.arrowEl.style, {
6687
6702
  top: "-5px",
6688
6703
  bottom: "",
6689
- left: `${x.x}px`,
6704
+ left: `${u.x}px`,
6690
6705
  right: ""
6691
- }) : ["top", "top-start", "top-end"].includes(d) && Object.assign(this.arrowEl.style, {
6706
+ }) : ["top", "top-start", "top-end"].includes(f) && Object.assign(this.arrowEl.style, {
6692
6707
  top: "",
6693
6708
  bottom: "-5px",
6694
- left: `${x.x}px`,
6709
+ left: `${u.x}px`,
6695
6710
  right: ""
6696
6711
  });
6697
6712
  }
@@ -6726,8 +6741,6 @@ class Oi {
6726
6741
  this.selectorArrStr = JSON.stringify(e) + JSON.stringify(i);
6727
6742
  }), this.ctx.on("onScroll", () => {
6728
6743
  this.enable && this.doneEdit();
6729
- }), this.ctx.on("cellHeaderMousedown", () => {
6730
- this.enable && this.doneEdit(), this.cellTarget = null;
6731
6744
  }), this.ctx.on("hoverIconClick", (t) => {
6732
6745
  this.ctx.disableHoverIconClick || this.editCell(t.rowIndex, t.colIndex);
6733
6746
  }), this.ctx.on("cellMousedown", () => {
@@ -6743,8 +6756,8 @@ class Oi {
6743
6756
  }
6744
6757
  if ((t.altKey || t.metaKey) && t.code === "Enter" && this.ctx.editing && this.inputEl) {
6745
6758
  t.preventDefault();
6746
- const l = this.inputEl.selectionStart, c = this.inputEl.value.substring(0, l), d = this.inputEl.value.substring(l);
6747
- this.inputEl.value = c + `
6759
+ const l = this.inputEl.selectionStart, h = this.inputEl.value.substring(0, l), d = this.inputEl.value.substring(l);
6760
+ this.inputEl.value = h + `
6748
6761
  ` + d, this.inputEl.selectionStart = this.inputEl.selectionEnd = l + 1, this.autoSize();
6749
6762
  return;
6750
6763
  }
@@ -6818,6 +6831,8 @@ class Oi {
6818
6831
  }
6819
6832
  this.ctx.selectOnlyOne && this.startEdit();
6820
6833
  }
6834
+ }), this.ctx.on("mousedownBodyOutside", () => {
6835
+ this.enable && this.doneEdit(), this.cellTarget = null;
6821
6836
  });
6822
6837
  }
6823
6838
  isInSelectorRange(t, e) {
@@ -6828,16 +6843,17 @@ class Oi {
6828
6843
  this.inputEl = document.createElement("textarea"), this.inputEl.id = "e-virt-table-editor-textarea", this.inputEl.setAttribute("rows", "1"), this.inputEl.setAttribute("tabindex", "-1"), this.inputEl.addEventListener("input", this.autoSize.bind(this)), this.editorEl = this.ctx.editorElement, this.inputEl.className = "e-virt-table-editor-textarea", this.editorEl.appendChild(this.inputEl), this.ctx.containerElement.appendChild(this.editorEl);
6829
6844
  }
6830
6845
  autoSize() {
6831
- this.inputEl.style.height = "auto";
6832
- let t = this.inputEl.scrollHeight, e = this.ctx.body.visibleHeight;
6833
- t > e && (t = e);
6846
+ const t = this.inputEl.value;
6847
+ this.cellTarget && this.cellTarget.type === "number" && t !== "" && (this.ctx.emit("cellHideTooltip"), /^-?\d+(\.\d+)?$/.test(t) || this.ctx.emit("cellShowTooltip", this.cellTarget, this.ctx.config.NUMBER_ERROR_TIP)), this.inputEl.style.height = "auto";
6848
+ let e = this.inputEl.scrollHeight, i = this.ctx.body.visibleHeight;
6849
+ e > i && (e = i);
6834
6850
  const {
6835
- stageHeight: i,
6836
- footer: s,
6837
- header: o,
6838
- config: { SCROLLER_TRACK_SIZE: r }
6839
- } = this.ctx, a = i - s.height - r;
6840
- this.editorEl.style.bottom = "auto", this.drawY < o.height && (this.editorEl.style.top = `${o.height - 1}px`), this.drawY + t > a && (this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = "auto", this.editorEl.style.bottom = `${i - a}px`), this.inputEl.style.height = `${t}px`;
6851
+ stageHeight: s,
6852
+ footer: o,
6853
+ header: r,
6854
+ config: { SCROLLER_TRACK_SIZE: a }
6855
+ } = this.ctx, l = s - o.height - a;
6856
+ this.editorEl.style.bottom = "auto", this.drawY < r.height && (this.editorEl.style.top = `${r.height - 1}px`), this.drawY + e > l && (this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = "auto", this.editorEl.style.bottom = `${s - l}px`), this.inputEl.style.height = `${e}px`;
6841
6857
  }
6842
6858
  startEditByInput(t, e = !1) {
6843
6859
  const i = e ? null : t.getValue(), { editorType: s } = t;
@@ -6847,11 +6863,11 @@ class Oi {
6847
6863
  let { height: o, width: r, drawY: a, drawX: l } = t;
6848
6864
  this.drawX = l, this.drawY = a;
6849
6865
  const {
6850
- config: { CELL_PADDING: c },
6866
+ config: { CELL_PADDING: h },
6851
6867
  header: d
6852
6868
  } = this.ctx;
6853
6869
  let f = this.ctx.body.visibleHeight;
6854
- o > f && (o = f), this.editorEl.style.display = "inline-block", this.editorEl.style.zIndex = "100", this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = `${this.drawY - 1}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxHeight = `${f}px`, s === "text" ? (this.inputEl.style.display = "inline-block", this.inputEl.style.minWidth = `${r - 1}px`, this.inputEl.style.minHeight = `${o - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${r - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${c}px`, this.inputEl.value = "", i !== null && (this.inputEl.value = i, this.inputEl.focus({ preventScroll: !0 }))) : this.inputEl.style.display = "none", (this.inputEl.scrollHeight > o || this.drawY < d.height) && this.autoSize();
6870
+ o > f && (o = f), this.editorEl.style.display = "inline-block", this.editorEl.style.zIndex = "100", this.editorEl.style.left = `${this.drawX - 1}px`, this.editorEl.style.top = `${this.drawY - 1}px`, this.editorEl.style.bottom = "auto", this.editorEl.style.maxHeight = `${f}px`, s === "text" ? (this.inputEl.style.display = "inline-block", this.inputEl.style.minWidth = `${r - 1}px`, this.inputEl.style.minHeight = `${o - 1}px`, this.inputEl.style.maxHeight = `${f}px`, this.inputEl.style.width = `${r - 1}px`, this.inputEl.style.height = "auto", this.inputEl.style.padding = `${h}px`, this.inputEl.value = "", i !== null && (this.inputEl.value = i, this.inputEl.focus({ preventScroll: !0 }))) : this.inputEl.style.display = "none", (this.inputEl.scrollHeight > o || this.drawY < d.height) && this.autoSize();
6855
6871
  }
6856
6872
  doneEditByInput() {
6857
6873
  if (this.cellTarget && this.cellTarget.editorType === "text") {
@@ -6862,7 +6878,7 @@ class Oi {
6862
6878
  startEdit(t = !1) {
6863
6879
  this.cancel = !1;
6864
6880
  const { ENABLE_EDIT_CLICK_SELECTOR: e } = this.ctx.config;
6865
- if (!e || this.ctx.adjustPositioning)
6881
+ if (!e)
6866
6882
  return;
6867
6883
  const i = this.ctx.focusCell;
6868
6884
  if (!i || ["index", "index-selection", "selection"].includes(i.type) || this.enable || !(i.isVerticalVisible() && i.isHorizontalVisible()))
@@ -6871,10 +6887,10 @@ class Oi {
6871
6887
  i && !a && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = i, this.startEditByInput(this.cellTarget, t), this.ctx.emit("startEdit", this.cellTarget), this.ctx.emit("draw"));
6872
6888
  }
6873
6889
  editCell(t, e) {
6874
- const i = this.ctx.body.renderRows.find((c) => c.rowIndex === t);
6890
+ const i = this.ctx.body.renderRows.find((h) => h.rowIndex === t);
6875
6891
  if (!i)
6876
6892
  return;
6877
- const s = i.cells.find((c) => c.colIndex === e);
6893
+ const s = i.cells.find((h) => h.colIndex === e);
6878
6894
  if (!s)
6879
6895
  return;
6880
6896
  this.ctx.emit("setSelectorCell", s);
@@ -6885,9 +6901,15 @@ class Oi {
6885
6901
  o && !l && (this.enable = !0, this.ctx.editing = !0, this.cellTarget = o, this.startEditByInput(this.cellTarget), this.ctx.emit("startEdit", this.cellTarget), this.ctx.emit("draw"));
6886
6902
  }
6887
6903
  doneEdit() {
6888
- this.enable && (this.doneEditByInput(), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.inputEl.style.display = "inline-block", this.editorEl.style.zIndex = "-1", setTimeout(() => {
6904
+ if (!this.enable)
6905
+ return;
6906
+ const {
6907
+ header: t,
6908
+ config: { CELL_HEIGHT: e }
6909
+ } = this.ctx;
6910
+ this.doneEditByInput(), this.ctx.emit("cellHideTooltip"), this.ctx.emit("doneEdit", this.cellTarget), this.enable = !1, this.ctx.editing = !1, this.inputEl.style.display = "inline-block", this.editorEl.style.left = "0px", this.editorEl.style.top = `${t.height}px`, this.editorEl.style.maxHeight = `${e}px`, this.editorEl.style.zIndex = "-1", setTimeout(() => {
6889
6911
  this.inputEl.focus({ preventScroll: !0 });
6890
- }, 0), this.ctx.emit("draw"));
6912
+ }, 0), this.ctx.emit("draw");
6891
6913
  }
6892
6914
  clearEditor() {
6893
6915
  this.doneEdit(), this.cellTarget = null, this.selectorArrStr = "", this.ctx.clearSelector(), this.ctx.focusCell = void 0, this.ctx.emit("draw");
@@ -6904,17 +6926,12 @@ let Li = class {
6904
6926
  this.ctx = t;
6905
6927
  const { EMPTY_TEXT: e, EMPTY_CUSTOM_STYLE: i } = this.ctx.config;
6906
6928
  this.ctx.emptyElement ? this.emptyEl = this.ctx.emptyElement : (this.emptyEl = document.createElement("div"), this.emptyEl.innerText = e), this.emptyEl.className = "e-virt-table-empty", this.emptyEl.style.display = "none", this.ctx.containerElement.appendChild(this.emptyEl), this.ctx.on("emptyChange", ({ type: s, headerHeight: o, bodyHeight: r, footerHeight: a }) => {
6907
- const l = o + (r + a) / 2, c = {
6929
+ const l = o + (r + a) / 2, h = {
6908
6930
  display: s === "empty" ? "block" : "none",
6909
- position: "absolute",
6910
- fontSize: "14px",
6911
- color: "#666",
6912
- left: "50%",
6913
6931
  top: `${l}px`,
6914
- transform: "translate(-50%, -50%)",
6915
6932
  ...i
6916
6933
  };
6917
- Object.assign(this.emptyEl.style, c);
6934
+ Object.assign(this.emptyEl.style, h);
6918
6935
  });
6919
6936
  }
6920
6937
  destroy() {
@@ -6939,10 +6956,10 @@ class Mi {
6939
6956
  const t = this.ctx.overlayerElement.querySelectorAll('[data-auto-height="true"]'), e = /* @__PURE__ */ new Map();
6940
6957
  t.forEach((o) => {
6941
6958
  const r = Number(o.getAttribute("data-row-index")), a = Number(o.getAttribute("data-col-index"));
6942
- if (isNaN(r) || isNaN(a) || !(o instanceof HTMLElement) || o.offsetWidth === 0)
6959
+ if (isNaN(r) || isNaN(a))
6943
6960
  return;
6944
- const l = `${r}​_${a}`;
6945
- e.set(l, Math.round(o.offsetHeight));
6961
+ const l = o.getBoundingClientRect(), h = `${r}​_${a}`;
6962
+ e.set(h, Math.round(l.height));
6946
6963
  });
6947
6964
  const i = this.ctx.database.getOverlayerAutoHeightMap();
6948
6965
  if (!this.arerMapsEqual(i, e)) {
@@ -6959,8 +6976,8 @@ class Mi {
6959
6976
  const r = document.createElement("div");
6960
6977
  Object.assign(r.style, o.style), o.cells.forEach((a) => {
6961
6978
  const l = document.createElement("div");
6962
- Object.assign(l.style, a.style), Object.keys(a.domDataset).forEach((c) => {
6963
- l.setAttribute(c, a.domDataset[c]);
6979
+ Object.assign(l.style, a.style), Object.keys(a.domDataset).forEach((h) => {
6980
+ l.setAttribute(h, a.domDataset[h]);
6964
6981
  }), typeof a.render == "function" && a.render(l, a), r.appendChild(l);
6965
6982
  }), s.appendChild(r);
6966
6983
  }), e.appendChild(s);
@@ -6991,9 +7008,9 @@ class Mi {
6991
7008
  fixedRightWidth: e,
6992
7009
  config: { SCROLLER_TRACK_SIZE: i, CSS_PREFIX: s }
6993
7010
  } = this.ctx, { visibleWidth: o, visibleHeight: r, renderCellHeaders: a } = this.ctx.header;
6994
- let l = [], c = [], d = [];
7011
+ let l = [], h = [], d = [];
6995
7012
  a.forEach((w) => {
6996
- w.render && (w.fixed === "left" ? c.push(w) : w.fixed === "right" ? d.push(w) : l.push(w));
7013
+ w.render && (w.fixed === "left" ? h.push(w) : w.fixed === "right" ? d.push(w) : l.push(w));
6997
7014
  });
6998
7015
  const f = e - i, x = {
6999
7016
  key: "left",
@@ -7005,7 +7022,7 @@ class Mi {
7005
7022
  width: `${t}px`,
7006
7023
  height: `${r}px`
7007
7024
  },
7008
- cells: c
7025
+ cells: h
7009
7026
  }, u = {
7010
7027
  key: "center",
7011
7028
  style: {
@@ -7053,7 +7070,7 @@ class Mi {
7053
7070
  fixedLeftWidth: o,
7054
7071
  fixedRightWidth: r,
7055
7072
  config: { SCROLLER_TRACK_SIZE: a, CSS_PREFIX: l }
7056
- } = this.ctx, { visibleWidth: c, visibleHeight: d } = this.ctx.body, f = r - a, x = {
7073
+ } = this.ctx, { visibleWidth: h, visibleHeight: d } = this.ctx.body, f = r - a, x = {
7057
7074
  key: "left",
7058
7075
  style: {
7059
7076
  position: "absolute",
@@ -7071,7 +7088,7 @@ class Mi {
7071
7088
  top: `${0.5}px`,
7072
7089
  left: `${o - 0.5}px`,
7073
7090
  overflow: "hidden",
7074
- width: `${c - o - f}px`,
7091
+ width: `${h - o - f}px`,
7075
7092
  height: `${d}px`
7076
7093
  },
7077
7094
  cells: t
@@ -7093,7 +7110,7 @@ class Mi {
7093
7110
  style: {
7094
7111
  position: "relative",
7095
7112
  overflow: "hidden",
7096
- width: `${c}px`,
7113
+ width: `${h}px`,
7097
7114
  height: `${d}px`
7098
7115
  },
7099
7116
  views: [x, u, g]
@@ -7110,7 +7127,7 @@ class Mi {
7110
7127
  fixedLeftWidth: s,
7111
7128
  fixedRightWidth: o,
7112
7129
  config: { SCROLLER_TRACK_SIZE: r, CSS_PREFIX: a }
7113
- } = this.ctx, { visibleWidth: l, visibleHeight: c } = this.ctx.footer, d = o - r, f = {
7130
+ } = this.ctx, { visibleWidth: l, visibleHeight: h } = this.ctx.footer, d = o - r, f = {
7114
7131
  key: "left",
7115
7132
  style: {
7116
7133
  position: "absolute",
@@ -7118,7 +7135,7 @@ class Mi {
7118
7135
  left: `${0.5}px`,
7119
7136
  overflow: "hidden",
7120
7137
  width: `${s}px`,
7121
- height: `${c}px`
7138
+ height: `${h}px`
7122
7139
  },
7123
7140
  cells: e
7124
7141
  }, x = {
@@ -7129,7 +7146,7 @@ class Mi {
7129
7146
  left: `${s - 0.5}px`,
7130
7147
  overflow: "hidden",
7131
7148
  width: `${l - s - d}px`,
7132
- height: `${c}px`
7149
+ height: `${h}px`
7133
7150
  },
7134
7151
  cells: t
7135
7152
  }, u = {
@@ -7140,7 +7157,7 @@ class Mi {
7140
7157
  right: `${0.5}px`,
7141
7158
  overflow: "hidden",
7142
7159
  width: `${d}px`,
7143
- height: `${c}px`
7160
+ height: `${h}px`
7144
7161
  },
7145
7162
  cells: i
7146
7163
  };
@@ -7151,7 +7168,7 @@ class Mi {
7151
7168
  position: "relative",
7152
7169
  overflow: "hidden",
7153
7170
  width: `${l}px`,
7154
- height: `${c}px`
7171
+ height: `${h}px`
7155
7172
  },
7156
7173
  views: [f, x, u]
7157
7174
  };
@@ -7245,10 +7262,10 @@ class zt {
7245
7262
  async showSubmenu(t, e) {
7246
7263
  if (this.activeSubmenus.has(e)) return;
7247
7264
  this.activeSubmenus.add(e), e.classList.add("show");
7248
- const i = yt(t, e, async () => {
7249
- const s = this.container.getBoundingClientRect(), o = window.innerWidth, r = e.offsetWidth || 200, a = o - s.right, l = s.left, c = a >= r || a >= l ? "right-start" : "left-start", { x: d, y: f } = await ft(t, e, {
7250
- placement: c,
7251
- middleware: [ht(8), dt({ padding: 8 })]
7265
+ const i = Ct(t, e, async () => {
7266
+ const s = this.container.getBoundingClientRect(), o = window.innerWidth, r = e.offsetWidth || 200, a = o - s.right, l = s.left, h = a >= r || a >= l ? "right-start" : "left-start", { x: d, y: f } = await ft(t, e, {
7267
+ placement: h,
7268
+ middleware: [ct(8), dt({ padding: 8 })]
7252
7269
  });
7253
7270
  Object.assign(e.style, {
7254
7271
  left: `${d}px`,
@@ -7315,10 +7332,10 @@ class zt {
7315
7332
  }),
7316
7333
  contextElement: document.body
7317
7334
  };
7318
- yt(e, this.container, () => {
7335
+ Ct(e, this.container, () => {
7319
7336
  ft(e, this.container, {
7320
7337
  placement: "right-start",
7321
- middleware: [ht(), dt(), Mt()]
7338
+ middleware: [ct(), dt(), Mt()]
7322
7339
  }).then(({ x: i, y: s }) => {
7323
7340
  this.container && Object.assign(this.container.style, {
7324
7341
  left: `${i}px`,
@@ -7363,8 +7380,8 @@ class zt {
7363
7380
  const a = this.container.querySelectorAll("[data-menu], [data-submenu]");
7364
7381
  for (const l of a)
7365
7382
  if (l._submenu === i) {
7366
- const c = l.getAttribute("data-menu") || l.getAttribute("data-submenu");
7367
- c && (l.hasAttribute("data-menu") ? this.removeMenuItem(c) : this.removeSubMenuItem(c));
7383
+ const h = l.getAttribute("data-menu") || l.getAttribute("data-submenu");
7384
+ h && (l.hasAttribute("data-menu") ? this.removeMenuItem(h) : this.removeSubMenuItem(h));
7368
7385
  break;
7369
7386
  }
7370
7387
  }
@@ -7402,8 +7419,8 @@ class Ai {
7402
7419
  const { ENABLE_CONTEXT_MENU: i, CUSTOM_BODY_CONTEXT_MENU: s, CONTEXT_MENU: o } = this.ctx.config, r = [...o, ...s];
7403
7420
  if (!i || r.length === 0) return;
7404
7421
  e.preventDefault();
7405
- const { xArr: a, yArr: l } = this.ctx.selector, [c, d] = a, [f, x] = l, { rowIndex: u, colIndex: g } = t;
7406
- u >= f && u <= x && g >= c && g <= d || this.ctx.emit("setSelectorCell", t, e), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy(), this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new zt(this.contextMenuEl, r, {
7422
+ const { xArr: a, yArr: l } = this.ctx.selector, [h, d] = a, [f, x] = l, { rowIndex: u, colIndex: g } = t;
7423
+ u >= f && u <= x && g >= h && g <= d || this.ctx.emit("setSelectorCell", t, e), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy(), this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new zt(this.contextMenuEl, r, {
7407
7424
  onClick: (w, E) => {
7408
7425
  E === "copy" ? (this.ctx.emit("contextMenuCopy"), this.hide()) : E === "paste" ? (this.ctx.emit("contextMenuPaste"), this.hide()) : E === "cut" ? (this.ctx.emit("contextMenuCut"), this.hide()) : E === "clearSelected" && (this.ctx.emit("contextMenuClearSelected"), this.hide());
7409
7426
  }
@@ -7416,18 +7433,18 @@ class Ai {
7416
7433
  const { SELECTOR_AREA_MIN_X: i, SELECTOR_AREA_MAX_X: s, SELECTOR_AREA_MAX_X_OFFSET: o } = this.ctx.config, r = i, a = s || this.ctx.maxColIndex - o;
7417
7434
  if (t.colIndex < r || t.colIndex > a)
7418
7435
  return;
7419
- const { HEADER_CONTEXT_MENU: l, CUSTOM_HEADER_CONTEXT_MENU: c, ENABLE_HEADER_CONTEXT_MENU: d } = this.ctx.config, f = [...l, ...c];
7436
+ const { HEADER_CONTEXT_MENU: l, CUSTOM_HEADER_CONTEXT_MENU: h, ENABLE_HEADER_CONTEXT_MENU: d } = this.ctx.config, f = [...l, ...h];
7420
7437
  if (!d || f.length === 0) return;
7421
7438
  e.preventDefault();
7422
7439
  const { xArr: x } = this.ctx.selector, [u, g] = x, { colIndex: m } = t;
7423
7440
  m >= u && m <= g || (this.ctx.focusCellHeader = t, this.ctx.emit("selectCols", t)), this.currentDOMTreeMenu && this.currentDOMTreeMenu.destroy();
7424
- const E = this.ctx.database.getColumns(), p = f.map((C) => C.value === "visible" ? {
7425
- ...C,
7441
+ const E = this.ctx.database.getColumns(), p = f.map((y) => y.value === "visible" ? {
7442
+ ...y,
7426
7443
  children: this.filterColumns(E)
7427
- } : C);
7444
+ } : y);
7428
7445
  this.ctx.contextMenuIng = !0, this.currentDOMTreeMenu = new zt(this.contextMenuEl, p, {
7429
- onClick: (C, b) => {
7430
- const { xArr: y } = this.ctx.selector, [R, S] = y;
7446
+ onClick: (y, b) => {
7447
+ const { xArr: C } = this.ctx.selector, [R, S] = C;
7431
7448
  if (b === "fixedLeft" || b === "fixedRight" || b === "fixedNone") {
7432
7449
  const O = this.ctx.header.allCellHeaders.filter((v) => v.colIndex >= R && v.colIndex <= S).filter((v) => v.level === 0).filter((v) => !v.column.fixedDisabled).map((v) => v.key);
7433
7450
  this.ctx.database.setCustomHeaderFixedData(
@@ -7438,12 +7455,12 @@ class Ai {
7438
7455
  const O = this.ctx.header.leafCellHeaders.filter((v) => v.colIndex >= R && v.colIndex <= S).filter((v) => !v.children.length).filter((v) => !v.column.hideDisabled).map((v) => v.key);
7439
7456
  O.length > 0 && this.ctx.database.setCustomHeaderHideData(O, !0), this.hide();
7440
7457
  } else if (b !== "visible") if (b.startsWith("visible_")) {
7441
- if (!C.key) return;
7442
- if (C.children) {
7443
- const _ = this.getLeafKeys(C.children);
7458
+ if (!y.key) return;
7459
+ if (y.children) {
7460
+ const _ = this.getLeafKeys(y.children);
7444
7461
  this.ctx.database.setCustomHeaderHideData(_, !1);
7445
7462
  } else
7446
- this.ctx.database.setCustomHeaderHideData([C.key], !1);
7463
+ this.ctx.database.setCustomHeaderHideData([y.key], !1);
7447
7464
  this.currentDOMTreeMenu && this.currentDOMTreeMenu.removeSubMenuItem(b);
7448
7465
  const O = this.ctx.database.getColumns();
7449
7466
  J(O).filter((_) => _.hide).length === 0 && this.hide();
@@ -7468,10 +7485,10 @@ class Ai {
7468
7485
  }),
7469
7486
  contextElement: document.body
7470
7487
  };
7471
- yt(e, this.contextMenuEl, () => {
7488
+ Ct(e, this.contextMenuEl, () => {
7472
7489
  ft(e, this.contextMenuEl, {
7473
7490
  placement: "right-start",
7474
- middleware: [ht(), dt(), Mt()]
7491
+ middleware: [ct(), dt(), Mt()]
7475
7492
  }).then(({ x: i, y: s }) => {
7476
7493
  this.contextMenuEl && Object.assign(this.contextMenuEl.style, {
7477
7494
  left: `${i}px`,
@@ -7713,7 +7730,6 @@ class Xi {
7713
7730
  n(this, "loading");
7714
7731
  n(this, "finderBar");
7715
7732
  n(this, "animationFrameId");
7716
- n(this, "animationFrameId2");
7717
7733
  n(this, "ctx");
7718
7734
  this.options = e;
7719
7735
  const { overlayerElement: i, editorElement: s, emptyElement: o, contextMenuElement: r } = this.options, a = this.createContainer(
@@ -7733,24 +7749,25 @@ class Xi {
7733
7749
  t.className = "e-virt-table-container";
7734
7750
  const r = document.createElement("div"), a = document.createElement("canvas"), l = e || document.createElement("div");
7735
7751
  r.className = "e-virt-table-stage", t.tabIndex = 0, a.className = "e-virt-table-canvas", l.className = "e-virt-table-overlayer", l.setAttribute("data-overlayer", e ? "custom" : "default");
7736
- const c = i || document.createElement("div");
7737
- c.className = "e-virt-table-editor";
7752
+ const h = i || document.createElement("div");
7753
+ h.className = "e-virt-table-editor";
7738
7754
  const d = s, f = o;
7739
7755
  return r.appendChild(a), r.appendChild(l), t.appendChild(r), {
7740
7756
  containerElement: t,
7741
7757
  stageElement: r,
7742
7758
  canvasElement: a,
7743
7759
  overlayerElement: l,
7744
- editorElement: c,
7760
+ editorElement: h,
7745
7761
  emptyElement: d,
7746
7762
  contextMenuElement: f
7747
7763
  };
7748
7764
  }
7765
+ doDraw(t = !1) {
7766
+ this.header.update(), this.footer.update(), this.body.update(), this.ctx.paint.clear(), this.body.draw(), this.footer.draw(), this.header.draw(), this.scroller.draw(), t || this.overlayer.draw();
7767
+ }
7749
7768
  draw(t = !1) {
7750
7769
  this.animationFrameId && cancelAnimationFrame(this.animationFrameId), this.animationFrameId = requestAnimationFrame(() => {
7751
- this.header.update(), this.footer.update(), this.body.update(), this.ctx.paint.clear(), this.body.draw(), this.footer.draw(), this.header.draw(), this.scroller.draw(), t || this.overlayer.draw(), this.animationFrameId2 && cancelAnimationFrame(this.animationFrameId2), this.animationFrameId2 = requestAnimationFrame(() => {
7752
- this.body.updateAutoHeight();
7753
- });
7770
+ this.doDraw(t), this.body.updateAutoHeight() && this.doDraw(t);
7754
7771
  });
7755
7772
  }
7756
7773
  loadConfig(t) {
@@ -7836,15 +7853,15 @@ class Xi {
7836
7853
  return new Promise(async (i, s) => {
7837
7854
  let o = [];
7838
7855
  for (let r = 0; r < t.length; r++) {
7839
- const { rowKey: a, key: l } = t[r], c = await this.ctx.database.getValidator(a, l);
7840
- Array.isArray(c) && c.length && o.push(c);
7856
+ const { rowKey: a, key: l } = t[r], h = await this.ctx.database.getValidator(a, l);
7857
+ Array.isArray(h) && h.length && o.push(h);
7841
7858
  }
7842
7859
  if (o.length) {
7843
7860
  if (s(o), e) {
7844
7861
  const [r] = o;
7845
7862
  if (Array.isArray(r) && r.length) {
7846
- const [a] = r, { rowKey: l, key: c } = a;
7847
- this.scrollToRowkey(l), this.scrollToColkey(c);
7863
+ const [a] = r, { rowKey: l, key: h } = a;
7864
+ this.scrollToRowkey(l), this.scrollToColkey(h);
7848
7865
  }
7849
7866
  }
7850
7867
  this.ctx.emit("draw");
@@ -7861,9 +7878,9 @@ class Xi {
7861
7878
  if (t && Array.isArray(s) && s.length) {
7862
7879
  const [o] = s;
7863
7880
  if (Array.isArray(o) && o.length) {
7864
- const [r] = o, { rowKey: a, key: l } = r, c = this.ctx.database.getRowForRowKey(a);
7865
- if (c) {
7866
- const { parentRowKeys: d = [] } = c;
7881
+ const [r] = o, { rowKey: a, key: l } = r, h = this.ctx.database.getRowForRowKey(a);
7882
+ if (h) {
7883
+ const { parentRowKeys: d = [] } = h;
7867
7884
  d && d.length && this.setExpandRowKeys(d, !0);
7868
7885
  }
7869
7886
  this.scrollToRowkey(a), this.scrollToColkey(l);