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

@tanstack/svelte-table

Package Overview
Dependencies
Maintainers
1
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/svelte-table - npm Package Compare versions

Comparing version 8.0.0-alpha.67 to 8.0.0-alpha.68

build/cjs/svelte-table/src/index.js

125

build/stats-react.json

@@ -10,19 +10,24 @@ {

{
"uid": "ed1d-176",
"name": "\u0000rollupPluginBabelHelpers.js"
},
{
"name": "packages/svelte-table/src",
"name": "packages",
"children": [
{
"uid": "ed1d-178",
"name": "placeholder.svelte"
"name": "table-core/build/esm/index.js",
"uid": "a584-173"
},
{
"uid": "ed1d-180",
"name": "render-component.ts"
},
{
"uid": "ed1d-182",
"name": "index.ts"
"name": "svelte-table/src",
"children": [
{
"uid": "a584-175",
"name": "placeholder.svelte"
},
{
"uid": "a584-177",
"name": "render-component.ts"
},
{
"uid": "a584-179",
"name": "index.ts"
}
]
}

@@ -37,32 +42,32 @@ ]

"nodeParts": {
"ed1d-176": {
"renderedLength": 1010,
"gzipLength": 437,
"a584-173": {
"renderedLength": 140857,
"gzipLength": 24094,
"brotliLength": 0,
"mainUid": "ed1d-175"
"mainUid": "a584-172"
},
"ed1d-178": {
"a584-175": {
"renderedLength": 925,
"gzipLength": 444,
"brotliLength": 0,
"mainUid": "ed1d-177"
"mainUid": "a584-174"
},
"ed1d-180": {
"renderedLength": 1682,
"gzipLength": 621,
"a584-177": {
"renderedLength": 1365,
"gzipLength": 519,
"brotliLength": 0,
"mainUid": "ed1d-179"
"mainUid": "a584-176"
},
"ed1d-182": {
"renderedLength": 2182,
"gzipLength": 776,
"a584-179": {
"renderedLength": 1958,
"gzipLength": 709,
"brotliLength": 0,
"mainUid": "ed1d-181"
"mainUid": "a584-178"
}
},
"nodeMetas": {
"ed1d-175": {
"id": "\u0000rollupPluginBabelHelpers.js",
"a584-172": {
"id": "/packages/table-core/build/esm/index.js",
"moduleParts": {
"index.production.js": "ed1d-176"
"index.production.js": "a584-173"
},

@@ -72,17 +77,14 @@ "imported": [],

{
"uid": "ed1d-181"
},
{
"uid": "ed1d-179"
"uid": "a584-178"
}
]
},
"ed1d-177": {
"a584-174": {
"id": "/packages/svelte-table/src/placeholder.svelte",
"moduleParts": {
"index.production.js": "ed1d-178"
"index.production.js": "a584-175"
},
"imported": [
{
"uid": "ed1d-185"
"uid": "a584-181"
}

@@ -92,17 +94,14 @@ ],

{
"uid": "ed1d-181"
"uid": "a584-178"
}
]
},
"ed1d-179": {
"a584-176": {
"id": "/packages/svelte-table/src/render-component.ts",
"moduleParts": {
"index.production.js": "ed1d-180"
"index.production.js": "a584-177"
},
"imported": [
{
"uid": "ed1d-175"
},
{
"uid": "ed1d-185"
"uid": "a584-181"
}

@@ -112,26 +111,23 @@ ],

{
"uid": "ed1d-181"
"uid": "a584-178"
}
]
},
"ed1d-181": {
"a584-178": {
"id": "/packages/svelte-table/src/index.ts",
"moduleParts": {
"index.production.js": "ed1d-182"
"index.production.js": "a584-179"
},
"imported": [
{
"uid": "ed1d-175"
"uid": "a584-172"
},
{
"uid": "ed1d-183"
"uid": "a584-174"
},
{
"uid": "ed1d-177"
"uid": "a584-180"
},
{
"uid": "ed1d-184"
},
{
"uid": "ed1d-179"
"uid": "a584-176"
}

@@ -142,14 +138,3 @@ ],

},
"ed1d-183": {
"id": "@tanstack/table-core",
"moduleParts": {},
"imported": [],
"importedBy": [
{
"uid": "ed1d-181"
}
],
"isExternal": true
},
"ed1d-184": {
"a584-180": {
"id": "svelte/store",

@@ -160,3 +145,3 @@ "moduleParts": {},

{
"uid": "ed1d-181"
"uid": "a584-178"
}

@@ -166,3 +151,3 @@ ],

},
"ed1d-185": {
"a584-181": {
"id": "svelte/internal",

@@ -173,6 +158,6 @@ "moduleParts": {},

{
"uid": "ed1d-177"
"uid": "a584-174"
},
{
"uid": "ed1d-179"
"uid": "a584-176"
}

@@ -179,0 +164,0 @@ ],

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

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@tanstack/table-core"),require("svelte/internal"),require("svelte/store")):"function"==typeof define&&define.amd?define(["exports","@tanstack/table-core","svelte/internal","svelte/store"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SvelteTable={},e.TableCore,e.SvelteInternal,e.SvelteStore)}(this,(function(e,t,n,o){"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r.apply(this,arguments)}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){let t;return{c(){t=n.text(e[0])},m(e,o){n.insert(e,t,o)},p(e,[o]){1&o&&n.set_data(t,e[0])},i:n.noop,o:n.noop,d(e){e&&n.detach(t)}}}function c(e,t,n){let{content:o}=t;return e.$$set=e=>{"content"in e&&n(0,o=e.content)},[o]}class u extends n.SvelteComponent{constructor(e){super(),n.init(this,e,c,a,n.safe_not_equal,{content:0})}}var s="undefined"==typeof window?function(e,t){return n.create_ssr_component((function(o,r,i,a){return""+n.validate_component(e,"Comp").$$render(o,t,{},{})}))}:function(e,t){return function(o){var r,a;function c(r){var i;return i=o.call(this)||this,n.init(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i),r,null,(function(o){return function(e,t,o){var r,i;return r=new t({props:o,$$inline:!0}),{c:function(){n.create_component(r.$$.fragment)},m:function(e,t){n.mount_component(r,e,t),i=!0},p:n.noop,i:function(e){i||(n.transition_in(r.$$.fragment,e),i=!0)},o:function(e){n.transition_out(r.$$.fragment,e),i=!1},d:function(e){n.destroy_component(r,e)}}}(0,e,t)}),n.safe_not_equal,{},void 0),i}return a=o,(r=c).prototype=Object.create(a.prototype),r.prototype.constructor=r,i(r,a),c}(n.SvelteComponent)};function f(e,t){return e?e instanceof Function?e(t):s(u,{content:e}):null}var l=t.createTableFactory({render:f});e.createTable=l,e.createTableInstance=function(e,n){var i;i="subscribe"in n?n:o.readable(n);var a=r({},e.options,{state:{},onStateChange:function(){},render:f},o.get(i)),c=t.createTableInstance(a),u=o.writable(c.initialState),s=o.derived([u,i],(function(e){return e})),l=o.readable(c,(function(e){var t=s.subscribe((function(t){var n=t[0],o=t[1];c.setOptions((function(e){return r({},e,o,{state:r({},n,o.state),onStateChange:function(e){console.log("STATE CHANGE"),e instanceof Function?u.update(e):u.set(e),null==a.onStateChange||a.onStateChange(e)}})})),e(c)}));return function(){t()}}));return l},e.render=f,e.renderComponent=s,Object.keys(t).forEach((function(n){"default"===n||e.hasOwnProperty(n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})),Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("svelte/internal"),require("svelte/store")):"function"==typeof define&&define.amd?define(["exports","svelte/internal","svelte/store"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SvelteTable={},e.SvelteInternal,e.SvelteStore)}(this,(function(e,t,n){"use strict";
/**
* table-core
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function l(e,t){return"function"==typeof e?e(t):e}function o(e,t){return n=>{t.setState((t=>({...t,[e]:l(n,t[e])})))}}function r(e){return e instanceof Function}function i(e,t){const n=[],l=e=>{e.forEach((e=>{n.push(e);const o=t(e);null!=o&&o.length&&l(o)}))};return l(e),n}function u(e,t,n){let l,o=[];return()=>{let r;n.key&&n.debug&&(r=Date.now());const i=e();if(!(i.length!==o.length||i.some(((e,t)=>o[t]!==e))))return l;let u;if(o=i,n.key&&n.debug&&(u=Date.now()),l=t(...i),null==n||null==n.onChange||n.onChange(l),n.key&&n.debug&&null!=n&&n.debug()){const e=Math.round(100*(Date.now()-r))/100,t=Math.round(100*(Date.now()-u))/100,l=t/16,o=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info("%c⏱ "+o(t,5)+" /"+o(e,5)+" ms","\n font-size: .6rem;\n font-weight: bold;\n color: hsl("+Math.max(0,Math.min(120-120*l,120))+"deg 100% 31%);",null==n?void 0:n.key)}return l}}const a={createInstance:e=>({getDefaultColumn:u((()=>[e.options.defaultColumn]),(t=>{var n;return t=null!=(n=t)?n:{},{header:e=>e.header.column.id,footer:e=>e.header.column.id,cell:e=>{var t,n,l;return null!=(t=null==(n=(l=e.getValue()).toString)?void 0:n.call(l))?t:null},...e._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultColumn?void 0:t.getDefaultColumn())),{}),...t}}),{debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns},key:!1}),getColumnDefs:()=>e.options.columns,createColumn:(t,n,l)=>{var o,r;const i=e.getDefaultColumn();let a,s=null!=(o=null!=(r=t.id)?r:t.accessorKey)?o:"string"==typeof t.header?t.header:void 0;if(t.accessorFn?a=t.accessorFn:t.accessorKey&&(a=e=>e[t.accessorKey]),!s)throw new Error;let g={...i,...t,id:""+s,accessorFn:a,parent:l,depth:n,columnDef:t,columnDefType:t.columnDefType,columns:[],getFlatColumns:u((()=>[!0]),(()=>{var e;return[g,...null==(e=g.columns)?void 0:e.flatMap((e=>e.getFlatColumns()))]}),{key:"column.getFlatColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:u((()=>[e._getOrderColumnsFn()]),(e=>{var t;if(null!=(t=g.columns)&&t.length){let t=g.columns.flatMap((e=>e.getLeafColumns()));return e(t)}return[g]}),{key:"column.getLeafColumns",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};return g=e._features.reduce(((t,n)=>Object.assign(t,null==n.createColumn?void 0:n.createColumn(g,e))),g),g},getAllColumns:u((()=>[e.getColumnDefs()]),(t=>{const n=function(t,l,o){return void 0===o&&(o=0),t.map((t=>{const r=e.createColumn(t,o,l);return r.columns=t.columns?n(t.columns,r,o+1):[],r}))};return n(t)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllFlatColumns:u((()=>[e.getAllColumns()]),(e=>e.flatMap((e=>e.getFlatColumns()))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllFlatColumnsById:u((()=>[e.getAllFlatColumns()]),(e=>e.reduce(((e,t)=>(e[t.id]=t,e)),{})),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getAllLeafColumns:u((()=>[e.getAllColumns(),e._getOrderColumnsFn()]),((e,t)=>t(e.flatMap((e=>e.getLeafColumns())))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getColumn:t=>{const n=e.getAllFlatColumnsById()[t];if(!n)throw new Error;return n}})},s={createInstance:e=>({getRowId:(t,n,l)=>{var o;return null!=(o=null==e.options.getRowId?void 0:e.options.getRowId(t,n,l))?o:""+(l?[l.id,n].join("."):n)},createRow:(t,n,l,o,r)=>{let u={id:t,index:l,original:n,depth:o,valuesCache:{},getValue:t=>{if(u.valuesCache.hasOwnProperty(t))return u.valuesCache[t];const n=e.getColumn(t);if(!n.accessorFn)throw new Error;return u.valuesCache[t]=n.accessorFn(u.original,l),u.valuesCache[t]},subRows:null!=r?r:[],getLeafRows:()=>i(u.subRows,(e=>e.subRows))};for(let t=0;t<e._features.length;t++){const n=e._features[t];Object.assign(u,null==n||null==n.createRow?void 0:n.createRow(u,e))}return u},getCoreRowModel:()=>(e._getCoreRowModel||(e._getCoreRowModel=e.options.getCoreRowModel(e)),e._getCoreRowModel()),getRowModel:()=>e.getPaginationRowModel(),getRow:t=>{const n=e.getRowModel().rowsById[t];if(!n)throw new Error;return n}})},g={createRow:(e,t)=>({getAllCells:u((()=>[t.getAllLeafColumns()]),(n=>n.map((n=>t.createCell(e,n,n.id)))),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getAllCellsByColumnId:u((()=>[e.getAllCells()]),(e=>e.reduce(((e,t)=>(e[t.columnId]=t,e)),{})),{key:"row.getAllCellsByColumnId",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>({createCell:(t,n,l)=>{const o={id:t.id+"_"+n.id,rowId:t.id,columnId:l,row:t,column:n,getValue:()=>t.getValue(l),renderCell:()=>n.cell?e.render(n.cell,{instance:e,column:n,row:t,cell:o,getValue:o.getValue}):null};return e._features.forEach((l=>{Object.assign(o,null==l.createCell?void 0:l.createCell(o,n,t,e))}),{}),o},getCell:(t,n)=>{const l=e.getRow(t);if(!l)throw new Error;const o=l.getAllCellsByColumnId()[n];if(!o)throw new Error;return o}})},d={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},c={getDefaultColumn:()=>d,getInitialState:e=>({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]},...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:o("columnSizing",e),onColumnSizingInfoChange:o("columnSizingInfo",e)}),createColumn:(e,t)=>({getSize:()=>{var n,l,o;const r=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.minSize)?n:d.minSize,null!=(l=null!=r?r:e.size)?l:d.size),null!=(o=e.maxSize)?o:d.maxSize)},getStart:n=>{const l=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),o=l.findIndex((t=>t.id===e.id));if(o>0){const e=l[o-1];return e.getStart(n)+e.getSize()}return 0},resetSize:()=>{t.setColumnSizing((t=>{let{[e.id]:n,...l}=t;return l}))},getCanResize:()=>{var n,l;return(null==(n=e.enableResizing)||n)&&(null==(l=t.options.enableColumnResizing)||l)},getIsResizing:()=>t.getState().columnSizingInfo.isResizingColumn===e.id}),createHeader:(e,t)=>({getSize:()=>{let t=0;const n=e=>{var l;e.subHeaders.length?e.subHeaders.forEach(n):t+=null!=(l=e.column.getSize())?l:0};return n(e),t},getStart:()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},getResizeHandler:()=>{const n=t.getColumn(e.column.id),l=n.getCanResize();return o=>{if(!l)return;if(null==o.persist||o.persist(),m(o)&&o.touches&&o.touches.length>1)return;const r=n.getSize(),i=e?e.getLeafHeaders().map((e=>[e.column.id,e.column.getSize()])):[[n.id,n.getSize()]],u=m(o)?Math.round(o.touches[0].clientX):o.clientX,a=(e,n)=>{if("number"!=typeof n)return;let l={};t.setColumnSizingInfo((e=>{var t,o;const r=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),i=Math.max(r/(null!=(o=null==e?void 0:e.startSize)?o:0),-.999999);return e.columnSizingStart.forEach((e=>{let[t,n]=e;l[t]=Math.round(100*Math.max(n+n*i,0))/100})),{...e,deltaOffset:r,deltaPercentage:i}})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((e=>({...e,...l})))},s={moveHandler:e=>{return t=e.clientX,a("move",t);var t},upHandler:e=>{var n;document.removeEventListener("mousemove",s.moveHandler),document.removeEventListener("mouseup",s.upHandler),n=e.clientX,a("end",n),t.setColumnSizingInfo((e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})))}},g=!!f()&&{passive:!1};m(o)||(document.addEventListener("mousemove",s.moveHandler,g),document.addEventListener("mouseup",s.upHandler,g)),t.setColumnSizingInfo((e=>({...e,startOffset:u,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:i,isResizingColumn:n.id})))}}}),createInstance:e=>({setColumnSizing:t=>null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t),setColumnSizingInfo:t=>null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t),resetColumnSizing:()=>{var t;e.setColumnSizing(null!=(t=e.initialState.columnSizing)?t:{})},resetHeaderSizeInfo:()=>{var t;e.setColumnSizingInfo(null!=(t=e.initialState.columnSizingInfo)?t:{})},getTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.column.getSize()),0))?t:0},getLeftTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.column.getSize()),0))?t:0},getCenterTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.column.getSize()),0))?t:0},getRightTotalSize:()=>{var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce(((e,t)=>e+t.column.getSize()),0))?t:0}})};let p=null;function f(){if("boolean"==typeof p)return p;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(t){e=!1}return p=e,p}function m(e){return"touchstart"===e.type}const b={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:o("expanded",e),autoResetExpanded:!0,expandSubRows:!0,paginateExpandedRows:!0}),createInstance:e=>{let t=!1;return{_autoResetExpanded:()=>{t?!1!==e.options.autoResetAll&&(!0===e.options.autoResetAll||e.options.autoResetExpanded)&&e.resetExpanded():t=!0},setExpanded:t=>null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t),toggleAllRowsExpanded:t=>{(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},resetExpanded:()=>{var t,n;e.setExpanded(null!=(t=null==(n=e.initialState)?void 0:n.expanded)?t:{})},getCanSomeRowsExpand:()=>e.getRowModel().flatRows.some((e=>e.getCanExpand())),getToggleAllRowsExpandedHandler:()=>t=>{null==t.persist||t.persist(),e.toggleAllRowsExpanded()},getIsSomeRowsExpanded:()=>{const t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},getIsAllRowsExpanded:()=>!0===e.getState().expanded||!e.getRowModel().flatRows.some((e=>e.getIsExpanded())),getExpandedDepth:()=>{let t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((e=>{const n=e.split(".");t=Math.max(t,n.length)})),t},getPreExpandedRowModel:()=>e.getGroupedRowModel(),getExpandedRowModel:()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())}},createRow:(e,t)=>({toggleExpanded:n=>{t.setExpanded((l=>{var o;const r=!0===l||!(null==l||!l[e.id]);let i={};if(!0===l?Object.keys(t.getRowModel().rowsById).forEach((e=>{i[e]=!0})):i=l,n=null!=(o=n)?o:!r,!r&&n)return{...i,[e.id]:!0};if(r&&!n){const{[e.id]:t,...n}=i;return n}return l}))},getIsExpanded:()=>{var n;const l=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===l||(null==l?void 0:l[e.id]))},getCanExpand:()=>{var n,l,o;return(null==(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))||n)&&(null==(l=t.options.enableExpanding)||l)&&!(null==(o=e.subRows)||!o.length)},getToggleExpandedHandler:()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}})},w=(e,t,n)=>{const l=n.toLowerCase();return e.getValue(t).toLowerCase().includes(l)};w.autoRemove=e=>V(e);const C=(e,t,n)=>e.getValue(t).includes(n);C.autoRemove=e=>V(e);const h=(e,t,n)=>e.getValue(t).toLowerCase()===n.toLowerCase();h.autoRemove=e=>V(e);const v=(e,t,n)=>e.getValue(t).includes(n);v.autoRemove=e=>V(e)||!(null!=e&&e.length);const S=(e,t,n)=>!n.some((n=>!e.getValue(t).includes(n)));S.autoRemove=e=>V(e)||!(null!=e&&e.length);const R=(e,t,n)=>n.some((n=>e.getValue(t).includes(n)));R.autoRemove=e=>V(e)||!(null!=e&&e.length);const F=(e,t,n)=>e.getValue(t)===n;F.autoRemove=e=>V(e);const M=(e,t,n)=>e.getValue(t)==n;M.autoRemove=e=>V(e);const I=(e,t,n)=>{let[l,o]=n;const r=e.getValue(t);return r>=l&&r<=o};I.resolveFilterValue=e=>{let[t,n]=e,l="number"!=typeof t?parseFloat(t):t,o="number"!=typeof n?parseFloat(n):n,r=null===t||Number.isNaN(l)?-1/0:l,i=null===n||Number.isNaN(o)?1/0:o;if(r>i){const e=r;r=i,i=e}return[r,i]},I.autoRemove=e=>V(e)||V(e[0])&&V(e[1]);const y={includesString:w,includesStringSensitive:C,equalsString:h,arrIncludes:v,arrIncludesAll:S,arrIncludesSome:R,equals:F,weakEquals:M,inNumberRange:I};function V(e){return null==e||""===e}const x={getDefaultColumn:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:o("columnFilters",e),onGlobalFilterChange:o("globalFilter",e),filterFromLeafRows:!1,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n,l;return"string"==typeof(null==(n=e.getCoreRowModel().flatRows[0])||null==(l=n.getAllCellsByColumnId()[t.id])?void 0:l.getValue())}}),createColumn:(e,t)=>({filterFn:e.filterFn,getAutoFilterFn:()=>{const n=t.getCoreRowModel().flatRows[0],l=null==n?void 0:n.getValue(e.id);return"string"==typeof l?y.includesString:"number"==typeof l?y.inNumberRange:null!==l&&"object"==typeof l?y.equals:Array.isArray(l)?y.arrIncludes:y.weakEquals},getFilterFn:()=>{var n;const l=t.options.filterFns;return r(e.filterFn)?e.filterFn:"auto"===e.filterFn?e.getAutoFilterFn():null!=(n=null==l?void 0:l[e.filterFn])?n:y[e.filterFn]},getCanFilter:()=>{var n,l,o;return(null==(n=e.enableColumnFilter)||n)&&(null==(l=t.options.enableColumnFilters)||l)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},getCanGlobalFilter:()=>{var n,l,o,r;return(null==(n=e.enableGlobalFilter)||n)&&(null==(l=t.options.enableGlobalFilter)||l)&&(null==(o=t.options.enableFilters)||o)&&(null==(r=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||r)&&!!e.accessorFn},getIsFiltered:()=>e.getFilterIndex()>-1,getFilterValue:()=>{var n,l;return null==(n=t.getState().columnFilters)||null==(l=n.find((t=>t.id===e.id)))?void 0:l.value},getFilterIndex:()=>{var n,l;return null!=(n=null==(l=t.getState().columnFilters)?void 0:l.findIndex((t=>t.id===e.id)))?n:-1},setFilterValue:n=>{t.setColumnFilters((t=>{const o=e.getFilterFn(),r=null==t?void 0:t.find((t=>t.id===e.id)),i=l(n,r?r.value:void 0);var u;if(A(o,i,e))return null!=(u=null==t?void 0:t.filter((t=>t.id!==e.id)))?u:[];const a={id:e.id,value:i};var s;return r?null!=(s=null==t?void 0:t.map((t=>t.id===e.id?a:t)))?s:[]:null!=t&&t.length?[...t,a]:[a]}))},_getFacetedRowModel:t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),getFacetedRowModel:()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),_getFacetedUniqueValues:t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),getFacetedUniqueValues:()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,_getFacetedMinMaxValues:t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),getFacetedMinMaxValues:()=>e._getFacetedMinMaxValues?e._getFacetedMinMaxValues():[NaN,NaN]}),createRow:(e,t)=>({columnFilterMap:{},subRowsByFacetId:{}}),createInstance:e=>({getGlobalAutoFilterFn:()=>y.includesString,getGlobalFilterFn:()=>{var t;const{filterFns:n,globalFilterFn:l}=e.options;return r(l)?l:"auto"===l?e.getGlobalAutoFilterFn():null!=(t=null==n?void 0:n[l])?t:y[l]},setColumnFilters:t=>{const n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((e=>{var o;return null==(o=l(t,e))?void 0:o.filter((e=>{const t=n.find((t=>t.id===e.id));if(t){if(A(t.getFilterFn(),e.value,t))return!1}return!0}))}))},setGlobalFilter:t=>{null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},resetGlobalFilter:()=>{e.setGlobalFilter(e.initialState.globalFilter)},resetColumnFilters:()=>{var t,n;e.setColumnFilters(null!=(t=null==(n=e.initialState)?void 0:n.columnFilters)?t:[])},getPreFilteredRowModel:()=>e.getCoreRowModel(),_getFilteredRowModel:e.options.getFilteredRowModel&&e.options.getFilteredRowModel(e),getFilteredRowModel:()=>e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel(),_getGlobalFacetedRowModel:e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),getGlobalFacetedRowModel:()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),_getGlobalFacetedUniqueValues:e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),getGlobalFacetedUniqueValues:()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,_getGlobalFacetedMinMaxValues:e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),getGlobalFacetedMinMaxValues:()=>e._getGlobalFacetedMinMaxValues?e._getGlobalFacetedMinMaxValues():[NaN,NaN]})};function A(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||void 0===t||"string"==typeof t&&!t}const P={sum:function(e,t){return t().reduce(((e,t)=>e+("number"==typeof t?t:0)),0)},min:function(e,t){let n;for(const e of t())null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);return n},max:function(e,t){let n;for(const e of t())null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);return n},extent:function(e,t){let n,l;for(const e of t())null!=e&&(void 0===n?e>=e&&(n=l=e):(n>e&&(n=e),l<e&&(l=e)));return[n,l]},mean:function(e){let t=0,n=0;for(let l of e())null!=l&&(l=+l)>=l&&(++t,n+=l);return t?n/t:void 0},median:function(e){const t=e();if(!t.length)return;let n=0,l=0;return t.forEach((e=>{"number"==typeof e&&(n=Math.min(n,e),l=Math.max(l,e))})),(n+l)/2},unique:function(e){return Array.from(new Set(e()).values())},uniqueCount:function(e){return new Set(e()).size},count:function(e){return e().length}};const _={getDefaultColumn:()=>({aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:o("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>({toggleGrouping:()=>{t.setGrouping((t=>null!=t&&t.includes(e.id)?t.filter((t=>t!==e.id)):[...null!=t?t:[],e.id]))},getCanGroup:()=>{var n,l,o,r;return null!=(n=null==(l=null!=(o=null==(r=e.enableGrouping)||r)?o:t.options.enableGrouping)||l)?n:!!e.accessorFn},getIsGrouped:()=>{var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},getGroupedIndex:()=>{var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},getToggleGroupingHandler:()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},getColumnAutoAggregationFn:()=>{const n=t.getCoreRowModel().flatRows[0],l=null==n?void 0:n.getValue(e.id);return"number"==typeof l?P.sum:"[object Date]"===Object.prototype.toString.call(l)?P.extent:P.count},getColumnAggregationFn:()=>{var n;const l=t.options.aggregationFns;if(!e)throw new Error;return r(e.aggregationFn)?e.aggregationFn:"auto"===e.aggregationFn?e.getColumnAutoAggregationFn():null!=(n=null==l?void 0:l[e.aggregationFn])?n:P[e.aggregationFn]}}),createInstance:e=>({setGrouping:t=>null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t),resetGrouping:()=>{var t,n;e.setGrouping(null!=(t=null==(n=e.initialState)?void 0:n.grouping)?t:[])},getPreGroupedRowModel:()=>e.getSortedRowModel(),getGroupedRowModel:()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())}),createRow:(e,t)=>({getIsGrouped:()=>!!e.groupingColumnId,groupingValuesCache:{}}),createCell:(e,t,n,l)=>({getIsGrouped:()=>t.getIsGrouped()&&t.id===n.groupingColumnId,getIsPlaceholder:()=>!e.getIsGrouped()&&t.getIsGrouped(),getIsAggregated:()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&(null==(t=n.subRows)?void 0:t.length)>1},renderAggregatedCell:()=>{var o;const r=null!=(o=t.aggregatedCell)?o:t.cell;return r?l.render(r,{instance:l,column:t,row:n,cell:e,getValue:e.getValue}):null}})};function E(e,t,n){if(null==t||!t.length||!n)return e;const l=e.filter((e=>!t.includes(e.id)));if("remove"===n)return l;return[...t.map((t=>e.find((e=>e.id===t)))).filter(Boolean),...l]}const G={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:o("columnOrder",e)}),createInstance:e=>({setColumnOrder:t=>null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t),resetColumnOrder:()=>{var t;e.setColumnOrder(null!=(t=e.initialState.columnOrder)?t:[])},_getOrderColumnsFn:u((()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]),((e,t,n)=>l=>{let o=[];if(null!=e&&e.length){const t=[...e],n=[...l];for(;n.length&&t.length;){const e=t.shift(),l=n.findIndex((t=>t.id===e));l>-1&&o.push(n.splice(l,1)[0])}o=[...o,...n]}else o=l;return E(o,t,n)}),{key:!1})})},H={getInitialState:e=>({...e,pagination:{pageCount:-1,pageIndex:0,pageSize:10,...null==e?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:o("pagination",e),autoResetPageIndex:!0}),createInstance:e=>{let t=!1;return{_autoResetPageIndex:()=>{t?!1!==e.options.autoResetAll&&(!0===e.options.autoResetAll||e.options.autoResetPageIndex)&&e.resetPageIndex():t=!0},setPagination:t=>null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((e=>l(t,e))),resetPagination:()=>{var t;e.setPagination(null!=(t=e.initialState.pagination)?t:{pageIndex:0,pageSize:10,pageCount:-1})},setPageIndex:t=>{e.setPagination((e=>{let n=l(t,e.pageIndex);const o=e.pageCount&&e.pageCount>0?e.pageCount-1:Number.MAX_SAFE_INTEGER;return n=Math.min(Math.max(0,n),o),{...e,pageIndex:n}}))},resetPageIndex:()=>{e.setPageIndex(0)},resetPageSize:()=>{var t,n,l;e.setPageSize(null!=(t=null==(n=e.initialState)||null==(l=n.pagination)?void 0:l.pageSize)?t:10)},setPageSize:t=>{e.setPagination((e=>{const n=Math.max(1,l(t,e.pageSize)),o=e.pageSize*e.pageIndex,r=Math.floor(o/n);return{...e,pageIndex:r,pageSize:n}}))},setPageCount:t=>e.setPagination((e=>{let n=l(t,e.pageCount);return"number"==typeof n&&(n=Math.max(-1,n)),{...e,pageCount:n}})),getPageOptions:u((()=>[e.getState().pagination.pageSize,e.getState().pagination.pageCount]),((e,t)=>{let n=[];return t&&t>0&&(n=[...new Array(t)].fill(null).map(((e,t)=>t))),n}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getCanPreviousPage:()=>e.getState().pagination.pageIndex>0,getCanNextPage:()=>{const{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return-1===n||0!==n&&t<n-1},previousPage:()=>e.setPageIndex((e=>e-1)),nextPage:()=>e.setPageIndex((e=>e+1)),getPrePaginationRowModel:()=>e.getExpandedRowModel(),getPaginationRowModel:()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),getPageCount:()=>{const{pageCount:t}=e.getState().pagination;return t>0?t:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}}},z={getInitialState:e=>({columnPinning:{left:[],right:[]},...e}),getDefaultOptions:e=>({onColumnPinningChange:o("columnPinning",e)}),createColumn:(e,t)=>({pin:n=>{const l=e.getLeafColumns().map((e=>e.id)).filter(Boolean);t.setColumnPinning((e=>{var t,o,r,i,u,a;return"right"===n?{left:(null!=(r=null==e?void 0:e.left)?r:[]).filter((e=>!(null!=l&&l.includes(e)))),right:[...(null!=(i=null==e?void 0:e.right)?i:[]).filter((e=>!(null!=l&&l.includes(e)))),...l]}:"left"===n?{left:[...(null!=(u=null==e?void 0:e.left)?u:[]).filter((e=>!(null!=l&&l.includes(e)))),...l],right:(null!=(a=null==e?void 0:e.right)?a:[]).filter((e=>!(null!=l&&l.includes(e))))}:{left:(null!=(t=null==e?void 0:e.left)?t:[]).filter((e=>!(null!=l&&l.includes(e)))),right:(null!=(o=null==e?void 0:e.right)?o:[]).filter((e=>!(null!=l&&l.includes(e))))}}))},getCanPin:()=>e.getLeafColumns().some((e=>{var n,l;return(null==(n=e.enablePinning)||n)&&(null==(l=t.options.enablePinning)||l)})),getIsPinned:()=>{const n=e.getLeafColumns().map((e=>e.id)),{left:l,right:o}=t.getState().columnPinning,r=n.some((e=>null==l?void 0:l.includes(e))),i=n.some((e=>null==o?void 0:o.includes(e)));return r?"left":!!i&&"right"},getPinnedIndex:()=>{var n,l,o;const r=e.getIsPinned();return r?null!=(n=null==(l=t.getState().columnPinning)||null==(o=l[r])?void 0:o.indexOf(e.id))?n:-1:0}}),createRow:(e,t)=>({getCenterVisibleCells:u((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right]),((e,t,n)=>{const l=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!l.includes(e.columnId)))}),{key:"row.getCenterVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getLeftVisibleCells:u((()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.columnId===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"row.getLeftVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getRightVisibleCells:u((()=>[e._getAllVisibleCells(),t.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.columnId===t)))).filter(Boolean).map((e=>({...e,position:"left"})))),{key:"row.getRightVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>({setColumnPinning:t=>null==e.options.onColumnPinningChange?void 0:e.options.onColumnPinningChange(t),resetColumnPinning:()=>{var t,n;return e.setColumnPinning(null!=(t=null==(n=e.initialState)?void 0:n.columnPinning)?t:{})},getIsSomeColumnsPinned:()=>{const{left:t,right:n}=e.getState().columnPinning;return Boolean((null==t?void 0:t.length)||(null==n?void 0:n.length))},getLeftLeafColumns:u((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getRightLeafColumns:u((()=>[e.getAllLeafColumns(),e.getState().columnPinning.right]),((e,t)=>(null!=t?t:[]).map((t=>e.find((e=>e.id===t)))).filter(Boolean)),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getCenterLeafColumns:u((()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((e,t,n)=>{const l=[...null!=t?t:[],...null!=n?n:[]];return e.filter((e=>!l.includes(e.id)))}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})})},L={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:o("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createInstance:e=>({setRowSelection:t=>null==e.options.onRowSelectionChange?void 0:e.options.onRowSelectionChange(t),resetRowSelection:()=>{var t;return e.setRowSelection(null!=(t=e.initialState.rowSelection)?t:{})},toggleAllRowsSelected:t=>{e.setRowSelection((n=>{t=void 0!==t?t:!e.getIsAllRowsSelected();const l={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach((e=>{l[e.id]=!0})):o.forEach((e=>{delete l[e.id]})),l}))},toggleAllPageRowsSelected:t=>e.setRowSelection((n=>{void 0!==t||e.getIsAllPageRowsSelected();const l={...n};return e.getRowModel().rows.forEach((n=>{k(l,n.id,t,e)})),l})),getPreSelectedRowModel:()=>e.getCoreRowModel(),getSelectedRowModel:u((()=>[e.getState().rowSelection,e.getCoreRowModel()]),((t,n)=>Object.keys(t).length?O(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredSelectedRowModel:u((()=>[e.getState().rowSelection,e.getFilteredRowModel()]),((t,n)=>Object.keys(t).length?O(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getFilteredSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getGroupedSelectedRowModel:u((()=>[e.getState().rowSelection,e.getGroupedRowModel()]),((t,n)=>Object.keys(t).length?O(e,n):{rows:[],flatRows:[],rowsById:{}}),{key:"getGroupedSelectedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getIsAllRowsSelected:()=>{const t=e.getPreFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let l=Boolean(t.length&&Object.keys(n).length);return l&&t.some((e=>!n[e.id]))&&(l=!1),l},getIsAllPageRowsSelected:()=>{const t=e.getPaginationRowModel().flatRows,{rowSelection:n}=e.getState();let l=!!t.length;return l&&t.some((e=>!n[e.id]))&&(l=!1),l},getIsSomeRowsSelected:()=>{var t;return!e.getIsAllRowsSelected()&&!!Object.keys(null!=(t=e.getState().rowSelection)?t:{}).length},getIsSomePageRowsSelected:()=>{const t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&!(null==t||!t.length)},getToggleAllRowsSelectedHandler:()=>t=>{e.toggleAllRowsSelected(t.target.checked)},getToggleAllPageRowsSelectedHandler:()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}}),createRow:(e,t)=>({toggleSelected:n=>{const l=e.getIsSelected();t.setRowSelection((o=>{if(l===(n=void 0!==n?n:!l))return o;const r={...o};return k(r,e.id,n,t),r}))},getIsSelected:()=>{const{rowSelection:n}=t.getState();return!0===T(e,n)},getIsSomeSelected:()=>{const{rowSelection:n}=t.getState();return"some"===T(e,n)},getCanSelect:()=>{var n;return"function"==typeof t.options.enableRowSelection?t.options.enableRowSelection(e):null==(n=t.options.enableRowSelection)||n},getCanSelectSubRows:()=>{var n;return"function"==typeof t.options.enableSubRowSelection?t.options.enableSubRowSelection(e):null==(n=t.options.enableSubRowSelection)||n},getCanMultiSelect:()=>{var n;return"function"==typeof t.options.enableMultiRowSelection?t.options.enableMultiRowSelection(e):null==(n=t.options.enableMultiRowSelection)||n},getToggleSelectedHandler:()=>{const t=e.getCanSelect();return n=>{var l;t&&e.toggleSelected(null==(l=n.target)?void 0:l.checked)}}})},k=(e,t,n,l)=>{var o;const r=l.getRow(t);r.getIsGrouped(),n?e[t]=!0:delete e[t],null!=(o=r.subRows)&&o.length&&r.getCanSelectSubRows()&&r.subRows.forEach((t=>k(e,t.id,n,l)))};function O(e,t){const n=e.getState().rowSelection,l=[],o={},r=function(e,t){return void 0===t&&(t=0),e.map((e=>{var i;const u=!0===T(e,n);if(u&&(l.push(e),o[e.id]=e),null!=(i=e.subRows)&&i.length&&(e={...e,subRows:r(e.subRows,t+1)}),u)return e})).filter(Boolean)};return{rows:r(t.rows),flatRows:l,rowsById:o}}function T(e,t,n){if(t[e.id])return!0;if(e.subRows&&e.subRows.length){let n=!0,l=!1;return e.subRows.forEach((e=>{l&&!n||(T(e,t)?l=!0:n=!1)})),!!n||!!l&&"some"}return!1}const D=/([0-9]+)/gm,B={alphanumeric:function(e,t,n){return j(q(e.getValue(n)).toLowerCase(),q(t.getValue(n)).toLowerCase())},alphanumericCaseSensitive:function(e,t,n){return j(q(e.getValue(n)),q(t.getValue(n)))},text:function(e,t,n){return N(q(e.getValue(n)).toLowerCase(),q(t.getValue(n)).toLowerCase())},textCaseSensitive:function(e,t,n){return N(q(e.getValue(n)),q(t.getValue(n)))},datetime:function(e,t,n){return N(e.getValue(n).getTime(),t.getValue(n).getTime())},basic:function(e,t,n){return N(e.getValue(n),t.getValue(n))}};function j(e,t){const n=e.split(D).filter(Boolean),l=t.split(D).filter(Boolean);for(;n.length&&l.length;){const e=n.shift(),t=l.shift(),o=parseInt(e,10),r=parseInt(t,10),i=[o,r].sort();if(isNaN(i[0])){if(e>t)return 1;if(t>e)return-1}else{if(isNaN(i[1]))return isNaN(o)?-1:1;if(o>r)return 1;if(r>o)return-1}}return n.length-l.length}function N(e,t){return e===t?0:e>t?1:-1}function q(e){return"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"==typeof e?e:""}const U={getInitialState:e=>({sorting:[],...e}),getDefaultColumn:()=>({sortingFn:"auto"}),getDefaultOptions:e=>({onSortingChange:o("sorting",e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>({getAutoSortingFn:()=>{const n=t.getFilteredRowModel().flatRows.slice(100);let l=!1;for(const t of n){const n=null==t?void 0:t.getValue(e.id);if("[object Date]"===Object.prototype.toString.call(n))return B.datetime;if("string"==typeof n&&(l=!0,n.split(D).length>1))return B.alphanumeric}return l?B.text:B.basic},getAutoSortDir:()=>{const n=t.getFilteredRowModel().flatRows[0];return"string"==typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},getSortingFn:()=>{var n;const l=t.options.sortingFns;if(!e)throw new Error;return r(e.sortingFn)?e.sortingFn:"auto"===e.sortingFn?e.getAutoSortingFn():null!=(n=null==l?void 0:l[e.sortingFn])?n:B[e.sortingFn]},toggleSorting:(n,l)=>{t.setSorting((o=>{var r,i,u,a;const s=null==o?void 0:o.find((t=>t.id===e.id)),g=null==o?void 0:o.findIndex((t=>t.id===e.id)),d=null!=n;let c,p=[];c=e.getCanMultiSort()&&l?s?"toggle":"add":null!=o&&o.length&&g!==o.length-1?"replace":s?"toggle":"replace";const f=null!=(r=null!=(i=e.sortDescFirst)?i:t.options.sortDescFirst)?r:"desc"===e.getAutoSortDir();if("toggle"!==c||null!=(u=t.options.enableSortingRemoval)&&!u||d||l&&null!=(a=t.options.enableMultiRemove)&&!a||(null!=s&&s.desc?f:!f)||(c="remove"),"replace"===c)p=[{id:e.id,desc:d?n:!!f}];else if("add"===c&&null!=o&&o.length){var m;p=[...o,{id:e.id,desc:d?n:!!f}],p.splice(0,p.length-(null!=(m=t.options.maxMultiSortColCount)?m:Number.MAX_SAFE_INTEGER))}else"toggle"===c&&null!=o&&o.length?p=o.map((t=>t.id===e.id?{...t,desc:d?n:!(null!=s&&s.desc)}:t)):"remove"===c&&null!=o&&o.length&&(p=o.filter((t=>t.id!==e.id)));return p}))},getCanSort:()=>{var n,l;return(null==(n=e.enableSorting)||n)&&(null==(l=t.options.enableSorting)||l)&&!!e.accessorFn},getCanMultiSort:()=>{var n,l;return null!=(n=null!=(l=e.enableMultiSort)?l:t.options.enableMultiSort)?n:!!e.accessorFn},getIsSorted:()=>{var n;const l=null==(n=t.getState().sorting)?void 0:n.find((t=>t.id===e.id));return!!l&&(l.desc?"desc":"asc")},getSortIndex:()=>{var n,l;return null!=(n=null==(l=t.getState().sorting)?void 0:l.findIndex((t=>t.id===e.id)))?n:-1},resetSorting:e=>{var n,l;e?t.setSorting((t=>null!=t&&t.length?t.filter((t=>t.id!==e)):[])):t.setSorting(null!=(n=null==(l=t.initialState)?void 0:l.sorting)?n:[])},getToggleSortingHandler:()=>{const n=e.getCanSort();return l=>{n&&(null==l.persist||l.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(l))))}}}),createInstance:e=>({setSorting:t=>null==e.options.onSortingChange?void 0:e.options.onSortingChange(t),getPreSortedRowModel:()=>e.getFilteredRowModel(),getSortedRowModel:()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())})},$={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:o("columnVisibility",e)}),getDefaultColumn:()=>({defaultIsVisible:!0}),createColumn:(e,t)=>({toggleVisibility:n=>{e.getCanHide()&&t.setColumnVisibility((t=>({...t,[e.id]:null!=n?n:!e.getIsVisible()})))},getIsVisible:()=>{var n,l;return null==(n=null==(l=t.getState().columnVisibility)?void 0:l[e.id])||n},getCanHide:()=>{var n,l;return(null==(n=e.enableHiding)||n)&&(null==(l=t.options.enableHiding)||l)},getToggleVisibilityHandler:()=>t=>{null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}),createRow:(e,t)=>({_getAllVisibleCells:u((()=>[e.getAllCells().filter((e=>e.column.getIsVisible())).map((e=>e.id)).join("_")]),(t=>e.getAllCells().filter((e=>e.column.getIsVisible()))),{key:"row._getAllVisibleCells",debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:u((()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]),((e,t,n)=>[...e,...t,...n]),{key:!1,debug:()=>{var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}),createInstance:e=>{const t=(t,n)=>u((()=>[n(),n().filter((e=>e.getIsVisible())).map((e=>e.id)).join("_")]),(e=>e.filter((e=>null==e.getIsVisible?void 0:e.getIsVisible()))),{key:t,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}});return{getVisibleFlatColumns:t("getVisibleFlatColumns",(()=>e.getAllFlatColumns())),getVisibleLeafColumns:t("getVisibleLeafColumns",(()=>e.getAllLeafColumns())),getLeftVisibleLeafColumns:t("getLeftVisibleLeafColumns",(()=>e.getLeftLeafColumns())),getRightVisibleLeafColumns:t("getRightVisibleLeafColumns",(()=>e.getRightLeafColumns())),getCenterVisibleLeafColumns:t("getCenterVisibleLeafColumns",(()=>e.getCenterLeafColumns())),setColumnVisibility:t=>null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t),toggleAllColumnsVisible:t=>{var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce(((e,n)=>({...e,[n.id]:t||!(null!=n.getCanHide&&n.getCanHide())})),{}))},getIsAllColumnsVisible:()=>!e.getAllLeafColumns().some((e=>!(null!=e.getIsVisible&&e.getIsVisible()))),getIsSomeColumnsVisible:()=>e.getAllLeafColumns().some((e=>null==e.getIsVisible?void 0:e.getIsVisible())),getToggleAllColumnsVisibilityHandler:()=>t=>{var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}}},X={createInstance:e=>({createHeader:(t,n)=>{var l;let o={id:null!=(l=n.id)?l:t.id,column:t,index:n.index,isPlaceholder:n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(o),e},renderHeader:()=>t.header?e.render(t.header,{instance:e,header:o,column:t}):null,renderFooter:()=>t.footer?e.render(t.footer,{instance:e,header:o,column:t}):null};return e._features.forEach((t=>{Object.assign(o,null==t.createHeader?void 0:t.createHeader(o,e))})),o},getHeaderGroups:u((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>{const r=n.filter((e=>null==l?void 0:l.includes(e.id))),i=n.filter((e=>null==o?void 0:o.includes(e.id)));return K(t,[...r,...n.filter((e=>!(null!=l&&l.includes(e.id)||null!=o&&o.includes(e.id)))),...i],e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterHeaderGroups:u((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right]),((t,n,l,o)=>K(t,n=n.filter((e=>!(null!=l&&l.includes(e.id)||null!=o&&o.includes(e.id)))),e,"center")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftHeaderGroups:u((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left]),((t,n,l)=>K(t,n=n.filter((e=>null==l?void 0:l.includes(e.id))),e,"left")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightHeaderGroups:u((()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right]),((t,n,l)=>K(t,n=n.filter((e=>null==l?void 0:l.includes(e.id))),e,"right")),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFooterGroups:u((()=>[e.getHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFooterGroups:u((()=>[e.getLeftHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFooterGroups:u((()=>[e.getCenterHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFooterGroups:u((()=>[e.getRightHeaderGroups()]),(e=>[...e].reverse()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getFlatHeaders:u((()=>[e.getHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftFlatHeaders:u((()=>[e.getLeftHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterFlatHeaders:u((()=>[e.getCenterHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightFlatHeaders:u((()=>[e.getRightHeaderGroups()]),(e=>e.map((e=>e.headers)).flat()),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getCenterLeafHeaders:u((()=>[e.getCenterFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeftLeafHeaders:u((()=>[e.getLeftFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getRightLeafHeaders:u((()=>[e.getRightFlatHeaders()]),(e=>e.filter((e=>{var t;return!(null!=(t=e.subHeaders)&&t.length)}))),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getLeafHeaders:u((()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()]),((e,t,n)=>{var l,o,r,i,u,a;return[...null!=(l=null==(o=e[0])?void 0:o.headers)?l:[],...null!=(r=null==(i=t[0])?void 0:i.headers)?r:[],...null!=(u=null==(a=n[0])?void 0:a.headers)?u:[]].map((e=>e.getLeafHeaders())).flat()}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugHeaders}}),getHeader:t=>{const n=[...e.getFlatHeaders(),...e.getCenterFlatHeaders(),...e.getLeftFlatHeaders(),...e.getRightFlatHeaders()].find((e=>e.id===t));if(!n)throw new Error;return n}})};function K(e,t,n,l){var o,r;let i=0;const u=function(e,t){void 0===t&&(t=1),i=Math.max(i,t),e.filter((e=>e.getIsVisible())).forEach((e=>{var n;null!=(n=e.columns)&&n.length&&u(e.columns,t+1)}),0)};u(e);let a=[];const s=(e,t)=>{const o={depth:t,id:[l,""+t].filter(Boolean).join("_"),headers:[]},r=[];e.forEach((e=>{const i=[...r].reverse()[0];let u,a=!1;if(e.column.depth===o.depth&&e.column.parent?u=e.column.parent:(u=e.column,a=!0),(null==i?void 0:i.column)===u)i.subHeaders.push(e);else{const o=n.createHeader(u,{id:[l,t,u.id,null==e?void 0:e.id].filter(Boolean).join("_"),isPlaceholder:a,placeholderId:a?""+r.filter((e=>e.column===u)).length:void 0,depth:t,index:r.length});o.subHeaders.push(e),r.push(o)}o.headers.push(e),e.headerGroup=o})),a.push(o),t>0&&s(r,t-1)},g=t.map(((e,t)=>n.createHeader(e,{depth:i,index:t})));s(g,i-1),a.reverse();const d=e=>e.filter((e=>e.column.getIsVisible())).map((e=>{let t=0,n=0,l=[0];e.subHeaders&&e.subHeaders.length?(l=[],d(e.subHeaders).forEach((e=>{let{colSpan:n,rowSpan:o}=e;t+=n,l.push(o)}))):t=1;return n+=Math.min(...l),e.colSpan=t>0?t:void 0,e.rowSpan=n>0?n:void 0,{colSpan:t,rowSpan:n}}));return d(null!=(o=null==(r=a[0])?void 0:r.headers)?o:[]),a}function J(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let n={_features:[a,s,g,X,$,G,z,x,U,_,b,H,L,c]};const o=n._features.reduce(((e,t)=>Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(n))),{});let r={...null!=(t=e.initialState)?t:{}};n._features.forEach((e=>{var t;r=null!=(t=null==e.getInitialState?void 0:e.getInitialState(r))?t:r}));const i=[];let u=!1;const d={...n,options:{...o,...e},initialState:r,queue:e=>{i.push(e),u||(u=!0,Promise.resolve().then((()=>{for(;i.length;)i.shift()();u=!1})).catch((e=>setTimeout((()=>{throw e})))))},reset:()=>{n.setState(n.initialState)},setOptions:e=>{const t=l(e,n.options);n.options=(e=>n.options.mergeOptions?n.options.mergeOptions(o,e):{...o,...e})(t)},render:(e,t)=>"function"==typeof n.options.render?n.options.render(e,t):"function"==typeof e?e(t):e,getState:()=>n.options.state,setState:e=>{null==n.options.onStateChange||n.options.onStateChange(e)}};return n=Object.assign(n,d),n._features.forEach((e=>Object.assign(n,null==e.createInstance?void 0:e.createInstance(n)))),n}function Q(e){return()=>W(void 0,void 0,e)}function W(e,t,n){const l={generics:void 0,options:null!=n?n:{render:(()=>{throw new Error("")})()},setGenerics:()=>l,setRowType:()=>l,setTableMetaType:()=>l,setColumnMetaType:()=>l,setOptions:l=>W(e,t,{...n,...l}),createDisplayColumn:e=>({...e,columnDefType:"display"}),createGroup:e=>({...e,columnDefType:"group"}),createDataColumn:(e,t)=>{var n;if(t={...t,columnDefType:"data",id:t.id},"string"==typeof e)return{...t,id:null!=(n=t.id)?n:e,accessorKey:e};if("function"==typeof e)return{...t,accessorFn:e};throw new Error("Invalid accessor")}};return l}function Y(e,t,n){return n.options.filterFromLeafRows?function(e,t,n){const l=[],o={};let r,i;const u=function(e,l){void 0===l&&(l=0);const a=[];for(let g=0;g<e.length;g++){var s;if(r=e[g],null!=(s=r.subRows)&&s.length){if(i=n.createRow(r.id,r.original,r.index,r.depth),i.columnFilterMap=r.columnFilterMap,i.subRows=u(r.subRows,l+1),!i.subRows.length)continue;r=i}t(r)&&(a.push(r),o[r.id]=r,o[g]=r)}return a};return{rows:u(e),flatRows:l,rowsById:o}}(e,t,n):function(e,t,n){const l=[],o={};let r,i,u;const a=function(e,s){void 0===s&&(s=0),r=[];for(let d=0;d<e.length;d++){i=e[d];var g;if(t(i))null!=(g=i.subRows)&&g.length&&(u=n.createRow(i.id,i.original,i.index,i.depth),u.subRows=a(i.subRows,s+1),i=u),r.push(i),l.push(i),o[i.id]=i}return r};return{rows:a(e),flatRows:l,rowsById:o}}(e,t,n)}function Z(e,t){const n=[],l=e=>{var o;n.push(e),t.options.expandSubRows&&null!=(o=e.subRows)&&o.length&&e.getIsExpanded()&&e.subRows.forEach(l)};return e.rows.forEach(l),{rows:n,flatRows:e.flatRows,rowsById:e.rowsById}}function ee(e){let n;return{c(){n=t.text(e[0])},m(e,l){t.insert(e,n,l)},p(e,[l]){1&l&&t.set_data(n,e[0])},i:t.noop,o:t.noop,d(e){e&&t.detach(n)}}}function te(e,t,n){let{content:l}=t;return e.$$set=e=>{"content"in e&&n(0,l=e.content)},[l]}class ne extends t.SvelteComponent{constructor(e){super(),t.init(this,e,te,ee,t.safe_not_equal,{content:0})}}const le="undefined"==typeof window?function(e,n){return t.create_ssr_component(((l,o,r,i)=>""+t.validate_component(e,"Comp").$$render(l,n,{},{})))}:function(e,n){return class extends t.SvelteComponent{constructor(l){super(),t.init(this,l,null,(l=>function(e,n,l){let o,r;return o=new n({props:l,$$inline:!0}),{c(){t.create_component(o.$$.fragment)},m(e,n){t.mount_component(o,e,n),r=!0},p:t.noop,i(e){r||(t.transition_in(o.$$.fragment,e),r=!0)},o(e){t.transition_out(o.$$.fragment,e),r=!1},d(e){t.destroy_component(o,e)}}}(0,e,n)),t.safe_not_equal,{},void 0)}}};function oe(e,t){if(!e)return null;if(e instanceof Function){return e(t)}return le(ne,{content:e})}const re=Q({render:oe});e.ColumnSizing=c,e.Expanding=b,e.Filters=x,e.Grouping=_,e.Headers=X,e.Ordering=G,e.Pagination=H,e.Pinning=z,e.RowSelection=L,e.Sorting=U,e.Visibility=$,e.buildHeaderGroups=K,e.createTable=re,e.createTableFactory=Q,e.createTableInstance=function(e,t){let l;l="subscribe"in t?t:n.readable(t);let o={...e.options,state:{},onStateChange:()=>{},render:oe,...n.get(l)},r=J(o),i=n.writable(r.initialState),u=n.derived([i,l],(e=>e));const a=n.readable(r,(function(e){const t=u.subscribe((t=>{let[n,l]=t;r.setOptions((e=>({...e,...l,state:{...n,...l.state},onStateChange:e=>{e instanceof Function?i.update(e):i.set(e),null==o.onStateChange||o.onStateChange(e)}}))),e(r)}));return function(){t()}}));return a},e.defaultColumnSizing=d,e.expandRows=Z,e.flattenBy=i,e.functionalUpdate=l,e.getCoreRowModel=function(){return e=>u((()=>[e.options.data]),(t=>{const n=[],l=[],o={},r=e.getAllLeafColumns(),i=function(t,n,u,a,s){void 0===u&&(u=0);const g=e.getRowId(t,n,s),d={};for(let e=0;e<r.length;e++){const l=r[e];l&&l.accessorFn&&(d[l.id]=l.accessorFn(t,n))}const c=e.createRow(g,t,n,u);if(a.push(c),l.push(c),o[g]=c,e.options.getSubRows){const l=e.options.getSubRows(t,n);if(null!=l&&l.length){c.originalSubRows=l;const e=[];for(let t=0;t<c.originalSubRows.length;t++)i(c.originalSubRows[t],t,u+1,e,c);c.subRows=e}}};for(let e=0;e<t.length;e++)i(t[e],e,0,n);return{rows:n,flatRows:l,rowsById:o}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e.queue((()=>{e._autoResetPageIndex()}))}})},e.getExpandedRowModel=function(){return e=>u((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((t,n,l)=>n.rows.length&&l&&(!0===t||Object.keys(null!=t?t:{}).length)?Z(n,e):n),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getFacetedMinMaxValues=function(){return(e,t)=>u((()=>[e.getColumn(t).getFacetedRowModel()]),(e=>{var n,l,o,r;let i=[null!=(n=null==(l=e.flatRows[0])?void 0:l.getValue(t))?n:null,null!=(o=null==(r=e.flatRows[0])?void 0:r.getValue(t))?o:null];for(let n=0;n<e.flatRows.length;n++){var u;const l=null==(u=e.flatRows[n])?void 0:u.getValue(t);l<i[0]?i[0]=l:l>i[1]&&(i[1]=l)}return i}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFacetedRowModel=function(){return(e,t)=>u((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()]),((n,l,o)=>{if(!n.rows.length||(null==l||!l.length)&&!o)return n;const r=[...l.map((e=>e.id)).filter((e=>e!==t)),o?"__global__":void 0].filter(Boolean);return Y(n.rows,(e=>{for(let t=0;t<r.length;t++)if(!1===e.columnFilterMap[r[t]])return!1;return!0}),e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFacetedUniqueValues=function(){return(e,t)=>u((()=>[e.getColumn(t).getFacetedRowModel()]),(e=>{let n=new Map;for(let r=0;r<e.flatRows.length;r++){var l;const i=null==(l=e.flatRows[r])?void 0:l.getValue(t);var o;if(n.has(i))n.set(i,(null!=(o=n.get(i))?o:0)+1);else n.set(i,1)}return n}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{}})},e.getFilteredRowModel=function(){return e=>u((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,l)=>{if(!t.rows.length||(null==n||!n.length)&&!l)return t;const o=[],r=[];(null!=n?n:[]).forEach((t=>{var n;const l=e.getColumn(t.id).getFilterFn();l&&o.push({id:t.id,filterFn:l,resolvedValue:null!=(n=null==l.resolveFilterValue?void 0:l.resolveFilterValue(t.value))?n:t.value})}));const i=n.map((e=>e.id)),u=e.getGlobalFilterFn(),a=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let s,g;l&&u&&a.length&&(i.push("__global__"),a.forEach((e=>{var t;r.push({id:e.id,filterFn:u,resolvedValue:null!=(t=null==u.resolveFilterValue?void 0:u.resolveFilterValue(l))?t:l})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilterMap={},o.length)for(let e=0;e<o.length;e++)s=o[e],n.columnFilterMap[s.id]=s.filterFn(n,s.id,s.resolvedValue);if(r.length){for(let e=0;e<r.length;e++)if(g=r[e],g.filterFn(n,g.id,g.resolvedValue)){n.columnFilterMap.__global__=!0;break}!0!==n.columnFilterMap.__global__&&(n.columnFilterMap.__global__=!1)}}return Y(t.rows,(e=>{for(let t=0;t<i.length;t++)if(!1===e.columnFilterMap[i[t]])return!1;return!0}),e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e.queue((()=>{e._autoResetPageIndex()}))}})},e.getGroupedRowModel=function(){return e=>u((()=>[e.getState().grouping,e.getPreGroupedRowModel()]),((t,n)=>{if(!n.rows.length||!t.length)return n;const l=t.filter((t=>e.getColumn(t))),o=[],r={},u=function(t,n,a){if(void 0===n&&(n=0),n===l.length)return t;const s=l[n],g=function(e,t){const n=new Map;return e.reduce(((e,n)=>{const l=""+n.getValue(t),o=e.get(l);return o?e.set(l,[...o,n]):e.set(l,[n]),e}),n)}(t,s),d=Array.from(g.entries()).map(((t,g)=>{let[d,c]=t,p=s+":"+d;p=a?a+">"+p:p;const f=u(c,n+1,p),m=n?i(c,(e=>e.subRows)):c,b=e.createRow(p,void 0,g,n);return Object.assign(b,{groupingColumnId:s,groupingValue:d,subRows:f,leafRows:m,getValue:t=>{if(l.includes(t)){if(b.valuesCache.hasOwnProperty(t))return b.valuesCache[t];var o;if(c[0])b.valuesCache[t]=null!=(o=c[0].getValue(t))?o:void 0;return b.valuesCache[t]}if(b.groupingValuesCache.hasOwnProperty(t))return b.groupingValuesCache[t];const r=e.getColumn(t),i=r.getColumnAggregationFn();if(i)return b.groupingValuesCache[t]=i((()=>m.map((e=>{let l=e.getValue(t);return!n&&r.aggregateValue&&(l=r.aggregateValue(l)),l}))),(()=>c.map((e=>e.getValue(t))))),b.groupingValuesCache[t];if(r.aggregationFn)throw console.info({column:r}),new Error("")}}),f.forEach((e=>{o.push(e),r[e.id]=e})),b}));return d},a=u(n.rows,0,"");return a.forEach((e=>{o.push(e),r[e.id]=e})),{rows:a,flatRows:o,rowsById:r}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e.queue((()=>{e._autoResetExpanded(),e._autoResetPageIndex()}))}})},e.getPaginationRowModel=function(e){return e=>u((()=>[e.getState().pagination,e.getPrePaginationRowModel()]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:l,pageIndex:o}=t;let{rows:r,flatRows:i,rowsById:u}=n;const a=l*o,s=a+l;return r=r.slice(a,s),e.options.paginateExpandedRows?{rows:r,flatRows:i,rowsById:u}:Z({rows:r,flatRows:i,rowsById:u},e)}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}})},e.getSortedRowModel=function(){return e=>u((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const l=e.getState().sorting,o=[],r=l.filter((t=>e.getColumn(t.id).getCanSort())),i={};r.forEach((t=>{const n=e.getColumn(t.id);i[t.id]={sortUndefined:n.sortUndefined,invertSorting:n.invertSorting,sortingFn:n.getSortingFn()}}));const u=e=>{const t=e.slice();return t.sort(((e,t)=>{for(let l=0;l<r.length;l+=1){var n;const o=r[l],u=i[o.id],a=null!=(n=null==o?void 0:o.desc)&&n;if(u.sortUndefined){const n=void 0===e.getValue(o.id),l=void 0===t.getValue(o.id);if(n||l)return n&&l?0:n?u.sortUndefined:-u.sortUndefined}let s=u.sortingFn(e,t,o.id);if(0!==s)return a&&(s*=-1),u.invertSorting&&(s*=-1),s}return e.index-t.index})),t.forEach((e=>{o.push(e),!e.subRows||e.subRows.length<=1||(e.subRows=u(e.subRows))})),t};return{rows:u(n.rows),flatRows:o,rowsById:n.rowsById}}),{key:!1,debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e.queue((()=>{e._autoResetPageIndex()}))}})},e.isFunction=r,e.isRowSelected=T,e.makeStateUpdater=o,e.memo=u,e.noop=function(){},e.orderColumns=E,e.passiveEventSupported=f,e.render=oe,e.renderComponent=le,e.selectRowsFn=O,e.shouldAutoRemoveFilter=A,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.production.js.map
{
"name": "@tanstack/svelte-table",
"author": "Tanner Linsley",
"version": "8.0.0-alpha.67",
"version": "8.0.0-alpha.68",
"description": "Composables for building lightweight, fast and extendable datagrids for Vue",

@@ -37,3 +37,3 @@ "license": "MIT",

"dependencies": {
"@tanstack/table-core": "8.0.0-alpha.67"
"@tanstack/table-core": "8.0.0-alpha.68"
},

@@ -40,0 +40,0 @@ "peerDependencies": {

@@ -66,6 +66,2 @@ import {

// beforeUpdate(() => {
// instance.willUpdate()
// })
let stateStore = writable(/** @type {number} */ instance.initialState)

@@ -84,3 +80,2 @@ // combine stores

onStateChange: updater => {
console.log('STATE CHANGE')
if (updater instanceof Function) {

@@ -87,0 +82,0 @@ stateStore.update(updater)

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

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