@nanoporetech-digital/components 3.3.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js +5 -5
  3. package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js.map +1 -1
  4. package/dist/cjs/nano-global-nav.cjs.entry.js +9 -2
  5. package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
  6. package/dist/cjs/nano-global-search-results.cjs.entry.js +5 -2
  7. package/dist/cjs/nano-global-search-results.cjs.entry.js.map +1 -1
  8. package/dist/cjs/{nano-table-2ddb22be.js → nano-table-10d45fe4.js} +19 -16
  9. package/dist/cjs/nano-table-10d45fe4.js.map +1 -0
  10. package/dist/cjs/nano-table.cjs.entry.js +1 -1
  11. package/dist/cjs/{table.worker-ec62a083.js → table.worker-a192a107.js} +2 -2
  12. package/dist/cjs/table.worker-a192a107.js.map +1 -0
  13. package/dist/collection/components/global-nav/global-nav.js +12 -4
  14. package/dist/collection/components/global-nav/global-nav.js.map +1 -1
  15. package/dist/collection/components/global-nav/style/global-nav.css +22 -22
  16. package/dist/collection/components/global-search-results/global-search-results.js +22 -2
  17. package/dist/collection/components/global-search-results/global-search-results.js.map +1 -1
  18. package/dist/collection/components/nav-item/nav-item.js +16 -5
  19. package/dist/collection/components/nav-item/nav-item.js.map +1 -1
  20. package/dist/collection/components/table/table.children.js +3 -3
  21. package/dist/collection/components/table/table.children.js.map +1 -1
  22. package/dist/collection/components/table/table.css +26 -12
  23. package/dist/collection/components/table/table.js +11 -8
  24. package/dist/collection/components/table/table.js.map +1 -1
  25. package/dist/collection/components/table/table.store.js +2 -2
  26. package/dist/collection/components/table/table.store.js.map +1 -1
  27. package/dist/components/nano-global-nav.js +9 -2
  28. package/dist/components/nano-global-nav.js.map +1 -1
  29. package/dist/components/nano-global-search-results.js +6 -3
  30. package/dist/components/nano-global-search-results.js.map +1 -1
  31. package/dist/components/nano-table.js +17 -14
  32. package/dist/components/nano-table.js.map +1 -1
  33. package/dist/components/nav-item.js +5 -5
  34. package/dist/components/nav-item.js.map +1 -1
  35. package/dist/custom-elements/index.js +36 -23
  36. package/dist/custom-elements/index.js.map +1 -1
  37. package/dist/esm/nano-global-nav-user-profile_3.entry.js +5 -5
  38. package/dist/esm/nano-global-nav-user-profile_3.entry.js.map +1 -1
  39. package/dist/esm/nano-global-nav.entry.js +9 -2
  40. package/dist/esm/nano-global-nav.entry.js.map +1 -1
  41. package/dist/esm/nano-global-search-results.entry.js +6 -3
  42. package/dist/esm/nano-global-search-results.entry.js.map +1 -1
  43. package/dist/esm/{nano-table-9d4fbd41.js → nano-table-a7a5a3f8.js} +19 -16
  44. package/dist/esm/nano-table-a7a5a3f8.js.map +1 -0
  45. package/dist/esm/nano-table.entry.js +1 -1
  46. package/dist/esm/{table.worker-1ba8ac3f.js → table.worker-d2b4d395.js} +2 -2
  47. package/dist/esm/table.worker-d2b4d395.js.map +1 -0
  48. package/dist/nano-components/nano-components.esm.js +1 -1
  49. package/dist/nano-components/p-11d3a90b.js +5 -0
  50. package/dist/nano-components/p-11d3a90b.js.map +1 -0
  51. package/dist/nano-components/p-14329940.entry.js +5 -0
  52. package/dist/nano-components/p-14329940.entry.js.map +1 -0
  53. package/dist/nano-components/p-3a1026d1.entry.js +5 -0
  54. package/dist/nano-components/p-3a1026d1.entry.js.map +1 -0
  55. package/dist/nano-components/p-40e13cd4.entry.js +5 -0
  56. package/dist/nano-components/p-40e13cd4.entry.js.map +1 -0
  57. package/dist/nano-components/p-64200e25.js +5 -0
  58. package/dist/nano-components/{p-216ece9a.js.map → p-64200e25.js.map} +0 -0
  59. package/dist/nano-components/{p-89b8ce4f.entry.js → p-d9d2807a.entry.js} +2 -2
  60. package/dist/nano-components/{p-89b8ce4f.entry.js.map → p-d9d2807a.entry.js.map} +0 -0
  61. package/dist/types/components/global-nav/global-nav.d.ts +3 -3
  62. package/dist/types/components/global-search-results/global-search-results.d.ts +5 -1
  63. package/dist/types/components/nav-item/nav-item.d.ts +11 -0
  64. package/dist/types/components/table/table.d.ts +1 -1
  65. package/dist/types/components/table/table.store.d.ts +1 -1
  66. package/dist/types/components.d.ts +8 -0
  67. package/docs-json.json +147 -46
  68. package/docs-vscode.json +1 -1
  69. package/package.json +2 -2
  70. package/dist/cjs/nano-table-2ddb22be.js.map +0 -1
  71. package/dist/cjs/table.worker-ec62a083.js.map +0 -1
  72. package/dist/esm/nano-table-9d4fbd41.js.map +0 -1
  73. package/dist/esm/table.worker-1ba8ac3f.js.map +0 -1
  74. package/dist/nano-components/p-216ece9a.js +0 -5
  75. package/dist/nano-components/p-866e7e88.js +0 -5
  76. package/dist/nano-components/p-866e7e88.js.map +0 -1
  77. package/dist/nano-components/p-d8678bdc.entry.js +0 -5
  78. package/dist/nano-components/p-d8678bdc.entry.js.map +0 -1
  79. package/dist/nano-components/p-db4b6602.entry.js +0 -5
  80. package/dist/nano-components/p-db4b6602.entry.js.map +0 -1
  81. package/dist/nano-components/p-e4e41e06.entry.js +0 -5
  82. package/dist/nano-components/p-e4e41e06.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"file":"nano-table-a7a5a3f8.js","mappings":";;;;;;;;AAAO,MAAM,YAAY,GAAG,UAAU;;ACItC,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,SAAS,KAAK;AAC3C,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;AAClC,EAAE,OAAO,CAAC,IAAI,IAAI,IAAI,KAAK,YAAY,CAAC,CAAC;AACzC,EAAC;AACD,MAAM,gBAAgB,GAAG,CAAC,KAAK,KAAK;AACpC,EAAE,IAAI,KAAK,IAAI,IAAI,EAAE;AACrB,EAAE;AACF,IAAI,YAAY,CAAC,KAAK,EAAE,aAAa,CAAC;AACtC,IAAI,YAAY,CAAC,KAAK,EAAE,aAAa,CAAC;AACtC,IAAI,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OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,KAAK;MACjD,EAAC,YAAY,IACX,MAAM,EAAE,QAAQ,EAChB,YAAY,EAAE,IAAI,CAAC,UAAU,EAC7B,cAAc,EAAE,IAAI,CAAC,kBAAkB,EACvC,kBAAkB,EAAE,IAAI,CAAC,SAAS,GAClC;KACH,CAAC,CACe,CACb,CACT,CACK,EAEP,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,KACnB,oBACE,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE;QACL,CAAC,GAAG,YAAY,WAAW,GAAG,IAAI;QAClC,CAAC,GAAG,YAAY,iBAAiB,GAAG,IAAI,CAAC,QAAQ;OAClD,GACD,CACH,CACG,CACc,CACjB,EACP;GACH;;;;;;;;;;;;","names":[],"sources":["./src/components/table/table.constants.ts","@worker-helper","./src/components/table/table.store.ts","./src/components/table/table.service.tsx","./src/components/table/table.children.tsx","./src/components/table/table.utils.ts","./src/components/table/table.scss?tag=nano-table","./src/components/table/table.tsx"],"sourcesContent":["export const CSSNAMESPACE = 'nano-tbl';\n","\nimport { consoleError } from '@stencil/core/internal';\n\n\nconst isInstanceOf = (value, className) => {\n const C = globalThis[className];\n return C != null && value instanceof C;\n}\nconst getTransferables = (value) => {\n if (value != null) {\n if (\n isInstanceOf(value, \"ArrayBuffer\") ||\n isInstanceOf(value, \"MessagePort\") ||\n isInstanceOf(value, \"ImageBitmap\") ||\n isInstanceOf(value, \"OffscreenCanvas\")\n ) {\n return [value];\n }\n if (typeof value === \"object\") {\n if (value.constructor === Object) {\n value = Object.values(value);\n }\n if (Array.isArray(value)) {\n return value.flatMap(getTransferables);\n }\n return getTransferables(value.buffer);\n }\n }\n return [];\n};\n\nlet pendingIds = 0;\nlet callbackIds = 0;\nconst pending = new Map();\nconst callbacks = new Map();\n\nexport const createWorker = (workerPath, workerName, workerMsgId) => {\n const worker = new Worker(workerPath, {name:workerName});\n\n worker.addEventListener('message', ({data}) => {\n if (data) {\n const workerMsg = data[0];\n const id = data[1];\n const value = data[2];\n\n if (workerMsg === workerMsgId) {\n const err = data[3];\n const [resolve, reject, callbackIds] = pending.get(id);\n pending.delete(id);\n\n if (err) {\n const errObj = (err.isError)\n ? Object.assign(new Error(err.value.message), err.value)\n : err.value;\n\n consoleError(errObj);\n reject(errObj);\n } else {\n if (callbackIds) {\n callbackIds.forEach(id => callbacks.delete(id));\n }\n resolve(value);\n }\n } else if (workerMsg === workerMsgId + '.cb') {\n try {\n callbacks.get(id)(...value);\n } catch (e) {\n consoleError(e);\n }\n }\n }\n });\n\n return worker;\n};\n\nexport const createWorkerProxy = (worker, workerMsgId, exportedMethod) => (\n (...args) => new Promise((resolve, reject) => {\n let pendingId = pendingIds++;\n let i = 0;\n let argLen = args.length;\n let mainData = [resolve, reject];\n pending.set(pendingId, mainData);\n\n for (; i < argLen; i++) {\n if (typeof args[i] === 'function') {\n const callbackId = callbackIds++;\n callbacks.set(callbackId, args[i]);\n args[i] = [workerMsgId + '.cb', callbackId];\n (mainData[2] = mainData[2] || []).push(callbackId);\n }\n }\n const postMessage = (w) => (\n w.postMessage(\n [workerMsgId, pendingId, exportedMethod, args],\n getTransferables(args)\n )\n );\n if (worker.then) {\n worker.then(postMessage);\n } else {\n postMessage(worker);\n }\n })\n);\n","import { createStore, ObservableMap } from '@stencil/store';\nimport { cyrb53 } from '../../utils/math';\nimport {\n createWorkerStore,\n syncConfigToWorker,\n syncDataToWorker,\n workerFilter,\n workerSearch,\n workerSort,\n} from './table.worker';\nimport type { TableTypes } from '../../interface';\n\nexport interface TableStores {\n data: ObservableMap<{ rows: TableTypes.NanoTable['rows'] }>;\n config: ObservableMap<{ columns: TableTypes.NanoTable['columns'] }>;\n general: ObservableMap<{\n workerId: string;\n scrollParent: HTMLElement;\n host: HTMLNanoTableElement;\n }>;\n}\n\nfunction colsToWorker(columns: TableTypes.NanoTable['columns']) {\n const safeColumns: Partial<TableTypes.ColumnConfig>[] = JSON.parse(\n JSON.stringify(columns)\n );\n columns.forEach((c) => {\n if (!!c.sortCompareFn) {\n const safeCol = safeColumns.find((sc) => sc.prop === c.prop);\n safeCol.sortCompareFn = c.sortCompareFn.toString();\n }\n });\n return safeColumns;\n}\n\nconst stores: WeakMap<HTMLElement, TableStores> = new WeakMap();\n\nexport async function generateStore(\n host: HTMLNanoTableElement,\n columns: TableTypes.NanoTable['columns'],\n scrollParent: HTMLElement\n) {\n const store: TableStores = {\n data: createStore({ rows: [] }),\n config: createStore({ columns }),\n general: createStore({ workerId: null, scrollParent, host }),\n };\n\n const id = await createWorkerStore(\n store.data.state.rows,\n colsToWorker(store.config.state.columns)\n );\n store.general.state.workerId = id;\n stores.set(host, store);\n\n // sync data from our store to our worker\n\n store.data.use({\n reset: () => {\n if (store.general.state.workerId)\n syncDataToWorker(store.general.state.workerId, null);\n },\n dispose: () => {\n if (store.general.state.workerId)\n syncDataToWorker(store.general.state.workerId, null);\n },\n });\n store.config.use({\n reset: () => {\n if (store.general.state.workerId)\n syncConfigToWorker(store.general.state.workerId, null);\n },\n dispose: () => {\n if (store.general.state.workerId)\n syncConfigToWorker(store.general.state.workerId, null);\n },\n });\n return store;\n}\n\nexport function getStore(host: HTMLElement) {\n return stores.get(host);\n}\n\nexport function storeSetData(host: HTMLElement, rows: TableTypes.RowData[]) {\n const store = stores.get(host);\n if (!store) return;\n\n // augment data with some internal props\n rows = rows.map((row, i) => ({\n ...row,\n __index: i,\n __uuid: cyrb53(Object.values(row).join()),\n }));\n\n store.data.state.rows = rows;\n\n if (store.general.state.workerId)\n return syncDataToWorker(store.general.state.workerId, rows);\n}\n\nexport function storeSetConfig(\n host: HTMLElement,\n columns: TableTypes.ColumnConfig[]\n) {\n const store = stores.get(host);\n if (!store) return;\n\n store.config.state.columns = columns;\n\n if (store.general.state.workerId)\n return syncConfigToWorker(\n store.general.state.workerId,\n colsToWorker(columns)\n );\n}\n\nexport async function storeSearch(host: HTMLElement, term: string) {\n const store = stores.get(host);\n if (!store || !store.general.state.workerId) return;\n\n try {\n store.data.state.rows = await workerSearch(\n store.general.state.workerId,\n term\n );\n } catch (e) {\n console.log(e);\n }\n}\n\nexport async function storeFilter(\n host: HTMLElement,\n filters: TableTypes.Filter[]\n) {\n const store = stores.get(host);\n if (!store || !store.general.state.workerId) return;\n\n try {\n store.data.state.rows = await workerFilter(\n store.general.state.workerId,\n filters\n );\n } catch (e) {\n console.log(e);\n }\n}\n\nexport async function storeSort(\n host: HTMLElement,\n prop: TableTypes.Prop,\n order: TableTypes.Order\n) {\n const store = stores.get(host);\n if (!store || !store.general.state.workerId) return;\n\n try {\n store.data.state.rows = await workerSort(\n store.general.state.workerId,\n prop,\n order\n );\n } catch (e) {\n console.log(e);\n }\n}\n","import { getRenderingRef, getElement, VNode, h, Fragment } from '@stencil/core';\nimport { getStore } from './table.store';\nimport type { TableTypes } from '../../interface';\n\n/**\n * Get a model object for custom cell / property renderers.\n * @param rowIndex - the current row index being rendered\n * @param colIndex - the current column index being rendered\n * @returns a model object which will be passed to custom renderers\n */\nfunction colDataModel(\n rowIndex: number,\n colIndex: number\n): TableTypes.ColumnDataSchemaModel {\n const store = fetchStores();\n const columns = store.config.state.columns;\n const rows = store.data.state.rows;\n\n const column = columns[colIndex];\n const prop: TableTypes.ColumnProp | undefined = column?.prop;\n const rowModel = rows[rowIndex];\n const cellModel = rowModel[columns[colIndex].prop];\n\n return {\n prop,\n cellModel,\n column,\n rowIndex,\n rowModel,\n };\n}\n\n/**\n * Get a model object for custom row renderers.\n * @param rowIndex\n * @returns a model object passed to custom row renderers\n */\nexport function rowDataModel(rowIndex: number): TableTypes.RowDataSchemaModel {\n const store = fetchStores();\n const rows = store.data.state.rows;\n const row = rows[rowIndex];\n\n return {\n row,\n rowIndex,\n };\n}\n\n/**\n * Merges 2 objects of properties together\n * @param current - property object\n * @param extra - additional object property\n * @returns - merged properties that can be applied to a node\n */\nexport function mergeProperties(\n current: TableTypes.EleProps,\n extra: TableTypes.EleProps\n) {\n if (!extra) return current;\n\n // top level merge\n const props: TableTypes.EleProps = { ...extra, ...current };\n\n // deeper merge\n // merge classes maps or strings\n if (extra.class) {\n if (typeof extra.class === 'object' && typeof props.class === 'object') {\n props.class = { ...extra.class, ...props.class };\n } else if (\n typeof extra.class === 'string' &&\n typeof props.class === 'object'\n ) {\n props.class[extra.class] = true;\n } else if (typeof props.class === 'string') {\n props.class += ' ' + extra.class;\n }\n }\n // merge style\n if (extra.style) {\n props.style = { ...extra.style, ...props.style };\n }\n return props;\n}\n\n/**\n * Returns the current nano-table's stores.\n * @returns the current nano-table stores\n */\nexport function fetchStores() {\n return getStore(getElement(getRenderingRef()));\n}\n\n/**\n * Merges any defined cell properties with properties\n * required by `nano-table` functionality\n * @param rowIndex - the current row index being rendered\n * @param colIndex = the current column index being rendered\n * @param defaultProps - default properties required by `nano-table`\n * @returns - the merged properties that will be applied to a node\n */\nexport function mergeCellProperties(\n rowIndex: number,\n colIndex: number,\n defaultProps: TableTypes.EleProps\n): TableTypes.EleProps {\n const props: TableTypes.EleProps = { ...defaultProps };\n const extraPropsFunc =\n fetchStores().config.state.columns[colIndex]?.cellProperties;\n if (!extraPropsFunc) return props;\n\n const data = colDataModel(rowIndex, colIndex);\n const extra = extraPropsFunc(data);\n if (!extra) return props;\n\n return mergeProperties(props, extra);\n}\n\n/**\n * Renders a cell using a custom renderer if set.\n * @param rowIndex - the current row index being rendered\n * @param colIndex - the current column index being rendered\n * @returns - a JSX node\n */\nexport function cellRender(rowIndex: number, colIndex: number): VNode {\n const store = fetchStores();\n const columns = store.config.state.columns;\n const tpl = columns[colIndex]?.cellTemplate;\n const model = colDataModel(rowIndex, colIndex);\n\n return tpl ? (\n tpl(h as unknown as TableTypes.HFunc<VNode>, model)\n ) : (\n <Fragment>{model.cellModel.toString()}</Fragment>\n );\n}\n\n/**\n * Renders a table header (within a thead) using a custom template if set.\n * @param col - the current column config object\n * @returns - a JSX node\n */\nexport function colheadFootRender(col: TableTypes.ColumnConfig): VNode {\n const tpl = col?.colTemplate;\n return tpl ? (\n tpl(h as unknown as TableTypes.HFunc<VNode>, col)\n ) : (\n <Fragment>{col.title}</Fragment>\n );\n}\n","import { Fragment, FunctionalComponent, h, VNode } from '@stencil/core';\nimport { CSSNAMESPACE } from './table.constants';\nimport {\n cellRender,\n colheadFootRender,\n fetchStores,\n mergeCellProperties,\n mergeProperties,\n rowDataModel,\n} from './table.service';\nimport type { TableTypes } from '../../interface';\n\ntype ValidRenderTypes = 'tr' | 'th' | 'td';\n\ntype PinnedCb = (positions: { [key in TableTypes.Position]?: boolean }) => void;\n\nfunction baseClasses(\n type: ValidRenderTypes,\n vPinned?: TableTypes.Position,\n toString?: false\n): { [key: string]: boolean };\nfunction baseClasses(\n type: ValidRenderTypes,\n vPinned?: TableTypes.Position,\n toString?: true\n): string;\nfunction baseClasses(\n type: ValidRenderTypes,\n vPinned?: TableTypes.Position,\n toString = false\n): { [key: string]: boolean } | string {\n const classes = {\n [`${CSSNAMESPACE}__${type}`]: true,\n [`${CSSNAMESPACE}__pin`]: !!vPinned,\n [`${CSSNAMESPACE}__pin--top`]: vPinned === 'top',\n [`${CSSNAMESPACE}__pin--bottom`]: vPinned === 'bottom',\n };\n\n if (toString) {\n let classString = '';\n Object.entries(classes).forEach(([className, on]) => {\n if (on) classString += className + ' ';\n });\n return classString;\n }\n return classes;\n}\n\nconst stickyHIOs: WeakMap<HTMLTableCellElement, IntersectionObserver> =\n new WeakMap();\nconst stickyVIOs: WeakMap<HTMLTableCellElement, IntersectionObserver> =\n new WeakMap();\n\nfunction addHObserver(\n el: HTMLTableCellElement,\n pos: TableTypes.Position,\n cb: PinnedCb\n) {\n if (stickyHIOs.get(el)) return;\n\n const store = fetchStores();\n const root = store.general.state.scrollParent;\n\n const observer = new IntersectionObserver(\n ([e]) => {\n const rootBounds =\n e.rootBounds || document.scrollingElement.getBoundingClientRect();\n const positions: { [key in TableTypes.Position]?: boolean } = {};\n if (pos === 'start') {\n positions.start =\n e.boundingClientRect.x - (rootBounds.x + root.scrollLeft) < 0 &&\n !e.isIntersecting;\n }\n if (pos === 'end') {\n // console.log('refe', store.general.state.host)\n // TODO - sort these out for RtL\n positions.end =\n e.boundingClientRect.right > e.boundingClientRect.width &&\n !e.isIntersecting;\n }\n cb(positions);\n },\n {\n threshold: [1],\n rootMargin: '1px 0px 100px 0px',\n root: root === document.scrollingElement ? null : root,\n }\n );\n stickyHIOs.set(el, observer);\n // dirty fix - wait a tick 'cos nano-size-observer isn't always ready in-time\n setTimeout(() => observer.observe(el), 300);\n}\n\nfunction addVObserver(\n el: HTMLTableCellElement,\n pos: TableTypes.Position,\n cb: PinnedCb\n) {\n if (stickyVIOs.get(el)) return;\n\n const store = fetchStores();\n const root = store.general.state.scrollParent;\n\n const observer = new IntersectionObserver(\n ([e]) => {\n const rootBounds =\n e.rootBounds || document.scrollingElement.getBoundingClientRect();\n const positions: { [key in TableTypes.Position]?: boolean } = {};\n if (pos === 'top') {\n positions.top =\n e.boundingClientRect.y - (rootBounds.y + root.scrollTop) < 0 &&\n !e.isIntersecting;\n }\n if (pos === 'bottom')\n positions.bottom =\n e.boundingClientRect.height > e.intersectionRect.height &&\n !e.isIntersecting;\n cb(positions);\n },\n {\n threshold: [1],\n rootMargin: '0px 100px 0px 100px',\n root: root === document.scrollingElement ? null : root,\n }\n );\n stickyVIOs.set(el, observer);\n requestAnimationFrame(() => observer.observe(el));\n}\n\ntype TableRowProps = {\n rowRenderer: TableTypes.RowRenderer;\n rowIndex?: number;\n row?: TableTypes.RowData;\n};\n\nexport const TableRow: FunctionalComponent<TableRowProps> = (\n { rowRenderer, rowIndex, row },\n children\n) => {\n let extraProps = {};\n\n if (!row) {\n const model = rowDataModel(rowIndex);\n row = model.row;\n }\n\n if (rowRenderer?.rowProperties) {\n extraProps =\n rowRenderer.rowProperties({ row: row, rowIndex }) || extraProps;\n }\n\n let pinned: TableTypes.Position;\n if (rowRenderer?.pinned && typeof rowRenderer.pinned === 'function') {\n pinned = rowRenderer.pinned();\n }\n\n const baseProps = { class: baseClasses('tr', pinned) };\n const props = extraProps ? mergeProperties(baseProps, extraProps) : baseProps;\n\n return (\n <tr {...props} key={row.__uuid}>\n {children}\n </tr>\n );\n};\n\ntype TableHeadFootProps = {\n rowRenderer: TableTypes.HeadFootRenderer;\n onColumnPinned?: PinnedCb;\n};\n\nexport const TableHeadFootRow: FunctionalComponent<TableHeadFootProps> = (\n { rowRenderer, onColumnPinned },\n children,\n utils\n) => {\n let extraProps = {};\n if (rowRenderer.rowProperties) {\n extraProps = rowRenderer.rowProperties() || {};\n }\n\n const pinned = rowRenderer.pinned || null;\n const baseProps = { class: baseClasses('tr', null) };\n const props = extraProps ? mergeProperties(baseProps, extraProps) : baseProps;\n const tpl = rowRenderer?.template;\n\n if (tpl) {\n let toRender = tpl(h as TableTypes.HFunc<VNode>, {\n renderedRow: <tr {...props}>{children}</tr>,\n });\n\n if (Array.isArray(toRender)) {\n toRender = utils.map(toRender, (node) => {\n if (node.vtag === 'tr') {\n node.vattrs = mergeProperties(\n { class: baseClasses('tr', null, true) },\n node.vattrs\n );\n\n if (!!node.vchildren) {\n node.vchildren = utils.map(node.vchildren, (cNode) => {\n if (['td', 'th'].includes(cNode.vtag.toString())) {\n cNode.vattrs = mergeProperties(\n {\n class: baseClasses(\n cNode.vtag.toString() as ValidRenderTypes,\n pinned,\n true\n ),\n ref: (th) => {\n addVObserver(th, pinned, onColumnPinned);\n },\n },\n cNode.vattrs\n );\n }\n return cNode;\n });\n }\n }\n return node;\n });\n }\n return toRender;\n }\n\n return <tr {...props}>{children}</tr>;\n};\n\ntype TableColHeadProps = {\n column: TableTypes.ColumnConfig;\n headRenderer: TableTypes.HeadFootRenderer;\n onColumnOrderClick?: (\n order: TableTypes.Order,\n column: TableTypes.Prop,\n el: HTMLElement\n ) => void;\n onColumnPinned?: PinnedCb;\n};\n\nexport const TableColHead: FunctionalComponent<TableColHeadProps> = ({\n column,\n headRenderer,\n onColumnOrderClick,\n onColumnPinned,\n}) => {\n function handleColumnOrderClick(e: MouseEvent & { target: HTMLElement }) {\n let order;\n switch (column.order) {\n case 'asc':\n order = 'desc';\n break;\n case 'desc':\n order = null;\n break;\n default:\n order = 'asc';\n }\n onColumnOrderClick(order, column.prop, e.target.closest('th'));\n }\n\n let extraProps = {};\n if (column.columnProperties) {\n extraProps = column.columnProperties(column) || extraProps;\n }\n\n const baseProps = {\n class: {\n ...baseClasses('th', headRenderer?.pinned),\n [`${CSSNAMESPACE}__pin--start`]: column.pinned === 'start',\n [`${CSSNAMESPACE}__pin--end`]: column.pinned === 'end',\n [`${CSSNAMESPACE}__ordered`]: !!column.order,\n [`${CSSNAMESPACE}__filtered`]: !!column.filter,\n },\n };\n let props = extraProps ? mergeProperties(baseProps, extraProps) : baseProps;\n const content = colheadFootRender(column);\n\n if (!content) return <Fragment></Fragment>;\n\n props =\n Number((props as TableTypes.EleProps).colspan) > 1\n ? { ...props, scope: 'colgroup' }\n : { ...props, scope: 'col' };\n\n if (column.sortable !== false) {\n return (\n <th\n {...props}\n aria-sort={\n column.order\n ? column.order === 'asc'\n ? 'ascending'\n : 'descending'\n : 'none'\n }\n ref={(th) => {\n if (['end', 'start'].includes(column.pinned))\n addHObserver(th, column.pinned, onColumnPinned);\n if (['top', 'bottom'].includes(headRenderer.pinned))\n addVObserver(th, headRenderer.pinned, onColumnPinned);\n }}\n >\n <button\n class={{\n [`${CSSNAMESPACE}__order-btn`]: true,\n [`${CSSNAMESPACE}__cell-content`]: true,\n }}\n onClick={handleColumnOrderClick}\n >\n {colheadFootRender(column)}\n {!!column.filter && <nano-icon name=\"light/filter\" />}\n {!!column.order &&\n (column.order === 'desc' ? (\n <nano-icon name=\"solid/long-arrow-down\" />\n ) : (\n <nano-icon name=\"solid/long-arrow-up\" />\n ))}\n <div class={`${CSSNAMESPACE}__status-icons`}>\n <nano-icon name=\"light/chevron-down\" />\n </div>\n </button>\n </th>\n );\n }\n\n return (\n <th\n {...props}\n ref={(th) => {\n if (['end', 'start'].includes(column.pinned))\n addHObserver(th, column.pinned, onColumnPinned);\n if (['top', 'bottom'].includes(headRenderer.pinned))\n addVObserver(th, headRenderer.pinned, onColumnPinned);\n }}\n >\n <div class={`${CSSNAMESPACE}__cell-content`}>\n {colheadFootRender(column)}\n {!!column.filter && <nano-icon name=\"light/bars-filter\" />}\n </div>\n </th>\n );\n};\n\ntype TableCellProps = {\n rowIndex: number;\n colIndex: number;\n nestedContent?: VNode;\n};\n\nexport const TableCell: FunctionalComponent<TableCellProps> = ({\n rowIndex,\n colIndex,\n nestedContent,\n}) => {\n const content = nestedContent || cellRender(rowIndex, colIndex);\n if (!content) return <Fragment></Fragment>;\n\n const store = fetchStores();\n const column = store.config.state.columns[colIndex];\n let CellType = 'td';\n let props = mergeCellProperties(rowIndex, colIndex, {\n class: {\n [`${CSSNAMESPACE}__td`]: true,\n [`${CSSNAMESPACE}__ordered`]: !!column.order,\n [`${CSSNAMESPACE}__pin`]: !!column.pinned,\n [`${CSSNAMESPACE}__pin--start`]: column.pinned === 'start',\n [`${CSSNAMESPACE}__pin--end`]: column.pinned === 'end',\n },\n });\n\n if (column.rowHeader) {\n props =\n Number((props as TableTypes.EleProps).rowspan) > 1\n ? { ...props, scope: 'rowgroup' }\n : { ...props, scope: 'row' };\n CellType = 'th';\n }\n\n return (\n <CellType\n // role=\"gridcell\"\n {...props}\n >\n <div class={`${CSSNAMESPACE}__cell-content`}>{content}</div>\n </CellType>\n );\n};\n","export const detectScrollSpeed = (() => {\n let lastPos: number;\n let newPos: number;\n let timer: number;\n let delta: number;\n const delay = 60; // in \"ms\" (higher means lower fidelity )\n\n const clear = () => {\n lastPos = null;\n delta = 0;\n };\n clear();\n\n return () => {\n newPos = window.scrollY;\n if (lastPos != null) delta = newPos - lastPos;\n lastPos = newPos;\n window.clearTimeout(timer);\n timer = window.setTimeout(clear, delay);\n return delta;\n };\n})();\n\nexport function findScrollParent(element: HTMLElement) {\n let style = getComputedStyle(element);\n const excludeStaticParent = style.position === 'absolute';\n const overflowRegex = /(auto|scroll)/;\n\n if (style.position === 'fixed') return document.documentElement;\n for (let parent = element; (parent = parent.parentElement); ) {\n style = getComputedStyle(parent);\n if (excludeStaticParent && style.position === 'static') {\n continue;\n }\n if (overflowRegex.test(style.overflow + style.overflowY + style.overflowX))\n return parent;\n }\n return document.documentElement;\n}\n\nexport function isInViewport(el: Element, percentVisible = 100) {\n const r = el.getBoundingClientRect();\n const windowHeight =\n window.innerHeight || document.documentElement.clientHeight;\n\n if (\n !r.bottom &&\n !r.top &&\n !r.left &&\n !r.right &&\n !r.height &&\n !r.width &&\n !r.x &&\n !r.y\n )\n return false;\n\n return !(\n Math.floor(100 - ((r.top >= 0 ? 0 : r.top) / +-r.height) * 100) <\n percentVisible ||\n Math.floor(100 - ((r.bottom - windowHeight) / r.height) * 100) <\n percentVisible\n );\n}\n","@use '../../global/style/utilities/globals' as t;\n\nnano-table {\n /**\n * @prop --max-col-width: Default 200px;\n\n * @prop --color: Deafults to var(--nano-color-mediumgrey, #68767e);\n * @prop --font-size: Deafults to 0.87rem;\n * @prop --cell-line-height: Deafults to 1.5;\n\n * @prop --border-color: Deafults to var(--nano-color-palegrey, #b5aea7);\n * @prop --border-style: Deafults to thin solid var(--border-color);\n * @prop --border-tint-color: Deafults to var(--nano-color-blue, #90c6e7);\n * @prop --border-tint-style: Deafults to 2px solid var(--border-tint-color);\n\n * @prop --cell-bg-rgb: Deafults to var(--nano-color-white-rgb, 255 255 255);\n * @prop --head-bg-rgb: Deafults to var(--cell-bg-rgb);\n * @prop --foot-bg-rgb: Deafults to var(--cell-bg-rgb);\n * @prop --th-row-bg-rgb: Deafults to var(--cell-bg-rgb);\n * @prop --ordered-bg-rgb: Deafults to var(--nano-color-offwhite-rgb, 249 249 251);\n\n * @prop --td-padding-start: Deafults to 0.625rem;\n * @prop --td-padding-end: Deafults to 0.625rem;\n * @prop --td-padding-top: Deafults to 0.5rem;\n * @prop --td-padding-bottom: Deafults to 0.4125rem;\n\n * @prop --th-padding-start: Deafults to 0.625rem;\n * @prop --th-padding-end: Deafults to 0.625rem;\n * @prop --th-padding-top: Deafults to 0.875rem;\n * @prop --th-padding-bottom: Deafults to 0.6875rem;\n\n * @prop --td-padding-v: Deafults to var(--td-padding-top) var(--td-padding-bottom);\n * @prop --td-padding-h: Deafults to var(--td-padding-start) var(--td-padding-end);\n\n * @prop --th-padding-v: Deafults to var(--th-padding-top) var(--th-padding-bottom);\n * @prop --th-padding-h: Deafults to var(--th-padding-start) var(--th-padding-end);\n\n * @prop --foot-th-padding-v: Deafults to var(--td-padding-top) var(--td-padding-bottom);\n * @prop --foot-th-padding-h: Deafults to var(--td-padding-start) var(--td-padding-end);\n\n * @prop --head-th-padding-v: Deafults to var(--th-padding-top) var(--th-padding-bottom);\n * @prop --head-th-padding-h: Deafults to var(--th-padding-start) var(--th-padding-end);\n\n * @prop --bookend-col-padding: Deafults to 2rem;\n */\n\n display: block;\n width: 100%;\n\n // general\n --max-col-width: 200px;\n\n // text\n --color: var(--nano-color-mediumgrey, #68767e);\n --font-size: 0.87rem;\n --cell-line-height: 1.5;\n --thead-font-size: 0.95rem;\n\n // borders\n --border-color: #dddbda;\n --border-style: thin solid var(--border-color);\n --border-tint-color: #0084a9;\n --border-tint-style: 3px solid var(--border-tint-color);\n\n // backgrounds\n --cell-bg-rgb: var(--nano-color-white-rgb, 255 255 255);\n --head-bg-rgb: 250, 250, 249;\n --foot-bg-rgb: var(--head-bg-rgb);\n --th-row-bg-rgb: var(--cell-bg-rgb);\n --ordered-bg-rgb: var(--nano-color-offwhite-rgb, 249 249 251);\n\n // spacing\n --td-padding-start: 0.625rem;\n --td-padding-end: 0.625rem;\n --td-padding-top: 0.5rem;\n --td-padding-bottom: 0.4125rem;\n --th-padding-start: 0.625rem;\n --th-padding-end: 0.625rem;\n --th-padding-top: 0.875rem;\n --th-padding-bottom: 0.6875rem;\n --td-padding-v: var(--td-padding-top) var(--td-padding-bottom);\n --td-padding-h: var(--td-padding-start) var(--td-padding-end);\n --th-padding-v: var(--th-padding-top) var(--th-padding-bottom);\n --th-padding-h: var(--th-padding-start) var(--th-padding-end);\n --foot-th-padding-v: var(--th-padding-top) var(--th-padding-bottom);\n --foot-th-padding-h: var(--th-padding-start) var(--th-padding-end);\n --head-th-padding-v: var(--th-padding-top) var(--th-padding-bottom);\n --head-th-padding-h: var(--th-padding-start) var(--th-padding-end);\n --bookend-col-padding: 2rem;\n}\n\n.nano-tbl {\n $base: &;\n\n color: var(--color);\n text-align: start;\n width: 100%;\n font-size: var(--font-size);\n border-spacing: 0 0;\n border-collapse: separate;\n background: rgb(var(--cell-bg-rgb));\n border-inline-end: 1px solid transparent;\n border-block-start: 1px solid transparent;\n position: relative;\n z-index: 1;\n\n &__wrap {\n display: table;\n min-width: 100%;\n }\n\n &__top-anchor {\n @include t.visually-hide;\n\n position: relative;\n }\n\n &__ordered {\n background-color: var(--ordered-bg);\n border-inline-start: var(--border-style);\n border-inline-end: var(--border-style);\n }\n\n &__order-btn {\n padding: 0;\n border: none;\n outline: none;\n font: inherit;\n background: none;\n appearance: none;\n color: inherit;\n display: flex;\n gap: 10px;\n align-items: center;\n width: 100%;\n }\n\n &__status-icons {\n margin-inline: auto 10px;\n display: flex;\n gap: 10px;\n }\n\n &__progress-bar {\n font-size: 0.2rem;\n position: sticky;\n inset-block-start: 0;\n inset-inline: 0;\n z-index: 10;\n transition: scale 0.25s;\n scale: 0;\n width: 100%;\n height: 0;\n\n &--show {\n scale: 1;\n height: auto;\n }\n }\n\n &__caption {\n &--hide {\n @include t.visually-hide;\n }\n }\n\n &__td,\n &__th {\n line-height: var(--cell-line-height);\n text-align: start;\n border-block-start: var(--border-style);\n max-width: var(--max-col-width);\n background-color: rgb(var(--cell-bg-rgb));\n\n tbody:first-of-type tr:first-child & {\n border-block-start: none;\n }\n\n tbody:last-of-type tr:last-child & {\n border-block-end: var(--border-style);\n }\n\n .md & {\n &:first-child #{$base}__cell-content {\n padding-inline-start: var(--bookend-col-padding);\n }\n\n &:last-child #{$base}__cell-content {\n padding-inline-end: var(--bookend-col-padding);\n }\n }\n\n @include t.media-breakpoint-down('md') {\n &:first-child #{$base}__cell-content {\n padding-inline-start: var(--td-padding-start) !important;\n }\n\n &:last-child #{$base}__cell-content {\n padding-inline-end: var(--td-padding-end) !important;\n }\n }\n\n thead & {\n font-weight: 800;\n background: rgba(var(--head-bg-rgb), 90%);\n font-size: var(--thead-font-size);\n border-block-start: none;\n\n #{$base}__cell-content {\n padding-block: var(--head-th-padding-v);\n padding-inline: var(--head-th-padding-h);\n }\n }\n\n tfoot & {\n font-weight: 800;\n border-block-end: none;\n background: rgba(var(--foot-bg-rgb), 90%);\n font-size: var(--thead-font-size);\n\n #{$base}__cell-content {\n padding-block: var(--foot-th-padding-v);\n padding-inline: var(--foot-th-padding-h);\n }\n }\n\n &.nano-tbl__ordered {\n background-color: rgba(var(--ordered-bg-rgb), 0.8) !important;\n }\n }\n\n &__cell-content {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding-block: var(--td-padding-v);\n padding-inline: var(--td-padding-h);\n }\n\n tbody {\n will-change: scroll-position;\n visibility: visible;\n\n &.nano-tbl__inactive {\n visibility: hidden;\n }\n }\n\n th[scope='row'] {\n font-weight: 800;\n margin: 0;\n }\n\n .sm & th[scope='row'] {\n max-width: 65vw !important;\n }\n\n &__pin {\n position: sticky;\n z-index: 1;\n\n &--start {\n inset-inline: -1px auto;\n transition: max-width 0.25s;\n\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n box-shadow: 5px 1px 4px 0 rgb(0 0 0 / 20%);\n opacity: 0;\n z-index: -1;\n }\n\n #{$base}__pinned--start & {\n z-index: 2;\n max-width: 125px;\n\n .sm & {\n max-width: var(--max-col-width);\n }\n\n &::after {\n opacity: 1;\n }\n }\n }\n\n &--end {\n /*\n I cannot think of a nice way to make stuck-end columns play nice on small screens :(\n Changing the width when stuck (as we do for stuck-start columns) causes the whole positioning to change.\n This fires the IO, thus un-sticks the column, thus causes the IO to fire which sticks the column ∞\n */\n #{$base}__pin--start + & {\n inset-inline: auto auto;\n\n &::after {\n display: none;\n }\n }\n\n .sm & {\n inset-inline: auto -1px !important;\n max-width: min(50vw, 200px);\n\n &::after {\n display: block !important;\n content: '';\n position: absolute;\n inset: 0;\n box-shadow: -5px 1px 4px 0 rgb(0 0 0 / 20%);\n opacity: 0;\n z-index: -1;\n }\n }\n\n #{$base}__pinned--end & {\n .sm & {\n z-index: 3;\n\n &::after {\n opacity: 1;\n }\n }\n }\n }\n\n &--top {\n inset-block: -1px auto;\n\n #{$base}__pinned--top & {\n z-index: 4;\n }\n }\n\n &--bottom {\n inset-block: auto -1px;\n\n #{$base}__pinned--bottom & {\n z-index: 5;\n border-block-start: var(--border-tint-style) !important;\n }\n }\n\n &--top#{&}--start {\n #{$base}__pinned--top#{$base}__pinned--start & {\n z-index: 6;\n }\n }\n\n &--top#{&}--end {\n #{$base}__pinned--top#{$base}__pinned--end & {\n z-index: 6;\n }\n }\n\n &--bottom#{&}--start {\n #{$base}__pinned--bottom#{$base}__pinned--start & {\n z-index: 6;\n }\n }\n\n &--bottom#{&}--end {\n #{$base}__pinned--bottom#{$base}__pinned--end & {\n z-index: 6;\n }\n }\n }\n\n thead tr:last-of-type td,\n thead tr:last-of-type th {\n border-block-end: var(--border-tint-style);\n }\n\n tfoot tr:first-of-type td,\n tfoot tr:first-of-type th {\n border-block-start: none;\n }\n\n .unlimited-width {\n max-width: none;\n }\n\n &__spinner {\n font-size: 1.5rem;\n transition: scale 0.25s;\n scale: 0;\n padding: 0.5rem;\n position: absolute;\n inset-block-end: 0;\n inset-inline-start: calc(50% - 0.75rem);\n z-index: 0;\n\n &--show {\n scale: 1;\n position: sticky;\n }\n }\n\n nano-skeleton {\n line-height: var(--cell-line-height);\n }\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Host,\n Watch,\n State,\n readTask,\n Event,\n EventEmitter,\n Method,\n Build,\n Listen,\n} from '@stencil/core';\nimport { cyrb53 } from '../../utils/math';\nimport { debounce } from '../../utils/throttle';\nimport {\n TableColHead,\n TableRow,\n TableCell,\n TableHeadFootRow,\n} from './table.children';\nimport { CSSNAMESPACE } from './table.constants';\nimport {\n generateStore,\n storeSearch,\n storeSetConfig,\n storeSetData,\n storeSort,\n storeFilter,\n TableStores,\n} from './table.store';\nimport {\n detectScrollSpeed,\n findScrollParent,\n isInViewport,\n} from './table.utils';\nimport type { TableTypes } from '../../interface';\n\nfunction perMark(name: string, end: boolean = false) {\n if (!Build.isDev) return;\n if (end) {\n performance?.mark('end' + name);\n performance?.measure(name, 'start' + name, 'end' + name);\n const entries = performance?.getEntriesByName(name);\n console.log(entries[entries.length ? entries.length - 1 : 0]);\n } else {\n performance?.mark('start' + name);\n }\n}\n\nlet id = 0;\n/**\n * A performant, accessible and semantic (uses real html `<table />`, `<tr />` etc) table and data-grid solution.\n *\n *- Built-in search\n *- Built-in column filter\n *- Built-in column sort\n *- Easily swap in API / async based search / filter & sort\n *- Pin headers, footers, rows, columns\n *- Add custom rendering at every level\n *- Add custom properties at every level\n *\n * @slot caption - The table's caption. You must either use this or the `caption` attribute.\n */\n@Component({\n tag: 'nano-table',\n styleUrl: 'table.scss',\n})\nexport class Table implements ComponentInterface {\n constructor() {\n this.debounceSetLoading = debounce(this.debounceSetLoading.bind(this), 50);\n }\n // Public API\n\n // Props\n\n /** The type of table. Grid type will make cells navigable by keyboard */\n @Prop() type: 'grid' | 'table' = 'table';\n\n /** A descriptive title of the table.\n * You must use this or the `slot=\"caption\"` for accessibility */\n @Prop() caption: string;\n\n /** Show the caption on-screen */\n @Prop() showCaption: boolean = false;\n\n /** Will show a loading state when true.\n * Will be shown automatically if `rows` is a promise waiting to resolve\n * or when performing custom filtering or sorting */\n @Prop()\n get loading() {\n return this._loading;\n }\n set loading(l: boolean) {\n this.debounceSetLoading(l);\n }\n @State() _loading: boolean = false;\n private debounceSetLoading = (l: boolean) => {\n this._loading = !!this.store.data.state.rows.length ? l : true;\n };\n\n /** When loading rows asynchronously, this will render this number of placeholder rows */\n @Prop() placeholderSize = 5;\n\n /** The data to place in the table */\n @Prop() rows:\n | TableTypes.NanoTable['rows']\n | Promise<TableTypes.NanoTable['rows']>;\n\n @Watch('rows')\n handleRowsChange() {\n if (!this.rows) {\n this.loading = true;\n return;\n }\n\n this.loading = true;\n Promise.resolve(this.rows).then(async (rows) => {\n await storeSetData(this.host, rows);\n\n // reset everything\n this.currentFilters = '';\n this.currentSort = '';\n await this.columnInit();\n\n if (!this.isReady) {\n this.setInitialBlockDimension();\n }\n this.loading = false;\n });\n }\n\n /** The column config used to generate present the rows of data */\n @Prop({ mutable: true }) columns: TableTypes.NanoTable['columns'] = [];\n\n @Watch('columns')\n async handleColsChange() {\n await storeSetConfig(this.host, this.columns);\n if (this.isReady) this.columnInit();\n }\n\n /** Used for custom thead row rendering */\n @Prop() headRender: TableTypes.HeadFootRenderer = { pinned: 'top' };\n\n /** Used for custom row rendering */\n @Prop() rowRender: TableTypes.RowRenderer;\n\n /** Used for custom tfoot row rendering */\n @Prop() footRender: TableTypes.HeadFootRenderer = { pinned: 'bottom' };\n\n /** Whether to show a `<tfoot>` component */\n @Prop() showFooter = false;\n\n /** To improve performance, data is split into blocks\n * which are shown / hidden and rendered as they become visible.\n * Use this to control the number of hits within a block -\n * A block should fill a scrolling viewport.\n * The less perBlock the better for performance */\n @Prop() perBlock = 60;\n\n /** The number of total blocks currently rendered in the table. @readonly */\n @Prop()\n get blocksLength() {\n return this.blocks.length;\n }\n\n /** Term to search for in the data */\n @Prop() searchTerm: string;\n\n /** A custom filtering function. Should return a promise.\n * On successful completion the column UI will be updated.\n * A good use-case would be performing the filter on a server / via fetch.\n * Then on success, updating the table's data via the `rows` property */\n @Prop() customFilterFn?: (filters: TableTypes.Filter[]) => Promise<void>;\n\n /** A custom sorting function. Should return a promise.\n * On successful completion the column UI will be updated.\n * A good use-case would be performing the sort on a server / via fetch.\n * Then on success, updating the table's data via the `rows` property */\n @Prop() customSortFn?: (\n property: TableTypes.Prop,\n order: TableTypes.Order\n ) => Promise<void>;\n\n @Watch('searchTerm')\n handleSearchTermChange() {\n this.searchStart();\n }\n\n /** Fired whenever a block is activated by scrolling into view / becoming visible\n * This could be leveraged for infinite scrolling / to fetch more data.\n */\n @Event() nanoTblBlockRendered: EventEmitter<{\n block: number;\n totalBlocks: number;\n }>;\n\n /** Fired when the table has done it's first complete render */\n @Event() nanoTblReady: EventEmitter;\n\n /** Fired before a column is sorted.\n * `event.preventDefault()` to stop sorting. */\n @Event() nanoTblBeforeSort: EventEmitter<{\n column: TableTypes.Prop;\n order: TableTypes.Order;\n }>;\n\n /** Fired after a column is sorted */\n @Event() nanoTblAfterSort: EventEmitter<{\n column: TableTypes.Prop;\n order: TableTypes.Order;\n }>;\n\n /** Fired before a column is filtered.\n * `event.preventDefault()` to stop filtering. */\n @Event() nanoTblBeforeFilter: EventEmitter<{ filters: TableTypes.Filter[] }>;\n\n /** Fired after a column is sorted */\n @Event() nanoTblAfterFilter: EventEmitter<{ filters: TableTypes.Filter[] }>;\n\n /** Fired before a general search.\n * `event.preventDefault()` to stop searching. */\n @Event() nanoTblBeforeSearch: EventEmitter<{ term: string }>;\n\n /** Fired after a general / cross column search */\n @Event() nanoTblAfterSearch: EventEmitter<{ term: string }>;\n\n /** Remove any column sorts currently applied\n * @returns a promise which resolves when complete */\n @Method()\n async resetSorting() {\n const col = this.columns.find((c) => !!c.order);\n if (!col) return;\n return this.sortStart(null, col.prop);\n }\n\n /** Apply a sort on a column\n * @returns a promise which resolves when complete */\n @Method()\n async addSort(column: TableTypes.Prop, order: TableTypes.Order) {\n const col = this.columns.find((c) => c.prop === column);\n if (!col) throw 'Cannot find column with ' + column;\n return this.sortStart(order, col.prop);\n }\n\n /** Remove any column filters currently applied\n * @returns a promise which resolves when complete */\n @Method()\n async resetFilters() {\n this.filters = [];\n return this.filterStart();\n }\n\n /** Apply a filter on a column\n * @param filters - the filters to apply\n * @param additive - if true, will add the filters to any currently applied\n * @returns a promise which resolves when complete\n */\n @Method()\n async addFilters(filters: TableTypes.Filter[], additive: boolean = true) {\n if (!additive) this.filters = [];\n return this.filterStart(filters, additive);\n }\n\n // Private Logic\n\n // State\n\n @Element() host: HTMLNanoTableElement;\n private renderId = 'tbl-' + id++;\n private store: TableStores;\n private filters: TableTypes.Filter[] = [];\n private currentFilters = '';\n private currentSort = '';\n private tableEle: HTMLTableElement;\n private topAnchorEle: HTMLElement;\n\n // Blocks\n\n /** `tr` elements split into units - defined by `perPage`\n These are show / hidden for perf */\n @State() blocks: TableTypes.TBody[] = [];\n @State() activeBlocks: number[] = [0, 1, 2];\n @State() measureHeight = 0;\n\n private blockElements: HTMLTableSectionElement[];\n private blockIos: WeakMap<HTMLTableSectionElement, IntersectionObserver> =\n new WeakMap();\n private blockHeights: { blockIndex: number; height: number }[] = [];\n // uses the first 'tr' of an active block as our yard stick\n private set measureEle(el: HTMLTableSectionElement) {\n if (!el) return;\n this.measureHeight = el.getBoundingClientRect().height;\n this.unitHeight =\n el.querySelector('tr')?.getBoundingClientRect().height || this.unitHeight;\n }\n private unitHeight = 0;\n\n // Scroll / IO used for hiding / showing blocks\n\n private ignoreIO = true;\n private scrollParent: HTMLElement;\n private scrollSpeed: number;\n\n // Misc.\n\n private get isReady() {\n return this._isReady;\n }\n private set isReady(ready: boolean) {\n if (ready === this._isReady) return;\n this._isReady = ready;\n if (this.isReady) requestAnimationFrame(() => this.handleReady());\n }\n private _isReady = false;\n\n // Listeners\n\n @Listen('scroll', { target: 'window' })\n scrollListener() {\n // see explanation in `setupBlockIO`\n const speed = detectScrollSpeed();\n this.scrollSpeed = speed < 0 ? speed * -1 : speed;\n }\n\n // Logic\n\n private handleReady() {\n const hash = window.location.hash;\n if (hash.length > 1) {\n const idRow = document.querySelector(hash);\n if (idRow) {\n idRow.scrollIntoView();\n }\n }\n this.nanoTblReady.emit();\n }\n\n /**\n * Start a sort - can be cancelled by `preventDefault`\n * @param order - column order\n * @param column - column config object\n * @returns A promise\n */\n private sortStart = async (\n order: TableTypes.Order,\n column: TableTypes.Prop,\n element?: HTMLElement\n ) => {\n // did order change?\n if (this.currentSort === order + ':' + column) return;\n\n this.loading = true;\n const sortEvent = this.nanoTblBeforeSort.emit({ column: column, order });\n if (sortEvent.defaultPrevented) return;\n perMark('sort');\n this.currentSort = order + ':' + column;\n\n // doesn't make sense to leave user in place for a sort\n this.scrollToTop(element);\n\n if (this.customSortFn) {\n try {\n await this.customSortFn(column, order);\n this.sortComplete(order, column);\n } catch (e) {\n console.warn('custom sort failed', e);\n }\n return;\n }\n\n try {\n await storeSort(this.host, column, order);\n this.sortComplete(order, column);\n } catch (e) {\n console.warn('sort failed', e);\n this.currentSort = '';\n } finally {\n this.loading = false;\n }\n };\n\n /**\n * Complete a sort. Reflects the order to ui.\n * @param order - column order\n * @param column - column config object\n */\n private sortComplete(order: TableTypes.Order, column: TableTypes.Prop) {\n this.columns = this.columns.map((c) => {\n if (c.prop === column) return { ...c, order };\n return { ...c, order: null };\n });\n this.nanoTblAfterSort.emit({ column: column, order });\n perMark('sort', true);\n }\n\n private async searchStart() {\n this.loading = true;\n const sortEvent = this.nanoTblBeforeSearch.emit({ term: this.searchTerm });\n if (sortEvent.defaultPrevented) return;\n perMark('search');\n\n // doesn't make sense to leave user in place for a search\n this.scrollToTop();\n\n try {\n await storeSearch(this.host, this.searchTerm);\n this.nanoTblAfterSearch.emit({ term: this.searchTerm });\n perMark('search', true);\n } catch (e) {\n console.warn('search failed', e);\n } finally {\n this.loading = false;\n }\n }\n\n private async filterStart(\n filters?: TableTypes.Filter[],\n additive: boolean = true\n ) {\n if (filters) {\n if (additive) {\n this.filters = [\n ...this.filters.filter(\n (f) => !filters.find((ff) => ff.prop === f.prop)\n ),\n ...filters,\n ];\n } else {\n this.filters = filters;\n }\n }\n\n if (this.currentFilters === JSON.stringify(this.filters)) return;\n\n this.loading = true;\n const sortEvent = this.nanoTblBeforeFilter.emit({ filters: this.filters });\n if (sortEvent.defaultPrevented) return;\n perMark('filter');\n this.currentFilters = JSON.stringify(this.filters);\n\n // doesn't make sense to leave user in place for a search\n this.scrollToTop();\n\n if (this.customFilterFn) {\n try {\n await this.customFilterFn(this.filters);\n this.filterComplete();\n } catch (e) {\n console.warn('custom filter failed', e);\n this.currentFilters = '';\n }\n return;\n }\n\n try {\n await storeFilter(this.host, this.filters);\n this.filterComplete();\n perMark('search', true);\n } catch (e) {\n console.warn('filter failed', e);\n } finally {\n this.loading = false;\n }\n }\n\n private filterComplete() {\n this.columns = this.columns.map((c) => {\n const cFilter = this.filters.find((f) => f.prop === c.prop);\n if (cFilter) c.filter = cFilter.filter;\n return c;\n });\n this.nanoTblAfterFilter.emit({ filters: this.filters });\n perMark('filter', true);\n }\n\n /** Scrolls to the top immediately - used whilst sorting / filtering */\n private scrollToTop(element?: HTMLElement) {\n const scrollBehaviour = this.scrollParent.style?.scrollBehavior;\n const scrollX = this.scrollParent.scrollLeft;\n this.scrollParent.style.scrollBehavior = 'auto';\n\n if (this.topAnchorEle && !isInViewport(this.topAnchorEle, 0.1)) {\n this.host.scrollIntoView();\n }\n if (element && !isInViewport(element, 1))\n setTimeout(() => element.scrollIntoView({ block: 'start' }), 500);\n\n if (scrollX) this.scrollParent.scrollLeft = scrollX;\n\n if (scrollBehaviour)\n this.scrollParent.style.scrollBehavior = scrollBehaviour;\n }\n\n private setMeasureElement() {\n readTask(() => {\n this.measureEle = this.blockElements.find(\n (b) => !b?.classList?.contains(`${CSSNAMESPACE}__inactive`)\n );\n });\n }\n\n /**\n * Sets the initial height on tbody elements that are not active\n * These elements have no natural height - on account of all their rows being hidden\n * So we just estimate for now\n */\n private setInitialBlockDimension() {\n if (!this.blockElements?.length) return;\n perMark('blockDims');\n\n const finishResizing: Promise<void> = new Promise((resolve) => {\n readTask(() => {\n this.setMeasureElement();\n\n // find the first active block\n if (!this.measureEle && !this.unitHeight) resolve();\n\n this.blockElements.forEach((el, i) => {\n if (!el || !el.classList?.contains(`${CSSNAMESPACE}__inactive`)) {\n if (i === this.blockElements.length - 1) resolve();\n return;\n }\n if (i === this.blockElements.length - 1) resolve();\n });\n });\n });\n\n // we're all finished.\n finishResizing.then(() => {\n perMark('blockDims', true);\n perMark('init', true);\n\n requestAnimationFrame(() => {\n this.isReady = true;\n });\n });\n }\n\n /** Apply initial columns settings */\n private async columnInit() {\n this.filters = this.columns\n .filter((c) => !!c.filter)\n .map((c) => {\n const { filter, prop } = c;\n return { filter, prop };\n });\n\n if (this.searchTerm) {\n await this.searchStart();\n }\n\n if (this.filters.length) {\n await this.filterStart();\n }\n // apply sort\n const col = this.columns.find((c) => !!c.order);\n if (!!col) {\n await this.sortStart(col.order, col.prop);\n }\n }\n\n /** Split up all incoming rows into 'blocks' split amongst tbody elements.\n * These can then be hidden / shown to improve performance.\n */\n private setBlocks() {\n perMark('setBlocks');\n this.activeBlocks = [0, 1, 2];\n this.ignoreIO = true;\n let i = 1;\n const l = this.store.data.state.rows.length;\n let rows: TableTypes.RowData[] = [];\n const blocks: TableTypes.TBody[] = [];\n this.blockHeights = [];\n\n // old skool loop for perf\n for (i; i <= l; i++) {\n rows.push(this.store.data.state.rows[i - 1]);\n\n if (i % this.perBlock === 0) {\n blocks.push({ rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join()) });\n rows = [];\n }\n }\n if (rows.length)\n blocks.push({ rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join()) });\n this.blocks = blocks;\n perMark('setBlocks', true);\n }\n\n /**\n * Returns a block render height.\n * If it's currently active - let auto do it's thing\n * If we've rendered it before - return that\n * If all else fails, let's guess it\n * @param blockIndex\n * @returns a height string (incl px)\n */\n private getBlockHeight(blockIndex: number): string {\n if (this.activeBlocks.includes(blockIndex)) return undefined;\n\n if (this.blockHeights.length) {\n const cachedBlockHeight = this.blockHeights.find(\n (bh) => bh.blockIndex === blockIndex\n );\n if (cachedBlockHeight) return cachedBlockHeight.height + 'px';\n }\n const blockLength = this.blocks[blockIndex].rows.length;\n if (blockLength === this.perBlock && this.measureHeight) {\n return this.measureHeight + 'px';\n }\n return this.unitHeight ? this.unitHeight * blockLength + 'px' : undefined;\n }\n\n /** cache the height for all active blocks for later renders */\n private setBlockHeight() {\n readTask(() => {\n this.activeBlocks.forEach((blockIndex) => {\n const el = this.blockElements[blockIndex];\n if (!el) return;\n\n const height = el.getBoundingClientRect().height;\n // cache height to our block heights array\n // for subsequent renders\n const fBhI = this.blockHeights.findIndex(\n (bh) => bh.blockIndex === blockIndex\n );\n if (fBhI > 0) {\n this.blockHeights[fBhI] = { height, blockIndex };\n } else this.blockHeights.push({ height, blockIndex });\n });\n });\n }\n\n /**\n * Attaches an intersection observer to each rendered tbody element\n * shows / hides intersecting blocks' and sets heights for when they're hidden\n * @param el - the tbody element to observe\n * @param blockIndex - the rendering tbody we're attaching the IO to\n */\n private setupBlockIO = (el: HTMLTableSectionElement, blockIndex: number) => {\n if (!el || this.blockIos.has(el)) return;\n\n const blockIo = new IntersectionObserver(\n ([ioEntry]) => {\n if (this.ignoreIO) return;\n\n if (ioEntry.isIntersecting) {\n // This is a bit gross\n // The Intersection Observer (IO) fires in an incorrect order when the scrolling is very fast\n // i.e. we go past blocks 3, 2, 1 and land on 0, but 3 can fire as 'intersecting' after 0.\n // To fix that, we check - for realsies - if the block IS visible.\n // BUT that test is not as sensitive to a block being visible via the IO,\n // so doesn't always fire if scrolling slowly\n // *sigh*\n readTask(() => {\n if (this.scrollSpeed < 100 || isInViewport(el, 0.01)) {\n this.activeBlocks = [\n blockIndex,\n blockIndex + 1,\n Math.max(0, blockIndex - 1),\n ];\n this.nanoTblBlockRendered.emit({\n block: blockIndex,\n totalBlocks: this.blockElements.length,\n });\n requestAnimationFrame(() => this.setBlockHeight());\n }\n });\n }\n },\n {\n threshold: [0],\n root:\n this.scrollParent === document.scrollingElement\n ? null\n : this.scrollParent,\n }\n );\n\n blockIo.observe(el);\n this.blockIos.set(el, blockIo);\n };\n\n /** Process slotted content */\n private processSlots() {\n // see if we have slot content\n if (!this.caption && !this.host.querySelector('[slot=\"caption\"]')) {\n console.error(\n 'For accessibility you must set a `title` prop or use the `caption` slot'\n );\n }\n }\n\n private handleColumnPinned = (positions: {\n [key in TableTypes.Position]: boolean;\n }) => {\n Object.entries(positions).forEach(([key, applied]) => {\n this.tableEle.classList.toggle(\n `${CSSNAMESPACE}__pinned--${key}`,\n applied\n );\n });\n };\n\n // Component lifecycle\n\n async componentWillLoad() {\n perMark('init');\n this.store = await generateStore(\n this.host,\n this.columns,\n this.scrollParent\n );\n await this.handleRowsChange();\n this.processSlots();\n this.setBlocks();\n this.store.data.onChange('rows', () => this.setBlocks());\n }\n\n connectedCallback(): void {\n readTask(() => (this.scrollParent = findScrollParent(this.host)));\n }\n\n componentDidLoad(): void {\n this.setInitialBlockDimension();\n }\n\n componentShouldUpdate(_newVal, _oldVal, stateName: keyof Table) {\n // stop double rendering - we use the store for rendering internally\n // the public facing props are kept in-sync with the store\n // but we don't want it to cause renders\n if (['rows', 'columns'].includes(stateName)) return false;\n }\n\n componentWillRender(): void | Promise<void> {\n perMark('render');\n }\n\n componentDidRender(): void {\n requestAnimationFrame(() => (this.ignoreIO = false));\n this.setMeasureElement();\n perMark('render', true);\n }\n\n render() {\n this.blockElements = [];\n\n return (\n <Host>\n <div\n class={`${CSSNAMESPACE}__top-anchor`}\n ref={(a) => (this.topAnchorEle = a)}\n >\n &nbsp;\n </div>\n <nano-resize-observe\n aria-labelledby={'table-caption-' + this.renderId}\n tabindex={this.type === 'grid' ? '0' : undefined}\n states=\"576w sm, 768w md\"\n class=\"sm md\"\n >\n <div class={`${CSSNAMESPACE}__wrap`}>\n <nano-progress-bar\n indeterminate\n class={{\n [`${CSSNAMESPACE}__progress-bar`]: true,\n [`${CSSNAMESPACE}__progress-bar--show`]: this._loading,\n }}\n />\n <table\n role={this.type === 'grid' ? 'grid' : undefined}\n aria-readonly={this.type === 'table' ? 'true' : undefined}\n aria-rowcount={this.store.data.state.rows.length}\n aria-colcount={this.store.config.state.columns.length}\n class={`${CSSNAMESPACE}`}\n ref={(tbl) => (this.tableEle = tbl)}\n >\n <caption\n class={{\n [`${CSSNAMESPACE}__caption`]: true,\n [`${CSSNAMESPACE}__caption--hide`]: !this.showCaption,\n }}\n id={'table-caption-' + this.renderId}\n >\n <slot name=\"caption\">{this.caption}</slot>\n </caption>\n\n {/* Header */}\n <thead>\n <TableHeadFootRow\n rowRenderer={this.headRender}\n onColumnPinned={this.handleColumnPinned}\n >\n {this.store.config.state.columns.map((colModel) => [\n <TableColHead\n column={colModel}\n headRenderer={this.headRender}\n onColumnOrderClick={this.sortStart}\n onColumnPinned={this.handleColumnPinned}\n />,\n ])}\n </TableHeadFootRow>\n </thead>\n\n {this._loading && !this.blocks.length && (\n <tbody class={`${CSSNAMESPACE}__active`}>\n {[...Array(10).keys()].map((rowIndex) => (\n <tr>\n {this.store.config.state.columns.map(\n (_colModel, colIndex) => (\n <TableCell\n rowIndex={rowIndex}\n colIndex={colIndex}\n nestedContent={<nano-skeleton />}\n />\n )\n )}\n </tr>\n ))}\n </tbody>\n )}\n\n {/* Body */}\n {this.blocks.map((block, blockIndex) => (\n <tbody\n key={block.__uuid}\n id={`tbody-${this.renderId}-${blockIndex}`}\n ref={(tb) => {\n this.blockElements.push(tb);\n this.setupBlockIO(tb, blockIndex);\n }}\n class={{\n [`${CSSNAMESPACE}__inactive`]:\n !this.activeBlocks.includes(blockIndex),\n [`${CSSNAMESPACE}__active`]:\n this.activeBlocks.includes(blockIndex),\n }}\n >\n {this.activeBlocks.includes(blockIndex) ? (\n block.rows.map((row, i) => {\n const rowIndex =\n blockIndex > 0 ? blockIndex * this.perBlock + i : i;\n return (\n <TableRow rowRenderer={this.rowRender} row={row}>\n {this.store.config.state.columns.map(\n (_colModel, colIndex) => (\n <TableCell\n rowIndex={rowIndex}\n colIndex={colIndex}\n />\n )\n )}\n </TableRow>\n );\n })\n ) : (\n <td\n colSpan={this.store.config.state.columns.length}\n style={{\n height: this.getBlockHeight(blockIndex),\n }}\n />\n )}\n </tbody>\n ))}\n\n {/* Footer */}\n {this.showFooter && (\n <tfoot>\n <TableHeadFootRow\n rowRenderer={this.footRender}\n onColumnPinned={this.handleColumnPinned}\n >\n {this.store.config.state.columns.map((colModel) => [\n <TableColHead\n column={colModel}\n headRenderer={this.footRender}\n onColumnPinned={this.handleColumnPinned}\n onColumnOrderClick={this.sortStart}\n />,\n ])}\n </TableHeadFootRow>\n </tfoot>\n )}\n </table>\n\n {!!this.blocks.length && (\n <nano-spinner\n type=\"circle\"\n class={{\n [`${CSSNAMESPACE}__spinner`]: true,\n [`${CSSNAMESPACE}__spinner--show`]: this._loading,\n }}\n />\n )}\n </div>\n </nano-resize-observe>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Web Components for Nanopore digital Web Apps
3
3
  */
4
- export { T as nano_table } from './nano-table-9d4fbd41.js';
4
+ export { T as nano_table } from './nano-table-a7a5a3f8.js';
5
5
  import './index-3c280603.js';
6
6
  import './math-c02ddfda.js';
7
7
  import './throttle-7836544e.js';
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Web Components for Nanopore digital Web Apps
3
3
  */
4
- import { c as createWorker } from './nano-table-9d4fbd41.js';
4
+ import { c as createWorker } from './nano-table-a7a5a3f8.js';
5
5
  import './index-3c280603.js';
6
6
  import './math-c02ddfda.js';
7
7
  import './throttle-7836544e.js';
@@ -17,4 +17,4 @@ URL.revokeObjectURL(url);
17
17
 
18
18
  export { worker, workerMsgId, workerName, workerPath };
19
19
 
20
- //# sourceMappingURL=table.worker-1ba8ac3f.js.map
20
+ //# sourceMappingURL=table.worker-d2b4d395.js.map
@@ -0,0 +1 @@
1
+ {"file":"table.worker-d2b4d395.js","mappings":";;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Web Components for Nanopore digital Web Apps
3
3
  */
4
- import{p as e,H as a,b as o}from"./p-1fe12320.js";import"./p-793588d1.js";const n=()=>{{t(a.prototype)}const o=import.meta.url;const n={};if(o!==""){n.resourcesUrl=new URL(".",o).href}return e(n)};const t=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const o=a.call(this,false);const n=this.childNodes;if(e){for(let e=0;e<n.length;e++){if(n[e].nodeType!==2){o.appendChild(n[e].cloneNode(true))}}}return o}};n().then((e=>o(JSON.parse('[["p-d8678bdc",[[1,"nano-global-nav",{"env":[1],"ssoDataUrl":[1,"sso-data-url"],"ssoRedirect":[1,"sso-redirect"],"getMyAccountData":[4,"get-my-account-data"],"activeMyAccountSections":[16],"showSearch":[4,"show-search"],"showLogo":[4,"show-logo"],"logoUrl":[1,"logo-url"],"searchIndeces":[16],"myAccountUser":[1040],"searchAppId":[1025,"search-app-id"],"searchApiKey":[1025,"search-api-key"],"searchValue":[1025,"search-value"],"searchIndex":[1025,"search-index"],"cartCount":[1026,"cart-count"],"msgCount":[1026,"msg-count"],"cartUrl":[1025,"cart-url"],"msgUrl":[1025,"msg-url"],"userProfileUrl":[32],"hasLoggedinSlot":[32],"hasSiteSlot":[32],"hasPromotionSlot":[32],"aboutSlotLen":[32],"iconSlotLen":[32],"mainSlotLen":[32],"overflowSlotLen":[32],"searchSlotLen":[32],"internalSearchIndeces":[32],"thresholdReady":[32],"remoteDataReady":[32],"ready":[32],"isResizing":[32],"intersectRatio":[32],"threshold":[32],"modalOpen":[32],"modalIsOpen":[32],"searchBarShown":[32],"scrollingUp":[32],"searchLoading":[32],"showAutocomplete":[32],"secondaryMenuOpen":[32],"userMenuOpen":[32],"menuFullScreen":[32],"searchValInternal":[32],"submitSearch":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"]]]]],["p-e5408bc8",[[1,"nano-hero",{"imgSrc":[1,"img-src"],"imgSrcSet":[1,"img-src-set"],"largeScreenBP":[2,"large-screen-b-p"],"theme":[1],"level":[1],"gridSizes":[32],"hasIconBox":[32],"hasScrim":[32],"hasSecondaryContent":[32],"hasQuote":[32],"hasBg":[32],"hasBackBtn":[32],"hasCtas":[32],"breadCrumbs":[32],"iconBoxItems":[32]}]]],["p-89b8ce4f",[[4,"nano-table",{"type":[1],"caption":[1],"showCaption":[4,"show-caption"],"loading":[6148],"placeholderSize":[2,"placeholder-size"],"rows":[16],"columns":[1040],"headRender":[16],"rowRender":[16],"footRender":[16],"showFooter":[4,"show-footer"],"perBlock":[2,"per-block"],"blocksLength":[2050,"blocks-length"],"searchTerm":[1,"search-term"],"customFilterFn":[16],"customSortFn":[16],"_loading":[32],"blocks":[32],"activeBlocks":[32],"measureHeight":[32],"resetSorting":[64],"addSort":[64],"resetFilters":[64],"addFilters":[64]},[[9,"scroll","scrollListener"]]]]],["p-2cb4615b",[[6,"nano-date-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"helperText":[4,"helper-text"],"helperTextFormat":[16],"floatLabel":[4,"float-label"],"name":[1],"readonly":[4],"size":[2],"form":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"disabled":[4],"color":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"label":[1],"placeholder":[1025],"value":[1537],"validateOn":[1,"validate-on"],"showInlineError":[516,"show-inline-error"],"dateOrder":[1,"date-order"],"required":[4],"min":[1],"max":[1],"hideLabel":[4,"hide-label"],"picker":[4],"initialPickerDate":[1,"initial-picker-date"],"pickerOpen":[1540,"picker-open"],"closeAfterPicked":[4,"close-after-picked"],"dropDownConfig":[6160],"dateValue":[2064],"isDateDisabled":[16],"pattern":[32],"inputValue":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]}]]],["p-a183e3c7",[[1,"nano-dialog",{"showRibbon":[4,"show-ribbon"],"open":[1540],"label":[1],"noHeader":[4,"no-header"],"noFooter":[4,"no-footer"],"noUserDismiss":[4,"no-user-dismiss"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"hoist":[4],"isVisible":[32],"noDismiss":[32],"hasFooter":[32],"show":[64],"hide":[64]}]]],["p-601e18d5",[[6,"nano-file-upload",{"name":[1],"accept":[1],"capture":[1],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"label":[1],"placeholder":[1],"hideLabel":[4,"hide-label"],"required":[4],"disabled":[516],"clearInput":[4,"clear-input"],"showInlineError":[516,"show-inline-error"],"validateOn":[1025,"validate-on"],"form":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"files":[6160],"value":[6145],"hasHelperSlot":[32],"hasLabelSlot":[32],"errorMessage":[32],"isDragging":[32],"fileList":[32],"hasFocus":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]},[[8,"click","globalClickHandler"],[8,"keydown","globalKeydownHandler"],[16,"reset","onReset"]]]]],["p-36842a50",[[1,"nano-alert",{"open":[1540],"closable":[516],"color":[513],"duration":[2],"isModal":[32],"isToast":[32],"isShowing":[32],"label":[32],"show":[64],"hide":[64],"toast":[64],"alert":[64]}]]],["p-db4b6602",[[1,"nano-global-search-results",{"algoliaEle":[32],"currentWidth":[32],"apiKey":[32],"appId":[32],"index":[32]},[[16,"nanoSearchReset","handleGlobalNavReset"],[16,"nanoSearchResult","handleGlobalNavSearch"],[0,"nanoChange","handleReorder"],[0,"nanoResultsShown","attachListeners"],[16,"nanoNewResults","attachResultListeners"]]]]],["p-b87539f0",[[1,"nano-tab",{"panel":[513],"active":[516],"disabled":[516],"closable":[4],"setFocus":[64],"removeFocus":[64]}]]],["p-99fbae74",[[1,"nano-menu-drawer",{"open":[4],"saveState":[4,"save-state"],"hideWidth":[2,"hide-width"],"hideHeight":[4,"hide-height"],"reset":[32],"widthOk":[32],"heightOk":[32],"isLoading":[32],"hide":[32]},[[0,"nanoOpen","cancelNavItemEvents"],[0,"nanoClose","cancelNavItemEvents"],[16,"nanoIsReady","handleGlobalNavReady"]]]]],["p-284dd9a2",[[1,"nano-split-pane",{"position":[6146],"positionInPixels":[1026,"position-in-pixels"],"vertical":[516],"disabled":[516],"primary":[1],"snap":[1],"snapThreshold":[2,"snap-threshold"],"animationDuration":[2,"animation-duration"],"getPercentageToPixels":[64],"getPixelsToPercentage":[64]}]]],["p-244223f0",[[1,"nano-tab-group",{"placement":[1],"noScrollControls":[4,"no-scroll-controls"],"color":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"disableSwipe":[4,"disable-swipe"],"hasScrollControls":[32],"hideControlRight":[32],"hideControlLeft":[32],"tab":[32],"show":[64]},[[0,"nanoTabClose","handleTabClose"]]]]],["p-bd05b3aa",[[1,"nano-accordion",{"color":[1],"itemOpened":[32]},[[0,"nanoOpened","onToggleHandler"],[0,"nanoClosed","onClosedHandler"]]]]],["p-b25e79b8",[[1,"nano-algolia-filter",{"filterName":[1,"filter-name"],"value":[1025],"operator":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"changeEvent":[32],"internalValue":[32],"showFilter":[32],"indexResults":[32],"filterChanged":[32],"facets":[32],"tplRenderFn":[32],"globalStoreMethod":[32]},[[0,"nanoChange","handleChangeEvent"],[0,"change","handleChangeEvent"]]]]],["p-b40eedcb",[[1,"nano-algolia-input",{"appId":[1,"app-id"],"apiKey":[1,"api-key"],"searchIndex":[1040],"searchIndexName":[1,"search-index-name"],"minChars":[2,"min-chars"],"autoEmit":[4,"auto-emit"],"browseIndex":[1028,"browse-index"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"searchStr":[32],"algoliaIndex":[32],"currentResults":[32],"search":[64]},[[0,"nanoChange","searchSubmit"]]]]],["p-447a5910",[[1,"nano-algolia-pagination",{"maxToShow":[2,"max-to-show"],"currentPage":[32],"canGoPrev":[32],"canGoNext":[32],"show":[32],"tplRenderFn":[32],"indexResults":[32],"infiniteScroll":[32],"nextPage":[64],"prevPage":[64],"goToPage":[64]}]]],["p-1a8e60c4",[[1,"nano-algolia-results",{"infiniteScroll":[4,"infinite-scroll"],"appendPages":[4,"append-pages"],"showResults":[32],"tplRenderFn":[32],"results":[32],"indexResults":[32],"resultsPage":[32],"changeEvent":[32],"facets":[32],"isLoading":[32]}]]],["p-dba8a88d",[[1,"nano-aspect-ratio",{"aspectRatio":[1,"aspect-ratio"],"fit":[1]}]]],["p-92504f7f",[[6,"nano-checkbox",{"hasFocus":[1540,"has-focus"],"checked":[1540],"disabled":[516],"value":[513],"name":[513],"required":[516],"type":[513],"label":[1],"indeterminate":[1540],"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"form":[1],"inputType":[32],"_invalid":[32],"getInputElement":[64],"reportValidity":[64],"setError":[64],"setFocus":[64],"removeFocus":[64]},[[16,"reset","onReset"]]]]],["p-fe94eeff",[[6,"nano-checkbox-group",{"validateOn":[1025,"validate-on"],"showInlineError":[4,"show-inline-error"],"min":[2],"max":[2],"disabled":[516],"legend":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"checkboxes":[32],"nativeCbs":[32],"errorMessage":[32],"showErrorMsg":[32],"hasHelperSlot":[32],"_invalid":[32],"reportValidity":[64],"showError":[64]},[[0,"nanoChange","handleCbChange"]]]]],["p-1f347342",[[1,"nano-details",{"label":[1],"open":[1540],"noHandle":[4,"no-handle"],"iconRotation":[2,"icon-rotation"],"color":[1],"isLoading":[32]}]]],["p-41addb3a",[[1,"nano-drawer",{"open":[1540],"label":[1],"placement":[1],"contained":[4],"noHeader":[4,"no-header"],"type":[1],"contentSelector":[1,"content-selector"],"hasFooter":[32],"isVisible":[32],"show":[64],"hide":[64]}]]],["p-a2d0d7b9",[[4,"nano-field-validator",{"validateOn":[1025,"validate-on"],"scrollToInvalid":[4,"scroll-to-invalid"],"dirty":[2564],"valid":[2564],"store":[2064],"payload":[2064],"showValidation":[2052,"show-validation"],"validationState":[2064],"extraFieldSelector":[1,"extra-field-selector"],"validation":[16],"submitted":[32],"userForm":[32],"_dirty":[32],"_valid":[32],"_store":[32],"setStore":[64],"setCustomValidity":[64],"resetValidity":[64]}]]],["p-9eeed8f5",[[6,"nano-range",{"color":[1],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"snaps":[4],"step":[2],"ticks":[4],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["p-23575705",[[2,"nano-rating",{"value":[1538],"max":[2],"precision":[2],"readonly":[4],"disabled":[4],"name":[1],"symbolName":[1,"symbol-name"],"symbol":[16],"hoverValue":[32],"isHovering":[32],"setFocus":[64],"removeFocus":[64]}]]],["p-1e709f87",[[1,"nano-slide",{"ready":[1540]}]]],["p-151aad1e",[[1,"nano-slides",{"options":[1040],"navbtns":[4],"pager":[4],"fullscreenbtn":[4],"fullscreen":[1540],"animation":[513],"currentSlide":[1538,"current-slide"],"autoplay":[8],"ready":[1540],"iCurrentSlide":[32],"slidesReady":[32],"didInit":[32],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipes":[64],"getflickity":[64],"reload":[64]}]]],["p-f7471cca",[[1,"nano-tab-content",{"name":[513],"active":[516]}]]],["p-15543295",[[1,"nano-algolia",{"showResults":[1028,"show-results"],"resultsPage":[1026,"results-page"],"appId":[1025,"app-id"],"apiKey":[1025,"api-key"],"searchIndex":[1040],"searchIndexName":[1025,"search-index-name"],"listenTo":[1,"listen-to"],"query":[1025],"operator":[1],"filters":[16],"tplEngine":[16],"tplRenderFn":[16],"replicaIndex":[1025,"replica-index"],"browseIndex":[1028,"browse-index"],"minChars":[2,"min-chars"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"_dynFacetFilters":[32],"inputField":[32],"algoliaIndex":[32],"indeces":[32],"resultsEmitterEle":[32],"indexResults":[32],"filterChanged":[32],"currentHits":[32],"changeEvent":[32],"isLoading":[32],"wormholeState":[32],"removeFilters":[64]},[[0,"nanoTplUpdated","onAllTplUpdate"],[0,"nanoPageChanged","onPageChange"],[0,"nanoFilterChanged","onFilterChange"],[16,"nanoChange","handleInputChange"],[16,"change","handleInputChange"]]]]],["p-46b348b7",[[1,"nano-date-picker",{"selectedDate":[1025,"selected-date"],"min":[1],"max":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"color":[1],"isDateDisabled":[16],"isModal":[4,"is-modal"],"firstFocusEle":[16],"activeFocus":[32],"focusedDay":[32],"setFocus":[64]}]]],["p-f43d1d8e",[[1,"nano-progress-bar",{"value":[2],"indeterminate":[4],"showPercent":[4,"show-percent"]}]]],["p-feb9f164",[[1,"nano-tooltip",{"content":[1],"placement":[1],"disabled":[4],"distance":[2],"open":[1540],"skidding":[2],"trigger":[1],"show":[64],"hide":[64]}]]],["p-559a6492",[[6,"nano-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"accept":[1],"autocapitalise":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[516],"inputmode":[1],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[516],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[513],"form":[1],"value":[1025],"resize":[1],"rows":[2],"showCharCount":[4,"show-char-count"],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"errorMessage":[32],"datalist":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"select":[64],"getInputElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-a2e38472",[[1,"nano-sticker",{"autoResize":[4,"auto-resize"],"isSticky":[1028,"is-sticky"],"offset":[1026],"position":[1],"quietMode":[1,"quiet-mode"],"hideOnNewStickers":[4,"hide-on-new-stickers"],"breakPointMax":[2,"break-point-max"],"breakPointMin":[2,"break-point-min"],"scrollParent":[1040],"stickTo":[1,"stick-to"],"isStuck":[32],"isRootSticker":[32],"hide":[32],"scrollHide":[32],"multiStickerHide":[32],"scrollingTo":[32],"quietModeIsOn":[32],"stuckCounter":[32],"stickerIndex":[32],"stickToEle":[32],"triggerPos":[32],"trigger":[32],"_offset":[32],"isHiding":[64],"isSticking":[64],"setTriggerPos":[64],"getTriggerPos":[64],"pauseHiding":[64]}]]],["p-9059c8c1",[[1,"nano-spinner",{"type":[1],"overlay":[516],"hasText":[32]}]]],["p-751927d1",[[2,"nano-icon-button",{"iconName":[1,"icon-name"],"iconSrc":[1,"icon-src"],"type":[513],"name":[513],"value":[513],"label":[1],"disabled":[516],"href":[1],"target":[1],"setFocus":[64]}]]],["p-4f0e14b5",[[1,"nano-dropdown",{"autoOpen":[4,"auto-open"],"open":[1540],"closeOnSelect":[4,"close-on-select"],"containingElement":[1040],"tetherTo":[16],"placement":[1],"distance":[2],"skidding":[2],"hoist":[4],"dialogTitle":[1,"dialog-title"],"eventType":[16],"show":[64],"hide":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"],[0,"nanoSelect","handlePanelSelect"]]]]],["p-d1c8eca4",[[1,"nano-datalist",{"selected":[1040],"dropDownConfig":[6160],"options":[16],"input":[1],"type":[1],"activeOptions":[2064],"open":[1028],"disableFilter":[4,"disable-filter"],"disabled":[4],"actvOptEles":[32],"connectedInput":[32],"inputLabel":[32],"hasNoResult":[32],"shouldOpen":[32],"canOpen":[32],"optionIds":[32]}],[1,"nano-option",{"value":[1537],"label":[1537],"selected":[516],"disabled":[516],"filterMeta":[1,"filter-meta"],"hasFocus":[32]},[[0,"keydown","handleKeyDown"]]],[1,"nano-menu",{"hasFocus":[2052,"has-focus"],"type":[1],"label":[1],"setFocus":[64],"removeFocus":[64],"showActiveElement":[64],"resetActiveItem":[64]},[[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-e4e41e06",[[6,"nano-select",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"autofocus":[4],"disabled":[516],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"multiple":[4],"name":[1],"placeholder":[1],"readonly":[516],"required":[4],"size":[2],"max":[2],"min":[2],"form":[1],"allowCustomValues":[4,"allow-custom-values"],"value":[6145],"options":[6160],"clearSelect":[4,"clear-select"],"mask":[4],"debounce":[2],"dropDownConfig":[1040],"currInsertIndex":[32],"showErrorMsg":[32],"errorMessage":[32],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"inputSearchVal":[32],"_invalid":[32],"_eOptions":[32],"reportValidity":[64],"setFocus":[64],"getSelectElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]],[0,"nano-global-nav-user-profile",{"myAccountUser":[16],"userProfileUrl":[1,"user-profile-url"]}],[1,"nano-nav-item",{"href":[1025],"target":[1],"disabled":[4],"open":[1540],"selected":[516],"secondaryActiveWidth":[2,"secondary-active-width"],"secondaryFallback":[16],"closeOnBlur":[4,"close-on-blur"],"notification":[4],"didOpen":[32],"isInGlobalNav":[32],"isInMenuDrawer":[32],"isInMenu":[32],"hasFocus":[32],"setFocus":[64]}]]],["p-b9c8b99f",[[4,"nano-resize-observe",{"states":[1],"currentWidth":[32],"currentHeight":[32],"classNames":[32]}],[1,"nano-skeleton",{"animated":[4]}]]],["p-4b69178e",[[1,"nano-img",{"alt":[1],"src":[1],"srcSet":[1,"src-set"],"lazy":[4],"background":[4],"autoHeight":[1,"auto-height"],"loadSrc":[32],"loadError":[32],"hasLoaded":[32],"imgStates":[32],"_src":[32]}],[1,"nano-grid",{"sSize":[2,"s-size"],"mSize":[2,"m-size"],"lSize":[2,"l-size"],"xlSize":[2,"xl-size"],"sCols":[2,"s-cols"],"mCols":[2,"m-cols"],"lCols":[2,"l-cols"],"xlCols":[2,"xl-cols"],"xxlCols":[2,"xxl-cols"],"showHelper":[516,"show-helper"],"contentPanel":[516,"content-panel"],"fullHeight":[516,"full-height"],"ready":[32],"isSmall":[32],"isMedium":[32],"isLarge":[32],"isXL":[32],"isXXL":[32]}],[1,"nano-grid-item",{"gridStates":[1,"grid-states"],"changeBP":[64]}]]],["p-69e5a37d",[[1,"nano-icon",{"color":[1],"ariaLabel":[1537,"aria-label"],"flipRtl":[4,"flip-rtl"],"name":[1],"src":[1],"icon":[8],"size":[1],"lazy":[4],"svgContent":[32],"isVisible":[32],"isLoading":[32]}]]]]'),e)));
4
+ import{p as e,H as a,b as o}from"./p-1fe12320.js";import"./p-793588d1.js";const n=()=>{{t(a.prototype)}const o=import.meta.url;const n={};if(o!==""){n.resourcesUrl=new URL(".",o).href}return e(n)};const t=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const o=a.call(this,false);const n=this.childNodes;if(e){for(let e=0;e<n.length;e++){if(n[e].nodeType!==2){o.appendChild(n[e].cloneNode(true))}}}return o}};n().then((e=>o(JSON.parse('[["p-14329940",[[1,"nano-global-nav",{"env":[1],"ssoDataUrl":[1,"sso-data-url"],"ssoRedirect":[1,"sso-redirect"],"getMyAccountData":[4,"get-my-account-data"],"activeMyAccountSections":[16],"showSearch":[4,"show-search"],"showLogo":[4,"show-logo"],"logoUrl":[1,"logo-url"],"searchIndeces":[16],"myAccountUser":[1040],"searchAppId":[1025,"search-app-id"],"searchApiKey":[1025,"search-api-key"],"searchValue":[1025,"search-value"],"searchIndex":[1025,"search-index"],"cartCount":[1026,"cart-count"],"msgCount":[1026,"msg-count"],"cartUrl":[1025,"cart-url"],"msgUrl":[1025,"msg-url"],"userProfileUrl":[32],"hasLoggedinSlot":[32],"hasSiteSlot":[32],"hasPromotionSlot":[32],"aboutSlotLen":[32],"iconSlotLen":[32],"mainSlotLen":[32],"overflowSlotLen":[32],"searchSlotLen":[32],"internalSearchIndeces":[32],"thresholdReady":[32],"remoteDataReady":[32],"ready":[32],"isResizing":[32],"intersectRatio":[32],"threshold":[32],"modalOpen":[32],"modalIsOpen":[32],"searchBarShown":[32],"scrollingUp":[32],"searchLoading":[32],"showAutocomplete":[32],"secondaryMenuOpen":[32],"userMenuOpen":[32],"menuFullScreen":[32],"searchValInternal":[32],"submitSearch":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"]]]]],["p-e5408bc8",[[1,"nano-hero",{"imgSrc":[1,"img-src"],"imgSrcSet":[1,"img-src-set"],"largeScreenBP":[2,"large-screen-b-p"],"theme":[1],"level":[1],"gridSizes":[32],"hasIconBox":[32],"hasScrim":[32],"hasSecondaryContent":[32],"hasQuote":[32],"hasBg":[32],"hasBackBtn":[32],"hasCtas":[32],"breadCrumbs":[32],"iconBoxItems":[32]}]]],["p-d9d2807a",[[4,"nano-table",{"type":[1],"caption":[1],"showCaption":[4,"show-caption"],"loading":[6148],"placeholderSize":[2,"placeholder-size"],"rows":[16],"columns":[1040],"headRender":[16],"rowRender":[16],"footRender":[16],"showFooter":[4,"show-footer"],"perBlock":[2,"per-block"],"blocksLength":[2050,"blocks-length"],"searchTerm":[1,"search-term"],"customFilterFn":[16],"customSortFn":[16],"_loading":[32],"blocks":[32],"activeBlocks":[32],"measureHeight":[32],"resetSorting":[64],"addSort":[64],"resetFilters":[64],"addFilters":[64]},[[9,"scroll","scrollListener"]]]]],["p-2cb4615b",[[6,"nano-date-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"helperText":[4,"helper-text"],"helperTextFormat":[16],"floatLabel":[4,"float-label"],"name":[1],"readonly":[4],"size":[2],"form":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"disabled":[4],"color":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"label":[1],"placeholder":[1025],"value":[1537],"validateOn":[1,"validate-on"],"showInlineError":[516,"show-inline-error"],"dateOrder":[1,"date-order"],"required":[4],"min":[1],"max":[1],"hideLabel":[4,"hide-label"],"picker":[4],"initialPickerDate":[1,"initial-picker-date"],"pickerOpen":[1540,"picker-open"],"closeAfterPicked":[4,"close-after-picked"],"dropDownConfig":[6160],"dateValue":[2064],"isDateDisabled":[16],"pattern":[32],"inputValue":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]}]]],["p-a183e3c7",[[1,"nano-dialog",{"showRibbon":[4,"show-ribbon"],"open":[1540],"label":[1],"noHeader":[4,"no-header"],"noFooter":[4,"no-footer"],"noUserDismiss":[4,"no-user-dismiss"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"hoist":[4],"isVisible":[32],"noDismiss":[32],"hasFooter":[32],"show":[64],"hide":[64]}]]],["p-601e18d5",[[6,"nano-file-upload",{"name":[1],"accept":[1],"capture":[1],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"label":[1],"placeholder":[1],"hideLabel":[4,"hide-label"],"required":[4],"disabled":[516],"clearInput":[4,"clear-input"],"showInlineError":[516,"show-inline-error"],"validateOn":[1025,"validate-on"],"form":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"files":[6160],"value":[6145],"hasHelperSlot":[32],"hasLabelSlot":[32],"errorMessage":[32],"isDragging":[32],"fileList":[32],"hasFocus":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"getInputElement":[64],"showError":[64]},[[8,"click","globalClickHandler"],[8,"keydown","globalKeydownHandler"],[16,"reset","onReset"]]]]],["p-36842a50",[[1,"nano-alert",{"open":[1540],"closable":[516],"color":[513],"duration":[2],"isModal":[32],"isToast":[32],"isShowing":[32],"label":[32],"show":[64],"hide":[64],"toast":[64],"alert":[64]}]]],["p-3a1026d1",[[1,"nano-global-search-results",{"algoliaEle":[32],"currentWidth":[32],"apiKey":[32],"appId":[32],"index":[32]},[[16,"nanoSearchReset","handleGlobalNavReset"],[16,"nanoSearchResult","handleGlobalNavSearch"],[0,"nanoChange","handleReorder"],[0,"nanoResultsShown","attachListeners"],[16,"nanoNewResults","attachResultListeners"]]]]],["p-b87539f0",[[1,"nano-tab",{"panel":[513],"active":[516],"disabled":[516],"closable":[4],"setFocus":[64],"removeFocus":[64]}]]],["p-99fbae74",[[1,"nano-menu-drawer",{"open":[4],"saveState":[4,"save-state"],"hideWidth":[2,"hide-width"],"hideHeight":[4,"hide-height"],"reset":[32],"widthOk":[32],"heightOk":[32],"isLoading":[32],"hide":[32]},[[0,"nanoOpen","cancelNavItemEvents"],[0,"nanoClose","cancelNavItemEvents"],[16,"nanoIsReady","handleGlobalNavReady"]]]]],["p-284dd9a2",[[1,"nano-split-pane",{"position":[6146],"positionInPixels":[1026,"position-in-pixels"],"vertical":[516],"disabled":[516],"primary":[1],"snap":[1],"snapThreshold":[2,"snap-threshold"],"animationDuration":[2,"animation-duration"],"getPercentageToPixels":[64],"getPixelsToPercentage":[64]}]]],["p-244223f0",[[1,"nano-tab-group",{"placement":[1],"noScrollControls":[4,"no-scroll-controls"],"color":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"disableSwipe":[4,"disable-swipe"],"hasScrollControls":[32],"hideControlRight":[32],"hideControlLeft":[32],"tab":[32],"show":[64]},[[0,"nanoTabClose","handleTabClose"]]]]],["p-bd05b3aa",[[1,"nano-accordion",{"color":[1],"itemOpened":[32]},[[0,"nanoOpened","onToggleHandler"],[0,"nanoClosed","onClosedHandler"]]]]],["p-b25e79b8",[[1,"nano-algolia-filter",{"filterName":[1,"filter-name"],"value":[1025],"operator":[1],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"changeEvent":[32],"internalValue":[32],"showFilter":[32],"indexResults":[32],"filterChanged":[32],"facets":[32],"tplRenderFn":[32],"globalStoreMethod":[32]},[[0,"nanoChange","handleChangeEvent"],[0,"change","handleChangeEvent"]]]]],["p-b40eedcb",[[1,"nano-algolia-input",{"appId":[1,"app-id"],"apiKey":[1,"api-key"],"searchIndex":[1040],"searchIndexName":[1,"search-index-name"],"minChars":[2,"min-chars"],"autoEmit":[4,"auto-emit"],"browseIndex":[1028,"browse-index"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"searchStr":[32],"algoliaIndex":[32],"currentResults":[32],"search":[64]},[[0,"nanoChange","searchSubmit"]]]]],["p-447a5910",[[1,"nano-algolia-pagination",{"maxToShow":[2,"max-to-show"],"currentPage":[32],"canGoPrev":[32],"canGoNext":[32],"show":[32],"tplRenderFn":[32],"indexResults":[32],"infiniteScroll":[32],"nextPage":[64],"prevPage":[64],"goToPage":[64]}]]],["p-1a8e60c4",[[1,"nano-algolia-results",{"infiniteScroll":[4,"infinite-scroll"],"appendPages":[4,"append-pages"],"showResults":[32],"tplRenderFn":[32],"results":[32],"indexResults":[32],"resultsPage":[32],"changeEvent":[32],"facets":[32],"isLoading":[32]}]]],["p-dba8a88d",[[1,"nano-aspect-ratio",{"aspectRatio":[1,"aspect-ratio"],"fit":[1]}]]],["p-92504f7f",[[6,"nano-checkbox",{"hasFocus":[1540,"has-focus"],"checked":[1540],"disabled":[516],"value":[513],"name":[513],"required":[516],"type":[513],"label":[1],"indeterminate":[1540],"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"form":[1],"inputType":[32],"_invalid":[32],"getInputElement":[64],"reportValidity":[64],"setError":[64],"setFocus":[64],"removeFocus":[64]},[[16,"reset","onReset"]]]]],["p-fe94eeff",[[6,"nano-checkbox-group",{"validateOn":[1025,"validate-on"],"showInlineError":[4,"show-inline-error"],"min":[2],"max":[2],"disabled":[516],"legend":[1],"invalid":[2564],"validityMessage":[2049,"validity-message"],"checkboxes":[32],"nativeCbs":[32],"errorMessage":[32],"showErrorMsg":[32],"hasHelperSlot":[32],"_invalid":[32],"reportValidity":[64],"showError":[64]},[[0,"nanoChange","handleCbChange"]]]]],["p-1f347342",[[1,"nano-details",{"label":[1],"open":[1540],"noHandle":[4,"no-handle"],"iconRotation":[2,"icon-rotation"],"color":[1],"isLoading":[32]}]]],["p-41addb3a",[[1,"nano-drawer",{"open":[1540],"label":[1],"placement":[1],"contained":[4],"noHeader":[4,"no-header"],"type":[1],"contentSelector":[1,"content-selector"],"hasFooter":[32],"isVisible":[32],"show":[64],"hide":[64]}]]],["p-a2d0d7b9",[[4,"nano-field-validator",{"validateOn":[1025,"validate-on"],"scrollToInvalid":[4,"scroll-to-invalid"],"dirty":[2564],"valid":[2564],"store":[2064],"payload":[2064],"showValidation":[2052,"show-validation"],"validationState":[2064],"extraFieldSelector":[1,"extra-field-selector"],"validation":[16],"submitted":[32],"userForm":[32],"_dirty":[32],"_valid":[32],"_store":[32],"setStore":[64],"setCustomValidity":[64],"resetValidity":[64]}]]],["p-9eeed8f5",[[6,"nano-range",{"color":[1],"debounce":[2],"name":[1],"dualKnobs":[4,"dual-knobs"],"min":[2],"max":[2],"pin":[4],"snaps":[4],"step":[2],"ticks":[4],"disabled":[4],"value":[1026],"ratioA":[32],"ratioB":[32],"pressedKnob":[32]}]]],["p-23575705",[[2,"nano-rating",{"value":[1538],"max":[2],"precision":[2],"readonly":[4],"disabled":[4],"name":[1],"symbolName":[1,"symbol-name"],"symbol":[16],"hoverValue":[32],"isHovering":[32],"setFocus":[64],"removeFocus":[64]}]]],["p-1e709f87",[[1,"nano-slide",{"ready":[1540]}]]],["p-151aad1e",[[1,"nano-slides",{"options":[1040],"navbtns":[4],"pager":[4],"fullscreenbtn":[4],"fullscreen":[1540],"animation":[513],"currentSlide":[1538,"current-slide"],"autoplay":[8],"ready":[1540],"iCurrentSlide":[32],"slidesReady":[32],"didInit":[32],"update":[64],"updateAutoHeight":[64],"slideTo":[64],"slideNext":[64],"slidePrev":[64],"getActiveIndex":[64],"length":[64],"isEnd":[64],"isBeginning":[64],"startAutoplay":[64],"stopAutoplay":[64],"lockSwipes":[64],"getflickity":[64],"reload":[64]}]]],["p-f7471cca",[[1,"nano-tab-content",{"name":[513],"active":[516]}]]],["p-15543295",[[1,"nano-algolia",{"showResults":[1028,"show-results"],"resultsPage":[1026,"results-page"],"appId":[1025,"app-id"],"apiKey":[1025,"api-key"],"searchIndex":[1040],"searchIndexName":[1025,"search-index-name"],"listenTo":[1,"listen-to"],"query":[1025],"operator":[1],"filters":[16],"tplEngine":[16],"tplRenderFn":[16],"replicaIndex":[1025,"replica-index"],"browseIndex":[1028,"browse-index"],"minChars":[2,"min-chars"],"storeId":[1,"store-id"],"storeMethod":[1,"store-method"],"_dynFacetFilters":[32],"inputField":[32],"algoliaIndex":[32],"indeces":[32],"resultsEmitterEle":[32],"indexResults":[32],"filterChanged":[32],"currentHits":[32],"changeEvent":[32],"isLoading":[32],"wormholeState":[32],"removeFilters":[64]},[[0,"nanoTplUpdated","onAllTplUpdate"],[0,"nanoPageChanged","onPageChange"],[0,"nanoFilterChanged","onFilterChange"],[16,"nanoChange","handleInputChange"],[16,"change","handleInputChange"]]]]],["p-46b348b7",[[1,"nano-date-picker",{"selectedDate":[1025,"selected-date"],"min":[1],"max":[1],"firstDayOfWeek":[2,"first-day-of-week"],"localization":[16],"color":[1],"isDateDisabled":[16],"isModal":[4,"is-modal"],"firstFocusEle":[16],"activeFocus":[32],"focusedDay":[32],"setFocus":[64]}]]],["p-f43d1d8e",[[1,"nano-progress-bar",{"value":[2],"indeterminate":[4],"showPercent":[4,"show-percent"]}]]],["p-feb9f164",[[1,"nano-tooltip",{"content":[1],"placement":[1],"disabled":[4],"distance":[2],"open":[1540],"skidding":[2],"trigger":[1],"show":[64],"hide":[64]}]]],["p-559a6492",[[6,"nano-input",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"accept":[1],"autocapitalise":[1],"autocomplete":[1],"autocorrect":[1],"autofocus":[4],"clearInput":[4,"clear-input"],"clearOnEdit":[4,"clear-on-edit"],"debounce":[2],"disabled":[516],"inputmode":[1],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"max":[1],"maxlength":[2],"min":[1],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[516],"required":[4],"spellcheck":[4],"step":[1],"size":[2],"type":[513],"form":[1],"value":[1025],"resize":[1],"rows":[2],"showCharCount":[4,"show-char-count"],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"errorMessage":[32],"datalist":[32],"_invalid":[32],"reportValidity":[64],"setFocus":[64],"select":[64],"getInputElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-a2e38472",[[1,"nano-sticker",{"autoResize":[4,"auto-resize"],"isSticky":[1028,"is-sticky"],"offset":[1026],"position":[1],"quietMode":[1,"quiet-mode"],"hideOnNewStickers":[4,"hide-on-new-stickers"],"breakPointMax":[2,"break-point-max"],"breakPointMin":[2,"break-point-min"],"scrollParent":[1040],"stickTo":[1,"stick-to"],"isStuck":[32],"isRootSticker":[32],"hide":[32],"scrollHide":[32],"multiStickerHide":[32],"scrollingTo":[32],"quietModeIsOn":[32],"stuckCounter":[32],"stickerIndex":[32],"stickToEle":[32],"triggerPos":[32],"trigger":[32],"_offset":[32],"isHiding":[64],"isSticking":[64],"setTriggerPos":[64],"getTriggerPos":[64],"pauseHiding":[64]}]]],["p-9059c8c1",[[1,"nano-spinner",{"type":[1],"overlay":[516],"hasText":[32]}]]],["p-751927d1",[[2,"nano-icon-button",{"iconName":[1,"icon-name"],"iconSrc":[1,"icon-src"],"type":[513],"name":[513],"value":[513],"label":[1],"disabled":[516],"href":[1],"target":[1],"setFocus":[64]}]]],["p-4f0e14b5",[[1,"nano-dropdown",{"autoOpen":[4,"auto-open"],"open":[1540],"closeOnSelect":[4,"close-on-select"],"containingElement":[1040],"tetherTo":[16],"placement":[1],"distance":[2],"skidding":[2],"hoist":[4],"dialogTitle":[1,"dialog-title"],"eventType":[16],"show":[64],"hide":[64]},[[0,"nanoOpen","secondaryOpen"],[0,"nanoClose","secondaryClose"],[0,"nanoSelect","handlePanelSelect"]]]]],["p-d1c8eca4",[[1,"nano-datalist",{"selected":[1040],"dropDownConfig":[6160],"options":[16],"input":[1],"type":[1],"activeOptions":[2064],"open":[1028],"disableFilter":[4,"disable-filter"],"disabled":[4],"actvOptEles":[32],"connectedInput":[32],"inputLabel":[32],"hasNoResult":[32],"shouldOpen":[32],"canOpen":[32],"optionIds":[32]}],[1,"nano-option",{"value":[1537],"label":[1537],"selected":[516],"disabled":[516],"filterMeta":[1,"filter-meta"],"hasFocus":[32]},[[0,"keydown","handleKeyDown"]]],[1,"nano-menu",{"hasFocus":[2052,"has-focus"],"type":[1],"label":[1],"setFocus":[64],"removeFocus":[64],"showActiveElement":[64],"resetActiveItem":[64]},[[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]]]],["p-40e13cd4",[[6,"nano-select",{"invalid":[2564],"validityMessage":[2049,"validity-message"],"color":[1],"autofocus":[4],"disabled":[516],"validateOn":[1025,"validate-on"],"showInlineError":[516,"show-inline-error"],"label":[1],"hideLabel":[4,"hide-label"],"floatLabel":[4,"float-label"],"multiple":[4],"name":[1],"placeholder":[1],"readonly":[516],"required":[4],"size":[2],"max":[2],"min":[2],"form":[1],"allowCustomValues":[4,"allow-custom-values"],"value":[6145],"options":[6160],"clearSelect":[4,"clear-select"],"mask":[4],"debounce":[2],"dropDownConfig":[1040],"currInsertIndex":[32],"showErrorMsg":[32],"errorMessage":[32],"hasFocus":[32],"hasLabelSlot":[32],"hasHelperSlot":[32],"hasHelperEndSlot":[32],"inputSearchVal":[32],"_invalid":[32],"_eOptions":[32],"reportValidity":[64],"setFocus":[64],"getSelectElement":[64],"showError":[64]},[[16,"reset","onReset"],[17,"mousedown","handleBlur"],[0,"keydown","handleBlur"]]],[0,"nano-global-nav-user-profile",{"myAccountUser":[16],"userProfileUrl":[1,"user-profile-url"]}],[1,"nano-nav-item",{"href":[1025],"target":[1],"disabled":[4],"open":[1540],"selected":[516],"secondaryActiveWidth":[2,"secondary-active-width"],"secondaryFallback":[16],"closeOnBlur":[4,"close-on-blur"],"notification":[4],"didOpen":[32],"isInGlobalNav":[32],"isInMenuDrawer":[32],"isInMenu":[32],"hasFocus":[32],"setFocus":[64]}]]],["p-b9c8b99f",[[4,"nano-resize-observe",{"states":[1],"currentWidth":[32],"currentHeight":[32],"classNames":[32]}],[1,"nano-skeleton",{"animated":[4]}]]],["p-4b69178e",[[1,"nano-img",{"alt":[1],"src":[1],"srcSet":[1,"src-set"],"lazy":[4],"background":[4],"autoHeight":[1,"auto-height"],"loadSrc":[32],"loadError":[32],"hasLoaded":[32],"imgStates":[32],"_src":[32]}],[1,"nano-grid",{"sSize":[2,"s-size"],"mSize":[2,"m-size"],"lSize":[2,"l-size"],"xlSize":[2,"xl-size"],"sCols":[2,"s-cols"],"mCols":[2,"m-cols"],"lCols":[2,"l-cols"],"xlCols":[2,"xl-cols"],"xxlCols":[2,"xxl-cols"],"showHelper":[516,"show-helper"],"contentPanel":[516,"content-panel"],"fullHeight":[516,"full-height"],"ready":[32],"isSmall":[32],"isMedium":[32],"isLarge":[32],"isXL":[32],"isXXL":[32]}],[1,"nano-grid-item",{"gridStates":[1,"grid-states"],"changeBP":[64]}]]],["p-69e5a37d",[[1,"nano-icon",{"color":[1],"ariaLabel":[1537,"aria-label"],"flipRtl":[4,"flip-rtl"],"name":[1],"src":[1],"icon":[8],"size":[1],"lazy":[4],"svgContent":[32],"isVisible":[32],"isLoading":[32]}]]]]'),e)));
5
5
  //# sourceMappingURL=nano-components.esm.js.map
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Web Components for Nanopore digital Web Apps
3
+ */
4
+ import{j as t,h as n,F as i,g as e,e as o,r as s,c as r,d as a,a as l}from"./p-1fe12320.js";import{a as d}from"./p-ee045579.js";import{d as c}from"./p-9746b0a5.js";import{c as h}from"./p-651b3264.js";const p="nano-tbl";const b=(t,n)=>{const i=globalThis[n];return i!=null&&t instanceof i};const f=t=>{if(t!=null){if(b(t,"ArrayBuffer")||b(t,"MessagePort")||b(t,"ImageBitmap")||b(t,"OffscreenCanvas")){return[t]}if(typeof t==="object"){if(t.constructor===Object){t=Object.values(t)}if(Array.isArray(t)){return t.flatMap(f)}return f(t.buffer)}}return[]};let u=0;let _=0;const g=new Map;const m=new Map;const w=(n,i,e)=>{const o=new Worker(n,{name:i});o.addEventListener("message",(({data:n})=>{if(n){const i=n[0];const o=n[1];const s=n[2];if(i===e){const i=n[3];const[e,r,a]=g.get(o);g.delete(o);if(i){const n=i.isError?Object.assign(new Error(i.value.message),i.value):i.value;t(n);r(n)}else{if(a){a.forEach((t=>m.delete(t)))}e(s)}}else if(i===e+".cb"){try{m.get(o)(...s)}catch(n){t(n)}}}}));return o};const x=(t,n,i)=>(...e)=>new Promise(((o,s)=>{let r=u++;let a=0;let l=e.length;let d=[o,s];g.set(r,d);for(;a<l;a++){if(typeof e[a]==="function"){const t=_++;m.set(t,e[a]);e[a]=[n+".cb",t];(d[2]=d[2]||[]).push(t)}}const c=t=>t.postMessage([n,r,i,e],f(e));if(t.then){t.then(c)}else{c(t)}}));const y=import("./p-64200e25.js").then((t=>t.worker));const v=x(y,"stencil.table.worker","createWorkerStore");const k=x(y,"stencil.table.worker","syncConfigToWorker");const $=x(y,"stencil.table.worker","syncDataToWorker");const z=x(y,"stencil.table.worker","workerFilter");const C=x(y,"stencil.table.worker","workerSearch");const S=x(y,"stencil.table.worker","workerSort");function T(t){const n=JSON.parse(JSON.stringify(t));t.forEach((t=>{if(!!t.sortCompareFn){const i=n.find((n=>n.prop===t.prop));i.sortCompareFn=t.sortCompareFn.toString()}}));return n}const I=new WeakMap;async function R(t,n,i){const e={data:h({rows:[]}),config:h({columns:n}),general:h({workerId:null,scrollParent:i,host:t})};const o=await v(e.data.state.rows,T(e.config.state.columns));e.general.state.workerId=o;I.set(t,e);e.data.use({reset:()=>{if(e.general.state.workerId)$(e.general.state.workerId,null)},dispose:()=>{if(e.general.state.workerId)$(e.general.state.workerId,null)}});e.config.use({reset:()=>{if(e.general.state.workerId)k(e.general.state.workerId,null)},dispose:()=>{if(e.general.state.workerId)k(e.general.state.workerId,null)}});return e}function O(t){return I.get(t)}function j(t,n){const i=I.get(t);if(!i)return;n=n.map(((t,n)=>({...t,__index:n,__uuid:d(Object.values(t).join())})));i.data.state.rows=n;if(i.general.state.workerId)return $(i.general.state.workerId,n)}function M(t,n){const i=I.get(t);if(!i)return;i.config.state.columns=n;if(i.general.state.workerId)return k(i.general.state.workerId,T(n))}async function F(t,n){const i=I.get(t);if(!i||!i.general.state.workerId)return;try{i.data.state.rows=await C(i.general.state.workerId,n)}catch(t){console.log(t)}}async function A(t,n){const i=I.get(t);if(!i||!i.general.state.workerId)return;try{i.data.state.rows=await z(i.general.state.workerId,n)}catch(t){console.log(t)}}async function B(t,n,i){const e=I.get(t);if(!e||!e.general.state.workerId)return;try{e.data.state.rows=await S(e.general.state.workerId,n,i)}catch(t){console.log(t)}}function P(t,n){const i=q();const e=i.config.state.columns;const o=i.data.state.rows;const s=e[n];const r=s?.prop;const a=o[t];const l=a[e[n].prop];return{prop:r,cellModel:l,column:s,rowIndex:t,rowModel:a}}function W(t){const n=q();const i=n.data.state.rows;const e=i[t];return{row:e,rowIndex:t}}function N(t,n){if(!n)return t;const i={...n,...t};if(n.class){if(typeof n.class==="object"&&typeof i.class==="object"){i.class={...n.class,...i.class}}else if(typeof n.class==="string"&&typeof i.class==="object"){i.class[n.class]=true}else if(typeof i.class==="string"){i.class+=" "+n.class}}if(n.style){i.style={...n.style,...i.style}}return i}function q(){return O(e(o()))}function D(t,n,i){const e={...i};const o=q().config.state.columns[n]?.cellProperties;if(!o)return e;const s=P(t,n);const r=o(s);if(!r)return e;return N(e,r)}function J(t,e){const o=q();const s=o.config.state.columns;const r=s[e]?.cellTemplate;const a=P(t,e);return r?r(n,a):n(i,null,a.cellModel.toString())}function L(t){const e=t?.colTemplate;return e?e(n,t):n(i,null,t.title)}function E(t,n,i=false){const e={[`${p}__${t}`]:true,[`${p}__pin`]:!!n,[`${p}__pin--top`]:n==="top",[`${p}__pin--bottom`]:n==="bottom"};if(i){let t="";Object.entries(e).forEach((([n,i])=>{if(i)t+=n+" "}));return t}return e}const H=new WeakMap;const U=new WeakMap;function G(t,n,i){if(H.get(t))return;const e=q();const o=e.general.state.scrollParent;const s=new IntersectionObserver((([t])=>{const e=t.rootBounds||document.scrollingElement.getBoundingClientRect();const s={};if(n==="start"){s.start=t.boundingClientRect.x-(e.x+o.scrollLeft)<0&&!t.isIntersecting}if(n==="end"){s.end=t.boundingClientRect.right>t.boundingClientRect.width&&!t.isIntersecting}i(s)}),{threshold:[1],rootMargin:"1px 0px 100px 0px",root:o===document.scrollingElement?null:o});H.set(t,s);setTimeout((()=>s.observe(t)),300)}function K(t,n,i){if(U.get(t))return;const e=q();const o=e.general.state.scrollParent;const s=new IntersectionObserver((([t])=>{const e=t.rootBounds||document.scrollingElement.getBoundingClientRect();const s={};if(n==="top"){s.top=t.boundingClientRect.y-(e.y+o.scrollTop)<0&&!t.isIntersecting}if(n==="bottom")s.bottom=t.boundingClientRect.height>t.intersectionRect.height&&!t.isIntersecting;i(s)}),{threshold:[1],rootMargin:"0px 100px 0px 100px",root:o===document.scrollingElement?null:o});U.set(t,s);requestAnimationFrame((()=>s.observe(t)))}const Q=({rowRenderer:t,rowIndex:i,row:e},o)=>{let s={};if(!e){const t=W(i);e=t.row}if(t?.rowProperties){s=t.rowProperties({row:e,rowIndex:i})||s}let r;if(t?.pinned&&typeof t.pinned==="function"){r=t.pinned()}const a={class:E("tr",r)};const l=s?N(a,s):a;return n("tr",{...l,key:e.__uuid},o)};const V=({rowRenderer:t,onColumnPinned:i},e,o)=>{let s={};if(t.rowProperties){s=t.rowProperties()||{}}const r=t.pinned||null;const a={class:E("tr",null)};const l=s?N(a,s):a;const d=t?.template;if(d){let t=d(n,{renderedRow:n("tr",{...l},e)});if(Array.isArray(t)){t=o.map(t,(t=>{if(t.vtag==="tr"){t.vattrs=N({class:E("tr",null,true)},t.vattrs);if(!!t.vchildren){t.vchildren=o.map(t.vchildren,(t=>{if(["td","th"].includes(t.vtag.toString())){t.vattrs=N({class:E(t.vtag.toString(),r,true),ref:t=>{K(t,r,i)}},t.vattrs)}return t}))}}return t}))}return t}return n("tr",{...l},e)};const X=({column:t,headRenderer:e,onColumnOrderClick:o,onColumnPinned:s})=>{function r(n){let i;switch(t.order){case"asc":i="desc";break;case"desc":i=null;break;default:i="asc"}o(i,t.prop,n.target.closest("th"))}let a={};if(t.columnProperties){a=t.columnProperties(t)||a}const l={class:{...E("th",e?.pinned),[`${p}__pin--start`]:t.pinned==="start",[`${p}__pin--end`]:t.pinned==="end",[`${p}__ordered`]:!!t.order,[`${p}__filtered`]:!!t.filter}};let d=a?N(l,a):l;const c=L(t);if(!c)return n(i,null);d=Number(d.colspan)>1?{...d,scope:"colgroup"}:{...d,scope:"col"};if(t.sortable!==false){return n("th",{...d,"aria-sort":t.order?t.order==="asc"?"ascending":"descending":"none",ref:n=>{if(["end","start"].includes(t.pinned))G(n,t.pinned,s);if(["top","bottom"].includes(e.pinned))K(n,e.pinned,s)}},n("button",{class:{[`${p}__order-btn`]:true,[`${p}__cell-content`]:true},onClick:r},L(t),!!t.filter&&n("nano-icon",{name:"light/filter"}),!!t.order&&(t.order==="desc"?n("nano-icon",{name:"solid/long-arrow-down"}):n("nano-icon",{name:"solid/long-arrow-up"})),n("div",{class:`${p}__status-icons`},n("nano-icon",{name:"light/chevron-down"}))))}return n("th",{...d,ref:n=>{if(["end","start"].includes(t.pinned))G(n,t.pinned,s);if(["top","bottom"].includes(e.pinned))K(n,e.pinned,s)}},n("div",{class:`${p}__cell-content`},L(t),!!t.filter&&n("nano-icon",{name:"light/bars-filter"})))};const Y=({rowIndex:t,colIndex:e,nestedContent:o})=>{const s=o||J(t,e);if(!s)return n(i,null);const r=q();const a=r.config.state.columns[e];let l="td";let d=D(t,e,{class:{[`${p}__td`]:true,[`${p}__ordered`]:!!a.order,[`${p}__pin`]:!!a.pinned,[`${p}__pin--start`]:a.pinned==="start",[`${p}__pin--end`]:a.pinned==="end"}});if(a.rowHeader){d=Number(d.rowspan)>1?{...d,scope:"rowgroup"}:{...d,scope:"row"};l="th"}return n(l,{...d},n("div",{class:`${p}__cell-content`},s))};const Z=(()=>{let t;let n;let i;let e;const o=60;const s=()=>{t=null;e=0};s();return()=>{n=window.scrollY;if(t!=null)e=n-t;t=n;window.clearTimeout(i);i=window.setTimeout(s,o);return e}})();function tt(t){let n=getComputedStyle(t);const i=n.position==="absolute";const e=/(auto|scroll)/;if(n.position==="fixed")return document.documentElement;for(let o=t;o=o.parentElement;){n=getComputedStyle(o);if(i&&n.position==="static"){continue}if(e.test(n.overflow+n.overflowY+n.overflowX))return o}return document.documentElement}function nt(t,n=100){const i=t.getBoundingClientRect();const e=window.innerHeight||document.documentElement.clientHeight;if(!i.bottom&&!i.top&&!i.left&&!i.right&&!i.height&&!i.width&&!i.x&&!i.y)return false;return!(Math.floor(100-(i.top>=0?0:i.top)/+-i.height*100)<n||Math.floor(100-(i.bottom-e)/i.height*100)<n)}const it=':host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@charset "UTF-8";nano-table{display:block;width:100%;--max-col-width:200px;--color:var(--nano-color-mediumgrey, #68767e);--font-size:0.87rem;--cell-line-height:1.5;--thead-font-size:0.95rem;--border-color:#dddbda;--border-style:thin solid var(--border-color);--border-tint-color:#0084a9;--border-tint-style:3px solid var(--border-tint-color);--cell-bg-rgb:var(--nano-color-white-rgb, 255 255 255);--head-bg-rgb:250, 250, 249;--foot-bg-rgb:var(--head-bg-rgb);--th-row-bg-rgb:var(--cell-bg-rgb);--ordered-bg-rgb:var(--nano-color-offwhite-rgb, 249 249 251);--td-padding-start:0.625rem;--td-padding-end:0.625rem;--td-padding-top:0.5rem;--td-padding-bottom:0.4125rem;--th-padding-start:0.625rem;--th-padding-end:0.625rem;--th-padding-top:0.875rem;--th-padding-bottom:0.6875rem;--td-padding-v:var(--td-padding-top) var(--td-padding-bottom);--td-padding-h:var(--td-padding-start) var(--td-padding-end);--th-padding-v:var(--th-padding-top) var(--th-padding-bottom);--th-padding-h:var(--th-padding-start) var(--th-padding-end);--foot-th-padding-v:var(--th-padding-top) var(--th-padding-bottom);--foot-th-padding-h:var(--th-padding-start) var(--th-padding-end);--head-th-padding-v:var(--th-padding-top) var(--th-padding-bottom);--head-th-padding-h:var(--th-padding-start) var(--th-padding-end);--bookend-col-padding:2rem}.nano-tbl{color:var(--color);text-align:start;width:100%;font-size:var(--font-size);border-spacing:0 0;border-collapse:separate;background:rgb(var(--cell-bg-rgb));border-inline-end:1px solid transparent;border-block-start:1px solid transparent;position:relative;z-index:1}.nano-tbl__wrap{display:table;min-width:100%}.nano-tbl__top-anchor{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;position:relative}.nano-tbl__ordered{background-color:var(--ordered-bg);border-inline-start:var(--border-style);border-inline-end:var(--border-style)}.nano-tbl__order-btn{padding:0;border:none;outline:none;font:inherit;background:none;-webkit-appearance:none;appearance:none;color:inherit;display:flex;gap:10px;align-items:center;width:100%}.nano-tbl__status-icons{margin-inline:auto 10px;display:flex;gap:10px}.nano-tbl__progress-bar{font-size:0.2rem;position:sticky;inset-block-start:0;inset-inline:0;z-index:10;transition:scale 0.25s;scale:0;width:100%;height:0}.nano-tbl__progress-bar--show{scale:1;height:auto}.nano-tbl__caption--hide{clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);block-size:1px;inline-size:1px;margin:-1px;overflow:hidden;padding:0;position:absolute}.nano-tbl__td,.nano-tbl__th{line-height:var(--cell-line-height);text-align:start;border-block-start:var(--border-style);max-width:var(--max-col-width);background-color:rgb(var(--cell-bg-rgb))}tbody:first-of-type tr:first-child .nano-tbl__td,tbody:first-of-type tr:first-child .nano-tbl__th{border-block-start:none}tbody:last-of-type tr:last-child .nano-tbl__td,tbody:last-of-type tr:last-child .nano-tbl__th{border-block-end:var(--border-style)}.md .nano-tbl__td:first-child .nano-tbl__cell-content,.md .nano-tbl__th:first-child .nano-tbl__cell-content{padding-inline-start:var(--bookend-col-padding)}.md .nano-tbl__td:last-child .nano-tbl__cell-content,.md .nano-tbl__th:last-child .nano-tbl__cell-content{padding-inline-end:var(--bookend-col-padding)}@media (max-width: 768px){.nano-tbl__td:first-child .nano-tbl__cell-content,.nano-tbl__th:first-child .nano-tbl__cell-content{padding-inline-start:var(--td-padding-start) !important}.nano-tbl__td:last-child .nano-tbl__cell-content,.nano-tbl__th:last-child .nano-tbl__cell-content{padding-inline-end:var(--td-padding-end) !important}}thead .nano-tbl__td,thead .nano-tbl__th{font-weight:800;background:rgba(var(--head-bg-rgb), 90%);font-size:var(--thead-font-size);border-block-start:none}thead .nano-tbl__td .nano-tbl__cell-content,thead .nano-tbl__th .nano-tbl__cell-content{padding-block:var(--head-th-padding-v);padding-inline:var(--head-th-padding-h)}tfoot .nano-tbl__td,tfoot .nano-tbl__th{font-weight:800;border-block-end:none;background:rgba(var(--foot-bg-rgb), 90%);font-size:var(--thead-font-size)}tfoot .nano-tbl__td .nano-tbl__cell-content,tfoot .nano-tbl__th .nano-tbl__cell-content{padding-block:var(--foot-th-padding-v);padding-inline:var(--foot-th-padding-h)}.nano-tbl__td.nano-tbl__ordered,.nano-tbl__th.nano-tbl__ordered{background-color:rgba(var(--ordered-bg-rgb), 0.8) !important}.nano-tbl__cell-content{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-block:var(--td-padding-v);padding-inline:var(--td-padding-h)}.nano-tbl tbody{will-change:scroll-position;visibility:visible}.nano-tbl tbody.nano-tbl__inactive{visibility:hidden}.nano-tbl th[scope=row]{font-weight:800;margin:0}.sm .nano-tbl th[scope=row]{max-width:65vw !important}.nano-tbl__pin{position:sticky;z-index:1}.nano-tbl__pin--start{inset-inline:-1px auto;transition:max-width 0.25s}.nano-tbl__pin--start::after{content:"";position:absolute;inset:0;box-shadow:5px 1px 4px 0 rgba(0, 0, 0, 0.2);opacity:0;z-index:-1}.nano-tbl__pinned--start .nano-tbl__pin--start{z-index:2;max-width:125px}.sm .nano-tbl__pinned--start .nano-tbl__pin--start{max-width:var(--max-col-width)}.nano-tbl__pinned--start .nano-tbl__pin--start::after{opacity:1}.nano-tbl__pin--end{}.nano-tbl__pin--start+.nano-tbl__pin--end{inset-inline:auto auto}.nano-tbl__pin--start+.nano-tbl__pin--end::after{display:none}.sm .nano-tbl__pin--end{inset-inline:auto -1px !important;max-width:min(50vw, 200px)}.sm .nano-tbl__pin--end::after{display:block !important;content:"";position:absolute;inset:0;box-shadow:-5px 1px 4px 0 rgba(0, 0, 0, 0.2);opacity:0;z-index:-1}.sm .nano-tbl__pinned--end .nano-tbl__pin--end{z-index:3}.sm .nano-tbl__pinned--end .nano-tbl__pin--end::after{opacity:1}.nano-tbl__pin--top{inset-block:-1px auto}.nano-tbl__pinned--top .nano-tbl__pin--top{z-index:4}.nano-tbl__pin--bottom{inset-block:auto -1px}.nano-tbl__pinned--bottom .nano-tbl__pin--bottom{z-index:5;border-block-start:var(--border-tint-style) !important}.nano-tbl__pinned--top.nano-tbl__pinned--start .nano-tbl__pin--top.nano-tbl__pin--start{z-index:6}.nano-tbl__pinned--top.nano-tbl__pinned--end .nano-tbl__pin--top.nano-tbl__pin--end{z-index:6}.nano-tbl__pinned--bottom.nano-tbl__pinned--start .nano-tbl__pin--bottom.nano-tbl__pin--start{z-index:6}.nano-tbl__pinned--bottom.nano-tbl__pinned--end .nano-tbl__pin--bottom.nano-tbl__pin--end{z-index:6}.nano-tbl thead tr:last-of-type td,.nano-tbl thead tr:last-of-type th{border-block-end:var(--border-tint-style)}.nano-tbl tfoot tr:first-of-type td,.nano-tbl tfoot tr:first-of-type th{border-block-start:none}.nano-tbl .unlimited-width{max-width:none}.nano-tbl__spinner{font-size:1.5rem;transition:scale 0.25s;scale:0;padding:0.5rem;position:absolute;inset-block-end:0;inset-inline-start:calc(50% - 0.75rem);z-index:0}.nano-tbl__spinner--show{scale:1;position:sticky}.nano-tbl nano-skeleton{line-height:var(--cell-line-height)}';let et=0;const ot=class{constructor(t){s(this,t);this.nanoTblBlockRendered=r(this,"nanoTblBlockRendered",7);this.nanoTblReady=r(this,"nanoTblReady",7);this.nanoTblBeforeSort=r(this,"nanoTblBeforeSort",7);this.nanoTblAfterSort=r(this,"nanoTblAfterSort",7);this.nanoTblBeforeFilter=r(this,"nanoTblBeforeFilter",7);this.nanoTblAfterFilter=r(this,"nanoTblAfterFilter",7);this.nanoTblBeforeSearch=r(this,"nanoTblBeforeSearch",7);this.nanoTblAfterSearch=r(this,"nanoTblAfterSearch",7);this.debounceSetLoading=t=>{this._loading=!!this.store.data.state.rows.length?t:true};this.renderId="tbl-"+et++;this.filters=[];this.currentFilters="";this.currentSort="";this.blockIos=new WeakMap;this.blockHeights=[];this.unitHeight=0;this.ignoreIO=true;this._isReady=false;this.sortStart=async(t,n,i)=>{if(this.currentSort===t+":"+n)return;this.loading=true;const e=this.nanoTblBeforeSort.emit({column:n,order:t});if(e.defaultPrevented)return;this.currentSort=t+":"+n;this.scrollToTop(i);if(this.customSortFn){try{await this.customSortFn(n,t);this.sortComplete(t,n)}catch(t){console.warn("custom sort failed",t)}return}try{await B(this.host,n,t);this.sortComplete(t,n)}catch(t){console.warn("sort failed",t);this.currentSort=""}finally{this.loading=false}};this.setupBlockIO=(t,n)=>{if(!t||this.blockIos.has(t))return;const i=new IntersectionObserver((([i])=>{if(this.ignoreIO)return;if(i.isIntersecting){a((()=>{if(this.scrollSpeed<100||nt(t,.01)){this.activeBlocks=[n,n+1,Math.max(0,n-1)];this.nanoTblBlockRendered.emit({block:n,totalBlocks:this.blockElements.length});requestAnimationFrame((()=>this.setBlockHeight()))}}))}}),{threshold:[0],root:this.scrollParent===document.scrollingElement?null:this.scrollParent});i.observe(t);this.blockIos.set(t,i)};this.handleColumnPinned=t=>{Object.entries(t).forEach((([t,n])=>{this.tableEle.classList.toggle(`${p}__pinned--${t}`,n)}))};this.type="table";this.caption=undefined;this.showCaption=false;this._loading=false;this.placeholderSize=5;this.rows=undefined;this.columns=[];this.headRender={pinned:"top"};this.rowRender=undefined;this.footRender={pinned:"bottom"};this.showFooter=false;this.perBlock=60;this.searchTerm=undefined;this.customFilterFn=undefined;this.customSortFn=undefined;this.blocks=[];this.activeBlocks=[0,1,2];this.measureHeight=0;this.debounceSetLoading=c(this.debounceSetLoading.bind(this),50)}get loading(){return this._loading}set loading(t){this.debounceSetLoading(t)}handleRowsChange(){if(!this.rows){this.loading=true;return}this.loading=true;Promise.resolve(this.rows).then((async t=>{await j(this.host,t);this.currentFilters="";this.currentSort="";await this.columnInit();if(!this.isReady){this.setInitialBlockDimension()}this.loading=false}))}async handleColsChange(){await M(this.host,this.columns);if(this.isReady)this.columnInit()}get blocksLength(){return this.blocks.length}handleSearchTermChange(){this.searchStart()}async resetSorting(){const t=this.columns.find((t=>!!t.order));if(!t)return;return this.sortStart(null,t.prop)}async addSort(t,n){const i=this.columns.find((n=>n.prop===t));if(!i)throw"Cannot find column with "+t;return this.sortStart(n,i.prop)}async resetFilters(){this.filters=[];return this.filterStart()}async addFilters(t,n=true){if(!n)this.filters=[];return this.filterStart(t,n)}set measureEle(t){if(!t)return;this.measureHeight=t.getBoundingClientRect().height;this.unitHeight=t.querySelector("tr")?.getBoundingClientRect().height||this.unitHeight}get isReady(){return this._isReady}set isReady(t){if(t===this._isReady)return;this._isReady=t;if(this.isReady)requestAnimationFrame((()=>this.handleReady()))}scrollListener(){const t=Z();this.scrollSpeed=t<0?t*-1:t}handleReady(){const t=window.location.hash;if(t.length>1){const n=document.querySelector(t);if(n){n.scrollIntoView()}}this.nanoTblReady.emit()}sortComplete(t,n){this.columns=this.columns.map((i=>{if(i.prop===n)return{...i,order:t};return{...i,order:null}}));this.nanoTblAfterSort.emit({column:n,order:t})}async searchStart(){this.loading=true;const t=this.nanoTblBeforeSearch.emit({term:this.searchTerm});if(t.defaultPrevented)return;this.scrollToTop();try{await F(this.host,this.searchTerm);this.nanoTblAfterSearch.emit({term:this.searchTerm})}catch(t){console.warn("search failed",t)}finally{this.loading=false}}async filterStart(t,n=true){if(t){if(n){this.filters=[...this.filters.filter((n=>!t.find((t=>t.prop===n.prop)))),...t]}else{this.filters=t}}if(this.currentFilters===JSON.stringify(this.filters))return;this.loading=true;const i=this.nanoTblBeforeFilter.emit({filters:this.filters});if(i.defaultPrevented)return;this.currentFilters=JSON.stringify(this.filters);this.scrollToTop();if(this.customFilterFn){try{await this.customFilterFn(this.filters);this.filterComplete()}catch(t){console.warn("custom filter failed",t);this.currentFilters=""}return}try{await A(this.host,this.filters);this.filterComplete()}catch(t){console.warn("filter failed",t)}finally{this.loading=false}}filterComplete(){this.columns=this.columns.map((t=>{const n=this.filters.find((n=>n.prop===t.prop));if(n)t.filter=n.filter;return t}));this.nanoTblAfterFilter.emit({filters:this.filters})}scrollToTop(t){const n=this.scrollParent.style?.scrollBehavior;const i=this.scrollParent.scrollLeft;this.scrollParent.style.scrollBehavior="auto";if(this.topAnchorEle&&!nt(this.topAnchorEle,.1)){this.host.scrollIntoView()}if(t&&!nt(t,1))setTimeout((()=>t.scrollIntoView({block:"start"})),500);if(i)this.scrollParent.scrollLeft=i;if(n)this.scrollParent.style.scrollBehavior=n}setMeasureElement(){a((()=>{this.measureEle=this.blockElements.find((t=>!t?.classList?.contains(`${p}__inactive`)))}))}setInitialBlockDimension(){if(!this.blockElements?.length)return;const t=new Promise((t=>{a((()=>{this.setMeasureElement();if(!this.measureEle&&!this.unitHeight)t();this.blockElements.forEach(((n,i)=>{if(!n||!n.classList?.contains(`${p}__inactive`)){if(i===this.blockElements.length-1)t();return}if(i===this.blockElements.length-1)t()}))}))}));t.then((()=>{requestAnimationFrame((()=>{this.isReady=true}))}))}async columnInit(){this.filters=this.columns.filter((t=>!!t.filter)).map((t=>{const{filter:n,prop:i}=t;return{filter:n,prop:i}}));if(this.searchTerm){await this.searchStart()}if(this.filters.length){await this.filterStart()}const t=this.columns.find((t=>!!t.order));if(!!t){await this.sortStart(t.order,t.prop)}}setBlocks(){this.activeBlocks=[0,1,2];this.ignoreIO=true;let t=1;const n=this.store.data.state.rows.length;let i=[];const e=[];this.blockHeights=[];for(t;t<=n;t++){i.push(this.store.data.state.rows[t-1]);if(t%this.perBlock===0){e.push({rows:i,__uuid:d(i.map((t=>t.__uuid)).join())});i=[]}}if(i.length)e.push({rows:i,__uuid:d(i.map((t=>t.__uuid)).join())});this.blocks=e}getBlockHeight(t){if(this.activeBlocks.includes(t))return undefined;if(this.blockHeights.length){const n=this.blockHeights.find((n=>n.blockIndex===t));if(n)return n.height+"px"}const n=this.blocks[t].rows.length;if(n===this.perBlock&&this.measureHeight){return this.measureHeight+"px"}return this.unitHeight?this.unitHeight*n+"px":undefined}setBlockHeight(){a((()=>{this.activeBlocks.forEach((t=>{const n=this.blockElements[t];if(!n)return;const i=n.getBoundingClientRect().height;const e=this.blockHeights.findIndex((n=>n.blockIndex===t));if(e>0){this.blockHeights[e]={height:i,blockIndex:t}}else this.blockHeights.push({height:i,blockIndex:t})}))}))}processSlots(){if(!this.caption&&!this.host.querySelector('[slot="caption"]')){console.error("For accessibility you must set a `title` prop or use the `caption` slot")}}async componentWillLoad(){this.store=await R(this.host,this.columns,this.scrollParent);await this.handleRowsChange();this.processSlots();this.setBlocks();this.store.data.onChange("rows",(()=>this.setBlocks()))}connectedCallback(){a((()=>this.scrollParent=tt(this.host)))}componentDidLoad(){this.setInitialBlockDimension()}componentShouldUpdate(t,n,i){if(["rows","columns"].includes(i))return false}componentWillRender(){}componentDidRender(){requestAnimationFrame((()=>this.ignoreIO=false));this.setMeasureElement()}render(){this.blockElements=[];return n(l,null,n("div",{class:`${p}__top-anchor`,ref:t=>this.topAnchorEle=t}," "),n("nano-resize-observe",{"aria-labelledby":"table-caption-"+this.renderId,tabindex:this.type==="grid"?"0":undefined,states:"576w sm, 768w md",class:"sm md"},n("div",{class:`${p}__wrap`},n("nano-progress-bar",{indeterminate:true,class:{[`${p}__progress-bar`]:true,[`${p}__progress-bar--show`]:this._loading}}),n("table",{role:this.type==="grid"?"grid":undefined,"aria-readonly":this.type==="table"?"true":undefined,"aria-rowcount":this.store.data.state.rows.length,"aria-colcount":this.store.config.state.columns.length,class:`${p}`,ref:t=>this.tableEle=t},n("caption",{class:{[`${p}__caption`]:true,[`${p}__caption--hide`]:!this.showCaption},id:"table-caption-"+this.renderId},n("slot",{name:"caption"},this.caption)),n("thead",null,n(V,{rowRenderer:this.headRender,onColumnPinned:this.handleColumnPinned},this.store.config.state.columns.map((t=>[n(X,{column:t,headRenderer:this.headRender,onColumnOrderClick:this.sortStart,onColumnPinned:this.handleColumnPinned})])))),this._loading&&!this.blocks.length&&n("tbody",{class:`${p}__active`},[...Array(10).keys()].map((t=>n("tr",null,this.store.config.state.columns.map(((i,e)=>n(Y,{rowIndex:t,colIndex:e,nestedContent:n("nano-skeleton",null)}))))))),this.blocks.map(((t,i)=>n("tbody",{key:t.__uuid,id:`tbody-${this.renderId}-${i}`,ref:t=>{this.blockElements.push(t);this.setupBlockIO(t,i)},class:{[`${p}__inactive`]:!this.activeBlocks.includes(i),[`${p}__active`]:this.activeBlocks.includes(i)}},this.activeBlocks.includes(i)?t.rows.map(((t,e)=>{const o=i>0?i*this.perBlock+e:e;return n(Q,{rowRenderer:this.rowRender,row:t},this.store.config.state.columns.map(((t,i)=>n(Y,{rowIndex:o,colIndex:i}))))})):n("td",{colSpan:this.store.config.state.columns.length,style:{height:this.getBlockHeight(i)}})))),this.showFooter&&n("tfoot",null,n(V,{rowRenderer:this.footRender,onColumnPinned:this.handleColumnPinned},this.store.config.state.columns.map((t=>[n(X,{column:t,headRenderer:this.footRender,onColumnPinned:this.handleColumnPinned,onColumnOrderClick:this.sortStart})]))))),!!this.blocks.length&&n("nano-spinner",{type:"circle",class:{[`${p}__spinner`]:true,[`${p}__spinner--show`]:this._loading}}))))}get host(){return e(this)}static get watchers(){return{rows:["handleRowsChange"],columns:["handleColsChange"],searchTerm:["handleSearchTermChange"]}}};ot.style=it;export{ot as T,w as c};
5
+ //# sourceMappingURL=p-11d3a90b.js.map