All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.build.umd.index.development.js.map Maven / Gradle / Ivy

The newest version!
{"version":3,"file":"index.development.js","sources":["../../src/utils.ts","../../src/core/column.ts","../../src/core/headers.ts","../../src/features/ColumnSizing.ts","../../src/features/Expanding.ts","../../src/filterFns.ts","../../src/features/Filters.ts","../../src/aggregationFns.ts","../../src/features/Grouping.ts","../../src/features/Ordering.ts","../../src/features/Pagination.ts","../../src/features/Pinning.ts","../../src/features/RowSelection.ts","../../src/sortingFns.ts","../../src/features/Sorting.ts","../../src/features/Visibility.ts","../../src/core/table.ts","../../src/core/cell.ts","../../src/core/row.ts","../../src/columnHelper.ts","../../src/utils/getCoreRowModel.ts","../../src/utils/filterRowsUtils.ts","../../src/utils/getFilteredRowModel.ts","../../src/utils/getFacetedRowModel.ts","../../src/utils/getFacetedUniqueValues.ts","../../src/utils/getFacetedMinMaxValues.ts","../../src/utils/getSortedRowModel.ts","../../src/utils/getGroupedRowModel.ts","../../src/utils/getExpandedRowModel.ts","../../src/utils/getPaginationRowModel.ts"],"sourcesContent":["import { TableState, Updater } from './types'\n\nexport type PartialKeys = Omit & Partial>\nexport type RequiredKeys = Omit &\n  Required>\nexport type Overwrite = Omit<\n  T,\n  keyof U\n> &\n  U\n\nexport type UnionToIntersection = (\n  T extends any ? (x: T) => any : never\n) extends (x: infer R) => any\n  ? R\n  : never\n\nexport type IsAny = 1 extends 0 & T ? Y : N\nexport type IsKnown = unknown extends T ? N : Y\n\ntype ComputeRange<\n  N extends number,\n  Result extends Array = []\n> = Result['length'] extends N\n  ? Result\n  : ComputeRange\ntype Index40 = ComputeRange<40>[number]\n\n// Is this type a tuple?\ntype IsTuple = T extends readonly any[] & { length: infer Length }\n  ? Length extends Index40\n    ? T\n    : never\n  : never\n\n// If this type is a tuple, what indices are allowed?\ntype AllowedIndexes<\n  Tuple extends ReadonlyArray,\n  Keys extends number = never\n> = Tuple extends readonly []\n  ? Keys\n  : Tuple extends readonly [infer _, ...infer Tail]\n  ? AllowedIndexes\n  : Keys\n\nexport type DeepKeys = unknown extends T\n  ? keyof T\n  : object extends T\n  ? string\n  : T extends readonly any[] & IsTuple\n  ? AllowedIndexes | DeepKeysPrefix>\n  : T extends any[]\n  ? never & 'Dynamic length array indexing is not supported'\n  : T extends Date\n  ? never\n  : T extends object\n  ? (keyof T & string) | DeepKeysPrefix\n  : never\n\ntype DeepKeysPrefix = TPrefix extends keyof T & (number | string)\n  ? `${TPrefix}.${DeepKeys & string}`\n  : never\n\nexport type DeepValue = T extends Record\n  ? TProp extends `${infer TBranch}.${infer TDeepProp}`\n    ? DeepValue\n    : T[TProp & string]\n  : never\n\nexport type NoInfer = [T][T extends any ? 0 : never]\n\nexport type Getter = () => NoInfer\n\n///\n\nexport function functionalUpdate(updater: Updater, input: T): T {\n  return typeof updater === 'function'\n    ? (updater as (input: T) => T)(input)\n    : updater\n}\n\nexport function noop() {\n  //\n}\n\nexport function makeStateUpdater(\n  key: K,\n  instance: unknown\n) {\n  return (updater: Updater) => {\n    ;(instance as any).setState((old: TTableState) => {\n      return {\n        ...old,\n        [key]: functionalUpdate(updater, (old as any)[key]),\n      }\n    })\n  }\n}\n\ntype AnyFunction = (...args: any) => any\n\nexport function isFunction(d: any): d is T {\n  return d instanceof Function\n}\n\nexport function isNumberArray(d: any): d is number[] {\n  return Array.isArray(d) && d.every(val => typeof val === 'number')\n}\n\nexport function flattenBy(\n  arr: TNode[],\n  getChildren: (item: TNode) => TNode[]\n) {\n  const flat: TNode[] = []\n\n  const recurse = (subArr: TNode[]) => {\n    subArr.forEach(item => {\n      flat.push(item)\n      const children = getChildren(item)\n      if (children?.length) {\n        recurse(children)\n      }\n    })\n  }\n\n  recurse(arr)\n\n  return flat\n}\n\nexport function memo(\n  getDeps: () => [...TDeps],\n  fn: (...args: NoInfer<[...TDeps]>) => TResult,\n  opts: {\n    key: any\n    debug?: () => any\n    onChange?: (result: TResult) => void\n  }\n): () => TResult {\n  let deps: any[] = []\n  let result: TResult | undefined\n\n  return () => {\n    let depTime: number\n    if (opts.key && opts.debug) depTime = Date.now()\n\n    const newDeps = getDeps()\n\n    const depsChanged =\n      newDeps.length !== deps.length ||\n      newDeps.some((dep: any, index: number) => deps[index] !== dep)\n\n    if (!depsChanged) {\n      return result!\n    }\n\n    deps = newDeps\n\n    let resultTime: number\n    if (opts.key && opts.debug) resultTime = Date.now()\n\n    result = fn(...newDeps)\n    opts?.onChange?.(result)\n\n    if (opts.key && opts.debug) {\n      if (opts?.debug()) {\n        const depEndTime = Math.round((Date.now() - depTime!) * 100) / 100\n        const resultEndTime = Math.round((Date.now() - resultTime!) * 100) / 100\n        const resultFpsPercentage = resultEndTime / 16\n\n        const pad = (str: number | string, num: number) => {\n          str = String(str)\n          while (str.length < num) {\n            str = ' ' + str\n          }\n          return str\n        }\n\n        console.info(\n          `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,\n          `\n            font-size: .6rem;\n            font-weight: bold;\n            color: hsl(${Math.max(\n              0,\n              Math.min(120 - 120 * resultFpsPercentage, 120)\n            )}deg 100% 31%);`,\n          opts?.key\n        )\n      }\n    }\n\n    return result!\n  }\n}\n","import {\n  Column,\n  Table,\n  AccessorFn,\n  ColumnDef,\n  RowData,\n  ColumnDefResolved,\n} from '../types'\nimport { memo } from '../utils'\n\nexport interface CoreColumn {\n  id: string\n  depth: number\n  accessorFn?: AccessorFn\n  columnDef: ColumnDef\n  columns: Column[]\n  parent?: Column\n  getFlatColumns: () => Column[]\n  getLeafColumns: () => Column[]\n}\n\nexport function createColumn(\n  table: Table,\n  columnDef: ColumnDef,\n  depth: number,\n  parent?: Column\n): Column {\n  const defaultColumn = table._getDefaultColumnDef()\n\n  const resolvedColumnDef = {\n    ...defaultColumn,\n    ...columnDef,\n  } as ColumnDefResolved\n\n  const accessorKey = resolvedColumnDef.accessorKey\n\n  let id =\n    resolvedColumnDef.id ??\n    (accessorKey ? accessorKey.replace('.', '_') : undefined) ??\n    (typeof resolvedColumnDef.header === 'string'\n      ? resolvedColumnDef.header\n      : undefined)\n\n  let accessorFn: AccessorFn | undefined\n\n  if (resolvedColumnDef.accessorFn) {\n    accessorFn = resolvedColumnDef.accessorFn\n  } else if (accessorKey) {\n    // Support deep accessor keys\n    if (accessorKey.includes('.')) {\n      accessorFn = (originalRow: TData) => {\n        let result = originalRow as Record\n\n        for (const key of accessorKey.split('.')) {\n          result = result?.[key]\n          if (process.env.NODE_ENV !== 'production' && result === undefined) {\n            console.warn(\n              `\"${key}\" in deeply nested key \"${accessorKey}\" returned undefined.`\n            )\n          }\n        }\n\n        return result\n      }\n    } else {\n      accessorFn = (originalRow: TData) =>\n        (originalRow as any)[resolvedColumnDef.accessorKey]\n    }\n  }\n\n  if (!id) {\n    if (process.env.NODE_ENV !== 'production') {\n      throw new Error(\n        resolvedColumnDef.accessorFn\n          ? `Columns require an id when using an accessorFn`\n          : `Columns require an id when using a non-string header`\n      )\n    }\n    throw new Error()\n  }\n\n  let column: CoreColumn = {\n    id: `${String(id)}`,\n    accessorFn,\n    parent: parent as any,\n    depth,\n    columnDef: resolvedColumnDef as ColumnDef,\n    columns: [],\n    getFlatColumns: memo(\n      () => [true],\n      () => {\n        return [\n          column as Column,\n          ...column.columns?.flatMap(d => d.getFlatColumns()),\n        ]\n      },\n      {\n        key: process.env.NODE_ENV === 'production' && 'column.getFlatColumns',\n        debug: () => table.options.debugAll ?? table.options.debugColumns,\n      }\n    ),\n    getLeafColumns: memo(\n      () => [table._getOrderColumnsFn()],\n      orderColumns => {\n        if (column.columns?.length) {\n          let leafColumns = column.columns.flatMap(column =>\n            column.getLeafColumns()\n          )\n\n          return orderColumns(leafColumns)\n        }\n\n        return [column as Column]\n      },\n      {\n        key: process.env.NODE_ENV === 'production' && 'column.getLeafColumns',\n        debug: () => table.options.debugAll ?? table.options.debugColumns,\n      }\n    ),\n  }\n\n  column = table._features.reduce((obj, feature) => {\n    return Object.assign(obj, feature.createColumn?.(column, table))\n  }, column)\n\n  // Yes, we have to convert table to uknown, because we know more than the compiler here.\n  return column as Column\n}\n","import { RowData, Column, Header, HeaderGroup, Table } from '../types'\nimport { memo } from '../utils'\nimport { TableFeature } from './table'\n\nexport interface CoreHeaderGroup {\n  id: string\n  depth: number\n  headers: Header[]\n}\n\nexport interface HeaderContext {\n  table: Table\n  header: Header\n  column: Column\n}\n\nexport interface CoreHeader {\n  id: string\n  index: number\n  depth: number\n  column: Column\n  headerGroup: HeaderGroup\n  subHeaders: Header[]\n  colSpan: number\n  rowSpan: number\n  getLeafHeaders: () => Header[]\n  isPlaceholder: boolean\n  placeholderId?: string\n  getContext: () => HeaderContext\n}\n\nexport interface HeadersInstance {\n  getHeaderGroups: () => HeaderGroup[]\n  getLeftHeaderGroups: () => HeaderGroup[]\n  getCenterHeaderGroups: () => HeaderGroup[]\n  getRightHeaderGroups: () => HeaderGroup[]\n\n  getFooterGroups: () => HeaderGroup[]\n  getLeftFooterGroups: () => HeaderGroup[]\n  getCenterFooterGroups: () => HeaderGroup[]\n  getRightFooterGroups: () => HeaderGroup[]\n\n  getFlatHeaders: () => Header[]\n  getLeftFlatHeaders: () => Header[]\n  getCenterFlatHeaders: () => Header[]\n  getRightFlatHeaders: () => Header[]\n\n  getLeafHeaders: () => Header[]\n  getLeftLeafHeaders: () => Header[]\n  getCenterLeafHeaders: () => Header[]\n  getRightLeafHeaders: () => Header[]\n}\n\n//\n\nfunction createHeader(\n  table: Table,\n  column: Column,\n  options: {\n    id?: string\n    isPlaceholder?: boolean\n    placeholderId?: string\n    index: number\n    depth: number\n  }\n): Header {\n  const id = options.id ?? column.id\n\n  let header: CoreHeader = {\n    id,\n    column,\n    index: options.index,\n    isPlaceholder: !!options.isPlaceholder,\n    placeholderId: options.placeholderId,\n    depth: options.depth,\n    subHeaders: [],\n    colSpan: 0,\n    rowSpan: 0,\n    headerGroup: null!,\n    getLeafHeaders: (): Header[] => {\n      const leafHeaders: Header[] = []\n\n      const recurseHeader = (h: CoreHeader) => {\n        if (h.subHeaders && h.subHeaders.length) {\n          h.subHeaders.map(recurseHeader)\n        }\n        leafHeaders.push(h as Header)\n      }\n\n      recurseHeader(header)\n\n      return leafHeaders\n    },\n    getContext: () => ({\n      table,\n      header: header as Header,\n      column,\n    }),\n  }\n\n  table._features.forEach(feature => {\n    Object.assign(header, feature.createHeader?.(header, table))\n  })\n\n  return header as Header\n}\n\nexport const Headers: TableFeature = {\n  createTable: (\n    table: Table\n  ): HeadersInstance => {\n    return {\n      // Header Groups\n\n      getHeaderGroups: memo(\n        () => [\n          table.getAllColumns(),\n          table.getVisibleLeafColumns(),\n          table.getState().columnPinning.left,\n          table.getState().columnPinning.right,\n        ],\n        (allColumns, leafColumns, left, right) => {\n          const leftColumns =\n            left\n              ?.map(columnId => leafColumns.find(d => d.id === columnId)!)\n              .filter(Boolean) ?? []\n\n          const rightColumns =\n            right\n              ?.map(columnId => leafColumns.find(d => d.id === columnId)!)\n              .filter(Boolean) ?? []\n\n          const centerColumns = leafColumns.filter(\n            column => !left?.includes(column.id) && !right?.includes(column.id)\n          )\n\n          const headerGroups = buildHeaderGroups(\n            allColumns,\n            [...leftColumns, ...centerColumns, ...rightColumns],\n            table\n          )\n\n          return headerGroups\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getHeaderGroups',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      getCenterHeaderGroups: memo(\n        () => [\n          table.getAllColumns(),\n          table.getVisibleLeafColumns(),\n          table.getState().columnPinning.left,\n          table.getState().columnPinning.right,\n        ],\n        (allColumns, leafColumns, left, right) => {\n          leafColumns = leafColumns.filter(\n            column => !left?.includes(column.id) && !right?.includes(column.id)\n          )\n          return buildHeaderGroups(allColumns, leafColumns, table, 'center')\n        },\n        {\n          key:\n            process.env.NODE_ENV === 'development' && 'getCenterHeaderGroups',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      getLeftHeaderGroups: memo(\n        () => [\n          table.getAllColumns(),\n          table.getVisibleLeafColumns(),\n          table.getState().columnPinning.left,\n        ],\n        (allColumns, leafColumns, left) => {\n          const orderedLeafColumns =\n            left\n              ?.map(columnId => leafColumns.find(d => d.id === columnId)!)\n              .filter(Boolean) ?? []\n\n          return buildHeaderGroups(\n            allColumns,\n            orderedLeafColumns,\n            table,\n            'left'\n          )\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getLeftHeaderGroups',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      getRightHeaderGroups: memo(\n        () => [\n          table.getAllColumns(),\n          table.getVisibleLeafColumns(),\n          table.getState().columnPinning.right,\n        ],\n        (allColumns, leafColumns, right) => {\n          const orderedLeafColumns =\n            right\n              ?.map(columnId => leafColumns.find(d => d.id === columnId)!)\n              .filter(Boolean) ?? []\n\n          return buildHeaderGroups(\n            allColumns,\n            orderedLeafColumns,\n            table,\n            'right'\n          )\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getRightHeaderGroups',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      // Footer Groups\n\n      getFooterGroups: memo(\n        () => [table.getHeaderGroups()],\n        headerGroups => {\n          return [...headerGroups].reverse()\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getFooterGroups',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      getLeftFooterGroups: memo(\n        () => [table.getLeftHeaderGroups()],\n        headerGroups => {\n          return [...headerGroups].reverse()\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getLeftFooterGroups',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      getCenterFooterGroups: memo(\n        () => [table.getCenterHeaderGroups()],\n        headerGroups => {\n          return [...headerGroups].reverse()\n        },\n        {\n          key:\n            process.env.NODE_ENV === 'development' && 'getCenterFooterGroups',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      getRightFooterGroups: memo(\n        () => [table.getRightHeaderGroups()],\n        headerGroups => {\n          return [...headerGroups].reverse()\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getRightFooterGroups',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      // Flat Headers\n\n      getFlatHeaders: memo(\n        () => [table.getHeaderGroups()],\n        headerGroups => {\n          return headerGroups\n            .map(headerGroup => {\n              return headerGroup.headers\n            })\n            .flat()\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getFlatHeaders',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      getLeftFlatHeaders: memo(\n        () => [table.getLeftHeaderGroups()],\n        left => {\n          return left\n            .map(headerGroup => {\n              return headerGroup.headers\n            })\n            .flat()\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getLeftFlatHeaders',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      getCenterFlatHeaders: memo(\n        () => [table.getCenterHeaderGroups()],\n        left => {\n          return left\n            .map(headerGroup => {\n              return headerGroup.headers\n            })\n            .flat()\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getCenterFlatHeaders',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      getRightFlatHeaders: memo(\n        () => [table.getRightHeaderGroups()],\n        left => {\n          return left\n            .map(headerGroup => {\n              return headerGroup.headers\n            })\n            .flat()\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getRightFlatHeaders',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      // Leaf Headers\n\n      getCenterLeafHeaders: memo(\n        () => [table.getCenterFlatHeaders()],\n        flatHeaders => {\n          return flatHeaders.filter(header => !header.subHeaders?.length)\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getCenterLeafHeaders',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      getLeftLeafHeaders: memo(\n        () => [table.getLeftFlatHeaders()],\n        flatHeaders => {\n          return flatHeaders.filter(header => !header.subHeaders?.length)\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getLeftLeafHeaders',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      getRightLeafHeaders: memo(\n        () => [table.getRightFlatHeaders()],\n        flatHeaders => {\n          return flatHeaders.filter(header => !header.subHeaders?.length)\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getRightLeafHeaders',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n\n      getLeafHeaders: memo(\n        () => [\n          table.getLeftHeaderGroups(),\n          table.getCenterHeaderGroups(),\n          table.getRightHeaderGroups(),\n        ],\n        (left, center, right) => {\n          return [\n            ...(left[0]?.headers ?? []),\n            ...(center[0]?.headers ?? []),\n            ...(right[0]?.headers ?? []),\n          ]\n            .map(header => {\n              return header.getLeafHeaders()\n            })\n            .flat()\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getLeafHeaders',\n          debug: () => table.options.debugAll ?? table.options.debugHeaders,\n        }\n      ),\n    }\n  },\n}\n\nexport function buildHeaderGroups(\n  allColumns: Column[],\n  columnsToGroup: Column[],\n  table: Table,\n  headerFamily?: 'center' | 'left' | 'right'\n) {\n  // Find the max depth of the columns:\n  // build the leaf column row\n  // build each buffer row going up\n  //    placeholder for non-existent level\n  //    real column for existing level\n\n  let maxDepth = 0\n\n  const findMaxDepth = (columns: Column[], depth = 1) => {\n    maxDepth = Math.max(maxDepth, depth)\n\n    columns\n      .filter(column => column.getIsVisible())\n      .forEach(column => {\n        if (column.columns?.length) {\n          findMaxDepth(column.columns, depth + 1)\n        }\n      }, 0)\n  }\n\n  findMaxDepth(allColumns)\n\n  let headerGroups: HeaderGroup[] = []\n\n  const createHeaderGroup = (\n    headersToGroup: Header[],\n    depth: number\n  ) => {\n    // The header group we are creating\n    const headerGroup: HeaderGroup = {\n      depth,\n      id: [headerFamily, `${depth}`].filter(Boolean).join('_'),\n      headers: [],\n    }\n\n    // The parent columns we're going to scan next\n    const pendingParentHeaders: Header[] = []\n\n    // Scan each column for parents\n    headersToGroup.forEach(headerToGroup => {\n      // What is the latest (last) parent column?\n\n      const latestPendingParentHeader = [...pendingParentHeaders].reverse()[0]\n\n      const isLeafHeader = headerToGroup.column.depth === headerGroup.depth\n\n      let column: Column\n      let isPlaceholder = false\n\n      if (isLeafHeader && headerToGroup.column.parent) {\n        // The parent header is new\n        column = headerToGroup.column.parent\n      } else {\n        // The parent header is repeated\n        column = headerToGroup.column\n        isPlaceholder = true\n      }\n\n      if (\n        latestPendingParentHeader &&\n        latestPendingParentHeader?.column === column\n      ) {\n        // This column is repeated. Add it as a sub header to the next batch\n        latestPendingParentHeader.subHeaders.push(headerToGroup)\n      } else {\n        // This is a new header. Let's create it\n        const header = createHeader(table, column, {\n          id: [headerFamily, depth, column.id, headerToGroup?.id]\n            .filter(Boolean)\n            .join('_'),\n          isPlaceholder,\n          placeholderId: isPlaceholder\n            ? `${pendingParentHeaders.filter(d => d.column === column).length}`\n            : undefined,\n          depth,\n          index: pendingParentHeaders.length,\n        })\n\n        // Add the headerToGroup as a subHeader of the new header\n        header.subHeaders.push(headerToGroup)\n        // Add the new header to the pendingParentHeaders to get grouped\n        // in the next batch\n        pendingParentHeaders.push(header)\n      }\n\n      headerGroup.headers.push(headerToGroup)\n      headerToGroup.headerGroup = headerGroup\n    })\n\n    headerGroups.push(headerGroup)\n\n    if (depth > 0) {\n      createHeaderGroup(pendingParentHeaders, depth - 1)\n    }\n  }\n\n  const bottomHeaders = columnsToGroup.map((column, index) =>\n    createHeader(table, column, {\n      depth: maxDepth,\n      index,\n    })\n  )\n\n  createHeaderGroup(bottomHeaders, maxDepth - 1)\n\n  headerGroups.reverse()\n\n  // headerGroups = headerGroups.filter(headerGroup => {\n  //   return !headerGroup.headers.every(header => header.isPlaceholder)\n  // })\n\n  const recurseHeadersForSpans = (\n    headers: Header[]\n  ): { colSpan: number; rowSpan: number }[] => {\n    const filteredHeaders = headers.filter(header =>\n      header.column.getIsVisible()\n    )\n\n    return filteredHeaders.map(header => {\n      let colSpan = 0\n      let rowSpan = 0\n      let childRowSpans = [0]\n\n      if (header.subHeaders && header.subHeaders.length) {\n        childRowSpans = []\n\n        recurseHeadersForSpans(header.subHeaders).forEach(\n          ({ colSpan: childColSpan, rowSpan: childRowSpan }) => {\n            colSpan += childColSpan\n            childRowSpans.push(childRowSpan)\n          }\n        )\n      } else {\n        colSpan = 1\n      }\n\n      const minChildRowSpan = Math.min(...childRowSpans)\n      rowSpan = rowSpan + minChildRowSpan\n\n      header.colSpan = colSpan\n      header.rowSpan = rowSpan\n\n      return { colSpan, rowSpan }\n    })\n  }\n\n  recurseHeadersForSpans(headerGroups[0]?.headers ?? [])\n\n  return headerGroups\n}\n","import { TableFeature } from '../core/table'\nimport { RowData, Column, Header, OnChangeFn, Table, Updater } from '../types'\nimport { makeStateUpdater } from '../utils'\nimport { ColumnPinningPosition } from './Pinning'\n\n//\n\nexport interface ColumnSizingTableState {\n  columnSizing: ColumnSizingState\n  columnSizingInfo: ColumnSizingInfoState\n}\n\nexport type ColumnSizingState = Record\n\nexport interface ColumnSizingInfoState {\n  startOffset: null | number\n  startSize: null | number\n  deltaOffset: null | number\n  deltaPercentage: null | number\n  isResizingColumn: false | string\n  columnSizingStart: [string, number][]\n}\n\nexport type ColumnResizeMode = 'onChange' | 'onEnd'\n\nexport interface ColumnSizingOptions {\n  enableColumnResizing?: boolean\n  columnResizeMode?: ColumnResizeMode\n  onColumnSizingChange?: OnChangeFn\n  onColumnSizingInfoChange?: OnChangeFn\n}\n\nexport interface ColumnSizingDefaultOptions {\n  columnResizeMode: ColumnResizeMode\n  onColumnSizingChange: OnChangeFn\n  onColumnSizingInfoChange: OnChangeFn\n}\n\nexport interface ColumnSizingInstance {\n  setColumnSizing: (updater: Updater) => void\n  setColumnSizingInfo: (updater: Updater) => void\n  resetColumnSizing: (defaultState?: boolean) => void\n  resetHeaderSizeInfo: (defaultState?: boolean) => void\n  getTotalSize: () => number\n  getLeftTotalSize: () => number\n  getCenterTotalSize: () => number\n  getRightTotalSize: () => number\n}\n\nexport interface ColumnSizingColumnDef {\n  enableResizing?: boolean\n  size?: number\n  minSize?: number\n  maxSize?: number\n}\n\nexport interface ColumnSizingColumn {\n  getSize: () => number\n  getStart: (position?: ColumnPinningPosition) => number\n  getCanResize: () => boolean\n  getIsResizing: () => boolean\n  resetSize: () => void\n}\n\nexport interface ColumnSizingHeader {\n  getSize: () => number\n  getStart: (position?: ColumnPinningPosition) => number\n  getResizeHandler: () => (event: unknown) => void\n}\n\n//\n\nexport const defaultColumnSizing = {\n  size: 150,\n  minSize: 20,\n  maxSize: Number.MAX_SAFE_INTEGER,\n}\n\nconst getDefaultColumnSizingInfoState = (): ColumnSizingInfoState => ({\n  startOffset: null,\n  startSize: null,\n  deltaOffset: null,\n  deltaPercentage: null,\n  isResizingColumn: false,\n  columnSizingStart: [],\n})\n\nexport const ColumnSizing: TableFeature = {\n  getDefaultColumnDef: (): ColumnSizingColumnDef => {\n    return defaultColumnSizing\n  },\n  getInitialState: (state): ColumnSizingTableState => {\n    return {\n      columnSizing: {},\n      columnSizingInfo: getDefaultColumnSizingInfoState(),\n      ...state,\n    }\n  },\n\n  getDefaultOptions: (\n    table: Table\n  ): ColumnSizingDefaultOptions => {\n    return {\n      columnResizeMode: 'onEnd',\n      onColumnSizingChange: makeStateUpdater('columnSizing', table),\n      onColumnSizingInfoChange: makeStateUpdater('columnSizingInfo', table),\n    }\n  },\n\n  createColumn: (\n    column: Column,\n    table: Table\n  ): ColumnSizingColumn => {\n    return {\n      getSize: () => {\n        const columnSize = table.getState().columnSizing[column.id]\n\n        return Math.min(\n          Math.max(\n            column.columnDef.minSize ?? defaultColumnSizing.minSize,\n            columnSize ?? column.columnDef.size ?? defaultColumnSizing.size\n          ),\n          column.columnDef.maxSize ?? defaultColumnSizing.maxSize\n        )\n      },\n      getStart: position => {\n        const columns = !position\n          ? table.getVisibleLeafColumns()\n          : position === 'left'\n          ? table.getLeftVisibleLeafColumns()\n          : table.getRightVisibleLeafColumns()\n\n        const index = columns.findIndex(d => d.id === column.id)\n\n        if (index > 0) {\n          const prevSiblingColumn = columns[index - 1]!\n\n          return (\n            prevSiblingColumn.getStart(position) + prevSiblingColumn.getSize()\n          )\n        }\n\n        return 0\n      },\n      resetSize: () => {\n        table.setColumnSizing(({ [column.id]: _, ...rest }) => {\n          return rest\n        })\n      },\n      getCanResize: () => {\n        return (\n          (column.columnDef.enableResizing ?? true) &&\n          (table.options.enableColumnResizing ?? true)\n        )\n      },\n      getIsResizing: () => {\n        return table.getState().columnSizingInfo.isResizingColumn === column.id\n      },\n    }\n  },\n\n  createHeader: (\n    header: Header,\n    table: Table\n  ): ColumnSizingHeader => {\n    return {\n      getSize: () => {\n        let sum = 0\n\n        const recurse = (header: Header) => {\n          if (header.subHeaders.length) {\n            header.subHeaders.forEach(recurse)\n          } else {\n            sum += header.column.getSize() ?? 0\n          }\n        }\n\n        recurse(header)\n\n        return sum\n      },\n      getStart: () => {\n        if (header.index > 0) {\n          const prevSiblingHeader =\n            header.headerGroup.headers[header.index - 1]!\n          return prevSiblingHeader.getStart() + prevSiblingHeader.getSize()\n        }\n\n        return 0\n      },\n      getResizeHandler: () => {\n        const column = table.getColumn(header.column.id)\n        const canResize = column?.getCanResize()\n\n        return (e: unknown) => {\n          if (!column || !canResize) {\n            return\n          }\n\n          ;(e as any).persist?.()\n\n          if (isTouchStartEvent(e)) {\n            // lets not respond to multiple touches (e.g. 2 or 3 fingers)\n            if (e.touches && e.touches.length > 1) {\n              return\n            }\n          }\n\n          const startSize = header.getSize()\n\n          const columnSizingStart: [string, number][] = header\n            ? header\n                .getLeafHeaders()\n                .map(d => [d.column.id, d.column.getSize()])\n            : [[column.id, column.getSize()]]\n\n          const clientX = isTouchStartEvent(e)\n            ? Math.round(e.touches[0]!.clientX)\n            : (e as MouseEvent).clientX\n\n          const newColumnSizing: ColumnSizingState = {}\n\n          const updateOffset = (\n            eventType: 'move' | 'end',\n            clientXPos?: number\n          ) => {\n            if (typeof clientXPos !== 'number') {\n              return\n            }\n\n            table.setColumnSizingInfo(old => {\n              const deltaOffset = clientXPos - (old?.startOffset ?? 0)\n              const deltaPercentage = Math.max(\n                deltaOffset / (old?.startSize ?? 0),\n                -0.999999\n              )\n\n              old.columnSizingStart.forEach(([columnId, headerSize]) => {\n                newColumnSizing[columnId] =\n                  Math.round(\n                    Math.max(headerSize + headerSize * deltaPercentage, 0) * 100\n                  ) / 100\n              })\n\n              return {\n                ...old,\n                deltaOffset,\n                deltaPercentage,\n              }\n            })\n\n            if (\n              table.options.columnResizeMode === 'onChange' ||\n              eventType === 'end'\n            ) {\n              table.setColumnSizing(old => ({\n                ...old,\n                ...newColumnSizing,\n              }))\n            }\n          }\n\n          const onMove = (clientXPos?: number) =>\n            updateOffset('move', clientXPos)\n\n          const onEnd = (clientXPos?: number) => {\n            updateOffset('end', clientXPos)\n\n            table.setColumnSizingInfo(old => ({\n              ...old,\n              isResizingColumn: false,\n              startOffset: null,\n              startSize: null,\n              deltaOffset: null,\n              deltaPercentage: null,\n              columnSizingStart: [],\n            }))\n          }\n\n          const mouseEvents = {\n            moveHandler: (e: MouseEvent) => onMove(e.clientX),\n            upHandler: (e: MouseEvent) => {\n              document.removeEventListener('mousemove', mouseEvents.moveHandler)\n              document.removeEventListener('mouseup', mouseEvents.upHandler)\n              onEnd(e.clientX)\n            },\n          }\n\n          const touchEvents = {\n            moveHandler: (e: TouchEvent) => {\n              if (e.cancelable) {\n                e.preventDefault()\n                e.stopPropagation()\n              }\n              onMove(e.touches[0]!.clientX)\n              return false\n            },\n            upHandler: (e: TouchEvent) => {\n              document.removeEventListener('touchmove', touchEvents.moveHandler)\n              document.removeEventListener('touchend', touchEvents.upHandler)\n              if (e.cancelable) {\n                e.preventDefault()\n                e.stopPropagation()\n              }\n              onEnd(e.touches[0]?.clientX)\n            },\n          }\n\n          const passiveIfSupported = passiveEventSupported()\n            ? { passive: false }\n            : false\n\n          if (isTouchStartEvent(e)) {\n            document.addEventListener(\n              'touchmove',\n              touchEvents.moveHandler,\n              passiveIfSupported\n            )\n            document.addEventListener(\n              'touchend',\n              touchEvents.upHandler,\n              passiveIfSupported\n            )\n          } else {\n            document.addEventListener(\n              'mousemove',\n              mouseEvents.moveHandler,\n              passiveIfSupported\n            )\n            document.addEventListener(\n              'mouseup',\n              mouseEvents.upHandler,\n              passiveIfSupported\n            )\n          }\n\n          table.setColumnSizingInfo(old => ({\n            ...old,\n            startOffset: clientX,\n            startSize,\n            deltaOffset: 0,\n            deltaPercentage: 0,\n            columnSizingStart,\n            isResizingColumn: column.id,\n          }))\n        }\n      },\n    }\n  },\n\n  createTable: (\n    table: Table\n  ): ColumnSizingInstance => {\n    return {\n      setColumnSizing: updater => table.options.onColumnSizingChange?.(updater),\n      setColumnSizingInfo: updater =>\n        table.options.onColumnSizingInfoChange?.(updater),\n      resetColumnSizing: defaultState => {\n        table.setColumnSizing(\n          defaultState ? {} : table.initialState.columnSizing ?? {}\n        )\n      },\n      resetHeaderSizeInfo: defaultState => {\n        table.setColumnSizingInfo(\n          defaultState\n            ? getDefaultColumnSizingInfoState()\n            : table.initialState.columnSizingInfo ??\n                getDefaultColumnSizingInfoState()\n        )\n      },\n      getTotalSize: () =>\n        table.getHeaderGroups()[0]?.headers.reduce((sum, header) => {\n          return sum + header.getSize()\n        }, 0) ?? 0,\n      getLeftTotalSize: () =>\n        table.getLeftHeaderGroups()[0]?.headers.reduce((sum, header) => {\n          return sum + header.getSize()\n        }, 0) ?? 0,\n      getCenterTotalSize: () =>\n        table.getCenterHeaderGroups()[0]?.headers.reduce((sum, header) => {\n          return sum + header.getSize()\n        }, 0) ?? 0,\n      getRightTotalSize: () =>\n        table.getRightHeaderGroups()[0]?.headers.reduce((sum, header) => {\n          return sum + header.getSize()\n        }, 0) ?? 0,\n    }\n  },\n}\n\nlet passiveSupported: boolean | null = null\nexport function passiveEventSupported() {\n  if (typeof passiveSupported === 'boolean') return passiveSupported\n\n  let supported = false\n  try {\n    const options = {\n      get passive() {\n        supported = true\n        return false\n      },\n    }\n\n    const noop = () => {}\n\n    window.addEventListener('test', noop, options)\n    window.removeEventListener('test', noop)\n  } catch (err) {\n    supported = false\n  }\n  passiveSupported = supported\n  return passiveSupported\n}\n\nfunction isTouchStartEvent(e: unknown): e is TouchEvent {\n  return (e as TouchEvent).type === 'touchstart'\n}\n","import { RowModel } from '..'\nimport { TableFeature } from '../core/table'\nimport { OnChangeFn, Table, Row, Updater, RowData } from '../types'\nimport { makeStateUpdater } from '../utils'\n\nexport type ExpandedStateList = Record\nexport type ExpandedState = true | Record\nexport interface ExpandedTableState {\n  expanded: ExpandedState\n}\n\nexport interface ExpandedRow {\n  toggleExpanded: (expanded?: boolean) => void\n  getIsExpanded: () => boolean\n  getCanExpand: () => boolean\n  getToggleExpandedHandler: () => () => void\n}\n\nexport interface ExpandedOptions {\n  manualExpanding?: boolean\n  onExpandedChange?: OnChangeFn\n  autoResetExpanded?: boolean\n  enableExpanding?: boolean\n  getExpandedRowModel?: (table: Table) => () => RowModel\n  getIsRowExpanded?: (row: Row) => boolean\n  getRowCanExpand?: (row: Row) => boolean\n  paginateExpandedRows?: boolean\n}\n\nexport interface ExpandedInstance {\n  _autoResetExpanded: () => void\n  setExpanded: (updater: Updater) => void\n  toggleAllRowsExpanded: (expanded?: boolean) => void\n  resetExpanded: (defaultState?: boolean) => void\n  getCanSomeRowsExpand: () => boolean\n  getToggleAllRowsExpandedHandler: () => (event: unknown) => void\n  getIsSomeRowsExpanded: () => boolean\n  getIsAllRowsExpanded: () => boolean\n  getExpandedDepth: () => number\n  getExpandedRowModel: () => RowModel\n  _getExpandedRowModel?: () => RowModel\n  getPreExpandedRowModel: () => RowModel\n}\n\n//\n\nexport const Expanding: TableFeature = {\n  getInitialState: (state): ExpandedTableState => {\n    return {\n      expanded: {},\n      ...state,\n    }\n  },\n\n  getDefaultOptions: (\n    table: Table\n  ): ExpandedOptions => {\n    return {\n      onExpandedChange: makeStateUpdater('expanded', table),\n      paginateExpandedRows: true,\n    }\n  },\n\n  createTable: (\n    table: Table\n  ): ExpandedInstance => {\n    let registered = false\n    let queued = false\n\n    return {\n      _autoResetExpanded: () => {\n        if (!registered) {\n          table._queue(() => {\n            registered = true\n          })\n          return\n        }\n\n        if (\n          table.options.autoResetAll ??\n          table.options.autoResetExpanded ??\n          !table.options.manualExpanding\n        ) {\n          if (queued) return\n          queued = true\n          table._queue(() => {\n            table.resetExpanded()\n            queued = false\n          })\n        }\n      },\n      setExpanded: updater => table.options.onExpandedChange?.(updater),\n      toggleAllRowsExpanded: expanded => {\n        if (expanded ?? !table.getIsAllRowsExpanded()) {\n          table.setExpanded(true)\n        } else {\n          table.setExpanded({})\n        }\n      },\n      resetExpanded: defaultState => {\n        table.setExpanded(\n          defaultState ? {} : table.initialState?.expanded ?? {}\n        )\n      },\n      getCanSomeRowsExpand: () => {\n        return table\n          .getPrePaginationRowModel()\n          .flatRows.some(row => row.getCanExpand())\n      },\n      getToggleAllRowsExpandedHandler: () => {\n        return (e: unknown) => {\n          ;(e as any).persist?.()\n          table.toggleAllRowsExpanded()\n        }\n      },\n      getIsSomeRowsExpanded: () => {\n        const expanded = table.getState().expanded\n        return expanded === true || Object.values(expanded).some(Boolean)\n      },\n      getIsAllRowsExpanded: () => {\n        const expanded = table.getState().expanded\n\n        // If expanded is true, save some cycles and return true\n        if (typeof expanded === 'boolean') {\n          return expanded === true\n        }\n\n        if (!Object.keys(expanded).length) {\n          return false\n        }\n\n        // If any row is not expanded, return false\n        if (table.getRowModel().flatRows.some(row => !row.getIsExpanded())) {\n          return false\n        }\n\n        // They must all be expanded :shrug:\n        return true\n      },\n      getExpandedDepth: () => {\n        let maxDepth = 0\n\n        const rowIds =\n          table.getState().expanded === true\n            ? Object.keys(table.getRowModel().rowsById)\n            : Object.keys(table.getState().expanded)\n\n        rowIds.forEach(id => {\n          const splitId = id.split('.')\n          maxDepth = Math.max(maxDepth, splitId.length)\n        })\n\n        return maxDepth\n      },\n      getPreExpandedRowModel: () => table.getSortedRowModel(),\n      getExpandedRowModel: () => {\n        if (!table._getExpandedRowModel && table.options.getExpandedRowModel) {\n          table._getExpandedRowModel = table.options.getExpandedRowModel(table)\n        }\n\n        if (table.options.manualExpanding || !table._getExpandedRowModel) {\n          return table.getPreExpandedRowModel()\n        }\n\n        return table._getExpandedRowModel()\n      },\n    }\n  },\n\n  createRow: (\n    row: Row,\n    table: Table\n  ): ExpandedRow => {\n    return {\n      toggleExpanded: expanded => {\n        table.setExpanded(old => {\n          const exists = old === true ? true : !!old?.[row.id]\n\n          let oldExpanded: ExpandedStateList = {}\n\n          if (old === true) {\n            Object.keys(table.getRowModel().rowsById).forEach(rowId => {\n              oldExpanded[rowId] = true\n            })\n          } else {\n            oldExpanded = old\n          }\n\n          expanded = expanded ?? !exists\n\n          if (!exists && expanded) {\n            return {\n              ...oldExpanded,\n              [row.id]: true,\n            }\n          }\n\n          if (exists && !expanded) {\n            const { [row.id]: _, ...rest } = oldExpanded\n            return rest\n          }\n\n          return old\n        })\n      },\n      getIsExpanded: () => {\n        const expanded = table.getState().expanded\n\n        return !!(\n          table.options.getIsRowExpanded?.(row) ??\n          (expanded === true || expanded?.[row.id])\n        )\n      },\n      getCanExpand: () => {\n        return (\n          table.options.getRowCanExpand?.(row) ??\n          ((table.options.enableExpanding ?? true) && !!row.subRows?.length)\n        )\n      },\n      getToggleExpandedHandler: () => {\n        const canExpand = row.getCanExpand()\n\n        return () => {\n          if (!canExpand) return\n          row.toggleExpanded()\n        }\n      },\n    }\n  },\n}\n","import { FilterFn } from './features/Filters'\n\nconst includesString: FilterFn = (\n  row,\n  columnId: string,\n  filterValue: string\n) => {\n  const search = filterValue.toLowerCase()\n  return Boolean(\n    row\n      .getValue(columnId)\n      ?.toString()\n      ?.toLowerCase()\n      ?.includes(search)\n  )\n}\n\nincludesString.autoRemove = (val: any) => testFalsey(val)\n\nconst includesStringSensitive: FilterFn = (\n  row,\n  columnId: string,\n  filterValue: string\n) => {\n  return Boolean(\n    row.getValue(columnId)?.toString()?.includes(filterValue)\n  )\n}\n\nincludesStringSensitive.autoRemove = (val: any) => testFalsey(val)\n\nconst equalsString: FilterFn = (\n  row,\n  columnId: string,\n  filterValue: string\n) => {\n  return (\n    row.getValue(columnId)?.toString()?.toLowerCase() ===\n    filterValue?.toLowerCase()\n  )\n}\n\nequalsString.autoRemove = (val: any) => testFalsey(val)\n\nconst arrIncludes: FilterFn = (\n  row,\n  columnId: string,\n  filterValue: unknown\n) => {\n  return row.getValue(columnId)?.includes(filterValue)\n}\n\narrIncludes.autoRemove = (val: any) => testFalsey(val) || !val?.length\n\nconst arrIncludesAll: FilterFn = (\n  row,\n  columnId: string,\n  filterValue: unknown[]\n) => {\n  return !filterValue.some(\n    val => !row.getValue(columnId)?.includes(val)\n  )\n}\n\narrIncludesAll.autoRemove = (val: any) => testFalsey(val) || !val?.length\n\nconst arrIncludesSome: FilterFn = (\n  row,\n  columnId: string,\n  filterValue: unknown[]\n) => {\n  return filterValue.some(val =>\n    row.getValue(columnId)?.includes(val)\n  )\n}\n\narrIncludesSome.autoRemove = (val: any) => testFalsey(val) || !val?.length\n\nconst equals: FilterFn = (row, columnId: string, filterValue: unknown) => {\n  return row.getValue(columnId) === filterValue\n}\n\nequals.autoRemove = (val: any) => testFalsey(val)\n\nconst weakEquals: FilterFn = (\n  row,\n  columnId: string,\n  filterValue: unknown\n) => {\n  return row.getValue(columnId) == filterValue\n}\n\nweakEquals.autoRemove = (val: any) => testFalsey(val)\n\nconst inNumberRange: FilterFn = (\n  row,\n  columnId: string,\n  filterValue: [number, number]\n) => {\n  let [min, max] = filterValue\n\n  const rowValue = row.getValue(columnId)\n  return rowValue >= min && rowValue <= max\n}\n\ninNumberRange.resolveFilterValue = (val: [any, any]) => {\n  let [unsafeMin, unsafeMax] = val\n\n  let parsedMin =\n    typeof unsafeMin !== 'number' ? parseFloat(unsafeMin as string) : unsafeMin\n  let parsedMax =\n    typeof unsafeMax !== 'number' ? parseFloat(unsafeMax as string) : unsafeMax\n\n  let min =\n    unsafeMin === null || Number.isNaN(parsedMin) ? -Infinity : parsedMin\n  let max = unsafeMax === null || Number.isNaN(parsedMax) ? Infinity : parsedMax\n\n  if (min > max) {\n    const temp = min\n    min = max\n    max = temp\n  }\n\n  return [min, max] as const\n}\n\ninNumberRange.autoRemove = (val: any) =>\n  testFalsey(val) || (testFalsey(val[0]) && testFalsey(val[1]))\n\n// Export\n\nexport const filterFns = {\n  includesString,\n  includesStringSensitive,\n  equalsString,\n  arrIncludes,\n  arrIncludesAll,\n  arrIncludesSome,\n  equals,\n  weakEquals,\n  inNumberRange,\n}\n\nexport type BuiltInFilterFn = keyof typeof filterFns\n\n// Utils\n\nfunction testFalsey(val: any) {\n  return val === undefined || val === null || val === ''\n}\n","import { RowModel } from '..'\nimport { TableFeature } from '../core/table'\nimport { BuiltInFilterFn, filterFns } from '../filterFns'\nimport {\n  Column,\n  OnChangeFn,\n  Table,\n  Row,\n  Updater,\n  RowData,\n  FilterMeta,\n  FilterFns,\n} from '../types'\nimport { functionalUpdate, isFunction, makeStateUpdater } from '../utils'\n\nexport interface FiltersTableState {\n  columnFilters: ColumnFiltersState\n  globalFilter: any\n}\n\nexport type ColumnFiltersState = ColumnFilter[]\n\nexport interface ColumnFilter {\n  id: string\n  value: unknown\n}\n\nexport interface ResolvedColumnFilter {\n  id: string\n  resolvedValue: unknown\n  filterFn: FilterFn\n}\n\nexport interface FilterFn {\n  (\n    row: Row,\n    columnId: string,\n    filterValue: any,\n    addMeta: (meta: FilterMeta) => void\n  ): boolean\n\n  resolveFilterValue?: TransformFilterValueFn\n  autoRemove?: ColumnFilterAutoRemoveTestFn\n}\n\nexport type TransformFilterValueFn = (\n  value: any,\n  column?: Column\n) => unknown\n\nexport type ColumnFilterAutoRemoveTestFn = (\n  value: any,\n  column?: Column\n) => boolean\n\nexport type CustomFilterFns = Record<\n  string,\n  FilterFn\n>\n\nexport type FilterFnOption =\n  | 'auto'\n  | BuiltInFilterFn\n  | keyof FilterFns\n  | FilterFn\n\nexport interface FiltersColumnDef {\n  filterFn?: FilterFnOption\n  enableColumnFilter?: boolean\n  enableGlobalFilter?: boolean\n}\n\nexport interface FiltersColumn {\n  getAutoFilterFn: () => FilterFn | undefined\n  getFilterFn: () => FilterFn | undefined\n  setFilterValue: (updater: Updater) => void\n  getCanFilter: () => boolean\n  getCanGlobalFilter: () => boolean\n  getFacetedRowModel: () => RowModel\n  _getFacetedRowModel?: () => RowModel\n  getIsFiltered: () => boolean\n  getFilterValue: () => unknown\n  getFilterIndex: () => number\n  getFacetedUniqueValues: () => Map\n  _getFacetedUniqueValues?: () => Map\n  getFacetedMinMaxValues: () => undefined | [number, number]\n  _getFacetedMinMaxValues?: () => undefined | [number, number]\n}\n\nexport interface FiltersRow {\n  columnFilters: Record\n  columnFiltersMeta: Record\n}\n\ninterface FiltersOptionsBase {\n  enableFilters?: boolean\n  manualFiltering?: boolean\n  filterFromLeafRows?: boolean\n  maxLeafRowFilterDepth?: number\n  getFilteredRowModel?: (table: Table) => () => RowModel\n\n  // Column\n  onColumnFiltersChange?: OnChangeFn\n  enableColumnFilters?: boolean\n\n  // Global\n  globalFilterFn?: FilterFnOption\n  onGlobalFilterChange?: OnChangeFn\n  enableGlobalFilter?: boolean\n  getColumnCanGlobalFilter?: (column: Column) => boolean\n\n  // Faceting\n  getFacetedRowModel?: (\n    table: Table,\n    columnId: string\n  ) => () => RowModel\n  getFacetedUniqueValues?: (\n    table: Table,\n    columnId: string\n  ) => () => Map\n  getFacetedMinMaxValues?: (\n    table: Table,\n    columnId: string\n  ) => () => undefined | [number, number]\n}\n\ntype ResolvedFilterFns = keyof FilterFns extends never\n  ? {\n      filterFns?: Record>\n    }\n  : {\n      filterFns: Record>\n    }\n\nexport interface FiltersOptions\n  extends FiltersOptionsBase,\n    ResolvedFilterFns {}\n\nexport interface FiltersInstance {\n  setColumnFilters: (updater: Updater) => void\n\n  resetColumnFilters: (defaultState?: boolean) => void\n\n  // Column Filters\n  getPreFilteredRowModel: () => RowModel\n  getFilteredRowModel: () => RowModel\n  _getFilteredRowModel?: () => RowModel\n\n  // Global Filters\n  setGlobalFilter: (updater: Updater) => void\n  resetGlobalFilter: (defaultState?: boolean) => void\n  getGlobalAutoFilterFn: () => FilterFn | undefined\n  getGlobalFilterFn: () => FilterFn | undefined\n  getGlobalFacetedRowModel: () => RowModel\n  _getGlobalFacetedRowModel?: () => RowModel\n  getGlobalFacetedUniqueValues: () => Map\n  _getGlobalFacetedUniqueValues?: () => Map\n  getGlobalFacetedMinMaxValues: () => undefined | [number, number]\n  _getGlobalFacetedMinMaxValues?: () => undefined | [number, number]\n}\n\n//\n\nexport const Filters: TableFeature = {\n  getDefaultColumnDef: (): FiltersColumnDef => {\n    return {\n      filterFn: 'auto',\n    }\n  },\n\n  getInitialState: (state): FiltersTableState => {\n    return {\n      columnFilters: [],\n      globalFilter: undefined,\n      // filtersProgress: 1,\n      // facetProgress: {},\n      ...state,\n    }\n  },\n\n  getDefaultOptions: (\n    table: Table\n  ): FiltersOptions => {\n    return {\n      onColumnFiltersChange: makeStateUpdater('columnFilters', table),\n      onGlobalFilterChange: makeStateUpdater('globalFilter', table),\n      filterFromLeafRows: false,\n      maxLeafRowFilterDepth: 100,\n      globalFilterFn: 'auto',\n      getColumnCanGlobalFilter: column => {\n        const value = table\n          .getCoreRowModel()\n          .flatRows[0]?._getAllCellsByColumnId()\n          [column.id]?.getValue()\n\n        return typeof value === 'string' || typeof value === 'number'\n      },\n    } as FiltersOptions\n  },\n\n  createColumn: (\n    column: Column,\n    table: Table\n  ): FiltersColumn => {\n    return {\n      getAutoFilterFn: () => {\n        const firstRow = table.getCoreRowModel().flatRows[0]\n\n        const value = firstRow?.getValue(column.id)\n\n        if (typeof value === 'string') {\n          return filterFns.includesString\n        }\n\n        if (typeof value === 'number') {\n          return filterFns.inNumberRange\n        }\n\n        if (typeof value === 'boolean') {\n          return filterFns.equals\n        }\n\n        if (value !== null && typeof value === 'object') {\n          return filterFns.equals\n        }\n\n        if (Array.isArray(value)) {\n          return filterFns.arrIncludes\n        }\n\n        return filterFns.weakEquals\n      },\n      getFilterFn: () => {\n        return isFunction(column.columnDef.filterFn)\n          ? column.columnDef.filterFn\n          : column.columnDef.filterFn === 'auto'\n          ? column.getAutoFilterFn()\n          // @ts-ignore \n          : table.options.filterFns?.[column.columnDef.filterFn as string] ??\n            filterFns[column.columnDef.filterFn as BuiltInFilterFn]\n      },\n      getCanFilter: () => {\n        return (\n          (column.columnDef.enableColumnFilter ?? true) &&\n          (table.options.enableColumnFilters ?? true) &&\n          (table.options.enableFilters ?? true) &&\n          !!column.accessorFn\n        )\n      },\n\n      getCanGlobalFilter: () => {\n        return (\n          (column.columnDef.enableGlobalFilter ?? true) &&\n          (table.options.enableGlobalFilter ?? true) &&\n          (table.options.enableFilters ?? true) &&\n          (table.options.getColumnCanGlobalFilter?.(column) ?? true) &&\n          !!column.accessorFn\n        )\n      },\n\n      getIsFiltered: () => column.getFilterIndex() > -1,\n\n      getFilterValue: () =>\n        table.getState().columnFilters?.find(d => d.id === column.id)?.value,\n\n      getFilterIndex: () =>\n        table.getState().columnFilters?.findIndex(d => d.id === column.id) ??\n        -1,\n\n      setFilterValue: value => {\n        table.setColumnFilters(old => {\n          const filterFn = column.getFilterFn()\n          const previousfilter = old?.find(d => d.id === column.id)\n\n          const newFilter = functionalUpdate(\n            value,\n            previousfilter ? previousfilter.value : undefined\n          )\n\n          //\n          if (\n            shouldAutoRemoveFilter(\n              filterFn as FilterFn,\n              newFilter,\n              column\n            )\n          ) {\n            return old?.filter(d => d.id !== column.id) ?? []\n          }\n\n          const newFilterObj = { id: column.id, value: newFilter }\n\n          if (previousfilter) {\n            return (\n              old?.map(d => {\n                if (d.id === column.id) {\n                  return newFilterObj\n                }\n                return d\n              }) ?? []\n            )\n          }\n\n          if (old?.length) {\n            return [...old, newFilterObj]\n          }\n\n          return [newFilterObj]\n        })\n      },\n      _getFacetedRowModel:\n        table.options.getFacetedRowModel &&\n        table.options.getFacetedRowModel(table, column.id),\n      getFacetedRowModel: () => {\n        if (!column._getFacetedRowModel) {\n          return table.getPreFilteredRowModel()\n        }\n\n        return column._getFacetedRowModel()\n      },\n      _getFacetedUniqueValues:\n        table.options.getFacetedUniqueValues &&\n        table.options.getFacetedUniqueValues(table, column.id),\n      getFacetedUniqueValues: () => {\n        if (!column._getFacetedUniqueValues) {\n          return new Map()\n        }\n\n        return column._getFacetedUniqueValues()\n      },\n      _getFacetedMinMaxValues:\n        table.options.getFacetedMinMaxValues &&\n        table.options.getFacetedMinMaxValues(table, column.id),\n      getFacetedMinMaxValues: () => {\n        if (!column._getFacetedMinMaxValues) {\n          return undefined\n        }\n\n        return column._getFacetedMinMaxValues()\n      },\n      // () => [column.getFacetedRowModel()],\n      // facetedRowModel => getRowModelMinMaxValues(facetedRowModel, column.id),\n    }\n  },\n\n  createRow: (\n    row: Row,\n    table: Table\n  ): FiltersRow => {\n    return {\n      columnFilters: {},\n      columnFiltersMeta: {},\n    }\n  },\n\n  createTable: (\n    table: Table\n  ): FiltersInstance => {\n    return {\n      getGlobalAutoFilterFn: () => {\n        return filterFns.includesString\n      },\n\n      getGlobalFilterFn: () => {\n        const { globalFilterFn: globalFilterFn } = table.options\n\n        return isFunction(globalFilterFn)\n          ? globalFilterFn\n          : globalFilterFn === 'auto'\n          ? table.getGlobalAutoFilterFn()\n          // @ts-ignore\n          : table.options.filterFns?.[globalFilterFn as string] ??\n            filterFns[globalFilterFn as BuiltInFilterFn]\n      },\n\n      setColumnFilters: (updater: Updater) => {\n        const leafColumns = table.getAllLeafColumns()\n\n        const updateFn = (old: ColumnFiltersState) => {\n          return functionalUpdate(updater, old)?.filter(filter => {\n            const column = leafColumns.find(d => d.id === filter.id)\n\n            if (column) {\n              const filterFn = column.getFilterFn()\n\n              if (shouldAutoRemoveFilter(filterFn, filter.value, column)) {\n                return false\n              }\n            }\n\n            return true\n          })\n        }\n\n        table.options.onColumnFiltersChange?.(updateFn)\n      },\n\n      setGlobalFilter: updater => {\n        table.options.onGlobalFilterChange?.(updater)\n      },\n\n      resetGlobalFilter: defaultState => {\n        table.setGlobalFilter(\n          defaultState ? undefined : table.initialState.globalFilter\n        )\n      },\n\n      resetColumnFilters: defaultState => {\n        table.setColumnFilters(\n          defaultState ? [] : table.initialState?.columnFilters ?? []\n        )\n      },\n\n      getPreFilteredRowModel: () => table.getCoreRowModel(),\n      getFilteredRowModel: () => {\n        if (!table._getFilteredRowModel && table.options.getFilteredRowModel) {\n          table._getFilteredRowModel = table.options.getFilteredRowModel(table)\n        }\n\n        if (table.options.manualFiltering || !table._getFilteredRowModel) {\n          return table.getPreFilteredRowModel()\n        }\n\n        return table._getFilteredRowModel()\n      },\n\n      _getGlobalFacetedRowModel:\n        table.options.getFacetedRowModel &&\n        table.options.getFacetedRowModel(table, '__global__'),\n\n      getGlobalFacetedRowModel: () => {\n        if (table.options.manualFiltering || !table._getGlobalFacetedRowModel) {\n          return table.getPreFilteredRowModel()\n        }\n\n        return table._getGlobalFacetedRowModel()\n      },\n\n      _getGlobalFacetedUniqueValues:\n        table.options.getFacetedUniqueValues &&\n        table.options.getFacetedUniqueValues(table, '__global__'),\n      getGlobalFacetedUniqueValues: () => {\n        if (!table._getGlobalFacetedUniqueValues) {\n          return new Map()\n        }\n\n        return table._getGlobalFacetedUniqueValues()\n      },\n\n      _getGlobalFacetedMinMaxValues:\n        table.options.getFacetedMinMaxValues &&\n        table.options.getFacetedMinMaxValues(table, '__global__'),\n      getGlobalFacetedMinMaxValues: () => {\n        if (!table._getGlobalFacetedMinMaxValues) {\n          return\n        }\n\n        return table._getGlobalFacetedMinMaxValues()\n      },\n    }\n  },\n}\n\nexport function shouldAutoRemoveFilter(\n  filterFn?: FilterFn,\n  value?: any,\n  column?: Column\n) {\n  return (\n    (filterFn && filterFn.autoRemove\n      ? filterFn.autoRemove(value, column)\n      : false) ||\n    typeof value === 'undefined' ||\n    (typeof value === 'string' && !value)\n  )\n}\n","import { AggregationFn } from './features/Grouping'\nimport { isNumberArray } from './utils'\n\nconst sum: AggregationFn = (columnId, _leafRows, childRows) => {\n  // It's faster to just add the aggregations together instead of\n  // process leaf nodes individually\n  return childRows.reduce((sum, next) => {\n    const nextValue = next.getValue(columnId)\n    return sum + (typeof nextValue === 'number' ? nextValue : 0)\n  }, 0)\n}\n\nconst min: AggregationFn = (columnId, _leafRows, childRows) => {\n  let min: number | undefined\n\n  childRows.forEach(row => {\n    const value = row.getValue(columnId)\n\n    if (\n      value != null &&\n      (min! > value || (min === undefined && value >= value))\n    ) {\n      min = value\n    }\n  })\n\n  return min\n}\n\nconst max: AggregationFn = (columnId, _leafRows, childRows) => {\n  let max: number | undefined\n\n  childRows.forEach(row => {\n    const value = row.getValue(columnId)\n    if (\n      value != null &&\n      (max! < value || (max === undefined && value >= value))\n    ) {\n      max = value\n    }\n  })\n\n  return max\n}\n\nconst extent: AggregationFn = (columnId, _leafRows, childRows) => {\n  let min: number | undefined\n  let max: number | undefined\n\n  childRows.forEach(row => {\n    const value = row.getValue(columnId)\n    if (value != null) {\n      if (min === undefined) {\n        if (value >= value) min = max = value\n      } else {\n        if (min > value) min = value\n        if (max! < value) max = value\n      }\n    }\n  })\n\n  return [min, max]\n}\n\nconst mean: AggregationFn = (columnId, leafRows) => {\n  let count = 0\n  let sum = 0\n\n  leafRows.forEach(row => {\n    let value = row.getValue(columnId)\n    if (value != null && (value = +value) >= value) {\n      ++count, (sum += value)\n    }\n  })\n\n  if (count) return sum / count\n\n  return\n}\n\nconst median: AggregationFn = (columnId, leafRows) => {\n  if (!leafRows.length) {\n    return\n  }\n\n  const values = leafRows.map(row => row.getValue(columnId))\n  if (!isNumberArray(values)) {\n    return\n  }\n  if (values.length === 1) {\n    return values[0]\n  }\n\n  const mid = Math.floor(values.length / 2)\n  const nums = values.sort((a, b) => a - b)\n  return values.length % 2 !== 0 ? nums[mid] : (nums[mid - 1]! + nums[mid]!) / 2\n}\n\nconst unique: AggregationFn = (columnId, leafRows) => {\n  return Array.from(new Set(leafRows.map(d => d.getValue(columnId))).values())\n}\n\nconst uniqueCount: AggregationFn = (columnId, leafRows) => {\n  return new Set(leafRows.map(d => d.getValue(columnId))).size\n}\n\nconst count: AggregationFn = (_columnId, leafRows) => {\n  return leafRows.length\n}\n\nexport const aggregationFns = {\n  sum,\n  min,\n  max,\n  extent,\n  mean,\n  median,\n  unique,\n  uniqueCount,\n  count,\n}\n\nexport type BuiltInAggregationFn = keyof typeof aggregationFns\n","import { RowModel } from '..'\nimport { BuiltInAggregationFn, aggregationFns } from '../aggregationFns'\nimport { TableFeature } from '../core/table'\nimport {\n  Cell,\n  Column,\n  OnChangeFn,\n  Table,\n  Row,\n  Updater,\n  ColumnDefTemplate,\n  RowData,\n  AggregationFns,\n} from '../types'\nimport { isFunction, makeStateUpdater } from '../utils'\n\nexport type GroupingState = string[]\n\nexport interface GroupingTableState {\n  grouping: GroupingState\n}\n\nexport type AggregationFn = (\n  columnId: string,\n  leafRows: Row[],\n  childRows: Row[]\n) => any\n\nexport type CustomAggregationFns = Record>\n\nexport type AggregationFnOption =\n  | 'auto'\n  | keyof AggregationFns\n  | BuiltInAggregationFn\n  | AggregationFn\n\nexport interface GroupingColumnDef {\n  aggregationFn?: AggregationFnOption\n  aggregatedCell?: ColumnDefTemplate<\n    ReturnType['getContext']>\n  >\n  enableGrouping?: boolean\n  getGroupingValue?: (row: TData) => any\n}\n\nexport interface GroupingColumn {\n  getCanGroup: () => boolean\n  getIsGrouped: () => boolean\n  getGroupedIndex: () => number\n  toggleGrouping: () => void\n  getToggleGroupingHandler: () => () => void\n  getAutoAggregationFn: () => AggregationFn | undefined\n  getAggregationFn: () => AggregationFn | undefined\n}\n\nexport interface GroupingRow {\n  groupingColumnId?: string\n  groupingValue?: unknown\n  getIsGrouped: () => boolean\n  getGroupingValue: (columnId: string) => unknown\n  _groupingValuesCache: Record\n}\n\nexport interface GroupingCell {\n  getIsGrouped: () => boolean\n  getIsPlaceholder: () => boolean\n  getIsAggregated: () => boolean\n}\n\nexport interface ColumnDefaultOptions {\n  // Column\n  onGroupingChange: OnChangeFn\n  enableGrouping: boolean\n}\n\ninterface GroupingOptionsBase {\n  manualGrouping?: boolean\n  onGroupingChange?: OnChangeFn\n  enableGrouping?: boolean\n  getGroupedRowModel?: (table: Table) => () => RowModel\n  groupedColumnMode?: false | 'reorder' | 'remove'\n}\n\ntype ResolvedAggregationFns = keyof AggregationFns extends never\n  ? {\n      aggregationFns?: Record>\n    }\n  : {\n      aggregationFns: Record>\n    }\n\nexport interface GroupingOptions\n  extends GroupingOptionsBase,\n    ResolvedAggregationFns {}\n\nexport type GroupingColumnMode = false | 'reorder' | 'remove'\n\nexport interface GroupingInstance {\n  setGrouping: (updater: Updater) => void\n  resetGrouping: (defaultState?: boolean) => void\n  getPreGroupedRowModel: () => RowModel\n  getGroupedRowModel: () => RowModel\n  _getGroupedRowModel?: () => RowModel\n}\n\n//\n\nexport const Grouping: TableFeature = {\n  getDefaultColumnDef: (): GroupingColumnDef<\n    TData,\n    unknown\n  > => {\n    return {\n      aggregatedCell: props => (props.getValue() as any)?.toString?.() ?? null,\n      aggregationFn: 'auto',\n    }\n  },\n\n  getInitialState: (state): GroupingTableState => {\n    return {\n      grouping: [],\n      ...state,\n    }\n  },\n\n  getDefaultOptions: (\n    table: Table\n  ): GroupingOptions => {\n    return {\n      onGroupingChange: makeStateUpdater('grouping', table),\n      groupedColumnMode: 'reorder',\n    }\n  },\n\n  createColumn: (\n    column: Column,\n    table: Table\n  ): GroupingColumn => {\n    return {\n      toggleGrouping: () => {\n        table.setGrouping(old => {\n          // Find any existing grouping for this column\n          if (old?.includes(column.id)) {\n            return old.filter(d => d !== column.id)\n          }\n\n          return [...(old ?? []), column.id]\n        })\n      },\n\n      getCanGroup: () => {\n        return (\n          column.columnDef.enableGrouping ??\n          true ??\n          table.options.enableGrouping ??\n          true ??\n          !!column.accessorFn\n        )\n      },\n\n      getIsGrouped: () => {\n        return table.getState().grouping?.includes(column.id)\n      },\n\n      getGroupedIndex: () => table.getState().grouping?.indexOf(column.id),\n\n      getToggleGroupingHandler: () => {\n        const canGroup = column.getCanGroup()\n\n        return () => {\n          if (!canGroup) return\n          column.toggleGrouping()\n        }\n      },\n      getAutoAggregationFn: () => {\n        const firstRow = table.getCoreRowModel().flatRows[0]\n\n        const value = firstRow?.getValue(column.id)\n\n        if (typeof value === 'number') {\n          return aggregationFns.sum\n        }\n\n        if (Object.prototype.toString.call(value) === '[object Date]') {\n          return aggregationFns.extent\n        }\n      },\n      getAggregationFn: () => {\n        if (!column) {\n          throw new Error()\n        }\n\n        return isFunction(column.columnDef.aggregationFn)\n          ? column.columnDef.aggregationFn\n          : column.columnDef.aggregationFn === 'auto'\n          ? column.getAutoAggregationFn()\n          : table.options.aggregationFns?.[\n              column.columnDef.aggregationFn as string\n            ] ??\n            aggregationFns[\n              column.columnDef.aggregationFn as BuiltInAggregationFn\n            ]\n      },\n    }\n  },\n\n  createTable: (\n    table: Table\n  ): GroupingInstance => {\n    return {\n      setGrouping: updater => table.options.onGroupingChange?.(updater),\n\n      resetGrouping: defaultState => {\n        table.setGrouping(\n          defaultState ? [] : table.initialState?.grouping ?? []\n        )\n      },\n\n      getPreGroupedRowModel: () => table.getFilteredRowModel(),\n      getGroupedRowModel: () => {\n        if (!table._getGroupedRowModel && table.options.getGroupedRowModel) {\n          table._getGroupedRowModel = table.options.getGroupedRowModel(table)\n        }\n\n        if (table.options.manualGrouping || !table._getGroupedRowModel) {\n          return table.getPreGroupedRowModel()\n        }\n\n        return table._getGroupedRowModel()\n      },\n    }\n  },\n\n  createRow: (\n    row: Row,\n    table: Table\n  ): GroupingRow => {\n    return {\n      getIsGrouped: () => !!row.groupingColumnId,\n      getGroupingValue: columnId => {\n        if (row._groupingValuesCache.hasOwnProperty(columnId)) {\n          return row._groupingValuesCache[columnId]\n        }\n\n        const column = table.getColumn(columnId)\n\n        if (!column?.columnDef.getGroupingValue) {\n          return row.getValue(columnId)\n        }\n\n        row._groupingValuesCache[columnId] = column.columnDef.getGroupingValue(\n          row.original\n        )\n\n        return row._groupingValuesCache[columnId]\n      },\n      _groupingValuesCache: {},\n    }\n  },\n\n  createCell: (\n    cell: Cell,\n    column: Column,\n    row: Row,\n    table: Table\n  ): GroupingCell => {\n    const getRenderValue = () =>\n      cell.getValue() ?? table.options.renderFallbackValue\n\n    return {\n      getIsGrouped: () =>\n        column.getIsGrouped() && column.id === row.groupingColumnId,\n      getIsPlaceholder: () => !cell.getIsGrouped() && column.getIsGrouped(),\n      getIsAggregated: () =>\n        !cell.getIsGrouped() &&\n        !cell.getIsPlaceholder() &&\n        !!row.subRows?.length,\n    }\n  },\n}\n\nexport function orderColumns(\n  leafColumns: Column[],\n  grouping: string[],\n  groupedColumnMode?: GroupingColumnMode\n) {\n  if (!grouping?.length || !groupedColumnMode) {\n    return leafColumns\n  }\n\n  const nonGroupingColumns = leafColumns.filter(\n    col => !grouping.includes(col.id)\n  )\n\n  if (groupedColumnMode === 'remove') {\n    return nonGroupingColumns\n  }\n\n  const groupingColumns = grouping\n    .map(g => leafColumns.find(col => col.id === g)!)\n    .filter(Boolean)\n\n  return [...groupingColumns, ...nonGroupingColumns]\n}\n","import { makeStateUpdater, memo } from '../utils'\n\nimport { Table, OnChangeFn, Updater, Column, RowData } from '../types'\n\nimport { orderColumns } from './Grouping'\nimport { TableFeature } from '../core/table'\n\nexport interface ColumnOrderTableState {\n  columnOrder: ColumnOrderState\n}\n\nexport type ColumnOrderState = string[]\n\nexport interface ColumnOrderOptions {\n  onColumnOrderChange?: OnChangeFn\n}\n\nexport interface ColumnOrderDefaultOptions {\n  onColumnOrderChange: OnChangeFn\n}\n\nexport interface ColumnOrderInstance {\n  setColumnOrder: (updater: Updater) => void\n  resetColumnOrder: (defaultState?: boolean) => void\n  _getOrderColumnsFn: () => (\n    columns: Column[]\n  ) => Column[]\n}\n\n//\n\nexport const Ordering: TableFeature = {\n  getInitialState: (state): ColumnOrderTableState => {\n    return {\n      columnOrder: [],\n      ...state,\n    }\n  },\n\n  getDefaultOptions: (\n    table: Table\n  ): ColumnOrderDefaultOptions => {\n    return {\n      onColumnOrderChange: makeStateUpdater('columnOrder', table),\n    }\n  },\n\n  createTable: (\n    table: Table\n  ): ColumnOrderInstance => {\n    return {\n      setColumnOrder: updater => table.options.onColumnOrderChange?.(updater),\n      resetColumnOrder: defaultState => {\n        table.setColumnOrder(\n          defaultState ? [] : table.initialState.columnOrder ?? []\n        )\n      },\n      _getOrderColumnsFn: memo(\n        () => [\n          table.getState().columnOrder,\n          table.getState().grouping,\n          table.options.groupedColumnMode,\n        ],\n        (columnOrder, grouping, groupedColumnMode) => columns => {\n          // Sort grouped columns to the start of the column list\n          // before the headers are built\n          let orderedColumns: Column[] = []\n\n          // If there is no order, return the normal columns\n          if (!columnOrder?.length) {\n            orderedColumns = columns\n          } else {\n            const columnOrderCopy = [...columnOrder]\n\n            // If there is an order, make a copy of the columns\n            const columnsCopy = [...columns]\n\n            // And make a new ordered array of the columns\n\n            // Loop over the columns and place them in order into the new array\n            while (columnsCopy.length && columnOrderCopy.length) {\n              const targetColumnId = columnOrderCopy.shift()\n              const foundIndex = columnsCopy.findIndex(\n                d => d.id === targetColumnId\n              )\n              if (foundIndex > -1) {\n                orderedColumns.push(columnsCopy.splice(foundIndex, 1)[0]!)\n              }\n            }\n\n            // If there are any columns left, add them to the end\n            orderedColumns = [...orderedColumns, ...columnsCopy]\n          }\n\n          return orderColumns(orderedColumns, grouping, groupedColumnMode)\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getOrderColumnsFn',\n          // debug: () => table.options.debugAll ?? table.options.debugTable,\n        }\n      ),\n    }\n  },\n}\n","import { TableFeature } from '../core/table'\nimport { OnChangeFn, Table, RowModel, Updater, RowData } from '../types'\nimport { functionalUpdate, makeStateUpdater, memo } from '../utils'\n\nexport interface PaginationState {\n  pageIndex: number\n  pageSize: number\n}\n\nexport interface PaginationTableState {\n  pagination: PaginationState\n}\n\nexport interface PaginationInitialTableState {\n  pagination?: Partial\n}\n\nexport interface PaginationOptions {\n  pageCount?: number\n  manualPagination?: boolean\n  onPaginationChange?: OnChangeFn\n  autoResetPageIndex?: boolean\n  getPaginationRowModel?: (table: Table) => () => RowModel\n}\n\nexport interface PaginationDefaultOptions {\n  onPaginationChange: OnChangeFn\n}\n\nexport interface PaginationInstance {\n  _autoResetPageIndex: () => void\n  setPagination: (updater: Updater) => void\n  resetPagination: (defaultState?: boolean) => void\n  setPageIndex: (updater: Updater) => void\n  resetPageIndex: (defaultState?: boolean) => void\n  setPageSize: (updater: Updater) => void\n  resetPageSize: (defaultState?: boolean) => void\n  setPageCount: (updater: Updater) => void\n  getPageOptions: () => number[]\n  getCanPreviousPage: () => boolean\n  getCanNextPage: () => boolean\n  previousPage: () => void\n  nextPage: () => void\n  getPrePaginationRowModel: () => RowModel\n  getPaginationRowModel: () => RowModel\n  _getPaginationRowModel?: () => RowModel\n  getPageCount: () => number\n}\n\n//\n\nconst defaultPageIndex = 0\nconst defaultPageSize = 10\n\nconst getDefaultPaginationState = (): PaginationState => ({\n  pageIndex: defaultPageIndex,\n  pageSize: defaultPageSize,\n})\n\nexport const Pagination: TableFeature = {\n  getInitialState: (state): PaginationTableState => {\n    return {\n      ...state,\n      pagination: {\n        ...getDefaultPaginationState(),\n        ...state?.pagination,\n      },\n    }\n  },\n\n  getDefaultOptions: (\n    table: Table\n  ): PaginationDefaultOptions => {\n    return {\n      onPaginationChange: makeStateUpdater('pagination', table),\n    }\n  },\n\n  createTable: (\n    table: Table\n  ): PaginationInstance => {\n    let registered = false\n    let queued = false\n\n    return {\n      _autoResetPageIndex: () => {\n        if (!registered) {\n          table._queue(() => {\n            registered = true\n          })\n          return\n        }\n\n        if (\n          table.options.autoResetAll ??\n          table.options.autoResetPageIndex ??\n          !table.options.manualPagination\n        ) {\n          if (queued) return\n          queued = true\n          table._queue(() => {\n            table.resetPageIndex()\n            queued = false\n          })\n        }\n      },\n      setPagination: updater => {\n        const safeUpdater: Updater = old => {\n          let newState = functionalUpdate(updater, old)\n\n          return newState\n        }\n\n        return table.options.onPaginationChange?.(safeUpdater)\n      },\n      resetPagination: defaultState => {\n        table.setPagination(\n          defaultState\n            ? getDefaultPaginationState()\n            : table.initialState.pagination ?? getDefaultPaginationState()\n        )\n      },\n      setPageIndex: updater => {\n        table.setPagination(old => {\n          let pageIndex = functionalUpdate(updater, old.pageIndex)\n\n          const maxPageIndex =\n            typeof table.options.pageCount === 'undefined' ||\n            table.options.pageCount === -1\n              ? Number.MAX_SAFE_INTEGER\n              : table.options.pageCount - 1\n\n          pageIndex = Math.max(0, Math.min(pageIndex, maxPageIndex))\n\n          return {\n            ...old,\n            pageIndex,\n          }\n        })\n      },\n      resetPageIndex: defaultState => {\n        table.setPageIndex(\n          defaultState\n            ? defaultPageIndex\n            : table.initialState?.pagination?.pageIndex ?? defaultPageIndex\n        )\n      },\n      resetPageSize: defaultState => {\n        table.setPageSize(\n          defaultState\n            ? defaultPageSize\n            : table.initialState?.pagination?.pageSize ?? defaultPageSize\n        )\n      },\n      setPageSize: updater => {\n        table.setPagination(old => {\n          const pageSize = Math.max(1, functionalUpdate(updater, old.pageSize))\n          const topRowIndex = old.pageSize * old.pageIndex!\n          const pageIndex = Math.floor(topRowIndex / pageSize)\n\n          return {\n            ...old,\n            pageIndex,\n            pageSize,\n          }\n        })\n      },\n      setPageCount: updater =>\n        table.setPagination(old => {\n          let newPageCount = functionalUpdate(\n            updater,\n            table.options.pageCount ?? -1\n          )\n\n          if (typeof newPageCount === 'number') {\n            newPageCount = Math.max(-1, newPageCount)\n          }\n\n          return {\n            ...old,\n            pageCount: newPageCount,\n          }\n        }),\n\n      getPageOptions: memo(\n        () => [table.getPageCount()],\n        pageCount => {\n          let pageOptions: number[] = []\n          if (pageCount && pageCount > 0) {\n            pageOptions = [...new Array(pageCount)].fill(null).map((_, i) => i)\n          }\n          return pageOptions\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getPageOptions',\n          debug: () => table.options.debugAll ?? table.options.debugTable,\n        }\n      ),\n\n      getCanPreviousPage: () => table.getState().pagination.pageIndex > 0,\n\n      getCanNextPage: () => {\n        const { pageIndex } = table.getState().pagination\n\n        const pageCount = table.getPageCount()\n\n        if (pageCount === -1) {\n          return true\n        }\n\n        if (pageCount === 0) {\n          return false\n        }\n\n        return pageIndex < pageCount - 1\n      },\n\n      previousPage: () => {\n        return table.setPageIndex(old => old - 1)\n      },\n\n      nextPage: () => {\n        return table.setPageIndex(old => {\n          return old + 1\n        })\n      },\n\n      getPrePaginationRowModel: () => table.getExpandedRowModel(),\n      getPaginationRowModel: () => {\n        if (\n          !table._getPaginationRowModel &&\n          table.options.getPaginationRowModel\n        ) {\n          table._getPaginationRowModel =\n            table.options.getPaginationRowModel(table)\n        }\n\n        if (table.options.manualPagination || !table._getPaginationRowModel) {\n          return table.getPrePaginationRowModel()\n        }\n\n        return table._getPaginationRowModel()\n      },\n\n      getPageCount: () => {\n        return (\n          table.options.pageCount ??\n          Math.ceil(\n            table.getPrePaginationRowModel().rows.length /\n              table.getState().pagination.pageSize\n          )\n        )\n      },\n    }\n  },\n}\n","import { TableFeature } from '../core/table'\nimport {\n  OnChangeFn,\n  Updater,\n  Table,\n  Column,\n  Row,\n  Cell,\n  RowData,\n} from '../types'\nimport { makeStateUpdater, memo } from '../utils'\n\nexport type ColumnPinningPosition = false | 'left' | 'right'\n\nexport interface ColumnPinningState {\n  left?: string[]\n  right?: string[]\n}\n\nexport interface ColumnPinningTableState {\n  columnPinning: ColumnPinningState\n}\n\nexport interface ColumnPinningOptions {\n  onColumnPinningChange?: OnChangeFn\n  enablePinning?: boolean\n}\n\nexport interface ColumnPinningDefaultOptions {\n  onColumnPinningChange: OnChangeFn\n}\n\nexport interface ColumnPinningColumnDef {\n  enablePinning?: boolean\n}\n\nexport interface ColumnPinningColumn {\n  getCanPin: () => boolean\n  getPinnedIndex: () => number\n  getIsPinned: () => ColumnPinningPosition\n  pin: (position: ColumnPinningPosition) => void\n}\n\nexport interface ColumnPinningRow {\n  getLeftVisibleCells: () => Cell[]\n  getCenterVisibleCells: () => Cell[]\n  getRightVisibleCells: () => Cell[]\n}\n\nexport interface ColumnPinningInstance {\n  setColumnPinning: (updater: Updater) => void\n  resetColumnPinning: (defaultState?: boolean) => void\n  getIsSomeColumnsPinned: (position?: ColumnPinningPosition) => boolean\n  getLeftLeafColumns: () => Column[]\n  getRightLeafColumns: () => Column[]\n  getCenterLeafColumns: () => Column[]\n}\n\n//\n\nconst getDefaultPinningState = (): ColumnPinningState => ({\n  left: [],\n  right: [],\n})\n\nexport const Pinning: TableFeature = {\n  getInitialState: (state): ColumnPinningTableState => {\n    return {\n      columnPinning: getDefaultPinningState(),\n      ...state,\n    }\n  },\n\n  getDefaultOptions: (\n    table: Table\n  ): ColumnPinningDefaultOptions => {\n    return {\n      onColumnPinningChange: makeStateUpdater('columnPinning', table),\n    }\n  },\n\n  createColumn: (\n    column: Column,\n    table: Table\n  ): ColumnPinningColumn => {\n    return {\n      pin: position => {\n        const columnIds = column\n          .getLeafColumns()\n          .map(d => d.id)\n          .filter(Boolean) as string[]\n\n        table.setColumnPinning(old => {\n          if (position === 'right') {\n            return {\n              left: (old?.left ?? []).filter(d => !columnIds?.includes(d)),\n              right: [\n                ...(old?.right ?? []).filter(d => !columnIds?.includes(d)),\n                ...columnIds,\n              ],\n            }\n          }\n\n          if (position === 'left') {\n            return {\n              left: [\n                ...(old?.left ?? []).filter(d => !columnIds?.includes(d)),\n                ...columnIds,\n              ],\n              right: (old?.right ?? []).filter(d => !columnIds?.includes(d)),\n            }\n          }\n\n          return {\n            left: (old?.left ?? []).filter(d => !columnIds?.includes(d)),\n            right: (old?.right ?? []).filter(d => !columnIds?.includes(d)),\n          }\n        })\n      },\n\n      getCanPin: () => {\n        const leafColumns = column.getLeafColumns()\n\n        return leafColumns.some(\n          d =>\n            (d.columnDef.enablePinning ?? true) &&\n            (table.options.enablePinning ?? true)\n        )\n      },\n\n      getIsPinned: () => {\n        const leafColumnIds = column.getLeafColumns().map(d => d.id)\n\n        const { left, right } = table.getState().columnPinning\n\n        const isLeft = leafColumnIds.some(d => left?.includes(d))\n        const isRight = leafColumnIds.some(d => right?.includes(d))\n\n        return isLeft ? 'left' : isRight ? 'right' : false\n      },\n\n      getPinnedIndex: () => {\n        const position = column.getIsPinned()\n\n        return position\n          ? table.getState().columnPinning?.[position]?.indexOf(column.id) ?? -1\n          : 0\n      },\n    }\n  },\n\n  createRow: (\n    row: Row,\n    table: Table\n  ): ColumnPinningRow => {\n    return {\n      getCenterVisibleCells: memo(\n        () => [\n          row._getAllVisibleCells(),\n          table.getState().columnPinning.left,\n          table.getState().columnPinning.right,\n        ],\n        (allCells, left, right) => {\n          const leftAndRight: string[] = [...(left ?? []), ...(right ?? [])]\n\n          return allCells.filter(d => !leftAndRight.includes(d.column.id))\n        },\n        {\n          key:\n            process.env.NODE_ENV === 'production' &&\n            'row.getCenterVisibleCells',\n          debug: () => table.options.debugAll ?? table.options.debugRows,\n        }\n      ),\n      getLeftVisibleCells: memo(\n        () => [\n          row._getAllVisibleCells(),\n          table.getState().columnPinning.left,\n          ,\n        ],\n        (allCells, left) => {\n          const cells = (left ?? [])\n            .map(\n              columnId => allCells.find(cell => cell.column.id === columnId)!\n            )\n            .filter(Boolean)\n            .map(d => ({ ...d, position: 'left' } as Cell))\n\n          return cells\n        },\n        {\n          key:\n            process.env.NODE_ENV === 'production' && 'row.getLeftVisibleCells',\n          debug: () => table.options.debugAll ?? table.options.debugRows,\n        }\n      ),\n      getRightVisibleCells: memo(\n        () => [row._getAllVisibleCells(), table.getState().columnPinning.right],\n        (allCells, right) => {\n          const cells = (right ?? [])\n            .map(\n              columnId => allCells.find(cell => cell.column.id === columnId)!\n            )\n            .filter(Boolean)\n            .map(d => ({ ...d, position: 'right' } as Cell))\n\n          return cells\n        },\n        {\n          key:\n            process.env.NODE_ENV === 'production' && 'row.getRightVisibleCells',\n          debug: () => table.options.debugAll ?? table.options.debugRows,\n        }\n      ),\n    }\n  },\n\n  createTable: (\n    table: Table\n  ): ColumnPinningInstance => {\n    return {\n      setColumnPinning: updater =>\n        table.options.onColumnPinningChange?.(updater),\n\n      resetColumnPinning: defaultState =>\n        table.setColumnPinning(\n          defaultState\n            ? getDefaultPinningState()\n            : table.initialState?.columnPinning ?? getDefaultPinningState()\n        ),\n\n      getIsSomeColumnsPinned: position => {\n        const pinningState = table.getState().columnPinning\n\n        if (!position) {\n          return Boolean(\n            pinningState.left?.length || pinningState.right?.length\n          )\n        }\n        return Boolean(pinningState[position]?.length)\n      },\n\n      getLeftLeafColumns: memo(\n        () => [table.getAllLeafColumns(), table.getState().columnPinning.left],\n        (allColumns, left) => {\n          return (left ?? [])\n            .map(columnId => allColumns.find(column => column.id === columnId)!)\n            .filter(Boolean)\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getLeftLeafColumns',\n          debug: () => table.options.debugAll ?? table.options.debugColumns,\n        }\n      ),\n\n      getRightLeafColumns: memo(\n        () => [table.getAllLeafColumns(), table.getState().columnPinning.right],\n        (allColumns, right) => {\n          return (right ?? [])\n            .map(columnId => allColumns.find(column => column.id === columnId)!)\n            .filter(Boolean)\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getRightLeafColumns',\n          debug: () => table.options.debugAll ?? table.options.debugColumns,\n        }\n      ),\n\n      getCenterLeafColumns: memo(\n        () => [\n          table.getAllLeafColumns(),\n          table.getState().columnPinning.left,\n          table.getState().columnPinning.right,\n        ],\n        (allColumns, left, right) => {\n          const leftAndRight: string[] = [...(left ?? []), ...(right ?? [])]\n\n          return allColumns.filter(d => !leftAndRight.includes(d.id))\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getCenterLeafColumns',\n          debug: () => table.options.debugAll ?? table.options.debugColumns,\n        }\n      ),\n    }\n  },\n}\n","import { TableFeature } from '../core/table'\nimport { OnChangeFn, Table, Row, RowModel, Updater, RowData } from '../types'\nimport { makeStateUpdater, memo } from '../utils'\n\nexport type RowSelectionState = Record\n\nexport interface RowSelectionTableState {\n  rowSelection: RowSelectionState\n}\n\nexport interface RowSelectionOptions {\n  enableRowSelection?: boolean | ((row: Row) => boolean)\n  enableMultiRowSelection?: boolean | ((row: Row) => boolean)\n  enableSubRowSelection?: boolean | ((row: Row) => boolean)\n  onRowSelectionChange?: OnChangeFn\n  // enableGroupingRowSelection?:\n  //   | boolean\n  //   | ((\n  //       row: Row\n  //     ) => boolean)\n  // isAdditiveSelectEvent?: (e: unknown) => boolean\n  // isInclusiveSelectEvent?: (e: unknown) => boolean\n  // selectRowsFn?: (\n  //   table: Table,\n  //   rowModel: RowModel\n  // ) => RowModel\n}\n\nexport interface RowSelectionRow {\n  getIsSelected: () => boolean\n  getIsSomeSelected: () => boolean\n  getIsAllSubRowsSelected: () => boolean\n  getCanSelect: () => boolean\n  getCanMultiSelect: () => boolean\n  getCanSelectSubRows: () => boolean\n  toggleSelected: (value?: boolean) => void\n  getToggleSelectedHandler: () => (event: unknown) => void\n}\n\nexport interface RowSelectionInstance {\n  getToggleAllRowsSelectedHandler: () => (event: unknown) => void\n  getToggleAllPageRowsSelectedHandler: () => (event: unknown) => void\n  setRowSelection: (updater: Updater) => void\n  resetRowSelection: (defaultState?: boolean) => void\n  getIsAllRowsSelected: () => boolean\n  getIsAllPageRowsSelected: () => boolean\n  getIsSomeRowsSelected: () => boolean\n  getIsSomePageRowsSelected: () => boolean\n  toggleAllRowsSelected: (value?: boolean) => void\n  toggleAllPageRowsSelected: (value?: boolean) => void\n  getPreSelectedRowModel: () => RowModel\n  getSelectedRowModel: () => RowModel\n  getFilteredSelectedRowModel: () => RowModel\n  getGroupedSelectedRowModel: () => RowModel\n}\n\n//\n\nexport const RowSelection: TableFeature = {\n  getInitialState: (state): RowSelectionTableState => {\n    return {\n      rowSelection: {},\n      ...state,\n    }\n  },\n\n  getDefaultOptions: (\n    table: Table\n  ): RowSelectionOptions => {\n    return {\n      onRowSelectionChange: makeStateUpdater('rowSelection', table),\n      enableRowSelection: true,\n      enableMultiRowSelection: true,\n      enableSubRowSelection: true,\n      // enableGroupingRowSelection: false,\n      // isAdditiveSelectEvent: (e: unknown) => !!e.metaKey,\n      // isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,\n    }\n  },\n\n  createTable: (\n    table: Table\n  ): RowSelectionInstance => {\n    return {\n      setRowSelection: updater => table.options.onRowSelectionChange?.(updater),\n      resetRowSelection: defaultState =>\n        table.setRowSelection(\n          defaultState ? {} : table.initialState.rowSelection ?? {}\n        ),\n      toggleAllRowsSelected: value => {\n        table.setRowSelection(old => {\n          value =\n            typeof value !== 'undefined' ? value : !table.getIsAllRowsSelected()\n\n          const rowSelection = { ...old }\n\n          const preGroupedFlatRows = table.getPreGroupedRowModel().flatRows\n\n          // We don't use `mutateRowIsSelected` here for performance reasons.\n          // All of the rows are flat already, so it wouldn't be worth it\n          if (value) {\n            preGroupedFlatRows.forEach(row => {\n              if (!row.getCanSelect()) {\n                return\n              }\n              rowSelection[row.id] = true\n            })\n          } else {\n            preGroupedFlatRows.forEach(row => {\n              delete rowSelection[row.id]\n            })\n          }\n\n          return rowSelection\n        })\n      },\n      toggleAllPageRowsSelected: value =>\n        table.setRowSelection(old => {\n          const resolvedValue =\n            typeof value !== 'undefined'\n              ? value\n              : !table.getIsAllPageRowsSelected()\n\n          const rowSelection: RowSelectionState = { ...old }\n\n          table.getRowModel().rows.forEach(row => {\n            mutateRowIsSelected(rowSelection, row.id, resolvedValue, table)\n          })\n\n          return rowSelection\n        }),\n\n      // addRowSelectionRange: rowId => {\n      //   const {\n      //     rows,\n      //     rowsById,\n      //     options: { selectGroupingRows, selectSubRows },\n      //   } = table\n\n      //   const findSelectedRow = (rows: Row[]) => {\n      //     let found\n      //     rows.find(d => {\n      //       if (d.getIsSelected()) {\n      //         found = d\n      //         return true\n      //       }\n      //       const subFound = findSelectedRow(d.subRows || [])\n      //       if (subFound) {\n      //         found = subFound\n      //         return true\n      //       }\n      //       return false\n      //     })\n      //     return found\n      //   }\n\n      //   const firstRow = findSelectedRow(rows) || rows[0]\n      //   const lastRow = rowsById[rowId]\n\n      //   let include = false\n      //   const selectedRowIds = {}\n\n      //   const addRow = (row: Row) => {\n      //     mutateRowIsSelected(selectedRowIds, row.id, true, {\n      //       rowsById,\n      //       selectGroupingRows: selectGroupingRows!,\n      //       selectSubRows: selectSubRows!,\n      //     })\n      //   }\n\n      //   table.rows.forEach(row => {\n      //     const isFirstRow = row.id === firstRow.id\n      //     const isLastRow = row.id === lastRow.id\n\n      //     if (isFirstRow || isLastRow) {\n      //       if (!include) {\n      //         include = true\n      //       } else if (include) {\n      //         addRow(row)\n      //         include = false\n      //       }\n      //     }\n\n      //     if (include) {\n      //       addRow(row)\n      //     }\n      //   })\n\n      //   table.setRowSelection(selectedRowIds)\n      // },\n      getPreSelectedRowModel: () => table.getCoreRowModel(),\n      getSelectedRowModel: memo(\n        () => [table.getState().rowSelection, table.getCoreRowModel()],\n        (rowSelection, rowModel) => {\n          if (!Object.keys(rowSelection).length) {\n            return {\n              rows: [],\n              flatRows: [],\n              rowsById: {},\n            }\n          }\n\n          return selectRowsFn(table, rowModel)\n        },\n        {\n          key: process.env.NODE_ENV === 'development' && 'getSelectedRowModel',\n          debug: () => table.options.debugAll ?? table.options.debugTable,\n        }\n      ),\n\n      getFilteredSelectedRowModel: memo(\n        () => [table.getState().rowSelection, table.getFilteredRowModel()],\n        (rowSelection, rowModel) => {\n          if (!Object.keys(rowSelection).length) {\n            return {\n              rows: [],\n              flatRows: [],\n              rowsById: {},\n            }\n          }\n\n          return selectRowsFn(table, rowModel)\n        },\n        {\n          key:\n            process.env.NODE_ENV === 'production' &&\n            'getFilteredSelectedRowModel',\n          debug: () => table.options.debugAll ?? table.options.debugTable,\n        }\n      ),\n\n      getGroupedSelectedRowModel: memo(\n        () => [table.getState().rowSelection, table.getSortedRowModel()],\n        (rowSelection, rowModel) => {\n          if (!Object.keys(rowSelection).length) {\n            return {\n              rows: [],\n              flatRows: [],\n              rowsById: {},\n            }\n          }\n\n          return selectRowsFn(table, rowModel)\n        },\n        {\n          key:\n            process.env.NODE_ENV === 'production' &&\n            'getGroupedSelectedRowModel',\n          debug: () => table.options.debugAll ?? table.options.debugTable,\n        }\n      ),\n\n      ///\n\n      // getGroupingRowCanSelect: rowId => {\n      //   const row = table.getRow(rowId)\n\n      //   if (!row) {\n      //     throw new Error()\n      //   }\n\n      //   if (typeof table.options.enableGroupingRowSelection === 'function') {\n      //     return table.options.enableGroupingRowSelection(row)\n      //   }\n\n      //   return table.options.enableGroupingRowSelection ?? false\n      // },\n\n      getIsAllRowsSelected: () => {\n        const preGroupedFlatRows = table.getFilteredRowModel().flatRows\n        const { rowSelection } = table.getState()\n\n        let isAllRowsSelected = Boolean(\n          preGroupedFlatRows.length && Object.keys(rowSelection).length\n        )\n\n        if (isAllRowsSelected) {\n          if (\n            preGroupedFlatRows.some(\n              row => row.getCanSelect() && !rowSelection[row.id]\n            )\n          ) {\n            isAllRowsSelected = false\n          }\n        }\n\n        return isAllRowsSelected\n      },\n\n      getIsAllPageRowsSelected: () => {\n        const paginationFlatRows = table\n          .getPaginationRowModel()\n          .flatRows.filter(row => row.getCanSelect())\n        const { rowSelection } = table.getState()\n\n        let isAllPageRowsSelected = !!paginationFlatRows.length\n\n        if (\n          isAllPageRowsSelected &&\n          paginationFlatRows.some(row => !rowSelection[row.id])\n        ) {\n          isAllPageRowsSelected = false\n        }\n\n        return isAllPageRowsSelected\n      },\n\n      getIsSomeRowsSelected: () => {\n        const totalSelected = Object.keys(\n          table.getState().rowSelection ?? {}\n        ).length\n        return (\n          totalSelected > 0 &&\n          totalSelected < table.getFilteredRowModel().flatRows.length\n        )\n      },\n\n      getIsSomePageRowsSelected: () => {\n        const paginationFlatRows = table.getPaginationRowModel().flatRows\n        return table.getIsAllPageRowsSelected()\n          ? false\n          : paginationFlatRows\n              .filter(row => row.getCanSelect())\n              .some(d => d.getIsSelected() || d.getIsSomeSelected())\n      },\n\n      getToggleAllRowsSelectedHandler: () => {\n        return (e: unknown) => {\n          table.toggleAllRowsSelected(\n            ((e as MouseEvent).target as HTMLInputElement).checked\n          )\n        }\n      },\n\n      getToggleAllPageRowsSelectedHandler: () => {\n        return (e: unknown) => {\n          table.toggleAllPageRowsSelected(\n            ((e as MouseEvent).target as HTMLInputElement).checked\n          )\n        }\n      },\n    }\n  },\n\n  createRow: (\n    row: Row,\n    table: Table\n  ): RowSelectionRow => {\n    return {\n      toggleSelected: value => {\n        const isSelected = row.getIsSelected()\n\n        table.setRowSelection(old => {\n          value = typeof value !== 'undefined' ? value : !isSelected\n\n          if (isSelected === value) {\n            return old\n          }\n\n          const selectedRowIds = { ...old }\n\n          mutateRowIsSelected(selectedRowIds, row.id, value, table)\n\n          return selectedRowIds\n        })\n      },\n      getIsSelected: () => {\n        const { rowSelection } = table.getState()\n        return isRowSelected(row, rowSelection)\n      },\n\n      getIsSomeSelected: () => {\n        const { rowSelection } = table.getState()\n        return isSubRowSelected(row, rowSelection, table) === 'some'\n      },\n\n      getIsAllSubRowsSelected: () => {\n        const { rowSelection } = table.getState()\n        return isSubRowSelected(row, rowSelection, table) === 'all'\n      },\n\n      getCanSelect: () => {\n        if (typeof table.options.enableRowSelection === 'function') {\n          return table.options.enableRowSelection(row)\n        }\n\n        return table.options.enableRowSelection ?? true\n      },\n\n      getCanSelectSubRows: () => {\n        if (typeof table.options.enableSubRowSelection === 'function') {\n          return table.options.enableSubRowSelection(row)\n        }\n\n        return table.options.enableSubRowSelection ?? true\n      },\n\n      getCanMultiSelect: () => {\n        if (typeof table.options.enableMultiRowSelection === 'function') {\n          return table.options.enableMultiRowSelection(row)\n        }\n\n        return table.options.enableMultiRowSelection ?? true\n      },\n      getToggleSelectedHandler: () => {\n        const canSelect = row.getCanSelect()\n\n        return (e: unknown) => {\n          if (!canSelect) return\n          row.toggleSelected(\n            ((e as MouseEvent).target as HTMLInputElement)?.checked\n          )\n        }\n      },\n    }\n  },\n}\n\nconst mutateRowIsSelected = (\n  selectedRowIds: Record,\n  id: string,\n  value: boolean,\n  table: Table\n) => {\n  const row = table.getRow(id)\n\n  // const isGrouped = row.getIsGrouped()\n\n  // if ( // TODO: enforce grouping row selection rules\n  //   !isGrouped ||\n  //   (isGrouped && table.options.enableGroupingRowSelection)\n  // ) {\n  if (value) {\n    if (!row.getCanMultiSelect()) {\n      Object.keys(selectedRowIds).forEach(key => delete selectedRowIds[key])\n    }\n    if (row.getCanSelect()) {\n      selectedRowIds[id] = true\n    }\n  } else {\n    delete selectedRowIds[id]\n  }\n  // }\n\n  if (row.subRows?.length && row.getCanSelectSubRows()) {\n    row.subRows.forEach(row =>\n      mutateRowIsSelected(selectedRowIds, row.id, value, table)\n    )\n  }\n}\n\nexport function selectRowsFn(\n  table: Table,\n  rowModel: RowModel\n): RowModel {\n  const rowSelection = table.getState().rowSelection\n\n  const newSelectedFlatRows: Row[] = []\n  const newSelectedRowsById: Record> = {}\n\n  // Filters top level and nested rows\n  const recurseRows = (rows: Row[], depth = 0): Row[] => {\n    return rows\n      .map(row => {\n        const isSelected = isRowSelected(row, rowSelection)\n\n        if (isSelected) {\n          newSelectedFlatRows.push(row)\n          newSelectedRowsById[row.id] = row\n        }\n\n        if (row.subRows?.length) {\n          row = {\n            ...row,\n            subRows: recurseRows(row.subRows, depth + 1),\n          }\n        }\n\n        if (isSelected) {\n          return row\n        }\n      })\n      .filter(Boolean) as Row[]\n  }\n\n  return {\n    rows: recurseRows(rowModel.rows),\n    flatRows: newSelectedFlatRows,\n    rowsById: newSelectedRowsById,\n  }\n}\n\nexport function isRowSelected(\n  row: Row,\n  selection: Record\n): boolean {\n  return selection[row.id] ?? false\n}\n\nexport function isSubRowSelected(\n  row: Row,\n  selection: Record,\n  table: Table\n): boolean | 'some' | 'all' {\n  if (row.subRows && row.subRows.length) {\n    let allChildrenSelected = true\n    let someSelected = false\n\n    row.subRows.forEach(subRow => {\n      // Bail out early if we know both of these\n      if (someSelected && !allChildrenSelected) {\n        return\n      }\n\n      if (isRowSelected(subRow, selection)) {\n        someSelected = true\n      } else {\n        allChildrenSelected = false\n      }\n    })\n\n    return allChildrenSelected ? 'all' : someSelected ? 'some' : false\n  }\n\n  return false\n}\n","import { SortingFn } from './features/Sorting'\n\nexport const reSplitAlphaNumeric = /([0-9]+)/gm\n\nconst alphanumeric: SortingFn = (rowA, rowB, columnId) => {\n  return compareAlphanumeric(\n    toString(rowA.getValue(columnId)).toLowerCase(),\n    toString(rowB.getValue(columnId)).toLowerCase()\n  )\n}\n\nconst alphanumericCaseSensitive: SortingFn = (rowA, rowB, columnId) => {\n  return compareAlphanumeric(\n    toString(rowA.getValue(columnId)),\n    toString(rowB.getValue(columnId))\n  )\n}\n\n// The text filter is more basic (less numeric support)\n// but is much faster\nconst text: SortingFn = (rowA, rowB, columnId) => {\n  return compareBasic(\n    toString(rowA.getValue(columnId)).toLowerCase(),\n    toString(rowB.getValue(columnId)).toLowerCase()\n  )\n}\n\n// The text filter is more basic (less numeric support)\n// but is much faster\nconst textCaseSensitive: SortingFn = (rowA, rowB, columnId) => {\n  return compareBasic(\n    toString(rowA.getValue(columnId)),\n    toString(rowB.getValue(columnId))\n  )\n}\n\nconst datetime: SortingFn = (rowA, rowB, columnId) => {\n  const a = rowA.getValue(columnId)\n  const b = rowB.getValue(columnId)\n\n  // Can handle nullish values\n  // Use > and < because == (and ===) doesn't work with\n  // Date objects (would require calling getTime()).\n  return a > b ? 1 : a < b ? -1 : 0\n}\n\nconst basic: SortingFn = (rowA, rowB, columnId) => {\n  return compareBasic(rowA.getValue(columnId), rowB.getValue(columnId))\n}\n\n// Utils\n\nfunction compareBasic(a: any, b: any) {\n  return a === b ? 0 : a > b ? 1 : -1\n}\n\nfunction toString(a: any) {\n  if (typeof a === 'number') {\n    if (isNaN(a) || a === Infinity || a === -Infinity) {\n      return ''\n    }\n    return String(a)\n  }\n  if (typeof a === 'string') {\n    return a\n  }\n  return ''\n}\n\n// Mixed sorting is slow, but very inclusive of many edge cases.\n// It handles numbers, mixed alphanumeric combinations, and even\n// null, undefined, and Infinity\nfunction compareAlphanumeric(aStr: string, bStr: string) {\n  // Split on number groups, but keep the delimiter\n  // Then remove falsey split values\n  const a = aStr.split(reSplitAlphaNumeric).filter(Boolean)\n  const b = bStr.split(reSplitAlphaNumeric).filter(Boolean)\n\n  // While\n  while (a.length && b.length) {\n    const aa = a.shift()!\n    const bb = b.shift()!\n\n    const an = parseInt(aa, 10)\n    const bn = parseInt(bb, 10)\n\n    const combo = [an, bn].sort()\n\n    // Both are string\n    if (isNaN(combo[0]!)) {\n      if (aa > bb) {\n        return 1\n      }\n      if (bb > aa) {\n        return -1\n      }\n      continue\n    }\n\n    // One is a string, one is a number\n    if (isNaN(combo[1]!)) {\n      return isNaN(an) ? -1 : 1\n    }\n\n    // Both are numbers\n    if (an > bn) {\n      return 1\n    }\n    if (bn > an) {\n      return -1\n    }\n  }\n\n  return a.length - b.length\n}\n\n// Exports\n\nexport const sortingFns = {\n  alphanumeric,\n  alphanumericCaseSensitive,\n  text,\n  textCaseSensitive,\n  datetime,\n  basic,\n}\n\nexport type BuiltInSortingFn = keyof typeof sortingFns\n","import { RowModel } from '..'\nimport { TableFeature } from '../core/table'\nimport {\n  BuiltInSortingFn,\n  reSplitAlphaNumeric,\n  sortingFns,\n} from '../sortingFns'\n\nimport {\n  Column,\n  OnChangeFn,\n  Table,\n  Row,\n  Updater,\n  RowData,\n  SortingFns,\n} from '../types'\n\nimport { isFunction, makeStateUpdater } from '../utils'\n\nexport type SortDirection = 'asc' | 'desc'\n\nexport interface ColumnSort {\n  id: string\n  desc: boolean\n}\n\nexport type SortingState = ColumnSort[]\n\nexport interface SortingTableState {\n  sorting: SortingState\n}\n\nexport interface SortingFn {\n  (rowA: Row, rowB: Row, columnId: string): number\n}\n\nexport type CustomSortingFns = Record<\n  string,\n  SortingFn\n>\n\nexport type SortingFnOption =\n  | 'auto'\n  | keyof SortingFns\n  | BuiltInSortingFn\n  | SortingFn\n\nexport interface SortingColumnDef {\n  sortingFn?: SortingFnOption\n  sortDescFirst?: boolean\n  enableSorting?: boolean\n  enableMultiSort?: boolean\n  invertSorting?: boolean\n  sortUndefined?: false | -1 | 1\n}\n\nexport interface SortingColumn {\n  getAutoSortingFn: () => SortingFn\n  getAutoSortDir: () => SortDirection\n  getSortingFn: () => SortingFn\n  getFirstSortDir: () => SortDirection\n  getNextSortingOrder: () => SortDirection | false\n  getCanSort: () => boolean\n  getCanMultiSort: () => boolean\n  getSortIndex: () => number\n  getIsSorted: () => false | SortDirection\n  clearSorting: () => void\n  toggleSorting: (desc?: boolean, isMulti?: boolean) => void\n  getToggleSortingHandler: () => undefined | ((event: unknown) => void)\n}\n\ninterface SortingOptionsBase {\n  manualSorting?: boolean\n  onSortingChange?: OnChangeFn\n  enableSorting?: boolean\n  enableSortingRemoval?: boolean\n  enableMultiRemove?: boolean\n  enableMultiSort?: boolean\n  sortDescFirst?: boolean\n  getSortedRowModel?: (table: Table) => () => RowModel\n  maxMultiSortColCount?: number\n  isMultiSortEvent?: (e: unknown) => boolean\n}\n\ntype ResolvedSortingFns = keyof SortingFns extends never\n  ? {\n      sortingFns?: Record>\n    }\n  : {\n      sortingFns: Record>\n    }\n\nexport interface SortingOptions\n  extends SortingOptionsBase,\n    ResolvedSortingFns {}\n\nexport interface SortingInstance {\n  setSorting: (updater: Updater) => void\n  resetSorting: (defaultState?: boolean) => void\n  getPreSortedRowModel: () => RowModel\n  getSortedRowModel: () => RowModel\n  _getSortedRowModel?: () => RowModel\n}\n\n//\n\nexport const Sorting: TableFeature = {\n  getInitialState: (state): SortingTableState => {\n    return {\n      sorting: [],\n      ...state,\n    }\n  },\n\n  getDefaultColumnDef: (): SortingColumnDef => {\n    return {\n      sortingFn: 'auto',\n    }\n  },\n\n  getDefaultOptions: (\n    table: Table\n  ): SortingOptions => {\n    return {\n      onSortingChange: makeStateUpdater('sorting', table),\n      isMultiSortEvent: (e: unknown) => {\n        return (e as MouseEvent).shiftKey\n      },\n    }\n  },\n\n  createColumn: (\n    column: Column,\n    table: Table\n  ): SortingColumn => {\n    return {\n      getAutoSortingFn: () => {\n        const firstRows = table.getFilteredRowModel().flatRows.slice(10)\n\n        let isString = false\n\n        for (const row of firstRows) {\n          const value = row?.getValue(column.id)\n\n          if (Object.prototype.toString.call(value) === '[object Date]') {\n            return sortingFns.datetime\n          }\n\n          if (typeof value === 'string') {\n            isString = true\n\n            if (value.split(reSplitAlphaNumeric).length > 1) {\n              return sortingFns.alphanumeric\n            }\n          }\n        }\n\n        if (isString) {\n          return sortingFns.text\n        }\n\n        return sortingFns.basic\n      },\n      getAutoSortDir: () => {\n        const firstRow = table.getFilteredRowModel().flatRows[0]\n\n        const value = firstRow?.getValue(column.id)\n\n        if (typeof value === 'string') {\n          return 'asc'\n        }\n\n        return 'desc'\n      },\n      getSortingFn: () => {\n        if (!column) {\n          throw new Error()\n        }\n\n        return isFunction(column.columnDef.sortingFn)\n          ? column.columnDef.sortingFn\n          : column.columnDef.sortingFn === 'auto'\n          ? column.getAutoSortingFn()\n          : table.options.sortingFns?.[column.columnDef.sortingFn as string] ??\n            sortingFns[column.columnDef.sortingFn as BuiltInSortingFn]\n      },\n      toggleSorting: (desc, multi) => {\n        // if (column.columns.length) {\n        //   column.columns.forEach((c, i) => {\n        //     if (c.id) {\n        //       table.toggleColumnSorting(c.id, undefined, multi || !!i)\n        //     }\n        //   })\n        //   return\n        // }\n\n        // this needs to be outside of table.setSorting to be in sync with rerender\n        const nextSortingOrder = column.getNextSortingOrder()\n        const hasManualValue = typeof desc !== 'undefined' && desc !== null\n\n        table.setSorting(old => {\n          // Find any existing sorting for this column\n          const existingSorting = old?.find(d => d.id === column.id)\n          const existingIndex = old?.findIndex(d => d.id === column.id)\n\n          let newSorting: SortingState = []\n\n          // What should we do with this sort action?\n          let sortAction: 'add' | 'remove' | 'toggle' | 'replace'\n          let nextDesc = hasManualValue ? desc : nextSortingOrder === 'desc'\n\n          // Multi-mode\n          if (old?.length && column.getCanMultiSort() && multi) {\n            if (existingSorting) {\n              sortAction = 'toggle'\n            } else {\n              sortAction = 'add'\n            }\n          } else {\n            // Normal mode\n            if (old?.length && existingIndex !== old.length - 1) {\n              sortAction = 'replace'\n            } else if (existingSorting) {\n              sortAction = 'toggle'\n            } else {\n              sortAction = 'replace'\n            }\n          }\n\n          // Handle toggle states that will remove the sorting\n          if (sortAction === 'toggle') {\n            // If we are \"actually\" toggling (not a manual set value), should we remove the sorting?\n            if (!hasManualValue) {\n              // Is our intention to remove?\n              if (!nextSortingOrder) {\n                sortAction = 'remove'\n              }\n            }\n          }\n\n          if (sortAction === 'add') {\n            newSorting = [\n              ...old,\n              {\n                id: column.id,\n                desc: nextDesc,\n              },\n            ]\n            // Take latest n columns\n            newSorting.splice(\n              0,\n              newSorting.length -\n                (table.options.maxMultiSortColCount ?? Number.MAX_SAFE_INTEGER)\n            )\n          } else if (sortAction === 'toggle') {\n            // This flips (or sets) the\n            newSorting = old.map(d => {\n              if (d.id === column.id) {\n                return {\n                  ...d,\n                  desc: nextDesc,\n                }\n              }\n              return d\n            })\n          } else if (sortAction === 'remove') {\n            newSorting = old.filter(d => d.id !== column.id)\n          } else {\n            newSorting = [\n              {\n                id: column.id,\n                desc: nextDesc,\n              },\n            ]\n          }\n\n          return newSorting\n        })\n      },\n\n      getFirstSortDir: () => {\n        const sortDescFirst =\n          column.columnDef.sortDescFirst ??\n          table.options.sortDescFirst ??\n          column.getAutoSortDir() === 'desc'\n        return sortDescFirst ? 'desc' : 'asc'\n      },\n\n      getNextSortingOrder: (multi?: boolean) => {\n        const firstSortDirection = column.getFirstSortDir()\n        const isSorted = column.getIsSorted()\n\n        if (!isSorted) {\n          return firstSortDirection\n        }\n\n        if (\n          isSorted !== firstSortDirection &&\n          (table.options.enableSortingRemoval ?? true) && // If enableSortRemove, enable in general\n          (multi ? table.options.enableMultiRemove ?? true : true) // If multi, don't allow if enableMultiRemove))\n        ) {\n          return false\n        }\n        return isSorted === 'desc' ? 'asc' : 'desc'\n      },\n\n      getCanSort: () => {\n        return (\n          (column.columnDef.enableSorting ?? true) &&\n          (table.options.enableSorting ?? true) &&\n          !!column.accessorFn\n        )\n      },\n\n      getCanMultiSort: () => {\n        return (\n          column.columnDef.enableMultiSort ??\n          table.options.enableMultiSort ??\n          !!column.accessorFn\n        )\n      },\n\n      getIsSorted: () => {\n        const columnSort = table\n          .getState()\n          .sorting?.find(d => d.id === column.id)\n\n        return !columnSort ? false : columnSort.desc ? 'desc' : 'asc'\n      },\n\n      getSortIndex: () =>\n        table.getState().sorting?.findIndex(d => d.id === column.id) ?? -1,\n\n      clearSorting: () => {\n        //clear sorting for just 1 column\n        table.setSorting(old =>\n          old?.length ? old.filter(d => d.id !== column.id) : []\n        )\n      },\n\n      getToggleSortingHandler: () => {\n        const canSort = column.getCanSort()\n\n        return (e: unknown) => {\n          if (!canSort) return\n          ;(e as any).persist?.()\n          column.toggleSorting?.(\n            undefined,\n            column.getCanMultiSort()\n              ? table.options.isMultiSortEvent?.(e)\n              : false\n          )\n        }\n      },\n    }\n  },\n\n  createTable: (\n    table: Table\n  ): SortingInstance => {\n    return {\n      setSorting: updater => table.options.onSortingChange?.(updater),\n      resetSorting: defaultState => {\n        table.setSorting(defaultState ? [] : table.initialState?.sorting ?? [])\n      },\n      getPreSortedRowModel: () => table.getGroupedRowModel(),\n      getSortedRowModel: () => {\n        if (!table._getSortedRowModel && table.options.getSortedRowModel) {\n          table._getSortedRowModel = table.options.getSortedRowModel(table)\n        }\n\n        if (table.options.manualSorting || !table._getSortedRowModel) {\n          return table.getPreSortedRowModel()\n        }\n\n        return table._getSortedRowModel()\n      },\n    }\n  },\n}\n","import { TableFeature } from '../core/table'\nimport {\n  Cell,\n  Column,\n  OnChangeFn,\n  Table,\n  Updater,\n  Row,\n  RowData,\n} from '../types'\nimport { makeStateUpdater, memo } from '../utils'\n\nexport type VisibilityState = Record\n\nexport interface VisibilityTableState {\n  columnVisibility: VisibilityState\n}\n\nexport interface VisibilityOptions {\n  onColumnVisibilityChange?: OnChangeFn\n  enableHiding?: boolean\n}\n\nexport interface VisibilityDefaultOptions {\n  onColumnVisibilityChange: OnChangeFn\n}\n\nexport interface VisibilityInstance {\n  getVisibleFlatColumns: () => Column[]\n  getVisibleLeafColumns: () => Column[]\n  getLeftVisibleLeafColumns: () => Column[]\n  getRightVisibleLeafColumns: () => Column[]\n  getCenterVisibleLeafColumns: () => Column[]\n  setColumnVisibility: (updater: Updater) => void\n  resetColumnVisibility: (defaultState?: boolean) => void\n  toggleAllColumnsVisible: (value?: boolean) => void\n  getIsAllColumnsVisible: () => boolean\n  getIsSomeColumnsVisible: () => boolean\n  getToggleAllColumnsVisibilityHandler: () => (event: unknown) => void\n}\n\nexport interface VisibilityColumnDef {\n  enableHiding?: boolean\n}\n\nexport interface VisibilityRow {\n  _getAllVisibleCells: () => Cell[]\n  getVisibleCells: () => Cell[]\n}\n\nexport interface VisibilityColumn {\n  getCanHide: () => boolean\n  getIsVisible: () => boolean\n  toggleVisibility: (value?: boolean) => void\n  getToggleVisibilityHandler: () => (event: unknown) => void\n}\n\n//\n\nexport const Visibility: TableFeature = {\n  getInitialState: (state): VisibilityTableState => {\n    return {\n      columnVisibility: {},\n      ...state,\n    }\n  },\n\n  getDefaultOptions: (\n    table: Table\n  ): VisibilityDefaultOptions => {\n    return {\n      onColumnVisibilityChange: makeStateUpdater('columnVisibility', table),\n    }\n  },\n\n  createColumn: (\n    column: Column,\n    table: Table\n  ): VisibilityColumn => {\n    return {\n      toggleVisibility: value => {\n        if (column.getCanHide()) {\n          table.setColumnVisibility(old => ({\n            ...old,\n            [column.id]: value ?? !column.getIsVisible(),\n          }))\n        }\n      },\n      getIsVisible: () => {\n        return table.getState().columnVisibility?.[column.id] ?? true\n      },\n\n      getCanHide: () => {\n        return (\n          (column.columnDef.enableHiding ?? true) &&\n          (table.options.enableHiding ?? true)\n        )\n      },\n      getToggleVisibilityHandler: () => {\n        return (e: unknown) => {\n          column.toggleVisibility?.(\n            ((e as MouseEvent).target as HTMLInputElement).checked\n          )\n        }\n      },\n    }\n  },\n\n  createRow: (\n    row: Row,\n    table: Table\n  ): VisibilityRow => {\n    return {\n      _getAllVisibleCells: memo(\n        () => [row.getAllCells(), table.getState().columnVisibility],\n        cells => {\n          return cells.filter(cell => cell.column.getIsVisible())\n        },\n        {\n          key:\n            process.env.NODE_ENV === 'production' && 'row._getAllVisibleCells',\n          debug: () => table.options.debugAll ?? table.options.debugRows,\n        }\n      ),\n      getVisibleCells: memo(\n        () => [\n          row.getLeftVisibleCells(),\n          row.getCenterVisibleCells(),\n          row.getRightVisibleCells(),\n        ],\n        (left, center, right) => [...left, ...center, ...right],\n        {\n          key: process.env.NODE_ENV === 'development' && 'row.getVisibleCells',\n          debug: () => table.options.debugAll ?? table.options.debugRows,\n        }\n      ),\n    }\n  },\n\n  createTable: (\n    table: Table\n  ): VisibilityInstance => {\n    const makeVisibleColumnsMethod = (\n      key: string,\n      getColumns: () => Column[]\n    ): (() => Column[]) => {\n      return memo(\n        () => [\n          getColumns(),\n          getColumns()\n            .filter(d => d.getIsVisible())\n            .map(d => d.id)\n            .join('_'),\n        ],\n        columns => {\n          return columns.filter(d => d.getIsVisible?.())\n        },\n        {\n          key,\n          debug: () => table.options.debugAll ?? table.options.debugColumns,\n        }\n      )\n    }\n\n    return {\n      getVisibleFlatColumns: makeVisibleColumnsMethod(\n        'getVisibleFlatColumns',\n        () => table.getAllFlatColumns()\n      ),\n      getVisibleLeafColumns: makeVisibleColumnsMethod(\n        'getVisibleLeafColumns',\n        () => table.getAllLeafColumns()\n      ),\n      getLeftVisibleLeafColumns: makeVisibleColumnsMethod(\n        'getLeftVisibleLeafColumns',\n        () => table.getLeftLeafColumns()\n      ),\n      getRightVisibleLeafColumns: makeVisibleColumnsMethod(\n        'getRightVisibleLeafColumns',\n        () => table.getRightLeafColumns()\n      ),\n      getCenterVisibleLeafColumns: makeVisibleColumnsMethod(\n        'getCenterVisibleLeafColumns',\n        () => table.getCenterLeafColumns()\n      ),\n\n      setColumnVisibility: updater =>\n        table.options.onColumnVisibilityChange?.(updater),\n\n      resetColumnVisibility: defaultState => {\n        table.setColumnVisibility(\n          defaultState ? {} : table.initialState.columnVisibility ?? {}\n        )\n      },\n\n      toggleAllColumnsVisible: value => {\n        value = value ?? !table.getIsAllColumnsVisible()\n\n        table.setColumnVisibility(\n          table.getAllLeafColumns().reduce(\n            (obj, column) => ({\n              ...obj,\n              [column.id]: !value ? !column.getCanHide?.() : value,\n            }),\n            {}\n          )\n        )\n      },\n\n      getIsAllColumnsVisible: () =>\n        !table.getAllLeafColumns().some(column => !column.getIsVisible?.()),\n\n      getIsSomeColumnsVisible: () =>\n        table.getAllLeafColumns().some(column => column.getIsVisible?.()),\n\n      getToggleAllColumnsVisibilityHandler: () => {\n        return (e: unknown) => {\n          table.toggleAllColumnsVisible(\n            ((e as MouseEvent).target as HTMLInputElement)?.checked\n          )\n        }\n      },\n    }\n  },\n}\n","import { functionalUpdate, memo, RequiredKeys } from '../utils'\n\nimport {\n  Updater,\n  TableOptionsResolved,\n  TableState,\n  Table,\n  InitialTableState,\n  Row,\n  Column,\n  RowModel,\n  ColumnDef,\n  TableOptions,\n  RowData,\n  TableMeta,\n  ColumnDefResolved,\n  GroupColumnDef,\n} from '../types'\n\n//\nimport { createColumn } from './column'\nimport { Headers } from './headers'\n//\n\nimport { ColumnSizing } from '../features/ColumnSizing'\nimport { Expanding } from '../features/Expanding'\nimport { Filters } from '../features/Filters'\nimport { Grouping } from '../features/Grouping'\nimport { Ordering } from '../features/Ordering'\nimport { Pagination } from '../features/Pagination'\nimport { Pinning } from '../features/Pinning'\nimport { RowSelection } from '../features/RowSelection'\nimport { Sorting } from '../features/Sorting'\nimport { Visibility } from '../features/Visibility'\n\nexport interface TableFeature {\n  getDefaultOptions?: (table: any) => any\n  getInitialState?: (initialState?: InitialTableState) => any\n  createTable?: (table: any) => any\n  getDefaultColumnDef?: () => any\n  createColumn?: (column: any, table: any) => any\n  createHeader?: (column: any, table: any) => any\n  createCell?: (cell: any, column: any, row: any, table: any) => any\n  createRow?: (row: any, table: any) => any\n}\n\nconst features = [\n  Headers,\n  Visibility,\n  Ordering,\n  Pinning,\n  Filters,\n  Sorting,\n  Grouping,\n  Expanding,\n  Pagination,\n  RowSelection,\n  ColumnSizing,\n] as const\n\n//\n\nexport interface CoreTableState {}\n\nexport interface CoreOptions {\n  data: TData[]\n  state: Partial\n  onStateChange: (updater: Updater) => void\n  debugAll?: boolean\n  debugTable?: boolean\n  debugHeaders?: boolean\n  debugColumns?: boolean\n  debugRows?: boolean\n  initialState?: InitialTableState\n  autoResetAll?: boolean\n  mergeOptions?: (\n    defaultOptions: TableOptions,\n    options: Partial>\n  ) => TableOptions\n  meta?: TableMeta\n  getCoreRowModel: (table: Table) => () => RowModel\n  getSubRows?: (originalRow: TData, index: number) => undefined | TData[]\n  getRowId?: (originalRow: TData, index: number, parent?: Row) => string\n  columns: ColumnDef[]\n  defaultColumn?: Partial>\n  renderFallbackValue: any\n}\n\nexport interface CoreInstance {\n  initialState: TableState\n  reset: () => void\n  options: RequiredKeys, 'state'>\n  setOptions: (newOptions: Updater>) => void\n  getState: () => TableState\n  setState: (updater: Updater) => void\n  _features: readonly TableFeature[]\n  _queue: (cb: () => void) => void\n  _getRowId: (_: TData, index: number, parent?: Row) => string\n  getCoreRowModel: () => RowModel\n  _getCoreRowModel?: () => RowModel\n  getRowModel: () => RowModel\n  getRow: (id: string) => Row\n  _getDefaultColumnDef: () => Partial>\n  _getColumnDefs: () => ColumnDef[]\n  _getAllFlatColumnsById: () => Record>\n  getAllColumns: () => Column[]\n  getAllFlatColumns: () => Column[]\n  getAllLeafColumns: () => Column[]\n  getColumn: (columnId: string) => Column | undefined\n}\n\nexport function createTable(\n  options: TableOptionsResolved\n): Table {\n  if (options.debugAll || options.debugTable) {\n    console.info('Creating Table Instance...')\n  }\n\n  let table = { _features: features } as unknown as Table\n\n  const defaultOptions = table._features.reduce((obj, feature) => {\n    return Object.assign(obj, feature.getDefaultOptions?.(table))\n  }, {}) as TableOptionsResolved\n\n  const mergeOptions = (options: TableOptionsResolved) => {\n    if (table.options.mergeOptions) {\n      return table.options.mergeOptions(defaultOptions, options)\n    }\n\n    return {\n      ...defaultOptions,\n      ...options,\n    }\n  }\n\n  const coreInitialState: CoreTableState = {}\n\n  let initialState = {\n    ...coreInitialState,\n    ...(options.initialState ?? {}),\n  } as TableState\n\n  table._features.forEach(feature => {\n    initialState = feature.getInitialState?.(initialState) ?? initialState\n  })\n\n  const queued: (() => void)[] = []\n  let queuedTimeout = false\n\n  const coreInstance: CoreInstance = {\n    _features: features,\n    options: {\n      ...defaultOptions,\n      ...options,\n    },\n    initialState,\n    _queue: cb => {\n      queued.push(cb)\n\n      if (!queuedTimeout) {\n        queuedTimeout = true\n\n        // Schedule a microtask to run the queued callbacks after\n        // the current call stack (render, etc) has finished.\n        Promise.resolve()\n          .then(() => {\n            while (queued.length) {\n              queued.shift()!()\n            }\n            queuedTimeout = false\n          })\n          .catch(error =>\n            setTimeout(() => {\n              throw error\n            })\n          )\n      }\n    },\n    reset: () => {\n      table.setState(table.initialState)\n    },\n    setOptions: updater => {\n      const newOptions = functionalUpdate(updater, table.options)\n      table.options = mergeOptions(newOptions) as RequiredKeys<\n        TableOptionsResolved,\n        'state'\n      >\n    },\n\n    getState: () => {\n      return table.options.state as TableState\n    },\n\n    setState: (updater: Updater) => {\n      table.options.onStateChange?.(updater)\n    },\n\n    _getRowId: (row: TData, index: number, parent?: Row) =>\n      table.options.getRowId?.(row, index, parent) ??\n      `${parent ? [parent.id, index].join('.') : index}`,\n\n    getCoreRowModel: () => {\n      if (!table._getCoreRowModel) {\n        table._getCoreRowModel = table.options.getCoreRowModel(table)\n      }\n\n      return table._getCoreRowModel!()\n    },\n\n    // The final calls start at the bottom of the model,\n    // expanded rows, which then work their way up\n\n    getRowModel: () => {\n      return table.getPaginationRowModel()\n    },\n    getRow: (id: string) => {\n      const row = table.getRowModel().rowsById[id]\n\n      if (!row) {\n        if (process.env.NODE_ENV !== 'production') {\n          throw new Error(`getRow expected an ID, but got ${id}`)\n        }\n        throw new Error()\n      }\n\n      return row\n    },\n    _getDefaultColumnDef: memo(\n      () => [table.options.defaultColumn],\n      defaultColumn => {\n        defaultColumn = (defaultColumn ?? {}) as Partial<\n          ColumnDef\n        >\n\n        return {\n          header: props => {\n            const resolvedColumnDef = props.header.column\n              .columnDef as ColumnDefResolved\n\n            if (resolvedColumnDef.accessorKey) {\n              return resolvedColumnDef.accessorKey\n            }\n\n            if (resolvedColumnDef.accessorFn) {\n              return resolvedColumnDef.id\n            }\n\n            return null\n          },\n          // footer: props => props.header.column.id,\n          cell: props => props.renderValue()?.toString?.() ?? null,\n          ...table._features.reduce((obj, feature) => {\n            return Object.assign(obj, feature.getDefaultColumnDef?.())\n          }, {}),\n          ...defaultColumn,\n        } as Partial>\n      },\n      {\n        debug: () => table.options.debugAll ?? table.options.debugColumns,\n        key: process.env.NODE_ENV === 'development' && 'getDefaultColumnDef',\n      }\n    ),\n\n    _getColumnDefs: () => table.options.columns,\n\n    getAllColumns: memo(\n      () => [table._getColumnDefs()],\n      columnDefs => {\n        const recurseColumns = (\n          columnDefs: ColumnDef[],\n          parent?: Column,\n          depth = 0\n        ): Column[] => {\n          return columnDefs.map(columnDef => {\n            const column = createColumn(table, columnDef, depth, parent)\n\n            const groupingColumnDef = columnDef as GroupColumnDef<\n              TData,\n              unknown\n            >\n\n            column.columns = groupingColumnDef.columns\n              ? recurseColumns(groupingColumnDef.columns, column, depth + 1)\n              : []\n\n            return column\n          })\n        }\n\n        return recurseColumns(columnDefs)\n      },\n      {\n        key: process.env.NODE_ENV === 'development' && 'getAllColumns',\n        debug: () => table.options.debugAll ?? table.options.debugColumns,\n      }\n    ),\n\n    getAllFlatColumns: memo(\n      () => [table.getAllColumns()],\n      allColumns => {\n        return allColumns.flatMap(column => {\n          return column.getFlatColumns()\n        })\n      },\n      {\n        key: process.env.NODE_ENV === 'development' && 'getAllFlatColumns',\n        debug: () => table.options.debugAll ?? table.options.debugColumns,\n      }\n    ),\n\n    _getAllFlatColumnsById: memo(\n      () => [table.getAllFlatColumns()],\n      flatColumns => {\n        return flatColumns.reduce((acc, column) => {\n          acc[column.id] = column\n          return acc\n        }, {} as Record>)\n      },\n      {\n        key: process.env.NODE_ENV === 'development' && 'getAllFlatColumnsById',\n        debug: () => table.options.debugAll ?? table.options.debugColumns,\n      }\n    ),\n\n    getAllLeafColumns: memo(\n      () => [table.getAllColumns(), table._getOrderColumnsFn()],\n      (allColumns, orderColumns) => {\n        let leafColumns = allColumns.flatMap(column => column.getLeafColumns())\n        return orderColumns(leafColumns)\n      },\n      {\n        key: process.env.NODE_ENV === 'development' && 'getAllLeafColumns',\n        debug: () => table.options.debugAll ?? table.options.debugColumns,\n      }\n    ),\n\n    getColumn: columnId => {\n      const column = table._getAllFlatColumnsById()[columnId]\n\n      if (process.env.NODE_ENV !== 'production' && !column) {\n        console.error(`[Table] Column with id '${columnId}' does not exist.`)\n      }\n\n      return column\n    },\n  }\n\n  Object.assign(table, coreInstance)\n\n  table._features.forEach(feature => {\n    return Object.assign(table, feature.createTable?.(table))\n  })\n\n  return table\n}\n","import { RowData, Cell, Column, Row, Table } from '../types'\nimport { Getter, memo } from '../utils'\n\nexport interface CellContext {\n  table: Table\n  column: Column\n  row: Row\n  cell: Cell\n  getValue: Getter\n  renderValue: Getter\n}\n\nexport interface CoreCell {\n  id: string\n  getValue: CellContext['getValue']\n  renderValue: CellContext['renderValue']\n  row: Row\n  column: Column\n  getContext: () => CellContext\n}\n\nexport function createCell(\n  table: Table,\n  row: Row,\n  column: Column,\n  columnId: string\n): Cell {\n  const getRenderValue = () =>\n    cell.getValue() ?? table.options.renderFallbackValue\n\n  const cell: CoreCell = {\n    id: `${row.id}_${column.id}`,\n    row,\n    column,\n    getValue: () => row.getValue(columnId),\n    renderValue: getRenderValue,\n    getContext: memo(\n      () => [table, column, row, cell],\n      (table, column, row, cell) => ({\n        table,\n        column,\n        row,\n        cell: cell as Cell,\n        getValue: cell.getValue,\n        renderValue: cell.renderValue,\n      }),\n      {\n        key: process.env.NODE_ENV === 'development' && 'cell.getContext',\n        debug: () => table.options.debugAll,\n      }\n    ),\n  }\n\n  table._features.forEach(feature => {\n    Object.assign(\n      cell,\n      feature.createCell?.(\n        cell as Cell,\n        column,\n        row as Row,\n        table\n      )\n    )\n  }, {})\n\n  return cell as Cell\n}\n","import { RowData, Cell, Row, Table } from '../types'\nimport { flattenBy, memo } from '../utils'\nimport { createCell } from './cell'\n\nexport interface CoreRow {\n  id: string\n  index: number\n  original: TData\n  depth: number\n  parentId?: string\n  _valuesCache: Record\n  _uniqueValuesCache: Record\n  getValue: (columnId: string) => TValue\n  getUniqueValues: (columnId: string) => TValue[]\n  renderValue: (columnId: string) => TValue\n  subRows: Row[]\n  getLeafRows: () => Row[]\n  originalSubRows?: TData[]\n  getAllCells: () => Cell[]\n  _getAllCellsByColumnId: () => Record>\n  getParentRow: () => Row | undefined\n  getParentRows: () => Row[]\n}\n\nexport const createRow = (\n  table: Table,\n  id: string,\n  original: TData,\n  rowIndex: number,\n  depth: number,\n  subRows?: Row[],\n  parentId?: string\n): Row => {\n  let row: CoreRow = {\n    id,\n    index: rowIndex,\n    original,\n    depth,\n    parentId,\n    _valuesCache: {},\n    _uniqueValuesCache: {},\n    getValue: columnId => {\n      if (row._valuesCache.hasOwnProperty(columnId)) {\n        return row._valuesCache[columnId]\n      }\n\n      const column = table.getColumn(columnId)\n\n      if (!column?.accessorFn) {\n        return undefined\n      }\n\n      row._valuesCache[columnId] = column.accessorFn(\n        row.original as TData,\n        rowIndex\n      )\n\n      return row._valuesCache[columnId] as any\n    },\n    getUniqueValues: columnId => {\n      if (row._uniqueValuesCache.hasOwnProperty(columnId)) {\n        return row._uniqueValuesCache[columnId]\n      }\n\n      const column = table.getColumn(columnId)\n\n      if (!column?.accessorFn) {\n        return undefined\n      }\n\n      if (!column.columnDef.getUniqueValues) {\n        row._uniqueValuesCache[columnId] = [row.getValue(columnId)]\n        return row._uniqueValuesCache[columnId]\n      }\n\n      row._uniqueValuesCache[columnId] = column.columnDef.getUniqueValues(\n        row.original as TData,\n        rowIndex\n      )\n\n      return row._uniqueValuesCache[columnId] as any\n    },\n    renderValue: columnId =>\n      row.getValue(columnId) ?? table.options.renderFallbackValue,\n    subRows: subRows ?? [],\n    getLeafRows: () => flattenBy(row.subRows, d => d.subRows),\n    getParentRow: () => (row.parentId ? table.getRow(row.parentId) : undefined),\n    getParentRows: () => {\n      let parentRows: Row[] = []\n      let currentRow = row\n      while (true) {\n        const parentRow = currentRow.getParentRow()\n        if (!parentRow) break\n        parentRows.push(parentRow)\n        currentRow = parentRow\n      }\n      return parentRows.reverse()\n    },\n    getAllCells: memo(\n      () => [table.getAllLeafColumns()],\n      leafColumns => {\n        return leafColumns.map(column => {\n          return createCell(table, row as Row, column, column.id)\n        })\n      },\n      {\n        key: process.env.NODE_ENV === 'development' && 'row.getAllCells',\n        debug: () => table.options.debugAll ?? table.options.debugRows,\n      }\n    ),\n\n    _getAllCellsByColumnId: memo(\n      () => [row.getAllCells()],\n      allCells => {\n        return allCells.reduce((acc, cell) => {\n          acc[cell.column.id] = cell\n          return acc\n        }, {} as Record>)\n      },\n      {\n        key:\n          process.env.NODE_ENV === 'production' && 'row.getAllCellsByColumnId',\n        debug: () => table.options.debugAll ?? table.options.debugRows,\n      }\n    ),\n  }\n\n  for (let i = 0; i < table._features.length; i++) {\n    const feature = table._features[i]\n    Object.assign(row, feature?.createRow?.(row, table))\n  }\n\n  return row as Row\n}\n","import {\n  AccessorFn,\n  ColumnDef,\n  DisplayColumnDef,\n  GroupColumnDef,\n  IdentifiedColumnDef,\n  RowData,\n} from './types'\nimport { DeepKeys, DeepValue, RequiredKeys } from './utils'\n\n// type Person = {\n//   firstName: string\n//   lastName: string\n//   age: number\n//   visits: number\n//   status: string\n//   progress: number\n//   createdAt: Date\n//   nested: {\n//     foo: [\n//       {\n//         bar: 'bar'\n//       }\n//     ]\n//     bar: { subBar: boolean }[]\n//     baz: {\n//       foo: 'foo'\n//       bar: {\n//         baz: 'baz'\n//       }\n//     }\n//   }\n// }\n\n// const test: DeepKeys = 'nested.foo.0.bar'\n// const test2: DeepKeys = 'nested.bar'\n\n// const helper = createColumnHelper()\n\n// helper.accessor('nested.foo', {\n//   cell: info => info.getValue(),\n// })\n\n// helper.accessor('nested.foo.0.bar', {\n//   cell: info => info.getValue(),\n// })\n\n// helper.accessor('nested.bar', {\n//   cell: info => info.getValue(),\n// })\n\nexport type ColumnHelper = {\n  accessor: <\n    TAccessor extends AccessorFn | DeepKeys,\n    TValue extends TAccessor extends AccessorFn\n      ? TReturn\n      : TAccessor extends DeepKeys\n      ? DeepValue\n      : never\n  >(\n    accessor: TAccessor,\n    column: TAccessor extends AccessorFn\n      ? DisplayColumnDef\n      : IdentifiedColumnDef\n  ) => ColumnDef\n  display: (column: DisplayColumnDef) => ColumnDef\n  group: (column: GroupColumnDef) => ColumnDef\n}\n\nexport function createColumnHelper<\n  TData extends RowData\n>(): ColumnHelper {\n  return {\n    accessor: (accessor, column) => {\n      return typeof accessor === 'function'\n        ? ({\n            ...column,\n            accessorFn: accessor,\n          } as any)\n        : {\n            ...column,\n            accessorKey: accessor,\n          }\n    },\n    display: column => column as ColumnDef,\n    group: column => column as ColumnDef,\n  }\n}\n","import { createRow } from '../core/row'\nimport { Table, Row, RowModel, RowData } from '../types'\nimport { memo } from '../utils'\n\nexport function getCoreRowModel(): (\n  table: Table\n) => () => RowModel {\n  return table =>\n    memo(\n      () => [table.options.data],\n      (\n        data\n      ): {\n        rows: Row[]\n        flatRows: Row[]\n        rowsById: Record>\n      } => {\n        const rowModel: RowModel = {\n          rows: [],\n          flatRows: [],\n          rowsById: {},\n        }\n\n        const accessRows = (\n          originalRows: TData[],\n          depth = 0,\n          parentRow?: Row\n        ): Row[] => {\n          const rows = [] as Row[]\n\n          for (let i = 0; i < originalRows.length; i++) {\n            // This could be an expensive check at scale, so we should move it somewhere else, but where?\n            // if (!id) {\n            //   if (process.env.NODE_ENV !== 'production') {\n            //     throw new Error(`getRowId expected an ID, but got ${id}`)\n            //   }\n            // }\n\n            // Make the row\n            const row = createRow(\n              table,\n              table._getRowId(originalRows[i]!, i, parentRow),\n              originalRows[i]!,\n              i,\n              depth,\n              undefined,\n              parentRow?.id\n            )\n\n            // Keep track of every row in a flat array\n            rowModel.flatRows.push(row)\n            // Also keep track of every row by its ID\n            rowModel.rowsById[row.id] = row\n            // Push table row into parent\n            rows.push(row)\n\n            // Get the original subrows\n            if (table.options.getSubRows) {\n              row.originalSubRows = table.options.getSubRows(\n                originalRows[i]!,\n                i\n              )\n\n              // Then recursively access them\n              if (row.originalSubRows?.length) {\n                row.subRows = accessRows(row.originalSubRows, depth + 1, row)\n              }\n            }\n          }\n\n          return rows\n        }\n\n        rowModel.rows = accessRows(data)\n\n        return rowModel\n      },\n      {\n        key: process.env.NODE_ENV === 'development' && 'getRowModel',\n        debug: () => table.options.debugAll ?? table.options.debugTable,\n        onChange: () => {\n          table._autoResetPageIndex()\n        },\n      }\n    )\n}\n","import { createRow } from '../core/row'\nimport { Row, RowModel, Table, RowData } from '../types'\n\nexport function filterRows(\n  rows: Row[],\n  filterRowImpl: (row: Row) => any,\n  table: Table\n) {\n  if (table.options.filterFromLeafRows) {\n    return filterRowModelFromLeafs(rows, filterRowImpl, table)\n  }\n\n  return filterRowModelFromRoot(rows, filterRowImpl, table)\n}\n\nexport function filterRowModelFromLeafs(\n  rowsToFilter: Row[],\n  filterRow: (row: Row) => Row[],\n  table: Table\n): RowModel {\n  const newFilteredFlatRows: Row[] = []\n  const newFilteredRowsById: Record> = {}\n  const maxDepth = table.options.maxLeafRowFilterDepth ?? 100\n\n  const recurseFilterRows = (rowsToFilter: Row[], depth = 0) => {\n    const rows: Row[] = []\n\n    // Filter from children up first\n    for (let i = 0; i < rowsToFilter.length; i++) {\n      let row = rowsToFilter[i]!\n\n      const newRow = createRow(\n        table,\n        row.id,\n        row.original,\n        row.index,\n        row.depth,\n        undefined,\n        row.parentId\n      )\n      newRow.columnFilters = row.columnFilters\n\n      if (row.subRows?.length && depth < maxDepth) {\n        newRow.subRows = recurseFilterRows(row.subRows, depth + 1)\n        row = newRow\n\n        if (filterRow(row) && !newRow.subRows.length) {\n          rows.push(row)\n          newFilteredRowsById[row.id] = row\n          newFilteredRowsById[i] = row\n          continue\n        }\n\n        if (filterRow(row) || newRow.subRows.length) {\n          rows.push(row)\n          newFilteredRowsById[row.id] = row\n          newFilteredRowsById[i] = row\n          continue\n        }\n      } else {\n        row = newRow\n        if (filterRow(row)) {\n          rows.push(row)\n          newFilteredRowsById[row.id] = row\n          newFilteredRowsById[i] = row\n        }\n      }\n    }\n\n    return rows\n  }\n\n  return {\n    rows: recurseFilterRows(rowsToFilter),\n    flatRows: newFilteredFlatRows,\n    rowsById: newFilteredRowsById,\n  }\n}\n\nexport function filterRowModelFromRoot(\n  rowsToFilter: Row[],\n  filterRow: (row: Row) => any,\n  table: Table\n): RowModel {\n  const newFilteredFlatRows: Row[] = []\n  const newFilteredRowsById: Record> = {}\n  const maxDepth = table.options.maxLeafRowFilterDepth ?? 100\n\n  // Filters top level and nested rows\n  const recurseFilterRows = (rowsToFilter: Row[], depth = 0) => {\n    // Filter from parents downward first\n\n    const rows: Row[] = []\n\n    // Apply the filter to any subRows\n    for (let i = 0; i < rowsToFilter.length; i++) {\n      let row = rowsToFilter[i]!\n\n      const pass = filterRow(row)\n\n      if (pass) {\n        if (row.subRows?.length && depth < maxDepth) {\n          const newRow = createRow(\n            table,\n            row.id,\n            row.original,\n            row.index,\n            row.depth,\n            undefined,\n            row.parentId\n          )\n          newRow.subRows = recurseFilterRows(row.subRows, depth + 1)\n          row = newRow\n        }\n\n        rows.push(row)\n        newFilteredFlatRows.push(row)\n        newFilteredRowsById[row.id] = row\n      }\n    }\n\n    return rows\n  }\n\n  return {\n    rows: recurseFilterRows(rowsToFilter),\n    flatRows: newFilteredFlatRows,\n    rowsById: newFilteredRowsById,\n  }\n}\n","import { ResolvedColumnFilter } from '../features/Filters'\nimport { Table, RowModel, Row, RowData } from '../types'\nimport { memo } from '../utils'\nimport { filterRows } from './filterRowsUtils'\n\nexport function getFilteredRowModel(): (\n  table: Table\n) => () => RowModel {\n  return table =>\n    memo(\n      () => [\n        table.getPreFilteredRowModel(),\n        table.getState().columnFilters,\n        table.getState().globalFilter,\n      ],\n      (rowModel, columnFilters, globalFilter) => {\n        if (\n          !rowModel.rows.length ||\n          (!columnFilters?.length && !globalFilter)\n        ) {\n          for (let i = 0; i < rowModel.flatRows.length; i++) {\n            rowModel.flatRows[i]!.columnFilters = {}\n            rowModel.flatRows[i]!.columnFiltersMeta = {}\n          }\n          return rowModel\n        }\n\n        const resolvedColumnFilters: ResolvedColumnFilter[] = []\n        const resolvedGlobalFilters: ResolvedColumnFilter[] = []\n\n        ;(columnFilters ?? []).forEach(d => {\n          const column = table.getColumn(d.id)\n\n          if (!column) {\n            return\n          }\n\n          const filterFn = column.getFilterFn()\n\n          if (!filterFn) {\n            if (process.env.NODE_ENV !== 'production') {\n              console.warn(\n                `Could not find a valid 'column.filterFn' for column with the ID: ${column.id}.`\n              )\n            }\n            return\n          }\n\n          resolvedColumnFilters.push({\n            id: d.id,\n            filterFn,\n            resolvedValue: filterFn.resolveFilterValue?.(d.value) ?? d.value,\n          })\n        })\n\n        const filterableIds = columnFilters.map(d => d.id)\n\n        const globalFilterFn = table.getGlobalFilterFn()\n\n        const globallyFilterableColumns = table\n          .getAllLeafColumns()\n          .filter(column => column.getCanGlobalFilter())\n\n        if (\n          globalFilter &&\n          globalFilterFn &&\n          globallyFilterableColumns.length\n        ) {\n          filterableIds.push('__global__')\n\n          globallyFilterableColumns.forEach(column => {\n            resolvedGlobalFilters.push({\n              id: column.id,\n              filterFn: globalFilterFn,\n              resolvedValue:\n                globalFilterFn.resolveFilterValue?.(globalFilter) ??\n                globalFilter,\n            })\n          })\n        }\n\n        let currentColumnFilter\n        let currentGlobalFilter\n\n        // Flag the prefiltered row model with each filter state\n        for (let j = 0; j < rowModel.flatRows.length; j++) {\n          const row = rowModel.flatRows[j]!\n\n          row.columnFilters = {}\n\n          if (resolvedColumnFilters.length) {\n            for (let i = 0; i < resolvedColumnFilters.length; i++) {\n              currentColumnFilter = resolvedColumnFilters[i]!\n              const id = currentColumnFilter.id\n\n              // Tag the row with the column filter state\n              row.columnFilters[id] = currentColumnFilter.filterFn(\n                row,\n                id,\n                currentColumnFilter.resolvedValue,\n                filterMeta => {\n                  row.columnFiltersMeta[id] = filterMeta\n                }\n              )\n            }\n          }\n\n          if (resolvedGlobalFilters.length) {\n            for (let i = 0; i < resolvedGlobalFilters.length; i++) {\n              currentGlobalFilter = resolvedGlobalFilters[i]!\n              const id = currentGlobalFilter.id\n              // Tag the row with the first truthy global filter state\n              if (\n                currentGlobalFilter.filterFn(\n                  row,\n                  id,\n                  currentGlobalFilter.resolvedValue,\n                  filterMeta => {\n                    row.columnFiltersMeta[id] = filterMeta\n                  }\n                )\n              ) {\n                row.columnFilters.__global__ = true\n                break\n              }\n            }\n\n            if (row.columnFilters.__global__ !== true) {\n              row.columnFilters.__global__ = false\n            }\n          }\n        }\n\n        const filterRowsImpl = (row: Row) => {\n          // Horizontally filter rows through each column\n          for (let i = 0; i < filterableIds.length; i++) {\n            if (row.columnFilters[filterableIds[i]!] === false) {\n              return false\n            }\n          }\n          return true\n        }\n\n        // Filter final rows using all of the active filters\n        return filterRows(rowModel.rows, filterRowsImpl, table)\n      },\n      {\n        key: process.env.NODE_ENV === 'development' && 'getFilteredRowModel',\n        debug: () => table.options.debugAll ?? table.options.debugTable,\n        onChange: () => {\n          table._autoResetPageIndex()\n        },\n      }\n    )\n}\n","import { Table, RowModel, Row, RowData } from '../types'\nimport { memo } from '../utils'\nimport { filterRows } from './filterRowsUtils'\n\nexport function getFacetedRowModel(): (\n  table: Table,\n  columnId: string\n) => () => RowModel {\n  return (table, columnId) =>\n    memo(\n      () => [\n        table.getPreFilteredRowModel(),\n        table.getState().columnFilters,\n        table.getState().globalFilter,\n        table.getFilteredRowModel(),\n      ],\n      (preRowModel, columnFilters, globalFilter) => {\n        if (\n          !preRowModel.rows.length ||\n          (!columnFilters?.length && !globalFilter)\n        ) {\n          return preRowModel\n        }\n\n        const filterableIds = [\n          ...columnFilters.map(d => d.id).filter(d => d !== columnId),\n          globalFilter ? '__global__' : undefined,\n        ].filter(Boolean) as string[]\n\n        const filterRowsImpl = (row: Row) => {\n          // Horizontally filter rows through each column\n          for (let i = 0; i < filterableIds.length; i++) {\n            if (row.columnFilters[filterableIds[i]!] === false) {\n              return false\n            }\n          }\n          return true\n        }\n\n        return filterRows(preRowModel.rows, filterRowsImpl, table)\n      },\n      {\n        key:\n          process.env.NODE_ENV === 'development' &&\n          'getFacetedRowModel_' + columnId,\n        debug: () => table.options.debugAll ?? table.options.debugTable,\n        onChange: () => {},\n      }\n    )\n}\n","import { Table, RowData } from '../types'\nimport { memo } from '../utils'\n\nexport function getFacetedUniqueValues(): (\n  table: Table,\n  columnId: string\n) => () => Map {\n  return (table, columnId) =>\n    memo(\n      () => [table.getColumn(columnId)?.getFacetedRowModel()],\n      facetedRowModel => {\n        if (!facetedRowModel) return new Map()\n\n        let facetedUniqueValues = new Map()\n\n        for (let i = 0; i < facetedRowModel.flatRows.length; i++) {\n          const values =\n            facetedRowModel.flatRows[i]!.getUniqueValues(columnId)\n\n          for (let j = 0; j < values.length; j++) {\n            const value = values[j]!\n\n            if (facetedUniqueValues.has(value)) {\n              facetedUniqueValues.set(\n                value,\n                (facetedUniqueValues.get(value) ?? 0) + 1\n              )\n            } else {\n              facetedUniqueValues.set(value, 1)\n            }\n          }\n        }\n\n        return facetedUniqueValues\n      },\n      {\n        key:\n          process.env.NODE_ENV === 'development' &&\n          'getFacetedUniqueValues_' + columnId,\n        debug: () => table.options.debugAll ?? table.options.debugTable,\n        onChange: () => {},\n      }\n    )\n}\n","import { Table, RowData } from '../types'\nimport { memo } from '../utils'\n\nexport function getFacetedMinMaxValues(): (\n  table: Table,\n  columnId: string\n) => () => undefined | [number, number] {\n  return (table, columnId) =>\n    memo(\n      () => [table.getColumn(columnId)?.getFacetedRowModel()],\n      facetedRowModel => {\n        if (!facetedRowModel) return undefined\n\n        const firstValue =\n          facetedRowModel.flatRows[0]?.getUniqueValues(columnId)\n\n        if (typeof firstValue === 'undefined') {\n          return undefined\n        }\n\n        let facetedMinMaxValues: [any, any] = [firstValue, firstValue]\n\n        for (let i = 0; i < facetedRowModel.flatRows.length; i++) {\n          const values =\n            facetedRowModel.flatRows[i]!.getUniqueValues(columnId)\n\n          for (let j = 0; j < values.length; j++) {\n            const value = values[j]!\n\n            if (value < facetedMinMaxValues[0]) {\n              facetedMinMaxValues[0] = value\n            } else if (value > facetedMinMaxValues[1]) {\n              facetedMinMaxValues[1] = value\n            }\n          }\n        }\n\n        return facetedMinMaxValues\n      },\n      {\n        key:\n          process.env.NODE_ENV === 'development' &&\n          'getFacetedMinMaxValues_' + columnId,\n        debug: () => table.options.debugAll ?? table.options.debugTable,\n        onChange: () => {},\n      }\n    )\n}\n","import { Table, Row, RowModel, RowData } from '../types'\nimport { SortingFn } from '../features/Sorting'\nimport { memo } from '../utils'\n\nexport function getSortedRowModel(): (\n  table: Table\n) => () => RowModel {\n  return table =>\n    memo(\n      () => [table.getState().sorting, table.getPreSortedRowModel()],\n      (sorting, rowModel) => {\n        if (!rowModel.rows.length || !sorting?.length) {\n          return rowModel\n        }\n\n        const sortingState = table.getState().sorting\n\n        const sortedFlatRows: Row[] = []\n\n        // Filter out sortings that correspond to non existing columns\n        const availableSorting = sortingState.filter(sort =>\n          table.getColumn(sort.id)?.getCanSort()\n        )\n\n        const columnInfoById: Record<\n          string,\n          {\n            sortUndefined?: false | -1 | 1\n            invertSorting?: boolean\n            sortingFn: SortingFn\n          }\n        > = {}\n\n        availableSorting.forEach(sortEntry => {\n          const column = table.getColumn(sortEntry.id)\n          if (!column) return\n\n          columnInfoById[sortEntry.id] = {\n            sortUndefined: column.columnDef.sortUndefined,\n            invertSorting: column.columnDef.invertSorting,\n            sortingFn: column.getSortingFn(),\n          }\n        })\n\n        const sortData = (rows: Row[]) => {\n          // This will also perform a stable sorting using the row index\n          // if needed.\n          const sortedData = [...rows]\n\n          sortedData.sort((rowA, rowB) => {\n            for (let i = 0; i < availableSorting.length; i += 1) {\n              const sortEntry = availableSorting[i]!\n              const columnInfo = columnInfoById[sortEntry.id]!\n              const isDesc = sortEntry?.desc ?? false\n\n              if (columnInfo.sortUndefined) {\n                const aValue = rowA.getValue(sortEntry.id)\n                const bValue = rowB.getValue(sortEntry.id)\n\n                const aUndefined = typeof aValue === 'undefined'\n                const bUndefined = typeof bValue === 'undefined'\n\n                if (aUndefined || bUndefined) {\n                  return aUndefined && bUndefined\n                    ? 0\n                    : aUndefined\n                    ? columnInfo.sortUndefined\n                    : -columnInfo.sortUndefined\n                }\n              }\n\n              // This function should always return in ascending order\n              let sortInt = columnInfo.sortingFn(rowA, rowB, sortEntry.id)\n\n              if (sortInt !== 0) {\n                if (isDesc) {\n                  sortInt *= -1\n                }\n\n                if (columnInfo.invertSorting) {\n                  sortInt *= -1\n                }\n\n                return sortInt\n              }\n            }\n\n            return rowA.index - rowB.index\n          })\n\n          // If there are sub-rows, sort them\n          sortedData.forEach(row => {\n            sortedFlatRows.push(row)\n            if (row.subRows?.length) {\n              row.subRows = sortData(row.subRows)\n            }\n          })\n\n          return sortedData\n        }\n\n        return {\n          rows: sortData(rowModel.rows),\n          flatRows: sortedFlatRows,\n          rowsById: rowModel.rowsById,\n        }\n      },\n      {\n        key: process.env.NODE_ENV === 'development' && 'getSortedRowModel',\n        debug: () => table.options.debugAll ?? table.options.debugTable,\n        onChange: () => {\n          table._autoResetPageIndex()\n        },\n      }\n    )\n}\n","import { createRow } from '../core/row'\nimport { Table, Row, RowModel, RowData } from '../types'\nimport { flattenBy, memo } from '../utils'\n\nexport function getGroupedRowModel(): (\n  table: Table\n) => () => RowModel {\n  return table =>\n    memo(\n      () => [table.getState().grouping, table.getPreGroupedRowModel()],\n      (grouping, rowModel) => {\n        if (!rowModel.rows.length || !grouping.length) {\n          return rowModel\n        }\n\n        // Filter the grouping list down to columns that exist\n        const existingGrouping = grouping.filter(columnId =>\n          table.getColumn(columnId)\n        )\n\n        const groupedFlatRows: Row[] = []\n        const groupedRowsById: Record> = {}\n        // const onlyGroupedFlatRows: Row[] = [];\n        // const onlyGroupedRowsById: Record = {};\n        // const nonGroupedFlatRows: Row[] = [];\n        // const nonGroupedRowsById: Record = {};\n\n        // Recursively group the data\n        const groupUpRecursively = (\n          rows: Row[],\n          depth = 0,\n          parentId?: string\n        ) => {\n          // Grouping depth has been been met\n          // Stop grouping and simply rewrite thd depth and row relationships\n          if (depth >= existingGrouping.length) {\n            return rows.map(row => {\n              row.depth = depth\n\n              groupedFlatRows.push(row)\n              groupedRowsById[row.id] = row\n\n              if (row.subRows) {\n                row.subRows = groupUpRecursively(row.subRows, depth + 1, row.id)\n              }\n\n              return row\n            })\n          }\n\n          const columnId: string = existingGrouping[depth]!\n\n          // Group the rows together for this level\n          const rowGroupsMap = groupBy(rows, columnId)\n\n          // Peform aggregations for each group\n          const aggregatedGroupedRows = Array.from(rowGroupsMap.entries()).map(\n            ([groupingValue, groupedRows], index) => {\n              let id = `${columnId}:${groupingValue}`\n              id = parentId ? `${parentId}>${id}` : id\n\n              // First, Recurse to group sub rows before aggregation\n              const subRows = groupUpRecursively(groupedRows, depth + 1, id)\n\n              // Flatten the leaf rows of the rows in this group\n              const leafRows = depth\n                ? flattenBy(groupedRows, row => row.subRows)\n                : groupedRows\n\n              const row = createRow(\n                table,\n                id,\n                leafRows[0]!.original,\n                index,\n                depth,\n                undefined,\n                parentId\n              )\n\n              Object.assign(row, {\n                groupingColumnId: columnId,\n                groupingValue,\n                subRows,\n                leafRows,\n                getValue: (columnId: string) => {\n                  // Don't aggregate columns that are in the grouping\n                  if (existingGrouping.includes(columnId)) {\n                    if (row._valuesCache.hasOwnProperty(columnId)) {\n                      return row._valuesCache[columnId]\n                    }\n\n                    if (groupedRows[0]) {\n                      row._valuesCache[columnId] =\n                        groupedRows[0].getValue(columnId) ?? undefined\n                    }\n\n                    return row._valuesCache[columnId]\n                  }\n\n                  if (row._groupingValuesCache.hasOwnProperty(columnId)) {\n                    return row._groupingValuesCache[columnId]\n                  }\n\n                  // Aggregate the values\n                  const column = table.getColumn(columnId)\n                  const aggregateFn = column?.getAggregationFn()\n\n                  if (aggregateFn) {\n                    row._groupingValuesCache[columnId] = aggregateFn(\n                      columnId,\n                      leafRows,\n                      groupedRows\n                    )\n\n                    return row._groupingValuesCache[columnId]\n                  }\n                },\n              })\n\n              subRows.forEach(subRow => {\n                groupedFlatRows.push(subRow)\n                groupedRowsById[subRow.id] = subRow\n                // if (subRow.getIsGrouped?.()) {\n                //   onlyGroupedFlatRows.push(subRow);\n                //   onlyGroupedRowsById[subRow.id] = subRow;\n                // } else {\n                //   nonGroupedFlatRows.push(subRow);\n                //   nonGroupedRowsById[subRow.id] = subRow;\n                // }\n              })\n\n              return row\n            }\n          )\n\n          return aggregatedGroupedRows\n        }\n\n        const groupedRows = groupUpRecursively(rowModel.rows, 0)\n\n        groupedRows.forEach(subRow => {\n          groupedFlatRows.push(subRow)\n          groupedRowsById[subRow.id] = subRow\n          // if (subRow.getIsGrouped?.()) {\n          //   onlyGroupedFlatRows.push(subRow);\n          //   onlyGroupedRowsById[subRow.id] = subRow;\n          // } else {\n          //   nonGroupedFlatRows.push(subRow);\n          //   nonGroupedRowsById[subRow.id] = subRow;\n          // }\n        })\n\n        return {\n          rows: groupedRows,\n          flatRows: groupedFlatRows,\n          rowsById: groupedRowsById,\n        }\n      },\n      {\n        key: process.env.NODE_ENV === 'development' && 'getGroupedRowModel',\n        debug: () => table.options.debugAll ?? table.options.debugTable,\n        onChange: () => {\n          table._queue(() => {\n            table._autoResetExpanded()\n            table._autoResetPageIndex()\n          })\n        },\n      }\n    )\n}\n\nfunction groupBy(rows: Row[], columnId: string) {\n  const groupMap = new Map[]>()\n\n  return rows.reduce((map, row) => {\n    const resKey = `${row.getGroupingValue(columnId)}`\n    const previous = map.get(resKey)\n    if (!previous) {\n      map.set(resKey, [row])\n    } else {\n      previous.push(row)\n    }\n    return map\n  }, groupMap)\n}\n","import { Table, Row, RowModel, RowData } from '../types'\nimport { memo } from '../utils'\n\nexport function getExpandedRowModel(): (\n  table: Table\n) => () => RowModel {\n  return table =>\n    memo(\n      () => [\n        table.getState().expanded,\n        table.getPreExpandedRowModel(),\n        table.options.paginateExpandedRows,\n      ],\n      (expanded, rowModel, paginateExpandedRows) => {\n        if (\n          !rowModel.rows.length ||\n          (expanded !== true && !Object.keys(expanded ?? {}).length)\n        ) {\n          return rowModel\n        }\n\n        if (!paginateExpandedRows) {\n          // Only expand rows at this point if they are being paginated\n          return rowModel\n        }\n\n        return expandRows(rowModel)\n      },\n      {\n        key: process.env.NODE_ENV === 'development' && 'getExpandedRowModel',\n        debug: () => table.options.debugAll ?? table.options.debugTable,\n      }\n    )\n}\n\nexport function expandRows(rowModel: RowModel) {\n  const expandedRows: Row[] = []\n\n  const handleRow = (row: Row) => {\n    expandedRows.push(row)\n\n    if (row.subRows?.length && row.getIsExpanded()) {\n      row.subRows.forEach(handleRow)\n    }\n  }\n\n  rowModel.rows.forEach(handleRow)\n\n  return {\n    rows: expandedRows,\n    flatRows: rowModel.flatRows,\n    rowsById: rowModel.rowsById,\n  }\n}\n","import { Table, RowModel, Row, RowData } from '../types'\nimport { memo } from '../utils'\nimport { expandRows } from './getExpandedRowModel'\n\nexport function getPaginationRowModel(opts?: {\n  initialSync: boolean\n}): (table: Table) => () => RowModel {\n  return table =>\n    memo(\n      () => [\n        table.getState().pagination,\n        table.getPrePaginationRowModel(),\n        table.options.paginateExpandedRows\n          ? undefined\n          : table.getState().expanded,\n      ],\n      (pagination, rowModel) => {\n        if (!rowModel.rows.length) {\n          return rowModel\n        }\n\n        const { pageSize, pageIndex } = pagination\n        let { rows, flatRows, rowsById } = rowModel\n        const pageStart = pageSize * pageIndex\n        const pageEnd = pageStart + pageSize\n\n        rows = rows.slice(pageStart, pageEnd)\n\n        let paginatedRowModel: RowModel\n\n        if (!table.options.paginateExpandedRows) {\n          paginatedRowModel = expandRows({\n            rows,\n            flatRows,\n            rowsById,\n          })\n        } else {\n          paginatedRowModel = {\n            rows,\n            flatRows,\n            rowsById,\n          }\n        }\n\n        paginatedRowModel.flatRows = []\n\n        const handleRow = (row: Row) => {\n          paginatedRowModel.flatRows.push(row)\n          if (row.subRows.length) {\n            row.subRows.forEach(handleRow)\n          }\n        }\n\n        paginatedRowModel.rows.forEach(handleRow)\n\n        return paginatedRowModel\n      },\n      {\n        key: process.env.NODE_ENV === 'development' && 'getPaginationRowModel',\n        debug: () => table.options.debugAll ?? table.options.debugTable,\n      }\n    )\n}\n"],"names":["functionalUpdate","updater","input","noop","makeStateUpdater","key","instance","setState","old","isFunction","d","Function","isNumberArray","Array","isArray","every","val","flattenBy","arr","getChildren","flat","recurse","subArr","forEach","item","push","children","length","memo","getDeps","fn","opts","deps","result","depTime","debug","Date","now","newDeps","depsChanged","some","dep","index","resultTime","onChange","depEndTime","Math","round","resultEndTime","resultFpsPercentage","pad","str","num","String","console","info","max","min","createColumn","table","columnDef","depth","parent","_ref","_resolvedColumnDef$id","defaultColumn","_getDefaultColumnDef","resolvedColumnDef","accessorKey","id","replace","undefined","header","accessorFn","includes","originalRow","split","_result","warn","Error","column","columns","getFlatColumns","_column$columns","flatMap","process","_table$options$debugA","options","debugAll","debugColumns","getLeafColumns","_getOrderColumnsFn","orderColumns","_column$columns2","leafColumns","_table$options$debugA2","_features","reduce","obj","feature","Object","assign","createHeader","_options$id","isPlaceholder","placeholderId","subHeaders","colSpan","rowSpan","headerGroup","getLeafHeaders","leafHeaders","recurseHeader","h","map","getContext","Headers","createTable","getHeaderGroups","getAllColumns","getVisibleLeafColumns","getState","columnPinning","left","right","allColumns","_left$map$filter","_right$map$filter","leftColumns","columnId","find","filter","Boolean","rightColumns","centerColumns","headerGroups","buildHeaderGroups","debugHeaders","getCenterHeaderGroups","getLeftHeaderGroups","_left$map$filter2","orderedLeafColumns","_table$options$debugA3","getRightHeaderGroups","_right$map$filter2","_table$options$debugA4","getFooterGroups","reverse","_table$options$debugA5","getLeftFooterGroups","_table$options$debugA6","getCenterFooterGroups","_table$options$debugA7","getRightFooterGroups","_table$options$debugA8","getFlatHeaders","headers","_table$options$debugA9","getLeftFlatHeaders","_table$options$debugA10","getCenterFlatHeaders","_table$options$debugA11","getRightFlatHeaders","_table$options$debugA12","getCenterLeafHeaders","flatHeaders","_header$subHeaders","_table$options$debugA13","getLeftLeafHeaders","_header$subHeaders2","_table$options$debugA14","getRightLeafHeaders","_header$subHeaders3","_table$options$debugA15","center","_left$0$headers","_left$","_center$0$headers","_center$","_right$0$headers","_right$","_table$options$debugA16","columnsToGroup","headerFamily","_headerGroups$0$heade","_headerGroups$","maxDepth","findMaxDepth","getIsVisible","createHeaderGroup","headersToGroup","join","pendingParentHeaders","headerToGroup","latestPendingParentHeader","isLeafHeader","bottomHeaders","recurseHeadersForSpans","filteredHeaders","childRowSpans","childColSpan","childRowSpan","minChildRowSpan","defaultColumnSizing","size","minSize","maxSize","Number","MAX_SAFE_INTEGER","getDefaultColumnSizingInfoState","startOffset","startSize","deltaOffset","deltaPercentage","isResizingColumn","columnSizingStart","ColumnSizing","getDefaultColumnDef","getInitialState","state","columnSizing","columnSizingInfo","getDefaultOptions","columnResizeMode","onColumnSizingChange","onColumnSizingInfoChange","getSize","_column$columnDef$min","_column$columnDef$max","columnSize","getStart","position","getLeftVisibleLeafColumns","getRightVisibleLeafColumns","findIndex","prevSiblingColumn","resetSize","setColumnSizing","_ref2","_","rest","getCanResize","_column$columnDef$ena","_table$options$enable","enableResizing","enableColumnResizing","getIsResizing","sum","_header$column$getSiz","prevSiblingHeader","getResizeHandler","getColumn","canResize","e","persist","isTouchStartEvent","touches","clientX","newColumnSizing","updateOffset","eventType","clientXPos","setColumnSizingInfo","_old$startOffset","_old$startSize","_ref3","headerSize","onMove","onEnd","mouseEvents","moveHandler","upHandler","document","removeEventListener","touchEvents","cancelable","preventDefault","stopPropagation","_e$touches$","passiveIfSupported","passiveEventSupported","passive","addEventListener","resetColumnSizing","defaultState","_table$initialState$c","initialState","resetHeaderSizeInfo","_table$initialState$c2","getTotalSize","_table$getHeaderGroup","_table$getHeaderGroup2","getLeftTotalSize","_table$getLeftHeaderG","_table$getLeftHeaderG2","getCenterTotalSize","_table$getCenterHeade","_table$getCenterHeade2","getRightTotalSize","_table$getRightHeader","_table$getRightHeader2","passiveSupported","supported","window","err","type","Expanding","expanded","onExpandedChange","paginateExpandedRows","registered","queued","_autoResetExpanded","_table$options$autoRe","_queue","autoResetAll","autoResetExpanded","manualExpanding","resetExpanded","setExpanded","toggleAllRowsExpanded","getIsAllRowsExpanded","_table$initialState$e","_table$initialState","getCanSomeRowsExpand","getPrePaginationRowModel","flatRows","row","getCanExpand","getToggleAllRowsExpandedHandler","getIsSomeRowsExpanded","values","keys","getRowModel","getIsExpanded","getExpandedDepth","rowIds","rowsById","splitId","getPreExpandedRowModel","getSortedRowModel","getExpandedRowModel","_getExpandedRowModel","createRow","toggleExpanded","_expanded","exists","oldExpanded","rowId","_table$options$getIsR","getIsRowExpanded","_table$options$getRow","_row$subRows","getRowCanExpand","enableExpanding","subRows","getToggleExpandedHandler","canExpand","includesString","filterValue","_row$getValue","_row$getValue$toStrin","_row$getValue$toStrin2","search","toLowerCase","getValue","toString","autoRemove","testFalsey","includesStringSensitive","_row$getValue2","_row$getValue2$toStri","equalsString","_row$getValue3","_row$getValue3$toStri","arrIncludes","_row$getValue4","arrIncludesAll","_row$getValue5","arrIncludesSome","_row$getValue6","equals","weakEquals","inNumberRange","rowValue","resolveFilterValue","unsafeMin","unsafeMax","parsedMin","parseFloat","parsedMax","isNaN","Infinity","temp","filterFns","Filters","filterFn","columnFilters","globalFilter","onColumnFiltersChange","onGlobalFilterChange","filterFromLeafRows","maxLeafRowFilterDepth","globalFilterFn","getColumnCanGlobalFilter","_table$getCoreRowMode","_table$getCoreRowMode2","value","getCoreRowModel","_getAllCellsByColumnId","getAutoFilterFn","firstRow","getFilterFn","_table$options$filter","_table$options$filter2","getCanFilter","_table$options$enable2","enableColumnFilter","enableColumnFilters","enableFilters","getCanGlobalFilter","_column$columnDef$ena2","_table$options$enable3","_table$options$enable4","_table$options$getCol","enableGlobalFilter","getIsFiltered","getFilterIndex","getFilterValue","_table$getState$colum","_table$getState$colum2","_table$getState$colum3","_table$getState$colum4","setFilterValue","setColumnFilters","previousfilter","newFilter","shouldAutoRemoveFilter","_old$filter","newFilterObj","_old$map","_getFacetedRowModel","getFacetedRowModel","getPreFilteredRowModel","_getFacetedUniqueValues","getFacetedUniqueValues","Map","_getFacetedMinMaxValues","getFacetedMinMaxValues","columnFiltersMeta","getGlobalAutoFilterFn","getGlobalFilterFn","_table$options$filter3","_table$options$filter4","getAllLeafColumns","updateFn","_functionalUpdate","setGlobalFilter","resetGlobalFilter","resetColumnFilters","getFilteredRowModel","_getFilteredRowModel","manualFiltering","_getGlobalFacetedRowModel","getGlobalFacetedRowModel","_getGlobalFacetedUniqueValues","getGlobalFacetedUniqueValues","_getGlobalFacetedMinMaxValues","getGlobalFacetedMinMaxValues","_leafRows","childRows","next","nextValue","extent","mean","leafRows","count","median","mid","floor","nums","sort","a","b","unique","from","Set","uniqueCount","_columnId","aggregationFns","Grouping","aggregatedCell","props","_toString","_props$getValue","aggregationFn","grouping","onGroupingChange","groupedColumnMode","toggleGrouping","setGrouping","getCanGroup","enableGrouping","getIsGrouped","_table$getState$group","getGroupedIndex","_table$getState$group2","indexOf","getToggleGroupingHandler","canGroup","getAutoAggregationFn","prototype","call","getAggregationFn","_table$options$aggreg","_table$options$aggreg2","resetGrouping","_table$initialState$g","getPreGroupedRowModel","getGroupedRowModel","_getGroupedRowModel","manualGrouping","groupingColumnId","getGroupingValue","_groupingValuesCache","hasOwnProperty","original","createCell","cell","getIsPlaceholder","getIsAggregated","nonGroupingColumns","col","groupingColumns","g","Ordering","columnOrder","onColumnOrderChange","setColumnOrder","resetColumnOrder","orderedColumns","columnOrderCopy","columnsCopy","targetColumnId","shift","foundIndex","splice","defaultPageIndex","defaultPageSize","getDefaultPaginationState","pageIndex","pageSize","Pagination","pagination","onPaginationChange","_autoResetPageIndex","autoResetPageIndex","manualPagination","resetPageIndex","setPagination","safeUpdater","newState","resetPagination","_table$initialState$p","setPageIndex","maxPageIndex","pageCount","_table$initialState$p2","_table$initialState$p3","resetPageSize","_table$initialState$p4","_table$initialState2","_table$initialState2$","setPageSize","topRowIndex","setPageCount","_table$options$pageCo","newPageCount","getPageOptions","getPageCount","pageOptions","fill","i","debugTable","getCanPreviousPage","getCanNextPage","previousPage","nextPage","getPaginationRowModel","_getPaginationRowModel","_table$options$pageCo2","ceil","rows","getDefaultPinningState","Pinning","onColumnPinningChange","pin","columnIds","setColumnPinning","_old$left3","_old$right3","_old$left","_old$right","_old$left2","_old$right2","getCanPin","_d$columnDef$enablePi","enablePinning","getIsPinned","leafColumnIds","isLeft","isRight","getPinnedIndex","getCenterVisibleCells","_getAllVisibleCells","allCells","leftAndRight","debugRows","getLeftVisibleCells","cells","getRightVisibleCells","resetColumnPinning","getIsSomeColumnsPinned","_pinningState$positio","pinningState","_pinningState$left","_pinningState$right","getLeftLeafColumns","getRightLeafColumns","getCenterLeafColumns","RowSelection","rowSelection","onRowSelectionChange","enableRowSelection","enableMultiRowSelection","enableSubRowSelection","setRowSelection","resetRowSelection","_table$initialState$r","toggleAllRowsSelected","getIsAllRowsSelected","preGroupedFlatRows","getCanSelect","toggleAllPageRowsSelected","resolvedValue","getIsAllPageRowsSelected","mutateRowIsSelected","getPreSelectedRowModel","getSelectedRowModel","rowModel","selectRowsFn","getFilteredSelectedRowModel","getGroupedSelectedRowModel","isAllRowsSelected","paginationFlatRows","isAllPageRowsSelected","getIsSomeRowsSelected","_table$getState$rowSe","totalSelected","getIsSomePageRowsSelected","getIsSelected","getIsSomeSelected","getToggleAllRowsSelectedHandler","target","checked","getToggleAllPageRowsSelectedHandler","toggleSelected","isSelected","selectedRowIds","isRowSelected","isSubRowSelected","getIsAllSubRowsSelected","getCanSelectSubRows","getCanMultiSelect","getToggleSelectedHandler","canSelect","_target","getRow","newSelectedFlatRows","newSelectedRowsById","recurseRows","_row$subRows2","selection","_selection$row$id","allChildrenSelected","someSelected","subRow","reSplitAlphaNumeric","alphanumeric","rowA","rowB","compareAlphanumeric","alphanumericCaseSensitive","text","compareBasic","textCaseSensitive","datetime","basic","aStr","bStr","aa","bb","an","parseInt","bn","combo","sortingFns","Sorting","sorting","sortingFn","onSortingChange","isMultiSortEvent","shiftKey","getAutoSortingFn","firstRows","slice","isString","getAutoSortDir","getSortingFn","_table$options$sortin","_table$options$sortin2","toggleSorting","desc","multi","nextSortingOrder","getNextSortingOrder","hasManualValue","setSorting","existingSorting","existingIndex","newSorting","sortAction","nextDesc","getCanMultiSort","_table$options$maxMul","maxMultiSortColCount","getFirstSortDir","_column$columnDef$sor","sortDescFirst","firstSortDirection","isSorted","getIsSorted","enableSortingRemoval","enableMultiRemove","getCanSort","enableSorting","enableMultiSort","_table$getState$sorti","columnSort","getSortIndex","_table$getState$sorti2","_table$getState$sorti3","clearSorting","getToggleSortingHandler","canSort","resetSorting","_table$initialState$s","getPreSortedRowModel","_getSortedRowModel","manualSorting","Visibility","columnVisibility","onColumnVisibilityChange","toggleVisibility","getCanHide","setColumnVisibility","enableHiding","getToggleVisibilityHandler","getAllCells","getVisibleCells","makeVisibleColumnsMethod","getColumns","getVisibleFlatColumns","getAllFlatColumns","getCenterVisibleLeafColumns","resetColumnVisibility","toggleAllColumnsVisible","_value","getIsAllColumnsVisible","getIsSomeColumnsVisible","getToggleAllColumnsVisibilityHandler","features","_options$initialState","defaultOptions","mergeOptions","coreInitialState","_feature$getInitialSt","queuedTimeout","coreInstance","cb","Promise","resolve","then","catch","error","setTimeout","reset","setOptions","newOptions","onStateChange","_getRowId","getRowId","_getCoreRowModel","_defaultColumn","_props$renderValue$to","_props$renderValue","renderValue","_getColumnDefs","columnDefs","recurseColumns","groupingColumnDef","_getAllFlatColumnsById","flatColumns","acc","getRenderValue","_cell$getValue","renderFallbackValue","rowIndex","parentId","_valuesCache","_uniqueValuesCache","getUniqueValues","getLeafRows","getParentRow","getParentRows","parentRows","currentRow","parentRow","createColumnHelper","accessor","display","group","data","accessRows","originalRows","getSubRows","_row$originalSubRows","originalSubRows","filterRows","filterRowImpl","filterRowModelFromLeafs","filterRowModelFromRoot","rowsToFilter","filterRow","_table$options$maxLea","newFilteredFlatRows","newFilteredRowsById","recurseFilterRows","newRow","_table$options$maxLea2","pass","resolvedColumnFilters","resolvedGlobalFilters","_filterFn$resolveFilt","filterableIds","globallyFilterableColumns","_globalFilterFn$resol","currentColumnFilter","currentGlobalFilter","j","filterMeta","__global__","filterRowsImpl","preRowModel","_table$getColumn","facetedRowModel","facetedUniqueValues","has","_facetedUniqueValues$","set","get","_facetedRowModel$flat","firstValue","facetedMinMaxValues","sortingState","sortedFlatRows","availableSorting","columnInfoById","sortEntry","sortUndefined","invertSorting","sortData","sortedData","_sortEntry$desc","columnInfo","isDesc","aValue","bValue","aUndefined","bUndefined","sortInt","existingGrouping","groupedFlatRows","groupedRowsById","groupUpRecursively","rowGroupsMap","groupBy","aggregatedGroupedRows","entries","groupingValue","groupedRows","_groupedRows$0$getVal","aggregateFn","groupMap","resKey","previous","expandRows","expandedRows","handleRow","pageStart","pageEnd","paginatedRowModel"],"mappings":";;;;;;;;;;;;;;;;EA4BA;;EAOA;;EAsCA;;EAEO,SAASA,gBAAgBA,CAAIC,OAAmB,EAAEC,KAAQ,EAAK;IACpE,OAAO,OAAOD,OAAO,KAAK,UAAU,GAC/BA,OAAO,CAAqBC,KAAK,CAAC,GACnCD,OAAO,CAAA;EACb,CAAA;EAEO,SAASE,IAAIA,GAAG;EACrB;EAAA,CAAA;EAGK,SAASC,gBAAgBA,CAC9BC,GAAM,EACNC,QAAiB,EACjB;EACA,EAAA,OAAQL,OAA+B,IAAK;EACxCK,IAAAA,QAAQ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