Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tanstack/react-table

Package Overview
Dependencies
Maintainers
1
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/react-table - npm Package Compare versions

Comparing version 8.0.0-alpha.1 to 8.0.0-alpha.2

build/cjs/features/ColumnSizing.js

48

build/cjs/core.js

@@ -25,2 +25,3 @@ /**

var Expanding = require('./features/Expanding.js');
var ColumnSizing = require('./features/ColumnSizing.js');

@@ -36,3 +37,3 @@ function createTableInstance(options, rerender) {

var defaultOptions = _rollupPluginBabelHelpers["extends"]({}, Visibility.getDefaultOptions(instance), Ordering.getDefaultOptions(instance), Pinning.getDefaultOptions(instance), Filters.getDefaultOptions(instance), Sorting.getDefaultOptions(instance), Grouping.getDefaultOptions(instance), Expanding.getDefaultOptions(instance));
var defaultOptions = _rollupPluginBabelHelpers["extends"]({}, Visibility.getDefaultOptions(instance), Ordering.getDefaultOptions(instance), Pinning.getDefaultOptions(instance), Filters.getDefaultOptions(instance), Sorting.getDefaultOptions(instance), Grouping.getDefaultOptions(instance), Expanding.getDefaultOptions(instance), ColumnSizing.getDefaultOptions(instance));

@@ -49,5 +50,5 @@ var defaultState = {};

var initialState = _rollupPluginBabelHelpers["extends"]({}, Visibility.getInitialState(), Ordering.getInitialState(), Pinning.getInitialState(), Filters.getInitialState(), Sorting.getInitialState(), Grouping.getInitialState(), Expanding.getInitialState(), (_options$initialState = options.initialState) != null ? _options$initialState : {});
var initialState = _rollupPluginBabelHelpers["extends"]({}, Visibility.getInitialState(), Ordering.getInitialState(), Pinning.getInitialState(), Filters.getInitialState(), Sorting.getInitialState(), Grouping.getInitialState(), Expanding.getInitialState(), ColumnSizing.getInitialState(), (_options$initialState = options.initialState) != null ? _options$initialState : {});
var finalInstance = _rollupPluginBabelHelpers["extends"]({}, instance, Visibility.getInstance(instance), Ordering.getInstance(instance), Pinning.getInstance(instance), Headers.getInstance(instance), Filters.getInstance(instance), Sorting.getInstance(instance), Grouping.getInstance(instance), Expanding.getInstance(instance), {
var finalInstance = _rollupPluginBabelHelpers["extends"]({}, instance, Visibility.getInstance(instance), Ordering.getInstance(instance), Pinning.getInstance(instance), Headers.getInstance(instance), Filters.getInstance(instance), Sorting.getInstance(instance), Grouping.getInstance(instance), Expanding.getInstance(instance), ColumnSizing.getInstance(instance), {
rerender: rerender,

@@ -132,7 +133,3 @@ initialState: initialState,

var column = _rollupPluginBabelHelpers["extends"]({
width: 150,
minWidth: 20,
maxWidth: Number.MAX_SAFE_INTEGER
}, defaultColumn, columnDef, {
var column = _rollupPluginBabelHelpers["extends"]({}, ColumnSizing.defaultColumnSizing, defaultColumn, columnDef, {
id: "" + id,

@@ -172,3 +169,3 @@ accessorFn: accessorFn,

column = Object.assign(column, Visibility.createColumn(column, instance), Pinning.createColumn(column, instance), Filters.createColumn(column, instance), Sorting.createColumn(column, instance), Grouping.createColumn(column, instance)); // Yes, we have to convert instance to uknown, because we know more than the compiler here.
column = Object.assign(column, Visibility.createColumn(column, instance), Pinning.createColumn(column, instance), Filters.createColumn(column, instance), Sorting.createColumn(column, instance), Grouping.createColumn(column, instance), ColumnSizing.createColumn(column, instance)); // Yes, we have to convert instance to uknown, because we know more than the compiler here.

@@ -233,3 +230,3 @@ return column;

getColumnWidth: function getColumnWidth(columnId) {
var _column$minWidth, _column$width, _column$maxWidth;
var _column$minWidth, _ref3, _column$maxWidth;

@@ -242,3 +239,4 @@ var column = instance.getColumn(columnId);

return Math.min(Math.max((_column$minWidth = column.minWidth) != null ? _column$minWidth : 0, (_column$width = column.width) != null ? _column$width : 0), (_column$maxWidth = column.maxWidth) != null ? _column$maxWidth : 0);
var columnSize = instance.getState().columnSizing[column.id];
return Math.min(Math.max((_column$minWidth = column.minWidth) != null ? _column$minWidth : ColumnSizing.defaultColumnSizing.minWidth, (_ref3 = columnSize != null ? columnSize : column.width) != null ? _ref3 : ColumnSizing.defaultColumnSizing.width), (_column$maxWidth = column.maxWidth) != null ? _column$maxWidth : ColumnSizing.defaultColumnSizing.maxWidth);
},

@@ -493,2 +491,30 @@ createCell: function createCell(row, column, value) {

}, userProps);
},
getTableWidth: function getTableWidth() {
var _instance$getHeaderGr, _instance$getHeaderGr2;
return (_instance$getHeaderGr = (_instance$getHeaderGr2 = instance.getHeaderGroups()[0]) == null ? void 0 : _instance$getHeaderGr2.headers.reduce(function (sum, header) {
return sum + header.getWidth();
}, 0)) != null ? _instance$getHeaderGr : 0;
},
getLeftTableWidth: function getLeftTableWidth() {
var _instance$getLeftHead, _instance$getLeftHead2;
return (_instance$getLeftHead = (_instance$getLeftHead2 = instance.getLeftHeaderGroups()[0]) == null ? void 0 : _instance$getLeftHead2.headers.reduce(function (sum, header) {
return sum + header.getWidth();
}, 0)) != null ? _instance$getLeftHead : 0;
},
getCenterTableWidth: function getCenterTableWidth() {
var _instance$getCenterHe, _instance$getCenterHe2;
return (_instance$getCenterHe = (_instance$getCenterHe2 = instance.getCenterHeaderGroups()[0]) == null ? void 0 : _instance$getCenterHe2.headers.reduce(function (sum, header) {
return sum + header.getWidth();
}, 0)) != null ? _instance$getCenterHe : 0;
},
getRightTableWidth: function getRightTableWidth() {
var _instance$getRightHea, _instance$getRightHea2;
return (_instance$getRightHea = (_instance$getRightHea2 = instance.getRightHeaderGroups()[0]) == null ? void 0 : _instance$getRightHea2.headers.reduce(function (sum, header) {
return sum + header.getWidth();
}, 0)) != null ? _instance$getRightHea : 0;
}

@@ -495,0 +521,0 @@ });

@@ -16,2 +16,3 @@ /**

var utils = require('../utils.js');
var ColumnSizing = require('./ColumnSizing.js');

@@ -131,2 +132,4 @@ //

};
header = Object.assign(header, ColumnSizing.createHeader(header, instance)); // Yes, we have to convert instance to uknown, because we know more than the compiler here.
return header;

@@ -133,0 +136,0 @@ },

@@ -16,19 +16,19 @@ {

{
"uid": "22aa-45",
"uid": "9e82-47",
"name": "columnFilterRowsFn.ts"
},
{
"uid": "22aa-47",
"uid": "9e82-49",
"name": "globalFilterRowsFn.ts"
},
{
"uid": "22aa-49",
"uid": "9e82-51",
"name": "sortRowsFn.ts"
},
{
"uid": "22aa-55",
"uid": "9e82-57",
"name": "groupRowsFn.ts"
},
{
"uid": "22aa-57",
"uid": "9e82-59",
"name": "expandRowsFn.ts"

@@ -39,3 +39,3 @@ }

{
"uid": "22aa-53",
"uid": "9e82-55",
"name": "utils.tsx"

@@ -47,31 +47,35 @@ },

{
"uid": "22aa-59",
"uid": "9e82-61",
"name": "Visibility.ts"
},
{
"uid": "22aa-63",
"uid": "9e82-65",
"name": "Grouping.ts"
},
{
"uid": "22aa-65",
"uid": "9e82-67",
"name": "Ordering.ts"
},
{
"uid": "22aa-67",
"uid": "9e82-69",
"name": "Pinning.ts"
},
{
"uid": "22aa-69",
"uid": "9e82-71",
"name": "ColumnSizing.ts"
},
{
"uid": "9e82-73",
"name": "Headers.ts"
},
{
"uid": "22aa-73",
"uid": "9e82-77",
"name": "Filters.ts"
},
{
"uid": "22aa-77",
"uid": "9e82-81",
"name": "Sorting.ts"
},
{
"uid": "22aa-79",
"uid": "9e82-83",
"name": "Expanding.ts"

@@ -82,23 +86,23 @@ }

{
"uid": "22aa-61",
"uid": "9e82-63",
"name": "aggregationTypes.ts"
},
{
"uid": "22aa-71",
"uid": "9e82-75",
"name": "filterTypes.ts"
},
{
"uid": "22aa-75",
"uid": "9e82-79",
"name": "sortTypes.ts"
},
{
"uid": "22aa-81",
"uid": "9e82-85",
"name": "core.tsx"
},
{
"uid": "22aa-83",
"uid": "9e82-87",
"name": "createTable.tsx"
},
{
"uid": "22aa-85",
"uid": "9e82-89",
"name": "index.tsx"

@@ -109,3 +113,3 @@ }

{
"uid": "22aa-51",
"uid": "9e82-53",
"name": "\u0000rollupPluginBabelHelpers.js"

@@ -119,134 +123,140 @@ }

"nodeParts": {
"22aa-45": {
"9e82-47": {
"renderedLength": 3156,
"gzipLength": 860,
"brotliLength": 0,
"mainUid": "22aa-44"
"mainUid": "9e82-46"
},
"22aa-47": {
"9e82-49": {
"renderedLength": 2523,
"gzipLength": 714,
"brotliLength": 0,
"mainUid": "22aa-46"
"mainUid": "9e82-48"
},
"22aa-49": {
"9e82-51": {
"renderedLength": 2416,
"gzipLength": 811,
"brotliLength": 0,
"mainUid": "22aa-48"
"mainUid": "9e82-50"
},
"22aa-51": {
"9e82-53": {
"renderedLength": 2695,
"gzipLength": 1065,
"brotliLength": 0,
"mainUid": "22aa-50"
"mainUid": "9e82-52"
},
"22aa-53": {
"9e82-55": {
"renderedLength": 3913,
"gzipLength": 1413,
"brotliLength": 0,
"mainUid": "22aa-52"
"mainUid": "9e82-54"
},
"22aa-55": {
"9e82-57": {
"renderedLength": 4797,
"gzipLength": 1351,
"brotliLength": 0,
"mainUid": "22aa-54"
"mainUid": "9e82-56"
},
"22aa-57": {
"9e82-59": {
"renderedLength": 631,
"gzipLength": 278,
"brotliLength": 0,
"mainUid": "22aa-56"
"mainUid": "9e82-58"
},
"22aa-59": {
"9e82-61": {
"renderedLength": 5559,
"gzipLength": 1139,
"brotliLength": 0,
"mainUid": "22aa-58"
"mainUid": "9e82-60"
},
"22aa-61": {
"9e82-63": {
"renderedLength": 2520,
"gzipLength": 755,
"brotliLength": 0,
"mainUid": "22aa-60"
"mainUid": "9e82-62"
},
"22aa-63": {
"9e82-65": {
"renderedLength": 7455,
"gzipLength": 1615,
"gzipLength": 1616,
"brotliLength": 0,
"mainUid": "22aa-62"
"mainUid": "9e82-64"
},
"22aa-65": {
"9e82-67": {
"renderedLength": 2381,
"gzipLength": 745,
"gzipLength": 746,
"brotliLength": 0,
"mainUid": "22aa-64"
"mainUid": "9e82-66"
},
"22aa-67": {
"9e82-69": {
"renderedLength": 5325,
"gzipLength": 1040,
"gzipLength": 1041,
"brotliLength": 0,
"mainUid": "22aa-66"
"mainUid": "9e82-68"
},
"22aa-69": {
"renderedLength": 17919,
"gzipLength": 2898,
"9e82-71": {
"renderedLength": 10235,
"gzipLength": 2086,
"brotliLength": 0,
"mainUid": "22aa-68"
"mainUid": "9e82-70"
},
"22aa-71": {
"9e82-73": {
"renderedLength": 18086,
"gzipLength": 2992,
"brotliLength": 0,
"mainUid": "9e82-72"
},
"9e82-75": {
"renderedLength": 4437,
"gzipLength": 786,
"brotliLength": 0,
"mainUid": "22aa-70"
"mainUid": "9e82-74"
},
"22aa-73": {
"9e82-77": {
"renderedLength": 15814,
"gzipLength": 2768,
"brotliLength": 0,
"mainUid": "22aa-72"
"mainUid": "9e82-76"
},
"22aa-75": {
"9e82-79": {
"renderedLength": 2752,
"gzipLength": 846,
"brotliLength": 0,
"mainUid": "22aa-74"
"mainUid": "9e82-78"
},
"22aa-77": {
"9e82-81": {
"renderedLength": 9830,
"gzipLength": 2116,
"brotliLength": 0,
"mainUid": "22aa-76"
"mainUid": "9e82-80"
},
"22aa-79": {
"9e82-83": {
"renderedLength": 7502,
"gzipLength": 1624,
"brotliLength": 0,
"mainUid": "22aa-78"
"mainUid": "9e82-82"
},
"22aa-81": {
"renderedLength": 15063,
"gzipLength": 3151,
"9e82-85": {
"renderedLength": 16859,
"gzipLength": 3366,
"brotliLength": 0,
"mainUid": "22aa-80"
"mainUid": "9e82-84"
},
"22aa-83": {
"9e82-87": {
"renderedLength": 1694,
"gzipLength": 487,
"brotliLength": 0,
"mainUid": "22aa-82"
"mainUid": "9e82-86"
},
"22aa-85": {
"9e82-89": {
"renderedLength": 0,
"gzipLength": 0,
"brotliLength": 0,
"mainUid": "22aa-84"
"mainUid": "9e82-88"
}
},
"nodeMetas": {
"22aa-44": {
"9e82-46": {
"id": "/packages/react-table/src/utils/columnFilterRowsFn.ts",
"moduleParts": {
"index.production.js": "22aa-45"
"index.production.js": "9e82-47"
},

@@ -256,10 +266,10 @@ "imported": [],

{
"uid": "22aa-84"
"uid": "9e82-88"
}
]
},
"22aa-46": {
"9e82-48": {
"id": "/packages/react-table/src/utils/globalFilterRowsFn.ts",
"moduleParts": {
"index.production.js": "22aa-47"
"index.production.js": "9e82-49"
},

@@ -269,10 +279,10 @@ "imported": [],

{
"uid": "22aa-84"
"uid": "9e82-88"
}
]
},
"22aa-48": {
"9e82-50": {
"id": "/packages/react-table/src/utils/sortRowsFn.ts",
"moduleParts": {
"index.production.js": "22aa-49"
"index.production.js": "9e82-51"
},

@@ -282,10 +292,10 @@ "imported": [],

{
"uid": "22aa-84"
"uid": "9e82-88"
}
]
},
"22aa-50": {
"9e82-52": {
"id": "\u0000rollupPluginBabelHelpers.js",
"moduleParts": {
"index.production.js": "22aa-51"
"index.production.js": "9e82-53"
},

@@ -295,35 +305,38 @@ "imported": [],

{
"uid": "22aa-82"
"uid": "9e82-86"
},
{
"uid": "22aa-52"
"uid": "9e82-54"
},
{
"uid": "22aa-80"
"uid": "9e82-84"
},
{
"uid": "22aa-58"
"uid": "9e82-60"
},
{
"uid": "22aa-76"
"uid": "9e82-80"
},
{
"uid": "22aa-78"
"uid": "9e82-82"
},
{
"uid": "22aa-60"
"uid": "9e82-70"
},
{
"uid": "9e82-62"
}
]
},
"22aa-52": {
"9e82-54": {
"id": "/packages/react-table/src/utils.tsx",
"moduleParts": {
"index.production.js": "22aa-53"
"index.production.js": "9e82-55"
},
"imported": [
{
"uid": "22aa-50"
"uid": "9e82-52"
},
{
"uid": "22aa-87"
"uid": "9e82-91"
}

@@ -333,41 +346,44 @@ ],

{
"uid": "22aa-54"
"uid": "9e82-56"
},
{
"uid": "22aa-80"
"uid": "9e82-84"
},
{
"uid": "22aa-58"
"uid": "9e82-60"
},
{
"uid": "22aa-64"
"uid": "9e82-66"
},
{
"uid": "22aa-66"
"uid": "9e82-68"
},
{
"uid": "22aa-68"
"uid": "9e82-72"
},
{
"uid": "22aa-72"
"uid": "9e82-76"
},
{
"uid": "22aa-76"
"uid": "9e82-80"
},
{
"uid": "22aa-62"
"uid": "9e82-64"
},
{
"uid": "22aa-78"
"uid": "9e82-82"
},
{
"uid": "9e82-70"
}
]
},
"22aa-54": {
"9e82-56": {
"id": "/packages/react-table/src/utils/groupRowsFn.ts",
"moduleParts": {
"index.production.js": "22aa-55"
"index.production.js": "9e82-57"
},
"imported": [
{
"uid": "22aa-52"
"uid": "9e82-54"
}

@@ -377,10 +393,10 @@ ],

{
"uid": "22aa-84"
"uid": "9e82-88"
}
]
},
"22aa-56": {
"9e82-58": {
"id": "/packages/react-table/src/utils/expandRowsFn.ts",
"moduleParts": {
"index.production.js": "22aa-57"
"index.production.js": "9e82-59"
},

@@ -390,17 +406,17 @@ "imported": [],

{
"uid": "22aa-84"
"uid": "9e82-88"
}
]
},
"22aa-58": {
"9e82-60": {
"id": "/packages/react-table/src/features/Visibility.ts",
"moduleParts": {
"index.production.js": "22aa-59"
"index.production.js": "9e82-61"
},
"imported": [
{
"uid": "22aa-50"
"uid": "9e82-52"
},
{
"uid": "22aa-52"
"uid": "9e82-54"
}

@@ -410,14 +426,14 @@ ],

{
"uid": "22aa-80"
"uid": "9e82-84"
}
]
},
"22aa-60": {
"9e82-62": {
"id": "/packages/react-table/src/aggregationTypes.ts",
"moduleParts": {
"index.production.js": "22aa-61"
"index.production.js": "9e82-63"
},
"imported": [
{
"uid": "22aa-50"
"uid": "9e82-52"
}

@@ -427,17 +443,17 @@ ],

{
"uid": "22aa-62"
"uid": "9e82-64"
}
]
},
"22aa-62": {
"9e82-64": {
"id": "/packages/react-table/src/features/Grouping.ts",
"moduleParts": {
"index.production.js": "22aa-63"
"index.production.js": "9e82-65"
},
"imported": [
{
"uid": "22aa-60"
"uid": "9e82-62"
},
{
"uid": "22aa-52"
"uid": "9e82-54"
}

@@ -447,20 +463,20 @@ ],

{
"uid": "22aa-80"
"uid": "9e82-84"
},
{
"uid": "22aa-64"
"uid": "9e82-66"
}
]
},
"22aa-64": {
"9e82-66": {
"id": "/packages/react-table/src/features/Ordering.ts",
"moduleParts": {
"index.production.js": "22aa-65"
"index.production.js": "9e82-67"
},
"imported": [
{
"uid": "22aa-52"
"uid": "9e82-54"
},
{
"uid": "22aa-62"
"uid": "9e82-64"
}

@@ -470,14 +486,14 @@ ],

{
"uid": "22aa-80"
"uid": "9e82-84"
}
]
},
"22aa-66": {
"9e82-68": {
"id": "/packages/react-table/src/features/Pinning.ts",
"moduleParts": {
"index.production.js": "22aa-67"
"index.production.js": "9e82-69"
},
"imported": [
{
"uid": "22aa-52"
"uid": "9e82-54"
}

@@ -487,14 +503,39 @@ ],

{
"uid": "22aa-80"
"uid": "9e82-84"
}
]
},
"22aa-68": {
"9e82-70": {
"id": "/packages/react-table/src/features/ColumnSizing.ts",
"moduleParts": {
"index.production.js": "9e82-71"
},
"imported": [
{
"uid": "9e82-52"
},
{
"uid": "9e82-54"
}
],
"importedBy": [
{
"uid": "9e82-84"
},
{
"uid": "9e82-72"
}
]
},
"9e82-72": {
"id": "/packages/react-table/src/features/Headers.ts",
"moduleParts": {
"index.production.js": "22aa-69"
"index.production.js": "9e82-73"
},
"imported": [
{
"uid": "22aa-52"
"uid": "9e82-54"
},
{
"uid": "9e82-70"
}

@@ -504,10 +545,10 @@ ],

{
"uid": "22aa-80"
"uid": "9e82-84"
}
]
},
"22aa-70": {
"9e82-74": {
"id": "/packages/react-table/src/filterTypes.ts",
"moduleParts": {
"index.production.js": "22aa-71"
"index.production.js": "9e82-75"
},

@@ -517,17 +558,17 @@ "imported": [],

{
"uid": "22aa-72"
"uid": "9e82-76"
}
]
},
"22aa-72": {
"9e82-76": {
"id": "/packages/react-table/src/features/Filters.ts",
"moduleParts": {
"index.production.js": "22aa-73"
"index.production.js": "9e82-77"
},
"imported": [
{
"uid": "22aa-70"
"uid": "9e82-74"
},
{
"uid": "22aa-52"
"uid": "9e82-54"
}

@@ -537,10 +578,10 @@ ],

{
"uid": "22aa-80"
"uid": "9e82-84"
}
]
},
"22aa-74": {
"9e82-78": {
"id": "/packages/react-table/src/sortTypes.ts",
"moduleParts": {
"index.production.js": "22aa-75"
"index.production.js": "9e82-79"
},

@@ -550,20 +591,20 @@ "imported": [],

{
"uid": "22aa-76"
"uid": "9e82-80"
}
]
},
"22aa-76": {
"9e82-80": {
"id": "/packages/react-table/src/features/Sorting.ts",
"moduleParts": {
"index.production.js": "22aa-77"
"index.production.js": "9e82-81"
},
"imported": [
{
"uid": "22aa-50"
"uid": "9e82-52"
},
{
"uid": "22aa-74"
"uid": "9e82-78"
},
{
"uid": "22aa-52"
"uid": "9e82-54"
}

@@ -573,17 +614,17 @@ ],

{
"uid": "22aa-80"
"uid": "9e82-84"
}
]
},
"22aa-78": {
"9e82-82": {
"id": "/packages/react-table/src/features/Expanding.ts",
"moduleParts": {
"index.production.js": "22aa-79"
"index.production.js": "9e82-83"
},
"imported": [
{
"uid": "22aa-50"
"uid": "9e82-52"
},
{
"uid": "22aa-52"
"uid": "9e82-54"
}

@@ -593,41 +634,44 @@ ],

{
"uid": "22aa-80"
"uid": "9e82-84"
}
]
},
"22aa-80": {
"9e82-84": {
"id": "/packages/react-table/src/core.tsx",
"moduleParts": {
"index.production.js": "22aa-81"
"index.production.js": "9e82-85"
},
"imported": [
{
"uid": "22aa-50"
"uid": "9e82-52"
},
{
"uid": "22aa-52"
"uid": "9e82-54"
},
{
"uid": "22aa-58"
"uid": "9e82-60"
},
{
"uid": "22aa-64"
"uid": "9e82-66"
},
{
"uid": "22aa-66"
"uid": "9e82-68"
},
{
"uid": "22aa-68"
"uid": "9e82-72"
},
{
"uid": "22aa-72"
"uid": "9e82-76"
},
{
"uid": "22aa-76"
"uid": "9e82-80"
},
{
"uid": "22aa-62"
"uid": "9e82-64"
},
{
"uid": "22aa-78"
"uid": "9e82-82"
},
{
"uid": "9e82-70"
}

@@ -637,20 +681,20 @@ ],

{
"uid": "22aa-82"
"uid": "9e82-86"
}
]
},
"22aa-82": {
"9e82-86": {
"id": "/packages/react-table/src/createTable.tsx",
"moduleParts": {
"index.production.js": "22aa-83"
"index.production.js": "9e82-87"
},
"imported": [
{
"uid": "22aa-50"
"uid": "9e82-52"
},
{
"uid": "22aa-87"
"uid": "9e82-91"
},
{
"uid": "22aa-80"
"uid": "9e82-84"
}

@@ -660,32 +704,32 @@ ],

{
"uid": "22aa-84"
"uid": "9e82-88"
}
]
},
"22aa-84": {
"9e82-88": {
"id": "/packages/react-table/src/index.tsx",
"moduleParts": {
"index.production.js": "22aa-85"
"index.production.js": "9e82-89"
},
"imported": [
{
"uid": "22aa-86"
"uid": "9e82-90"
},
{
"uid": "22aa-44"
"uid": "9e82-46"
},
{
"uid": "22aa-46"
"uid": "9e82-48"
},
{
"uid": "22aa-48"
"uid": "9e82-50"
},
{
"uid": "22aa-54"
"uid": "9e82-56"
},
{
"uid": "22aa-56"
"uid": "9e82-58"
},
{
"uid": "22aa-82"
"uid": "9e82-86"
}

@@ -696,3 +740,3 @@ ],

},
"22aa-86": {
"9e82-90": {
"id": "/packages/react-table/src/types.ts",

@@ -703,7 +747,7 @@ "moduleParts": {},

{
"uid": "22aa-84"
"uid": "9e82-88"
}
]
},
"22aa-87": {
"9e82-91": {
"id": "react",

@@ -714,6 +758,6 @@ "moduleParts": {},

{
"uid": "22aa-82"
"uid": "9e82-86"
},
{
"uid": "22aa-52"
"uid": "9e82-54"
}

@@ -720,0 +764,0 @@ ],

@@ -51,2 +51,6 @@ import { RequiredKeys } from './utils';

getCellProps: <TGetter extends Getter<CellProps>>(rowId: string, columnId: string, userProps?: TGetter) => undefined | PropGetterValue<CellProps, TGetter>;
getTableWidth: () => number;
getLeftTableWidth: () => number;
getCenterTableWidth: () => number;
getRightTableWidth: () => number;
};

@@ -53,0 +57,0 @@ export declare type CoreRow<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = {

@@ -5,3 +5,3 @@ import { Cell, Column, Row } from '.';

declare type TableHelper<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = {
RowType: <TTData>() => TableHelper<TTData, TValue, TFilterFns, TSortingFns, TAggregationFns>;
RowType<TTData>(): TableHelper<TTData, TValue, TFilterFns, TSortingFns, TAggregationFns>;
FilterFns: <TTFilterFns>(filterFns: TTFilterFns) => TableHelper<TData, TValue, TTFilterFns, TSortingFns, TAggregationFns>;

@@ -8,0 +8,0 @@ SortingFns: <TTSortingFns>(sortingFns: TTSortingFns) => TableHelper<TData, TValue, TFilterFns, TTSortingFns, TAggregationFns>;

@@ -13,6 +13,6 @@ import { Row } from './types';

declare function alphanumericCaseSensitive<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>(rowA: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, rowB: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, columnId: string): number;
declare function text<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>(rowA: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, rowB: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, columnId: string): 0 | 1 | -1;
declare function textCaseSensitive<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>(rowA: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, rowB: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, columnId: string): 0 | 1 | -1;
declare function datetime<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>(rowA: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, rowB: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, columnId: string): 0 | 1 | -1;
declare function basic<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>(rowA: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, rowB: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, columnId: string): 0 | 1 | -1;
declare function text<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>(rowA: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, rowB: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, columnId: string): 1 | 0 | -1;
declare function textCaseSensitive<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>(rowA: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, rowB: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, columnId: string): 1 | 0 | -1;
declare function datetime<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>(rowA: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, rowB: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, columnId: string): 1 | 0 | -1;
declare function basic<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>(rowA: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, rowB: Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>, columnId: string): 1 | 0 | -1;
export {};

@@ -12,8 +12,9 @@ import React from 'react';

import { Overwrite } from './utils';
export declare type ReactTable<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = TableCore<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & VisibilityInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ColumnOrderInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ColumnPinningInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & HeadersInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & FiltersInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & SortingInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & GroupingInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ExpandedInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>;
import { ColumnSizingColumn, ColumnSizingColumnDef, ColumnSizingHeader, ColumnSizingInstance, ColumnSizingOptions, ColumnSizingTableState } from './features/ColumnSizing';
export declare type ReactTable<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = TableCore<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & VisibilityInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ColumnOrderInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ColumnPinningInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & HeadersInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & FiltersInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & SortingInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & GroupingInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ColumnSizingInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ExpandedInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>;
export declare type Renderable<TProps> = React.ReactNode | React.FunctionComponent<TProps> | React.Component<TProps>;
export declare type Options<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = CoreOptions<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & VisibilityOptions & ColumnOrderOptions & ColumnPinningOptions & FiltersOptions<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & SortingOptions<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & GroupingOptions<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ExpandedOptions<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>;
export declare type Updater<T> = T | ((old?: T) => T);
export declare type Options<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = CoreOptions<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & VisibilityOptions & ColumnOrderOptions & ColumnPinningOptions & FiltersOptions<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & SortingOptions<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & GroupingOptions<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ExpandedOptions<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ColumnSizingOptions;
export declare type Updater<T> = T | ((old: T) => T);
export declare type OnChangeFn<T> = (updaterOrValue: Updater<T>, value: T) => void;
export declare type TableState = VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState;
export declare type TableState = VisibilityTableState & ColumnOrderTableState & ColumnPinningTableState & FiltersTableState & SortingTableState & ExpandedTableState & GroupingTableState & ColumnSizingTableState;
export declare type Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = CoreRow<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & VisibilityRow<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & HeadersRow<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & GroupingRow;

@@ -29,4 +30,4 @@ export declare type RowValues = {

export declare type AccessorFn<TData> = (originalRow: TData, index: number) => any;
export declare type ColumnDef<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = CoreColumnDef<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & VisibilityColumnDef & ColumnPinningColumnDef & FiltersColumnDef<TFilterFns> & SortingColumnDef<TSortingFns> & GroupingColumnDef<TAggregationFns>;
export declare type Column<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = ColumnDef<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & CoreColumn<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ColumnVisibilityColumn & ColumnPinningColumn & FiltersColumn<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & SortingColumn<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & GroupingColumn<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>;
export declare type ColumnDef<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = CoreColumnDef<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & VisibilityColumnDef & ColumnPinningColumnDef & FiltersColumnDef<TFilterFns> & SortingColumnDef<TSortingFns> & GroupingColumnDef<TAggregationFns> & ColumnSizingColumnDef;
export declare type Column<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = ColumnDef<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & CoreColumn<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ColumnVisibilityColumn & ColumnPinningColumn & FiltersColumn<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & SortingColumn<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & GroupingColumn<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ColumnSizingColumn<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>;
export declare type Cell<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = {

@@ -42,3 +43,4 @@ id: string;

};
export declare type Header<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = {
export declare type Header<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = CoreHeader<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> & ColumnSizingHeader<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>;
export declare type CoreHeader<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = {
id: string;

@@ -45,0 +47,0 @@ depth: number;

import React from 'react';
import { Getter, NoInfer, PropGetterValue, Renderable } from './types';
import { Getter, NoInfer, PropGetterValue, Renderable, TableState } from './types';
export declare type IsAny<T> = 0 extends 1 & T ? true : false;

@@ -11,3 +11,3 @@ export declare type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;

export declare function noop(): void;
export declare function makeStateUpdater(key: string, instance: unknown): (updater: Updater<any, any>) => void;
export declare function makeStateUpdater(key: keyof TableState, instance: unknown): (updater: Updater<any, any>) => void;
export declare const safeUseLayoutEffect: typeof React.useLayoutEffect;

@@ -14,0 +14,0 @@ export declare function useMountedLayoutEffect(fn: any, deps: any[]): void;

@@ -11,3 +11,3 @@ /**

*/
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((n="undefined"!=typeof globalThis?globalThis:n||self).ReactTable={},n.React)}(this,(function(n,e){"use strict";function t(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}function r(n){if(n&&n.__esModule)return n;var e=Object.create(null);return n&&Object.keys(n).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:function(){return n[t]}})}})),e.default=n,Object.freeze(e)}var o=t(e),u=r(e);function l(){return l=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},l.apply(this,arguments)}function i(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function a(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(t)return(t=t.call(n)).next.bind(t);if(Array.isArray(n)||(t=function(n,e){if(n){if("string"==typeof n)return i(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?i(n,e):void 0}}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var r=0;return function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(n){var e=function(n,e){if("object"!=typeof n||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"==typeof e?e:String(e)}function g(n,e){return"function"==typeof n?n(e):n}function d(n,e){return function(t){e.setState((function(e){var r;return l({},e,((r={})[n]=g(t,e[n]),r))}))}}function f(n){return n instanceof Function}function c(n,e){var t=[];return function n(r){r.forEach((function(r){t.push(r);var o=e(r);null!=o&&o.length&&n(o)}))}(n),t}"undefined"!=typeof document?o.default.useLayoutEffect:o.default.useEffect;var p=function(n,e){return f(e)?e(n):l({},n,null!=e?e:{})};function m(n,e,t,r){var o,u=[];return function(){var i=n(),a=i,s=u;return(a.length!==s.length||a.some((function(n,e){return s[e]!==n})))&&(r&&console.info(t,l({length:s.length+" -> "+a.length},a.map((function(n,e){return s[e]!==a[e]&&[e,s[e],a[e]]})).filter(Boolean).reduce((function(n,e){var t;return l({},n,((t={})[e[0]]=e.slice(1),t))}),{}),{parent:parent})),o=e.apply(void 0,i),u=a),o}}function v(n,e){return n?function(n){return"function"==typeof n&&((e=Object.getPrototypeOf(n)).prototype&&e.prototype.isReactComponent);var e}(t=n)||"function"==typeof t||function(n){return"object"==typeof n&&"symbol"==typeof n.$$typeof&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}(t)?o.default.createElement(n,e):n:null;var t}var C={sum:function(n,e){return e.reduce((function(n,e){return n+("number"==typeof e?e:0)}),0)},min:function(n,e){for(var t,r,o=a(e);!(r=o()).done;){var u=r.value;null!=u&&(t>u||void 0===t&&u>=u)&&(t=u)}return t},max:function(n,e){for(var t,r,o=a(e);!(r=o()).done;){var u=r.value;null!=u&&(t<u||void 0===t&&u>=u)&&(t=u)}return t},extent:function(n,e){for(var t,r,o,u=a(e);!(o=u()).done;){var l=o.value;null!=l&&(void 0===t?l>=l&&(t=r=l):(t>l&&(t=l),r<l&&(r=l)))}return[t,r]},mean:function(n){for(var e,t=0,r=0,o=a(n);!(e=o()).done;){var u=e.value;null!=u&&(u=+u)>=u&&(++t,r+=u)}return t?r/t:void 0},median:function(n){if(!n.length)return;var e=0,t=0;return n.forEach((function(n){"number"==typeof n&&(e=Math.min(e,n),t=Math.max(t,n))})),(e+t)/2},unique:function(n){return Array.from(new Set(n).values())},uniqueCount:function(n){return new Set(n).size},count:function(n){return n.length}};function w(n){return{setColumnOrder:function(e){return null==n.options.onColumnOrderChange?void 0:n.options.onColumnOrderChange(e,g(e,n.getState().columnOrder))},resetColumnOrder:function(){var e;n.setColumnOrder(null!=(e=n.initialState.columnOrder)?e:[])},getOrderColumnsFn:m((function(){return[n.getState().columnOrder,n.getState().grouping,n.options.groupedColumnMode]}),(function(n,e,t){return function(r){var o=[];if(null!=n&&n.length){for(var u=[].concat(n),l=[].concat(r),i=function(){var n=u.shift(),e=l.findIndex((function(e){return e.id===n}));e>-1&&o.push(l.splice(e,1)[0])};l.length&&u.length;)i();o=[].concat(o,l)}else o=r;return function(n,e,t){if(null==e||!e.length||!t)return n;var r=n.filter((function(n){return!e.includes(n.id)}));if("remove"===t)return r;var o=e.map((function(e){return n.find((function(n){return n.id===e}))})).filter(Boolean);return[].concat(o,r)}(o,e,t)}}),"getOrderColumnsFn",n.options.debug)}}function b(n,e,t,r){var o,u,l=0;!function n(e,t){void 0===t&&(t=1),l=Math.max(l,t),e.filter((function(n){return n.getIsVisible()})).forEach((function(e){var r;null!=(r=e.columns)&&r.length&&n(e.columns,t+1)}),0)}(n);var i=[];!function n(e,o){var u={depth:o,id:[r,""+o].filter(Boolean).join("_"),headers:[],getHeaderGroupProps:function(n){return t.getHeaderGroupProps(""+o,n)},getFooterGroupProps:function(n){return t.getFooterGroupProps(""+o,n)}},l=[];e.forEach((function(n){var e,i=[].concat(l).reverse()[0],a=!1;n.column.depth===u.depth&&n.column.parent?e=n.column.parent:(e=n.column,a=!0);var s=t.createHeader(e,{id:[r,o,e.id,null==n?void 0:n.id].filter(Boolean).join("_"),isPlaceholder:a,placeholderId:a?""+l.filter((function(n){return n.column===e})).length:void 0,depth:o});i&&i.column===s.column?i.subHeaders.push(n):(s.subHeaders.push(n),l.push(s)),u.headers.push(n)})),i.push(u),o>0&&n(l,o-1)}(e.map((function(n){return t.createHeader(n,{depth:l})})),l-1),i.reverse();return function n(e){return e.filter((function(n){return n.column.getIsVisible()})).map((function(e){var t=0,r=0,o=[0];return e.subHeaders&&e.subHeaders.length?(o=[],n(e.subHeaders).forEach((function(n){var e=n.colSpan,r=n.rowSpan;t+=e,o.push(r)}))):t=1,r+=Math.min.apply(Math,o),e.colSpan=t>0?t:void 0,e.rowSpan=r>0?r:void 0,{colSpan:t,rowSpan:r}}))}(null!=(o=null==(u=i[0])?void 0:u.headers)?o:[]),i}var h={includesString:R,includesStringSensitive:F,equalsString:y,equalsStringSensitive:S,arrIncludes:I,arrIncludesAll:G,equals:E,weakEquals:x,betweenNumberRange:P};function R(n,e,t){var r=String(t).toLowerCase();return n=n.filter((function(n){return e.some((function(e){return String(n.values[e]).toLowerCase().includes(r)}))}))}function F(n,e,t){var r=String(t);return n=n.filter((function(n){return e.some((function(e){return String(n.values[e]).includes(r)}))}))}function y(n,e,t){var r=String(t).toLowerCase();return n.filter((function(n){return e.some((function(e){var t=n.values[e];return void 0===t||String(t).toLowerCase()===r}))}))}function S(n,e,t){var r=String(t);return n.filter((function(n){return e.some((function(e){var t=n.values[e];return void 0===t||String(t)===r}))}))}function I(n,e,t){return n.filter((function(n){return e.some((function(e){return n.values[e].includes(t)}))}))}function G(n,e,t){return n.filter((function(n){return e.some((function(e){var r=n.values[e];return r&&r.length&&t.every((function(n){return r.includes(n)}))}))}))}function E(n,e,t){return n.filter((function(n){return e.some((function(e){return n.values[e]===t}))}))}function x(n,e,t){return n.filter((function(n){return e.some((function(e){return n.values[e]==t}))}))}function P(n,e,t){var r=t||[],o=r[0],u=r[1],l="number"!=typeof o?parseFloat(o):o,i="number"!=typeof u?parseFloat(u):u,a=null===o||Number.isNaN(l)?-1/0:l,s=null===u||Number.isNaN(i)?1/0:i;if(a>s){var g=a;a=s,s=g}return n.filter((function(n){return e.some((function(e){var t=n.values[e];return t>=a&&t<=s}))}))}function M(n){return null==n||""===n}function V(n,e,t){return!(!n||!n.autoRemove)&&n.autoRemove(e,t)||void 0===e||"string"==typeof e&&!e}R.autoRemove=function(n){return M(n)},F.autoRemove=function(n){return M(n)},y.autoRemove=function(n){return M(n)},S.autoRemove=function(n){return M(n)},I.autoRemove=function(n){return M(n)||!(null!=n&&n.length)},G.autoRemove=function(n){return M(n)||!(null!=n&&n.length)},E.autoRemove=function(n){return M(n)},x.autoRemove=function(n){return M(n)},P.autoRemove=function(n){return M(n)||M(n[0])&&M(n[1])};var A=/([0-9]+)/gm,H={alphanumeric:function(n,e,t){return T(B(n.values[t]).toLowerCase(),B(e.values[t]).toLowerCase())},alphanumericCaseSensitive:function(n,e,t){return T(B(n.values[t]),B(e.values[t]))},text:function(n,e,t){return L(B(n.values[t]).toLowerCase(),B(e.values[t]).toLowerCase())},textCaseSensitive:function(n,e,t){return L(B(n.values[t]),B(e.values[t]))},datetime:function(n,e,t){return L(n.values[t].getTime(),e.values[t].getTime())},basic:function(n,e,t){return L(n.values[t],e.values[t])}};function T(n,e){for(var t=n.split(A).filter(Boolean),r=e.split(A).filter(Boolean);t.length&&r.length;){var o=t.shift(),u=r.shift(),l=parseInt(o,10),i=parseInt(u,10),a=[l,i].sort();if(isNaN(a[0])){if(o>u)return 1;if(u>o)return-1}else{if(isNaN(a[1]))return isNaN(l)?-1:1;if(l>i)return 1;if(i>l)return-1}}return t.length-r.length}function L(n,e){return n===e?0:n>e?1:-1}function B(n){return"number"==typeof n?isNaN(n)||n===1/0||n===-1/0?"":String(n):"string"==typeof n?n:""}function O(n){return{setExpanded:function(e){return null==n.options.onExpandedChange?void 0:n.options.onExpandedChange(e,g(e,n.getState().expanded))},toggleRowExpanded:function(e,t){e&&n.setExpanded((function(r){var o,u;void 0===r&&(r={});var i,a=!0===r||!(null==(o=r)||!o[e]),g={};if(!0===r?Object.keys(n.getRowsById()).forEach((function(n){g[n]=!0})):g=r,t=null!=(u=t)?u:!a,!a&&t)return l({},g,((i={})[e]=!0,i));if(a&&!t){var d=g;return d[e],function(n,e){if(null==n)return{};var t,r,o={},u=Object.keys(n);for(r=0;r<u.length;r++)t=u[r],e.indexOf(t)>=0||(o[t]=n[t]);return o}(d,[e].map(s))}return r}))},toggleAllRowsExpanded:function(e){(null!=e?e:!n.getIsAllRowsExpanded())?n.setExpanded(!0):n.setExpanded({})},resetExpanded:function(){var e,t,r;n.setExpanded(null!=(e=null==(t=n.options)||null==(r=t.initialState)?void 0:r.expanded)?e:{})},getIsRowExpanded:function(e){var t,r=n.getRow(e);if(!r)throw new Error;var o=n.getState().expanded;return!!(null!=(t=null==n.options.getIsRowExpanded?void 0:n.options.getIsRowExpanded(r))?t:o||(null==o?void 0:o[e]))},getRowCanExpand:function(e){var t,r,o,u,l=n.getRow(e);if(!l)throw new Error;return null!=(t=null!=(r=null!=(o=null==n.options.getRowCanExpand?void 0:n.options.getRowCanExpand(l))?o:n.options.enableExpanded)?r:n.options.defaultCanExpand)?t:!(null==(u=l.subRows)||!u.length)},getToggleExpandedProps:function(e,t){if(n.getRow(e)){var r=n.getRowCanExpand(e);return p({title:r?"Toggle Expanded":void 0,onClick:r?function(t){t.persist(),n.toggleRowExpanded(e)}:void 0},t)}},getToggleAllRowsExpandedProps:function(e){return p({title:"Toggle All Expanded",onClick:function(e){e.persist(),n.toggleAllRowsExpanded()}},e)},getIsAllRowsExpanded:function(){return!0===n.getState().expanded||!Object.keys(n.getRowsById()).some((function(e){return!n.getIsRowExpanded(e)}))},getExpandedDepth:function(){var e=0;return(!0===n.getState().expanded?Object.keys(n.getRowsById()):Object.keys(n.getState().expanded)).forEach((function(n){var t=n.split(".");e=Math.max(e,t.length)})),e},getExpandedRowModel:m((function(){return[n.getState().expanded,n.getGroupedRowModel(),n.options.expandRowsFn,n.options.paginateExpandedRows]}),(function(e,t,r,o){return r&&o&&Object.keys(null!=e?e:{}).length?r(n,e,t):t}),"getExpandedRowModel",n.options.debug),getPreExpandedRows:function(){return n.getGroupedRowModel().rows},getPreExpandedFlatRows:function(){return n.getGroupedRowModel().flatRows},getPreExpandedRowsById:function(){return n.getGroupedRowModel().rowsById},getExpandedRows:function(){return n.getExpandedRowModel().rows},getExpandedFlatRows:function(){return n.getExpandedRowModel().flatRows},getExpandedRowsById:function(){return n.getExpandedRowModel().rowsById}}}function j(n,e){var t,r={},o=l({},function(n){return{onColumnVisibilityChange:d("columnVisibility",n)}}(r),function(n){return{onColumnOrderChange:d("columnOrder",n)}}(r),function(n){return{onColumnPinningChange:d("columnPinning",n)}}(r),function(n){return{onColumnFiltersChange:d("columnFilters",n),onGlobalFilterChange:d("globalFilter",n),autoResetColumnFilters:!0,filterFromChildrenUp:!0,autoResetGlobalFilter:!0,globalFilterType:"auto",getColumnCanGlobalFilterFn:function(e){var t,r;return"string"==typeof(null==(t=n.getCoreFlatRows()[0])||null==(r=t.getAllCellsByColumnId()[e.id])?void 0:r.value)}}}(r),function(n){return{onSortingChange:d("sorting",n),autoResetSorting:!0}}(r),function(n){return{onGroupingChange:d("grouping",n),autoResetGrouping:!0,groupedColumnMode:"reorder"}}(r),function(n){return{onExpandedChange:d("expanded",n),autoResetExpanded:!0,getIsRowExpanded:function(n){return!!(null==n?void 0:n.original).expanded},expandSubRows:!0,paginateExpandedRows:!0}}(r)),u={},i=function(n){return l({state:u},o,n)};r.options=i(n);var a=l({},{columnVisibility:{}},{columnOrder:[]},{columnPinning:{left:[],right:[]}},{columnFilters:[],globalFilter:void 0},{sorting:[]},{grouping:[]},{expanded:{}},null!=(t=n.initialState)?t:{}),s=l({},r,function(n){return{getVisibleFlatColumns:m((function(){return[n.getAllFlatColumns(),n.getAllFlatColumns().filter((function(n){return null==n.getIsVisible?void 0:n.getIsVisible()})).map((function(n){return n.id})).join("_")]}),(function(n){return n.filter((function(n){return null==n.getIsVisible?void 0:n.getIsVisible()}))}),"getVisibleFlatColumns",n.options.debug),getVisibleLeafColumns:m((function(){return[n.getAllLeafColumns(),n.getAllLeafColumns().filter((function(n){return null==n.getIsVisible?void 0:n.getIsVisible()})).map((function(n){return n.id})).join("_")]}),(function(n){return n.filter((function(n){return null==n.getIsVisible?void 0:n.getIsVisible()}))}),"getVisibleLeafColumns",n.options.debug),setColumnVisibility:function(e){return null==n.options.onColumnVisibilityChange?void 0:n.options.onColumnVisibilityChange(e,g(e,n.getState().columnVisibility))},toggleColumnVisibility:function(e,t){e&&n.getColumnCanHide(e)&&n.setColumnVisibility((function(r){var o;return l({},r,((o={})[e]=null!=t?t:!n.getColumnIsVisible(e),o))}))},toggleAllColumnsVisible:function(e){var t;e=null!=(t=e)?t:!n.getIsAllColumnsVisible(),n.setColumnVisibility(n.getAllLeafColumns().reduce((function(n,t){var r;return l({},n,((r={})[t.id]=e||!(null!=t.getCanHide&&t.getCanHide()),r))}),{}))},getColumnIsVisible:function(e){var t,r,o,u=n.getColumn(e);if(!u)throw new Error;return null==(t=null!=(r=null==(o=n.getState().columnVisibility)?void 0:o[e])?r:u.defaultIsVisible)||t},getColumnCanHide:function(e){var t,r,o,u=n.getColumn(e);if(!u)throw new Error;return null==(t=null!=(r=null!=(o=n.options.enableHiding)?o:u.enableHiding)?r:u.defaultCanHide)||t},getIsAllColumnsVisible:function(){return!n.getAllLeafColumns().some((function(n){return!(null!=n.getIsVisible&&n.getIsVisible())}))},getIsSomeColumnsVisible:function(){return n.getAllLeafColumns().some((function(n){return null==n.getIsVisible?void 0:n.getIsVisible()}))},getToggleAllColumnsVisibilityProps:function(e){var t={onChange:function(e){var t;n.toggleAllColumnsVisible(null==(t=e.target)?void 0:t.checked)},type:"checkbox",title:"Toggle visibility for all columns",checked:n.getIsAllColumnsVisible(),indeterminate:!n.getIsAllColumnsVisible()&&n.getIsSomeColumnsVisible()?"indeterminate":void 0};return p(t,e)}}}(r),w(r),function(n){return{setColumnPinning:function(e){return null==n.options.onColumnPinningChange?void 0:n.options.onColumnPinningChange(e,g(e,n.getState().columnPinning))},resetColumnPinning:function(){var e,t;return n.setColumnPinning(null!=(e=null==(t=n.options.initialState)?void 0:t.columnPinning)?e:{})},pinColumn:function(e,t){var r=n.getColumn(e),o=null==r?void 0:r.getLeafColumns().map((function(n){return n.id})).filter(Boolean);n.setColumnPinning((function(n){var e,r,u,l,i,a;return"right"===t?{left:(null!=(u=null==n?void 0:n.left)?u:[]).filter((function(n){return!(null!=o&&o.includes(n))})),right:[].concat((null!=(l=null==n?void 0:n.right)?l:[]).filter((function(n){return!(null!=o&&o.includes(n))})),o)}:"left"===t?{left:[].concat((null!=(i=null==n?void 0:n.left)?i:[]).filter((function(n){return!(null!=o&&o.includes(n))})),o),right:(null!=(a=null==n?void 0:n.right)?a:[]).filter((function(n){return!(null!=o&&o.includes(n))}))}:{left:(null!=(e=null==n?void 0:n.left)?e:[]).filter((function(n){return!(null!=o&&o.includes(n))})),right:(null!=(r=null==n?void 0:n.right)?r:[]).filter((function(n){return!(null!=o&&o.includes(n))}))}}))},getColumnCanPin:function(e){var t=n.getColumn(e);if(!t)throw new Error;return t.getLeafColumns().some((function(e){var t,r,o;return null!=(t=null!=(r=null!=(o=e.enablePinning)?o:n.options.enablePinning)?r:e.defaultCanPin)?t:!!e.accessorFn}))},getColumnIsPinned:function(e){var t=n.getColumn(e);if(!t)throw new Error;var r=t.getLeafColumns().map((function(n){return n.id})),o=n.getState().columnPinning,u=o.left,l=o.right,i=r.some((function(n){return null==u?void 0:u.includes(n)})),a=r.some((function(n){return null==l?void 0:l.includes(n)}));return i&&a?"both":i?"left":!!a&&"right"},getColumnPinnedIndex:function(e){var t,r,o,u=n.getColumnIsPinned(e);if("both"===u)throw new Error;return u?null!=(t=null==(r=n.getState().columnPinning)||null==(o=r[u])?void 0:o.indexOf(e))?t:-1:0}}}(r),function(n){return{createHeader:function(e,t){var r,o={id:null!=(r=t.id)?r:e.id,column:e,isPlaceholder:t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,getWidth:function(){var n=0;return function e(t){var r;t.subHeaders.length?t.subHeaders.forEach(e):n+=null!=(r=t.column.getWidth())?r:0}(o),n},getLeafHeaders:function(){var n=[];return function e(t){t.subHeaders&&t.subHeaders.length&&t.subHeaders.map(e),n.push(t)}(o),n},getHeaderProps:function(e){return n.getHeaderProps(o.id,e)},getFooterProps:function(e){return n.getFooterProps(o.id,e)},renderHeader:function(){return v(e.header,{header:o,column:e})},renderFooter:function(){return v(e.footer,{header:o,column:e})}};return o},getHeaderGroups:m((function(){return[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right]}),(function(e,t,r,o){var u=t.filter((function(n){return null==r?void 0:r.includes(n.id)})),l=t.filter((function(n){return null==o?void 0:o.includes(n.id)})),i=t.filter((function(n){return!(null!=r&&r.includes(n.id)||null!=o&&o.includes(n.id))}));return b(e,[].concat(u,i,l),n)}),"getHeaderGroups",n.options.debug),getCenterHeaderGroups:m((function(){return[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right]}),(function(e,t,r,o){return b(e,t=t.filter((function(n){return!(null!=r&&r.includes(n.id)||null!=o&&o.includes(n.id))})),n,"center")}),"getCenterHeaderGroups",n.options.debug),getLeftHeaderGroups:m((function(){return[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left]}),(function(e,t,r){return b(e,t=t.filter((function(n){return null==r?void 0:r.includes(n.id)})),n,"left")}),"getLeftHeaderGroups",n.options.debug),getRightHeaderGroups:m((function(){return[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right]}),(function(e,t,r){return b(e,t=t.filter((function(n){return null==r?void 0:r.includes(n.id)})),n,"right")}),"getRightHeaderGroups",n.options.debug),getFooterGroups:m((function(){return[n.getHeaderGroups()]}),(function(n){return[].concat(n).reverse()}),"getFooterGroups",n.options.debug),getLeftFooterGroups:m((function(){return[n.getLeftHeaderGroups()]}),(function(n){return[].concat(n).reverse()}),"getLeftFooterGroups",n.options.debug),getCenterFooterGroups:m((function(){return[n.getCenterHeaderGroups()]}),(function(n){return[].concat(n).reverse()}),"getCenterFooterGroups",n.options.debug),getRightFooterGroups:m((function(){return[n.getRightHeaderGroups()]}),(function(n){return[].concat(n).reverse()}),"getRightFooterGroups",n.options.debug),getFlatHeaders:m((function(){return[n.getHeaderGroups()]}),(function(n){return n.map((function(n){return n.headers})).flat()}),"getFlatHeaders",n.options.debug),getLeftFlatHeaders:m((function(){return[n.getLeftHeaderGroups()]}),(function(n){return n.map((function(n){return n.headers})).flat()}),"getLeftFlatHeaders",n.options.debug),getCenterFlatHeaders:m((function(){return[n.getCenterHeaderGroups()]}),(function(n){return n.map((function(n){return n.headers})).flat()}),"getCenterFlatHeaders",n.options.debug),getRightFlatHeaders:m((function(){return[n.getRightHeaderGroups()]}),(function(n){return n.map((function(n){return n.headers})).flat()}),"getRightFlatHeaders",n.options.debug),getCenterLeafHeaders:m((function(){return[n.getCenterFlatHeaders()]}),(function(n){return n.filter((function(n){var e;return!(null!=(e=n.subHeaders)&&e.length)}))}),"getCenterLeafHeaders",n.options.debug),getLeftLeafHeaders:m((function(){return[n.getLeftFlatHeaders()]}),(function(n){return n.filter((function(n){var e;return!(null!=(e=n.subHeaders)&&e.length)}))}),"getLeftLeafHeaders",n.options.debug),getRightLeafHeaders:m((function(){return[n.getRightFlatHeaders()]}),(function(n){return n.filter((function(n){var e;return!(null!=(e=n.subHeaders)&&e.length)}))}),"getRightLeafHeaders",n.options.debug),getLeafHeaders:m((function(){return[n.getLeftHeaderGroups(),n.getCenterHeaderGroups(),n.getRightHeaderGroups()]}),(function(n,e,t){var r,o,u,l,i,a;return[].concat(null!=(r=null==(o=n[0])?void 0:o.headers)?r:[],null!=(u=null==(l=e[0])?void 0:l.headers)?u:[],null!=(i=null==(a=t[0])?void 0:a.headers)?i:[]).map((function(n){return n.getLeafHeaders()})).flat()}),"getLeafHeaders",n.options.debug),getHeader:function(e){var t=[].concat(n.getFlatHeaders(),n.getCenterFlatHeaders(),n.getLeftFlatHeaders(),n.getRightFlatHeaders()).find((function(n){return n.id===e}));if(!t)throw new Error;return t},getHeaderGroupProps:function(e,t){var r=n.getHeaderGroups().find((function(n){return n.id===e}));if(r)return p({key:r.id,role:"row"},t)},getFooterGroupProps:function(e,t){var r=n.getFooterGroups().find((function(n){return n.id===e}));if(r){var o={key:r.id,role:"row"};return p(o,t)}},getHeaderProps:function(e,t){var r=n.getHeader(e);if(!r)throw new Error;var o={key:r.id,role:"columnheader",colSpan:r.colSpan,rowSpan:r.rowSpan};return p(o,t)},getFooterProps:function(e,t){var r=n.getHeader(e);if(r){var o={key:r.id,role:"columnfooter",colSpan:r.colSpan,rowSpan:r.rowSpan};return p(o,t)}},getTotalWidth:function(){var e=0;return n.getVisibleLeafColumns().forEach((function(n){var t;e+=null!=(t=n.getWidth())?t:0})),e}}}(r),function(n){return{getColumnAutoFilterFn:function(e){var t=n.getCoreFlatRows()[0],r=null==t?void 0:t.values[e];return"string"==typeof r?h.includesString:"number"==typeof r?h.betweenNumberRange:null!==r&&"object"==typeof r?h.equals:Array.isArray(r)?h.arrIncludes:h.weakEquals},getGlobalAutoFilterFn:function(){return h.includesString},getColumnFilterFn:function(e){var t,r=n.getColumn(e),o=n.options.filterTypes;if(!r)throw new Error;return f(r.filterType)?r.filterType:"auto"===r.filterType?n.getColumnAutoFilterFn(e):null!=(t=null==o?void 0:o[r.filterType])?t:h[r.filterType]},getGlobalFilterFn:function(){var e,t=n.options,r=t.filterTypes,o=t.globalFilterType;return f(o)?o:"auto"===o?n.getGlobalAutoFilterFn():null!=(e=null==r?void 0:r[o])?e:h[o]},setColumnFilters:function(e){var t=n.getAllLeafColumns(),r=function(r){var o;return null==(o=g(e,r))?void 0:o.filter((function(e){var r=t.find((function(n){return n.id===e.id}));return!r||!V(n.getColumnFilterFn(r.id),e.value,r)}))};null==n.options.onColumnFiltersChange||n.options.onColumnFiltersChange(r,r(n.getState().columnFilters))},setGlobalFilter:function(e){null==n.options.onGlobalFilterChange||n.options.onGlobalFilterChange(e,g(e,n.getState().globalFilter))},resetGlobalFilter:function(){n.setGlobalFilter(void 0)},getColumnCanColumnFilter:function(e){var t,r,o,u,l,i,a=n.getColumn(e);if(!a)throw new Error;return null!=(t=null!=(r=null!=(o=null!=(u=null!=(l=null!=(i=a.enableAllFilters)?i:a.enableColumnFilter)?l:n.options.enableFilters)?u:n.options.enableColumnFilters)?o:a.defaultCanFilter)?r:a.defaultCanColumnFilter)?t:!!a.accessorFn},getColumnCanGlobalFilter:function(e){var t,r,o,u,l,i,a,s=n.getColumn(e);if(!s)throw new Error;return null==(t=(null!=(r=null!=(o=null!=(u=null!=(l=null!=(i=null!=(a=n.options.enableFilters)?a:n.options.enableGlobalFilter)?i:s.enableAllFilters)?l:s.enableGlobalFilter)?u:s.defaultCanFilter)?o:s.defaultCanGlobalFilter)?r:!!s.accessorFn)&&(null==n.options.getColumnCanGlobalFilterFn?void 0:n.options.getColumnCanGlobalFilterFn(s)))||t},getColumnIsFiltered:function(e){return n.getColumnFilterIndex(e)>-1},getColumnFilterValue:function(e){var t,r;return null==(t=n.getState().columnFilters)||null==(r=t.find((function(n){return n.id===e})))?void 0:r.value},getColumnFilterIndex:function(e){var t,r;return null!=(t=null==(r=n.getState().columnFilters)?void 0:r.findIndex((function(n){return n.id===e})))?t:-1},setColumnFilterValue:function(e,t){e&&n.setColumnFilters((function(r){var o=n.getColumn(e);if(!o)throw new Error;var u,l=n.getColumnFilterFn(o.id),i=null==r?void 0:r.find((function(n){return n.id===e})),a=g(t,i?i.value:void 0);if(V(l,a,o))return null!=(u=null==r?void 0:r.filter((function(n){return n.id!==e})))?u:[];var s,d={id:e,value:a};return i?null!=(s=null==r?void 0:r.map((function(n){return n.id===e?d:n})))?s:[]:null!=r&&r.length?[].concat(r,[d]):[d]}))},resetColumnFilters:function(){var e,t,r;n.setColumnFilters(null!=(e=null==(t=n.options)||null==(r=t.initialState)?void 0:r.columnFilters)?e:[])},getColumnFilteredRowModel:m((function(){return[n.getState().columnFilters,n.getCoreRowModel(),n.options.columnFilterRowsFn]}),(function(e,t,r){var o=null!=e&&e.length&&r?r(n,e,t):t;return n.getAllLeafColumns().filter((function(e){var t;return!(null!=(t=n.getState().columnFilters)&&t.find((function(n){return n.id===e.id})))})).forEach((function(n){n.getPreFilteredRows=function(){return o.rows}})),o}),"getColumnFilteredRowModel",n.options.debug),getPreColumnFilteredRows:function(){return n.getCoreRowModel().rows},getPreColumnFilteredFlatRows:function(){return n.getCoreRowModel().flatRows},getPreColumnFilteredRowsById:function(){return n.getCoreRowModel().rowsById},getColumnFilteredRows:function(){return n.getColumnFilteredRowModel().rows},getColumnFilteredFlatRows:function(){return n.getColumnFilteredRowModel().flatRows},getColumnFilteredRowsById:function(){return n.getColumnFilteredRowModel().rowsById},getGlobalFilteredRowModel:m((function(){return[n.getState().globalFilter,n.getColumnFilteredRowModel(),n.options.globalFilterRowsFn]}),(function(e,t,r){var o=r&&e?r(n,e,t):t;return n.getAllLeafColumns().filter((function(e){var t;return!(null!=(t=n.getState().columnFilters)&&t.find((function(n){return n.id===e.id})))})).forEach((function(n){n.getPreFilteredRows=function(){return o.rows}})),o}),"getGlobalFilteredRowModel",n.options.debug),getPreGlobalFilteredRows:function(){return n.getColumnFilteredRowModel().rows},getPreGlobalFilteredFlatRows:function(){return n.getColumnFilteredRowModel().flatRows},getPreGlobalFilteredRowsById:function(){return n.getColumnFilteredRowModel().rowsById},getGlobalFilteredRows:function(){return n.getGlobalFilteredRowModel().rows},getGlobalFilteredFlatRows:function(){return n.getGlobalFilteredRowModel().flatRows},getGlobalFilteredRowsById:function(){return n.getGlobalFilteredRowModel().rowsById}}}(r),function(n){return{getColumnAutoSortingFn:function(e){var t=n.getGlobalFilteredRowModel().flatRows[0],r=null==t?void 0:t.values[e];return"string"==typeof r?H.alphanumeric:"[object Date]"===Object.prototype.toString.call(r)?H.datetime:H.basic},getColumnSortingFn:function(e){var t,r=n.getColumn(e),o=n.options.sortTypes;if(!r)throw new Error;return f(r.sortType)?r.sortType:"auto"===r.sortType?n.getColumnAutoFilterFn(e):null!=(t=null==o?void 0:o[r.sortType])?t:H[r.sortType]},setSorting:function(e){return null==n.options.onSortingChange?void 0:n.options.onSortingChange(e,g(e,n.getState().sorting))},toggleColumnSorting:function(e,t,r){var o=n.getColumn(e);if(!o)throw new Error;n.setSorting((function(u){var i,a,s,g,d=null==u?void 0:u.find((function(n){return n.id===e})),f=null==u?void 0:u.findIndex((function(n){return n.id===e})),c=null!=t,p=[];g=!o.getCanMultiSort()&&r?d?"toggle":"add":null!=u&&u.length&&f!==u.length-1?"replace":d?"toggle":"replace";var m=null!=(i=o.sortDescFirst)?i:n.options.sortDescFirst;if("toggle"!==g||null!=(a=n.options.enableSortingRemoval)&&!a||c||r&&null!=(s=n.options.enableMultiRemove)&&!s||(null!=d&&d.desc?m:!m)||(g="remove"),"replace"===g)p=[{id:e,desc:c?t:!!m}];else if("add"===g&&null!=u&&u.length){var v;(p=[].concat(u,[{id:e,desc:c?t:!!m}])).splice(0,p.length-(null!=(v=n.options.maxMultiSortColCount)?v:Number.MAX_SAFE_INTEGER))}else"toggle"===g&&null!=u&&u.length?p=u.map((function(n){return n.id===e?l({},n,{desc:c?t:!(null!=d&&d.desc)}):n})):"remove"===g&&null!=u&&u.length&&(p=u.filter((function(n){return n.id!==e})));return p}))},getColumnCanSort:function(e){var t,r,o,u=n.getColumn(e);if(!u)throw new Error;return null!=(t=null!=(r=null!=(o=u.enableSorting)?o:n.options.enableSorting)?r:u.defaultCanSort)?t:!!u.accessorFn},getColumnCanMultiSort:function(e){var t,r,o=n.getColumn(e);if(!o)throw new Error;return null!=(t=null!=(r=o.enableMultiSort)?r:n.options.enableMultiSort)?t:!!o.accessorFn},getColumnIsSorted:function(e){var t,r=null==(t=n.getState().sorting)?void 0:t.find((function(n){return n.id===e}));return!!r&&(r.desc?"desc":"asc")},getColumnSortIndex:function(e){var t,r;return null!=(t=null==(r=n.getState().sorting)?void 0:r.findIndex((function(n){return n.id===e})))?t:-1},resetSorting:function(){var e,t,r;n.setSorting(null!=(e=null==(t=n.options)||null==(r=t.initialState)?void 0:r.sorting)?e:[])},getToggleSortingProps:function(e,t){var r=n.getColumn(e);if(!r)throw new Error;var o=r.getCanSort();return p({title:o?"Toggle Sorting":void 0,onClick:o?function(e){e.persist(),null==r.toggleSorting||r.toggleSorting(void 0,!!r.getCanMultiSort()&&(null==n.options.isMultiSortEvent?void 0:n.options.isMultiSortEvent(e)))}:void 0},t)},getSortedRowModel:m((function(){return[n.getState().sorting,n.getGlobalFilteredRowModel(),n.options.sortRowsFn]}),(function(e,t,r){return r&&null!=e&&e.length?r(n,e,t):t}),"getSortedRowModel",n.options.debug),getPreSortedRows:function(){return n.getGlobalFilteredRowModel().rows},getPreSortedFlatRows:function(){return n.getGlobalFilteredRowModel().flatRows},getPreSortedRowsById:function(){return n.getGlobalFilteredRowModel().rowsById},getSortedRows:function(){return n.getSortedRowModel().rows},getSortedFlatRows:function(){return n.getSortedRowModel().flatRows},getSortedRowsById:function(){return n.getSortedRowModel().rowsById}}}(r),function(n){return{getColumnAutoAggregationFn:function(e){var t=n.getCoreFlatRows()[0],r=null==t?void 0:t.values[e];return"number"==typeof r?C.sum:"[object Date]"===Object.prototype.toString.call(r)?C.extent:C.count},getColumnAggregationFn:function(e){var t,r=n.getColumn(e),o=n.options.aggregationTypes;if(!r)throw new Error;return f(r.aggregationType)?r.aggregationType:"auto"===r.aggregationType?n.getColumnAutoFilterFn(e):null!=(t=null==o?void 0:o[r.aggregationType])?t:C[r.aggregationType]},setGrouping:function(e){return null==n.options.onGroupingChange?void 0:n.options.onGroupingChange(e,g(e,n.getState().grouping))},toggleColumnGrouping:function(e){n.setGrouping((function(n){return null!=n&&n.includes(e)?n.filter((function(n){return n!==e})):[].concat(null!=n?n:[],[e])}))},getColumnCanGroup:function(e){var t,r,o,u=n.getColumn(e);if(!u)throw new Error;return null!=(t=null!=(r=null!=(o=u.enableGrouping)?o:n.options.enableGrouping)?r:u.defaultCanGroup)?t:!!u.accessorFn},getColumnIsGrouped:function(e){var t;return null==(t=n.getState().grouping)?void 0:t.includes(e)},getColumnGroupedIndex:function(e){var t;return null==(t=n.getState().grouping)?void 0:t.indexOf(e)},resetGrouping:function(){var e,t,r;n.setGrouping(null!=(e=null==(t=n.options)||null==(r=t.initialState)?void 0:r.grouping)?e:[])},getToggleGroupingProps:function(e,t){var r=n.getColumn(e);if(r){var o=r.getCanGroup();return p({title:o?"Toggle Grouping":void 0,onClick:o?function(n){n.persist(),null==r.toggleGrouping||r.toggleGrouping()}:void 0},t)}},getRowIsGrouped:function(e){var t;return!(null==(t=n.getRow(e))||!t.groupingColumnId)},getGroupedRowModel:m((function(){return[n.getState().grouping,n.getSortedRowModel(),n.options.groupRowsFn]}),(function(e,t,r){return r&&e.length?r(n,e,t):t}),"getGroupedRowModel",n.options.debug),getPreGroupedRows:function(){return n.getSortedRowModel().rows},getPreGroupedFlatRows:function(){return n.getSortedRowModel().flatRows},getPreGroupedRowsById:function(){return n.getSortedRowModel().rowsById},getGroupedRows:function(){return n.getGroupedRowModel().rows},getGroupedFlatRows:function(){return n.getGroupedRowModel().flatRows},getGroupedRowsById:function(){return n.getGroupedRowModel().rowsById}}}(r),O(r),{rerender:e,initialState:a,internalState:a,reset:function(){r.setState(r.initialState)},updateOptions:function(n){r.options=i(n)},getRowId:function(n,e,t){return""+(t?[t.id,e].join("."):e)},getState:function(){return l({},r.internalState,r.options.state)},setState:function(n,e){void 0===e&&(e=!0);var t=g(n,r.internalState),o=r.options.onStateChange;r.internalState=t,o?o(t):e&&r.rerender()},getDefaultColumn:m((function(){return[r.options.defaultColumn]}),(function(n){var e;return l({header:function(n){return n.header.column.id},footer:function(n){return n.header.column.id},cell:function(n){var e=n.value,t=void 0===e?"":e;return"boolean"==typeof t?t.toString():t}},{defaultIsVisible:!0},{filterType:"auto"},{sortType:"auto"},{aggregationType:"auto"},n=null!=(e=n)?e:{})}),"getDefaultColumn",r.options.debug),getColumnDefs:function(){return r.options.columns},createColumn:function(n,e,t){var o,u,i,a=r.getDefaultColumn(),s=null!=(o=null!=(u=n.id)?u:n.accessorKey)?o:"string"==typeof n.header?n.header:void 0;if(n.accessorFn?i=n.accessorFn:n.accessorKey&&(i=function(e){return e[n.accessorKey]}),!s)throw new Error;var g=l({width:150,minWidth:20,maxWidth:Number.MAX_SAFE_INTEGER},a,n,{id:""+s,accessorFn:i,parent:t,depth:e,columnDef:n,columns:[],getWidth:function(){return r.getColumnWidth(g.id)},getFlatColumns:m((function(){return[!0]}),(function(){var n;return[g].concat(null==(n=g.columns)?void 0:n.flatMap((function(n){return n.getFlatColumns()})))}),"column.getFlatColumns",r.options.debug),getLeafColumns:m((function(){return[r.getOrderColumnsFn()]}),(function(n){var e;if(null!=(e=g.columns)&&e.length){var t=g.columns.flatMap((function(n){return n.getLeafColumns()}));return n(t)}return[g]}),"column.getLeafColumns",r.options.debug)});return g=Object.assign(g,function(n,e){return{getCanHide:function(){return e.getColumnCanHide(n.id)},getIsVisible:function(){return e.getColumnIsVisible(n.id)},toggleVisibility:function(t){return e.toggleColumnVisibility(n.id,t)},getToggleVisibilityProps:function(e){var t={type:"checkbox",checked:null==n.getIsVisible?void 0:n.getIsVisible(),title:"Toggle Column Visibility",onChange:function(e){null==n.toggleVisibility||n.toggleVisibility(e.target.checked)}};return p(t,e)}}}(g,r),function(n,e){return{getCanPin:function(){return e.getColumnCanPin(n.id)},getPinnedIndex:function(){return e.getColumnPinnedIndex(n.id)},getIsPinned:function(){return e.getColumnIsPinned(n.id)},pin:function(t){return e.pinColumn(n.id,t)}}}(g,r),function(n,e){var t=m((function(){return[n.getPreFilteredRows()]}),(function(e){var t,r,o,u;void 0===e&&(e=[]);for(var l=new Map,i=[null!=(t=null==(r=e[0])?void 0:r.values[n.id])?t:null,null!=(o=null==(u=e[0])?void 0:u.values[n.id])?o:null],a=0;a<e.length;a++){var s,g,d=null==(s=e[a])?void 0:s.values[n.id];l.has(d)?l.set(d,(null!=(g=l.get(d))?g:0)+1):l.set(d,1),d<i[0]?i[0]=d:d>i[1]&&(i[1]=d)}return{preFilteredUniqueValues:l,preFilteredMinMaxValues:i}}),"column.getFacetInfo",e.options.debug);return{filterType:n.filterType,getCanColumnFilter:function(){return e.getColumnCanColumnFilter(n.id)},getCanGlobalFilter:function(){return e.getColumnCanGlobalFilter(n.id)},getColumnFilterIndex:function(){return e.getColumnFilterIndex(n.id)},getIsColumnFiltered:function(){return e.getColumnIsFiltered(n.id)},getColumnFilterValue:function(){return e.getColumnFilterValue(n.id)},setColumnFilterValue:function(t){return e.setColumnFilterValue(n.id,t)},getPreFilteredUniqueValues:function(){return t().preFilteredUniqueValues},getPreFilteredMinMaxValues:function(){return t().preFilteredMinMaxValues},getPreFilteredRows:function(){}}}(g,r),function(n,e){return{sortType:n.sortType,getCanSort:function(){return e.getColumnCanSort(n.id)},getCanMultiSort:function(){return e.getColumnCanMultiSort(n.id)},getSortIndex:function(){return e.getColumnSortIndex(n.id)},getIsSorted:function(){return e.getColumnIsSorted(n.id)},toggleSorting:function(t,r){return e.toggleColumnSorting(n.id,t,r)},getToggleSortingProps:function(t){return e.getToggleSortingProps(n.id,t)}}}(g,r),function(n,e){return{aggregationType:n.aggregationType,getCanGroup:function(){return e.getColumnCanGroup(n.id)},getGroupedIndex:function(){return e.getColumnGroupedIndex(n.id)},getIsGrouped:function(){return e.getColumnIsGrouped(n.id)},toggleGrouping:function(){return e.toggleColumnGrouping(n.id)},getToggleGroupingProps:function(t){return e.getToggleGroupingProps(n.id,t)}}}(g,r)),g},getAllColumns:m((function(){return[r.getColumnDefs()]}),(function(n){return function n(e,t,o){return void 0===o&&(o=0),e.map((function(e){var u=r.createColumn(e,o,t);return u.columns=e.columns?n(e.columns,u,o+1):[],u}))}(n)}),"getAllColumns",r.options.debug),getAllFlatColumns:m((function(){return[r.getAllColumns()]}),(function(n){return n.flatMap((function(n){return n.getFlatColumns()}))}),"getAllFlatColumns",r.options.debug),getAllFlatColumnsById:m((function(){return[r.getAllFlatColumns()]}),(function(n){return n.reduce((function(n,e){return n[e.id]=e,n}),{})}),"getAllFlatColumnsById",r.options.debug),getAllLeafColumns:m((function(){return[r.getAllColumns(),r.getOrderColumnsFn()]}),(function(n,e){return e(n.flatMap((function(n){return n.getLeafColumns()})))}),"getAllLeafColumns",r.options.debug),getColumn:function(n){var e=r.getAllFlatColumnsById()[n];if(!e)throw new Error;return e},getColumnWidth:function(n){var e,t,o,u=r.getColumn(n);if(!u)throw new Error;return Math.min(Math.max(null!=(e=u.minWidth)?e:0,null!=(t=u.width)?t:0),null!=(o=u.maxWidth)?o:0)},createCell:function(n,e,t){var o={id:n.id+"_"+e.id,rowId:n.id,columnId:e.id,row:n,column:e,value:t,getCellProps:function(t){return r.getCellProps(n.id,e.id,t)},renderCell:function(){return v(e.cell,{column:e,cell:o,value:t})}};return Object.assign(o,l({},function(n,e,t,r){return{getIsGrouped:function(){return e.getIsGrouped()&&e.id===t.groupingColumnId},getIsPlaceholder:function(){return!n.getIsGrouped()&&e.getIsGrouped()},getIsAggregated:function(){var e;return!n.getIsGrouped()&&!n.getIsPlaceholder()&&(null==(e=t.subRows)?void 0:e.length)>1}}}(o,e,n))),o},createRow:function(n,e,t,o,u){var l={id:n,index:t,original:e,depth:o,values:u,subRows:[],leafRows:[],getRowProps:function(n){return r.getRowProps(l.id,n)},getAllCells:void 0,getAllCellsByColumnId:void 0};return l.getAllCells=m((function(){return[r.getAllLeafColumns()]}),(function(n){return n.map((function(n){return r.createCell(l,n,l.values[n.id])}))}),"",r.options.debug),l.getAllCellsByColumnId=m((function(){return[l.getAllCells()]}),(function(n){return n.reduce((function(n,e){return n[e.columnId]=e,n}),{})}),"row.getAllCellsByColumnId",r.options.debug),l=Object.assign(l,function(n,e){return{_getAllVisibleCells:m((function(){return[n.getAllCells().filter((function(n){return n.column.getIsVisible()})).map((function(n){return n.id})).join("_")]}),(function(e){return n.getAllCells().filter((function(n){return n.column.getIsVisible()}))}),"row._getAllVisibleCells",e.options.debug),getVisibleCells:m((function(){return[n.getLeftVisibleCells(),n.getCenterVisibleCells(),n.getRightVisibleCells()]}),(function(n,e,t){return[].concat(n,e,t)}),"row.getVisibleCells",e.options.debug),getCenterVisibleCells:m((function(){return[n._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right]}),(function(n,e,t){var r=[].concat(null!=e?e:[],null!=t?t:[]);return n.filter((function(n){return!r.includes(n.columnId)}))}),"row.getCenterVisibleCells",e.options.debug),getLeftVisibleCells:m((function(){return[n._getAllVisibleCells(),e.getState().columnPinning.left,,]}),(function(n,e){return(null!=e?e:[]).map((function(e){return n.find((function(n){return n.columnId===e}))})).filter(Boolean)}),"row.getLeftVisibleCells",e.options.debug),getRightVisibleCells:m((function(){return[n._getAllVisibleCells(),e.getState().columnPinning.right]}),(function(n,e){return(null!=e?e:[]).map((function(e){return n.find((function(n){return n.columnId===e}))})).filter(Boolean)}),"row.getRightVisibleCells",e.options.debug)}}(l,r),function(n,e){return{getIsGrouped:function(){return e.getRowIsGrouped(n.id)}}}(l,r),function(n,e){return{toggleExpanded:function(t){e.toggleRowExpanded(n.id,t)},getIsExpanded:function(){return e.getIsRowExpanded(n.id)},getCanExpand:function(){return n.subRows&&!!n.subRows.length},getToggleExpandedProps:function(t){return p({title:"Toggle Row Expanded",onClick:function(t){t.stopPropagation(),e.toggleRowExpanded(n.id)}},t)}}}(l,r)),l},getCoreRowModel:m((function(){return[r.options.data]}),(function(n){r.options.autoResetColumnFilters&&r.getRowModelNonFirst&&r.resetColumnFilters(),r.options.autoResetGlobalFilter&&r.getRowModelNonFirst&&r.resetGlobalFilter(),r.options.autoResetSorting&&r.getRowModelNonFirst&&r.resetSorting(),r.options.autoResetGrouping&&r.getRowModelNonFirst&&r.resetGrouping(),r.options.autoResetExpanded&&r.getRowModelNonFirst&&r.resetExpanded(),r.getRowModelNonFirst=!0;for(var e=[],t=[],o={},u=r.getAllLeafColumns(),l=function n(e,l,i,a,s){void 0===i&&(i=0);for(var g=r.getRowId(e,l,s),d={},f=0;f<u.length;f++){var p=u[f];p&&p.accessorFn&&(d[p.id]=p.accessorFn(e,l))}var m=r.createRow(g,e,l,i,d);if(a.push(m),t.push(m),o[g]=m,r.options.getSubRows){var v=r.options.getSubRows(e,l);if(null!=v&&v.length){m.originalSubRows=v;for(var C=[],w=0;w<m.originalSubRows.length;w++)n(m.originalSubRows[w],w,i+1,C,m);m.subRows=C,m.leafRows=c(C,(function(n){return n.leafRows}))}}},i=0;i<n.length;i++)l(n[i],i,0,e);return{rows:e,flatRows:t,rowsById:o}}),"getRowModel",r.options.debug),getCoreRows:function(){return r.getCoreRowModel().rows},getCoreFlatRows:function(){return r.getCoreRowModel().flatRows},getCoreRowsById:function(){return r.getCoreRowModel().rowsById},getRowModel:function(){return r.getExpandedRowModel()},getRows:function(){return r.getRowModel().rows},getFlatRows:function(){return r.getRowModel().flatRows},getRowsById:function(){return r.getRowModel().rowsById},getRow:function(n){var e=r.getRowsById()[n];if(!e)throw new Error;return e},getCell:function(n,e){var t=r.getRow(n);if(!t)throw new Error;var o=t.getAllCellsByColumnId()[e];if(!o)throw new Error;return o},getTableProps:function(n){return p({role:"table"},n)},getTableBodyProps:function(n){return p({role:"rowgroup"},n)},getRowProps:function(n,e){var t=r.getRow(n);if(t)return p({key:t.id,role:"row"},e)},getCellProps:function(n,e,t){var o=r.getCell(n,e);if(o)return p({key:o.id,role:"gridcell"},t)}});return Object.assign(r,s)}n.columnFilterRowsFn=function(n,e,t){var r=[],o={},u=n.options.filterFromChildrenUp,l=function(t,r){return e.forEach((function(e){var o=e.id,u=e.value,l=n.getColumn(o);if(!l)throw new Error;if(0===r){var i=[].concat(t);l.getPreFilteredRows=function(){return i}}var a=n.getColumnFilterFn(l.id);a&&(t=a(t,[o],u))})),t};if(u){return{rows:function n(e,t){return void 0===t&&(t=0),e=e.filter((function(e){var r;return null==(r=e.subRows)||!r.length||(e.subRows=n(e.subRows,t+1),e.subRows.length)})),(e=l(e,t)).forEach((function(n){r.push(n),o[n.id]=n})),e}(t.rows),flatRows:r,rowsById:o}}return{rows:function n(e,t){return void 0===t&&(t=0),(e=l(e,t)).forEach((function(e){if(r.push(e),o[e.id]=e,!u){var l;if(null==(l=e.subRows)||!l.length)return;e.subRows=n(e.subRows,t+1)}})),e}(t.rows),flatRows:r,rowsById:o}},n.createTable=function n(){return{RowType:function(){return n()},FilterFns:function(){return n()},SortingFns:function(){return n()},AggregationFns:function(){return n()},createColumns:function(n){return n},createColumn:function(n,e){var t;if(e=l({},e,{id:e.id}),"string"==typeof n)return l({},e,{id:null!=(t=e.id)?t:n,accessorKey:n,__generated:!0});if("function"==typeof n)return l({},e,{accessorFn:n,__generated:!0});throw new Error("Invalid accessor")},createGroup:function(n){return l({},n,{__generated:!0})},useTable:function(n){var e=u.useRef(void 0),t=u.useReducer((function(){return{}}),{})[1];return e.current||(e.current=j(n,t)),e.current.updateOptions(n),e.current},types:void 0}},n.expandRowsFn=function(n,e,t){var r=[],o=n.options.expandSubRows;return t.rows.forEach((function e(t){var u;r.push(t),o&&null!=(u=t.subRows)&&u.length&&n.getIsRowExpanded(t.id)&&t.subRows.forEach(e)})),{rows:r,flatRows:t.flatRows,rowsById:t.rowsById}},n.globalFilterRowsFn=function(n,e,t){var r=[],o={},u=n.options.filterFromChildrenUp,l=n.getGlobalFilterFn();if(!l)return t;var i=n.getAllLeafColumns().filter((function(n){return n.getCanGlobalFilter()})).map((function(n){return n.id}));if(u){return{rows:function n(t,u){return t=t.filter((function(e){var t;return null==(t=e.subRows)||!t.length||(e.subRows=n(e.subRows),e.subRows.length)})),(t=l(t,i,e)).forEach((function(n){r.push(n),o[n.id]=n})),t}(t.rows),flatRows:r,rowsById:o}}return{rows:function n(t,a){return(t=l(t,i,e)).forEach((function(e){if(r.push(e),o[e.id]=e,!u){var t;if(null==(t=e.subRows)||!t.length)return;e.subRows=n(e.subRows)}})),t}(t.rows),flatRows:r,rowsById:o}},n.groupRowsFn=function(n,e,t){var r=e.filter((function(e){return n.getColumn(e)})),o=[],u={},l=function e(t,l,i){if(void 0===l&&(l=0),l===r.length)return t;var a=r[l],s=function(n,e){var t=new Map;return n.reduce((function(n,t){var r=""+t.values[e],o=n.get(r);return o?n.set(r,[].concat(o,[t])):n.set(r,[t]),n}),t)}(t,a),g=Array.from(s.entries()).map((function(t,s){var g=t[0],d=t[1],f=a+":"+g,p=e(d,l+1,f=i?i+">"+f:f),m=l?c(d,(function(n){return n.leafRows})):d,v=function(e,t,o){var u={};return n.getAllLeafColumns().forEach((function(l){if(r.includes(l.id))u[l.id]=t[0]?t[0].values[l.id]:null;else{var i=n.getColumnAggregationFn(l.id);if(i){var a=t.map((function(n){return n.values[l.id]})),s=e.map((function(n){var e=n.values[l.id];return!o&&l.aggregateValue&&(e=l.aggregateValue(e)),e}));u[l.id]=i(s,a)}else{if(l.aggregationType)throw console.info({column:l}),new Error("");u[l.id]=null}}})),u}(m,d,l),C=n.createRow(f,void 0,s,l,v);return Object.assign(C,{groupingColumnId:a,groupingValue:g,subRows:p,leafRows:m}),p.forEach((function(n){o.push(n),u[n.id]=n})),C}));return g}(t.rows,0,"");return l.forEach((function(n){o.push(n),u[n.id]=n})),{rows:l,flatRows:o,rowsById:u}},n.sortRowsFn=function(n,e,t){var r=[],o=e.filter((function(e){return n.getColumnCanSort(e.id)})),u={};o.forEach((function(e){var t=n.getColumn(e.id);u[e.id]={sortUndefined:t.sortUndefined,invertSorting:t.invertSorting,sortingFn:n.getColumnSortingFn(e.id)}}));return{rows:function n(e){var t=e.slice();return t.sort((function(n,e){for(var t=0;t<o.length;t+=1){var r,l=o[t],i=u[l.id],a=null!=(r=null==l?void 0:l.desc)&&r;if(i.sortUndefined){var s=void 0===n.values[l.id],g=void 0===e.values[l.id];if(s||g)return s&&g?0:s?1:-1}var d=i.sortingFn(n,e,l.id);if(0!==d)return a&&(d*=-1),i.invertSorting&&(d*=-1),d}return n.index-e.index})),t.forEach((function(e){r.push(e),!e.subRows||e.subRows.length<=1||(e.subRows=n(e.subRows))})),t}(t.rows),flatRows:r,rowsById:t.rowsById}},Object.defineProperty(n,"__esModule",{value:!0})}));
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((n="undefined"!=typeof globalThis?globalThis:n||self).ReactTable={},n.React)}(this,(function(n,e){"use strict";function t(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}function r(n){if(n&&n.__esModule)return n;var e=Object.create(null);return n&&Object.keys(n).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:function(){return n[t]}})}})),e.default=n,Object.freeze(e)}var o=t(e),u=r(e);function i(){return i=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},i.apply(this,arguments)}function l(n,e){if(null==n)return{};var t,r,o={},u=Object.keys(n);for(r=0;r<u.length;r++)t=u[r],e.indexOf(t)>=0||(o[t]=n[t]);return o}function a(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function s(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(t)return(t=t.call(n)).next.bind(t);if(Array.isArray(n)||(t=function(n,e){if(n){if("string"==typeof n)return a(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?a(n,e):void 0}}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var r=0;return function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(n){var e=function(n,e){if("object"!=typeof n||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"==typeof e?e:String(e)}function d(n,e){return"function"==typeof n?n(e):n}function f(n,e){return function(t){e.setState((function(e){var r;return i({},e,((r={})[n]=d(t,e[n]),r))}))}}function c(n){return n instanceof Function}function p(n,e){var t=[];return function n(r){r.forEach((function(r){t.push(r);var o=e(r);null!=o&&o.length&&n(o)}))}(n),t}"undefined"!=typeof document?o.default.useLayoutEffect:o.default.useEffect;var m=function(n,e){return c(e)?e(n):i({},n,null!=e?e:{})};function v(n,e,t,r){var o,u=[];return function(){var l=n(),a=l,s=u;return(a.length!==s.length||a.some((function(n,e){return s[e]!==n})))&&(r&&console.info(t,i({length:s.length+" -> "+a.length},a.map((function(n,e){return s[e]!==a[e]&&[e,s[e],a[e]]})).filter(Boolean).reduce((function(n,e){var t;return i({},n,((t={})[e[0]]=e.slice(1),t))}),{}),{parent:parent})),o=e.apply(void 0,l),u=a),o}}function C(n,e){return n?function(n){return"function"==typeof n&&((e=Object.getPrototypeOf(n)).prototype&&e.prototype.isReactComponent);var e}(t=n)||"function"==typeof t||function(n){return"object"==typeof n&&"symbol"==typeof n.$$typeof&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}(t)?o.default.createElement(n,e):n:null;var t}var w={sum:function(n,e){return e.reduce((function(n,e){return n+("number"==typeof e?e:0)}),0)},min:function(n,e){for(var t,r,o=s(e);!(r=o()).done;){var u=r.value;null!=u&&(t>u||void 0===t&&u>=u)&&(t=u)}return t},max:function(n,e){for(var t,r,o=s(e);!(r=o()).done;){var u=r.value;null!=u&&(t<u||void 0===t&&u>=u)&&(t=u)}return t},extent:function(n,e){for(var t,r,o,u=s(e);!(o=u()).done;){var i=o.value;null!=i&&(void 0===t?i>=i&&(t=r=i):(t>i&&(t=i),r<i&&(r=i)))}return[t,r]},mean:function(n){for(var e,t=0,r=0,o=s(n);!(e=o()).done;){var u=e.value;null!=u&&(u=+u)>=u&&(++t,r+=u)}return t?r/t:void 0},median:function(n){if(!n.length)return;var e=0,t=0;return n.forEach((function(n){"number"==typeof n&&(e=Math.min(e,n),t=Math.max(t,n))})),(e+t)/2},unique:function(n){return Array.from(new Set(n).values())},uniqueCount:function(n){return new Set(n).size},count:function(n){return n.length}};function h(n){return{setColumnOrder:function(e){return null==n.options.onColumnOrderChange?void 0:n.options.onColumnOrderChange(e,d(e,n.getState().columnOrder))},resetColumnOrder:function(){var e;n.setColumnOrder(null!=(e=n.initialState.columnOrder)?e:[])},getOrderColumnsFn:v((function(){return[n.getState().columnOrder,n.getState().grouping,n.options.groupedColumnMode]}),(function(n,e,t){return function(r){var o=[];if(null!=n&&n.length){for(var u=[].concat(n),i=[].concat(r),l=function(){var n=u.shift(),e=i.findIndex((function(e){return e.id===n}));e>-1&&o.push(i.splice(e,1)[0])};i.length&&u.length;)l();o=[].concat(o,i)}else o=r;return function(n,e,t){if(null==e||!e.length||!t)return n;var r=n.filter((function(n){return!e.includes(n.id)}));if("remove"===t)return r;var o=e.map((function(e){return n.find((function(n){return n.id===e}))})).filter(Boolean);return[].concat(o,r)}(o,e,t)}}),"getOrderColumnsFn",n.options.debug)}}var b={width:150,minWidth:20,maxWidth:Number.MAX_SAFE_INTEGER};function R(n){return{setColumnSizing:function(e){return null==n.options.onColumnSizingChange?void 0:n.options.onColumnSizingChange(e,d(e,n.getState().columnSizing))},setColumnSizingInfo:function(e){return null==n.options.onColumnSizingInfoChange?void 0:n.options.onColumnSizingInfoChange(e,d(e,n.getState().columnSizingInfo))},resetColumnSizing:function(){var e;n.setColumnSizing(null!=(e=n.initialState.columnSizing)?e:{})},resetHeaderSizeInfo:function(){var e;n.setColumnSizingInfo(null!=(e=n.initialState.columnSizingInfo)?e:{})},resetColumnSize:function(e){n.setColumnSizing((function(n){return n[e],l(n,[e].map(g))}))},resetHeaderSize:function(e){var t=n.getHeader(e);if(t)return n.resetColumnSize(t.column.id)},getHeaderCanResize:function(e){var t=n.getHeader(e);if(!t)throw new Error;return n.getColumnCanResize(t.column.id)},getColumnCanResize:function(e){var t,r,o,u=n.getColumn(e);if(!u)throw new Error;return null==(t=null!=(r=null!=(o=u.enableResizing)?o:n.options.enableColumnResizing)?r:u.defaultCanResize)||t},getColumnIsResizing:function(e){if(!n.getColumn(e))throw new Error;return n.getState().columnSizingInfo.isResizingColumn===e},getHeaderIsResizing:function(e){var t=n.getHeader(e);if(!t)throw new Error;return n.getColumnIsResizing(t.column.id)},getHeaderResizerProps:function(e,t){var r=n.getHeader(e);if(r){var o=n.getColumn(r.column.id);if(o){var u=o.getCanResize(),l=function(e){if(!(S(e)&&e.touches&&e.touches.length>1)){var t=r.getLeafHeaders().map((function(n){return[n.column.id,n.getWidth()]})),o=S(e)?Math.round(e.touches[0].clientX):e.clientX,u=function(e,t){if("number"==typeof t){var r={};n.setColumnSizingInfo((function(n){var e,o,u=t-(null!=(e=null==n?void 0:n.startOffset)?e:0),l=Math.max(u/(null!=(o=null==n?void 0:n.startSize)?o:0),-.999999);return n.columnSizingStart.forEach((function(n){var e=n[0],t=n[1];r[e]=Math.max(t+t*l,0)})),i({},n,{deltaOffset:u,deltaPercentage:l})})),"onChange"!==n.options.columnResizeMode&&"end"!==e||n.setColumnSizing((function(n){return i({},n,r)}))}},l=function(n){return u("move",n)},a=function(e){u("end",e),n.setColumnSizingInfo((function(n){return i({},n,{isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})}))},s={moveHandler:function(n){return l(n.clientX)},upHandler:function(n){document.removeEventListener("mousemove",s.moveHandler),document.removeEventListener("mouseup",s.upHandler),a(n.clientX)}},g={moveHandler:function(n){return n.cancelable&&(n.preventDefault(),n.stopPropagation()),l(n.touches[0].clientX),!1},upHandler:function(n){document.removeEventListener("touchmove",g.moveHandler),document.removeEventListener("touchend",g.upHandler),n.cancelable&&(n.preventDefault(),n.stopPropagation()),a(n.touches[0].clientX)}},d=!!function(){if("boolean"==typeof F)return F;var n=!1;try{var e={get passive(){return n=!0,!1}},t=function(){};window.addEventListener("test",t,e),window.removeEventListener("test",t)}catch(e){n=!1}return F=n}()&&{passive:!1};S(e)?(document.addEventListener("touchmove",g.moveHandler,d),document.addEventListener("touchend",g.upHandler,d)):(document.addEventListener("mousemove",s.moveHandler,d),document.addEventListener("mouseup",s.upHandler,d)),n.setColumnSizingInfo((function(n){return i({},n,{startOffset:o,startSize:r.getWidth(),deltaOffset:0,deltaPercentage:0,columnSizingStart:t,isResizingColumn:r.column.id})}))}};return m(u?{title:"Toggle Grouping",draggable:!1,role:"separator",onMouseDown:function(n){n.persist(),l(n)},onTouchStart:function(n){n.persist(),l(n)}}:{},t)}}}}}var F=null;function S(n){return"touchstart"===n.type}function y(n,e,t,r){var o,u,i=0;!function n(e,t){void 0===t&&(t=1),i=Math.max(i,t),e.filter((function(n){return n.getIsVisible()})).forEach((function(e){var r;null!=(r=e.columns)&&r.length&&n(e.columns,t+1)}),0)}(n);var l=[];!function n(e,o){var u={depth:o,id:[r,""+o].filter(Boolean).join("_"),headers:[],getHeaderGroupProps:function(n){return t.getHeaderGroupProps(""+o,n)},getFooterGroupProps:function(n){return t.getFooterGroupProps(""+o,n)}},i=[];e.forEach((function(n){var e,l=[].concat(i).reverse()[0],a=!1;n.column.depth===u.depth&&n.column.parent?e=n.column.parent:(e=n.column,a=!0);var s=t.createHeader(e,{id:[r,o,e.id,null==n?void 0:n.id].filter(Boolean).join("_"),isPlaceholder:a,placeholderId:a?""+i.filter((function(n){return n.column===e})).length:void 0,depth:o});l&&l.column===s.column?l.subHeaders.push(n):(s.subHeaders.push(n),i.push(s)),u.headers.push(n)})),l.push(u),o>0&&n(i,o-1)}(e.map((function(n){return t.createHeader(n,{depth:i})})),i-1),l.reverse();return function n(e){return e.filter((function(n){return n.column.getIsVisible()})).map((function(e){var t=0,r=0,o=[0];return e.subHeaders&&e.subHeaders.length?(o=[],n(e.subHeaders).forEach((function(n){var e=n.colSpan,r=n.rowSpan;t+=e,o.push(r)}))):t=1,r+=Math.min.apply(Math,o),e.colSpan=t>0?t:void 0,e.rowSpan=r>0?r:void 0,{colSpan:t,rowSpan:r}}))}(null!=(o=null==(u=l[0])?void 0:u.headers)?o:[]),l}var I={includesString:E,includesStringSensitive:G,equalsString:x,equalsStringSensitive:H,arrIncludes:P,arrIncludesAll:M,equals:V,weakEquals:A,betweenNumberRange:L};function E(n,e,t){var r=String(t).toLowerCase();return n=n.filter((function(n){return e.some((function(e){return String(n.values[e]).toLowerCase().includes(r)}))}))}function G(n,e,t){var r=String(t);return n=n.filter((function(n){return e.some((function(e){return String(n.values[e]).includes(r)}))}))}function x(n,e,t){var r=String(t).toLowerCase();return n.filter((function(n){return e.some((function(e){var t=n.values[e];return void 0===t||String(t).toLowerCase()===r}))}))}function H(n,e,t){var r=String(t);return n.filter((function(n){return e.some((function(e){var t=n.values[e];return void 0===t||String(t)===r}))}))}function P(n,e,t){return n.filter((function(n){return e.some((function(e){return n.values[e].includes(t)}))}))}function M(n,e,t){return n.filter((function(n){return e.some((function(e){var r=n.values[e];return r&&r.length&&t.every((function(n){return r.includes(n)}))}))}))}function V(n,e,t){return n.filter((function(n){return e.some((function(e){return n.values[e]===t}))}))}function A(n,e,t){return n.filter((function(n){return e.some((function(e){return n.values[e]==t}))}))}function L(n,e,t){var r=t||[],o=r[0],u=r[1],i="number"!=typeof o?parseFloat(o):o,l="number"!=typeof u?parseFloat(u):u,a=null===o||Number.isNaN(i)?-1/0:i,s=null===u||Number.isNaN(l)?1/0:l;if(a>s){var g=a;a=s,s=g}return n.filter((function(n){return e.some((function(e){var t=n.values[e];return t>=a&&t<=s}))}))}function z(n){return null==n||""===n}function T(n,e,t){return!(!n||!n.autoRemove)&&n.autoRemove(e,t)||void 0===e||"string"==typeof e&&!e}E.autoRemove=function(n){return z(n)},G.autoRemove=function(n){return z(n)},x.autoRemove=function(n){return z(n)},H.autoRemove=function(n){return z(n)},P.autoRemove=function(n){return z(n)||!(null!=n&&n.length)},M.autoRemove=function(n){return z(n)||!(null!=n&&n.length)},V.autoRemove=function(n){return z(n)},A.autoRemove=function(n){return z(n)},L.autoRemove=function(n){return z(n)||z(n[0])&&z(n[1])};var B=/([0-9]+)/gm,O={alphanumeric:function(n,e,t){return j(k(n.values[t]).toLowerCase(),k(e.values[t]).toLowerCase())},alphanumericCaseSensitive:function(n,e,t){return j(k(n.values[t]),k(e.values[t]))},text:function(n,e,t){return N(k(n.values[t]).toLowerCase(),k(e.values[t]).toLowerCase())},textCaseSensitive:function(n,e,t){return N(k(n.values[t]),k(e.values[t]))},datetime:function(n,e,t){return N(n.values[t].getTime(),e.values[t].getTime())},basic:function(n,e,t){return N(n.values[t],e.values[t])}};function j(n,e){for(var t=n.split(B).filter(Boolean),r=e.split(B).filter(Boolean);t.length&&r.length;){var o=t.shift(),u=r.shift(),i=parseInt(o,10),l=parseInt(u,10),a=[i,l].sort();if(isNaN(a[0])){if(o>u)return 1;if(u>o)return-1}else{if(isNaN(a[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}}return t.length-r.length}function N(n,e){return n===e?0:n>e?1:-1}function k(n){return"number"==typeof n?isNaN(n)||n===1/0||n===-1/0?"":String(n):"string"==typeof n?n:""}function _(n,e){var t,r={},o=i({},function(n){return{onColumnVisibilityChange:f("columnVisibility",n)}}(r),function(n){return{onColumnOrderChange:f("columnOrder",n)}}(r),function(n){return{onColumnPinningChange:f("columnPinning",n)}}(r),function(n){return{onColumnFiltersChange:f("columnFilters",n),onGlobalFilterChange:f("globalFilter",n),autoResetColumnFilters:!0,filterFromChildrenUp:!0,autoResetGlobalFilter:!0,globalFilterType:"auto",getColumnCanGlobalFilterFn:function(e){var t,r;return"string"==typeof(null==(t=n.getCoreFlatRows()[0])||null==(r=t.getAllCellsByColumnId()[e.id])?void 0:r.value)}}}(r),function(n){return{onSortingChange:f("sorting",n),autoResetSorting:!0}}(r),function(n){return{onGroupingChange:f("grouping",n),autoResetGrouping:!0,groupedColumnMode:"reorder"}}(r),function(n){return{onExpandedChange:f("expanded",n),autoResetExpanded:!0,getIsRowExpanded:function(n){return!!(null==n?void 0:n.original).expanded},expandSubRows:!0,paginateExpandedRows:!0}}(r),function(n){return{columnResizeMode:"onEnd",onColumnSizingChange:f("columnSizing",n),onColumnSizingInfoChange:f("columnSizingInfo",n)}}(r)),u={},a=function(n){return i({state:u},o,n)};r.options=a(n);var s=i({},{columnVisibility:{}},{columnOrder:[]},{columnPinning:{left:[],right:[]}},{columnFilters:[],globalFilter:void 0},{sorting:[]},{grouping:[]},{expanded:{}},{columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}},null!=(t=n.initialState)?t:{}),F=i({},r,function(n){return{getVisibleFlatColumns:v((function(){return[n.getAllFlatColumns(),n.getAllFlatColumns().filter((function(n){return null==n.getIsVisible?void 0:n.getIsVisible()})).map((function(n){return n.id})).join("_")]}),(function(n){return n.filter((function(n){return null==n.getIsVisible?void 0:n.getIsVisible()}))}),"getVisibleFlatColumns",n.options.debug),getVisibleLeafColumns:v((function(){return[n.getAllLeafColumns(),n.getAllLeafColumns().filter((function(n){return null==n.getIsVisible?void 0:n.getIsVisible()})).map((function(n){return n.id})).join("_")]}),(function(n){return n.filter((function(n){return null==n.getIsVisible?void 0:n.getIsVisible()}))}),"getVisibleLeafColumns",n.options.debug),setColumnVisibility:function(e){return null==n.options.onColumnVisibilityChange?void 0:n.options.onColumnVisibilityChange(e,d(e,n.getState().columnVisibility))},toggleColumnVisibility:function(e,t){e&&n.getColumnCanHide(e)&&n.setColumnVisibility((function(r){var o;return i({},r,((o={})[e]=null!=t?t:!n.getColumnIsVisible(e),o))}))},toggleAllColumnsVisible:function(e){var t;e=null!=(t=e)?t:!n.getIsAllColumnsVisible(),n.setColumnVisibility(n.getAllLeafColumns().reduce((function(n,t){var r;return i({},n,((r={})[t.id]=e||!(null!=t.getCanHide&&t.getCanHide()),r))}),{}))},getColumnIsVisible:function(e){var t,r,o,u=n.getColumn(e);if(!u)throw new Error;return null==(t=null!=(r=null==(o=n.getState().columnVisibility)?void 0:o[e])?r:u.defaultIsVisible)||t},getColumnCanHide:function(e){var t,r,o,u=n.getColumn(e);if(!u)throw new Error;return null==(t=null!=(r=null!=(o=n.options.enableHiding)?o:u.enableHiding)?r:u.defaultCanHide)||t},getIsAllColumnsVisible:function(){return!n.getAllLeafColumns().some((function(n){return!(null!=n.getIsVisible&&n.getIsVisible())}))},getIsSomeColumnsVisible:function(){return n.getAllLeafColumns().some((function(n){return null==n.getIsVisible?void 0:n.getIsVisible()}))},getToggleAllColumnsVisibilityProps:function(e){var t={onChange:function(e){var t;n.toggleAllColumnsVisible(null==(t=e.target)?void 0:t.checked)},type:"checkbox",title:"Toggle visibility for all columns",checked:n.getIsAllColumnsVisible(),indeterminate:!n.getIsAllColumnsVisible()&&n.getIsSomeColumnsVisible()?"indeterminate":void 0};return m(t,e)}}}(r),h(r),function(n){return{setColumnPinning:function(e){return null==n.options.onColumnPinningChange?void 0:n.options.onColumnPinningChange(e,d(e,n.getState().columnPinning))},resetColumnPinning:function(){var e,t;return n.setColumnPinning(null!=(e=null==(t=n.options.initialState)?void 0:t.columnPinning)?e:{})},pinColumn:function(e,t){var r=n.getColumn(e),o=null==r?void 0:r.getLeafColumns().map((function(n){return n.id})).filter(Boolean);n.setColumnPinning((function(n){var e,r,u,i,l,a;return"right"===t?{left:(null!=(u=null==n?void 0:n.left)?u:[]).filter((function(n){return!(null!=o&&o.includes(n))})),right:[].concat((null!=(i=null==n?void 0:n.right)?i:[]).filter((function(n){return!(null!=o&&o.includes(n))})),o)}:"left"===t?{left:[].concat((null!=(l=null==n?void 0:n.left)?l:[]).filter((function(n){return!(null!=o&&o.includes(n))})),o),right:(null!=(a=null==n?void 0:n.right)?a:[]).filter((function(n){return!(null!=o&&o.includes(n))}))}:{left:(null!=(e=null==n?void 0:n.left)?e:[]).filter((function(n){return!(null!=o&&o.includes(n))})),right:(null!=(r=null==n?void 0:n.right)?r:[]).filter((function(n){return!(null!=o&&o.includes(n))}))}}))},getColumnCanPin:function(e){var t=n.getColumn(e);if(!t)throw new Error;return t.getLeafColumns().some((function(e){var t,r,o;return null!=(t=null!=(r=null!=(o=e.enablePinning)?o:n.options.enablePinning)?r:e.defaultCanPin)?t:!!e.accessorFn}))},getColumnIsPinned:function(e){var t=n.getColumn(e);if(!t)throw new Error;var r=t.getLeafColumns().map((function(n){return n.id})),o=n.getState().columnPinning,u=o.left,i=o.right,l=r.some((function(n){return null==u?void 0:u.includes(n)})),a=r.some((function(n){return null==i?void 0:i.includes(n)}));return l&&a?"both":l?"left":!!a&&"right"},getColumnPinnedIndex:function(e){var t,r,o,u=n.getColumnIsPinned(e);if("both"===u)throw new Error;return u?null!=(t=null==(r=n.getState().columnPinning)||null==(o=r[u])?void 0:o.indexOf(e))?t:-1:0}}}(r),function(n){return{createHeader:function(e,t){var r,o={id:null!=(r=t.id)?r:e.id,column:e,isPlaceholder:t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,getWidth:function(){var n=0;return function e(t){var r;t.subHeaders.length?t.subHeaders.forEach(e):n+=null!=(r=t.column.getWidth())?r:0}(o),n},getLeafHeaders:function(){var n=[];return function e(t){t.subHeaders&&t.subHeaders.length&&t.subHeaders.map(e),n.push(t)}(o),n},getHeaderProps:function(e){return n.getHeaderProps(o.id,e)},getFooterProps:function(e){return n.getFooterProps(o.id,e)},renderHeader:function(){return C(e.header,{header:o,column:e})},renderFooter:function(){return C(e.footer,{header:o,column:e})}};return o=Object.assign(o,function(n,e){return{getIsResizing:function(){return e.getHeaderIsResizing(n.id)},getCanResize:function(){return e.getHeaderCanResize(n.id)},getResizerProps:function(t){return e.getHeaderResizerProps(n.id,t)},resetSize:function(){return e.resetHeaderSize(n.id)}}}(o,n)),o},getHeaderGroups:v((function(){return[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right]}),(function(e,t,r,o){var u=t.filter((function(n){return null==r?void 0:r.includes(n.id)})),i=t.filter((function(n){return null==o?void 0:o.includes(n.id)})),l=t.filter((function(n){return!(null!=r&&r.includes(n.id)||null!=o&&o.includes(n.id))}));return y(e,[].concat(u,l,i),n)}),"getHeaderGroups",n.options.debug),getCenterHeaderGroups:v((function(){return[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right]}),(function(e,t,r,o){return y(e,t=t.filter((function(n){return!(null!=r&&r.includes(n.id)||null!=o&&o.includes(n.id))})),n,"center")}),"getCenterHeaderGroups",n.options.debug),getLeftHeaderGroups:v((function(){return[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left]}),(function(e,t,r){return y(e,t=t.filter((function(n){return null==r?void 0:r.includes(n.id)})),n,"left")}),"getLeftHeaderGroups",n.options.debug),getRightHeaderGroups:v((function(){return[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right]}),(function(e,t,r){return y(e,t=t.filter((function(n){return null==r?void 0:r.includes(n.id)})),n,"right")}),"getRightHeaderGroups",n.options.debug),getFooterGroups:v((function(){return[n.getHeaderGroups()]}),(function(n){return[].concat(n).reverse()}),"getFooterGroups",n.options.debug),getLeftFooterGroups:v((function(){return[n.getLeftHeaderGroups()]}),(function(n){return[].concat(n).reverse()}),"getLeftFooterGroups",n.options.debug),getCenterFooterGroups:v((function(){return[n.getCenterHeaderGroups()]}),(function(n){return[].concat(n).reverse()}),"getCenterFooterGroups",n.options.debug),getRightFooterGroups:v((function(){return[n.getRightHeaderGroups()]}),(function(n){return[].concat(n).reverse()}),"getRightFooterGroups",n.options.debug),getFlatHeaders:v((function(){return[n.getHeaderGroups()]}),(function(n){return n.map((function(n){return n.headers})).flat()}),"getFlatHeaders",n.options.debug),getLeftFlatHeaders:v((function(){return[n.getLeftHeaderGroups()]}),(function(n){return n.map((function(n){return n.headers})).flat()}),"getLeftFlatHeaders",n.options.debug),getCenterFlatHeaders:v((function(){return[n.getCenterHeaderGroups()]}),(function(n){return n.map((function(n){return n.headers})).flat()}),"getCenterFlatHeaders",n.options.debug),getRightFlatHeaders:v((function(){return[n.getRightHeaderGroups()]}),(function(n){return n.map((function(n){return n.headers})).flat()}),"getRightFlatHeaders",n.options.debug),getCenterLeafHeaders:v((function(){return[n.getCenterFlatHeaders()]}),(function(n){return n.filter((function(n){var e;return!(null!=(e=n.subHeaders)&&e.length)}))}),"getCenterLeafHeaders",n.options.debug),getLeftLeafHeaders:v((function(){return[n.getLeftFlatHeaders()]}),(function(n){return n.filter((function(n){var e;return!(null!=(e=n.subHeaders)&&e.length)}))}),"getLeftLeafHeaders",n.options.debug),getRightLeafHeaders:v((function(){return[n.getRightFlatHeaders()]}),(function(n){return n.filter((function(n){var e;return!(null!=(e=n.subHeaders)&&e.length)}))}),"getRightLeafHeaders",n.options.debug),getLeafHeaders:v((function(){return[n.getLeftHeaderGroups(),n.getCenterHeaderGroups(),n.getRightHeaderGroups()]}),(function(n,e,t){var r,o,u,i,l,a;return[].concat(null!=(r=null==(o=n[0])?void 0:o.headers)?r:[],null!=(u=null==(i=e[0])?void 0:i.headers)?u:[],null!=(l=null==(a=t[0])?void 0:a.headers)?l:[]).map((function(n){return n.getLeafHeaders()})).flat()}),"getLeafHeaders",n.options.debug),getHeader:function(e){var t=[].concat(n.getFlatHeaders(),n.getCenterFlatHeaders(),n.getLeftFlatHeaders(),n.getRightFlatHeaders()).find((function(n){return n.id===e}));if(!t)throw new Error;return t},getHeaderGroupProps:function(e,t){var r=n.getHeaderGroups().find((function(n){return n.id===e}));if(r)return m({key:r.id,role:"row"},t)},getFooterGroupProps:function(e,t){var r=n.getFooterGroups().find((function(n){return n.id===e}));if(r){var o={key:r.id,role:"row"};return m(o,t)}},getHeaderProps:function(e,t){var r=n.getHeader(e);if(!r)throw new Error;var o={key:r.id,role:"columnheader",colSpan:r.colSpan,rowSpan:r.rowSpan};return m(o,t)},getFooterProps:function(e,t){var r=n.getHeader(e);if(r){var o={key:r.id,role:"columnfooter",colSpan:r.colSpan,rowSpan:r.rowSpan};return m(o,t)}},getTotalWidth:function(){var e=0;return n.getVisibleLeafColumns().forEach((function(n){var t;e+=null!=(t=n.getWidth())?t:0})),e}}}(r),function(n){return{getColumnAutoFilterFn:function(e){var t=n.getCoreFlatRows()[0],r=null==t?void 0:t.values[e];return"string"==typeof r?I.includesString:"number"==typeof r?I.betweenNumberRange:null!==r&&"object"==typeof r?I.equals:Array.isArray(r)?I.arrIncludes:I.weakEquals},getGlobalAutoFilterFn:function(){return I.includesString},getColumnFilterFn:function(e){var t,r=n.getColumn(e),o=n.options.filterTypes;if(!r)throw new Error;return c(r.filterType)?r.filterType:"auto"===r.filterType?n.getColumnAutoFilterFn(e):null!=(t=null==o?void 0:o[r.filterType])?t:I[r.filterType]},getGlobalFilterFn:function(){var e,t=n.options,r=t.filterTypes,o=t.globalFilterType;return c(o)?o:"auto"===o?n.getGlobalAutoFilterFn():null!=(e=null==r?void 0:r[o])?e:I[o]},setColumnFilters:function(e){var t=n.getAllLeafColumns(),r=function(r){var o;return null==(o=d(e,r))?void 0:o.filter((function(e){var r=t.find((function(n){return n.id===e.id}));return!r||!T(n.getColumnFilterFn(r.id),e.value,r)}))};null==n.options.onColumnFiltersChange||n.options.onColumnFiltersChange(r,r(n.getState().columnFilters))},setGlobalFilter:function(e){null==n.options.onGlobalFilterChange||n.options.onGlobalFilterChange(e,d(e,n.getState().globalFilter))},resetGlobalFilter:function(){n.setGlobalFilter(void 0)},getColumnCanColumnFilter:function(e){var t,r,o,u,i,l,a=n.getColumn(e);if(!a)throw new Error;return null!=(t=null!=(r=null!=(o=null!=(u=null!=(i=null!=(l=a.enableAllFilters)?l:a.enableColumnFilter)?i:n.options.enableFilters)?u:n.options.enableColumnFilters)?o:a.defaultCanFilter)?r:a.defaultCanColumnFilter)?t:!!a.accessorFn},getColumnCanGlobalFilter:function(e){var t,r,o,u,i,l,a,s=n.getColumn(e);if(!s)throw new Error;return null==(t=(null!=(r=null!=(o=null!=(u=null!=(i=null!=(l=null!=(a=n.options.enableFilters)?a:n.options.enableGlobalFilter)?l:s.enableAllFilters)?i:s.enableGlobalFilter)?u:s.defaultCanFilter)?o:s.defaultCanGlobalFilter)?r:!!s.accessorFn)&&(null==n.options.getColumnCanGlobalFilterFn?void 0:n.options.getColumnCanGlobalFilterFn(s)))||t},getColumnIsFiltered:function(e){return n.getColumnFilterIndex(e)>-1},getColumnFilterValue:function(e){var t,r;return null==(t=n.getState().columnFilters)||null==(r=t.find((function(n){return n.id===e})))?void 0:r.value},getColumnFilterIndex:function(e){var t,r;return null!=(t=null==(r=n.getState().columnFilters)?void 0:r.findIndex((function(n){return n.id===e})))?t:-1},setColumnFilterValue:function(e,t){e&&n.setColumnFilters((function(r){var o=n.getColumn(e);if(!o)throw new Error;var u,i=n.getColumnFilterFn(o.id),l=null==r?void 0:r.find((function(n){return n.id===e})),a=d(t,l?l.value:void 0);if(T(i,a,o))return null!=(u=null==r?void 0:r.filter((function(n){return n.id!==e})))?u:[];var s,g={id:e,value:a};return l?null!=(s=null==r?void 0:r.map((function(n){return n.id===e?g:n})))?s:[]:null!=r&&r.length?[].concat(r,[g]):[g]}))},resetColumnFilters:function(){var e,t,r;n.setColumnFilters(null!=(e=null==(t=n.options)||null==(r=t.initialState)?void 0:r.columnFilters)?e:[])},getColumnFilteredRowModel:v((function(){return[n.getState().columnFilters,n.getCoreRowModel(),n.options.columnFilterRowsFn]}),(function(e,t,r){var o=null!=e&&e.length&&r?r(n,e,t):t;return n.getAllLeafColumns().filter((function(e){var t;return!(null!=(t=n.getState().columnFilters)&&t.find((function(n){return n.id===e.id})))})).forEach((function(n){n.getPreFilteredRows=function(){return o.rows}})),o}),"getColumnFilteredRowModel",n.options.debug),getPreColumnFilteredRows:function(){return n.getCoreRowModel().rows},getPreColumnFilteredFlatRows:function(){return n.getCoreRowModel().flatRows},getPreColumnFilteredRowsById:function(){return n.getCoreRowModel().rowsById},getColumnFilteredRows:function(){return n.getColumnFilteredRowModel().rows},getColumnFilteredFlatRows:function(){return n.getColumnFilteredRowModel().flatRows},getColumnFilteredRowsById:function(){return n.getColumnFilteredRowModel().rowsById},getGlobalFilteredRowModel:v((function(){return[n.getState().globalFilter,n.getColumnFilteredRowModel(),n.options.globalFilterRowsFn]}),(function(e,t,r){var o=r&&e?r(n,e,t):t;return n.getAllLeafColumns().filter((function(e){var t;return!(null!=(t=n.getState().columnFilters)&&t.find((function(n){return n.id===e.id})))})).forEach((function(n){n.getPreFilteredRows=function(){return o.rows}})),o}),"getGlobalFilteredRowModel",n.options.debug),getPreGlobalFilteredRows:function(){return n.getColumnFilteredRowModel().rows},getPreGlobalFilteredFlatRows:function(){return n.getColumnFilteredRowModel().flatRows},getPreGlobalFilteredRowsById:function(){return n.getColumnFilteredRowModel().rowsById},getGlobalFilteredRows:function(){return n.getGlobalFilteredRowModel().rows},getGlobalFilteredFlatRows:function(){return n.getGlobalFilteredRowModel().flatRows},getGlobalFilteredRowsById:function(){return n.getGlobalFilteredRowModel().rowsById}}}(r),function(n){return{getColumnAutoSortingFn:function(e){var t=n.getGlobalFilteredRowModel().flatRows[0],r=null==t?void 0:t.values[e];return"string"==typeof r?O.alphanumeric:"[object Date]"===Object.prototype.toString.call(r)?O.datetime:O.basic},getColumnSortingFn:function(e){var t,r=n.getColumn(e),o=n.options.sortTypes;if(!r)throw new Error;return c(r.sortType)?r.sortType:"auto"===r.sortType?n.getColumnAutoFilterFn(e):null!=(t=null==o?void 0:o[r.sortType])?t:O[r.sortType]},setSorting:function(e){return null==n.options.onSortingChange?void 0:n.options.onSortingChange(e,d(e,n.getState().sorting))},toggleColumnSorting:function(e,t,r){var o=n.getColumn(e);if(!o)throw new Error;n.setSorting((function(u){var l,a,s,g,d=null==u?void 0:u.find((function(n){return n.id===e})),f=null==u?void 0:u.findIndex((function(n){return n.id===e})),c=null!=t,p=[];g=!o.getCanMultiSort()&&r?d?"toggle":"add":null!=u&&u.length&&f!==u.length-1?"replace":d?"toggle":"replace";var m=null!=(l=o.sortDescFirst)?l:n.options.sortDescFirst;if("toggle"!==g||null!=(a=n.options.enableSortingRemoval)&&!a||c||r&&null!=(s=n.options.enableMultiRemove)&&!s||(null!=d&&d.desc?m:!m)||(g="remove"),"replace"===g)p=[{id:e,desc:c?t:!!m}];else if("add"===g&&null!=u&&u.length){var v;(p=[].concat(u,[{id:e,desc:c?t:!!m}])).splice(0,p.length-(null!=(v=n.options.maxMultiSortColCount)?v:Number.MAX_SAFE_INTEGER))}else"toggle"===g&&null!=u&&u.length?p=u.map((function(n){return n.id===e?i({},n,{desc:c?t:!(null!=d&&d.desc)}):n})):"remove"===g&&null!=u&&u.length&&(p=u.filter((function(n){return n.id!==e})));return p}))},getColumnCanSort:function(e){var t,r,o,u=n.getColumn(e);if(!u)throw new Error;return null!=(t=null!=(r=null!=(o=u.enableSorting)?o:n.options.enableSorting)?r:u.defaultCanSort)?t:!!u.accessorFn},getColumnCanMultiSort:function(e){var t,r,o=n.getColumn(e);if(!o)throw new Error;return null!=(t=null!=(r=o.enableMultiSort)?r:n.options.enableMultiSort)?t:!!o.accessorFn},getColumnIsSorted:function(e){var t,r=null==(t=n.getState().sorting)?void 0:t.find((function(n){return n.id===e}));return!!r&&(r.desc?"desc":"asc")},getColumnSortIndex:function(e){var t,r;return null!=(t=null==(r=n.getState().sorting)?void 0:r.findIndex((function(n){return n.id===e})))?t:-1},resetSorting:function(){var e,t,r;n.setSorting(null!=(e=null==(t=n.options)||null==(r=t.initialState)?void 0:r.sorting)?e:[])},getToggleSortingProps:function(e,t){var r=n.getColumn(e);if(!r)throw new Error;var o=r.getCanSort();return m({title:o?"Toggle Sorting":void 0,onClick:o?function(e){e.persist(),null==r.toggleSorting||r.toggleSorting(void 0,!!r.getCanMultiSort()&&(null==n.options.isMultiSortEvent?void 0:n.options.isMultiSortEvent(e)))}:void 0},t)},getSortedRowModel:v((function(){return[n.getState().sorting,n.getGlobalFilteredRowModel(),n.options.sortRowsFn]}),(function(e,t,r){return r&&null!=e&&e.length?r(n,e,t):t}),"getSortedRowModel",n.options.debug),getPreSortedRows:function(){return n.getGlobalFilteredRowModel().rows},getPreSortedFlatRows:function(){return n.getGlobalFilteredRowModel().flatRows},getPreSortedRowsById:function(){return n.getGlobalFilteredRowModel().rowsById},getSortedRows:function(){return n.getSortedRowModel().rows},getSortedFlatRows:function(){return n.getSortedRowModel().flatRows},getSortedRowsById:function(){return n.getSortedRowModel().rowsById}}}(r),function(n){return{getColumnAutoAggregationFn:function(e){var t=n.getCoreFlatRows()[0],r=null==t?void 0:t.values[e];return"number"==typeof r?w.sum:"[object Date]"===Object.prototype.toString.call(r)?w.extent:w.count},getColumnAggregationFn:function(e){var t,r=n.getColumn(e),o=n.options.aggregationTypes;if(!r)throw new Error;return c(r.aggregationType)?r.aggregationType:"auto"===r.aggregationType?n.getColumnAutoFilterFn(e):null!=(t=null==o?void 0:o[r.aggregationType])?t:w[r.aggregationType]},setGrouping:function(e){return null==n.options.onGroupingChange?void 0:n.options.onGroupingChange(e,d(e,n.getState().grouping))},toggleColumnGrouping:function(e){n.setGrouping((function(n){return null!=n&&n.includes(e)?n.filter((function(n){return n!==e})):[].concat(null!=n?n:[],[e])}))},getColumnCanGroup:function(e){var t,r,o,u=n.getColumn(e);if(!u)throw new Error;return null!=(t=null!=(r=null!=(o=u.enableGrouping)?o:n.options.enableGrouping)?r:u.defaultCanGroup)?t:!!u.accessorFn},getColumnIsGrouped:function(e){var t;return null==(t=n.getState().grouping)?void 0:t.includes(e)},getColumnGroupedIndex:function(e){var t;return null==(t=n.getState().grouping)?void 0:t.indexOf(e)},resetGrouping:function(){var e,t,r;n.setGrouping(null!=(e=null==(t=n.options)||null==(r=t.initialState)?void 0:r.grouping)?e:[])},getToggleGroupingProps:function(e,t){var r=n.getColumn(e);if(r){var o=r.getCanGroup();return m({title:o?"Toggle Grouping":void 0,onClick:o?function(n){n.persist(),null==r.toggleGrouping||r.toggleGrouping()}:void 0},t)}},getRowIsGrouped:function(e){var t;return!(null==(t=n.getRow(e))||!t.groupingColumnId)},getGroupedRowModel:v((function(){return[n.getState().grouping,n.getSortedRowModel(),n.options.groupRowsFn]}),(function(e,t,r){return r&&e.length?r(n,e,t):t}),"getGroupedRowModel",n.options.debug),getPreGroupedRows:function(){return n.getSortedRowModel().rows},getPreGroupedFlatRows:function(){return n.getSortedRowModel().flatRows},getPreGroupedRowsById:function(){return n.getSortedRowModel().rowsById},getGroupedRows:function(){return n.getGroupedRowModel().rows},getGroupedFlatRows:function(){return n.getGroupedRowModel().flatRows},getGroupedRowsById:function(){return n.getGroupedRowModel().rowsById}}}(r),function(n){return{setExpanded:function(e){return null==n.options.onExpandedChange?void 0:n.options.onExpandedChange(e,d(e,n.getState().expanded))},toggleRowExpanded:function(e,t){e&&n.setExpanded((function(r){var o,u;void 0===r&&(r={});var a,s=!0===r||!(null==(o=r)||!o[e]),d={};if(!0===r?Object.keys(n.getRowsById()).forEach((function(n){d[n]=!0})):d=r,t=null!=(u=t)?u:!s,!s&&t)return i({},d,((a={})[e]=!0,a));if(s&&!t){var f=d;return f[e],l(f,[e].map(g))}return r}))},toggleAllRowsExpanded:function(e){(null!=e?e:!n.getIsAllRowsExpanded())?n.setExpanded(!0):n.setExpanded({})},resetExpanded:function(){var e,t,r;n.setExpanded(null!=(e=null==(t=n.options)||null==(r=t.initialState)?void 0:r.expanded)?e:{})},getIsRowExpanded:function(e){var t,r=n.getRow(e);if(!r)throw new Error;var o=n.getState().expanded;return!!(null!=(t=null==n.options.getIsRowExpanded?void 0:n.options.getIsRowExpanded(r))?t:o||(null==o?void 0:o[e]))},getRowCanExpand:function(e){var t,r,o,u,i=n.getRow(e);if(!i)throw new Error;return null!=(t=null!=(r=null!=(o=null==n.options.getRowCanExpand?void 0:n.options.getRowCanExpand(i))?o:n.options.enableExpanded)?r:n.options.defaultCanExpand)?t:!(null==(u=i.subRows)||!u.length)},getToggleExpandedProps:function(e,t){if(n.getRow(e)){var r=n.getRowCanExpand(e);return m({title:r?"Toggle Expanded":void 0,onClick:r?function(t){t.persist(),n.toggleRowExpanded(e)}:void 0},t)}},getToggleAllRowsExpandedProps:function(e){return m({title:"Toggle All Expanded",onClick:function(e){e.persist(),n.toggleAllRowsExpanded()}},e)},getIsAllRowsExpanded:function(){return!0===n.getState().expanded||!Object.keys(n.getRowsById()).some((function(e){return!n.getIsRowExpanded(e)}))},getExpandedDepth:function(){var e=0;return(!0===n.getState().expanded?Object.keys(n.getRowsById()):Object.keys(n.getState().expanded)).forEach((function(n){var t=n.split(".");e=Math.max(e,t.length)})),e},getExpandedRowModel:v((function(){return[n.getState().expanded,n.getGroupedRowModel(),n.options.expandRowsFn,n.options.paginateExpandedRows]}),(function(e,t,r,o){return r&&o&&Object.keys(null!=e?e:{}).length?r(n,e,t):t}),"getExpandedRowModel",n.options.debug),getPreExpandedRows:function(){return n.getGroupedRowModel().rows},getPreExpandedFlatRows:function(){return n.getGroupedRowModel().flatRows},getPreExpandedRowsById:function(){return n.getGroupedRowModel().rowsById},getExpandedRows:function(){return n.getExpandedRowModel().rows},getExpandedFlatRows:function(){return n.getExpandedRowModel().flatRows},getExpandedRowsById:function(){return n.getExpandedRowModel().rowsById}}}(r),R(r),{rerender:e,initialState:s,internalState:s,reset:function(){r.setState(r.initialState)},updateOptions:function(n){r.options=a(n)},getRowId:function(n,e,t){return""+(t?[t.id,e].join("."):e)},getState:function(){return i({},r.internalState,r.options.state)},setState:function(n,e){void 0===e&&(e=!0);var t=d(n,r.internalState),o=r.options.onStateChange;r.internalState=t,o?o(t):e&&r.rerender()},getDefaultColumn:v((function(){return[r.options.defaultColumn]}),(function(n){var e;return i({header:function(n){return n.header.column.id},footer:function(n){return n.header.column.id},cell:function(n){var e=n.value,t=void 0===e?"":e;return"boolean"==typeof t?t.toString():t}},{defaultIsVisible:!0},{filterType:"auto"},{sortType:"auto"},{aggregationType:"auto"},n=null!=(e=n)?e:{})}),"getDefaultColumn",r.options.debug),getColumnDefs:function(){return r.options.columns},createColumn:function(n,e,t){var o,u,l,a=r.getDefaultColumn(),s=null!=(o=null!=(u=n.id)?u:n.accessorKey)?o:"string"==typeof n.header?n.header:void 0;if(n.accessorFn?l=n.accessorFn:n.accessorKey&&(l=function(e){return e[n.accessorKey]}),!s)throw new Error;var g=i({},b,a,n,{id:""+s,accessorFn:l,parent:t,depth:e,columnDef:n,columns:[],getWidth:function(){return r.getColumnWidth(g.id)},getFlatColumns:v((function(){return[!0]}),(function(){var n;return[g].concat(null==(n=g.columns)?void 0:n.flatMap((function(n){return n.getFlatColumns()})))}),"column.getFlatColumns",r.options.debug),getLeafColumns:v((function(){return[r.getOrderColumnsFn()]}),(function(n){var e;if(null!=(e=g.columns)&&e.length){var t=g.columns.flatMap((function(n){return n.getLeafColumns()}));return n(t)}return[g]}),"column.getLeafColumns",r.options.debug)});return g=Object.assign(g,function(n,e){return{getCanHide:function(){return e.getColumnCanHide(n.id)},getIsVisible:function(){return e.getColumnIsVisible(n.id)},toggleVisibility:function(t){return e.toggleColumnVisibility(n.id,t)},getToggleVisibilityProps:function(e){var t={type:"checkbox",checked:null==n.getIsVisible?void 0:n.getIsVisible(),title:"Toggle Column Visibility",onChange:function(e){null==n.toggleVisibility||n.toggleVisibility(e.target.checked)}};return m(t,e)}}}(g,r),function(n,e){return{getCanPin:function(){return e.getColumnCanPin(n.id)},getPinnedIndex:function(){return e.getColumnPinnedIndex(n.id)},getIsPinned:function(){return e.getColumnIsPinned(n.id)},pin:function(t){return e.pinColumn(n.id,t)}}}(g,r),function(n,e){var t=v((function(){return[n.getPreFilteredRows()]}),(function(e){var t,r,o,u;void 0===e&&(e=[]);for(var i=new Map,l=[null!=(t=null==(r=e[0])?void 0:r.values[n.id])?t:null,null!=(o=null==(u=e[0])?void 0:u.values[n.id])?o:null],a=0;a<e.length;a++){var s,g,d=null==(s=e[a])?void 0:s.values[n.id];i.has(d)?i.set(d,(null!=(g=i.get(d))?g:0)+1):i.set(d,1),d<l[0]?l[0]=d:d>l[1]&&(l[1]=d)}return{preFilteredUniqueValues:i,preFilteredMinMaxValues:l}}),"column.getFacetInfo",e.options.debug);return{filterType:n.filterType,getCanColumnFilter:function(){return e.getColumnCanColumnFilter(n.id)},getCanGlobalFilter:function(){return e.getColumnCanGlobalFilter(n.id)},getColumnFilterIndex:function(){return e.getColumnFilterIndex(n.id)},getIsColumnFiltered:function(){return e.getColumnIsFiltered(n.id)},getColumnFilterValue:function(){return e.getColumnFilterValue(n.id)},setColumnFilterValue:function(t){return e.setColumnFilterValue(n.id,t)},getPreFilteredUniqueValues:function(){return t().preFilteredUniqueValues},getPreFilteredMinMaxValues:function(){return t().preFilteredMinMaxValues},getPreFilteredRows:function(){}}}(g,r),function(n,e){return{sortType:n.sortType,getCanSort:function(){return e.getColumnCanSort(n.id)},getCanMultiSort:function(){return e.getColumnCanMultiSort(n.id)},getSortIndex:function(){return e.getColumnSortIndex(n.id)},getIsSorted:function(){return e.getColumnIsSorted(n.id)},toggleSorting:function(t,r){return e.toggleColumnSorting(n.id,t,r)},getToggleSortingProps:function(t){return e.getToggleSortingProps(n.id,t)}}}(g,r),function(n,e){return{aggregationType:n.aggregationType,getCanGroup:function(){return e.getColumnCanGroup(n.id)},getGroupedIndex:function(){return e.getColumnGroupedIndex(n.id)},getIsGrouped:function(){return e.getColumnIsGrouped(n.id)},toggleGrouping:function(){return e.toggleColumnGrouping(n.id)},getToggleGroupingProps:function(t){return e.getToggleGroupingProps(n.id,t)}}}(g,r),function(n,e){return{getIsResizing:function(){return e.getColumnIsResizing(n.id)},getCanResize:function(){return e.getColumnCanResize(n.id)},resetSize:function(){return e.resetColumnSize(n.id)}}}(g,r)),g},getAllColumns:v((function(){return[r.getColumnDefs()]}),(function(n){return function n(e,t,o){return void 0===o&&(o=0),e.map((function(e){var u=r.createColumn(e,o,t);return u.columns=e.columns?n(e.columns,u,o+1):[],u}))}(n)}),"getAllColumns",r.options.debug),getAllFlatColumns:v((function(){return[r.getAllColumns()]}),(function(n){return n.flatMap((function(n){return n.getFlatColumns()}))}),"getAllFlatColumns",r.options.debug),getAllFlatColumnsById:v((function(){return[r.getAllFlatColumns()]}),(function(n){return n.reduce((function(n,e){return n[e.id]=e,n}),{})}),"getAllFlatColumnsById",r.options.debug),getAllLeafColumns:v((function(){return[r.getAllColumns(),r.getOrderColumnsFn()]}),(function(n,e){return e(n.flatMap((function(n){return n.getLeafColumns()})))}),"getAllLeafColumns",r.options.debug),getColumn:function(n){var e=r.getAllFlatColumnsById()[n];if(!e)throw new Error;return e},getColumnWidth:function(n){var e,t,o,u=r.getColumn(n);if(!u)throw new Error;var i=r.getState().columnSizing[u.id];return Math.min(Math.max(null!=(e=u.minWidth)?e:b.minWidth,null!=(t=null!=i?i:u.width)?t:b.width),null!=(o=u.maxWidth)?o:b.maxWidth)},createCell:function(n,e,t){var o={id:n.id+"_"+e.id,rowId:n.id,columnId:e.id,row:n,column:e,value:t,getCellProps:function(t){return r.getCellProps(n.id,e.id,t)},renderCell:function(){return C(e.cell,{column:e,cell:o,value:t})}};return Object.assign(o,i({},function(n,e,t,r){return{getIsGrouped:function(){return e.getIsGrouped()&&e.id===t.groupingColumnId},getIsPlaceholder:function(){return!n.getIsGrouped()&&e.getIsGrouped()},getIsAggregated:function(){var e;return!n.getIsGrouped()&&!n.getIsPlaceholder()&&(null==(e=t.subRows)?void 0:e.length)>1}}}(o,e,n))),o},createRow:function(n,e,t,o,u){var i={id:n,index:t,original:e,depth:o,values:u,subRows:[],leafRows:[],getRowProps:function(n){return r.getRowProps(i.id,n)},getAllCells:void 0,getAllCellsByColumnId:void 0};return i.getAllCells=v((function(){return[r.getAllLeafColumns()]}),(function(n){return n.map((function(n){return r.createCell(i,n,i.values[n.id])}))}),"",r.options.debug),i.getAllCellsByColumnId=v((function(){return[i.getAllCells()]}),(function(n){return n.reduce((function(n,e){return n[e.columnId]=e,n}),{})}),"row.getAllCellsByColumnId",r.options.debug),i=Object.assign(i,function(n,e){return{_getAllVisibleCells:v((function(){return[n.getAllCells().filter((function(n){return n.column.getIsVisible()})).map((function(n){return n.id})).join("_")]}),(function(e){return n.getAllCells().filter((function(n){return n.column.getIsVisible()}))}),"row._getAllVisibleCells",e.options.debug),getVisibleCells:v((function(){return[n.getLeftVisibleCells(),n.getCenterVisibleCells(),n.getRightVisibleCells()]}),(function(n,e,t){return[].concat(n,e,t)}),"row.getVisibleCells",e.options.debug),getCenterVisibleCells:v((function(){return[n._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right]}),(function(n,e,t){var r=[].concat(null!=e?e:[],null!=t?t:[]);return n.filter((function(n){return!r.includes(n.columnId)}))}),"row.getCenterVisibleCells",e.options.debug),getLeftVisibleCells:v((function(){return[n._getAllVisibleCells(),e.getState().columnPinning.left,,]}),(function(n,e){return(null!=e?e:[]).map((function(e){return n.find((function(n){return n.columnId===e}))})).filter(Boolean)}),"row.getLeftVisibleCells",e.options.debug),getRightVisibleCells:v((function(){return[n._getAllVisibleCells(),e.getState().columnPinning.right]}),(function(n,e){return(null!=e?e:[]).map((function(e){return n.find((function(n){return n.columnId===e}))})).filter(Boolean)}),"row.getRightVisibleCells",e.options.debug)}}(i,r),function(n,e){return{getIsGrouped:function(){return e.getRowIsGrouped(n.id)}}}(i,r),function(n,e){return{toggleExpanded:function(t){e.toggleRowExpanded(n.id,t)},getIsExpanded:function(){return e.getIsRowExpanded(n.id)},getCanExpand:function(){return n.subRows&&!!n.subRows.length},getToggleExpandedProps:function(t){return m({title:"Toggle Row Expanded",onClick:function(t){t.stopPropagation(),e.toggleRowExpanded(n.id)}},t)}}}(i,r)),i},getCoreRowModel:v((function(){return[r.options.data]}),(function(n){r.options.autoResetColumnFilters&&r.getRowModelNonFirst&&r.resetColumnFilters(),r.options.autoResetGlobalFilter&&r.getRowModelNonFirst&&r.resetGlobalFilter(),r.options.autoResetSorting&&r.getRowModelNonFirst&&r.resetSorting(),r.options.autoResetGrouping&&r.getRowModelNonFirst&&r.resetGrouping(),r.options.autoResetExpanded&&r.getRowModelNonFirst&&r.resetExpanded(),r.getRowModelNonFirst=!0;for(var e=[],t=[],o={},u=r.getAllLeafColumns(),i=function n(e,i,l,a,s){void 0===l&&(l=0);for(var g=r.getRowId(e,i,s),d={},f=0;f<u.length;f++){var c=u[f];c&&c.accessorFn&&(d[c.id]=c.accessorFn(e,i))}var m=r.createRow(g,e,i,l,d);if(a.push(m),t.push(m),o[g]=m,r.options.getSubRows){var v=r.options.getSubRows(e,i);if(null!=v&&v.length){m.originalSubRows=v;for(var C=[],w=0;w<m.originalSubRows.length;w++)n(m.originalSubRows[w],w,l+1,C,m);m.subRows=C,m.leafRows=p(C,(function(n){return n.leafRows}))}}},l=0;l<n.length;l++)i(n[l],l,0,e);return{rows:e,flatRows:t,rowsById:o}}),"getRowModel",r.options.debug),getCoreRows:function(){return r.getCoreRowModel().rows},getCoreFlatRows:function(){return r.getCoreRowModel().flatRows},getCoreRowsById:function(){return r.getCoreRowModel().rowsById},getRowModel:function(){return r.getExpandedRowModel()},getRows:function(){return r.getRowModel().rows},getFlatRows:function(){return r.getRowModel().flatRows},getRowsById:function(){return r.getRowModel().rowsById},getRow:function(n){var e=r.getRowsById()[n];if(!e)throw new Error;return e},getCell:function(n,e){var t=r.getRow(n);if(!t)throw new Error;var o=t.getAllCellsByColumnId()[e];if(!o)throw new Error;return o},getTableProps:function(n){return m({role:"table"},n)},getTableBodyProps:function(n){return m({role:"rowgroup"},n)},getRowProps:function(n,e){var t=r.getRow(n);if(t)return m({key:t.id,role:"row"},e)},getCellProps:function(n,e,t){var o=r.getCell(n,e);if(o)return m({key:o.id,role:"gridcell"},t)},getTableWidth:function(){var n,e;return null!=(n=null==(e=r.getHeaderGroups()[0])?void 0:e.headers.reduce((function(n,e){return n+e.getWidth()}),0))?n:0},getLeftTableWidth:function(){var n,e;return null!=(n=null==(e=r.getLeftHeaderGroups()[0])?void 0:e.headers.reduce((function(n,e){return n+e.getWidth()}),0))?n:0},getCenterTableWidth:function(){var n,e;return null!=(n=null==(e=r.getCenterHeaderGroups()[0])?void 0:e.headers.reduce((function(n,e){return n+e.getWidth()}),0))?n:0},getRightTableWidth:function(){var n,e;return null!=(n=null==(e=r.getRightHeaderGroups()[0])?void 0:e.headers.reduce((function(n,e){return n+e.getWidth()}),0))?n:0}});return Object.assign(r,F)}n.columnFilterRowsFn=function(n,e,t){var r=[],o={},u=n.options.filterFromChildrenUp,i=function(t,r){return e.forEach((function(e){var o=e.id,u=e.value,i=n.getColumn(o);if(!i)throw new Error;if(0===r){var l=[].concat(t);i.getPreFilteredRows=function(){return l}}var a=n.getColumnFilterFn(i.id);a&&(t=a(t,[o],u))})),t};if(u){return{rows:function n(e,t){return void 0===t&&(t=0),e=e.filter((function(e){var r;return null==(r=e.subRows)||!r.length||(e.subRows=n(e.subRows,t+1),e.subRows.length)})),(e=i(e,t)).forEach((function(n){r.push(n),o[n.id]=n})),e}(t.rows),flatRows:r,rowsById:o}}return{rows:function n(e,t){return void 0===t&&(t=0),(e=i(e,t)).forEach((function(e){if(r.push(e),o[e.id]=e,!u){var i;if(null==(i=e.subRows)||!i.length)return;e.subRows=n(e.subRows,t+1)}})),e}(t.rows),flatRows:r,rowsById:o}},n.createTable=function n(){return{RowType:function(){return n()},FilterFns:function(){return n()},SortingFns:function(){return n()},AggregationFns:function(){return n()},createColumns:function(n){return n},createColumn:function(n,e){var t;if(e=i({},e,{id:e.id}),"string"==typeof n)return i({},e,{id:null!=(t=e.id)?t:n,accessorKey:n,__generated:!0});if("function"==typeof n)return i({},e,{accessorFn:n,__generated:!0});throw new Error("Invalid accessor")},createGroup:function(n){return i({},n,{__generated:!0})},useTable:function(n){var e=u.useRef(void 0),t=u.useReducer((function(){return{}}),{})[1];return e.current||(e.current=_(n,t)),e.current.updateOptions(n),e.current},types:void 0}},n.expandRowsFn=function(n,e,t){var r=[],o=n.options.expandSubRows;return t.rows.forEach((function e(t){var u;r.push(t),o&&null!=(u=t.subRows)&&u.length&&n.getIsRowExpanded(t.id)&&t.subRows.forEach(e)})),{rows:r,flatRows:t.flatRows,rowsById:t.rowsById}},n.globalFilterRowsFn=function(n,e,t){var r=[],o={},u=n.options.filterFromChildrenUp,i=n.getGlobalFilterFn();if(!i)return t;var l=n.getAllLeafColumns().filter((function(n){return n.getCanGlobalFilter()})).map((function(n){return n.id}));if(u){return{rows:function n(t,u){return t=t.filter((function(e){var t;return null==(t=e.subRows)||!t.length||(e.subRows=n(e.subRows),e.subRows.length)})),(t=i(t,l,e)).forEach((function(n){r.push(n),o[n.id]=n})),t}(t.rows),flatRows:r,rowsById:o}}return{rows:function n(t,a){return(t=i(t,l,e)).forEach((function(e){if(r.push(e),o[e.id]=e,!u){var t;if(null==(t=e.subRows)||!t.length)return;e.subRows=n(e.subRows)}})),t}(t.rows),flatRows:r,rowsById:o}},n.groupRowsFn=function(n,e,t){var r=e.filter((function(e){return n.getColumn(e)})),o=[],u={},i=function e(t,i,l){if(void 0===i&&(i=0),i===r.length)return t;var a=r[i],s=function(n,e){var t=new Map;return n.reduce((function(n,t){var r=""+t.values[e],o=n.get(r);return o?n.set(r,[].concat(o,[t])):n.set(r,[t]),n}),t)}(t,a),g=Array.from(s.entries()).map((function(t,s){var g=t[0],d=t[1],f=a+":"+g,c=e(d,i+1,f=l?l+">"+f:f),m=i?p(d,(function(n){return n.leafRows})):d,v=function(e,t,o){var u={};return n.getAllLeafColumns().forEach((function(i){if(r.includes(i.id))u[i.id]=t[0]?t[0].values[i.id]:null;else{var l=n.getColumnAggregationFn(i.id);if(l){var a=t.map((function(n){return n.values[i.id]})),s=e.map((function(n){var e=n.values[i.id];return!o&&i.aggregateValue&&(e=i.aggregateValue(e)),e}));u[i.id]=l(s,a)}else{if(i.aggregationType)throw console.info({column:i}),new Error("");u[i.id]=null}}})),u}(m,d,i),C=n.createRow(f,void 0,s,i,v);return Object.assign(C,{groupingColumnId:a,groupingValue:g,subRows:c,leafRows:m}),c.forEach((function(n){o.push(n),u[n.id]=n})),C}));return g}(t.rows,0,"");return i.forEach((function(n){o.push(n),u[n.id]=n})),{rows:i,flatRows:o,rowsById:u}},n.sortRowsFn=function(n,e,t){var r=[],o=e.filter((function(e){return n.getColumnCanSort(e.id)})),u={};o.forEach((function(e){var t=n.getColumn(e.id);u[e.id]={sortUndefined:t.sortUndefined,invertSorting:t.invertSorting,sortingFn:n.getColumnSortingFn(e.id)}}));return{rows:function n(e){var t=e.slice();return t.sort((function(n,e){for(var t=0;t<o.length;t+=1){var r,i=o[t],l=u[i.id],a=null!=(r=null==i?void 0:i.desc)&&r;if(l.sortUndefined){var s=void 0===n.values[i.id],g=void 0===e.values[i.id];if(s||g)return s&&g?0:s?1:-1}var d=l.sortingFn(n,e,i.id);if(0!==d)return a&&(d*=-1),l.invertSorting&&(d*=-1),d}return n.index-e.index})),t.forEach((function(e){r.push(e),!e.subRows||e.subRows.length<=1||(e.subRows=n(e.subRows))})),t}(t.rows),flatRows:r,rowsById:t.rowsById}},Object.defineProperty(n,"__esModule",{value:!0})}));
//# sourceMappingURL=index.production.js.map
{
"name": "@tanstack/react-table",
"author": "Tanner Linsley",
"version": "8.0.0-alpha.1",
"version": "8.0.0-alpha.2",
"description": "Hooks for building lightweight, fast and extendable datagrids for React",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -441,3 +441,3 @@ import { RowModel } from '..'

const updateFn = (old?: ColumnFiltersState) => {
const updateFn = (old: ColumnFiltersState) => {
return functionalUpdate(updater, old)?.filter(filter => {

@@ -444,0 +444,0 @@ const column = leafColumns.find(d => d.id === filter.id)

import {
Cell,
Column,
CoreHeader,
FooterGroupProps,

@@ -17,2 +18,4 @@ FooterProps,

import * as ColumnSizing from './ColumnSizing'
export type HeadersRow<

@@ -323,3 +326,3 @@ TData,

let header: Header<
let header: CoreHeader<
TData,

@@ -343,3 +346,3 @@ TValue,

const recurse = (
header: Header<
header: CoreHeader<
TData,

@@ -370,3 +373,3 @@ TValue,

>[] => {
const leafHeaders: Header<
const leafHeaders: CoreHeader<
TData,

@@ -380,3 +383,9 @@ TValue,

const recurseHeader = (
h: Header<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>
h: CoreHeader<
TData,
TValue,
TFilterFns,
TSortingFns,
TAggregationFns
>
) => {

@@ -390,3 +399,10 @@ if (h.subHeaders && h.subHeaders.length) {

recurseHeader(header)
return leafHeaders
return leafHeaders as Header<
TData,
TValue,
TFilterFns,
TSortingFns,
TAggregationFns
>[]
},

@@ -401,3 +417,24 @@ getHeaderProps: userProps =>

return header
header = Object.assign(
header,
ColumnSizing.createHeader(
header as Header<
TData,
TValue,
TFilterFns,
TSortingFns,
TAggregationFns
>,
instance
)
)
// Yes, we have to convert instance to uknown, because we know more than the compiler here.
return header as Header<
TData,
TValue,
TFilterFns,
TSortingFns,
TAggregationFns
>
},

@@ -404,0 +441,0 @@

@@ -59,2 +59,10 @@ import React from 'react'

import { Overwrite } from './utils'
import {
ColumnSizingColumn,
ColumnSizingColumnDef,
ColumnSizingHeader,
ColumnSizingInstance,
ColumnSizingOptions,
ColumnSizingTableState,
} from './features/ColumnSizing'

@@ -85,2 +93,9 @@ // declare global {

GroupingInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> &
ColumnSizingInstance<
TData,
TValue,
TFilterFns,
TSortingFns,
TAggregationFns
> &
ExpandedInstance<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>

@@ -103,5 +118,6 @@

GroupingOptions<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> &
ExpandedOptions<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>
ExpandedOptions<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> &
ColumnSizingOptions
export type Updater<T> = T | ((old?: T) => T)
export type Updater<T> = T | ((old: T) => T)
export type OnChangeFn<T> = (updaterOrValue: Updater<T>, value: T) => void

@@ -115,3 +131,4 @@

ExpandedTableState &
GroupingTableState
GroupingTableState &
ColumnSizingTableState

@@ -146,3 +163,4 @@ export type Row<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> =

SortingColumnDef<TSortingFns> &
GroupingColumnDef<TAggregationFns>
GroupingColumnDef<TAggregationFns> &
ColumnSizingColumnDef

@@ -156,3 +174,4 @@ export type Column<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> =

SortingColumn<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> &
GroupingColumn<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>
GroupingColumn<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> &
ColumnSizingColumn<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>

@@ -170,3 +189,13 @@ export type Cell<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = {

export type Header<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> = {
export type Header<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> =
CoreHeader<TData, TValue, TFilterFns, TSortingFns, TAggregationFns> &
ColumnSizingHeader<TData, TValue, TFilterFns, TSortingFns, TAggregationFns>
export type CoreHeader<
TData,
TValue,
TFilterFns,
TSortingFns,
TAggregationFns
> = {
id: string

@@ -173,0 +202,0 @@ depth: number

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc