simple-table-core 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/simple-table/RenderCells.d.ts +1 -3
- package/dist/components/simple-table/TableCell.d.ts +0 -1
- package/dist/components/simple-table/TableRow.d.ts +1 -3
- package/dist/components/simple-table/TableSection.d.ts +1 -3
- package/dist/context/TableContext.d.ts +2 -0
- package/dist/hooks/useSelection.d.ts +6 -1
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/TableCellProps.d.ts +0 -2
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import HeaderObject from "../../types/HeaderObject";
|
|
2
|
-
import { RowId } from "../../types/RowId";
|
|
3
2
|
import type TableRowType from "../../types/TableRow";
|
|
4
3
|
import { Pinned } from "../../types/Pinned";
|
|
5
4
|
import RowIndices from "../../types/RowIndices";
|
|
@@ -9,11 +8,10 @@ interface RenderCellsProps {
|
|
|
9
8
|
columnIndices: ColumnIndices;
|
|
10
9
|
headers: HeaderObject[];
|
|
11
10
|
hiddenColumns: Record<string, boolean>;
|
|
12
|
-
onExpandRowClick: (rowId: RowId) => void;
|
|
13
11
|
pinned?: Pinned;
|
|
14
12
|
rowIndex: number;
|
|
15
13
|
rowIndices: RowIndices;
|
|
16
14
|
visibleRow: TableRowType;
|
|
17
15
|
}
|
|
18
|
-
declare const RenderCells: ({ columnIndexStart, columnIndices, headers, hiddenColumns,
|
|
16
|
+
declare const RenderCells: ({ columnIndexStart, columnIndices, headers, hiddenColumns, pinned, rowIndex, rowIndices, visibleRow, }: RenderCellsProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
17
|
export default RenderCells;
|
|
@@ -3,7 +3,6 @@ import { Pinned } from "../../types/Pinned";
|
|
|
3
3
|
import HeaderObject from "../../types/HeaderObject";
|
|
4
4
|
import ColumnIndices from "../../types/ColumnIndices";
|
|
5
5
|
import RowIndices from "../../types/RowIndices";
|
|
6
|
-
import { RowId } from "../../types/RowId";
|
|
7
6
|
interface TableRowProps {
|
|
8
7
|
columnIndexStart?: number;
|
|
9
8
|
columnIndices: ColumnIndices;
|
|
@@ -12,12 +11,11 @@ interface TableRowProps {
|
|
|
12
11
|
hiddenColumns: Record<string, boolean>;
|
|
13
12
|
hoveredIndex: number | null;
|
|
14
13
|
index: number;
|
|
15
|
-
onExpandRowClick: (rowId: RowId) => void;
|
|
16
14
|
pinned?: Pinned;
|
|
17
15
|
rowHeight: number;
|
|
18
16
|
rowIndices: RowIndices;
|
|
19
17
|
setHoveredIndex: (index: number | null) => void;
|
|
20
18
|
visibleRow: TableRowType;
|
|
21
19
|
}
|
|
22
|
-
declare const TableRow: ({ columnIndices, columnIndexStart, gridTemplateColumns, headers, hiddenColumns, hoveredIndex, index,
|
|
20
|
+
declare const TableRow: ({ columnIndices, columnIndexStart, gridTemplateColumns, headers, hiddenColumns, hoveredIndex, index, pinned, rowHeight, rowIndices, setHoveredIndex, visibleRow, }: TableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
21
|
export default TableRow;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
2
|
import TableRowType from "../../types/TableRow";
|
|
3
|
-
import { RowId } from "../../types/RowId";
|
|
4
3
|
import { Pinned } from "../../types/Pinned";
|
|
5
4
|
import HeaderObject from "../../types/HeaderObject";
|
|
6
5
|
import ColumnIndices from "../../types/ColumnIndices";
|
|
@@ -11,7 +10,6 @@ interface TableSectionProps {
|
|
|
11
10
|
headers: HeaderObject[];
|
|
12
11
|
hiddenColumns: Record<string, boolean>;
|
|
13
12
|
hoveredIndex: number | null;
|
|
14
|
-
onExpandRowClick: (rowId: RowId) => void;
|
|
15
13
|
pinned?: Pinned;
|
|
16
14
|
ref?: RefObject<HTMLDivElement | null>;
|
|
17
15
|
rowHeight: number;
|
|
@@ -22,5 +20,5 @@ interface TableSectionProps {
|
|
|
22
20
|
visibleRows: TableRowType[];
|
|
23
21
|
width?: number;
|
|
24
22
|
}
|
|
25
|
-
declare const TableSection: ({ columnIndexStart, columnIndices, headers, hiddenColumns, hoveredIndex,
|
|
23
|
+
declare const TableSection: ({ columnIndexStart, columnIndices, headers, hiddenColumns, hoveredIndex, pinned, ref, rowHeight, rowIndices, setHoveredIndex, templateColumns, totalHeight, visibleRows, width, }: TableSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
24
|
export default TableSection;
|
|
@@ -31,8 +31,10 @@ interface TableContextType {
|
|
|
31
31
|
headersRef: RefObject<HeaderObject[]>;
|
|
32
32
|
hiddenColumns: Record<string, boolean>;
|
|
33
33
|
hoveredHeaderRef: RefObject<HeaderObject | null>;
|
|
34
|
+
isCopyFlashing: (cell: Cell) => boolean;
|
|
34
35
|
isInitialFocusedCell: (cell: Cell) => boolean;
|
|
35
36
|
isSelected: (cell: Cell) => boolean;
|
|
37
|
+
isWarningFlashing: (cell: Cell) => boolean;
|
|
36
38
|
mainBodyRef: RefObject<HTMLDivElement | null>;
|
|
37
39
|
nextIcon: ReactNode;
|
|
38
40
|
onCellEdit?: (props: any) => void;
|
|
@@ -8,15 +8,20 @@ interface UseSelectionProps {
|
|
|
8
8
|
headers: HeaderObject[];
|
|
9
9
|
visibleRows: TableRowType[];
|
|
10
10
|
rowIdAccessor: string;
|
|
11
|
+
onCellEdit?: (props: any) => void;
|
|
12
|
+
cellRegistry?: Map<string, any>;
|
|
11
13
|
}
|
|
12
|
-
declare const useSelection: ({ selectableCells, headers, visibleRows, rowIdAccessor, }: UseSelectionProps) => {
|
|
14
|
+
declare const useSelection: ({ selectableCells, headers, visibleRows, rowIdAccessor, onCellEdit, cellRegistry, }: UseSelectionProps) => {
|
|
13
15
|
getBorderClass: ({ colIndex, rowIndex, rowId }: Cell) => string;
|
|
14
16
|
handleMouseDown: ({ colIndex, rowIndex, rowId }: Cell) => void;
|
|
15
17
|
handleMouseOver: ({ colIndex, rowIndex, rowId }: Cell) => void;
|
|
16
18
|
handleMouseUp: () => void;
|
|
19
|
+
isCopyFlashing: ({ colIndex, rowIndex, rowId }: Cell) => boolean;
|
|
20
|
+
isWarningFlashing: ({ colIndex, rowIndex, rowId }: Cell) => boolean;
|
|
17
21
|
isInitialFocusedCell: ({ rowIndex, colIndex, rowId }: Cell) => boolean;
|
|
18
22
|
isSelected: ({ colIndex, rowIndex, rowId }: Cell) => boolean;
|
|
19
23
|
lastSelectedColumnIndex: number | null;
|
|
24
|
+
pasteFromClipboard: () => Promise<void>;
|
|
20
25
|
selectColumns: (columnIndices: number[], isShiftKey?: boolean) => void;
|
|
21
26
|
selectedCells: Set<string>;
|
|
22
27
|
selectedColumns: Set<number>;
|
package/dist/index.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import r,{useState as o,useRef as i,useMemo as a,useCallback as l,useEffect as c,createContext as s,useContext as d,forwardRef as u,Fragment as h,cloneElement as f,useReducer as v,createRef as p,useLayoutEffect as m}from"react";var g=function(){return g=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},g.apply(this,arguments)};function w(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function l(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,l)}c((r=r.apply(e,n||[])).next())}))}function C(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(c){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=n.call(e,i)}catch(e){l=[6,e],r=0}finally{t=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function b(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var y=function(e){var n=e.accessor,t=e.rowIndex;return"cell-".concat(n,"-").concat(t)},x=function(e){var n=e.hiddenColumns,t=e.header,r=e.pinned;return n[t.accessor]?null:!r&&!t.pinned||t.pinned===r||null},I=function(e){var n=e.rowId,t=e.accessor;return"".concat(n,"-").concat(t)},R=function(e){return e.hide?[]:e.children&&0!==e.children.length?e.children.flatMap((function(e){return R(e)})):[e]},S=function(e){if(e.hide)return 0;if("number"==typeof e.width)return e.width;if("string"==typeof e.width&&e.width.endsWith("px"))return parseFloat(e.width);var n=document.getElementById(y({accessor:e.accessor,rowIndex:0}));return(null==n?void 0:n.offsetWidth)||150},E=function(e){var n,t=e.width;"string"==typeof t&&t.includes("fr")&&(e.width=(null===(n=document.getElementById(y({accessor:e.accessor,rowIndex:0})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.forEach((function(e){E(e)}))},N=function(e){return"number"==typeof e.minWidth?e.minWidth:40},k=function(e,n,t){return t&&void 0!==e[t]?e[t]:n},W=function(e){var n=e.depth,t=void 0===n?0:n,r=e.expandAll,o=void 0!==r&&r,i=e.expandedRows,a=e.rowGrouping,l=void 0===a?[]:a,c=e.rowIdAccessor,s=e.rows,d=[],u=function(e,n,t){void 0===t&&(t=0);var r=t;return e.forEach((function(t,a){var s=k(t,a,c),h=l[n],f=0===n&&a===e.length-1;d.push({row:t,depth:n,groupingKey:h,position:r,isLastGroupRow:f}),r++;var v=String(s);if((o?!i.has(v):i.has(v))&&n<l.length){var p=function(e,n){var t=e[n];return Array.isArray(t)?t:[]}(t,h);p.length>0&&(r=u(p,n+1,r))}})),r};return u(s,t),d},F=function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return"".concat(n,"-").concat(t,"-").concat(r)},D=s(void 0),M=function(n){var t=n.children,r=n.value;return e(D.Provider,g({value:r},{children:t}))},H=function(){var e=d(D);if(void 0===e)throw new Error("useTableContext must be used within a TableProvider");return e},T=function(t){var r=t.currentPage,i=t.hideFooter,a=t.onPageChange,l=t.onNextPage,c=t.shouldPaginate,s=t.totalPages,d=H(),u=d.nextIcon,h=d.prevIcon,f=o(!0),v=f[0],p=f[1],m=!(r>1),b=!(r<s)&&!l||!v&&r===s;if(i||!c)return null;var y=function(){if(s<=15)return Array.from({length:s},(function(e,n){return n+1}));var e,n,t=[],o=15;if(r<=Math.ceil(7.5))e=1,n=14;else if(r>=s-Math.floor(7.5))e=Math.max(1,s-o+1),n=s;else{var i=Math.floor(7);e=r-i,n=r+(o-i-1)}for(var a=e;a<=n;a++)t.push(a);return n<s-1&&(t.push(-1),t.push(s)),t}();return n("div",g({className:"st-footer"},{children:[e("button",g({className:"st-next-prev-btn ".concat(m?"disabled":""),onClick:function(){var e=r-1;e>=1&&a(e)},disabled:m},{children:h})),e("button",g({className:"st-next-prev-btn ".concat(b?"disabled":""),onClick:function(){return w(void 0,void 0,void 0,(function(){var e,n;return C(this,(function(t){switch(t.label){case 0:return e=r===s,n=r+1,l&&e?[4,l(r)]:[3,2];case 1:if(!t.sent())return p(!1),[2];t.label=2;case 2:return(n<=s||l)&&a(n),[2]}}))}))},disabled:b},{children:u})),y.map((function(n,t){return n<0?e("span",g({className:"st-page-ellipsis"},{children:"..."}),"ellipsis-".concat(n)):e("button",g({onClick:function(){return function(e){e>=1&&e<=s&&a(e)}(n)},className:"st-page-btn ".concat(r===n?"active":"")},{children:n}),"page-".concat(n))}))]}))},L=function(n){var t=n.className;return e("svg",g({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},B=function(n){var t=n.className;return e("svg",g({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},A=function(e){return e.position*(e.rowHeight+1)-1},O=function(e){return e.position*(e.rowHeight+1)},P=function(n){var t=n.children,r=n.onClose,a=n.open,l=n.overflow,s=void 0===l?"auto":l,d=n.setOpen,u=n.width,h=n.containerRef,f=n.positioning,v=void 0===f?"fixed":f,p=H().mainBodyRef,m=i(null),w=i(null),C=o("bottom-left"),b=C[0],y=C[1],x=o({}),I=x[0],R=x[1],S=o(!1),E=S[0],N=S[1];return c((function(){a&&m.current?(N(!1),!w.current&&m.current.parentElement&&(w.current=m.current.parentElement),requestAnimationFrame((function(){if(m.current&&w.current){var e,n=m.current,t=w.current.getBoundingClientRect(),r=n.offsetHeight,o=u||n.offsetWidth,i=(e=(null==h?void 0:h.current)?h.current.getBoundingClientRect():(null==p?void 0:p.current)?p.current.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0,width:window.innerWidth,height:window.innerHeight,x:0,y:0,toJSON:function(){}}).bottom-t.bottom,a=t.top-e.top,l="bottom",c={};(r>i&&r<=a||r>i&&a>i)&&(l="top");var s="left";o>e.right-t.right+t.width&&(s="right"),"fixed"===v?("bottom"===l?c.top=t.bottom+4:c.bottom=window.innerHeight-t.top+4,"left"===s?c.left=t.left:c.right=window.innerWidth-t.right):("bottom"===l?c.top=t.height+4:c.bottom=t.height+4,"left"===s?c.left=0:c.right=0),y("".concat(l,"-").concat(s)),R(c),N(!0)}}))):a||N(!1)}),[a,u,h,p,v]),c((function(){var e=function(e){if(a&&m.current){var n=e.target;m.current&&!m.current.contains(n)&&(d(!1),null==r||r())}};return a&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}}),[a,r,d]),c((function(){var e=function(e){m.current&&!m.current.contains(e.target)&&(d(!1),null==r||r())};return a&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[r,a,d]),c((function(){var e=function(e){"Escape"===e.key&&a&&(d(!1),null==r||r())};return a&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[r,a,d]),a?e("div",g({ref:m,className:"st-dropdown-content st-dropdown-".concat(b),onClick:function(e){return e.stopPropagation()},style:g(g({position:v,width:u?"".concat(u,"px"):"auto",visibility:E?"visible":"hidden"},I),{overflow:s})},{children:t})):null},q=function(n){var t=n.children,r=n.onClick,o=n.isSelected,i=void 0!==o&&o,a=n.disabled,l=void 0!==a&&a,c=n.className,s=void 0===c?"":c;return e("div",g({className:"st-dropdown-item ".concat(i?"selected":""," ").concat(l?"disabled":""," ").concat(s),onClick:function(){!l&&r&&r()},role:"option","aria-selected":i,"aria-disabled":l},{children:t}))},z=function(t){var r=t.onBlur,i=t.onChange,a=t.open,l=t.setOpen,c=t.value,s=o(c),d=s[0],u=s[1],h=function(e){u(e),i(e),l(!1),r()};return n(P,g({open:a,onClose:function(){r()},setOpen:l,width:120},{children:[e(q,g({isSelected:!0===d,onClick:function(){return h(!0)}},{children:"True"})),e(q,g({isSelected:!1===d,onClick:function(){return h(!1)}},{children:"False"}))]}))},U=function(n){var t=n.defaultValue,r=n.onBlur,o=n.onChange,a=i(null);return e("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=t?t:"",onBlur:r,onChange:function(e){var n=e.target.value;o(n)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||r()},onMouseDown:function(e){e.stopPropagation()}})},j=function(n){var t=n.defaultValue,r=n.onBlur,o=n.onChange,a=i(null);return e("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:t.toString(),onBlur:r,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&o(n)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||r()},onMouseDown:function(e){e.stopPropagation()}})},Y=function(r){var i,a,l=r.onChange,c=r.onClose,s=r.value,d=H(),u=d.nextIcon,h=d.prevIcon,f=o(s||new Date),v=f[0],p=f[1],m=o("days"),w=m[0],C=m[1],b=function(e,n){return new Date(e,n+1,0).getDate()};return n("div",g({className:"st-datepicker"},{children:[n("div",g({className:"st-datepicker-header"},{children:["days"===w&&n(t,{children:[e("button",g({onClick:function(){p(new Date(v.getFullYear(),v.getMonth()-1,1))},className:"st-datepicker-nav-btn"},{children:h})),n("div",g({className:"st-datepicker-header-label",onClick:function(){return C("months")}},{children:[(a=v,a.toLocaleString("default",{month:"long"}))," ",v.getFullYear()]})),e("button",g({onClick:function(){p(new Date(v.getFullYear(),v.getMonth()+1,1))},className:"st-datepicker-nav-btn"},{children:u}))]}),"months"===w&&e("div",g({className:"st-datepicker-header-label",onClick:function(){return C("years")}},{children:v.getFullYear()})),"years"===w&&e("div",g({className:"st-datepicker-header-label"},{children:"Select Year"}))]})),n("div",g({className:"st-datepicker-grid st-datepicker-".concat(w,"-grid")},{children:["days"===w&&function(){var n=[],t=v.getFullYear(),r=v.getMonth(),o=b(t,r),i=function(e,n){return new Date(e,n,1).getDay()}(t,r),a=b(t,r-1);["Su","Mo","Tu","We","Th","Fr","Sa"].forEach((function(t,r){n.push(e("div",g({className:"st-datepicker-weekday"},{children:t}),"header-".concat(r)))}));for(var d=function(t){var r=a-i+t+1;n.push(e("div",g({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(v.getFullYear(),v.getMonth()-1,e);p(n),l(n),null==c||c()}(r)}},{children:r}),"prev-".concat(r)))},u=0;u<i;u++)d(u);for(var h=function(o){var i=o===(new Date).getDate()&&r===(new Date).getMonth()&&t===(new Date).getFullYear(),a=o===new Date(s).getDate()&&r===new Date(s).getMonth()&&t===new Date(s).getFullYear();n.push(e("div",g({className:"st-datepicker-day ".concat(i?"today":""," ").concat(a?"selected":""),onClick:function(){return function(e){var n=new Date(v.getFullYear(),v.getMonth(),e);p(n),l(n),null==c||c()}(o)}},{children:o}),"day-".concat(o)))},f=1;f<=o;f++)h(f);var m=35-(i+o),w=function(t){n.push(e("div",g({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(v.getFullYear(),v.getMonth()+1,e);p(n),l(n),null==c||c()}(t)}},{children:t}),"next-".concat(t)))};for(f=1;f<=m;f++)w(f);return n}(),"months"===w&&(i=[],Array.from({length:12},(function(e,n){return new Date(2e3,n,1).toLocaleString("default",{month:"short"})})).forEach((function(n,t){var r=t===v.getMonth();i.push(e("div",g({className:"st-datepicker-month ".concat(r?"selected":""),onClick:function(){return function(e){p(new Date(v.getFullYear(),e,1)),C("days")}(t)}},{children:n}),"month-".concat(t)))})),i),"years"===w&&function(){for(var n=[],t=v.getFullYear(),r=t-6,o=function(r){var o=r===t;n.push(e("div",g({className:"st-datepicker-year ".concat(o?"selected":""),onClick:function(){return function(e){p(new Date(e,v.getMonth(),1)),C("months")}(r)}},{children:r}),"year-".concat(r)))},i=r;i<r+12;i++)o(i);return n}()]})),e("div",g({className:"st-datepicker-footer"},{children:e("button",g({className:"st-datepicker-today-btn",onClick:function(){var e=new Date;p(e),l(e),null==c||c()}},{children:"Today"}))}))]}))},G=function(e){if(!e)return new Date;var n=e.toString().split("-").map(Number),t=n[0],r=n[1],o=n[2],i=new Date;return i.setFullYear(t),i.setMonth(r-1),i.setDate(o),isNaN(i.getTime())?new Date:i},K=function(n){var t=n.onBlur,r=n.onChange,o=n.open,i=n.setOpen,a=n.value;c((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);var l=function(){t()};return e(P,g({open:o,onClose:l,setOpen:i,width:280},{children:e(Y,{value:G(a),onChange:function(e){var n=e.toISOString().split("T")[0];r(n),i(!1),t()},onClose:l})}))},X=function(n){var t=n.onBlur,r=n.onChange,i=n.open,a=n.options,l=n.setOpen,c=n.value,s=o(c||""),d=s[0],u=s[1];return e(P,g({open:i,onClose:function(){t()},setOpen:l,width:150},{children:e("div",g({className:"st-enum-dropdown-content"},{children:a.map((function(n){return e(q,g({isSelected:d===n.value,onClick:function(){return e=n.value,u(e),r(e),l(!1),void t();var e}},{children:n.label}),n.value)}))}))}))},V=function(n){var t=n.enumOptions,r=void 0===t?[]:t,o=n.onChange,i=n.setIsEditing,a=n.type,l=void 0===a?"string":a,c=n.value,s=function(){i(!1)};if("boolean"===l&&"boolean"==typeof c)return e(z,{onBlur:s,onChange:function(e){return o(e)},open:!0,setOpen:i,value:c});if("date"===l)return e(K,{onBlur:s,onChange:o,open:!0,setOpen:i,value:c});if("enum"===l)return e(X,{onBlur:s,onChange:o,open:!0,options:r,setOpen:i,value:"string"==typeof c?c:""});if("number"===l&&"number"==typeof c)return e(j,{defaultValue:c,onBlur:s,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}});var d=null==c?"":String(c);return e(U,{defaultValue:d,onBlur:s,onChange:o})},J=0,$=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();(0===J||o-J>=r)&&(J=o,n(t))}},Q=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Q);var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=Q(e[t]));return n},Z=Date.now(),_={screenX:0,screenY:0},ee=function(e,n,t){void 0===t&&(t=[]);for(var r=0;r<e.length;r++){var o=e[r];if(o.accessor===n)return b(b([],t,!0),[r],!1);if(o.children&&o.children.length>0){var i=ee(o.children,n,b(b([],t,!0),[r],!1));if(i)return i}}return null};var ne=function(e){var n,t,r=e.draggedHeaderRef,o=e.headersRef,a=e.hoveredHeaderRef,l=e.onColumnOrderChange,s=e.onTableHeaderDragEnd,d=(n=o.current,t=i(n),c((function(){JSON.stringify(t.current)!==JSON.stringify(n)&&(t.current=n)}),[n]),t.current);return{handleDragStart:function(e){r.current=e,Z=Date.now()},handleDragOver:function(e){var n,t,i=e.event,l=e.hoveredHeader;if(i.preventDefault(),o.current){var c=i.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),u=i.screenX,h=i.screenY,f=Math.sqrt(Math.pow(u-_.screenX,2)+Math.pow(h-_.screenY,2));a.current=l;var v=o.current,p=ee(v,(null===(n=r.current)||void 0===n?void 0:n.accessor)||""),m=ee(v,l.accessor);if(p&&m){var g=p.length,w=m.length,C=m;if(g!==w){var b=w-g;b>0&&(C=m.slice(0,-b))}var y=function(e,n,t){var r=Q(e),o=!1;function i(e,n){for(var t=e,r=0;r<n.length-1;r++)t=t[n[r]].children;return t[n[n.length-1]]}function a(e,n,t){for(var r=e,i=0;i<n.length-1;i++){if(!r[n[i]].children){o=!0;break}r=r[n[i]].children}r[n[n.length-1]]=t}var l=i(r,n);return a(r,n,i(r,t)),a(r,t,l),{newHeaders:r,emergencyBreak:o}}(v,p,C),x=y.newHeaders,I=y.emergencyBreak;if(!(c||l.accessor===(null===(t=r.current)||void 0===t?void 0:t.accessor)||null===r.current||f<10||0===p.length||0===C.length||JSON.stringify(x)===JSON.stringify(o.current)||I)){var R=Date.now();JSON.stringify(x)===JSON.stringify(d)&&(R-Z<1500||f<40)||(Z=R,_={screenX:u,screenY:h},s(x))}}}},handleDragEnd:function(){r.current=null,a.current=null,null==l||l(o.current)}}},te=function(e){var n=e.content,t=e.header;return"boolean"==typeof n?n?"True":"False":"date"===t.type&&null!==n&&("string"==typeof n||"number"==typeof n||"object"==typeof n&&n instanceof Date)?new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):n},re=u((function(t,r){var a=t.borderClass,s=t.colIndex,d=t.header,u=t.isHighlighted,h=t.isInitialFocused,f=t.nestedIndex;t.onExpandRowClick;var v=t.rowIndex,p=t.visibleRow,m=H(),w=m.cellRegistry,C=m.cellUpdateFlash,b=m.draggedHeaderRef,x=m.expandIcon,R=m.expandedRows,S=m.handleMouseDown,E=m.handleMouseOver,N=m.headersRef,W=m.hoveredHeaderRef,F=m.onCellEdit,D=m.onTableHeaderDragEnd,M=m.rowGrouping,T=m.rowIdAccessor,L=m.setExpandedRows,B=m.theme,A=m.useOddColumnBackground,O=p.depth,P=p.row,q=o(P[d.accessor]),z=q[0],U=q[1],j=o(!1),Y=j[0],G=j[1],K=o(!1),X=K[0],J=K[1],Q=i(null),Z=k(P,v,T),_=M&&M[O],ee=!!_&&function(e,n){if(!n)return!1;var t=e[n];return Array.isArray(t)&&t.length>0}(P,_),re=R.has(String(Z)),oe=ne({draggedHeaderRef:b,headersRef:N,hoveredHeaderRef:W,onTableHeaderDragEnd:D}).handleDragOver,ie=$(),ae="cell-".concat(v,"-").concat(s),le=I({rowId:Z,accessor:d.accessor});c((function(){if(w){var e="".concat(Z,"-").concat(d.accessor);return w.set(e,{updateContent:function(e){z!==e?(U(e),C&&(J(!0),Q.current&&clearTimeout(Q.current),Q.current=setTimeout((function(){J(!1)}),800))):U(e)}}),function(){w.delete(e),Q.current&&clearTimeout(Q.current)}}}),[w,C,Z,d.accessor,z]),c((function(){if(X){var e=setTimeout((function(){J(!1)}),850);return function(){return clearTimeout(e)}}}),[X]),c((function(){U(P[d.accessor])}),[P,d.accessor]);var ce="boolean"===d.type||"date"===d.type||"enum"===d.type,se=Boolean(null==d?void 0:d.isEditable),de="st-cell ".concat(O>0&&d.expandable?"st-cell-depth-".concat(O):""," ").concat(u?h?"st-cell-selected-first ".concat(a):"st-cell-selected ".concat(a):""," ").concat(se?"clickable":""," ").concat(X?"st-cell-updating":""," ").concat(A?f%2==0?"even-column":"odd-column":""),ue=l((function(e){U(e),P[d.accessor]=e,null==F||F({accessor:d.accessor,newValue:e,row:P,rowIndex:v})}),[d.accessor,F,P,v]),he=l((function(){L((function(e){var n=new Set(e),t=String(Z);return n.has(t)?n.delete(t):n.add(t),n}))}),[Z,L]);return Y&&!ce?e("div",g({className:"st-cell-editing",id:y({accessor:d.accessor,rowIndex:v+1}),onMouseDown:function(e){return e.stopPropagation()},onKeyDown:function(e){return e.stopPropagation()}},{children:e(V,{enumOptions:d.enumOptions,onChange:ue,setIsEditing:G,type:d.type,value:z})})):n("div",g({className:de,id:ae,onDoubleClick:function(){return d.isEditable&&G(!0)},onMouseDown:function(){Y||S({rowIndex:v,colIndex:s,rowId:Z})},onMouseOver:function(){Y||E({rowIndex:v,colIndex:s,rowId:Z})},onDragOver:function(e){return ie({callback:oe,callbackProps:{event:e,hoveredHeader:d},limit:50})},onKeyDown:function(e){Y||"F2"!==e.key&&"Enter"!==e.key||!d.isEditable||Y||(e.preventDefault(),G(!0))},ref:r,"data-row-index":v,"data-col-index":s,"data-row-id":Z,"data-accessor":d.accessor},{children:[d.expandable&&ee?e("div",g({className:"st-icon-container st-expand-icon-container ".concat(re?"expanded":"collapsed"),onClick:he},{children:x})):null,e("span",g({className:"st-cell-content ".concat("right"===d.align?"right-aligned":"center"===d.align?"center-aligned":"left-aligned")},{children:e("span",{children:d.cellRenderer?d.cellRenderer({accessor:d.accessor,colIndex:s,row:P,theme:B}):te({content:z,header:d})})})),Y&&ce&&e(V,{enumOptions:d.enumOptions,onChange:ue,setIsEditing:G,type:d.type,value:z})]}),le)})),oe=function(n){var r=n.columnIndexStart,o=n.columnIndices,i=n.headers,a=n.hiddenColumns,l=n.onExpandRowClick,c=n.pinned,s=n.rowIndex,d=n.rowIndices,u=n.visibleRow,h=i.filter((function(e){return x({hiddenColumns:a,header:e,pinned:c})}));return e(t,{children:h.map((function(n,t){return e(ie,{columnIndices:o,header:n,headers:i,hiddenColumns:a,nestedIndex:t+(null!=r?r:0),onExpandRowClick:l,pinned:c,rowIndex:s,rowIndices:d,visibleRow:u},y({accessor:n.accessor,rowIndex:s+1}))}))})},ie=function(n){var t=n.columnIndices,r=n.header,o=n.headers,i=n.hiddenColumns,a=n.nestedIndex,l=n.onExpandRowClick,c=n.pinned,s=n.rowIndex,d=n.rowIndices,u=n.visibleRow,f=t[r.accessor],v=H(),p=v.getBorderClass,m=v.isSelected,g=v.isInitialFocusedCell,w=v.rowIdAccessor;if(r.children){var C=r.children.filter((function(e){return x({hiddenColumns:i,header:e,pinned:c})}));return e(h,{children:C.map((function(n){return e(ie,{columnIndices:t,header:n,headers:o,hiddenColumns:i,nestedIndex:a,onExpandRowClick:l,pinned:c,rowIndex:s,rowIndices:d,visibleRow:u},y({accessor:n.accessor,rowIndex:s+1}))}))})}var b=k(u.row,s,w),I={rowIndex:s,colIndex:f,rowId:b},R=p(I),S=m(I),E=g(I);return e(re,{borderClass:R,colIndex:f,header:r,isHighlighted:S,isInitialFocused:E,nestedIndex:a,onExpandRowClick:l,rowIndex:s,visibleRow:u},y({accessor:r.accessor,rowIndex:s+1}))},ae=function(n){var t=n.columnIndices,r=n.columnIndexStart,o=n.gridTemplateColumns,i=n.headers,a=n.hiddenColumns,l=n.hoveredIndex,c=n.index,s=n.onExpandRowClick,d=n.pinned,u=n.rowHeight,h=n.rowIndices,f=n.setHoveredIndex,v=n.visibleRow,p=H().useHoverRowBackground,m=v.position;return e("div",g({className:"st-row ".concat(m%2==0?"even":"odd"," ").concat(l===c&&p?"hovered":""),onMouseEnter:function(){f(c)},style:{gridTemplateColumns:o,top:O({position:m,rowHeight:u}),height:"".concat(u,"px")}},{children:e(oe,{columnIndexStart:r,columnIndices:t,headers:i,hiddenColumns:a,onExpandRowClick:s,pinned:d,rowIndex:c,rowIndices:h,visibleRow:v},c)}))},le=function(n){var t=n.displayStrongBorder,r=n.position,o=n.rowHeight,a=n.templateColumns,l=n.rowIndex,c=i(null);return e("div",g({className:"st-row-separator ".concat(t?"st-last-group-row":""),onMouseDown:function(e){if(void 0!==l){for(var n=e.currentTarget.getBoundingClientRect(),t=e.clientX-n.left,r=a.split(" ").map((function(e){if(e.includes("px"))return parseFloat(e);if(e.includes("fr")){var t=a.split(" ").filter((function(e){return e.includes("fr")})).length;return n.width/t}return 100})),o=0,i=0,s=0;s<r.length;s++){if(t<=o+r[s]){i=s;break}o+=r[s],i=s}var d="cell-".concat(l+1,"-").concat(i+1),u=document.getElementById(d);if(u){c.current=u;var h=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0});u.dispatchEvent(h)}}},onMouseUp:function(){if(c.current){var e=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0});c.current.dispatchEvent(e),c.current=null}},style:{gridTemplateColumns:a,top:A({position:r,rowHeight:o})}},{children:e("div",{style:{gridColumn:"1 / -1"}})}))},ce=s(void 0),se=["default"],de=function(e){var n=e.childRef,t=e.children,r=function(){var e=d(ce);if(!e)throw new Error("useScrollSyncContext must be used within a ScrollSyncProvider");return e}(),o=r.registerPane,i=r.unregisterPane;return c((function(){return n.current&&o(n.current,se),function(){n.current&&i(n.current,se)}}),[n,o,i]),f(t,{ref:function(e){n.current=e}})},ue=function(n){var r=n.condition,o=n.wrapper,i=n.children;return e(t,{children:r?o(i):e(t,{children:i})})},he=function(t){var r=t.columnIndexStart,o=t.columnIndices,i=t.headers,a=t.hiddenColumns,l=t.hoveredIndex,c=t.onExpandRowClick,s=t.pinned,d=t.ref,u=t.rowHeight,f=t.rowIndices,v=t.setHoveredIndex,p=t.templateColumns,m=t.totalHeight,w=t.visibleRows,C=t.width,b=s?"st-body-pinned-".concat(s):"st-body-main";return e(ue,g({condition:!s,wrapper:function(n){return e(de,g({childRef:d},{children:n}))}},{children:e("div",g({className:b,ref:d,style:g({position:"relative",height:"".concat(m,"px"),width:C},!s&&{flexGrow:1})},{children:w.map((function(t,d){return n(h,{children:[0!==d&&e(le,{displayStrongBorder:t.isLastGroupRow,position:t.position,rowHeight:u,templateColumns:p,rowIndex:d-1}),e(ae,{columnIndexStart:r,columnIndices:o,gridTemplateColumns:p,headers:i,hiddenColumns:a,hoveredIndex:l,index:d,onExpandRowClick:c,pinned:s,rowHeight:u,rowIndices:f,setHoveredIndex:v,visibleRow:t})]},t.position)}))}))}))};function fe(e){var n=e.headersRef,t=e.hiddenColumns,r=e.pinnedLeftColumns,o=e.pinnedRightColumns,i={},a=0,l=function(e,n){void 0===n&&(n=!1),n||a++,i[e.accessor]=a,e.children&&e.children.length>0&&e.children.filter((function(e){return x({hiddenColumns:t,header:e})})).forEach((function(e,n){l(e,0===n)}))};return r.forEach((function(e,n){l(e,0===n)})),n.current.filter((function(e){return!e.pinned&&x({hiddenColumns:t,header:e})})).forEach((function(e,n){var t=0===n&&0===r.length;l(e,t)})),o.forEach((function(e){l(e,!1)})),i}var ve=function(t){var r=t.headerContainerRef,l=t.mainTemplateColumns,s=t.pinnedLeftColumns,d=t.pinnedLeftTemplateColumns,u=t.pinnedLeftWidth,h=t.pinnedRightColumns,f=t.pinnedRightTemplateColumns,v=t.pinnedRightWidth,p=t.setScrollTop,m=t.tableRows,w=t.visibleRows,C=H(),b=C.headersRef,y=C.hiddenColumns,x=C.mainBodyRef,I=C.rowHeight,R=C.rowIdAccessor,S=C.scrollbarWidth,E=C.tableBodyContainerRef,N=o(null),W=N[0],F=N[1];!function(e){var n=e.headerContainerRef,t=e.mainSectionRef,r=e.scrollbarWidth,i=o(!1),a=i[0],l=i[1];c((function(){var e=null==n?void 0:n.current;if(a&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(r,"px")),function(){e.classList.remove("st-header-scroll-padding")}}),[n,a,r]),c((function(){var e=null==n?void 0:n.current,r=null==t?void 0:t.current;if(r&&e){var o=function(){if(r){var e=r.scrollHeight>r.clientHeight;l(e)}};o();var i=new ResizeObserver((function(){o()}));return i.observe(r),function(){r&&i.unobserve(r)}}}),[n,t])}({headerContainerRef:r,mainSectionRef:E,scrollbarWidth:S});var D=i(null),M=function(e){return e.length}(m),T=M*(I+1)-1,L=a((function(){return fe({headersRef:b,hiddenColumns:y,pinnedLeftColumns:s,pinnedRightColumns:h})}),[b,y,s,h]),B=a((function(){var e={};return w.forEach((function(n,t){var r=String(k(n.row,t,R));e[r]=t})),e}),[w,R]),A=function(e){console.log("Row expansion not yet implemented for new structure:",e)},O={columnIndices:L,headerContainerRef:r,headers:b.current,hiddenColumns:y,hoveredIndex:W,rowHeight:I,rowIndices:B,setHoveredIndex:F,visibleRows:w};return n("div",g({className:"st-body-container",onMouseLeave:function(){return F(null)},onScroll:function(e){var n=e.currentTarget.scrollTop;D.current&&cancelAnimationFrame(D.current),D.current=requestAnimationFrame((function(){p(n)}))},ref:E},{children:[s.length>0&&e(he,g({},O,{onExpandRowClick:A,pinned:"left",templateColumns:d,totalHeight:T,width:u})),e(he,g({},O,{columnIndexStart:s.length,onExpandRowClick:A,ref:x,templateColumns:l,totalHeight:T})),h.length>0&&e(he,g({},O,{columnIndexStart:s.length+l.length,onExpandRowClick:A,pinned:"right",templateColumns:f,totalHeight:T,width:v}))]}))},pe=function(e){return void 0===e&&(e=0),e?e+1:0},me=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=e.setMainBodyWidth,i=e.setPinnedLeftWidth,a=e.setPinnedRightWidth,l=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=n.pinned,i=0;return t.forEach((function(e){e.hide||e.pinned!==o||(e.accessor===n.accessor?i+=r:R(e).forEach((function(e){e.hide||(e.accessor===n.accessor?i+=r:i+=S(e))})))})),n.pinned?pe(i):i}({header:n,headers:t,newWidth:r});"left"===n.pinned?i(l):"right"===n.pinned?a(l):n.pinned||o(l)},ge=function(e){var n=e.event,t=e.forceUpdate,r=e.gridColumnEnd,o=e.gridColumnStart,i=e.header,a=e.headersRef,l=e.setMainBodyWidth,c=e.setPinnedLeftWidth,s=e.setPinnedRightWidth,d=e.startWidth;n.preventDefault();var u="clientX"in n?n.clientX:n.touches[0].clientX,h="touches"in n;if(i&&!i.hide){var f=N(i),v=r-o>1,p=v?R(i):[i],m=function(e){var n="right"===i.pinned?u-e:e-u;if(v&&p.length>1)we({delta:n,header:i,headersRef:a,leafHeaders:p,minWidth:f,setMainBodyWidth:l,setPinnedLeftWidth:c,setPinnedRightWidth:s,startWidth:d});else{var r=Math.max(d+n,f);i.width=r,me({header:i,headers:a.current,newWidth:r,setMainBodyWidth:l,setPinnedLeftWidth:c,setPinnedRightWidth:s})}a.current.forEach((function(e){E(e)})),t()};if(h){var g=function(e){var n=e.touches[0];m(n.clientX)},w=function(){document.removeEventListener("touchmove",g),document.removeEventListener("touchend",w)};document.addEventListener("touchmove",g),document.addEventListener("touchend",w)}else{var C=function(e){m(e.clientX)},b=function(){document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",b)};document.addEventListener("mousemove",C),document.addEventListener("mouseup",b)}}},we=function(e){var n=e.delta,t=e.header,r=e.headersRef,o=e.leafHeaders,i=e.minWidth,a=e.setMainBodyWidth,l=e.setPinnedLeftWidth,c=e.setPinnedRightWidth,s=e.startWidth,d=o.reduce((function(e,n){return Math.min(e,N(n))}),40),u=o.reduce((function(e,n){return e+("number"==typeof n.width?n.width:150)}),0),h=Math.max(s+n,d);me({header:t,headers:r.current,newWidth:h,setMainBodyWidth:a,setPinnedLeftWidth:l,setPinnedRightWidth:c});var f=h-u;o.forEach((function(e){var n="number"==typeof e.width?e.width:150,t=f*(n/u),r=Math.max(n+t,i);e.width=r}))},Ce=function(n){var t=n.className,r=n.style;return e("svg",g({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:t,style:g({height:"1em"},r)},{children:e("path",{d:"M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"})}))},be={equals:"Equals",notEquals:"Not equals",contains:"Contains",notContains:"Does not contain",startsWith:"Starts with",endsWith:"Ends with",greaterThan:"Greater than",lessThan:"Less than",greaterThanOrEqual:"Greater than or equal",lessThanOrEqual:"Less than or equal",between:"Between",notBetween:"Not between",before:"Before",after:"After",in:"Is one of",notIn:"Is not one of",isEmpty:"Is empty",isNotEmpty:"Is not empty"},ye=function(e){switch(e){case"string":return["equals","notEquals","contains","notContains","startsWith","endsWith","isEmpty","isNotEmpty"];case"number":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","notBetween","isEmpty","isNotEmpty"];case"boolean":return["equals","isEmpty","isNotEmpty"];case"date":return["equals","notEquals","before","after","between","notBetween","isEmpty","isNotEmpty"];case"enum":return["in","notIn","isEmpty","isNotEmpty"];default:return["equals","notEquals","isEmpty","isNotEmpty"]}},xe=function(e){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(e)},Ie=function(e){return["between","notBetween","in","notIn"].includes(e)},Re=function(e){return["isEmpty","isNotEmpty"].includes(e)},Se=function(n){var t=n.children;return e("div",g({className:"st-filter-container"},{children:t}))},Ee=function(){return e("svg",g({className:"st-custom-select-arrow",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},Ne=function(t){var r=t.value,a=t.onChange,l=t.options,s=t.placeholder,d=void 0===s?"Select...":s,u=t.className,h=void 0===u?"":u,f=t.disabled,v=void 0!==f&&f,p=o(!1),m=p[0],w=p[1],C=o(-1),b=C[0],y=C[1],x=i(null),I=l.find((function(e){return e.value===r}));c((function(){var e=function(e){if(m)switch(e.key){case"ArrowDown":e.preventDefault(),y((function(e){return e<l.length-1?e+1:0}));break;case"ArrowUp":e.preventDefault(),y((function(e){return e>0?e-1:l.length-1}));break;case"Enter":e.preventDefault(),b>=0&&(a(l[b].value),w(!1),y(-1));break;case"Escape":e.preventDefault(),w(!1),y(-1)}};if(m)return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}}),[m,b,l,a]);return n("div",g({ref:x,className:"st-custom-select ".concat(h," ").concat(v?"st-custom-select-disabled":""," ").concat(m?"st-custom-select-open":"").trim()},{children:[n("button",g({type:"button",className:"st-custom-select-trigger",onClick:function(){if(!v)if(w(!m),m)y(-1);else{var e=l.findIndex((function(e){return e.value===r}));y(e>=0?e:0)}},disabled:v,"aria-haspopup":"listbox","aria-expanded":m,"aria-labelledby":"select-label"},{children:[e("span",g({className:"st-custom-select-value"},{children:I?I.label:d})),e(Ee,{})]})),e(P,g({open:m,setOpen:w,onClose:function(){w(!1),y(-1)},positioning:"absolute",overflow:"auto"},{children:e("div",g({className:"st-custom-select-options",role:"listbox"},{children:l.map((function(n,t){return e("div",g({className:"st-custom-select-option ".concat(n.value===r?"st-custom-select-option-selected":""," ").concat(t===b?"st-custom-select-option-focused":"").trim(),role:"option","aria-selected":n.value===r,onClick:function(){return e=n.value,a(e),w(!1),void y(-1);var e}},{children:n.label}),n.value)}))}))}))]}))},ke=function(n){var t=n.value,r=n.onChange,o=n.operators.map((function(e){return{value:e,label:be[e]}}));return e("div",g({className:"st-filter-section"},{children:e(Ne,{value:t,onChange:function(e){r(e)},options:o})}))},We=function(n){var t=n.type,r=void 0===t?"text":t,o=n.value,i=n.onChange,a=n.placeholder,l=n.autoFocus,c=void 0!==l&&l,s=n.className;return e("input",{type:r,value:o,onChange:function(e){return i(e.target.value)},placeholder:a,autoFocus:c,className:"st-filter-input ".concat(void 0===s?"":s).trim()})},Fe=function(n){var t=n.children,r=n.className;return e("div",g({className:"st-filter-section ".concat(void 0===r?"":r).trim()},{children:t}))},De=function(t){var r=t.onApply,o=t.onClear,i=t.canApply,a=t.showClear;return n("div",g({className:"st-filter-actions"},{children:[e("button",g({onClick:r,disabled:!i,className:"st-filter-button st-filter-button-apply ".concat(i?"":"st-filter-button-disabled")},{children:"Apply"})),a&&o&&e("button",g({onClick:o,className:"st-filter-button st-filter-button-clear"},{children:"Clear"}))]}))},Me=function(t){var r=t.header,i=t.currentFilter,a=t.onApplyFilter,l=t.onClearFilter,s=o((null==i?void 0:i.operator)||"contains"),d=s[0],u=s[1],h=o(String((null==i?void 0:i.value)||"")),f=h[0],v=h[1],p=ye("string");c((function(){i?(u(i.operator),v(String(i.value||""))):(u("contains"),v(""))}),[i]);var m=Re(d)||f.trim();return n(Se,{children:[e(ke,{value:d,onChange:u,operators:p}),xe(d)&&e(Fe,{children:e(We,{type:"text",value:f,onChange:v,placeholder:"Filter...",autoFocus:!0})}),e(De,{onApply:function(){var e=g({accessor:r.accessor,operator:d},xe(d)&&{value:f});a(e)},onClear:l,canApply:!!m,showClear:!!i})]})},He=function(t){var r,i,a=t.header,l=t.currentFilter,s=t.onApplyFilter,d=t.onClearFilter,u=o((null==l?void 0:l.operator)||"equals"),h=u[0],f=u[1],v=o(String((null==l?void 0:l.value)||"")),p=v[0],m=v[1],g=o(String((null===(r=null==l?void 0:l.values)||void 0===r?void 0:r[0])||"")),w=g[0],C=g[1],b=o(String((null===(i=null==l?void 0:l.values)||void 0===i?void 0:i[1])||"")),y=b[0],x=b[1],I=ye("number");c((function(){var e,n;l?(f(l.operator),m(String(l.value||"")),C(String((null===(e=l.values)||void 0===e?void 0:e[0])||"")),x(String((null===(n=l.values)||void 0===n?void 0:n[1])||""))):(f("equals"),m(""),C(""),x(""))}),[l]);return n(Se,{children:[e(ke,{value:h,onChange:f,operators:I}),xe(h)&&e(Fe,{children:e(We,{type:"number",value:p,onChange:m,placeholder:"Enter number...",autoFocus:!0})}),Ie(h)&&n(Fe,{children:[e(We,{type:"number",value:w,onChange:C,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from"}),e(We,{type:"number",value:y,onChange:x,placeholder:"To..."})]}),e(De,{onApply:function(){var e={accessor:a.accessor,operator:h};xe(h)?e.value=parseFloat(p):Ie(h)&&(e.values=[parseFloat(w.toString()),parseFloat(y.toString())]),s(e)},onClear:d,canApply:!!Re(h)||(xe(h)?""!==p.trim():!!Ie(h)&&""!==String(w).trim()&&""!==String(y).trim()),showClear:!!l})]})},Te=function(n){var t=n.value,r=n.onChange,o=n.options,i=n.className,a=void 0===i?"":i,l=n.placeholder;return e(Ne,{value:t,onChange:r,options:o,className:a,placeholder:l})},Le=function(t){var r=t.header,i=t.currentFilter,a=t.onApplyFilter,l=t.onClearFilter,s=o((null==i?void 0:i.operator)||"equals"),d=s[0],u=s[1],h=o(void 0!==(null==i?void 0:i.value)?String(i.value):"true"),f=h[0],v=h[1],p=ye("boolean");c((function(){i?(u(i.operator),v(void 0!==i.value?String(i.value):"true")):(u("equals"),v("true"))}),[i]);var m=Re(d)||""!==f;return n(Se,{children:[e(ke,{value:d,onChange:u,operators:p}),xe(d)&&e(Fe,{children:e(Te,{value:f,onChange:v,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),e(De,{onApply:function(){var e={accessor:r.accessor,operator:d};xe(d)&&(e.value="true"===f),a(e)},onClear:l,canApply:m,showClear:!!i})]})},Be=function(t){var r,a,l=t.header,s=t.currentFilter,d=t.onApplyFilter,u=t.onClearFilter,h=o((null==s?void 0:s.operator)||"equals"),f=h[0],v=h[1],p=o((null==s?void 0:s.value)?String(s.value):""),m=p[0],w=p[1],C=o((null===(r=null==s?void 0:s.values)||void 0===r?void 0:r[0])?String(s.values[0]):""),b=C[0],y=C[1],x=o(String((null===(a=null==s?void 0:s.values)||void 0===a?void 0:a[1])||"")),I=x[0],R=x[1],S=ye("date");c((function(){var e,n;s?(v(s.operator),w(String(s.value||"")),y(String((null===(e=s.values)||void 0===e?void 0:e[0])||"")),R(String((null===(n=s.values)||void 0===n?void 0:n[1])||""))):(v("equals"),w(""),y(""),R(""))}),[s]);var E=function(t){var r=t.value,a=t.onChange,l=t.placeholder,s=t.autoFocus,d=t.className,u=o(!1),h=u[0],f=u[1],v=o(""),p=v[0],m=v[1],w=i(null);c((function(){if(r){var e=new Date(r);isNaN(e.getTime())||m(e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else m("")}),[r]),c((function(){s&&w.current&&w.current.focus()}),[s]);var C=r?new Date(r):new Date;return n("div",g({className:"st-date-input-container",style:{position:"relative"}},{children:[e("input",{ref:w,type:"text",value:p,placeholder:l,onClick:function(){f(!h)},onKeyDown:function(e){"Enter"===e.key||" "===e.key?(e.preventDefault(),f(!h)):"Escape"===e.key&&f(!1)},readOnly:!0,className:"st-filter-input ".concat(d||""),style:{cursor:"pointer"}}),e(P,g({open:h,setOpen:f,onClose:function(){f(!1)},positioning:"absolute",overflow:"visible"},{children:e(Y,{value:C,onChange:function(e){var n=e.toISOString().split("T")[0];a(n),f(!1)},onClose:function(){return f(!1)}})}))]}))};return n(Se,{children:[e(ke,{value:f,onChange:v,operators:S}),xe(f)&&e(Fe,{children:e(E,{value:m,onChange:w,placeholder:"Select date...",autoFocus:!0})}),Ie(f)&&n(Fe,{children:[e(E,{value:b,onChange:y,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),e(E,{value:I,onChange:R,placeholder:"To date..."})]}),e(De,{onApply:function(){var e={accessor:l.accessor,operator:f};xe(f)?e.value=m:Ie(f)&&(e.values=[b,I]),d(e)},onClear:u,canApply:!!Re(f)||(xe(f)?""!==m.trim():!!Ie(f)&&""!==b.trim()&&""!==I.trim()),showClear:!!s})]})},Ae=function(n){var t=n.className,r=n.style;return e("svg",g({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:t,style:g({height:"10px"},r)},{children:e("path",{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})}))},Oe=function(t){var r=t.checked,o=void 0!==r&&r,i=t.children,a=t.onChange;return n("label",g({className:"st-checkbox-label"},{children:[e("input",{checked:o,className:"st-checkbox-input",onChange:function(){a&&a(!o)},type:"checkbox"}),e("span",g({className:"st-checkbox-custom ".concat(o?"st-checked":"")},{children:o&&e(Ae,{className:"st-checkbox-checkmark"})})),i]}))},Pe=function(t){var r=t.header,i=t.currentFilter,l=t.onApplyFilter,s=t.onClearFilter,d=a((function(){return r.enumOptions||[]}),[r.enumOptions]),u=a((function(){return d.map((function(e){return e.value}))}),[d]),h=o((null==i?void 0:i.values)?i.values.map(String):u),f=h[0],v=h[1];c((function(){v(i?i.values?i.values.map(String):[]:u)}),[i,u]);var p=f.length===u.length;return n(Se,{children:[e(Fe,{children:n("div",g({className:"st-enum-filter-options"},{children:[e("div",g({className:"st-enum-select-all"},{children:e(Oe,g({checked:p,onChange:function(e){v(e?u:[])}},{children:e("span",g({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),d.map((function(n){return e(Oe,g({checked:f.includes(n.value),onChange:function(){return e=n.value,void v((function(n){return n.includes(e)?n.filter((function(n){return n!==e})):b(b([],n,!0),[e],!1)}));var e}},{children:e("span",g({className:"st-enum-option-label"},{children:n.label}))}),n.value)}))]}))}),e(De,{onApply:function(){if(f.length!==u.length){var e={accessor:r.accessor,operator:"in",values:f};l(e)}else s()},onClear:s,canApply:0!==f.length&&f.length!==u.length,showClear:!!i})]})},qe=function(n){var r=n.header,o=n.currentFilter,i=n.onApplyFilter,a=n.onClearFilter;return e(t,{children:function(){switch(r.type){case"number":return e(He,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"boolean":return e(Le,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"date":return e(Be,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"enum":return e(Pe,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});default:return e(Me,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a})}}()})},ze=u((function(t,r){var i,a,l=t.colIndex,s=t.forceHeadersUpdate,d=t.gridColumnEnd,u=t.gridColumnStart,h=t.gridRowEnd,f=t.gridRowStart,v=t.header,p=t.reverse,m=t.sort,w=o(!1),C=w[0],x=w[1],I=H(),R=I.columnReordering,S=I.columnResizing,E=I.draggedHeaderRef,N=I.filters,k=I.forceUpdate,W=I.handleApplyFilter,F=I.handleClearFilter,D=I.headersRef,M=I.hoveredHeaderRef,T=I.onColumnOrderChange,L=I.onSort,B=I.onTableHeaderDragEnd,A=I.rowHeight,O=I.selectColumns,q=I.selectableColumns,z=I.setInitialFocusedCell,U=I.setMainBodyWidth,j=I.setPinnedLeftWidth,Y=I.setPinnedRightWidth,G=I.setSelectedCells,K=I.setSelectedColumns,X=I.sortDownIcon,V=I.sortUpIcon,J=Boolean(null==v?void 0:v.isSortable),Q=Boolean(null==v?void 0:v.filterable),Z=N[v.accessor],_="st-header-cell ".concat(v.accessor===(null===(i=M.current)||void 0===i?void 0:i.accessor)?"st-hovered":""," ").concat((null===(a=E.current)||void 0===a?void 0:a.accessor)===v.accessor?"st-dragging":""," ").concat(J?"clickable":""," ").concat(R&&!J?"columnReordering":""," ").concat(v.children?"parent":""),ee=ne({draggedHeaderRef:E,headersRef:D,hoveredHeaderRef:M,onColumnOrderChange:T,onTableHeaderDragEnd:B}),te=ee.handleDragStart,re=ee.handleDragEnd,oe=ee.handleDragOver,ie=$(),ae=function(e){var n=e.event,t=e.header;if(q){var r=function(e,n){if(!e.children||0===e.children.length)return[n];var t=[],r=function(e,n){if(!e.children||0===e.children.length)return t.push(n),n+1;for(var o=n,i=0,a=e.children;i<a.length;i++){var l=a[i];o=r(l,o)}return o};return r(e,n),t}(t,l);return n.shiftKey&&O?K((function(e){if(0===e.size)return new Set(r);var n=r[0],t=Array.from(e).sort((function(e,n){return e-n})),o=t[0],i=Math.abs(n-o);t.forEach((function(e){var t=Math.abs(n-e);t<i&&(i=t,o=e)}));var a,l,c,s,d=b(b([],(a=o,l=n,c=Math.min(a,l),s=Math.max(a,l),Array.from({length:s-c+1},(function(e,n){return c+n}))),!0),r,!0);return new Set(b(b([],Array.from(e),!0),d,!0))})):O&&O(r),G(new Set),void z(null)}t.isSortable&&L(l,t.accessor)};if(c((function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}}),[]),!v)return null;var le=S&&e("div",g({className:"st-header-resize-handle-container",onMouseDown:function(e){var n;ie({callback:ge,callbackProps:{event:e.nativeEvent,forceUpdate:k,gridColumnEnd:d,gridColumnStart:u,header:v,headersRef:D,setMainBodyWidth:U,setPinnedLeftWidth:j,setPinnedRightWidth:Y,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})},onTouchStart:function(e){var n;ie({callback:ge,callbackProps:{event:e,forceUpdate:k,gridColumnEnd:d,gridColumnStart:u,header:v,headersRef:D,setMainBodyWidth:U,setPinnedLeftWidth:j,setPinnedRightWidth:Y,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}},{children:e("div",{className:"st-header-resize-handle"})})),ce=m&&m.key.accessor===v.accessor&&n("div",g({className:"st-icon-container",onClick:function(e){return ae({event:e,header:v})}},{children:["ascending"===m.direction&&V&&V,"descending"===m.direction&&X&&X]})),se=Q&&n("div",g({className:"st-icon-container",onClick:function(e){e.stopPropagation(),x(!C)}},{children:[e(Ce,{className:"st-header-icon",style:{fill:Z?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),e(P,g({open:C,overflow:"visible",setOpen:x,onClose:function(){return x(!1)}},{children:e(qe,{header:v,currentFilter:Z,onApplyFilter:function(e){W(e),x(!1)},onClearFilter:function(){F(v.accessor),x(!1)}})}))]}));return n("div",g({className:_,id:y({accessor:v.accessor,rowIndex:0}),onDragOver:function(e){ie({callback:oe,callbackProps:{event:e,hoveredHeader:v},limit:50})},ref:r,style:g(g({gridRowStart:f,gridRowEnd:h,gridColumnStart:u,gridColumnEnd:d},d-u>1?{}:{width:v.width}),h-f>1?{}:{height:A})},{children:[p&&le,"right"===v.align&&se,"right"===v.align&&ce,e("div",g({className:"st-header-label",draggable:R&&!v.disableReorder,onClick:function(e){return ae({event:e,header:v})},onDragEnd:function(e){e.preventDefault(),re(),s()},onDragStart:function(e){R&&v&&function(e){te(e)}(v)}},{children:e("span",g({className:"st-header-label-text ".concat("right"===v.align?"right-aligned":"center"===v.align?"center-aligned":"left-aligned")},{children:null==v?void 0:v.label}))})),"right"!==v.align&&ce,"right"!==v.align&&se,!p&&le]}))})),Ue=function(n){var r=n.columnIndices,o=n.gridTemplateColumns,i=n.handleScroll,l=n.headersRef,c=n.hiddenColumns,s=n.maxDepth,d=n.pinned,u=n.sectionRef,h=n.sort,f=v((function(e){return e+1}),0)[1],m=a((function(){var e=[],n=1,t=function(o,i,a){var l,u;if(void 0===a&&(a=!1),!x({hiddenColumns:c,header:o,pinned:d}))return 0;a||n++;var h=null!==(u=null===(l=o.children)||void 0===l?void 0:l.filter((function(e){return x({hiddenColumns:c,header:e,pinned:d})})).length)&&void 0!==u?u:0,f=n,v=h>0?f+h:f+1,p=i,m=h>0?i+1:s+1;if(e.push({header:o,gridColumnStart:f,gridColumnEnd:v,gridRowStart:p,gridRowEnd:m,colIndex:r[o.accessor]}),o.children){var g=!0;o.children.forEach((function(e){x({hiddenColumns:c,header:e,pinned:d})&&(t(e,i+1,g),g=!1)}))}return v-f},o=l.current.filter((function(e){return x({hiddenColumns:c,header:e,pinned:d})})),i=!0;return o.forEach((function(e){t(e,1,i),i=!1})),e}),[l,c,s,d,r]);return e(ue,g({condition:!d,wrapper:function(n){return e(de,g({childRef:u},{children:n}))}},{children:e("div",g({className:"st-header-".concat(d?"pinned-".concat(d):"main")},i&&{onScroll:i},{ref:u,style:{gridTemplateColumns:o,display:"grid",position:"relative"}},{children:e(t,{children:m.map((function(n){return e(ze,{colIndex:n.colIndex,forceHeadersUpdate:f,gridColumnEnd:n.gridColumnEnd,gridColumnStart:n.gridColumnStart,gridRowEnd:n.gridRowEnd,gridRowStart:n.gridRowStart,header:n.header,ref:p(),reverse:"right"===d,sort:h},n.header.accessor)}))})}))}))},je=function(e){var n;return(null===(n=e.children)||void 0===n?void 0:n.length)?1+Math.max.apply(Math,e.children.map(je)):1},Ye=function(t){var r=t.centerHeaderRef,o=t.headerContainerRef,i=t.headersRef,l=t.hiddenColumns,c=t.mainTemplateColumns,s=t.pinnedLeftColumns,d=t.pinnedLeftTemplateColumns,u=t.pinnedRightColumns,h=t.pinnedRightTemplateColumns,f=t.sort,v=H(),p=v.pinnedLeftRef,w=v.pinnedRightRef,C=v.setPinnedLeftWidth,b=v.setPinnedRightWidth,y=a((function(){return fe({headersRef:i,hiddenColumns:l,pinnedLeftColumns:s,pinnedRightColumns:u})}),[i,l,s,u]),I=a((function(){var e=i.current,n=0;return e.forEach((function(e){if(x({hiddenColumns:l,header:e})){var t=je(e);n=Math.max(n,t)}})),{maxDepth:n}}),[i,l]).maxDepth;return m((function(){var e,n;C(pe(null===(e=p.current)||void 0===e?void 0:e.clientWidth)),b(pe(null===(n=w.current)||void 0===n?void 0:n.clientWidth))}),[p,w,C,b]),n("div",g({className:"st-header-container",ref:o},{children:[s.length>0&&e(Ue,{columnIndices:y,gridTemplateColumns:d,handleScroll:void 0,headersRef:i,hiddenColumns:l,maxDepth:I,pinned:"left",sectionRef:p,sort:f}),e(Ue,{columnIndices:y,gridTemplateColumns:c,handleScroll:void 0,headersRef:i,hiddenColumns:l,maxDepth:I,sectionRef:r,sort:f}),u.length>0&&e(Ue,{columnIndices:y,gridTemplateColumns:h,handleScroll:void 0,headersRef:i,hiddenColumns:l,maxDepth:I,pinned:"right",sectionRef:w,sort:f})]}))},Ge=function(e){var n=e.headers,t=e.hiddenColumns,r=function(e){var n=e.headers,o=e.flattenedHeaders;return n.forEach((function(e){!0!==t[e.accessor]&&(e.children?r({headers:e.children,flattenedHeaders:o}):o.push(e))})),o},o=r({headers:n,flattenedHeaders:[]});return"".concat(o.map((function(e){return function(e){var n=e.minWidth,t=e.width;return"number"==typeof t&&(t="".concat(t,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"string"==typeof t&&t.endsWith("fr")?"minmax(".concat(n,", ").concat(t,")"):"max(".concat(n,", ").concat(t,")"):t}(e)})).join(" "))},Ke=function(t){var r=t.pinnedLeftWidth,o=t.pinnedRightWidth,l=t.setScrollTop,c=t.sort,s=t.tableRows,d=t.visibleRows,u=H(),h=u.columnResizing,f=u.editColumns,v=u.headersRef,p=u.hiddenColumns,m=i(null),w=i(null),C=v.current.filter((function(e){return!e.pinned})),b=v.current.filter((function(e){return"left"===e.pinned})),y=v.current.filter((function(e){return"right"===e.pinned})),x=a((function(){return Ge({headers:b,hiddenColumns:p})}),[b,p]),I=a((function(){return Ge({headers:C,hiddenColumns:p})}),[C,p]),R=a((function(){return Ge({headers:y,hiddenColumns:p})}),[y,p]),S={centerHeaderRef:w,headerContainerRef:m,headersRef:v,hiddenColumns:p,mainTemplateColumns:I,pinnedLeftColumns:b,pinnedLeftTemplateColumns:x,pinnedRightColumns:y,pinnedRightTemplateColumns:R,sort:c},E={tableRows:s,headerContainerRef:m,mainTemplateColumns:I,pinnedLeftColumns:b,pinnedLeftTemplateColumns:x,pinnedLeftWidth:r,pinnedRightColumns:y,pinnedRightTemplateColumns:R,pinnedRightWidth:o,setScrollTop:l,visibleRows:d};return n("div",g({className:"st-content ".concat(h?"st-resizeable":"st-not-resizeable"),style:{width:f?"calc(100% - 27.5px)":"100%"}},{children:[e(Ye,g({},S)),e(ve,g({},E))]}))},Xe=function(t){var r,a,l=t.mainBodyWidth,s=t.mainBodyRef,d=t.pinnedLeftWidth,u=t.pinnedRightWidth,h=t.setMainBodyWidth,f=t.tableBodyContainerRef,v=H().editColumns,p=o(!1),m=p[0],w=p[1],C=i(null),b=f.current&&f.current.scrollHeight>f.current.clientHeight,y=v?28:0,x=(v?u+1:u)+(f.current&&b?f.current.offsetWidth-f.current.clientWidth:0);return c((function(){setTimeout((function(){!function(){var e;if(s.current){var n=null===(e=s.current)||void 0===e?void 0:e.scrollWidth;h(n||0)}}()}),1)}),[s,h]),c((function(){setTimeout((function(){!function(){if(s.current){var e=s.current.clientWidth;w(l>e)}}()}),1)}),[s,l,h]),m?n("div",g({className:"st-horizontal-scrollbar-container"},{children:[d>0&&e("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:d,height:null===(r=C.current)||void 0===r?void 0:r.offsetHeight}}),l>0&&e(de,g({childRef:C},{children:e("div",g({className:"st-horizontal-scrollbar-middle",ref:C,style:{flexGrow:1}},{children:e("div",{style:{width:l,height:".3px"}})}))})),u>0&&e("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:x,height:null===(a=C.current)||void 0===a?void 0:a.offsetHeight}}),y>0&&e("div",{style:{width:y-1.5,height:"100%",flexShrink:0}})]})):null},Ve={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"ascending"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"ascending"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"ascending"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"ascending"===t?i:-i},enum:function(e,n,t){return Ve.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"ascending"===t?-1:1:null==n?"ascending"===t?1:-1:"string"==typeof e&&"string"==typeof n?Ve.string(e,n,t):"number"==typeof e&&"number"==typeof n?Ve.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?Ve.boolean(e,n,t):Ve.string(String(e),String(n),t)}},Je=function(e,n,t){var r=t.find((function(e){return e.accessor===n.key.accessor})),o=(null==r?void 0:r.type)||"string",i=n.direction;return b([],e,!0).sort((function(e,t){var r=n.key.accessor;return function(e,n,t,r){if(void 0===t&&(t="string"),null==e||""===e)return"ascending"===r?-1:1;if(null==n||""===n)return"ascending"===r?1:-1;if("number"===t){var o=function(e){var n;if("number"==typeof e)return e;var t=String(e);if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(n=r[2])||void 0===n?void 0:n.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(t)||0},i=o(e),a=o(n);return Ve.number(i,a,r)}return"date"===t?Ve.date(String(e),String(n),r):"boolean"===t?Ve.boolean(Boolean(e),Boolean(n),r):"enum"===t?Ve.enum(String(e),String(n),r):Ve.string(String(e),String(n),r)}(e[r],t[r],o,i)}))},$e=function(e){var n=e.headers,t=e.tableRows,r=o(null),i=r[0],l=r[1],c=a((function(){var e={};return n.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[n]),s=o(c),d=s[0],u=s[1],h=a((function(){if(!i)return t;var e=function(e,n,t){return{sortedData:Je(n,t,e),newSortConfig:t}}(n,t,i).sortedData;return e}),[t,i,n]);return{hiddenColumns:d,setHiddenColumns:u,setSort:l,sort:i,sortedRows:h,updateSort:function(e,t){var r=function(e){for(var n=0,o=e;n<o.length;n++){var i=o[n];if(i.accessor===t)return i;if(i.children&&i.children.length>0){var a=r(i.children);if(a)return a}}},o=r(n);o&&l((function(e){return e&&e.key.accessor===t?"ascending"===e.direction?{key:o,direction:"descending"}:null:{key:o,direction:"ascending"}}))}}},Qe=function(e,n,t,r){void 0===r&&(r=new Set);for(var o=0,i=e;o<i.length;o++){var a=i[o];if(!r.has(a.accessor)&&(r.add(a.accessor),a.children&&a.children.length>0)){var l=a.children.some((function(e){return e.accessor===n})),c=!1;if(!l)for(var s=0,d=a.children;s<d.length;s++){var u=d[s];if(Qe([u],n,t,r),!1===t[u.accessor]){c=!0;break}}(l||c)&&(t[a.accessor]=!1)}}},Ze=function(e,n){return e.every((function(e){return!0===n[e.accessor]}))},_e=function(e,n){e.forEach((function(e){e.children&&e.children.length>0&&(_e(e.children,n),Ze(e.children,n)&&(n[e.accessor]=!0))}))},en=function(r){var i=r.allHeaders,a=r.depth,l=void 0===a?0:a,c=r.header,s=r.hiddenColumns,d=r.setHiddenColumns,u=o(!0),h=u[0],f=u[1],v=H(),p=v.expandIcon,m=v.headersRef,w=v.setMainBodyWidth,C=v.setPinnedLeftWidth,b=v.setPinnedRightWidth,y="".concat(16*l,"px"),x=c.children&&c.children.length>0,I=s[c.accessor]||x&&c.children&&Ze(c.children,s);return n(t,{children:[n("div",g({className:"st-header-checkbox-item",style:{paddingLeft:y}},{children:[e("div",g({className:"st-header-icon-container"},{children:x?e("div",g({className:"st-collapsible-header-icon st-expand-icon-container ".concat(h?"expanded":"collapsed"),onClick:function(e){e.stopPropagation(),f(!h)}},{children:p})):null})),e(Oe,g({checked:I,onChange:function(e){var n=g({},s);(n[c.accessor]=e,e)?_e(i,n):(Qe(i,c.accessor,n),x&&c.children&&c.children.length>0&&c.children.every((function(e){return!0===s[e.accessor]}))&&c.children[0]&&(n[c.children[0].accessor]=!1,Qe(i,c.children[0].accessor,n)));d(n),m.current.forEach((function(e){e.hide=!0===n[e.accessor]})),function(e){var n=e.headers,t=e.setMainBodyWidth,r=e.setPinnedLeftWidth,o=e.setPinnedRightWidth,i=0,a=0,l=0;n.forEach((function(e){if(!e.hide){var n=R(e).reduce((function(e,n){return e+S(n)}),0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:l+=n}}));var c=pe(i),s=pe(a);r(c),o(s),t(l)}({headers:m.current,setMainBodyWidth:w,setPinnedLeftWidth:C,setPinnedRightWidth:b})}},{children:c.label}))]})),x&&h&&c.children&&e("div",g({className:"st-nested-headers"},{children:c.children.map((function(n,t){return e(en,{allHeaders:i,depth:l+1,header:n,hiddenColumns:s,setHiddenColumns:d},"".concat(n.accessor,"-").concat(t))}))}))]})},nn=function(n){var t=n.headers,r=n.open,o=n.position,i=n.setHiddenColumns,a=n.hiddenColumns,l="left"===o?"left":"";return e("div",g({className:"st-column-editor-popout ".concat(r?"open":""," ").concat(l),onClick:function(e){return e.stopPropagation()}},{children:e("div",g({className:"st-column-editor-popout-content"},{children:t.map((function(n,r){return e(en,{header:n,hiddenColumns:a,setHiddenColumns:i,allHeaders:t},"".concat(n.accessor,"-").concat(r))}))}))}))},tn=function(t){var r=t.columnEditorText,i=t.editColumns,a=t.editColumnsInitOpen,l=t.headers,c=t.hiddenColumns,s=t.position,d=void 0===s?"right":s,u=t.setHiddenColumns,h=o(a),f=h[0],v=h[1];return i?n("div",g({className:"st-column-editor ".concat(f?"open":""," ").concat(d),onClick:function(){return function(e){v(e)}(!f)},style:{width:28}},{children:[e("div",g({className:"st-column-editor-text"},{children:r})),e(nn,{headers:l,open:f,position:d,setHiddenColumns:u,hiddenColumns:c})]})):null},rn=function(n){var t=n.className;return e("svg",g({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e("path",{d:"M22 334.5c-3.8 8.8-2 19 4.6 26l116 144c4.5 4.8 10.8 7.5 17.4 7.5s12.9-2.7 17.4-7.5l116-144c6.6-7 8.4-17.2 4.6-26s-12.5-14.5-22-14.5l-72 0 0-288c0-17.7-14.3-32-32-32L148 0C130.3 0 116 14.3 116 32l0 288-72 0c-9.6 0-18.2 5.7-22 14.5z"})}))},on=function(n){var t=n.className;return e("svg",g({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e("path",{d:"M298 177.5c3.8-8.8 2-19-4.6-26l-116-144C172.9 2.7 166.6 0 160 0s-12.9 2.7-17.4 7.5l-116 144c-6.6 7-8.4 17.2-4.6 26S34.4 192 44 192l72 0 0 288c0 17.7 14.3 32 32 32l24 0c17.7 0 32-14.3 32-32l0-288 72 0c9.6 0 18.2-5.7 22-14.5z"})}))},an=function(n){var t=n.children,o=i({}),a=l((function(e,n){return!!o.current[n]&&o.current[n].find((function(n){return n===e}))}),[]),c=l((function(e,n){var t=e.clientWidth,r=e.scrollLeft;e.scrollWidth-t>0&&(n.scrollLeft=r)}),[]),s=l((function(e){e.onscroll=null}),[]),d=l((function(e,n){e.onscroll=function(){window.requestAnimationFrame((function(){n.forEach((function(n){var t;null===(t=o.current[n])||void 0===t||t.forEach((function(n){e!==n&&(s(n),c(e,n),window.requestAnimationFrame((function(){var e=Object.keys(o.current).filter((function(e){return o.current[e].includes(n)}));d(n,e)})))}))}))}))}}),[s,c]),u=l((function(e,n){n.forEach((function(n){o.current[n]||(o.current[n]=[]),a(e,n)||(o.current[n].length>0&&c(o.current[n][0],e),o.current[n].push(e))})),d(e,n)}),[a,c,d]),h=l((function(e,n){n.forEach((function(n){if(a(e,n)){s(e);var t=o.current[n].indexOf(e);-1!==t&&o.current[n].splice(t,1)}}))}),[a,s]);return e(ce.Provider,g({value:{registerPane:u,unregisterPane:h}},{children:r.Children.only(t)}))},ln=function(e,n){var t=n.find((function(n){return n.accessor===e.accessor})),r=(null==t?void 0:t.label)||e.accessor,o=be[e.operator],i="";return void 0!==e.value?i="boolean"==typeof e.value?e.value?"True":"False":String(e.value):e.values&&Array.isArray(e.values)&&("between"===e.operator||"notBetween"===e.operator?i="".concat(e.values[0]," - ").concat(e.values[1]):"in"!==e.operator&&"notIn"!==e.operator||(i=e.values.join(", "))),"isEmpty"===e.operator||"isNotEmpty"===e.operator?"".concat(r,": ").concat(o):"".concat(r,": ").concat(o," ").concat(i)},cn=function(){var t=H(),r=t.filters,o=t.handleClearFilter,i=t.headersRef,a=Object.values(r);return 0===a.length||a.length>0?null:e("div",g({className:"st-filter-bar"},{children:e("div",g({className:"st-filter-bar-content"},{children:e("div",g({className:"st-filter-chips"},{children:a.map((function(t){return n("div",g({className:"st-filter-chip"},{children:[e("span",g({className:"st-filter-chip-text"},{children:ln(t,i.current)})),e("button",g({className:"st-filter-chip-remove",onClick:function(){return o(t.accessor)},"aria-label":"Remove filter for ".concat(t.accessor)},{children:"×"}))]}),t.accessor)}))}))}))}))},sn=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())},dn=function(e){var n=e.rows,t=o({}),r=t[0],i=t[1],c=a((function(){return 0===Object.keys(r).length?n:n.filter((function(e){return Object.values(r).every((function(n){try{return function(e,n){var t=n.operator,r=n.value,o=n.values;if(null==e)return"isEmpty"===t;if("isEmpty"===t)return!e||""===String(e).trim();if("isNotEmpty"===t)return e&&""!==String(e).trim();if("string"==typeof e||"contains"===t||"notContains"===t||"startsWith"===t||"endsWith"===t){var i=String(e).toLowerCase(),a=r?String(r).toLowerCase():"";switch(t){case"equals":return i===a;case"notEquals":return i!==a;case"contains":return i.includes(a);case"notContains":return!i.includes(a);case"startsWith":return i.startsWith(a);case"endsWith":return i.endsWith(a)}}if("number"==typeof e||!isNaN(Number(e))){var l=Number(e),c=Number(r);switch(t){case"equals":return l===c;case"notEquals":return l!==c;case"greaterThan":return l>c;case"lessThan":return l<c;case"greaterThanOrEqual":return l>=c;case"lessThanOrEqual":return l<=c;case"between":if(o&&2===o.length){var s=o.map(Number),d=s[0],u=s[1];return l>=d&&l<=u}return!1;case"notBetween":if(o&&2===o.length){var h=o.map(Number);return d=h[0],u=h[1],l<d||l>u}return!0}}if(e instanceof Date||!isNaN(Date.parse(e))){var f=new Date(e),v=new Date(String(r||"")),p=sn(f),m=sn(v);switch(t){case"equals":return p.getTime()===m.getTime();case"notEquals":return p.getTime()!==m.getTime();case"before":return p<m;case"after":return p>m;case"between":if(o&&2===o.length){var g=o.map((function(e){return sn(new Date(String(e||"")))})),w=g[0],C=g[1];return p>=w&&p<=C}return!1;case"notBetween":if(o&&2===o.length){var b=o.map((function(e){return sn(new Date(String(e||"")))}));return w=b[0],C=b[1],p<w||p>C}return!0}}if("boolean"==typeof e){var y=Boolean(r);if("equals"===t)return e===y}if("in"===t||"notIn"===t){if(o&&Array.isArray(o)){var x=String(e),I=o.includes(x);return"in"===t?I:!I}return!1}var R=String(e).toLowerCase(),S=r?String(r).toLowerCase():"";switch(t){case"equals":return R===S;case"notEquals":return R!==S;default:return!0}}(e[n.accessor],n)}catch(e){return console.warn("Filter error for accessor ".concat(n.accessor,":"),e),!0}}))}))}),[n,r]),s=l((function(e){i((function(n){var t;return g(g({},n),((t={})[e.accessor]=e,t))}))}),[]),d=l((function(e){i((function(n){var t=g({},n);return delete t[e],t}))}),[]),u=l((function(){i({})}),[]);return{filters:r,filteredRows:c,handleApplyFilter:s,handleClearFilter:d,handleClearAllFilters:u}},un=function(n){var t=o(!1),r=t[0],i=t[1];return c((function(){i(!0)}),[]),r?e(hn,g({},n)):null},hn=function(t){var r=t.allowAnimations,s=void 0!==r&&r,d=t.cellUpdateFlash,u=void 0!==d&&d,h=t.columnEditorPosition,f=void 0===h?"right":h,p=t.columnEditorText,w=void 0===p?"Columns":p,C=t.columnReordering,b=void 0!==C&&C,y=t.columnResizing,x=void 0!==y&&y,S=t.defaultHeaders,E=t.editColumns,N=void 0!==E&&E,D=t.editColumnsInitOpen,H=void 0!==D&&D,A=t.expandAll,O=void 0===A||A,P=t.expandIcon,q=void 0===P?e(B,{className:"st-expand-icon"}):P,z=t.height,U=t.hideFooter,j=void 0!==U&&U,Y=t.nextIcon,G=void 0===Y?e(B,{className:"st-next-prev-icon"}):Y,K=t.onCellEdit,X=t.onColumnOrderChange,V=t.onGridReady,J=t.onNextPage,$=t.prevIcon,Q=void 0===$?e(L,{className:"st-next-prev-icon"}):$,Z=t.rowGrouping,_=t.rowHeight,ee=void 0===_?32:_,ne=t.rowIdAccessor,te=t.rows,re=t.rowsPerPage,oe=void 0===re?10:re,ie=t.selectableCells,ae=void 0!==ie&&ie,le=t.selectableColumns,ce=void 0!==le&&le,se=t.shouldPaginate,de=void 0!==se&&se,ue=t.sortDownIcon,he=void 0===ue?e(rn,{className:"st-header-icon"}):ue,fe=t.sortUpIcon,ve=void 0===fe?e(on,{className:"st-header-icon"}):fe,pe=t.tableRef,me=t.theme,ge=void 0===me?"light":me,we=t.useHoverRowBackground,Ce=void 0===we||we,be=t.useOddEvenRowBackground,ye=void 0===be||be,xe=t.useOddColumnBackground,Ie=void 0!==xe&&xe;Ie&&(ye=!1);var Re=i(null),Se=i(S),Ee=i(null),Ne=i(null),ke=i(null),We=i(null),Fe=i(null),De=o(1),Me=De[0],He=De[1],Te=o(0),Le=Te[0],Be=Te[1],Ae=o(0),Oe=Ae[0],Pe=Ae[1],qe=o(0),ze=qe[0],Ue=qe[1],je=o(0),Ye=je[0],Ge=je[1],Ve=o(0),Je=Ve[0],Qe=Ve[1],Ze=o(new Set),_e=Ze[0],en=Ze[1],nn=dn({rows:te}),ln=nn.filters,sn=nn.filteredRows,un=nn.handleApplyFilter,hn=nn.handleClearFilter,fn=nn.handleClearAllFilters,vn=$e({headers:Se.current,tableRows:sn}),pn=vn.sort,mn=vn.sortedRows,gn=vn.hiddenColumns,wn=vn.setHiddenColumns,Cn=vn.updateSort;c((function(){null==V||V()}),[V]);var bn=a((function(){if(!de)return mn;var e=(Me-1)*oe,n=e+oe;return mn.slice(e,n)}),[Me,oe,de,mn]),yn=a((function(){return Z&&0!==Z.length?W({rows:bn,rowGrouping:Z,rowIdAccessor:ne,expandedRows:_e,expandAll:O}):bn.map((function(e,n){return{row:e,depth:0,groupingKey:void 0,position:n,isLastGroupRow:!1}}))}),[bn,Z,ne,_e,O]),xn=function(e){var n=e.height,t=e.rowHeight;return a((function(){var e;if(!n)return window.innerHeight-t;var r=document.querySelector(".simple-table-root"),o=0;if(n.endsWith("px"))o=parseInt(n,10);else if(n.endsWith("vh")){var i=parseInt(n,10);o=window.innerHeight*i/100}else if(n.endsWith("%")){var a=parseInt(n,10);o=((null===(e=null==r?void 0:r.parentElement)||void 0===e?void 0:e.clientHeight)||window.innerHeight)*a/100}else o=window.innerHeight;return Math.max(0,o-t)}),[n,t])}({height:z,rowHeight:ee}),In=a((function(){return function(e){var n=e.bufferRowCount,t=e.contentHeight,r=e.tableRows,o=e.rowHeight,i=e.scrollTop,a=o+1,l=Math.max(0,i-a*n),c=i+t+a*n,s=Math.max(0,Math.floor(l/a)),d=Math.min(r.length,Math.ceil(c/a));return r.slice(s,d)}({bufferRowCount:5,contentHeight:xn,tableRows:yn,rowHeight:ee,scrollTop:Ye})}),[xn,ee,yn,Ye]),Rn=v((function(e){return e+1}),0)[1],Sn=function(e){var n=e.selectableCells,t=e.headers,r=e.visibleRows,s=e.rowIdAccessor,d=o(new Set),u=d[0],h=d[1],f=o(new Set),v=f[0],p=f[1],m=o(null),g=m[0],w=m[1],C=o(null),b=C[0],y=C[1],x=i(!1),I=i(null),S=a((function(){return t.flatMap(R)}),[t]),E=l((function(){var e=S.filter((function(e){return!e.hide})),n=new Map;e.forEach((function(e,t){n.set(t,e.accessor)}));var t=Array.from(u).reduce((function(e,t){var o,i=t.split("-").map(Number),a=i[0],l=i[1];e[a]||(e[a]=[]);var c=n.get(l);return c&&(null===(o=r[a])||void 0===o?void 0:o.row)?e[a][l]=r[a].row[c]:e[a][l]="",e}),{}),o=Object.values(t).map((function(e){return Object.values(e).join("\t")})).join("\n");u.size>0&&navigator.clipboard.writeText(o)}),[S,u,r]),N=l((function(e,n){for(var t=new Set,o=Math.min(e.rowIndex,n.rowIndex),i=Math.max(e.rowIndex,n.rowIndex),a=Math.min(e.colIndex,n.colIndex),l=Math.max(e.colIndex,n.colIndex),c=o;c<=i;c++)for(var d=a;d<=l;d++)if(c>=0&&c<r.length){var u=k(r[c].row,c,s);t.add(F({colIndex:d,rowIndex:c,rowId:u}))}p(new Set),w(null),h(t)}),[r,s,p,w,h]),W=l((function(e){if(e.rowIndex>=0&&e.rowIndex<r.length&&e.colIndex>=0&&e.colIndex<S.length){var n=F(e);p(new Set),w(null),h(new Set([n])),y(e)}}),[S.length,r.length,p,w,h,y]),D=l((function(e,n){void 0===n&&(n=!1),h(new Set),y(null),p((function(t){var r=new Set(n?t:[]);return e.forEach((function(e){return r.add(e)})),r})),e.length>0&&w(e[e.length-1])}),[h,y,p,w]);c((function(){var e=function(e){var t;if(n&&b){var o=b.rowIndex,i=b.colIndex,a=b.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if(k(null===(t=r[o])||void 0===t?void 0:t.row,o,s)!==a){var l=r.findIndex((function(e,n){return k(e.row,n,s)===a}));if(-1===l)return;o=l}if("ArrowUp"===e.key){if(e.preventDefault(),o>0){var c=k(r[o-1].row,o-1,s);W({rowIndex:o-1,colIndex:i,rowId:c})}}else"ArrowDown"===e.key?(e.preventDefault(),o<r.length-1&&(c=k(r[o+1].row,o+1,s),W({rowIndex:o+1,colIndex:i,rowId:c}))):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),i>0&&(c=k(r[o].row,o,s),W({rowIndex:o,colIndex:i-1,rowId:c}))):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),i<S.length-1&&(c=k(r[o].row,o,s),W({rowIndex:o,colIndex:i+1,rowId:c}))):"Escape"===e.key&&(h(new Set),p(new Set),w(null),I.current=null,y(null))}else E()}};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[E,S.length,b,s,N,W,n,r]);var M=l((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=F({colIndex:n,rowIndex:t,rowId:r}),i=u.has(o),a=v.has(n);return i||a}),[u,v]),H=l((function(e){var n=e.colIndex,t=e.rowIndex,o=e.rowId,i=[],a=r[t-1]?k(r[t-1].row,t-1,s):null,l=r[t+1]?k(r[t+1].row,t+1,s):null,c=null!==a?{colIndex:n,rowIndex:t-1,rowId:a}:null,d=null!==l?{colIndex:n,rowIndex:t+1,rowId:l}:null,u={colIndex:n-1,rowIndex:t,rowId:o},h={colIndex:n+1,rowIndex:t,rowId:o};return(!c||!M(c)||v.has(n)&&0===t)&&i.push("st-selected-top-border"),(!d||!M(d)||v.has(n)&&t===r.length-1)&&i.push("st-selected-bottom-border"),M(u)||i.push("st-selected-left-border"),M(h)||i.push("st-selected-right-border"),i.join(" ")}),[M,r,v,s]),T=a((function(){return b?function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return n===b.rowIndex&&t===b.colIndex&&r===b.rowId}:function(){return!1}}),[b]);return{getBorderClass:H,handleMouseDown:function(e){var t=e.colIndex,r=e.rowIndex,o=e.rowId;n&&(x.current=!0,I.current={rowIndex:r,colIndex:t,rowId:o},setTimeout((function(){p(new Set),w(null);var e=F({colIndex:t,rowIndex:r,rowId:o});h(new Set([e])),y({rowIndex:r,colIndex:t,rowId:o})}),0))},handleMouseOver:function(e){var t=e.colIndex,o=e.rowIndex;if(e.rowId,n&&x.current&&I.current){for(var i=new Set,a=Math.min(I.current.rowIndex,o),l=Math.max(I.current.rowIndex,o),c=Math.min(I.current.colIndex,t),d=Math.max(I.current.colIndex,t),u=a;u<=l;u++)for(var f=c;f<=d;f++)if(u>=0&&u<r.length){var v=k(r[u].row,u,s);i.add(F({colIndex:f,rowIndex:u,rowId:v}))}h(i)}},handleMouseUp:function(){x.current=!1},isInitialFocusedCell:T,isSelected:M,lastSelectedColumnIndex:g,selectColumns:D,selectedCells:u,selectedColumns:v,setInitialFocusedCell:y,setSelectedCells:h,setSelectedColumns:p}}({selectableCells:ae,headers:Se.current,visibleRows:In,rowIdAccessor:ne}),En=Sn.getBorderClass,Nn=Sn.handleMouseDown,kn=Sn.handleMouseOver,Wn=Sn.handleMouseUp,Fn=Sn.isInitialFocusedCell,Dn=Sn.isSelected,Mn=Sn.selectColumns,Hn=Sn.selectedCells,Tn=Sn.selectedColumns,Ln=Sn.setInitialFocusedCell,Bn=Sn.setSelectedCells,An=Sn.setSelectedColumns,On=l((function(e,n){Cn(e,n)}),[Cn]),Pn=l((function(e){Se.current=e,Rn()}),[]);!function(e){var n=e.selectableColumns,t=e.selectedCells,r=e.selectedColumns,o=e.setSelectedCells,i=e.setSelectedColumns;c((function(){var e=function(e){var a=e.target;a.closest(".st-cell")||n&&(a.classList.contains("st-header-cell")||a.classList.contains("st-header-label"))||(t.size>0&&o(new Set),r.size>0&&i(new Set))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[n,t,r,o,i])}({selectableColumns:ce,selectedCells:Hn,selectedColumns:Tn,setSelectedCells:Bn,setSelectedColumns:An}),m((function(){if(Fe.current){var e=Fe.current.offsetWidth-Fe.current.clientWidth;Qe(e)}}),[]),function(e){var n=e.forceUpdate,t=e.tableBodyContainerRef,r=e.setScrollbarWidth;m((function(){var e=function(){if(n(),t.current){var e=t.current.offsetWidth-t.current.clientWidth;r(e)}};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[n,t,r])}({forceUpdate:Rn,tableBodyContainerRef:Fe,setScrollbarWidth:Qe});var qn=i(new Map);return c((function(){pe&&(pe.current={updateData:function(e){var n=e.accessor,t=e.rowIndex,r=e.newValue,o=null==te?void 0:te[t];if(o){var i=k(o,t,ne),a=I({rowId:i,accessor:n}),l=qn.current.get(a);l&&l.updateContent(r),void 0!==o[n]&&(o[n]=r)}}})}),[pe,te,ne]),e(M,g({value:{allowAnimations:s,cellRegistry:qn.current,cellUpdateFlash:u,columnReordering:b,columnResizing:x,draggedHeaderRef:Re,editColumns:N,expandIcon:q,expandedRows:_e,filters:ln,tableRows:yn,forceUpdate:Rn,getBorderClass:En,handleApplyFilter:un,handleClearFilter:hn,handleClearAllFilters:fn,handleMouseDown:Nn,handleMouseOver:kn,headersRef:Se,hiddenColumns:gn,hoveredHeaderRef:Ee,isInitialFocusedCell:Fn,isSelected:Dn,mainBodyRef:Ne,nextIcon:G,onCellEdit:K,onColumnOrderChange:X,onSort:On,onTableHeaderDragEnd:Pn,pinnedLeftRef:ke,pinnedRightRef:We,prevIcon:Q,rowGrouping:Z,rowHeight:ee,rowIdAccessor:ne,scrollbarWidth:Je,selectColumns:Mn,selectableColumns:ce,setExpandedRows:en,setInitialFocusedCell:Ln,setMainBodyWidth:Be,setPinnedLeftWidth:Pe,setPinnedRightWidth:Ue,setSelectedCells:Bn,setSelectedColumns:An,shouldPaginate:de,sortDownIcon:he,sortUpIcon:ve,tableBodyContainerRef:Fe,theme:ge,useHoverRowBackground:Ce,useOddColumnBackground:Ie,useOddEvenRowBackground:ye}},{children:e("div",g({className:"simple-table-root st-wrapper theme-".concat(ge),style:z?{height:z}:{}},{children:e(an,{children:n("div",g({className:"st-wrapper-container"},{children:[e(cn,{}),n("div",g({className:"st-content-wrapper",onMouseUp:Wn,onMouseLeave:Wn},{children:[e(Ke,{tableRows:yn,pinnedLeftWidth:Oe,pinnedRightWidth:ze,setScrollTop:Ge,sort:pn,visibleRows:In}),e(tn,{columnEditorText:w,editColumns:N,editColumnsInitOpen:H,headers:Se.current,hiddenColumns:gn,position:f,setHiddenColumns:wn})]})),e(Xe,{mainBodyRef:Ne,mainBodyWidth:Le,pinnedLeftWidth:Oe,pinnedRightWidth:ze,setMainBodyWidth:Be,tableBodyContainerRef:Fe}),e(T,{currentPage:Me,hideFooter:j,onPageChange:He,onNextPage:J,shouldPaginate:de,totalPages:Math.ceil(sn.length/oe)})]}))})}))}))};export{un as SimpleTable};
|
|
1
|
+
import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import r,{useState as o,useRef as i,useMemo as a,useCallback as l,useEffect as c,createContext as s,useContext as d,forwardRef as u,Fragment as h,cloneElement as f,useReducer as v,createRef as p,useLayoutEffect as m}from"react";var g=function(){return g=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},g.apply(this,arguments)};function w(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function l(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,l)}c((r=r.apply(e,n||[])).next())}))}function C(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(c){return function(l){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=n.call(e,i)}catch(e){l=[6,e],r=0}finally{t=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,c])}}}function y(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var b=function(e){var n=e.accessor,t=e.rowIndex;return"cell-".concat(n,"-").concat(t)},x=function(e){var n=e.hiddenColumns,t=e.header,r=e.pinned;return n[t.accessor]?null:!r&&!t.pinned||t.pinned===r||null},I=function(e){var n=e.rowId,t=e.accessor;return"".concat(n,"-").concat(t)},S=function(e){return e.hide?[]:e.children&&0!==e.children.length?e.children.flatMap((function(e){return S(e)})):[e]},R=function(e){if(e.hide)return 0;if("number"==typeof e.width)return e.width;if("string"==typeof e.width&&e.width.endsWith("px"))return parseFloat(e.width);var n=document.getElementById(b({accessor:e.accessor,rowIndex:0}));return(null==n?void 0:n.offsetWidth)||150},E=function(e){var n,t=e.width;"string"==typeof t&&t.includes("fr")&&(e.width=(null===(n=document.getElementById(b({accessor:e.accessor,rowIndex:0})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.forEach((function(e){E(e)}))},N=function(e){return"number"==typeof e.minWidth?e.minWidth:40},k=function(e,n,t){return t&&void 0!==e[t]?e[t]:n},F=function(e){var n=e.depth,t=void 0===n?0:n,r=e.expandAll,o=void 0!==r&&r,i=e.expandedRows,a=e.rowGrouping,l=void 0===a?[]:a,c=e.rowIdAccessor,s=e.rows,d=[],u=function(e,n,t){void 0===t&&(t=0);var r=t;return e.forEach((function(t,a){var s=k(t,a,c),h=l[n],f=0===n&&a===e.length-1;d.push({row:t,depth:n,groupingKey:h,position:r,isLastGroupRow:f}),r++;var v=String(s);if((o?!i.has(v):i.has(v))&&n<l.length){var p=function(e,n){var t=e[n];return Array.isArray(t)?t:[]}(t,h);p.length>0&&(r=u(p,n+1,r))}})),r};return u(s,t),d},W=function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return"".concat(n,"-").concat(t,"-").concat(r)},D=s(void 0),M=function(n){var t=n.children,r=n.value;return e(D.Provider,g({value:r},{children:t}))},T=function(){var e=d(D);if(void 0===e)throw new Error("useTableContext must be used within a TableProvider");return e},H=function(t){var r=t.currentPage,i=t.hideFooter,a=t.onPageChange,l=t.onNextPage,c=t.shouldPaginate,s=t.totalPages,d=T(),u=d.nextIcon,h=d.prevIcon,f=o(!0),v=f[0],p=f[1],m=!(r>1),y=!(r<s)&&!l||!v&&r===s;if(i||!c)return null;var b=function(){if(s<=15)return Array.from({length:s},(function(e,n){return n+1}));var e,n,t=[],o=15;if(r<=Math.ceil(7.5))e=1,n=14;else if(r>=s-Math.floor(7.5))e=Math.max(1,s-o+1),n=s;else{var i=Math.floor(7);e=r-i,n=r+(o-i-1)}for(var a=e;a<=n;a++)t.push(a);return n<s-1&&(t.push(-1),t.push(s)),t}();return n("div",g({className:"st-footer"},{children:[e("button",g({className:"st-next-prev-btn ".concat(m?"disabled":""),onClick:function(){var e=r-1;e>=1&&a(e)},disabled:m},{children:h})),e("button",g({className:"st-next-prev-btn ".concat(y?"disabled":""),onClick:function(){return w(void 0,void 0,void 0,(function(){var e,n;return C(this,(function(t){switch(t.label){case 0:return e=r===s,n=r+1,l&&e?[4,l(r)]:[3,2];case 1:if(!t.sent())return p(!1),[2];t.label=2;case 2:return(n<=s||l)&&a(n),[2]}}))}))},disabled:y},{children:u})),b.map((function(n,t){return n<0?e("span",g({className:"st-page-ellipsis"},{children:"..."}),"ellipsis-".concat(n)):e("button",g({onClick:function(){return function(e){e>=1&&e<=s&&a(e)}(n)},className:"st-page-btn ".concat(r===n?"active":"")},{children:n}),"page-".concat(n))}))]}))},L=function(n){var t=n.className;return e("svg",g({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},B=function(n){var t=n.className;return e("svg",g({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},A=function(e){return e.position*(e.rowHeight+1)-1},O=function(e){return e.position*(e.rowHeight+1)},P=function(n){var t=n.children,r=n.onClose,a=n.open,l=n.overflow,s=void 0===l?"auto":l,d=n.setOpen,u=n.width,h=n.containerRef,f=n.positioning,v=void 0===f?"fixed":f,p=T().mainBodyRef,m=i(null),w=i(null),C=o("bottom-left"),y=C[0],b=C[1],x=o({}),I=x[0],S=x[1],R=o(!1),E=R[0],N=R[1];return c((function(){a&&m.current?(N(!1),!w.current&&m.current.parentElement&&(w.current=m.current.parentElement),requestAnimationFrame((function(){if(m.current&&w.current){var e,n=m.current,t=w.current.getBoundingClientRect(),r=n.offsetHeight,o=u||n.offsetWidth,i=(e=(null==h?void 0:h.current)?h.current.getBoundingClientRect():(null==p?void 0:p.current)?p.current.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0,width:window.innerWidth,height:window.innerHeight,x:0,y:0,toJSON:function(){}}).bottom-t.bottom,a=t.top-e.top,l="bottom",c={};(r>i&&r<=a||r>i&&a>i)&&(l="top");var s="left";o>e.right-t.right+t.width&&(s="right"),"fixed"===v?("bottom"===l?c.top=t.bottom+4:c.bottom=window.innerHeight-t.top+4,"left"===s?c.left=t.left:c.right=window.innerWidth-t.right):("bottom"===l?c.top=t.height+4:c.bottom=t.height+4,"left"===s?c.left=0:c.right=0),b("".concat(l,"-").concat(s)),S(c),N(!0)}}))):a||N(!1)}),[a,u,h,p,v]),c((function(){var e=function(e){if(a&&m.current){var n=e.target;m.current&&!m.current.contains(n)&&(d(!1),null==r||r())}};return a&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}}),[a,r,d]),c((function(){var e=function(e){m.current&&!m.current.contains(e.target)&&(d(!1),null==r||r())};return a&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[r,a,d]),c((function(){var e=function(e){"Escape"===e.key&&a&&(d(!1),null==r||r())};return a&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[r,a,d]),a?e("div",g({ref:m,className:"st-dropdown-content st-dropdown-".concat(y),onClick:function(e){return e.stopPropagation()},style:g(g({position:v,width:u?"".concat(u,"px"):"auto",visibility:E?"visible":"hidden"},I),{overflow:s})},{children:t})):null},q=function(n){var t=n.children,r=n.onClick,o=n.isSelected,i=void 0!==o&&o,a=n.disabled,l=void 0!==a&&a,c=n.className,s=void 0===c?"":c;return e("div",g({className:"st-dropdown-item ".concat(i?"selected":""," ").concat(l?"disabled":""," ").concat(s),onClick:function(){!l&&r&&r()},role:"option","aria-selected":i,"aria-disabled":l},{children:t}))},z=function(t){var r=t.onBlur,i=t.onChange,a=t.open,l=t.setOpen,c=t.value,s=o(c),d=s[0],u=s[1],h=function(e){u(e),i(e),l(!1),r()};return n(P,g({open:a,onClose:function(){r()},setOpen:l,width:120},{children:[e(q,g({isSelected:!0===d,onClick:function(){return h(!0)}},{children:"True"})),e(q,g({isSelected:!1===d,onClick:function(){return h(!1)}},{children:"False"}))]}))},U=function(n){var t=n.defaultValue,r=n.onBlur,o=n.onChange,a=i(null);return e("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=t?t:"",onBlur:r,onChange:function(e){var n=e.target.value;o(n)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||r()},onMouseDown:function(e){e.stopPropagation()}})},j=function(n){var t=n.defaultValue,r=n.onBlur,o=n.onChange,a=i(null);return e("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:t.toString(),onBlur:r,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&o(n)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||r()},onMouseDown:function(e){e.stopPropagation()}})},Y=function(r){var i,a,l=r.onChange,c=r.onClose,s=r.value,d=T(),u=d.nextIcon,h=d.prevIcon,f=o(s||new Date),v=f[0],p=f[1],m=o("days"),w=m[0],C=m[1],y=function(e,n){return new Date(e,n+1,0).getDate()};return n("div",g({className:"st-datepicker"},{children:[n("div",g({className:"st-datepicker-header"},{children:["days"===w&&n(t,{children:[e("button",g({onClick:function(){p(new Date(v.getFullYear(),v.getMonth()-1,1))},className:"st-datepicker-nav-btn"},{children:h})),n("div",g({className:"st-datepicker-header-label",onClick:function(){return C("months")}},{children:[(a=v,a.toLocaleString("default",{month:"long"}))," ",v.getFullYear()]})),e("button",g({onClick:function(){p(new Date(v.getFullYear(),v.getMonth()+1,1))},className:"st-datepicker-nav-btn"},{children:u}))]}),"months"===w&&e("div",g({className:"st-datepicker-header-label",onClick:function(){return C("years")}},{children:v.getFullYear()})),"years"===w&&e("div",g({className:"st-datepicker-header-label"},{children:"Select Year"}))]})),n("div",g({className:"st-datepicker-grid st-datepicker-".concat(w,"-grid")},{children:["days"===w&&function(){var n=[],t=v.getFullYear(),r=v.getMonth(),o=y(t,r),i=function(e,n){return new Date(e,n,1).getDay()}(t,r),a=y(t,r-1);["Su","Mo","Tu","We","Th","Fr","Sa"].forEach((function(t,r){n.push(e("div",g({className:"st-datepicker-weekday"},{children:t}),"header-".concat(r)))}));for(var d=function(t){var r=a-i+t+1;n.push(e("div",g({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(v.getFullYear(),v.getMonth()-1,e);p(n),l(n),null==c||c()}(r)}},{children:r}),"prev-".concat(r)))},u=0;u<i;u++)d(u);for(var h=function(o){var i=o===(new Date).getDate()&&r===(new Date).getMonth()&&t===(new Date).getFullYear(),a=o===new Date(s).getDate()&&r===new Date(s).getMonth()&&t===new Date(s).getFullYear();n.push(e("div",g({className:"st-datepicker-day ".concat(i?"today":""," ").concat(a?"selected":""),onClick:function(){return function(e){var n=new Date(v.getFullYear(),v.getMonth(),e);p(n),l(n),null==c||c()}(o)}},{children:o}),"day-".concat(o)))},f=1;f<=o;f++)h(f);var m=35-(i+o),w=function(t){n.push(e("div",g({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(v.getFullYear(),v.getMonth()+1,e);p(n),l(n),null==c||c()}(t)}},{children:t}),"next-".concat(t)))};for(f=1;f<=m;f++)w(f);return n}(),"months"===w&&(i=[],Array.from({length:12},(function(e,n){return new Date(2e3,n,1).toLocaleString("default",{month:"short"})})).forEach((function(n,t){var r=t===v.getMonth();i.push(e("div",g({className:"st-datepicker-month ".concat(r?"selected":""),onClick:function(){return function(e){p(new Date(v.getFullYear(),e,1)),C("days")}(t)}},{children:n}),"month-".concat(t)))})),i),"years"===w&&function(){for(var n=[],t=v.getFullYear(),r=t-6,o=function(r){var o=r===t;n.push(e("div",g({className:"st-datepicker-year ".concat(o?"selected":""),onClick:function(){return function(e){p(new Date(e,v.getMonth(),1)),C("months")}(r)}},{children:r}),"year-".concat(r)))},i=r;i<r+12;i++)o(i);return n}()]})),e("div",g({className:"st-datepicker-footer"},{children:e("button",g({className:"st-datepicker-today-btn",onClick:function(){var e=new Date;p(e),l(e),null==c||c()}},{children:"Today"}))}))]}))},K=function(e){if(!e)return new Date;var n=e.toString().split("-").map(Number),t=n[0],r=n[1],o=n[2],i=new Date;return i.setFullYear(t),i.setMonth(r-1),i.setDate(o),isNaN(i.getTime())?new Date:i},G=function(n){var t=n.onBlur,r=n.onChange,o=n.open,i=n.setOpen,a=n.value;c((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);var l=function(){t()};return e(P,g({open:o,onClose:l,setOpen:i,width:280},{children:e(Y,{value:K(a),onChange:function(e){var n=e.toISOString().split("T")[0];r(n),i(!1),t()},onClose:l})}))},X=function(n){var t=n.onBlur,r=n.onChange,i=n.open,a=n.options,l=n.setOpen,c=n.value,s=o(c||""),d=s[0],u=s[1];return e(P,g({open:i,onClose:function(){t()},setOpen:l,width:150},{children:e("div",g({className:"st-enum-dropdown-content"},{children:a.map((function(n){return e(q,g({isSelected:d===n.value,onClick:function(){return e=n.value,u(e),r(e),l(!1),void t();var e}},{children:n.label}),n.value)}))}))}))},V=function(n){var t=n.enumOptions,r=void 0===t?[]:t,o=n.onChange,i=n.setIsEditing,a=n.type,l=void 0===a?"string":a,c=n.value,s=function(){i(!1)};if("boolean"===l&&"boolean"==typeof c)return e(z,{onBlur:s,onChange:function(e){return o(e)},open:!0,setOpen:i,value:c});if("date"===l)return e(G,{onBlur:s,onChange:o,open:!0,setOpen:i,value:c});if("enum"===l)return e(X,{onBlur:s,onChange:o,open:!0,options:r,setOpen:i,value:"string"==typeof c?c:""});if("number"===l&&"number"==typeof c)return e(j,{defaultValue:c,onBlur:s,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}});var d=null==c?"":String(c);return e(U,{defaultValue:d,onBlur:s,onChange:o})},J=0,$=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();(0===J||o-J>=r)&&(J=o,n(t))}},Q=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Q);var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=Q(e[t]));return n},Z=Date.now(),_={screenX:0,screenY:0},ee=function(e,n,t){void 0===t&&(t=[]);for(var r=0;r<e.length;r++){var o=e[r];if(o.accessor===n)return y(y([],t,!0),[r],!1);if(o.children&&o.children.length>0){var i=ee(o.children,n,y(y([],t,!0),[r],!1));if(i)return i}}return null};var ne=function(e){var n,t,r=e.draggedHeaderRef,o=e.headersRef,a=e.hoveredHeaderRef,l=e.onColumnOrderChange,s=e.onTableHeaderDragEnd,d=(n=o.current,t=i(n),c((function(){JSON.stringify(t.current)!==JSON.stringify(n)&&(t.current=n)}),[n]),t.current);return{handleDragStart:function(e){r.current=e,Z=Date.now()},handleDragOver:function(e){var n,t,i=e.event,l=e.hoveredHeader;if(i.preventDefault(),o.current){var c=i.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),u=i.screenX,h=i.screenY,f=Math.sqrt(Math.pow(u-_.screenX,2)+Math.pow(h-_.screenY,2));a.current=l;var v=o.current,p=ee(v,(null===(n=r.current)||void 0===n?void 0:n.accessor)||""),m=ee(v,l.accessor);if(p&&m){var g=p.length,w=m.length,C=m;if(g!==w){var y=w-g;y>0&&(C=m.slice(0,-y))}var b=function(e,n,t){var r=Q(e),o=!1;function i(e,n){for(var t=e,r=0;r<n.length-1;r++)t=t[n[r]].children;return t[n[n.length-1]]}function a(e,n,t){for(var r=e,i=0;i<n.length-1;i++){if(!r[n[i]].children){o=!0;break}r=r[n[i]].children}r[n[n.length-1]]=t}var l=i(r,n);return a(r,n,i(r,t)),a(r,t,l),{newHeaders:r,emergencyBreak:o}}(v,p,C),x=b.newHeaders,I=b.emergencyBreak;if(!(c||l.accessor===(null===(t=r.current)||void 0===t?void 0:t.accessor)||null===r.current||f<10||0===p.length||0===C.length||JSON.stringify(x)===JSON.stringify(o.current)||I)){var S=Date.now();JSON.stringify(x)===JSON.stringify(d)&&(S-Z<1500||f<40)||(Z=S,_={screenX:u,screenY:h},s(x))}}}},handleDragEnd:function(){r.current=null,a.current=null,null==l||l(o.current)}}},te=function(e){var n=e.content,t=e.header;return"boolean"==typeof n?n?"True":"False":"date"===t.type&&null!==n&&("string"==typeof n||"number"==typeof n||"object"==typeof n&&n instanceof Date)?new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):n},re=u((function(t,r){var a=t.borderClass,s=t.colIndex,d=t.header,u=t.isHighlighted,h=t.isInitialFocused,f=t.nestedIndex,v=t.rowIndex,p=t.visibleRow,m=T(),w=m.cellRegistry,C=m.cellUpdateFlash,y=m.draggedHeaderRef,x=m.expandIcon,S=m.expandedRows,R=m.handleMouseDown,E=m.handleMouseOver,N=m.headersRef,F=m.hoveredHeaderRef,W=m.isCopyFlashing,D=m.isWarningFlashing,M=m.onCellEdit,H=m.onTableHeaderDragEnd,L=m.rowGrouping,B=m.rowIdAccessor,A=m.setExpandedRows,O=m.theme,P=m.useOddColumnBackground,q=p.depth,z=p.row,U=o(z[d.accessor]),j=U[0],Y=U[1],K=o(!1),G=K[0],X=K[1],J=o(!1),Q=J[0],Z=J[1],_=i(null),ee=k(z,v,B),re=L&&L[q],oe=!!re&&function(e,n){if(!n)return!1;var t=e[n];return Array.isArray(t)&&t.length>0}(z,re),ie=S.has(String(ee)),ae=W({rowIndex:v,colIndex:s,rowId:ee}),le=D({rowIndex:v,colIndex:s,rowId:ee}),ce=ne({draggedHeaderRef:y,headersRef:N,hoveredHeaderRef:F,onTableHeaderDragEnd:H}).handleDragOver,se=$(),de="cell-".concat(v,"-").concat(s),ue=I({rowId:ee,accessor:d.accessor});c((function(){if(w){var e="".concat(ee,"-").concat(d.accessor);return w.set(e,{updateContent:function(e){j!==e?(Y(e),C&&(Z(!0),_.current&&clearTimeout(_.current),_.current=setTimeout((function(){Z(!1)}),800))):Y(e)}}),function(){w.delete(e),_.current&&clearTimeout(_.current)}}}),[w,C,ee,d.accessor,j]),c((function(){if(Q){var e=setTimeout((function(){Z(!1)}),850);return function(){return clearTimeout(e)}}}),[Q]),c((function(){Y(z[d.accessor])}),[z,d.accessor]);var he="boolean"===d.type||"date"===d.type||"enum"===d.type,fe=Boolean(null==d?void 0:d.isEditable),ve="st-cell ".concat(q>0&&d.expandable?"st-cell-depth-".concat(q):""," ").concat(u?h?"st-cell-selected-first ".concat(a):"st-cell-selected ".concat(a):""," ").concat(fe?"clickable":""," ").concat(Q?h?"st-cell-updating-first":"st-cell-updating":""," ").concat(ae?h?"st-cell-copy-flash-first":"st-cell-copy-flash":""," ").concat(le?h?"st-cell-warning-flash-first":"st-cell-warning-flash":""," ").concat(P?f%2==0?"even-column":"odd-column":""),pe=l((function(e){Y(e),z[d.accessor]=e,null==M||M({accessor:d.accessor,newValue:e,row:z,rowIndex:v})}),[d.accessor,M,z,v]),me=l((function(){A((function(e){var n=new Set(e),t=String(ee);return n.has(t)?n.delete(t):n.add(t),n}))}),[ee,A]);return G&&!he?e("div",g({className:"st-cell-editing",id:b({accessor:d.accessor,rowIndex:v+1}),onMouseDown:function(e){return e.stopPropagation()},onKeyDown:function(e){return e.stopPropagation()}},{children:e(V,{enumOptions:d.enumOptions,onChange:pe,setIsEditing:X,type:d.type,value:j})})):n("div",g({className:ve,id:de,onDoubleClick:function(){return d.isEditable&&X(!0)},onMouseDown:function(){G||R({rowIndex:v,colIndex:s,rowId:ee})},onMouseOver:function(){G||E({rowIndex:v,colIndex:s,rowId:ee})},onDragOver:function(e){return se({callback:ce,callbackProps:{event:e,hoveredHeader:d},limit:50})},onKeyDown:function(e){G||"F2"!==e.key&&"Enter"!==e.key||!d.isEditable||G||(e.preventDefault(),X(!0))},ref:r,"data-row-index":v,"data-col-index":s,"data-row-id":ee,"data-accessor":d.accessor},{children:[d.expandable&&oe?e("div",g({className:"st-icon-container st-expand-icon-container ".concat(ie?"expanded":"collapsed"),onClick:me},{children:x})):null,e("span",g({className:"st-cell-content ".concat("right"===d.align?"right-aligned":"center"===d.align?"center-aligned":"left-aligned")},{children:e("span",{children:d.cellRenderer?d.cellRenderer({accessor:d.accessor,colIndex:s,row:z,theme:O}):te({content:j,header:d})})})),G&&he&&e(V,{enumOptions:d.enumOptions,onChange:pe,setIsEditing:X,type:d.type,value:j})]}),ue)})),oe=function(n){var r=n.columnIndexStart,o=n.columnIndices,i=n.headers,a=n.hiddenColumns,l=n.pinned,c=n.rowIndex,s=n.rowIndices,d=n.visibleRow,u=i.filter((function(e){return x({hiddenColumns:a,header:e,pinned:l})}));return e(t,{children:u.map((function(n,t){return e(ie,{columnIndices:o,header:n,headers:i,hiddenColumns:a,nestedIndex:t+(null!=r?r:0),pinned:l,rowIndex:c,rowIndices:s,visibleRow:d},b({accessor:n.accessor,rowIndex:c+1}))}))})},ie=function(n){var t=n.columnIndices,r=n.header,o=n.headers,i=n.hiddenColumns,a=n.nestedIndex,l=n.pinned,c=n.rowIndex,s=n.rowIndices,d=n.visibleRow,u=t[r.accessor],f=T(),v=f.getBorderClass,p=f.isSelected,m=f.isInitialFocusedCell,g=f.rowIdAccessor;if(r.children){var w=r.children.filter((function(e){return x({hiddenColumns:i,header:e,pinned:l})}));return e(h,{children:w.map((function(n){return e(ie,{columnIndices:t,header:n,headers:o,hiddenColumns:i,nestedIndex:a,pinned:l,rowIndex:c,rowIndices:s,visibleRow:d},b({accessor:n.accessor,rowIndex:c+1}))}))})}var C=k(d.row,c,g),y={rowIndex:c,colIndex:u,rowId:C},I=v(y),S=p(y),R=m(y);return e(re,{borderClass:I,colIndex:u,header:r,isHighlighted:S,isInitialFocused:R,nestedIndex:a,rowIndex:c,visibleRow:d},b({accessor:r.accessor,rowIndex:c+1}))},ae=function(n){var t=n.columnIndices,r=n.columnIndexStart,o=n.gridTemplateColumns,i=n.headers,a=n.hiddenColumns,l=n.hoveredIndex,c=n.index,s=n.pinned,d=n.rowHeight,u=n.rowIndices,h=n.setHoveredIndex,f=n.visibleRow,v=T().useHoverRowBackground,p=f.position;return e("div",g({className:"st-row ".concat(p%2==0?"even":"odd"," ").concat(l===c&&v?"hovered":""),onMouseEnter:function(){h(c)},style:{gridTemplateColumns:o,top:O({position:p,rowHeight:d}),height:"".concat(d,"px")}},{children:e(oe,{columnIndexStart:r,columnIndices:t,headers:i,hiddenColumns:a,pinned:s,rowIndex:p,rowIndices:u,visibleRow:f},c)}))},le=function(n){var t=n.displayStrongBorder,r=n.position,o=n.rowHeight,a=n.templateColumns,l=n.rowIndex,c=i(null);return e("div",g({className:"st-row-separator ".concat(t?"st-last-group-row":""),onMouseDown:function(e){if(void 0!==l){for(var n=e.currentTarget.getBoundingClientRect(),t=e.clientX-n.left,r=a.split(" ").map((function(e){if(e.includes("px"))return parseFloat(e);if(e.includes("fr")){var t=a.split(" ").filter((function(e){return e.includes("fr")})).length;return n.width/t}return 100})),o=0,i=0,s=0;s<r.length;s++){if(t<=o+r[s]){i=s;break}o+=r[s],i=s}var d="cell-".concat(l+1,"-").concat(i+1),u=document.getElementById(d);if(u){c.current=u;var h=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0});u.dispatchEvent(h)}}},onMouseUp:function(){if(c.current){var e=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0});c.current.dispatchEvent(e),c.current=null}},style:{gridTemplateColumns:a,top:A({position:r,rowHeight:o})}},{children:e("div",{style:{gridColumn:"1 / -1"}})}))},ce=s(void 0),se=["default"],de=function(e){var n=e.childRef,t=e.children,r=function(){var e=d(ce);if(!e)throw new Error("useScrollSyncContext must be used within a ScrollSyncProvider");return e}(),o=r.registerPane,i=r.unregisterPane;return c((function(){return n.current&&o(n.current,se),function(){n.current&&i(n.current,se)}}),[n,o,i]),f(t,{ref:function(e){n.current=e}})},ue=function(n){var r=n.condition,o=n.wrapper,i=n.children;return e(t,{children:r?o(i):e(t,{children:i})})},he=function(t){var r=t.columnIndexStart,o=t.columnIndices,i=t.headers,a=t.hiddenColumns,l=t.hoveredIndex,c=t.pinned,s=t.ref,d=t.rowHeight,u=t.rowIndices,f=t.setHoveredIndex,v=t.templateColumns,p=t.totalHeight,m=t.visibleRows,w=t.width,C=c?"st-body-pinned-".concat(c):"st-body-main";return e(ue,g({condition:!c,wrapper:function(n){return e(de,g({childRef:s},{children:n}))}},{children:e("div",g({className:C,ref:s,style:g({position:"relative",height:"".concat(p,"px"),width:w},!c&&{flexGrow:1})},{children:m.map((function(t,s){return n(h,{children:[0!==s&&e(le,{displayStrongBorder:t.isLastGroupRow,position:t.position,rowHeight:d,templateColumns:v,rowIndex:s-1}),e(ae,{columnIndexStart:r,columnIndices:o,gridTemplateColumns:v,headers:i,hiddenColumns:a,hoveredIndex:l,index:s,pinned:c,rowHeight:d,rowIndices:u,setHoveredIndex:f,visibleRow:t})]},t.position)}))}))}))};function fe(e){var n=e.headersRef,t=e.hiddenColumns,r=e.pinnedLeftColumns,o=e.pinnedRightColumns,i={},a=0,l=function(e,n){void 0===n&&(n=!1),n||a++,i[e.accessor]=a,e.children&&e.children.length>0&&e.children.filter((function(e){return x({hiddenColumns:t,header:e})})).forEach((function(e,n){l(e,0===n)}))};return r.forEach((function(e,n){l(e,0===n)})),n.current.filter((function(e){return!e.pinned&&x({hiddenColumns:t,header:e})})).forEach((function(e,n){var t=0===n&&0===r.length;l(e,t)})),o.forEach((function(e){l(e,!1)})),i}var ve=function(t){var r=t.headerContainerRef,l=t.mainTemplateColumns,s=t.pinnedLeftColumns,d=t.pinnedLeftTemplateColumns,u=t.pinnedLeftWidth,h=t.pinnedRightColumns,f=t.pinnedRightTemplateColumns,v=t.pinnedRightWidth,p=t.setScrollTop,m=t.tableRows,w=t.visibleRows,C=T(),y=C.headersRef,b=C.hiddenColumns,x=C.mainBodyRef,I=C.rowHeight,S=C.rowIdAccessor,R=C.scrollbarWidth,E=C.tableBodyContainerRef,N=o(null),F=N[0],W=N[1];!function(e){var n=e.headerContainerRef,t=e.mainSectionRef,r=e.scrollbarWidth,i=o(!1),a=i[0],l=i[1];c((function(){var e=null==n?void 0:n.current;if(a&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(r,"px")),function(){e.classList.remove("st-header-scroll-padding")}}),[n,a,r]),c((function(){var e=null==n?void 0:n.current,r=null==t?void 0:t.current;if(r&&e){var o=function(){if(r){var e=r.scrollHeight>r.clientHeight;l(e)}};o();var i=new ResizeObserver((function(){o()}));return i.observe(r),function(){r&&i.unobserve(r)}}}),[n,t])}({headerContainerRef:r,mainSectionRef:E,scrollbarWidth:R});var D=i(null),M=function(e){return e.length}(m),H=M*(I+1)-1,L=a((function(){return fe({headersRef:y,hiddenColumns:b,pinnedLeftColumns:s,pinnedRightColumns:h})}),[y,b,s,h]),B=a((function(){var e={};return w.forEach((function(n,t){var r=String(k(n.row,t,S));e[r]=t})),e}),[w,S]),A={columnIndices:L,headerContainerRef:r,headers:y.current,hiddenColumns:b,hoveredIndex:F,rowHeight:I,rowIndices:B,setHoveredIndex:W,visibleRows:w};return n("div",g({className:"st-body-container",onMouseLeave:function(){return W(null)},onScroll:function(e){var n=e.currentTarget.scrollTop;D.current&&cancelAnimationFrame(D.current),D.current=requestAnimationFrame((function(){p(n)}))},ref:E},{children:[s.length>0&&e(he,g({},A,{pinned:"left",templateColumns:d,totalHeight:H,width:u})),e(he,g({},A,{columnIndexStart:s.length,ref:x,templateColumns:l,totalHeight:H})),h.length>0&&e(he,g({},A,{columnIndexStart:s.length+l.length,pinned:"right",templateColumns:f,totalHeight:H,width:v}))]}))},pe=function(e){return void 0===e&&(e=0),e?e+1:0},me=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=e.setMainBodyWidth,i=e.setPinnedLeftWidth,a=e.setPinnedRightWidth,l=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=n.pinned,i=0;return t.forEach((function(e){e.hide||e.pinned!==o||(e.accessor===n.accessor?i+=r:S(e).forEach((function(e){e.hide||(e.accessor===n.accessor?i+=r:i+=R(e))})))})),n.pinned?pe(i):i}({header:n,headers:t,newWidth:r});"left"===n.pinned?i(l):"right"===n.pinned?a(l):n.pinned||o(l)},ge=function(e){var n=e.event,t=e.forceUpdate,r=e.gridColumnEnd,o=e.gridColumnStart,i=e.header,a=e.headersRef,l=e.setMainBodyWidth,c=e.setPinnedLeftWidth,s=e.setPinnedRightWidth,d=e.startWidth;n.preventDefault();var u="clientX"in n?n.clientX:n.touches[0].clientX,h="touches"in n;if(i&&!i.hide){var f=N(i),v=r-o>1,p=v?S(i):[i],m=function(e){var n="right"===i.pinned?u-e:e-u;if(v&&p.length>1)we({delta:n,header:i,headersRef:a,leafHeaders:p,minWidth:f,setMainBodyWidth:l,setPinnedLeftWidth:c,setPinnedRightWidth:s,startWidth:d});else{var r=Math.max(d+n,f);i.width=r,me({header:i,headers:a.current,newWidth:r,setMainBodyWidth:l,setPinnedLeftWidth:c,setPinnedRightWidth:s})}a.current.forEach((function(e){E(e)})),t()};if(h){var g=function(e){var n=e.touches[0];m(n.clientX)},w=function(){document.removeEventListener("touchmove",g),document.removeEventListener("touchend",w)};document.addEventListener("touchmove",g),document.addEventListener("touchend",w)}else{var C=function(e){m(e.clientX)},y=function(){document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",y)};document.addEventListener("mousemove",C),document.addEventListener("mouseup",y)}}},we=function(e){var n=e.delta,t=e.header,r=e.headersRef,o=e.leafHeaders,i=e.minWidth,a=e.setMainBodyWidth,l=e.setPinnedLeftWidth,c=e.setPinnedRightWidth,s=e.startWidth,d=o.reduce((function(e,n){return Math.min(e,N(n))}),40),u=o.reduce((function(e,n){return e+("number"==typeof n.width?n.width:150)}),0),h=Math.max(s+n,d);me({header:t,headers:r.current,newWidth:h,setMainBodyWidth:a,setPinnedLeftWidth:l,setPinnedRightWidth:c});var f=h-u;o.forEach((function(e){var n="number"==typeof e.width?e.width:150,t=f*(n/u),r=Math.max(n+t,i);e.width=r}))},Ce=function(n){var t=n.className,r=n.style;return e("svg",g({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:t,style:g({height:"1em"},r)},{children:e("path",{d:"M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"})}))},ye={equals:"Equals",notEquals:"Not equals",contains:"Contains",notContains:"Does not contain",startsWith:"Starts with",endsWith:"Ends with",greaterThan:"Greater than",lessThan:"Less than",greaterThanOrEqual:"Greater than or equal",lessThanOrEqual:"Less than or equal",between:"Between",notBetween:"Not between",before:"Before",after:"After",in:"Is one of",notIn:"Is not one of",isEmpty:"Is empty",isNotEmpty:"Is not empty"},be=function(e){switch(e){case"string":return["equals","notEquals","contains","notContains","startsWith","endsWith","isEmpty","isNotEmpty"];case"number":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","notBetween","isEmpty","isNotEmpty"];case"boolean":return["equals","isEmpty","isNotEmpty"];case"date":return["equals","notEquals","before","after","between","notBetween","isEmpty","isNotEmpty"];case"enum":return["in","notIn","isEmpty","isNotEmpty"];default:return["equals","notEquals","isEmpty","isNotEmpty"]}},xe=function(e){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(e)},Ie=function(e){return["between","notBetween","in","notIn"].includes(e)},Se=function(e){return["isEmpty","isNotEmpty"].includes(e)},Re=function(n){var t=n.children;return e("div",g({className:"st-filter-container"},{children:t}))},Ee=function(){return e("svg",g({className:"st-custom-select-arrow",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},Ne=function(t){var r=t.value,a=t.onChange,l=t.options,s=t.placeholder,d=void 0===s?"Select...":s,u=t.className,h=void 0===u?"":u,f=t.disabled,v=void 0!==f&&f,p=o(!1),m=p[0],w=p[1],C=o(-1),y=C[0],b=C[1],x=i(null),I=l.find((function(e){return e.value===r}));c((function(){var e=function(e){if(m)switch(e.key){case"ArrowDown":e.preventDefault(),b((function(e){return e<l.length-1?e+1:0}));break;case"ArrowUp":e.preventDefault(),b((function(e){return e>0?e-1:l.length-1}));break;case"Enter":e.preventDefault(),y>=0&&(a(l[y].value),w(!1),b(-1));break;case"Escape":e.preventDefault(),w(!1),b(-1)}};if(m)return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}}),[m,y,l,a]);return n("div",g({ref:x,className:"st-custom-select ".concat(h," ").concat(v?"st-custom-select-disabled":""," ").concat(m?"st-custom-select-open":"").trim()},{children:[n("button",g({type:"button",className:"st-custom-select-trigger",onClick:function(){if(!v)if(w(!m),m)b(-1);else{var e=l.findIndex((function(e){return e.value===r}));b(e>=0?e:0)}},disabled:v,"aria-haspopup":"listbox","aria-expanded":m,"aria-labelledby":"select-label"},{children:[e("span",g({className:"st-custom-select-value"},{children:I?I.label:d})),e(Ee,{})]})),e(P,g({open:m,setOpen:w,onClose:function(){w(!1),b(-1)},positioning:"absolute",overflow:"auto"},{children:e("div",g({className:"st-custom-select-options",role:"listbox"},{children:l.map((function(n,t){return e("div",g({className:"st-custom-select-option ".concat(n.value===r?"st-custom-select-option-selected":""," ").concat(t===y?"st-custom-select-option-focused":"").trim(),role:"option","aria-selected":n.value===r,onClick:function(){return e=n.value,a(e),w(!1),void b(-1);var e}},{children:n.label}),n.value)}))}))}))]}))},ke=function(n){var t=n.value,r=n.onChange,o=n.operators.map((function(e){return{value:e,label:ye[e]}}));return e("div",g({className:"st-filter-section"},{children:e(Ne,{value:t,onChange:function(e){r(e)},options:o})}))},Fe=function(n){var t=n.type,r=void 0===t?"text":t,o=n.value,i=n.onChange,a=n.placeholder,l=n.autoFocus,c=void 0!==l&&l,s=n.className;return e("input",{type:r,value:o,onChange:function(e){return i(e.target.value)},placeholder:a,autoFocus:c,className:"st-filter-input ".concat(void 0===s?"":s).trim()})},We=function(n){var t=n.children,r=n.className;return e("div",g({className:"st-filter-section ".concat(void 0===r?"":r).trim()},{children:t}))},De=function(t){var r=t.onApply,o=t.onClear,i=t.canApply,a=t.showClear;return n("div",g({className:"st-filter-actions"},{children:[e("button",g({onClick:r,disabled:!i,className:"st-filter-button st-filter-button-apply ".concat(i?"":"st-filter-button-disabled")},{children:"Apply"})),a&&o&&e("button",g({onClick:o,className:"st-filter-button st-filter-button-clear"},{children:"Clear"}))]}))},Me=function(t){var r=t.header,i=t.currentFilter,a=t.onApplyFilter,l=t.onClearFilter,s=o((null==i?void 0:i.operator)||"contains"),d=s[0],u=s[1],h=o(String((null==i?void 0:i.value)||"")),f=h[0],v=h[1],p=be("string");c((function(){i?(u(i.operator),v(String(i.value||""))):(u("contains"),v(""))}),[i]);var m=Se(d)||f.trim();return n(Re,{children:[e(ke,{value:d,onChange:u,operators:p}),xe(d)&&e(We,{children:e(Fe,{type:"text",value:f,onChange:v,placeholder:"Filter...",autoFocus:!0})}),e(De,{onApply:function(){var e=g({accessor:r.accessor,operator:d},xe(d)&&{value:f});a(e)},onClear:l,canApply:!!m,showClear:!!i})]})},Te=function(t){var r,i,a=t.header,l=t.currentFilter,s=t.onApplyFilter,d=t.onClearFilter,u=o((null==l?void 0:l.operator)||"equals"),h=u[0],f=u[1],v=o(String((null==l?void 0:l.value)||"")),p=v[0],m=v[1],g=o(String((null===(r=null==l?void 0:l.values)||void 0===r?void 0:r[0])||"")),w=g[0],C=g[1],y=o(String((null===(i=null==l?void 0:l.values)||void 0===i?void 0:i[1])||"")),b=y[0],x=y[1],I=be("number");c((function(){var e,n;l?(f(l.operator),m(String(l.value||"")),C(String((null===(e=l.values)||void 0===e?void 0:e[0])||"")),x(String((null===(n=l.values)||void 0===n?void 0:n[1])||""))):(f("equals"),m(""),C(""),x(""))}),[l]);return n(Re,{children:[e(ke,{value:h,onChange:f,operators:I}),xe(h)&&e(We,{children:e(Fe,{type:"number",value:p,onChange:m,placeholder:"Enter number...",autoFocus:!0})}),Ie(h)&&n(We,{children:[e(Fe,{type:"number",value:w,onChange:C,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from"}),e(Fe,{type:"number",value:b,onChange:x,placeholder:"To..."})]}),e(De,{onApply:function(){var e={accessor:a.accessor,operator:h};xe(h)?e.value=parseFloat(p):Ie(h)&&(e.values=[parseFloat(w.toString()),parseFloat(b.toString())]),s(e)},onClear:d,canApply:!!Se(h)||(xe(h)?""!==p.trim():!!Ie(h)&&""!==String(w).trim()&&""!==String(b).trim()),showClear:!!l})]})},He=function(n){var t=n.value,r=n.onChange,o=n.options,i=n.className,a=void 0===i?"":i,l=n.placeholder;return e(Ne,{value:t,onChange:r,options:o,className:a,placeholder:l})},Le=function(t){var r=t.header,i=t.currentFilter,a=t.onApplyFilter,l=t.onClearFilter,s=o((null==i?void 0:i.operator)||"equals"),d=s[0],u=s[1],h=o(void 0!==(null==i?void 0:i.value)?String(i.value):"true"),f=h[0],v=h[1],p=be("boolean");c((function(){i?(u(i.operator),v(void 0!==i.value?String(i.value):"true")):(u("equals"),v("true"))}),[i]);var m=Se(d)||""!==f;return n(Re,{children:[e(ke,{value:d,onChange:u,operators:p}),xe(d)&&e(We,{children:e(He,{value:f,onChange:v,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),e(De,{onApply:function(){var e={accessor:r.accessor,operator:d};xe(d)&&(e.value="true"===f),a(e)},onClear:l,canApply:m,showClear:!!i})]})},Be=function(t){var r,a,l=t.header,s=t.currentFilter,d=t.onApplyFilter,u=t.onClearFilter,h=o((null==s?void 0:s.operator)||"equals"),f=h[0],v=h[1],p=o((null==s?void 0:s.value)?String(s.value):""),m=p[0],w=p[1],C=o((null===(r=null==s?void 0:s.values)||void 0===r?void 0:r[0])?String(s.values[0]):""),y=C[0],b=C[1],x=o(String((null===(a=null==s?void 0:s.values)||void 0===a?void 0:a[1])||"")),I=x[0],S=x[1],R=be("date");c((function(){var e,n;s?(v(s.operator),w(String(s.value||"")),b(String((null===(e=s.values)||void 0===e?void 0:e[0])||"")),S(String((null===(n=s.values)||void 0===n?void 0:n[1])||""))):(v("equals"),w(""),b(""),S(""))}),[s]);var E=function(t){var r=t.value,a=t.onChange,l=t.placeholder,s=t.autoFocus,d=t.className,u=o(!1),h=u[0],f=u[1],v=o(""),p=v[0],m=v[1],w=i(null);c((function(){if(r){var e=new Date(r);isNaN(e.getTime())||m(e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else m("")}),[r]),c((function(){s&&w.current&&w.current.focus()}),[s]);var C=r?new Date(r):new Date;return n("div",g({className:"st-date-input-container",style:{position:"relative"}},{children:[e("input",{ref:w,type:"text",value:p,placeholder:l,onClick:function(){f(!h)},onKeyDown:function(e){"Enter"===e.key||" "===e.key?(e.preventDefault(),f(!h)):"Escape"===e.key&&f(!1)},readOnly:!0,className:"st-filter-input ".concat(d||""),style:{cursor:"pointer"}}),e(P,g({open:h,setOpen:f,onClose:function(){f(!1)},positioning:"absolute",overflow:"visible"},{children:e(Y,{value:C,onChange:function(e){var n=e.toISOString().split("T")[0];a(n),f(!1)},onClose:function(){return f(!1)}})}))]}))};return n(Re,{children:[e(ke,{value:f,onChange:v,operators:R}),xe(f)&&e(We,{children:e(E,{value:m,onChange:w,placeholder:"Select date...",autoFocus:!0})}),Ie(f)&&n(We,{children:[e(E,{value:y,onChange:b,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),e(E,{value:I,onChange:S,placeholder:"To date..."})]}),e(De,{onApply:function(){var e={accessor:l.accessor,operator:f};xe(f)?e.value=m:Ie(f)&&(e.values=[y,I]),d(e)},onClear:u,canApply:!!Se(f)||(xe(f)?""!==m.trim():!!Ie(f)&&""!==y.trim()&&""!==I.trim()),showClear:!!s})]})},Ae=function(n){var t=n.className,r=n.style;return e("svg",g({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:t,style:g({height:"10px"},r)},{children:e("path",{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})}))},Oe=function(t){var r=t.checked,o=void 0!==r&&r,i=t.children,a=t.onChange;return n("label",g({className:"st-checkbox-label"},{children:[e("input",{checked:o,className:"st-checkbox-input",onChange:function(){a&&a(!o)},type:"checkbox"}),e("span",g({className:"st-checkbox-custom ".concat(o?"st-checked":"")},{children:o&&e(Ae,{className:"st-checkbox-checkmark"})})),i]}))},Pe=function(t){var r=t.header,i=t.currentFilter,l=t.onApplyFilter,s=t.onClearFilter,d=a((function(){return r.enumOptions||[]}),[r.enumOptions]),u=a((function(){return d.map((function(e){return e.value}))}),[d]),h=o((null==i?void 0:i.values)?i.values.map(String):u),f=h[0],v=h[1];c((function(){v(i?i.values?i.values.map(String):[]:u)}),[i,u]);var p=f.length===u.length;return n(Re,{children:[e(We,{children:n("div",g({className:"st-enum-filter-options"},{children:[e("div",g({className:"st-enum-select-all"},{children:e(Oe,g({checked:p,onChange:function(e){v(e?u:[])}},{children:e("span",g({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),d.map((function(n){return e(Oe,g({checked:f.includes(n.value),onChange:function(){return e=n.value,void v((function(n){return n.includes(e)?n.filter((function(n){return n!==e})):y(y([],n,!0),[e],!1)}));var e}},{children:e("span",g({className:"st-enum-option-label"},{children:n.label}))}),n.value)}))]}))}),e(De,{onApply:function(){if(f.length!==u.length){var e={accessor:r.accessor,operator:"in",values:f};l(e)}else s()},onClear:s,canApply:0!==f.length&&f.length!==u.length,showClear:!!i})]})},qe=function(n){var r=n.header,o=n.currentFilter,i=n.onApplyFilter,a=n.onClearFilter;return e(t,{children:function(){switch(r.type){case"number":return e(Te,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"boolean":return e(Le,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"date":return e(Be,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"enum":return e(Pe,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a});default:return e(Me,{header:r,currentFilter:o,onApplyFilter:i,onClearFilter:a})}}()})},ze=u((function(t,r){var i,a,l=t.colIndex,s=t.forceHeadersUpdate,d=t.gridColumnEnd,u=t.gridColumnStart,h=t.gridRowEnd,f=t.gridRowStart,v=t.header,p=t.reverse,m=t.sort,w=o(!1),C=w[0],x=w[1],I=T(),S=I.columnReordering,R=I.columnResizing,E=I.draggedHeaderRef,N=I.filters,k=I.forceUpdate,F=I.handleApplyFilter,W=I.handleClearFilter,D=I.headersRef,M=I.hoveredHeaderRef,H=I.onColumnOrderChange,L=I.onSort,B=I.onTableHeaderDragEnd,A=I.rowHeight,O=I.selectColumns,q=I.selectableColumns,z=I.setInitialFocusedCell,U=I.setMainBodyWidth,j=I.setPinnedLeftWidth,Y=I.setPinnedRightWidth,K=I.setSelectedCells,G=I.setSelectedColumns,X=I.sortDownIcon,V=I.sortUpIcon,J=Boolean(null==v?void 0:v.isSortable),Q=Boolean(null==v?void 0:v.filterable),Z=N[v.accessor],_="st-header-cell ".concat(v.accessor===(null===(i=M.current)||void 0===i?void 0:i.accessor)?"st-hovered":""," ").concat((null===(a=E.current)||void 0===a?void 0:a.accessor)===v.accessor?"st-dragging":""," ").concat(J?"clickable":""," ").concat(S&&!J?"columnReordering":""," ").concat(v.children?"parent":""),ee=ne({draggedHeaderRef:E,headersRef:D,hoveredHeaderRef:M,onColumnOrderChange:H,onTableHeaderDragEnd:B}),te=ee.handleDragStart,re=ee.handleDragEnd,oe=ee.handleDragOver,ie=$(),ae=function(e){var n=e.event,t=e.header;if(q){var r=function(e,n){if(!e.children||0===e.children.length)return[n];var t=[],r=function(e,n){if(!e.children||0===e.children.length)return t.push(n),n+1;for(var o=n,i=0,a=e.children;i<a.length;i++){var l=a[i];o=r(l,o)}return o};return r(e,n),t}(t,l);return n.shiftKey&&O?G((function(e){if(0===e.size)return new Set(r);var n=r[0],t=Array.from(e).sort((function(e,n){return e-n})),o=t[0],i=Math.abs(n-o);t.forEach((function(e){var t=Math.abs(n-e);t<i&&(i=t,o=e)}));var a,l,c,s,d=y(y([],(a=o,l=n,c=Math.min(a,l),s=Math.max(a,l),Array.from({length:s-c+1},(function(e,n){return c+n}))),!0),r,!0);return new Set(y(y([],Array.from(e),!0),d,!0))})):O&&O(r),K(new Set),void z(null)}t.isSortable&&L(l,t.accessor)};if(c((function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}}),[]),!v)return null;var le=R&&e("div",g({className:"st-header-resize-handle-container",onMouseDown:function(e){var n;ie({callback:ge,callbackProps:{event:e.nativeEvent,forceUpdate:k,gridColumnEnd:d,gridColumnStart:u,header:v,headersRef:D,setMainBodyWidth:U,setPinnedLeftWidth:j,setPinnedRightWidth:Y,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})},onTouchStart:function(e){var n;ie({callback:ge,callbackProps:{event:e,forceUpdate:k,gridColumnEnd:d,gridColumnStart:u,header:v,headersRef:D,setMainBodyWidth:U,setPinnedLeftWidth:j,setPinnedRightWidth:Y,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}},{children:e("div",{className:"st-header-resize-handle"})})),ce=m&&m.key.accessor===v.accessor&&n("div",g({className:"st-icon-container",onClick:function(e){return ae({event:e,header:v})}},{children:["ascending"===m.direction&&V&&V,"descending"===m.direction&&X&&X]})),se=Q&&n("div",g({className:"st-icon-container",onClick:function(e){e.stopPropagation(),x(!C)}},{children:[e(Ce,{className:"st-header-icon",style:{fill:Z?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),e(P,g({open:C,overflow:"visible",setOpen:x,onClose:function(){return x(!1)}},{children:e(qe,{header:v,currentFilter:Z,onApplyFilter:function(e){F(e),x(!1)},onClearFilter:function(){W(v.accessor),x(!1)}})}))]}));return n("div",g({className:_,id:b({accessor:v.accessor,rowIndex:0}),onDragOver:function(e){ie({callback:oe,callbackProps:{event:e,hoveredHeader:v},limit:50})},ref:r,style:g(g({gridRowStart:f,gridRowEnd:h,gridColumnStart:u,gridColumnEnd:d},d-u>1?{}:{width:v.width}),h-f>1?{}:{height:A})},{children:[p&&le,"right"===v.align&&se,"right"===v.align&&ce,e("div",g({className:"st-header-label",draggable:S&&!v.disableReorder,onClick:function(e){return ae({event:e,header:v})},onDragEnd:function(e){e.preventDefault(),re(),s()},onDragStart:function(e){S&&v&&function(e){te(e)}(v)}},{children:e("span",g({className:"st-header-label-text ".concat("right"===v.align?"right-aligned":"center"===v.align?"center-aligned":"left-aligned")},{children:null==v?void 0:v.label}))})),"right"!==v.align&&ce,"right"!==v.align&&se,!p&&le]}))})),Ue=function(n){var r=n.columnIndices,o=n.gridTemplateColumns,i=n.handleScroll,l=n.headersRef,c=n.hiddenColumns,s=n.maxDepth,d=n.pinned,u=n.sectionRef,h=n.sort,f=v((function(e){return e+1}),0)[1],m=a((function(){var e=[],n=1,t=function(o,i,a){var l,u;if(void 0===a&&(a=!1),!x({hiddenColumns:c,header:o,pinned:d}))return 0;a||n++;var h=null!==(u=null===(l=o.children)||void 0===l?void 0:l.filter((function(e){return x({hiddenColumns:c,header:e,pinned:d})})).length)&&void 0!==u?u:0,f=n,v=h>0?f+h:f+1,p=i,m=h>0?i+1:s+1;if(e.push({header:o,gridColumnStart:f,gridColumnEnd:v,gridRowStart:p,gridRowEnd:m,colIndex:r[o.accessor]}),o.children){var g=!0;o.children.forEach((function(e){x({hiddenColumns:c,header:e,pinned:d})&&(t(e,i+1,g),g=!1)}))}return v-f},o=l.current.filter((function(e){return x({hiddenColumns:c,header:e,pinned:d})})),i=!0;return o.forEach((function(e){t(e,1,i),i=!1})),e}),[l,c,s,d,r]);return e(ue,g({condition:!d,wrapper:function(n){return e(de,g({childRef:u},{children:n}))}},{children:e("div",g({className:"st-header-".concat(d?"pinned-".concat(d):"main")},i&&{onScroll:i},{ref:u,style:{gridTemplateColumns:o,display:"grid",position:"relative"}},{children:e(t,{children:m.map((function(n){return e(ze,{colIndex:n.colIndex,forceHeadersUpdate:f,gridColumnEnd:n.gridColumnEnd,gridColumnStart:n.gridColumnStart,gridRowEnd:n.gridRowEnd,gridRowStart:n.gridRowStart,header:n.header,ref:p(),reverse:"right"===d,sort:h},n.header.accessor)}))})}))}))},je=function(e){var n;return(null===(n=e.children)||void 0===n?void 0:n.length)?1+Math.max.apply(Math,e.children.map(je)):1},Ye=function(t){var r=t.centerHeaderRef,o=t.headerContainerRef,i=t.headersRef,l=t.hiddenColumns,c=t.mainTemplateColumns,s=t.pinnedLeftColumns,d=t.pinnedLeftTemplateColumns,u=t.pinnedRightColumns,h=t.pinnedRightTemplateColumns,f=t.sort,v=T(),p=v.pinnedLeftRef,w=v.pinnedRightRef,C=v.setPinnedLeftWidth,y=v.setPinnedRightWidth,b=a((function(){return fe({headersRef:i,hiddenColumns:l,pinnedLeftColumns:s,pinnedRightColumns:u})}),[i,l,s,u]),I=a((function(){var e=i.current,n=0;return e.forEach((function(e){if(x({hiddenColumns:l,header:e})){var t=je(e);n=Math.max(n,t)}})),{maxDepth:n}}),[i,l]).maxDepth;return m((function(){var e,n;C(pe(null===(e=p.current)||void 0===e?void 0:e.clientWidth)),y(pe(null===(n=w.current)||void 0===n?void 0:n.clientWidth))}),[p,w,C,y]),n("div",g({className:"st-header-container",ref:o},{children:[s.length>0&&e(Ue,{columnIndices:b,gridTemplateColumns:d,handleScroll:void 0,headersRef:i,hiddenColumns:l,maxDepth:I,pinned:"left",sectionRef:p,sort:f}),e(Ue,{columnIndices:b,gridTemplateColumns:c,handleScroll:void 0,headersRef:i,hiddenColumns:l,maxDepth:I,sectionRef:r,sort:f}),u.length>0&&e(Ue,{columnIndices:b,gridTemplateColumns:h,handleScroll:void 0,headersRef:i,hiddenColumns:l,maxDepth:I,pinned:"right",sectionRef:w,sort:f})]}))},Ke=function(e){var n=e.headers,t=e.hiddenColumns,r=function(e){var n=e.headers,o=e.flattenedHeaders;return n.forEach((function(e){!0!==t[e.accessor]&&(e.children?r({headers:e.children,flattenedHeaders:o}):o.push(e))})),o},o=r({headers:n,flattenedHeaders:[]});return"".concat(o.map((function(e){return function(e){var n=e.minWidth,t=e.width;return"number"==typeof t&&(t="".concat(t,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"string"==typeof t&&t.endsWith("fr")?"minmax(".concat(n,", ").concat(t,")"):"max(".concat(n,", ").concat(t,")"):t}(e)})).join(" "))},Ge=function(t){var r=t.pinnedLeftWidth,o=t.pinnedRightWidth,l=t.setScrollTop,c=t.sort,s=t.tableRows,d=t.visibleRows,u=T(),h=u.columnResizing,f=u.editColumns,v=u.headersRef,p=u.hiddenColumns,m=i(null),w=i(null),C=v.current.filter((function(e){return!e.pinned})),y=v.current.filter((function(e){return"left"===e.pinned})),b=v.current.filter((function(e){return"right"===e.pinned})),x=a((function(){return Ke({headers:y,hiddenColumns:p})}),[y,p]),I=a((function(){return Ke({headers:C,hiddenColumns:p})}),[C,p]),S=a((function(){return Ke({headers:b,hiddenColumns:p})}),[b,p]),R={centerHeaderRef:w,headerContainerRef:m,headersRef:v,hiddenColumns:p,mainTemplateColumns:I,pinnedLeftColumns:y,pinnedLeftTemplateColumns:x,pinnedRightColumns:b,pinnedRightTemplateColumns:S,sort:c},E={tableRows:s,headerContainerRef:m,mainTemplateColumns:I,pinnedLeftColumns:y,pinnedLeftTemplateColumns:x,pinnedLeftWidth:r,pinnedRightColumns:b,pinnedRightTemplateColumns:S,pinnedRightWidth:o,setScrollTop:l,visibleRows:d};return n("div",g({className:"st-content ".concat(h?"st-resizeable":"st-not-resizeable"),style:{width:f?"calc(100% - 27.5px)":"100%"}},{children:[e(Ye,g({},R)),e(ve,g({},E))]}))},Xe=function(t){var r,a,l=t.mainBodyWidth,s=t.mainBodyRef,d=t.pinnedLeftWidth,u=t.pinnedRightWidth,h=t.setMainBodyWidth,f=t.tableBodyContainerRef,v=T().editColumns,p=o(!1),m=p[0],w=p[1],C=i(null),y=f.current&&f.current.scrollHeight>f.current.clientHeight,b=v?28:0,x=(v?u+1:u)+(f.current&&y?f.current.offsetWidth-f.current.clientWidth:0);return c((function(){setTimeout((function(){!function(){var e;if(s.current){var n=null===(e=s.current)||void 0===e?void 0:e.scrollWidth;h(n||0)}}()}),1)}),[s,h]),c((function(){setTimeout((function(){!function(){if(s.current){var e=s.current.clientWidth;w(l>e)}}()}),1)}),[s,l,h]),m?n("div",g({className:"st-horizontal-scrollbar-container"},{children:[d>0&&e("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:d,height:null===(r=C.current)||void 0===r?void 0:r.offsetHeight}}),l>0&&e(de,g({childRef:C},{children:e("div",g({className:"st-horizontal-scrollbar-middle",ref:C,style:{flexGrow:1}},{children:e("div",{style:{width:l,height:".3px"}})}))})),u>0&&e("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:x,height:null===(a=C.current)||void 0===a?void 0:a.offsetHeight}}),b>0&&e("div",{style:{width:b-1.5,height:"100%",flexShrink:0}})]})):null},Ve={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"ascending"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"ascending"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"ascending"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"ascending"===t?i:-i},enum:function(e,n,t){return Ve.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"ascending"===t?-1:1:null==n?"ascending"===t?1:-1:"string"==typeof e&&"string"==typeof n?Ve.string(e,n,t):"number"==typeof e&&"number"==typeof n?Ve.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?Ve.boolean(e,n,t):Ve.string(String(e),String(n),t)}},Je=function(e,n,t){var r=t.find((function(e){return e.accessor===n.key.accessor})),o=(null==r?void 0:r.type)||"string",i=n.direction;return y([],e,!0).sort((function(e,t){var r=n.key.accessor;return function(e,n,t,r){if(void 0===t&&(t="string"),null==e||""===e)return"ascending"===r?-1:1;if(null==n||""===n)return"ascending"===r?1:-1;if("number"===t){var o=function(e){var n;if("number"==typeof e)return e;var t=String(e);if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(n=r[2])||void 0===n?void 0:n.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(t)||0},i=o(e),a=o(n);return Ve.number(i,a,r)}return"date"===t?Ve.date(String(e),String(n),r):"boolean"===t?Ve.boolean(Boolean(e),Boolean(n),r):"enum"===t?Ve.enum(String(e),String(n),r):Ve.string(String(e),String(n),r)}(e[r],t[r],o,i)}))},$e=function(e){var n=e.headers,t=e.tableRows,r=o(null),i=r[0],l=r[1],c=a((function(){var e={};return n.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[n]),s=o(c),d=s[0],u=s[1],h=a((function(){if(!i)return t;var e=function(e,n,t){return{sortedData:Je(n,t,e),newSortConfig:t}}(n,t,i).sortedData;return e}),[t,i,n]);return{hiddenColumns:d,setHiddenColumns:u,setSort:l,sort:i,sortedRows:h,updateSort:function(e,t){var r=function(e){for(var n=0,o=e;n<o.length;n++){var i=o[n];if(i.accessor===t)return i;if(i.children&&i.children.length>0){var a=r(i.children);if(a)return a}}},o=r(n);o&&l((function(e){return e&&e.key.accessor===t?"ascending"===e.direction?{key:o,direction:"descending"}:null:{key:o,direction:"ascending"}}))}}},Qe=function(e,n,t,r){void 0===r&&(r=new Set);for(var o=0,i=e;o<i.length;o++){var a=i[o];if(!r.has(a.accessor)&&(r.add(a.accessor),a.children&&a.children.length>0)){var l=a.children.some((function(e){return e.accessor===n})),c=!1;if(!l)for(var s=0,d=a.children;s<d.length;s++){var u=d[s];if(Qe([u],n,t,r),!1===t[u.accessor]){c=!0;break}}(l||c)&&(t[a.accessor]=!1)}}},Ze=function(e,n){return e.every((function(e){return!0===n[e.accessor]}))},_e=function(e,n){e.forEach((function(e){e.children&&e.children.length>0&&(_e(e.children,n),Ze(e.children,n)&&(n[e.accessor]=!0))}))},en=function(r){var i=r.allHeaders,a=r.depth,l=void 0===a?0:a,c=r.header,s=r.hiddenColumns,d=r.setHiddenColumns,u=o(!0),h=u[0],f=u[1],v=T(),p=v.expandIcon,m=v.headersRef,w=v.setMainBodyWidth,C=v.setPinnedLeftWidth,y=v.setPinnedRightWidth,b="".concat(16*l,"px"),x=c.children&&c.children.length>0,I=s[c.accessor]||x&&c.children&&Ze(c.children,s);return n(t,{children:[n("div",g({className:"st-header-checkbox-item",style:{paddingLeft:b}},{children:[e("div",g({className:"st-header-icon-container"},{children:x?e("div",g({className:"st-collapsible-header-icon st-expand-icon-container ".concat(h?"expanded":"collapsed"),onClick:function(e){e.stopPropagation(),f(!h)}},{children:p})):null})),e(Oe,g({checked:I,onChange:function(e){var n=g({},s);(n[c.accessor]=e,e)?_e(i,n):(Qe(i,c.accessor,n),x&&c.children&&c.children.length>0&&c.children.every((function(e){return!0===s[e.accessor]}))&&c.children[0]&&(n[c.children[0].accessor]=!1,Qe(i,c.children[0].accessor,n)));d(n),m.current.forEach((function(e){e.hide=!0===n[e.accessor]})),function(e){var n=e.headers,t=e.setMainBodyWidth,r=e.setPinnedLeftWidth,o=e.setPinnedRightWidth,i=0,a=0,l=0;n.forEach((function(e){if(!e.hide){var n=S(e).reduce((function(e,n){return e+R(n)}),0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:l+=n}}));var c=pe(i),s=pe(a);r(c),o(s),t(l)}({headers:m.current,setMainBodyWidth:w,setPinnedLeftWidth:C,setPinnedRightWidth:y})}},{children:c.label}))]})),x&&h&&c.children&&e("div",g({className:"st-nested-headers"},{children:c.children.map((function(n,t){return e(en,{allHeaders:i,depth:l+1,header:n,hiddenColumns:s,setHiddenColumns:d},"".concat(n.accessor,"-").concat(t))}))}))]})},nn=function(n){var t=n.headers,r=n.open,o=n.position,i=n.setHiddenColumns,a=n.hiddenColumns,l="left"===o?"left":"";return e("div",g({className:"st-column-editor-popout ".concat(r?"open":""," ").concat(l),onClick:function(e){return e.stopPropagation()}},{children:e("div",g({className:"st-column-editor-popout-content"},{children:t.map((function(n,r){return e(en,{header:n,hiddenColumns:a,setHiddenColumns:i,allHeaders:t},"".concat(n.accessor,"-").concat(r))}))}))}))},tn=function(t){var r=t.columnEditorText,i=t.editColumns,a=t.editColumnsInitOpen,l=t.headers,c=t.hiddenColumns,s=t.position,d=void 0===s?"right":s,u=t.setHiddenColumns,h=o(a),f=h[0],v=h[1];return i?n("div",g({className:"st-column-editor ".concat(f?"open":""," ").concat(d),onClick:function(){return function(e){v(e)}(!f)},style:{width:28}},{children:[e("div",g({className:"st-column-editor-text"},{children:r})),e(nn,{headers:l,open:f,position:d,setHiddenColumns:u,hiddenColumns:c})]})):null},rn=function(n){var t=n.className;return e("svg",g({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e("path",{d:"M22 334.5c-3.8 8.8-2 19 4.6 26l116 144c4.5 4.8 10.8 7.5 17.4 7.5s12.9-2.7 17.4-7.5l116-144c6.6-7 8.4-17.2 4.6-26s-12.5-14.5-22-14.5l-72 0 0-288c0-17.7-14.3-32-32-32L148 0C130.3 0 116 14.3 116 32l0 288-72 0c-9.6 0-18.2 5.7-22 14.5z"})}))},on=function(n){var t=n.className;return e("svg",g({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e("path",{d:"M298 177.5c3.8-8.8 2-19-4.6-26l-116-144C172.9 2.7 166.6 0 160 0s-12.9 2.7-17.4 7.5l-116 144c-6.6 7-8.4 17.2-4.6 26S34.4 192 44 192l72 0 0 288c0 17.7 14.3 32 32 32l24 0c17.7 0 32-14.3 32-32l0-288 72 0c9.6 0 18.2-5.7 22-14.5z"})}))},an=function(n){var t=n.children,o=i({}),a=l((function(e,n){return!!o.current[n]&&o.current[n].find((function(n){return n===e}))}),[]),c=l((function(e,n){var t=e.clientWidth,r=e.scrollLeft;e.scrollWidth-t>0&&(n.scrollLeft=r)}),[]),s=l((function(e){e.onscroll=null}),[]),d=l((function(e,n){e.onscroll=function(){window.requestAnimationFrame((function(){n.forEach((function(n){var t;null===(t=o.current[n])||void 0===t||t.forEach((function(n){e!==n&&(s(n),c(e,n),window.requestAnimationFrame((function(){var e=Object.keys(o.current).filter((function(e){return o.current[e].includes(n)}));d(n,e)})))}))}))}))}}),[s,c]),u=l((function(e,n){n.forEach((function(n){o.current[n]||(o.current[n]=[]),a(e,n)||(o.current[n].length>0&&c(o.current[n][0],e),o.current[n].push(e))})),d(e,n)}),[a,c,d]),h=l((function(e,n){n.forEach((function(n){if(a(e,n)){s(e);var t=o.current[n].indexOf(e);-1!==t&&o.current[n].splice(t,1)}}))}),[a,s]);return e(ce.Provider,g({value:{registerPane:u,unregisterPane:h}},{children:r.Children.only(t)}))},ln=function(e,n){var t=n.find((function(n){return n.accessor===e.accessor})),r=(null==t?void 0:t.label)||e.accessor,o=ye[e.operator],i="";return void 0!==e.value?i="boolean"==typeof e.value?e.value?"True":"False":String(e.value):e.values&&Array.isArray(e.values)&&("between"===e.operator||"notBetween"===e.operator?i="".concat(e.values[0]," - ").concat(e.values[1]):"in"!==e.operator&&"notIn"!==e.operator||(i=e.values.join(", "))),"isEmpty"===e.operator||"isNotEmpty"===e.operator?"".concat(r,": ").concat(o):"".concat(r,": ").concat(o," ").concat(i)},cn=function(){var t=T(),r=t.filters,o=t.handleClearFilter,i=t.headersRef,a=Object.values(r);return 0===a.length||a.length>0?null:e("div",g({className:"st-filter-bar"},{children:e("div",g({className:"st-filter-bar-content"},{children:e("div",g({className:"st-filter-chips"},{children:a.map((function(t){return n("div",g({className:"st-filter-chip"},{children:[e("span",g({className:"st-filter-chip-text"},{children:ln(t,i.current)})),e("button",g({className:"st-filter-chip-remove",onClick:function(){return o(t.accessor)},"aria-label":"Remove filter for ".concat(t.accessor)},{children:"×"}))]}),t.accessor)}))}))}))}))},sn=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())},dn=function(e){var n=e.rows,t=o({}),r=t[0],i=t[1],c=a((function(){return 0===Object.keys(r).length?n:n.filter((function(e){return Object.values(r).every((function(n){try{return function(e,n){var t=n.operator,r=n.value,o=n.values;if(null==e)return"isEmpty"===t;if("isEmpty"===t)return!e||""===String(e).trim();if("isNotEmpty"===t)return e&&""!==String(e).trim();if("string"==typeof e||"contains"===t||"notContains"===t||"startsWith"===t||"endsWith"===t){var i=String(e).toLowerCase(),a=r?String(r).toLowerCase():"";switch(t){case"equals":return i===a;case"notEquals":return i!==a;case"contains":return i.includes(a);case"notContains":return!i.includes(a);case"startsWith":return i.startsWith(a);case"endsWith":return i.endsWith(a)}}if("number"==typeof e||!isNaN(Number(e))){var l=Number(e),c=Number(r);switch(t){case"equals":return l===c;case"notEquals":return l!==c;case"greaterThan":return l>c;case"lessThan":return l<c;case"greaterThanOrEqual":return l>=c;case"lessThanOrEqual":return l<=c;case"between":if(o&&2===o.length){var s=o.map(Number),d=s[0],u=s[1];return l>=d&&l<=u}return!1;case"notBetween":if(o&&2===o.length){var h=o.map(Number);return d=h[0],u=h[1],l<d||l>u}return!0}}if(e instanceof Date||!isNaN(Date.parse(e))){var f=new Date(e),v=new Date(String(r||"")),p=sn(f),m=sn(v);switch(t){case"equals":return p.getTime()===m.getTime();case"notEquals":return p.getTime()!==m.getTime();case"before":return p<m;case"after":return p>m;case"between":if(o&&2===o.length){var g=o.map((function(e){return sn(new Date(String(e||"")))})),w=g[0],C=g[1];return p>=w&&p<=C}return!1;case"notBetween":if(o&&2===o.length){var y=o.map((function(e){return sn(new Date(String(e||"")))}));return w=y[0],C=y[1],p<w||p>C}return!0}}if("boolean"==typeof e){var b=Boolean(r);if("equals"===t)return e===b}if("in"===t||"notIn"===t){if(o&&Array.isArray(o)){var x=String(e),I=o.includes(x);return"in"===t?I:!I}return!1}var S=String(e).toLowerCase(),R=r?String(r).toLowerCase():"";switch(t){case"equals":return S===R;case"notEquals":return S!==R;default:return!0}}(e[n.accessor],n)}catch(e){return console.warn("Filter error for accessor ".concat(n.accessor,":"),e),!0}}))}))}),[n,r]),s=l((function(e){i((function(n){var t;return g(g({},n),((t={})[e.accessor]=e,t))}))}),[]),d=l((function(e){i((function(n){var t=g({},n);return delete t[e],t}))}),[]),u=l((function(){i({})}),[]);return{filters:r,filteredRows:c,handleApplyFilter:s,handleClearFilter:d,handleClearAllFilters:u}},un=function(n){var t=o(!1),r=t[0],i=t[1];return c((function(){i(!0)}),[]),r?e(hn,g({},n)):null},hn=function(t){var r=t.allowAnimations,s=void 0!==r&&r,d=t.cellUpdateFlash,u=void 0!==d&&d,h=t.columnEditorPosition,f=void 0===h?"right":h,p=t.columnEditorText,y=void 0===p?"Columns":p,b=t.columnReordering,x=void 0!==b&&b,R=t.columnResizing,E=void 0!==R&&R,N=t.defaultHeaders,D=t.editColumns,T=void 0!==D&&D,A=t.editColumnsInitOpen,O=void 0!==A&&A,P=t.expandAll,q=void 0===P||P,z=t.expandIcon,U=void 0===z?e(B,{className:"st-expand-icon"}):z,j=t.height,Y=t.hideFooter,K=void 0!==Y&&Y,G=t.nextIcon,X=void 0===G?e(B,{className:"st-next-prev-icon"}):G,V=t.onCellEdit,J=t.onColumnOrderChange,$=t.onGridReady,Q=t.onNextPage,Z=t.prevIcon,_=void 0===Z?e(L,{className:"st-next-prev-icon"}):Z,ee=t.rowGrouping,ne=t.rowHeight,te=void 0===ne?32:ne,re=t.rowIdAccessor,oe=t.rows,ie=t.rowsPerPage,ae=void 0===ie?10:ie,le=t.selectableCells,ce=void 0!==le&&le,se=t.selectableColumns,de=void 0!==se&&se,ue=t.shouldPaginate,he=void 0!==ue&&ue,fe=t.sortDownIcon,ve=void 0===fe?e(rn,{className:"st-header-icon"}):fe,pe=t.sortUpIcon,me=void 0===pe?e(on,{className:"st-header-icon"}):pe,ge=t.tableRef,we=t.theme,Ce=void 0===we?"light":we,ye=t.useHoverRowBackground,be=void 0===ye||ye,xe=t.useOddEvenRowBackground,Ie=void 0===xe||xe,Se=t.useOddColumnBackground,Re=void 0!==Se&&Se;Re&&(Ie=!1);var Ee=i(null),Ne=i(N),ke=i(null),Fe=i(null),We=i(null),De=i(null),Me=i(null),Te=o(1),He=Te[0],Le=Te[1],Be=o(0),Ae=Be[0],Oe=Be[1],Pe=o(0),qe=Pe[0],ze=Pe[1],Ue=o(0),je=Ue[0],Ye=Ue[1],Ke=o(0),Ve=Ke[0],Je=Ke[1],Qe=o(0),Ze=Qe[0],_e=Qe[1],en=o(new Set),nn=en[0],ln=en[1],sn=dn({rows:oe}),un=sn.filters,hn=sn.filteredRows,fn=sn.handleApplyFilter,vn=sn.handleClearFilter,pn=sn.handleClearAllFilters,mn=$e({headers:Ne.current,tableRows:hn}),gn=mn.sort,wn=mn.sortedRows,Cn=mn.hiddenColumns,yn=mn.setHiddenColumns,bn=mn.updateSort;c((function(){null==$||$()}),[$]);var xn=a((function(){if(!he)return wn;var e=(He-1)*ae,n=e+ae;return wn.slice(e,n)}),[He,ae,he,wn]),In=a((function(){return ee&&0!==ee.length?F({rows:xn,rowGrouping:ee,rowIdAccessor:re,expandedRows:nn,expandAll:q}):xn.map((function(e,n){return{row:e,depth:0,groupingKey:void 0,position:n,isLastGroupRow:!1}}))}),[xn,ee,re,nn,q]),Sn=function(e){var n=e.height,t=e.rowHeight;return a((function(){var e;if(!n)return window.innerHeight-t;var r=document.querySelector(".simple-table-root"),o=0;if(n.endsWith("px"))o=parseInt(n,10);else if(n.endsWith("vh")){var i=parseInt(n,10);o=window.innerHeight*i/100}else if(n.endsWith("%")){var a=parseInt(n,10);o=((null===(e=null==r?void 0:r.parentElement)||void 0===e?void 0:e.clientHeight)||window.innerHeight)*a/100}else o=window.innerHeight;return Math.max(0,o-t)}),[n,t])}({height:j,rowHeight:te}),Rn=a((function(){return function(e){var n=e.bufferRowCount,t=e.contentHeight,r=e.tableRows,o=e.rowHeight,i=e.scrollTop,a=o+1,l=Math.max(0,i-a*n),c=i+t+a*n,s=Math.max(0,Math.floor(l/a)),d=Math.min(r.length,Math.ceil(c/a));return r.slice(s,d)}({bufferRowCount:5,contentHeight:Sn,tableRows:In,rowHeight:te,scrollTop:Ve})}),[Sn,te,In,Ve]),En=i(new Map),Nn=v((function(e){return e+1}),0)[1],kn=function(e){var n=e.selectableCells,t=e.headers,r=e.visibleRows,s=e.rowIdAccessor,d=e.onCellEdit,u=e.cellRegistry,h=o(new Set),f=h[0],v=h[1],p=o(new Set),m=p[0],g=p[1],y=o(null),b=y[0],x=y[1],I=o(null),R=I[0],E=I[1],N=o(new Set),F=N[0],D=N[1],M=o(new Set),T=M[0],H=M[1],L=i(!1),B=i(null),A=a((function(){return t.flatMap(S)}),[t]),O=l((function(){var e=A.filter((function(e){return!e.hide})),n=new Map;e.forEach((function(e,t){n.set(t,e.accessor)}));var t=Array.from(f).reduce((function(e,t){var o,i=t.split("-").map(Number),a=i[0],l=i[1];e[a]||(e[a]=[]);var c=n.get(l);return c&&(null===(o=r[a])||void 0===o?void 0:o.row)?e[a][l]=r[a].row[c]:e[a][l]="",e}),{}),o=Object.values(t).map((function(e){return Object.values(e).join("\t")})).join("\n");f.size>0&&(navigator.clipboard.writeText(o),D(new Set(f)),setTimeout((function(){D(new Set)}),800))}),[A,f,r]),P=l((function(){return w(void 0,void 0,void 0,(function(){var e,n,t,o,i,a,l,c;return C(this,(function(h){switch(h.label){case 0:if(!R)return[2];h.label=1;case 1:return h.trys.push([1,3,,4]),[4,navigator.clipboard.readText()];case 2:return(e=h.sent())?0===(n=e.split("\n").filter((function(e){return e.length>0}))).length?[2]:(t=A.filter((function(e){return!e.hide})),o=new Set,i=new Set,a=R.rowIndex,l=R.colIndex,n.forEach((function(e,n){e.split("\t").forEach((function(e,c){var h=a+n,f=l+c;if(!(h>=r.length||f>=t.length)){var v=r[h],p=t[f],m=k(v.row,h,s);if(null==p?void 0:p.isEditable){var g=e;if("number"===p.type){var w=Number(e);isNaN(w)||(g=w)}else if("boolean"===p.type)g="true"===e.toLowerCase()||"1"===e;else if("date"===p.type){var C=new Date(e);isNaN(C.getTime())||(g=C)}if(v.row[p.accessor]=g,u){var y="".concat(m,"-").concat(p.accessor),b=u.get(y);b&&b.updateContent(g)}null==d||d({accessor:p.accessor,newValue:g,row:v.row,rowIndex:h});var x=W({colIndex:f,rowIndex:h,rowId:m});o.add(x)}else{var I=W({colIndex:f,rowIndex:h,rowId:m});i.add(I)}}}))})),o.size>0&&(D(o),setTimeout((function(){D(new Set)}),800)),i.size>0&&(H(i),setTimeout((function(){H(new Set)}),800)),[3,4]):[2];case 3:return c=h.sent(),console.warn("Failed to paste from clipboard:",c),[3,4];case 4:return[2]}}))}))}),[R,A,r,s,d,u]),q=l((function(e,n){for(var t=new Set,o=Math.min(e.rowIndex,n.rowIndex),i=Math.max(e.rowIndex,n.rowIndex),a=Math.min(e.colIndex,n.colIndex),l=Math.max(e.colIndex,n.colIndex),c=o;c<=i;c++)for(var d=a;d<=l;d++)if(c>=0&&c<r.length){var u=k(r[c].row,c,s);t.add(W({colIndex:d,rowIndex:c,rowId:u}))}g(new Set),x(null),v(t)}),[r,s,g,x,v]),z=l((function(e){if(e.rowIndex>=0&&e.rowIndex<r.length&&e.colIndex>=0&&e.colIndex<A.length){var n=W(e);g(new Set),x(null),v(new Set([n])),E(e)}}),[A.length,r.length,g,x,v,E]),U=l((function(e,n){void 0===n&&(n=!1),v(new Set),E(null),g((function(t){var r=new Set(n?t:[]);return e.forEach((function(e){return r.add(e)})),r})),e.length>0&&x(e[e.length-1])}),[v,E,g,x]);c((function(){var e=function(e){var t;if(n&&R){var o=R.rowIndex,i=R.colIndex,a=R.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if((e.ctrlKey||e.metaKey)&&"v"===e.key)return e.preventDefault(),void P();if(k(null===(t=r[o])||void 0===t?void 0:t.row,o,s)!==a){var l=r.findIndex((function(e,n){return k(e.row,n,s)===a}));if(-1===l)return;o=l}if("ArrowUp"===e.key){if(e.preventDefault(),o>0){var c=k(r[o-1].row,o-1,s);z({rowIndex:o-1,colIndex:i,rowId:c})}}else"ArrowDown"===e.key?(e.preventDefault(),o<r.length-1&&(c=k(r[o+1].row,o+1,s),z({rowIndex:o+1,colIndex:i,rowId:c}))):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),i>0&&(c=k(r[o].row,o,s),z({rowIndex:o,colIndex:i-1,rowId:c}))):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),i<A.length-1&&(c=k(r[o].row,o,s),z({rowIndex:o,colIndex:i+1,rowId:c}))):"Escape"===e.key&&(v(new Set),g(new Set),x(null),B.current=null,E(null))}else O()}};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[O,A.length,R,s,q,z,n,r,P]);var j=l((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=W({colIndex:n,rowIndex:t,rowId:r}),i=f.has(o),a=m.has(n);return i||a}),[f,m]),Y=l((function(e){var n=e.colIndex,t=e.rowIndex,o=e.rowId,i=[],a=r[t-1]?k(r[t-1].row,t-1,s):null,l=r[t+1]?k(r[t+1].row,t+1,s):null,c=null!==a?{colIndex:n,rowIndex:t-1,rowId:a}:null,d=null!==l?{colIndex:n,rowIndex:t+1,rowId:l}:null,u={colIndex:n-1,rowIndex:t,rowId:o},h={colIndex:n+1,rowIndex:t,rowId:o};return(!c||!j(c)||m.has(n)&&0===t)&&i.push("st-selected-top-border"),(!d||!j(d)||m.has(n)&&t===r.length-1)&&i.push("st-selected-bottom-border"),j(u)||i.push("st-selected-left-border"),j(h)||i.push("st-selected-right-border"),i.join(" ")}),[j,r,m,s]),K=a((function(){return R?function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return n===R.rowIndex&&t===R.colIndex&&r===R.rowId}:function(){return!1}}),[R]),G=l((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=W({colIndex:n,rowIndex:t,rowId:r});return F.has(o)}),[F]),X=l((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=W({colIndex:n,rowIndex:t,rowId:r});return T.has(o)}),[T]);return{getBorderClass:Y,handleMouseDown:function(e){var t=e.colIndex,r=e.rowIndex,o=e.rowId;n&&(L.current=!0,B.current={rowIndex:r,colIndex:t,rowId:o},setTimeout((function(){g(new Set),x(null);var e=W({colIndex:t,rowIndex:r,rowId:o});v(new Set([e])),E({rowIndex:r,colIndex:t,rowId:o})}),0))},handleMouseOver:function(e){var t=e.colIndex,o=e.rowIndex;if(e.rowId,n&&L.current&&B.current){for(var i=new Set,a=Math.min(B.current.rowIndex,o),l=Math.max(B.current.rowIndex,o),c=Math.min(B.current.colIndex,t),d=Math.max(B.current.colIndex,t),u=a;u<=l;u++)for(var h=c;h<=d;h++)if(u>=0&&u<r.length){var f=k(r[u].row,u,s);i.add(W({colIndex:h,rowIndex:u,rowId:f}))}v(i)}},handleMouseUp:function(){L.current=!1},isCopyFlashing:G,isWarningFlashing:X,isInitialFocusedCell:K,isSelected:j,lastSelectedColumnIndex:b,pasteFromClipboard:P,selectColumns:U,selectedCells:f,selectedColumns:m,setInitialFocusedCell:E,setSelectedCells:v,setSelectedColumns:g}}({selectableCells:ce,headers:Ne.current,visibleRows:Rn,rowIdAccessor:re,onCellEdit:V,cellRegistry:En.current}),Fn=kn.getBorderClass,Wn=kn.handleMouseDown,Dn=kn.handleMouseOver,Mn=kn.handleMouseUp,Tn=kn.isCopyFlashing,Hn=kn.isInitialFocusedCell,Ln=kn.isSelected,Bn=kn.isWarningFlashing,An=kn.selectColumns,On=kn.selectedCells,Pn=kn.selectedColumns,qn=kn.setInitialFocusedCell,zn=kn.setSelectedCells,Un=kn.setSelectedColumns,jn=l((function(e,n){bn(e,n)}),[bn]),Yn=l((function(e){Ne.current=e,Nn()}),[]);return function(e){var n=e.selectableColumns,t=e.selectedCells,r=e.selectedColumns,o=e.setSelectedCells,i=e.setSelectedColumns;c((function(){var e=function(e){var a=e.target;a.closest(".st-cell")||n&&(a.classList.contains("st-header-cell")||a.classList.contains("st-header-label"))||(t.size>0&&o(new Set),r.size>0&&i(new Set))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[n,t,r,o,i])}({selectableColumns:de,selectedCells:On,selectedColumns:Pn,setSelectedCells:zn,setSelectedColumns:Un}),m((function(){if(Me.current){var e=Me.current.offsetWidth-Me.current.clientWidth;_e(e)}}),[]),function(e){var n=e.forceUpdate,t=e.tableBodyContainerRef,r=e.setScrollbarWidth;m((function(){var e=function(){if(n(),t.current){var e=t.current.offsetWidth-t.current.clientWidth;r(e)}};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[n,t,r])}({forceUpdate:Nn,tableBodyContainerRef:Me,setScrollbarWidth:_e}),c((function(){ge&&(ge.current={updateData:function(e){var n=e.accessor,t=e.rowIndex,r=e.newValue,o=null==oe?void 0:oe[t];if(o){var i=k(o,t,re),a=I({rowId:i,accessor:n}),l=En.current.get(a);l&&l.updateContent(r),void 0!==o[n]&&(o[n]=r)}}})}),[ge,oe,re]),e(M,g({value:{allowAnimations:s,cellRegistry:En.current,cellUpdateFlash:u,columnReordering:x,columnResizing:E,draggedHeaderRef:Ee,editColumns:T,expandIcon:U,expandedRows:nn,filters:un,tableRows:In,forceUpdate:Nn,getBorderClass:Fn,handleApplyFilter:fn,handleClearFilter:vn,handleClearAllFilters:pn,handleMouseDown:Wn,handleMouseOver:Dn,headersRef:Ne,hiddenColumns:Cn,hoveredHeaderRef:ke,isCopyFlashing:Tn,isInitialFocusedCell:Hn,isSelected:Ln,isWarningFlashing:Bn,mainBodyRef:Fe,nextIcon:X,onCellEdit:V,onColumnOrderChange:J,onSort:jn,onTableHeaderDragEnd:Yn,pinnedLeftRef:We,pinnedRightRef:De,prevIcon:_,rowGrouping:ee,rowHeight:te,rowIdAccessor:re,scrollbarWidth:Ze,selectColumns:An,selectableColumns:de,setExpandedRows:ln,setInitialFocusedCell:qn,setMainBodyWidth:Oe,setPinnedLeftWidth:ze,setPinnedRightWidth:Ye,setSelectedCells:zn,setSelectedColumns:Un,shouldPaginate:he,sortDownIcon:ve,sortUpIcon:me,tableBodyContainerRef:Me,theme:Ce,useHoverRowBackground:be,useOddColumnBackground:Re,useOddEvenRowBackground:Ie}},{children:e("div",g({className:"simple-table-root st-wrapper theme-".concat(Ce),style:j?{height:j}:{}},{children:e(an,{children:n("div",g({className:"st-wrapper-container"},{children:[e(cn,{}),n("div",g({className:"st-content-wrapper",onMouseUp:Mn,onMouseLeave:Mn},{children:[e(Ge,{tableRows:In,pinnedLeftWidth:qe,pinnedRightWidth:je,setScrollTop:Je,sort:gn,visibleRows:Rn}),e(tn,{columnEditorText:y,editColumns:T,editColumnsInitOpen:O,headers:Ne.current,hiddenColumns:Cn,position:f,setHiddenColumns:yn})]})),e(Xe,{mainBodyRef:Fe,mainBodyWidth:Ae,pinnedLeftWidth:qe,pinnedRightWidth:je,setMainBodyWidth:Oe,tableBodyContainerRef:Me}),e(H,{currentPage:He,hideFooter:K,onPageChange:Le,onNextPage:Q,shouldPaginate:he,totalPages:Math.ceil(hn.length/ae)})]}))})}))}))};export{un as SimpleTable};
|
|
2
2
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(n),o=function(){return o=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},o.apply(this,arguments)};function i(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,s)}l((r=r.apply(e,n||[])).next())}))}function a(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(e,i)}catch(e){s=[6,e],r=0}finally{t=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function s(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var l=function(e){var n=e.accessor,t=e.rowIndex;return"cell-".concat(n,"-").concat(t)},c=function(e){var n=e.hiddenColumns,t=e.header,r=e.pinned;return n[t.accessor]?null:!r&&!t.pinned||t.pinned===r||null},u=function(e){var n=e.rowId,t=e.accessor;return"".concat(n,"-").concat(t)},d=function(e){return e.hide?[]:e.children&&0!==e.children.length?e.children.flatMap((function(e){return d(e)})):[e]},h=function(e){if(e.hide)return 0;if("number"==typeof e.width)return e.width;if("string"==typeof e.width&&e.width.endsWith("px"))return parseFloat(e.width);var n=document.getElementById(l({accessor:e.accessor,rowIndex:0}));return(null==n?void 0:n.offsetWidth)||150},f=function(e){var n,t=e.width;"string"==typeof t&&t.includes("fr")&&(e.width=(null===(n=document.getElementById(l({accessor:e.accessor,rowIndex:0})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.forEach((function(e){f(e)}))},v=function(e){return"number"==typeof e.minWidth?e.minWidth:40},p=function(e,n,t){return t&&void 0!==e[t]?e[t]:n},m=function(e){var n=e.depth,t=void 0===n?0:n,r=e.expandAll,o=void 0!==r&&r,i=e.expandedRows,a=e.rowGrouping,s=void 0===a?[]:a,l=e.rowIdAccessor,c=e.rows,u=[],d=function(e,n,t){void 0===t&&(t=0);var r=t;return e.forEach((function(t,a){var c=p(t,a,l),h=s[n],f=0===n&&a===e.length-1;u.push({row:t,depth:n,groupingKey:h,position:r,isLastGroupRow:f}),r++;var v=String(c);if((o?!i.has(v):i.has(v))&&n<s.length){var m=function(e,n){var t=e[n];return Array.isArray(t)?t:[]}(t,h);m.length>0&&(r=d(m,n+1,r))}})),r};return d(c,t),u},g=function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return"".concat(n,"-").concat(t,"-").concat(r)},w=n.createContext(void 0),x=function(n){var t=n.children,r=n.value;return e.jsx(w.Provider,o({value:r},{children:t}))},C=function(){var e=n.useContext(w);if(void 0===e)throw new Error("useTableContext must be used within a TableProvider");return e},b=function(t){var r=t.currentPage,s=t.hideFooter,l=t.onPageChange,c=t.onNextPage,u=t.shouldPaginate,d=t.totalPages,h=C(),f=h.nextIcon,v=h.prevIcon,p=n.useState(!0),m=p[0],g=p[1],w=!(r>1),x=!(r<d)&&!c||!m&&r===d;if(s||!u)return null;var b=function(){if(d<=15)return Array.from({length:d},(function(e,n){return n+1}));var e,n,t=[],o=15;if(r<=Math.ceil(7.5))e=1,n=14;else if(r>=d-Math.floor(7.5))e=Math.max(1,d-o+1),n=d;else{var i=Math.floor(7);e=r-i,n=r+(o-i-1)}for(var a=e;a<=n;a++)t.push(a);return n<d-1&&(t.push(-1),t.push(d)),t}();return e.jsxs("div",o({className:"st-footer"},{children:[e.jsx("button",o({className:"st-next-prev-btn ".concat(w?"disabled":""),onClick:function(){var e=r-1;e>=1&&l(e)},disabled:w},{children:v})),e.jsx("button",o({className:"st-next-prev-btn ".concat(x?"disabled":""),onClick:function(){return i(void 0,void 0,void 0,(function(){var e,n;return a(this,(function(t){switch(t.label){case 0:return e=r===d,n=r+1,c&&e?[4,c(r)]:[3,2];case 1:if(!t.sent())return g(!1),[2];t.label=2;case 2:return(n<=d||c)&&l(n),[2]}}))}))},disabled:x},{children:f})),b.map((function(n,t){return n<0?e.jsx("span",o({className:"st-page-ellipsis"},{children:"..."}),"ellipsis-".concat(n)):e.jsx("button",o({onClick:function(){return function(e){e>=1&&e<=d&&l(e)}(n)},className:"st-page-btn ".concat(r===n?"active":"")},{children:n}),"page-".concat(n))}))]}))},y=function(n){var t=n.className;return e.jsx("svg",o({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},j=function(n){var t=n.className;return e.jsx("svg",o({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},I=function(e){return e.position*(e.rowHeight+1)-1},S=function(e){return e.position*(e.rowHeight+1)},R=function(t){var r=t.children,i=t.onClose,a=t.open,s=t.overflow,l=void 0===s?"auto":s,c=t.setOpen,u=t.width,d=t.containerRef,h=t.positioning,f=void 0===h?"fixed":h,v=C().mainBodyRef,p=n.useRef(null),m=n.useRef(null),g=n.useState("bottom-left"),w=g[0],x=g[1],b=n.useState({}),y=b[0],j=b[1],I=n.useState(!1),S=I[0],R=I[1];return n.useEffect((function(){a&&p.current?(R(!1),!m.current&&p.current.parentElement&&(m.current=p.current.parentElement),requestAnimationFrame((function(){if(p.current&&m.current){var e,n=p.current,t=m.current.getBoundingClientRect(),r=n.offsetHeight,o=u||n.offsetWidth,i=(e=(null==d?void 0:d.current)?d.current.getBoundingClientRect():(null==v?void 0:v.current)?v.current.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0,width:window.innerWidth,height:window.innerHeight,x:0,y:0,toJSON:function(){}}).bottom-t.bottom,a=t.top-e.top,s="bottom",l={};(r>i&&r<=a||r>i&&a>i)&&(s="top");var c="left";o>e.right-t.right+t.width&&(c="right"),"fixed"===f?("bottom"===s?l.top=t.bottom+4:l.bottom=window.innerHeight-t.top+4,"left"===c?l.left=t.left:l.right=window.innerWidth-t.right):("bottom"===s?l.top=t.height+4:l.bottom=t.height+4,"left"===c?l.left=0:l.right=0),x("".concat(s,"-").concat(c)),j(l),R(!0)}}))):a||R(!1)}),[a,u,d,v,f]),n.useEffect((function(){var e=function(e){if(a&&p.current){var n=e.target;p.current&&!p.current.contains(n)&&(c(!1),null==i||i())}};return a&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}}),[a,i,c]),n.useEffect((function(){var e=function(e){p.current&&!p.current.contains(e.target)&&(c(!1),null==i||i())};return a&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[i,a,c]),n.useEffect((function(){var e=function(e){"Escape"===e.key&&a&&(c(!1),null==i||i())};return a&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[i,a,c]),a?e.jsx("div",o({ref:p,className:"st-dropdown-content st-dropdown-".concat(w),onClick:function(e){return e.stopPropagation()},style:o(o({position:f,width:u?"".concat(u,"px"):"auto",visibility:S?"visible":"hidden"},y),{overflow:l})},{children:r})):null},E=function(n){var t=n.children,r=n.onClick,i=n.isSelected,a=void 0!==i&&i,s=n.disabled,l=void 0!==s&&s,c=n.className,u=void 0===c?"":c;return e.jsx("div",o({className:"st-dropdown-item ".concat(a?"selected":""," ").concat(l?"disabled":""," ").concat(u),onClick:function(){!l&&r&&r()},role:"option","aria-selected":a,"aria-disabled":l},{children:t}))},k=function(t){var r=t.onBlur,i=t.onChange,a=t.open,s=t.setOpen,l=t.value,c=n.useState(l),u=c[0],d=c[1],h=function(e){d(e),i(e),s(!1),r()};return e.jsxs(R,o({open:a,onClose:function(){r()},setOpen:s,width:120},{children:[e.jsx(E,o({isSelected:!0===u,onClick:function(){return h(!0)}},{children:"True"})),e.jsx(E,o({isSelected:!1===u,onClick:function(){return h(!1)}},{children:"False"}))]}))},N=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=r?r:"",onBlur:o,onChange:function(e){var n=e.target.value;i(n)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||o()},onMouseDown:function(e){e.stopPropagation()}})},F=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:r.toString(),onBlur:o,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&i(n)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||o()},onMouseDown:function(e){e.stopPropagation()}})},M=function(t){var r,i,a=t.onChange,s=t.onClose,l=t.value,c=C(),u=c.nextIcon,d=c.prevIcon,h=n.useState(l||new Date),f=h[0],v=h[1],p=n.useState("days"),m=p[0],g=p[1],w=function(e,n){return new Date(e,n+1,0).getDate()};return e.jsxs("div",o({className:"st-datepicker"},{children:[e.jsxs("div",o({className:"st-datepicker-header"},{children:["days"===m&&e.jsxs(e.Fragment,{children:[e.jsx("button",o({onClick:function(){v(new Date(f.getFullYear(),f.getMonth()-1,1))},className:"st-datepicker-nav-btn"},{children:d})),e.jsxs("div",o({className:"st-datepicker-header-label",onClick:function(){return g("months")}},{children:[(i=f,i.toLocaleString("default",{month:"long"}))," ",f.getFullYear()]})),e.jsx("button",o({onClick:function(){v(new Date(f.getFullYear(),f.getMonth()+1,1))},className:"st-datepicker-nav-btn"},{children:u}))]}),"months"===m&&e.jsx("div",o({className:"st-datepicker-header-label",onClick:function(){return g("years")}},{children:f.getFullYear()})),"years"===m&&e.jsx("div",o({className:"st-datepicker-header-label"},{children:"Select Year"}))]})),e.jsxs("div",o({className:"st-datepicker-grid st-datepicker-".concat(m,"-grid")},{children:["days"===m&&function(){var n=[],t=f.getFullYear(),r=f.getMonth(),i=w(t,r),c=function(e,n){return new Date(e,n,1).getDay()}(t,r),u=w(t,r-1);["Su","Mo","Tu","We","Th","Fr","Sa"].forEach((function(t,r){n.push(e.jsx("div",o({className:"st-datepicker-weekday"},{children:t}),"header-".concat(r)))}));for(var d=function(t){var r=u-c+t+1;n.push(e.jsx("div",o({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth()-1,e);v(n),a(n),null==s||s()}(r)}},{children:r}),"prev-".concat(r)))},h=0;h<c;h++)d(h);for(var p=function(i){var c=i===(new Date).getDate()&&r===(new Date).getMonth()&&t===(new Date).getFullYear(),u=i===new Date(l).getDate()&&r===new Date(l).getMonth()&&t===new Date(l).getFullYear();n.push(e.jsx("div",o({className:"st-datepicker-day ".concat(c?"today":""," ").concat(u?"selected":""),onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth(),e);v(n),a(n),null==s||s()}(i)}},{children:i}),"day-".concat(i)))},m=1;m<=i;m++)p(m);var g=35-(c+i),x=function(t){n.push(e.jsx("div",o({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth()+1,e);v(n),a(n),null==s||s()}(t)}},{children:t}),"next-".concat(t)))};for(m=1;m<=g;m++)x(m);return n}(),"months"===m&&(r=[],Array.from({length:12},(function(e,n){return new Date(2e3,n,1).toLocaleString("default",{month:"short"})})).forEach((function(n,t){var i=t===f.getMonth();r.push(e.jsx("div",o({className:"st-datepicker-month ".concat(i?"selected":""),onClick:function(){return function(e){v(new Date(f.getFullYear(),e,1)),g("days")}(t)}},{children:n}),"month-".concat(t)))})),r),"years"===m&&function(){for(var n=[],t=f.getFullYear(),r=t-6,i=function(r){var i=r===t;n.push(e.jsx("div",o({className:"st-datepicker-year ".concat(i?"selected":""),onClick:function(){return function(e){v(new Date(e,f.getMonth(),1)),g("months")}(r)}},{children:r}),"year-".concat(r)))},a=r;a<r+12;a++)i(a);return n}()]})),e.jsx("div",o({className:"st-datepicker-footer"},{children:e.jsx("button",o({className:"st-datepicker-today-btn",onClick:function(){var e=new Date;v(e),a(e),null==s||s()}},{children:"Today"}))}))]}))},W=function(e){if(!e)return new Date;var n=e.toString().split("-").map(Number),t=n[0],r=n[1],o=n[2],i=new Date;return i.setFullYear(t),i.setMonth(r-1),i.setDate(o),isNaN(i.getTime())?new Date:i},D=function(t){var r=t.onBlur,i=t.onChange,a=t.open,s=t.setOpen,l=t.value;n.useEffect((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);var c=function(){r()};return e.jsx(R,o({open:a,onClose:c,setOpen:s,width:280},{children:e.jsx(M,{value:W(l),onChange:function(e){var n=e.toISOString().split("T")[0];i(n),s(!1),r()},onClose:c})}))},L=function(t){var r=t.onBlur,i=t.onChange,a=t.open,s=t.options,l=t.setOpen,c=t.value,u=n.useState(c||""),d=u[0],h=u[1];return e.jsx(R,o({open:a,onClose:function(){r()},setOpen:l,width:150},{children:e.jsx("div",o({className:"st-enum-dropdown-content"},{children:s.map((function(n){return e.jsx(E,o({isSelected:d===n.value,onClick:function(){return e=n.value,h(e),i(e),l(!1),void r();var e}},{children:n.label}),n.value)}))}))}))},T=function(n){var t=n.enumOptions,r=void 0===t?[]:t,o=n.onChange,i=n.setIsEditing,a=n.type,s=void 0===a?"string":a,l=n.value,c=function(){i(!1)};if("boolean"===s&&"boolean"==typeof l)return e.jsx(k,{onBlur:c,onChange:function(e){return o(e)},open:!0,setOpen:i,value:l});if("date"===s)return e.jsx(D,{onBlur:c,onChange:o,open:!0,setOpen:i,value:l});if("enum"===s){var u="string"==typeof l?l:"";return e.jsx(L,{onBlur:c,onChange:o,open:!0,options:r,setOpen:i,value:u})}if("number"===s&&"number"==typeof l)return e.jsx(F,{defaultValue:l,onBlur:c,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}});var d=null==l?"":String(l);return e.jsx(N,{defaultValue:d,onBlur:c,onChange:o})},H=0,B=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();(0===H||o-H>=r)&&(H=o,n(t))}},A=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(A);var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=A(e[t]));return n},O=Date.now(),P={screenX:0,screenY:0},q=function(e,n,t){void 0===t&&(t=[]);for(var r=0;r<e.length;r++){var o=e[r];if(o.accessor===n)return s(s([],t,!0),[r],!1);if(o.children&&o.children.length>0){var i=q(o.children,n,s(s([],t,!0),[r],!1));if(i)return i}}return null};var z=function(e){var t,r,o=e.draggedHeaderRef,i=e.headersRef,a=e.hoveredHeaderRef,s=e.onColumnOrderChange,l=e.onTableHeaderDragEnd,c=(t=i.current,r=n.useRef(t),n.useEffect((function(){JSON.stringify(r.current)!==JSON.stringify(t)&&(r.current=t)}),[t]),r.current);return{handleDragStart:function(e){o.current=e,O=Date.now()},handleDragOver:function(e){var n,t,r=e.event,s=e.hoveredHeader;if(r.preventDefault(),i.current){var u=r.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),d=r.screenX,h=r.screenY,f=Math.sqrt(Math.pow(d-P.screenX,2)+Math.pow(h-P.screenY,2));a.current=s;var v=i.current,p=q(v,(null===(n=o.current)||void 0===n?void 0:n.accessor)||""),m=q(v,s.accessor);if(p&&m){var g=p.length,w=m.length,x=m;if(g!==w){var C=w-g;C>0&&(x=m.slice(0,-C))}var b=function(e,n,t){var r=A(e),o=!1;function i(e,n){for(var t=e,r=0;r<n.length-1;r++)t=t[n[r]].children;return t[n[n.length-1]]}function a(e,n,t){for(var r=e,i=0;i<n.length-1;i++){if(!r[n[i]].children){o=!0;break}r=r[n[i]].children}r[n[n.length-1]]=t}var s=i(r,n);return a(r,n,i(r,t)),a(r,t,s),{newHeaders:r,emergencyBreak:o}}(v,p,x),y=b.newHeaders,j=b.emergencyBreak;if(!(u||s.accessor===(null===(t=o.current)||void 0===t?void 0:t.accessor)||null===o.current||f<10||0===p.length||0===x.length||JSON.stringify(y)===JSON.stringify(i.current)||j)){var I=Date.now();JSON.stringify(y)===JSON.stringify(c)&&(I-O<1500||f<40)||(O=I,P={screenX:d,screenY:h},l(y))}}}},handleDragEnd:function(){o.current=null,a.current=null,null==s||s(i.current)}}},U=function(e){var n=e.content,t=e.header;return"boolean"==typeof n?n?"True":"False":"date"===t.type&&null!==n&&("string"==typeof n||"number"==typeof n||"object"==typeof n&&n instanceof Date)?new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):n},Y=n.forwardRef((function(t,r){var i=t.borderClass,a=t.colIndex,s=t.header,c=t.isHighlighted,d=t.isInitialFocused,h=t.nestedIndex;t.onExpandRowClick;var f=t.rowIndex,v=t.visibleRow,m=C(),g=m.cellRegistry,w=m.cellUpdateFlash,x=m.draggedHeaderRef,b=m.expandIcon,y=m.expandedRows,j=m.handleMouseDown,I=m.handleMouseOver,S=m.headersRef,R=m.hoveredHeaderRef,E=m.onCellEdit,k=m.onTableHeaderDragEnd,N=m.rowGrouping,F=m.rowIdAccessor,M=m.setExpandedRows,W=m.theme,D=m.useOddColumnBackground,L=v.depth,H=v.row,A=n.useState(H[s.accessor]),O=A[0],P=A[1],q=n.useState(!1),Y=q[0],G=q[1],K=n.useState(!1),X=K[0],V=K[1],J=n.useRef(null),$=p(H,f,F),_=N&&N[L],Q=!!_&&function(e,n){if(!n)return!1;var t=e[n];return Array.isArray(t)&&t.length>0}(H,_),Z=y.has(String($)),ee=z({draggedHeaderRef:x,headersRef:S,hoveredHeaderRef:R,onTableHeaderDragEnd:k}).handleDragOver,ne=B(),te="cell-".concat(f,"-").concat(a),re=u({rowId:$,accessor:s.accessor});n.useEffect((function(){if(g){var e="".concat($,"-").concat(s.accessor);return g.set(e,{updateContent:function(e){O!==e?(P(e),w&&(V(!0),J.current&&clearTimeout(J.current),J.current=setTimeout((function(){V(!1)}),800))):P(e)}}),function(){g.delete(e),J.current&&clearTimeout(J.current)}}}),[g,w,$,s.accessor,O]),n.useEffect((function(){if(X){var e=setTimeout((function(){V(!1)}),850);return function(){return clearTimeout(e)}}}),[X]),n.useEffect((function(){P(H[s.accessor])}),[H,s.accessor]);var oe="boolean"===s.type||"date"===s.type||"enum"===s.type,ie=Boolean(null==s?void 0:s.isEditable),ae="st-cell ".concat(L>0&&s.expandable?"st-cell-depth-".concat(L):""," ").concat(c?d?"st-cell-selected-first ".concat(i):"st-cell-selected ".concat(i):""," ").concat(ie?"clickable":""," ").concat(X?"st-cell-updating":""," ").concat(D?h%2==0?"even-column":"odd-column":""),se=n.useCallback((function(e){P(e),H[s.accessor]=e,null==E||E({accessor:s.accessor,newValue:e,row:H,rowIndex:f})}),[s.accessor,E,H,f]),le=n.useCallback((function(){M((function(e){var n=new Set(e),t=String($);return n.has(t)?n.delete(t):n.add(t),n}))}),[$,M]);return Y&&!oe?e.jsx("div",o({className:"st-cell-editing",id:l({accessor:s.accessor,rowIndex:f+1}),onMouseDown:function(e){return e.stopPropagation()},onKeyDown:function(e){return e.stopPropagation()}},{children:e.jsx(T,{enumOptions:s.enumOptions,onChange:se,setIsEditing:G,type:s.type,value:O})})):e.jsxs("div",o({className:ae,id:te,onDoubleClick:function(){return s.isEditable&&G(!0)},onMouseDown:function(){Y||j({rowIndex:f,colIndex:a,rowId:$})},onMouseOver:function(){Y||I({rowIndex:f,colIndex:a,rowId:$})},onDragOver:function(e){return ne({callback:ee,callbackProps:{event:e,hoveredHeader:s},limit:50})},onKeyDown:function(e){Y||"F2"!==e.key&&"Enter"!==e.key||!s.isEditable||Y||(e.preventDefault(),G(!0))},ref:r,"data-row-index":f,"data-col-index":a,"data-row-id":$,"data-accessor":s.accessor},{children:[s.expandable&&Q?e.jsx("div",o({className:"st-icon-container st-expand-icon-container ".concat(Z?"expanded":"collapsed"),onClick:le},{children:b})):null,e.jsx("span",o({className:"st-cell-content ".concat("right"===s.align?"right-aligned":"center"===s.align?"center-aligned":"left-aligned")},{children:e.jsx("span",{children:s.cellRenderer?s.cellRenderer({accessor:s.accessor,colIndex:a,row:H,theme:W}):U({content:O,header:s})})})),Y&&oe&&e.jsx(T,{enumOptions:s.enumOptions,onChange:se,setIsEditing:G,type:s.type,value:O})]}),re)})),G=function(n){var t=n.columnIndexStart,r=n.columnIndices,o=n.headers,i=n.hiddenColumns,a=n.onExpandRowClick,s=n.pinned,u=n.rowIndex,d=n.rowIndices,h=n.visibleRow,f=o.filter((function(e){return c({hiddenColumns:i,header:e,pinned:s})}));return e.jsx(e.Fragment,{children:f.map((function(n,c){return e.jsx(K,{columnIndices:r,header:n,headers:o,hiddenColumns:i,nestedIndex:c+(null!=t?t:0),onExpandRowClick:a,pinned:s,rowIndex:u,rowIndices:d,visibleRow:h},l({accessor:n.accessor,rowIndex:u+1}))}))})},K=function(t){var r=t.columnIndices,o=t.header,i=t.headers,a=t.hiddenColumns,s=t.nestedIndex,u=t.onExpandRowClick,d=t.pinned,h=t.rowIndex,f=t.rowIndices,v=t.visibleRow,m=r[o.accessor],g=C(),w=g.getBorderClass,x=g.isSelected,b=g.isInitialFocusedCell,y=g.rowIdAccessor;if(o.children){var j=o.children.filter((function(e){return c({hiddenColumns:a,header:e,pinned:d})}));return e.jsx(n.Fragment,{children:j.map((function(n){return e.jsx(K,{columnIndices:r,header:n,headers:i,hiddenColumns:a,nestedIndex:s,onExpandRowClick:u,pinned:d,rowIndex:h,rowIndices:f,visibleRow:v},l({accessor:n.accessor,rowIndex:h+1}))}))})}var I=p(v.row,h,y),S={rowIndex:h,colIndex:m,rowId:I},R=w(S),E=x(S),k=b(S);return e.jsx(Y,{borderClass:R,colIndex:m,header:o,isHighlighted:E,isInitialFocused:k,nestedIndex:s,onExpandRowClick:u,rowIndex:h,visibleRow:v},l({accessor:o.accessor,rowIndex:h+1}))},X=function(n){var t=n.columnIndices,r=n.columnIndexStart,i=n.gridTemplateColumns,a=n.headers,s=n.hiddenColumns,l=n.hoveredIndex,c=n.index,u=n.onExpandRowClick,d=n.pinned,h=n.rowHeight,f=n.rowIndices,v=n.setHoveredIndex,p=n.visibleRow,m=C().useHoverRowBackground,g=p.position,w=g%2==0;return e.jsx("div",o({className:"st-row ".concat(w?"even":"odd"," ").concat(l===c&&m?"hovered":""),onMouseEnter:function(){v(c)},style:{gridTemplateColumns:i,top:S({position:g,rowHeight:h}),height:"".concat(h,"px")}},{children:e.jsx(G,{columnIndexStart:r,columnIndices:t,headers:a,hiddenColumns:s,onExpandRowClick:u,pinned:d,rowIndex:c,rowIndices:f,visibleRow:p},c)}))},V=function(t){var r=t.displayStrongBorder,i=t.position,a=t.rowHeight,s=t.templateColumns,l=t.rowIndex,c=n.useRef(null);return e.jsx("div",o({className:"st-row-separator ".concat(r?"st-last-group-row":""),onMouseDown:function(e){if(void 0!==l){for(var n=e.currentTarget.getBoundingClientRect(),t=e.clientX-n.left,r=s.split(" ").map((function(e){if(e.includes("px"))return parseFloat(e);if(e.includes("fr")){var t=s.split(" ").filter((function(e){return e.includes("fr")})).length;return n.width/t}return 100})),o=0,i=0,a=0;a<r.length;a++){if(t<=o+r[a]){i=a;break}o+=r[a],i=a}var u="cell-".concat(l+1,"-").concat(i+1),d=document.getElementById(u);if(d){c.current=d;var h=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0});d.dispatchEvent(h)}}},onMouseUp:function(){if(c.current){var e=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0});c.current.dispatchEvent(e),c.current=null}},style:{gridTemplateColumns:s,top:I({position:i,rowHeight:a})}},{children:e.jsx("div",{style:{gridColumn:"1 / -1"}})}))},J=n.createContext(void 0),$=["default"],_=function(e){var t=e.childRef,r=e.children,o=function(){var e=n.useContext(J);if(!e)throw new Error("useScrollSyncContext must be used within a ScrollSyncProvider");return e}(),i=o.registerPane,a=o.unregisterPane;return n.useEffect((function(){return t.current&&i(t.current,$),function(){t.current&&a(t.current,$)}}),[t,i,a]),n.cloneElement(r,{ref:function(e){t.current=e}})},Q=function(n){var t=n.condition,r=n.wrapper,o=n.children;return e.jsx(e.Fragment,{children:t?r(o):e.jsx(e.Fragment,{children:o})})},Z=function(t){var r=t.columnIndexStart,i=t.columnIndices,a=t.headers,s=t.hiddenColumns,l=t.hoveredIndex,c=t.onExpandRowClick,u=t.pinned,d=t.ref,h=t.rowHeight,f=t.rowIndices,v=t.setHoveredIndex,p=t.templateColumns,m=t.totalHeight,g=t.visibleRows,w=t.width,x=u?"st-body-pinned-".concat(u):"st-body-main";return e.jsx(Q,o({condition:!u,wrapper:function(n){return e.jsx(_,o({childRef:d},{children:n}))}},{children:e.jsx("div",o({className:x,ref:d,style:o({position:"relative",height:"".concat(m,"px"),width:w},!u&&{flexGrow:1})},{children:g.map((function(t,o){return e.jsxs(n.Fragment,{children:[0!==o&&e.jsx(V,{displayStrongBorder:t.isLastGroupRow,position:t.position,rowHeight:h,templateColumns:p,rowIndex:o-1}),e.jsx(X,{columnIndexStart:r,columnIndices:i,gridTemplateColumns:p,headers:a,hiddenColumns:s,hoveredIndex:l,index:o,onExpandRowClick:c,pinned:u,rowHeight:h,rowIndices:f,setHoveredIndex:v,visibleRow:t})]},t.position)}))}))}))};function ee(e){var n=e.headersRef,t=e.hiddenColumns,r=e.pinnedLeftColumns,o=e.pinnedRightColumns,i={},a=0,s=function(e,n){void 0===n&&(n=!1),n||a++,i[e.accessor]=a,e.children&&e.children.length>0&&e.children.filter((function(e){return c({hiddenColumns:t,header:e})})).forEach((function(e,n){s(e,0===n)}))};return r.forEach((function(e,n){s(e,0===n)})),n.current.filter((function(e){return!e.pinned&&c({hiddenColumns:t,header:e})})).forEach((function(e,n){var t=0===n&&0===r.length;s(e,t)})),o.forEach((function(e){s(e,!1)})),i}var ne=function(t){var r=t.headerContainerRef,i=t.mainTemplateColumns,a=t.pinnedLeftColumns,s=t.pinnedLeftTemplateColumns,l=t.pinnedLeftWidth,c=t.pinnedRightColumns,u=t.pinnedRightTemplateColumns,d=t.pinnedRightWidth,h=t.setScrollTop,f=t.tableRows,v=t.visibleRows,m=C(),g=m.headersRef,w=m.hiddenColumns,x=m.mainBodyRef,b=m.rowHeight,y=m.rowIdAccessor,j=m.scrollbarWidth,I=m.tableBodyContainerRef,S=n.useState(null),R=S[0],E=S[1];!function(e){var t=e.headerContainerRef,r=e.mainSectionRef,o=e.scrollbarWidth,i=n.useState(!1),a=i[0],s=i[1];n.useEffect((function(){var e=null==t?void 0:t.current;if(a&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(o,"px")),function(){e.classList.remove("st-header-scroll-padding")}}),[t,a,o]),n.useEffect((function(){var e=null==t?void 0:t.current,n=null==r?void 0:r.current;if(n&&e){var o=function(){if(n){var e=n.scrollHeight>n.clientHeight;s(e)}};o();var i=new ResizeObserver((function(){o()}));return i.observe(n),function(){n&&i.unobserve(n)}}}),[t,r])}({headerContainerRef:r,mainSectionRef:I,scrollbarWidth:j});var k=n.useRef(null),N=function(e){return e.length}(f),F=N*(b+1)-1,M=n.useMemo((function(){return ee({headersRef:g,hiddenColumns:w,pinnedLeftColumns:a,pinnedRightColumns:c})}),[g,w,a,c]),W=n.useMemo((function(){var e={};return v.forEach((function(n,t){var r=String(p(n.row,t,y));e[r]=t})),e}),[v,y]),D=function(e){console.log("Row expansion not yet implemented for new structure:",e)},L={columnIndices:M,headerContainerRef:r,headers:g.current,hiddenColumns:w,hoveredIndex:R,rowHeight:b,rowIndices:W,setHoveredIndex:E,visibleRows:v};return e.jsxs("div",o({className:"st-body-container",onMouseLeave:function(){return E(null)},onScroll:function(e){var n=e.currentTarget.scrollTop;k.current&&cancelAnimationFrame(k.current),k.current=requestAnimationFrame((function(){h(n)}))},ref:I},{children:[a.length>0&&e.jsx(Z,o({},L,{onExpandRowClick:D,pinned:"left",templateColumns:s,totalHeight:F,width:l})),e.jsx(Z,o({},L,{columnIndexStart:a.length,onExpandRowClick:D,ref:x,templateColumns:i,totalHeight:F})),c.length>0&&e.jsx(Z,o({},L,{columnIndexStart:a.length+i.length,onExpandRowClick:D,pinned:"right",templateColumns:u,totalHeight:F,width:d}))]}))},te=function(e){return void 0===e&&(e=0),e?e+1:0},re=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=e.setMainBodyWidth,i=e.setPinnedLeftWidth,a=e.setPinnedRightWidth,s=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=n.pinned,i=0;return t.forEach((function(e){e.hide||e.pinned!==o||(e.accessor===n.accessor?i+=r:d(e).forEach((function(e){e.hide||(e.accessor===n.accessor?i+=r:i+=h(e))})))})),n.pinned?te(i):i}({header:n,headers:t,newWidth:r});"left"===n.pinned?i(s):"right"===n.pinned?a(s):n.pinned||o(s)},oe=function(e){var n=e.event,t=e.forceUpdate,r=e.gridColumnEnd,o=e.gridColumnStart,i=e.header,a=e.headersRef,s=e.setMainBodyWidth,l=e.setPinnedLeftWidth,c=e.setPinnedRightWidth,u=e.startWidth;n.preventDefault();var h="clientX"in n?n.clientX:n.touches[0].clientX,p="touches"in n;if(i&&!i.hide){var m=v(i),g=r-o>1,w=g?d(i):[i],x=function(e){var n="right"===i.pinned?h-e:e-h;if(g&&w.length>1)ie({delta:n,header:i,headersRef:a,leafHeaders:w,minWidth:m,setMainBodyWidth:s,setPinnedLeftWidth:l,setPinnedRightWidth:c,startWidth:u});else{var r=Math.max(u+n,m);i.width=r,re({header:i,headers:a.current,newWidth:r,setMainBodyWidth:s,setPinnedLeftWidth:l,setPinnedRightWidth:c})}a.current.forEach((function(e){f(e)})),t()};if(p){var C=function(e){var n=e.touches[0];x(n.clientX)},b=function(){document.removeEventListener("touchmove",C),document.removeEventListener("touchend",b)};document.addEventListener("touchmove",C),document.addEventListener("touchend",b)}else{var y=function(e){x(e.clientX)},j=function(){document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",j)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",j)}}},ie=function(e){var n=e.delta,t=e.header,r=e.headersRef,o=e.leafHeaders,i=e.minWidth,a=e.setMainBodyWidth,s=e.setPinnedLeftWidth,l=e.setPinnedRightWidth,c=e.startWidth,u=o.reduce((function(e,n){return Math.min(e,v(n))}),40),d=o.reduce((function(e,n){return e+("number"==typeof n.width?n.width:150)}),0),h=Math.max(c+n,u);re({header:t,headers:r.current,newWidth:h,setMainBodyWidth:a,setPinnedLeftWidth:s,setPinnedRightWidth:l});var f=h-d;o.forEach((function(e){var n="number"==typeof e.width?e.width:150,t=f*(n/d),r=Math.max(n+t,i);e.width=r}))},ae=function(n){var t=n.className,r=n.style;return e.jsx("svg",o({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:t,style:o({height:"1em"},r)},{children:e.jsx("path",{d:"M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"})}))},se={equals:"Equals",notEquals:"Not equals",contains:"Contains",notContains:"Does not contain",startsWith:"Starts with",endsWith:"Ends with",greaterThan:"Greater than",lessThan:"Less than",greaterThanOrEqual:"Greater than or equal",lessThanOrEqual:"Less than or equal",between:"Between",notBetween:"Not between",before:"Before",after:"After",in:"Is one of",notIn:"Is not one of",isEmpty:"Is empty",isNotEmpty:"Is not empty"},le=function(e){switch(e){case"string":return["equals","notEquals","contains","notContains","startsWith","endsWith","isEmpty","isNotEmpty"];case"number":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","notBetween","isEmpty","isNotEmpty"];case"boolean":return["equals","isEmpty","isNotEmpty"];case"date":return["equals","notEquals","before","after","between","notBetween","isEmpty","isNotEmpty"];case"enum":return["in","notIn","isEmpty","isNotEmpty"];default:return["equals","notEquals","isEmpty","isNotEmpty"]}},ce=function(e){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(e)},ue=function(e){return["between","notBetween","in","notIn"].includes(e)},de=function(e){return["isEmpty","isNotEmpty"].includes(e)},he=function(n){var t=n.children;return e.jsx("div",o({className:"st-filter-container"},{children:t}))},fe=function(){return e.jsx("svg",o({className:"st-custom-select-arrow",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},ve=function(t){var r=t.value,i=t.onChange,a=t.options,s=t.placeholder,l=void 0===s?"Select...":s,c=t.className,u=void 0===c?"":c,d=t.disabled,h=void 0!==d&&d,f=n.useState(!1),v=f[0],p=f[1],m=n.useState(-1),g=m[0],w=m[1],x=n.useRef(null),C=a.find((function(e){return e.value===r}));n.useEffect((function(){var e=function(e){if(v)switch(e.key){case"ArrowDown":e.preventDefault(),w((function(e){return e<a.length-1?e+1:0}));break;case"ArrowUp":e.preventDefault(),w((function(e){return e>0?e-1:a.length-1}));break;case"Enter":e.preventDefault(),g>=0&&(i(a[g].value),p(!1),w(-1));break;case"Escape":e.preventDefault(),p(!1),w(-1)}};if(v)return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}}),[v,g,a,i]);return e.jsxs("div",o({ref:x,className:"st-custom-select ".concat(u," ").concat(h?"st-custom-select-disabled":""," ").concat(v?"st-custom-select-open":"").trim()},{children:[e.jsxs("button",o({type:"button",className:"st-custom-select-trigger",onClick:function(){if(!h)if(p(!v),v)w(-1);else{var e=a.findIndex((function(e){return e.value===r}));w(e>=0?e:0)}},disabled:h,"aria-haspopup":"listbox","aria-expanded":v,"aria-labelledby":"select-label"},{children:[e.jsx("span",o({className:"st-custom-select-value"},{children:C?C.label:l})),e.jsx(fe,{})]})),e.jsx(R,o({open:v,setOpen:p,onClose:function(){p(!1),w(-1)},positioning:"absolute",overflow:"auto"},{children:e.jsx("div",o({className:"st-custom-select-options",role:"listbox"},{children:a.map((function(n,t){return e.jsx("div",o({className:"st-custom-select-option ".concat(n.value===r?"st-custom-select-option-selected":""," ").concat(t===g?"st-custom-select-option-focused":"").trim(),role:"option","aria-selected":n.value===r,onClick:function(){return e=n.value,i(e),p(!1),void w(-1);var e}},{children:n.label}),n.value)}))}))}))]}))},pe=function(n){var t=n.value,r=n.onChange,i=n.operators.map((function(e){return{value:e,label:se[e]}}));return e.jsx("div",o({className:"st-filter-section"},{children:e.jsx(ve,{value:t,onChange:function(e){r(e)},options:i})}))},me=function(n){var t=n.type,r=void 0===t?"text":t,o=n.value,i=n.onChange,a=n.placeholder,s=n.autoFocus,l=void 0!==s&&s,c=n.className,u=void 0===c?"":c;return e.jsx("input",{type:r,value:o,onChange:function(e){return i(e.target.value)},placeholder:a,autoFocus:l,className:"st-filter-input ".concat(u).trim()})},ge=function(n){var t=n.children,r=n.className,i=void 0===r?"":r;return e.jsx("div",o({className:"st-filter-section ".concat(i).trim()},{children:t}))},we=function(n){var t=n.onApply,r=n.onClear,i=n.canApply,a=n.showClear;return e.jsxs("div",o({className:"st-filter-actions"},{children:[e.jsx("button",o({onClick:t,disabled:!i,className:"st-filter-button st-filter-button-apply ".concat(i?"":"st-filter-button-disabled")},{children:"Apply"})),a&&r&&e.jsx("button",o({onClick:r,className:"st-filter-button st-filter-button-clear"},{children:"Clear"}))]}))},xe=function(t){var r=t.header,i=t.currentFilter,a=t.onApplyFilter,s=t.onClearFilter,l=n.useState((null==i?void 0:i.operator)||"contains"),c=l[0],u=l[1],d=n.useState(String((null==i?void 0:i.value)||"")),h=d[0],f=d[1],v=le("string");n.useEffect((function(){i?(u(i.operator),f(String(i.value||""))):(u("contains"),f(""))}),[i]);var p=de(c)||h.trim();return e.jsxs(he,{children:[e.jsx(pe,{value:c,onChange:u,operators:v}),ce(c)&&e.jsx(ge,{children:e.jsx(me,{type:"text",value:h,onChange:f,placeholder:"Filter...",autoFocus:!0})}),e.jsx(we,{onApply:function(){var e=o({accessor:r.accessor,operator:c},ce(c)&&{value:h});a(e)},onClear:s,canApply:!!p,showClear:!!i})]})},Ce=function(t){var r,o,i=t.header,a=t.currentFilter,s=t.onApplyFilter,l=t.onClearFilter,c=n.useState((null==a?void 0:a.operator)||"equals"),u=c[0],d=c[1],h=n.useState(String((null==a?void 0:a.value)||"")),f=h[0],v=h[1],p=n.useState(String((null===(r=null==a?void 0:a.values)||void 0===r?void 0:r[0])||"")),m=p[0],g=p[1],w=n.useState(String((null===(o=null==a?void 0:a.values)||void 0===o?void 0:o[1])||"")),x=w[0],C=w[1],b=le("number");n.useEffect((function(){var e,n;a?(d(a.operator),v(String(a.value||"")),g(String((null===(e=a.values)||void 0===e?void 0:e[0])||"")),C(String((null===(n=a.values)||void 0===n?void 0:n[1])||""))):(d("equals"),v(""),g(""),C(""))}),[a]);return e.jsxs(he,{children:[e.jsx(pe,{value:u,onChange:d,operators:b}),ce(u)&&e.jsx(ge,{children:e.jsx(me,{type:"number",value:f,onChange:v,placeholder:"Enter number...",autoFocus:!0})}),ue(u)&&e.jsxs(ge,{children:[e.jsx(me,{type:"number",value:m,onChange:g,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from"}),e.jsx(me,{type:"number",value:x,onChange:C,placeholder:"To..."})]}),e.jsx(we,{onApply:function(){var e={accessor:i.accessor,operator:u};ce(u)?e.value=parseFloat(f):ue(u)&&(e.values=[parseFloat(m.toString()),parseFloat(x.toString())]),s(e)},onClear:l,canApply:!!de(u)||(ce(u)?""!==f.trim():!!ue(u)&&""!==String(m).trim()&&""!==String(x).trim()),showClear:!!a})]})},be=function(n){var t=n.value,r=n.onChange,o=n.options,i=n.className,a=void 0===i?"":i,s=n.placeholder;return e.jsx(ve,{value:t,onChange:r,options:o,className:a,placeholder:s})},ye=function(t){var r=t.header,o=t.currentFilter,i=t.onApplyFilter,a=t.onClearFilter,s=n.useState((null==o?void 0:o.operator)||"equals"),l=s[0],c=s[1],u=n.useState(void 0!==(null==o?void 0:o.value)?String(o.value):"true"),d=u[0],h=u[1],f=le("boolean");n.useEffect((function(){o?(c(o.operator),h(void 0!==o.value?String(o.value):"true")):(c("equals"),h("true"))}),[o]);var v=de(l)||""!==d;return e.jsxs(he,{children:[e.jsx(pe,{value:l,onChange:c,operators:f}),ce(l)&&e.jsx(ge,{children:e.jsx(be,{value:d,onChange:h,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),e.jsx(we,{onApply:function(){var e={accessor:r.accessor,operator:l};ce(l)&&(e.value="true"===d),i(e)},onClear:a,canApply:v,showClear:!!o})]})},je=function(t){var r,i,a=t.header,s=t.currentFilter,l=t.onApplyFilter,c=t.onClearFilter,u=n.useState((null==s?void 0:s.operator)||"equals"),d=u[0],h=u[1],f=n.useState((null==s?void 0:s.value)?String(s.value):""),v=f[0],p=f[1],m=n.useState((null===(r=null==s?void 0:s.values)||void 0===r?void 0:r[0])?String(s.values[0]):""),g=m[0],w=m[1],x=n.useState(String((null===(i=null==s?void 0:s.values)||void 0===i?void 0:i[1])||"")),C=x[0],b=x[1],y=le("date");n.useEffect((function(){var e,n;s?(h(s.operator),p(String(s.value||"")),w(String((null===(e=s.values)||void 0===e?void 0:e[0])||"")),b(String((null===(n=s.values)||void 0===n?void 0:n[1])||""))):(h("equals"),p(""),w(""),b(""))}),[s]);var j=function(t){var r=t.value,i=t.onChange,a=t.placeholder,s=t.autoFocus,l=t.className,c=n.useState(!1),u=c[0],d=c[1],h=n.useState(""),f=h[0],v=h[1],p=n.useRef(null);n.useEffect((function(){if(r){var e=new Date(r);isNaN(e.getTime())||v(e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else v("")}),[r]),n.useEffect((function(){s&&p.current&&p.current.focus()}),[s]);var m=r?new Date(r):new Date;return e.jsxs("div",o({className:"st-date-input-container",style:{position:"relative"}},{children:[e.jsx("input",{ref:p,type:"text",value:f,placeholder:a,onClick:function(){d(!u)},onKeyDown:function(e){"Enter"===e.key||" "===e.key?(e.preventDefault(),d(!u)):"Escape"===e.key&&d(!1)},readOnly:!0,className:"st-filter-input ".concat(l||""),style:{cursor:"pointer"}}),e.jsx(R,o({open:u,setOpen:d,onClose:function(){d(!1)},positioning:"absolute",overflow:"visible"},{children:e.jsx(M,{value:m,onChange:function(e){var n=e.toISOString().split("T")[0];i(n),d(!1)},onClose:function(){return d(!1)}})}))]}))};return e.jsxs(he,{children:[e.jsx(pe,{value:d,onChange:h,operators:y}),ce(d)&&e.jsx(ge,{children:e.jsx(j,{value:v,onChange:p,placeholder:"Select date...",autoFocus:!0})}),ue(d)&&e.jsxs(ge,{children:[e.jsx(j,{value:g,onChange:w,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),e.jsx(j,{value:C,onChange:b,placeholder:"To date..."})]}),e.jsx(we,{onApply:function(){var e={accessor:a.accessor,operator:d};ce(d)?e.value=v:ue(d)&&(e.values=[g,C]),l(e)},onClear:c,canApply:!!de(d)||(ce(d)?""!==v.trim():!!ue(d)&&""!==g.trim()&&""!==C.trim()),showClear:!!s})]})},Ie=function(n){var t=n.className,r=n.style;return e.jsx("svg",o({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:t,style:o({height:"10px"},r)},{children:e.jsx("path",{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})}))},Se=function(n){var t=n.checked,r=void 0!==t&&t,i=n.children,a=n.onChange;return e.jsxs("label",o({className:"st-checkbox-label"},{children:[e.jsx("input",{checked:r,className:"st-checkbox-input",onChange:function(){a&&a(!r)},type:"checkbox"}),e.jsx("span",o({className:"st-checkbox-custom ".concat(r?"st-checked":"")},{children:r&&e.jsx(Ie,{className:"st-checkbox-checkmark"})})),i]}))},Re=function(t){var r=t.header,i=t.currentFilter,a=t.onApplyFilter,l=t.onClearFilter,c=n.useMemo((function(){return r.enumOptions||[]}),[r.enumOptions]),u=n.useMemo((function(){return c.map((function(e){return e.value}))}),[c]),d=n.useState((null==i?void 0:i.values)?i.values.map(String):u),h=d[0],f=d[1];n.useEffect((function(){f(i?i.values?i.values.map(String):[]:u)}),[i,u]);var v=h.length===u.length;return e.jsxs(he,{children:[e.jsx(ge,{children:e.jsxs("div",o({className:"st-enum-filter-options"},{children:[e.jsx("div",o({className:"st-enum-select-all"},{children:e.jsx(Se,o({checked:v,onChange:function(e){f(e?u:[])}},{children:e.jsx("span",o({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),c.map((function(n){return e.jsx(Se,o({checked:h.includes(n.value),onChange:function(){return e=n.value,void f((function(n){return n.includes(e)?n.filter((function(n){return n!==e})):s(s([],n,!0),[e],!1)}));var e}},{children:e.jsx("span",o({className:"st-enum-option-label"},{children:n.label}))}),n.value)}))]}))}),e.jsx(we,{onApply:function(){if(h.length!==u.length){var e={accessor:r.accessor,operator:"in",values:h};a(e)}else l()},onClear:l,canApply:0!==h.length&&h.length!==u.length,showClear:!!i})]})},Ee=function(n){var t=n.header,r=n.currentFilter,o=n.onApplyFilter,i=n.onClearFilter;return e.jsx(e.Fragment,{children:function(){switch(t.type){case"number":return e.jsx(Ce,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i});case"boolean":return e.jsx(ye,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i});case"date":return e.jsx(je,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i});case"enum":return e.jsx(Re,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i});default:return e.jsx(xe,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i})}}()})},ke=n.forwardRef((function(t,r){var i,a,c=t.colIndex,u=t.forceHeadersUpdate,d=t.gridColumnEnd,h=t.gridColumnStart,f=t.gridRowEnd,v=t.gridRowStart,p=t.header,m=t.reverse,g=t.sort,w=n.useState(!1),x=w[0],b=w[1],y=C(),j=y.columnReordering,I=y.columnResizing,S=y.draggedHeaderRef,E=y.filters,k=y.forceUpdate,N=y.handleApplyFilter,F=y.handleClearFilter,M=y.headersRef,W=y.hoveredHeaderRef,D=y.onColumnOrderChange,L=y.onSort,T=y.onTableHeaderDragEnd,H=y.rowHeight,A=y.selectColumns,O=y.selectableColumns,P=y.setInitialFocusedCell,q=y.setMainBodyWidth,U=y.setPinnedLeftWidth,Y=y.setPinnedRightWidth,G=y.setSelectedCells,K=y.setSelectedColumns,X=y.sortDownIcon,V=y.sortUpIcon,J=Boolean(null==p?void 0:p.isSortable),$=Boolean(null==p?void 0:p.filterable),_=E[p.accessor],Q="st-header-cell ".concat(p.accessor===(null===(i=W.current)||void 0===i?void 0:i.accessor)?"st-hovered":""," ").concat((null===(a=S.current)||void 0===a?void 0:a.accessor)===p.accessor?"st-dragging":""," ").concat(J?"clickable":""," ").concat(j&&!J?"columnReordering":""," ").concat(p.children?"parent":""),Z=z({draggedHeaderRef:S,headersRef:M,hoveredHeaderRef:W,onColumnOrderChange:D,onTableHeaderDragEnd:T}),ee=Z.handleDragStart,ne=Z.handleDragEnd,te=Z.handleDragOver,re=B(),ie=function(e){var n=e.event,t=e.header;if(O){var r=function(e,n){if(!e.children||0===e.children.length)return[n];var t=[],r=function(e,n){if(!e.children||0===e.children.length)return t.push(n),n+1;for(var o=n,i=0,a=e.children;i<a.length;i++){var s=a[i];o=r(s,o)}return o};return r(e,n),t}(t,c);return n.shiftKey&&A?K((function(e){if(0===e.size)return new Set(r);var n=r[0],t=Array.from(e).sort((function(e,n){return e-n})),o=t[0],i=Math.abs(n-o);t.forEach((function(e){var t=Math.abs(n-e);t<i&&(i=t,o=e)}));var a,l,c,u,d=s(s([],(a=o,l=n,c=Math.min(a,l),u=Math.max(a,l),Array.from({length:u-c+1},(function(e,n){return c+n}))),!0),r,!0);return new Set(s(s([],Array.from(e),!0),d,!0))})):A&&A(r),G(new Set),void P(null)}t.isSortable&&L(c,t.accessor)};if(n.useEffect((function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}}),[]),!p)return null;var se=I&&e.jsx("div",o({className:"st-header-resize-handle-container",onMouseDown:function(e){var n;re({callback:oe,callbackProps:{event:e.nativeEvent,forceUpdate:k,gridColumnEnd:d,gridColumnStart:h,header:p,headersRef:M,setMainBodyWidth:q,setPinnedLeftWidth:U,setPinnedRightWidth:Y,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})},onTouchStart:function(e){var n;re({callback:oe,callbackProps:{event:e,forceUpdate:k,gridColumnEnd:d,gridColumnStart:h,header:p,headersRef:M,setMainBodyWidth:q,setPinnedLeftWidth:U,setPinnedRightWidth:Y,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}},{children:e.jsx("div",{className:"st-header-resize-handle"})})),le=g&&g.key.accessor===p.accessor&&e.jsxs("div",o({className:"st-icon-container",onClick:function(e){return ie({event:e,header:p})}},{children:["ascending"===g.direction&&V&&V,"descending"===g.direction&&X&&X]})),ce=$&&e.jsxs("div",o({className:"st-icon-container",onClick:function(e){e.stopPropagation(),b(!x)}},{children:[e.jsx(ae,{className:"st-header-icon",style:{fill:_?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),e.jsx(R,o({open:x,overflow:"visible",setOpen:b,onClose:function(){return b(!1)}},{children:e.jsx(Ee,{header:p,currentFilter:_,onApplyFilter:function(e){N(e),b(!1)},onClearFilter:function(){F(p.accessor),b(!1)}})}))]}));return e.jsxs("div",o({className:Q,id:l({accessor:p.accessor,rowIndex:0}),onDragOver:function(e){re({callback:te,callbackProps:{event:e,hoveredHeader:p},limit:50})},ref:r,style:o(o({gridRowStart:v,gridRowEnd:f,gridColumnStart:h,gridColumnEnd:d},d-h>1?{}:{width:p.width}),f-v>1?{}:{height:H})},{children:[m&&se,"right"===p.align&&ce,"right"===p.align&&le,e.jsx("div",o({className:"st-header-label",draggable:j&&!p.disableReorder,onClick:function(e){return ie({event:e,header:p})},onDragEnd:function(e){e.preventDefault(),ne(),u()},onDragStart:function(e){j&&p&&function(e){ee(e)}(p)}},{children:e.jsx("span",o({className:"st-header-label-text ".concat("right"===p.align?"right-aligned":"center"===p.align?"center-aligned":"left-aligned")},{children:null==p?void 0:p.label}))})),"right"!==p.align&&le,"right"!==p.align&&ce,!m&&se]}))})),Ne=function(t){var r=t.columnIndices,i=t.gridTemplateColumns,a=t.handleScroll,s=t.headersRef,l=t.hiddenColumns,u=t.maxDepth,d=t.pinned,h=t.sectionRef,f=t.sort,v=n.useReducer((function(e){return e+1}),0)[1],p=n.useMemo((function(){var e=[],n=1,t=function(o,i,a){var s,h;if(void 0===a&&(a=!1),!c({hiddenColumns:l,header:o,pinned:d}))return 0;a||n++;var f=null!==(h=null===(s=o.children)||void 0===s?void 0:s.filter((function(e){return c({hiddenColumns:l,header:e,pinned:d})})).length)&&void 0!==h?h:0,v=n,p=f>0?v+f:v+1,m=i,g=f>0?i+1:u+1;if(e.push({header:o,gridColumnStart:v,gridColumnEnd:p,gridRowStart:m,gridRowEnd:g,colIndex:r[o.accessor]}),o.children){var w=!0;o.children.forEach((function(e){c({hiddenColumns:l,header:e,pinned:d})&&(t(e,i+1,w),w=!1)}))}return p-v},o=s.current.filter((function(e){return c({hiddenColumns:l,header:e,pinned:d})})),i=!0;return o.forEach((function(e){t(e,1,i),i=!1})),e}),[s,l,u,d,r]);return e.jsx(Q,o({condition:!d,wrapper:function(n){return e.jsx(_,o({childRef:h},{children:n}))}},{children:e.jsx("div",o({className:"st-header-".concat(d?"pinned-".concat(d):"main")},a&&{onScroll:a},{ref:h,style:{gridTemplateColumns:i,display:"grid",position:"relative"}},{children:e.jsx(e.Fragment,{children:p.map((function(t){return e.jsx(ke,{colIndex:t.colIndex,forceHeadersUpdate:v,gridColumnEnd:t.gridColumnEnd,gridColumnStart:t.gridColumnStart,gridRowEnd:t.gridRowEnd,gridRowStart:t.gridRowStart,header:t.header,ref:n.createRef(),reverse:"right"===d,sort:f},t.header.accessor)}))})}))}))},Fe=function(e){var n;return(null===(n=e.children)||void 0===n?void 0:n.length)?1+Math.max.apply(Math,e.children.map(Fe)):1},Me=function(t){var r=t.centerHeaderRef,i=t.headerContainerRef,a=t.headersRef,s=t.hiddenColumns,l=t.mainTemplateColumns,u=t.pinnedLeftColumns,d=t.pinnedLeftTemplateColumns,h=t.pinnedRightColumns,f=t.pinnedRightTemplateColumns,v=t.sort,p=C(),m=p.pinnedLeftRef,g=p.pinnedRightRef,w=p.setPinnedLeftWidth,x=p.setPinnedRightWidth,b=n.useMemo((function(){return ee({headersRef:a,hiddenColumns:s,pinnedLeftColumns:u,pinnedRightColumns:h})}),[a,s,u,h]),y=n.useMemo((function(){var e=a.current,n=0;return e.forEach((function(e){if(c({hiddenColumns:s,header:e})){var t=Fe(e);n=Math.max(n,t)}})),{maxDepth:n}}),[a,s]).maxDepth;return n.useLayoutEffect((function(){var e,n;w(te(null===(e=m.current)||void 0===e?void 0:e.clientWidth)),x(te(null===(n=g.current)||void 0===n?void 0:n.clientWidth))}),[m,g,w,x]),e.jsxs("div",o({className:"st-header-container",ref:i},{children:[u.length>0&&e.jsx(Ne,{columnIndices:b,gridTemplateColumns:d,handleScroll:void 0,headersRef:a,hiddenColumns:s,maxDepth:y,pinned:"left",sectionRef:m,sort:v}),e.jsx(Ne,{columnIndices:b,gridTemplateColumns:l,handleScroll:void 0,headersRef:a,hiddenColumns:s,maxDepth:y,sectionRef:r,sort:v}),h.length>0&&e.jsx(Ne,{columnIndices:b,gridTemplateColumns:f,handleScroll:void 0,headersRef:a,hiddenColumns:s,maxDepth:y,pinned:"right",sectionRef:g,sort:v})]}))},We=function(e){var n=e.headers,t=e.hiddenColumns,r=function(e){var n=e.headers,o=e.flattenedHeaders;return n.forEach((function(e){!0!==t[e.accessor]&&(e.children?r({headers:e.children,flattenedHeaders:o}):o.push(e))})),o},o=r({headers:n,flattenedHeaders:[]});return"".concat(o.map((function(e){return function(e){var n=e.minWidth,t=e.width;return"number"==typeof t&&(t="".concat(t,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"string"==typeof t&&t.endsWith("fr")?"minmax(".concat(n,", ").concat(t,")"):"max(".concat(n,", ").concat(t,")"):t}(e)})).join(" "))},De=function(t){var r=t.pinnedLeftWidth,i=t.pinnedRightWidth,a=t.setScrollTop,s=t.sort,l=t.tableRows,c=t.visibleRows,u=C(),d=u.columnResizing,h=u.editColumns,f=u.headersRef,v=u.hiddenColumns,p=n.useRef(null),m=n.useRef(null),g=f.current.filter((function(e){return!e.pinned})),w=f.current.filter((function(e){return"left"===e.pinned})),x=f.current.filter((function(e){return"right"===e.pinned})),b=n.useMemo((function(){return We({headers:w,hiddenColumns:v})}),[w,v]),y=n.useMemo((function(){return We({headers:g,hiddenColumns:v})}),[g,v]),j=n.useMemo((function(){return We({headers:x,hiddenColumns:v})}),[x,v]),I={centerHeaderRef:m,headerContainerRef:p,headersRef:f,hiddenColumns:v,mainTemplateColumns:y,pinnedLeftColumns:w,pinnedLeftTemplateColumns:b,pinnedRightColumns:x,pinnedRightTemplateColumns:j,sort:s},S={tableRows:l,headerContainerRef:p,mainTemplateColumns:y,pinnedLeftColumns:w,pinnedLeftTemplateColumns:b,pinnedLeftWidth:r,pinnedRightColumns:x,pinnedRightTemplateColumns:j,pinnedRightWidth:i,setScrollTop:a,visibleRows:c};return e.jsxs("div",o({className:"st-content ".concat(d?"st-resizeable":"st-not-resizeable"),style:{width:h?"calc(100% - 27.5px)":"100%"}},{children:[e.jsx(Me,o({},I)),e.jsx(ne,o({},S))]}))},Le=function(t){var r,i,a=t.mainBodyWidth,s=t.mainBodyRef,l=t.pinnedLeftWidth,c=t.pinnedRightWidth,u=t.setMainBodyWidth,d=t.tableBodyContainerRef,h=C().editColumns,f=n.useState(!1),v=f[0],p=f[1],m=n.useRef(null),g=d.current&&d.current.scrollHeight>d.current.clientHeight,w=h?28:0,x=(h?c+1:c)+(d.current&&g?d.current.offsetWidth-d.current.clientWidth:0);return n.useEffect((function(){setTimeout((function(){!function(){var e;if(s.current){var n=null===(e=s.current)||void 0===e?void 0:e.scrollWidth;u(n||0)}}()}),1)}),[s,u]),n.useEffect((function(){setTimeout((function(){!function(){if(s.current){var e=s.current.clientWidth;p(a>e)}}()}),1)}),[s,a,u]),v?e.jsxs("div",o({className:"st-horizontal-scrollbar-container"},{children:[l>0&&e.jsx("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:l,height:null===(r=m.current)||void 0===r?void 0:r.offsetHeight}}),a>0&&e.jsx(_,o({childRef:m},{children:e.jsx("div",o({className:"st-horizontal-scrollbar-middle",ref:m,style:{flexGrow:1}},{children:e.jsx("div",{style:{width:a,height:".3px"}})}))})),c>0&&e.jsx("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:x,height:null===(i=m.current)||void 0===i?void 0:i.offsetHeight}}),w>0&&e.jsx("div",{style:{width:w-1.5,height:"100%",flexShrink:0}})]})):null},Te={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"ascending"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"ascending"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"ascending"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"ascending"===t?i:-i},enum:function(e,n,t){return Te.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"ascending"===t?-1:1:null==n?"ascending"===t?1:-1:"string"==typeof e&&"string"==typeof n?Te.string(e,n,t):"number"==typeof e&&"number"==typeof n?Te.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?Te.boolean(e,n,t):Te.string(String(e),String(n),t)}},He=function(e,n,t){var r=t.find((function(e){return e.accessor===n.key.accessor})),o=(null==r?void 0:r.type)||"string",i=n.direction;return s([],e,!0).sort((function(e,t){var r=n.key.accessor;return function(e,n,t,r){if(void 0===t&&(t="string"),null==e||""===e)return"ascending"===r?-1:1;if(null==n||""===n)return"ascending"===r?1:-1;if("number"===t){var o=function(e){var n;if("number"==typeof e)return e;var t=String(e);if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(n=r[2])||void 0===n?void 0:n.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(t)||0},i=o(e),a=o(n);return Te.number(i,a,r)}return"date"===t?Te.date(String(e),String(n),r):"boolean"===t?Te.boolean(Boolean(e),Boolean(n),r):"enum"===t?Te.enum(String(e),String(n),r):Te.string(String(e),String(n),r)}(e[r],t[r],o,i)}))},Be=function(e){var t=e.headers,r=e.tableRows,o=n.useState(null),i=o[0],a=o[1],s=n.useMemo((function(){var e={};return t.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[t]),l=n.useState(s),c=l[0],u=l[1],d=n.useMemo((function(){if(!i)return r;var e=function(e,n,t){return{sortedData:He(n,t,e),newSortConfig:t}}(t,r,i).sortedData;return e}),[r,i,t]);return{hiddenColumns:c,setHiddenColumns:u,setSort:a,sort:i,sortedRows:d,updateSort:function(e,n){var r=function(e){for(var t=0,o=e;t<o.length;t++){var i=o[t];if(i.accessor===n)return i;if(i.children&&i.children.length>0){var a=r(i.children);if(a)return a}}},o=r(t);o&&a((function(e){return e&&e.key.accessor===n?"ascending"===e.direction?{key:o,direction:"descending"}:null:{key:o,direction:"ascending"}}))}}},Ae=function(e,n,t,r){void 0===r&&(r=new Set);for(var o=0,i=e;o<i.length;o++){var a=i[o];if(!r.has(a.accessor)&&(r.add(a.accessor),a.children&&a.children.length>0)){var s=a.children.some((function(e){return e.accessor===n})),l=!1;if(!s)for(var c=0,u=a.children;c<u.length;c++){var d=u[c];if(Ae([d],n,t,r),!1===t[d.accessor]){l=!0;break}}(s||l)&&(t[a.accessor]=!1)}}},Oe=function(e,n){return e.every((function(e){return!0===n[e.accessor]}))},Pe=function(e,n){e.forEach((function(e){e.children&&e.children.length>0&&(Pe(e.children,n),Oe(e.children,n)&&(n[e.accessor]=!0))}))},qe=function(t){var r=t.allHeaders,i=t.depth,a=void 0===i?0:i,s=t.header,l=t.hiddenColumns,c=t.setHiddenColumns,u=n.useState(!0),f=u[0],v=u[1],p=C(),m=p.expandIcon,g=p.headersRef,w=p.setMainBodyWidth,x=p.setPinnedLeftWidth,b=p.setPinnedRightWidth,y="".concat(16*a,"px"),j=s.children&&s.children.length>0,I=l[s.accessor]||j&&s.children&&Oe(s.children,l);return e.jsxs(e.Fragment,{children:[e.jsxs("div",o({className:"st-header-checkbox-item",style:{paddingLeft:y}},{children:[e.jsx("div",o({className:"st-header-icon-container"},{children:j?e.jsx("div",o({className:"st-collapsible-header-icon st-expand-icon-container ".concat(f?"expanded":"collapsed"),onClick:function(e){e.stopPropagation(),v(!f)}},{children:m})):null})),e.jsx(Se,o({checked:I,onChange:function(e){var n=o({},l);(n[s.accessor]=e,e)?Pe(r,n):(Ae(r,s.accessor,n),j&&s.children&&s.children.length>0&&s.children.every((function(e){return!0===l[e.accessor]}))&&s.children[0]&&(n[s.children[0].accessor]=!1,Ae(r,s.children[0].accessor,n)));c(n),g.current.forEach((function(e){e.hide=!0===n[e.accessor]})),function(e){var n=e.headers,t=e.setMainBodyWidth,r=e.setPinnedLeftWidth,o=e.setPinnedRightWidth,i=0,a=0,s=0;n.forEach((function(e){if(!e.hide){var n=d(e).reduce((function(e,n){return e+h(n)}),0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:s+=n}}));var l=te(i),c=te(a);r(l),o(c),t(s)}({headers:g.current,setMainBodyWidth:w,setPinnedLeftWidth:x,setPinnedRightWidth:b})}},{children:s.label}))]})),j&&f&&s.children&&e.jsx("div",o({className:"st-nested-headers"},{children:s.children.map((function(n,t){return e.jsx(qe,{allHeaders:r,depth:a+1,header:n,hiddenColumns:l,setHiddenColumns:c},"".concat(n.accessor,"-").concat(t))}))}))]})},ze=function(n){var t=n.headers,r=n.open,i=n.position,a=n.setHiddenColumns,s=n.hiddenColumns,l="left"===i?"left":"";return e.jsx("div",o({className:"st-column-editor-popout ".concat(r?"open":""," ").concat(l),onClick:function(e){return e.stopPropagation()}},{children:e.jsx("div",o({className:"st-column-editor-popout-content"},{children:t.map((function(n,r){return e.jsx(qe,{header:n,hiddenColumns:s,setHiddenColumns:a,allHeaders:t},"".concat(n.accessor,"-").concat(r))}))}))}))},Ue=function(t){var r=t.columnEditorText,i=t.editColumns,a=t.editColumnsInitOpen,s=t.headers,l=t.hiddenColumns,c=t.position,u=void 0===c?"right":c,d=t.setHiddenColumns,h=n.useState(a),f=h[0],v=h[1];return i?e.jsxs("div",o({className:"st-column-editor ".concat(f?"open":""," ").concat(u),onClick:function(){return function(e){v(e)}(!f)},style:{width:28}},{children:[e.jsx("div",o({className:"st-column-editor-text"},{children:r})),e.jsx(ze,{headers:s,open:f,position:u,setHiddenColumns:d,hiddenColumns:l})]})):null},Ye=function(n){var t=n.className;return e.jsx("svg",o({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e.jsx("path",{d:"M22 334.5c-3.8 8.8-2 19 4.6 26l116 144c4.5 4.8 10.8 7.5 17.4 7.5s12.9-2.7 17.4-7.5l116-144c6.6-7 8.4-17.2 4.6-26s-12.5-14.5-22-14.5l-72 0 0-288c0-17.7-14.3-32-32-32L148 0C130.3 0 116 14.3 116 32l0 288-72 0c-9.6 0-18.2 5.7-22 14.5z"})}))},Ge=function(n){var t=n.className;return e.jsx("svg",o({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e.jsx("path",{d:"M298 177.5c3.8-8.8 2-19-4.6-26l-116-144C172.9 2.7 166.6 0 160 0s-12.9 2.7-17.4 7.5l-116 144c-6.6 7-8.4 17.2-4.6 26S34.4 192 44 192l72 0 0 288c0 17.7 14.3 32 32 32l24 0c17.7 0 32-14.3 32-32l0-288 72 0c9.6 0 18.2-5.7 22-14.5z"})}))},Ke=function(t){var i=t.children,a=n.useRef({}),s=n.useCallback((function(e,n){return!!a.current[n]&&a.current[n].find((function(n){return n===e}))}),[]),l=n.useCallback((function(e,n){var t=e.clientWidth,r=e.scrollLeft;e.scrollWidth-t>0&&(n.scrollLeft=r)}),[]),c=n.useCallback((function(e){e.onscroll=null}),[]),u=n.useCallback((function(e,n){e.onscroll=function(){window.requestAnimationFrame((function(){n.forEach((function(n){var t;null===(t=a.current[n])||void 0===t||t.forEach((function(n){e!==n&&(c(n),l(e,n),window.requestAnimationFrame((function(){var e=Object.keys(a.current).filter((function(e){return a.current[e].includes(n)}));u(n,e)})))}))}))}))}}),[c,l]),d=n.useCallback((function(e,n){n.forEach((function(n){a.current[n]||(a.current[n]=[]),s(e,n)||(a.current[n].length>0&&l(a.current[n][0],e),a.current[n].push(e))})),u(e,n)}),[s,l,u]),h=n.useCallback((function(e,n){n.forEach((function(n){if(s(e,n)){c(e);var t=a.current[n].indexOf(e);-1!==t&&a.current[n].splice(t,1)}}))}),[s,c]);return e.jsx(J.Provider,o({value:{registerPane:d,unregisterPane:h}},{children:r.default.Children.only(i)}))},Xe=function(e,n){var t=n.find((function(n){return n.accessor===e.accessor})),r=(null==t?void 0:t.label)||e.accessor,o=se[e.operator],i="";return void 0!==e.value?i="boolean"==typeof e.value?e.value?"True":"False":String(e.value):e.values&&Array.isArray(e.values)&&("between"===e.operator||"notBetween"===e.operator?i="".concat(e.values[0]," - ").concat(e.values[1]):"in"!==e.operator&&"notIn"!==e.operator||(i=e.values.join(", "))),"isEmpty"===e.operator||"isNotEmpty"===e.operator?"".concat(r,": ").concat(o):"".concat(r,": ").concat(o," ").concat(i)},Ve=function(){var n=C(),t=n.filters,r=n.handleClearFilter,i=n.headersRef,a=Object.values(t);return 0===a.length||a.length>0?null:e.jsx("div",o({className:"st-filter-bar"},{children:e.jsx("div",o({className:"st-filter-bar-content"},{children:e.jsx("div",o({className:"st-filter-chips"},{children:a.map((function(n){return e.jsxs("div",o({className:"st-filter-chip"},{children:[e.jsx("span",o({className:"st-filter-chip-text"},{children:Xe(n,i.current)})),e.jsx("button",o({className:"st-filter-chip-remove",onClick:function(){return r(n.accessor)},"aria-label":"Remove filter for ".concat(n.accessor)},{children:"×"}))]}),n.accessor)}))}))}))}))},Je=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())},$e=function(e){var t=e.rows,r=n.useState({}),i=r[0],a=r[1],s=n.useMemo((function(){return 0===Object.keys(i).length?t:t.filter((function(e){return Object.values(i).every((function(n){try{return function(e,n){var t=n.operator,r=n.value,o=n.values;if(null==e)return"isEmpty"===t;if("isEmpty"===t)return!e||""===String(e).trim();if("isNotEmpty"===t)return e&&""!==String(e).trim();if("string"==typeof e||"contains"===t||"notContains"===t||"startsWith"===t||"endsWith"===t){var i=String(e).toLowerCase(),a=r?String(r).toLowerCase():"";switch(t){case"equals":return i===a;case"notEquals":return i!==a;case"contains":return i.includes(a);case"notContains":return!i.includes(a);case"startsWith":return i.startsWith(a);case"endsWith":return i.endsWith(a)}}if("number"==typeof e||!isNaN(Number(e))){var s=Number(e),l=Number(r);switch(t){case"equals":return s===l;case"notEquals":return s!==l;case"greaterThan":return s>l;case"lessThan":return s<l;case"greaterThanOrEqual":return s>=l;case"lessThanOrEqual":return s<=l;case"between":if(o&&2===o.length){var c=o.map(Number),u=c[0],d=c[1];return s>=u&&s<=d}return!1;case"notBetween":if(o&&2===o.length){var h=o.map(Number);return u=h[0],d=h[1],s<u||s>d}return!0}}if(e instanceof Date||!isNaN(Date.parse(e))){var f=new Date(e),v=new Date(String(r||"")),p=Je(f),m=Je(v);switch(t){case"equals":return p.getTime()===m.getTime();case"notEquals":return p.getTime()!==m.getTime();case"before":return p<m;case"after":return p>m;case"between":if(o&&2===o.length){var g=o.map((function(e){return Je(new Date(String(e||"")))})),w=g[0],x=g[1];return p>=w&&p<=x}return!1;case"notBetween":if(o&&2===o.length){var C=o.map((function(e){return Je(new Date(String(e||"")))}));return w=C[0],x=C[1],p<w||p>x}return!0}}if("boolean"==typeof e){var b=Boolean(r);if("equals"===t)return e===b}if("in"===t||"notIn"===t){if(o&&Array.isArray(o)){var y=String(e),j=o.includes(y);return"in"===t?j:!j}return!1}var I=String(e).toLowerCase(),S=r?String(r).toLowerCase():"";switch(t){case"equals":return I===S;case"notEquals":return I!==S;default:return!0}}(e[n.accessor],n)}catch(e){return console.warn("Filter error for accessor ".concat(n.accessor,":"),e),!0}}))}))}),[t,i]),l=n.useCallback((function(e){a((function(n){var t;return o(o({},n),((t={})[e.accessor]=e,t))}))}),[]),c=n.useCallback((function(e){a((function(n){var t=o({},n);return delete t[e],t}))}),[]),u=n.useCallback((function(){a({})}),[]);return{filters:i,filteredRows:s,handleApplyFilter:l,handleClearFilter:c,handleClearAllFilters:u}},_e=function(t){var r=t.allowAnimations,i=void 0!==r&&r,a=t.cellUpdateFlash,s=void 0!==a&&a,l=t.columnEditorPosition,c=void 0===l?"right":l,h=t.columnEditorText,f=void 0===h?"Columns":h,v=t.columnReordering,w=void 0!==v&&v,C=t.columnResizing,I=void 0!==C&&C,S=t.defaultHeaders,R=t.editColumns,E=void 0!==R&&R,k=t.editColumnsInitOpen,N=void 0!==k&&k,F=t.expandAll,M=void 0===F||F,W=t.expandIcon,D=void 0===W?e.jsx(j,{className:"st-expand-icon"}):W,L=t.height,T=t.hideFooter,H=void 0!==T&&T,B=t.nextIcon,A=void 0===B?e.jsx(j,{className:"st-next-prev-icon"}):B,O=t.onCellEdit,P=t.onColumnOrderChange,q=t.onGridReady,z=t.onNextPage,U=t.prevIcon,Y=void 0===U?e.jsx(y,{className:"st-next-prev-icon"}):U,G=t.rowGrouping,K=t.rowHeight,X=void 0===K?32:K,V=t.rowIdAccessor,J=t.rows,$=t.rowsPerPage,_=void 0===$?10:$,Q=t.selectableCells,Z=void 0!==Q&&Q,ee=t.selectableColumns,ne=void 0!==ee&&ee,te=t.shouldPaginate,re=void 0!==te&&te,oe=t.sortDownIcon,ie=void 0===oe?e.jsx(Ye,{className:"st-header-icon"}):oe,ae=t.sortUpIcon,se=void 0===ae?e.jsx(Ge,{className:"st-header-icon"}):ae,le=t.tableRef,ce=t.theme,ue=void 0===ce?"light":ce,de=t.useHoverRowBackground,he=void 0===de||de,fe=t.useOddEvenRowBackground,ve=void 0===fe||fe,pe=t.useOddColumnBackground,me=void 0!==pe&&pe;me&&(ve=!1);var ge=n.useRef(null),we=n.useRef(S),xe=n.useRef(null),Ce=n.useRef(null),be=n.useRef(null),ye=n.useRef(null),je=n.useRef(null),Ie=n.useState(1),Se=Ie[0],Re=Ie[1],Ee=n.useState(0),ke=Ee[0],Ne=Ee[1],Fe=n.useState(0),Me=Fe[0],We=Fe[1],Te=n.useState(0),He=Te[0],Ae=Te[1],Oe=n.useState(0),Pe=Oe[0],qe=Oe[1],ze=n.useState(0),Xe=ze[0],Je=ze[1],_e=n.useState(new Set),Qe=_e[0],Ze=_e[1],en=$e({rows:J}),nn=en.filters,tn=en.filteredRows,rn=en.handleApplyFilter,on=en.handleClearFilter,an=en.handleClearAllFilters,sn=Be({headers:we.current,tableRows:tn}),ln=sn.sort,cn=sn.sortedRows,un=sn.hiddenColumns,dn=sn.setHiddenColumns,hn=sn.updateSort;n.useEffect((function(){null==q||q()}),[q]);var fn=n.useMemo((function(){if(!re)return cn;var e=(Se-1)*_,n=e+_;return cn.slice(e,n)}),[Se,_,re,cn]),vn=n.useMemo((function(){return G&&0!==G.length?m({rows:fn,rowGrouping:G,rowIdAccessor:V,expandedRows:Qe,expandAll:M}):fn.map((function(e,n){return{row:e,depth:0,groupingKey:void 0,position:n,isLastGroupRow:!1}}))}),[fn,G,V,Qe,M]),pn=function(e){var t=e.height,r=e.rowHeight;return n.useMemo((function(){var e;if(!t)return window.innerHeight-r;var n=document.querySelector(".simple-table-root"),o=0;if(t.endsWith("px"))o=parseInt(t,10);else if(t.endsWith("vh")){var i=parseInt(t,10);o=window.innerHeight*i/100}else if(t.endsWith("%")){var a=parseInt(t,10);o=((null===(e=null==n?void 0:n.parentElement)||void 0===e?void 0:e.clientHeight)||window.innerHeight)*a/100}else o=window.innerHeight;return Math.max(0,o-r)}),[t,r])}({height:L,rowHeight:X}),mn=n.useMemo((function(){return function(e){var n=e.bufferRowCount,t=e.contentHeight,r=e.tableRows,o=e.rowHeight,i=e.scrollTop,a=o+1,s=Math.max(0,i-a*n),l=i+t+a*n,c=Math.max(0,Math.floor(s/a)),u=Math.min(r.length,Math.ceil(l/a));return r.slice(c,u)}({bufferRowCount:5,contentHeight:pn,tableRows:vn,rowHeight:X,scrollTop:Pe})}),[pn,X,vn,Pe]),gn=n.useReducer((function(e){return e+1}),0)[1],wn=function(e){var t=e.selectableCells,r=e.headers,o=e.visibleRows,i=e.rowIdAccessor,a=n.useState(new Set),s=a[0],l=a[1],c=n.useState(new Set),u=c[0],h=c[1],f=n.useState(null),v=f[0],m=f[1],w=n.useState(null),x=w[0],C=w[1],b=n.useRef(!1),y=n.useRef(null),j=n.useMemo((function(){return r.flatMap(d)}),[r]),I=n.useCallback((function(){var e=j.filter((function(e){return!e.hide})),n=new Map;e.forEach((function(e,t){n.set(t,e.accessor)}));var t=Array.from(s).reduce((function(e,t){var r,i=t.split("-").map(Number),a=i[0],s=i[1];e[a]||(e[a]=[]);var l=n.get(s);return l&&(null===(r=o[a])||void 0===r?void 0:r.row)?e[a][s]=o[a].row[l]:e[a][s]="",e}),{}),r=Object.values(t).map((function(e){return Object.values(e).join("\t")})).join("\n");s.size>0&&navigator.clipboard.writeText(r)}),[j,s,o]),S=n.useCallback((function(e,n){for(var t=new Set,r=Math.min(e.rowIndex,n.rowIndex),a=Math.max(e.rowIndex,n.rowIndex),s=Math.min(e.colIndex,n.colIndex),c=Math.max(e.colIndex,n.colIndex),u=r;u<=a;u++)for(var d=s;d<=c;d++)if(u>=0&&u<o.length){var f=p(o[u].row,u,i);t.add(g({colIndex:d,rowIndex:u,rowId:f}))}h(new Set),m(null),l(t)}),[o,i,h,m,l]),R=n.useCallback((function(e){if(e.rowIndex>=0&&e.rowIndex<o.length&&e.colIndex>=0&&e.colIndex<j.length){var n=g(e);h(new Set),m(null),l(new Set([n])),C(e)}}),[j.length,o.length,h,m,l,C]),E=n.useCallback((function(e,n){void 0===n&&(n=!1),l(new Set),C(null),h((function(t){var r=new Set(n?t:[]);return e.forEach((function(e){return r.add(e)})),r})),e.length>0&&m(e[e.length-1])}),[l,C,h,m]);n.useEffect((function(){var e=function(e){var n;if(t&&x){var r=x.rowIndex,a=x.colIndex,s=x.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if(p(null===(n=o[r])||void 0===n?void 0:n.row,r,i)!==s){var c=o.findIndex((function(e,n){return p(e.row,n,i)===s}));if(-1===c)return;r=c}if("ArrowUp"===e.key){if(e.preventDefault(),r>0){var u=p(o[r-1].row,r-1,i);R({rowIndex:r-1,colIndex:a,rowId:u})}}else"ArrowDown"===e.key?(e.preventDefault(),r<o.length-1&&(u=p(o[r+1].row,r+1,i),R({rowIndex:r+1,colIndex:a,rowId:u}))):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),a>0&&(u=p(o[r].row,r,i),R({rowIndex:r,colIndex:a-1,rowId:u}))):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),a<j.length-1&&(u=p(o[r].row,r,i),R({rowIndex:r,colIndex:a+1,rowId:u}))):"Escape"===e.key&&(l(new Set),h(new Set),m(null),y.current=null,C(null))}else I()}};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[I,j.length,x,i,S,R,t,o]);var k=n.useCallback((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=g({colIndex:n,rowIndex:t,rowId:r}),i=s.has(o),a=u.has(n);return i||a}),[s,u]),N=n.useCallback((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,a=[],s=o[t-1]?p(o[t-1].row,t-1,i):null,l=o[t+1]?p(o[t+1].row,t+1,i):null,c=null!==s?{colIndex:n,rowIndex:t-1,rowId:s}:null,d=null!==l?{colIndex:n,rowIndex:t+1,rowId:l}:null,h={colIndex:n-1,rowIndex:t,rowId:r},f={colIndex:n+1,rowIndex:t,rowId:r};return(!c||!k(c)||u.has(n)&&0===t)&&a.push("st-selected-top-border"),(!d||!k(d)||u.has(n)&&t===o.length-1)&&a.push("st-selected-bottom-border"),k(h)||a.push("st-selected-left-border"),k(f)||a.push("st-selected-right-border"),a.join(" ")}),[k,o,u,i]),F=n.useMemo((function(){return x?function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return n===x.rowIndex&&t===x.colIndex&&r===x.rowId}:function(){return!1}}),[x]);return{getBorderClass:N,handleMouseDown:function(e){var n=e.colIndex,r=e.rowIndex,o=e.rowId;t&&(b.current=!0,y.current={rowIndex:r,colIndex:n,rowId:o},setTimeout((function(){h(new Set),m(null);var e=g({colIndex:n,rowIndex:r,rowId:o});l(new Set([e])),C({rowIndex:r,colIndex:n,rowId:o})}),0))},handleMouseOver:function(e){var n=e.colIndex,r=e.rowIndex;if(e.rowId,t&&b.current&&y.current){for(var a=new Set,s=Math.min(y.current.rowIndex,r),c=Math.max(y.current.rowIndex,r),u=Math.min(y.current.colIndex,n),d=Math.max(y.current.colIndex,n),h=s;h<=c;h++)for(var f=u;f<=d;f++)if(h>=0&&h<o.length){var v=p(o[h].row,h,i);a.add(g({colIndex:f,rowIndex:h,rowId:v}))}l(a)}},handleMouseUp:function(){b.current=!1},isInitialFocusedCell:F,isSelected:k,lastSelectedColumnIndex:v,selectColumns:E,selectedCells:s,selectedColumns:u,setInitialFocusedCell:C,setSelectedCells:l,setSelectedColumns:h}}({selectableCells:Z,headers:we.current,visibleRows:mn,rowIdAccessor:V}),xn=wn.getBorderClass,Cn=wn.handleMouseDown,bn=wn.handleMouseOver,yn=wn.handleMouseUp,jn=wn.isInitialFocusedCell,In=wn.isSelected,Sn=wn.selectColumns,Rn=wn.selectedCells,En=wn.selectedColumns,kn=wn.setInitialFocusedCell,Nn=wn.setSelectedCells,Fn=wn.setSelectedColumns,Mn=n.useCallback((function(e,n){hn(e,n)}),[hn]),Wn=n.useCallback((function(e){we.current=e,gn()}),[]);!function(e){var t=e.selectableColumns,r=e.selectedCells,o=e.selectedColumns,i=e.setSelectedCells,a=e.setSelectedColumns;n.useEffect((function(){var e=function(e){var n=e.target;n.closest(".st-cell")||t&&(n.classList.contains("st-header-cell")||n.classList.contains("st-header-label"))||(r.size>0&&i(new Set),o.size>0&&a(new Set))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[t,r,o,i,a])}({selectableColumns:ne,selectedCells:Rn,selectedColumns:En,setSelectedCells:Nn,setSelectedColumns:Fn}),n.useLayoutEffect((function(){if(je.current){var e=je.current.offsetWidth-je.current.clientWidth;Je(e)}}),[]),function(e){var t=e.forceUpdate,r=e.tableBodyContainerRef,o=e.setScrollbarWidth;n.useLayoutEffect((function(){var e=function(){if(t(),r.current){var e=r.current.offsetWidth-r.current.clientWidth;o(e)}};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[t,r,o])}({forceUpdate:gn,tableBodyContainerRef:je,setScrollbarWidth:Je});var Dn=n.useRef(new Map);return n.useEffect((function(){le&&(le.current={updateData:function(e){var n=e.accessor,t=e.rowIndex,r=e.newValue,o=null==J?void 0:J[t];if(o){var i=p(o,t,V),a=u({rowId:i,accessor:n}),s=Dn.current.get(a);s&&s.updateContent(r),void 0!==o[n]&&(o[n]=r)}}})}),[le,J,V]),e.jsx(x,o({value:{allowAnimations:i,cellRegistry:Dn.current,cellUpdateFlash:s,columnReordering:w,columnResizing:I,draggedHeaderRef:ge,editColumns:E,expandIcon:D,expandedRows:Qe,filters:nn,tableRows:vn,forceUpdate:gn,getBorderClass:xn,handleApplyFilter:rn,handleClearFilter:on,handleClearAllFilters:an,handleMouseDown:Cn,handleMouseOver:bn,headersRef:we,hiddenColumns:un,hoveredHeaderRef:xe,isInitialFocusedCell:jn,isSelected:In,mainBodyRef:Ce,nextIcon:A,onCellEdit:O,onColumnOrderChange:P,onSort:Mn,onTableHeaderDragEnd:Wn,pinnedLeftRef:be,pinnedRightRef:ye,prevIcon:Y,rowGrouping:G,rowHeight:X,rowIdAccessor:V,scrollbarWidth:Xe,selectColumns:Sn,selectableColumns:ne,setExpandedRows:Ze,setInitialFocusedCell:kn,setMainBodyWidth:Ne,setPinnedLeftWidth:We,setPinnedRightWidth:Ae,setSelectedCells:Nn,setSelectedColumns:Fn,shouldPaginate:re,sortDownIcon:ie,sortUpIcon:se,tableBodyContainerRef:je,theme:ue,useHoverRowBackground:he,useOddColumnBackground:me,useOddEvenRowBackground:ve}},{children:e.jsx("div",o({className:"simple-table-root st-wrapper theme-".concat(ue),style:L?{height:L}:{}},{children:e.jsx(Ke,{children:e.jsxs("div",o({className:"st-wrapper-container"},{children:[e.jsx(Ve,{}),e.jsxs("div",o({className:"st-content-wrapper",onMouseUp:yn,onMouseLeave:yn},{children:[e.jsx(De,{tableRows:vn,pinnedLeftWidth:Me,pinnedRightWidth:He,setScrollTop:qe,sort:ln,visibleRows:mn}),e.jsx(Ue,{columnEditorText:f,editColumns:E,editColumnsInitOpen:N,headers:we.current,hiddenColumns:un,position:c,setHiddenColumns:dn})]})),e.jsx(Le,{mainBodyRef:Ce,mainBodyWidth:ke,pinnedLeftWidth:Me,pinnedRightWidth:He,setMainBodyWidth:Ne,tableBodyContainerRef:je}),e.jsx(b,{currentPage:Se,hideFooter:H,onPageChange:Re,onNextPage:z,shouldPaginate:re,totalPages:Math.ceil(tn.length/_)})]}))})}))}))};exports.SimpleTable=function(t){var r=n.useState(!1),i=r[0],a=r[1];return n.useEffect((function(){a(!0)}),[]),i?e.jsx(_e,o({},t)):null};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(n),o=function(){return o=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},o.apply(this,arguments)};function i(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,s)}l((r=r.apply(e,n||[])).next())}))}function a(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=n.call(e,i)}catch(e){s=[6,e],r=0}finally{t=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function s(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var l=function(e){var n=e.accessor,t=e.rowIndex;return"cell-".concat(n,"-").concat(t)},c=function(e){var n=e.hiddenColumns,t=e.header,r=e.pinned;return n[t.accessor]?null:!r&&!t.pinned||t.pinned===r||null},u=function(e){var n=e.rowId,t=e.accessor;return"".concat(n,"-").concat(t)},d=function(e){return e.hide?[]:e.children&&0!==e.children.length?e.children.flatMap((function(e){return d(e)})):[e]},h=function(e){if(e.hide)return 0;if("number"==typeof e.width)return e.width;if("string"==typeof e.width&&e.width.endsWith("px"))return parseFloat(e.width);var n=document.getElementById(l({accessor:e.accessor,rowIndex:0}));return(null==n?void 0:n.offsetWidth)||150},f=function(e){var n,t=e.width;"string"==typeof t&&t.includes("fr")&&(e.width=(null===(n=document.getElementById(l({accessor:e.accessor,rowIndex:0})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.forEach((function(e){f(e)}))},v=function(e){return"number"==typeof e.minWidth?e.minWidth:40},p=function(e,n,t){return t&&void 0!==e[t]?e[t]:n},m=function(e){var n=e.depth,t=void 0===n?0:n,r=e.expandAll,o=void 0!==r&&r,i=e.expandedRows,a=e.rowGrouping,s=void 0===a?[]:a,l=e.rowIdAccessor,c=e.rows,u=[],d=function(e,n,t){void 0===t&&(t=0);var r=t;return e.forEach((function(t,a){var c=p(t,a,l),h=s[n],f=0===n&&a===e.length-1;u.push({row:t,depth:n,groupingKey:h,position:r,isLastGroupRow:f}),r++;var v=String(c);if((o?!i.has(v):i.has(v))&&n<s.length){var m=function(e,n){var t=e[n];return Array.isArray(t)?t:[]}(t,h);m.length>0&&(r=d(m,n+1,r))}})),r};return d(c,t),u},g=function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return"".concat(n,"-").concat(t,"-").concat(r)},w=n.createContext(void 0),x=function(n){var t=n.children,r=n.value;return e.jsx(w.Provider,o({value:r},{children:t}))},C=function(){var e=n.useContext(w);if(void 0===e)throw new Error("useTableContext must be used within a TableProvider");return e},b=function(t){var r=t.currentPage,s=t.hideFooter,l=t.onPageChange,c=t.onNextPage,u=t.shouldPaginate,d=t.totalPages,h=C(),f=h.nextIcon,v=h.prevIcon,p=n.useState(!0),m=p[0],g=p[1],w=!(r>1),x=!(r<d)&&!c||!m&&r===d;if(s||!u)return null;var b=function(){if(d<=15)return Array.from({length:d},(function(e,n){return n+1}));var e,n,t=[],o=15;if(r<=Math.ceil(7.5))e=1,n=14;else if(r>=d-Math.floor(7.5))e=Math.max(1,d-o+1),n=d;else{var i=Math.floor(7);e=r-i,n=r+(o-i-1)}for(var a=e;a<=n;a++)t.push(a);return n<d-1&&(t.push(-1),t.push(d)),t}();return e.jsxs("div",o({className:"st-footer"},{children:[e.jsx("button",o({className:"st-next-prev-btn ".concat(w?"disabled":""),onClick:function(){var e=r-1;e>=1&&l(e)},disabled:w},{children:v})),e.jsx("button",o({className:"st-next-prev-btn ".concat(x?"disabled":""),onClick:function(){return i(void 0,void 0,void 0,(function(){var e,n;return a(this,(function(t){switch(t.label){case 0:return e=r===d,n=r+1,c&&e?[4,c(r)]:[3,2];case 1:if(!t.sent())return g(!1),[2];t.label=2;case 2:return(n<=d||c)&&l(n),[2]}}))}))},disabled:x},{children:f})),b.map((function(n,t){return n<0?e.jsx("span",o({className:"st-page-ellipsis"},{children:"..."}),"ellipsis-".concat(n)):e.jsx("button",o({onClick:function(){return function(e){e>=1&&e<=d&&l(e)}(n)},className:"st-page-btn ".concat(r===n?"active":"")},{children:n}),"page-".concat(n))}))]}))},y=function(n){var t=n.className;return e.jsx("svg",o({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},I=function(n){var t=n.className;return e.jsx("svg",o({className:t,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},S=function(e){return e.position*(e.rowHeight+1)-1},j=function(e){return e.position*(e.rowHeight+1)},R=function(t){var r=t.children,i=t.onClose,a=t.open,s=t.overflow,l=void 0===s?"auto":s,c=t.setOpen,u=t.width,d=t.containerRef,h=t.positioning,f=void 0===h?"fixed":h,v=C().mainBodyRef,p=n.useRef(null),m=n.useRef(null),g=n.useState("bottom-left"),w=g[0],x=g[1],b=n.useState({}),y=b[0],I=b[1],S=n.useState(!1),j=S[0],R=S[1];return n.useEffect((function(){a&&p.current?(R(!1),!m.current&&p.current.parentElement&&(m.current=p.current.parentElement),requestAnimationFrame((function(){if(p.current&&m.current){var e,n=p.current,t=m.current.getBoundingClientRect(),r=n.offsetHeight,o=u||n.offsetWidth,i=(e=(null==d?void 0:d.current)?d.current.getBoundingClientRect():(null==v?void 0:v.current)?v.current.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0,width:window.innerWidth,height:window.innerHeight,x:0,y:0,toJSON:function(){}}).bottom-t.bottom,a=t.top-e.top,s="bottom",l={};(r>i&&r<=a||r>i&&a>i)&&(s="top");var c="left";o>e.right-t.right+t.width&&(c="right"),"fixed"===f?("bottom"===s?l.top=t.bottom+4:l.bottom=window.innerHeight-t.top+4,"left"===c?l.left=t.left:l.right=window.innerWidth-t.right):("bottom"===s?l.top=t.height+4:l.bottom=t.height+4,"left"===c?l.left=0:l.right=0),x("".concat(s,"-").concat(c)),I(l),R(!0)}}))):a||R(!1)}),[a,u,d,v,f]),n.useEffect((function(){var e=function(e){if(a&&p.current){var n=e.target;p.current&&!p.current.contains(n)&&(c(!1),null==i||i())}};return a&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}}),[a,i,c]),n.useEffect((function(){var e=function(e){p.current&&!p.current.contains(e.target)&&(c(!1),null==i||i())};return a&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[i,a,c]),n.useEffect((function(){var e=function(e){"Escape"===e.key&&a&&(c(!1),null==i||i())};return a&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[i,a,c]),a?e.jsx("div",o({ref:p,className:"st-dropdown-content st-dropdown-".concat(w),onClick:function(e){return e.stopPropagation()},style:o(o({position:f,width:u?"".concat(u,"px"):"auto",visibility:j?"visible":"hidden"},y),{overflow:l})},{children:r})):null},E=function(n){var t=n.children,r=n.onClick,i=n.isSelected,a=void 0!==i&&i,s=n.disabled,l=void 0!==s&&s,c=n.className,u=void 0===c?"":c;return e.jsx("div",o({className:"st-dropdown-item ".concat(a?"selected":""," ").concat(l?"disabled":""," ").concat(u),onClick:function(){!l&&r&&r()},role:"option","aria-selected":a,"aria-disabled":l},{children:t}))},k=function(t){var r=t.onBlur,i=t.onChange,a=t.open,s=t.setOpen,l=t.value,c=n.useState(l),u=c[0],d=c[1],h=function(e){d(e),i(e),s(!1),r()};return e.jsxs(R,o({open:a,onClose:function(){r()},setOpen:s,width:120},{children:[e.jsx(E,o({isSelected:!0===u,onClick:function(){return h(!0)}},{children:"True"})),e.jsx(E,o({isSelected:!1===u,onClick:function(){return h(!1)}},{children:"False"}))]}))},N=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,type:"text",defaultValue:null!=r?r:"",onBlur:o,onChange:function(e){var n=e.target.value;i(n)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||o()},onMouseDown:function(e){e.stopPropagation()}})},F=function(t){var r=t.defaultValue,o=t.onBlur,i=t.onChange,a=n.useRef(null);return e.jsx("input",{className:"editable-cell-input",ref:a,autoFocus:!0,defaultValue:r.toString(),onBlur:o,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&i(n)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||o()},onMouseDown:function(e){e.stopPropagation()}})},W=function(t){var r,i,a=t.onChange,s=t.onClose,l=t.value,c=C(),u=c.nextIcon,d=c.prevIcon,h=n.useState(l||new Date),f=h[0],v=h[1],p=n.useState("days"),m=p[0],g=p[1],w=function(e,n){return new Date(e,n+1,0).getDate()};return e.jsxs("div",o({className:"st-datepicker"},{children:[e.jsxs("div",o({className:"st-datepicker-header"},{children:["days"===m&&e.jsxs(e.Fragment,{children:[e.jsx("button",o({onClick:function(){v(new Date(f.getFullYear(),f.getMonth()-1,1))},className:"st-datepicker-nav-btn"},{children:d})),e.jsxs("div",o({className:"st-datepicker-header-label",onClick:function(){return g("months")}},{children:[(i=f,i.toLocaleString("default",{month:"long"}))," ",f.getFullYear()]})),e.jsx("button",o({onClick:function(){v(new Date(f.getFullYear(),f.getMonth()+1,1))},className:"st-datepicker-nav-btn"},{children:u}))]}),"months"===m&&e.jsx("div",o({className:"st-datepicker-header-label",onClick:function(){return g("years")}},{children:f.getFullYear()})),"years"===m&&e.jsx("div",o({className:"st-datepicker-header-label"},{children:"Select Year"}))]})),e.jsxs("div",o({className:"st-datepicker-grid st-datepicker-".concat(m,"-grid")},{children:["days"===m&&function(){var n=[],t=f.getFullYear(),r=f.getMonth(),i=w(t,r),c=function(e,n){return new Date(e,n,1).getDay()}(t,r),u=w(t,r-1);["Su","Mo","Tu","We","Th","Fr","Sa"].forEach((function(t,r){n.push(e.jsx("div",o({className:"st-datepicker-weekday"},{children:t}),"header-".concat(r)))}));for(var d=function(t){var r=u-c+t+1;n.push(e.jsx("div",o({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth()-1,e);v(n),a(n),null==s||s()}(r)}},{children:r}),"prev-".concat(r)))},h=0;h<c;h++)d(h);for(var p=function(i){var c=i===(new Date).getDate()&&r===(new Date).getMonth()&&t===(new Date).getFullYear(),u=i===new Date(l).getDate()&&r===new Date(l).getMonth()&&t===new Date(l).getFullYear();n.push(e.jsx("div",o({className:"st-datepicker-day ".concat(c?"today":""," ").concat(u?"selected":""),onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth(),e);v(n),a(n),null==s||s()}(i)}},{children:i}),"day-".concat(i)))},m=1;m<=i;m++)p(m);var g=35-(c+i),x=function(t){n.push(e.jsx("div",o({className:"st-datepicker-day other-month",onClick:function(){return function(e){var n=new Date(f.getFullYear(),f.getMonth()+1,e);v(n),a(n),null==s||s()}(t)}},{children:t}),"next-".concat(t)))};for(m=1;m<=g;m++)x(m);return n}(),"months"===m&&(r=[],Array.from({length:12},(function(e,n){return new Date(2e3,n,1).toLocaleString("default",{month:"short"})})).forEach((function(n,t){var i=t===f.getMonth();r.push(e.jsx("div",o({className:"st-datepicker-month ".concat(i?"selected":""),onClick:function(){return function(e){v(new Date(f.getFullYear(),e,1)),g("days")}(t)}},{children:n}),"month-".concat(t)))})),r),"years"===m&&function(){for(var n=[],t=f.getFullYear(),r=t-6,i=function(r){var i=r===t;n.push(e.jsx("div",o({className:"st-datepicker-year ".concat(i?"selected":""),onClick:function(){return function(e){v(new Date(e,f.getMonth(),1)),g("months")}(r)}},{children:r}),"year-".concat(r)))},a=r;a<r+12;a++)i(a);return n}()]})),e.jsx("div",o({className:"st-datepicker-footer"},{children:e.jsx("button",o({className:"st-datepicker-today-btn",onClick:function(){var e=new Date;v(e),a(e),null==s||s()}},{children:"Today"}))}))]}))},M=function(e){if(!e)return new Date;var n=e.toString().split("-").map(Number),t=n[0],r=n[1],o=n[2],i=new Date;return i.setFullYear(t),i.setMonth(r-1),i.setDate(o),isNaN(i.getTime())?new Date:i},D=function(t){var r=t.onBlur,i=t.onChange,a=t.open,s=t.setOpen,l=t.value;n.useEffect((function(){var e=setTimeout((function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()}),0);return function(){return clearTimeout(e)}}),[]);var c=function(){r()};return e.jsx(R,o({open:a,onClose:c,setOpen:s,width:280},{children:e.jsx(W,{value:M(l),onChange:function(e){var n=e.toISOString().split("T")[0];i(n),s(!1),r()},onClose:c})}))},T=function(t){var r=t.onBlur,i=t.onChange,a=t.open,s=t.options,l=t.setOpen,c=t.value,u=n.useState(c||""),d=u[0],h=u[1];return e.jsx(R,o({open:a,onClose:function(){r()},setOpen:l,width:150},{children:e.jsx("div",o({className:"st-enum-dropdown-content"},{children:s.map((function(n){return e.jsx(E,o({isSelected:d===n.value,onClick:function(){return e=n.value,h(e),i(e),l(!1),void r();var e}},{children:n.label}),n.value)}))}))}))},L=function(n){var t=n.enumOptions,r=void 0===t?[]:t,o=n.onChange,i=n.setIsEditing,a=n.type,s=void 0===a?"string":a,l=n.value,c=function(){i(!1)};if("boolean"===s&&"boolean"==typeof l)return e.jsx(k,{onBlur:c,onChange:function(e){return o(e)},open:!0,setOpen:i,value:l});if("date"===s)return e.jsx(D,{onBlur:c,onChange:o,open:!0,setOpen:i,value:l});if("enum"===s){var u="string"==typeof l?l:"";return e.jsx(T,{onBlur:c,onChange:o,open:!0,options:r,setOpen:i,value:u})}if("number"===s&&"number"==typeof l)return e.jsx(F,{defaultValue:l,onBlur:c,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}});var d=null==l?"":String(l);return e.jsx(N,{defaultValue:d,onBlur:c,onChange:o})},H=0,B=function(){return function(e){var n=e.callback,t=e.callbackProps,r=e.limit,o=Date.now();(0===H||o-H>=r)&&(H=o,n(t))}},A=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(A);var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=A(e[t]));return n},O=Date.now(),P={screenX:0,screenY:0},q=function(e,n,t){void 0===t&&(t=[]);for(var r=0;r<e.length;r++){var o=e[r];if(o.accessor===n)return s(s([],t,!0),[r],!1);if(o.children&&o.children.length>0){var i=q(o.children,n,s(s([],t,!0),[r],!1));if(i)return i}}return null};var z=function(e){var t,r,o=e.draggedHeaderRef,i=e.headersRef,a=e.hoveredHeaderRef,s=e.onColumnOrderChange,l=e.onTableHeaderDragEnd,c=(t=i.current,r=n.useRef(t),n.useEffect((function(){JSON.stringify(r.current)!==JSON.stringify(t)&&(r.current=t)}),[t]),r.current);return{handleDragStart:function(e){o.current=e,O=Date.now()},handleDragOver:function(e){var n,t,r=e.event,s=e.hoveredHeader;if(r.preventDefault(),i.current){var u=r.currentTarget.getAnimations().some((function(e){return"running"===e.playState})),d=r.screenX,h=r.screenY,f=Math.sqrt(Math.pow(d-P.screenX,2)+Math.pow(h-P.screenY,2));a.current=s;var v=i.current,p=q(v,(null===(n=o.current)||void 0===n?void 0:n.accessor)||""),m=q(v,s.accessor);if(p&&m){var g=p.length,w=m.length,x=m;if(g!==w){var C=w-g;C>0&&(x=m.slice(0,-C))}var b=function(e,n,t){var r=A(e),o=!1;function i(e,n){for(var t=e,r=0;r<n.length-1;r++)t=t[n[r]].children;return t[n[n.length-1]]}function a(e,n,t){for(var r=e,i=0;i<n.length-1;i++){if(!r[n[i]].children){o=!0;break}r=r[n[i]].children}r[n[n.length-1]]=t}var s=i(r,n);return a(r,n,i(r,t)),a(r,t,s),{newHeaders:r,emergencyBreak:o}}(v,p,x),y=b.newHeaders,I=b.emergencyBreak;if(!(u||s.accessor===(null===(t=o.current)||void 0===t?void 0:t.accessor)||null===o.current||f<10||0===p.length||0===x.length||JSON.stringify(y)===JSON.stringify(i.current)||I)){var S=Date.now();JSON.stringify(y)===JSON.stringify(c)&&(S-O<1500||f<40)||(O=S,P={screenX:d,screenY:h},l(y))}}}},handleDragEnd:function(){o.current=null,a.current=null,null==s||s(i.current)}}},U=function(e){var n=e.content,t=e.header;return"boolean"==typeof n?n?"True":"False":"date"===t.type&&null!==n&&("string"==typeof n||"number"==typeof n||"object"==typeof n&&n instanceof Date)?new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):n},Y=n.forwardRef((function(t,r){var i=t.borderClass,a=t.colIndex,s=t.header,c=t.isHighlighted,d=t.isInitialFocused,h=t.nestedIndex,f=t.rowIndex,v=t.visibleRow,m=C(),g=m.cellRegistry,w=m.cellUpdateFlash,x=m.draggedHeaderRef,b=m.expandIcon,y=m.expandedRows,I=m.handleMouseDown,S=m.handleMouseOver,j=m.headersRef,R=m.hoveredHeaderRef,E=m.isCopyFlashing,k=m.isWarningFlashing,N=m.onCellEdit,F=m.onTableHeaderDragEnd,W=m.rowGrouping,M=m.rowIdAccessor,D=m.setExpandedRows,T=m.theme,H=m.useOddColumnBackground,A=v.depth,O=v.row,P=n.useState(O[s.accessor]),q=P[0],Y=P[1],K=n.useState(!1),G=K[0],X=K[1],V=n.useState(!1),J=V[0],$=V[1],_=n.useRef(null),Q=p(O,f,M),Z=W&&W[A],ee=!!Z&&function(e,n){if(!n)return!1;var t=e[n];return Array.isArray(t)&&t.length>0}(O,Z),ne=y.has(String(Q)),te=E({rowIndex:f,colIndex:a,rowId:Q}),re=k({rowIndex:f,colIndex:a,rowId:Q}),oe=z({draggedHeaderRef:x,headersRef:j,hoveredHeaderRef:R,onTableHeaderDragEnd:F}).handleDragOver,ie=B(),ae="cell-".concat(f,"-").concat(a),se=u({rowId:Q,accessor:s.accessor});n.useEffect((function(){if(g){var e="".concat(Q,"-").concat(s.accessor);return g.set(e,{updateContent:function(e){q!==e?(Y(e),w&&($(!0),_.current&&clearTimeout(_.current),_.current=setTimeout((function(){$(!1)}),800))):Y(e)}}),function(){g.delete(e),_.current&&clearTimeout(_.current)}}}),[g,w,Q,s.accessor,q]),n.useEffect((function(){if(J){var e=setTimeout((function(){$(!1)}),850);return function(){return clearTimeout(e)}}}),[J]),n.useEffect((function(){Y(O[s.accessor])}),[O,s.accessor]);var le="boolean"===s.type||"date"===s.type||"enum"===s.type,ce=Boolean(null==s?void 0:s.isEditable),ue="st-cell ".concat(A>0&&s.expandable?"st-cell-depth-".concat(A):""," ").concat(c?d?"st-cell-selected-first ".concat(i):"st-cell-selected ".concat(i):""," ").concat(ce?"clickable":""," ").concat(J?d?"st-cell-updating-first":"st-cell-updating":""," ").concat(te?d?"st-cell-copy-flash-first":"st-cell-copy-flash":""," ").concat(re?d?"st-cell-warning-flash-first":"st-cell-warning-flash":""," ").concat(H?h%2==0?"even-column":"odd-column":""),de=n.useCallback((function(e){Y(e),O[s.accessor]=e,null==N||N({accessor:s.accessor,newValue:e,row:O,rowIndex:f})}),[s.accessor,N,O,f]),he=n.useCallback((function(){D((function(e){var n=new Set(e),t=String(Q);return n.has(t)?n.delete(t):n.add(t),n}))}),[Q,D]);return G&&!le?e.jsx("div",o({className:"st-cell-editing",id:l({accessor:s.accessor,rowIndex:f+1}),onMouseDown:function(e){return e.stopPropagation()},onKeyDown:function(e){return e.stopPropagation()}},{children:e.jsx(L,{enumOptions:s.enumOptions,onChange:de,setIsEditing:X,type:s.type,value:q})})):e.jsxs("div",o({className:ue,id:ae,onDoubleClick:function(){return s.isEditable&&X(!0)},onMouseDown:function(){G||I({rowIndex:f,colIndex:a,rowId:Q})},onMouseOver:function(){G||S({rowIndex:f,colIndex:a,rowId:Q})},onDragOver:function(e){return ie({callback:oe,callbackProps:{event:e,hoveredHeader:s},limit:50})},onKeyDown:function(e){G||"F2"!==e.key&&"Enter"!==e.key||!s.isEditable||G||(e.preventDefault(),X(!0))},ref:r,"data-row-index":f,"data-col-index":a,"data-row-id":Q,"data-accessor":s.accessor},{children:[s.expandable&&ee?e.jsx("div",o({className:"st-icon-container st-expand-icon-container ".concat(ne?"expanded":"collapsed"),onClick:he},{children:b})):null,e.jsx("span",o({className:"st-cell-content ".concat("right"===s.align?"right-aligned":"center"===s.align?"center-aligned":"left-aligned")},{children:e.jsx("span",{children:s.cellRenderer?s.cellRenderer({accessor:s.accessor,colIndex:a,row:O,theme:T}):U({content:q,header:s})})})),G&&le&&e.jsx(L,{enumOptions:s.enumOptions,onChange:de,setIsEditing:X,type:s.type,value:q})]}),se)})),K=function(n){var t=n.columnIndexStart,r=n.columnIndices,o=n.headers,i=n.hiddenColumns,a=n.pinned,s=n.rowIndex,u=n.rowIndices,d=n.visibleRow,h=o.filter((function(e){return c({hiddenColumns:i,header:e,pinned:a})}));return e.jsx(e.Fragment,{children:h.map((function(n,c){return e.jsx(G,{columnIndices:r,header:n,headers:o,hiddenColumns:i,nestedIndex:c+(null!=t?t:0),pinned:a,rowIndex:s,rowIndices:u,visibleRow:d},l({accessor:n.accessor,rowIndex:s+1}))}))})},G=function(t){var r=t.columnIndices,o=t.header,i=t.headers,a=t.hiddenColumns,s=t.nestedIndex,u=t.pinned,d=t.rowIndex,h=t.rowIndices,f=t.visibleRow,v=r[o.accessor],m=C(),g=m.getBorderClass,w=m.isSelected,x=m.isInitialFocusedCell,b=m.rowIdAccessor;if(o.children){var y=o.children.filter((function(e){return c({hiddenColumns:a,header:e,pinned:u})}));return e.jsx(n.Fragment,{children:y.map((function(n){return e.jsx(G,{columnIndices:r,header:n,headers:i,hiddenColumns:a,nestedIndex:s,pinned:u,rowIndex:d,rowIndices:h,visibleRow:f},l({accessor:n.accessor,rowIndex:d+1}))}))})}var I=p(f.row,d,b),S={rowIndex:d,colIndex:v,rowId:I},j=g(S),R=w(S),E=x(S);return e.jsx(Y,{borderClass:j,colIndex:v,header:o,isHighlighted:R,isInitialFocused:E,nestedIndex:s,rowIndex:d,visibleRow:f},l({accessor:o.accessor,rowIndex:d+1}))},X=function(n){var t=n.columnIndices,r=n.columnIndexStart,i=n.gridTemplateColumns,a=n.headers,s=n.hiddenColumns,l=n.hoveredIndex,c=n.index,u=n.pinned,d=n.rowHeight,h=n.rowIndices,f=n.setHoveredIndex,v=n.visibleRow,p=C().useHoverRowBackground,m=v.position,g=m%2==0;return e.jsx("div",o({className:"st-row ".concat(g?"even":"odd"," ").concat(l===c&&p?"hovered":""),onMouseEnter:function(){f(c)},style:{gridTemplateColumns:i,top:j({position:m,rowHeight:d}),height:"".concat(d,"px")}},{children:e.jsx(K,{columnIndexStart:r,columnIndices:t,headers:a,hiddenColumns:s,pinned:u,rowIndex:m,rowIndices:h,visibleRow:v},c)}))},V=function(t){var r=t.displayStrongBorder,i=t.position,a=t.rowHeight,s=t.templateColumns,l=t.rowIndex,c=n.useRef(null);return e.jsx("div",o({className:"st-row-separator ".concat(r?"st-last-group-row":""),onMouseDown:function(e){if(void 0!==l){for(var n=e.currentTarget.getBoundingClientRect(),t=e.clientX-n.left,r=s.split(" ").map((function(e){if(e.includes("px"))return parseFloat(e);if(e.includes("fr")){var t=s.split(" ").filter((function(e){return e.includes("fr")})).length;return n.width/t}return 100})),o=0,i=0,a=0;a<r.length;a++){if(t<=o+r[a]){i=a;break}o+=r[a],i=a}var u="cell-".concat(l+1,"-").concat(i+1),d=document.getElementById(u);if(d){c.current=d;var h=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0});d.dispatchEvent(h)}}},onMouseUp:function(){if(c.current){var e=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0});c.current.dispatchEvent(e),c.current=null}},style:{gridTemplateColumns:s,top:S({position:i,rowHeight:a})}},{children:e.jsx("div",{style:{gridColumn:"1 / -1"}})}))},J=n.createContext(void 0),$=["default"],_=function(e){var t=e.childRef,r=e.children,o=function(){var e=n.useContext(J);if(!e)throw new Error("useScrollSyncContext must be used within a ScrollSyncProvider");return e}(),i=o.registerPane,a=o.unregisterPane;return n.useEffect((function(){return t.current&&i(t.current,$),function(){t.current&&a(t.current,$)}}),[t,i,a]),n.cloneElement(r,{ref:function(e){t.current=e}})},Q=function(n){var t=n.condition,r=n.wrapper,o=n.children;return e.jsx(e.Fragment,{children:t?r(o):e.jsx(e.Fragment,{children:o})})},Z=function(t){var r=t.columnIndexStart,i=t.columnIndices,a=t.headers,s=t.hiddenColumns,l=t.hoveredIndex,c=t.pinned,u=t.ref,d=t.rowHeight,h=t.rowIndices,f=t.setHoveredIndex,v=t.templateColumns,p=t.totalHeight,m=t.visibleRows,g=t.width,w=c?"st-body-pinned-".concat(c):"st-body-main";return e.jsx(Q,o({condition:!c,wrapper:function(n){return e.jsx(_,o({childRef:u},{children:n}))}},{children:e.jsx("div",o({className:w,ref:u,style:o({position:"relative",height:"".concat(p,"px"),width:g},!c&&{flexGrow:1})},{children:m.map((function(t,o){return e.jsxs(n.Fragment,{children:[0!==o&&e.jsx(V,{displayStrongBorder:t.isLastGroupRow,position:t.position,rowHeight:d,templateColumns:v,rowIndex:o-1}),e.jsx(X,{columnIndexStart:r,columnIndices:i,gridTemplateColumns:v,headers:a,hiddenColumns:s,hoveredIndex:l,index:o,pinned:c,rowHeight:d,rowIndices:h,setHoveredIndex:f,visibleRow:t})]},t.position)}))}))}))};function ee(e){var n=e.headersRef,t=e.hiddenColumns,r=e.pinnedLeftColumns,o=e.pinnedRightColumns,i={},a=0,s=function(e,n){void 0===n&&(n=!1),n||a++,i[e.accessor]=a,e.children&&e.children.length>0&&e.children.filter((function(e){return c({hiddenColumns:t,header:e})})).forEach((function(e,n){s(e,0===n)}))};return r.forEach((function(e,n){s(e,0===n)})),n.current.filter((function(e){return!e.pinned&&c({hiddenColumns:t,header:e})})).forEach((function(e,n){var t=0===n&&0===r.length;s(e,t)})),o.forEach((function(e){s(e,!1)})),i}var ne=function(t){var r=t.headerContainerRef,i=t.mainTemplateColumns,a=t.pinnedLeftColumns,s=t.pinnedLeftTemplateColumns,l=t.pinnedLeftWidth,c=t.pinnedRightColumns,u=t.pinnedRightTemplateColumns,d=t.pinnedRightWidth,h=t.setScrollTop,f=t.tableRows,v=t.visibleRows,m=C(),g=m.headersRef,w=m.hiddenColumns,x=m.mainBodyRef,b=m.rowHeight,y=m.rowIdAccessor,I=m.scrollbarWidth,S=m.tableBodyContainerRef,j=n.useState(null),R=j[0],E=j[1];!function(e){var t=e.headerContainerRef,r=e.mainSectionRef,o=e.scrollbarWidth,i=n.useState(!1),a=i[0],s=i[1];n.useEffect((function(){var e=null==t?void 0:t.current;if(a&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(o,"px")),function(){e.classList.remove("st-header-scroll-padding")}}),[t,a,o]),n.useEffect((function(){var e=null==t?void 0:t.current,n=null==r?void 0:r.current;if(n&&e){var o=function(){if(n){var e=n.scrollHeight>n.clientHeight;s(e)}};o();var i=new ResizeObserver((function(){o()}));return i.observe(n),function(){n&&i.unobserve(n)}}}),[t,r])}({headerContainerRef:r,mainSectionRef:S,scrollbarWidth:I});var k=n.useRef(null),N=function(e){return e.length}(f),F=N*(b+1)-1,W=n.useMemo((function(){return ee({headersRef:g,hiddenColumns:w,pinnedLeftColumns:a,pinnedRightColumns:c})}),[g,w,a,c]),M=n.useMemo((function(){var e={};return v.forEach((function(n,t){var r=String(p(n.row,t,y));e[r]=t})),e}),[v,y]),D={columnIndices:W,headerContainerRef:r,headers:g.current,hiddenColumns:w,hoveredIndex:R,rowHeight:b,rowIndices:M,setHoveredIndex:E,visibleRows:v};return e.jsxs("div",o({className:"st-body-container",onMouseLeave:function(){return E(null)},onScroll:function(e){var n=e.currentTarget.scrollTop;k.current&&cancelAnimationFrame(k.current),k.current=requestAnimationFrame((function(){h(n)}))},ref:S},{children:[a.length>0&&e.jsx(Z,o({},D,{pinned:"left",templateColumns:s,totalHeight:F,width:l})),e.jsx(Z,o({},D,{columnIndexStart:a.length,ref:x,templateColumns:i,totalHeight:F})),c.length>0&&e.jsx(Z,o({},D,{columnIndexStart:a.length+i.length,pinned:"right",templateColumns:u,totalHeight:F,width:d}))]}))},te=function(e){return void 0===e&&(e=0),e?e+1:0},re=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=e.setMainBodyWidth,i=e.setPinnedLeftWidth,a=e.setPinnedRightWidth,s=function(e){var n=e.header,t=e.headers,r=e.newWidth,o=n.pinned,i=0;return t.forEach((function(e){e.hide||e.pinned!==o||(e.accessor===n.accessor?i+=r:d(e).forEach((function(e){e.hide||(e.accessor===n.accessor?i+=r:i+=h(e))})))})),n.pinned?te(i):i}({header:n,headers:t,newWidth:r});"left"===n.pinned?i(s):"right"===n.pinned?a(s):n.pinned||o(s)},oe=function(e){var n=e.event,t=e.forceUpdate,r=e.gridColumnEnd,o=e.gridColumnStart,i=e.header,a=e.headersRef,s=e.setMainBodyWidth,l=e.setPinnedLeftWidth,c=e.setPinnedRightWidth,u=e.startWidth;n.preventDefault();var h="clientX"in n?n.clientX:n.touches[0].clientX,p="touches"in n;if(i&&!i.hide){var m=v(i),g=r-o>1,w=g?d(i):[i],x=function(e){var n="right"===i.pinned?h-e:e-h;if(g&&w.length>1)ie({delta:n,header:i,headersRef:a,leafHeaders:w,minWidth:m,setMainBodyWidth:s,setPinnedLeftWidth:l,setPinnedRightWidth:c,startWidth:u});else{var r=Math.max(u+n,m);i.width=r,re({header:i,headers:a.current,newWidth:r,setMainBodyWidth:s,setPinnedLeftWidth:l,setPinnedRightWidth:c})}a.current.forEach((function(e){f(e)})),t()};if(p){var C=function(e){var n=e.touches[0];x(n.clientX)},b=function(){document.removeEventListener("touchmove",C),document.removeEventListener("touchend",b)};document.addEventListener("touchmove",C),document.addEventListener("touchend",b)}else{var y=function(e){x(e.clientX)},I=function(){document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",I)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",I)}}},ie=function(e){var n=e.delta,t=e.header,r=e.headersRef,o=e.leafHeaders,i=e.minWidth,a=e.setMainBodyWidth,s=e.setPinnedLeftWidth,l=e.setPinnedRightWidth,c=e.startWidth,u=o.reduce((function(e,n){return Math.min(e,v(n))}),40),d=o.reduce((function(e,n){return e+("number"==typeof n.width?n.width:150)}),0),h=Math.max(c+n,u);re({header:t,headers:r.current,newWidth:h,setMainBodyWidth:a,setPinnedLeftWidth:s,setPinnedRightWidth:l});var f=h-d;o.forEach((function(e){var n="number"==typeof e.width?e.width:150,t=f*(n/d),r=Math.max(n+t,i);e.width=r}))},ae=function(n){var t=n.className,r=n.style;return e.jsx("svg",o({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:t,style:o({height:"1em"},r)},{children:e.jsx("path",{d:"M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"})}))},se={equals:"Equals",notEquals:"Not equals",contains:"Contains",notContains:"Does not contain",startsWith:"Starts with",endsWith:"Ends with",greaterThan:"Greater than",lessThan:"Less than",greaterThanOrEqual:"Greater than or equal",lessThanOrEqual:"Less than or equal",between:"Between",notBetween:"Not between",before:"Before",after:"After",in:"Is one of",notIn:"Is not one of",isEmpty:"Is empty",isNotEmpty:"Is not empty"},le=function(e){switch(e){case"string":return["equals","notEquals","contains","notContains","startsWith","endsWith","isEmpty","isNotEmpty"];case"number":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","notBetween","isEmpty","isNotEmpty"];case"boolean":return["equals","isEmpty","isNotEmpty"];case"date":return["equals","notEquals","before","after","between","notBetween","isEmpty","isNotEmpty"];case"enum":return["in","notIn","isEmpty","isNotEmpty"];default:return["equals","notEquals","isEmpty","isNotEmpty"]}},ce=function(e){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(e)},ue=function(e){return["between","notBetween","in","notIn"].includes(e)},de=function(e){return["isEmpty","isNotEmpty"].includes(e)},he=function(n){var t=n.children;return e.jsx("div",o({className:"st-filter-container"},{children:t}))},fe=function(){return e.jsx("svg",o({className:"st-custom-select-arrow",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},ve=function(t){var r=t.value,i=t.onChange,a=t.options,s=t.placeholder,l=void 0===s?"Select...":s,c=t.className,u=void 0===c?"":c,d=t.disabled,h=void 0!==d&&d,f=n.useState(!1),v=f[0],p=f[1],m=n.useState(-1),g=m[0],w=m[1],x=n.useRef(null),C=a.find((function(e){return e.value===r}));n.useEffect((function(){var e=function(e){if(v)switch(e.key){case"ArrowDown":e.preventDefault(),w((function(e){return e<a.length-1?e+1:0}));break;case"ArrowUp":e.preventDefault(),w((function(e){return e>0?e-1:a.length-1}));break;case"Enter":e.preventDefault(),g>=0&&(i(a[g].value),p(!1),w(-1));break;case"Escape":e.preventDefault(),p(!1),w(-1)}};if(v)return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}}),[v,g,a,i]);return e.jsxs("div",o({ref:x,className:"st-custom-select ".concat(u," ").concat(h?"st-custom-select-disabled":""," ").concat(v?"st-custom-select-open":"").trim()},{children:[e.jsxs("button",o({type:"button",className:"st-custom-select-trigger",onClick:function(){if(!h)if(p(!v),v)w(-1);else{var e=a.findIndex((function(e){return e.value===r}));w(e>=0?e:0)}},disabled:h,"aria-haspopup":"listbox","aria-expanded":v,"aria-labelledby":"select-label"},{children:[e.jsx("span",o({className:"st-custom-select-value"},{children:C?C.label:l})),e.jsx(fe,{})]})),e.jsx(R,o({open:v,setOpen:p,onClose:function(){p(!1),w(-1)},positioning:"absolute",overflow:"auto"},{children:e.jsx("div",o({className:"st-custom-select-options",role:"listbox"},{children:a.map((function(n,t){return e.jsx("div",o({className:"st-custom-select-option ".concat(n.value===r?"st-custom-select-option-selected":""," ").concat(t===g?"st-custom-select-option-focused":"").trim(),role:"option","aria-selected":n.value===r,onClick:function(){return e=n.value,i(e),p(!1),void w(-1);var e}},{children:n.label}),n.value)}))}))}))]}))},pe=function(n){var t=n.value,r=n.onChange,i=n.operators.map((function(e){return{value:e,label:se[e]}}));return e.jsx("div",o({className:"st-filter-section"},{children:e.jsx(ve,{value:t,onChange:function(e){r(e)},options:i})}))},me=function(n){var t=n.type,r=void 0===t?"text":t,o=n.value,i=n.onChange,a=n.placeholder,s=n.autoFocus,l=void 0!==s&&s,c=n.className,u=void 0===c?"":c;return e.jsx("input",{type:r,value:o,onChange:function(e){return i(e.target.value)},placeholder:a,autoFocus:l,className:"st-filter-input ".concat(u).trim()})},ge=function(n){var t=n.children,r=n.className,i=void 0===r?"":r;return e.jsx("div",o({className:"st-filter-section ".concat(i).trim()},{children:t}))},we=function(n){var t=n.onApply,r=n.onClear,i=n.canApply,a=n.showClear;return e.jsxs("div",o({className:"st-filter-actions"},{children:[e.jsx("button",o({onClick:t,disabled:!i,className:"st-filter-button st-filter-button-apply ".concat(i?"":"st-filter-button-disabled")},{children:"Apply"})),a&&r&&e.jsx("button",o({onClick:r,className:"st-filter-button st-filter-button-clear"},{children:"Clear"}))]}))},xe=function(t){var r=t.header,i=t.currentFilter,a=t.onApplyFilter,s=t.onClearFilter,l=n.useState((null==i?void 0:i.operator)||"contains"),c=l[0],u=l[1],d=n.useState(String((null==i?void 0:i.value)||"")),h=d[0],f=d[1],v=le("string");n.useEffect((function(){i?(u(i.operator),f(String(i.value||""))):(u("contains"),f(""))}),[i]);var p=de(c)||h.trim();return e.jsxs(he,{children:[e.jsx(pe,{value:c,onChange:u,operators:v}),ce(c)&&e.jsx(ge,{children:e.jsx(me,{type:"text",value:h,onChange:f,placeholder:"Filter...",autoFocus:!0})}),e.jsx(we,{onApply:function(){var e=o({accessor:r.accessor,operator:c},ce(c)&&{value:h});a(e)},onClear:s,canApply:!!p,showClear:!!i})]})},Ce=function(t){var r,o,i=t.header,a=t.currentFilter,s=t.onApplyFilter,l=t.onClearFilter,c=n.useState((null==a?void 0:a.operator)||"equals"),u=c[0],d=c[1],h=n.useState(String((null==a?void 0:a.value)||"")),f=h[0],v=h[1],p=n.useState(String((null===(r=null==a?void 0:a.values)||void 0===r?void 0:r[0])||"")),m=p[0],g=p[1],w=n.useState(String((null===(o=null==a?void 0:a.values)||void 0===o?void 0:o[1])||"")),x=w[0],C=w[1],b=le("number");n.useEffect((function(){var e,n;a?(d(a.operator),v(String(a.value||"")),g(String((null===(e=a.values)||void 0===e?void 0:e[0])||"")),C(String((null===(n=a.values)||void 0===n?void 0:n[1])||""))):(d("equals"),v(""),g(""),C(""))}),[a]);return e.jsxs(he,{children:[e.jsx(pe,{value:u,onChange:d,operators:b}),ce(u)&&e.jsx(ge,{children:e.jsx(me,{type:"number",value:f,onChange:v,placeholder:"Enter number...",autoFocus:!0})}),ue(u)&&e.jsxs(ge,{children:[e.jsx(me,{type:"number",value:m,onChange:g,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from"}),e.jsx(me,{type:"number",value:x,onChange:C,placeholder:"To..."})]}),e.jsx(we,{onApply:function(){var e={accessor:i.accessor,operator:u};ce(u)?e.value=parseFloat(f):ue(u)&&(e.values=[parseFloat(m.toString()),parseFloat(x.toString())]),s(e)},onClear:l,canApply:!!de(u)||(ce(u)?""!==f.trim():!!ue(u)&&""!==String(m).trim()&&""!==String(x).trim()),showClear:!!a})]})},be=function(n){var t=n.value,r=n.onChange,o=n.options,i=n.className,a=void 0===i?"":i,s=n.placeholder;return e.jsx(ve,{value:t,onChange:r,options:o,className:a,placeholder:s})},ye=function(t){var r=t.header,o=t.currentFilter,i=t.onApplyFilter,a=t.onClearFilter,s=n.useState((null==o?void 0:o.operator)||"equals"),l=s[0],c=s[1],u=n.useState(void 0!==(null==o?void 0:o.value)?String(o.value):"true"),d=u[0],h=u[1],f=le("boolean");n.useEffect((function(){o?(c(o.operator),h(void 0!==o.value?String(o.value):"true")):(c("equals"),h("true"))}),[o]);var v=de(l)||""!==d;return e.jsxs(he,{children:[e.jsx(pe,{value:l,onChange:c,operators:f}),ce(l)&&e.jsx(ge,{children:e.jsx(be,{value:d,onChange:h,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),e.jsx(we,{onApply:function(){var e={accessor:r.accessor,operator:l};ce(l)&&(e.value="true"===d),i(e)},onClear:a,canApply:v,showClear:!!o})]})},Ie=function(t){var r,i,a=t.header,s=t.currentFilter,l=t.onApplyFilter,c=t.onClearFilter,u=n.useState((null==s?void 0:s.operator)||"equals"),d=u[0],h=u[1],f=n.useState((null==s?void 0:s.value)?String(s.value):""),v=f[0],p=f[1],m=n.useState((null===(r=null==s?void 0:s.values)||void 0===r?void 0:r[0])?String(s.values[0]):""),g=m[0],w=m[1],x=n.useState(String((null===(i=null==s?void 0:s.values)||void 0===i?void 0:i[1])||"")),C=x[0],b=x[1],y=le("date");n.useEffect((function(){var e,n;s?(h(s.operator),p(String(s.value||"")),w(String((null===(e=s.values)||void 0===e?void 0:e[0])||"")),b(String((null===(n=s.values)||void 0===n?void 0:n[1])||""))):(h("equals"),p(""),w(""),b(""))}),[s]);var I=function(t){var r=t.value,i=t.onChange,a=t.placeholder,s=t.autoFocus,l=t.className,c=n.useState(!1),u=c[0],d=c[1],h=n.useState(""),f=h[0],v=h[1],p=n.useRef(null);n.useEffect((function(){if(r){var e=new Date(r);isNaN(e.getTime())||v(e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else v("")}),[r]),n.useEffect((function(){s&&p.current&&p.current.focus()}),[s]);var m=r?new Date(r):new Date;return e.jsxs("div",o({className:"st-date-input-container",style:{position:"relative"}},{children:[e.jsx("input",{ref:p,type:"text",value:f,placeholder:a,onClick:function(){d(!u)},onKeyDown:function(e){"Enter"===e.key||" "===e.key?(e.preventDefault(),d(!u)):"Escape"===e.key&&d(!1)},readOnly:!0,className:"st-filter-input ".concat(l||""),style:{cursor:"pointer"}}),e.jsx(R,o({open:u,setOpen:d,onClose:function(){d(!1)},positioning:"absolute",overflow:"visible"},{children:e.jsx(W,{value:m,onChange:function(e){var n=e.toISOString().split("T")[0];i(n),d(!1)},onClose:function(){return d(!1)}})}))]}))};return e.jsxs(he,{children:[e.jsx(pe,{value:d,onChange:h,operators:y}),ce(d)&&e.jsx(ge,{children:e.jsx(I,{value:v,onChange:p,placeholder:"Select date...",autoFocus:!0})}),ue(d)&&e.jsxs(ge,{children:[e.jsx(I,{value:g,onChange:w,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),e.jsx(I,{value:C,onChange:b,placeholder:"To date..."})]}),e.jsx(we,{onApply:function(){var e={accessor:a.accessor,operator:d};ce(d)?e.value=v:ue(d)&&(e.values=[g,C]),l(e)},onClear:c,canApply:!!de(d)||(ce(d)?""!==v.trim():!!ue(d)&&""!==g.trim()&&""!==C.trim()),showClear:!!s})]})},Se=function(n){var t=n.className,r=n.style;return e.jsx("svg",o({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:t,style:o({height:"10px"},r)},{children:e.jsx("path",{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})}))},je=function(n){var t=n.checked,r=void 0!==t&&t,i=n.children,a=n.onChange;return e.jsxs("label",o({className:"st-checkbox-label"},{children:[e.jsx("input",{checked:r,className:"st-checkbox-input",onChange:function(){a&&a(!r)},type:"checkbox"}),e.jsx("span",o({className:"st-checkbox-custom ".concat(r?"st-checked":"")},{children:r&&e.jsx(Se,{className:"st-checkbox-checkmark"})})),i]}))},Re=function(t){var r=t.header,i=t.currentFilter,a=t.onApplyFilter,l=t.onClearFilter,c=n.useMemo((function(){return r.enumOptions||[]}),[r.enumOptions]),u=n.useMemo((function(){return c.map((function(e){return e.value}))}),[c]),d=n.useState((null==i?void 0:i.values)?i.values.map(String):u),h=d[0],f=d[1];n.useEffect((function(){f(i?i.values?i.values.map(String):[]:u)}),[i,u]);var v=h.length===u.length;return e.jsxs(he,{children:[e.jsx(ge,{children:e.jsxs("div",o({className:"st-enum-filter-options"},{children:[e.jsx("div",o({className:"st-enum-select-all"},{children:e.jsx(je,o({checked:v,onChange:function(e){f(e?u:[])}},{children:e.jsx("span",o({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),c.map((function(n){return e.jsx(je,o({checked:h.includes(n.value),onChange:function(){return e=n.value,void f((function(n){return n.includes(e)?n.filter((function(n){return n!==e})):s(s([],n,!0),[e],!1)}));var e}},{children:e.jsx("span",o({className:"st-enum-option-label"},{children:n.label}))}),n.value)}))]}))}),e.jsx(we,{onApply:function(){if(h.length!==u.length){var e={accessor:r.accessor,operator:"in",values:h};a(e)}else l()},onClear:l,canApply:0!==h.length&&h.length!==u.length,showClear:!!i})]})},Ee=function(n){var t=n.header,r=n.currentFilter,o=n.onApplyFilter,i=n.onClearFilter;return e.jsx(e.Fragment,{children:function(){switch(t.type){case"number":return e.jsx(Ce,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i});case"boolean":return e.jsx(ye,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i});case"date":return e.jsx(Ie,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i});case"enum":return e.jsx(Re,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i});default:return e.jsx(xe,{header:t,currentFilter:r,onApplyFilter:o,onClearFilter:i})}}()})},ke=n.forwardRef((function(t,r){var i,a,c=t.colIndex,u=t.forceHeadersUpdate,d=t.gridColumnEnd,h=t.gridColumnStart,f=t.gridRowEnd,v=t.gridRowStart,p=t.header,m=t.reverse,g=t.sort,w=n.useState(!1),x=w[0],b=w[1],y=C(),I=y.columnReordering,S=y.columnResizing,j=y.draggedHeaderRef,E=y.filters,k=y.forceUpdate,N=y.handleApplyFilter,F=y.handleClearFilter,W=y.headersRef,M=y.hoveredHeaderRef,D=y.onColumnOrderChange,T=y.onSort,L=y.onTableHeaderDragEnd,H=y.rowHeight,A=y.selectColumns,O=y.selectableColumns,P=y.setInitialFocusedCell,q=y.setMainBodyWidth,U=y.setPinnedLeftWidth,Y=y.setPinnedRightWidth,K=y.setSelectedCells,G=y.setSelectedColumns,X=y.sortDownIcon,V=y.sortUpIcon,J=Boolean(null==p?void 0:p.isSortable),$=Boolean(null==p?void 0:p.filterable),_=E[p.accessor],Q="st-header-cell ".concat(p.accessor===(null===(i=M.current)||void 0===i?void 0:i.accessor)?"st-hovered":""," ").concat((null===(a=j.current)||void 0===a?void 0:a.accessor)===p.accessor?"st-dragging":""," ").concat(J?"clickable":""," ").concat(I&&!J?"columnReordering":""," ").concat(p.children?"parent":""),Z=z({draggedHeaderRef:j,headersRef:W,hoveredHeaderRef:M,onColumnOrderChange:D,onTableHeaderDragEnd:L}),ee=Z.handleDragStart,ne=Z.handleDragEnd,te=Z.handleDragOver,re=B(),ie=function(e){var n=e.event,t=e.header;if(O){var r=function(e,n){if(!e.children||0===e.children.length)return[n];var t=[],r=function(e,n){if(!e.children||0===e.children.length)return t.push(n),n+1;for(var o=n,i=0,a=e.children;i<a.length;i++){var s=a[i];o=r(s,o)}return o};return r(e,n),t}(t,c);return n.shiftKey&&A?G((function(e){if(0===e.size)return new Set(r);var n=r[0],t=Array.from(e).sort((function(e,n){return e-n})),o=t[0],i=Math.abs(n-o);t.forEach((function(e){var t=Math.abs(n-e);t<i&&(i=t,o=e)}));var a,l,c,u,d=s(s([],(a=o,l=n,c=Math.min(a,l),u=Math.max(a,l),Array.from({length:u-c+1},(function(e,n){return c+n}))),!0),r,!0);return new Set(s(s([],Array.from(e),!0),d,!0))})):A&&A(r),K(new Set),void P(null)}t.isSortable&&T(c,t.accessor)};if(n.useEffect((function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}}),[]),!p)return null;var se=S&&e.jsx("div",o({className:"st-header-resize-handle-container",onMouseDown:function(e){var n;re({callback:oe,callbackProps:{event:e.nativeEvent,forceUpdate:k,gridColumnEnd:d,gridColumnStart:h,header:p,headersRef:W,setMainBodyWidth:q,setPinnedLeftWidth:U,setPinnedRightWidth:Y,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})},onTouchStart:function(e){var n;re({callback:oe,callbackProps:{event:e,forceUpdate:k,gridColumnEnd:d,gridColumnStart:h,header:p,headersRef:W,setMainBodyWidth:q,setPinnedLeftWidth:U,setPinnedRightWidth:Y,startWidth:"object"==typeof r&&null!==r&&"current"in r?null===(n=r.current)||void 0===n?void 0:n.offsetWidth:void 0},limit:10})}},{children:e.jsx("div",{className:"st-header-resize-handle"})})),le=g&&g.key.accessor===p.accessor&&e.jsxs("div",o({className:"st-icon-container",onClick:function(e){return ie({event:e,header:p})}},{children:["ascending"===g.direction&&V&&V,"descending"===g.direction&&X&&X]})),ce=$&&e.jsxs("div",o({className:"st-icon-container",onClick:function(e){e.stopPropagation(),b(!x)}},{children:[e.jsx(ae,{className:"st-header-icon",style:{fill:_?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),e.jsx(R,o({open:x,overflow:"visible",setOpen:b,onClose:function(){return b(!1)}},{children:e.jsx(Ee,{header:p,currentFilter:_,onApplyFilter:function(e){N(e),b(!1)},onClearFilter:function(){F(p.accessor),b(!1)}})}))]}));return e.jsxs("div",o({className:Q,id:l({accessor:p.accessor,rowIndex:0}),onDragOver:function(e){re({callback:te,callbackProps:{event:e,hoveredHeader:p},limit:50})},ref:r,style:o(o({gridRowStart:v,gridRowEnd:f,gridColumnStart:h,gridColumnEnd:d},d-h>1?{}:{width:p.width}),f-v>1?{}:{height:H})},{children:[m&&se,"right"===p.align&&ce,"right"===p.align&&le,e.jsx("div",o({className:"st-header-label",draggable:I&&!p.disableReorder,onClick:function(e){return ie({event:e,header:p})},onDragEnd:function(e){e.preventDefault(),ne(),u()},onDragStart:function(e){I&&p&&function(e){ee(e)}(p)}},{children:e.jsx("span",o({className:"st-header-label-text ".concat("right"===p.align?"right-aligned":"center"===p.align?"center-aligned":"left-aligned")},{children:null==p?void 0:p.label}))})),"right"!==p.align&&le,"right"!==p.align&&ce,!m&&se]}))})),Ne=function(t){var r=t.columnIndices,i=t.gridTemplateColumns,a=t.handleScroll,s=t.headersRef,l=t.hiddenColumns,u=t.maxDepth,d=t.pinned,h=t.sectionRef,f=t.sort,v=n.useReducer((function(e){return e+1}),0)[1],p=n.useMemo((function(){var e=[],n=1,t=function(o,i,a){var s,h;if(void 0===a&&(a=!1),!c({hiddenColumns:l,header:o,pinned:d}))return 0;a||n++;var f=null!==(h=null===(s=o.children)||void 0===s?void 0:s.filter((function(e){return c({hiddenColumns:l,header:e,pinned:d})})).length)&&void 0!==h?h:0,v=n,p=f>0?v+f:v+1,m=i,g=f>0?i+1:u+1;if(e.push({header:o,gridColumnStart:v,gridColumnEnd:p,gridRowStart:m,gridRowEnd:g,colIndex:r[o.accessor]}),o.children){var w=!0;o.children.forEach((function(e){c({hiddenColumns:l,header:e,pinned:d})&&(t(e,i+1,w),w=!1)}))}return p-v},o=s.current.filter((function(e){return c({hiddenColumns:l,header:e,pinned:d})})),i=!0;return o.forEach((function(e){t(e,1,i),i=!1})),e}),[s,l,u,d,r]);return e.jsx(Q,o({condition:!d,wrapper:function(n){return e.jsx(_,o({childRef:h},{children:n}))}},{children:e.jsx("div",o({className:"st-header-".concat(d?"pinned-".concat(d):"main")},a&&{onScroll:a},{ref:h,style:{gridTemplateColumns:i,display:"grid",position:"relative"}},{children:e.jsx(e.Fragment,{children:p.map((function(t){return e.jsx(ke,{colIndex:t.colIndex,forceHeadersUpdate:v,gridColumnEnd:t.gridColumnEnd,gridColumnStart:t.gridColumnStart,gridRowEnd:t.gridRowEnd,gridRowStart:t.gridRowStart,header:t.header,ref:n.createRef(),reverse:"right"===d,sort:f},t.header.accessor)}))})}))}))},Fe=function(e){var n;return(null===(n=e.children)||void 0===n?void 0:n.length)?1+Math.max.apply(Math,e.children.map(Fe)):1},We=function(t){var r=t.centerHeaderRef,i=t.headerContainerRef,a=t.headersRef,s=t.hiddenColumns,l=t.mainTemplateColumns,u=t.pinnedLeftColumns,d=t.pinnedLeftTemplateColumns,h=t.pinnedRightColumns,f=t.pinnedRightTemplateColumns,v=t.sort,p=C(),m=p.pinnedLeftRef,g=p.pinnedRightRef,w=p.setPinnedLeftWidth,x=p.setPinnedRightWidth,b=n.useMemo((function(){return ee({headersRef:a,hiddenColumns:s,pinnedLeftColumns:u,pinnedRightColumns:h})}),[a,s,u,h]),y=n.useMemo((function(){var e=a.current,n=0;return e.forEach((function(e){if(c({hiddenColumns:s,header:e})){var t=Fe(e);n=Math.max(n,t)}})),{maxDepth:n}}),[a,s]).maxDepth;return n.useLayoutEffect((function(){var e,n;w(te(null===(e=m.current)||void 0===e?void 0:e.clientWidth)),x(te(null===(n=g.current)||void 0===n?void 0:n.clientWidth))}),[m,g,w,x]),e.jsxs("div",o({className:"st-header-container",ref:i},{children:[u.length>0&&e.jsx(Ne,{columnIndices:b,gridTemplateColumns:d,handleScroll:void 0,headersRef:a,hiddenColumns:s,maxDepth:y,pinned:"left",sectionRef:m,sort:v}),e.jsx(Ne,{columnIndices:b,gridTemplateColumns:l,handleScroll:void 0,headersRef:a,hiddenColumns:s,maxDepth:y,sectionRef:r,sort:v}),h.length>0&&e.jsx(Ne,{columnIndices:b,gridTemplateColumns:f,handleScroll:void 0,headersRef:a,hiddenColumns:s,maxDepth:y,pinned:"right",sectionRef:g,sort:v})]}))},Me=function(e){var n=e.headers,t=e.hiddenColumns,r=function(e){var n=e.headers,o=e.flattenedHeaders;return n.forEach((function(e){!0!==t[e.accessor]&&(e.children?r({headers:e.children,flattenedHeaders:o}):o.push(e))})),o},o=r({headers:n,flattenedHeaders:[]});return"".concat(o.map((function(e){return function(e){var n=e.minWidth,t=e.width;return"number"==typeof t&&(t="".concat(t,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"string"==typeof t&&t.endsWith("fr")?"minmax(".concat(n,", ").concat(t,")"):"max(".concat(n,", ").concat(t,")"):t}(e)})).join(" "))},De=function(t){var r=t.pinnedLeftWidth,i=t.pinnedRightWidth,a=t.setScrollTop,s=t.sort,l=t.tableRows,c=t.visibleRows,u=C(),d=u.columnResizing,h=u.editColumns,f=u.headersRef,v=u.hiddenColumns,p=n.useRef(null),m=n.useRef(null),g=f.current.filter((function(e){return!e.pinned})),w=f.current.filter((function(e){return"left"===e.pinned})),x=f.current.filter((function(e){return"right"===e.pinned})),b=n.useMemo((function(){return Me({headers:w,hiddenColumns:v})}),[w,v]),y=n.useMemo((function(){return Me({headers:g,hiddenColumns:v})}),[g,v]),I=n.useMemo((function(){return Me({headers:x,hiddenColumns:v})}),[x,v]),S={centerHeaderRef:m,headerContainerRef:p,headersRef:f,hiddenColumns:v,mainTemplateColumns:y,pinnedLeftColumns:w,pinnedLeftTemplateColumns:b,pinnedRightColumns:x,pinnedRightTemplateColumns:I,sort:s},j={tableRows:l,headerContainerRef:p,mainTemplateColumns:y,pinnedLeftColumns:w,pinnedLeftTemplateColumns:b,pinnedLeftWidth:r,pinnedRightColumns:x,pinnedRightTemplateColumns:I,pinnedRightWidth:i,setScrollTop:a,visibleRows:c};return e.jsxs("div",o({className:"st-content ".concat(d?"st-resizeable":"st-not-resizeable"),style:{width:h?"calc(100% - 27.5px)":"100%"}},{children:[e.jsx(We,o({},S)),e.jsx(ne,o({},j))]}))},Te=function(t){var r,i,a=t.mainBodyWidth,s=t.mainBodyRef,l=t.pinnedLeftWidth,c=t.pinnedRightWidth,u=t.setMainBodyWidth,d=t.tableBodyContainerRef,h=C().editColumns,f=n.useState(!1),v=f[0],p=f[1],m=n.useRef(null),g=d.current&&d.current.scrollHeight>d.current.clientHeight,w=h?28:0,x=(h?c+1:c)+(d.current&&g?d.current.offsetWidth-d.current.clientWidth:0);return n.useEffect((function(){setTimeout((function(){!function(){var e;if(s.current){var n=null===(e=s.current)||void 0===e?void 0:e.scrollWidth;u(n||0)}}()}),1)}),[s,u]),n.useEffect((function(){setTimeout((function(){!function(){if(s.current){var e=s.current.clientWidth;p(a>e)}}()}),1)}),[s,a,u]),v?e.jsxs("div",o({className:"st-horizontal-scrollbar-container"},{children:[l>0&&e.jsx("div",{className:"st-horizontal-scrollbar-left",style:{flexShrink:0,width:l,height:null===(r=m.current)||void 0===r?void 0:r.offsetHeight}}),a>0&&e.jsx(_,o({childRef:m},{children:e.jsx("div",o({className:"st-horizontal-scrollbar-middle",ref:m,style:{flexGrow:1}},{children:e.jsx("div",{style:{width:a,height:".3px"}})}))})),c>0&&e.jsx("div",{className:"st-horizontal-scrollbar-right",style:{flexShrink:0,minWidth:x,height:null===(i=m.current)||void 0===i?void 0:i.offsetHeight}}),w>0&&e.jsx("div",{style:{width:w-1.5,height:"100%",flexShrink:0}})]})):null},Le={string:function(e,n,t){if(e===n)return 0;var r=e.localeCompare(n);return"ascending"===t?r:-r},number:function(e,n,t){if(e===n)return 0;var r=e-n;return"ascending"===t?r:-r},boolean:function(e,n,t){if(e===n)return 0;var r=e===n?0:e?-1:1;return"ascending"===t?r:-r},date:function(e,n,t){var r=new Date(e),o=new Date(n);if(r.getTime()===o.getTime())return 0;var i=r.getTime()-o.getTime();return"ascending"===t?i:-i},enum:function(e,n,t){return Le.string(e,n,t)},default:function(e,n,t){return e===n?0:null==e?"ascending"===t?-1:1:null==n?"ascending"===t?1:-1:"string"==typeof e&&"string"==typeof n?Le.string(e,n,t):"number"==typeof e&&"number"==typeof n?Le.number(e,n,t):"boolean"==typeof e&&"boolean"==typeof n?Le.boolean(e,n,t):Le.string(String(e),String(n),t)}},He=function(e,n,t){var r=t.find((function(e){return e.accessor===n.key.accessor})),o=(null==r?void 0:r.type)||"string",i=n.direction;return s([],e,!0).sort((function(e,t){var r=n.key.accessor;return function(e,n,t,r){if(void 0===t&&(t="string"),null==e||""===e)return"ascending"===r?-1:1;if(null==n||""===n)return"ascending"===r?1:-1;if("number"===t){var o=function(e){var n;if("number"==typeof e)return e;var t=String(e);if("string"==typeof t){var r=t.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(r){var o=parseFloat(r[1]),i=null===(n=r[2])||void 0===n?void 0:n.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(t)||0},i=o(e),a=o(n);return Le.number(i,a,r)}return"date"===t?Le.date(String(e),String(n),r):"boolean"===t?Le.boolean(Boolean(e),Boolean(n),r):"enum"===t?Le.enum(String(e),String(n),r):Le.string(String(e),String(n),r)}(e[r],t[r],o,i)}))},Be=function(e){var t=e.headers,r=e.tableRows,o=n.useState(null),i=o[0],a=o[1],s=n.useMemo((function(){var e={};return t.forEach((function(n){!0===n.hide&&(e[n.accessor]=!0)})),e}),[t]),l=n.useState(s),c=l[0],u=l[1],d=n.useMemo((function(){if(!i)return r;var e=function(e,n,t){return{sortedData:He(n,t,e),newSortConfig:t}}(t,r,i).sortedData;return e}),[r,i,t]);return{hiddenColumns:c,setHiddenColumns:u,setSort:a,sort:i,sortedRows:d,updateSort:function(e,n){var r=function(e){for(var t=0,o=e;t<o.length;t++){var i=o[t];if(i.accessor===n)return i;if(i.children&&i.children.length>0){var a=r(i.children);if(a)return a}}},o=r(t);o&&a((function(e){return e&&e.key.accessor===n?"ascending"===e.direction?{key:o,direction:"descending"}:null:{key:o,direction:"ascending"}}))}}},Ae=function(e,n,t,r){void 0===r&&(r=new Set);for(var o=0,i=e;o<i.length;o++){var a=i[o];if(!r.has(a.accessor)&&(r.add(a.accessor),a.children&&a.children.length>0)){var s=a.children.some((function(e){return e.accessor===n})),l=!1;if(!s)for(var c=0,u=a.children;c<u.length;c++){var d=u[c];if(Ae([d],n,t,r),!1===t[d.accessor]){l=!0;break}}(s||l)&&(t[a.accessor]=!1)}}},Oe=function(e,n){return e.every((function(e){return!0===n[e.accessor]}))},Pe=function(e,n){e.forEach((function(e){e.children&&e.children.length>0&&(Pe(e.children,n),Oe(e.children,n)&&(n[e.accessor]=!0))}))},qe=function(t){var r=t.allHeaders,i=t.depth,a=void 0===i?0:i,s=t.header,l=t.hiddenColumns,c=t.setHiddenColumns,u=n.useState(!0),f=u[0],v=u[1],p=C(),m=p.expandIcon,g=p.headersRef,w=p.setMainBodyWidth,x=p.setPinnedLeftWidth,b=p.setPinnedRightWidth,y="".concat(16*a,"px"),I=s.children&&s.children.length>0,S=l[s.accessor]||I&&s.children&&Oe(s.children,l);return e.jsxs(e.Fragment,{children:[e.jsxs("div",o({className:"st-header-checkbox-item",style:{paddingLeft:y}},{children:[e.jsx("div",o({className:"st-header-icon-container"},{children:I?e.jsx("div",o({className:"st-collapsible-header-icon st-expand-icon-container ".concat(f?"expanded":"collapsed"),onClick:function(e){e.stopPropagation(),v(!f)}},{children:m})):null})),e.jsx(je,o({checked:S,onChange:function(e){var n=o({},l);(n[s.accessor]=e,e)?Pe(r,n):(Ae(r,s.accessor,n),I&&s.children&&s.children.length>0&&s.children.every((function(e){return!0===l[e.accessor]}))&&s.children[0]&&(n[s.children[0].accessor]=!1,Ae(r,s.children[0].accessor,n)));c(n),g.current.forEach((function(e){e.hide=!0===n[e.accessor]})),function(e){var n=e.headers,t=e.setMainBodyWidth,r=e.setPinnedLeftWidth,o=e.setPinnedRightWidth,i=0,a=0,s=0;n.forEach((function(e){if(!e.hide){var n=d(e).reduce((function(e,n){return e+h(n)}),0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:s+=n}}));var l=te(i),c=te(a);r(l),o(c),t(s)}({headers:g.current,setMainBodyWidth:w,setPinnedLeftWidth:x,setPinnedRightWidth:b})}},{children:s.label}))]})),I&&f&&s.children&&e.jsx("div",o({className:"st-nested-headers"},{children:s.children.map((function(n,t){return e.jsx(qe,{allHeaders:r,depth:a+1,header:n,hiddenColumns:l,setHiddenColumns:c},"".concat(n.accessor,"-").concat(t))}))}))]})},ze=function(n){var t=n.headers,r=n.open,i=n.position,a=n.setHiddenColumns,s=n.hiddenColumns,l="left"===i?"left":"";return e.jsx("div",o({className:"st-column-editor-popout ".concat(r?"open":""," ").concat(l),onClick:function(e){return e.stopPropagation()}},{children:e.jsx("div",o({className:"st-column-editor-popout-content"},{children:t.map((function(n,r){return e.jsx(qe,{header:n,hiddenColumns:s,setHiddenColumns:a,allHeaders:t},"".concat(n.accessor,"-").concat(r))}))}))}))},Ue=function(t){var r=t.columnEditorText,i=t.editColumns,a=t.editColumnsInitOpen,s=t.headers,l=t.hiddenColumns,c=t.position,u=void 0===c?"right":c,d=t.setHiddenColumns,h=n.useState(a),f=h[0],v=h[1];return i?e.jsxs("div",o({className:"st-column-editor ".concat(f?"open":""," ").concat(u),onClick:function(){return function(e){v(e)}(!f)},style:{width:28}},{children:[e.jsx("div",o({className:"st-column-editor-text"},{children:r})),e.jsx(ze,{headers:s,open:f,position:u,setHiddenColumns:d,hiddenColumns:l})]})):null},Ye=function(n){var t=n.className;return e.jsx("svg",o({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e.jsx("path",{d:"M22 334.5c-3.8 8.8-2 19 4.6 26l116 144c4.5 4.8 10.8 7.5 17.4 7.5s12.9-2.7 17.4-7.5l116-144c6.6-7 8.4-17.2 4.6-26s-12.5-14.5-22-14.5l-72 0 0-288c0-17.7-14.3-32-32-32L148 0C130.3 0 116 14.3 116 32l0 288-72 0c-9.6 0-18.2 5.7-22 14.5z"})}))},Ke=function(n){var t=n.className;return e.jsx("svg",o({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:t,style:{height:"1em"}},{children:e.jsx("path",{d:"M298 177.5c3.8-8.8 2-19-4.6-26l-116-144C172.9 2.7 166.6 0 160 0s-12.9 2.7-17.4 7.5l-116 144c-6.6 7-8.4 17.2-4.6 26S34.4 192 44 192l72 0 0 288c0 17.7 14.3 32 32 32l24 0c17.7 0 32-14.3 32-32l0-288 72 0c9.6 0 18.2-5.7 22-14.5z"})}))},Ge=function(t){var i=t.children,a=n.useRef({}),s=n.useCallback((function(e,n){return!!a.current[n]&&a.current[n].find((function(n){return n===e}))}),[]),l=n.useCallback((function(e,n){var t=e.clientWidth,r=e.scrollLeft;e.scrollWidth-t>0&&(n.scrollLeft=r)}),[]),c=n.useCallback((function(e){e.onscroll=null}),[]),u=n.useCallback((function(e,n){e.onscroll=function(){window.requestAnimationFrame((function(){n.forEach((function(n){var t;null===(t=a.current[n])||void 0===t||t.forEach((function(n){e!==n&&(c(n),l(e,n),window.requestAnimationFrame((function(){var e=Object.keys(a.current).filter((function(e){return a.current[e].includes(n)}));u(n,e)})))}))}))}))}}),[c,l]),d=n.useCallback((function(e,n){n.forEach((function(n){a.current[n]||(a.current[n]=[]),s(e,n)||(a.current[n].length>0&&l(a.current[n][0],e),a.current[n].push(e))})),u(e,n)}),[s,l,u]),h=n.useCallback((function(e,n){n.forEach((function(n){if(s(e,n)){c(e);var t=a.current[n].indexOf(e);-1!==t&&a.current[n].splice(t,1)}}))}),[s,c]);return e.jsx(J.Provider,o({value:{registerPane:d,unregisterPane:h}},{children:r.default.Children.only(i)}))},Xe=function(e,n){var t=n.find((function(n){return n.accessor===e.accessor})),r=(null==t?void 0:t.label)||e.accessor,o=se[e.operator],i="";return void 0!==e.value?i="boolean"==typeof e.value?e.value?"True":"False":String(e.value):e.values&&Array.isArray(e.values)&&("between"===e.operator||"notBetween"===e.operator?i="".concat(e.values[0]," - ").concat(e.values[1]):"in"!==e.operator&&"notIn"!==e.operator||(i=e.values.join(", "))),"isEmpty"===e.operator||"isNotEmpty"===e.operator?"".concat(r,": ").concat(o):"".concat(r,": ").concat(o," ").concat(i)},Ve=function(){var n=C(),t=n.filters,r=n.handleClearFilter,i=n.headersRef,a=Object.values(t);return 0===a.length||a.length>0?null:e.jsx("div",o({className:"st-filter-bar"},{children:e.jsx("div",o({className:"st-filter-bar-content"},{children:e.jsx("div",o({className:"st-filter-chips"},{children:a.map((function(n){return e.jsxs("div",o({className:"st-filter-chip"},{children:[e.jsx("span",o({className:"st-filter-chip-text"},{children:Xe(n,i.current)})),e.jsx("button",o({className:"st-filter-chip-remove",onClick:function(){return r(n.accessor)},"aria-label":"Remove filter for ".concat(n.accessor)},{children:"×"}))]}),n.accessor)}))}))}))}))},Je=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())},$e=function(e){var t=e.rows,r=n.useState({}),i=r[0],a=r[1],s=n.useMemo((function(){return 0===Object.keys(i).length?t:t.filter((function(e){return Object.values(i).every((function(n){try{return function(e,n){var t=n.operator,r=n.value,o=n.values;if(null==e)return"isEmpty"===t;if("isEmpty"===t)return!e||""===String(e).trim();if("isNotEmpty"===t)return e&&""!==String(e).trim();if("string"==typeof e||"contains"===t||"notContains"===t||"startsWith"===t||"endsWith"===t){var i=String(e).toLowerCase(),a=r?String(r).toLowerCase():"";switch(t){case"equals":return i===a;case"notEquals":return i!==a;case"contains":return i.includes(a);case"notContains":return!i.includes(a);case"startsWith":return i.startsWith(a);case"endsWith":return i.endsWith(a)}}if("number"==typeof e||!isNaN(Number(e))){var s=Number(e),l=Number(r);switch(t){case"equals":return s===l;case"notEquals":return s!==l;case"greaterThan":return s>l;case"lessThan":return s<l;case"greaterThanOrEqual":return s>=l;case"lessThanOrEqual":return s<=l;case"between":if(o&&2===o.length){var c=o.map(Number),u=c[0],d=c[1];return s>=u&&s<=d}return!1;case"notBetween":if(o&&2===o.length){var h=o.map(Number);return u=h[0],d=h[1],s<u||s>d}return!0}}if(e instanceof Date||!isNaN(Date.parse(e))){var f=new Date(e),v=new Date(String(r||"")),p=Je(f),m=Je(v);switch(t){case"equals":return p.getTime()===m.getTime();case"notEquals":return p.getTime()!==m.getTime();case"before":return p<m;case"after":return p>m;case"between":if(o&&2===o.length){var g=o.map((function(e){return Je(new Date(String(e||"")))})),w=g[0],x=g[1];return p>=w&&p<=x}return!1;case"notBetween":if(o&&2===o.length){var C=o.map((function(e){return Je(new Date(String(e||"")))}));return w=C[0],x=C[1],p<w||p>x}return!0}}if("boolean"==typeof e){var b=Boolean(r);if("equals"===t)return e===b}if("in"===t||"notIn"===t){if(o&&Array.isArray(o)){var y=String(e),I=o.includes(y);return"in"===t?I:!I}return!1}var S=String(e).toLowerCase(),j=r?String(r).toLowerCase():"";switch(t){case"equals":return S===j;case"notEquals":return S!==j;default:return!0}}(e[n.accessor],n)}catch(e){return console.warn("Filter error for accessor ".concat(n.accessor,":"),e),!0}}))}))}),[t,i]),l=n.useCallback((function(e){a((function(n){var t;return o(o({},n),((t={})[e.accessor]=e,t))}))}),[]),c=n.useCallback((function(e){a((function(n){var t=o({},n);return delete t[e],t}))}),[]),u=n.useCallback((function(){a({})}),[]);return{filters:i,filteredRows:s,handleApplyFilter:l,handleClearFilter:c,handleClearAllFilters:u}},_e=function(t){var r=t.allowAnimations,s=void 0!==r&&r,l=t.cellUpdateFlash,c=void 0!==l&&l,h=t.columnEditorPosition,f=void 0===h?"right":h,v=t.columnEditorText,w=void 0===v?"Columns":v,C=t.columnReordering,S=void 0!==C&&C,j=t.columnResizing,R=void 0!==j&&j,E=t.defaultHeaders,k=t.editColumns,N=void 0!==k&&k,F=t.editColumnsInitOpen,W=void 0!==F&&F,M=t.expandAll,D=void 0===M||M,T=t.expandIcon,L=void 0===T?e.jsx(I,{className:"st-expand-icon"}):T,H=t.height,B=t.hideFooter,A=void 0!==B&&B,O=t.nextIcon,P=void 0===O?e.jsx(I,{className:"st-next-prev-icon"}):O,q=t.onCellEdit,z=t.onColumnOrderChange,U=t.onGridReady,Y=t.onNextPage,K=t.prevIcon,G=void 0===K?e.jsx(y,{className:"st-next-prev-icon"}):K,X=t.rowGrouping,V=t.rowHeight,J=void 0===V?32:V,$=t.rowIdAccessor,_=t.rows,Q=t.rowsPerPage,Z=void 0===Q?10:Q,ee=t.selectableCells,ne=void 0!==ee&&ee,te=t.selectableColumns,re=void 0!==te&&te,oe=t.shouldPaginate,ie=void 0!==oe&&oe,ae=t.sortDownIcon,se=void 0===ae?e.jsx(Ye,{className:"st-header-icon"}):ae,le=t.sortUpIcon,ce=void 0===le?e.jsx(Ke,{className:"st-header-icon"}):le,ue=t.tableRef,de=t.theme,he=void 0===de?"light":de,fe=t.useHoverRowBackground,ve=void 0===fe||fe,pe=t.useOddEvenRowBackground,me=void 0===pe||pe,ge=t.useOddColumnBackground,we=void 0!==ge&≥we&&(me=!1);var xe=n.useRef(null),Ce=n.useRef(E),be=n.useRef(null),ye=n.useRef(null),Ie=n.useRef(null),Se=n.useRef(null),je=n.useRef(null),Re=n.useState(1),Ee=Re[0],ke=Re[1],Ne=n.useState(0),Fe=Ne[0],We=Ne[1],Me=n.useState(0),Le=Me[0],He=Me[1],Ae=n.useState(0),Oe=Ae[0],Pe=Ae[1],qe=n.useState(0),ze=qe[0],Xe=qe[1],Je=n.useState(0),_e=Je[0],Qe=Je[1],Ze=n.useState(new Set),en=Ze[0],nn=Ze[1],tn=$e({rows:_}),rn=tn.filters,on=tn.filteredRows,an=tn.handleApplyFilter,sn=tn.handleClearFilter,ln=tn.handleClearAllFilters,cn=Be({headers:Ce.current,tableRows:on}),un=cn.sort,dn=cn.sortedRows,hn=cn.hiddenColumns,fn=cn.setHiddenColumns,vn=cn.updateSort;n.useEffect((function(){null==U||U()}),[U]);var pn=n.useMemo((function(){if(!ie)return dn;var e=(Ee-1)*Z,n=e+Z;return dn.slice(e,n)}),[Ee,Z,ie,dn]),mn=n.useMemo((function(){return X&&0!==X.length?m({rows:pn,rowGrouping:X,rowIdAccessor:$,expandedRows:en,expandAll:D}):pn.map((function(e,n){return{row:e,depth:0,groupingKey:void 0,position:n,isLastGroupRow:!1}}))}),[pn,X,$,en,D]),gn=function(e){var t=e.height,r=e.rowHeight;return n.useMemo((function(){var e;if(!t)return window.innerHeight-r;var n=document.querySelector(".simple-table-root"),o=0;if(t.endsWith("px"))o=parseInt(t,10);else if(t.endsWith("vh")){var i=parseInt(t,10);o=window.innerHeight*i/100}else if(t.endsWith("%")){var a=parseInt(t,10);o=((null===(e=null==n?void 0:n.parentElement)||void 0===e?void 0:e.clientHeight)||window.innerHeight)*a/100}else o=window.innerHeight;return Math.max(0,o-r)}),[t,r])}({height:H,rowHeight:J}),wn=n.useMemo((function(){return function(e){var n=e.bufferRowCount,t=e.contentHeight,r=e.tableRows,o=e.rowHeight,i=e.scrollTop,a=o+1,s=Math.max(0,i-a*n),l=i+t+a*n,c=Math.max(0,Math.floor(s/a)),u=Math.min(r.length,Math.ceil(l/a));return r.slice(c,u)}({bufferRowCount:5,contentHeight:gn,tableRows:mn,rowHeight:J,scrollTop:ze})}),[gn,J,mn,ze]),xn=n.useRef(new Map),Cn=n.useReducer((function(e){return e+1}),0)[1],bn=function(e){var t=e.selectableCells,r=e.headers,o=e.visibleRows,s=e.rowIdAccessor,l=e.onCellEdit,c=e.cellRegistry,u=n.useState(new Set),h=u[0],f=u[1],v=n.useState(new Set),m=v[0],w=v[1],x=n.useState(null),C=x[0],b=x[1],y=n.useState(null),I=y[0],S=y[1],j=n.useState(new Set),R=j[0],E=j[1],k=n.useState(new Set),N=k[0],F=k[1],W=n.useRef(!1),M=n.useRef(null),D=n.useMemo((function(){return r.flatMap(d)}),[r]),T=n.useCallback((function(){var e=D.filter((function(e){return!e.hide})),n=new Map;e.forEach((function(e,t){n.set(t,e.accessor)}));var t=Array.from(h).reduce((function(e,t){var r,i=t.split("-").map(Number),a=i[0],s=i[1];e[a]||(e[a]=[]);var l=n.get(s);return l&&(null===(r=o[a])||void 0===r?void 0:r.row)?e[a][s]=o[a].row[l]:e[a][s]="",e}),{}),r=Object.values(t).map((function(e){return Object.values(e).join("\t")})).join("\n");h.size>0&&(navigator.clipboard.writeText(r),E(new Set(h)),setTimeout((function(){E(new Set)}),800))}),[D,h,o]),L=n.useCallback((function(){return i(void 0,void 0,void 0,(function(){var e,n,t,r,i,u,d,h;return a(this,(function(a){switch(a.label){case 0:if(!I)return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,navigator.clipboard.readText()];case 2:return(e=a.sent())?0===(n=e.split("\n").filter((function(e){return e.length>0}))).length?[2]:(t=D.filter((function(e){return!e.hide})),r=new Set,i=new Set,u=I.rowIndex,d=I.colIndex,n.forEach((function(e,n){e.split("\t").forEach((function(e,a){var h=u+n,f=d+a;if(!(h>=o.length||f>=t.length)){var v=o[h],m=t[f],w=p(v.row,h,s);if(null==m?void 0:m.isEditable){var x=e;if("number"===m.type){var C=Number(e);isNaN(C)||(x=C)}else if("boolean"===m.type)x="true"===e.toLowerCase()||"1"===e;else if("date"===m.type){var b=new Date(e);isNaN(b.getTime())||(x=b)}if(v.row[m.accessor]=x,c){var y="".concat(w,"-").concat(m.accessor),I=c.get(y);I&&I.updateContent(x)}null==l||l({accessor:m.accessor,newValue:x,row:v.row,rowIndex:h});var S=g({colIndex:f,rowIndex:h,rowId:w});r.add(S)}else{var j=g({colIndex:f,rowIndex:h,rowId:w});i.add(j)}}}))})),r.size>0&&(E(r),setTimeout((function(){E(new Set)}),800)),i.size>0&&(F(i),setTimeout((function(){F(new Set)}),800)),[3,4]):[2];case 3:return h=a.sent(),console.warn("Failed to paste from clipboard:",h),[3,4];case 4:return[2]}}))}))}),[I,D,o,s,l,c]),H=n.useCallback((function(e,n){for(var t=new Set,r=Math.min(e.rowIndex,n.rowIndex),i=Math.max(e.rowIndex,n.rowIndex),a=Math.min(e.colIndex,n.colIndex),l=Math.max(e.colIndex,n.colIndex),c=r;c<=i;c++)for(var u=a;u<=l;u++)if(c>=0&&c<o.length){var d=p(o[c].row,c,s);t.add(g({colIndex:u,rowIndex:c,rowId:d}))}w(new Set),b(null),f(t)}),[o,s,w,b,f]),B=n.useCallback((function(e){if(e.rowIndex>=0&&e.rowIndex<o.length&&e.colIndex>=0&&e.colIndex<D.length){var n=g(e);w(new Set),b(null),f(new Set([n])),S(e)}}),[D.length,o.length,w,b,f,S]),A=n.useCallback((function(e,n){void 0===n&&(n=!1),f(new Set),S(null),w((function(t){var r=new Set(n?t:[]);return e.forEach((function(e){return r.add(e)})),r})),e.length>0&&b(e[e.length-1])}),[f,S,w,b]);n.useEffect((function(){var e=function(e){var n;if(t&&I){var r=I.rowIndex,i=I.colIndex,a=I.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if((e.ctrlKey||e.metaKey)&&"v"===e.key)return e.preventDefault(),void L();if(p(null===(n=o[r])||void 0===n?void 0:n.row,r,s)!==a){var l=o.findIndex((function(e,n){return p(e.row,n,s)===a}));if(-1===l)return;r=l}if("ArrowUp"===e.key){if(e.preventDefault(),r>0){var c=p(o[r-1].row,r-1,s);B({rowIndex:r-1,colIndex:i,rowId:c})}}else"ArrowDown"===e.key?(e.preventDefault(),r<o.length-1&&(c=p(o[r+1].row,r+1,s),B({rowIndex:r+1,colIndex:i,rowId:c}))):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),i>0&&(c=p(o[r].row,r,s),B({rowIndex:r,colIndex:i-1,rowId:c}))):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),i<D.length-1&&(c=p(o[r].row,r,s),B({rowIndex:r,colIndex:i+1,rowId:c}))):"Escape"===e.key&&(f(new Set),w(new Set),b(null),M.current=null,S(null))}else T()}};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[T,D.length,I,s,H,B,t,o,L]);var O=n.useCallback((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=g({colIndex:n,rowIndex:t,rowId:r}),i=h.has(o),a=m.has(n);return i||a}),[h,m]),P=n.useCallback((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,i=[],a=o[t-1]?p(o[t-1].row,t-1,s):null,l=o[t+1]?p(o[t+1].row,t+1,s):null,c=null!==a?{colIndex:n,rowIndex:t-1,rowId:a}:null,u=null!==l?{colIndex:n,rowIndex:t+1,rowId:l}:null,d={colIndex:n-1,rowIndex:t,rowId:r},h={colIndex:n+1,rowIndex:t,rowId:r};return(!c||!O(c)||m.has(n)&&0===t)&&i.push("st-selected-top-border"),(!u||!O(u)||m.has(n)&&t===o.length-1)&&i.push("st-selected-bottom-border"),O(d)||i.push("st-selected-left-border"),O(h)||i.push("st-selected-right-border"),i.join(" ")}),[O,o,m,s]),q=n.useMemo((function(){return I?function(e){var n=e.rowIndex,t=e.colIndex,r=e.rowId;return n===I.rowIndex&&t===I.colIndex&&r===I.rowId}:function(){return!1}}),[I]),z=n.useCallback((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=g({colIndex:n,rowIndex:t,rowId:r});return R.has(o)}),[R]),U=n.useCallback((function(e){var n=e.colIndex,t=e.rowIndex,r=e.rowId,o=g({colIndex:n,rowIndex:t,rowId:r});return N.has(o)}),[N]);return{getBorderClass:P,handleMouseDown:function(e){var n=e.colIndex,r=e.rowIndex,o=e.rowId;t&&(W.current=!0,M.current={rowIndex:r,colIndex:n,rowId:o},setTimeout((function(){w(new Set),b(null);var e=g({colIndex:n,rowIndex:r,rowId:o});f(new Set([e])),S({rowIndex:r,colIndex:n,rowId:o})}),0))},handleMouseOver:function(e){var n=e.colIndex,r=e.rowIndex;if(e.rowId,t&&W.current&&M.current){for(var i=new Set,a=Math.min(M.current.rowIndex,r),l=Math.max(M.current.rowIndex,r),c=Math.min(M.current.colIndex,n),u=Math.max(M.current.colIndex,n),d=a;d<=l;d++)for(var h=c;h<=u;h++)if(d>=0&&d<o.length){var v=p(o[d].row,d,s);i.add(g({colIndex:h,rowIndex:d,rowId:v}))}f(i)}},handleMouseUp:function(){W.current=!1},isCopyFlashing:z,isWarningFlashing:U,isInitialFocusedCell:q,isSelected:O,lastSelectedColumnIndex:C,pasteFromClipboard:L,selectColumns:A,selectedCells:h,selectedColumns:m,setInitialFocusedCell:S,setSelectedCells:f,setSelectedColumns:w}}({selectableCells:ne,headers:Ce.current,visibleRows:wn,rowIdAccessor:$,onCellEdit:q,cellRegistry:xn.current}),yn=bn.getBorderClass,In=bn.handleMouseDown,Sn=bn.handleMouseOver,jn=bn.handleMouseUp,Rn=bn.isCopyFlashing,En=bn.isInitialFocusedCell,kn=bn.isSelected,Nn=bn.isWarningFlashing,Fn=bn.selectColumns,Wn=bn.selectedCells,Mn=bn.selectedColumns,Dn=bn.setInitialFocusedCell,Tn=bn.setSelectedCells,Ln=bn.setSelectedColumns,Hn=n.useCallback((function(e,n){vn(e,n)}),[vn]),Bn=n.useCallback((function(e){Ce.current=e,Cn()}),[]);return function(e){var t=e.selectableColumns,r=e.selectedCells,o=e.selectedColumns,i=e.setSelectedCells,a=e.setSelectedColumns;n.useEffect((function(){var e=function(e){var n=e.target;n.closest(".st-cell")||t&&(n.classList.contains("st-header-cell")||n.classList.contains("st-header-label"))||(r.size>0&&i(new Set),o.size>0&&a(new Set))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[t,r,o,i,a])}({selectableColumns:re,selectedCells:Wn,selectedColumns:Mn,setSelectedCells:Tn,setSelectedColumns:Ln}),n.useLayoutEffect((function(){if(je.current){var e=je.current.offsetWidth-je.current.clientWidth;Qe(e)}}),[]),function(e){var t=e.forceUpdate,r=e.tableBodyContainerRef,o=e.setScrollbarWidth;n.useLayoutEffect((function(){var e=function(){if(t(),r.current){var e=r.current.offsetWidth-r.current.clientWidth;o(e)}};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[t,r,o])}({forceUpdate:Cn,tableBodyContainerRef:je,setScrollbarWidth:Qe}),n.useEffect((function(){ue&&(ue.current={updateData:function(e){var n=e.accessor,t=e.rowIndex,r=e.newValue,o=null==_?void 0:_[t];if(o){var i=p(o,t,$),a=u({rowId:i,accessor:n}),s=xn.current.get(a);s&&s.updateContent(r),void 0!==o[n]&&(o[n]=r)}}})}),[ue,_,$]),e.jsx(x,o({value:{allowAnimations:s,cellRegistry:xn.current,cellUpdateFlash:c,columnReordering:S,columnResizing:R,draggedHeaderRef:xe,editColumns:N,expandIcon:L,expandedRows:en,filters:rn,tableRows:mn,forceUpdate:Cn,getBorderClass:yn,handleApplyFilter:an,handleClearFilter:sn,handleClearAllFilters:ln,handleMouseDown:In,handleMouseOver:Sn,headersRef:Ce,hiddenColumns:hn,hoveredHeaderRef:be,isCopyFlashing:Rn,isInitialFocusedCell:En,isSelected:kn,isWarningFlashing:Nn,mainBodyRef:ye,nextIcon:P,onCellEdit:q,onColumnOrderChange:z,onSort:Hn,onTableHeaderDragEnd:Bn,pinnedLeftRef:Ie,pinnedRightRef:Se,prevIcon:G,rowGrouping:X,rowHeight:J,rowIdAccessor:$,scrollbarWidth:_e,selectColumns:Fn,selectableColumns:re,setExpandedRows:nn,setInitialFocusedCell:Dn,setMainBodyWidth:We,setPinnedLeftWidth:He,setPinnedRightWidth:Pe,setSelectedCells:Tn,setSelectedColumns:Ln,shouldPaginate:ie,sortDownIcon:se,sortUpIcon:ce,tableBodyContainerRef:je,theme:he,useHoverRowBackground:ve,useOddColumnBackground:we,useOddEvenRowBackground:me}},{children:e.jsx("div",o({className:"simple-table-root st-wrapper theme-".concat(he),style:H?{height:H}:{}},{children:e.jsx(Ge,{children:e.jsxs("div",o({className:"st-wrapper-container"},{children:[e.jsx(Ve,{}),e.jsxs("div",o({className:"st-content-wrapper",onMouseUp:jn,onMouseLeave:jn},{children:[e.jsx(De,{tableRows:mn,pinnedLeftWidth:Le,pinnedRightWidth:Oe,setScrollTop:Xe,sort:un,visibleRows:wn}),e.jsx(Ue,{columnEditorText:w,editColumns:N,editColumnsInitOpen:W,headers:Ce.current,hiddenColumns:hn,position:f,setHiddenColumns:fn})]})),e.jsx(Te,{mainBodyRef:ye,mainBodyWidth:Fe,pinnedLeftWidth:Le,pinnedRightWidth:Oe,setMainBodyWidth:We,tableBodyContainerRef:je}),e.jsx(b,{currentPage:Ee,hideFooter:A,onPageChange:ke,onNextPage:Y,shouldPaginate:ie,totalPages:Math.ceil(on.length/Z)})]}))})}))}))};exports.SimpleTable=function(t){var r=n.useState(!1),i=r[0],a=r[1];return n.useEffect((function(){a(!0)}),[]),i?e.jsx(_e,o({},t)):null};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");.simple-table-root{--st-after-width:11.01px;--st-resize-handle-width:2px;--st-resize-handle-container-width:10px;--st-border-width:1px;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-white:#fff;--st-black:#000;--st-slate-50:#f8fafc;--st-slate-100:#f1f5f9;--st-slate-200:#e2e8f0;--st-slate-300:#cbd5e1;--st-slate-400:#94a3b8;--st-slate-500:#64748b;--st-slate-600:#475569;--st-slate-700:#334155;--st-slate-800:#1e293b;--st-slate-900:#0f172a;--st-slate-950:#020617;--st-gray-50:#f9fafb;--st-gray-100:#f3f4f6;--st-gray-200:#e5e7eb;--st-gray-300:#d1d5db;--st-gray-400:#9ca3af;--st-gray-500:#6b7280;--st-gray-600:#4b5563;--st-gray-700:#374151;--st-gray-800:#1f2937;--st-gray-900:#111827;--st-gray-950:#030712;--st-zinc-50:#fafafa;--st-zinc-100:#f4f4f5;--st-zinc-200:#e4e4e7;--st-zinc-300:#d4d4d8;--st-zinc-400:#a1a1aa;--st-zinc-500:#71717a;--st-zinc-600:#52525b;--st-zinc-700:#3f3f46;--st-zinc-800:#27272a;--st-zinc-900:#18181b;--st-zinc-950:#09090b;--st-neutral-50:#fafafa;--st-neutral-100:#f5f5f5;--st-neutral-200:#e5e5e5;--st-neutral-300:#d4d4d4;--st-neutral-400:#a3a3a3;--st-neutral-500:#737373;--st-neutral-600:#525252;--st-neutral-700:#404040;--st-neutral-800:#262626;--st-neutral-900:#171717;--st-neutral-950:#0a0a0a;--st-stone-50:#fafaf9;--st-stone-100:#f5f5f4;--st-stone-200:#e7e5e4;--st-stone-300:#d6d3d1;--st-stone-400:#a8a29e;--st-stone-500:#78716c;--st-stone-600:#57534e;--st-stone-700:#44403c;--st-stone-800:#292524;--st-stone-900:#1c1917;--st-stone-950:#0c0a09;--st-red-50:#fef2f2;--st-red-100:#fee2e2;--st-red-200:#fecaca;--st-red-300:#fca5a5;--st-red-400:#f87171;--st-red-500:#ef4444;--st-red-600:#dc2626;--st-red-700:#b91c1c;--st-red-800:#991b1b;--st-red-900:#7f1d1d;--st-red-950:#450a0a;--st-orange-50:#fff7ed;--st-orange-100:#ffedd5;--st-orange-200:#fed7aa;--st-orange-300:#fdba74;--st-orange-400:#fb923c;--st-orange-500:#f97316;--st-orange-600:#ea580c;--st-orange-700:#c2410c;--st-orange-800:#9a3412;--st-orange-900:#7c2d12;--st-orange-950:#431407;--st-amber-50:#fffbeb;--st-amber-100:#fef3c7;--st-amber-200:#fde68a;--st-amber-300:#fcd34d;--st-amber-400:#fbbf24;--st-amber-500:#f59e0b;--st-amber-600:#d97706;--st-amber-700:#b45309;--st-amber-800:#92400e;--st-amber-900:#78350f;--st-amber-950:#451a03;--st-yellow-50:#fefce8;--st-yellow-100:#fef9c3;--st-yellow-200:#fef08a;--st-yellow-300:#fde047;--st-yellow-400:#facc15;--st-yellow-500:#eab308;--st-yellow-600:#ca8a04;--st-yellow-700:#a16207;--st-yellow-800:#854d0e;--st-yellow-900:#713f12;--st-yellow-950:#422006;--st-lime-50:#f7fee7;--st-lime-100:#ecfccb;--st-lime-200:#d9f99d;--st-lime-300:#bef264;--st-lime-400:#a3e635;--st-lime-500:#84cc16;--st-lime-600:#65a30d;--st-lime-700:#4d7c0f;--st-lime-800:#3f6212;--st-lime-900:#365314;--st-lime-950:#1a2e05;--st-green-50:#f0fdf4;--st-green-100:#dcfce7;--st-green-200:#bbf7d0;--st-green-300:#86efac;--st-green-400:#4ade80;--st-green-500:#22c55e;--st-green-600:#16a34a;--st-green-700:#15803d;--st-green-800:#166534;--st-green-900:#14532d;--st-green-950:#052e16;--st-emerald-50:#ecfdf5;--st-emerald-100:#d1fae5;--st-emerald-200:#a7f3d0;--st-emerald-300:#6ee7b7;--st-emerald-400:#34d399;--st-emerald-500:#10b981;--st-emerald-600:#059669;--st-emerald-700:#047857;--st-emerald-800:#065f46;--st-emerald-900:#064e3b;--st-emerald-950:#022c22;--st-teal-50:#f0fdfa;--st-teal-100:#ccfbf1;--st-teal-200:#99f6e4;--st-teal-300:#5eead4;--st-teal-400:#2dd4bf;--st-teal-500:#14b8a6;--st-teal-600:#0d9488;--st-teal-700:#0f766e;--st-teal-800:#115e59;--st-teal-900:#134e4a;--st-teal-950:#042f2e;--st-cyan-50:#ecfeff;--st-cyan-100:#cffafe;--st-cyan-200:#a5f3fc;--st-cyan-300:#67e8f9;--st-cyan-400:#22d3ee;--st-cyan-500:#06b6d4;--st-cyan-600:#0891b2;--st-cyan-700:#0e7490;--st-cyan-800:#155e75;--st-cyan-900:#164e63;--st-cyan-950:#083344;--st-sky-50:#f0f9ff;--st-sky-100:#e0f2fe;--st-sky-200:#bae6fd;--st-sky-300:#7dd3fc;--st-sky-400:#38bdf8;--st-sky-500:#0ea5e9;--st-sky-600:#0284c7;--st-sky-700:#0369a1;--st-sky-800:#075985;--st-sky-900:#0c4a6e;--st-sky-950:#082f49;--st-blue-50:#eff6ff;--st-blue-100:#dbeafe;--st-blue-200:#bfdbfe;--st-blue-300:#93c5fd;--st-blue-400:#60a5fa;--st-blue-500:#3b82f6;--st-blue-600:#2563eb;--st-blue-700:#1d4ed8;--st-blue-800:#1e40af;--st-blue-900:#1e3a8a;--st-blue-950:#172554;--st-indigo-50:#eef2ff;--st-indigo-100:#e0e7ff;--st-indigo-200:#c7d2fe;--st-indigo-300:#a5b4fc;--st-indigo-400:#818cf8;--st-indigo-500:#6366f1;--st-indigo-600:#4f46e5;--st-indigo-700:#4338ca;--st-indigo-800:#3730a3;--st-indigo-900:#312e81;--st-indigo-950:#1e1b4b;--st-violet-50:#f5f3ff;--st-violet-100:#ede9fe;--st-violet-200:#ddd6fe;--st-violet-300:#c4b5fd;--st-violet-400:#a78bfa;--st-violet-500:#8b5cf6;--st-violet-600:#7c3aed;--st-violet-700:#6d28d9;--st-violet-800:#5b21b6;--st-violet-900:#4c1d95;--st-violet-950:#2e1065;--st-purple-50:#faf5ff;--st-purple-100:#f3e8ff;--st-purple-200:#e9d5ff;--st-purple-300:#d8b4fe;--st-purple-400:#c084fc;--st-purple-500:#a855f7;--st-purple-600:#9333ea;--st-purple-700:#7e22ce;--st-purple-800:#6b21a8;--st-purple-900:#581c87;--st-purple-950:#3b0764;--st-fuchsia-50:#fdf4ff;--st-fuchsia-100:#fae8ff;--st-fuchsia-200:#f5d0fe;--st-fuchsia-300:#f0abfc;--st-fuchsia-400:#e879f9;--st-fuchsia-500:#d946ef;--st-fuchsia-600:#c026d3;--st-fuchsia-700:#a21caf;--st-fuchsia-800:#86198f;--st-fuchsia-900:#701a75;--st-fuchsia-950:#4a044e;--st-pink-50:#fdf2f8;--st-pink-100:#fce7f3;--st-pink-200:#fbcfe8;--st-pink-300:#f9a8d4;--st-pink-400:#f472b6;--st-pink-500:#ec4899;--st-pink-600:#db2777;--st-pink-700:#be185d;--st-pink-800:#9d174d;--st-pink-900:#831843;--st-pink-950:#500724;--st-rose-50:#fff1f2;--st-rose-100:#ffe4e6;--st-rose-200:#fecdd3;--st-rose-300:#fda4af;--st-rose-400:#fb7185;--st-rose-500:#f43f5e;--st-rose-600:#e11d48;--st-rose-700:#be123c;--st-rose-800:#9f1239;--st-rose-900:#881337;--st-rose-950:#4c0519}.theme-light{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-slate-50);--st-scrollbar-thumb-color:var(--st-slate-300);--st-border-color:var(--st-slate-300);--st-odd-row-background-color:var(--st-white);--st-even-row-background-color:var(--st-slate-50);--st-odd-column-background-color:var(--st-slate-50);--st-even-column-background-color:var(--st-white);--st-hover-row-background-color:var(--st-slate-100);--st-header-background-color:var(--st-slate-100);--st-header-label-color:var(--st-slate-900);--st-header-icon-color:var(--st-slate-500);--st-dragging-background-color:var(--st-slate-200);--st-selected-cell-background-color:var(--st-blue-100);--st-selected-first-cell-background-color:var(--st-blue-50);--st-footer-background-color:var(--st-slate-50);--st-cell-color:var(--st-slate-900);--st-cell-odd-row-color:var(--st-slate-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-slate-900);--st-selected-first-cell-color:var(--st-slate-900);--st-resize-handle-color:var(--st-slate-400);--st-separator-border-color:var(--st-slate-200);--st-last-group-row-separator-border-color:var(--st-slate-400);--st-selected-border-color:var(--st-blue-500);--st-editable-cell-focus-border-color:var(--st-blue-500);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-slate-100);--st-button-active-background-color:var(--st-blue-600);--st-cell-flash-color:var(--st-slate-200)}.theme-dark{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-gray-900);--st-scrollbar-thumb-color:var(--st-gray-600);--st-border-color:var(--st-gray-700);--st-odd-row-background-color:var(--st-gray-800);--st-even-row-background-color:var(--st-gray-900);--st-odd-column-background-color:var(--st-gray-800);--st-even-column-background-color:var(--st-gray-900);--st-hover-row-background-color:var(--st-gray-700);--st-header-background-color:var(--st-gray-800);--st-header-label-color:var(--st-gray-100);--st-header-icon-color:var(--st-gray-400);--st-dragging-background-color:var(--st-gray-600);--st-selected-cell-background-color:var(--st-blue-900);--st-selected-first-cell-background-color:var(--st-blue-800);--st-footer-background-color:var(--st-gray-900);--st-cell-color:var(--st-gray-100);--st-cell-odd-row-color:var(--st-gray-200);--st-edit-cell-shadow:0 1px 3px 0 #ffffff1a;--st-selected-cell-color:var(--st-white);--st-selected-first-cell-color:var(--st-white);--st-resize-handle-color:var(--st-gray-500);--st-separator-border-color:var(--st-gray-600);--st-last-group-row-separator-border-color:var(--st-gray-500);--st-selected-border-color:var(--st-blue-400);--st-editable-cell-focus-border-color:var(--st-blue-400);--st-checkbox-checked-background-color:var(--st-blue-500);--st-checkbox-checked-border-color:var(--st-blue-500);--st-column-editor-background-color:var(--st-gray-800);--st-column-editor-popout-background-color:var(--st-gray-800);--st-button-hover-background-color:var(--st-gray-700);--st-button-active-background-color:var(--st-blue-500);--st-cell-flash-color:var(--st-gray-600)}.theme-neutral{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-neutral-100);--st-scrollbar-thumb-color:var(--st-neutral-400);--st-border-color:var(--st-neutral-300);--st-odd-row-background-color:var(--st-neutral-50);--st-even-row-background-color:var(--st-neutral-100);--st-odd-column-background-color:var(--st-neutral-50);--st-even-column-background-color:var(--st-neutral-100);--st-hover-row-background-color:var(--st-neutral-200);--st-header-background-color:var(--st-neutral-200);--st-header-label-color:var(--st-neutral-900);--st-header-icon-color:var(--st-neutral-500);--st-dragging-background-color:var(--st-neutral-300);--st-selected-cell-background-color:var(--st-neutral-400);--st-selected-first-cell-background-color:var(--st-neutral-300);--st-footer-background-color:var(--st-neutral-50);--st-cell-color:var(--st-neutral-900);--st-cell-odd-row-color:var(--st-neutral-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-neutral-900);--st-selected-first-cell-color:var(--st-neutral-900);--st-resize-handle-color:var(--st-neutral-400);--st-separator-border-color:var(--st-neutral-200);--st-last-group-row-separator-border-color:var(--st-neutral-400);--st-selected-border-color:var(--st-neutral-600);--st-editable-cell-focus-border-color:var(--st-neutral-500);--st-checkbox-checked-background-color:var(--st-neutral-600);--st-checkbox-checked-border-color:var(--st-neutral-600);--st-column-editor-background-color:var(--st-neutral-50);--st-column-editor-popout-background-color:var(--st-neutral-50);--st-button-hover-background-color:var(--st-neutral-200);--st-button-active-background-color:var(--st-neutral-600);--st-cell-flash-color:var(--st-neutral-400)}.theme-sky{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-blue-50);--st-scrollbar-thumb-color:var(--st-blue-300);--st-border-color:var(--st-blue-300);--st-odd-row-background-color:var(--st-blue-50);--st-even-row-background-color:var(--st-blue-100);--st-odd-column-background-color:var(--st-blue-50);--st-even-column-background-color:var(--st-blue-100);--st-hover-row-background-color:var(--st-blue-200);--st-header-background-color:var(--st-blue-200);--st-header-label-color:var(--st-blue-900);--st-header-icon-color:var(--st-blue-600);--st-dragging-background-color:var(--st-blue-300);--st-selected-cell-background-color:var(--st-blue-400);--st-selected-first-cell-background-color:var(--st-blue-300);--st-footer-background-color:var(--st-blue-50);--st-cell-color:var(--st-blue-900);--st-cell-odd-row-color:var(--st-blue-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-blue-900);--st-selected-first-cell-color:var(--st-blue-900);--st-resize-handle-color:var(--st-blue-400);--st-separator-border-color:var(--st-blue-200);--st-last-group-row-separator-border-color:var(--st-blue-400);--st-selected-border-color:var(--st-blue-600);--st-editable-cell-focus-border-color:var(--st-blue-500);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-blue-50);--st-column-editor-popout-background-color:var(--st-blue-50);--st-button-hover-background-color:var(--st-blue-200);--st-button-active-background-color:var(--st-blue-600);--st-cell-flash-color:var(--st-blue-300)}.theme-funky{--st-border-radius:8px;--st-cell-padding:12px;--st-spacing-small:6px;--st-spacing-medium:10px;--st-scrollbar-bg-color:var(--st-stone-100);--st-scrollbar-thumb-color:var(--st-violet-500);--st-border-color:var(--st-stone-200);--st-odd-row-background-color:var(--st-amber-50);--st-even-row-background-color:var(--st-amber-100);--st-odd-column-background-color:var(--st-violet-50);--st-even-column-background-color:var(--st-amber-50);--st-hover-row-background-color:var(--st-amber-200);--st-header-background-color:var(--st-violet-600);--st-header-label-color:var(--st-white);--st-header-icon-color:var(--st-violet-200);--st-dragging-background-color:var(--st-violet-50);--st-selected-cell-background-color:var(--st-violet-50);--st-selected-first-cell-background-color:var(--st-violet-100);--st-footer-background-color:var(--st-stone-100);--st-cell-color:var(--st-stone-700);--st-cell-odd-row-color:var(--st-stone-700);--st-edit-cell-shadow:0 4px 6px -1px #7c3aed1a,0 2px 4px -1px #7c3aed0f;--st-selected-cell-color:var(--st-violet-800);--st-selected-first-cell-color:var(--st-violet-800);--st-resize-handle-color:var(--st-violet-400);--st-separator-border-color:var(--st-stone-200);--st-last-group-row-separator-border-color:var(--st-stone-300);--st-selected-border-color:var(--st-violet-500);--st-editable-cell-focus-border-color:var(--st-violet-500);--st-checkbox-checked-background-color:var(--st-violet-500);--st-checkbox-checked-border-color:var(--st-violet-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-violet-50);--st-button-active-background-color:var(--st-violet-600);--st-cell-flash-color:var(--st-violet-200)}.simple-table-root *{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit;scrollbar-color:var(--st-scrollbar-thumb-color) var(--st-scrollbar-bg-color);scrollbar-width:thin}input{color:#000}.simple-table-root ::-webkit-scrollbar{height:8px;width:8px}.simple-table-root ::-webkit-scrollbar-track{background:var(--st-scrollbar-bg-color)}.simple-table-root ::-webkit-scrollbar-thumb{background:var(--st-scrollbar-thumb-color);border-radius:4px}.simple-table-root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.st-wrapper{border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);max-height:100dvh;overflow:hidden;position:relative}.st-wrapper-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.st-content-wrapper,.st-wrapper-container{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;width:100%}.st-content-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:0}.st-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.st-content,.st-header-container{display:-webkit-box;display:-ms-flexbox;display:flex}.st-header-container{background-color:var(--st-header-background-color)}.st-header-container.st-header-scroll-padding:after{-ms-flex-negative:0;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);content:"";display:block;flex-shrink:0;width:default-width;width:var(--st-after-width,default-width)}.st-header-main,.st-header-pinned-left,.st-header-pinned-right{border-bottom:var(--st-border-width) solid var(--st-border-color);display:grid}.st-header-pinned-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-header-pinned-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-header-main{-webkit-overflow-scrolling:touch;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:auto;scrollbar-width:none;-ms-touch-action:auto;touch-action:auto}.st-header-main::-webkit-scrollbar{display:none}.st-body-container{-webkit-box-flex:1;-ms-flex-positive:1;-webkit-overflow-scrolling:touch;background-color:var(--st-even-row-background-color);display:-webkit-box;display:-ms-flexbox;display:flex;flex-grow:1;height:-webkit-max-content;height:-moz-max-content;height:max-content;overflow:auto;-ms-touch-action:auto;touch-action:auto;width:100%}.st-body-main,.st-body-pinned-left,.st-body-pinned-right{display:grid;height:-webkit-max-content;height:-moz-max-content;height:max-content;min-height:100%}.st-body-pinned-left{-ms-flex-negative:0;border-right:var(--st-border-width) solid var(--st-border-color);flex-shrink:0}.st-body-main{-webkit-overflow-scrolling:touch;overflow:auto;scrollbar-width:none;-ms-touch-action:auto;touch-action:auto}.st-body-main::-webkit-scrollbar{display:none}.st-body-pinned-right{-ms-flex-negative:0;border-left:var(--st-border-width) solid var(--st-border-color);flex-shrink:0}.st-row{display:grid;min-width:100%;position:absolute;-webkit-transition:background .2s ease;transition:background .2s ease}.st-row.hovered .st-cell-editing,.st-row.hovered .st-cell:not(.st-cell-selected){background-color:var(--st-hover-row-background-color)}.st-row.even{background-color:var(--st-even-row-background-color)}.st-row.odd{background-color:var(--st-odd-row-background-color)}.st-row.odd .st-cell-content{color:var(--st-cell-odd-row-color)}.st-row.even .st-cell-content{color:var(--st-cell-color)}.st-header-cell{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-top:var(--st-border-width) solid #0000;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:var(--st-font-weight-bold);gap:var(--st-spacing-small);position:sticky;top:0}.st-header-cell.parent{border-bottom:var(--st-border-width) solid var(--st-border-color)}.st-header-cell.clickable{cursor:pointer}.st-header-cell.draggable{cursor:-webkit-grab;cursor:grab}.st-cell,.st-header-cell{-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--st-slate-800);display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--st-spacing-small);overflow:hidden;position:relative}.st-cell.left-aligned,.st-header-cell.left-aligned{padding-left:var(--st-cell-padding);text-align:left}.st-cell.center-aligned,.st-header-cell.center-aligned{text-align:center}.st-cell.center-aligned{padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-container-width))}.st-cell.center-aligned>.st-cell-content,.st-header-cell.center-aligned>.st-header-label-text{text-align:center}.st-cell.clickable{cursor:pointer}.st-cell,.st-cell-editing,.st-header-cell{height:100%;width:100%}.st-cell-editing{position:relative}.st-header-label{-webkit-box-flex:1;-ms-flex-positive:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;flex-grow:1;height:100%;min-width:0}.st-cell-content,.st-header-label-text{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;width:100%}.st-header-label-text{color:var(--st-header-label-color);font-weight:600;padding-left:var(--st-cell-padding);padding-right:var(--st-cell-padding)}.st-cell-content.left-aligned,.st-header-label-text.left-aligned{text-align:left}.st-cell-content.center-aligned,.st-header-label-text.center-aligned{text-align:center}.st-cell-content.right-aligned,.st-header-label-text.right-aligned{text-align:right}.st-not-resizeable .st-cell-content{padding-left:var(--st-cell-padding);padding-right:var(--st-cell-padding)}.st-resizeable .st-body-pinned-right .st-cell-content{padding-left:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-container-width));padding-right:var(--st-cell-padding)}.st-resizeable .st-body-main .st-cell-content,.st-resizeable .st-body-pinned-left .st-cell-content{padding-left:var(--st-cell-padding);padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-container-width))}.st-cell{border:var(--st-border-width) solid #0000}.st-cell.even-column:not(.st-cell-selected){background-color:var(--st-even-column-background-color)}.st-cell.odd-column:not(.st-cell-selected){background-color:var(--st-odd-column-background-color)}.st-cell-depth-1{padding-left:calc(var(--st-cell-padding)*4)}.st-cell-depth-2{padding-left:calc(var(--st-cell-padding)*8)}.st-cell-depth-3{padding-left:calc(var(--st-cell-padding)*12)}.st-cell-depth-4{padding-left:calc(var(--st-cell-padding)*16)}.st-cell-depth-5{padding-left:calc(var(--st-cell-padding)*20)}.st-cell-depth-6{padding-left:calc(var(--st-cell-padding)*24)}.st-cell-depth-7{padding-left:calc(var(--st-cell-padding)*28)}.st-cell-depth-1 .st-cell-content{color:rgb(from var(--st-cell-color) r g b/80%)!important}.st-cell-depth-2 .st-cell-content,.st-cell-depth-3 .st-cell-content,.st-cell-depth-4 .st-cell-content,.st-cell-depth-5 .st-cell-content,.st-cell-depth-6 .st-cell-content,.st-cell-depth-7 .st-cell-content{color:rgb(from var(--st-cell-color) r g b/70%)!important}.st-icon-container{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:center;margin-left:4px}.st-expand-icon{fill:var(--st-header-label-color);cursor:pointer}.st-header-resize-handle-container{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;cursor:col-resize;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;justify-content:center;width:var(--st-resize-handle-container-width)}.st-header-resize-handle{background-color:var(--st-resize-handle-color);height:calc(100% - 20px);width:var(--st-resize-handle-width)}.st-row-separator{background-color:var(--st-separator-border-color);cursor:pointer;display:grid;grid-column:1/-1;height:1px;min-width:100%;position:absolute}.st-row-separator.st-last-group-row{background-color:var(--st-last-group-row-separator-border-color)}.st-dragging{background-color:var(--st-dragging-background-color)}.st-cell-selected{background-color:var(--st-selected-cell-background-color)}.st-cell-selected .st-cell-content{color:var(--st-selected-cell-color)!important}.st-cell-selected-first{background-color:var(--st-selected-first-cell-background-color)!important;border:var(--st-border-width) solid var(--st-selected-border-color)}.st-cell-selected-first .st-cell-content{color:var(--st-selected-first-cell-color)!important}.st-selected-top-border{border-top:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-bottom-border{border-bottom:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-left-border{border-left:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-right-border{border-right:var(--st-border-width) solid var(--st-selected-border-color)}.st-horizontal-scrollbar-container{-ms-flex-negative:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-scrollbar-bg-color);border-top:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;flex-shrink:0;height:12px;width:100%}.st-horizontal-scrollbar-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-left,.st-horizontal-scrollbar-right{height:100%}.st-horizontal-scrollbar-middle{-webkit-overflow-scrolling:touch;min-height:11px;overflow:auto;-ms-touch-action:auto;touch-action:auto}.st-horizontal-scrollbar-middle>div{height:1px}.st-footer{-ms-flex-negative:0;background-color:var(--st-footer-background-color);border-top:var(--st-border-width) solid var(--st-border-color);flex-shrink:0;padding:var(--st-spacing-medium)}.st-footer,.st-next-prev-btn{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.st-next-prev-btn{-webkit-box-pack:center;-ms-flex-pack:center;fill:var(--st-slate-600);background-color:initial;border:none;border-radius:var(--st-border-radius);cursor:pointer;justify-content:center;padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.disabled>.st-next-prev-icon{fill:var(--st-slate-400);cursor:not-allowed}.st-next-prev-btn:not(.disabled):hover{background-color:var(--st-slate-100)}.st-page-btn{background-color:initial;border:none;border-radius:var(--st-border-radius);color:var(--st-slate-600);cursor:pointer;margin-left:var(--st-spacing-small);padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-page-btn:hover{background-color:var(--st-button-hover-background-color)}.st-page-btn.active{background-color:var(--st-button-active-background-color);color:#fff}.st-page-ellipsis{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;color:var(--st-cell-color);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-weight:700;justify-content:center;margin:0 var(--st-spacing-small);padding:var(--st-spacing-small)}.editable-cell-input{border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);-webkit-box-shadow:var(--st-edit-cell-shadow-color);box-shadow:var(--st-edit-cell-shadow-color);font-size:.875rem;height:100%;left:0;outline:none;padding:var(--st-cell-padding);position:absolute;top:0;width:100%;z-index:1}.editable-cell-input:focus{border:var(--st-border-width) solid var(--st-editable-cell-focus-border-color)}.st-column-editor{-ms-flex-negative:0;background:var(--st-column-editor-background-color);border-left:var(--st-border-width) solid var(--st-border-color);color:var(--st-slate-500);cursor:pointer;flex-shrink:0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-column-editor-text{padding:var(--st-spacing-medium) var(--st-spacing-small);-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;z-index:2}.st-column-editor.open,.st-column-editor.open .st-column-editor-text{background-color:var(--st-column-editor-background-color)}.st-column-editor-popout{background-color:var(--st-column-editor-popout-background-color);height:100%;overflow:hidden;position:absolute;right:calc(100% + 1px);top:0;-webkit-transition:width var(--st-transition-duration) var(--st-transition-ease);transition:width var(--st-transition-duration) var(--st-transition-ease);width:0;z-index:1}.st-column-editor-popout-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-overflow-scrolling:touch;border-left:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium);height:100%;overflow:auto;padding:var(--st-spacing-medium) var(--st-spacing-small);-ms-touch-action:auto;touch-action:auto}.st-header-checkbox-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.st-header-checkbox-item,.st-header-icon-container{display:-webkit-box;display:-ms-flexbox;display:flex}.st-header-icon-container{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:24px}.st-header-icon{fill:var(--st-header-icon-color);-webkit-transition:fill var(--st-transition-duration) var(--st-transition-ease);transition:fill var(--st-transition-duration) var(--st-transition-ease)}.st-collapsible-header-icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer}.st-collapsible-header-icon,.st-nested-headers{display:-webkit-box;display:-ms-flexbox;display:flex}.st-nested-headers{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium)}.st-column-editor-popout.open{min-width:200px;width:auto}.st-column-editor-popout.left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.st-column-editor-popout.open.left{-webkit-transform:translateX(0);transform:translateX(0)}.st-checkbox-label{-ms-flex-negative:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;flex-shrink:0;gap:var(--st-spacing-small);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.st-checkbox-input{display:none}.st-checkbox-custom{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background-color:#fff;border:var(--st-border-width) solid var(--st-slate-300);border-radius:var(--st-border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;height:16px;justify-content:center;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);width:16px}.st-checkbox-custom.st-checked{background-color:var(--st-checkbox-checked-background-color);border-color:var(--st-checkbox-checked-border-color)}.st-checkbox-checkmark{fill:#fff}@-webkit-keyframes slide-in-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-in-right{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-right{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}.st-group-header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:var(--st-font-weight-bold);height:40px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-group-header:hover{background-color:var(--st-button-hover-background-color)}.st-group-header-content{gap:var(--st-spacing-medium)}.st-group-header-content,.st-group-toggle-icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.st-group-toggle-icon{-webkit-box-pack:center;-ms-flex-pack:center;font-size:.8em;height:16px;justify-content:center;width:16px}.st-group-name{font-weight:var(--st-font-weight-bold)}.st-group-count{color:var(--st-cell-odd-row-color);font-size:.9em}.st-group-header.expanded .st-group-toggle-icon{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.st-group-header.collapsed .st-group-toggle-icon,.st-group-header.expanded .st-group-toggle-icon{-webkit-transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease),-webkit-transform var(--st-transition-duration) var(--st-transition-ease)}.st-group-header.collapsed .st-group-toggle-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.st-expand-icon-container{-webkit-transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease),-webkit-transform var(--st-transition-duration) var(--st-transition-ease)}.st-expand-icon-container.expanded{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.st-expand-icon-container.collapsed{-webkit-transform:rotate(0deg);transform:rotate(0deg)}@-webkit-keyframes cell-flash{0%{background-color:initial}50%{background-color:var(--st-cell-flash-color)}to{background-color:initial}}@keyframes cell-flash{0%{background-color:initial}50%{background-color:var(--st-cell-flash-color)}to{background-color:initial}}.st-cell-updating{-webkit-animation:cell-flash .6s ease-in-out;animation:cell-flash .6s ease-in-out}.st-dropdown-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-overflow-scrolling:touch;background-color:var(--st-odd-row-background-color);border:1px solid var(--st-border-color);border-radius:var(--st-border-radius);-webkit-box-shadow:var(--st-edit-cell-shadow);box-shadow:var(--st-edit-cell-shadow);cursor:default;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:400px;min-width:120px;position:fixed;-ms-touch-action:auto;touch-action:auto;-webkit-transform:translateZ(0);transform:translateZ(0);will-change:transform;z-index:100}.st-dropdown-bottom-left,.st-dropdown-bottom-right{margin-top:4px}.st-dropdown-top-left,.st-dropdown-top-right{margin-bottom:4px}.st-dropdown-item{color:var(--st-cell-color);cursor:pointer;padding:8px 12px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);white-space:nowrap}.st-dropdown-item:hover{background-color:var(--st-button-hover-background-color)}.st-dropdown-item.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-dropdown-group-label{color:var(--st-slate-500);font-size:.8em;font-weight:600;padding:6px 12px}.st-dropdown-divider{background-color:var(--st-border-color);height:1px;margin:4px 0}.st-datepicker{background-color:var(--st-odd-row-background-color);font-family:inherit;min-width:280px}.st-datepicker-header{-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-bottom:1px solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:space-between;padding:10px}.st-datepicker-header-label{-webkit-box-flex:1;color:var(--st-header-label-color);cursor:pointer;-ms-flex:1;flex:1;font-weight:600;text-align:center}.st-datepicker-nav-btn{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:#0000;border:none;border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:1.2em;justify-content:center;padding:0 8px}.st-datepicker-nav-btn>*{fill:var(--st-cell-color)!important}.st-datepicker-nav-btn:hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-grid{display:grid;padding:10px}.st-datepicker-days-grid{gap:4px;grid-template-columns:repeat(7,1fr)}.st-datepicker-months-grid,.st-datepicker-years-grid{gap:8px;grid-template-columns:repeat(3,1fr)}.st-datepicker-weekday{color:var(--st-slate-500);font-size:.8em;font-weight:600;padding:6px 0;text-align:center}.st-datepicker-day{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:50%;color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:32px;justify-content:center;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-day.empty{cursor:default}.st-datepicker-day:not(.empty):hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-day.today{color:var(--st-button-active-background-color);font-weight:600}.st-datepicker-day.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-datepicker-day.other-month{color:var(--st-slate-400)}.st-datepicker-month,.st-datepicker-year{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:var(--st-border-radius);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:center;padding:12px 8px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-month:hover,.st-datepicker-year:hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-month.selected,.st-datepicker-year.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-datepicker-footer{-webkit-box-pack:end;-ms-flex-pack:end;border-top:1px solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:flex-end;padding:10px}.st-datepicker-today-btn{background-color:initial;border:1px solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;padding:6px 12px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-today-btn:hover{background-color:var(--st-button-hover-background-color)}.st-filter-bar{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium)}.st-filter-container{min-width:150px;padding:var(--st-spacing-medium)}.st-filter-container,.st-filter-section{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-flex:1;-ms-flex-positive:1;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;flex-grow:1}.st-filter-section{margin-bottom:var(--st-spacing-medium)}.st-filter-input{background-color:var(--st-odd-row-background-color);border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);font-family:inherit;font-size:14px;outline:none;padding:var(--st-spacing-small);-webkit-transition:border-color var(--st-transition-duration) var(--st-transition-ease);transition:border-color var(--st-transition-duration) var(--st-transition-ease);width:100%}.st-filter-input:focus{border-color:var(--st-editable-cell-focus-border-color)}.st-filter-input-range-from{margin-bottom:var(--st-spacing-medium)}.st-filter-select{background-color:var(--st-odd-row-background-color);border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;font-family:inherit;font-size:14px;outline:none;padding:var(--st-spacing-medium) var(--st-spacing-medium);-webkit-transition:border-color var(--st-transition-duration) var(--st-transition-ease);transition:border-color var(--st-transition-duration) var(--st-transition-ease);width:100%}.st-filter-select:focus{border-color:var(--st-editable-cell-focus-border-color)}.st-filter-actions{border-top:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--st-spacing-medium);padding-top:var(--st-spacing-medium)}.st-filter-button{-webkit-box-flex:1;border:none;border-radius:var(--st-border-radius);cursor:pointer;-ms-flex:1;flex:1;font-family:inherit;font-size:14px;font-weight:500;padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-filter-button-apply{background-color:var(--st-button-active-background-color);color:#fff}.st-filter-button-apply:hover:not(.st-filter-button-disabled){opacity:.9}.st-filter-button-disabled{background-color:var(--st-slate-300);color:var(--st-slate-500);cursor:not-allowed}.st-filter-button-clear{background-color:initial;border:var(--st-border-width) solid var(--st-border-color);color:var(--st-cell-color)}.st-filter-button-clear:hover{background-color:var(--st-button-hover-background-color)}.st-custom-select{position:relative;width:100%}.st-custom-select-trigger{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;background-color:var(--st-odd-row-background-color);border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-family:inherit;font-size:14px;gap:var(--st-spacing-medium);justify-content:space-between;outline:none;padding:var(--st-spacing-small);-webkit-transition:border-color var(--st-transition-duration) var(--st-transition-ease);transition:border-color var(--st-transition-duration) var(--st-transition-ease);width:100%}.st-custom-select-open .st-custom-select-trigger,.st-custom-select-trigger:focus,.st-custom-select-trigger:hover:not(:disabled){border-color:var(--st-editable-cell-focus-border-color)}.st-custom-select-value{-webkit-box-flex:1;color:var(--st-cell-color);-ms-flex:1;flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.st-custom-select-arrow{-ms-flex-negative:0;color:var(--st-header-label-color);flex-shrink:0;-webkit-transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease),-webkit-transform var(--st-transition-duration) var(--st-transition-ease)}.st-custom-select-open .st-custom-select-arrow{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.st-custom-select-options{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:200px;min-width:120px;overflow:auto;overflow-x:hidden}.st-custom-select-option{-ms-flex-negative:0;color:var(--st-cell-color);cursor:pointer;flex-shrink:0;font-size:14px;overflow:hidden;padding:var(--st-spacing-small);text-overflow:ellipsis;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);white-space:nowrap}.st-custom-select-option-focused,.st-custom-select-option:hover{background-color:var(--st-button-hover-background-color)}.st-custom-select-option-selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-custom-select-option-selected.st-custom-select-option-focused{background-color:var(--st-selected-cell-background-color);opacity:.9}.st-custom-select-disabled{opacity:var(--st-opacity-disabled);pointer-events:none}.st-custom-select-disabled .st-custom-select-trigger{background-color:var(--st-header-background-color);color:var(--st-header-label-color);cursor:not-allowed}.st-enum-filter-options{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-flex:1;-ms-flex-positive:1;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;flex-grow:1;gap:var(--st-spacing-small);max-height:200px;overflow:auto}.st-enum-select-all{border-bottom:var(--st-border-width) solid var(--st-border-color);margin-bottom:var(--st-spacing-small);padding-bottom:var(--st-spacing-small)}.st-enum-select-all-label{color:var(--st-header-label-color);font-weight:600}.st-enum-option-label{color:var(--st-cell-color);font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-filter-bar{background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);padding:var(--st-spacing-medium)}.st-filter-bar-content{-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--st-spacing-medium)}.st-filter-bar-content,.st-filter-chips{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.st-filter-chips{gap:var(--st-spacing-small)}.st-filter-chip{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-selected-cell-background-color);border:var(--st-border-width) solid var(--st-selected-border-color);border-radius:calc(var(--st-border-radius)*2);color:var(--st-selected-cell-color);display:-webkit-box;display:-ms-flexbox;display:flex;font-size:13px;padding:var(--st-spacing-small) var(--st-spacing-medium)}.st-filter-chip-text{margin-right:var(--st-spacing-small);white-space:nowrap}.st-filter-chip-remove{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:none;border:none;border-radius:50%;color:inherit;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:16px;font-weight:700;height:16px;justify-content:center;line-height:1;margin-left:var(--st-spacing-small);padding:0;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);width:16px}.st-filter-chip-remove:hover{background-color:#fff3}.st-filter-bar-label{-ms-flex-negative:0;color:var(--st-header-label-color);flex-shrink:0;font-size:14px;font-weight:600}
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap");.simple-table-root{--st-after-width:11.01px;--st-resize-handle-width:2px;--st-resize-handle-container-width:10px;--st-border-width:1px;--st-transition-duration:0.2s;--st-transition-ease:ease;--st-opacity-disabled:0.5;--st-white:#fff;--st-black:#000;--st-slate-50:#f8fafc;--st-slate-100:#f1f5f9;--st-slate-200:#e2e8f0;--st-slate-300:#cbd5e1;--st-slate-400:#94a3b8;--st-slate-500:#64748b;--st-slate-600:#475569;--st-slate-700:#334155;--st-slate-800:#1e293b;--st-slate-900:#0f172a;--st-slate-950:#020617;--st-gray-50:#f9fafb;--st-gray-100:#f3f4f6;--st-gray-200:#e5e7eb;--st-gray-300:#d1d5db;--st-gray-400:#9ca3af;--st-gray-500:#6b7280;--st-gray-600:#4b5563;--st-gray-700:#374151;--st-gray-800:#1f2937;--st-gray-900:#111827;--st-gray-950:#030712;--st-zinc-50:#fafafa;--st-zinc-100:#f4f4f5;--st-zinc-200:#e4e4e7;--st-zinc-300:#d4d4d8;--st-zinc-400:#a1a1aa;--st-zinc-500:#71717a;--st-zinc-600:#52525b;--st-zinc-700:#3f3f46;--st-zinc-800:#27272a;--st-zinc-900:#18181b;--st-zinc-950:#09090b;--st-neutral-50:#fafafa;--st-neutral-100:#f5f5f5;--st-neutral-200:#e5e5e5;--st-neutral-300:#d4d4d4;--st-neutral-400:#a3a3a3;--st-neutral-500:#737373;--st-neutral-600:#525252;--st-neutral-700:#404040;--st-neutral-800:#262626;--st-neutral-900:#171717;--st-neutral-950:#0a0a0a;--st-stone-50:#fafaf9;--st-stone-100:#f5f5f4;--st-stone-200:#e7e5e4;--st-stone-300:#d6d3d1;--st-stone-400:#a8a29e;--st-stone-500:#78716c;--st-stone-600:#57534e;--st-stone-700:#44403c;--st-stone-800:#292524;--st-stone-900:#1c1917;--st-stone-950:#0c0a09;--st-red-50:#fef2f2;--st-red-100:#fee2e2;--st-red-200:#fecaca;--st-red-300:#fca5a5;--st-red-400:#f87171;--st-red-500:#ef4444;--st-red-600:#dc2626;--st-red-700:#b91c1c;--st-red-800:#991b1b;--st-red-900:#7f1d1d;--st-red-950:#450a0a;--st-orange-50:#fff7ed;--st-orange-100:#ffedd5;--st-orange-200:#fed7aa;--st-orange-300:#fdba74;--st-orange-400:#fb923c;--st-orange-500:#f97316;--st-orange-600:#ea580c;--st-orange-700:#c2410c;--st-orange-800:#9a3412;--st-orange-900:#7c2d12;--st-orange-950:#431407;--st-amber-50:#fffbeb;--st-amber-100:#fef3c7;--st-amber-200:#fde68a;--st-amber-300:#fcd34d;--st-amber-400:#fbbf24;--st-amber-500:#f59e0b;--st-amber-600:#d97706;--st-amber-700:#b45309;--st-amber-800:#92400e;--st-amber-900:#78350f;--st-amber-950:#451a03;--st-yellow-50:#fefce8;--st-yellow-100:#fef9c3;--st-yellow-200:#fef08a;--st-yellow-300:#fde047;--st-yellow-400:#facc15;--st-yellow-500:#eab308;--st-yellow-600:#ca8a04;--st-yellow-700:#a16207;--st-yellow-800:#854d0e;--st-yellow-900:#713f12;--st-yellow-950:#422006;--st-lime-50:#f7fee7;--st-lime-100:#ecfccb;--st-lime-200:#d9f99d;--st-lime-300:#bef264;--st-lime-400:#a3e635;--st-lime-500:#84cc16;--st-lime-600:#65a30d;--st-lime-700:#4d7c0f;--st-lime-800:#3f6212;--st-lime-900:#365314;--st-lime-950:#1a2e05;--st-green-50:#f0fdf4;--st-green-100:#dcfce7;--st-green-200:#bbf7d0;--st-green-300:#86efac;--st-green-400:#4ade80;--st-green-500:#22c55e;--st-green-600:#16a34a;--st-green-700:#15803d;--st-green-800:#166534;--st-green-900:#14532d;--st-green-950:#052e16;--st-emerald-50:#ecfdf5;--st-emerald-100:#d1fae5;--st-emerald-200:#a7f3d0;--st-emerald-300:#6ee7b7;--st-emerald-400:#34d399;--st-emerald-500:#10b981;--st-emerald-600:#059669;--st-emerald-700:#047857;--st-emerald-800:#065f46;--st-emerald-900:#064e3b;--st-emerald-950:#022c22;--st-teal-50:#f0fdfa;--st-teal-100:#ccfbf1;--st-teal-200:#99f6e4;--st-teal-300:#5eead4;--st-teal-400:#2dd4bf;--st-teal-500:#14b8a6;--st-teal-600:#0d9488;--st-teal-700:#0f766e;--st-teal-800:#115e59;--st-teal-900:#134e4a;--st-teal-950:#042f2e;--st-cyan-50:#ecfeff;--st-cyan-100:#cffafe;--st-cyan-200:#a5f3fc;--st-cyan-300:#67e8f9;--st-cyan-400:#22d3ee;--st-cyan-500:#06b6d4;--st-cyan-600:#0891b2;--st-cyan-700:#0e7490;--st-cyan-800:#155e75;--st-cyan-900:#164e63;--st-cyan-950:#083344;--st-sky-50:#f0f9ff;--st-sky-100:#e0f2fe;--st-sky-200:#bae6fd;--st-sky-300:#7dd3fc;--st-sky-400:#38bdf8;--st-sky-500:#0ea5e9;--st-sky-600:#0284c7;--st-sky-700:#0369a1;--st-sky-800:#075985;--st-sky-900:#0c4a6e;--st-sky-950:#082f49;--st-blue-50:#eff6ff;--st-blue-100:#dbeafe;--st-blue-200:#bfdbfe;--st-blue-300:#93c5fd;--st-blue-400:#60a5fa;--st-blue-500:#3b82f6;--st-blue-600:#2563eb;--st-blue-700:#1d4ed8;--st-blue-800:#1e40af;--st-blue-900:#1e3a8a;--st-blue-950:#172554;--st-indigo-50:#eef2ff;--st-indigo-100:#e0e7ff;--st-indigo-200:#c7d2fe;--st-indigo-300:#a5b4fc;--st-indigo-400:#818cf8;--st-indigo-500:#6366f1;--st-indigo-600:#4f46e5;--st-indigo-700:#4338ca;--st-indigo-800:#3730a3;--st-indigo-900:#312e81;--st-indigo-950:#1e1b4b;--st-violet-50:#f5f3ff;--st-violet-100:#ede9fe;--st-violet-200:#ddd6fe;--st-violet-300:#c4b5fd;--st-violet-400:#a78bfa;--st-violet-500:#8b5cf6;--st-violet-600:#7c3aed;--st-violet-700:#6d28d9;--st-violet-800:#5b21b6;--st-violet-900:#4c1d95;--st-violet-950:#2e1065;--st-purple-50:#faf5ff;--st-purple-100:#f3e8ff;--st-purple-200:#e9d5ff;--st-purple-300:#d8b4fe;--st-purple-400:#c084fc;--st-purple-500:#a855f7;--st-purple-600:#9333ea;--st-purple-700:#7e22ce;--st-purple-800:#6b21a8;--st-purple-900:#581c87;--st-purple-950:#3b0764;--st-fuchsia-50:#fdf4ff;--st-fuchsia-100:#fae8ff;--st-fuchsia-200:#f5d0fe;--st-fuchsia-300:#f0abfc;--st-fuchsia-400:#e879f9;--st-fuchsia-500:#d946ef;--st-fuchsia-600:#c026d3;--st-fuchsia-700:#a21caf;--st-fuchsia-800:#86198f;--st-fuchsia-900:#701a75;--st-fuchsia-950:#4a044e;--st-pink-50:#fdf2f8;--st-pink-100:#fce7f3;--st-pink-200:#fbcfe8;--st-pink-300:#f9a8d4;--st-pink-400:#f472b6;--st-pink-500:#ec4899;--st-pink-600:#db2777;--st-pink-700:#be185d;--st-pink-800:#9d174d;--st-pink-900:#831843;--st-pink-950:#500724;--st-rose-50:#fff1f2;--st-rose-100:#ffe4e6;--st-rose-200:#fecdd3;--st-rose-300:#fda4af;--st-rose-400:#fb7185;--st-rose-500:#f43f5e;--st-rose-600:#e11d48;--st-rose-700:#be123c;--st-rose-800:#9f1239;--st-rose-900:#881337;--st-rose-950:#4c0519}.theme-light{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-slate-50);--st-scrollbar-thumb-color:var(--st-slate-300);--st-border-color:var(--st-slate-300);--st-odd-row-background-color:var(--st-white);--st-even-row-background-color:var(--st-slate-50);--st-odd-column-background-color:var(--st-slate-50);--st-even-column-background-color:var(--st-white);--st-hover-row-background-color:var(--st-slate-100);--st-header-background-color:var(--st-slate-100);--st-header-label-color:var(--st-slate-900);--st-header-icon-color:var(--st-slate-500);--st-dragging-background-color:var(--st-slate-200);--st-selected-cell-background-color:var(--st-blue-100);--st-selected-first-cell-background-color:var(--st-blue-50);--st-footer-background-color:var(--st-slate-50);--st-cell-color:var(--st-slate-900);--st-cell-odd-row-color:var(--st-slate-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-slate-900);--st-selected-first-cell-color:var(--st-slate-900);--st-resize-handle-color:var(--st-slate-400);--st-separator-border-color:var(--st-slate-200);--st-last-group-row-separator-border-color:var(--st-slate-400);--st-selected-border-color:var(--st-blue-500);--st-editable-cell-focus-border-color:var(--st-blue-500);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-slate-100);--st-button-active-background-color:var(--st-blue-600);--st-cell-flash-color:var(--st-slate-200);--st-copy-flash-color:var(--st-blue-500);--st-warning-flash-color:var(--st-red-300)}.theme-dark{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-gray-900);--st-scrollbar-thumb-color:var(--st-gray-600);--st-border-color:var(--st-gray-700);--st-odd-row-background-color:var(--st-gray-800);--st-even-row-background-color:var(--st-gray-900);--st-odd-column-background-color:var(--st-gray-800);--st-even-column-background-color:var(--st-gray-900);--st-hover-row-background-color:var(--st-gray-700);--st-header-background-color:var(--st-gray-800);--st-header-label-color:var(--st-gray-100);--st-header-icon-color:var(--st-gray-400);--st-dragging-background-color:var(--st-gray-600);--st-selected-cell-background-color:var(--st-blue-900);--st-selected-first-cell-background-color:var(--st-blue-800);--st-footer-background-color:var(--st-gray-900);--st-cell-color:var(--st-gray-100);--st-cell-odd-row-color:var(--st-gray-200);--st-edit-cell-shadow:0 1px 3px 0 #ffffff1a;--st-selected-cell-color:var(--st-white);--st-selected-first-cell-color:var(--st-white);--st-resize-handle-color:var(--st-gray-500);--st-separator-border-color:var(--st-gray-600);--st-last-group-row-separator-border-color:var(--st-gray-500);--st-selected-border-color:var(--st-blue-400);--st-editable-cell-focus-border-color:var(--st-blue-400);--st-checkbox-checked-background-color:var(--st-blue-500);--st-checkbox-checked-border-color:var(--st-blue-500);--st-column-editor-background-color:var(--st-gray-800);--st-column-editor-popout-background-color:var(--st-gray-800);--st-button-hover-background-color:var(--st-gray-700);--st-button-active-background-color:var(--st-blue-500);--st-cell-flash-color:var(--st-gray-600);--st-copy-flash-color:var(--st-blue-500);--st-warning-flash-color:var(--st-red-400)}.theme-neutral{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-neutral-100);--st-scrollbar-thumb-color:var(--st-neutral-400);--st-border-color:var(--st-neutral-300);--st-odd-row-background-color:var(--st-neutral-50);--st-even-row-background-color:var(--st-neutral-100);--st-odd-column-background-color:var(--st-neutral-50);--st-even-column-background-color:var(--st-neutral-100);--st-hover-row-background-color:var(--st-neutral-200);--st-header-background-color:var(--st-neutral-200);--st-header-label-color:var(--st-neutral-900);--st-header-icon-color:var(--st-neutral-500);--st-dragging-background-color:var(--st-neutral-300);--st-selected-cell-background-color:var(--st-neutral-400);--st-selected-first-cell-background-color:var(--st-neutral-300);--st-footer-background-color:var(--st-neutral-50);--st-cell-color:var(--st-neutral-900);--st-cell-odd-row-color:var(--st-neutral-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-neutral-900);--st-selected-first-cell-color:var(--st-neutral-900);--st-resize-handle-color:var(--st-neutral-400);--st-separator-border-color:var(--st-neutral-200);--st-last-group-row-separator-border-color:var(--st-neutral-400);--st-selected-border-color:var(--st-neutral-600);--st-editable-cell-focus-border-color:var(--st-neutral-500);--st-checkbox-checked-background-color:var(--st-neutral-600);--st-checkbox-checked-border-color:var(--st-neutral-600);--st-column-editor-background-color:var(--st-neutral-50);--st-column-editor-popout-background-color:var(--st-neutral-50);--st-button-hover-background-color:var(--st-neutral-200);--st-button-active-background-color:var(--st-neutral-600);--st-cell-flash-color:var(--st-neutral-400);--st-copy-flash-color:var(--st-neutral-600);--st-warning-flash-color:var(--st-red-400)}.theme-sky{--st-border-radius:4px;--st-cell-padding:8px;--st-spacing-small:4px;--st-spacing-medium:8px;--st-scrollbar-bg-color:var(--st-blue-50);--st-scrollbar-thumb-color:var(--st-blue-300);--st-border-color:var(--st-blue-300);--st-odd-row-background-color:var(--st-blue-50);--st-even-row-background-color:var(--st-blue-100);--st-odd-column-background-color:var(--st-blue-50);--st-even-column-background-color:var(--st-blue-100);--st-hover-row-background-color:var(--st-blue-200);--st-header-background-color:var(--st-blue-200);--st-header-label-color:var(--st-blue-900);--st-header-icon-color:var(--st-blue-600);--st-dragging-background-color:var(--st-blue-300);--st-selected-cell-background-color:var(--st-blue-400);--st-selected-first-cell-background-color:var(--st-blue-300);--st-footer-background-color:var(--st-blue-50);--st-cell-color:var(--st-blue-900);--st-cell-odd-row-color:var(--st-blue-800);--st-edit-cell-shadow:0 1px 2px 0 #0000000d;--st-selected-cell-color:var(--st-blue-900);--st-selected-first-cell-color:var(--st-blue-900);--st-resize-handle-color:var(--st-blue-400);--st-separator-border-color:var(--st-blue-200);--st-last-group-row-separator-border-color:var(--st-blue-400);--st-selected-border-color:var(--st-blue-600);--st-editable-cell-focus-border-color:var(--st-blue-500);--st-checkbox-checked-background-color:var(--st-blue-600);--st-checkbox-checked-border-color:var(--st-blue-600);--st-column-editor-background-color:var(--st-blue-50);--st-column-editor-popout-background-color:var(--st-blue-50);--st-button-hover-background-color:var(--st-blue-200);--st-button-active-background-color:var(--st-blue-600);--st-cell-flash-color:var(--st-blue-300);--st-copy-flash-color:var(--st-blue-600);--st-warning-flash-color:var(--st-orange-400)}.theme-funky{--st-border-radius:8px;--st-cell-padding:12px;--st-spacing-small:6px;--st-spacing-medium:10px;--st-scrollbar-bg-color:var(--st-stone-100);--st-scrollbar-thumb-color:var(--st-violet-500);--st-border-color:var(--st-stone-200);--st-odd-row-background-color:var(--st-amber-50);--st-even-row-background-color:var(--st-amber-100);--st-odd-column-background-color:var(--st-violet-50);--st-even-column-background-color:var(--st-amber-50);--st-hover-row-background-color:var(--st-amber-200);--st-header-background-color:var(--st-violet-600);--st-header-label-color:var(--st-white);--st-header-icon-color:var(--st-violet-200);--st-dragging-background-color:var(--st-violet-50);--st-selected-cell-background-color:var(--st-violet-50);--st-selected-first-cell-background-color:var(--st-violet-100);--st-footer-background-color:var(--st-stone-100);--st-cell-color:var(--st-stone-700);--st-cell-odd-row-color:var(--st-stone-700);--st-edit-cell-shadow:0 4px 6px -1px #7c3aed1a,0 2px 4px -1px #7c3aed0f;--st-selected-cell-color:var(--st-violet-800);--st-selected-first-cell-color:var(--st-violet-800);--st-resize-handle-color:var(--st-violet-400);--st-separator-border-color:var(--st-stone-200);--st-last-group-row-separator-border-color:var(--st-stone-300);--st-selected-border-color:var(--st-violet-500);--st-editable-cell-focus-border-color:var(--st-violet-500);--st-checkbox-checked-background-color:var(--st-violet-500);--st-checkbox-checked-border-color:var(--st-violet-600);--st-column-editor-background-color:var(--st-white);--st-column-editor-popout-background-color:var(--st-white);--st-button-hover-background-color:var(--st-violet-50);--st-button-active-background-color:var(--st-violet-600);--st-cell-flash-color:var(--st-violet-200);--st-copy-flash-color:var(--st-violet-600);--st-warning-flash-color:var(--st-red-400)}.simple-table-root *{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit;scrollbar-color:var(--st-scrollbar-thumb-color) var(--st-scrollbar-bg-color);scrollbar-width:thin}input{color:#000}.simple-table-root ::-webkit-scrollbar{height:8px;width:8px}.simple-table-root ::-webkit-scrollbar-track{background:var(--st-scrollbar-bg-color)}.simple-table-root ::-webkit-scrollbar-thumb{background:var(--st-scrollbar-thumb-color);border-radius:4px}.simple-table-root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.st-wrapper{border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);max-height:100dvh;overflow:hidden;position:relative}.st-wrapper-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.st-content-wrapper,.st-wrapper-container{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;width:100%}.st-content-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:0}.st-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.st-content,.st-header-container{display:-webkit-box;display:-ms-flexbox;display:flex}.st-header-container{background-color:var(--st-header-background-color)}.st-header-container.st-header-scroll-padding:after{-ms-flex-negative:0;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);content:"";display:block;flex-shrink:0;width:default-width;width:var(--st-after-width,default-width)}.st-header-main,.st-header-pinned-left,.st-header-pinned-right{border-bottom:var(--st-border-width) solid var(--st-border-color);display:grid}.st-header-pinned-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-header-pinned-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-header-main{-webkit-overflow-scrolling:touch;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;overflow:auto;scrollbar-width:none;-ms-touch-action:auto;touch-action:auto}.st-header-main::-webkit-scrollbar{display:none}.st-body-container{-webkit-box-flex:1;-ms-flex-positive:1;-webkit-overflow-scrolling:touch;background-color:var(--st-even-row-background-color);display:-webkit-box;display:-ms-flexbox;display:flex;flex-grow:1;height:-webkit-max-content;height:-moz-max-content;height:max-content;overflow:auto;-ms-touch-action:auto;touch-action:auto;width:100%}.st-body-main,.st-body-pinned-left,.st-body-pinned-right{display:grid;height:-webkit-max-content;height:-moz-max-content;height:max-content;min-height:100%}.st-body-pinned-left{-ms-flex-negative:0;border-right:var(--st-border-width) solid var(--st-border-color);flex-shrink:0}.st-body-main{-webkit-overflow-scrolling:touch;overflow:auto;scrollbar-width:none;-ms-touch-action:auto;touch-action:auto}.st-body-main::-webkit-scrollbar{display:none}.st-body-pinned-right{-ms-flex-negative:0;border-left:var(--st-border-width) solid var(--st-border-color);flex-shrink:0}.st-row{display:grid;min-width:100%;position:absolute;-webkit-transition:background .2s ease;transition:background .2s ease}.st-row.hovered .st-cell-editing,.st-row.hovered .st-cell:not(.st-cell-selected){background-color:var(--st-hover-row-background-color)}.st-row.even{background-color:var(--st-even-row-background-color)}.st-row.odd{background-color:var(--st-odd-row-background-color)}.st-row.odd .st-cell-content{color:var(--st-cell-odd-row-color)}.st-row.even .st-cell-content{color:var(--st-cell-color)}.st-header-cell{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-top:var(--st-border-width) solid #0000;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:var(--st-font-weight-bold);gap:var(--st-spacing-small);position:sticky;top:0}.st-header-cell.parent{border-bottom:var(--st-border-width) solid var(--st-border-color)}.st-header-cell.clickable{cursor:pointer}.st-header-cell.draggable{cursor:-webkit-grab;cursor:grab}.st-cell,.st-header-cell{-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--st-slate-800);display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--st-spacing-small);overflow:hidden;position:relative}.st-cell.left-aligned,.st-header-cell.left-aligned{padding-left:var(--st-cell-padding);text-align:left}.st-cell.center-aligned,.st-header-cell.center-aligned{text-align:center}.st-cell.center-aligned{padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-container-width))}.st-cell.center-aligned>.st-cell-content,.st-header-cell.center-aligned>.st-header-label-text{text-align:center}.st-cell.clickable{cursor:pointer}.st-cell,.st-cell-editing,.st-header-cell{height:100%;width:100%}.st-cell-editing{position:relative}.st-header-label{-webkit-box-flex:1;-ms-flex-positive:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;flex-grow:1;height:100%;min-width:0}.st-cell-content,.st-header-label-text{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;width:100%}.st-header-label-text{color:var(--st-header-label-color);font-weight:600;padding-left:var(--st-cell-padding);padding-right:var(--st-cell-padding)}.st-cell-content.left-aligned,.st-header-label-text.left-aligned{text-align:left}.st-cell-content.center-aligned,.st-header-label-text.center-aligned{text-align:center}.st-cell-content.right-aligned,.st-header-label-text.right-aligned{text-align:right}.st-not-resizeable .st-cell-content{padding-left:var(--st-cell-padding);padding-right:var(--st-cell-padding)}.st-resizeable .st-body-pinned-right .st-cell-content{padding-left:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-container-width));padding-right:var(--st-cell-padding)}.st-resizeable .st-body-main .st-cell-content,.st-resizeable .st-body-pinned-left .st-cell-content{padding-left:var(--st-cell-padding);padding-right:calc(var(--st-cell-padding) + var(--st-spacing-small) + var(--st-resize-handle-container-width))}.st-cell{border:var(--st-border-width) solid #0000}.st-cell.even-column:not(.st-cell-selected){background-color:var(--st-even-column-background-color)}.st-cell.odd-column:not(.st-cell-selected){background-color:var(--st-odd-column-background-color)}.st-cell-depth-1{padding-left:calc(var(--st-cell-padding)*4)}.st-cell-depth-2{padding-left:calc(var(--st-cell-padding)*8)}.st-cell-depth-3{padding-left:calc(var(--st-cell-padding)*12)}.st-cell-depth-4{padding-left:calc(var(--st-cell-padding)*16)}.st-cell-depth-5{padding-left:calc(var(--st-cell-padding)*20)}.st-cell-depth-6{padding-left:calc(var(--st-cell-padding)*24)}.st-cell-depth-7{padding-left:calc(var(--st-cell-padding)*28)}.st-cell-depth-1 .st-cell-content{color:rgb(from var(--st-cell-color) r g b/80%)!important}.st-cell-depth-2 .st-cell-content,.st-cell-depth-3 .st-cell-content,.st-cell-depth-4 .st-cell-content,.st-cell-depth-5 .st-cell-content,.st-cell-depth-6 .st-cell-content,.st-cell-depth-7 .st-cell-content{color:rgb(from var(--st-cell-color) r g b/70%)!important}.st-icon-container{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:center;margin-left:4px}.st-expand-icon{fill:var(--st-header-label-color);cursor:pointer}.st-header-resize-handle-container{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;cursor:col-resize;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;justify-content:center;width:var(--st-resize-handle-container-width)}.st-header-resize-handle{background-color:var(--st-resize-handle-color);height:calc(100% - 20px);width:var(--st-resize-handle-width)}.st-row-separator{background-color:var(--st-separator-border-color);cursor:pointer;display:grid;grid-column:1/-1;height:1px;min-width:100%;position:absolute}.st-row-separator.st-last-group-row{background-color:var(--st-last-group-row-separator-border-color)}.st-dragging{background-color:var(--st-dragging-background-color)}.st-cell-selected{background-color:var(--st-selected-cell-background-color)}.st-cell-selected .st-cell-content{color:var(--st-selected-cell-color)!important}.st-cell-selected-first{background-color:var(--st-selected-first-cell-background-color);border:var(--st-border-width) solid var(--st-selected-border-color)}.st-cell-selected-first .st-cell-content{color:var(--st-selected-first-cell-color)!important}.st-selected-top-border{border-top:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-bottom-border{border-bottom:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-left-border{border-left:var(--st-border-width) solid var(--st-selected-border-color)}.st-selected-right-border{border-right:var(--st-border-width) solid var(--st-selected-border-color)}.st-horizontal-scrollbar-container{-ms-flex-negative:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-scrollbar-bg-color);border-top:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;flex-shrink:0;height:12px;width:100%}.st-horizontal-scrollbar-left{border-right:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-right{border-left:var(--st-border-width) solid var(--st-border-color)}.st-horizontal-scrollbar-left,.st-horizontal-scrollbar-right{height:100%}.st-horizontal-scrollbar-middle{-webkit-overflow-scrolling:touch;min-height:11px;overflow:auto;-ms-touch-action:auto;touch-action:auto}.st-horizontal-scrollbar-middle>div{height:1px}.st-footer{-ms-flex-negative:0;background-color:var(--st-footer-background-color);border-top:var(--st-border-width) solid var(--st-border-color);flex-shrink:0;padding:var(--st-spacing-medium)}.st-footer,.st-next-prev-btn{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.st-next-prev-btn{-webkit-box-pack:center;-ms-flex-pack:center;fill:var(--st-slate-600);background-color:initial;border:none;border-radius:var(--st-border-radius);cursor:pointer;justify-content:center;padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.disabled>.st-next-prev-icon{fill:var(--st-slate-400);cursor:not-allowed}.st-next-prev-btn:not(.disabled):hover{background-color:var(--st-slate-100)}.st-page-btn{background-color:initial;border:none;border-radius:var(--st-border-radius);color:var(--st-slate-600);cursor:pointer;margin-left:var(--st-spacing-small);padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-page-btn:hover{background-color:var(--st-button-hover-background-color)}.st-page-btn.active{background-color:var(--st-button-active-background-color);color:#fff}.st-page-ellipsis{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;color:var(--st-cell-color);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-weight:700;justify-content:center;margin:0 var(--st-spacing-small);padding:var(--st-spacing-small)}.editable-cell-input{border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);-webkit-box-shadow:var(--st-edit-cell-shadow-color);box-shadow:var(--st-edit-cell-shadow-color);font-size:.875rem;height:100%;left:0;outline:none;padding:var(--st-cell-padding);position:absolute;top:0;width:100%;z-index:1}.editable-cell-input:focus{border:var(--st-border-width) solid var(--st-editable-cell-focus-border-color)}.st-column-editor{-ms-flex-negative:0;background:var(--st-column-editor-background-color);border-left:var(--st-border-width) solid var(--st-border-color);color:var(--st-slate-500);cursor:pointer;flex-shrink:0;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-column-editor-text{padding:var(--st-spacing-medium) var(--st-spacing-small);-webkit-writing-mode:vertical-rl;-ms-writing-mode:tb-rl;writing-mode:vertical-rl;z-index:2}.st-column-editor.open,.st-column-editor.open .st-column-editor-text{background-color:var(--st-column-editor-background-color)}.st-column-editor-popout{background-color:var(--st-column-editor-popout-background-color);height:100%;overflow:hidden;position:absolute;right:calc(100% + 1px);top:0;-webkit-transition:width var(--st-transition-duration) var(--st-transition-ease);transition:width var(--st-transition-duration) var(--st-transition-ease);width:0;z-index:1}.st-column-editor-popout-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-overflow-scrolling:touch;border-left:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium);height:100%;overflow:auto;padding:var(--st-spacing-medium) var(--st-spacing-small);-ms-touch-action:auto;touch-action:auto}.st-header-checkbox-item{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.st-header-checkbox-item,.st-header-icon-container{display:-webkit-box;display:-ms-flexbox;display:flex}.st-header-icon-container{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:24px}.st-header-icon{fill:var(--st-header-icon-color);-webkit-transition:fill var(--st-transition-duration) var(--st-transition-ease);transition:fill var(--st-transition-duration) var(--st-transition-ease)}.st-collapsible-header-icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer}.st-collapsible-header-icon,.st-nested-headers{display:-webkit-box;display:-ms-flexbox;display:flex}.st-nested-headers{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium)}.st-column-editor-popout.open{min-width:200px;width:auto}.st-column-editor-popout.left{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.st-column-editor-popout.open.left{-webkit-transform:translateX(0);transform:translateX(0)}.st-checkbox-label{-ms-flex-negative:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;flex-shrink:0;gap:var(--st-spacing-small);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.st-checkbox-input{display:none}.st-checkbox-custom{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background-color:#fff;border:var(--st-border-width) solid var(--st-slate-300);border-radius:var(--st-border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;height:16px;justify-content:center;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease),border-color var(--st-transition-duration) var(--st-transition-ease);width:16px}.st-checkbox-custom.st-checked{background-color:var(--st-checkbox-checked-background-color);border-color:var(--st-checkbox-checked-border-color)}.st-checkbox-checkmark{fill:#fff}@-webkit-keyframes slide-in-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-left{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes slide-in-right{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes slide-in-right{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}to{-webkit-transform:translateX(0);transform:translateX(0)}}.st-group-header{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:var(--st-font-weight-bold);height:40px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-group-header:hover{background-color:var(--st-button-hover-background-color)}.st-group-header-content{gap:var(--st-spacing-medium)}.st-group-header-content,.st-group-toggle-icon{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.st-group-toggle-icon{-webkit-box-pack:center;-ms-flex-pack:center;font-size:.8em;height:16px;justify-content:center;width:16px}.st-group-name{font-weight:var(--st-font-weight-bold)}.st-group-count{color:var(--st-cell-odd-row-color);font-size:.9em}.st-group-header.expanded .st-group-toggle-icon{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.st-group-header.collapsed .st-group-toggle-icon,.st-group-header.expanded .st-group-toggle-icon{-webkit-transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease),-webkit-transform var(--st-transition-duration) var(--st-transition-ease)}.st-group-header.collapsed .st-group-toggle-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.st-expand-icon-container{-webkit-transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease),-webkit-transform var(--st-transition-duration) var(--st-transition-ease)}.st-expand-icon-container.expanded{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.st-expand-icon-container.collapsed{-webkit-transform:rotate(0deg);transform:rotate(0deg)}@-webkit-keyframes cell-flash{0%{background-color:var(--st-cell-flash-color)}to{background-color:initial}}@keyframes cell-flash{0%{background-color:var(--st-cell-flash-color)}to{background-color:initial}}.st-cell-updating{-webkit-animation:cell-flash .6s ease-in-out;animation:cell-flash .6s ease-in-out}@-webkit-keyframes copy-flash{0%{background-color:var(--st-copy-flash-color)}to{background-color:var(--st-selected-cell-background-color)}}@keyframes copy-flash{0%{background-color:var(--st-copy-flash-color)}to{background-color:var(--st-selected-cell-background-color)}}@-webkit-keyframes copy-flash-first{0%{background-color:var(--st-copy-flash-color)}to{background-color:var(--st-selected-first-cell-background-color)}}@keyframes copy-flash-first{0%{background-color:var(--st-copy-flash-color)}to{background-color:var(--st-selected-first-cell-background-color)}}.st-cell-copy-flash{-webkit-animation:copy-flash .8s ease-in-out;animation:copy-flash .8s ease-in-out}.st-cell-copy-flash-first{-webkit-animation:copy-flash-first .8s ease-in-out;animation:copy-flash-first .8s ease-in-out}@-webkit-keyframes warning-flash{0%{background-color:var(--st-warning-flash-color)}to{background-color:initial}}@keyframes warning-flash{0%{background-color:var(--st-warning-flash-color)}to{background-color:initial}}@-webkit-keyframes warning-flash-first{0%{background-color:var(--st-warning-flash-color)}to{background-color:var(--st-selected-first-cell-background-color)}}@keyframes warning-flash-first{0%{background-color:var(--st-warning-flash-color)}to{background-color:var(--st-selected-first-cell-background-color)}}.st-cell-warning-flash{-webkit-animation:warning-flash .6s ease-in-out;animation:warning-flash .6s ease-in-out}.st-cell-warning-flash-first{-webkit-animation:warning-flash-first .6s ease-in-out;animation:warning-flash-first .6s ease-in-out}.st-dropdown-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-overflow-scrolling:touch;background-color:var(--st-odd-row-background-color);border:1px solid var(--st-border-color);border-radius:var(--st-border-radius);-webkit-box-shadow:var(--st-edit-cell-shadow);box-shadow:var(--st-edit-cell-shadow);cursor:default;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:400px;min-width:120px;position:fixed;-ms-touch-action:auto;touch-action:auto;-webkit-transform:translateZ(0);transform:translateZ(0);will-change:transform;z-index:100}.st-dropdown-bottom-left,.st-dropdown-bottom-right{margin-top:4px}.st-dropdown-top-left,.st-dropdown-top-right{margin-bottom:4px}.st-dropdown-item{color:var(--st-cell-color);cursor:pointer;padding:8px 12px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);white-space:nowrap}.st-dropdown-item:hover{background-color:var(--st-button-hover-background-color)}.st-dropdown-item.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-dropdown-group-label{color:var(--st-slate-500);font-size:.8em;font-weight:600;padding:6px 12px}.st-dropdown-divider{background-color:var(--st-border-color);height:1px;margin:4px 0}.st-datepicker{background-color:var(--st-odd-row-background-color);font-family:inherit;min-width:280px}.st-datepicker-header{-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-header-background-color);border-bottom:1px solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:space-between;padding:10px}.st-datepicker-header-label{-webkit-box-flex:1;color:var(--st-header-label-color);cursor:pointer;-ms-flex:1;flex:1;font-weight:600;text-align:center}.st-datepicker-nav-btn{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:#0000;border:none;border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:1.2em;justify-content:center;padding:0 8px}.st-datepicker-nav-btn>*{fill:var(--st-cell-color)!important}.st-datepicker-nav-btn:hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-grid{display:grid;padding:10px}.st-datepicker-days-grid{gap:4px;grid-template-columns:repeat(7,1fr)}.st-datepicker-months-grid,.st-datepicker-years-grid{gap:8px;grid-template-columns:repeat(3,1fr)}.st-datepicker-weekday{color:var(--st-slate-500);font-size:.8em;font-weight:600;padding:6px 0;text-align:center}.st-datepicker-day{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:50%;color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:32px;justify-content:center;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-day.empty{cursor:default}.st-datepicker-day:not(.empty):hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-day.today{color:var(--st-button-active-background-color);font-weight:600}.st-datepicker-day.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-datepicker-day.other-month{color:var(--st-slate-400)}.st-datepicker-month,.st-datepicker-year{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border-radius:var(--st-border-radius);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:center;padding:12px 8px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-month:hover,.st-datepicker-year:hover{background-color:var(--st-button-hover-background-color)}.st-datepicker-month.selected,.st-datepicker-year.selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-datepicker-footer{-webkit-box-pack:end;-ms-flex-pack:end;border-top:1px solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:flex-end;padding:10px}.st-datepicker-today-btn{background-color:initial;border:1px solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;padding:6px 12px;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-datepicker-today-btn:hover{background-color:var(--st-button-hover-background-color)}.st-filter-bar{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--st-spacing-medium)}.st-filter-container{min-width:150px;padding:var(--st-spacing-medium)}.st-filter-container,.st-filter-section{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-flex:1;-ms-flex-positive:1;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;flex-grow:1}.st-filter-section{margin-bottom:var(--st-spacing-medium)}.st-filter-input{background-color:var(--st-odd-row-background-color);border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);font-family:inherit;font-size:14px;outline:none;padding:var(--st-spacing-small);-webkit-transition:border-color var(--st-transition-duration) var(--st-transition-ease);transition:border-color var(--st-transition-duration) var(--st-transition-ease);width:100%}.st-filter-input:focus{border-color:var(--st-editable-cell-focus-border-color)}.st-filter-input-range-from{margin-bottom:var(--st-spacing-medium)}.st-filter-select{background-color:var(--st-odd-row-background-color);border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;font-family:inherit;font-size:14px;outline:none;padding:var(--st-spacing-medium) var(--st-spacing-medium);-webkit-transition:border-color var(--st-transition-duration) var(--st-transition-ease);transition:border-color var(--st-transition-duration) var(--st-transition-ease);width:100%}.st-filter-select:focus{border-color:var(--st-editable-cell-focus-border-color)}.st-filter-actions{border-top:var(--st-border-width) solid var(--st-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--st-spacing-medium);padding-top:var(--st-spacing-medium)}.st-filter-button{-webkit-box-flex:1;border:none;border-radius:var(--st-border-radius);cursor:pointer;-ms-flex:1;flex:1;font-family:inherit;font-size:14px;font-weight:500;padding:var(--st-spacing-small);-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease)}.st-filter-button-apply{background-color:var(--st-button-active-background-color);color:#fff}.st-filter-button-apply:hover:not(.st-filter-button-disabled){opacity:.9}.st-filter-button-disabled{background-color:var(--st-slate-300);color:var(--st-slate-500);cursor:not-allowed}.st-filter-button-clear{background-color:initial;border:var(--st-border-width) solid var(--st-border-color);color:var(--st-cell-color)}.st-filter-button-clear:hover{background-color:var(--st-button-hover-background-color)}.st-custom-select{position:relative;width:100%}.st-custom-select-trigger{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;background-color:var(--st-odd-row-background-color);border:var(--st-border-width) solid var(--st-border-color);border-radius:var(--st-border-radius);color:var(--st-cell-color);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-family:inherit;font-size:14px;gap:var(--st-spacing-medium);justify-content:space-between;outline:none;padding:var(--st-spacing-small);-webkit-transition:border-color var(--st-transition-duration) var(--st-transition-ease);transition:border-color var(--st-transition-duration) var(--st-transition-ease);width:100%}.st-custom-select-open .st-custom-select-trigger,.st-custom-select-trigger:focus,.st-custom-select-trigger:hover:not(:disabled){border-color:var(--st-editable-cell-focus-border-color)}.st-custom-select-value{-webkit-box-flex:1;color:var(--st-cell-color);-ms-flex:1;flex:1;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.st-custom-select-arrow{-ms-flex-negative:0;color:var(--st-header-label-color);flex-shrink:0;-webkit-transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:-webkit-transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease);transition:transform var(--st-transition-duration) var(--st-transition-ease),-webkit-transform var(--st-transition-duration) var(--st-transition-ease)}.st-custom-select-open .st-custom-select-arrow{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.st-custom-select-options{-webkit-box-orient:vertical;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:200px;min-width:120px;overflow:auto;overflow-x:hidden}.st-custom-select-option{-ms-flex-negative:0;color:var(--st-cell-color);cursor:pointer;flex-shrink:0;font-size:14px;overflow:hidden;padding:var(--st-spacing-small);text-overflow:ellipsis;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);white-space:nowrap}.st-custom-select-option-focused,.st-custom-select-option:hover{background-color:var(--st-button-hover-background-color)}.st-custom-select-option-selected{background-color:var(--st-selected-cell-background-color);color:var(--st-selected-cell-color)}.st-custom-select-option-selected.st-custom-select-option-focused{background-color:var(--st-selected-cell-background-color);opacity:.9}.st-custom-select-disabled{opacity:var(--st-opacity-disabled);pointer-events:none}.st-custom-select-disabled .st-custom-select-trigger{background-color:var(--st-header-background-color);color:var(--st-header-label-color);cursor:not-allowed}.st-enum-filter-options{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-flex:1;-ms-flex-positive:1;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;flex-grow:1;gap:var(--st-spacing-small);max-height:200px;overflow:auto}.st-enum-select-all{border-bottom:var(--st-border-width) solid var(--st-border-color);margin-bottom:var(--st-spacing-small);padding-bottom:var(--st-spacing-small)}.st-enum-select-all-label{color:var(--st-header-label-color);font-weight:600}.st-enum-option-label{color:var(--st-cell-color);font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.st-filter-bar{background-color:var(--st-header-background-color);border-bottom:var(--st-border-width) solid var(--st-border-color);padding:var(--st-spacing-medium)}.st-filter-bar-content{-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--st-spacing-medium)}.st-filter-bar-content,.st-filter-chips{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.st-filter-chips{gap:var(--st-spacing-small)}.st-filter-chip{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--st-selected-cell-background-color);border:var(--st-border-width) solid var(--st-selected-border-color);border-radius:calc(var(--st-border-radius)*2);color:var(--st-selected-cell-color);display:-webkit-box;display:-ms-flexbox;display:flex;font-size:13px;padding:var(--st-spacing-small) var(--st-spacing-medium)}.st-filter-chip-text{margin-right:var(--st-spacing-small);white-space:nowrap}.st-filter-chip-remove{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;background:none;border:none;border-radius:50%;color:inherit;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:16px;font-weight:700;height:16px;justify-content:center;line-height:1;margin-left:var(--st-spacing-small);padding:0;-webkit-transition:background-color var(--st-transition-duration) var(--st-transition-ease);transition:background-color var(--st-transition-duration) var(--st-transition-ease);width:16px}.st-filter-chip-remove:hover{background-color:#fff3}.st-filter-bar-label{-ms-flex-negative:0;color:var(--st-header-label-color);flex-shrink:0;font-size:14px;font-weight:600}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { RefObject } from "react";
|
|
2
2
|
import HeaderObject from "./HeaderObject";
|
|
3
3
|
import CellChangeProps from "./CellChangeProps";
|
|
4
|
-
import { RowId } from "./RowId";
|
|
5
4
|
import TableRow from "./TableRow";
|
|
6
5
|
import Cell from "./Cell";
|
|
7
6
|
export interface TableCellProps {
|
|
@@ -14,7 +13,6 @@ export interface TableCellProps {
|
|
|
14
13
|
isSelected: boolean;
|
|
15
14
|
isInitialFocusedCell: boolean;
|
|
16
15
|
onCellEdit?: (props: CellChangeProps) => void;
|
|
17
|
-
onExpandRowClick: (rowId: RowId) => void;
|
|
18
16
|
onMouseDown: (props: Cell) => void;
|
|
19
17
|
onMouseOver: (props: Cell) => void;
|
|
20
18
|
onTableHeaderDragEnd: (newHeaders: HeaderObject[]) => void;
|
package/package.json
CHANGED