@daisforge/ui 1.17.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/{AnalyticalWidget-BWcBjoNh.mjs → AnalyticalWidget-Cdo6_s1Y.mjs} +165 -163
- package/chunks/AnalyticalWidget-wke3Jm3X.cjs +43 -0
- package/chunks/{ApprovalCenter-CGs7n-2C.cjs → ApprovalCenter-CAcC43zn.cjs} +1 -1
- package/chunks/{ApprovalCenter-BqN8Zjol.mjs → ApprovalCenter-DxcvzR8q.mjs} +1 -1
- package/chunks/{BlockTitle-o2QTRA7D.cjs → BlockTitle-BEIxiECX.cjs} +1 -1
- package/chunks/{BlockTitle-BM2EE1b1.mjs → BlockTitle-BZxOEdTc.mjs} +1 -1
- package/chunks/{FiltersActions-CKimtYsU.cjs → FiltersActions-BKJJH6Mu.cjs} +1 -1
- package/chunks/{FiltersActions-C5OGUDDx.mjs → FiltersActions-CFStLRsU.mjs} +3 -3
- package/chunks/{GridDND-DkL6-TgS.cjs → GridDND-DV-1g1sI.cjs} +1 -1
- package/chunks/{GridDND-D9T2wqLt.mjs → GridDND-UMUi8M_Q.mjs} +1 -1
- package/chunks/{ListOfFilters-B8XF6KiI.cjs → ListOfFilters-DJvnT9kw.cjs} +1 -1
- package/chunks/{ListOfFilters-BEDW_v5t.mjs → ListOfFilters-DTAZ3wfQ.mjs} +2 -2
- package/chunks/{MassActions-C66ulAuq.mjs → MassActions-DSAaO1-u.mjs} +2 -2
- package/chunks/{MassActions-BHNmuh3s.cjs → MassActions-Z-48g81T.cjs} +1 -1
- package/chunks/{PageTitle-BEdQpyZh.cjs → PageTitle-Bh3g6FUT.cjs} +1 -1
- package/chunks/{PageTitle-BVbWaV52.mjs → PageTitle-CaqXfrrQ.mjs} +1 -1
- package/chunks/{Stories-DVh7iByM.cjs → Stories-CZXv_Ves.cjs} +1 -1
- package/chunks/{Stories-lNAuXVJN.mjs → Stories-Dlwle-SM.mjs} +1 -1
- package/chunks/{Table-C_1QGsh8.mjs → Table-B9OAyWAW.mjs} +4 -4
- package/chunks/{Table-C-lLZklk.cjs → Table-BwhzcFX1.cjs} +1 -1
- package/chunks/{TableCanvas--g37wjRi.mjs → TableCanvas-DcoUBrgC.mjs} +5315 -4827
- package/chunks/TableCanvas-MMWMrYiV.cjs +30 -0
- package/chunks/{TableGlide-Cjcw7Wur.mjs → TableGlide-Ch-gaROR.mjs} +1982 -1852
- package/chunks/TableGlide-TYzM2bEB.cjs +1 -0
- package/components/AiAgentPopover/AiAgentPopover.styled.d.ts +1 -0
- package/components/AnalyticalWidget/AnalyticalWidget.d.ts +5 -3
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/AnalyticalWidgetIconButtonDots.d.ts +69 -11
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetButtons/index.mjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetChips/index.mjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.cjs +1 -1
- package/components/AnalyticalWidget/components/AnalyticalWidgetHeader/index.mjs +1 -1
- package/components/AnalyticalWidget/index.cjs +1 -1
- package/components/AnalyticalWidget/index.mjs +1 -1
- package/components/ApprovalCenter/components/index.cjs +1 -1
- package/components/ApprovalCenter/components/index.mjs +1 -1
- package/components/ApprovalCenter/index.cjs +1 -1
- package/components/ApprovalCenter/index.mjs +1 -1
- package/components/ApprovalCenter/styled.d.ts +1 -0
- package/components/AutocompleteSearch/index.cjs +1 -1
- package/components/AutocompleteSearch/index.mjs +1 -1
- package/components/BlockTitle/index.cjs +1 -1
- package/components/BlockTitle/index.mjs +1 -1
- package/components/BlockTitle/utils/index.cjs +1 -1
- package/components/BlockTitle/utils/index.mjs +1 -1
- package/components/Combobox/index.cjs +1 -1
- package/components/Combobox/index.mjs +1 -1
- package/components/DrawerDF/components/styled.d.ts +1 -0
- package/components/GridDND/index.cjs +1 -1
- package/components/GridDND/index.mjs +1 -1
- package/components/GridDND/utils/index.cjs +1 -1
- package/components/GridDND/utils/index.mjs +1 -1
- package/components/LeftPanel/styled.d.ts +1 -0
- package/components/ListOfFilters/index.cjs +1 -1
- package/components/ListOfFilters/index.mjs +1 -1
- package/components/MassActions/hooks/index.cjs +1 -1
- package/components/MassActions/hooks/index.mjs +1 -1
- package/components/MassActions/index.cjs +1 -1
- package/components/MassActions/index.mjs +1 -1
- package/components/MassActions/styled.d.ts +7 -2
- package/components/PageTitle/index.cjs +1 -1
- package/components/PageTitle/index.mjs +1 -1
- package/components/PageTitle/utils/index.cjs +1 -1
- package/components/PageTitle/utils/index.mjs +1 -1
- package/components/PopoverDF/index.cjs +1 -1
- package/components/PopoverDF/index.mjs +1 -1
- package/components/PopupDF/index.cjs +1 -1
- package/components/PopupDF/index.d.ts +1 -1
- package/components/PopupDF/index.mjs +108 -94
- package/components/PopupDF/types.d.ts +1 -1
- package/components/Stories/components/StoriesBanner/index.cjs +1 -1
- package/components/Stories/components/StoriesBanner/index.mjs +1 -1
- package/components/Stories/components/StoriesContent/index.cjs +1 -1
- package/components/Stories/components/StoriesContent/index.mjs +1 -1
- package/components/Stories/components/StoriesPreview/index.cjs +1 -1
- package/components/Stories/components/StoriesPreview/index.mjs +1 -1
- package/components/Stories/components/StoriesProgress/index.cjs +1 -1
- package/components/Stories/components/StoriesProgress/index.mjs +1 -1
- package/components/Stories/components/StoriesViewer/index.cjs +1 -1
- package/components/Stories/components/StoriesViewer/index.mjs +1 -1
- package/components/Stories/index.cjs +1 -1
- package/components/Stories/index.mjs +1 -1
- package/components/Table/components/TableDropdown/index.cjs +1 -1
- package/components/Table/components/TableDropdown/index.mjs +1 -1
- package/components/Table/feature-collapse-table/CollapseTableButton.d.ts +2 -0
- package/components/Table/feature-collapse-table/index.cjs +1 -1
- package/components/Table/feature-collapse-table/index.mjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.mjs +1 -1
- package/components/Table/feature-column-control/index.cjs +1 -1
- package/components/Table/feature-column-control/index.mjs +1 -1
- package/components/Table/feature-column-control/styled.d.ts +1 -0
- package/components/Table/feature-columns-grouping/index.cjs +1 -1
- package/components/Table/feature-columns-grouping/index.mjs +1 -1
- package/components/Table/feature-context-menu/index.cjs +1 -1
- package/components/Table/feature-context-menu/index.mjs +1 -1
- package/components/Table/feature-edit/index.cjs +1 -1
- package/components/Table/feature-edit/index.mjs +1 -1
- package/components/Table/feature-filtering/combobox/index.cjs +1 -1
- package/components/Table/feature-filtering/combobox/index.mjs +1 -1
- package/components/Table/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/Table/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/Table/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/Table/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/Table/feature-filtering/header-filter-button/styles.d.ts +1 -0
- package/components/Table/feature-filtering/index.cjs +1 -1
- package/components/Table/feature-filtering/index.mjs +1 -1
- package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +1 -1
- package/components/Table/feature-infinity-scroll/index.cjs +1 -1
- package/components/Table/feature-infinity-scroll/index.mjs +1 -1
- package/components/Table/feature-key-text/index.cjs +1 -1
- package/components/Table/feature-key-text/index.mjs +1 -1
- package/components/Table/feature-pagination/index.cjs +1 -1
- package/components/Table/feature-pagination/index.mjs +1 -1
- package/components/Table/feature-right-sidebar/index.cjs +1 -1
- package/components/Table/feature-right-sidebar/index.mjs +1 -1
- package/components/Table/feature-row-detail/handlers.d.ts +1 -0
- package/components/Table/feature-row-detail/index.cjs +1 -1
- package/components/Table/feature-row-detail/index.mjs +1 -1
- package/components/Table/feature-row-instruments/index.cjs +1 -1
- package/components/Table/feature-row-instruments/index.mjs +1 -1
- package/components/Table/feature-row-size/index.cjs +1 -1
- package/components/Table/feature-row-size/index.mjs +1 -1
- package/components/Table/feature-rows-grouping/index.cjs +1 -1
- package/components/Table/feature-rows-grouping/index.mjs +1 -1
- package/components/Table/feature-searching/index.cjs +1 -1
- package/components/Table/feature-searching/index.mjs +1 -1
- package/components/Table/feature-searching/styled.d.ts +1 -0
- package/components/Table/feature-select-row/index.cjs +1 -1
- package/components/Table/feature-select-row/index.mjs +1 -1
- package/components/Table/feature-sorting/index.cjs +1 -1
- package/components/Table/feature-sorting/index.mjs +1 -1
- package/components/Table/feature-sorting/styles.d.ts +1 -0
- package/components/Table/feature-table-settings/index.cjs +1 -1
- package/components/Table/feature-table-settings/index.mjs +1 -1
- package/components/Table/feature-tree/index.cjs +1 -1
- package/components/Table/feature-tree/index.mjs +1 -1
- package/components/Table/index.cjs +1 -1
- package/components/Table/index.mjs +1 -1
- package/components/Table/renders/formatCell/index.cjs +1 -1
- package/components/Table/renders/formatCell/index.mjs +1 -1
- package/components/Table/styles/index.cjs +1 -1
- package/components/Table/styles/index.mjs +1 -1
- package/components/Table/table-hooks/index.cjs +1 -1
- package/components/Table/table-hooks/index.mjs +1 -1
- package/components/Table/types/index.cjs +1 -1
- package/components/Table/types/index.mjs +1 -1
- package/components/Table/utils/index.cjs +1 -1
- package/components/Table/utils/index.mjs +1 -1
- package/components/Table/widgets/control-block/control-block-button.d.ts +3 -2
- package/components/Table/widgets/control-block/index.cjs +1 -1
- package/components/Table/widgets/control-block/index.mjs +1 -1
- package/components/Table/widgets/control-block/right-side/index.cjs +1 -1
- package/components/Table/widgets/control-block/right-side/index.mjs +1 -1
- package/components/Table/widgets/index.cjs +1 -1
- package/components/Table/widgets/index.mjs +1 -1
- package/components/Table/widgets/mass-actions/index.cjs +1 -1
- package/components/Table/widgets/mass-actions/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/column/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/adapters/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/index.mjs +2 -2
- package/components/TableCanvas/TableGlideInstance/type.d.ts +3 -1
- package/components/TableCanvas/TableGlideInstance/utils/column/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/column/index.mjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/index.cjs +1 -1
- package/components/TableCanvas/TableGlideInstance/utils/index.mjs +1 -1
- package/components/TableCanvas/components/SplitIconButton/index.cjs +1 -1
- package/components/TableCanvas/components/SplitIconButton/index.mjs +1 -1
- package/components/TableCanvas/components/TableDropdown/index.cjs +1 -1
- package/components/TableCanvas/components/TableDropdown/index.mjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.mjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/types.d.ts +1 -1
- package/components/TableCanvas/feature-cell-transfer/utils/applyBlockEdit.d.ts +12 -0
- package/components/TableCanvas/feature-cell-transfer/utils/applyValuesToRows.d.ts +2 -1
- package/components/TableCanvas/feature-cell-transfer/utils/collectMatrixFromTargets.d.ts +1 -0
- package/components/TableCanvas/feature-cell-transfer/utils/collectTextMatrix.d.ts +1 -0
- package/components/TableCanvas/feature-cell-transfer/utils/resolveBlockOrigin.d.ts +13 -0
- package/components/TableCanvas/feature-cell-transfer/utils/snapDestToRowBlocks.d.ts +4 -0
- package/components/TableCanvas/feature-collapse-table/CollapseTableButton.d.ts +3 -2
- package/components/TableCanvas/feature-collapse-table/index.cjs +1 -1
- package/components/TableCanvas/feature-collapse-table/index.mjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/ColumnsList/index.mjs +1 -1
- package/components/TableCanvas/feature-column-control/index.cjs +1 -1
- package/components/TableCanvas/feature-column-control/index.mjs +1 -1
- package/components/TableCanvas/feature-column-control/styled.d.ts +1 -0
- package/components/TableCanvas/feature-column-control/types.d.ts +3 -0
- package/components/TableCanvas/feature-columns-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-columns-grouping/useLastLvlColumnConfig.d.ts +5 -1
- package/components/TableCanvas/feature-content-state/index.cjs +1 -1
- package/components/TableCanvas/feature-content-state/index.mjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.cjs +1 -1
- package/components/TableCanvas/feature-context-menu/index.mjs +1 -1
- package/components/TableCanvas/feature-edit/index.cjs +1 -1
- package/components/TableCanvas/feature-edit/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/styles.d.ts +1 -0
- package/components/TableCanvas/feature-filtering/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/index.mjs +1 -1
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/sidebar-filter-block/index.mjs +1 -1
- package/components/TableCanvas/feature-infinity-scroll/index.cjs +1 -1
- package/components/TableCanvas/feature-infinity-scroll/index.mjs +1 -1
- package/components/TableCanvas/feature-key-text/index.cjs +1 -1
- package/components/TableCanvas/feature-key-text/index.mjs +1 -1
- package/components/TableCanvas/feature-notifications/index.cjs +1 -1
- package/components/TableCanvas/feature-notifications/index.mjs +1 -1
- package/components/TableCanvas/feature-pagination/index.cjs +1 -1
- package/components/TableCanvas/feature-pagination/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/context/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/context/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/hooks/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/index.mjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-popover-table/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.cjs +1 -1
- package/components/TableCanvas/feature-right-sidebar/index.mjs +1 -1
- package/components/TableCanvas/feature-row-detail/handlers.d.ts +1 -0
- package/components/TableCanvas/feature-row-detail/index.cjs +1 -1
- package/components/TableCanvas/feature-row-detail/index.mjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.cjs +1 -1
- package/components/TableCanvas/feature-row-instruments/index.mjs +1 -1
- package/components/TableCanvas/feature-row-markers/index.cjs +1 -1
- package/components/TableCanvas/feature-row-markers/index.mjs +1 -1
- package/components/TableCanvas/feature-row-size/index.cjs +1 -1
- package/components/TableCanvas/feature-row-size/index.mjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/getColsAfterRowsGrouping.d.ts +2 -1
- package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/mergedView.d.ts +14 -0
- package/components/TableCanvas/feature-rows-grouping/types.d.ts +4 -0
- package/components/TableCanvas/feature-searching/index.cjs +1 -1
- package/components/TableCanvas/feature-searching/index.mjs +1 -1
- package/components/TableCanvas/feature-searching/styled.d.ts +1 -0
- package/components/TableCanvas/feature-select-row/index.cjs +1 -1
- package/components/TableCanvas/feature-select-row/index.mjs +1 -1
- package/components/TableCanvas/feature-sorting/index.cjs +1 -1
- package/components/TableCanvas/feature-sorting/index.mjs +1 -1
- package/components/TableCanvas/feature-sorting/styles.d.ts +1 -0
- package/components/TableCanvas/feature-table-settings/index.cjs +1 -1
- package/components/TableCanvas/feature-table-settings/index.mjs +1 -1
- package/components/TableCanvas/feature-tooltip/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/index.mjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.mjs +1 -1
- package/components/TableCanvas/feature-tree/index.cjs +1 -1
- package/components/TableCanvas/feature-tree/index.mjs +1 -1
- package/components/TableCanvas/feature-tree/mergedSubRows.d.ts +5 -0
- package/components/TableCanvas/feature-tree/types.d.ts +2 -0
- package/components/TableCanvas/index.cjs +1 -1
- package/components/TableCanvas/index.mjs +4 -4
- package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
- package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
- package/components/TableCanvas/renders/rowIconConfig.d.ts +0 -5
- package/components/TableCanvas/renders/withSelectIcon.d.ts +3 -1
- package/components/TableCanvas/styles/index.cjs +1 -1
- package/components/TableCanvas/styles/index.mjs +1 -1
- package/components/TableCanvas/table-hooks/createMergeByValueRowSpan.d.ts +7 -0
- package/components/TableCanvas/table-hooks/createMergedRegionsResolver.d.ts +21 -0
- package/components/TableCanvas/table-hooks/index.cjs +1 -1
- package/components/TableCanvas/table-hooks/index.mjs +1 -1
- package/components/TableCanvas/table-hooks/resolveMergedView.d.ts +7 -0
- package/components/TableCanvas/table-hooks/usePrepareTableConfig.d.ts +4 -1
- package/components/TableCanvas/types/column-config-internal.type.d.ts +4 -1
- package/components/TableCanvas/types/column-config.type.d.ts +2 -0
- package/components/TableCanvas/types/ctxs.type.d.ts +2 -0
- package/components/TableCanvas/types/glide-type.d.ts +1 -1
- package/components/TableCanvas/types/index.cjs +1 -1
- package/components/TableCanvas/types/index.d.ts +1 -0
- package/components/TableCanvas/types/index.mjs +1 -1
- package/components/TableCanvas/types/merged-cells.type.d.ts +4 -0
- package/components/TableCanvas/types/table-config.type.d.ts +15 -0
- package/components/TableCanvas/utils/index.cjs +1 -1
- package/components/TableCanvas/utils/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/compression/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/control-block-button.d.ts +3 -2
- package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.mjs +1 -1
- package/components/TableCanvas/widgets/control-block/right-side/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/right-side/index.mjs +1 -1
- package/components/TableCanvas/widgets/index.cjs +1 -1
- package/components/TableCanvas/widgets/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/styled.d.ts +10 -4
- package/components/TableContract/index.cjs +1 -1
- package/components/TableContract/index.mjs +1 -1
- package/components/TableGlide/TableGlide.d.ts +1 -1
- package/components/TableGlide/hooks/selection/index.cjs +1 -1
- package/components/TableGlide/hooks/selection/index.mjs +1 -1
- package/components/TableGlide/hooks/useErrorCellRanges.d.ts +14 -0
- package/components/TableGlide/index.cjs +1 -1
- package/components/TableGlide/index.mjs +13 -13
- package/components/TableGlide/lib/canvas/cells/buttons/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/buttons/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/cells/iconSprites/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/iconSprites/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/cells/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/cells/renderer/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/cells/renderer/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/core/helpers/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/core/helpers/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/core/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/core/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/hooks/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/hooks/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/index.mjs +22 -22
- package/components/TableGlide/lib/canvas/miniflex/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/miniflex/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/primitives/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/primitives/index.mjs +1 -1
- package/components/TableGlide/lib/canvas/utils/index.cjs +1 -1
- package/components/TableGlide/lib/canvas/utils/index.mjs +2 -2
- package/components/TableGlide/theming/index.cjs +1 -1
- package/components/TableGlide/theming/index.mjs +1 -1
- package/components/TableGlide/types.d.ts +10 -0
- package/components/TableGlide/utils/findBlockOrigin.d.ts +5 -0
- package/components/TableGlide/utils/getRowSpan.d.ts +6 -0
- package/components/Tooltip/index.cjs +1 -1
- package/components/Tooltip/index.mjs +1 -1
- package/components/TourWidget/index.cjs +1 -1
- package/components/TourWidget/index.mjs +1 -1
- package/components/Typography/index.cjs +1 -1
- package/components/Typography/index.mjs +1 -1
- package/components/Widget/Widget.d.ts +1 -0
- package/components/Widget/components/WidgetIconButtonDots.d.ts +1 -0
- package/components/Widget/index.cjs +1 -1
- package/components/Widget/index.mjs +1 -1
- package/formComponents/FormCombobox/index.cjs +1 -1
- package/formComponents/FormCombobox/index.mjs +1 -1
- package/formComponents/FormDatePickers/FormDatePickerRange/ui/FormDatePickerRangeStyled.d.ts +2 -0
- package/formComponents/FormSwitch/index.cjs +1 -1
- package/formComponents/FormSwitch/index.mjs +1 -1
- package/formComponents/FormTextArea/ui/ButtonStyled.d.ts +1 -0
- package/formComponents/FormTextField/ui/IconButtonStyled.d.ts +1 -0
- package/index.cjs +1 -1
- package/index.mjs +11 -11
- package/layouts/FiltersActions/FiltersActions.d.ts +15 -6
- package/layouts/FiltersActions/components/FiltersButton.d.ts +4 -0
- package/layouts/FiltersActions/components/ResetAllFiltersButton.d.ts +6 -4
- package/layouts/FiltersActions/components/Tabs.d.ts +4 -2
- package/layouts/FiltersActions/hooks/index.cjs +1 -1
- package/layouts/FiltersActions/hooks/index.mjs +1 -1
- package/layouts/FiltersActions/index.cjs +1 -1
- package/layouts/FiltersActions/index.mjs +1 -1
- package/mcp-data/component-index.json +250 -80
- package/package.json +7 -6
- package/shared/ui/Search/styled.d.ts +1 -0
- package/chunks/AnalyticalWidget-z2HzQ4aA.cjs +0 -43
- package/chunks/TableCanvas-uzBMXlx6.cjs +0 -30
- package/chunks/TableGlide-DTBZ1jNA.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const L=require("@glideappsfinal/glide-data-grid"),xi=require("@salutejs/sdds-themes/tokens/sdds_finai"),nc=require("canvas-hypertxt"),m=require("react"),sc=require("react-dom/server"),xt=require("react/jsx-runtime");require("@glideappsfinal/glide-data-grid/dist/index.css");const Qt=require("./utils-CUW5bd8S.cjs"),We=require("react-dom"),_o=require("styled-components"),J={small:{rowHeight:20,cellVerticalPadding:4,cellHorizontalPadding:4,textfieldSize:"xs"},medium:{rowHeight:32,cellVerticalPadding:7,cellHorizontalPadding:8,textfieldSize:"s"},big:{rowHeight:48,cellVerticalPadding:12,cellHorizontalPadding:16,textfieldSize:"s"}},Ge=r=>J[r].rowHeight,wi=r=>J[r].textfieldSize,ko={small:J.small.rowHeight,medium:J.medium.rowHeight,big:J.big.rowHeight},cc={kind:L.GridCellKind.Text,data:"",displayData:"",allowOverlay:!0,readonly:!0},Mo={big:{cellVerticalPadding:J.big.cellVerticalPadding,cellHorizontalPadding:J.big.cellHorizontalPadding,textfieldSize:J.big.textfieldSize},medium:{cellVerticalPadding:J.medium.cellVerticalPadding,cellHorizontalPadding:J.medium.cellHorizontalPadding,textfieldSize:J.medium.textfieldSize},small:{cellVerticalPadding:J.small.cellVerticalPadding,cellHorizontalPadding:J.small.cellHorizontalPadding,textfieldSize:J.small.textfieldSize}},Ai={"padding-block":"0px","padding-inline":"0px"},Yt=r=>`${r}px`,ac={small:{rowHeight:Ge("small"),cell:{"padding-block":Yt(J.small.cellVerticalPadding),"padding-inline":Yt(J.small.cellHorizontalPadding)},editorCell:Ai,input:wi("small"),icon:"xs",combobox:"s",checkboxOfCombobox:"s",switch:"s",font:()=>xi.bodyXXS},medium:{rowHeight:Ge("medium"),cell:{"padding-block":Yt(J.medium.cellVerticalPadding),"padding-inline":Yt(J.medium.cellHorizontalPadding)},editorCell:Ai,input:wi("medium"),icon:"s",combobox:"m",checkboxOfCombobox:"m",switch:"s",font:()=>xi.bodyS},big:{rowHeight:Ge("big"),cell:{"padding-block":Yt(J.big.cellVerticalPadding),"padding-inline":Yt(J.big.cellHorizontalPadding)},editorCell:Ai,input:wi("big"),icon:"m",combobox:"l",checkboxOfCombobox:"l",switch:"l",font:()=>xi.bodyM}},Ve=33,lc={bodyM:{"font-size":"1rem","font-weight":400,"line-height":"1.25rem","bold-font-size":"1rem","bold-font-weight":600,"bold-line-height":"1.25rem"},bodyS:{"font-size":"0.875rem","font-weight":400,"line-height":"1.125rem","bold-font-size":"0.875rem","bold-font-weight":600,"bold-line-height":"1.125rem"},bodyXS:{"font-size":"0.75rem","font-weight":400,"line-height":"0.875rem","bold-font-size":"0.75rem","bold-font-weight":600,"bold-line-height":"0.875rem"},bodyXXS:{"font-size":"0.625rem","font-weight":400,"line-height":"0.75rem","bold-font-size":"0.625rem","bold-font-weight":600,"bold-line-height":"0.75rem"}},uc=16;function Qr(r,t=uc){const e=parseFloat(r);return Number.isFinite(e)?r.endsWith("rem")?e*t:e:0}const hc=(r,t=!1)=>{const e=t?r["bold-font-weight"]:r["font-weight"],i=t?r["bold-font-size"]:r["font-size"],o=t?r["bold-line-height"]:r["line-height"];return`${e} normal ${i}/${o}`},dc=(r,t=!1)=>{const e=t?r["bold-font-size"]:r["font-size"],i=t?r["bold-line-height"]:r["line-height"];return{fontSize:Qr(e),lineHeightPx:Qr(i)}},zo=r=>Object.entries(lc).reduce((t,[e,i])=>{const o=e;return t.push([o,r(i)],[`${o}Bold`,r(i,!0)]),t},[]),Ye=Object.fromEntries(zo(hc)),Oo=Object.fromEntries(zo(dc)),fc={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto",width:void 0,height:void 0,crossAxisSizing:"auto"},gc={top:0,right:0,bottom:0,left:0};class No{constructor(t=fc){this.size={width:0,height:0},this.position={x:0,y:0},this.style={flexGrow:t.flexGrow??0,flexShrink:t.flexShrink??1,flexBasis:t.flexBasis??0,alignSelf:t.alignSelf??"auto",width:t.width,height:t.height,crossAxisSizing:t.crossAxisSizing??"auto",id:t.id,metadata:t.metadata},this.id=t.id,this.metadata=t.metadata}}class Wo extends No{build(){}}class Et extends No{constructor(t,e,i={}){super({}),this.children=[],this.direction="row",this.wrap="nowrap",this.columnGap=0,this.rowGap=0,this.justifyContent="flex-start",this.alignItems="stretch",this.alignContent="stretch",this.padding={top:0,right:0,bottom:0,left:0},this.size.width=t,this.size.height=e,this.id=i.id,i.direction!==void 0&&(this.direction=i.direction),i.wrap!==void 0&&(this.wrap=i.wrap),i.columnGap!==void 0&&(this.columnGap=i.columnGap),i.rowGap!==void 0&&(this.rowGap=i.rowGap),i.justifyContent!==void 0&&(this.justifyContent=i.justifyContent),i.alignItems!==void 0&&(this.alignItems=i.alignItems),i.alignContent!==void 0&&(this.alignContent=i.alignContent),this.padding=Go(i.padding)}addChild(t,e){if(t instanceof Et){const o=t;if(e){const n=o.style;n.flexGrow=e.flexGrow??0,n.flexShrink=e.flexShrink??1,n.flexBasis=e.flexBasis??0,n.alignSelf=e.alignSelf??"auto",n.width=e.width,n.height=e.height,n.crossAxisSizing=e.crossAxisSizing??"auto"}return this.children.push(o),o}const i=new Wo(t);return this.children.push(i),i}getContainerMetrics(){const t=this.direction==="row"||this.direction==="row-reverse",{left:e,right:i,top:o,bottom:n}=this.padding,{width:s,height:c}=this.size;return t?{main:s-e-i,cross:c-o-n,mainGap:this.columnGap,crossGap:this.rowGap}:{main:c-o-n,cross:s-e-i,mainGap:this.rowGap,crossGap:this.columnGap}}buildFlexLines(t,e){if(this.wrap==="nowrap")return[t];const i=[];let o=[],n=0;for(const s of t){const c=s.style.flexBasis,a=o.length>0?e.mainGap:0;o.length>0&&n+a+c>e.main&&(i.push(o),o=[],n=0),o.push(s),n+=(o.length>1?e.mainGap:0)+c}return o.length>0&&i.push(o),this.wrap==="wrap-reverse"&&i.reverse(),i}measureLineCrossSizes(t,e){const i=[];for(const o of t){let n=0;for(const s of o){if(this.isDeferredCrossAxisPercentChild(s,e))continue;const c=e?s.style.height:s.style.width,a=c!==void 0?c:e?s.size.height:s.size.width;a>n&&(n=a)}i.push(n)}return i}isDeferredCrossAxisPercentChild(t,e){const i=e?t.style.height:t.style.width;return(t.style.alignSelf!=="auto"?t.style.alignSelf:this.alignItems)==="stretch"&&i===void 0&&t.style.crossAxisSizing==="deferred-percent-stretch"}resolveCrossAxisLayout(t,e){const i=t.length,o=t.reduce((u,d)=>u+d,0),n=e.crossGap*(i>1?i-1:0),s=e.cross-o-n;let c=0,a=e.crossGap;if(this.wrap==="nowrap"&&i===1)t[0]=e.cross;else if(this.wrap!=="nowrap"){const{crossStart:u,crossBetween:d}=this.calculateAlignContent(s,i,e.crossGap);if(c=u,a=d,this.alignContent==="stretch"&&s>0){const l=s/i;for(let h=0;h<i;h++)t[h]+=l}}return{crossStart:c,crossBetween:a}}calculateAlignContent(t,e,i){let o=0,n=i;switch(this.alignContent){case"flex-end":o=t;break;case"center":o=t/2;break;case"space-between":n=e>1?i+t/(e-1):0;break;case"space-around":n=i+t/e,o=n/2;break;case"space-evenly":n=i+t/(e+1),o=n;break}return{crossStart:o,crossBetween:n}}distributeMainAxisSizes(t,e,i){let o=0,n=0,s=0;for(const d of t){const l=d.style.flexBasis;o+=l,n+=d.style.flexGrow,s+=d.style.flexShrink*l}const c=t.length>1?e.mainGap*(t.length-1):0,a=e.main-o-c;let u=0;for(const d of t){const{style:l}=d;let h=l.flexBasis;a>0&&n>0?h+=a*l.flexGrow/n:a<0&&s>0&&(h+=a*l.flexShrink*h/s),h<0&&(h=0),i?d.size.width=h:d.size.height=h,u+=h}return{lineMainUsed:u,totalGrow:n}}calculateJustifySpacing(t,e,i,o){let n=0,s=i.mainGap;if(o===0){const c=t>1?i.mainGap*(t-1):0;let a=i.main-e-c;switch(a<0&&(a=0),this.justifyContent){case"flex-end":n=a;break;case"center":n=a/2;break;case"space-between":s=t>1?i.mainGap+a/(t-1):0;break;case"space-around":s=i.mainGap+a/t,n=s/2;break;case"space-evenly":s=i.mainGap+a/(t+1),n=s;break}}return{leading:n,between:s}}getFinalLineHeight(t,e,i){if(this.wrap!=="nowrap")return e;let o=e;for(const n of t){if(this.isDeferredCrossAxisPercentChild(n,i))continue;const s=i?n.style.height:n.style.width,c=s!==void 0?s:i?n.size.height:n.size.width;c>o&&(o=c)}return o}getCrossSize(t,e,i){const o=i?t.style.height:t.style.width,n=t.style.alignSelf!=="auto"?t.style.alignSelf:this.alignItems;return o!==void 0?(i?t.size.height=o:t.size.width=o,o):n==="stretch"?(i?t.size.height=e:t.size.width=e,e):i?t.size.height:t.size.width}positionChildren(t,e,i,o,n,s,c,a,u){const d=this.direction==="row-reverse"||this.direction==="column-reverse",l=d?t.length-1:0,h=d?-1:t.length,f=d?-1:1;let g=n;for(let C=l;C!==h;C+=f){const v=t[C];if(v!==void 0){const w=v.style,y=v.size,S=v.position;if(i){const H=this.direction==="row"?g:e.main-g-y.width;S.x=c+H}else{const H=this.direction==="column"?g:e.main-g-y.height;S.y=a+H}const b=w.alignSelf!=="auto"?w.alignSelf:this.alignItems,A=this.getCrossSize(v,o,i);let F=0;b==="flex-end"?F=o-A:b==="center"&&(F=(o-A)*.5),i?(S.y=a+u+F,g+=y.width+s):(S.x=c+u+F,g+=y.height+s)}}}build(){const{children:t}=this;if(t.length===0)return;const e=this.direction==="row"||this.direction==="row-reverse",i=this.getContainerMetrics(),o=this.buildFlexLines(t,i);if(o.length===0)return;const n=this.measureLineCrossSizes(o,e),{crossStart:s,crossBetween:c}=this.resolveCrossAxisLayout(n,i),a=this.padding.left,u=this.padding.top;let d=s;for(let l=0;l<o.length;l++){const h=o[l];if(h===void 0||h.length===0)continue;const{lineMainUsed:f,totalGrow:g}=this.distributeMainAxisSizes(h,i,e),{leading:C,between:v}=this.calculateJustifySpacing(h.length,f,i,g),w=this.getFinalLineHeight(h,n[l],e);this.positionChildren(h,i,e,w,C,v,a,u,d),d+=w+c}for(const l of t)l instanceof Et&&l.build()}}function Go(r){return r===void 0?gc:typeof r=="number"?{top:r,right:r,bottom:r,left:r}:{top:r.top??0,right:r.right??0,bottom:r.bottom??0,left:r.left??0}}class rr extends Et{constructor(t,e,i={}){super(t,e,i)}getLayout(){this.build();const t={};return this._collectLayout(this,t,{counter:0}),t}_collectLayout(t,e,i){for(const o of t.children){const n=o.id??`_$$${i.counter++}`;e[n]={position:o.position,size:o.size},o instanceof Et&&this._collectLayout(o,e,i)}}}const le={direction:"row",columnGap:0,rowGap:0,justifyContent:"flex-start",alignItems:"stretch"};function $o(r){const t=r;return{id:r.id,direction:t.direction??le.direction,columnGap:t.columnGap??le.columnGap,rowGap:t.rowGap??le.rowGap,justifyContent:t.justifyContent??le.justifyContent,alignItems:t.alignItems??le.alignItems}}function Uo(r,t){if(t!=null&&t.length)for(const e of t)if(e.children&&e.children.length>0){const i=new Et(e.width??0,e.height??0,$o(e));r.addChild(i,e),Uo(i,e.children)}else r.addChild(e)}const Cc=r=>{const t=r.width??0,e=r.height??0,i=$o(r),o=new rr(t,e,i);return Uo(o,r.children),o.getLayout()},ti=class ti{constructor(t){this.debugColor="magenta",this.parent=null,this.children=[],this.rect={x:0,y:0,width:0,height:0},this.zIndex=0,this._intrinsicWidth=0,this._intrinsicHeight=0,this._layoutDirty=!0,this._measureDirty=!0,this._style={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto"},this._position="static",this.backgroundColor="transparent",this.borderColor="transparent",this.borderWidth=0,this.portalHoverEnabled=!1,this.id=t}get style(){return this._style}set style(t){this._style=t,this.markLayoutDirty()}get position(){return this._position}set position(t){this._position!==t&&(this._position=t,this.markLayoutDirty())}get left(){return this._left}set left(t){this._left!==t&&(this._left=t,this.markLayoutDirty())}get top(){return this._top}set top(t){this._top!==t&&(this._top=t,this.markLayoutDirty())}get right(){return this._right}set right(t){this._right!==t&&(this._right=t,this.markLayoutDirty())}get bottom(){return this._bottom}set bottom(t){this._bottom!==t&&(this._bottom=t,this.markLayoutDirty())}isAbsolute(){return this._position==="absolute"}isPositioningContext(){return this._position!=="static"}markLayoutDirty(){var t;this._layoutDirty||(this._layoutDirty=!0,(t=this.parent)==null||t.markLayoutDirty())}markMeasureDirty(){this._measureDirty||(this._measureDirty=!0,this.markLayoutDirty())}isLayoutDirty(){return this._layoutDirty}isMeasureDirty(){return this._measureDirty}clearLayoutDirty(){this._layoutDirty=!1}clearMeasureDirty(){this._measureDirty=!1}addChild(t){this.attachChild(t,(e,i)=>e.push(i))}addChildStart(t){this.attachChild(t,(e,i)=>e.unshift(i))}removeChild(t){const e=this.children.indexOf(t);e!==-1&&(this.children.splice(e,1),t.parent=null,this.markLayoutDirty())}getTooltip(){return this.tooltip}paint(t,e){const i=t.getZIndex();t.setZIndex(i+this.zIndex),this.onPaint(t,e),ti.DEBUG&&t.strokeRect(this.rect.x,this.rect.y,this.rect.width,this.rect.height,this.debugColor,1),t.setZIndex(i)}hitTest(t,e){const i=[];return this.collectHitCandidates(t,e,0,{value:0},i),i.sort((o,n)=>n.cumulativeZIndex-o.cumulativeZIndex||n.order-o.order),i.map(({node:o})=>o)}requestLayout(){this.parent&&this.parent.requestLayout()}requestPaint(){this.parent&&this.parent.requestPaint()}onClick(t){}onMouseDown(t){}onMouseUp(t){}onMouseEnter(t){}onMouseLeave(t){}onMouseMove(t){}onDoubleClick(t){}attachChild(t,e){t.parent=this,e(this.children,t),this.markLayoutDirty()}collectHitCandidates(t,e,i,o,n){if(!this.containsHitPoint(t,e))return;const s=i+this.zIndex;n.push({node:this,cumulativeZIndex:s,order:o.value}),o.value+=1;for(const c of this.children)c.collectHitCandidates(t,e,s,o,n)}containsHitPoint(t,e){return t>=this.rect.x&&t<=this.rect.x+this.rect.width&&e>=this.rect.y&&e<=this.rect.y+this.rect.height}};ti.DEBUG=!1;let Mt=ti;class Xo{constructor(){this.defaultFlexStyle={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto",width:void 0,height:void 0,crossAxisSizing:"auto"}}build(t,e,i){const o=i??t.children.filter(a=>!a.isAbsolute()),n=o.length,s=e.direction,c=s==="row"||s==="row-reverse";for(let a=0;a<n;a+=1){const u=o[a],d=u.style,l=this.extractChildFlexProperties(u,d);this.handlePercentageDimensions(l,d.width,d.height,c,u.rect),this.defaultFlexStyle.flexGrow=l.flexGrow,this.defaultFlexStyle.flexShrink=l.flexShrink,this.defaultFlexStyle.flexBasis=l.flexBasis,this.defaultFlexStyle.alignSelf=l.alignSelf,this.defaultFlexStyle.width=l.width,this.defaultFlexStyle.height=l.height,this.defaultFlexStyle.crossAxisSizing=l.crossAxisSizing,this.isContainer(u)?this.addContainerChild(u,e):this.addLeafChild(u,e)}}extractChildFlexProperties(t,e){const i=e.flexGrow??0,o=e.flexShrink??1,n=e.flexBasis??0;return{width:typeof e.width=="number"?e.width:void 0,height:typeof e.height=="number"?e.height:void 0,flexGrow:i,flexShrink:o,flexBasis:n,alignSelf:e.alignSelf??"auto",crossAxisSizing:"auto"}}handlePercentageDimensions(t,e,i,o,n){e==="100%"&&(o?(t.width=void 0,t.flexGrow===0&&(t.flexGrow=1)):(t.width=void 0,t.alignSelf="stretch",t.crossAxisSizing="deferred-percent-stretch")),i==="100%"&&(o?(t.height=void 0,t.alignSelf="stretch",t.crossAxisSizing="deferred-percent-stretch"):(t.height=void 0,t.flexGrow===0&&(t.flexGrow=1))),t.flexBasis===0&&(t.flexBasis=o?n.width:n.height)}isContainer(t){return"flexOptions"in t}addContainerChild(t,e){const i=new Et(0,0,t.flexOptions);i.size.width=t.rect.width,i.size.height=t.rect.height,e.addChild(i,this.defaultFlexStyle),this.build(t,i)}addLeafChild(t,e){const i=e.addChild(this.defaultFlexStyle);i.size.width=t.rect.width,i.size.height=t.rect.height}}const _e=.5;class Vo{constructor(t){this.positionResolver=t}reconcile(t,e,i,o,n,s=!1){let c=!1;const{parent:a}=e,u=a!==null?a.rect:n;c=this.updateNodePosition(e,i,u??e.rect);const d=o??e.children.filter(h=>!h.isAbsolute()),l=d.length>0;if(l&&i instanceof Et){const h=this.reconcileChildLayouts(t,d,i,n);if(c=c||h,this.isContainer(e)&&!s){const f=this.updateContainerFromContent(e,i);c=c||f}}else if(!l){const h=this.remeasureAndUpdateLeaf(t,e,i);c=c||h}return this.positionNestedAbsoluteChildren(t,e),c}updateNodePosition(t,e,i){const o=t.rect,n=e.position,s=e.size;o.x=i.x+n.x,o.y=i.y+n.y;const c=o.width!==s.width,a=o.height!==s.height;return o.width=s.width,o.height=s.height,c||a}reconcileChildLayouts(t,e,i,o){let n=!1;const s=i.children,c=e.length;for(let a=0;a<c;a+=1){const u=this.reconcile(t,e[a],s[a],void 0,o);n=n||u}return n}updateContainerFromContent(t,e){const i=this.getContainerCachedIsRow(t),o=this.getContainerCachedPadding(t),n=e.children,s=n.length;let c=0;if(i){for(let h=0;h<s;h+=1){const f=n[h],g=f.position.y+f.size.height;g>c&&(c=g)}const a=c>0?c+o.bottom:0,u=t.style.height;if(u==="100%")return!1;const d=typeof u=="number"?u:0,l=a>d?a:d;if(l>t.rect.height+_e)return t.rect.height=l,this.syncFlexNodeSizeFromRect(t,e,!1,!0),!0}else{let a=0;for(let v=0;v<s;v+=1){const w=n[v],y=w.position.x+w.size.width,S=w.position.y+w.size.height;y>c&&(c=y),S>a&&(a=S)}const u=c>0?c+o.right:0,d=t.style.width;let l=!1,h=!1,f=!1;if(d!=="100%"){const v=typeof d=="number"?d:0,w=u>v?u:v;w>t.rect.width+_e&&(t.rect.width=w,l=!0,h=!0)}const g=a>0?a+o.bottom:0,C=t.style.height;if(C!=="100%"){const v=typeof C=="number"?C:0,w=g>v?g:v;w>t.rect.height+_e&&(t.rect.height=w,l=!0,f=!0)}return l&&this.syncFlexNodeSizeFromRect(t,e,h,f),l}return!1}syncFlexNodeSizeFromRect(t,e,i,o){i&&(e.size.width=t.rect.width),o&&(e.size.height=t.rect.height),this.syncAutoMainAxisFlexBasis(t,e,i,o)}syncAutoMainAxisFlexBasis(t,e,i,o){const n=t.parent;if(n===null||!this.isContainer(n)||t.style.flexBasis!==void 0&&t.style.flexBasis!==0)return;const s=this.getContainerCachedIsRow(n);s&&i?e.style.flexBasis=t.rect.width:!s&&o&&(e.style.flexBasis=t.rect.height)}remeasureAndUpdateLeaf(t,e,i){const o=e.rect.height,n=e.rect.width;e.measure(t),e.rect.width=n;const s=e.rect.height-o;return Math.abs(s)>_e?(this.syncFlexNodeSizeFromRect(e,i,!1,!0),!0):!1}positionNestedAbsoluteChildren(t,e){if(!this.isContainer(e)||!e.isPositioningContext())return;const i=e,n=i.children.filter(c=>c.isAbsolute());if(n.length===0)return;const s=this.getContainerCachedPadding(i);this.positionResolver.positionAbsoluteChildren(i.rect,s,n,c=>c.measure(t),c=>this.layoutAbsoluteChildSubtree(t,c))}layoutAbsoluteChildSubtree(t,e){if(!this.isContainer(e))return;const i=e.parent;e.parent=null;try{e.performLayout(t,!0)}finally{e.parent=i}}isContainer(t){return"flexOptions"in t}getContainerCachedIsRow(t){return t.cachedIsRow??!0}getContainerCachedPadding(t){return t.cachedPadding??{top:0,right:0,bottom:0,left:0}}}class wt{static resolvePositionValue(t,e){if(t!==void 0){if(typeof t=="number")return t;if(typeof t=="string"&&t.endsWith("%"))return parseFloat(t)/100*e}}static applyAxisPositioning(t,e,i,o,n){const s=n?e.x:e.y,c=s+(n?e.width:e.height),a=n?e.width:e.height;if(i!==void 0&&o!==void 0){const u=Math.max(0,a-i-o);n?(t.x=s+i,t.width=u):(t.y=s+i,t.height=u)}else i!==void 0&&(n?t.x=s+i:t.y=s+i);o!==void 0&&i===void 0?n?t.x=c-t.width-o:t.y=c-t.height-o:o===void 0&&i===void 0&&(n?t.x=s:t.y=s)}applyAbsolutePositioning(t,e){const i=wt.resolvePositionValue(t.left,e.width),o=wt.resolvePositionValue(t.right,e.width),n=wt.resolvePositionValue(t.top,e.height),s=wt.resolvePositionValue(t.bottom,e.height),c=t.rect;wt.applyAxisPositioning(c,e,i,o,!0),wt.applyAxisPositioning(c,e,n,s,!1)}positionAbsoluteChildren(t,e,i,o,n){const s={x:t.x+e.left,y:t.y+e.top,width:t.width-e.left-e.right,height:t.height-e.top-e.bottom};for(const c of i)o(c),this.applyAbsolutePositioning(c,s),n==null||n(c)}}class ei{constructor(){this.width=0,this.height=0,this.maxCrossSize=0,this.childCount=0,this.isRow=!0}reset(){this.width=0,this.height=0,this.maxCrossSize=0,this.childCount=0,this.isRow=!0}accumulate(t,e){this.isRow=e,e?(this.width+=t.width,this.maxCrossSize=Math.max(this.maxCrossSize,t.height)):(this.height+=t.height,this.maxCrossSize=Math.max(this.maxCrossSize,t.width)),this.childCount+=1}addGap(t,e){if(this.childCount>1){const i=t*(this.childCount-1);e?this.width+=i:this.height+=i}}getSize(){return this.isRow?{width:this.width,height:this.maxCrossSize}:{width:this.maxCrossSize,height:this.height}}static computeIntrinsicSize(t,e,i){const o=new ei;for(const n of t)o.accumulate(n,e);return o.addGap(i,e),o.getSize()}}const vc=3,Yo={top:0,right:0,bottom:0,left:0},mc=r=>r===void 0||r==="row"||r==="row-reverse",Ko=r=>r===void 0?Yo:typeof r=="number"?{top:r,right:r,bottom:r,left:r}:{top:r.top??0,right:r.right??0,bottom:r.bottom??0,left:r.left??0};class Ct extends Mt{constructor(t,e={},i="transparent"){super(t),this.cachedPadding=Yo,this.cachedIsRow=!0,this.cachedGap=0,this.optionsCacheValid=!1,this.flexOptionsValue=e,this.positionResolver=new wt,this.flexTreeBuilder=new Xo,this.layoutReconciler=new Vo(this.positionResolver),this.invalidateOptionsCache(),this.backgroundColor=i}get flexOptions(){return this.flexOptionsValue}set flexOptions(t){this.flexOptionsValue=t,this.invalidateOptionsCache(),this.markLayoutDirty()}setFlexOptions(t){Object.assign(this.flexOptionsValue,t),this.invalidateOptionsCache(),this.markLayoutDirty()}invalidateOptionsCache(){this.optionsCacheValid=!1}ensureOptionsCache(){if(this.optionsCacheValid)return;const t=this.flexOptionsValue;this.cachedIsRow=mc(t.direction),this.cachedGap=this.cachedIsRow?t.columnGap??0:t.rowGap??0,this.cachedPadding=Ko(t.padding),this.optionsCacheValid=!0}measure(t){this.measureChildren(t),this.computeIntrinsicSize(),this.applySizeConstraints(),this.clearMeasureDirty()}measureChildren(t){const{children:e}=this;for(let i=0;i<e.length;i+=1)e[i].measure(t)}computeIntrinsicSize(){this.ensureOptionsCache();const{layoutChildren:t}=this.separateChildrenByLayoutMode(),e=t.map(s=>s.rect),{width:i,height:o}=ei.computeIntrinsicSize(e,this.cachedIsRow,this.cachedGap),n=this.cachedPadding;this._intrinsicWidth=i+n.left+n.right,this._intrinsicHeight=o+n.top+n.bottom}applySizeConstraints(){const{style:t}=this,e=this.resolveStyleDimension(t.width,"width"),i=this.resolveStyleDimension(t.height,"height");this.rect.width=e??this._intrinsicWidth,this.rect.height=i??this._intrinsicHeight,e===void 0&&this.clampWidthToParent()}resolveStyleDimension(t,e){if(typeof t=="number")return t;if(t!=="100%")return;const i=this.resolveParentContentSize(e);return i!==void 0?i:this.rect[e]>0?this.rect[e]:void 0}resolveParentContentSize(t){const{parent:e}=this;if(!(e instanceof Ct))return e!=null&&e.rect[t]&&e.rect[t]>0?e.rect[t]:void 0;e.ensureOptionsCache();const i=e.cachedPadding,o=t==="width"?i.left+i.right:i.top+i.bottom,n=e.rect[t]-o;return n>0?n:void 0}performLayout(t,e=!1){if(e?(this.measureChildren(t),this.clearMeasureDirty()):this.measure(t),this.children.length===0){this.clearLayoutDirty();return}const{layoutChildren:i,absoluteChildren:o}=this.separateChildrenByLayoutMode();i.length>0&&this.layoutPhase1Flexbox(t,i,e),o.length>0&&this.isPositioningContext()&&this.layoutPhase2Absolute(t,o),this.clearLayoutDirty()}layoutPhase1Flexbox(t,e,i=!1){const o=new rr(this.rect.width,this.rect.height,this.flexOptionsValue);this.flexTreeBuilder.build(this,o,e);let n=0,s;do o.build(),s=this.layoutReconciler.reconcile(t,this,o,e,this.rect,i),n+=1;while(s&&n<vc)}layoutPhase2Absolute(t,e){this.ensureOptionsCache(),this.positionResolver.positionAbsoluteChildren(this.rect,this.cachedPadding,e,i=>i.measure(t),i=>this.layoutAbsoluteChildSubtree(t,i))}layoutAbsoluteChildSubtree(t,e){if(!(e instanceof Ct))return;const i=e.parent;e.parent=null;try{e.performLayout(t,!0)}finally{e.parent=i}}clampWidthToParent(){const{parent:t}=this;if(t===null||t.rect.width<=0)return;let e=t.rect.width;t instanceof Ct&&(t.ensureOptionsCache(),e-=t.cachedPadding.left+t.cachedPadding.right),e=Math.max(0,e),this.rect.width>e&&(this.rect.width=e)}separateChildrenByLayoutMode(){const t=[],e=[];for(const i of this.children)i.isAbsolute()?e.push(i):t.push(i);return{layoutChildren:t,absoluteChildren:e}}onPaint(t,e){this.backgroundColor!=="transparent"&&t.fillRect(this.rect.x,this.rect.y,this.rect.width,this.rect.height,this.backgroundColor);for(const i of this.children)i.paint(t,e)}}const pc={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},yc=(r,t)=>({minX:Math.min(r.minX,t.rect.x),minY:Math.min(r.minY,t.rect.y),maxX:Math.max(r.maxX,t.rect.x+t.rect.width),maxY:Math.max(r.maxY,t.rect.y+t.rect.height)}),Fc=r=>r.minX===1/0||r.maxX===-1/0;class bc extends Ct{performLayout(t){const e=this.layoutChildren(t);if(!e){this.clearLayoutDirty();return}this.expandToFitBounds(e),this.clearLayoutDirty()}layoutChildren(t){let e={...pc};return this.children.forEach(i=>{i instanceof Ct?i.performLayout(t):i.measure(t),e=yc(e,i)}),Fc(e)?null:e}expandToFitBounds(t){const e=t.maxX-this.rect.x,i=t.maxY-this.rect.y;e>this.rect.width&&(this.rect.width=e),i>this.rect.height&&(this.rect.height=i)}onPaint(t,e){this.backgroundColor&&this.backgroundColor!=="transparent"&&t.fillRect(this.rect.x,this.rect.y,this.rect.width,this.rect.height,this.backgroundColor),this.borderWidth>0&&this.borderColor&&this.borderColor!=="transparent"&&t.strokeRect(this.rect.x+this.borderWidth/2,this.rect.y+this.borderWidth/2,this.rect.width-this.borderWidth,this.rect.height-this.borderWidth,this.borderColor,this.borderWidth),super.onPaint(t,e)}}class or{constructor(t={}){this.options=t,this.hoveredNode=null,this.activePortalNode=null,this.currentCursor="default",this.bounds=null}setAbsoluteBounds(t){this.bounds=t?{...t}:null}handlePointerMove(t,e){this.transitionHover(t[0],e),this.updateCursor(t)}handlePointerLeave(){this.transitionHover(void 0,null),this.updateCursor([])}handlePortalReset(){this.activePortalNode&&this.dispatchPortalHover({visible:!1,x:0,y:0,width:0,height:0,originId:this.activePortalNode.id,source:this.options.portalSource}),this.activePortalNode=null}computeCursor(t,e,i){var n;const o=i.hitTest(t,e);for(const s of o){const c=(n=s.style)==null?void 0:n.cursor;if(c)return c}return"default"}getCurrentCursor(){return this.currentCursor}transitionHover(t,e){if(this.hoveredNode===t){this.updatePortalHover(t,e);return}this.hoveredNode&&this.hoveredNode.onMouseLeave(this.buildEvent("mouseleave",this.hoveredNode,e)),t&&t.onMouseEnter(this.buildEvent("mouseenter",t,e)),this.hoveredNode=t??null,this.updatePortalHover(t,e)}buildEvent(t,e,i){return i?{...i,type:t,target:e,currentTarget:e}:{type:t,x:0,y:0,originalEvent:{},stopPropagation:()=>{},preventDefault:()=>{},target:e,currentTarget:e}}updateCursor(t){var i,o,n;let e="default";for(const s of t){const c=(i=s.style)==null?void 0:i.cursor;if(c){e=c;break}}e!==this.currentCursor&&(this.currentCursor=e,(n=(o=this.options).onCursorChange)==null||n.call(o,e))}findPortalTarget(t){let e=t;for(;e;){if(e.portalHoverEnabled)return e;e=e.parent}return null}updatePortalHover(t,e=null){var c,a,u,d,l,h;const i=this.findPortalTarget(t),o=i?{...i.rect}:null,n=this.activePortalNode,s=i&&o?{id:i.id,rect:o}:null;if(i&&(n==null?void 0:n.id)===i.id){(a=(c=this.options).onPortalTargetChange)==null||a.call(c,i,e);return}if(this.activePortalNode=s,(d=(u=this.options).onPortalTargetChange)==null||d.call(u,i??null,e),!!this.options.portalHoverDispatch)if(i&&o&&this.bounds){const f=((h=(l=this.options).getTooltipContext)==null?void 0:h.call(l))??void 0;this.dispatchPortalHover({visible:!0,x:this.bounds.x+o.x,y:this.bounds.y+o.y,width:o.width,height:o.height,nodeId:i.id,originId:i.id,source:this.options.portalSource,tooltipContext:f,tooltipFromNode:i.getTooltip(),priority:1})}else n&&this.dispatchPortalHover({visible:!1,x:0,y:0,width:0,height:0,originId:n.id,source:this.options.portalSource})}dispatchPortalHover(t){var i,o,n,s;const e=((o=(i=this.options).getPortalEventTarget)==null?void 0:o.call(i))??null;(s=(n=this.options).portalHoverDispatch)==null||s.call(n,t,e)}}class Ft extends Mt{addChild(){throw new Error("CanvasLeaf cannot have children")}}const de={selection:"normal",cellClick:"normal",editor:"normal",contextMenu:"normal"};function Sc(r){return r.selection!==void 0||r.cellClick!==void 0||r.editor!==void 0||r.contextMenu!==void 0}function qo(r){if(!r||!Sc(r))return;const t={selection:r.selection??de.selection,cellClick:r.cellClick??de.cellClick,editor:r.editor??de.editor,contextMenu:r.contextMenu??de.contextMenu};return t.editor==="open-on-click"&&t.selection==="keep"&&(console.warn('[TableCanvas interaction] `editor: "open-on-click"` требует обычного selection. Editor не будет открыт, чтобы не менять выделение неожиданно.'),t.editor="normal"),t.editor==="open-on-click"&&t.cellClick==="stop"&&(console.warn('[TableCanvas interaction] `editor: "open-on-click"` требует обычного cellClick, потому что editor открывается через click pipeline таблицы. Editor не будет открыт.'),t.editor="normal"),t}function Zo(){return{...de}}class jo{constructor(){this.nodes=new Map,this.listeners=new Set}register(t,e){this.nodes.set(t,e),this.notify(t)}unregister(t){this.nodes.delete(t)}get(t){return this.nodes.get(t)}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}notify(t){this.listeners.forEach(e=>e(t))}}function xc(r,t){return r.zIndex!==t.zIndex?r.zIndex-t.zIndex:r.order-t.order}const to=typeof Path2D<"u"&&typeof CanvasRenderingContext2D.prototype.roundRect=="function";class ii{constructor(){this.commands=[],this.orderCounter=0,this.currentZIndex=0}setAnimationContext(t){return this.animationContext=t,this}getAnimationContext(){return this.animationContext}setZIndex(t){return this.currentZIndex=t,this}getZIndex(){return this.currentZIndex}pushZIndex(t=1){return this.currentZIndex+=t,this}popZIndex(t=1){return this.currentZIndex-=t,this}fillRect(t,e,i,o,n){return this.commands.push({type:"fillRect",x:t,y:e,width:i,height:o,fillStyle:n,zIndex:this.currentZIndex,order:this.orderCounter++}),this}strokeRect(t,e,i,o,n,s=1){return this.commands.push({type:"strokeRect",x:t,y:e,width:i,height:o,strokeStyle:n,lineWidth:s,zIndex:this.currentZIndex,order:this.orderCounter++}),this}fillText(t,e,i,o,n,s="middle",c){return this.commands.push({type:"fillText",text:t,x:e,y:i,font:o,fillStyle:n,textBaseline:s,textAlign:c,zIndex:this.currentZIndex,order:this.orderCounter++}),this}fillTextClipped(t,e,i,o,n,s,c="middle",a){return this.commands.push({type:"fillTextClipped",text:t,x:e,y:i,font:o,fillStyle:n,textBaseline:c,textAlign:a,clipX:s.x,clipY:s.y,clipWidth:s.width,clipHeight:s.height,zIndex:this.currentZIndex,order:this.orderCounter++}),this}drawImage(t,e,i,o,n){return this.commands.push({type:"drawImage",image:t,x:e,y:i,width:o,height:n,zIndex:this.currentZIndex,order:this.orderCounter++}),this}roundedRect(t,e,i,o,n,s){return this.commands.push({type:"roundedRect",x:t,y:e,width:i,height:o,radius:n,fillStyle:s==null?void 0:s.fillStyle,strokeStyle:s==null?void 0:s.strokeStyle,lineWidth:s==null?void 0:s.lineWidth,zIndex:this.currentZIndex,order:this.orderCounter++}),this}linearGradientRect(t,e,i,o,n,s,c=90){return this.commands.push({type:"linearGradientRect",x:t,y:e,width:i,height:o,radius:n,gradientStops:s,angle:c,zIndex:this.currentZIndex,order:this.orderCounter++}),this}custom(t){return this.commands.push({type:"custom",fn:t,zIndex:this.currentZIndex,order:this.orderCounter++}),this}clear(){return this.commands.length=0,this.orderCounter=0,this.currentZIndex=0,this.animationContext=void 0,this}get commandCount(){return this.commands.length}flush(t){const{commands:e}=this,i=e.length;if(i===0)return;e.sort(xc);let o="",n="",s=-1,c="",a="",u="";for(let d=0;d<i;d++){const l=e[d];if(l!==void 0)switch(l.type){case"fillRect":o!==l.fillStyle&&(t.fillStyle=l.fillStyle,o=l.fillStyle),t.fillRect(l.x,l.y,l.width,l.height);break;case"strokeRect":n!==l.strokeStyle&&(t.strokeStyle=l.strokeStyle,n=l.strokeStyle),s!==l.lineWidth&&(t.lineWidth=l.lineWidth,s=l.lineWidth),t.strokeRect(l.x,l.y,l.width,l.height);break;case"fillText":c!==l.font&&(t.font=l.font,c=l.font),o!==l.fillStyle&&(t.fillStyle=l.fillStyle,o=l.fillStyle),a!==l.textBaseline&&(t.textBaseline=l.textBaseline,a=l.textBaseline),l.textAlign&&u!==l.textAlign&&(t.textAlign=l.textAlign,u=l.textAlign),t.fillText(l.text,l.x,l.y);break;case"fillTextClipped":c!==l.font&&(t.font=l.font,c=l.font),o!==l.fillStyle&&(t.fillStyle=l.fillStyle,o=l.fillStyle),a!==l.textBaseline&&(t.textBaseline=l.textBaseline,a=l.textBaseline),l.textAlign&&u!==l.textAlign&&(t.textAlign=l.textAlign,u=l.textAlign),this.executeFillTextClipped(t,l);break;case"drawImage":t.drawImage(l.image,l.x,l.y,l.width,l.height);break;case"roundedRect":this.executeRoundedRect(t,l),l.fillStyle&&(o=l.fillStyle),l.strokeStyle&&(n=l.strokeStyle),l.lineWidth!==void 0&&(s=l.lineWidth);break;case"linearGradientRect":this.executeLinearGradientRect(t,l);break;case"custom":l.fn(t),o="",n="",s=-1,c="",a="",u="";break}}this.clear()}executeLinearGradientRect(t,e){const{x:i,y:o,width:n,height:s,radius:c,gradientStops:a,angle:u}=e,d=(u-90)*Math.PI/180,l=Math.cos(d),h=Math.sin(d),f=n/2,g=s/2,C=i+f,v=o+g,y=(Math.abs(l*n)+Math.abs(h*s))/2,S=C-l*y,b=v-h*y,A=C+l*y,F=v+h*y,H=t.createLinearGradient(S,b,A,F);for(const E of a)H.addColorStop(E.offset,E.color);if(t.fillStyle=H,c>0)if(to)t.beginPath(),t.roundRect(i,o,n,s,c),t.fill();else{const E=c,P=i+n,M=o+s;t.beginPath(),t.moveTo(i+E,o),t.lineTo(P-E,o),t.quadraticCurveTo(P,o,P,o+E),t.lineTo(P,M-E),t.quadraticCurveTo(P,M,P-E,M),t.lineTo(i+E,M),t.quadraticCurveTo(i,M,i,M-E),t.lineTo(i,o+E),t.quadraticCurveTo(i,o,i+E,o),t.closePath(),t.fill()}else t.fillRect(i,o,n,s)}executeFillTextClipped(t,e){e.clipWidth<=0||e.clipHeight<=0||e.text.length===0||(t.save(),t.beginPath(),t.rect(e.clipX,e.clipY,e.clipWidth,e.clipHeight),t.clip(),t.fillText(e.text,e.x,e.y),t.restore())}executeRoundedRect(t,e){const{x:i,y:o,width:n,height:s,radius:c,fillStyle:a,strokeStyle:u,lineWidth:d}=e;if(to)t.beginPath(),t.roundRect(i,o,n,s,c);else{const l=c,h=i+n,f=o+s;t.beginPath(),t.moveTo(i+l,o),t.lineTo(h-l,o),t.quadraticCurveTo(h,o,h,o+l),t.lineTo(h,f-l),t.quadraticCurveTo(h,f,h-l,f),t.lineTo(i+l,f),t.quadraticCurveTo(i,f,i,f-l),t.lineTo(i,o+l),t.quadraticCurveTo(i,o,i+l,o),t.closePath()}a&&(t.fillStyle=a,t.fill()),u&&(t.strokeStyle=u,d!==void 0&&(t.lineWidth=d),t.stroke())}}const wc=new ii;class Ac{constructor(t,e){this.eventHandlers=new Map,this.batcher=new ii,this.canvas=t,this.ctx=t.getContext("2d",{alpha:!1}),this.rootNode=e,this.hoverController=new or({onCursorChange:i=>{var o;return(o=this.onCursorChange)==null?void 0:o.call(this,i)},onPortalTargetChange:(i,o)=>{var n;return(n=this.onPortalHoverTargetChange)==null?void 0:n.call(this,i,o)}}),this.setupEvents()}setupEvents(){["click","mousedown","mouseup","mousemove","dblclick"].forEach(e=>{const i=o=>this.dispatchPointerEvent(o,e);this.eventHandlers.set(e,i),this.canvas.addEventListener(e,i)})}destroy(){this.eventHandlers.forEach((t,e)=>{this.canvas.removeEventListener(e,t)}),this.eventHandlers.clear()}dispatchPointerEvent(t,e){const{x:i,y:o}=this.getEventCoords(t),n=this.rootNode.hitTest(i,o),s=n[0];let c=!1;const a={type:e,x:i,y:o,originalEvent:t,target:s,stopPropagation:()=>{c=!0},preventDefault:()=>t.preventDefault()};this.bubbleEvent(n,a,e,()=>c),e==="mousemove"&&(this.dispatchMouseMove(n,a,()=>c),this.hoverController.handlePointerMove(n,a))}getEventCoords(t){const e=this.canvas.getBoundingClientRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}bubbleEvent(t,e,i,o){t.length!==0&&this.dispatchToNodes(t,e,(n,s)=>this.invokePointerHandler(n,i,s),o)}dispatchMouseMove(t,e,i){this.dispatchToNodes(t,e,(o,n)=>o.onMouseMove(n),i)}dispatchToNodes(t,e,i,o){for(const n of t){if(o())break;i(n,{...e,currentTarget:n})}}invokePointerHandler(t,e,i){switch(e){case"click":t.onClick(i);break;case"mousedown":t.onMouseDown(i);break;case"mouseup":t.onMouseUp(i);break;case"dblclick":t.onDoubleClick(i);break}}render(){const t=window.devicePixelRatio||1,e=this.canvas.getBoundingClientRect();this.clearCanvas(),this.applyResolutionScale(t),this.updateRootRect(e),this.layoutRoot(),this.batcher.clear(),this.rootNode.paint(this.batcher,this.ctx),this.batcher.flush(this.ctx)}clearCanvas(){this.ctx.fillStyle="#ffffff",this.ctx.fillRect(0,0,this.canvas.width,this.canvas.height)}applyResolutionScale(t){this.ctx.setTransform(1,0,0,1,0,0),this.ctx.scale(t,t)}updateRootRect(t){this.rootNode.rect.width=t.width,this.rootNode.rect.height=t.height,this.rootNode.rect.x=0,this.rootNode.rect.y=0}layoutRoot(){this.rootNode instanceof Ct?this.rootNode.performLayout(this.ctx):this.rootNode.measure(this.ctx)}}const at={xs:{height:24,fontSize:12,borderRadius:4,paddingX:8,iconSize:14},s:{height:32,fontSize:13,borderRadius:6,paddingX:12,iconSize:16},m:{height:40,fontSize:14,borderRadius:8,paddingX:16,iconSize:18},l:{height:48,fontSize:16,borderRadius:10,paddingX:20,iconSize:20}};function Jo(r){return{default:{bgColor:r.surfaceSolidDefault,bgColorHover:r.surfaceSolidDefault,borderColor:r.surfaceSolidDefault,textColor:r.inverseTextPrimary,iconColor:r.inverseTextPrimary},primary:{bgColor:r.surfaceSolidDefault,bgColorHover:r.surfaceSolidDefault,borderColor:r.surfaceSolidDefault,textColor:r.inverseTextPrimary,iconColor:r.inverseTextPrimary},accent:{bgColor:r.surfaceAccent,bgColorHover:r.surfaceAccentHover,borderColor:r.surfaceAccent,textColor:r.onDarkTextPrimary,iconColor:r.onDarkTextPrimary},secondary:{bgColor:r.surfaceTransparentSecondary,bgColorHover:r.surfaceTransparentSecondaryHover,borderColor:"transparent",textColor:r.textPrimary,iconColor:r.textPrimary},clear:{bgColor:r.surfaceClear,bgColorHover:r.surfaceTransparentSecondaryHover,borderColor:"transparent",textColor:r.textPrimary,iconColor:r.textPrimary},success:{bgColor:r.surfacePositive,bgColorHover:r.surfacePositiveHover,borderColor:r.surfacePositive,textColor:r.onDarkTextPrimary,iconColor:r.onDarkTextPrimary},warning:{bgColor:r.surfaceWarning,bgColorHover:r.surfaceWarningHover,borderColor:r.surfaceWarning,textColor:r.onDarkTextPrimary,iconColor:r.onDarkTextPrimary},critical:{bgColor:r.surfaceNegative,bgColorHover:r.surfaceNegativeHover,borderColor:r.surfaceNegative,textColor:r.onDarkTextPrimary,iconColor:r.onDarkTextPrimary},dark:{bgColor:r.onLightSurfaceTransparentDeep,bgColorHover:r.onLightSurfaceTransparentDeep,borderColor:r.onLightSurfaceTransparentDeep,textColor:r.onDarkTextPrimary,iconColor:r.onDarkTextPrimary},black:{bgColor:r.onLightSurfaceSolidDefault,bgColorHover:r.onLightSurfaceSolidDefault,borderColor:r.onLightSurfaceSolidDefault,textColor:r.onDarkTextPrimary,iconColor:r.onDarkTextPrimary},white:{bgColor:r.onDarkSurfaceSolidDefault,bgColorHover:r.onDarkSurfaceSolidDefault,borderColor:r.onDarkSurfaceSolidDefault,textColor:r.onLightTextPrimary,iconColor:r.onLightTextPrimary}}}const eo={bgColor:"#060A0C",bgColorHover:"#13181B",borderColor:"transparent",textColor:"#FFFFFF",textColorHover:"#F2F5F893",iconColor:"#FFFFFF",iconColorHover:"#F2F5F893"},ri={default:eo,primary:{bgColor:"#060A0C",bgColorHover:"#111C22",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},accent:{bgColor:"#118CDF",bgColorHover:"#1798EE",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},secondary:{bgColor:"#ADB9C238",bgColorHover:"#ADB9C247",borderColor:"transparent",textColor:"#060A0C",iconColor:"#060A0C"},clear:{bgColor:"transparent",bgColorHover:"rgba(6, 10, 12, 0.08)",borderColor:"transparent",textColor:"#060A0C",iconColor:"#060A0C"},success:{bgColor:"#1A9E32",bgColorHover:"#1EB83A",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},warning:{bgColor:"#FA5F05",bgColorHover:"#FB782D",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},critical:{bgColor:"#FF293E",bgColorHover:"#FF5263",borderColor:"transparent",textColor:"#FFFFFF",iconColor:"#FFFFFF"},dark:{bgColor:"#30373CC7",bgColorHover:"#30373CC7",borderColor:"transparent",textColor:"#FFFFFF",textColorHover:"#F2F5F893",iconColor:"#FFFFFF",iconColorHover:"#F2F5F893"},black:eo,white:{bgColor:"#FFFFFF",bgColorHover:"#FFFFFF",borderColor:"transparent",textColor:"#060A0C",textColorHover:"#13181B93",iconColor:"#060A0C",iconColorHover:"#13181B93"}},re=4,oe=4,Qo=16,nr=20,sr=4,Tt=1,cr=6,Ec=4,oi="s",ni="default",ar="#d32f2f",pe="#ffffff",tn="rgba(30, 136, 229, 0.08)",_i="#ffffff",en="#E8EEF2",rn="#D5DFE6",ki="#8A959D",lr="|",on="#",nn=35,ur=15,Mi=new Map,zi=new Map;function hr(r,t){if(r.charCodeAt(0)===nn){const e=parseInt(r.slice(1),16),i=Math.min(255,(e>>16&255)+t),o=Math.min(255,(e>>8&255)+t),n=Math.min(255,(e&255)+t);return`${on}${(i<<16|o<<8|n).toString(16).padStart(6,"0")}`}return r}function io(r,t){const e=Math.min(1,Math.max(0,t));if(r.charCodeAt(0)!==35)throw new Error("Only HEX color format is supported");let i=r.slice(1),o,n,s;if((i.length===3||i.length===4)&&(i=i.split("").map(c=>c+c).join("")),i.length===6)o=parseInt(i.slice(0,2),16),n=parseInt(i.slice(2,4),16),s=parseInt(i.slice(4,6),16);else if(i.length===8)o=parseInt(i.slice(0,2),16),n=parseInt(i.slice(2,4),16),s=parseInt(i.slice(4,6),16);else throw new Error(`Invalid HEX color format: ${r}`);return`rgba(${o}, ${n}, ${s}, ${e})`}function sn(r,t){const e=`${r}${lr}${t}`;let i=Mi.get(e);return i===void 0&&(i=hr(r,t),Mi.set(e,i)),i}function dr(r,t,e){const i=`${e}${lr}${t}`;let o=zi.get(i);return o===void 0&&(r.font=e,o=r.measureText(t).width,zi.set(i,o)),o}function fr(r,t,e,i,o,n){if(r!=="auto")return r;let s=0;return o&&(s+=e+i),n&&(s+=e+i),t+s+4}function gr(r,t,e,i,o){let n=r;return i&&(n+=t+e),o&&(n+=t+e),n}function Tc(){Mi.clear(),zi.clear()}const Dc=hr(ar,ur);function Cr(r,t,e,i){if(e)return{bgColor:r.bgCell,borderColor:r.borderColor,textColor:r.textLight,iconColor:r.textLight};switch(t){case"primary":return Oi(r,i);case"secondary":return cn(r,i);case"danger":return an(i);default:return Oi(r,i)}}function Ic(r,t,e,i,o){const{accentColor:n}=r,s=r.accentFg||pe,c=r.accentFg||pe,a=.4;if(t||e){const h=o?io(n,a):n;return{bgColor:h,borderColor:h,textColor:s,iconColor:c}}const u="#485056B0",d="white",l=o?io(u,a):u;return{bgColor:d,borderColor:l,textColor:s,iconColor:c}}function Oi(r,t){const{accentColor:e}=r,i=t?sn(e,ur):e;return{bgColor:i,borderColor:i,textColor:r.accentFg||pe,iconColor:r.accentFg||pe}}function cn(r,t){return{bgColor:t?r.accentLight||tn:r.bgCell,borderColor:r.accentColor,textColor:r.accentColor,iconColor:r.accentColor}}function an(r){const t=r?Dc:ar;return{bgColor:t,borderColor:t,textColor:_i,iconColor:_i}}function vr(r,t,e){return t?{bgColor:en,borderColor:rn,textColor:ki,iconColor:ki}:{bgColor:e?r.bgColorHover:r.bgColor,borderColor:r.borderColor,textColor:e&&r.textColorHover?r.textColorHover:r.textColor,iconColor:e&&r.iconColorHover?r.iconColorHover:r.iconColor}}const jt=-1,ro=0,ht={colIndex:jt,rowIndex:jt},et={x:ro,y:ro},Hc=2;function $e(r){const{location:t}=r;if(Array.isArray(t)&&t.length>=Hc)return ht.colIndex=t[0]??jt,ht.rowIndex=t[1]??jt,ht;const{col:e}=r,{row:i}=r;if(typeof e=="number"&&typeof i=="number")return ht.colIndex=e,ht.rowIndex=i,ht;const{colIndex:o}=r,{rowIndex:n}=r;return typeof o=="number"&&typeof n=="number"?(ht.colIndex=o,ht.rowIndex=n,ht):(ht.colIndex=jt,ht.rowIndex=jt,ht)}const ke="-",oo=0;function te(r,t){const{colIndex:e,rowIndex:i}=r;return e>=oo&&i>=oo?`${e}${ke}${i}`:`${t.x}${ke}${t.y}${ke}${t.width}${ke}${t.height}`}function Ni(r){const{posX:t}=r,{posY:e}=r;if(typeof t=="number"&&typeof e=="number"&&t===t&&e===e)return et.x=t,et.y=e,et;const{x:i}=r,{y:o}=r;if(typeof i=="number"&&typeof o=="number"&&i===i&&o===o)return et.x=i,et.y=o,et;const{location:n}=r;if(Array.isArray(n)&&n.length>=2){const s=n[0],c=n[1];if(typeof s=="number"&&typeof c=="number")return et.x=s,et.y=c,et}return null}function Wi(r,t){const e=r.x,i=r.y,o=t.x,n=t.y;return e>=o&&e<=o+t.width&&i>=n&&i<=n+t.height?(et.x=e-o,et.y=i-n,et):r}function ln(r,t,e){if(typeof r!="number"||typeof t!="number")return;const i=e.width,o=e.height,n=e.x,s=e.y;if(r>=-1&&r<=i+1&&t>=-1&&t<=o+1)return et.x=r,et.y=t,et;if(r>=n-1&&r<=n+i+1&&t>=s-1&&t<=s+o+1)return et.x=r-n,et.y=t-s,et}function mr(r,t,e){const i=e.x,o=e.y;return r>=i&&r<=i+e.width&&t>=o&&t<=o+e.height}function zt(r,t){if(typeof r=="object"&&r){const{hoverX:e}=r,{hoverY:i}=r,{rectX:o}=r,{rectY:n}=r;if(typeof e=="number"&&typeof i=="number"&&typeof o=="number"&&typeof n=="number"){const s=t.x-o,c=t.y-n;return e>=s&&e<=s+t.width&&i>=c&&i<=c+t.height}}return!!r}function Ue(){return typeof window<"u"?Math.ceil(window.devicePixelRatio):1}function un(r){let t=0;for(let e=0;e<r.length;e++)t=(t<<5)-t+r.charCodeAt(e),t|=0;return t.toString(36)}function Gi(r,t){let e=r;return t&&(e=e.replace(/currentColor/g,t),!e.includes("fill=")&&!e.includes("stroke=")&&(e=e.replace("<svg",`<svg fill="${t}"`))),`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}class hn{constructor(){this.iconRegistry=new Map,this.svgDataUrlCache=new Map,this.spriteCache=new Map,this.pendingLoads=new Set,this.loadListeners=new Set,this.inFlightCount=0,this.stats={requests:0,hits:0,misses:0,cacheSize:0,inFlight:0}}onLoad(t){return this.loadListeners.add(t),()=>this.loadListeners.delete(t)}register(t,e={}){const i=Array.isArray(t)?t:Object.entries(t).map(([o,n])=>({name:o,svg:n}));for(const{name:o,svg:n}of i)o&&n&&(e.overwrite||!this.iconRegistry.has(o))&&this.iconRegistry.set(o,n);return this}getSprite(t,e,i){const o=this.resolveKey(t,e,i);if(!o)return null;this.stats.requests++;const n=this.spriteCache.get(o.key);return n?(this.stats.hits++,n):(this.stats.misses++,this.loadSprite(o.key,o.url,e,!0),null)}preload(t,e){const i=Array.isArray(t)?t:[t];for(const o of i){const n=this.resolveKey(o,e.size,e.color);n&&this.loadSprite(n.key,n.url,e.size,!1)}return this}draw(t,e,i,o,n,s){const c=this.getSprite(e,n,s);if(c){const a=n*Ue();t.drawImage(c,0,0,a,a,i,o,n,n)}}getImageDirect(t){return t&&t instanceof HTMLImageElement&&t.complete&&t.naturalHeight!==0?t:null}getStats(){return{...this.stats}}reset(){return this.spriteCache.clear(),this.svgDataUrlCache.clear(),this.pendingLoads.clear(),this.stats={requests:0,hits:0,misses:0,cacheSize:0,inFlight:0},this}clearSpriteCache(){return this.spriteCache.clear(),this.pendingLoads.clear(),this.stats.cacheSize=0,this}has(t){return this.iconRegistry.has(t)}getSvg(t){return this.iconRegistry.get(t)}resolveKey(t,e,i){if(!t||e<=0)return null;const o=e*Ue();if(typeof t=="string"){const{key:n,url:s}=this.resolveIconUrl(t,i);return{key:`${n}@${o}`,url:s}}return t instanceof HTMLImageElement?{key:`img:${t.src}:${i??""}@${o}`,url:t.src}:null}resolveIconUrl(t,e){const i=e??"",o=this.iconRegistry.get(t);if(o){const s=`r:${t}:${i}`;return this.svgDataUrlCache.has(s)||this.svgDataUrlCache.set(s,Gi(o,e)),{key:s,url:this.svgDataUrlCache.get(s)}}const n=t.trimStart();if(n.startsWith("<svg")){const s=`s:${un(n)}:${i}`;return this.svgDataUrlCache.has(s)||this.svgDataUrlCache.set(s,Gi(n,e)),{key:s,url:this.svgDataUrlCache.get(s)}}return{key:`u:${t}:${i}`,url:t}}loadSprite(t,e,i,o){var c;if(this.spriteCache.has(t)||this.pendingLoads.has(t))return;this.pendingLoads.add(t),this.inFlightCount++,this.stats.inFlight=this.inFlightCount;const n=new Image;n.src=e;const s=i*Ue();(c=n.decode)==null||c.call(n).then(()=>{const a=document.createElement("canvas");a.width=s,a.height=s;const u=a.getContext("2d");u&&(u.drawImage(n,0,0,s,s),this.spriteCache.set(t,a),this.stats.cacheSize=this.spriteCache.size),o&&this.notifyListeners()}).catch(()=>{}).finally(()=>{this.pendingLoads.delete(t),this.inFlightCount--,this.stats.inFlight=this.inFlightCount,!o&&this.inFlightCount===0&&this.notifyListeners()})}notifyListeners(){this.loadListeners.forEach(t=>t())}}const Dt=new hn;function dn(r){return Dt.onLoad(r)}function Lc(r,t={}){Dt.register(r,t)}function fn(r,t,e){return Dt.getSprite(r,t,e)}function gn(r,t){Dt.preload(r,t)}function Cn(r,t,e,i,o,n){Dt.draw(r,t,e,i,o,n)}function vn(r,t){return Dt.getImageDirect(r)}function Pc(){return Dt.getStats()}function Bc(){Dt.clearSpriteCache()}const Rc=Cn;function ft(r,t,e,i,o,n){if(!t||o<=0)return;const s=fn(t,o,n);if(s){r.drawImage(s,e,i,o,o);return}const c=vn(t);c&&r.drawImage(c,e,i,o,o)}function mn(r,t,e,i,o,n,s,c="primary",a=!1,u=!1,d,l,h,f=cr){const g=re,C=o-g*2,v=Math.min(C-oe,Qo),w=s.baseFontFull,y=h?dr(h,n,w):0,S=fr(i,y,v,f,d,l),b=e+g,A=zt(u,{x:t,y:e,width:S,height:o}),F=Cr(s,c,a,A),H=t+S*.5,E=b+C*.5;r.roundedRect(t,b,S,C,sr,{fillStyle:F.bgColor,strokeStyle:F.borderColor,lineWidth:Tt});const P=gr(y,v,f,d,l);let M=H-P*.5;if(d){const ct=E-v*.5;ft(r,d,M,ct,v,F.textColor),M+=v+f}if(r.fillText(n,M,E,w,F.textColor,"middle","left"),l){const ct=M+y+f,W=E-v*.5;ft(r,l,ct,W,v,F.textColor)}return{x:t,y:b,width:S,height:C,actualWidth:S}}function pn(r,t,e,i,o,n=ni,s=oi,c=!1,a=!1,u,d,l,h=cr,f){const g=at[s],C=f?f[n]:ri[n],v=`${g.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,w=l?dr(l,o,v):0,y=fr(i,w,g.iconSize,h,u,d),S=zt(a,{x:t,y:e,width:y,height:g.height}),b=vr(C,c,S),A=t+y*.5,F=e+g.height*.5;b.bgColor!=="transparent"?r.roundedRect(t,e,y,g.height,g.borderRadius,{fillStyle:b.bgColor,strokeStyle:b.borderColor!=="transparent"?b.borderColor:void 0,lineWidth:b.borderColor!=="transparent"?Tt:0}):b.borderColor!=="transparent"&&r.roundedRect(t,e,y,g.height,g.borderRadius,{fillStyle:b.bgColor,strokeStyle:b.borderColor,lineWidth:Tt});const H=gr(w,g.iconSize,h,u,d);let E=A-H*.5;if(u){const P=F-g.iconSize*.5;ft(r,u,E,P,g.iconSize,b.textColor),E+=g.iconSize+h}if(r.fillText(o,E,F,v,b.textColor,"middle","left"),d){const P=E+w+h,M=F-g.iconSize*.5;ft(r,d,P,M,g.iconSize,b.textColor)}return{x:t,y:e,width:y,height:g.height,actualWidth:y}}const _c={100:"FF",90:"E6",80:"CC",75:"BF",70:"B3",60:"99",50:"80",40:"66",30:"4D",25:"40",20:"33",10:"1A",0:"00"},kc=(r,t)=>r.length!==6?r:r.slice(0,4)+_c[t],Kt="transparent",Mc=Object.fromEntries(Object.entries(ri).map(([r,t])=>r==="secondary"?[r,{bgColor:Kt,borderColor:Kt,textColor:"#485056B0",bgColorHover:Kt,iconColor:"#485056B0",iconColorHovered:"#485056FF"}]:[r,{bgColor:Kt,borderColor:Kt,textColor:t.bgColor,bgColorHover:Kt,iconColor:t.bgColor,iconColorHovered:t.bgColorHover}]));function yn(r,t,e,i,o=ni,n=oi,s=!1,c=!1,a){const u=at[n],d=Mc[o],l=(a==null?void 0:a.overrideSquareSize)??u.height,h=(a==null?void 0:a.overrideIconSize)??u.iconSize,f=zt(c,{x:t,y:e,width:l,height:l}),g=d,C=t+l*.5,v=e+l*.5,w=C-h*.5,y=v-h*.5;g.bgColor!=="transparent"?r.roundedRect(t,e,l,l,u.borderRadius,{fillStyle:g.bgColor,strokeStyle:g.borderColor!=="transparent"?g.borderColor:void 0,lineWidth:g.borderColor!=="transparent"?Tt:0}):g.borderColor!=="transparent"&&r.roundedRect(t,e,l,l,u.borderRadius,{fillStyle:g.bgColor,strokeStyle:g.borderColor,lineWidth:Tt});const S=(a==null?void 0:a.iconColor)??g.iconColor,b=(a==null?void 0:a.iconColorHovered)??(a==null?void 0:a.iconColor)??g.iconColorHovered,A=s?kc(S,40):f?b:S;return ft(r,i,w,y,h,A),{x:t,y:e,width:l,height:l}}function pr(r,t,e,i,o,n,s,c="primary",a=!1,u=!1){const d=re,l=o-d*2,h=Math.min(l-oe,nr),f=i==="auto"?h:i,g=e+d,C=zt(u,{x:t,y:e,width:f,height:o}),v=Cr(s,c,a,C),w=t+f*.5,y=g+l*.5,S=w-h*.5,b=y-h*.5;return r.roundedRect(t,g,f,l,sr,{fillStyle:v.bgColor,strokeStyle:v.borderColor,lineWidth:Tt}),ft(r,n,S,b,h,v.iconColor),{x:t,y:g,width:f,height:l}}function Fn(r,t,e,i,o=ni,n=oi,s=!1,c=!1){const a=at[n],u=ri[o],d=a.height,l=zt(c,{x:t,y:e,width:d,height:d}),h=vr(u,s,l),f=t+d*.5,g=e+d*.5,C=f-a.iconSize*.5,v=g-a.iconSize*.5;return h.bgColor!=="transparent"?r.roundedRect(t,e,d,d,a.borderRadius,{fillStyle:h.bgColor,strokeStyle:h.borderColor!=="transparent"?h.borderColor:void 0,lineWidth:h.borderColor!=="transparent"?Tt:0}):h.borderColor!=="transparent"&&r.roundedRect(t,e,d,d,a.borderRadius,{fillStyle:h.bgColor,strokeStyle:h.borderColor,lineWidth:Tt}),ft(r,i,C,v,a.iconSize,h.iconColor),{x:t,y:e,width:d,height:d}}const no={xs:{height:16,fontSize:10,paddingX:4,borderRadius:4},s:{height:20,fontSize:11,paddingX:6,borderRadius:5},m:{height:24,fontSize:12,paddingX:8,borderRadius:6},l:{height:28,fontSize:13,paddingX:10,borderRadius:7}};function zc(r){return{default:{bgColor:r.surfaceSolidDefault,bgColorTransparent:r.surfaceTransparentSecondary,textColor:r.inverseTextPrimary,textColorOnTransparent:r.textPrimary},accent:{bgColor:r.surfaceAccent,bgColorTransparent:r.surfaceTransparentAccent,textColor:r.onDarkTextPrimary,textColorOnTransparent:r.textAccent},positive:{bgColor:r.surfacePositive,bgColorTransparent:r.surfaceTransparentPositive,textColor:r.onDarkTextPrimary,textColorOnTransparent:r.textPositive},warning:{bgColor:r.surfaceWarning,bgColorTransparent:r.surfaceTransparentWarning,textColor:r.onDarkTextPrimary,textColorOnTransparent:r.textWarning},negative:{bgColor:r.surfaceNegative,bgColorTransparent:r.surfaceTransparentNegative,textColor:r.onDarkTextPrimary,textColorOnTransparent:r.textNegative},dark:{bgColor:r.onLightSurfaceSolidDefault,bgColorTransparent:r.onLightSurfaceTransparentDeep,textColor:r.onDarkTextPrimary,textColorOnTransparent:r.onLightTextPrimary},light:{bgColor:r.onDarkSurfaceSolidDefault,bgColorTransparent:r.onDarkSurfaceTransparentCard,textColor:r.onLightTextPrimary,textColorOnTransparent:r.onDarkTextPrimary}}}const Oc="|",Me=6,so=new Map,co={xs:10,s:12,m:14,l:16};class bn extends Ft{constructor(t,e,i){var o;super(t),this.view="default",this.size="s",this.transparent=!1,this.clear=!1,this.pilled=!1,this.viewColors={},this.text=e,i&&(i.view!==void 0&&(this.view=i.view),i.size!==void 0&&(this.size=i.size),i.transparent!==void 0&&(this.transparent=i.transparent),i.clear!==void 0&&(this.clear=i.clear),i.pilled!==void 0&&(this.pilled=i.pilled),this.leftIcon=i.leftIcon,this.rightIcon=i.rightIcon,this.customColor=i.customColor,this.customBackgroundColor=i.customBackgroundColor,(o=i.theme)!=null&&o.tokens&&(this.viewColors=zc(i.theme.tokens)))}measure(t){const e=no[this.size],i=co[this.size],o=`${e.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,n=ao(t,o,this.text);let s=0;this.leftIcon&&(s+=i+Me),this.rightIcon&&(s+=i+Me),this.rect.width=n+s+e.paddingX*2,this.rect.height=e.height}onPaint(t,e){const{x:i,y:o,width:n,height:s}=this.rect,c=no[this.size],a=co[this.size],u=this.viewColors[this.view];if(!u)return;const d=`${c.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`;let l,h;if(this.clear?(l="transparent",h=this.customColor??u.textColorOnTransparent):this.transparent?(l=this.customBackgroundColor??u.bgColorTransparent,h=this.customColor??u.textColorOnTransparent):(l=this.customBackgroundColor??u.bgColor,h=this.customColor??u.textColor),!this.clear){const C=this.pilled?s/2:c.borderRadius;t.roundedRect(i,o,n,s,C,{fillStyle:l})}const f=o+s/2;let g=i+c.paddingX;if(this.leftIcon){const C=f-a/2;ft(t,this.leftIcon,g,C,a,h),g+=a+Me}if(t.fillText(this.text,g,f,d,h,"middle"),this.rightIcon){const C=ao(e,d,this.text),v=g+C+Me,w=f-a/2;ft(t,this.rightIcon,v,w,a,h)}}}function ao(r,t,e){const i=`${t}${Oc}${e}`;let o=so.get(i);return o===void 0&&(r.font=t,o=r.measureText(e).width,so.set(i,o)),o}const Nc="default",Wc="s",Ei="pointer",ze=8,Gc={accentColor:"#1e88e5",accentLight:"rgba(30, 136, 229, 0.16)",accentFg:"#ffffff",bgCell:"#ffffff",borderColor:"#e0e0e0",textLight:"#9e9e9e",baseFontFull:"13px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},lo=new Map;class Sn extends Ft{constructor(t,e,i){var o;super(t),this.variant="primary",this.view=Nc,this.size=Wc,this.disabled=!1,this.isHovered=!1,this.useNewApi=!1,this.text=e,super.style={...super.style,cursor:Ei},i&&(i.view!==void 0?(this.view=i.view,this.useNewApi=!0):i.variant!==void 0&&(this.variant=i.variant),i.size!==void 0&&(this.size=i.size,this.useNewApi=!0),this.leftIcon=i.leftIcon,this.rightIcon=i.rightIcon,i.disabled!==void 0&&(this.disabled=i.disabled),i.onClick&&(this.onClick=i.onClick),(o=i.theme)!=null&&o.tokens&&(this.viewColors=Jo(i.theme.tokens)))}set style(t){super.style={...super.style,cursor:Ei,...t}}get style(){const t=super.style;return t.cursor||(t.cursor=Ei),t}measure(t){const e=at[this.size],i=`${e.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,o=$c(t,this.text,i);let n=0;this.leftIcon&&(n+=e.iconSize+ze),this.rightIcon&&(n+=e.iconSize+ze),this.rect.width=o+n+e.paddingX*2,this.rect.height=e.height}onPaint(t,e){const{x:i,y:o,width:n}=this.rect;if(this.useNewApi)pn(t,i,o,n,this.text,this.view,this.size,this.disabled,this.isHovered,this.leftIcon,this.rightIcon,e,ze,this.viewColors);else{const s=at[this.size];mn(t,i,o,n,s.height,this.text,Gc,this.variant,this.disabled,this.isHovered,this.leftIcon,this.rightIcon,e,ze)}}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}}function $c(r,t,e){const i=`${e}|${t}`;let o=lo.get(i);return o===void 0&&(r.font=e,o=r.measureText(t).width,lo.set(i,o)),o}const uo=16,ho="black",fo=0,Uc=Math.PI/2,Xc=1.8,qt={startX:-3.5,startY:-4.25,middleX:2.75,middleY:0,endX:-3.5,endY:4.25};class Vc extends Ft{constructor(t,e={}){super(t),this.rotation=fo,this.color=ho,this.rotation=e.rotation??fo,this.color=e.color??ho,this.rect.width=uo,this.rect.height=uo}measure(t){}onPaint(t,e){const{x:i,y:o,width:n,height:s}=this.rect,c=i+n/2,a=o+s/2,u=this.rotation*Uc;t.custom(d=>{d.save(),d.translate(c,a),d.rotate(u),d.strokeStyle=this.color,d.lineWidth=Xc,d.lineCap="round",d.lineJoin="round",d.beginPath(),d.moveTo(qt.startX,qt.startY),d.lineTo(qt.middleX,qt.middleY),d.lineTo(qt.endX,qt.endY),d.stroke(),d.restore()})}}const Yc=28,Kc="default",qc="s",Zc="pointer",jc=20,Jc={accentColor:"#1e88e5",accentLight:"rgba(30, 136, 229, 0.16)",accentFg:"#ffffff",bgCell:"#ffffff",borderColor:"#e0e0e0",textLight:"#9e9e9e"};class $i extends Ft{constructor(t,e,i){super(t),this.view=Kc,this.buttonSize=qc,this.isHovered=!1,this.useNewApi=!1,this.getDisabled=()=>this.disabled?"default":Zc,this.icon=e,this.size=(i==null?void 0:i.size)??"auto",this.variant=(i==null?void 0:i.variant)??"primary",this.disabled=(i==null?void 0:i.disabled)??!1,super.style={...super.style,cursor:this.getDisabled()},(i==null?void 0:i.view)!==void 0&&(this.view=i.view,this.useNewApi=!0),(i==null?void 0:i.buttonSize)!==void 0&&(this.buttonSize=i.buttonSize,this.useNewApi=!0),(i==null?void 0:i.overrideSquareSize)!==void 0&&(this.overrideSquareSize=i.overrideSquareSize),(i==null?void 0:i.overrideIconSize)!==void 0&&(this.overrideIconSize=i.overrideIconSize),(i==null?void 0:i.iconColor)!==void 0&&(this.iconColor=i.iconColor),(i==null?void 0:i.iconColorHovered)!==void 0&&(this.iconColorHovered=i.iconColorHovered),i!=null&&i.onClick&&(this.onClick=o=>{var n;return(n=i.onClick)==null?void 0:n.call(i,o)})}set style(t){super.style={...super.style,cursor:this.getDisabled(),...t}}get style(){const t=super.style;return t.cursor||(t.cursor=this.getDisabled()),t}measure(t){if(this.useNewApi){const e=at[this.buttonSize],i=this.overrideSquareSize??e.height;this.rect.height=i,this.rect.width=i}else{const e=go(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:i,y:o,width:n,height:s}=this.rect;if(this.useNewApi){const c=this.overrideSquareSize!==void 0||this.overrideIconSize!==void 0||this.iconColor!==void 0||this.iconColorHovered!==void 0?{overrideSquareSize:this.overrideSquareSize,overrideIconSize:this.overrideIconSize,iconColor:this.iconColor,iconColorHovered:this.iconColorHovered}:void 0;if(yn(t,i,o,this.icon,this.view,this.buttonSize,this.disabled,this.isHovered,c),Mt.DEBUG){const a=at[this.buttonSize],u=this.overrideSquareSize??a.height,d=this.overrideIconSize??a.iconSize,l=i+(u-d)*.5,h=o+(u-d)*.5;t.strokeRect(l,h,d,d,"cyan",1)}}else pr(t,i,o,n,s,this.icon,Jc,this.variant,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}containsHitPoint(t,e){if(this.useNewApi){const n=at[this.buttonSize],s=this.overrideSquareSize??n.height,c={x:this.rect.x,y:this.rect.y,width:s,height:s};return Co(t,e,c)}const i=go(this.size,this.rect.height),o=Qc(this.rect.x,this.rect.y,i);return Co(t,e,o)}}function go(r,t){const e=typeof r=="number"?r:t??Yc,i=0,o=re,n=Math.min(e-o*2-oe,jc),s=typeof r=="number"?r:n+i*2;return{height:e,width:s,paddingX:i,paddingY:o,iconSize:n}}function Qc(r,t,e){return{x:r+e.paddingX,y:t+e.paddingY,width:e.width-e.paddingX*2,height:e.height-e.paddingY*2}}function Co(r,t,e){return r>=e.x&&r<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}const ta=16,ea="transparent";class xn extends Ft{constructor(t,e,i){super(t),this.icon=e,this.size=(i==null?void 0:i.size)??ta,this.color=i==null?void 0:i.color}measure(t){this.rect.width=this.size,this.rect.height=this.size}onPaint(t,e){const{x:i,y:o,width:n,height:s}=this.rect;this.backgroundColor&&this.backgroundColor!==ea&&t.fillRect(i,o,n,s,this.backgroundColor),ft(t,this.icon,i,o,this.size,this.color)}}const ia=28,ra="default",oa="s",Ti="pointer",na=20,sa={accentColor:"#1e88e5",accentLight:"rgba(30, 136, 229, 0.16)",accentFg:"#ffffff",bgCell:"#ffffff",borderColor:"#e0e0e0",textLight:"#9e9e9e"};class wn extends Ft{constructor(t,e,i){super(t),this.view=ra,this.buttonSize=oa,this.isHovered=!1,this.useNewApi=!1,this.icon=e,this.size=(i==null?void 0:i.size)??"auto",this.variant=(i==null?void 0:i.variant)??"primary",this.disabled=(i==null?void 0:i.disabled)??!1,super.style={...super.style,cursor:Ti},(i==null?void 0:i.view)!==void 0&&(this.view=i.view,this.useNewApi=!0),(i==null?void 0:i.buttonSize)!==void 0&&(this.buttonSize=i.buttonSize,this.useNewApi=!0),i!=null&&i.onClick&&(this.onClick=o=>{var n;return(n=i.onClick)==null?void 0:n.call(i,o)})}set style(t){super.style={...super.style,cursor:Ti,...t}}get style(){const t=super.style;return t.cursor||(t.cursor=Ti),t}measure(t){if(this.useNewApi){const e=at[this.buttonSize];this.rect.height=e.height,this.rect.width=e.height}else{const e=vo(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:i,y:o,width:n,height:s}=this.rect;this.useNewApi?Fn(t,i,o,this.icon,this.view,this.buttonSize,this.disabled,this.isHovered):pr(t,i,o,n,s,this.icon,sa,this.variant,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}containsHitPoint(t,e){if(this.useNewApi){const n=at[this.buttonSize],s={x:this.rect.x,y:this.rect.y,width:n.height,height:n.height};return mo(t,e,s)}const i=vo(this.size,this.rect.height),o=ca(this.rect.x,this.rect.y,i);return mo(t,e,o)}}function vo(r,t){const e=typeof r=="number"?r:t??ia,i=0,o=re,n=Math.min(e-o*2-oe,na),s=typeof r=="number"?r:n+i*2;return{height:e,width:s,paddingX:i,paddingY:o,iconSize:n}}function ca(r,t,e){return{x:r+e.paddingX,y:t+e.paddingY,width:e.width-e.paddingX*2,height:e.height-e.paddingY*2}}function mo(r,t,e){return r>=e.x&&r<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}const ue="transparent",aa=0;class An extends Ft{constructor(t,e=ue){super(t),this.color=ue,this.borderColor=ue,this.borderWidth=aa,this.color=e}measure(t){const{style:e,rect:i}=this;typeof e.width=="number"&&(i.width=e.width),typeof e.height=="number"&&(i.height=e.height)}onPaint(t,e){const{x:i,y:o,width:n,height:s}=this.rect;if(this.color!==ue&&t.fillRect(i,o,n,s,this.color),this.borderWidth>0&&this.borderColor!==ue){const c=this.borderWidth/2;t.strokeRect(i+c,o+c,n-this.borderWidth,s-this.borderWidth,this.borderColor,this.borderWidth)}}}const En="|",la=2,ua=1e4,Ui=new Map,Xi=new Map;function Tn(r,t,e){r.size>=ua&&r.clear(),r.set(t,e)}function ha(r,t){return`${r}${En}${t}`}function da({text:r,font:t,maxWidth:e,textOverflow:i,ellipsis:o,forceEllipsis:n}){return[t,r,e.toFixed(la),i,o,n?"force":"normal"].join(En)}function Vi(r,t,e){const i=ha(e,t);let o=Ui.get(i);return o===void 0&&(r.font=e,o=r.measureText(t).width,Tn(Ui,i,o)),o}function fa(r){const t=typeof Intl<"u"?Intl.Segmenter:void 0;if(typeof t=="function"){const e=new t(void 0,{granularity:"grapheme"});return Array.from(e.segment(r),({segment:i})=>i)}return Array.from(r)}function ga(r,t,e,i,o){const n=Vi(r,o,e);if(n>i)return{text:"",didTruncate:!0,width:0};const s=fa(t);let c=0,a=s.length,u=o,d=n;for(;c<=a;){const l=Math.floor((c+a)/2),h=`${s.slice(0,l).join("")}${o}`,f=Vi(r,h,e);f<=i?(u=h,d=f,c=l+1):a=l-1}return{text:u,didTruncate:!0,width:d}}function Yi(r){const{ctx:t,text:e,font:i,maxWidth:o,textOverflow:n,ellipsis:s,forceEllipsis:c=!1}=r,a=Math.max(0,o);if(a<=0||e.length===0&&!(c&&n==="ellipsis"))return{text:"",didTruncate:e.length>0,width:0};const u=da({text:e,font:i,maxWidth:a,textOverflow:n,ellipsis:s,forceEllipsis:c}),d=Xi.get(u);if(d)return d;const l=Vi(t,e,i);let h;return l<=a&&!c?h={text:e,didTruncate:!1,width:l}:n==="clip"?h={text:e,didTruncate:!0,width:l}:h=ga(t,e,i,a,s),Tn(Xi,u,h),h}function po({ctx:r,lines:t,font:e,maxWidth:i,maxLines:o,textOverflow:n,ellipsis:s}){const c=Math.max(0,Math.floor(o)),a=Math.min(t.length,c),u=t.slice(0,a),d=t.length>a;if(n==="ellipsis"&&u.length>0){const l=u.length-1,h=u[l]??"";u[l]=Yi({ctx:r,text:h,font:e,maxWidth:i,textOverflow:n,ellipsis:s,forceEllipsis:d}).text}return{lines:u,didClamp:d}}function Ca(){Ui.clear(),Xi.clear()}const va="14px sans-serif",ma="black",pa=1,ya=14,Fa="visible",ba="clip",Sa="…",xa=/(\d*\.?\d+)px/,pt="|",wa=30,Aa=`${pt}precise-wrap`,Ea=1e4,Ta=5e3,Da=/[\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F\u200D\uFE0E\uFE0F\u2600-\u27BF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/,Ki=new Map,qi=new Map,Zi=new Map;let Di=null;function Ia(){return Di===null&&typeof document<"u"&&(Di=document.createElement("canvas").getContext("2d")),Di}function Dn(r,t,e,i){r.size>=i&&r.clear(),r.set(t,e)}function Ha(r,t,e,i){return`${r}${pt}${t}${pt}${e??""}${pt}${i??""}`}function La(r,t){return`${r}${pt}${t}`}function Pa(r,t,e){return`${r}${pt}${t}${pt}${e}`}function In(r,t,e,i){return`${r}${pt}${t}${pt}${e}${pt}${i}`}class yr extends Mt{constructor(t,e,i){super(t),this.font=va,this.color=ma,this.wordWrap=!1,this.lineHeight=pa,this.overflow=Fa,this.textOverflow=ba,this.ellipsis=Sa,this.lastMeasureKey="",this.cachedLines=null,this.cachedLinesKey="",this.lastPaintedTextWidth=0,this.text=e,i&&(i.font&&(this.font=i.font),i.fontSize!==void 0&&(this.fontSize=i.fontSize),i.lineHeightPx!==void 0&&(this.lineHeightPx=i.lineHeightPx),i.color&&(this.color=i.color),i.wordWrap!==void 0&&(this.wordWrap=i.wordWrap),i.lineHeight!==void 0&&(this.lineHeight=i.lineHeight,this.lineHeightPx=void 0),i.overflow!==void 0&&(this.overflow=i.overflow),i.textOverflow!==void 0&&(this.textOverflow=i.textOverflow),i.ellipsis!==void 0&&(this.ellipsis=i.ellipsis),i.maxLines!==void 0&&(this.maxLines=i.maxLines),i.autoTooltip!==void 0&&(this.autoTooltip=i.autoTooltip))}measure(t){const{font:e,text:i,wordWrap:o,lineHeight:n,rect:s,fontSize:c}=this,{lineHeightPx:a}=yo(e,n,c,this.lineHeightPx);this.isSingleLineClampEnabled()?this.measureSingleLineClamp(t,e,i,a,s):o?this.measureWordWrap(t,e,i,a,s):this.measureSingleLine(t,e,i,a,s)}measureWordWrap(t,e,i,o,n){const s=Fo(this.style.width,n.width);if(s>0){const c=this.getResolvedMaxLines(),u=!(this.overflow==="hidden"&&c!==void 0&&c>1&&Ra(i)),d=In(e,i,s,u);(d!==this.cachedLinesKey||this.cachedLines===null)&&(this.cachedLines=Ba(t,i,e,s,u),this.cachedLinesKey=d),n.width=s;const l=c!==void 0&&this.overflow==="hidden"?Math.min(this.cachedLines.length,c):this.cachedLines.length;n.height=l*o}else n.width=Oe(t,i,e),n.height=o,this.cachedLines=null}measureSingleLineClamp(t,e,i,o,n){const s=Fo(this.style.width,n.width);s>0?(n.width=s,n.height=o):(n.width=Oe(t,i,e),n.height=o),this.cachedLines=null}measureSingleLine(t,e,i,o,n){const s=Pa(e,i,o);s!==this.lastMeasureKey&&(this.lastMeasureKey=s,n.width=Oe(t,i,e),n.height=o),this.cachedLines=null}getLastPaintedTextWidth(){return this.lastPaintedTextWidth}getTooltip(){if(this.tooltip)return this.tooltip;const t=this.autoTooltip;if(!t)return;const e=typeof t=="object"?t:void 0;if(!(e?e.enabled!==!1:t===!0)||!this.computeIsTruncated())return;let o=this.text;if(e&&typeof e.text=="function"?o=e.text(this.text):e&&typeof e.text=="string"&&(o=e.text),o===null||o==="")return;if(!e)return o;const{enabled:n,text:s,...c}=e;return{...c,text:o}}computeIsTruncated(){if(this.overflow!=="hidden"||this.textOverflow!=="ellipsis")return!1;const t=Ia();if(!t)return!1;const e=this.cachedLines;if(e!==null&&e.length>0){const i=this.getResolvedMaxLines();return i===void 0?!1:po({ctx:t,lines:e,font:this.font,maxWidth:this.rect.width,maxLines:i,textOverflow:this.textOverflow,ellipsis:this.ellipsis}).didClamp}return Yi({ctx:t,text:this.text,font:this.font,maxWidth:this.rect.width,textOverflow:this.textOverflow,ellipsis:this.ellipsis}).didTruncate}getResolvedMaxLines(){if(this.maxLines===void 0||!Number.isFinite(this.maxLines)||this.maxLines<=0)return;const t=Math.floor(this.maxLines);return t>0?t:void 0}isSingleLineClampEnabled(){return this.wordWrap&&this.overflow==="hidden"&&this.getResolvedMaxLines()===1}isMultilineClampEnabled(){return this.wordWrap&&this.overflow==="hidden"&&this.getResolvedMaxLines()!==void 0}onPaint(t,e){const{font:i,text:o,rect:n,color:s}=this,c=this.cachedLines;c!==null&&c.length>0?this.paintMultiline(t,e,i,s,c,n):this.paintSingleLine(t,e,o,i,s,n)}paintMultiline(t,e,i,o,n,s){const{lineHeightPx:c}=yo(i,this.lineHeight,this.fontSize,this.lineHeightPx),a=this.getResolvedMaxLines(),u=this.isMultilineClampEnabled()&&a!==void 0?po({ctx:e,lines:n,font:i,maxWidth:s.width,maxLines:a,textOverflow:this.textOverflow,ellipsis:this.ellipsis}).lines:n,d=u.length*c;let l=s.y+Math.max(0,(s.height-d)*.5);this.lastPaintedTextWidth=0;for(let h=0,f=u.length;h<f;h+=1){const g=u[h];g!==void 0&&(this.overflow==="hidden"?t.fillTextClipped(g,s.x,l,i,o,s,"top","left"):t.fillText(g,s.x,l,i,o,"top"),l+=c)}}paintSingleLine(t,e,i,o,n,s){const c=s.y+s.height*.5;if(this.overflow==="hidden"){const a=Yi({ctx:e,text:i,font:o,maxWidth:s.width,textOverflow:this.textOverflow,ellipsis:this.ellipsis});if(this.lastPaintedTextWidth=Math.min(a.width,Math.max(0,s.width)),a.text.length===0)return;t.fillTextClipped(a.text,s.x,c,o,n,s,"middle","left");return}this.lastPaintedTextWidth=Oe(e,i,o),t.fillText(i,s.x,c,o,n,"middle")}}function yo(r,t,e,i){const o=Ha(r,t,e,i);let n=Ki.get(o);if(n===void 0){const s=xa.exec(r),c=e??(s&&s[1]!==void 0?Number(s[1]):ya);n={fontSize:c,lineHeightPx:i??c*t},Ki.set(o,n)}return n}function Oe(r,t,e){const i=La(e,t);let o=qi.get(i);return o===void 0&&(r.font=e,o=r.measureText(t).width,Dn(qi,i,o,Ea)),o}function Ba(r,t,e,i,o){r.font=e;const n=Math.max(i,wa),s=In(e,t,n,o);let c=Zi.get(s);if(!c){const a=o?e:`${e}${Aa}`;c=_a(nc.split(r,t,a,n,o)),Dn(Zi,s,c,Ta)}return c}function Fo(r,t){return typeof r=="number"&&r>0?r:t>0?t:0}function Ra(r){return Da.test(r)}function _a(r){if(Array.isArray(r))return r;const t=r;return t.lines&&Array.isArray(t.lines)?t.lines:[]}function ka(){Ki.clear(),qi.clear(),Zi.clear(),Ca()}const fe={250:15.625,32:2,28:1.75,24:1.5,20:1.25,18:1.125,16:1,14:.875,12:.75,8:.5,0:0},bo=16,he=16,Hn=90,So="rgba(8, 8, 8, 0.08)",Ma=4e3,za=1920,Oa="linear-gradient( 90deg, rgba(8, 8, 8, 0.09) 0%, rgba(8, 8, 8, 0.08) 6.25%, rgba(8, 8, 8, 0.05) 12.5%, rgba(8, 8, 8, 0.01) 25%, rgba(8, 8, 8, 0.05) 37.5%, rgba(8, 8, 8, 0.08) 43.75%, rgba(8, 8, 8, 0.09) 50%, rgba(8, 8, 8, 0.08) 56.25%, rgba(8, 8, 8, 0.05) 62.5%, rgba(8, 8, 8, 0.01) 75%, rgba(8, 8, 8, 0.05) 87.5%, rgba(8, 8, 8, 0.08) 93.75%, rgba(8, 8, 8, 0.09) 100% )",Na="linear-gradient( 90deg, rgba(8, 8, 8, 0.36) 0%, rgba(8, 8, 8, 0.32) 6.25%, rgba(8, 8, 8, 0.20) 12.5%, rgba(8, 8, 8, 0.04) 25%, rgba(8, 8, 8, 0.20) 37.5%, rgba(8, 8, 8, 0.32) 43.75%, rgba(8, 8, 8, 0.36) 50%, rgba(8, 8, 8, 0.08) 56.25%, rgba(8, 8, 8, 0.20) 62.5%, rgba(8, 8, 8, 0.04) 75%, rgba(8, 8, 8, 0.20) 87.5%, rgba(8, 8, 8, 0.32) 93.75%, rgba(8, 8, 8, 0.36) 100% )";let xo=null;const Wa={right:90,left:270,top:0,bottom:180,"top right":45,"right top":45,"bottom right":135,"right bottom":135,"bottom left":225,"left bottom":225,"top left":315,"left top":315};class Ln extends Ft{constructor(t,e){super(t),this._gradientStops=null,this._gradientAngle=Hn;const i=(e==null?void 0:e.customGradientColor)??(e!=null&&e.lighter?Na:Oa),o=Xa(i);o&&(this._gradientStops=o.stops,this._gradientAngle=o.angle),this.borderRadius=Ga(e==null?void 0:e.roundness),this.animated=(e==null?void 0:e.animated)??!0,this.shimmerDuration=(e==null?void 0:e.shimmerDuration)??Ma}measure(t){const{style:e,rect:i}=this;typeof e.width=="number"&&(i.width=e.width),typeof e.height=="number"&&(i.height=e.height)}onPaint(t,e){var f;const{x:i,y:o,width:n,height:s}=this.rect;if(n<=0||s<=0)return;const{_gradientStops:c,borderRadius:a}=this;if(!c||c.length<2){a>0?t.roundedRect(i,o,n,s,a,{fillStyle:So}):t.fillRect(i,o,n,s,So);return}const u=t.getAnimationContext(),d=u==null?void 0:u.frameTime;if(!this.animated||d===void 0){t.linearGradientRect(i,o,n,s,a,c,this._gradientAngle);return}xo??(xo=d);const h=(d-xo)%this.shimmerDuration/this.shimmerDuration;t.custom(g=>{g.save(),g.beginPath(),a>0?g.roundRect(i,o,n,s,a):g.rect(i,o,n,s),g.clip();const{startX:C,startY:v,endX:w,endY:y}=Va(i,o,s,h),S=g.createLinearGradient(C,v,w,y);for(const b of c)S.addColorStop(b.offset,b.color);g.fillStyle=S,g.fillRect(i,o,n,s),g.restore()}),(f=u==null?void 0:u.requestAnimationFrame)==null||f.call(u)}}function wo(r){return r in fe}function Ga(r){if(r===void 0)return fe[bo]*he;if(typeof r=="number")return wo(r)?fe[r]*he:r;const t=r.trim(),e=Number(t);if(!Number.isNaN(e))return wo(e)?fe[e]*he:e;const i=t.match(/^(-?\d+(?:\.\d+)?)px$/i);if(i){const[,n]=i;return parseFloat(n)}const o=t.match(/^(-?\d+(?:\.\d+)?)rem$/i);if(o){const[,n]=o;return parseFloat(n)*he}return fe[bo]*he}function $a(r){var i;const t=r.trim(),e=t.match(/^var\s*\(\s*[^,]+,\s*([\s\S]+)\s*\)$/i);return((i=e==null?void 0:e[1])==null?void 0:i.trim())??t}function Ua(r,t){switch(t.toLowerCase()){case"rad":return r*180/Math.PI;case"turn":return r*360;case"grad":return r*180/200;default:return r}}function Xa(r){const e=$a(r).match(/^linear-gradient\s*\(([\s\S]+)\)$/i);if(!(e!=null&&e[1]))return null;const i=[];let o="",n=0;for(const h of e[1])h==="("&&n++,h===")"&&n--,h===","&&n===0?(i.push(o.trim()),o=""):o+=h;o.trim()&&i.push(o.trim());const[s]=i;if(i.length<2||!s)return null;let c=Hn,a=0;const u=s.match(/^(-?\d+(?:\.\d+)?)(deg|rad|turn|grad)?$/i);if(u!=null&&u[1]){const[,h,f="deg"]=u;c=Ua(parseFloat(h),f),a=1}else if(s.startsWith("to ")){const h=s.substring(3).trim().toLowerCase(),f=Wa[h];f!==void 0&&(c=f,a=1)}const d=[],l=i.slice(a);for(let h=0;h<l.length;h++){const f=l[h];if(!f)continue;const g=f.trim().match(/^(#[0-9a-fA-F]{3,8}|rgba?\s*\([^)]+\)|hsla?\s*\([^)]+\)|[a-zA-Z]+)(?:\s+(-?\d+(?:\.\d+)?)(%))?$/);if(!(g!=null&&g[1]))continue;const[,C,v,w]=g,y=w==="%"?parseFloat(v)/100:l.length>1?h/(l.length-1):0;d.push({offset:Math.max(0,Math.min(1,y)),color:C})}return d.length<2?null:{stops:d,angle:c}}function Va(r,t,e,i){const o=za,n=i*o,s=r-o+n,c=r+o+n,a=t+e/2;return{startX:s,startY:a,endX:c,endY:a}}function Ya(r,t){const e=r.replace("#","");let i,o,n,s=255;e.length===3||e.length===4?(i=parseInt(e[0]+e[0],16),o=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),e.length===4&&(s=parseInt(e[3]+e[3],16))):(i=parseInt(e.slice(0,2),16),o=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16),e.length===8&&(s=parseInt(e.slice(6,8),16)));const c=Math.round(s*t),a=u=>u.toString(16).padStart(2,"0");return`#${a(i)}${a(o)}${a(n)}${a(c)}`}function Ka(r){return{default:{color:r.textPrimary,colorHover:r.textPrimaryHover,colorActive:r.textPrimaryActive},accent:{color:r.textAccent,colorHover:r.textAccentHover,colorActive:r.textAccentActive},secondary:{color:r.textSecondary,colorHover:r.textSecondaryHover,colorActive:r.textSecondaryActive},tertiary:{color:r.textTertiary,colorHover:r.textTertiaryHover,colorActive:r.textTertiaryActive},paragraph:{color:r.textParagraph,colorHover:r.textParagraphHover,colorActive:r.textParagraphActive},positive:{color:r.textPositive,colorHover:r.textPositiveHover,colorActive:r.textPositiveActive},warning:{color:r.textWarning,colorHover:r.textWarningHover,colorActive:r.textWarningActive},negative:{color:r.textNegative,colorHover:r.textNegativeHover,colorActive:r.textNegativeActive},clear:{color:r.textPrimary,colorHover:r.textPrimaryHover,colorActive:r.textPrimaryActive}}}const qa="default",Ii="pointer",Za=.4,ja=2,Ja=1;class Pn extends yr{constructor(t,e,i){var o;super(t,e,i),this.view=qa,this.disabled=!1,this.isHovered=!1,this.isActive=!1,this.hasCustomColor=!1,super.style={...super.style,cursor:Ii},i&&(this.href=i.href,this.target=i.target,this.rel=i.rel,i.view!==void 0&&(this.view=i.view),i.disabled!==void 0&&(this.disabled=i.disabled),this.hasCustomColor=i.color!==void 0,(o=i.theme)!=null&&o.tokens&&(this.viewColors=Ka(i.theme.tokens))),!this.hasCustomColor&&this.viewColors&&(this.color=this.viewColors[this.view].color)}set style(t){super.style={...super.style,cursor:Ii,...t}}get style(){const t=super.style;return t.cursor=this.disabled?"not-allowed":Ii,t}setOnClick(t){this.customClickHandler=t}resolveColor(){let t;if(this.hasCustomColor||!this.viewColors)t=this.color;else{const e=this.viewColors[this.view];this.isActive?t=e.colorActive:this.isHovered?t=e.colorHover:t=e.color}return this.disabled&&(t=Ya(t,Za)),t}onPaint(t,e){const i=this.color;this.color=this.resolveColor(),super.onPaint(t,e);const{view:o,isHovered:n,wordWrap:s}=this,a=!s&&(o==="default"||o==="clear"||!this.disabled&&n),u=this.getLastPaintedTextWidth();a&&u>0&&this.paintUnderline(t,u),this.color=i}paintUnderline(t,e){const{x:i,y:o,height:n}=this.rect,s=o+n+ja,c=this.resolveColor();t.custom(a=>{a.beginPath(),a.moveTo(i,s),a.lineTo(i+e,s),a.strokeStyle=c,a.lineWidth=Ja,a.stroke()})}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1,this.isActive=!1}onMouseDown(){this.disabled||(this.isActive=!0)}onMouseUp(){this.isActive=!1}onClick(t){if(this.disabled)return;let e=!1;const i=t.preventDefault;t.preventDefault=()=>{e=!0,i.call(t)},!(this.customClickHandler&&(this.customClickHandler(t),e))&&this.navigate()}navigate(){if(!this.href)return;const t=this.target||"_self";if(t==="_self")window.location.href=this.href;else{const e=this.rel??(t==="_blank"?"noopener,noreferrer":void 0);window.open(this.href,t,e)}}}let ge=0;const Ke=new Set;function Qa(){ge++,ge===1&&Ke.forEach(t=>t(!0));let r=!1;return()=>{r||(r=!0,ge--,ge===0&&Ke.forEach(t=>t(!1)))}}function tl(){return ge>0}function el(r){return Ke.add(r),()=>{Ke.delete(r)}}const qe="basic-grid-canvas-portal-hover",il=400;let rl=0;const Hi="__canvasPortalTargetId";function ol(r){var i;if(!r)return"window";const t=r;if((i=t.dataset)!=null&&i.portalTargetId)return t.dataset.portalTargetId;const e=r;return e[Hi]||(e[Hi]=++rl),String(e[Hi])}const ie=new Map;function nl(r,t){return`${r??"default"}:${t??"default"}`}function ji(r,t){const e=new CustomEvent(qe,{detail:r});t?t.dispatchEvent(e):window.dispatchEvent(e)}function Ao(r){const t=ie.get(r);t!==void 0&&(window.clearTimeout(t),ie.delete(r))}function sl(r){const t=`${r}:`;for(const[e,i]of ie.entries())e.startsWith(t)&&(window.clearTimeout(i),ie.delete(e))}function cl(r,t,e){const i=window.setTimeout(()=>{ie.delete(r),ji(t,e)},il);ie.set(r,i)}function me(r,t,e){if(typeof window>"u")return;const i=ol(t),o=`${i}:${nl(r.source,r.originId)}`;r.visible?(sl(i),ji(r,t)):e?(Ao(o),ji(r,t)):(Ao(o),cl(o,r,t))}function al(r,t){if(typeof window>"u")return()=>{};const e=t??window,i=o=>{const n=o;n.detail&&r(n.detail)};return e.addEventListener(qe,i),()=>{e.removeEventListener(qe,i)}}const ll="cell";class yt{constructor(t,e){this.bounds=null,this.batcher=new ii,this.portalEventTarget=null,this.tooltipContext=void 0,this.rootNode=t,this.hoverController=new or({onCursorChange:i=>{var o;return(o=this.onCursorChange)==null?void 0:o.call(this,i)},portalHoverDispatch:me,getPortalEventTarget:()=>this.portalEventTarget,portalSource:ll,getTooltipContext:()=>this.tooltipContext})}setPortalEventTarget(t){this.portalEventTarget=t}setTooltipContext(t){this.tooltipContext=t}setRootNode(t){this.rootNode=t}setOriginId(t){}render(t,e,i,o,n){this.bounds={...o??e},this.hoverController.setAbsoluteBounds(this.bounds),t.save(),t.translate(e.x,e.y),this.prepareRootNode(t,e),i?this.dispatchPointerEvent("mousemove",i.x,i.y):this.handleMouseLeave(),this.batcher.clear(),this.batcher.setAnimationContext(n),this.rootNode.paint(this.batcher,t),this.batcher.flush(t),t.restore()}dispatchPointerEvent(t,e,i,o){var d;if(!this.bounds)return{propagationStopped:!1,suppressGridDefault:!1};const n=this.rootNode.hitTest(e,i),s=(d=n.find(l=>l.interaction!==void 0))==null?void 0:d.interaction;let c=!1,a=!1;const u={type:t,x:e,y:i,originalEvent:o??{},target:n[0],stopPropagation:()=>{c=!0},preventDefault:()=>{a=!0,o==null||o.preventDefault()}};return n.length===0?(t==="mousemove"&&this.hoverController.handlePointerMove([],null),{propagationStopped:!1,suppressGridDefault:a,...s?{interaction:s}:{}}):(this.dispatchEventToNodes(n,u,t),t==="mousemove"&&this.hoverController.handlePointerMove(n,u),{propagationStopped:c,suppressGridDefault:a,...s?{interaction:s}:{}})}getInteractionAtPoint(t,e){var i;if(this.bounds)return(i=this.rootNode.hitTest(t,e).find(o=>o.interaction))==null?void 0:i.interaction}dispatchEventToNodes(t,e,i){let o=!1;const n={...e,stopPropagation:()=>{o=!0,e.stopPropagation()}};for(const s of t){if(o)break;const c={...n,currentTarget:s};this.invokeNodeHandler(s,i,c)}}invokeNodeHandler(t,e,i){switch(e){case"click":t.onClick({...i,cellBounds:this.bounds});break;case"mousedown":t.onMouseDown(i);break;case"mouseup":t.onMouseUp(i);break;case"dblclick":t.onDoubleClick(i);break;case"mousemove":t.onMouseMove(i);break;case"mouseenter":t.onMouseEnter(i);break;case"mouseleave":t.onMouseLeave(i);break}}handleMouseLeave(){this.hoverController.handlePointerLeave()}prepareRootNode(t,e){this.rootNode.rect.x=0,this.rootNode.rect.y=0,this.rootNode.rect.width=e.width,this.rootNode.rect.height=e.height,this.rootNode instanceof Ct?this.rootNode.performLayout(t):this.rootNode.measure(t)}computeCursor(t,e){return this.hoverController.computeCursor(t,e,this.rootNode)}getCurrentCursor(){return this.hoverController.getCurrentCursor()}forcePortalHide(){this.hoverController.handlePortalReset()}}const si="canvas-cell";function Bn(r,t,e,i){return{kind:L.GridCellKind.Custom,allowOverlay:!1,readonly:!0,copyData:e??"",data:{kind:si,render:r,onClick:t},...i}}function Fr(r){var e;const t=r;return!!(t&&t.kind===L.GridCellKind.Custom&&((e=t.data)==null?void 0:e.kind)===si)}const Ce=5,Rn=[["hoverX","hoverY"],["mouseX","mouseY"],["pointerX","pointerY"],["posX","posY"],["x","y"]],_n="default",kn="pointer";function Mn(r,t){for(const[e,i]of Rn){const o=r[e],n=r[i];if(typeof o=="number"&&typeof n=="number"&&!Number.isNaN(o)&&!Number.isNaN(n)){if(zn(o,n,t))return{x:o-t.x,y:n-t.y};if(On(o,n,t))return{x:o,y:n}}}}function zn(r,t,e){return r>=e.x&&r<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}function On(r,t,e){return r>=-Ce&&r<=e.width+Ce&&t>=-Ce&&t<=e.height+Ce}function Nn(r,t,e){if((r==null?void 0:r.canvasRoot)instanceof yt){const i=e?"nativeEvent"in e?e.nativeEvent:e:void 0;return r.canvasRoot.dispatchPointerEvent("click",t.x,t.y,i)}return{propagationStopped:!1,suppressGridDefault:!1}}function Wn(r,t){if(r!=null&&r.clickHandlers&&Array.isArray(r.clickHandlers)){for(const{area:e,handler:i}of r.clickHandlers)if(mr(t.x,t.y,e))return i(),!0}return!1}function Gn(r,t,e,i,o,n){const{onClick:s}=r.data;return s?!!s(t.x,t.y,e,i,o,n??void 0):!1}const Ji=new WeakMap,$n=new Map;function Un(r,t,e){const i={...e??{}};return delete i.hoveredAreas,$n.set(r,i),t.data.renderData=i,i}function ee(r,t){return t.data.renderData??$n.get(r)}function Xn(r,t){var i,o;(((i=Ji.get(r))==null?void 0:i.hovered)??!1)!==t&&(Ji.set(r,{hovered:t}),t?(o=r.onMouseEnter)==null||o.call(r):ul(r))}function ul(r){const{renderData:t}=r;(t==null?void 0:t.canvasRoot)instanceof yt&&t.canvasRoot.forcePortalHide()}function Vn(r){var t;return(t=Ji.get(r))==null?void 0:t.hovered}function Yn(r,t,e,i){var o;if(r instanceof yt)if(t){if(e.event){const s="nativeEvent"in e.event?e.event.nativeEvent:e.event;r.dispatchPointerEvent("mousemove",t.x,t.y,s)}const n=r.computeCursor(t.x,t.y);n&&n!==_n&&((o=i.overrideCursor)==null||o.call(i,n))}else r.handleMouseLeave(),r.forcePortalHide()}function Kn(r,t,e,i,o){var a;const n=!!(t&&e.some(u=>mr(t.x,t.y,u))),s=Vn(r)??!1,c=!!t;c!==s&&Xn(r,c),n&&!i&&((a=o.overrideCursor)==null||a.call(o,kn))}function br({cell:r,rect:t,relativePoint:e,renderData:i,rowData:o,rowIndex:n,event:s}){const c=Nn(i,e,s);return c.propagationStopped?{handled:!0,propagationStopped:!0,suppressGridDefault:c.suppressGridDefault}:Wn(i,e)?{handled:!0,propagationStopped:!1,suppressGridDefault:c.suppressGridDefault}:Gn(r,e,t,o,n,i)?{handled:!0,propagationStopped:!1,suppressGridDefault:c.suppressGridDefault}:{handled:!1,propagationStopped:!1,suppressGridDefault:c.suppressGridDefault}}function qn(r){const t=r.selection==="keep",e=r.cellClick==="stop",i=r.editor==="never",o=r.contextMenu==="keep-selection"?"manual-keep-selection":r.contextMenu==="none"?"none":"normal";return{suppressEarlyGridSelect:t,suppressExternalCellClick:e,suppressGridDefaultFor:{pointerdown:t,click:i,contextmenu:o!=="normal"},contextMenuMode:o,...r.editor==="open-on-click"?{editorRequest:{target:"self"}}:{}}}function hl({decision:r,propagationStopped:t,suppressGridDefault:e}){const i=r.suppressGridDefaultFor.click||e,o={suppressExternalCellClick:r.suppressExternalCellClick||t,suppressGridDefaultForClick:i};return!i&&r.editorRequest&&(o.editorRequest=r.editorRequest),o}function Zn({renderData:r,relativePoint:t}){const e=(r==null?void 0:r.canvasRoot)instanceof yt?r.canvasRoot.getInteractionAtPoint(t.x,t.y):void 0;return e?{handled:!0,suppressEarlyGridSelect:qn(e).suppressEarlyGridSelect,interaction:e}:{handled:!1,suppressEarlyGridSelect:!1}}function Sr(r={}){return{kind:L.GridCellKind.Custom,isMatch:t=>{var e;return((e=t.data)==null?void 0:e.kind)===si},needsHover:!0,needsHoverPosition:!0,onSelect:t=>{var h;const e=t.cell,i=t.bounds,o=Ni(t);if(!o)return;const n=Wi(o,i),s=$e(t),c=te(s,i),a=ee(c,e),u=Zn({renderData:a,relativePoint:n}),d=t.location??[s.colIndex,s.rowIndex],l=u.interaction&&r.beginOrGetInteractionSession?r.beginOrGetInteractionSession({cell:d,relativePoint:n,interaction:u.interaction,source:"pointer",...t.button!==void 0?{button:t.button}:{}}):void 0;(l!=null&&l.decision.suppressEarlyGridSelect||u.suppressEarlyGridSelect)&&((h=t.preventDefault)==null||h.call(t))},onClick:t=>{var h,f;const e=t.cell,i=t.bounds,o=Ni(t);if(!o)return;const n=Wi(o,i),s=$e(t),c=te(s,i),a=ee(c,e),u=t.location??[s.colIndex,s.rowIndex],l=((h=r.consumeCanvasClickResult)==null?void 0:h.call(r,{cell:u,relativePoint:n,...t.button!==void 0?{button:t.button}:{}}))??br({cell:e,rect:i,relativePoint:n,renderData:a,rowData:t.row??t.rowData,rowIndex:s.rowIndex,event:t.event});l.suppressGridDefault&&((f=t.preventDefault)==null||f.call(t)),l.handled},draw:(t,e)=>{const{ctx:i,rect:o,theme:n}=t,{render:s}=e.data,c=t.cellFillColor!==void 0?{...n,bgCell:t.cellFillColor}:n,a=$e(t),u=te(a,o),d={hoverX:t.hoverX,hoverY:t.hoverY,row:t.row,rowData:t.rowData,event:t.event,frameTime:t.frameTime,requestAnimationFrame:t.requestAnimationFrame},l=ln(t.hoverX,t.hoverY,o)??Mn(d,o);i.save();const h=ee(u,e),f=s(i,o,c,l==null?void 0:l.x,l==null?void 0:l.y,{...d,canvasRoot:h==null?void 0:h.canvasRoot}),g=(f==null?void 0:f.hoveredAreas)??[];Un(u,e,f);const C=(f==null?void 0:f.canvasRoot)??(h==null?void 0:h.canvasRoot);Yn(C,l,d,t),Kn(e.data,l,g,C,t),i.restore()},onPaste:()=>{}}}const dl=Sr(),Ze=new Map;function jn(r){const t=fl(r),e=Ze.get(t);if(e)return e;const o=sc.renderToString(r).match(/<svg[\s\S]*?<\/svg>/);if(!o)return console.warn("Could not extract SVG from React icon component:",r.type),"";const n=o[0];return Ze.set(t,n),n}function fl(r){const t=r.type,e=typeof t=="function"||typeof t=="object"?t.displayName||t.name||"Anonymous":String(t),{size:i,color:o,className:n}=r.props||{},s=JSON.stringify({size:i,color:o,className:n});return`${e}:${s}`}function At(r){return m.isValidElement(r)}function mt(r){return typeof r=="string"?r:At(r)?jn(r):""}function gl(){Ze.clear()}function Cl(){return Ze.size}const Qi=r=>{if(r===void 0)return;if(typeof r=="number")return r;const t=r.trim();if(t==="100%")return"100%";const e=t.match(/^(-?\d+(?:\.\d+)?)px$/i);if(e)return Number(e[1]);const i=t.match(/^(-?\d+(?:\.\d+)?)rem$/i);if(i)return Number(i[1])*16;const o=Number(t);if(!Number.isNaN(o))return o},Eo={small:{radius:4,stroke:1.5},medium:{radius:4,stroke:1.5},big:{radius:6,stroke:2}};function vl(r,t,e,i,o,n,s,c,a,u,d=!1,l=!1){const f=s-0,C=Math.min(f-0,nr),v=n==="auto"?C:n,w=e+0,y=(a==null?void 0:a.rowSize)||"medium",S=!i&&!o,b=zt(l,{x:t,y:e,width:v,height:s}),A=Ic(a,i,o,b,d),F=t+v*.5,H=w+f*.5,E=F-C*.5,P=H-C*.5;return r.roundedRect(t,w,v,f,Eo[y].radius,{fillStyle:A.bgColor,strokeStyle:A.borderColor,lineWidth:S?Eo[y].stroke:void 0}),ft(r,c,E,P,C,A.iconColor),{x:t,y:w,width:v,height:f}}const ml=28,pl="default",yl="s",To="pointer",Fl=20,tr={indeterminateIcon:'<svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" fill="none"><path stroke-linecap="round" stroke-width="2" stroke="currentColor" d="m5.09449,9.0315l8,0"></path></svg>',checkedIcon:'<svg viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg" fill="none"><path fill="currentColor" d="m5.70711,8.15582c-0.39053,-0.39052 -1.02369,-0.39052 -1.41422,0c-0.39052,0.39053 -0.39052,1.02369 0,1.41422l3.70666,3.70666l6.71095,-6.70248c0.3908,-0.39027 0.3912,-1.02344 0.0009,-1.41421c-0.3903,-0.39077 -1.02344,-0.39117 -1.41421,-0.00089l-5.29674,5.29004l-2.29334,-2.29334z"></path></svg>'},bl=Object.values(tr),Sl={accentColor:"#1e88e5",accentFg:"#ffffff"};class xl extends Ft{constructor(t,e,i=!1,o=!1,n){super(t),this.view=pl,this.buttonSize=yl,this.isHovered=!1,this.useNewApi=!1,this.icon=e,this.checked=i,this.indeterminate=o,this.size=(n==null?void 0:n.size)??"auto",this.theme=n==null?void 0:n.theme,this.view=(n==null?void 0:n.view)??"primary",this.disabled=(n==null?void 0:n.disabled)??!1,super.style={...super.style,cursor:this.disabled?"auto":To},!this.disabled&&(n!=null&&n.onClick)&&(this.onClick=s=>{var c;return(c=n.onClick)==null?void 0:c.call(n,s)})}set style(t){super.style={...super.style,...t}}get style(){const t=super.style;return t.cursor||(t.cursor=To),t}measure(t){if(this.useNewApi){const e=at[this.buttonSize];this.rect.height=e.height,this.rect.width=e.height}else{const e=wl(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:i,y:o,width:n,height:s}=this.rect;vl(t,i,o,this.checked,this.indeterminate,n,s,this.icon,this.theme??Sl,this.view,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}}function wl(r,t){const e=typeof r=="number"?r:ml,i=0,o=re,n=Math.min(e-o*2-oe,Fl),s=typeof r=="number"?r:n+i*2;return{height:e,width:s,paddingX:i,paddingY:o,iconSize:n}}const Al=({backgroundColor:r,__backgroundColorResolver:t},e)=>(t==null?void 0:t(e))??r,vt=r=>{const t=e=>null;return t.__canvasType=r,t},El=m.memo(({cellId:r,renderContent:t,nodeRegistry:e,onRegistryChange:i})=>{const o=t(),n=m.useRef(null);return m.useLayoutEffect(()=>{const s=e.current,c=n.current;c&&c!==r&&s.delete(c);const a=s.get(r),u=a!==void 0;s.set(r,o),u&&a!==o&&(i==null||i()),n.current=r},[r,o,e,i]),m.useLayoutEffect(()=>()=>{const s=e.current;n.current&&(s.delete(n.current),n.current=null)},[e]),null}),Tl=vt("Skeleton"),Dl=vt("Container"),Il=vt("Text"),Hl=vt("Icon"),Ll=vt("Button"),Pl=vt("IconButton"),Bl=vt("EmbedIconButton"),Rl=vt("Rect"),_l=vt("Badge"),kl=vt("Checkbox"),Ml=vt("Link"),ve={Container:Dl,Text:Il,Icon:Hl,Button:Ll,IconButton:Pl,EmbedIconButton:Bl,Checkbox:kl,Rect:Rl,Badge:_l,Skeleton:Tl,Link:Ml,icon:mt};function dt(r,t){if(r)return function(e){r.call(this,e)}}function je({element:r,idPrefix:t="root",theme:e}){const i=[],o=Jn(r,t,0,i,e);if(i.length>0){const n=new Map;for(const{icon:s,size:c}of i){if(!s)continue;const a=n.get(c)??[];a.push(s),n.set(c,a)}n.forEach((s,c)=>{gn(s,{size:c})})}return o}function er(r){return r==null?"":typeof r=="string"||typeof r=="number"?String(r):Array.isArray(r)?r.map(er).join(""):""}function Do(r,t,e){const i=r.fontMetrics,o=r.fonts;if(i===void 0||o===void 0)return{};const n=t??r.baseFontStyle,s=Object.keys(o).find(a=>o[a]===n);if(s===void 0)return{};const c=i[s];return c===void 0?{}:{fontSize:c.fontSize,...e===void 0?{lineHeightPx:c.lineHeightPx}:{}}}function Jn(r,t,e,i,o){if(!r||!m.isValidElement(r))throw new Error("Invalid element. Use Canvas.* components.");const n=r.type,s=n.__canvasType;if(!s)throw new Error(`Unknown canvas component. Use Canvas.* components. Got: ${(n==null?void 0:n.name)||n}`);const c=r.props,u=(r.key!=null?String(r.key):null)??e,d=c.id??`${t}-${s.toLowerCase()}-${u}`,l=g=>At(g)?mt(g):g;if(s==="Icon"&&c.icon)i.push({icon:l(c.icon),size:c.size??16});else if(s==="IconButton"&&c.icon){const g=c.buttonSize??"s",{iconSize:C}=at[g];i.push({icon:l(c.icon),size:C})}else if(s==="EmbedIconButton"&&c.icon){const g=c.buttonSize??"s",C=c.overrideIconSize??at[g].iconSize;i.push({icon:l(c.icon),size:C})}else if(s==="Checkbox")bl.forEach(g=>{i.push({icon:l(g),size:20})});else if(s==="Button"){const g=c.size??"s",{iconSize:C}=at[g];c.leftIcon&&i.push({icon:l(c.leftIcon),size:C}),c.rightIcon&&i.push({icon:l(c.rightIcon),size:C})}else if(s==="Badge"){const g=c.size??"s",v={xs:10,s:12,m:14,l:16}[g]??12;c.leftIcon&&i.push({icon:l(c.leftIcon),size:v}),c.rightIcon&&i.push({icon:l(c.rightIcon),size:v})}const h=zl(s,d,c,o);if(c.portalHoverEnabled&&(h.portalHoverEnabled=!0),c.tooltip!==void 0&&(h.tooltip=c.tooltip),c.autoTooltip!==void 0){const g=c.autoTooltip;(g===!0||typeof g=="object"&&g!==null&&g.enabled!==!1)&&(h.portalHoverEnabled=!0)}c.interaction!==void 0&&(h.interaction=qo(c.interaction)),typeof c.zIndex=="number"&&(h.zIndex=c.zIndex),c.style&&(h.style=c.style);const{children:f}=c;return f&&h instanceof Ct&&m.Children.toArray(f).forEach((C,v)=>{if(m.isValidElement(C)){const w=Jn(C,d,v,i,o);h.addChild(w)}}),h}function zl(r,t,e,i){switch(r){case"Container":{const o=e,{id:n,gap:s,columnGap:c,rowGap:a,position:u,left:d,top:l,right:h,bottom:f,zIndex:g,onClick:C,onMouseEnter:v,onMouseLeave:w,onMouseDown:y,backgroundColor:S,__backgroundColorResolver:b,portalHoverEnabled:A,...F}=o,H={...F,columnGap:c??s??0,rowGap:a??s??0},E=new Ct(t,H,Al(o,i));u&&(E.position=u),d!==void 0&&(E.left=d),l!==void 0&&(E.top=l),h!==void 0&&(E.right=h),f!==void 0&&(E.bottom=f);const P=dt(C),M=dt(v),ct=dt(w),W=dt(y);return P&&(E.onClick=P),M&&(E.onMouseEnter=M),ct&&(E.onMouseLeave=ct),W&&(E.onMouseDown=W),E}case"Text":{const{children:o,font:n,color:s,wordWrap:c,lineHeight:a,overflow:u,textOverflow:d,ellipsis:l,maxLines:h,autoTooltip:f,position:g,left:C,top:v,right:w,bottom:y,portalHoverEnabled:S}=e,b=er(o),A=i.fontFamily||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';let F;n?F=/["']|sans-serif|serif|monospace/i.test(n)?n:`${n} ${A}`:F=i.baseFontStyle?`${i.baseFontStyle} ${A}`:`13px ${A}`;const H=Do(i,n,a),E=new yr(t,b,{font:F,...H,color:s,wordWrap:c,lineHeight:a,overflow:u,textOverflow:d,ellipsis:l,maxLines:h,autoTooltip:f});return g&&(E.position=g),C!==void 0&&(E.left=C),v!==void 0&&(E.top=v),w!==void 0&&(E.right=w),y!==void 0&&(E.bottom=y),E}case"Icon":{const{icon:o,size:n,color:s,backgroundColor:c,position:a,left:u,top:d,right:l,bottom:h,onClick:f,onMouseEnter:g,onMouseLeave:C,onMouseDown:v}=e,w=At(o)?mt(o):o,y=new xn(t,w,{size:n,color:s});c&&(y.backgroundColor=c),a&&(y.position=a),u!==void 0&&(y.left=u),d!==void 0&&(y.top=d),l!==void 0&&(y.right=l),h!==void 0&&(y.bottom=h);const S=dt(f),b=dt(g),A=dt(C),F=dt(v);return S&&(y.onClick=S),b&&(y.onMouseEnter=b),A&&(y.onMouseLeave=A),F&&(y.onMouseDown=F),y}case"Button":{const{children:o,variant:n,view:s,size:c,leftIcon:a,rightIcon:u,disabled:d,position:l,left:h,top:f,right:g,bottom:C,onClick:v}=e,w=typeof o=="string"?o:"",y=At(a)?mt(a):a,S=At(u)?mt(u):u,b=new Sn(t,w,{variant:n,view:s,size:c,leftIcon:y,rightIcon:S,disabled:d,theme:i});if(l&&(b.position=l),h!==void 0&&(b.left=h),f!==void 0&&(b.top=f),g!==void 0&&(b.right=g),C!==void 0&&(b.bottom=C),!d){const A=dt(v);A&&(b.onClick=A)}return b}case"EmbedIconButton":case"IconButton":{const{icon:o,size:n,variant:s,view:c,buttonSize:a,overrideSquareSize:u,overrideIconSize:d,disabled:l,position:h,left:f,top:g,right:C,bottom:v,onClick:w}=e,y=At(o)?mt(o):o,S=r==="IconButton"?wn:$i,b=new S(t,y,{size:n,variant:s,view:c,buttonSize:a,overrideSquareSize:u,overrideIconSize:d,disabled:l});if(b instanceof $i){const{iconColor:A,iconColorHovered:F}=e;A!==void 0&&(b.iconColor=A),F!==void 0&&(b.iconColorHovered=F)}if(h&&(b.position=h),f!==void 0&&(b.left=f),g!==void 0&&(b.top=g),C!==void 0&&(b.right=C),v!==void 0&&(b.bottom=v),!l){const A=dt(w);A&&(b.onClick=A)}return b}case"Checkbox":{const{checked:o,indeterminate:n,size:s="auto",theme:c,view:a,buttonSize:u,disabled:d,position:l,left:h,top:f,right:g,bottom:C,onClick:v}=e,w=mt(o?tr.checkedIcon:tr.indeterminateIcon),y=new xl(t,w,o,n,{size:s,theme:c??i,view:a,buttonSize:u,disabled:d});if(l&&(y.position=l),h!==void 0&&(y.left=h),f!==void 0&&(y.top=f),g!==void 0&&(y.right=g),C!==void 0&&(y.bottom=C),!d){const S=dt(v);S&&(y.onClick=S)}return y}case"Rect":{const{color:o,borderColor:n,borderWidth:s,position:c,left:a,top:u,right:d,bottom:l}=e,h=new An(t,o);return n&&(h.borderColor=n),s&&(h.borderWidth=s),c&&(h.position=c),a!==void 0&&(h.left=a),u!==void 0&&(h.top=u),d!==void 0&&(h.right=d),l!==void 0&&(h.bottom=l),h}case"Badge":{const{text:o,view:n,size:s,transparent:c,clear:a,leftIcon:u,rightIcon:d,customColor:l,customBackgroundColor:h,position:f,left:g,top:C,right:v,bottom:w,portalHoverEnabled:y,pilled:S}=e,b=At(u)?mt(u):u,A=At(d)?mt(d):d,F=new bn(t,o,{view:n,size:s,transparent:c,clear:a,leftIcon:b,rightIcon:A,pilled:S,customColor:l,customBackgroundColor:h,theme:i});return f&&(F.position=f),g!==void 0&&(F.left=g),C!==void 0&&(F.top=C),v!==void 0&&(F.right=v),w!==void 0&&(F.bottom=w),F}case"Skeleton":{const{width:o,height:n,roundness:s,lighter:c,customGradientColor:a,animated:u,shimmerDuration:d,style:l,portalHoverEnabled:h}=e,f=Qi(o),g=Qi(n),C={...l,...f!==void 0?{width:f}:null,...g!==void 0?{height:g}:null},v=new Ln(t,{roundness:s,lighter:c,customGradientColor:a,shimmerDuration:d,animated:u});return v.style=C,v}case"Link":{const{children:o,href:n,target:s,view:c,disabled:a,font:u,color:d,wordWrap:l,lineHeight:h,overflow:f,textOverflow:g,ellipsis:C,maxLines:v,position:w,left:y,top:S,right:b,bottom:A,onClick:F,portalHoverEnabled:H}=e,E=er(o),P=i.fontFamily||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';let M;u?M=/["']|sans-serif|serif|monospace/i.test(u)?u:`${u} ${P}`:M=i.baseFontStyle?`${i.baseFontStyle} ${P}`:`13px ${P}`;const ct=Do(i,u,h),W=new Pn(t,E,{font:M,...ct,color:d,wordWrap:l,lineHeight:h,overflow:f,textOverflow:g,ellipsis:C,maxLines:v,href:n,target:s,view:c,disabled:a,theme:i});if(w&&(W.position=w),y!==void 0&&(W.left=y),S!==void 0&&(W.top=S),b!==void 0&&(W.right=b),A!==void 0&&(W.bottom=A),!a){const Q=dt(F);Q&&W.setOnClick(Q)}return W}default:throw new Error(`Unknown canvas component type: ${r}`)}}const Ol='400 normal 1rem/1.25rem "SB Sans Text", sans-serif, Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif',Nl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Wl=30,Gl=50,$l=3;async function Qn(){return typeof document>"u"||!document.fonts?Promise.resolve():document.fonts.ready.then(()=>{})}function ts(r={}){const{testFont:t=Ol,testText:e=Nl,maxChecks:i=Wl,checkInterval:o=Gl,stableThreshold:n=$l}=r;return new Promise(s=>{if(typeof document>"u"){s();return}const a=document.createElement("canvas").getContext("2d");if(!a){s();return}let u=-1,d=0,l=0;const h=()=>{a.font=t;const{width:f}=a.measureText(e);f!==u?(u=f,d=0):d+=1,l+=1,d>=n||l>=i?s():setTimeout(h,o)};h()})}function es(r){return Qn().then(()=>ts(r))}function xr({dataEditorRef:r,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i}){const o=r.current;if(!o)return;const n=Math.min(30,t),s=e,c=[];for(let a=0-i;a<n;a+=1)for(let u=0;u<s;u+=1)c.push({cell:[u,a]});c.length>0&&o.updateCells(c)}function wr(r){let t=null;return()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,r()}))}}function Ul(){const r=m.useRef(null),t=m.useCallback(()=>(r.current||(r.current=new jo),r.current),[]);return{registry:t(),getRegistry:t}}function is({dataEditorRef:r,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i}){m.useLayoutEffect(()=>{const o=wr(()=>{ka(),xr({dataEditorRef:r,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i})});es().then(o)},[r,t,e,i])}function rs({dataEditorRef:r,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i}){m.useEffect(()=>{const o=wr(()=>{xr({dataEditorRef:r,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i})});return dn(o)},[r,t,e,i])}L.GridCellKind.Text;const Je=(r,t)=>({kind:L.GridCellKind.Text,data:r,displayData:r,allowOverlay:!0,readonly:!0,...t}),Jt=r=>{const{data:t,...e}=r??{};return{kind:L.GridCellKind.Text,data:"",displayData:"",allowOverlay:!0,readonly:!0,...e}};function os(r){const t=r;return!!(t!=null&&t.kind)}function Xl(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Ar(r){return typeof r!="object"&&!Array.isArray(r)||r===null}function ns(r){return r==null||typeof r=="boolean"}const ci=r=>{if(!r||!m.isValidElement(r))return!1;const t=r.type;return!!(t!=null&&t.__canvasType)},Er=r=>typeof r=="string",ir=r=>Er(r)?!0:ci(r),Vl=r=>Er(r)?!0:ci(r),Io=({jsxElement:r,canvasCellCache:t,cellInfo:e,options:i})=>{let o=null;if(os(r))return{...r,...i};if(Ar(r))return ns(r)?Jt(i):Je(String(r),i);if(!ci(r)){const w="передан НЕ CanvasEl";return Je(w,{...i,data:w})}const{colInd:n,rowInd:s,row:c,column:a}=e,{id:u}=a,d=i.getPortalEventTarget;let l=null;const h=`cell-${n}-${s}`,f=(w,y,S,b,A,F)=>{let H=(F==null?void 0:F.canvasRoot)instanceof yt?F.canvasRoot:l;{if(!r)return{};const M=je({element:r,idPrefix:`cell-${n}-${s}-${u}`,theme:S});H?(H.setRootNode(M),H.setOriginId(h)):H=new yt(M,h),l=H}if(!H)return{};const E=b!==void 0&&A!==void 0?{x:b,y:A}:void 0;H.rootNode.style={width:y.width,height:y.height},o||(o=w.canvas.getBoundingClientRect());const P={x:o.left+y.x,y:o.top+y.y,width:y.width,height:y.height};return H.setPortalEventTarget((d==null?void 0:d())??null),H.setTooltipContext({column:e.column,row:e.row,ctxs:e.ctxs,refTable:i.refTable}),H.render(w,y,E,P,{frameTime:F==null?void 0:F.frameTime,requestAnimationFrame:F==null?void 0:F.requestAnimationFrame}),l=H,{canvasRoot:H}},{data:g,...C}=i,v=a.copyData?typeof a.copyData=="function"?a.copyData(c):a.copyData:g;return Bn(f,void 0,v,C)},Tr=(r,t,e)=>r?t>=r.x&&t<r.x+r.width&&e>=r.y&&e<r.y+r.height:!1,Yl=r=>{const t=r.findIndex(e=>!e.isServiceColumn);return t===-1?r.length:t},Kl=(r,t)=>{if(!r)return;const e=Math.max(r.x,t),i=Math.max(0,r.x+r.width-e);if(!(i<=0||r.height<=0))return{x:e,y:r.y,width:i,height:r.height}};function ss({cellsSelectionMode:r,selection:t,baseTheme:e,serviceColumnsCount:i,activeDataRange:o,outlineRange:n,checkboxSelectedRowIndexes:s,errorCellRanges:c,highlightRegionsExternal:a}){return m.useMemo(()=>{const u=[...a??[]],d=t.current,l=()=>{if(c!=null&&c.length)for(const v of c)u.push({color:e.errorOutlineColor,range:v,style:"solid-outline"})};if(!d||r==="disabled")return l(),u.length>0?u:void 0;const[,h]=d.cell,g=(s==null?void 0:s.has(h))??!1?e.selectionActiveCheckboxBg:e.selectionActiveBg,C=e.selectionServiceActiveBg;return o&&i>0&&u.push({color:C,range:{x:0,y:o.y,width:i,height:o.height},style:"no-outline"}),o&&r==="cell"&&o.width===1&&o.height===1&&u.push({color:g,range:o,style:"no-outline"}),n&&u.push({color:e.accentColor,range:n,style:"solid-outline"}),l(),u.length>0?u:void 0},[r,t,e.selectionActiveBg,e.selectionActiveCheckboxBg,e.selectionServiceActiveBg,e.errorOutlineColor,e.accentColor,i,o,n,s,c,a])}function cs({baseRegions:r,selectedColumnIndexes:t,headerSelectedRowIndexes:e,activeRow:i,activeRange:o,selectionRangeStack:n,checkboxAvailableRowIndexes:s,totalRows:c,firstDataCol:a,columnsCount:u,theme:d}){return m.useMemo(()=>{const l=t.length>0,h=e.length>0,f=i!==void 0,g=((n==null?void 0:n.length)??0)>0;if(!l&&!h&&!f&&!g)return r;const C=u-a,v=[...r??[]],w=(y,S)=>{const[b,...A]=[...y].sort((P,M)=>P-M);if(b===void 0)return;let F=b,H=b;const E=(P,M)=>{v.push({color:d.accentColor,range:S(P,M),style:"solid-outline"})};for(const P of A)P===H+1||(E(F,H),F=P),H=P;E(F,H)};if(l){a>0&&v.push({color:d.selectionServiceActiveBg,range:{x:0,y:0,width:a,height:c},style:"no-outline"});for(const y of t)v.push({color:d.selectionActiveBg,range:{x:y,y:0,width:1,height:c},style:"no-outline"});w(t,(y,S)=>({x:y,y:0,width:S-y+1,height:c}))}if(h&&C>0){if(a>0)for(const y of e)v.push({color:d.selectionServiceActiveBg,range:{x:0,y,width:a,height:1},style:"no-outline"});for(const y of e)v.push({color:d.selectionActiveBg,range:{x:a,y,width:C,height:1},style:"no-outline"});w(e,(y,S)=>({x:a,y,width:C,height:S-y+1}))}if(i!==void 0&&C>0){const y=s!=null&&s.has(i)?d.selectionActiveCheckboxBg:d.selectionCheckboxBg,S=(A,F)=>{F>0&&v.push({color:y,range:{x:A,y:i,width:F,height:1},style:"no-outline"})};if(!(o&&i>=o.y&&i<o.y+o.height))S(a,C);else{const A=Math.max(o.x,a),F=o.x+o.width;S(a,A-a),S(F,u-F)}}if(g&&n&&a>0){const y=new Set;for(const S of n){const b=Math.max(S.x,a);if(!(S.x+S.width-b<=0||S.height<=0))for(let F=S.y;F<S.y+S.height;F+=1)y.add(F)}for(const S of y)v.push({color:d.selectionServiceActiveBg,range:{x:0,y:S,width:a,height:1},style:"no-outline"})}return v},[r,t,e,i,o,n,s,c,a,u,d.selectionActiveBg,d.selectionActiveCheckboxBg,d.selectionCheckboxBg,d.selectionServiceActiveBg,d.accentColor])}const Ne={columns:L.CompactSelection.empty(),rows:L.CompactSelection.empty(),current:void 0};function as({cellsSelectionMode:r,gridSelection:t,onGridSelectionChange:e,onSelectionEmit:i}){const[o,n]=m.useState(Ne),s=t!==void 0,c=t??o,a=m.useCallback(l=>{s?e==null||e(l):n(l),i==null||i(l)},[s,e,i]),u=m.useCallback(()=>{s?e==null||e(Ne):n(Ne),i==null||i(Ne)},[s,e,i]),d=m.useMemo(()=>r==="range-cell"?"rect":r==="multi-range-cell"?"multi-rect":r==="disabled"?"none":"cell",[r]);return{selection:c,handleGridSelectionChange:a,handleSelectionCleared:u,rangeSelect:d}}const Zt=new Set,Ho=({start:r,length:t})=>{const e=new Set;for(let i=0;i<t;i+=1)e.add(r+i);return e};function ls({columns:r,selection:t,cellsSelectionMode:e,checkboxSelectedRowIndexes:i}){return m.useMemo(()=>{const o=t.current,n=Yl(r);if(!(e!=="disabled"&&o!==void 0)||!o)return{hasAnyActiveSelection:!1,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:Zt,activeColumns:Zt,activeDataRange:void 0,isSingleCellCustomHighlight:!1,outlineRange:void 0,isServiceColumn:h=>{var f;return!!((f=r[h])!=null&&f.isServiceColumn)},isActiveRow:h=>!1,isCheckboxSelectedRow:h=>(i==null?void 0:i.has(h))??!1,isActiveDataCell:(h,f)=>!1,isActiveHeaderColumn:h=>!1};const c=Kl(o.range,n),a=c!==void 0,u=e==="cell"&&c!==void 0&&c.width===1&&c.height===1;if(!a)return{hasAnyActiveSelection:!1,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:Zt,activeColumns:Zt,activeDataRange:void 0,isSingleCellCustomHighlight:!1,outlineRange:void 0,isServiceColumn:h=>{var f;return!!((f=r[h])!=null&&f.isServiceColumn)},isActiveRow:h=>!1,isCheckboxSelectedRow:h=>(i==null?void 0:i.has(h))??!1,isActiveDataCell:(h,f)=>!1,isActiveHeaderColumn:h=>!1};const d=c!=null&&c.height&&c.height>0?Ho({start:c.y,length:c.height}):Zt,l=c!=null&&c.width&&c.width>0?Ho({start:c.x,length:c.width}):Zt;return{hasAnyActiveSelection:a,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:d,activeColumns:l,activeDataRange:c,isSingleCellCustomHighlight:u,outlineRange:u?c:void 0,isServiceColumn:h=>{var f;return!!((f=r[h])!=null&&f.isServiceColumn)},isActiveRow:h=>d.has(h),isCheckboxSelectedRow:h=>(i==null?void 0:i.has(h))??!1,isActiveDataCell:(h,f)=>Tr(c,h,f),isActiveHeaderColumn:h=>r[h]?l.has(h):!1}},[r,e,i,t])}function ql({highlightActiveRow:r,onHighlightActiveRowChange:t,isHighlightActiveRowControlled:e}){const[i,o]=m.useState(void 0),n=e??t!==void 0,s=n?r:i,c=m.useCallback(a=>{n||o(a),t==null||t(a)},[n,t]);return{activeRow:s,commitActiveRow:c}}function Zl({columns:r}){const[t,e]=m.useState(()=>L.CompactSelection.empty()),i=m.useMemo(()=>t.toArray().filter(u=>{var d;return!((d=r[u])!=null&&d.isServiceColumn)}),[t,r]),o=m.useMemo(()=>new Set(i),[i]),n=m.useRef(void 0),[s,c]=m.useState(!1),a=m.useCallback(()=>{e(L.CompactSelection.empty())},[]);return{selectedColumns:t,setSelectedColumns:e,selectedColumnIndexes:i,selectedColumnSet:o,lastSelectedColumnRef:n,isNativeColumnSelection:s,setIsNativeColumnSelection:c,clearColumnSelection:a}}function jl(){const[r,t]=m.useState(()=>L.CompactSelection.empty()),e=m.useMemo(()=>r.toArray(),[r]),i=m.useRef(r);i.current=r;const o=m.useRef(!1),n=m.useRef(L.CompactSelection.empty()),s=m.useRef(!1);m.useEffect(()=>{const a=d=>{o.current=d.ctrlKey||d.metaKey,n.current=i.current,s.current=!0},u=()=>{s.current=!1};return window.addEventListener("pointerdown",a,!0),window.addEventListener("pointerup",u,!0),()=>{window.removeEventListener("pointerdown",a,!0),window.removeEventListener("pointerup",u,!0)}},[]);const c=m.useCallback(()=>{t(L.CompactSelection.empty())},[]);return{selectedRows:r,setSelectedRows:t,headerSelectedRowIndexes:e,selectedRowsRef:i,ctrlGestureRef:o,ctrlBaseRowsRef:n,pointerGestureRef:s,clearRowSelection:c}}function us({columns:r,selection:t,cellsSelectionMode:e,highlightActiveType:i,enableColumnSelection:o,enableRowSelection:n,enableSelectAll:s,leadingServiceColumnsCount:c,dataRowCount:a,handleGridSelectionChange:u,handleSelectionCleared:d,onSelectionEmit:l,highlightActiveRow:h,onHighlightActiveRowChange:f,isHighlightActiveRowControlled:g}){const{selectedColumns:C,setSelectedColumns:v,selectedColumnIndexes:w,selectedColumnSet:y,lastSelectedColumnRef:S,isNativeColumnSelection:b,setIsNativeColumnSelection:A}=Zl({columns:r}),{setSelectedRows:F,headerSelectedRowIndexes:H,ctrlGestureRef:E,ctrlBaseRowsRef:P,pointerGestureRef:M}=jl(),{activeRow:ct,commitActiveRow:W}=ql({highlightActiveRow:h,onHighlightActiveRowChange:f,isHighlightActiveRowControlled:g}),Q=m.useMemo(()=>r.findIndex(z=>z.isServiceColumn&&z.id==="row-markers"),[r]),It=m.useCallback(z=>{const{current:N}=z;if(!N)return z;const $=c,{range:K}=N;if(K.x>=$)return z;const G=K.x+K.width-$;return G<=0?{current:void 0,rows:L.CompactSelection.empty(),columns:L.CompactSelection.empty()}:{...z,current:{...N,cell:[Math.max(N.cell[0],$),N.cell[1]],range:{...K,x:$,width:G}}}},[c]),ne=m.useCallback(z=>{const N=z.current;if(n&&Q>=0&&N&&N.cell[0]===Q){const K=c,G=N.range.y,Z=G+Math.max(N.range.height,1);if(E.current){const j=Z-G<=1;let tt=P.current;if(tt.length===0&&t.current&&t.current.cell[0]===Q){const bt=t.current.range;tt=L.CompactSelection.empty().add([bt.y,bt.y+Math.max(bt.height,1)]),P.current=tt}let rt;j?rt=tt.hasIndex(G)?tt.remove(G):tt.add(G):rt=tt.add([G,Z]),v(L.CompactSelection.empty()),F(rt),W(void 0),A(!1),u({...z,current:{...N,range:{x:K,y:N.range.y,width:0,height:N.range.height}}}),l==null||l({current:void 0,rows:rt,columns:L.CompactSelection.empty()});return}const V=Math.max(r.length-K,0);v(L.CompactSelection.empty()),F(L.CompactSelection.empty()),W(void 0),A(!1),u({...z,current:{...N,range:{x:K,y:N.range.y,width:V,height:N.range.height}}});return}const $=It(z);($.current!==void 0||$.rows.length>0)&&(v(L.CompactSelection.empty()),F(L.CompactSelection.empty())),A(!1),i==="row"?M.current&&$.current&&W($.current.cell[1]):W(void 0),u($)},[r,t,u,It,Q,n,c,i,l,W,E,P,M,v,F,A]),ai=m.useCallback(()=>{v(L.CompactSelection.empty()),F(L.CompactSelection.empty()),W(void 0),A(!1),d()},[d,W,v,F,A]),Ot=m.useRef([]),Bt=m.useMemo(()=>{var K;const z=new Set(w);if(b&&t.current){const{x:G,width:Z}=t.current.range;for(let V=G;V<G+Z;V+=1)(K=r[V])!=null&&K.isServiceColumn||z.add(V)}const N=Array.from(z).sort((G,Z)=>G-Z).map(G=>{var Z;return(Z=r[G])==null?void 0:Z.id}).filter(G=>!!G),$=Ot.current;return $.length===N.length&&$.every((G,Z)=>G===N[Z])?$:(Ot.current=N,N)},[w,b,t,r]),li=(e==="range-cell"||e==="multi-range-cell")&&!b&&!(t.current!==void 0&&t.current.cell[0]<c),ye=m.useCallback((z,N)=>{if(s&&Q>=0&&z===Q&&e!=="disabled"){const j=c,tt=Math.max(r.length-j,0);if(tt===0||a===0)return;v(L.CompactSelection.empty()),F(L.CompactSelection.empty()),W(void 0),A(!0),u({current:{cell:[j,0],range:{x:j,y:0,width:tt,height:a},rangeStack:[]},rows:L.CompactSelection.empty(),columns:L.CompactSelection.empty()});return}if(!o)return;const $=r[z];if(!$||$.isServiceColumn)return;const K=N.shiftKey;if(N.ctrlKey||N.metaKey){let j=C;if(j.length===0&&b&&t.current){const rt=t.current.range;j=j.add([rt.x,rt.x+rt.width])}const tt=j.hasIndex(z)?j.remove(z):j.add(z);S.current=z,v(tt),F(L.CompactSelection.empty()),W(void 0),A(!1),u({current:void 0,rows:L.CompactSelection.empty(),columns:L.CompactSelection.empty()}),l==null||l({current:void 0,rows:L.CompactSelection.empty(),columns:tt});return}let Z,V;K&&S.current!==void 0?(Z=Math.min(S.current,z),V=Math.max(S.current,z)):(Z=z,V=z,S.current=z),v(L.CompactSelection.empty()),F(L.CompactSelection.empty()),W(void 0),A(!0),u({current:{cell:[Z,0],range:{x:Z,y:0,width:V-Z+1,height:a},rangeStack:[]},rows:L.CompactSelection.empty(),columns:L.CompactSelection.empty()})},[o,s,Q,e,c,r,t,b,C,a,u,l,W,S,v,F,A]),Nt=m.useCallback(z=>{const N=new Set(z),$=r.map((j,tt)=>!j.isServiceColumn&&N.has(j.id)?tt:-1).filter(j=>j>=0);if(F(L.CompactSelection.empty()),W(void 0),$.length===0){v(L.CompactSelection.empty()),A(!1),u({current:void 0,rows:L.CompactSelection.empty(),columns:L.CompactSelection.empty()});return}const K=$[0],G=$[$.length-1];if(K===void 0||G===void 0)return;const Z=G-K===$.length-1;if(S.current=G,Z){v(L.CompactSelection.empty()),A(!0),u({current:{cell:[K,0],range:{x:K,y:0,width:G-K+1,height:a},rangeStack:[]},rows:L.CompactSelection.empty(),columns:L.CompactSelection.empty()});return}let V=L.CompactSelection.empty();$.forEach(j=>{V=V.add(j)}),v(V),A(!1),u({current:void 0,rows:L.CompactSelection.empty(),columns:L.CompactSelection.empty()})},[r,a,u,v,F,A,W,S]);return{selectedColumnIndexes:w,selectedColumnKeysAll:Bt,selectColumnsByKeys:Nt,selectedColumnSet:y,headerSelectedRowIndexes:H,activeRow:ct,numberingColumnIndex:Q,drawFocusRing:li,selectColumnFromHeader:ye,handleGridSelectionWithColumnReset:ne,handleSelectionClearedWithColumns:ai}}function Jl(r,t,e,i){const o=performance.now();function n(s){const c=s-o,a=Math.min(c/i,1),u=t+(e-t)*a;r(Math.round(u)),a<1&&requestAnimationFrame(n)}requestAnimationFrame(n)}const Ql=r=>{const t=typeof r=="number",[e,i]=m.useState(()=>t?r:56);return m.useEffect(()=>{t&&Jl(i,e,r,300)},[r]),t?e:r};function tu({columns:r,rows:t,freezeColumns:e,selectedRange:i}){const[o,n]=m.useState(null),s=m.useRef(o);s.current=o;const c=m.useRef(null),a=m.useRef(0),u=m.useMemo(()=>r.some(C=>!C.isServiceColumn&&C.isErrorCell),[r]),d=m.useRef({cols:0,rows:0,freeze:0});d.current={cols:r.length,rows:t.length,freeze:e??0};const l=m.useCallback(()=>{a.current||(a.current=requestAnimationFrame(()=>{a.current=0;const C=c.current;if(!C)return;const{cols:v,rows:w,freeze:y}=d.current,S=Math.max(C.width,1),b=Math.max(C.height,1),A=s.current;if(A){const M=A.x+A.width,ct=A.y+A.height,W=A.x>0&&C.x-A.x<S/2,Q=A.y>0&&C.y-A.y<b/2,It=M<v&&M-(C.x+C.width)<S/2,ne=ct<w&&ct-(C.y+C.height)<b/2;if(!W&&!Q&&!It&&!ne)return}const F=y>0?0:Math.max(0,C.x-S),H=Math.max(0,C.y-b),E=Math.min(v,C.x+C.width+S),P=Math.min(w,C.y+C.height+b);n({x:F,y:H,width:E-F,height:P-H})}))},[]);m.useEffect(()=>()=>{a.current&&cancelAnimationFrame(a.current)},[]),m.useEffect(()=>{u&&l()},[u,l]);const h=m.useCallback(C=>{c.current=C,l()},[l]),f=m.useMemo(()=>{const C=[];if(!u)return C;const v=o??{x:0,y:0,width:Math.min(r.length,60),height:Math.min(t.length,300)},w=Math.max(0,v.x),y=Math.min(r.length,v.x+v.width),S=Math.max(0,v.y),b=Math.min(t.length,v.y+v.height);for(let A=w;A<y;A+=1){const F=r[A],{isErrorCell:H}=F??{};if(!(!F||F.isServiceColumn||!H))for(let E=S;E<b;E+=1){const P=t[E];P!==void 0&&H(P)&&C.push({x:A,y:E,width:1,height:1})}}return C},[r,t,o,u]);return{errorCellRanges:m.useMemo(()=>!i||f.length===0?f:f.filter(C=>!Tr(i,C.x,C.y)),[f,i]),trackVisibleRegion:h}}function hs({cell:r,glideCell:t,rect:e,renderData:i,relativePoint:o,mouseArgs:n}){const s=(i==null?void 0:i.canvasRoot)instanceof yt?i.canvasRoot.getInteractionAtPoint(o.x,o.y):void 0;if(s)return{cell:r,glideCell:t,rect:e,renderData:i,relativePoint:o,interaction:s,...n?{mouseArgs:n}:{}}}function eu({dataEditor:r,getCellContent:t,clientX:e,clientY:i,nativeEvent:o}){const n=r==null?void 0:r.getMouseArgsForPosition(e,i,o);if(!n||n.kind!=="cell")return;const s=[n.location[0],n.location[1]],c=t(s);if(!Fr(c))return;const a=n.bounds,u=te({colIndex:s[0],rowIndex:s[1]},a),d=ee(u,c),l={x:n.localEventX,y:n.localEventY};return hs({cell:s,mouseArgs:n,glideCell:c,rect:a,renderData:d,relativePoint:l})}function iu({eventTarget:r,dataEditorRef:t,getCellContent:e,interactionSessionStore:i,onCellContextMenuExternal:o}){m.useEffect(()=>{if(!r)return;const n=s=>{var g;if(!(s instanceof MouseEvent))return;const c=s;if(c.clientX===0&&c.clientY===0)return;const a=eu({dataEditor:t.current,getCellContent:e,clientX:c.clientX,clientY:c.clientY,nativeEvent:c});if(!a)return;const{cell:u,interaction:d,mouseArgs:l,relativePoint:h}=a,f=i.beginOrGet({cell:u,relativePoint:h,interaction:d,button:c.button,source:"contextmenu"});if(f.decision.contextMenuMode!=="normal"){if(i.consumePhase(f,"contextmenu-capture"),c.stopPropagation(),(g=c.stopImmediatePropagation)==null||g.call(c),f.decision.contextMenuMode==="none"){c.cancelable&&c.preventDefault();return}!l||!o||o(u,{...l,preventDefault:()=>{c.cancelable&&c.preventDefault()}})}};return r.addEventListener("contextmenu",n,!0),()=>{r.removeEventListener("contextmenu",n,!0)}},[t,r,e,i,o])}const ru=250;function ou(r){return m.useCallback((t,e)=>{const i=r.consumeEditorRequest(t,ru);return!i||i.target!=="self"?e:{...e,activationBehaviorOverride:"single-click"}},[r])}const Xe=350;function Lo(r){return Math.round(r)}function nu({cell:r,relativePoint:t,button:e}){return[r[0],r[1],e??"unknown",Lo(t.x),Lo(t.y)].join(":")}function Qe(r,t){return r[0]===t[0]&&r[1]===t[1]}function ds(r,t){return Math.abs(r.x-t.x)<=1&&Math.abs(r.y-t.y)<=1}function su(r,t){return!Qe(r.cell,t.cell)||r.button!==void 0&&t.button!==void 0&&r.button!==t.button?!1:ds(r.relativePoint,t.relativePoint)}function cu(r,t){return Date.now()-r.startedAt>(t.maxAgeMs??Xe)||!Qe(r.cell,t.cell)||r.button!==void 0&&t.button!==void 0&&r.button!==t.button?!1:ds(r.relativePoint,t.relativePoint)}function au(){let r,t=1;const e=i=>{if(!(!r||!cu(r,i)))return r};return{beginOrGet:i=>{const o=e(i);return o||(r={id:t++,key:nu(i),cell:i.cell,relativePoint:i.relativePoint,interaction:i.interaction,decision:qn(i.interaction),consumedPhases:new Set,startedAt:i.startedAt??Date.now(),source:i.source,...i.button!==void 0?{button:i.button}:{}},r)},findMatching:e,getCurrent:()=>r,storeClickResult:(i,o)=>{i.clickResult=o},consumeClickResult:i=>{const o=r;if(!(o!=null&&o.clickResult))return;if(!su(o,i)){delete o.clickResult;return}const n=o.clickResult;return delete o.clickResult,o.consumedPhases.add("renderer-click"),n},consumePhase:(i,o)=>i.consumedPhases.has(o)?!1:(i.consumedPhases.add(o),!0),armEditorRequest:(i,o)=>{var n;(n=i.editorRequest)!=null&&n.consumed||(i.editorRequest={target:o.target,armedAt:Date.now()})},consumeEditorRequest:(i,o=Xe)=>{const n=r;if(!n)return;const s=n.editorRequest;if(!(s!=null&&s.consumed)&&s){if(Date.now()-s.armedAt>o){r=void 0;return}if(Qe(n.cell,i))return s.consumed=!0,n.consumedPhases.add("editor-activation"),s}},isMatchingRecent:(i,o,n=Xe)=>{const s=r;return!s||!s.consumedPhases.has(i)?!1:Date.now()-s.startedAt<=n&&Qe(s.cell,o)},clearStale:(i=Xe)=>{r&&Date.now()-r.startedAt>i&&(r=void 0)},clear:()=>{r=void 0}}}function lu(){const r=m.useMemo(()=>au(),[]),t=m.useCallback(i=>r.beginOrGet(i),[r]),e=m.useCallback(i=>r.consumeClickResult(i),[r]);return{interactionSessionStore:r,beginOrGetInteractionSession:t,consumeCanvasClickResult:e}}function uu(r={}){const t=m.useMemo(()=>!0,[]);return m.useMemo(()=>{const e=[];return t&&e.push(Sr({beginOrGetInteractionSession:r.beginOrGetInteractionSession,consumeCanvasClickResult:r.consumeCanvasClickResult})),e.length>0?e:void 0},[t,r.beginOrGetInteractionSession,r.consumeCanvasClickResult])}const Li={glideScroller:"dvn-scroller",glideTable:"gdg-table",glideUnderlay:"dvn-underlay"};function fs(r){const t=(r==null?void 0:r.querySelector(`.${Li.glideTable}`))??null,e=(t==null?void 0:t.querySelector(`.${Li.glideScroller}`))??null,i=(t==null?void 0:t.querySelector(`.${Li.glideUnderlay}`))??null;return{container:t,scroller:e,underlay:i}}const Po="[useGlideElements]";function hu(r,t){const[e,i]=m.useState(null),[o,n]=m.useState(null),[s,c]=m.useState(null),a=m.useRef(null);m.useEffect(()=>{const d=r==null?void 0:r.current;if(Qt.tableDebug(Po,"useEffect fired",{hasWrapper:!!d,fullScreened:t}),!d)return;const l=()=>{const{container:f,scroller:g,underlay:C}=fs(d);return Qt.tableDebug(Po,"tryFind",{containerFound:!!f,scrollerFound:!!g,underlayFound:!!C}),f?(i(v=>v===f?v:f),n(v=>v===g?v:g),c(v=>v===C?v:C),a.current&&(a.current.disconnect(),a.current=null),!0):!1},h=requestAnimationFrame(()=>{if(l())return;const f=new MutationObserver(()=>{l()});f.observe(d,{childList:!0,subtree:!0}),a.current=f});return()=>{cancelAnimationFrame(h),a.current&&(a.current.disconnect(),a.current=null),i(null),n(null),c(null)}},[r,t]);const u=m.useCallback(d=>e?We.createPortal(d,e):null,[e]);return{glideContainer:e,glideScroller:o,glideUnderlay:s,isReady:!!e,renderInContainer:u}}function du(r){const t=document.createElement("div");t.style.cssText="position:fixed;left:0;top:0;width:0;height:0;pointer-events:none;visibility:hidden",r.appendChild(t);const e=t.getBoundingClientRect();return r.removeChild(t),{x:e.left,y:e.top}}function fu(r,t){m.useEffect(()=>{if(!t)return;const e=r.current;if(!e)return;const i=Qt.throttleWithLastCall(()=>{const{x:o,y:n}=du(e);e.style.setProperty("--gdg-portal-offset-x",`${o}px`),e.style.setProperty("--gdg-portal-offset-y",`${n}px`)},100);return i(),window.addEventListener("resize",i),e.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),e.removeEventListener("resize",i)}},[r,t])}function gu(r,t){const{columnsLast:e,rows:i,ctxs:o,refTable:n,theme:s,portalEventTargetRef:c,externalOnItemHovered:a,onHoverRowChange:u}=r,d=m.useRef(null),l=m.useCallback(f=>{const g=d.current;d.current=null,me({visible:!1,x:0,y:0,width:0,height:0,source:"cell",originId:g??void 0,nodeId:g??void 0},f,!0)},[]);return m.useCallback(f=>{var w,y,S;a==null||a(f),u==null||u(f.kind==="cell"?f.location[1]:void 0);const g=(c==null?void 0:c.current)??null,C=(w=f.location)==null?void 0:w[0],v=C!=null?e[C]:void 0;if(f.kind==="header"){if(!(v!=null&&v.headerCellTooltip)){l(g);return}const b=`header-tooltip-${C}`;d.current===b||l(g);const F=(y=t.current)==null?void 0:y.getBounds(C,-1);if(!F)return;d.current=b,me({visible:!0,x:F.x,y:F.y,width:F.width,height:F.height,source:"header",originId:b,nodeId:b,priority:0,tooltipContext:{column:v,ctxs:o,refTable:n,colInd:C,theme:s}},g);return}if(f.kind==="cell"){const b=f.location[1],A=i[b];if(!v||!A||!v.cellTooltip){l(g);return}const F=`col-tooltip-${C}-${b}`;d.current===F||l(g);const E=(S=t.current)==null?void 0:S.getBounds(C,b);if(!E)return;d.current=F,me({visible:!0,x:E.x,y:E.y,width:E.width,height:E.height,source:"cell",originId:F,nodeId:F,priority:0,tooltipContext:{column:v,row:A,ctxs:o,refTable:n,colInd:C,rowInd:b,theme:s}},g);return}l(g)},[e,i,o,n,s,c,a,u,l,t])}function Cu({enabled:r,portalEventTargetRef:t,headerHeight:e,groupHeaderHeight:i,experimental:o}){const[n,s]=m.useState(0),c=m.useRef(null),a=m.useMemo(()=>{const h=e??Ve;let f=typeof h=="number"?h:Ve;return Array.isArray(i)?f+=i.reduce((g,C)=>g+C,0):typeof i=="number"&&(f+=i),f},[e,i]),u=m.useRef(a);u.current=a;const d=m.useCallback(h=>{var w;if((w=c.current)==null||w.call(c),c.current=null,!h)return;if(!r){s(0);return}const f=t==null?void 0:t.current;if(!f)return;const g=f.querySelector(".dvn-scroller"),C=f.querySelector(".dvn-underlay");if(!g||!C)return;const v=()=>{const y=g.scrollTop,S=Math.min(y,u.current);s(-1*S),C.style.overflowY="visible",C.style.transform=`translateY(-${S}px)`};g.addEventListener("scroll",v),c.current=()=>{g.removeEventListener("scroll",v),C.style.transform="",C.style.overflowY=""}},[r,t]),l=m.useMemo(()=>r?{...o,paddingBottom:n}:o,[r,n,o]);return{unstickyCallbackRef:d,mergedExperimental:l}}const Pi=_o.div.withConfig({displayName:"styled__StyledOverlayPortal"})(["[id^='gdg-overlay-']{position:fixed;z-index:9001;margin-left:calc(-1 * var(--gdg-portal-offset-x,0px));margin-top:calc(-1 * var(--gdg-portal-offset-y,0px));}"]),vu=_o(L).withConfig({displayName:"styled__StyledGlideDataEditor"})([""]),Dr={textPrimary:"#13181BF5",textPrimaryHover:"#13181B93",textPrimaryActive:"#13181BC4",textSecondary:"#485056B0",textSecondaryHover:"#485056FF",textSecondaryActive:"#485056D3",textTertiary:"#707C847A",textTertiaryHover:"#717C84FF",textTertiaryActive:"#717C8493",textTertiaryBase:"#8A959D",textTertiaryVariant:"#657179",textParagraph:"#13181BCC",textParagraphHover:"#13181B7A",textParagraphActive:"#13181BA3",textAccent:"#0B7ECB",textAccentHover:"#0D96F2FF",textAccentActive:"#0966A5FF",textAccentTransparent20:"#0B7ECB33",textPositive:"#108E26",textPositiveHover:"#14B32EFF",textPositiveActive:"#0C6A1BFF",textWarning:"#FA5F05",textWarningHover:"#FB782DFF",textWarningActive:"#D25004FF",textNegative:"#E31227",textNegativeHover:"#EE2F43FF",textNegativeActive:"#BD0F21FF",inverseTextPrimary:"#F2F5F8F5",onDarkTextPrimary:"#F2F5F8F5",onDarkTextPrimaryHover:"#F2F5F893",onDarkTextPrimaryActive:"#F2F5F8C4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#13181BF5",onLightTextPrimaryHover:"#13181B93",onLightTextPrimaryActive:"#13181BC4",surfaceSolidCard:"#FFFFFF",surfaceAccentMinor:"#ECF6FCFF",surfaceSolidDefault:"#060A0C",surfaceSolidTertiary:"#E8EEF2",surfaceAccent:"#118CDF",surfaceAccentHover:"#1798EEFF",surfaceAccentActive:"#0F81CCFF",surfaceTransparentSecondary:"#ADB9C238",surfaceTransparentSecondaryHover:"#ADB9C247",surfaceTransparentSecondaryActive:"#ADB9C24D",surfaceTransparentTertiary:"#8A959D47",surfaceTransparentDeep:"#30373CC6",surfaceClear:"#FFFFFF00",surfacePositive:"#1A9E32",surfacePositiveHover:"#1EB83AFF",surfacePositiveActive:"#178C2CFF",surfaceWarning:"#FA5F05",surfaceWarningHover:"#FB782DFF",surfaceWarningActive:"#E65705FF",surfaceWarningMinor56:"#F3A9128E",surfaceNegative:"#FF293E",surfaceNegativeHover:"#FF5263FF",surfaceNegativeActive:"#FF142CFF",disabled:"#DDDDDD",surfaceTransparentAccent:"#118CDF1F",surfaceTransparentAccent12:"#118CDF1E",surfaceTransparentAccent20:"#118CDF33",surfaceTransparentPositive:"#1A9E321F",surfaceTransparentPositive12:"#1A9E321E",surfaceTransparentPositive20:"#1A9E3233",surfaceTransparentWarning:"#FA5F051F",surfaceTransparentWarning12:"#FA5F051E",surfaceTransparentWarning20:"#FA5F0533",surfaceTransparentNegative:"#FF293E1F",surfaceTransparentNegative12:"#FF293E1E",surfaceTransparentNegative20:"#FF293E33",onLightSurfaceSolidDefault:"#060A0C",onLightSurfaceTransparentDeep:"#30373CC7",onDarkSurfaceSolidDefault:"#F7F9FB",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#0B7ECB",outlineSolidPrimary:"#D5DFE6",outlineSolidPrimary26:"#D5DFE642",dataBlueMinor:"#CFECFF",dataBlueMinorActive:"#C2E7FFFF",dataBlue:"#8BB2FC",dataAccentMinorHover:"#52BAFF",dataPositive:"#28D247",dataPositiveMinor:"#9EFAAF",dataNegative:"#FF8F9A",dataNegativeMinor:"#FFE0E3",dataWarning:"#FD9C68",dataWarningMinor:"#FEE2D2",dataOrange:"#F3A912",dataOrangeMinor:"#FFD37A",dataViolet:"#AD42F5",dataVioletMinor:"#DEB7F7",dataPink:"#FF8FBC",dataMagenta:"#F391E2",dataCyan:"#00DDE0",dataCyanDark:"#04C6C9",dataLime:"#93E006",dataTeal:"#14CC98"},mu={textPrimary:"#13181BF5",textPrimaryHover:"#13181B93",textPrimaryActive:"#13181BC4",textSecondary:"#03070CAF",textSecondaryHover:"#485056FF",textSecondaryActive:"#485056D3",textTertiary:"#000206A8",textTertiaryHover:"#717C84FF",textTertiaryActive:"#717C8493",textTertiaryBase:"#818C95",textTertiaryVariant:"#65717A",textParagraph:"#13181BCC",textParagraphHover:"#13181B7A",textParagraphActive:"#13181BA3",textAccent:"#0058A2",textAccentHover:"#0D96F2FF",textAccentActive:"#0966A5FF",textAccentTransparent20:"#0058A23F",textPositive:"#0F5E00",textPositiveHover:"#14B32EFF",textPositiveActive:"#0C6A1BFF",textWarning:"#D95800",textWarningHover:"#FB782DFF",textWarningActive:"#D25004FF",textNegative:"#A50016",textNegativeHover:"#EE2F43FF",textNegativeActive:"#BD0F21FF",inverseTextPrimary:"#F2F5F8F5",onDarkTextPrimary:"#F2F5F8F5",onDarkTextPrimaryHover:"#F2F5F893",onDarkTextPrimaryActive:"#F2F5F8C4",onDarkTextPrimary96:"#F7F9FBF4",onDarkTextPrimary56:"#F7F9FB8E",onDarkTextPrimary28:"#F7F9FB47",onLightTextPrimary:"#13181BF5",onLightTextPrimaryHover:"#13181B93",onLightTextPrimaryActive:"#13181BC4",surfaceSolidCard:"#FFFFFF",surfaceAccentMinor:"#CFE5F2FF",surfaceSolidDefault:"#060A0C",surfaceSolidTertiary:"#CFD9E0",surfaceAccent:"#0076D2",surfaceAccentHover:"#1798EEFF",surfaceAccentActive:"#0F81CCFF",surfaceTransparentSecondary:"#7D96A838",surfaceTransparentSecondaryHover:"#ADB9C247",surfaceTransparentSecondaryActive:"#ADB9C24D",surfaceTransparentTertiary:"#516E8347",surfaceTransparentDeep:"#30373DC6",surfaceClear:"#FFFFFF00",surfacePositive:"#198A00",surfacePositiveHover:"#1EB83AFF",surfacePositiveActive:"#178C2CFF",surfaceWarning:"#D95800",surfaceWarningHover:"#FB782DFF",surfaceWarningActive:"#E65705FF",surfaceWarningMinor56:"#D491008E",surfaceNegative:"#E7002F",surfaceNegativeHover:"#FF5263FF",surfaceNegativeActive:"#FF142CFF",disabled:"#DDDDDD",surfaceTransparentAccent:"#0076D21F",surfaceTransparentAccent12:"#0076D21E",surfaceTransparentAccent20:"#0076D233",surfaceTransparentPositive:"#198A001F",surfaceTransparentPositive12:"#198A003F",surfaceTransparentPositive20:"#198A0033",surfaceTransparentWarning:"#D958001F",surfaceTransparentWarning12:"#D958003F",surfaceTransparentWarning20:"#D9580033",surfaceTransparentNegative:"#E7002F1F",surfaceTransparentNegative12:"#E7002F3F",surfaceTransparentNegative20:"#E7002F33",onLightSurfaceSolidDefault:"#060A0C",onLightSurfaceTransparentDeep:"#30373DC7",onDarkSurfaceSolidDefault:"#D6DFE7",onDarkSurfaceTransparentCard:"#FFFFFF0F",outlineAccent:"#0058A2",outlineSolidPrimary:"#C4CFD7",outlineSolidPrimary26:"#AFC0CB42",dataBlueMinor:"#9CD5FF",dataBlueMinorActive:"#C2E7FFFF",dataBlue:"#6096FF",dataAccentMinorHover:"#0077C1",dataPositive:"#168600",dataPositiveMinor:"#96DAA1",dataNegative:"#BA5161",dataNegativeMinor:"#F8BDC4",dataWarning:"#B35B10",dataWarningMinor:"#F7C29D",dataOrange:"#D49100",dataOrangeMinor:"#F3B400",dataViolet:"#9A29E0",dataVioletMinor:"#D48BFF",dataPink:"#FB5AA5",dataMagenta:"#EB60D7",dataCyan:"#00C1C3",dataCyanDark:"#00AAAD",dataLime:"#7FC400",dataTeal:"#00B082"},pu={...Dr,textPrimary:"#14191DF5",textPrimaryHover:"#151A1E93",textPrimaryActive:"#151A1EC4",textSecondary:"#475158B0",textSecondaryHover:"#465058FF",textSecondaryActive:"#465058D3",textTertiary:"#707F897A",textTertiaryHover:"#707F89FF",textTertiaryActive:"#707F8993",textParagraph:"#14191DCC",textParagraphHover:"#151A1E7A",textParagraphActive:"#151A1EA3",textAccent:"#0087CD",textAccentHover:"#00A3F5FF",textAccentActive:"#006DA3FF",textPositive:"#219532",textPositiveHover:"#28B83EFF",textPositiveActive:"#1A7527FF",textWarning:"#E15400",textWarningHover:"#FF640AFF",textWarningActive:"#B84300FF",textNegative:"#D60033",textNegativeHover:"#FF003BFF",textNegativeActive:"#AD0028FF",inverseTextPrimary:"#F3F7FAF5",onDarkTextPrimary:"#F3F7FAF5",onDarkTextPrimaryHover:"#F4F8FA93",onDarkTextPrimaryActive:"#F4F8FAC4",onLightTextPrimary:"#14191DF5",onLightTextPrimaryHover:"#151A1E93",onLightTextPrimaryActive:"#151A1EC4",surfaceAccentMinor:"#EFF8FF",surfaceSolidDefault:"#060A0D",surfaceSolidTertiary:"#CFDBE4",surfaceAccent:"#1F9EEB",surfaceAccentHover:"#3AA9EEFF",surfaceAccentActive:"#1492E1FF",surfaceTransparentSecondary:"#A8B6BF38",surfaceTransparentSecondaryHover:"#A7B5BE47",surfaceTransparentSecondaryActive:"#A7B5BE4D",surfaceTransparentTertiary:"#8B98A247",surfaceTransparentDeep:"#30383EC7",surfacePositive:"#21A038",surfacePositiveHover:"#24B23EFF",surfacePositiveActive:"#1D9032FF",surfaceWarning:"#E15400",surfaceWarningHover:"#F55A00FF",surfaceWarningActive:"#CC4B00FF",surfaceNegative:"#F81C42",surfaceNegativeHover:"#F94361FF",surfaceNegativeActive:"#F70830FF",surfaceTransparentAccent:"#0090DA1F",surfaceTransparentPositive:"#21A0381F",surfaceTransparentWarning:"#E154001F",surfaceTransparentNegative:"#F81C421F",onLightSurfaceSolidDefault:"#060A0D",onLightSurfaceTransparentDeep:"#30383EC7",onDarkSurfaceSolidDefault:"#F6F9FB",outlineAccent:"#0087CD",outlineSolidPrimary:"#CFDBE4",dataBlueMinor:"#D3EBFF",dataBlueMinorActive:"#C2E3FFFF",dataBlue:"#1F9EEB",dataOrange:"#F3621C",dataOrangeMinor:"#F79772",dataPink:"#FC8CA6"},yu={...Dr},Fu={light:Dr,dark:yu,highContrastLight:mu,betaCoreLight:pu},bu=(r="light")=>Fu[r],gt={bgEditableCell:{light:"#FFF6E5",dark:"#211807",highContrastLight:"#F1DDB8",betaCoreLight:"#FFF6E5"},bgEditableCellHovered:{light:"#FFF4E0",dark:"#2A1F09",highContrastLight:"#E8D4AD",betaCoreLight:"#FFF4E0"},selectionCheckboxBg:{light:"#ECF6FC",dark:"#ECF6FC",highContrastLight:"#CFE5F2",betaCoreLight:"#EFF8FF"},selectionActiveBg:{light:"#E2F1FB",dark:"#E2F1FB",highContrastLight:"#BFDDF4",betaCoreLight:"#E2F1FB"},selectionActiveCheckboxBg:{light:"#D1E9F8",dark:"#D1E9F8",highContrastLight:"#9BCAEA",betaCoreLight:"#D1E9F8"},selectionServiceBg:{light:"#ECF6FC",dark:"#ECF6FC",highContrastLight:"#CFE5F2",betaCoreLight:"#EFF8FF"},selectionServiceActiveBg:{light:"#D4E7F2",dark:"#D4E7F2",highContrastLight:"#B9D6E7",betaCoreLight:"#D4E7F2"},errorOutlineColor:{light:"#FF3D51",dark:"#FF3D51",highContrastLight:"#E9203F",betaCoreLight:"#F81C42"},bgRowHovered:{light:"#F7F9FB",dark:"#F7F9FB",highContrastLight:"#E8EEF2",betaCoreLight:"#F7F9FB"},bgServiceRowHovered:{light:"#D4E7F2",dark:"#D4E7F2",highContrastLight:"#B9D6E7",betaCoreLight:"#D4E7F2"},bgSelectedRowHovered:{light:"#DEECF5",dark:"#DEECF5",highContrastLight:"#C2DCEB",betaCoreLight:"#DEECF5"}},Su=r=>({tokens:bu(r),fonts:Ye,fontMetrics:Oo,bgEditableCell:gt.bgEditableCell[r],bgEditableCellHovered:gt.bgEditableCellHovered[r],selectionCheckboxBg:gt.selectionCheckboxBg[r],selectionActiveBg:gt.selectionActiveBg[r],selectionActiveCheckboxBg:gt.selectionActiveCheckboxBg[r],selectionServiceBg:gt.selectionServiceBg[r],selectionServiceActiveBg:gt.selectionServiceActiveBg[r],errorOutlineColor:gt.errorOutlineColor[r],bgRowHovered:gt.bgRowHovered[r],bgServiceRowHovered:gt.bgServiceRowHovered[r],bgSelectedRowHovered:gt.bgSelectedRowHovered[r]}),lt={accentColor:{light:"#0b7ecb",dark:"#0b7ecb",highContrastLight:"#0058A2",betaCoreLight:"#0087CD"},accentLight:{light:"#E2F1FB",dark:"#E2F1FB",highContrastLight:"#DAE8F1",betaCoreLight:"#E2F1FB"},textDark:{light:"#13181BF5",dark:"#13181BF5",highContrastLight:"#13181BF5",betaCoreLight:"#14191DF5"},textHeader:{light:"#13181BF5",dark:"#13181BF5",highContrastLight:"#13181BF5",betaCoreLight:"#14191DF5"},textHeaderSelected:{light:"#13181BF5",dark:"#13181BF5",highContrastLight:"#13181BF5",betaCoreLight:"#14191DF5"},textGroupHeader:{light:"#13181BF5",dark:"#13181BF5",highContrastLight:"#13181BF5",betaCoreLight:"#14191DF5"},bgCell:{light:"#FFFFFF",dark:"#FFFFFF",highContrastLight:"#FFFFFF",betaCoreLight:"#FFFFFF"},bgHeader:{light:"#ECF6FCFF",dark:"#ECF6FCFF",highContrastLight:"#CFE5F2FF",betaCoreLight:"#EFF8FF"},bgHeaderHasFocus:{light:"#ECF6FCFF",dark:"#ECF6FCFF",highContrastLight:"#B9D6E7",betaCoreLight:"#EFF8FF"},bgHeaderHovered:{light:"#DEECF5",dark:"#DEECF5",highContrastLight:"#C2DCEB",betaCoreLight:"#DEECF5"},borderColor:{light:"#D5DFE6",dark:"#D5DFE6",highContrastLight:"#C4CFD7",betaCoreLight:"#CFDBE4"},bgGroupHeader:{light:"#ECF6FCFF",dark:"#ECF6FCFF",highContrastLight:"#CFE5F2FF",betaCoreLight:"#EFF8FF"},bgGroupHeaderHovered:{light:"#DEECF5",dark:"#DEECF5",highContrastLight:"#C2DCEB",betaCoreLight:"#DEECF5"}},xu=r=>({accentColor:lt.accentColor[r],accentLight:lt.accentLight[r],textDark:lt.textDark[r],textHeader:lt.textHeader[r],textHeaderSelected:lt.textHeaderSelected[r],textGroupHeader:lt.textGroupHeader[r],bgCell:lt.bgCell[r],bgHeader:lt.bgHeader[r],bgHeaderHasFocus:lt.bgHeaderHasFocus[r],bgHeaderHovered:lt.bgHeaderHovered[r],borderColor:lt.borderColor[r],bgGroupHeader:lt.bgGroupHeader[r],bgGroupHeaderHovered:lt.bgGroupHeaderHovered[r]}),Bo={small:"bodyXXS",medium:"bodyS",big:"bodyM"},wu=(r="big")=>{const t=Ye[Bo[r]],e=Oo[Bo[r]],i=`${e.fontSize}px`,o=e.lineHeightPx,n=Mo[r],{cellHorizontalPadding:s,cellVerticalPadding:c}=n;return{headerFontStyle:Ye.bodyXSBold,baseFontStyle:t,fontFamily:'"SB Sans Text", sans-serif, Inter, Roboto, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, noto, arial, sans-serif',editorFontSize:i,lineHeight:o,cellHorizontalPadding:s,cellVerticalPadding:c,activeSizes:n}},Ir=(r="big",t="light")=>({...xu(t),...wu(r),...Su(t),rowSize:r}),Au=Ir(),gs=(r,t,e,i)=>{let o=r;for(let s=r;s>=0;s-=1){const c=e(s,t);if(c&&c[0]<=r&&c[1]>=r){o=c[0];break}}const n=i(o,t);return[o,n?n[0]:t]},Bi=(r,t)=>{if(r==null)return null;const e=typeof r=="number"?r:r(t);return e<=0?null:[t.colInd,t.colInd+e]},Ro=(r,t)=>r==null?null:r(t);function Eu(...r){}const Tu={},Ri=r=>Array.isArray(r)?r.filter(t=>typeof t=="string"):typeof r=="string"?[r]:[],Du=({columns:r,rows:t,bottomSummaryRows:e,rowHeight:i,width:o,rowSize:n="medium",ctxs:s=Tu,freezeColumns:c,onColumnResize:a,renderGroupHeader:u,groupAlignMap:d,refTable:l,onColumnsReorder:h,portalEventTargetRef:f,onItemHovered:g,unstickyHeader:C,resizableColumn:v=!0,minColumnWidth:w=56,maxColumnWidth:y,maxColumnAutoWidth:S,containerRef:b,containerClassName:A,containerStyle:F,renderOverlayFeatures:H,hideGrid:E,contentStateNode:P,fullScreened:M,editorOverlayPortal:ct,highlightActiveType:W="disabled",cellsSelectionMode:Q="range-cell",enableColumnSelection:It=!0,enableRowSelection:ne=!0,enableSelectAll:ai=!0,enableLowDprHairline:Ot,gridSelection:Bt,onGridSelectionChange:li,onSelectionEmit:ye,onColumnSelectionChange:Nt,pendingColumnSelectionKeys:z,onColumnSelectionApplied:N,highlightActiveRow:$,onHighlightActiveRowChange:K,highlightActiveRowControlled:G,highlightRegions:Z,checkboxSelectedRowIndexes:V,checkboxVisibleRowIndexes:j,hoverEffects:tt,onCellClicked:rt,onCellContextMenu:bt,onGroupHeaderClicked:Rt,onMouseMove:Fe,onVisibleRegionChanged:be,portalElementRef:Iu,...Wt})=>{var Xr,Vr,Yr;const Hr=Qt.useActiveTheme(),R=m.useMemo(()=>Ir(n,Hr),[n,Hr]),Cs=m.useMemo(()=>{const p=typeof i=="number"?i:void 0;if(p)return p;const x=ko[n],T=typeof i=="function"?i:void 0;return T?D=>{const B=t[D];if(!B)return p??x;const _=T(B,{rowSizeName:n,rowSizeValue:x},D);return typeof _=="number"&&!Number.isNaN(_)?_:x}:x},[t,i,n]),Gt=(e==null?void 0:e.length)??0,vs=Ql(Cs),[Se,ms]=m.useState(new Map),ps=m.useCallback((p,x,T,D)=>{const B=p;B.id&&(a==null||a(B,x,T,D),ms(I=>(I.set(B.id,x),new Map(I))))},[a]),_t=m.useMemo(()=>Se.size===0?r:r.map(p=>Se.has(p.id)?{...p,width:Se.get(p.id),grow:0}:p),[r,Se]),[Lr,Hu]=m.useState(0),ui=m.useMemo(()=>new WeakMap,[]),hi=m.useRef(null),Ht=m.useRef(null);m.useEffect(()=>{var p;(Bt==null?void 0:Bt.current)!==void 0&&((p=Ht.current)==null||p.focus())},[Bt]);const{interactionSessionStore:ut,beginOrGetInteractionSession:ys,consumeCanvasClickResult:Fs}=lu(),Pr=ou(ut),{selection:St,handleGridSelectionChange:bs,handleSelectionCleared:Ss,rangeSelect:xs}=as({cellsSelectionMode:Q,gridSelection:Bt,onGridSelectionChange:li,onSelectionEmit:ye}),ot=ls({columns:_t,selection:St,cellsSelectionMode:Q,checkboxSelectedRowIndexes:V}),ws=m.useMemo(()=>K?p=>K(p,p!==void 0?t[p]:void 0):void 0,[K,t]),{selectedColumnIndexes:As,selectedColumnKeysAll:Br,selectColumnsByKeys:xe,selectedColumnSet:we,headerSelectedRowIndexes:Rr,activeRow:Es,numberingColumnIndex:_r,drawFocusRing:Ts,selectColumnFromHeader:kr,handleGridSelectionWithColumnReset:Ds,handleSelectionClearedWithColumns:Is}=us({columns:_t,selection:St,cellsSelectionMode:Q,highlightActiveType:W,enableColumnSelection:It,enableRowSelection:ne,enableSelectAll:ai,leadingServiceColumnsCount:ot.leadingServiceColumnsCount,dataRowCount:t.length+Gt,handleGridSelectionChange:bs,handleSelectionCleared:Ss,onSelectionEmit:ye,highlightActiveRow:$,onHighlightActiveRowChange:ws,isHighlightActiveRowControlled:G});m.useEffect(()=>{Nt==null||Nt(Br)},[Br,Nt]),m.useEffect(()=>{if(!z)return;xe(z);const p=setTimeout(()=>N==null?void 0:N(),0);return()=>clearTimeout(p)},[z,_t,xe,N]);const Ae=Rr.length>0,Ee=m.useMemo(()=>{var T;const p=new Set,x=(T=St.current)==null?void 0:T.rangeStack;if(x){const D=ot.firstDataColumnIndex;for(const B of x){const I=Math.max(B.x,D);for(let _=I;_<B.x+B.width;_+=1)p.add(_)}}return p},[St,ot.firstDataColumnIndex]),X=m.useMemo(()=>_t.map((p,x)=>{const T={...p.themeOverride??{}};let D=Object.keys(T).length>0;return p.isServiceColumn&&(T.bgCell=R.selectionServiceBg,D=!0),x===_r&&(T.accentLight="transparent",T.accentColor="transparent",D=!0),ot.isActiveHeaderColumn(x)&&(T.bgHeader=R.selectionServiceActiveBg,T.bgHeaderHasFocus=R.selectionServiceActiveBg,D=!0),we.has(x)&&(T.bgHeader=R.selectionServiceActiveBg,T.bgHeaderHasFocus=R.selectionServiceActiveBg,D=!0),Ee.has(x)&&(T.bgHeader=R.selectionServiceActiveBg,T.bgHeaderHasFocus=R.selectionServiceActiveBg,D=!0),Ae&&!p.isServiceColumn&&(T.bgHeader=R.selectionServiceActiveBg,T.bgHeaderHasFocus=R.selectionServiceActiveBg,D=!0),D?{...p,themeOverride:T}:p}),[_t,ot,we,Ee,Ae,_r,R.selectionServiceBg,R.selectionServiceActiveBg]),{errorCellRanges:Hs,trackVisibleRegion:Mr}=tu({columns:_t,rows:t,freezeColumns:c,selectedRange:(Xr=St.current)==null?void 0:Xr.range}),Ls=m.useCallback((p,x,T,D)=>{Mr(p),be==null||be(p,x,T,D)},[Mr,be]),se=m.useCallback(([p,x],T)=>{var Be,Zr,Re,jr;Eu(Lr);const D=(T==null?void 0:T.applyCanvasEditorActivation)!==!1,B=nt=>D?Pr([p,x],nt):nt,I=!!e&&x>t.length-1,_=t[x],k=X[p];if(!k)return Jt();if(I){const nt=e[x-t.length],{renderSummaryCell:Pt,colSpan:st}=k;if(!Pt||!nt)return Jt();const Si={row:nt,column:k,colInd:p,rowInd:x,ctxs:s,theme:R,hovered:{cellHover:!1,rowHover:!1},active:{cellActive:!1,rowActive:!1}},rc=Pt(Si),Jr=Bi(st,Si),oc={data:"",...Jr&&{span:Jr}};return B(Io({jsxElement:rc,canvasCellCache:ui,cellInfo:Si,options:{...oc,getPortalEventTarget:()=>(f==null?void 0:f.current)??null,refTable:l}}))}if(!_)return Jt();const it=(nt,Pt,st)=>({row:t[st],column:nt,colInd:Pt,rowInd:st,ctxs:s,theme:R,hovered:{cellHover:!1,rowHover:!1},active:{cellActive:!1,rowActive:!1}}),[Y,q]=gs(p,x,(nt,Pt)=>{const st=X[nt];return st!=null&&st.colSpan?Bi(st.colSpan,it(st,nt,Pt)):null},(nt,Pt)=>{const st=X[nt];return st!=null&&st.rowSpan?Ro(st.rowSpan,it(st,nt,Pt)):null});if(Y!==p||q!==x)return se([Y,q],T);const U=hi.current,O={row:_,column:k,colInd:p,rowInd:x,ctxs:s,theme:R,hovered:{cellHover:(U==null?void 0:U.colInd)===p&&(U==null?void 0:U.rowInd)===x,rowHover:(U==null?void 0:U.rowInd)===x},active:{cellActive:ot.isActiveDataCell(p,x),rowActive:ot.isActiveRow(x)}},{renderCell:Vt,id:Lt,colSpan:mi,rowSpan:De,spanAlign:Ie,editable:He,contentAlign:tc,columnThemeOverride:Kr}=k,ec=((Zr=(Be=_[Lt])==null?void 0:Be.toString)==null?void 0:Zr.call(Be))??"NOT FOUND",Le=Bi(mi,O),Pe=Ro(De,O),pi=(Le||Pe)&&Ie?typeof Ie=="function"?Ie(O):Ie:void 0,qr=He?typeof He=="boolean"?He:He(_):!1,yi=typeof Kr=="function"?Kr(O):void 0,Fi={data:((jr=(Re=_[Lt])==null?void 0:Re.toString)==null?void 0:jr.call(Re))??"NOT FOUND",...qr?{readonly:!1,allowOverlay:!0}:{readonly:!0,...k.hasPreview===!0&&{allowOverlay:!0},...k.hasPreview==="none"&&{allowOverlay:!1}},themeOverride:{...yi,...qr&&{bgCell:R.bgEditableCell}},contentAlign:tc,...Le&&{span:Le},...Pe&&{spanRows:Pe},...pi&&{spanAlign:pi}};if(!Vt){const nt=String(ec);return Ar(nt)?B(Je(nt,Fi)):B(Jt(Fi))}const bi=yi?{...O,theme:{...R,...yi}}:O,ic=Vt(Le||Pe?{...bi,__mergedCell:{align:pi}}:bi);return B(Io({jsxElement:ic,canvasCellCache:ui,cellInfo:bi,options:{...Fi,getPortalEventTarget:()=>(f==null?void 0:f.current)??null,refTable:l}}))},[Lr,e,t,X,s,R,ot,ui,f,Pr]),Ps=m.useCallback((p,x)=>{var O;const T=se(p,{applyCanvasEditorActivation:!1});if(!Fr(T)){rt==null||rt(p,x);return}let D=!1;const B=x.preventDefault;x.preventDefault=()=>{D=!0,B()};const I=te({colIndex:p[0],rowIndex:p[1]},x.bounds),_=ee(I,T),k={x:x.localEventX,y:x.localEventY},it=hs({cell:p,glideCell:T,rect:x.bounds,renderData:_,relativePoint:k}),Y=it?ut.beginOrGet({cell:p,relativePoint:k,interaction:it.interaction,button:x.button,source:"click"}):ut.beginOrGet({cell:p,relativePoint:k,interaction:Zo(),button:x.button,source:"click"}),q=br({cell:T,rect:x.bounds,relativePoint:k,renderData:_,rowData:t[p[1]],rowIndex:p[1]}),U=Y?hl({decision:Y.decision,propagationStopped:q.propagationStopped,suppressGridDefault:q.suppressGridDefault}):{suppressExternalCellClick:q.propagationStopped,suppressGridDefaultForClick:q.suppressGridDefault};if(Y&&(ut.consumePhase(Y,"cell-click"),ut.storeClickResult(Y,q)),x.button===0&&((O=U.editorRequest)==null?void 0:O.target)==="self"&&ut.armEditorRequest(Y,U.editorRequest),U.suppressGridDefaultForClick&&(x.preventDefault(),Y!=null&&Y.decision.editorRequest&&ut.clear()),U.suppressExternalCellClick||rt==null||rt(p,x),D||x.button===1){ut.clear();return}},[se,ut,rt,t]),Bs=m.useCallback((p,x)=>{ut.isMatchingRecent("contextmenu-capture",p)||bt==null||bt(p,x)},[ut,bt]),Rs=uu({beginOrGetInteractionSession:ys,consumeCanvasClickResult:Fs}),$t=m.useRef(null),Ut=m.useRef(null),ce=m.useMemo(()=>new Map,[]),zr=m.useMemo(()=>new Map,[]),di=m.useRef(null),kt=m.useRef(null),_s=m.useMemo(()=>Qt.mergeRefs(kt,b),[b]),{drawHeader:ks,onHeaderClicked:Ms}=m.useMemo(()=>({drawHeader:(T,D)=>{var De;const{ctx:B,rect:I,columnIndex:_}=T,k=X[_];if(!k||!k.renderHeaderCell)return D();const it={column:k,drawArgs:T,ctxs:s,theme:R};let Y=k.renderHeaderCell(it);if(!ir(Y))return D();typeof Y=="string"&&(Y=xt.jsx(ve.Container,{style:{width:"100%"},alignItems:"center",children:xt.jsx(ve.Text,{children:Y})}));const q=`header-${k.id}-${_}`,U=je({element:Y,idPrefix:q,theme:R});let O;ce.has(k.id)?(O=ce.get(k.id),O==null||O.setRootNode(U),O!=null&&O.rootNode&&(O.rootNode.style={width:I.width,height:I.height})):(O=new yt(U,q),O.rootNode.style={width:I.width,height:I.height},ce.set(k.id,O)),O==null||O.setPortalEventTarget((f==null?void 0:f.current)??null),O==null||O.setTooltipContext({column:k,ctxs:s,refTable:l});const Vt=((De=$t.current)==null?void 0:De.id)===k.id?$t.current:void 0,Lt=B.canvas.getBoundingClientRect(),mi={x:Lt.left+I.x,y:Lt.top+I.y,width:I.width,height:I.height};return O==null?void 0:O.render(B,I,Vt,mi)},onHeaderClicked:(T,D)=>{const B=X[T];if(B){if(B.renderHeaderCell){const I=ce.get(B.id);if(I){const _=I.getInteractionAtPoint(D.localEventX,D.localEventY);if(I.dispatchPointerEvent("click",D.localEventX,D.localEventY),_)return}}kr(T,D)}}}),[X,s,R,ce,f,Ht,kr]),zs=m.useCallback((p,x)=>{const T=X[p];if(!It||!T){Rt==null||Rt(p,x);return}const D=Ri(T.group),B=Math.max(0,D.indexOf(x.group)),I=D.slice(0,B+1).join("\0"),_=q=>{const U=X[q];return U!==void 0&&Ri(U.group).slice(0,B+1).join("\0")===I};let k=p,it=p;for(;k-1>=0&&_(k-1);)k-=1;for(;it+1<X.length&&_(it+1);)it+=1;const Y=[];for(let q=k;q<=it;q+=1){const U=X[q];U&&!U.isServiceColumn&&Y.push(U.id)}Y.length>0&&xe(Y),Rt==null||Rt(p,x)},[It,X,xe,Rt]),Or=m.useMemo(()=>{const p=new Map;X.forEach((T,D)=>{if(T.isServiceColumn)return;const B=ot.isActiveHeaderColumn(D)||we.has(D)||Ee.has(D)||Ae;Ri(T.group).forEach(I=>{if(I==="")return;const _=p.get(I);p.set(I,(_??!0)&&B)})});const x=new Set;return p.forEach((T,D)=>{T&&x.add(D)}),x},[X,ot,we,Ee,Ae]),Os=m.useCallback(p=>{const x=d==null?void 0:d.get(p),T={name:p,...x&&{spanAlign:x}};return Or.has(p)?{...T,overrideTheme:{bgGroupHeader:R.selectionServiceActiveBg,bgGroupHeaderHovered:R.bgHeaderHovered}}:T},[d,Or,R.selectionServiceActiveBg,R.bgHeaderHovered]),{glideContainer:fi,isReady:Ns,renderInContainer:Ws}=hu(kt,M),Nr=ct==="inside";fu(kt,Nr),iu({eventTarget:fi??kt.current,dataEditorRef:Ht,getCellContent:se,interactionSessionStore:ut,onCellContextMenuExternal:bt});const{unstickyCallbackRef:Wr,mergedExperimental:gi}=Cu({enabled:C,portalEventTargetRef:f,headerHeight:Wt.headerHeight,groupHeaderHeight:Wt.groupHeaderHeight,experimental:Wt.experimental}),Gs=m.useMemo(()=>Qt.mergeRefs(Ht,l,Wr),[l,Wr]),$s=m.useMemo(()=>Ot===void 0?gi:{...gi,enableLowDprHairline:Ot},[Ot,gi]),Gr=m.useCallback((...p)=>{var B;const x=Ht.current;if(!x)return;const T=new Set;p.forEach(I=>{typeof I=="number"&&I>=0&&I<t.length&&T.add(I)});const D=[];T.forEach(I=>{X.forEach((_,k)=>{D.push({cell:[k,I]})})}),D.length>0&&((B=x.updateCells)==null||B.call(x,D))},[X,t.length]),Te=m.useCallback(p=>{const x=hi.current;(x==null?void 0:x.colInd)===(p==null?void 0:p.colInd)&&(x==null?void 0:x.rowInd)===(p==null?void 0:p.rowInd)||(hi.current=p,Gr(x==null?void 0:x.rowInd,p==null?void 0:p.rowInd))},[Gr]),Us=m.useCallback(p=>{Fe==null||Fe(p),p.kind==="cell"?(()=>{const T=p.location[0],D=p.location[1],B=t[D],I=X[T];if(!B||!I||I.isServiceColumn){Te(null);return}Te({colInd:T,rowInd:D})})():Te(null),p.kind==="group-header"?(()=>{if(typeof p.group!="string"){Ut.current=null;return}Ut.current={id:p.group,x:p.localEventX,y:p.localEventY}})():Ut.current=null,p.kind==="header"?(()=>{var I,_;const T=p.location[0],D=p.location[1],B=X[T];if(!B||!(B!=null&&B.renderHeaderCell)){$t.current=null;return}$t.current={id:B.id,x:p.localEventX,y:p.localEventY},(_=(I=Ht.current)==null?void 0:I.updateCells)==null||_.call(I,[{cell:[T,D]}])})():$t.current=null,$t.current=null,Ut.current=null},[X,Fe,t,Te]),$r={dataEditorRef:Ht,rowCount:t.length,columnCount:X.length,headerAndGroupHeaderRowsCount:1+(Wt.groupHeaderHeight??[]).length};rs($r),is($r);const Xs=m.useMemo(()=>h?(x,T)=>{var I,_;const D=(I=X[x])==null?void 0:I.id,B=(_=X[T])==null?void 0:_.id;typeof D!="string"||typeof B!="string"||h(D,B)}:void 0,[X,h]),Vs=m.useMemo(()=>{if(u)return(p,x)=>{var Lt;const T=u(p);if(T==="default")return x();if("defaultWithCustomGroupName"in T)return x(T.defaultWithCustomGroupName);const{groupName:B,rect:I,ctx:_}=p;let k=T;if(!ir(k))return x();typeof k=="string"&&(k=xt.jsx(ve.Container,{style:{width:"100%"},alignItems:"center",children:xt.jsx(ve.Text,{children:k})}));const it=B,Y=je({element:k,idPrefix:it,theme:R}),q=new yt(Y,it);q.rootNode.style={width:I.width,height:I.height},q.setPortalEventTarget((f==null?void 0:f.current)??null),zr.set(it,q);const U=((Lt=Ut.current)==null?void 0:Lt.id)===it?Ut.current:void 0,O=_.canvas.getBoundingClientRect(),Vt={x:O.left+I.x,y:O.top+I.y,width:I.width,height:I.height};return q.render(_,I,U,Vt)}},[zr,u,R,f]),Ci=tt==null?void 0:tt.row,ae=!!Ci,Ur=typeof Ci=="object"?Ci.color:void 0,[Xt,Ys]=m.useState(void 0),Ks=m.useCallback(p=>{Ys(x=>x===p?x:p)},[]),qs=m.useMemo(()=>{const p=!!(V!=null&&V.size),x=ae?Xt:void 0;if(!Gt&&!p&&x===void 0)return;const T=Ur??R.bgRowHovered;return D=>D>t.length-1?{bgCell:R.bgHeader}:V!=null&&V.has(D)?{bgCell:D===x?R.bgSelectedRowHovered:R.selectionCheckboxBg}:D===x?{bgCell:T}:{}},[t.length,Gt,R.bgHeader,R.selectionCheckboxBg,R.bgRowHovered,R.bgSelectedRowHovered,V,ae,Xt,Ur]),Zs=gu({columnsLast:X,rows:t,ctxs:s,refTable:l,theme:R,portalEventTargetRef:f,externalOnItemHovered:g,onHoverRowChange:ae?Ks:void 0},Ht),js=ss({cellsSelectionMode:Q,selection:St,baseTheme:R,serviceColumnsCount:ot.leadingServiceColumnsCount,activeDataRange:ot.activeDataRange,outlineRange:ot.outlineRange,checkboxSelectedRowIndexes:V,errorCellRanges:Hs,highlightRegionsExternal:Z}),vi=cs({baseRegions:js,selectedColumnIndexes:As,headerSelectedRowIndexes:Rr,activeRow:Es,activeRange:(Vr=St.current)==null?void 0:Vr.range,selectionRangeStack:(Yr=St.current)==null?void 0:Yr.rangeStack,checkboxAvailableRowIndexes:j,totalRows:t.length+Gt,firstDataCol:ot.leadingServiceColumnsCount,columnsCount:_t.length,theme:R}),Js=m.useMemo(()=>{const p=ot.leadingServiceColumnsCount;return!ae||Xt===void 0||Xt>t.length-1||p===0?vi:[{color:R.bgServiceRowHovered,range:{x:0,y:Xt,width:p,height:1},style:"no-outline"},...vi??[]]},[vi,ot.leadingServiceColumnsCount,ae,Xt,t.length,R.bgServiceRowHovered]),Qs=m.useMemo(()=>{if(!(!F&&!P&&!E))return{...F,...P?{position:"relative"}:void 0,...E?{height:"100%",minHeight:0}:void 0}},[F,P,E]);return xt.jsxs("div",{ref:_s,className:A,style:Qs,children:[Nr?We.createPortal(xt.jsx(Pi,{ref:di,onAnimationEndCapture:p=>p.stopPropagation(),id:"portal"}),(kt==null?void 0:kt.current)??document.body):We.createPortal(xt.jsx(Pi,{id:"portal",ref:di}),document.body),We.createPortal(xt.jsx(Pi,{id:"portal2"}),document.body),!E&&xt.jsx(vu,{ref:Gs,className:"gdg-table",portalElementRef:di,theme:R,getRowThemeOverride:qs,onHeaderClicked:Ms,onGroupHeaderClicked:zs,onMouseMove:Us,drawHeader:ks,drawGroupHeader:Vs,getGroupDetails:Os,getCellContent:se,columns:X,rows:t.length+Gt,freezeTrailingRows:Gt,freezeColumns:c,minColumnWidth:w,maxColumnAutoWidth:S,maxColumnWidth:y,columnSelect:"none",columnSelectionBlending:"exclusive",drawFocusRing:Ts,gridSelection:St,onGridSelectionChange:Ds,onSelectionCleared:Is,width:o??"100%",onColumnMoved:Xs,onColumnResize:v?ps:void 0,customRenderers:Rs,rowHeight:vs,highlightRegions:Js,rangeSelect:xs,smoothScrollX:!0,smoothScrollY:!0,headerHeight:Ve,onCellClicked:Ps,onCellContextMenu:Bs,onItemHovered:Zs,onVisibleRegionChanged:Ls,...Wt,experimental:$s,keybindings:{...Wt.keybindings,copy:!1,paste:!1},onPaste:!1}),P,Ns&&fi&&(H==null?void 0:H({containerElement:fi,renderInContainer:Ws}))]})};exports.BUTTON_PADDING_Y=re;exports.CACHE_SEPARATOR=lr;exports.CANVAS_CELL_KIND=si;exports.CANVAS_PORTAL_EVENT=qe;exports.Canvas=ve;exports.CanvasAbsoluteContainer=bc;exports.CanvasBadge=bn;exports.CanvasButton=Sn;exports.CanvasChevron=Vc;exports.CanvasContainer=Ct;exports.CanvasEmbedIconButton=$i;exports.CanvasHoverController=or;exports.CanvasIcon=xn;exports.CanvasIconButton=wn;exports.CanvasLeaf=Ft;exports.CanvasLink=Pn;exports.CanvasNode=Mt;exports.CanvasRect=An;exports.CanvasRegistry=jo;exports.CanvasRoot=Ac;exports.CanvasSkeleton=Ln;exports.CanvasText=yr;exports.CellCanvasRoot=yt;exports.DANGER_COLOR=ar;exports.DANGER_TEXT_COLOR=_i;exports.DEFAULT_ACCENT_FG=pe;exports.DEFAULT_BORDER_WIDTH=Tt;exports.DEFAULT_BUTTON_RADIUS=sr;exports.DEFAULT_CURSOR=_n;exports.DEFAULT_HEADER_HEIGHT=Ve;exports.DEFAULT_ICON_SIZE=Qo;exports.DEFAULT_ICON_SPACING=cr;exports.DEFAULT_ROW_HEIGHT=ko;exports.DEFAULT_SECONDARY_HOVER=tn;exports.DEFAULT_SIZE=oi;exports.DEFAULT_TEXT_PADDING=Ec;exports.DEFAULT_VIEW=ni;exports.DISABLED_BG_COLOR=en;exports.DISABLED_BORDER_COLOR=rn;exports.DISABLED_TEXT_COLOR=ki;exports.DrawBatcher=ii;exports.EMPTY_CELL_OBJ=cc;exports.FlexBox=Et;exports.FlexElement=Wo;exports.FlexTreeBuilder=Xo;exports.HEX_COLOR_CHAR_CODE=nn;exports.HEX_COLOR_PREFIX=on;exports.ICON_SIZE_ADJUSTMENT=oe;exports.IconSpriteManager=hn;exports.LEGACY_HOVER_CURSOR=kn;exports.LIGHTEN_AMOUNT=ur;exports.LayoutReconciler=Vo;exports.MAX_ICON_SIZE=nr;exports.POINTER_CANDIDATE_KEYS=Rn;exports.PositionResolver=wt;exports.RELATIVE_COORD_TOLERANCE=Ce;exports.RootBridge=El;exports.RootFlexBox=rr;exports.SIZES=Mo;exports.SIZE_CONFIG=at;exports.SizeAccumulator=ei;exports.TABLE_GLIDE_SIZES=ac;exports.THEME=Au;exports.TableGlide=Du;exports.VIEW_COLORS=ri;exports.buildButtonViewColors=Jo;exports.buildCanvasTree=je;exports.buildCellId=te;exports.calculateButtonWidth=fr;exports.calculateContentWidth=gr;exports.canvasCellRenderer=dl;exports.clearButtonCaches=Tc;exports.clearIconCache=gl;exports.createCanvasCell=Bn;exports.createCanvasCellRenderer=Sr;exports.createEmptyCellGlide=Jt;exports.createNormalCanvasInteraction=Zo;exports.createRafUpdate=wr;exports.createSvgDataUrl=Gi;exports.createTextCellGlide=Je;exports.defaultBatcher=wc;exports.defaultIconManager=Dt;exports.dispatchCanvasPortalHover=me;exports.drawButton=mn;exports.drawButtonWithView=pn;exports.drawEmbedIconButtonWithView=yn;exports.drawIcon=Cn;exports.drawIcon$1=ft;exports.drawIconButton=pr;exports.drawIconButtonWithView=Fn;exports.drawIconDirect=Rc;exports.findBlockOrigin=gs;exports.flexBoxLayout=Cc;exports.fontStyles=Ye;exports.getCachedTextWidth=dr;exports.getCellIndices=$e;exports.getDpr=Ue;exports.getHoverState=Vn;exports.getIconCacheSize=Cl;exports.getIconImageDirect=vn;exports.getIconSprite=fn;exports.getIconSpriteStats=Pc;exports.getRelativePointerPosition=Mn;exports.getRowHeightBySize=Ge;exports.getTheme=Ir;exports.handleCanvasRootClick=Nn;exports.handleCanvasRootHover=Yn;exports.handleCellClick=Gn;exports.handleClickHandlers=Wn;exports.hashString=un;exports.isAbsoluteCoords=zn;exports.isCanvasCell=Fr;exports.isCanvasContent=ir;exports.isCanvasEl=ci;exports.isCanvasString=Er;exports.isGlideCellObj=Vl;exports.isGlideGridCellObj=os;exports.isHoveringBounds=zt;exports.isObject=Xl;exports.isPointInArea=mr;exports.isPortalHoverLocked=tl;exports.isPrimitive=Ar;exports.isReactIcon=At;exports.isRelativeCoords=On;exports.isValueEmpty=ns;exports.lightenColor=hr;exports.lightenColorCached=sn;exports.lockPortalHover=Qa;exports.normalizeCanvasInteraction=qo;exports.normalizeDimensionValue=Qi;exports.normalizeHoverPoint=ln;exports.normalizeIcon=mt;exports.onAnyIconLoad=dn;exports.performCanvasClick=br;exports.performCanvasPointerDownIntent=Zn;exports.preloadIconSprites=gn;exports.queryGlideElements=fs;exports.reactIconToSvg=jn;exports.rectContainsCell=Tr;exports.registerIconDefinitions=Lc;exports.resetIconSpriteCache=Bc;exports.resolveButtonColors=Cr;exports.resolveClickPoint=Ni;exports.resolveDangerColors=an;exports.resolvePaddingBox=Go;exports.resolvePaddingBox$1=Ko;exports.resolvePrimaryColors=Oi;exports.resolveSecondaryColors=cn;exports.resolveViewColors=vr;exports.retrieveRenderData=ee;exports.storeRenderData=Un;exports.subscribeToCanvasPortalHover=al;exports.subscribeToPortalHoverLock=el;exports.toRelativePoint=Wi;exports.updateGridCells=xr;exports.updateHoverState=Xn;exports.updateHoverStateIfNeeded=Kn;exports.useBaseHighlightRegions=ss;exports.useCanvasRegistry=Ul;exports.useColumnRowHighlightRegions=cs;exports.useFontLoadRedraw=is;exports.useIconLoadRedraw=rs;exports.useNativeGridSelection=as;exports.useSelectionGeometry=ls;exports.useTableSelectionSystem=us;exports.waitForCanvasFonts=ts;exports.waitForDocumentFonts=Qn;exports.waitForFonts=es;
|
|
@@ -20,6 +20,7 @@ export declare const MagicButtonStyled: import('styled-components').StyledCompon
|
|
|
20
20
|
dark: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
21
21
|
black: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
22
22
|
white: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
23
|
+
gradient: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
23
24
|
};
|
|
24
25
|
size: {
|
|
25
26
|
s: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
@@ -15,6 +15,7 @@ export declare const AnalyticalWidget: {
|
|
|
15
15
|
dark: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
16
16
|
black: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
17
17
|
white: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
18
|
+
gradient: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
18
19
|
};
|
|
19
20
|
size: {
|
|
20
21
|
s: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
@@ -112,7 +113,7 @@ export declare const AnalyticalWidget: {
|
|
|
112
113
|
} & import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>, "size" | "view"> & import('react').RefAttributes<HTMLButtonElement>) | undefined;
|
|
113
114
|
iconSize?: "s" | "m" | "xs" | undefined;
|
|
114
115
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
115
|
-
DotsIconButton: (
|
|
116
|
+
DotsIconButton: import('react').ForwardRefExoticComponent<Omit<import('@salutejs/plasma-new-hope/types/engines/types.js').PropsType<{
|
|
116
117
|
view: {
|
|
117
118
|
default: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
118
119
|
secondary: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
@@ -121,6 +122,7 @@ export declare const AnalyticalWidget: {
|
|
|
121
122
|
warning: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
122
123
|
negative: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
123
124
|
info: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
125
|
+
gradient: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
124
126
|
};
|
|
125
127
|
size: {
|
|
126
128
|
l: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
@@ -139,7 +141,7 @@ export declare const AnalyticalWidget: {
|
|
|
139
141
|
isLoading?: boolean | undefined;
|
|
140
142
|
loader?: import('react').ReactNode;
|
|
141
143
|
position?: any;
|
|
142
|
-
} & import('react').RefAttributes<HTMLButtonElement>, "children"> & {
|
|
144
|
+
} & import('react').RefAttributes<HTMLButtonElement>, "children" | "ref"> & {
|
|
143
145
|
dropdownProps?: (Omit<import('@salutejs/plasma-new-hope').DropdownProps<import('@salutejs/plasma-new-hope').DropdownItemOption>, "size" | "view"> & Pick<import('@salutejs/plasma-new-hope/types/engines/types.js').PropsType<{
|
|
144
146
|
size: {
|
|
145
147
|
m: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
@@ -179,6 +181,6 @@ export declare const AnalyticalWidget: {
|
|
|
179
181
|
iconOrientation?: "horizontal" | "vertical" | undefined;
|
|
180
182
|
absolute?: boolean | undefined;
|
|
181
183
|
absoluteOffset?: number | undefined;
|
|
182
|
-
}
|
|
184
|
+
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
183
185
|
Chips: ({ chips, commonView, commonSize, opened, ...groupProps }: import('./components/AnalyticalWidgetChips').AnalyticalWidgetChipsGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
184
186
|
};
|
|
@@ -1,14 +1,72 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
1
|
+
import { default as React, ComponentProps } from 'react';
|
|
2
2
|
import { Icon } from '../../../../icons';
|
|
3
|
-
import { EmbeddedButtonBetaCompProps } from '../../../EmbeddedButtonBeta';
|
|
4
|
-
import { Dropdown } from '../../../Dropdown';
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export declare const AnalyticalWidgetIconButtonDots: React.ForwardRefExoticComponent<Omit<import('@salutejs/plasma-new-hope/types/engines/types.js').PropsType<{
|
|
5
|
+
view: {
|
|
6
|
+
default: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
7
|
+
secondary: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
8
|
+
accent: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
9
|
+
positive: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
10
|
+
warning: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
11
|
+
negative: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
12
|
+
info: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
13
|
+
gradient: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
14
|
+
};
|
|
15
|
+
size: {
|
|
16
|
+
l: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
17
|
+
m: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
18
|
+
s: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
19
|
+
xs: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
20
|
+
};
|
|
21
|
+
disabled: {
|
|
22
|
+
true: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
23
|
+
};
|
|
24
|
+
}> & React.ButtonHTMLAttributes<HTMLButtonElement> & import('@salutejs/plasma-new-hope').AsProps<any> & {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
view?: string | undefined;
|
|
27
|
+
size?: string | undefined;
|
|
28
|
+
disabled?: boolean | undefined;
|
|
29
|
+
isLoading?: boolean | undefined;
|
|
30
|
+
loader?: React.ReactNode;
|
|
31
|
+
position?: any;
|
|
32
|
+
} & React.RefAttributes<HTMLButtonElement>, "children" | "ref"> & {
|
|
33
|
+
dropdownProps?: (Omit<import('@salutejs/plasma-new-hope').DropdownProps<import('../../../Dropdown').DropdownItemOption>, "size" | "view"> & Pick<import('@salutejs/plasma-new-hope/types/engines/types.js').PropsType<{
|
|
34
|
+
size: {
|
|
35
|
+
m: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
36
|
+
s: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
37
|
+
xs: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
38
|
+
};
|
|
39
|
+
view: {
|
|
40
|
+
default: import('@salutejs/plasma-new-hope/types/engines/types.js').PolymorphicClassName;
|
|
41
|
+
};
|
|
42
|
+
}> & {
|
|
43
|
+
items: import('../../../Dropdown').DropdownItemOption[];
|
|
44
|
+
trigger?: import('@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types.js').DropdownTrigger | undefined;
|
|
45
|
+
placement?: import('@salutejs/plasma-new-hope/types/components/Dropdown/Dropdown.types.js').DropdownPlacement | undefined;
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
variant?: "normal" | "tight" | undefined;
|
|
48
|
+
zIndex?: import("csstype").Property.ZIndex | undefined;
|
|
49
|
+
listMaxHeight?: import("csstype").Property.Height<string | number> | undefined;
|
|
50
|
+
listWidth?: import("csstype").Property.Width<string | number> | undefined;
|
|
51
|
+
portal?: string | React.RefObject<HTMLElement | null> | undefined;
|
|
52
|
+
renderItem?: ((item: import('../../../Dropdown').DropdownItemOption) => React.ReactNode) | undefined;
|
|
53
|
+
beforeList?: React.ReactNode;
|
|
54
|
+
afterList?: React.ReactNode;
|
|
55
|
+
onToggle?: ((isOpen: boolean, event?: Event | React.SyntheticEvent<Element, Event> | undefined) => void) | undefined;
|
|
56
|
+
alwaysOpened?: boolean | undefined;
|
|
57
|
+
onHover?: ((index: number, item: import('../../../Dropdown').DropdownItemOption) => void) | undefined;
|
|
58
|
+
onItemSelect?: ((item: import('../../../Dropdown').DropdownItemOption, event: React.SyntheticEvent<Element, Event>) => void) | undefined;
|
|
59
|
+
openByRightClick?: boolean | undefined;
|
|
60
|
+
offset?: [number, number] | undefined;
|
|
61
|
+
closeOnSelect?: boolean | undefined;
|
|
62
|
+
closeOnOverlayClick?: boolean | undefined;
|
|
63
|
+
itemRole?: string | undefined;
|
|
64
|
+
disabled?: boolean | undefined;
|
|
65
|
+
size?: string | undefined;
|
|
66
|
+
view?: string | undefined;
|
|
67
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>, "size" | "view"> & React.RefAttributes<HTMLButtonElement>) | undefined;
|
|
8
68
|
iconSize?: ComponentProps<typeof Icon>['size'];
|
|
9
|
-
iconOrientation?:
|
|
10
|
-
absolute?: boolean;
|
|
11
|
-
absoluteOffset?: number;
|
|
12
|
-
}
|
|
13
|
-
export declare const AnalyticalWidgetIconButtonDots: ({ dropdownProps, iconSize, iconOrientation, view, size, absolute, absoluteOffset, style, ...props }: AnalyticalWidgetIconButtonDotsProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export {};
|
|
69
|
+
iconOrientation?: "horizontal" | "vertical" | undefined;
|
|
70
|
+
absolute?: boolean | undefined;
|
|
71
|
+
absoluteOffset?: number | undefined;
|
|
72
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../IconButton/index.cjs"),n=require("../../../../chunks/AnalyticalWidget-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../IconButton/index.cjs"),n=require("../../../../chunks/AnalyticalWidget-wke3Jm3X.cjs");exports.AnalyticalWidgetIconButtonFilter=t.IconButtonFilter;exports.AnalyticalWidgetIconButtonDots=n.AnalyticalWidgetIconButtonDots;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IconButtonFilter as n } from "../../../IconButton/index.mjs";
|
|
2
|
-
import { d as e } from "../../../../chunks/AnalyticalWidget-
|
|
2
|
+
import { d as e } from "../../../../chunks/AnalyticalWidget-Cdo6_s1Y.mjs";
|
|
3
3
|
export {
|
|
4
4
|
e as AnalyticalWidgetIconButtonDots,
|
|
5
5
|
n as AnalyticalWidgetIconButtonFilter
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../../chunks/AnalyticalWidget-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../../chunks/AnalyticalWidget-wke3Jm3X.cjs");exports.AnalyticalWidgetChipsGroup=t.AnalyticalWidgetChipsGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../chunks/AnalyticalWidget-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../chunks/AnalyticalWidget-wke3Jm3X.cjs");exports.AnalyticalWidgetHeader=e.AnalyticalWidgetHeader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../chunks/AnalyticalWidget-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../chunks/AnalyticalWidget-wke3Jm3X.cjs");exports.AnalyticalWidget=a.AnalyticalWidget;exports.analyticalWidgetClassNames=a.analyticalWidgetClassNames;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/ApprovalCenter-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../chunks/ApprovalCenter-CAcC43zn.cjs");exports.History=e.History;exports.LifeCycle=e.LifeCycle;exports.Preview=e.Preview;
|