@guiexpert/preact-table 10.0.2 → 10.0.3

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/.eslintrc.js ADDED
@@ -0,0 +1,23 @@
1
+ module.exports = {
2
+ parser: "@typescript-eslint/parser",
3
+ plugins: ["preact", "@typescript-eslint"],
4
+ extends: ["../../.eslintrc.json"],
5
+ ignorePatterns: ["!**/*"],
6
+ overrides: [
7
+ {
8
+ files: ["*.ts", "*.js", "*.tsx"],
9
+ parserOptions: {
10
+ project: ["libs/preact-table/tsconfig.*?.json"]
11
+ },
12
+ rules: {}
13
+ },
14
+ {
15
+ files: ["*.ts", "*.tsx"],
16
+ rules: {}
17
+ },
18
+ {
19
+ files: ["*.js", "*.jsx"],
20
+ rules: {}
21
+ }
22
+ ]
23
+ };
@@ -1,4 +1,4 @@
1
- import { AreaIdent, AreaModelIf, CellRendererIf, DomServiceIf, RendererCleanupFnType } from '../../table/src/index.ts';
1
+ import { AreaIdent, AreaModelIf, CellRendererIf, DomServiceIf, RendererCleanupFnType } from '../../table/src';
2
2
  export declare class ComponentRendererWrapper implements CellRendererIf {
3
3
  private readonly Component;
4
4
  constructor(Component: any);
@@ -1,5 +1,5 @@
1
1
  import { Component } from "preact";
2
- import { FocusModelIf, GeModelChangeEvent, GeMouseEvent, SelectionModelIf, TableApi, TableModelIf, TableOptions } from '../../table/src/index.ts';
2
+ import { FocusModelIf, GeModelChangeEvent, GeMouseEvent, SelectionModelIf, TableApi, TableModelIf, TableOptions } from '../../table/src';
3
3
  export type GeMouseEventFn = (evt: GeMouseEvent) => {};
4
4
  export type GeCheckboxEventFn = (evt: any[]) => {};
5
5
  export type GeTableReadyEventFn = (evt: TableApi) => {};
package/dist/README.md ADDED
@@ -0,0 +1,102 @@
1
+
2
+ # PreactTable (GuiExpert Table)
3
+
4
+ This is the preact component of the GuiExpert Table Project.
5
+
6
+ ## Become a master at creating web applications with large tables
7
+
8
+ This is the UI-agnostic table component for your next web app. 😊
9
+
10
+ <img src="https://raw.githubusercontent.com/guiexperttable/ge-table/main/apps/table-website/src/assets/screens/heatmap.png" width="50%">
11
+
12
+ ### Features
13
+ - Handle large datasets easily
14
+ - Excellent performance for large tables by vertical and horizontal virtual scrolling
15
+ - Fully-featured (advanced sorting and filtering)
16
+ - Highly customizable orderData grid
17
+ - Outstanding performance
18
+ - No third-party dependencies
19
+ - UI-agnostic
20
+ - Column Interactions (resize, reorder)
21
+ - Sorting Rows
22
+ - Row, Column, and Range Selection
23
+ - Single and Multi Selection
24
+ - UI-agnostic
25
+ - Row and Column Spanning
26
+ - Fixed Columns (Left and Right)
27
+ - Tree table (Hierarchical View)
28
+ - Accessibility support: Keyboard Shortcuts
29
+ - Custom Filtering
30
+ - In-place Cell Editing
31
+ - Userdefined Key and Mouse Events
32
+ - Customizable Look & Feel (via CSS variables)
33
+ - Row sorting
34
+ - Column Reordering (Drag and Drop)
35
+ - State Persistence (Row Sorting, Column Order, Selection)
36
+ - Customizable Cell Contents via Renderer for Header, Body and Footer
37
+ - Full control over the HTML structure and style
38
+
39
+
40
+ ## Links
41
+
42
+ - [Demos](https://gui.expert/demos)
43
+ - [Documentation](https://gui.expert/doc)
44
+ - [API](https://gui.expert/api)
45
+
46
+ ## Get Started
47
+
48
+ Add the following two NPM packages to your existing preact project (run this in your project root directory):
49
+
50
+ ```
51
+ npm install --save @guiexpert/table @guiexpert/preact-table
52
+ ```
53
+
54
+ Add GuiexpertTable component to a template:
55
+
56
+ ```
57
+ return (
58
+ <GuiexpertTable
59
+ tableOptions={tableOptions}
60
+ tableModel={tableModel}
61
+ mouseClicked={console.info}
62
+ tableReady={tableReady}
63
+ />
64
+ );
65
+ ```
66
+
67
+ Import the following classes in your component:
68
+ ```
69
+ import { GuiexpertTable } from "@guiexpert/preact-table";
70
+ import {
71
+ GeMouseEvent,
72
+ TableApi
73
+ TableFactory,
74
+ TableModelIf,
75
+ TableOptions,
76
+ TableOptionsIf
77
+ } from "@guiexpert/table";
78
+ ```
79
+
80
+
81
+ Add a tableModel property and a onTableReady method to the component:
82
+
83
+ ```
84
+ const tableModel: TableModelIf = TableFactory.createTableModel({
85
+ headerData: [
86
+ ['Header 1', 'Header 2']
87
+ ],
88
+ bodyData: [
89
+ ['Text 1a', 'Text 2a'],
90
+ ['Text 1b', 'Text 2b'],
91
+ ]
92
+ });
93
+ const tableOptions = new TableOptions();
94
+
95
+ function onTableReady(api: TableApi) {
96
+ console.info("onTableReady API:", api);
97
+ }
98
+ ```
99
+
100
+ There are numerous possibilities to create table models.
101
+ Please refer to the [Documentation](https://gui.expert/doc) for further information or the [Demo](https://gui.expert/demos) section for examples.
102
+
package/dist/index.cjs ADDED
@@ -0,0 +1,254 @@
1
+ "use strict";var De=Object.defineProperty;var ke=(r,e,t)=>e in r?De(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var ee=(r,e,t)=>(ke(r,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("preact"),Oe=require("preact/jsx-runtime");class F{constructor(){this.alreadySet=!1}static getInstance(){return F.instance||(F.instance=new F),F.instance}setLicenseKey(e){if(e&&!this.alreadySet){const t=document.createElement("meta");t.content="license="+e,t.name="guiexperttable",document.getElementsByTagName("head")[0].appendChild(t),this.alreadySet=!0}}}function j(r){return r&&r.type==="TreeRow"}function X(r){return r&&r.type==="AreaModelTree"}class Y{constructor(e=-1,t=-1,o=-1,i=-1,s,l,n,a=0,d=0,c=0,h=""){this.rowIndex=e,this.rowTop=t,this.columnIndex=o,this.columnLeft=i,this.areaIdent=s,this.sideIdent=l,this.originalEvent=n,this.clickCount=a,this.draggingX=d,this.draggingY=c,this.action=h}clone(){return new Y(this.rowIndex,this.rowTop,this.columnIndex,this.columnLeft,this.areaIdent,this.sideIdent,this.originalEvent,this.clickCount,this.draggingX,this.draggingY,this.action)}}class O{constructor(e=">",t="",o=[]){this.content=e,this.style=t,this.classes=o}}class Ce{constructor(e=new O(">","transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",["gt-table-tree-arrow-expanded"]),t=new O(">","",["ge-table-tree-arrow-collapsed"]),o=new O(">","color:transparent;",["gt-table-tree-arrow-hidden"]),i=new O("↕","",["gt-table-tree-arrow-expanded-all"])){this.arrowExpanded=e,this.arrowCollapsed=t,this.arrowPlaceholder=o,this.arrowExpandCollapseAll=i}}class we{constructor(e=new O("↑","",["ge-header-sorted-asc"]),t=new O("↓","",["ge-header-sorted-desc"]),o=new O("↑","color:transparent;",[])){this.iconAsc=e,this.iconDesc=t,this.iconPlaceholder=o}}class Fe{constructor(e){this.domService=e}setStyle(e,t,o){return this.domService.setStyle(e,t,o),e}applyStyle(e,t){for(const o in t)this.domService.setStyle(e,o,t[o]);return e}applyDisplayNoneStyle(e){return this.domService.setStyle(e,"display","none"),e}applyDisplayBlockStyle(e){return this.domService.setStyle(e,"display","block"),e}applyStyleInPx(e,t){return Object.entries(t).forEach(([o,i])=>this.domService.setStyle(e,o,i+"px")),e}applyStylePosistionRelative(e){return this.domService.setStyle(e,"position","relative"),this.domService.setStyle(e,"overflow","clip"),e}applyStylePosistionAbsolute(e){return this.domService.setStyle(e,"position","absolute"),e}applyStyleFullSize(e){return this.domService.setStyle(e,"width","100%"),this.domService.setStyle(e,"height","100%"),e}applyStyleOverflowAuto(e="auto",t="auto",o){return this.domService.setStyle(o,"overflow-x",e),this.domService.setStyle(o,"overflow-y",t),o}applyStyleNoPadding(e){return this.domService.setStyle(e,"padding","0"),this.domService.setStyle(e,"margin","0"),this.domService.setStyle(e,"border","0"),e}appendRelativeChildDiv(e){const t=this.applyStylePosistionRelative(this.applyStyleFullSize(this.applyStyleNoPadding(this.domService.createElement("div"))));return this.domService.appendChild(e,t),this.applyStylePosistionAbsolute(e),{parent:e,child:t,cache:{}}}appendText(e,t){const o=this.domService.createText(t);return this.domService.appendChild(e,o),o}addClass(e,t){return e.includes(" ")?e.split(" ").forEach(o=>this.domService.addClass(t,o)):this.domService.addClass(t,e),t}removeClass(e,t){return e.includes(" ")?e.split(" ").forEach(o=>this.domService.removeClass(t,o)):this.domService.removeClass(t,e),t}addClasses(e,t){if(e)for(const o of e)this.domService.addClass(t,o);return t}setAttribute(e,t,o){return t&&o&&this.domService.setAttribute(e,t,o),e}createAreaDivWithClass(e,t,o,i){const s=this.domService.createElement("div");return this.addClass(e,s),this.domService.setAttribute(s,"data-area",o),this.domService.setAttribute(s,"data-side",i),this.domService.appendChild(t,s),s}createDivWithClass(e,t){const o=this.domService.createElement("div");return this.addClass(e,o),this.domService.appendChild(t,o),o}addRowDiv(e,t,o=-1,i,s,l=""){const n=t.index??-1,a=this.getDivOrCreateDiv(n,e);if(this.domService.addClass(a,"ge-table-row-div"),this.domService.addClass(a,`ge-table-row-div-${t.index}`),i==="body"&&s==="center"){const d=((t==null?void 0:t.index)??0)%2===0?"even":"odd";this.domService.addClass(a,`ge-table-row-${d}`)}if(this.domService.setStyle(a,"display","clip"),this.domService.setStyle(a,"position","absolute"),this.domService.setStyle(a,"left",`${t.left}px`),this.domService.setStyle(a,"top",`${t.top}px`),this.domService.setStyle(a,"width",`${t.width}px`),this.domService.setStyle(a,"height",`${t.height}px`),this.domService.setAttribute(a,"data-row-index",`${o}`),this.domService.setAttribute(a,"data-area",`${i}`),l){const d=this.domService.createText(l);this.domService.appendChild(a,d)}return this.domService.appendChild(e.child,a),a}addColumnDiv(e){const{parent:t,geo:o,rowIndex:i=-1,columnIndex:s=-1,areaIdent:l,sideIdent:n,text:a="",treeArrow:d,tableOptions:c,checkedType:h=void 0,sortState:g}=e,m=c==null?void 0:c.treeOptions,f=c==null?void 0:c.showCheckboxWihoutExtraColumn,b=this.domService.createElement("div");this.domService.addClass(b,"ge-table-col-div"),this.domService.addClass(b,`ge-table-col-div-${o.index}`),this.domService.setAttribute(b,"data-col-index",`${o.index}`),this.domService.setAttribute(b,"data-row-index",`${i}`),this.domService.setAttribute(b,"data-area",`${l}`);const u=((o==null?void 0:o.index)??0)%2===0?"even":"odd";if(l==="body"&&n==="center"&&this.domService.addClass(b,`ge-table-column-${u}`),this.domService.setStyle(b,"display","clip"),this.domService.setStyle(b,"position","absolute"),this.domService.setStyle(b,"left",`${o.left}px`),this.domService.setStyle(b,"top",`${o.top}px`),this.domService.setStyle(b,"width",`${o.width}px`),this.domService.setStyle(b,"height",`${o.height}px`),d&&d!=="none"&&(this.domService.addClass(b,"ge-table-col-tree"),this.addArrowDiv(b,d,m,i,s,l)),f&&s===0&&h&&this.addCheckboxToDiv(b,h,l,i),a){const p=d!=="none"&&s===0;this.addLabelDiv(b,a,p,i,s,l)}return g&&this.addSortedIcon(b,g,c==null?void 0:c.sortedOptions,s),this.domService.appendChild(t,b),b}addCheckboxToDiv(e,t,o,i){const s=this.domService.createElement("div"),l=t==="full"?"checked":"";return s.innerHTML=`
2
+ <input
3
+ type="checkbox"
4
+ data-area="${o}"
5
+ data-row-index="${i}"
6
+ data-input-type="checkbox"
7
+ ${l}
8
+ class="ge-table-row-checkbox"> `,this.domService.setStyle(s,"display","inline"),this.domService.setStyle(s,"width","inherit"),this.domService.setAttribute(s,"data-row-index",`${i}`),this.domService.appendChild(e,s),s}addLabelDiv(e,t="",o=!1,i=-1,s=-1,l="body"){const n=this.domService.createElement("div");if(this.domService.addClass(n,"ge-table-label-div"),this.domService.setStyle(n,"position","relative"),this.domService.setStyle(n,"background","transparent"),this.domService.setStyle(n,"width","100%"),this.domService.setStyle(n,"height","100%"),this.domService.setAttribute(n,"data-row-index",`${i}`),this.domService.setAttribute(n,"data-col-index",`${s}`),this.domService.setAttribute(n,"data-area",`${l}`),t)if(o){const a=this.domService.createText(t);this.domService.appendChild(n,a)}else{const a=this.domService.createElement("div");this.domService.appendChild(n,a);const d=this.domService.createText(t);this.domService.addClass(a,"ge-table-label"),this.domService.appendChild(a,d),this.domService.setAttribute(a,"data-row-index",`${i}`),this.domService.setAttribute(a,"data-col-index",`${s}`),this.domService.setAttribute(a,"data-area",`${l}`)}return this.domService.appendChild(e,n),n}addSortedIcon(e,t="",o=new we,i=-1){const s=this.domService.createElement("div");this.domService.addClass(s,"ge-table-sorted-icon-div"),this.domService.setStyle(s,"position","absolute"),this.domService.setStyle(s,"top","0"),this.domService.setStyle(s,"right","0"),this.domService.setStyle(s,"width","20px"),this.domService.setStyle(s,"background","transparent"),this.domService.setStyle(s,"cursor","pointer"),this.domService.setAttribute(s,"data-col-index",`${i}`),this.domService.setAttribute(s,"data-area","header");let l;t==="asc"?l=o.iconAsc:t==="desc"?l=o.iconDesc:l=o.iconPlaceholder;const n=l.content,a=this.domService.createText(n);this.domService.appendChild(s,a),l.style&&this.applyStyleString(s,l.style);for(const d of l.classes)this.domService.addClass(s,d);return this.domService.appendChild(e,s),s}addArrowDiv(e,t="none",o=new Ce,i=-1,s=-1,l="body"){const n=this.domService.createElement("div");this.domService.addClass(n,"ge-table-tree-arrow-div"),this.domService.setStyle(n,"display","inline-block"),this.domService.setStyle(n,"position",""),this.domService.setStyle(n,"width","20px"),this.domService.setStyle(n,"background","transparent"),this.domService.setStyle(n,"cursor","pointer"),this.domService.setAttribute(n,"data-row-index",`${i}`),this.domService.setAttribute(n,"data-col-index",`${s}`),this.domService.setAttribute(n,"data-area",`${l}`);let a;t==="expanded"?a=o.arrowExpanded:t==="collapsed"?a=o.arrowCollapsed:a=o.arrowPlaceholder;const d=a.content,c=this.domService.createText(d);this.domService.appendChild(n,c),a.style&&this.applyStyleString(n,a.style);for(const h of a.classes)this.domService.addClass(n,h);return this.domService.appendChild(e,n),n}addColumnBorderDivs(e,t,o,i,s){if(e.verticalBorderVisible){const l=`ge-table-${i}-${s}-vertical-border`;this.addVerticalBorder(o,t,l)}if(e.horizontalBorderVisible){const l=`ge-table-${i}-${s}-horizontal-border`;this.addHorizontalBorder(o,t,l)}return t}addHorizontalBorder(e,t,o="ge-table-body-center-horizontal-border"){const i=this.domService.createElement("div");return this.domService.addClass(i,o),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${e.left}px`),this.domService.setStyle(i,"top",`${e.top}px`),this.domService.setStyle(i,"width",`${e.width}px`),this.domService.setStyle(i,"height","1px"),this.domService.appendChild(t,i),i}addFocusBorderDivs(e,t,o){t={...t,width:t.width+1,height:t.height+1};let i=this.domService.createElement("div");return this.domService.addClass(i,"ge-table-focus-border"),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${t.left}px`),this.domService.setStyle(i,"top",`${t.top}px`),this.domService.setStyle(i,"width","1px"),this.domService.setStyle(i,"height",`${t.height}px`),this.domService.setStyle(i,"z-index","9999"),this.applyStyle(i,o),this.domService.appendChild(e,i),i=this.domService.createElement("div"),this.domService.addClass(i,"ge-table-focus-border"),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${t.left+t.width-1}px`),this.domService.setStyle(i,"top",`${t.top}px`),this.domService.setStyle(i,"width","1px"),this.domService.setStyle(i,"height",`${t.height}px`),this.domService.setStyle(i,"z-index","9999"),this.applyStyle(i,o),this.domService.appendChild(e,i),i=this.domService.createElement("div"),this.domService.addClass(i,"ge-table-focus-border"),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${t.left}px`),this.domService.setStyle(i,"top",`${t.top}px`),this.domService.setStyle(i,"width",`${t.width}px`),this.domService.setStyle(i,"height","1px"),this.domService.setStyle(i,"z-index","9999"),this.applyStyle(i,o),this.domService.appendChild(e,i),i=this.domService.createElement("div"),this.domService.addClass(i,"ge-table-focus-border"),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${t.left}px`),this.domService.setStyle(i,"top",`${t.top+t.height-1}px`),this.domService.setStyle(i,"width",`${t.width}px`),this.domService.setStyle(i,"height","1px"),this.domService.setStyle(i,"z-index","9999"),this.applyStyle(i,o),this.domService.appendChild(e,i),e}addVerticalBorder(e,t,o="ge-table-body-center-vertical-border"){const i=this.domService.createElement("div");return this.domService.addClass(i,o),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${e.left}px`),this.domService.setStyle(i,"top",`${e.top}px`),this.domService.setStyle(i,"width","1px"),this.domService.setStyle(i,"height",`${e.height}px`),this.domService.appendChild(t,i),i}addDiv(e,t,o=""){const i=this.domService.createElement("div");return o&&this.domService.addClass(i,o),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${t.left}px`),this.domService.setStyle(i,"top",`${t.top}px`),this.domService.setStyle(i,"width",`${t.width}px`),this.domService.setStyle(i,"height",`${t.height}px`),this.domService.appendChild(e,i),i}applyStyleString(e,t){const o=t.split(";").map(i=>i.trim()).filter(i=>i);for(const i of o){const[s,l]=i.split(":");this.domService.setStyle(e,s.trim(),l.trim())}}getDivOrCreateDiv(e,t){let o=t.cache[e];return o?(o.innerText="",o):(o=this.domService.createElement("div"),t.cache[e]=o,o)}}const U=r=>r==="header"?"header":r==="footer"?"footer":"body";class Ie{constructor(e,t){if(this.rowIdx=-1,this.colIdx=-1,this.action=null,this.inputType=null,this.className="",e!==null&&(e instanceof HTMLDivElement||e instanceof HTMLSpanElement||e instanceof HTMLInputElement)){this.className=e.className,this.action=e.getAttribute("data-ge-action"),this.inputType=e.getAttribute("data-input-type"),this.rowIdx=Number(e.getAttribute("data-row-index")),this.colIdx=Number(e.getAttribute("data-col-index"));const o=e.getAttribute("data-area");if(o&&(this.areaIdent=U(o),this.areaModel=t.tableModel.getAreaModel(this.areaIdent),this.row=this.areaModel.getRowByIndex(this.rowIdx)),e instanceof HTMLInputElement){const i=e;this.value=i.value}}}}class Le{constructor(e){this.tableScope=e,this.doubleClickDelay=500,this.expandedAll=!0,this.mouseDown=!1,this.dragging=!1,this.lastClicked=0,this.tableScope.hostElement.addEventListener("click",this.onHostElementClicked.bind(this)),this.tableScope.hostElement.addEventListener("dblclick",this.onHostElementDblClicked.bind(this)),this.tableScope.hostElement.addEventListener("mousedown",this.onMouseDown.bind(this)),this.tableScope.hostElement.addEventListener("mousemove",this.onMouseMove.bind(this)),this.tableScope.hostElement.addEventListener("mouseup",this.onMouseUp.bind(this)),this.tableScope.hostElement.addEventListener("contextmenu",this.onContextmenu.bind(this)),this.tableScope.hostElement._MouseHandler="true",this.tableScope.scrollViewport.addEventListener("scroll",this.tableScope.adjustAfterScrolling.bind(this.tableScope)),[window,this.tableScope.hostElement].forEach(t=>t.addEventListener("resize",this.tableScope.adjustContainersAndRows.bind(this.tableScope)))}onContextmenu(e){this.mouseEvent=e;const t=this.tableScope.createGeMouseEvent(this.mouseEvent);this.tableScope.contextmenu(t)}onHostElementClicked(e){const t=Date.now();if(t-this.lastClicked<this.doubleClickDelay)return;this.lastClicked=t;const o=new Ie(e.target,this.tableScope);if(o.action==="toggleExpandCollapseAll")this.expandedAll=!this.expandedAll,this.tableScope.toggleExpandCollapseAll(this.expandedAll),e.preventDefault(),e.stopPropagation();else if(o.action==="toggleHeaderGroup")this.tableScope.toggleHeaderGroup(o),e.preventDefault(),e.stopPropagation();else if(o.inputType==="checkbox"&&o.areaIdent)this.tableScope.toggleRowCheckbox(o.rowIdx,o.colIdx,o.areaIdent),e.preventDefault(),e.stopPropagation();else if(j(o.row)&&o.areaModel){const i=o.colIdx===this.getArrowColumnIndex()&&e.altKey,s=o.className.includes("ge-table-tree-arrow-div");if(i||s){e.preventDefault(),e.stopPropagation();const l=o.row;l.expanded=!l.expanded,"recalcVisibleTreeRows"in o.areaModel&&o.areaModel.recalcVisibleTreeRows(),this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth),this.tableScope.adjustContainersAndRows(),this.updateCollapsedExpandedState(l)}}if(o.areaIdent==="body"&&this.tableScope.tableOptions.getFocusModel){const i=this.tableScope.tableOptions.getFocusModel();i==null||i.clear(),i==null||i.setFocus(o.rowIdx,o.colIdx)}this.publishGeMouseEvent(e,1)}onHostElementDblClicked(e){if(this.lastClicked=Date.now(),e.target instanceof HTMLElement){const t=e.target,o=t.getAttribute("data-area"),i=U(o),s=Number(t.getAttribute("data-row-index")),l=Number(t.getAttribute("data-col-index")),n=this.tableScope.tableModel.getAreaModel(i);if(o&&i==="header")this.tableScope.tableModel.isSortable(l)&&(this.tableScope.clearSelection(),this.tableScope.onHeaderDblClicked(e,s,l));else if(t.getAttribute("data-row-index")){const a=n.getRowByIndex(s);if(o&&i==="body"&&n.isEditable(s,l)&&(this.tableScope.clearSelection(),this.tableScope.initRenderEditor(s,l)),j(a)&&l===this.getArrowColumnIndex()){e.preventDefault(),e.stopPropagation();const d=a;d.expanded=!d.expanded,"recalcVisibleTreeRows"in n&&n.recalcVisibleTreeRows(),this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth),this.tableScope.adjustContainersAndRows(),this.updateCollapsedExpandedState(d)}}}this.publishGeMouseEvent(e,2)}publishGeMouseEvent(e,t){var o;this.mouseEvent=e,this.geMouseEventOld=(o=this.geMouseEvent)==null?void 0:o.clone(),this.geMouseEvent=this.tableScope.createGeMouseEvent(e),this.geMouseEvent&&(this.geMouseEvent.clickCount=t),this.tableScope.onMouseClicked(this.geMouseEvent,this.geMouseEventOld),this.tableScope.publishGeMouseEvent(this.geMouseEvent),t===1&&this.tableScope.debounceRepaint()}updateCollapsedExpandedState(e){var o,i,s,l,n;const t=(i=(o=this.tableScope.tableOptions)==null?void 0:o.autoRestoreOptions)==null?void 0:i.getRowId;if(t){const a=(s=this.tableScope.storeStateCollapsedExpandService)==null?void 0:s.collapsedExpandedStateGet().mode,d=a==="collapsed"&&!e.expanded||a==="expanded"&&e.expanded,c=a==="collapsed"&&e.expanded||a==="expanded"&&!e.expanded,h=t(e.data);d?(l=this.tableScope.storeStateCollapsedExpandService)==null||l.collapsedStateIdsPush(h):c&&((n=this.tableScope.storeStateCollapsedExpandService)==null||n.collapsedStateIdsRemove(h))}}getArrowColumnIndex(){return this.tableScope.tableModel.isRowCheckboxVisible()?1:0}onMouseDown(e){this.dragging||(this.mouseEvent=e,this.startMouseEvent=this.tableScope.createGeMouseEvent(this.mouseEvent),this.tableScope.onMouseDown(this.startMouseEvent),this.mouseDown=!0)}onMouseMove(e){this.mouseEvent=e,this.mouseDown?(this.dragging||(this.dragging=!0,this.tableScope.setDragging(!0)),requestAnimationFrame(this.mouseDraggingOnFrame.bind(this))):requestAnimationFrame(this.mouseMoveOnFrame.bind(this))}onMouseUp(e){this.mouseEvent=e,this.dragging&&requestAnimationFrame(this.mouseDraggingEndOnFrame.bind(this)),this.mouseDown=!1,this.dragging=!1,this.tableScope.setDragging(!1)}mouseDraggingOnFrame(){var e;if(this.mouseEvent){const t=this.tableScope.createGeMouseEvent(this.mouseEvent);(e=this.startMouseEvent)!=null&&e.originalEvent&&(t.draggingX=this.mouseEvent.clientX-this.startMouseEvent.originalEvent.clientX,t.draggingY=this.mouseEvent.clientY-this.startMouseEvent.originalEvent.clientY),this.tableScope.mouseDraggingOnFrame(t,this.startMouseEvent)}}mouseDraggingEndOnFrame(){var e;if(this.mouseEvent){const t=this.tableScope.createGeMouseEvent(this.mouseEvent);(e=this.startMouseEvent)!=null&&e.originalEvent&&(t.draggingX=this.mouseEvent.clientX-this.startMouseEvent.originalEvent.clientX,t.draggingY=this.mouseEvent.clientY-this.startMouseEvent.originalEvent.clientY),this.tableScope.mouseDraggingEndOnFrame(t)}}mouseMoveOnFrame(){if(this.mouseEvent){const e=this.tableScope.createGeMouseEvent(this.mouseEvent);this.tableScope.mouseMove(e)}}}class $e{constructor(e){this.tableScope=e}updateCells(e,t=!1){this.tableScope.updateCells(e,t)}externalFilterChanged(){this.tableScope.externalFilterChanged()}scrollToPixel(e=0,t=0){this.tableScope.scrollToPixel(e,t)}scrollToIndex(e=0,t=0){this.tableScope.scrollToIndex(e,t)}setHeaderVisible(e=!0){}setColumnVisible(e,t=!0){}isColumnVisible(e){return!0}isHeaderVisible(){return!0}setFooterVisible(e=!0){}isFooterVisible(){return!0}repaint(){this.tableScope.repaint()}repaintHard(){this.tableScope.repaintHard()}clearSelection(){this.tableScope.clearSelection(!0)}setSelectionModel(e,t=!0){this.tableScope.setSelectionModel(e,t)}triggerAction(e){this.tableScope.onActionTriggered(e)}getShortcutActionMapping(){return this.tableScope.shortcutService.getShortcutActionMapping()}copyToClipboard(){return this.tableScope.copyService.copyToClipboard(this.tableScope.tableModel,this.tableScope.selectionModel(),this.tableScope.focusModel())}getTableScope(){return this.tableScope}getSelectionModel(){return this.tableScope.selectionModel()}}class q{constructor(e){this.getStorageKeyFn=e}autoConvertMapToObject(e){const t={};if(e instanceof Map){const o=e;for(const i of[...o]){const[s,l]=i;t[s]=l}}return t}checkAndPersistItem(e,t){const o=this.getStorageKeyFn;if(o){const i=o();if(i){const s=i+e;if((t+"").includes("Map")){const l=this.autoConvertMapToObject(t);this.persistItem(s,l)}else this.persistItem(s,t)}}}persistItem(e,t){t?localStorage.setItem(e,JSON.stringify(t)):localStorage.removeItem(e)}loadFromLocalStorage(e){const t=localStorage.getItem(e);return t?JSON.parse(t):null}}class He extends q{constructor(e){super(e),this.SCROLL_STATE="scrollState",this.scrollOffset=[0,0],this.load()}getScrollOffset(){return this.scrollOffset}updateScrollOffset(e){this.scrollOffset=e,this.checkAndPersistItem(this.SCROLL_STATE,this.scrollOffset)}load(){const e=this.getStorageKeyFn;if(e){const t=e();if(t){const o=t+this.SCROLL_STATE;let i=this.loadFromLocalStorage(o);this.scrollOffset=i||[0,0]}}}}class Be{constructor(e="collapsed",t=[],o=!1,i=!1){this.mode=e,this.rowIds=t,this.allCollapsed=o,this.allExpanded=i}}class Pe extends q{constructor(e){super(e),this.COLLAPSED_EXPANDED_STATE="collapsedExpandedState",this.collapsedExpandedState=new Be,this.load()}collapsedExpandedStateGet(){return this.collapsedExpandedState}collapsedExpandedStateIncludes(e){return this.collapsedExpandedState.rowIds.includes(e)}collapsedStateIdsPush(e){this.collapsedExpandedState.rowIds.includes(e)||(this.collapsedExpandedState.rowIds.push(e),this.collapsedExpandedState.allCollapsed=!1,this.collapsedExpandedState.allExpanded=!1,this.persist())}collapsedStateIdsRemove(e){const t=this.collapsedExpandedState.rowIds.indexOf(e);t!==-1&&(this.collapsedExpandedState.rowIds.splice(t,1),this.collapsedExpandedState.allCollapsed=!1,this.collapsedExpandedState.allExpanded=!1,this.persist())}collapsedStateAll(e){this.collapsedExpandedState.rowIds=[],this.collapsedExpandedState.mode=e?"collapsed":"expanded",this.collapsedExpandedState.allCollapsed=!e,this.collapsedExpandedState.allExpanded=e,this.persist()}load(){const e=this.getStorageKeyFn;if(e){const t=e();if(t){const o=t+this.COLLAPSED_EXPANDED_STATE,i=this.loadFromLocalStorage(o);i&&(this.collapsedExpandedState=i)}}}persist(){this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE,this.collapsedExpandedState)}}class We extends q{constructor(e){super(e),this.SORTING_STATE="sortingState",this.sortItems=[],this.load()}getSortItems(){return this.sortItems}setSortItems(e){this.sortItems=e,this.checkAndPersistItem(this.SORTING_STATE,this.sortItems)}load(){const e=this.getStorageKeyFn;if(e){const t=e();if(t){const o=t+this.SORTING_STATE,i=this.loadFromLocalStorage(o);this.sortItems=i||[]}}}}class k{constructor(e=0,t=0,o=0,i=0,s){this.left=e,this.width=t,this.height=o,this.top=i,this.index=s}}class Ve{constructor(e,t,o,i){this.hostElement=e,this.tableModel=t,this.dom=o,this.tableOptions=i,this.scrollTop=0,this.areaBodyWestGeo=new k,this.areaBodyCenterGeo=new k,this.areaBodyEastGeo=new k;const s=this.hostElement;s.innerText="",this.dom.setAttribute(s,"tabindex","0"),this.dom.setStyle(this.dom.addClass("ge-table",s),"position","relative"),this.hoverRow=o.applyStylePosistionAbsolute(o.createDivWithClass("ge-table-hover-row",s)),this.hoverColumn=o.applyStylePosistionAbsolute(o.createDivWithClass("ge-table-hover-column",s)),this.draggingColumn=o.applyStylePosistionAbsolute(o.createDivWithClass("ge-table-dragging-column",s)),this.areaHeaderWest=o.appendRelativeChildDiv(o.applyStylePosistionAbsolute(o.createAreaDivWithClass("ge-table-header ge-table-header-west",s,"header","west"))),this.areaHeaderCenter=o.appendRelativeChildDiv(o.applyStylePosistionAbsolute(o.createAreaDivWithClass("ge-table-header ge-table-header-center",s,"header","center"))),this.areaHeaderEast=o.appendRelativeChildDiv(o.applyStylePosistionAbsolute(o.createAreaDivWithClass("ge-table-header ge-table-header-east",s,"body","east"))),this.areaBodyWest=o.appendRelativeChildDiv(o.applyStylePosistionAbsolute(o.createAreaDivWithClass("ge-table-body ge-table-body-west",s,"body","west"))),this.areaBodyEast=o.appendRelativeChildDiv(o.applyStylePosistionAbsolute(o.createAreaDivWithClass("ge-table-body ge-table-body-east",s,"body","east"))),this.areaFooterWest=o.appendRelativeChildDiv(o.applyStylePosistionAbsolute(o.createAreaDivWithClass("ge-table-footer ge-table-footer-west",s,"footer","west"))),this.areaFooterCenter=o.appendRelativeChildDiv(o.applyStylePosistionAbsolute(o.createAreaDivWithClass("ge-table-footer ge-table-footer-center",s,"footer","center"))),this.areaFooterEast=o.appendRelativeChildDiv(o.applyStylePosistionAbsolute(o.createAreaDivWithClass("ge-table-footer ge-table-footer-east",s,"footer","east"))),this.scrollViewport=o.applyStyleOverflowAuto(this.tableOptions.overflowX??"auto",this.tableOptions.overflowY??"auto",o.applyStyleNoPadding(o.applyStylePosistionAbsolute(o.createAreaDivWithClass("ge-table-scroll-viewport",s,"body","center")))),this.contentWrapperDiv=o.applyStyleNoPadding(o.applyStylePosistionRelative(o.createDivWithClass("ge-table-scroll-content-wrapper",this.scrollViewport))),this.contentDiv=o.applyStyleNoPadding(o.applyStylePosistionRelative(o.createDivWithClass("ge-table-scroll-content",this.contentWrapperDiv))),this.areaBodyCenter=o.appendRelativeChildDiv(o.createDivWithClass("ge-table-body-center",this.contentDiv)),this.borderHeaderBottom=o.applyStylePosistionAbsolute(o.createDivWithClass("ge-table-header-border",s)),this.borderFixedWest=o.applyStylePosistionAbsolute(o.createDivWithClass("ge-table-west-fixed-column-border",s)),this.borderFixedEast=o.applyStylePosistionAbsolute(o.createDivWithClass("ge-table-east-fixed-column-border",s)),this.borderFooterTop=o.applyStylePosistionAbsolute(o.createDivWithClass("ge-table-footer-border",s))}adjustContainersAndRows(){const e=this.tableModel.getPadding(),t=this.hostElement.clientWidth,o=this.hostElement.clientHeight;this.dom.applyStyle(this.scrollViewport,{width:`${t-e.left}px`,height:`${o-e.top}px`,top:`${e.top}px`,left:`${e.left}px`}),this.scrollTop=this.scrollViewport.scrollTop,this.dom.applyStyle(this.contentDiv,{width:`${this.scrollViewport.clientWidth}px`,height:`${this.scrollViewport.clientHeight}px`,top:`${this.scrollTop}px`,left:`${this.scrollViewport.scrollLeft}px`}),this.areaBodyWestGeo.width=e.left,this.areaBodyWestGeo.height=o-e.top-e.bottom,this.areaBodyWestGeo.top=e.top,this.areaBodyWestGeo.left=0,this.dom.applyStyleInPx(this.areaBodyWest.parent,this.areaBodyWestGeo),this.tableOptions.fixedWestSeparatorBorderVisible&&this.tableModel.getFixedLeftColumnCount()?this.dom.applyDisplayBlockStyle(this.dom.applyStyle(this.borderFixedWest,{width:"1px",height:`${this.areaBodyWestGeo.height}px`,top:`${this.areaBodyWestGeo.top}px`,left:`${this.areaBodyWestGeo.width}px`})):this.dom.applyDisplayNoneStyle(this.borderFixedWest),this.areaBodyEastGeo.width=e.right,this.areaBodyEastGeo.height=o-e.top-e.bottom,this.areaBodyEastGeo.top=e.top,this.areaBodyEastGeo.left=t-e.right,this.dom.applyStyleInPx(this.areaBodyEast.parent,this.areaBodyEastGeo),this.tableOptions.fixedEastSeparatorBorderVisible&&this.tableModel.getFixedLeftColumnCount()?this.dom.applyDisplayBlockStyle(this.dom.applyStyle(this.borderFixedEast,{width:"1px",height:`${this.areaBodyEastGeo.height}px`,top:`${this.areaBodyEastGeo.top}px`,left:`${this.areaBodyEastGeo.left}px`})):this.dom.applyDisplayNoneStyle(this.borderFixedEast),this.areaBodyCenterGeo.width=t-e.left-e.right,this.areaBodyCenterGeo.height=o-e.top-e.bottom,this.areaBodyCenterGeo.top=0,this.areaBodyCenterGeo.left=0,this.dom.applyStyleInPx(this.areaBodyCenter.parent,this.areaBodyCenterGeo),this.dom.applyStyle(this.areaHeaderCenter.parent,{width:`${t-e.left-e.right}px`,height:`${e.top}px`,top:"0",left:`${e.left}px`}),this.dom.applyStyle(this.areaHeaderWest.parent,{width:`${e.left}px`,height:`${e.top}px`,top:"0",left:"0"}),this.dom.applyStyle(this.areaHeaderEast.parent,{width:`${e.right}px`,height:`${e.top}px`,top:"0",left:`${t-e.right}px`}),this.tableOptions.headerSeparatorBorderVisible&&this.tableModel.isHeaderVisibe()?this.dom.applyDisplayBlockStyle(this.dom.applyStyle(this.borderHeaderBottom,{width:`${t}px`,height:"1px",top:`${e.top}px`,left:"0px"})):this.dom.applyDisplayNoneStyle(this.borderHeaderBottom),this.dom.applyStyle(this.areaFooterWest.parent,{width:`${e.left}px`,height:`${e.bottom}px`,top:`${o-e.bottom}px`,left:"0"}),this.dom.applyStyle(this.areaFooterCenter.parent,{width:`${t-e.left-e.right}px`,height:`${e.bottom}px`,top:`${o-e.bottom}px`,left:`${e.left}px`}),this.dom.applyStyle(this.areaFooterEast.parent,{width:`${e.right}px`,height:`${e.bottom}px`,top:`${o-e.bottom}px`,left:`${t-e.right}px`}),this.tableOptions.footerSeparatorBorderVisible&&this.tableModel.isFooterVisibe()?this.dom.applyDisplayBlockStyle(this.dom.applyStyle(this.borderFooterTop,{width:`${t}px`,height:"1px",top:`${o-e.bottom}px`,left:"0px"})):this.dom.applyDisplayNoneStyle(this.borderFooterTop),this.adjustAfterScrolling()}adjustAfterScrolling(){}resetSizeOfWrapperDiv(){const e=`${this.tableModel.getContentWidthInPixel()}px`,t=`${this.tableModel.getContentHeightInPixel()+1}px`;this.dom.setStyle(this.contentWrapperDiv,"width",e),this.dom.setStyle(this.contentWrapperDiv,"height",t)}}class A{constructor(e,t,o,i,s=!1){this.r1=e,this.c1=t,this.r2=o,this.c2=i,this.gammaRange=s}static create(e){return e.gammaRange===void 0&&(e.gammaRange=!1),new A(e.rowIndex1,e.columnIndex1,e.rowIndex2,e.columnIndex2,e.gammaRange)}static singleCell(e,t){return new A(e,t,e,t)}static singleRow(e){return new A(e,0,e,Number.MAX_SAFE_INTEGER)}static singleColumn(e){return new A(0,e,Number.MAX_SAFE_INTEGER,e)}isInRange(e,t){return e>=this.r1&&e<=this.r2&&t>=this.c1&&t<=this.c2}}class Ge{constructor(e,t){this.tableModel=e,this.areaModel=t,this.colAndRowspanRanges=void 0}init(){if(this.areaModel.getMaxColspan()<2&&this.areaModel.getMaxRowspan()<2)return;this.colAndRowspanRanges=[];const e=this.areaModel.getRowCount(),t=this.tableModel.getColumnCount();for(let o=0;o<e;o++)for(let i=0;i<t;i++){let s=this.areaModel.getColspanAt(o,i),l=this.areaModel.getRowspanAt(o,i);if(s>1||l>1){s===0&&(s=1),l===0&&(l=1);const n="gammaCells"in this.areaModel;this.colAndRowspanRanges.push(new A(o,i,o+l-1,i+s-1,n))}}}getRanges(){return this.colAndRowspanRanges?this.colAndRowspanRanges:[]}isInRange(e,t){if(this.colAndRowspanRanges){for(const o of this.colAndRowspanRanges)if(o.isInRange(e,t))return!0}return!1}}class ze{constructor(e,t,o){this.header=e,this.body=t,this.footer=o}}class Ne extends Ve{constructor(e,t,o,i){var l,n;super(e,t,o,i),this.dragging=!1,this.editing=!1,this.storedColumnWidths=[],this.scrollLeft=0,this.scrollViewportLeft=0,this.scrollFactorY=0,this.scrollFactorX=0,this.cleanupFunctions={header:[],body:[],footer:[]},this.tree=!1,this.colAndRowspanModels=new ze,this.firstVisibleRowIndex=-1,this.draggingTargetColumnIndex=-1,this.removables=[],this.tableModel.getSelectionModel?this.getSelectionModel=this.tableModel.getSelectionModel:(l=this.tableOptions)!=null&&l.getSelectionModel&&(this.getSelectionModel=this.tableOptions.getSelectionModel),(n=this.tableOptions)!=null&&n.getFocusModel&&(this.getFocusModel=this.tableOptions.getFocusModel),X(t.getAreaModel("body"))&&(this.tree=!0),["header","body","footer"].forEach(a=>{var d;this.colAndRowspanModels[a]=new Ge(t,t.getAreaModel(a)),(d=this.colAndRowspanModels[a])==null||d.init()})}isEditing(){return this.editing}resetEditorRenderer(){this.editorRenderer=void 0,this.editorRendererRow=-1,this.editorRendererColumn=-1,this.editing=!1}clearSelection(e=!1){if(this.getSelectionModel){const t=this.getSelectionModel();t==null||t.clear(),e&&this.repaint()}}initRenderEditor(e,t){var i;let o=(i=this.tableModel.getColumnDef(t))==null?void 0:i.getEditRenderer;if(o||(o=this.tableOptions.getEditRenderer),o)if(this.editorRenderer=o(e,t),this.editorRenderer){this.editorRendererRow=e,this.editorRendererColumn=t,this.editing=!0,this.repaint();const s=document.querySelector("input.ge-table-cell-editor-input");s&&s.focus()}else this.resetEditorRenderer()}repaint(){this.adjustAfterScrolling()}repaintHard(){this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows(),this.adjustAfterScrolling()}adjustAfterScrolling(){var e;for(const t of this.removables)t.remove();this.hideHoverRow(),this.hideHoverColumn(),this.scrollTop=this.scrollViewport.scrollTop,this.scrollLeft=this.scrollViewport.scrollLeft,this.debounce(this.checkForScrollPosSaving.bind(this)),this.scrollFactorY=this.scrollTop/(this.scrollViewport.scrollHeight-this.scrollViewport.clientHeight),this.scrollFactorX=this.scrollLeft/(this.scrollViewport.scrollWidth-this.scrollViewport.clientWidth),isNaN(this.scrollFactorY)&&(this.scrollFactorY=0),isNaN(this.scrollFactorX)&&(this.scrollFactorX=0),this.adjustBody(),this.adjustArea("footer"),this.adjustArea("header"),this.tableOptions.tableTopBorderVisible&&this.removables.push(this.dom.addHorizontalBorder(new k(0,this.hostElement.clientWidth,1,0),this.hostElement,"ge-table-border")),this.tableOptions.tableBottomBorderVisible&&this.removables.push(this.dom.addHorizontalBorder(new k(0,this.hostElement.clientWidth,1,this.hostElement.clientHeight-1),this.hostElement,"ge-table-border")),this.tableModel.getFixedLeftColumnCount()>0&&this.removables.push(this.dom.addVerticalBorder(new k(this.areaBodyWest.child.clientWidth,1,this.hostElement.clientHeight,0),this.hostElement,"ge-table-body-west-vertical-border")),((e=this.tableModel.getAreaModel("header"))==null?void 0:e.getRowCount())>0&&this.removables.push(this.dom.addHorizontalBorder(new k(0,this.hostElement.clientWidth,1,this.areaHeaderCenter.child.clientHeight),this.hostElement,"ge-table-body-west-vertical-border"))}checkForScrollPosSaving(){var e,t;this.storeScrollPosStateService&&((t=(e=this.tableOptions)==null?void 0:e.autoRestoreOptions)!=null&&t.autoRestoreScrollPosition)&&this.storeScrollPosStateService.updateScrollOffset([this.scrollLeft,this.scrollTop])}updateCells(e,t=!1){e.forEach(o=>{this.tableModel.getAreaModel(o.area).setValue(o.rowIndex,o.columnIndex,o.value),t||this.rerenderCellContent(o)}),t&&this.repaint()}rerenderCellContent({area:e,rowIndex:t,columnIndex:o,value:i,cssClasses:s}){const l=this.tableModel.getAreaModel(e),n='div[data-col-index="'+o+'"][data-row-index="'+t+'"][data-area="'+e+'"]',a=document.querySelector(n);if(a){let d;const h=this.editorRenderer&&this.editorRendererRow===t&&this.editorRendererColumn===o?this.editorRenderer:l.getCellRenderer(t,o);if(a.innerText="",this.applyCssClasses(a,s),h)d=h.render(a,t,o,e,l,i,this.dom.domService),d&&this.cleanupFunctions[e].push(d);else{const f=`${i}`;this.dom.addLabelDiv(a,f,!1,t,o,e)}const g=l.getCustomClassesAt(t,o);g.length&&this.dom.addClasses(g,a);const m=l.getCustomStyleAt(t,o);if(m)for(const f in m)this.dom.setStyle(a,f,m[f])}}storeColumnWidths(){const e=this.tableModel.getColumnDefs();e!=null&&e.length&&(this.storedColumnWidths=e.map((t,o)=>this.tableModel.getColumnWidth(o)))}getAreaAndSideIdentByAttr(e){if(e){const t=this.getStringByAttr(e,"data-area"),o=this.getStringByAttr(e,"data-side");if(o&&t)return[t,o]}return[void 0,void 0]}getArea(e,t){if(e==="header"){if(t==="west")return this.areaHeaderWest;if(t==="center")return this.areaHeaderCenter;if(t==="east")return this.areaHeaderEast}else if(e==="body"){if(t==="west")return this.areaBodyWest;if(t==="center")return this.areaBodyCenter;if(t==="east")return this.areaBodyEast}else if(e==="footer"){if(t==="west")return this.areaFooterWest;if(t==="center")return this.areaFooterCenter;if(t==="east")return this.areaFooterEast}throw Error(`Wrong area identifier: row:${e}, col:${t}`)}adjustBody(){const e=this.areaBodyCenterGeo.height-this.tableModel.getContentHeightInPixel(),t=this.scrollFactorY*e;this.dom.setStyle(this.contentDiv,"top",`${this.scrollTop}px`),this.dom.setStyle(this.contentDiv,"left",`${this.scrollViewport.scrollLeft}px`),this.adjustArea("body",t)}getNumberByAttr(e,t){var o;if(e){const i=(o=e.closest("["+t+"]"))==null?void 0:o.getAttribute(t);if(i)return Number(i)}return-1}getStringByAttr(e,t){var o;if(e){const i=(o=e.closest("["+t+"]"))==null?void 0:o.getAttribute(t);if(i)return i}return""}adjustArea(e,t=0){var u;const o=this.getArea(e,"west"),i=this.getArea(e,"center"),s=this.getArea(e,"east"),l=i.child.clientHeight;o.child.innerText="",i.child.innerText="",s.child.innerText="";const n=0,a=this.areaBodyCenterGeo.width,d=this.tableModel.getPadding(),c=this.tableModel.getAreaModel(e),h=c.getRowCount();for(;this.cleanupFunctions[e].length;){const p=this.cleanupFunctions[e].shift();p&&p()}let g=t;const m=this.tableModel.getColumnCount(),f=this.tableModel.getFixedRightColumnCount(),b=this.tableModel.getFixedLeftColumnCount();for(let p=0;p<h;p++){const C=g,w=p===h-1,_=this.tableModel.getRowHeight(e,p);if(C+_>0){this.firstVisibleRowIndex=p;let v={left:n,width:a,height:_,top:C,index:p},y=this.dom.addRowDiv(i,v,p,e,"center");const T=b;if(this.adjustColumnsToRowParent({areaIdent:e,sideIdent:"center",areaModel:c,geo:v,parent:y,rowIndex:p,columnIndexStart:T,columnIndexEnd:m-f-1,verticalFixed:!1,lastRowOfModel:w}),d.left>0&&(v={left:n,width:this.areaBodyWestGeo.width,height:_,top:C,index:p},y=this.dom.addRowDiv(o,v,p,e,"west"),this.adjustColumnsToRowParent({areaIdent:e,sideIdent:"west",areaModel:c,geo:v,parent:y,rowIndex:p,columnIndexStart:0,columnIndexEnd:T-1,verticalFixed:!0,lastRowOfModel:w})),d.right>0&&(v={left:n,width:this.areaBodyEastGeo.width,height:_,top:C,index:p},y=this.dom.addRowDiv(s,v,p,e,"east"),this.adjustColumnsToRowParent({areaIdent:e,sideIdent:"east",areaModel:c,geo:v,parent:y,rowIndex:p,columnIndexStart:m-f,columnIndexEnd:m-1,verticalFixed:!0,lastRowOfModel:w})),e==="header"&&this.tree&&p===h-1){const M=this.dom.applyStyle(this.dom.setAttribute(this.dom.addDiv(y,new k(16,20,20,8)),"data-ge-action","toggleExpandCollapseAll"),{cursor:"pointer"}),R=this.tableOptions.treeOptions.arrowExpandCollapseAll;if(R){const L=this.dom.domService.createText(R.content);this.dom.domService.appendChild(M,L),R.style&&this.dom.applyStyleString(M,R.style)}}}if(g=g+_,g>l)break}if(this.colAndRowspanModels&&this.colAndRowspanModels[e]){const p=((u=this.colAndRowspanModels[e])==null?void 0:u.getRanges())??[];if(p.length)for(const C of p){let w=0,_=i.child,v="center";if(C.c1<b)_=o.child,v="west";else if(f>0&&C.c1>=m-f)_=s.child,v="east";else{const y=this.areaBodyCenterGeo.width-this.tableModel.getContentWidthInPixel();w=this.scrollFactorX*y-this.areaBodyWestGeo.width,v="center"}this.drawBigCell(C,w,t,c,_,v)}}}drawBigCell(e,t,o,i,s,l){const n=o+this.getRowHeights(0,e.r1-1,i).reduce((u,p)=>u+p,0),a=this.tableModel.getColumnCount(),d=this.tableModel.getFixedRightColumnCount();let c=0;d>0&&e.c1>=a-d&&(c=a-d);const h=t+this.getColumnWidths(c,e.c1-1).reduce((u,p)=>u+p,0),g=this.getRowHeights(e.r1,e.r2,i).reduce((u,p)=>u+p,0),m=this.getColumnWidths(e.c1,e.c2).reduce((u,p)=>u+p,0);let f=!1;const b=this.getSelectionModel?this.getSelectionModel():void 0;b&&(f=b.getSelectionCount(e.r1,e.c1)>0),e.gammaRange?this.renderCell({areaModel:i,areaIdent:i.areaIdent,sideIdent:l,rowIndex:e.r1,columnIndex:e.c1,left:h,top:n,width:m,height:g,parent:s,cellSelected:f,lastRowOfModel:!0,gammaRange:e.gammaRange}):this.renderCell({areaModel:i,areaIdent:i.areaIdent,sideIdent:l,rowIndex:e.r1,columnIndex:e.c1,left:h,top:n,width:m,height:g,parent:s,cellSelected:f,lastRowOfModel:!0,gammaRange:e.gammaRange}),i.areaIdent==="header"&&this.tableOptions.columnsResizable&&this.renderHeaderCellResizeHandle({rowIndex:e.r1,columnIndex:e.c1,cellLeft:h,cellTop:n,cellWidth:m,cellHeight:g,parent:s})}findRowOfImportantRowspanCell(e,t,o){const i=e.getMaxRowspan();for(let s=t-1;s>-1;s--){const l=e.getRowspanAt(s,o);if(l>1&&s+l+1>=t)return s;if(t-s>i)return-1}return-1}adjustColumnsToRowParent({areaIdent:e,sideIdent:t,areaModel:o,geo:i,parent:s,rowIndex:l,columnIndexStart:n,columnIndexEnd:a,verticalFixed:d=!1,lastRowOfModel:c=!1}){var b;this.scrollViewportLeft=this.scrollViewport.scrollLeft;let h=0;if(!d){const u=this.areaBodyCenterGeo.width-this.tableModel.getContentWidthInPixel();h=this.scrollFactorX*u}const g=0,m=!!(e==="body"&&t);let f=h;for(let u=n;u<=a;u++){const p=f,C=this.tableModel.getColumnWidth(u);if(C>0&&p+C>0){let w=i.height;const _=o.getRowspanAt(l,u),v=o.getColspanAt(l,u);_>1&&(w=this.getRowHeights(l,l+_-1,o).reduce((M,R)=>M+R,0));let y=C;v>1&&(y=this.getColumnWidths(u,u+v-1).reduce((M,R)=>M+R,0));let T=!1;if(this.colAndRowspanModels&&this.colAndRowspanModels[e]&&(b=this.colAndRowspanModels[e])!=null&&b.isInRange(l,u)&&(T=!0),this.draggingTargetColumnIndex===u&&e!=="header"){this.renderDragTargetDiv(s,p,g,y,w);const M={left:p,top:g,width:y,height:w};this.dom.addColumnBorderDivs(this.tableOptions,s,M,e,t)}else{const M=this.renderSelectedBackgroundDiv(T,m,t,o,l,u,s,p,g,y,w);"gammaCells"in o&&o.getValueAt(l,u)&&(T=!1),T||this.renderCell({areaModel:o,areaIdent:e,sideIdent:t,rowIndex:l,columnIndex:u,left:p,top:g,width:y,height:w,parent:s,cellSelected:M,lastRowOfModel:c,gammaRange:!0}),e==="header"&&this.tableOptions.columnsResizable&&this.renderHeaderCellResizeHandle({rowIndex:l,columnIndex:u,cellLeft:p,cellTop:g,cellWidth:y,cellHeight:w,parent:s})}}if(f=f+C,f>this.areaBodyCenterGeo.width)break}this.tableOptions.verticalBorderVisible&&this.dom.addVerticalBorder(new k(f-1,1,i.height,0),s)}getTreeArrowColumnIndex(){return this.tableOptions.showCheckboxWihoutExtraColumn?0:this.tableModel.isRowCheckboxVisible()?1:0}addAndRenderCellDiv({areaModel:e,areaIdent:t,sideIdent:o,rowIndex:i,index:s,left:l,width:n,height:a,top:d,parent:c,lastRowOfModel:h}){var Q;const m=this.editorRenderer&&this.editorRendererRow===i&&this.editorRendererColumn===s?this.editorRenderer:e.getCellRenderer(i,s),f={left:l,width:n,height:a,top:d,index:s},b=e.getRowByIndex(i);let u="none";if(s===this.getTreeArrowColumnIndex()&&j(b)){const x=b;(Q=x.children)!=null&&Q.length?x.expanded?u="expanded":u="collapsed":u="hidden"}let C;if(t==="header"){const x=this.tableModel.getColumnDef(s);(!(x!=null&&x.sortIconVisible)||x!=null&&x.sortIconVisible())&&(C=x==null?void 0:x.sortState)}const w=e.getValueAt(i,s),_=m?"":`${w}`,v=e.isRowChecked(i),y=this.dom.addColumnDiv({parent:c,geo:f,rowIndex:i,columnIndex:s,areaIdent:t,sideIdent:o,text:_,treeArrow:u,tableOptions:this.tableOptions,checkedType:v,sortState:C}),T=e.getTooltipAt(i,s);T&&this.dom.setAttribute(y,"title",T);const M=this.tableModel.getColumnDef(s);M&&M.classes[t]&&this.dom.addClasses(M.classes[t],y);let R;m&&(R=m.render(y,i,s,t,e,w,this.dom.domService));const L=e.getCustomClassesAt(i,s);if(L.length&&this.dom.addClasses(L,y),this.dom.addColumnBorderDivs(this.tableOptions,c,f,t,o),h&&this.dom.addHorizontalBorder({left:l,width:n,height:a,top:d+a},c),this.getFocusModel&&t==="body"){const x=this.getFocusModel();x!=null&&x.hasFocus(i,s)&&this.dom.addFocusBorderDivs(c,f,{})}t==="header"&&this.dom.setAttribute(y,"data-ge-action","drag-column");const V=e.getCustomStyleAt(i,s);if(V)for(const x in V)this.dom.setStyle(y,x,V[x]);return[y,R]}applyCssClasses(e,t={}){e&&Object.entries(t).forEach(([o,i])=>{i?this.dom.addClass(o,e):this.dom.removeClass(o,e)})}getColumnWidths(e,t){const o=[];for(let i=e;i<=t;i++)o.push(this.tableModel.getColumnWidth(i));return o}getRowHeights(e,t,o){const i=[];for(let s=e;s<=t;s++)i.push(o.getRowHeight(s));return i}adjustHoverRows(e){if(this.tableOptions.hoverRowVisible&&e.rowIndex>-1){const t=this.hostElement.clientWidth,o=this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex),i=e.rowTop+this.areaHeaderCenter.parent.clientHeight-this.scrollTop;this.dom.applyStyle(this.hoverRow,{left:"0",top:i+"px",width:t+"px",height:o+"px",display:"block"})}else this.hideHoverRow()}hideHoverRow(){this.dom.applyStyle(this.hoverRow,{display:"none"})}adjustHoverColumns(e){if(this.tableOptions.hoverColumnVisible&&e.rowIndex>-1){const t=this.hostElement.clientHeight,o=this.tableModel.getColumnWidth(e.columnIndex),i=this.areaBodyWestGeo.width,s=e.columnLeft+this.tableModel.getPadding().left-this.scrollLeft-i;this.dom.applyStyle(this.hoverColumn,{left:s+"px",top:"0px",width:o+"px",height:t+"px",display:"block"})}else this.hideHoverColumn()}hideHoverColumn(){this.dom.applyStyle(this.hoverColumn,{display:"none"})}debounce(e,t=1e3){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(e.bind(this),t)}adjustDraggingColumn(e,t,o){var i,s;if(this.dragging){const l=this.hostElement.clientHeight,n=this.storedColumnWidths[t];if((i=e.originalEvent)!=null&&i.clientX){const c={left:((s=e.originalEvent)==null?void 0:s.clientX)-n/2,width:n,height:l,top:0,index:t};this.dom.applyStyle(this.draggingColumn,{background:"rgba(128,128,128,0.2)",display:"block",overfllow:"clip"}),this.dom.applyStyleInPx(this.draggingColumn,c),o&&this.renderContentOfDraggingColumn(c)}}else this.hideDraggingColumn()}renderContentOfDraggingColumn(e){const t=this.renderContentOfDraggingColumnForArea(e,"header",0);this.renderContentOfDraggingColumnForArea(e,"body",t)}renderContentOfDraggingColumnForArea(e,t,o=0){const i="center",s=this.tableModel.getAreaModel(t),l=s==null?void 0:s.getRowCount();if(l){const n=e.index??0,a=this.draggingColumn;for(let d=0;d<l;d++){const c=o,h=s.getRowHeight(d),g={left:0,width:e.width,height:h,top:c,index:d},m=s.getValueAt(d,n),f=s.getCellRenderer(d,n),b=f?"":`${m}`,u={parent:a,geo:g,rowIndex:d,columnIndex:n,areaIdent:t,sideIdent:i,text:b},p=this.dom.addColumnDiv(u);let C;f&&(C=f.render(p,d,n,t,s,m,this.dom.domService),C&&this.cleanupFunctions[t].push(C));const w=s.getCustomClassesAt(d,n);w.length&&this.dom.addClasses(w,p);const _=this.tableModel.getColumnDef(n);_&&_.classes[t]&&this.dom.addClasses(_.classes[t],p),this.dom.addColumnBorderDivs(this.tableOptions,a,g,t,i);const v=s.getCustomStyleAt(d,n);if(v)for(const y in v)this.dom.setStyle(p,y,v[y]);o=o+h}}return o}hideDraggingColumn(){this.dom.applyStyle(this.draggingColumn,{display:"none"})}renderDragTargetDiv(e,t,o,i,s){const l=this.dom.applyStylePosistionAbsolute(this.dom.createDivWithClass("ge-table-drop-zone",e));return this.dom.setStyle(l,"left",`${t}px`),this.dom.setStyle(l,"top",`${o}px`),this.dom.setStyle(l,"width",`${i}px`),this.dom.setStyle(l,"height",`${s}px`),l}renderSelectedBackgroundDiv(e,t,o,i,s,l,n,a,d,c,h){let g=!1;if(!e&&t&&i.isSelectable(s,l)&&this.getSelectionModel){const m=this.getSelectionModel();if(m){const f=m.getSelectionCount(s,l);g=f>0;for(let b=0;b<f;b++){const u=this.dom.applyStylePosistionAbsolute(this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${o}-selected-range`,n));this.dom.setStyle(u,"left",`${a}px`),this.dom.setStyle(u,"top",`${d}px`),this.dom.setStyle(u,"width",`${c}px`),this.dom.setStyle(u,"height",`${h}px`)}}}return g}renderCell({areaModel:e,areaIdent:t,sideIdent:o,rowIndex:i,columnIndex:s,left:l,top:n,width:a,height:d,parent:c,cellSelected:h,lastRowOfModel:g}){const[m,f]=this.addAndRenderCellDiv({areaModel:e,areaIdent:t,sideIdent:o,rowIndex:i,index:s,left:l,width:a,height:d,top:n,parent:c,lastRowOfModel:g});h&&this.dom.addClass(`ge-table-${t}-${o}-selected-range`,m),f&&this.cleanupFunctions[t].push(f)}renderHeaderCellResizeHandle({rowIndex:e,columnIndex:t,cellLeft:o,cellTop:i,cellWidth:s,cellHeight:l,parent:n}){const a=this.dom.domService,d=this.tableOptions.columnResizeHandleWidthInPx??2,c=a.createElement("div");a.setAttribute(c,"data-col-index",`${t}`),a.setAttribute(c,"data-row-index",`${e}`),a.setAttribute(c,"data-area","header"),a.setAttribute(c,"data-ge-action","resize-column"),a.addClass(c,"ge-table-column-resize-handle"),a.setStyle(c,"display","clip"),a.setStyle(c,"position","absolute"),a.setStyle(c,"cursor","col-resize"),a.setStyle(c,"left",`${o+s-d}px`),a.setStyle(c,"top",`${i}px`),a.setStyle(c,"width",`${d}px`),a.setStyle(c,"height",`${l}px`),a.appendChild(n,c)}}class je{constructor(e,t){this.columnIndex=e,this.sortState=t}}class Xe{constructor(e){this.tableScope=e,this.tableScope.hostElement.addEventListener("change",this.onHostElementChanged.bind(this))}onHostElementChanged(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement||e.target instanceof HTMLTextAreaElement){const t=e.target,o=t.getAttribute("data-area"),i=t.getAttribute("data-row-index"),s=t.getAttribute("data-col-index");if(o&&i&&s){const l=U(o),n=Number(i),a=Number(s);this.tableScope.updateModelValueAfterEdit(l,n,a,t.value)}}}}class Ke{constructor(e=-1,t=-1){this.rowIndex=e,this.columnIndex=t}}class J{constructor(e){this.cells=e}static createSingle(e,t){return new J([new Ke(e,t)])}}class Ye{constructor(e){var t,o;this.tableScope=e,(t=this.tableScope.tableOptions)!=null&&t.getSelectionModel&&(this.getSelectionModel=this.tableScope.tableOptions.getSelectionModel),(o=this.tableScope.tableOptions)!=null&&o.getFocusModel&&(this.getFocusModel=this.tableScope.tableOptions.getFocusModel)}onMouseClicked(e,t){var s,l,n,a,d,c,h;let o=!1,i=!1;if(this.getSelectionModel&&this.getFocusModel){const g=this.getSelectionModel(),m=this.getFocusModel();g&&m&&(m.hasFocus(e.rowIndex,e.columnIndex)||(m.setFocus(e.rowIndex,e.columnIndex),this.tableScope.onFocusChanged(m),o=!0),(s=e.originalEvent)!=null&&s.shiftKey||g.hasSelection()&&(g.clear(),o=!0),(l=e.originalEvent)!=null&&l.shiftKey&&this.previousEvt?(g.addSelection(this.createRangeByEvents(e,this.previousEvt)),i=!0,o=!0):(n=e.originalEvent)!=null&&n.altKey&&((a=e.originalEvent)!=null&&a.ctrlKey||(d=e.originalEvent)!=null&&d.metaKey)?(g.removeSelection(A.singleCell(e.rowIndex,e.columnIndex)),i=!0,o=!0):(c=e.originalEvent)!=null&&c.ctrlKey||(h=e.originalEvent)!=null&&h.metaKey?(g.addSelection(A.singleCell(e.rowIndex,e.columnIndex)),i=!0,o=!0):(g.firstClick(e.rowIndex,e.columnIndex),o=!0),this.tableScope.onSelectionChanged(g))}return i?this.previousEvt=void 0:this.previousEvt=e==null?void 0:e.clone(),o}onActionTriggered(e){if(this.getSelectionModel&&this.getFocusModel){const t=this.getSelectionModel(),o=this.getFocusModel();if(t&&o){if(e==="SELECT_ALL")return t.selectAll(),this.tableScope.repaint(),!0;if(e==="DESELECT_ALL")return t.clear(),this.tableScope.repaint(),!0;if(e==="TOGGLE_SELECTION"){const[i,s]=o.getFocus();return t.togglePoint(i,s),this.tableScope.repaint(),!0}}}return!1}createRangeByEvents(e,t){t||(t=e);const o=Math.min(e.rowIndex,t==null?void 0:t.rowIndex),i=Math.max(e.rowIndex,t==null?void 0:t.rowIndex),s=Math.min(e.columnIndex,t==null?void 0:t.columnIndex),l=Math.max(e.columnIndex,t==null?void 0:t.columnIndex);return A.create({rowIndex1:o,columnIndex1:s,rowIndex2:i,columnIndex2:l})}}class Ue{get(){return{f2:"START_EDITING",space:"TOGGLE_SELECTION","ctrl+num_add":"SELECT_ALL","ctrl+a":"SELECT_ALL","ctrl+shift+a":"DESELECT_ALL","ctrl+x":"DESELECT_ALL","ctrl+num_subtract":"DESELECT_ALL","meta -":"DESELECT_ALL",arrowup:"NAVIGATE_UP",arrowdown:"NAVIGATE_DOWN",arrowleft:"NAVIGATE_LEFT",arrowright:"NAVIGATE_RIGHT","meta+c":"COPY_2_CLIPBOARD","ctrl+c":"COPY_2_CLIPBOARD"}}}class qe{get(){return{f2:"START_EDITING",space:"TOGGLE_SELECTION","ctrl+num_add":"SELECT_ALL","meta+a":"SELECT_ALL","ctrl+a":"SELECT_ALL","meta+x":"DESELECT_ALL","meta+shift+a":"DESELECT_ALL","ctrl+shift+a":"DESELECT_ALL","ctrl+num_subtract":"DESELECT_ALL","ctrl -":"DESELECT_ALL",arrowup:"NAVIGATE_UP",arrowdown:"NAVIGATE_DOWN",arrowleft:"NAVIGATE_LEFT",arrowright:"NAVIGATE_RIGHT","meta+c":"COPY_2_CLIPBOARD","ctrl+c":"COPY_2_CLIPBOARD"}}}class Je{constructor(e){this.tableScope=e,this.shortcutActionIdMapping={},this.listener=[],this.listener.push(e),this.init()}addListener(e){this.listener.includes(e)||this.listener.push(e)}init(){this.assignPredefinedSystemShortcutMappings(),Object.assign(this.shortcutActionIdMapping,this.tableScope.tableOptions.shortcutActionIdMapping),this.isDebug()&&console.debug("ShortcutService",this.shortcutActionIdMapping),this.tableScope.hostElement.addEventListener("keydown",this.onKeyDown.bind(this))}assignPredefinedSystemShortcutMappings(){this.isMacintosh()?Object.assign(this.shortcutActionIdMapping,new qe().get()):Object.assign(this.shortcutActionIdMapping,new Ue().get())}isMacintosh(){return navigator.platform.indexOf("Mac")>-1}isDebug(){return this.isLocalhost()}isLocalhost(){return location.hostname==="localhost"||location.hostname==="127.0.0.1"}onKeyDown(e){const t=this.findEntity(e);t&&this.emit(t)&&(e.preventDefault(),e.stopPropagation())}emit(e){this.isDebug()&&console.debug("ShortcutService emit :",e);let t=!1;for(const o of this.listener)o.onActionTriggered(e)&&(t=!0);return t}findEntity(e){const t=this.getTokenByEvent(e);this.isDebug()&&console.debug("ShortcutService tokens :",t);for(const o in this.shortcutActionIdMapping){const i=o.replace(/opt/g,"alt").replace(/cmd/g,"meta").split(/[+ ]/g).sort();if(this.areTokensEquals(t,i))return this.shortcutActionIdMapping[o]}}areTokensEquals(e,t){if(e.length!==t.length||e.length===0)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}getTokenByEvent(e){const t=[];return e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),e.code&&t.push(e.code.toLowerCase().replace(/key/g,"")),t.sort()}getShortcutActionMapping(){return this.shortcutActionIdMapping}}class te{onCheckboxChanged(e){}onContextmenu(e){}onModelChanged(e){}onMouseClicked(e){}onMouseDragging(e){}onMouseDraggingEnd(e){}onMouseMoved(e){}onSelectionChanged(e){}onFocusChanged(e){}}class xe{setStyle(e,t,o){return e.style[t]=o,e}appendText(e,t){const o=this.createText(t);return this.appendChild(e,o),o}addClass(e,t){return t.includes(" ")?t.split(" ").forEach(o=>e.classList.add(o)):e.classList.add(t),e}removeClass(e,t){return t.includes(" ")?t.split(" ").forEach(o=>e.classList.remove(o)):e.classList.remove(t),e}appendChild(e,t){e.appendChild(t)}createElement(e){return document.createElement(e)}createText(e){return document.createTextNode(e)}setAttribute(e,t,o){e.setAttribute(t,o)}}class Ze{render(e,t,o,i,s,l,n){if(s.isEditable(t,o)){n.addClass(e,"ge-table-row-input-div");const a=s.getValueAt(t,o);e.innerHTML=`
9
+ <input
10
+ type="text"
11
+ value="${a}"
12
+ autofocus
13
+ onfocus="this.setSelectionRange(0, this.value.length)"
14
+ data-listen="change"
15
+ data-area="${i}"
16
+ data-row-index="${t}"
17
+ data-col-index="${o}"
18
+ data-input-type="text"
19
+ style="width:calc(100% - 8px);height:100%;border:0;padding:0 0 0 8px;"
20
+ class="ge-table-cell-editor-input">`}}}class Qe{constructor(e="none",t="single"){this.selectionType=e,this.selectionMode=t,this.ranges=[],this.negativeRanges=[],this.allSelected=!1,this.silent=!1,this.listenerArr=[]}getEventSelectionChangedListeners(){return this.listenerArr}addEventSelectionChangedListener(e){this.listenerArr.includes(e)||this.listenerArr.push(e)}removeEventSelectionChangedListener(e){const t=this.listenerArr.indexOf(e,0);t>-1&&this.listenerArr.splice(t,1)}fireChangeEvent(){this.silent||this.listenerArr.forEach(e=>e.onSelectionChanged(this))}firstClick(e,t){this.selectionType==="row"?this.addRange(A.singleRow(e)):this.selectionType==="column"&&this.addRange(A.singleColumn(t))}getSelectionCount(e,t){let o=0;for(const i of this.ranges)i.isInRange(e,t)&&o++;return this.allSelected&&o++,this.isInNegativeRange(e,t)&&(o=0),o}isInNegativeRange(e,t){for(const o of this.negativeRanges)if(o.isInRange(e,t))return!0;return!1}getRanges(){return this.ranges}clear(){this.ranges=[],this.negativeRanges=[],this.allSelected=!1,this.fireChangeEvent()}hasSelection(){return this.allSelected||!!this.ranges.length}hasNoSelection(){return!this.hasSelection()}getMergedRowIndices(){const e=new Set;for(const t of this.ranges)for(let o=t.r1;o<=t.r2;o++)!e.has(o)&&!this.isInNegativeRange(o,0)&&e.add(o);return Array.from(e)}selectAll(){this.allSelected=!0,this.fireChangeEvent()}isAllSelected(){return this.allSelected}addSelection(e){this.addRange(e),this.fireChangeEvent()}removeSelection(e){if(this.selectionType==="none")return;let t=e;this.selectionType==="row"?t=A.singleRow(e.r1):this.selectionType==="column"&&(t=A.singleColumn(e.c1)),this.negativeRanges.push(t),this.fireChangeEvent()}togglePoint(e,t){this.getSelectionCount(e,t)>0?this.removeSelection(A.singleCell(e,t)):this.addSelection(A.singleCell(e,t))}isSelected(e,t){return this.getSelectionCount(e,t)>0}addRange(e){this.selectionType!=="none"&&(this.allSelected=!1,this.selectionMode==="single"&&(this.ranges=[]),this.selectionType==="row"?(e.c1=0,e.c2=Number.MAX_SAFE_INTEGER):this.selectionType==="column"?(e.r1=0,e.r2=Number.MAX_SAFE_INTEGER):this.selectionType==="cell"?(e.r2=e.r1,e.c2=e.c1):this.selectionType,this.ranges.push(e),this.fireChangeEvent())}}class et{constructor(e="none"){this.selectionType=e,this.rowIndex=-1,this.columnIndex=-1,this.changed=!1,this.listenerArr=[]}getEventFocusChangedListeners(){return this.listenerArr}addEventFocusChangedListener(e){this.listenerArr.includes(e)||this.listenerArr.push(e)}removeEventFocusChangedListener(e){const t=this.listenerArr.indexOf(e,0);t>-1&&this.listenerArr.splice(t,1)}fireChangeEvent(){this.listenerArr.forEach(e=>e.onFocusChanged(this))}clearChanged(){this.changed=!1}hasChanged(){return this.changed}clear(){this.rowIndex=-1,this.columnIndex=-1,this.fireChangeEvent()}setFocus(e,t){(this.rowIndex!==e||this.columnIndex!==t)&&(this.rowIndex=e,this.columnIndex=t,this.changed=!0,this.fireChangeEvent())}hasFocus(e,t){return this.rowIndex===e&&this.columnIndex===t}getFocus(){return[this.rowIndex,this.columnIndex]}}class _e{constructor(e=new O("❯","",["gt-table-icon-expanded"]),t=new O("❯","transform: rotate(180deg) translate(-100%, -100%); transform-origin: 0 0;",["ge-table-icon-collapsed"])){this.iconExpanded=e,this.iconCollapsed=t}}const tt=new Qe,ot=new et("cell");class Ee{constructor(){this.overflowX="auto",this.overflowY="auto",this.horizontalBorderVisible=!0,this.verticalBorderVisible=!0,this.footerSeparatorBorderVisible=!0,this.headerSeparatorBorderVisible=!0,this.fixedEastSeparatorBorderVisible=!0,this.fixedWestSeparatorBorderVisible=!0,this.tableTopBorderVisible=!0,this.tableBottomBorderVisible=!0,this.hoverRowVisible=!0,this.hoverColumnVisible=!0,this.columnsResizable=!0,this.columnsDraggable=!0,this.columnResizeHandleWidthInPx=4,this.defaultRowHeights={header:34,body:34,footer:34},this.footerVerticalSeparator=!1,this.headerToggleExpandCollapseIcons=!1,this.headerVerticalSeparator=!1,this.treeOptions=new Ce,this.headerGroupOptions=new _e,this.showCheckboxWihoutExtraColumn=!1,this.externalFilterFunction=void 0,this.sortedOptions=new we,this.sortOrder=["asc","desc"],this.getEditRenderer=(e,t)=>new Ze,this.getSelectionModel=()=>tt,this.getFocusModel=()=>ot}}const I=class I{createContent(e,t,o){return new Promise((i,s)=>{if(t!=null&&t.hasSelection()){const l=this.mergeRanges(t.getRanges());if(l){l.c2=Math.min(l.c2,e.getColumnCount()-1),l.r2=Math.min(l.r2,e.getBodyModel().getRowCount()-1);const n=[];for(let a=l.r1;a<=l.r2;a++){const d=[];for(let c=l.c1;c<=l.c2;c++){const h=t.isSelected(a,c)?e.getBodyModel().getTextValueAt(a,c):"";d.push(h)}n.push(d.join(I.columnSeparatorChar))}return i(n.join(I.rowSeparatorChar))}}if(o){const[l,n]=o.getFocus(),a=e.getBodyModel().getTextValueAt(l,n);return i(a)}s("Cannot copy, neither selection nor focus defined.")})}copyContent(e){return navigator.clipboard.writeText(e)}copyToClipboard(e,t,o){return new Promise((i,s)=>{this.createContent(e,t,o).then(l=>{l&&this.copyContent(l).then(n=>{i(l)}).catch(n=>{s()})}).catch(l=>{s()})})}mergeRanges(e){let t;for(const o of e)t?(t.r1=Math.min(t.r1,o.r1),t.c1=Math.min(t.c1,o.c1),t.r2=Math.max(t.r2,o.r2),t.c2=Math.max(t.c2,o.c2)):t=new A(o.r1,o.c1,o.r2,o.c2);return t}};I.columnSeparatorChar=" ",I.rowSeparatorChar=`
21
+ `;let B=I;class Z extends Ne{constructor(e,t,o,i,s,l=new B){var d;if(super(e,t,new Fe(o),i),this.eventListener=s,this.copyService=l,this.licenseManager=F.getInstance(),this.selectionService=new Ye(this),this.api=new $e(this),this.mouseStartAction="",this.mouseStartWidth=-1,this.mouseStartColumnIndex=-1,this.dragFrom=-1,this.dragTo=-1,this.lastDragFrom=-1,this.lastDragTo=-1,this.firstDraggingRendering=!0,s||(this.eventListener=new te),(d=this.tableOptions)!=null&&d.autoRestoreOptions){const c=this.tableOptions.autoRestoreOptions,h=c.getStorageKeyFn;h&&(c.autoRestoreScrollPosition&&(this.storeScrollPosStateService=new He(h)),c.autoRestoreCollapsedExpandedState&&(this.storeStateCollapsedExpandService=new Pe(h)),c.autoRestoreSortingState&&(this.storeSortingService=new We(h)))}this.mouseHandler=new Le(this),this.inputHandler=new Xe(this),this.shortcutService=new Je(this),this.shortcutService.addListener(this.selectionService);const n=this.getSelectionModel?this.getSelectionModel():void 0;n&&n.addEventSelectionChangedListener(this);const a=this.getFocusModel?this.getFocusModel():void 0;a&&a.addEventFocusChangedListener(this)}static create(e,t,o=new Ee,i=new te,s=new xe,l=new B){return new Z(e,t,s,o,i,l)}onActionTriggered(e){if(e==="NAVIGATE_DOWN"&&this.changeFocusCell(0,1)||e==="NAVIGATE_UP"&&this.changeFocusCell(0,-1)||e==="NAVIGATE_LEFT"&&this.changeFocusCell(-1,0)||e==="NAVIGATE_RIGHT"&&this.changeFocusCell(1,0))return!0;if(e==="START_EDITING"&&this.getFocusModel){const t=this.getFocusModel();if(t){const[o,i]=t.getFocus();this.tableModel.getBodyModel().isEditable(o,i)&&(this.clearSelection(),this.initRenderEditor(o,i))}return!0}if(e==="COPY_2_CLIPBOARD"){const t=this.getSelectionModel?this.getSelectionModel():void 0,o=this.getFocusModel?this.getFocusModel():void 0;this.copyService.createContent(this.tableModel,t,o).then(i=>this.copyService.copyContent(i))}return!1}updateModelValueAfterEdit(e,t,o,i){e==="body"&&this.tableModel.getAreaModel(e).setValue(t,o,i)&&(this.resetEditorRenderer(),this.repaint(),this.eventListener.onModelChanged(J.createSingle(t,o)),this.hostElement.focus())}getApi(){return this.api}firstInit(){var e;return this.tableModel.init(),(e=this.tableOptions)!=null&&e.externalFilterFunction&&this.externalFilterChanged(!1),this.autoRestoreCollapsedExpandedState(),this.autoRestoreSortingState(),this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows(),this.autoRestoreScrollPosition(),this}createGeMouseEvent(e){const t=new Y;if(t.originalEvent=e,e){const o=e.target;if([t.areaIdent,t.sideIdent]=this.getAreaAndSideIdentByAttr(o),t.rowIndex=this.getNumberByAttr(o,"data-row-index"),t.columnIndex=this.getNumberByAttr(o,"data-col-index"),t.action=this.getStringByAttr(o,"data-ge-action"),t.areaIdent){const i=this.tableModel.getAreaModel(t.areaIdent);t.rowTop=i.getYPosByRowIndex(t.rowIndex)}if(t.columnLeft=this.tableModel.getXPosByColumnIndex(t.columnIndex),e.ctrlKey&&e.altKey){const i=e.clientY-this.hostElement.offsetTop-this.areaHeaderCenter.parent.clientHeight,s=e.clientX-this.hostElement.offsetLeft-this.areaBodyWestGeo.width;this.debugOnce(s,i)}}return t}onMouseDown(e){e.columnIndex>-1&&e.action&&["resize-column","drag-column"].includes(e.action)&&(this.mouseStartWidth=this.tableModel.getColumnWidth(e.columnIndex),this.mouseStartAction=e.action,this.mouseStartColumnIndex=e.columnIndex,this.mouseStartAction==="drag-column"&&(this.firstDraggingRendering=!0,this.dragFrom=this.mouseStartColumnIndex))}mouseDraggingOnFrame(e,t){this.eventListener.onMouseDragging(e),this.mouseEvent=e,this.mouseStartColumnIndex>-1&&this.mouseStartAction==="resize-column"&&this.tableOptions.columnsResizable?this.resizeColumn(e):this.mouseStartAction==="drag-column"&&e.columnIndex>-1&&this.tableOptions.columnsDraggable&&(this.draggingTargetColumnIndex=e.columnIndex,this.dragTo=this.draggingTargetColumnIndex,this.dragFrom>-1&&this.dragTo>-1&&this.dragFrom!==this.dragTo&&(this.lastDragFrom===this.dragTo&&this.lastDragTo===this.dragFrom||(this.tableModel.changeColumnOrder(this.dragFrom,this.dragTo),this.lastDragFrom=this.dragFrom,this.lastDragTo=this.dragTo,this.dragFrom=this.dragTo,this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows())),t&&(this.adjustDraggingColumn(e,t.columnIndex,this.firstDraggingRendering),this.firstDraggingRendering=!1),this.repaint())}mouseDraggingEndOnFrame(e){this.eventListener.onMouseDraggingEnd(e),this.draggingTargetColumnIndex=-1,this.mouseStartAction==="resize-column"?this.resizeColumn(e):this.mouseStartAction==="drag-column"&&(this.hideDraggingColumn(),this.repaint()),this.mouseStartWidth=-1,this.mouseStartColumnIndex=-1,this.dragFrom=-1,this.dragTo=-1,this.firstDraggingRendering=!0,this.mouseStartAction=""}mouseMove(e){this.eventListener.onMouseMoved(e),this.adjustHoverRows(e),this.adjustHoverColumns(e)}contextmenu(e){this.eventListener.onContextmenu(e)}toggleExpandCollapseAll(e=!0){var o;const t=this.tableModel.getBodyModel();X(t)&&(t.toggleExpandCollapseAll(e),this.repaint(),(o=this.storeStateCollapsedExpandService)==null||o.collapsedStateAll(e))}toggleRowCheckbox(e,t,o){var a;const i=this.tableModel.getAreaModel(o),s=i.isRowChecked(e),l=s===void 0||s==="semi"||s==="none";i.setRowChecked(e,l),this.repaint();const n=(a=i.rowSelectionModel)==null?void 0:a.getCheckedRows();this.eventListener.onCheckboxChanged(n||[])}onMouseClicked(e,t){let o=this.selectionService.onMouseClicked(e,t);if(!o&&this.getFocusModel){this.resetEditorRenderer();const i=this.getFocusModel();i&&(o=i.hasChanged(),i.clearChanged())}return o}debounceRepaint(){this.debounce(this.repaint.bind(this),1)}publishGeMouseEvent(e){this.eventListener.onMouseClicked(e)}onFocusChanged(e){this.eventListener.onFocusChanged(e)}onSelectionChanged(e){this.eventListener.onSelectionChanged(e)}externalFilterChanged(e=!0){const t=this.tableOptions.externalFilterFunction;t&&(e&&this.clearSelectionModel(),this.tableModel.externalFilterChanged(t),this.scrollViewport.scrollTo(0,0),this.tableModel.recalcHeightAndPadding(),this.resetSizeOfWrapperDiv(),this.repaint())}onHeaderDblClicked(e,t,o){var s,l;const i=this.tableModel.getColumnDef(o);if(i!=null&&i.sortable&&i.sortable()){e.preventDefault(),e.stopPropagation();const n=i.sortStatesOrder?i.sortStatesOrder:this.tableOptions.sortOrder,a=i.sortState??"",d=n[(n.indexOf(a)+1)%n.length],c=new je(o,d);this.tableModel.doSort([c])&&((s=this.tableModel.getColumnDefs())==null||s.forEach(g=>g.sortState=""),i.sortState=d),this.repaint(),(l=this.storeSortingService)==null||l.setSortItems([c])}}scrollToPixel(e,t){this.scrollViewport.scrollTo(e,t)}scrollToIndex(e,t){const i=this.tableModel.getAreaModel("body").getYPosByRowIndex(t);this.scrollToPixel(0,i)}setSelectionModel(e,t=!1){const o=()=>e;this.tableOptions.getSelectionModel=o,this.getSelectionModel=o,this.selectionService.getSelectionModel=o,t&&this.repaint()}toggleHeaderGroup(e){const t=this.tableModel.getAreaModel("header");"columnDefs"in this.tableModel&&(this.tableModel.columnDefs=t.toggleHeaderGroup(e),console.info("####### !!!!!! *******, this.tableModel.columnDefs")),this.firstInit()}selectionModel(){if(this!=null&&this.getSelectionModel)return this.getSelectionModel()}focusModel(){if(this!=null&&this.getFocusModel)return this.getFocusModel()}setDragging(e){this.dragging=e,this.dragging?(this.storeColumnWidths(),this.lastDragFrom=-1,this.lastDragTo=-1):this.storedColumnWidths=[]}changeFocusCell(e,t){if(!this.isEditing()&&this.getFocusModel){const o=this.getFocusModel();if(o){const[i,s]=o.getFocus();return o.setFocus(i+t,s+e),this.repaint(),!0}}return!1}resizeColumn(e){this.tableModel.setColumnWidth(this.mouseStartColumnIndex,this.mouseStartWidth+e.draggingX),this.tableModel.recalcPadding(),this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows()}clearSelectionModel(){var e;this.getSelectionModel&&((e=this.getSelectionModel())==null||e.clear())}debugOnce(e,t){var o;console.clear(),console.info("this.hostElement.offsetTop",this.hostElement.offsetTop),console.info("this.hostElement.scrollHeight",this.hostElement.scrollHeight),console.info("this.scrollViewportTop",this.scrollTop),console.info("this.areaHeaderCenter.parent.clientHeight",this.areaHeaderCenter.parent.clientHeight),console.info("bodyY",t),console.info("bodyX",e),console.info("rows",this.firstVisibleRowIndex),console.info(""),console.info("this.tableModel",this.tableModel),console.info(""),console.info("this.mouseMoveEvent.clientX",(o=this.mouseHandler.mouseEvent)==null?void 0:o.clientX),console.info("this.hostElement.offsetLeft",this.hostElement.offsetLeft),console.info("this.areaBodyWestGeo.width",this.areaBodyWestGeo.width)}autoRestoreScrollPosition(){var e;if((e=this.tableOptions)!=null&&e.autoRestoreOptions&&this.storeScrollPosStateService&&this.tableOptions.autoRestoreOptions.autoRestoreScrollPosition){const o=this.storeScrollPosStateService.getScrollOffset();o&&this.scrollViewport.scrollTo(...o)}}autoRestoreSortingState(){var e,t;if((t=(e=this.tableOptions)==null?void 0:e.autoRestoreOptions)!=null&&t.autoRestoreSortingState&&this.storeSortingService){const o=this.storeSortingService.getSortItems();o!=null&&o.length&&this.tableModel.getBodyModel().doSort(o)}}autoRestoreCollapsedExpandedState(){var e,t;if((t=(e=this.tableOptions)==null?void 0:e.autoRestoreOptions)!=null&&t.getRowId&&this.storeStateCollapsedExpandService){const o=this.tableOptions.autoRestoreOptions,i=o.getRowId;if(o.autoRestoreCollapsedExpandedState&&i){const s=this.storeStateCollapsedExpandService.collapsedExpandedStateGet(),l=this.tableModel.getAreaModel("body");if(X(l)){const n=l,a=l.getRowCount();for(let d=0;d<a;d++){const c=l.getRowByIndex(d);if(c)if(s.allExpanded)c.expanded=!0;else if(s.allCollapsed)c.expanded=!1;else{const h=i(c.data);s.mode==="expanded"?c.expanded=this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h):s.mode==="collapsed"&&(c.expanded=!this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h))}}n.recalcVisibleTreeRows()}}}}}const P=class P{};P.themes=["light","combat","paper","blackboard"],P.vars={light:`html[data-theme="light"] {
22
+ --ge-table-bg: rgba(255,255,255, 0.5);
23
+ --ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
24
+ --ge-table-header-center-bg: rgba(233, 233, 233, 0.5);
25
+ --ge-table-header-east-bg: rgba(233, 233, 233, 0.5);
26
+ --ge-table-header-west-text: #000;
27
+ --ge-table-header-center-text: #000;
28
+ --ge-table-header-east-text: #000;
29
+ --ge-table-header-west-horizontal-border: #ddd;
30
+ --ge-table-header-west-vertical-border: #ccc;
31
+ --ge-table-header-center-horizontal-border: #ddd;
32
+ --ge-table-header-center-vertical-border: #ccc;
33
+ --ge-table-header-east-horizontal-border: #ddd;
34
+ --ge-table-header-east-vertical-border: #ccc;
35
+ --ge-table-body-west-bg: rgba(233, 233, 233, 0.5);
36
+ --ge-table-body-center-bg: rgba(255,255,255, 0.5);
37
+ --ge-table-body-east-bg: rgba(233, 233, 233, 0.5);
38
+ --ge-table-body-west-text: #000;
39
+ --ge-table-body-center-text: #000;
40
+ --ge-table-body-east-text: #000;
41
+ --ge-table-body-west-horizontal-border: #ddd;
42
+ --ge-table-body-west-vertical-border: #ccc;
43
+ --ge-table-body-center-horizontal-border: #bbb;
44
+ --ge-table-body-center-vertical-border: #ddd;
45
+ --ge-table-body-east-horizontal-border: #ddd;
46
+ --ge-table-body-east-vertical-border: #ccc;
47
+ --ge-table-body-west-selected-range-bg: rgba(0, 152, 219, 0.4);
48
+ --ge-table-body-center-selected-range-bg: rgba(0, 152, 219, 0.4);
49
+ --ge-table-body-east-selected-range-bg: rgba(0, 152, 219, 0.4);
50
+ --ge-table-body-west-selected-range-text: #000;
51
+ --ge-table-body-center-selected-range-text: #000;
52
+ --ge-table-body-east-selected-range-text: #000;
53
+ --ge-table-footer-west-bg: rgba(233, 233, 233, 0.5);
54
+ --ge-table-footer-center-bg: rgba(233, 233, 233, 0.5);
55
+ --ge-table-footer-east-bg: rgba(233, 233, 233, 0.5);
56
+ --ge-table-footer-west-text: #000;
57
+ --ge-table-footer-center-text: #000;
58
+ --ge-table-footer-east-text: #000;
59
+ --ge-table-footer-west-horizontal-border: #ddd;
60
+ --ge-table-footer-west-vertical-border: #ccc;
61
+ --ge-table-footer-center-horizontal-border: #ddd;
62
+ --ge-table-footer-center-vertical-border: #ccc;
63
+ --ge-table-footer-east-horizontal-border: #ddd;
64
+ --ge-table-footer-east-vertical-border: #ccc;
65
+ --ge-table-border: #ccc;
66
+ --ge-table-row-odd-bg: transparent;
67
+ --ge-table-row-even-bg: transparent;
68
+ --ge-table-column-odd-bg: transparent;
69
+ --ge-table-column-even-bg: transparent;
70
+ --ge-table-hover-column-bg: rgba(0, 224, 255, 0.27);
71
+ --ge-table-hover-row-bg: rgba(0, 224, 255, 0.27);
72
+ --ge-table-focus-border: rgb(0, 255, 255);
73
+ --ge-table-color-error-text: #e00034;
74
+ --ge-table-tree-arrow-collapsed-color: #e00034;
75
+ --ge-table-column-resize-handle-border: rgb(0, 255, 255);
76
+ --ge-table-dragged-col-div-bg: lightcyan;
77
+ --ge-table-drop-zone-bg: rgba(244, 255, 242, 0.6);
78
+ }`,combat:`html[data-theme="combat"] {
79
+ --ge-table-bg: #101010;
80
+ --ge-table-header-west-bg: #101010;
81
+ --ge-table-header-center-bg: #101010;
82
+ --ge-table-header-east-bg: #101010;
83
+ --ge-table-header-west-text: oklch(100% 0 0);
84
+ --ge-table-header-center-text: oklch(100% 0 0);
85
+ --ge-table-header-east-text: oklch(100% 0 0);
86
+ --ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
87
+ --ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
88
+ --ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
89
+ --ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
90
+ --ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
91
+ --ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
92
+ --ge-table-body-west-bg: #101010;
93
+ --ge-table-body-center-bg: #101010;
94
+ --ge-table-body-east-bg: #101010;
95
+ --ge-table-body-west-text: #b6b4b4;
96
+ --ge-table-body-center-text: #b6b4b4;
97
+ --ge-table-body-east-text: #b6b4b4;
98
+ --ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
99
+ --ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
100
+ --ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
101
+ --ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
102
+ --ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
103
+ --ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
104
+ --ge-table-body-west-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
105
+ --ge-table-body-center-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
106
+ --ge-table-body-east-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
107
+ --ge-table-body-west-selected-range-text: #f00032;
108
+ --ge-table-body-center-selected-range-text: #f00032;
109
+ --ge-table-body-east-selected-range-text: #f00032;
110
+ --ge-table-footer-west-bg: #101010;
111
+ --ge-table-footer-center-bg: #101010;
112
+ --ge-table-footer-east-bg: #101010;
113
+ --ge-table-footer-west-text: oklch(100% 0 0);
114
+ --ge-table-footer-center-text: oklch(100% 0 0);
115
+ --ge-table-footer-east-text: oklch(100% 0 0);
116
+ --ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
117
+ --ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
118
+ --ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
119
+ --ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
120
+ --ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
121
+ --ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
122
+ --ge-table-border: oklch(100% 0 0 / 0%);
123
+ --ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
124
+ --ge-table-row-even-bg: oklch(100% 0 0 / 0%);
125
+ --ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
126
+ --ge-table-column-even-bg: oklch(100% 0 0 / 0%);
127
+ --ge-table-hover-column-bg: oklch(34% 0.25 3.6 / 27%);
128
+ --ge-table-hover-row-bg: oklch(34% 0.25 3.6 / 27%);
129
+ --ge-table-focus-border: oklch(40% 0.25 3.6);
130
+ --ge-table-color-error-text: oklch(65% 0.31 43.2);
131
+ --ge-table-tree-arrow-collapsed-color: #e00034;
132
+ --ge-table-column-resize-handle-border: oklch(63% 0.31 43.2);
133
+ --ge-table-dragged-col-div-bg: #2c2e33;
134
+ --ge-table-drop-zone-bg: #101010;
135
+ }`,paper:`html[data-theme="paper"] {
136
+ --ge-table-bg: #e7e5df;
137
+ --ge-table-header-west-bg: oklch(80% 0.02 99 / 48%);
138
+ --ge-table-header-center-bg: oklch(80% 0.02 99 / 48%);
139
+ --ge-table-header-east-bg: oklch(80% 0.02 99 / 48%);
140
+ --ge-table-header-west-text: #111;
141
+ --ge-table-header-center-text: #111;
142
+ --ge-table-header-east-text: #111;
143
+ --ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
144
+ --ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
145
+ --ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
146
+ --ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
147
+ --ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
148
+ --ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
149
+ --ge-table-body-west-bg: oklch(80% 0.02 99 / 48%);
150
+ --ge-table-body-center-bg: #e7e5df;
151
+ --ge-table-body-east-bg: oklch(80% 0.02 99 / 48%);
152
+ --ge-table-body-west-text: #000;
153
+ --ge-table-body-center-text: #000;
154
+ --ge-table-body-east-text: #000;
155
+ --ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
156
+ --ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
157
+ --ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
158
+ --ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
159
+ --ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
160
+ --ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
161
+ --ge-table-body-west-selected-range-bg: #cfcdc2;
162
+ --ge-table-body-center-selected-range-bg: #cfcdc2;
163
+ --ge-table-body-east-selected-range-bg: #cfcdc2;
164
+ --ge-table-body-west-selected-range-text: #000;
165
+ --ge-table-body-center-selected-range-text: #000;
166
+ --ge-table-body-east-selected-range-text: #000;
167
+ --ge-table-footer-west-bg: oklch(80% 0.02 99 / 48%);
168
+ --ge-table-footer-center-bg: oklch(80% 0.02 99 / 48%);
169
+ --ge-table-footer-east-bg: oklch(80% 0.02 99 / 48%);
170
+ --ge-table-footer-west-text: #111;
171
+ --ge-table-footer-center-text: #111;
172
+ --ge-table-footer-east-text: #111;
173
+ --ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
174
+ --ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
175
+ --ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
176
+ --ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
177
+ --ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
178
+ --ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
179
+ --ge-table-border: oklch(100% 0 0 / 0%);
180
+ --ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
181
+ --ge-table-row-even-bg: oklch(100% 0 0 / 0%);
182
+ --ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
183
+ --ge-table-column-even-bg: oklch(100% 0 0 / 0%);
184
+ --ge-table-hover-column-bg: oklch(5% 0.2 266.40000000000003 / 9%);
185
+ --ge-table-hover-row-bg: oklch(5% 0.2 266.40000000000003 / 9%);
186
+ --ge-table-focus-border: oklch(100% 0.19 205.20000000000002);
187
+ --ge-table-color-error-text: oklch(45% 0.25 43.2);
188
+ --ge-table-tree-arrow-collapsed-color: #e00034;
189
+ --ge-table-column-resize-handle-border: oklch(100% 0.19 205.20000000000002 / 71%);
190
+ --ge-table-dragged-col-div-bg: #2c2e33;
191
+ --ge-table-drop-zone-bg: #e7e5df;
192
+ }`,blackboard:`html[data-theme="dark"] {
193
+ --ge-table-bg: #0c1021;
194
+ --ge-table-header-west-bg: #0c1021;
195
+ --ge-table-header-center-bg: #0c1021;
196
+ --ge-table-header-east-bg: #0c1021;
197
+ --ge-table-header-west-text: #e0df85;
198
+ --ge-table-header-center-text: #e0df85;
199
+ --ge-table-header-east-text: #e0df85;
200
+ --ge-table-header-west-horizontal-border: transparent;
201
+ --ge-table-header-west-vertical-border: transparent;
202
+ --ge-table-header-center-horizontal-border: transparent;
203
+ --ge-table-header-center-vertical-border: transparent;
204
+ --ge-table-header-east-horizontal-border: transparent;
205
+ --ge-table-header-east-vertical-border: transparent;
206
+ --ge-table-body-west-bg: #0c1021;
207
+ --ge-table-body-center-bg: #0c1021;
208
+ --ge-table-body-east-bg: #0c1021;
209
+ --ge-table-body-west-text: #a7a7a7;
210
+ --ge-table-body-center-text: #a7a7a7;
211
+ --ge-table-body-east-text: #a7a7a7;
212
+ --ge-table-body-west-horizontal-border: transparent;
213
+ --ge-table-body-west-vertical-border: transparent;
214
+ --ge-table-body-center-horizontal-border: transparent;
215
+ --ge-table-body-center-vertical-border: transparent;
216
+ --ge-table-body-east-horizontal-border: transparent;
217
+ --ge-table-body-east-vertical-border: transparent;
218
+ --ge-table-body-west-selected-range-bg: #758129;
219
+ --ge-table-body-center-selected-range-bg: #758129;
220
+ --ge-table-body-east-selected-range-bg: #758129;
221
+ --ge-table-body-west-selected-range-text: oklch(100% 0 0);
222
+ --ge-table-body-center-selected-range-text: oklch(100% 0 0);
223
+ --ge-table-body-east-selected-range-text: oklch(100% 0 0);
224
+ --ge-table-footer-west-bg: #0c1021;
225
+ --ge-table-footer-center-bg: #0c1021;
226
+ --ge-table-footer-east-bg: #0c1021;
227
+ --ge-table-footer-west-text: #e0df85;
228
+ --ge-table-footer-center-text: #e0df85;
229
+ --ge-table-footer-east-text: #e0df85;
230
+ --ge-table-footer-west-horizontal-border: transparent;
231
+ --ge-table-footer-west-vertical-border: transparent;
232
+ --ge-table-footer-center-horizontal-border: transparent;
233
+ --ge-table-footer-center-vertical-border: otransparent;
234
+ --ge-table-footer-east-horizontal-border: transparent;
235
+ --ge-table-footer-east-vertical-border: transparent;
236
+ --ge-table-border: oklch(0% 0 0);
237
+ --ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
238
+ --ge-table-row-even-bg: oklch(100% 0 0 / 0%);
239
+ --ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
240
+ --ge-table-column-even-bg: oklch(100% 0 0 / 0%);
241
+ --ge-table-hover-column-bg: #a9a9a9;
242
+ --ge-table-hover-row-bg: #a9a9a9;
243
+ --ge-table-focus-border: #e1ff00;
244
+ --ge-table-color-error-text: #ff0040;
245
+ --ge-table-tree-arrow-collapsed-color: #e00034;
246
+ --ge-table-column-resize-handle-border: oklch(0% 0 0);
247
+ --ge-table-dragged-col-div-bg: #2c2e33;
248
+ --ge-table-drop-zone-bg: #758129;
249
+ }`};let oe=P;const W=class W{constructor(e=new _e){this.headerGroupOptions=e}render(e,t,o,i,s,l,n){const a=l!=null&&l.data?l.data:"";if(l){const{toggle:d,visibility:c,closed:h}=l,g=d?W.toggleHeaderGroup:"";this.addText(e,i,t,o,a,g),d&&c!=="always"&&this.addArrowDiv(n,e,!h,t,o,i,g)}else this.addText(e,i,t,o,a,"")}addText(e,t,o,i,s,l){e.innerHTML=`<span
250
+ data-ge-action="${l}"
251
+ data-area="${t}"
252
+ data-row-index="${o}"
253
+ data-col-index="${i}"
254
+ >${s}</span>`}addArrowDiv(e,t,o=!0,i=-1,s=-1,l="header",n){const a=e.createElement("div");e.addClass(a,"ge-table-toggle-icon-div"),e.setStyle(a,"display","inline-block"),e.setStyle(a,"position",""),e.setStyle(a,"width","20px"),e.setStyle(a,"background","transparent"),e.setStyle(a,"cursor","pointer"),e.setAttribute(a,"data-row-index",`${i}`),e.setAttribute(a,"data-col-index",`${s}`),e.setAttribute(a,"data-area",`${l}`),e.setAttribute(a,"data-ge-action",`${n}`);let d;o?d=this.headerGroupOptions.iconExpanded:d=this.headerGroupOptions.iconCollapsed;const c=d.content,h=e.createText(c);e.appendChild(a,h),d.style&&this.applyStyleString(e,a,d.style);for(const g of d.classes)e.addClass(a,g);return e.appendChild(t,a),a}applyStyleString(e,t,o){const i=o.split(";").map(s=>s.trim()).filter(s=>s);for(const s of i){const[l,n]=s.split(":");e.setStyle(t,l.trim(),n.trim())}}};W.toggleHeaderGroup="toggleHeaderGroup";let ie=W;class it extends S.Component{constructor(t){super(t);ee(this,"ref",S.createRef())}componentDidMount(){const t=this.ref.current;this.initTable(t,this.props)}componentWillUnmount(){}initTable(t,o){const i={onSelectionChanged(l){o.selectionChanged&&o.selectionChanged(l)},onFocusChanged(l){o.focusChanged&&o.focusChanged(l)},onCheckboxChanged:l=>{o.checkboxChanged&&o.checkboxChanged(l)},onContextmenu:l=>{o.contextmenu&&o.contextmenu(l)},onModelChanged:l=>{o.modelChanged&&o.modelChanged(l)},onMouseClicked:l=>{o.mouseClicked&&o.mouseClicked(l)},onMouseDragging:l=>{o.mouseDragging&&o.mouseDragging(l)},onMouseDraggingEnd:l=>{o.mouseDraggingEnd&&o.mouseDraggingEnd(l)},onMouseMoved:l=>{}},s=new Z(t,o.tableModel,new xe,o.tableOptions??new Ee,i);s.firstInit(),o.tableReady&&o.tableReady(s.getApi()),o.licenseKey&&F.getInstance().setLicenseKey(o.licenseKey)}render(){return Oe.jsx("div",{ref:this.ref,className:"container-div",style:{width:"100%",height:"100%",backgroundColor:"transparent",padding:"0",margin:"0"}})}}var D,G,se,Ae=[],z=[],E=S.options,re=E.__b,le=E.__r,ae=E.diffed,ne=E.__c,de=E.unmount,ce=E.__;function st(){for(var r;r=Ae.shift();)if(r.__P&&r.__H)try{r.__H.__h.forEach(H),r.__H.__h.forEach(K),r.__H.__h=[]}catch(e){r.__H.__h=[],E.__e(e,r.__v)}}E.__b=function(r){D=null,re&&re(r)},E.__=function(r,e){e.__k&&e.__k.__m&&(r.__m=e.__k.__m),ce&&ce(r,e)},E.__r=function(r){le&&le(r);var e=(D=r.__c).__H;e&&(G===D?(e.__h=[],D.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=z,t.__N=t.i=void 0})):(e.__h.forEach(H),e.__h.forEach(K),e.__h=[])),G=D},E.diffed=function(r){ae&&ae(r);var e=r.__c;e&&e.__H&&(e.__H.__h.length&&(Ae.push(e)!==1&&se===E.requestAnimationFrame||((se=E.requestAnimationFrame)||rt)(st)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==z&&(t.__=t.__V),t.i=void 0,t.__V=z})),G=D=null},E.__c=function(r,e){e.some(function(t){try{t.__h.forEach(H),t.__h=t.__h.filter(function(o){return!o.__||K(o)})}catch(o){e.some(function(i){i.__h&&(i.__h=[])}),e=[],E.__e(o,t.__v)}}),ne&&ne(r,e)},E.unmount=function(r){de&&de(r);var e,t=r.__c;t&&t.__H&&(t.__H.__.forEach(function(o){try{H(o)}catch(i){e=i}}),t.__H=void 0,e&&E.__e(e,t.__v))};var he=typeof requestAnimationFrame=="function";function rt(r){var e,t=function(){clearTimeout(o),he&&cancelAnimationFrame(e),setTimeout(r)},o=setTimeout(t,100);he&&(e=requestAnimationFrame(t))}function H(r){var e=D,t=r.__c;typeof t=="function"&&(r.__c=void 0,t()),D=e}function K(r){var e=D;r.__c=r.__(),D=e}function lt(r,e){for(var t in e)r[t]=e[t];return r}function ge(r,e){for(var t in r)if(t!=="__source"&&!(t in e))return!0;for(var o in e)if(o!=="__source"&&r[o]!==e[o])return!0;return!1}function pe(r,e){this.props=r,this.context=e}(pe.prototype=new S.Component).isPureReactComponent=!0,pe.prototype.shouldComponentUpdate=function(r,e){return ge(this.props,r)||ge(this.state,e)};var ue=S.options.__b;S.options.__b=function(r){r.type&&r.type.__f&&r.ref&&(r.props.ref=r.ref,r.ref=null),ue&&ue(r)};var at=S.options.__e;S.options.__e=function(r,e,t,o){if(r.then){for(var i,s=e;s=s.__;)if((i=s.__c)&&i.__c)return e.__e==null&&(e.__e=t.__e,e.__k=t.__k),i.__c(r,e)}at(r,e,t,o)};var be=S.options.unmount;function Me(r,e,t){return r&&(r.__c&&r.__c.__H&&(r.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),r.__c.__H=null),(r=lt({},r)).__c!=null&&(r.__c.__P===t&&(r.__c.__P=e),r.__c=null),r.__k=r.__k&&r.__k.map(function(o){return Me(o,e,t)})),r}function Re(r,e,t){return r&&t&&(r.__v=null,r.__k=r.__k&&r.__k.map(function(o){return Re(o,e,t)}),r.__c&&r.__c.__P===e&&(r.__e&&t.appendChild(r.__e),r.__c.__e=!0,r.__c.__P=t)),r}function N(){this.__u=0,this.t=null,this.__b=null}function Te(r){var e=r.__.__c;return e&&e.__a&&e.__a(r)}function $(){this.u=null,this.o=null}S.options.unmount=function(r){var e=r.__c;e&&e.__R&&e.__R(),e&&32&r.__u&&(r.type=null),be&&be(r)},(N.prototype=new S.Component).__c=function(r,e){var t=e.__c,o=this;o.t==null&&(o.t=[]),o.t.push(t);var i=Te(o.__v),s=!1,l=function(){s||(s=!0,t.__R=null,i?i(n):n())};t.__R=l;var n=function(){if(!--o.__u){if(o.state.__a){var a=o.state.__a;o.__v.__k[0]=Re(a,a.__c.__P,a.__c.__O)}var d;for(o.setState({__a:o.__b=null});d=o.t.pop();)d.forceUpdate()}};o.__u++||32&e.__u||o.setState({__a:o.__b=o.__v.__k[0]}),r.then(l,l)},N.prototype.componentWillUnmount=function(){this.t=[]},N.prototype.render=function(r,e){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=Me(this.__b,t,o.__O=o.__P)}this.__b=null}var i=e.__a&&S.createElement(S.Fragment,null,r.fallback);return i&&(i.__u&=-33),[S.createElement(S.Fragment,null,e.__a?null:r.children),i]};var fe=function(r,e,t){if(++t[1]===t[0]&&r.o.delete(e),r.props.revealOrder&&(r.props.revealOrder[0]!=="t"||!r.o.size))for(t=r.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;r.u=t=t[2]}};($.prototype=new S.Component).__a=function(r){var e=this,t=Te(e.__v),o=e.o.get(r);return o[0]++,function(i){var s=function(){e.props.revealOrder?(o.push(i),fe(e,r,o)):i()};t?t(s):s()}},$.prototype.render=function(r){this.u=null,this.o=new Map;var e=S.toChildArray(r.children);r.revealOrder&&r.revealOrder[0]==="b"&&e.reverse();for(var t=e.length;t--;)this.o.set(e[t],this.u=[1,0,this.u]);return r.children},$.prototype.componentDidUpdate=$.prototype.componentDidMount=function(){var r=this;this.o.forEach(function(e,t){fe(r,t,e)})};var nt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,dt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ct=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ht=/[A-Z0-9]/g,gt=typeof document<"u",pt=function(r){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(r)};function ut(r,e,t){return e.__k==null&&(e.textContent=""),S.render(r,e),typeof t=="function"&&t(),r?r.__c:null}S.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(r){Object.defineProperty(S.Component.prototype,r,{configurable:!0,get:function(){return this["UNSAFE_"+r]},set:function(e){Object.defineProperty(this,r,{configurable:!0,writable:!0,value:e})}})});var me=S.options.event;function bt(){}function ft(){return this.cancelBubble}function mt(){return this.defaultPrevented}S.options.event=function(r){return me&&(r=me(r)),r.persist=bt,r.isPropagationStopped=ft,r.isDefaultPrevented=mt,r.nativeEvent=r};var St={enumerable:!1,configurable:!0,get:function(){return this.class}},Se=S.options.vnode;S.options.vnode=function(r){typeof r.type=="string"&&function(e){var t=e.props,o=e.type,i={};for(var s in t){var l=t[s];if(!(s==="value"&&"defaultValue"in t&&l==null||gt&&s==="children"&&o==="noscript"||s==="class"||s==="className")){var n=s.toLowerCase();s==="defaultValue"&&"value"in t&&t.value==null?s="value":s==="download"&&l===!0?l="":n==="ondoubleclick"?s="ondblclick":n!=="onchange"||o!=="input"&&o!=="textarea"||pt(t.type)?n==="onfocus"?s="onfocusin":n==="onblur"?s="onfocusout":ct.test(s)?s=n:o.indexOf("-")===-1&&dt.test(s)?s=s.replace(ht,"-$&").toLowerCase():l===null&&(l=void 0):n=s="oninput",n==="oninput"&&i[s=n]&&(s="oninputCapture"),i[s]=l}}o=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=S.toChildArray(t.children).forEach(function(a){a.props.selected=i.value.indexOf(a.props.value)!=-1})),o=="select"&&i.defaultValue!=null&&(i.value=S.toChildArray(t.children).forEach(function(a){a.props.selected=i.multiple?i.defaultValue.indexOf(a.props.value)!=-1:i.defaultValue==a.props.value})),t.class&&!t.className?(i.class=t.class,Object.defineProperty(i,"className",St)):(t.className&&!t.class||t.class&&t.className)&&(i.class=i.className=t.className),e.props=i}(r),r.$$typeof=nt,Se&&Se(r)};var ye=S.options.__r;S.options.__r=function(r){ye&&ye(r),r.__c};var ve=S.options.diffed;S.options.diffed=function(r){ve&&ve(r);var e=r.props,t=r.__e;t!=null&&r.type==="textarea"&&"value"in e&&e.value!==t.value&&(t.value=e.value==null?"":e.value)};function yt(r){return!!r.__k&&(S.render(null,r),!0)}function vt(r){return{render(e){ut(e,r)},unmount(){yt(r)}}}class Ct{constructor(e){this.Component=e,console.info(e)}render(e,t,o,i,s,l,n){const a={cellDiv:e,rowIndex:t,columnIndex:o,areaIdent:i,areaModel:s,cellValue:l},d=vt(e);return d.render(this.Component(a)),()=>{d.unmount()}}}exports.ComponentRendererWrapper=Ct;exports.GuiexpertTable=it;