@daisforge/ui 1.19.0 → 1.21.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-Cdo6_s1Y.mjs → AnalyticalWidget-BtyWKJuu.mjs} +34 -34
- package/chunks/AnalyticalWidget-YytE3Rlw.cjs +43 -0
- package/chunks/{ApprovalCenter-DxcvzR8q.mjs → ApprovalCenter-DLKZP2AO.mjs} +2 -2
- package/chunks/{ApprovalCenter-CAcC43zn.cjs → ApprovalCenter-DdsLEipZ.cjs} +1 -1
- package/chunks/BlockTitle-DC1McGof.cjs +1 -0
- package/chunks/BlockTitle-DsXxImR6.mjs +86 -0
- package/chunks/{Container-CrB1jwqH.cjs → Container-DHnX1sHY.cjs} +1 -1
- package/chunks/{Container-Cy8w2JOq.mjs → Container-DbZwlfIM.mjs} +1 -1
- package/chunks/{EmptyState-B205JfZA.mjs → EmptyState-CUCseg9M.mjs} +1 -1
- package/chunks/{EmptyState-CcxlsZm0.cjs → EmptyState-DH1xawxg.cjs} +1 -1
- package/chunks/{FiltersActions-CFStLRsU.mjs → FiltersActions-CDZSO0MM.mjs} +4 -4
- package/chunks/{FiltersActions-BKJJH6Mu.cjs → FiltersActions-CVtgAJnC.cjs} +1 -1
- package/chunks/{FormSegmentGroup-CCCqRgCG.cjs → FormSegmentGroup-BYQ6yMK1.cjs} +1 -1
- package/chunks/{FormSegmentGroup-E1JurEt7.mjs → FormSegmentGroup-C9qYxYT9.mjs} +1 -1
- package/chunks/{GridDND-UMUi8M_Q.mjs → GridDND-CqvpXgCY.mjs} +2 -2
- package/chunks/{GridDND-DV-1g1sI.cjs → GridDND-DK6SAO8q.cjs} +1 -1
- package/chunks/LeftPanel-AyuV7bGS.cjs +1 -0
- package/chunks/{LeftPanel-HZu3ECqD.mjs → LeftPanel-C5SsoRJS.mjs} +47 -45
- package/chunks/{ListOfFilters-DJvnT9kw.cjs → ListOfFilters-BAPz0OY9.cjs} +1 -1
- package/chunks/{ListOfFilters-DTAZ3wfQ.mjs → ListOfFilters-Bd8CZHDq.mjs} +3 -3
- package/chunks/{MassActions-Z-48g81T.cjs → MassActions-C08IgW4a.cjs} +1 -1
- package/chunks/{MassActions-DSAaO1-u.mjs → MassActions-D5UwHcNG.mjs} +3 -3
- package/chunks/PageTitle-CrBeieoq.cjs +9 -0
- package/chunks/PageTitle-DkfAiZM4.mjs +133 -0
- package/chunks/{SplitView-DYHeCnl9.mjs → SplitView-BqS1Jbo4.mjs} +1 -1
- package/chunks/{SplitView-UKIBuvTi.cjs → SplitView-DNmd4sJe.cjs} +1 -1
- package/chunks/{Stories-Dlwle-SM.mjs → Stories-BnHxMCEZ.mjs} +3 -3
- package/chunks/{Stories-CZXv_Ves.cjs → Stories-UYVANawW.cjs} +1 -1
- package/chunks/Table-CdaMPDkg.cjs +31 -0
- package/chunks/{Table-B9OAyWAW.mjs → Table-DYSssxRS.mjs} +2761 -2679
- package/chunks/{TableCanvas-DkZAx-r9.mjs → TableCanvas-DDNRdQjN.mjs} +7074 -6977
- package/chunks/TableCanvas-DPHSYfH3.cjs +30 -0
- package/chunks/{TableGlide-CkorJrl9.mjs → TableGlide-DAnTJtye.mjs} +2295 -2231
- package/chunks/TableGlide-am_w97mF.cjs +1 -0
- package/chunks/{styles-C-1Srtr7.mjs → styles-CJ5y9FKW.mjs} +1 -1
- package/chunks/{styles-AUqEaroI.cjs → styles-kUWPuNSD.cjs} +1 -1
- package/chunks/utils-ChDQGRjv.cjs +25 -0
- package/chunks/{utils-YKicAHp0.mjs → utils-u1KJ37g3.mjs} +120 -108
- package/components/AiAgentPopover/index.cjs +1 -1
- package/components/AiAgentPopover/index.mjs +1 -1
- 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/AutocompleteSearch/index.cjs +1 -1
- package/components/AutocompleteSearch/index.mjs +2 -2
- package/components/BlockGradientScroll/index.cjs +1 -1
- package/components/BlockGradientScroll/index.mjs +1 -1
- package/components/BlockTitle/BlockTitle.d.ts +1 -1
- package/components/BlockTitle/BlockTitle.types.d.ts +2 -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/Collapse/index.cjs +1 -1
- package/components/Collapse/index.mjs +1 -1
- package/components/Combobox/index.cjs +1 -1
- package/components/Combobox/index.mjs +1 -1
- package/components/EmptyState/components/index.cjs +1 -1
- package/components/EmptyState/components/index.mjs +1 -1
- package/components/EmptyState/index.cjs +1 -1
- package/components/EmptyState/index.mjs +1 -1
- 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/IconButton/index.cjs +1 -1
- package/components/IconButton/index.mjs +1 -1
- package/components/LeftPanel/components/index.cjs +1 -1
- package/components/LeftPanel/components/index.mjs +1 -1
- package/components/LeftPanel/hooks/index.cjs +1 -1
- package/components/LeftPanel/hooks/index.mjs +1 -1
- package/components/LeftPanel/index.cjs +1 -1
- package/components/LeftPanel/index.mjs +1 -1
- package/components/LeftPanel/styled.d.ts +1 -0
- package/components/LeftPanel/utils/index.cjs +1 -1
- package/components/LeftPanel/utils/index.mjs +1 -1
- 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/ModalDF/index.cjs +1 -1
- package/components/ModalDF/index.mjs +1 -1
- package/components/Notification/index.cjs +1 -1
- package/components/Notification/index.mjs +2 -2
- package/components/PageTitle/PageTitle.styled.d.ts +3 -1
- 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.mjs +1 -1
- package/components/SplitView/index.cjs +1 -1
- package/components/SplitView/index.mjs +1 -1
- package/components/SplitView/utils/index.cjs +1 -1
- package/components/SplitView/utils/index.mjs +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/index.cjs +1 -1
- package/components/Table/feature-collapse-table/index.mjs +2 -2
- package/components/Table/feature-column-control/ColumnsList/index.cjs +1 -1
- package/components/Table/feature-column-control/ColumnsList/index.mjs +2 -2
- package/components/Table/feature-column-control/index.cjs +1 -1
- package/components/Table/feature-column-control/index.mjs +3 -3
- 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/combobox.d.ts +3 -2
- package/components/Table/feature-filtering/combobox/index.cjs +1 -1
- package/components/Table/feature-filtering/combobox/index.d.ts +4 -2
- package/components/Table/feature-filtering/combobox/index.mjs +7 -3
- 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/filter-component-in-popover.d.ts +1 -2
- 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/index.cjs +1 -1
- package/components/Table/feature-filtering/index.d.ts +1 -1
- package/components/Table/feature-filtering/index.mjs +13 -9
- package/components/Table/feature-filtering/render-slot.d.ts +5 -0
- package/components/Table/feature-filtering/sidebar-filter-block/index.cjs +1 -1
- package/components/Table/feature-filtering/sidebar-filter-block/index.mjs +2 -2
- package/components/Table/feature-filtering/use-focus-search-input.d.ts +2 -0
- 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 +3 -3
- package/components/Table/feature-pagination/index.cjs +1 -1
- package/components/Table/feature-pagination/index.mjs +3 -3
- package/components/Table/feature-reorder-columns/handlers.d.ts +4 -0
- 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/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 +5 -5
- package/components/Table/feature-row-size/index.cjs +1 -1
- package/components/Table/feature-row-size/index.mjs +2 -2
- 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-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-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 +2 -2
- package/components/Table/index.cjs +1 -1
- package/components/Table/index.d.ts +1 -1
- package/components/Table/index.mjs +43 -39
- package/components/Table/renders/formatCell/index.cjs +1 -1
- package/components/Table/renders/formatCell/index.mjs +3 -3
- package/components/Table/styles/index.cjs +1 -1
- package/components/Table/styles/index.mjs +9 -9
- package/components/Table/table-hooks/index.cjs +1 -1
- package/components/Table/table-hooks/index.mjs +3 -3
- package/components/Table/types/column-config.type.d.ts +1 -0
- package/components/Table/types/index.cjs +1 -1
- package/components/Table/types/index.mjs +1 -1
- package/components/Table/types/table-config.type.d.ts +1 -0
- package/components/Table/utils/index.cjs +1 -1
- package/components/Table/utils/index.mjs +4 -4
- 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/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-borders/buildBorderCallbacks.d.ts +16 -0
- package/components/TableCanvas/feature-borders/useBorders.d.ts +14 -0
- package/components/TableCanvas/feature-cell-transfer/index.cjs +1 -1
- package/components/TableCanvas/feature-cell-transfer/index.mjs +1 -1
- 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-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 +1 -0
- 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/combobox.d.ts +3 -2
- package/components/TableCanvas/feature-filtering/combobox/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/combobox/index.d.ts +4 -2
- package/components/TableCanvas/feature-filtering/combobox/index.mjs +7 -3
- package/components/TableCanvas/feature-filtering/filter-list-block/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/filter-list-block/index.mjs +2 -2
- package/components/TableCanvas/feature-filtering/header-filter-button/filter-component-in-popover.d.ts +1 -2
- package/components/TableCanvas/feature-filtering/header-filter-button/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/header-filter-button/index.mjs +2 -2
- package/components/TableCanvas/feature-filtering/index.cjs +1 -1
- package/components/TableCanvas/feature-filtering/index.d.ts +1 -1
- package/components/TableCanvas/feature-filtering/index.mjs +12 -8
- package/components/TableCanvas/feature-filtering/render-slot.d.ts +5 -0
- 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 +3 -3
- 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 +2 -2
- 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 +6 -6
- 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-reorder-columns/handlers.d.ts +4 -0
- 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/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 +3 -3
- package/components/TableCanvas/feature-rows-grouping/index.cjs +1 -1
- package/components/TableCanvas/feature-rows-grouping/index.mjs +1 -1
- package/components/TableCanvas/feature-searching/index.cjs +1 -1
- package/components/TableCanvas/feature-searching/index.mjs +1 -1
- 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-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 +2 -2
- package/components/TableCanvas/feature-tooltip/utils/index.cjs +1 -1
- package/components/TableCanvas/feature-tooltip/utils/index.mjs +6 -6
- package/components/TableCanvas/feature-tree/handlers.d.ts +1 -0
- package/components/TableCanvas/feature-tree/index.cjs +1 -1
- package/components/TableCanvas/feature-tree/index.mjs +1 -1
- package/components/TableCanvas/index.cjs +1 -1
- package/components/TableCanvas/index.d.ts +1 -1
- package/components/TableCanvas/index.mjs +63 -59
- package/components/TableCanvas/renders/formatCell/index.cjs +1 -1
- package/components/TableCanvas/renders/formatCell/index.mjs +1 -1
- package/components/TableCanvas/styles/index.cjs +1 -1
- package/components/TableCanvas/styles/index.mjs +1 -1
- package/components/TableCanvas/table-hooks/index.cjs +1 -1
- package/components/TableCanvas/table-hooks/index.mjs +12 -12
- package/components/TableCanvas/types/column-config.type.d.ts +1 -0
- package/components/TableCanvas/types/index.cjs +1 -1
- package/components/TableCanvas/types/index.mjs +2 -2
- package/components/TableCanvas/types/table-config.type.d.ts +28 -0
- package/components/TableCanvas/utils/index.cjs +1 -1
- package/components/TableCanvas/utils/index.mjs +2 -2
- package/components/TableCanvas/widgets/control-block/compression/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/compression/index.mjs +2 -2
- package/components/TableCanvas/widgets/control-block/index.cjs +1 -1
- package/components/TableCanvas/widgets/control-block/index.mjs +3 -3
- 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 +5 -5
- package/components/TableCanvas/widgets/mass-actions/hooks/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/hooks/index.mjs +8 -8
- package/components/TableCanvas/widgets/mass-actions/index.cjs +1 -1
- package/components/TableCanvas/widgets/mass-actions/index.mjs +1 -1
- package/components/TableContract/index.cjs +1 -1
- package/components/TableContract/index.mjs +2 -2
- package/components/TableGlide/hooks/selection/index.cjs +1 -1
- package/components/TableGlide/hooks/selection/index.d.ts +1 -2
- package/components/TableGlide/hooks/selection/index.mjs +6 -7
- package/components/TableGlide/hooks/selection/useColoringLayers.d.ts +25 -0
- package/components/TableGlide/hooks/useHoverState.d.ts +18 -0
- package/components/TableGlide/index.cjs +1 -1
- package/components/TableGlide/index.mjs +9 -9
- 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 +1 -1
- 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 +1 -1
- package/components/TableGlide/theming/custom-colors.d.ts +1 -1
- package/components/TableGlide/theming/index.cjs +1 -1
- package/components/TableGlide/theming/index.mjs +3 -3
- package/components/TableGlide/types.d.ts +1 -3
- package/components/TableTabs/index.cjs +1 -1
- package/components/TableTabs/index.mjs +1 -1
- 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 +2 -2
- package/components/Typography/index.cjs +1 -1
- package/components/Typography/index.mjs +1 -1
- package/components/Widget/index.cjs +1 -1
- package/components/Widget/index.mjs +2 -2
- package/formComponents/FormCombobox/index.cjs +1 -1
- package/formComponents/FormCombobox/index.mjs +1 -1
- package/formComponents/FormRadioGroupBox/index.cjs +1 -1
- package/formComponents/FormRadioGroupBox/index.mjs +1 -1
- package/formComponents/FormSegments/index.cjs +1 -1
- package/formComponents/FormSegments/index.mjs +1 -1
- package/formComponents/FormSwitch/index.cjs +1 -1
- package/formComponents/FormSwitch/index.mjs +1 -1
- package/index.cjs +1 -1
- package/index.mjs +1778 -1773
- package/layouts/Container/index.cjs +1 -1
- package/layouts/Container/index.mjs +1 -1
- package/layouts/Container/lib/utils/index.cjs +1 -1
- package/layouts/Container/lib/utils/index.mjs +1 -1
- package/layouts/ErrorPage/index.cjs +1 -1
- package/layouts/ErrorPage/index.mjs +1 -1
- 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/layouts/Layout/index.cjs +1 -1
- package/layouts/Layout/index.mjs +1 -1
- package/layouts/PageLayout/index.cjs +1 -1
- package/layouts/PageLayout/index.mjs +1 -1
- package/mcp-data/component-index.json +1208 -523
- package/mixins/index.cjs +1 -1
- package/mixins/index.mjs +1 -1
- package/package.json +6 -6
- package/styles/index.cjs +1 -1
- package/styles/index.mjs +1 -1
- package/utils/breakpoint/index.cjs +1 -1
- package/utils/breakpoint/index.mjs +1 -1
- package/utils/clickStream/index.cjs +1 -1
- package/utils/clickStream/index.mjs +1 -1
- package/utils/eventBus/index.cjs +1 -1
- package/utils/eventBus/index.mjs +1 -1
- package/utils/hooks/index.cjs +1 -1
- package/utils/hooks/index.mjs +1 -1
- package/utils/index.cjs +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/index.mjs +30 -29
- package/utils/react/getMFReactDOMClient.d.ts +7 -0
- package/utils/react/index.cjs +1 -0
- package/utils/react/index.d.ts +1 -0
- package/utils/react/index.mjs +4 -0
- package/utils/styles/index.cjs +1 -1
- package/utils/styles/index.mjs +1 -1
- package/chunks/AnalyticalWidget-wke3Jm3X.cjs +0 -43
- package/chunks/BlockTitle-BEIxiECX.cjs +0 -1
- package/chunks/BlockTitle-BZxOEdTc.mjs +0 -85
- package/chunks/LeftPanel-B3-ySDMW.cjs +0 -1
- package/chunks/PageTitle-Bh3g6FUT.cjs +0 -1
- package/chunks/PageTitle-CaqXfrrQ.mjs +0 -123
- package/chunks/Table-BwhzcFX1.cjs +0 -31
- package/chunks/TableCanvas-QmXGAjPk.cjs +0 -30
- package/chunks/TableGlide-Bngn5_5l.cjs +0 -1
- package/chunks/utils-CUW5bd8S.cjs +0 -25
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const P=require("@glideappsfinal/glide-data-grid"),Si=require("@salutejs/sdds-themes/tokens/sdds_finai"),Qs=require("canvas-hypertxt"),m=require("react"),tc=require("react-dom/server"),St=require("react/jsx-runtime");require("@glideappsfinal/glide-data-grid/dist/index.css");const Qt=require("./utils-ChDQGRjv.cjs"),Ge=require("react-dom"),Re=require("../components/TableCanvasSharedConstants/index.cjs"),Hr=require("styled-components"),tt={small:{rowHeight:20,cellVerticalPadding:4,cellHorizontalPadding:4,textfieldSize:"xs"},medium:{rowHeight:32,cellVerticalPadding:7,cellHorizontalPadding:6,textfieldSize:"s"},big:{rowHeight:48,cellVerticalPadding:12,cellHorizontalPadding:16,textfieldSize:"s"}},$e=o=>tt[o].rowHeight,xi=o=>tt[o].textfieldSize,Lr={small:tt.small.rowHeight,medium:tt.medium.rowHeight,big:tt.big.rowHeight},ec={kind:P.GridCellKind.Text,data:"",displayData:"",allowOverlay:!0,readonly:!0},Pr={big:{cellVerticalPadding:tt.big.cellVerticalPadding,cellHorizontalPadding:tt.big.cellHorizontalPadding,textfieldSize:tt.big.textfieldSize},medium:{cellVerticalPadding:tt.medium.cellVerticalPadding,cellHorizontalPadding:tt.medium.cellHorizontalPadding,textfieldSize:tt.medium.textfieldSize},small:{cellVerticalPadding:tt.small.cellVerticalPadding,cellHorizontalPadding:tt.small.cellHorizontalPadding,textfieldSize:tt.small.textfieldSize}},wi={"padding-block":"0px","padding-inline":"0px"},Vt=o=>`${o}px`,ic={small:{rowHeight:$e("small"),cell:{"padding-block":Vt(tt.small.cellVerticalPadding),"padding-inline":Vt(tt.small.cellHorizontalPadding)},editorCell:wi,input:xi("small"),icon:"xs",combobox:"s",checkboxOfCombobox:"s",switch:"s",font:()=>Si.bodyXXS},medium:{rowHeight:$e("medium"),cell:{"padding-block":Vt(tt.medium.cellVerticalPadding),"padding-inline":Vt(tt.medium.cellHorizontalPadding)},editorCell:wi,input:xi("medium"),icon:"s",combobox:"m",checkboxOfCombobox:"m",switch:"s",font:()=>Si.bodyS},big:{rowHeight:$e("big"),cell:{"padding-block":Vt(tt.big.cellVerticalPadding),"padding-inline":Vt(tt.big.cellHorizontalPadding)},editorCell:wi,input:xi("big"),icon:"m",combobox:"l",checkboxOfCombobox:"l",switch:"l",font:()=>Si.bodyM}},Ye=33,oc={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"}},rc=16;function Ko(o,t=rc){const e=parseFloat(o);return Number.isFinite(e)?o.endsWith("rem")?e*t:e:0}const nc=(o,t=!1)=>{const e=t?o["bold-font-weight"]:o["font-weight"],i=t?o["bold-font-size"]:o["font-size"],r=t?o["bold-line-height"]:o["line-height"];return`${e} normal ${i}/${r}`},sc=(o,t=!1)=>{const e=t?o["bold-font-size"]:o["font-size"],i=t?o["bold-line-height"]:o["line-height"];return{fontSize:Ko(e),lineHeightPx:Ko(i)}},Br=o=>Object.entries(oc).reduce((t,[e,i])=>{const r=e;return t.push([r,o(i)],[`${r}Bold`,o(i,!0)]),t},[]),qe=Object.fromEntries(Br(nc)),_r=Object.fromEntries(Br(sc)),cc={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto",width:void 0,height:void 0,crossAxisSizing:"auto"},ac={top:0,right:0,bottom:0,left:0};class Rr{constructor(t=cc){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 kr extends Rr{build(){}}class At extends Rr{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=Mr(i.padding)}addChild(t,e){if(t instanceof At){const r=t;if(e){const n=r.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(r),r}const i=new kr(t);return this.children.push(i),i}getContainerMetrics(){const t=this.direction==="row"||this.direction==="row-reverse",{left:e,right:i,top:r,bottom:n}=this.padding,{width:s,height:c}=this.size;return t?{main:s-e-i,cross:c-r-n,mainGap:this.columnGap,crossGap:this.rowGap}:{main:c-r-n,cross:s-e-i,mainGap:this.rowGap,crossGap:this.columnGap}}buildFlexLines(t,e){if(this.wrap==="nowrap")return[t];const i=[];let r=[],n=0;for(const s of t){const c=s.style.flexBasis,a=r.length>0?e.mainGap:0;r.length>0&&n+a+c>e.main&&(i.push(r),r=[],n=0),r.push(s),n+=(r.length>1?e.mainGap:0)+c}return r.length>0&&i.push(r),this.wrap==="wrap-reverse"&&i.reverse(),i}measureLineCrossSizes(t,e){const i=[];for(const r of t){let n=0;for(const s of r){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,r=t.reduce((h,u)=>h+u,0),n=e.crossGap*(i>1?i-1:0),s=e.cross-r-n;let c=0,a=e.crossGap;if(this.wrap==="nowrap"&&i===1)t[0]=e.cross;else if(this.wrap!=="nowrap"){const{crossStart:h,crossBetween:u}=this.calculateAlignContent(s,i,e.crossGap);if(c=h,a=u,this.alignContent==="stretch"&&s>0){const l=s/i;for(let d=0;d<i;d++)t[d]+=l}}return{crossStart:c,crossBetween:a}}calculateAlignContent(t,e,i){let r=0,n=i;switch(this.alignContent){case"flex-end":r=t;break;case"center":r=t/2;break;case"space-between":n=e>1?i+t/(e-1):0;break;case"space-around":n=i+t/e,r=n/2;break;case"space-evenly":n=i+t/(e+1),r=n;break}return{crossStart:r,crossBetween:n}}distributeMainAxisSizes(t,e,i){let r=0,n=0,s=0;for(const u of t){const l=u.style.flexBasis;r+=l,n+=u.style.flexGrow,s+=u.style.flexShrink*l}const c=t.length>1?e.mainGap*(t.length-1):0,a=e.main-r-c;let h=0;for(const u of t){const{style:l}=u;let d=l.flexBasis;a>0&&n>0?d+=a*l.flexGrow/n:a<0&&s>0&&(d+=a*l.flexShrink*d/s),d<0&&(d=0),i?u.size.width=d:u.size.height=d,h+=d}return{lineMainUsed:h,totalGrow:n}}calculateJustifySpacing(t,e,i,r){let n=0,s=i.mainGap;if(r===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 r=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>r&&(r=c)}return r}getCrossSize(t,e,i){const r=i?t.style.height:t.style.width,n=t.style.alignSelf!=="auto"?t.style.alignSelf:this.alignItems;return r!==void 0?(i?t.size.height=r:t.size.width=r,r):n==="stretch"?(i?t.size.height=e:t.size.width=e,e):i?t.size.height:t.size.width}positionChildren(t,e,i,r,n,s,c,a,h){const u=this.direction==="row-reverse"||this.direction==="column-reverse",l=u?t.length-1:0,d=u?-1:t.length,f=u?-1:1;let g=n;for(let C=l;C!==d;C+=f){const v=t[C];if(v!==void 0){const F=v.style,p=v.size,y=v.position;if(i){const T=this.direction==="row"?g:e.main-g-p.width;y.x=c+T}else{const T=this.direction==="column"?g:e.main-g-p.height;y.y=a+T}const b=F.alignSelf!=="auto"?F.alignSelf:this.alignItems,w=this.getCrossSize(v,r,i);let x=0;b==="flex-end"?x=r-w:b==="center"&&(x=(r-w)*.5),i?(y.y=a+h+x,g+=p.width+s):(y.x=c+h+x,g+=p.height+s)}}}build(){const{children:t}=this;if(t.length===0)return;const e=this.direction==="row"||this.direction==="row-reverse",i=this.getContainerMetrics(),r=this.buildFlexLines(t,i);if(r.length===0)return;const n=this.measureLineCrossSizes(r,e),{crossStart:s,crossBetween:c}=this.resolveCrossAxisLayout(n,i),a=this.padding.left,h=this.padding.top;let u=s;for(let l=0;l<r.length;l++){const d=r[l];if(d===void 0||d.length===0)continue;const{lineMainUsed:f,totalGrow:g}=this.distributeMainAxisSizes(d,i,e),{leading:C,between:v}=this.calculateJustifySpacing(d.length,f,i,g),F=this.getFinalLineHeight(d,n[l],e);this.positionChildren(d,i,e,F,C,v,a,h,u),u+=F+c}for(const l of t)l instanceof At&&l.build()}}function Mr(o){return o===void 0?ac:typeof o=="number"?{top:o,right:o,bottom:o,left:o}:{top:o.top??0,right:o.right??0,bottom:o.bottom??0,left:o.left??0}}class io extends At{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 r of t.children){const n=r.id??`_$$${i.counter++}`;e[n]={position:r.position,size:r.size},r instanceof At&&this._collectLayout(r,e,i)}}}const ae={direction:"row",columnGap:0,rowGap:0,justifyContent:"flex-start",alignItems:"stretch"};function zr(o){const t=o;return{id:o.id,direction:t.direction??ae.direction,columnGap:t.columnGap??ae.columnGap,rowGap:t.rowGap??ae.rowGap,justifyContent:t.justifyContent??ae.justifyContent,alignItems:t.alignItems??ae.alignItems}}function Or(o,t){if(t!=null&&t.length)for(const e of t)if(e.children&&e.children.length>0){const i=new At(e.width??0,e.height??0,zr(e));o.addChild(i,e),Or(i,e.children)}else o.addChild(e)}const lc=o=>{const t=o.width??0,e=o.height??0,i=zr(o),r=new io(t,e,i);return Or(r,o.children),r.getLayout()},ei=class ei{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),ei.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((r,n)=>n.cumulativeZIndex-r.cumulativeZIndex||n.order-r.order),i.map(({node:r})=>r)}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,r,n){if(!this.containsHitPoint(t,e))return;const s=i+this.zIndex;n.push({node:this,cumulativeZIndex:s,order:r.value}),r.value+=1;for(const c of this.children)c.collectHitCandidates(t,e,s,r,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}};ei.DEBUG=!1;let Mt=ei;class Nr{constructor(){this.defaultFlexStyle={flexGrow:0,flexShrink:1,flexBasis:0,alignSelf:"auto",width:void 0,height:void 0,crossAxisSizing:"auto"}}build(t,e,i){const r=i??t.children.filter(a=>!a.isAbsolute()),n=r.length,s=e.direction,c=s==="row"||s==="row-reverse";for(let a=0;a<n;a+=1){const h=r[a],u=h.style,l=this.extractChildFlexProperties(h,u);this.handlePercentageDimensions(l,u.width,u.height,c,h.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(h)?this.addContainerChild(h,e):this.addLeafChild(h,e)}}extractChildFlexProperties(t,e){const i=e.flexGrow??0,r=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:r,flexBasis:n,alignSelf:e.alignSelf??"auto",crossAxisSizing:"auto"}}handlePercentageDimensions(t,e,i,r,n){e==="100%"&&(r?(t.width=void 0,t.flexGrow===0&&(t.flexGrow=1)):(t.width=void 0,t.alignSelf="stretch",t.crossAxisSizing="deferred-percent-stretch")),i==="100%"&&(r?(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=r?n.width:n.height)}isContainer(t){return"flexOptions"in t}addContainerChild(t,e){const i=new At(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 ke=.5;class Wr{constructor(t){this.positionResolver=t}reconcile(t,e,i,r,n,s=!1){let c=!1;const{parent:a}=e,h=a!==null?a.rect:n;c=this.updateNodePosition(e,i,h??e.rect);const u=r??e.children.filter(d=>!d.isAbsolute()),l=u.length>0;if(l&&i instanceof At){const d=this.reconcileChildLayouts(t,u,i,n);if(c=c||d,this.isContainer(e)&&!s){const f=this.updateContainerFromContent(e,i);c=c||f}}else if(!l){const d=this.remeasureAndUpdateLeaf(t,e,i);c=c||d}return this.positionNestedAbsoluteChildren(t,e),c}updateNodePosition(t,e,i){const r=t.rect,n=e.position,s=e.size;r.x=i.x+n.x,r.y=i.y+n.y;const c=r.width!==s.width,a=r.height!==s.height;return r.width=s.width,r.height=s.height,c||a}reconcileChildLayouts(t,e,i,r){let n=!1;const s=i.children,c=e.length;for(let a=0;a<c;a+=1){const h=this.reconcile(t,e[a],s[a],void 0,r);n=n||h}return n}updateContainerFromContent(t,e){const i=this.getContainerCachedIsRow(t),r=this.getContainerCachedPadding(t),n=e.children,s=n.length;let c=0;if(i){for(let d=0;d<s;d+=1){const f=n[d],g=f.position.y+f.size.height;g>c&&(c=g)}const a=c>0?c+r.bottom:0,h=t.style.height;if(h==="100%")return!1;const u=typeof h=="number"?h:0,l=a>u?a:u;if(l>t.rect.height+ke)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 F=n[v],p=F.position.x+F.size.width,y=F.position.y+F.size.height;p>c&&(c=p),y>a&&(a=y)}const h=c>0?c+r.right:0,u=t.style.width;let l=!1,d=!1,f=!1;if(u!=="100%"){const v=typeof u=="number"?u:0,F=h>v?h:v;F>t.rect.width+ke&&(t.rect.width=F,l=!0,d=!0)}const g=a>0?a+r.bottom:0,C=t.style.height;if(C!=="100%"){const v=typeof C=="number"?C:0,F=g>v?g:v;F>t.rect.height+ke&&(t.rect.height=F,l=!0,f=!0)}return l&&this.syncFlexNodeSizeFromRect(t,e,d,f),l}return!1}syncFlexNodeSizeFromRect(t,e,i,r){i&&(e.size.width=t.rect.width),r&&(e.size.height=t.rect.height),this.syncAutoMainAxisFlexBasis(t,e,i,r)}syncAutoMainAxisFlexBasis(t,e,i,r){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&&r&&(e.style.flexBasis=t.rect.height)}remeasureAndUpdateLeaf(t,e,i){const r=e.rect.height,n=e.rect.width;e.measure(t),e.rect.width=n;const s=e.rect.height-r;return Math.abs(s)>ke?(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 xt{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,r,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&&r!==void 0){const h=Math.max(0,a-i-r);n?(t.x=s+i,t.width=h):(t.y=s+i,t.height=h)}else i!==void 0&&(n?t.x=s+i:t.y=s+i);r!==void 0&&i===void 0?n?t.x=c-t.width-r:t.y=c-t.height-r:r===void 0&&i===void 0&&(n?t.x=s:t.y=s)}applyAbsolutePositioning(t,e){const i=xt.resolvePositionValue(t.left,e.width),r=xt.resolvePositionValue(t.right,e.width),n=xt.resolvePositionValue(t.top,e.height),s=xt.resolvePositionValue(t.bottom,e.height),c=t.rect;xt.applyAxisPositioning(c,e,i,r,!0),xt.applyAxisPositioning(c,e,n,s,!1)}positionAbsoluteChildren(t,e,i,r,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)r(c),this.applyAbsolutePositioning(c,s),n==null||n(c)}}class ii{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 r=new ii;for(const n of t)r.accumulate(n,e);return r.addGap(i,e),r.getSize()}}const uc=3,Gr={top:0,right:0,bottom:0,left:0},hc=o=>o===void 0||o==="row"||o==="row-reverse",$r=o=>o===void 0?Gr:typeof o=="number"?{top:o,right:o,bottom:o,left:o}:{top:o.top??0,right:o.right??0,bottom:o.bottom??0,left:o.left??0};class Ct extends Mt{constructor(t,e={},i="transparent"){super(t),this.cachedPadding=Gr,this.cachedIsRow=!0,this.cachedGap=0,this.optionsCacheValid=!1,this.flexOptionsValue=e,this.positionResolver=new xt,this.flexTreeBuilder=new Nr,this.layoutReconciler=new Wr(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=hc(t.direction),this.cachedGap=this.cachedIsRow?t.columnGap??0:t.rowGap??0,this.cachedPadding=$r(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:r}=ii.computeIntrinsicSize(e,this.cachedIsRow,this.cachedGap),n=this.cachedPadding;this._intrinsicWidth=i+n.left+n.right,this._intrinsicHeight=r+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,r=t==="width"?i.left+i.right:i.top+i.bottom,n=e.rect[t]-r;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:r}=this.separateChildrenByLayoutMode();i.length>0&&this.layoutPhase1Flexbox(t,i,e),r.length>0&&this.isPositioningContext()&&this.layoutPhase2Absolute(t,r),this.clearLayoutDirty()}layoutPhase1Flexbox(t,e,i=!1){const r=new io(this.rect.width,this.rect.height,this.flexOptionsValue);this.flexTreeBuilder.build(this,r,e);let n=0,s;do r.build(),s=this.layoutReconciler.reconcile(t,this,r,e,this.rect,i),n+=1;while(s&&n<uc)}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 dc={minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0},fc=(o,t)=>({minX:Math.min(o.minX,t.rect.x),minY:Math.min(o.minY,t.rect.y),maxX:Math.max(o.maxX,t.rect.x+t.rect.width),maxY:Math.max(o.maxY,t.rect.y+t.rect.height)}),gc=o=>o.minX===1/0||o.maxX===-1/0;class Cc extends Ct{performLayout(t){const e=this.layoutChildren(t);if(!e){this.clearLayoutDirty();return}this.expandToFitBounds(e),this.clearLayoutDirty()}layoutChildren(t){let e={...dc};return this.children.forEach(i=>{i instanceof Ct?i.performLayout(t):i.measure(t),e=fc(e,i)}),gc(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 oo{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 r=i.hitTest(t,e);for(const s of r){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,r,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=(r=this.options).onCursorChange)==null||n.call(r,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,h,u,l,d;const i=this.findPortalTarget(t),r=i?{...i.rect}:null,n=this.activePortalNode,s=i&&r?{id:i.id,rect:r}: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,(u=(h=this.options).onPortalTargetChange)==null||u.call(h,i??null,e),!!this.options.portalHoverDispatch)if(i&&r&&this.bounds){const f=((d=(l=this.options).getTooltipContext)==null?void 0:d.call(l))??void 0;this.dispatchPortalHover({visible:!0,x:this.bounds.x+r.x,y:this.bounds.y+r.y,width:r.width,height:r.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,r,n,s;const e=((r=(i=this.options).getPortalEventTarget)==null?void 0:r.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 he={selection:"normal",cellClick:"normal",editor:"normal",contextMenu:"normal"};function vc(o){return o.selection!==void 0||o.cellClick!==void 0||o.editor!==void 0||o.contextMenu!==void 0}function Ur(o){if(!o||!vc(o))return;const t={selection:o.selection??he.selection,cellClick:o.cellClick??he.cellClick,editor:o.editor??he.editor,contextMenu:o.contextMenu??he.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 Xr(){return{...he}}class Vr{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 mc(o,t){return o.zIndex!==t.zIndex?o.zIndex-t.zIndex:o.order-t.order}const Zo=typeof Path2D<"u"&&typeof CanvasRenderingContext2D.prototype.roundRect=="function";class oi{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,r,n){return this.commands.push({type:"fillRect",x:t,y:e,width:i,height:r,fillStyle:n,zIndex:this.currentZIndex,order:this.orderCounter++}),this}strokeRect(t,e,i,r,n,s=1){return this.commands.push({type:"strokeRect",x:t,y:e,width:i,height:r,strokeStyle:n,lineWidth:s,zIndex:this.currentZIndex,order:this.orderCounter++}),this}fillText(t,e,i,r,n,s="middle",c){return this.commands.push({type:"fillText",text:t,x:e,y:i,font:r,fillStyle:n,textBaseline:s,textAlign:c,zIndex:this.currentZIndex,order:this.orderCounter++}),this}fillTextClipped(t,e,i,r,n,s,c="middle",a){return this.commands.push({type:"fillTextClipped",text:t,x:e,y:i,font:r,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,r,n){return this.commands.push({type:"drawImage",image:t,x:e,y:i,width:r,height:n,zIndex:this.currentZIndex,order:this.orderCounter++}),this}roundedRect(t,e,i,r,n,s){return this.commands.push({type:"roundedRect",x:t,y:e,width:i,height:r,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,r,n,s,c=90){return this.commands.push({type:"linearGradientRect",x:t,y:e,width:i,height:r,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(mc);let r="",n="",s=-1,c="",a="",h="";for(let u=0;u<i;u++){const l=e[u];if(l!==void 0)switch(l.type){case"fillRect":r!==l.fillStyle&&(t.fillStyle=l.fillStyle,r=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),r!==l.fillStyle&&(t.fillStyle=l.fillStyle,r=l.fillStyle),a!==l.textBaseline&&(t.textBaseline=l.textBaseline,a=l.textBaseline),l.textAlign&&h!==l.textAlign&&(t.textAlign=l.textAlign,h=l.textAlign),t.fillText(l.text,l.x,l.y);break;case"fillTextClipped":c!==l.font&&(t.font=l.font,c=l.font),r!==l.fillStyle&&(t.fillStyle=l.fillStyle,r=l.fillStyle),a!==l.textBaseline&&(t.textBaseline=l.textBaseline,a=l.textBaseline),l.textAlign&&h!==l.textAlign&&(t.textAlign=l.textAlign,h=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&&(r=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),r="",n="",s=-1,c="",a="",h="";break}}this.clear()}executeLinearGradientRect(t,e){const{x:i,y:r,width:n,height:s,radius:c,gradientStops:a,angle:h}=e,u=(h-90)*Math.PI/180,l=Math.cos(u),d=Math.sin(u),f=n/2,g=s/2,C=i+f,v=r+g,p=(Math.abs(l*n)+Math.abs(d*s))/2,y=C-l*p,b=v-d*p,w=C+l*p,x=v+d*p,T=t.createLinearGradient(y,b,w,x);for(const E of a)T.addColorStop(E.offset,E.color);if(t.fillStyle=T,c>0)if(Zo)t.beginPath(),t.roundRect(i,r,n,s,c),t.fill();else{const E=c,D=i+n,_=r+s;t.beginPath(),t.moveTo(i+E,r),t.lineTo(D-E,r),t.quadraticCurveTo(D,r,D,r+E),t.lineTo(D,_-E),t.quadraticCurveTo(D,_,D-E,_),t.lineTo(i+E,_),t.quadraticCurveTo(i,_,i,_-E),t.lineTo(i,r+E),t.quadraticCurveTo(i,r,i+E,r),t.closePath(),t.fill()}else t.fillRect(i,r,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:r,width:n,height:s,radius:c,fillStyle:a,strokeStyle:h,lineWidth:u}=e;if(Zo)t.beginPath(),t.roundRect(i,r,n,s,c);else{const l=c,d=i+n,f=r+s;t.beginPath(),t.moveTo(i+l,r),t.lineTo(d-l,r),t.quadraticCurveTo(d,r,d,r+l),t.lineTo(d,f-l),t.quadraticCurveTo(d,f,d-l,f),t.lineTo(i+l,f),t.quadraticCurveTo(i,f,i,f-l),t.lineTo(i,r+l),t.quadraticCurveTo(i,r,i+l,r),t.closePath()}a&&(t.fillStyle=a,t.fill()),h&&(t.strokeStyle=h,u!==void 0&&(t.lineWidth=u),t.stroke())}}const pc=new oi;class yc{constructor(t,e){this.eventHandlers=new Map,this.batcher=new oi,this.canvas=t,this.ctx=t.getContext("2d",{alpha:!1}),this.rootNode=e,this.hoverController=new oo({onCursorChange:i=>{var r;return(r=this.onCursorChange)==null?void 0:r.call(this,i)},onPortalTargetChange:(i,r)=>{var n;return(n=this.onPortalHoverTargetChange)==null?void 0:n.call(this,i,r)}}),this.setupEvents()}setupEvents(){["click","mousedown","mouseup","mousemove","dblclick"].forEach(e=>{const i=r=>this.dispatchPointerEvent(r,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:r}=this.getEventCoords(t),n=this.rootNode.hitTest(i,r),s=n[0];let c=!1;const a={type:e,x:i,y:r,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,r){t.length!==0&&this.dispatchToNodes(t,e,(n,s)=>this.invokePointerHandler(n,i,s),r)}dispatchMouseMove(t,e,i){this.dispatchToNodes(t,e,(r,n)=>r.onMouseMove(n),i)}dispatchToNodes(t,e,i,r){for(const n of t){if(r())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 ct={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 Yr(o){return{default:{bgColor:o.surfaceSolidDefault,bgColorHover:o.surfaceSolidDefault,borderColor:o.surfaceSolidDefault,textColor:o.inverseTextPrimary,iconColor:o.inverseTextPrimary},primary:{bgColor:o.surfaceSolidDefault,bgColorHover:o.surfaceSolidDefault,borderColor:o.surfaceSolidDefault,textColor:o.inverseTextPrimary,iconColor:o.inverseTextPrimary},accent:{bgColor:o.surfaceAccent,bgColorHover:o.surfaceAccentHover,borderColor:o.surfaceAccent,textColor:o.onDarkTextPrimary,iconColor:o.onDarkTextPrimary},secondary:{bgColor:o.surfaceTransparentSecondary,bgColorHover:o.surfaceTransparentSecondaryHover,borderColor:"transparent",textColor:o.textPrimary,iconColor:o.textPrimary},clear:{bgColor:o.surfaceClear,bgColorHover:o.surfaceTransparentSecondaryHover,borderColor:"transparent",textColor:o.textPrimary,iconColor:o.textPrimary},success:{bgColor:o.surfacePositive,bgColorHover:o.surfacePositiveHover,borderColor:o.surfacePositive,textColor:o.onDarkTextPrimary,iconColor:o.onDarkTextPrimary},warning:{bgColor:o.surfaceWarning,bgColorHover:o.surfaceWarningHover,borderColor:o.surfaceWarning,textColor:o.onDarkTextPrimary,iconColor:o.onDarkTextPrimary},critical:{bgColor:o.surfaceNegative,bgColorHover:o.surfaceNegativeHover,borderColor:o.surfaceNegative,textColor:o.onDarkTextPrimary,iconColor:o.onDarkTextPrimary},dark:{bgColor:o.onLightSurfaceTransparentDeep,bgColorHover:o.onLightSurfaceTransparentDeep,borderColor:o.onLightSurfaceTransparentDeep,textColor:o.onDarkTextPrimary,iconColor:o.onDarkTextPrimary},black:{bgColor:o.onLightSurfaceSolidDefault,bgColorHover:o.onLightSurfaceSolidDefault,borderColor:o.onLightSurfaceSolidDefault,textColor:o.onDarkTextPrimary,iconColor:o.onDarkTextPrimary},white:{bgColor:o.onDarkSurfaceSolidDefault,bgColorHover:o.onDarkSurfaceSolidDefault,borderColor:o.onDarkSurfaceSolidDefault,textColor:o.onLightTextPrimary,iconColor:o.onLightTextPrimary}}}const jo={bgColor:"#060A0C",bgColorHover:"#13181B",borderColor:"transparent",textColor:"#FFFFFF",textColorHover:"#F2F5F893",iconColor:"#FFFFFF",iconColorHover:"#F2F5F893"},ri={default:jo,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:jo,white:{bgColor:"#FFFFFF",bgColorHover:"#FFFFFF",borderColor:"transparent",textColor:"#060A0C",textColorHover:"#13181B93",iconColor:"#060A0C",iconColorHover:"#13181B93"}},oe=4,re=4,qr=16,ro=20,no=4,Et=1,so=6,Fc=4,ni="s",si="default",co="#d32f2f",ve="#ffffff",Kr="rgba(30, 136, 229, 0.08)",_i="#ffffff",Zr="#E8EEF2",jr="#D5DFE6",Ri="#8A959D",ao="|",Jr="#",Qr=35,lo=15,ki=new Map,Mi=new Map;function uo(o,t){if(o.charCodeAt(0)===Qr){const e=parseInt(o.slice(1),16),i=Math.min(255,(e>>16&255)+t),r=Math.min(255,(e>>8&255)+t),n=Math.min(255,(e&255)+t);return`${Jr}${(i<<16|r<<8|n).toString(16).padStart(6,"0")}`}return o}function Jo(o,t){const e=Math.min(1,Math.max(0,t));if(o.charCodeAt(0)!==35)throw new Error("Only HEX color format is supported");let i=o.slice(1),r,n,s;if((i.length===3||i.length===4)&&(i=i.split("").map(c=>c+c).join("")),i.length===6)r=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)r=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: ${o}`);return`rgba(${r}, ${n}, ${s}, ${e})`}function tn(o,t){const e=`${o}${ao}${t}`;let i=ki.get(e);return i===void 0&&(i=uo(o,t),ki.set(e,i)),i}function ho(o,t,e){const i=`${e}${ao}${t}`;let r=Mi.get(i);return r===void 0&&(o.font=e,r=o.measureText(t).width,Mi.set(i,r)),r}function fo(o,t,e,i,r,n){if(o!=="auto")return o;let s=0;return r&&(s+=e+i),n&&(s+=e+i),t+s+4}function go(o,t,e,i,r){let n=o;return i&&(n+=t+e),r&&(n+=t+e),n}function bc(){ki.clear(),Mi.clear()}const Sc=uo(co,lo);function Co(o,t,e,i){if(e)return{bgColor:o.bgCell,borderColor:o.borderColor,textColor:o.textLight,iconColor:o.textLight};switch(t){case"primary":return zi(o,i);case"secondary":return en(o,i);case"danger":return on(i);default:return zi(o,i)}}function xc(o,t,e,i,r){const{accentColor:n}=o,s=o.accentFg||ve,c=o.accentFg||ve,a=.4;if(t||e){const d=r?Jo(n,a):n;return{bgColor:d,borderColor:d,textColor:s,iconColor:c}}const h="#485056B0",u="white",l=r?Jo(h,a):h;return{bgColor:u,borderColor:l,textColor:s,iconColor:c}}function zi(o,t){const{accentColor:e}=o,i=t?tn(e,lo):e;return{bgColor:i,borderColor:i,textColor:o.accentFg||ve,iconColor:o.accentFg||ve}}function en(o,t){return{bgColor:t?o.accentLight||Kr:o.bgCell,borderColor:o.accentColor,textColor:o.accentColor,iconColor:o.accentColor}}function on(o){const t=o?Sc:co;return{bgColor:t,borderColor:t,textColor:_i,iconColor:_i}}function vo(o,t,e){return t?{bgColor:Zr,borderColor:jr,textColor:Ri,iconColor:Ri}:{bgColor:e?o.bgColorHover:o.bgColor,borderColor:o.borderColor,textColor:e&&o.textColorHover?o.textColorHover:o.textColor,iconColor:e&&o.iconColorHover?o.iconColorHover:o.iconColor}}const Zt=-1,Qo=0,ht={colIndex:Zt,rowIndex:Zt},it={x:Qo,y:Qo},wc=2;function Ue(o){const{location:t}=o;if(Array.isArray(t)&&t.length>=wc)return ht.colIndex=t[0]??Zt,ht.rowIndex=t[1]??Zt,ht;const{col:e}=o,{row:i}=o;if(typeof e=="number"&&typeof i=="number")return ht.colIndex=e,ht.rowIndex=i,ht;const{colIndex:r}=o,{rowIndex:n}=o;return typeof r=="number"&&typeof n=="number"?(ht.colIndex=r,ht.rowIndex=n,ht):(ht.colIndex=Zt,ht.rowIndex=Zt,ht)}const Me="-",tr=0;function te(o,t){const{colIndex:e,rowIndex:i}=o;return e>=tr&&i>=tr?`${e}${Me}${i}`:`${t.x}${Me}${t.y}${Me}${t.width}${Me}${t.height}`}function Oi(o){const{posX:t}=o,{posY:e}=o;if(typeof t=="number"&&typeof e=="number"&&t===t&&e===e)return it.x=t,it.y=e,it;const{x:i}=o,{y:r}=o;if(typeof i=="number"&&typeof r=="number"&&i===i&&r===r)return it.x=i,it.y=r,it;const{location:n}=o;if(Array.isArray(n)&&n.length>=2){const s=n[0],c=n[1];if(typeof s=="number"&&typeof c=="number")return it.x=s,it.y=c,it}return null}function Ni(o,t){const e=o.x,i=o.y,r=t.x,n=t.y;return e>=r&&e<=r+t.width&&i>=n&&i<=n+t.height?(it.x=e-r,it.y=i-n,it):o}function rn(o,t,e){if(typeof o!="number"||typeof t!="number")return;const i=e.width,r=e.height,n=e.x,s=e.y;if(o>=-1&&o<=i+1&&t>=-1&&t<=r+1)return it.x=o,it.y=t,it;if(o>=n-1&&o<=n+i+1&&t>=s-1&&t<=s+r+1)return it.x=o-n,it.y=t-s,it}function mo(o,t,e){const i=e.x,r=e.y;return o>=i&&o<=i+e.width&&t>=r&&t<=r+e.height}function zt(o,t){if(typeof o=="object"&&o){const{hoverX:e}=o,{hoverY:i}=o,{rectX:r}=o,{rectY:n}=o;if(typeof e=="number"&&typeof i=="number"&&typeof r=="number"&&typeof n=="number"){const s=t.x-r,c=t.y-n;return e>=s&&e<=s+t.width&&i>=c&&i<=c+t.height}}return!!o}function Xe(){return typeof window<"u"?Math.ceil(window.devicePixelRatio):1}function nn(o){let t=0;for(let e=0;e<o.length;e++)t=(t<<5)-t+o.charCodeAt(e),t|=0;return t.toString(36)}function Wi(o,t){let e=o;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 sn{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(([r,n])=>({name:r,svg:n}));for(const{name:r,svg:n}of i)r&&n&&(e.overwrite||!this.iconRegistry.has(r))&&this.iconRegistry.set(r,n);return this}getSprite(t,e,i){const r=this.resolveKey(t,e,i);if(!r)return null;this.stats.requests++;const n=this.spriteCache.get(r.key);return n?(this.stats.hits++,n):(this.stats.misses++,this.loadSprite(r.key,r.url,e,!0),null)}preload(t,e){const i=Array.isArray(t)?t:[t];for(const r of i){const n=this.resolveKey(r,e.size,e.color);n&&this.loadSprite(n.key,n.url,e.size,!1)}return this}draw(t,e,i,r,n,s){const c=this.getSprite(e,n,s);if(c){const a=n*Xe();t.drawImage(c,0,0,a,a,i,r,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 r=e*Xe();if(typeof t=="string"){const{key:n,url:s}=this.resolveIconUrl(t,i);return{key:`${n}@${r}`,url:s}}return t instanceof HTMLImageElement?{key:`img:${t.src}:${i??""}@${r}`,url:t.src}:null}resolveIconUrl(t,e){const i=e??"",r=this.iconRegistry.get(t);if(r){const s=`r:${t}:${i}`;return this.svgDataUrlCache.has(s)||this.svgDataUrlCache.set(s,Wi(r,e)),{key:s,url:this.svgDataUrlCache.get(s)}}const n=t.trimStart();if(n.startsWith("<svg")){const s=`s:${nn(n)}:${i}`;return this.svgDataUrlCache.has(s)||this.svgDataUrlCache.set(s,Wi(n,e)),{key:s,url:this.svgDataUrlCache.get(s)}}return{key:`u:${t}:${i}`,url:t}}loadSprite(t,e,i,r){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*Xe();(c=n.decode)==null||c.call(n).then(()=>{const a=document.createElement("canvas");a.width=s,a.height=s;const h=a.getContext("2d");h&&(h.drawImage(n,0,0,s,s),this.spriteCache.set(t,a),this.stats.cacheSize=this.spriteCache.size),r&&this.notifyListeners()}).catch(()=>{}).finally(()=>{this.pendingLoads.delete(t),this.inFlightCount--,this.stats.inFlight=this.inFlightCount,!r&&this.inFlightCount===0&&this.notifyListeners()})}notifyListeners(){this.loadListeners.forEach(t=>t())}}const Tt=new sn;function cn(o){return Tt.onLoad(o)}function Ac(o,t={}){Tt.register(o,t)}function an(o,t,e){return Tt.getSprite(o,t,e)}function ln(o,t){Tt.preload(o,t)}function un(o,t,e,i,r,n){Tt.draw(o,t,e,i,r,n)}function hn(o,t){return Tt.getImageDirect(o)}function Ec(){return Tt.getStats()}function Tc(){Tt.clearSpriteCache()}const Dc=un;function ft(o,t,e,i,r,n){if(!t||r<=0)return;const s=an(t,r,n);if(s){o.drawImage(s,e,i,r,r);return}const c=hn(t);c&&o.drawImage(c,e,i,r,r)}function dn(o,t,e,i,r,n,s,c="primary",a=!1,h=!1,u,l,d,f=so){const g=oe,C=r-g*2,v=Math.min(C-re,qr),F=s.baseFontFull,p=d?ho(d,n,F):0,y=fo(i,p,v,f,u,l),b=e+g,w=zt(h,{x:t,y:e,width:y,height:r}),x=Co(s,c,a,w),T=t+y*.5,E=b+C*.5;o.roundedRect(t,b,y,C,no,{fillStyle:x.bgColor,strokeStyle:x.borderColor,lineWidth:Et});const D=go(p,v,f,u,l);let _=T-D*.5;if(u){const G=E-v*.5;ft(o,u,_,G,v,x.textColor),_+=v+f}if(o.fillText(n,_,E,F,x.textColor,"middle","left"),l){const G=_+p+f,O=E-v*.5;ft(o,l,G,O,v,x.textColor)}return{x:t,y:b,width:y,height:C,actualWidth:y}}function fn(o,t,e,i,r,n=si,s=ni,c=!1,a=!1,h,u,l,d=so,f){const g=ct[s],C=f?f[n]:ri[n],v=`${g.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,F=l?ho(l,r,v):0,p=fo(i,F,g.iconSize,d,h,u),y=zt(a,{x:t,y:e,width:p,height:g.height}),b=vo(C,c,y),w=t+p*.5,x=e+g.height*.5;b.bgColor!=="transparent"?o.roundedRect(t,e,p,g.height,g.borderRadius,{fillStyle:b.bgColor,strokeStyle:b.borderColor!=="transparent"?b.borderColor:void 0,lineWidth:b.borderColor!=="transparent"?Et:0}):b.borderColor!=="transparent"&&o.roundedRect(t,e,p,g.height,g.borderRadius,{fillStyle:b.bgColor,strokeStyle:b.borderColor,lineWidth:Et});const T=go(F,g.iconSize,d,h,u);let E=w-T*.5;if(h){const D=x-g.iconSize*.5;ft(o,h,E,D,g.iconSize,b.textColor),E+=g.iconSize+d}if(o.fillText(r,E,x,v,b.textColor,"middle","left"),u){const D=E+F+d,_=x-g.iconSize*.5;ft(o,u,D,_,g.iconSize,b.textColor)}return{x:t,y:e,width:p,height:g.height,actualWidth:p}}const Ic={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"},Hc=(o,t)=>o.length!==6?o:o.slice(0,4)+Ic[t],Yt="transparent",Lc=Object.fromEntries(Object.entries(ri).map(([o,t])=>o==="secondary"?[o,{bgColor:Yt,borderColor:Yt,textColor:"#485056B0",bgColorHover:Yt,iconColor:"#485056B0",iconColorHovered:"#485056FF"}]:[o,{bgColor:Yt,borderColor:Yt,textColor:t.bgColor,bgColorHover:Yt,iconColor:t.bgColor,iconColorHovered:t.bgColorHover}]));function gn(o,t,e,i,r=si,n=ni,s=!1,c=!1,a){const h=ct[n],u=Lc[r],l=(a==null?void 0:a.overrideSquareSize)??h.height,d=(a==null?void 0:a.overrideIconSize)??h.iconSize,f=zt(c,{x:t,y:e,width:l,height:l}),g=u,C=t+l*.5,v=e+l*.5,F=C-d*.5,p=v-d*.5;g.bgColor!=="transparent"?o.roundedRect(t,e,l,l,h.borderRadius,{fillStyle:g.bgColor,strokeStyle:g.borderColor!=="transparent"?g.borderColor:void 0,lineWidth:g.borderColor!=="transparent"?Et:0}):g.borderColor!=="transparent"&&o.roundedRect(t,e,l,l,h.borderRadius,{fillStyle:g.bgColor,strokeStyle:g.borderColor,lineWidth:Et});const y=(a==null?void 0:a.iconColor)??g.iconColor,b=(a==null?void 0:a.iconColorHovered)??(a==null?void 0:a.iconColor)??g.iconColorHovered,w=s?Hc(y,40):f?b:y;return ft(o,i,F,p,d,w),{x:t,y:e,width:l,height:l}}function po(o,t,e,i,r,n,s,c="primary",a=!1,h=!1){const u=oe,l=r-u*2,d=Math.min(l-re,ro),f=i==="auto"?d:i,g=e+u,C=zt(h,{x:t,y:e,width:f,height:r}),v=Co(s,c,a,C),F=t+f*.5,p=g+l*.5,y=F-d*.5,b=p-d*.5;return o.roundedRect(t,g,f,l,no,{fillStyle:v.bgColor,strokeStyle:v.borderColor,lineWidth:Et}),ft(o,n,y,b,d,v.iconColor),{x:t,y:g,width:f,height:l}}function Cn(o,t,e,i,r=si,n=ni,s=!1,c=!1){const a=ct[n],h=ri[r],u=a.height,l=zt(c,{x:t,y:e,width:u,height:u}),d=vo(h,s,l),f=t+u*.5,g=e+u*.5,C=f-a.iconSize*.5,v=g-a.iconSize*.5;return d.bgColor!=="transparent"?o.roundedRect(t,e,u,u,a.borderRadius,{fillStyle:d.bgColor,strokeStyle:d.borderColor!=="transparent"?d.borderColor:void 0,lineWidth:d.borderColor!=="transparent"?Et:0}):d.borderColor!=="transparent"&&o.roundedRect(t,e,u,u,a.borderRadius,{fillStyle:d.bgColor,strokeStyle:d.borderColor,lineWidth:Et}),ft(o,i,C,v,a.iconSize,d.iconColor),{x:t,y:e,width:u,height:u}}const er={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 Pc(o){return{default:{bgColor:o.surfaceSolidDefault,bgColorTransparent:o.surfaceTransparentSecondary,textColor:o.inverseTextPrimary,textColorOnTransparent:o.textPrimary},accent:{bgColor:o.surfaceAccent,bgColorTransparent:o.surfaceTransparentAccent,textColor:o.onDarkTextPrimary,textColorOnTransparent:o.textAccent},positive:{bgColor:o.surfacePositive,bgColorTransparent:o.surfaceTransparentPositive,textColor:o.onDarkTextPrimary,textColorOnTransparent:o.textPositive},warning:{bgColor:o.surfaceWarning,bgColorTransparent:o.surfaceTransparentWarning,textColor:o.onDarkTextPrimary,textColorOnTransparent:o.textWarning},negative:{bgColor:o.surfaceNegative,bgColorTransparent:o.surfaceTransparentNegative,textColor:o.onDarkTextPrimary,textColorOnTransparent:o.textNegative},dark:{bgColor:o.onLightSurfaceSolidDefault,bgColorTransparent:o.onLightSurfaceTransparentDeep,textColor:o.onDarkTextPrimary,textColorOnTransparent:o.onLightTextPrimary},light:{bgColor:o.onDarkSurfaceSolidDefault,bgColorTransparent:o.onDarkSurfaceTransparentCard,textColor:o.onLightTextPrimary,textColorOnTransparent:o.onDarkTextPrimary}}}const Bc="|",ze=6,ir=new Map,or={xs:10,s:12,m:14,l:16};class vn extends Ft{constructor(t,e,i){var r;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,(r=i.theme)!=null&&r.tokens&&(this.viewColors=Pc(i.theme.tokens)))}measure(t){const e=er[this.size],i=or[this.size],r=`${e.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,n=rr(t,r,this.text),s=this.text.length>0;let c=0;this.leftIcon&&(c+=i+(s?ze:0)),this.rightIcon&&(c+=i+(s?ze:0)),this.rect.width=n+c+e.paddingX*2,this.rect.height=e.height}onPaint(t,e){const{x:i,y:r,width:n,height:s}=this.rect,c=er[this.size],a=or[this.size],h=this.viewColors[this.view];if(!h)return;const u=`${c.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`;let l,d;if(this.clear?(l="transparent",d=this.customColor??h.textColorOnTransparent):this.transparent?(l=this.customBackgroundColor??h.bgColorTransparent,d=this.customColor??h.textColorOnTransparent):(l=this.customBackgroundColor??h.bgColor,d=this.customColor??h.textColor),!this.clear){const C=this.pilled?s/2:c.borderRadius;t.roundedRect(i,r,n,s,C,{fillStyle:l})}const f=r+s/2;let g=i+c.paddingX;if(this.leftIcon){const C=f-a/2;ft(t,this.leftIcon,g,C,a,d),g+=a+ze}if(t.fillText(this.text,g,f,u,d,"middle"),this.rightIcon){const C=rr(e,u,this.text),v=g+C+ze,F=f-a/2;ft(t,this.rightIcon,v,F,a,d)}}}function rr(o,t,e){const i=`${t}${Bc}${e}`;let r=ir.get(i);return r===void 0&&(o.font=t,r=o.measureText(e).width,ir.set(i,r)),r}const _c="default",Rc="s",Ai="pointer",Oe=8,kc={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"},nr=new Map;class mn extends Ft{constructor(t,e,i){var r;super(t),this.variant="primary",this.view=_c,this.size=Rc,this.disabled=!1,this.isHovered=!1,this.useNewApi=!1,this.text=e,super.style={...super.style,cursor:Ai},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),(r=i.theme)!=null&&r.tokens&&(this.viewColors=Yr(i.theme.tokens)))}set style(t){super.style={...super.style,cursor:Ai,...t}}get style(){const t=super.style;return t.cursor||(t.cursor=Ai),t}measure(t){const e=ct[this.size],i=`${e.fontSize}px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`,r=Mc(t,this.text,i);let n=0;this.leftIcon&&(n+=e.iconSize+Oe),this.rightIcon&&(n+=e.iconSize+Oe),this.rect.width=r+n+e.paddingX*2,this.rect.height=e.height}onPaint(t,e){const{x:i,y:r,width:n}=this.rect;if(this.useNewApi)fn(t,i,r,n,this.text,this.view,this.size,this.disabled,this.isHovered,this.leftIcon,this.rightIcon,e,Oe,this.viewColors);else{const s=ct[this.size];dn(t,i,r,n,s.height,this.text,kc,this.variant,this.disabled,this.isHovered,this.leftIcon,this.rightIcon,e,Oe)}}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}}function Mc(o,t,e){const i=`${e}|${t}`;let r=nr.get(i);return r===void 0&&(o.font=e,r=o.measureText(t).width,nr.set(i,r)),r}const sr=16,cr="black",ar=0,zc=Math.PI/2,Oc=1.8,qt={startX:-3.5,startY:-4.25,middleX:2.75,middleY:0,endX:-3.5,endY:4.25};class Nc extends Ft{constructor(t,e={}){super(t),this.rotation=ar,this.color=cr,this.rotation=e.rotation??ar,this.color=e.color??cr,this.rect.width=sr,this.rect.height=sr}measure(t){}onPaint(t,e){const{x:i,y:r,width:n,height:s}=this.rect,c=i+n/2,a=r+s/2,h=this.rotation*zc;t.custom(u=>{u.save(),u.translate(c,a),u.rotate(h),u.strokeStyle=this.color,u.lineWidth=Oc,u.lineCap="round",u.lineJoin="round",u.beginPath(),u.moveTo(qt.startX,qt.startY),u.lineTo(qt.middleX,qt.middleY),u.lineTo(qt.endX,qt.endY),u.stroke(),u.restore()})}}const Wc=28,Gc="default",$c="s",Uc="pointer",Xc=20,Vc={accentColor:"#1e88e5",accentLight:"rgba(30, 136, 229, 0.16)",accentFg:"#ffffff",bgCell:"#ffffff",borderColor:"#e0e0e0",textLight:"#9e9e9e"};class Gi extends Ft{constructor(t,e,i){super(t),this.view=Gc,this.buttonSize=$c,this.isHovered=!1,this.useNewApi=!1,this.getDisabled=()=>this.disabled?"default":Uc,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.overrideWidth)!==void 0&&(this.overrideWidth=i.overrideWidth),(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=r=>{var n;return(n=i.onClick)==null?void 0:n.call(i,r)})}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=ct[this.buttonSize],i=this.overrideSquareSize??e.height;this.rect.height=i,this.rect.width=this.overrideWidth??i}else{const e=lr(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:i,y:r,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(gn(t,i,r,this.icon,this.view,this.buttonSize,this.disabled,this.isHovered,c),Mt.DEBUG){const a=ct[this.buttonSize],h=this.overrideSquareSize??a.height,u=this.overrideIconSize??a.iconSize,l=i+(h-u)*.5,d=r+(h-u)*.5;t.strokeRect(l,d,u,u,"cyan",1)}}else po(t,i,r,n,s,this.icon,Vc,this.variant,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}containsHitPoint(t,e){if(this.useNewApi){const n=ct[this.buttonSize],s=this.overrideSquareSize??n.height,c={x:this.rect.x,y:this.rect.y,width:this.overrideWidth??s,height:s};return ur(t,e,c)}const i=lr(this.size,this.rect.height),r=Yc(this.rect.x,this.rect.y,i);return ur(t,e,r)}}function lr(o,t){const e=typeof o=="number"?o:t??Wc,i=0,r=oe,n=Math.min(e-r*2-re,Xc),s=typeof o=="number"?o:n+i*2;return{height:e,width:s,paddingX:i,paddingY:r,iconSize:n}}function Yc(o,t,e){return{x:o+e.paddingX,y:t+e.paddingY,width:e.width-e.paddingX*2,height:e.height-e.paddingY*2}}function ur(o,t,e){return o>=e.x&&o<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}const qc=16,Kc="transparent";class pn extends Ft{constructor(t,e,i){super(t),this.icon=e,this.size=(i==null?void 0:i.size)??qc,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:r,width:n,height:s}=this.rect;this.backgroundColor&&this.backgroundColor!==Kc&&t.fillRect(i,r,n,s,this.backgroundColor),ft(t,this.icon,i,r,this.size,this.color)}}const Zc=28,jc="default",Jc="s",Ei="pointer",Qc=20,ta={accentColor:"#1e88e5",accentLight:"rgba(30, 136, 229, 0.16)",accentFg:"#ffffff",bgCell:"#ffffff",borderColor:"#e0e0e0",textLight:"#9e9e9e"};class yn extends Ft{constructor(t,e,i){super(t),this.view=jc,this.buttonSize=Jc,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:Ei},(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=r=>{var n;return(n=i.onClick)==null?void 0:n.call(i,r)})}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){if(this.useNewApi){const e=ct[this.buttonSize];this.rect.height=e.height,this.rect.width=e.height}else{const e=hr(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:i,y:r,width:n,height:s}=this.rect;this.useNewApi?Cn(t,i,r,this.icon,this.view,this.buttonSize,this.disabled,this.isHovered):po(t,i,r,n,s,this.icon,ta,this.variant,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}containsHitPoint(t,e){if(this.useNewApi){const n=ct[this.buttonSize],s={x:this.rect.x,y:this.rect.y,width:n.height,height:n.height};return dr(t,e,s)}const i=hr(this.size,this.rect.height),r=ea(this.rect.x,this.rect.y,i);return dr(t,e,r)}}function hr(o,t){const e=typeof o=="number"?o:t??Zc,i=0,r=oe,n=Math.min(e-r*2-re,Qc),s=typeof o=="number"?o:n+i*2;return{height:e,width:s,paddingX:i,paddingY:r,iconSize:n}}function ea(o,t,e){return{x:o+e.paddingX,y:t+e.paddingY,width:e.width-e.paddingX*2,height:e.height-e.paddingY*2}}function dr(o,t,e){return o>=e.x&&o<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}const le="transparent",ia=0;class Fn extends Ft{constructor(t,e=le){super(t),this.color=le,this.borderColor=le,this.borderWidth=ia,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:r,width:n,height:s}=this.rect;if(this.color!==le&&t.fillRect(i,r,n,s,this.color),this.borderWidth>0&&this.borderColor!==le){const c=this.borderWidth/2;t.strokeRect(i+c,r+c,n-this.borderWidth,s-this.borderWidth,this.borderColor,this.borderWidth)}}}const bn="|",oa=2,ra=1e4,$i=new Map,Ui=new Map;function Sn(o,t,e){o.size>=ra&&o.clear(),o.set(t,e)}function na(o,t){return`${o}${bn}${t}`}function sa({text:o,font:t,maxWidth:e,textOverflow:i,ellipsis:r,forceEllipsis:n}){return[t,o,e.toFixed(oa),i,r,n?"force":"normal"].join(bn)}function Xi(o,t,e){const i=na(e,t);let r=$i.get(i);return r===void 0&&(o.font=e,r=o.measureText(t).width,Sn($i,i,r)),r}function ca(o){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(o),({segment:i})=>i)}return Array.from(o)}function aa(o,t,e,i,r){const n=Xi(o,r,e);if(n>i)return{text:"",didTruncate:!0,width:0};const s=ca(t);let c=0,a=s.length,h=r,u=n;for(;c<=a;){const l=Math.floor((c+a)/2),d=`${s.slice(0,l).join("")}${r}`,f=Xi(o,d,e);f<=i?(h=d,u=f,c=l+1):a=l-1}return{text:h,didTruncate:!0,width:u}}function Vi(o){const{ctx:t,text:e,font:i,maxWidth:r,textOverflow:n,ellipsis:s,forceEllipsis:c=!1}=o,a=Math.max(0,r);if(a<=0||e.length===0&&!(c&&n==="ellipsis"))return{text:"",didTruncate:e.length>0,width:0};const h=sa({text:e,font:i,maxWidth:a,textOverflow:n,ellipsis:s,forceEllipsis:c}),u=Ui.get(h);if(u)return u;const l=Xi(t,e,i);let d;return l<=a&&!c?d={text:e,didTruncate:!1,width:l}:n==="clip"?d={text:e,didTruncate:!0,width:l}:d=aa(t,e,i,a,s),Sn(Ui,h,d),d}function fr({ctx:o,lines:t,font:e,maxWidth:i,maxLines:r,textOverflow:n,ellipsis:s}){const c=Math.max(0,Math.floor(r)),a=Math.min(t.length,c),h=t.slice(0,a),u=t.length>a;if(n==="ellipsis"&&h.length>0){const l=h.length-1,d=h[l]??"";h[l]=Vi({ctx:o,text:d,font:e,maxWidth:i,textOverflow:n,ellipsis:s,forceEllipsis:u}).text}return{lines:h,didClamp:u}}function la(){$i.clear(),Ui.clear()}const ua="14px sans-serif",ha="black",da=1,fa=14,ga="visible",Ca="clip",va="…",ma=/(\d*\.?\d+)px/,pt="|",pa=30,ya=`${pt}precise-wrap`,Fa=1e4,ba=5e3,Sa=/[\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F\u200D\uFE0E\uFE0F\u2600-\u27BF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/,Yi=new Map,qi=new Map,Ki=new Map;let Ti=null;function xa(){return Ti===null&&typeof document<"u"&&(Ti=document.createElement("canvas").getContext("2d")),Ti}function xn(o,t,e,i){o.size>=i&&o.clear(),o.set(t,e)}function wa(o,t,e,i){return`${o}${pt}${t}${pt}${e??""}${pt}${i??""}`}function Aa(o,t){return`${o}${pt}${t}`}function Ea(o,t,e){return`${o}${pt}${t}${pt}${e}`}function wn(o,t,e,i){return`${o}${pt}${t}${pt}${e}${pt}${i}`}class yo extends Mt{constructor(t,e,i){super(t),this.font=ua,this.color=ha,this.wordWrap=!1,this.lineHeight=da,this.overflow=ga,this.textOverflow=Ca,this.ellipsis=va,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:r,lineHeight:n,rect:s,fontSize:c}=this,{lineHeightPx:a}=gr(e,n,c,this.lineHeightPx);this.isSingleLineClampEnabled()?this.measureSingleLineClamp(t,e,i,a,s):r?this.measureWordWrap(t,e,i,a,s):this.measureSingleLine(t,e,i,a,s)}measureWordWrap(t,e,i,r,n){const s=Cr(this.style.width,n.width);if(s>0){const c=this.getResolvedMaxLines(),h=!(this.overflow==="hidden"&&c!==void 0&&c>1&&Da(i)),u=wn(e,i,s,h);(u!==this.cachedLinesKey||this.cachedLines===null)&&(this.cachedLines=Ta(t,i,e,s,h),this.cachedLinesKey=u),n.width=s;const l=c!==void 0&&this.overflow==="hidden"?Math.min(this.cachedLines.length,c):this.cachedLines.length;n.height=l*r}else n.width=Ne(t,i,e),n.height=r,this.cachedLines=null}measureSingleLineClamp(t,e,i,r,n){const s=Cr(this.style.width,n.width);s>0?(n.width=s,n.height=r):(n.width=Ne(t,i,e),n.height=r),this.cachedLines=null}measureSingleLine(t,e,i,r,n){const s=Ea(e,i,r);s!==this.lastMeasureKey&&(this.lastMeasureKey=s,n.width=Ne(t,i,e),n.height=r),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 r=this.text;if(e&&typeof e.text=="function"?r=e.text(this.text):e&&typeof e.text=="string"&&(r=e.text),r===null||r==="")return;if(!e)return r;const{enabled:n,text:s,...c}=e;return{...c,text:r}}computeIsTruncated(){if(this.overflow!=="hidden"||this.textOverflow!=="ellipsis")return!1;const t=xa();if(!t)return!1;const e=this.cachedLines;if(e!==null&&e.length>0){const i=this.getResolvedMaxLines();return i===void 0?!1:fr({ctx:t,lines:e,font:this.font,maxWidth:this.rect.width,maxLines:i,textOverflow:this.textOverflow,ellipsis:this.ellipsis}).didClamp}return Vi({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:r,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,r,i,s,n)}paintMultiline(t,e,i,r,n,s){const{lineHeightPx:c}=gr(i,this.lineHeight,this.fontSize,this.lineHeightPx),a=this.getResolvedMaxLines(),h=this.isMultilineClampEnabled()&&a!==void 0?fr({ctx:e,lines:n,font:i,maxWidth:s.width,maxLines:a,textOverflow:this.textOverflow,ellipsis:this.ellipsis}).lines:n,u=h.length*c;let l=s.y+Math.max(0,(s.height-u)*.5);this.lastPaintedTextWidth=0;for(let d=0,f=h.length;d<f;d+=1){const g=h[d];if(g!==void 0){const C=l+c/2;this.overflow==="hidden"?t.fillTextClipped(g,s.x,C,i,r,s,"middle","left"):t.fillText(g,s.x,C,i,r,"middle"),l+=c}}}paintSingleLine(t,e,i,r,n,s){const c=s.y+s.height*.5;if(this.overflow==="hidden"){const a=Vi({ctx:e,text:i,font:r,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,r,n,s,"middle","left");return}this.lastPaintedTextWidth=Ne(e,i,r),t.fillText(i,s.x,c,r,n,"middle")}}function gr(o,t,e,i){const r=wa(o,t,e,i);let n=Yi.get(r);if(n===void 0){const s=ma.exec(o),c=e??(s&&s[1]!==void 0?Number(s[1]):fa);n={fontSize:c,lineHeightPx:i??c*t},Yi.set(r,n)}return n}function Ne(o,t,e){const i=Aa(e,t);let r=qi.get(i);return r===void 0&&(o.font=e,r=o.measureText(t).width,xn(qi,i,r,Fa)),r}function Ta(o,t,e,i,r){o.font=e;const n=Math.max(i,pa),s=wn(e,t,n,r);let c=Ki.get(s);if(!c){const a=r?e:`${e}${ya}`;c=Ia(Qs.split(o,t,a,n,r)),xn(Ki,s,c,ba)}return c}function Cr(o,t){return typeof o=="number"&&o>0?o:t>0?t:0}function Da(o){return Sa.test(o)}function Ia(o){if(Array.isArray(o))return o;const t=o;return t.lines&&Array.isArray(t.lines)?t.lines:[]}function Ha(){Yi.clear(),qi.clear(),Ki.clear(),la()}const de={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},vr=16,ue=16,An=90,mr="rgba(8, 8, 8, 0.08)",La=4e3,Pa=1920,Ba="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% )",_a="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 pr=null;const Ra={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 En extends Ft{constructor(t,e){super(t),this._gradientStops=null,this._gradientAngle=An;const i=(e==null?void 0:e.customGradientColor)??(e!=null&&e.lighter?_a:Ba),r=Oa(i);r&&(this._gradientStops=r.stops,this._gradientAngle=r.angle),this.borderRadius=ka(e==null?void 0:e.roundness),this.animated=(e==null?void 0:e.animated)??!0,this.shimmerDuration=(e==null?void 0:e.shimmerDuration)??La}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:r,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,r,n,s,a,{fillStyle:mr}):t.fillRect(i,r,n,s,mr);return}const h=t.getAnimationContext(),u=h==null?void 0:h.frameTime;if(!this.animated||u===void 0){t.linearGradientRect(i,r,n,s,a,c,this._gradientAngle);return}pr??(pr=u);const d=(u-pr)%this.shimmerDuration/this.shimmerDuration;t.custom(g=>{g.save(),g.beginPath(),a>0?g.roundRect(i,r,n,s,a):g.rect(i,r,n,s),g.clip();const{startX:C,startY:v,endX:F,endY:p}=Na(i,r,s,d),y=g.createLinearGradient(C,v,F,p);for(const b of c)y.addColorStop(b.offset,b.color);g.fillStyle=y,g.fillRect(i,r,n,s),g.restore()}),(f=h==null?void 0:h.requestAnimationFrame)==null||f.call(h)}}function yr(o){return o in de}function ka(o){if(o===void 0)return de[vr]*ue;if(typeof o=="number")return yr(o)?de[o]*ue:o;const t=o.trim(),e=Number(t);if(!Number.isNaN(e))return yr(e)?de[e]*ue:e;const i=t.match(/^(-?\d+(?:\.\d+)?)px$/i);if(i){const[,n]=i;return parseFloat(n)}const r=t.match(/^(-?\d+(?:\.\d+)?)rem$/i);if(r){const[,n]=r;return parseFloat(n)*ue}return de[vr]*ue}function Ma(o){var i;const t=o.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 za(o,t){switch(t.toLowerCase()){case"rad":return o*180/Math.PI;case"turn":return o*360;case"grad":return o*180/200;default:return o}}function Oa(o){const e=Ma(o).match(/^linear-gradient\s*\(([\s\S]+)\)$/i);if(!(e!=null&&e[1]))return null;const i=[];let r="",n=0;for(const d of e[1])d==="("&&n++,d===")"&&n--,d===","&&n===0?(i.push(r.trim()),r=""):r+=d;r.trim()&&i.push(r.trim());const[s]=i;if(i.length<2||!s)return null;let c=An,a=0;const h=s.match(/^(-?\d+(?:\.\d+)?)(deg|rad|turn|grad)?$/i);if(h!=null&&h[1]){const[,d,f="deg"]=h;c=za(parseFloat(d),f),a=1}else if(s.startsWith("to ")){const d=s.substring(3).trim().toLowerCase(),f=Ra[d];f!==void 0&&(c=f,a=1)}const u=[],l=i.slice(a);for(let d=0;d<l.length;d++){const f=l[d];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,F]=g,p=F==="%"?parseFloat(v)/100:l.length>1?d/(l.length-1):0;u.push({offset:Math.max(0,Math.min(1,p)),color:C})}return u.length<2?null:{stops:u,angle:c}}function Na(o,t,e,i){const r=Pa,n=i*r,s=o-r+n,c=o+r+n,a=t+e/2;return{startX:s,startY:a,endX:c,endY:a}}function Wa(o,t){const e=o.replace("#","");let i,r,n,s=255;e.length===3||e.length===4?(i=parseInt(e[0]+e[0],16),r=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),r=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=h=>h.toString(16).padStart(2,"0");return`#${a(i)}${a(r)}${a(n)}${a(c)}`}function Ga(o){return{default:{color:o.textPrimary,colorHover:o.textPrimaryHover,colorActive:o.textPrimaryActive},accent:{color:o.textAccent,colorHover:o.textAccentHover,colorActive:o.textAccentActive},secondary:{color:o.textSecondary,colorHover:o.textSecondaryHover,colorActive:o.textSecondaryActive},tertiary:{color:o.textTertiary,colorHover:o.textTertiaryHover,colorActive:o.textTertiaryActive},paragraph:{color:o.textParagraph,colorHover:o.textParagraphHover,colorActive:o.textParagraphActive},positive:{color:o.textPositive,colorHover:o.textPositiveHover,colorActive:o.textPositiveActive},warning:{color:o.textWarning,colorHover:o.textWarningHover,colorActive:o.textWarningActive},negative:{color:o.textNegative,colorHover:o.textNegativeHover,colorActive:o.textNegativeActive},clear:{color:o.textPrimary,colorHover:o.textPrimaryHover,colorActive:o.textPrimaryActive}}}const $a="default",Di="pointer",Ua=.4,Xa=2,Va=1;class Tn extends yo{constructor(t,e,i){var r;super(t,e,i),this.view=$a,this.disabled=!1,this.isHovered=!1,this.isActive=!1,this.hasCustomColor=!1,super.style={...super.style,cursor:Di},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,(r=i.theme)!=null&&r.tokens&&(this.viewColors=Ga(i.theme.tokens))),!this.hasCustomColor&&this.viewColors&&(this.color=this.viewColors[this.view].color)}set style(t){super.style={...super.style,cursor:Di,...t}}get style(){const t=super.style;return t.cursor=this.disabled?"not-allowed":Di,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=Wa(t,Ua)),t}onPaint(t,e){const i=this.color;this.color=this.resolveColor(),super.onPaint(t,e);const{view:r,isHovered:n,wordWrap:s}=this,a=!s&&(r==="default"||r==="clear"||!this.disabled&&n),h=this.getLastPaintedTextWidth();a&&h>0&&this.paintUnderline(t,h),this.color=i}paintUnderline(t,e){const{x:i,y:r,height:n}=this.rect,s=r+n+Xa,c=this.resolveColor();t.custom(a=>{a.beginPath(),a.moveTo(i,s),a.lineTo(i+e,s),a.strokeStyle=c,a.lineWidth=Va,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 fe=0;const Ke=new Set;function Ya(){fe++,fe===1&&Ke.forEach(t=>t(!0));let o=!1;return()=>{o||(o=!0,fe--,fe===0&&Ke.forEach(t=>t(!1)))}}function qa(){return fe>0}function Ka(o){return Ke.add(o),()=>{Ke.delete(o)}}const Ze="basic-grid-canvas-portal-hover",Za=400;let ja=0;const Ii="__canvasPortalTargetId";function Ja(o){var i;if(!o)return"window";const t=o;if((i=t.dataset)!=null&&i.portalTargetId)return t.dataset.portalTargetId;const e=o;return e[Ii]||(e[Ii]=++ja),String(e[Ii])}const ie=new Map;function Qa(o,t){return`${o??"default"}:${t??"default"}`}function Zi(o,t){const e=new CustomEvent(Ze,{detail:o});t?t.dispatchEvent(e):window.dispatchEvent(e)}function Fr(o){const t=ie.get(o);t!==void 0&&(window.clearTimeout(t),ie.delete(o))}function tl(o){const t=`${o}:`;for(const[e,i]of ie.entries())e.startsWith(t)&&(window.clearTimeout(i),ie.delete(e))}function el(o,t,e){const i=window.setTimeout(()=>{ie.delete(o),Zi(t,e)},Za);ie.set(o,i)}function jt(o,t,e){if(typeof window>"u")return;const i=Ja(t),r=`${i}:${Qa(o.source,o.originId)}`;o.visible?(tl(i),Zi(o,t)):e?(Fr(r),Zi(o,t)):(Fr(r),el(r,o,t))}function il(o,t){if(typeof window>"u")return()=>{};const e=t??window,i=r=>{const n=r;n.detail&&o(n.detail)};return e.addEventListener(Ze,i),()=>{e.removeEventListener(Ze,i)}}const ol="cell";class yt{constructor(t,e){this.bounds=null,this.batcher=new oi,this.portalEventTarget=null,this.tooltipContext=void 0,this.rootNode=t,this.hoverController=new oo({onCursorChange:i=>{var r;return(r=this.onCursorChange)==null?void 0:r.call(this,i)},portalHoverDispatch:jt,getPortalEventTarget:()=>this.portalEventTarget,portalSource:ol,getTooltipContext:()=>this.tooltipContext})}setPortalEventTarget(t){this.portalEventTarget=t}setTooltipContext(t){this.tooltipContext=t}setRootNode(t){this.rootNode=t}setOriginId(t){}render(t,e,i,r,n){this.bounds={...r??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,r){var u;if(!this.bounds)return{propagationStopped:!1,suppressGridDefault:!1};const n=this.rootNode.hitTest(e,i),s=(u=n.find(l=>l.interaction!==void 0))==null?void 0:u.interaction;let c=!1,a=!1;const h={type:t,x:e,y:i,originalEvent:r??{},target:n[0],stopPropagation:()=>{c=!0},preventDefault:()=>{a=!0,r==null||r.preventDefault()}};return n.length===0?(t==="mousemove"&&this.hoverController.handlePointerMove([],null),{propagationStopped:!1,suppressGridDefault:a,...s?{interaction:s}:{}}):(this.dispatchEventToNodes(n,h,t),t==="mousemove"&&this.hoverController.handlePointerMove(n,h),{propagationStopped:c,suppressGridDefault:a,...s?{interaction:s}:{}})}getInteractionAtPoint(t,e){var i;if(this.bounds)return(i=this.rootNode.hitTest(t,e).find(r=>r.interaction))==null?void 0:i.interaction}dispatchEventToNodes(t,e,i){let r=!1;const n={...e,stopPropagation:()=>{r=!0,e.stopPropagation()}};for(const s of t){if(r)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 ci="canvas-cell";function Dn(o,t,e,i){return{kind:P.GridCellKind.Custom,allowOverlay:!1,readonly:!0,copyData:e??"",data:{kind:ci,render:o,onClick:t},...i}}function Fo(o){var e;const t=o;return!!(t&&t.kind===P.GridCellKind.Custom&&((e=t.data)==null?void 0:e.kind)===ci)}const ge=5,In=[["hoverX","hoverY"],["mouseX","mouseY"],["pointerX","pointerY"],["posX","posY"],["x","y"]],Hn="default",Ln="pointer";function Pn(o,t){for(const[e,i]of In){const r=o[e],n=o[i];if(typeof r=="number"&&typeof n=="number"&&!Number.isNaN(r)&&!Number.isNaN(n)){if(Bn(r,n,t))return{x:r-t.x,y:n-t.y};if(_n(r,n,t))return{x:r,y:n}}}}function Bn(o,t,e){return o>=e.x&&o<=e.x+e.width&&t>=e.y&&t<=e.y+e.height}function _n(o,t,e){return o>=-ge&&o<=e.width+ge&&t>=-ge&&t<=e.height+ge}function Rn(o,t,e){if((o==null?void 0:o.canvasRoot)instanceof yt){const i=e?"nativeEvent"in e?e.nativeEvent:e:void 0;return o.canvasRoot.dispatchPointerEvent("click",t.x,t.y,i)}return{propagationStopped:!1,suppressGridDefault:!1}}function kn(o,t){if(o!=null&&o.clickHandlers&&Array.isArray(o.clickHandlers)){for(const{area:e,handler:i}of o.clickHandlers)if(mo(t.x,t.y,e))return i(),!0}return!1}function Mn(o,t,e,i,r,n){const{onClick:s}=o.data;return s?!!s(t.x,t.y,e,i,r,n??void 0):!1}const ji=new WeakMap,zn=new Map;function On(o,t,e){const i={...e??{}};return delete i.hoveredAreas,zn.set(o,i),t.data.renderData=i,i}function ee(o,t){return t.data.renderData??zn.get(o)}function Nn(o,t){var i,r;(((i=ji.get(o))==null?void 0:i.hovered)??!1)!==t&&(ji.set(o,{hovered:t}),t?(r=o.onMouseEnter)==null||r.call(o):rl(o))}function rl(o){const{renderData:t}=o;(t==null?void 0:t.canvasRoot)instanceof yt&&t.canvasRoot.forcePortalHide()}function Wn(o){var t;return(t=ji.get(o))==null?void 0:t.hovered}function Gn(o,t,e,i){var r;if(o instanceof yt)if(t){if(e.event){const s="nativeEvent"in e.event?e.event.nativeEvent:e.event;o.dispatchPointerEvent("mousemove",t.x,t.y,s)}const n=o.computeCursor(t.x,t.y);n&&n!==Hn&&((r=i.overrideCursor)==null||r.call(i,n))}else o.handleMouseLeave(),o.forcePortalHide()}function $n(o,t,e,i,r){var a;const n=!!(t&&e.some(h=>mo(t.x,t.y,h))),s=Wn(o)??!1,c=!!t;c!==s&&Nn(o,c),n&&!i&&((a=r.overrideCursor)==null||a.call(r,Ln))}function bo({cell:o,rect:t,relativePoint:e,renderData:i,rowData:r,rowIndex:n,event:s}){const c=Rn(i,e,s);return c.propagationStopped?{handled:!0,propagationStopped:!0,suppressGridDefault:c.suppressGridDefault}:kn(i,e)?{handled:!0,propagationStopped:!1,suppressGridDefault:c.suppressGridDefault}:Mn(o,e,t,r,n,i)?{handled:!0,propagationStopped:!1,suppressGridDefault:c.suppressGridDefault}:{handled:!1,propagationStopped:!1,suppressGridDefault:c.suppressGridDefault}}function Un(o){const t=o.selection==="keep",e=o.cellClick==="stop",i=o.editor==="never",r=o.contextMenu==="keep-selection"?"manual-keep-selection":o.contextMenu==="none"?"none":"normal";return{suppressEarlyGridSelect:t,suppressExternalCellClick:e,suppressGridDefaultFor:{pointerdown:t,click:i,contextmenu:r!=="normal"},contextMenuMode:r,...o.editor==="open-on-click"?{editorRequest:{target:"self"}}:{}}}function nl({decision:o,propagationStopped:t,suppressGridDefault:e}){const i=o.suppressGridDefaultFor.click||e,r={suppressExternalCellClick:o.suppressExternalCellClick||t,suppressGridDefaultForClick:i};return!i&&o.editorRequest&&(r.editorRequest=o.editorRequest),r}function Xn({renderData:o,relativePoint:t}){const e=(o==null?void 0:o.canvasRoot)instanceof yt?o.canvasRoot.getInteractionAtPoint(t.x,t.y):void 0;return e?{handled:!0,suppressEarlyGridSelect:Un(e).suppressEarlyGridSelect,interaction:e}:{handled:!1,suppressEarlyGridSelect:!1}}function So(o={}){return{kind:P.GridCellKind.Custom,isMatch:t=>{var e;return((e=t.data)==null?void 0:e.kind)===ci},needsHover:!0,needsHoverPosition:!0,onSelect:t=>{var d;const e=t.cell,i=t.bounds,r=Oi(t);if(!r)return;const n=Ni(r,i),s=Ue(t),c=te(s,i),a=ee(c,e),h=Xn({renderData:a,relativePoint:n}),u=t.location??[s.colIndex,s.rowIndex],l=h.interaction&&o.beginOrGetInteractionSession?o.beginOrGetInteractionSession({cell:u,relativePoint:n,interaction:h.interaction,source:"pointer",...t.button!==void 0?{button:t.button}:{}}):void 0;(l!=null&&l.decision.suppressEarlyGridSelect||h.suppressEarlyGridSelect)&&((d=t.preventDefault)==null||d.call(t))},onClick:t=>{var d,f;const e=t.cell,i=t.bounds,r=Oi(t);if(!r)return;const n=Ni(r,i),s=Ue(t),c=te(s,i),a=ee(c,e),h=t.location??[s.colIndex,s.rowIndex],l=((d=o.consumeCanvasClickResult)==null?void 0:d.call(o,{cell:h,relativePoint:n,...t.button!==void 0?{button:t.button}:{}}))??bo({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:r,theme:n}=t,{render:s}=e.data,c=t.cellFillColor!==void 0?{...n,bgCell:t.cellFillColor}:n,a=Ue(t),h=te(a,r),u={hoverX:t.hoverX,hoverY:t.hoverY,row:t.row,rowData:t.rowData,event:t.event,frameTime:t.frameTime,requestAnimationFrame:t.requestAnimationFrame},l=rn(t.hoverX,t.hoverY,r)??Pn(u,r);i.save();const d=ee(h,e),f=s(i,r,c,l==null?void 0:l.x,l==null?void 0:l.y,{...u,canvasRoot:d==null?void 0:d.canvasRoot}),g=(f==null?void 0:f.hoveredAreas)??[];On(h,e,f);const C=(f==null?void 0:f.canvasRoot)??(d==null?void 0:d.canvasRoot);Gn(C,l,u,t),$n(e.data,l,g,C,t),i.restore()},onPaste:()=>{}}}const sl=So(),je=new Map;function Vn(o){const t=cl(o),e=je.get(t);if(e)return e;const r=tc.renderToString(o).match(/<svg[\s\S]*?<\/svg>/);if(!r)return console.warn("Could not extract SVG from React icon component:",o.type),"";const n=r[0];return je.set(t,n),n}function cl(o){const t=o.type,e=typeof t=="function"||typeof t=="object"?t.displayName||t.name||"Anonymous":String(t),{size:i,color:r,className:n}=o.props||{},s=JSON.stringify({size:i,color:r,className:n});return`${e}:${s}`}function wt(o){return m.isValidElement(o)}function mt(o){return typeof o=="string"?o:wt(o)?Vn(o):""}function al(){je.clear()}function ll(){return je.size}const Ji=o=>{if(o===void 0)return;if(typeof o=="number")return o;const t=o.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 r=Number(t);if(!Number.isNaN(r))return r},br={small:{radius:4,stroke:1.5},medium:{radius:4,stroke:1.5},big:{radius:6,stroke:2}};function ul(o,t,e,i,r,n,s,c,a,h,u=!1,l=!1){const f=s-0,C=Math.min(f-0,ro),v=n==="auto"?C:n,F=e+0,p=(a==null?void 0:a.rowSize)||"medium",y=!i&&!r,b=zt(l,{x:t,y:e,width:v,height:s}),w=xc(a,i,r,b,u),x=t+v*.5,T=F+f*.5,E=x-C*.5,D=T-C*.5;return o.roundedRect(t,F,v,f,br[p].radius,{fillStyle:w.bgColor,strokeStyle:w.borderColor,lineWidth:y?br[p].stroke:void 0}),ft(o,c,E,D,C,w.iconColor),{x:t,y:F,width:v,height:f}}const hl=28,dl="default",fl="s",Sr="pointer",gl=20,Qi={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>'},Cl=Object.values(Qi),vl={accentColor:"#1e88e5",accentFg:"#ffffff"};class ml extends Ft{constructor(t,e,i=!1,r=!1,n){super(t),this.view=dl,this.buttonSize=fl,this.isHovered=!1,this.useNewApi=!1,this.icon=e,this.checked=i,this.indeterminate=r,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":Sr},!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=Sr),t}measure(t){if(this.useNewApi){const e=ct[this.buttonSize];this.rect.height=e.height,this.rect.width=e.height}else{const e=pl(this.size);this.rect.height=e.height,this.rect.width=e.width}}onPaint(t,e){const{x:i,y:r,width:n,height:s}=this.rect;ul(t,i,r,this.checked,this.indeterminate,n,s,this.icon,this.theme??vl,this.view,this.disabled,this.isHovered)}onMouseEnter(){this.isHovered=!0}onMouseLeave(){this.isHovered=!1}}function pl(o,t){const e=typeof o=="number"?o:hl,i=0,r=oe,n=Math.min(e-r*2-re,gl),s=typeof o=="number"?o:n+i*2;return{height:e,width:s,paddingX:i,paddingY:r,iconSize:n}}const yl=({backgroundColor:o,__backgroundColorResolver:t},e)=>(t==null?void 0:t(e))??o,vt=o=>{const t=e=>null;return t.__canvasType=o,t},Fl=m.memo(({cellId:o,renderContent:t,nodeRegistry:e,onRegistryChange:i})=>{const r=t(),n=m.useRef(null);return m.useLayoutEffect(()=>{const s=e.current,c=n.current;c&&c!==o&&s.delete(c);const a=s.get(o),h=a!==void 0;s.set(o,r),h&&a!==r&&(i==null||i()),n.current=o},[o,r,e,i]),m.useLayoutEffect(()=>()=>{const s=e.current;n.current&&(s.delete(n.current),n.current=null)},[e]),null}),bl=vt("Skeleton"),Sl=vt("Container"),xl=vt("Text"),wl=vt("Icon"),Al=vt("Button"),El=vt("IconButton"),Tl=vt("EmbedIconButton"),Dl=vt("Rect"),Il=vt("Badge"),Hl=vt("Checkbox"),Ll=vt("Link"),Ce={Container:Sl,Text:xl,Icon:wl,Button:Al,IconButton:El,EmbedIconButton:Tl,Checkbox:Hl,Rect:Dl,Badge:Il,Skeleton:bl,Link:Ll,icon:mt};function dt(o,t){if(o)return function(e){o.call(this,e)}}function Je({element:o,idPrefix:t="root",theme:e}){const i=[],r=Yn(o,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)=>{ln(s,{size:c})})}return r}function to(o){return o==null?"":typeof o=="string"||typeof o=="number"?String(o):Array.isArray(o)?o.map(to).join(""):""}function xr(o,t,e){const i=o.fontMetrics,r=o.fonts;if(i===void 0||r===void 0)return{};const n=t??o.baseFontStyle,s=Object.keys(r).find(a=>r[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 Yn(o,t,e,i,r){if(!o||!m.isValidElement(o))throw new Error("Invalid element. Use Canvas.* components.");const n=o.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=o.props,h=(o.key!=null?String(o.key):null)??e,u=c.id??`${t}-${s.toLowerCase()}-${h}`,l=g=>wt(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}=ct[g];i.push({icon:l(c.icon),size:C})}else if(s==="EmbedIconButton"&&c.icon){const g=c.buttonSize??"s",C=c.overrideIconSize??ct[g].iconSize;i.push({icon:l(c.icon),size:C})}else if(s==="Checkbox")Cl.forEach(g=>{i.push({icon:l(g),size:20})});else if(s==="Button"){const g=c.size??"s",{iconSize:C}=ct[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 d=Pl(s,u,c,r);if(c.portalHoverEnabled&&(d.portalHoverEnabled=!0),c.tooltip!==void 0&&(d.tooltip=c.tooltip),c.autoTooltip!==void 0){const g=c.autoTooltip;(g===!0||typeof g=="object"&&g!==null&&g.enabled!==!1)&&(d.portalHoverEnabled=!0)}c.interaction!==void 0&&(d.interaction=Ur(c.interaction)),typeof c.zIndex=="number"&&(d.zIndex=c.zIndex),c.style&&(d.style=c.style);const{children:f}=c;return f&&d instanceof Ct&&m.Children.toArray(f).forEach((C,v)=>{if(m.isValidElement(C)){const F=Yn(C,u,v,i,r);d.addChild(F)}}),d}function Pl(o,t,e,i){switch(o){case"Container":{const r=e,{id:n,gap:s,columnGap:c,rowGap:a,position:h,left:u,top:l,right:d,bottom:f,zIndex:g,onClick:C,onMouseEnter:v,onMouseLeave:F,onMouseDown:p,backgroundColor:y,__backgroundColorResolver:b,portalHoverEnabled:w,...x}=r,T={...x,columnGap:c??s??0,rowGap:a??s??0},E=new Ct(t,T,yl(r,i));h&&(E.position=h),u!==void 0&&(E.left=u),l!==void 0&&(E.top=l),d!==void 0&&(E.right=d),f!==void 0&&(E.bottom=f);const D=dt(C),_=dt(v),G=dt(F),O=dt(p);return D&&(E.onClick=D),_&&(E.onMouseEnter=_),G&&(E.onMouseLeave=G),O&&(E.onMouseDown=O),E}case"Text":{const{children:r,font:n,color:s,wordWrap:c,lineHeight:a,overflow:h,textOverflow:u,ellipsis:l,maxLines:d,autoTooltip:f,position:g,left:C,top:v,right:F,bottom:p,portalHoverEnabled:y}=e,b=to(r),w=i.fontFamily||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';let x;n?x=/["']|sans-serif|serif|monospace/i.test(n)?n:`${n} ${w}`:x=i.baseFontStyle?`${i.baseFontStyle} ${w}`:`13px ${w}`;const T=xr(i,n,a),E=new yo(t,b,{font:x,...T,color:s,wordWrap:c,lineHeight:a,overflow:h,textOverflow:u,ellipsis:l,maxLines:d,autoTooltip:f});return g&&(E.position=g),C!==void 0&&(E.left=C),v!==void 0&&(E.top=v),F!==void 0&&(E.right=F),p!==void 0&&(E.bottom=p),E}case"Icon":{const{icon:r,size:n,color:s,backgroundColor:c,position:a,left:h,top:u,right:l,bottom:d,onClick:f,onMouseEnter:g,onMouseLeave:C,onMouseDown:v}=e,F=wt(r)?mt(r):r,p=new pn(t,F,{size:n,color:s});c&&(p.backgroundColor=c),a&&(p.position=a),h!==void 0&&(p.left=h),u!==void 0&&(p.top=u),l!==void 0&&(p.right=l),d!==void 0&&(p.bottom=d);const y=dt(f),b=dt(g),w=dt(C),x=dt(v);return y&&(p.onClick=y),b&&(p.onMouseEnter=b),w&&(p.onMouseLeave=w),x&&(p.onMouseDown=x),p}case"Button":{const{children:r,variant:n,view:s,size:c,leftIcon:a,rightIcon:h,disabled:u,position:l,left:d,top:f,right:g,bottom:C,onClick:v}=e,F=typeof r=="string"?r:"",p=wt(a)?mt(a):a,y=wt(h)?mt(h):h,b=new mn(t,F,{variant:n,view:s,size:c,leftIcon:p,rightIcon:y,disabled:u,theme:i});if(l&&(b.position=l),d!==void 0&&(b.left=d),f!==void 0&&(b.top=f),g!==void 0&&(b.right=g),C!==void 0&&(b.bottom=C),!u){const w=dt(v);w&&(b.onClick=w)}return b}case"EmbedIconButton":case"IconButton":{const{icon:r,size:n,variant:s,view:c,buttonSize:a,overrideSquareSize:h,overrideIconSize:u,disabled:l,position:d,left:f,top:g,right:C,bottom:v,onClick:F}=e,p=wt(r)?mt(r):r,y=o==="IconButton"?yn:Gi,b=new y(t,p,{size:n,variant:s,view:c,buttonSize:a,overrideSquareSize:h,overrideIconSize:u,disabled:l});if(b instanceof Gi){const{iconColor:w,iconColorHovered:x,overrideWidth:T}=e;T!==void 0&&(b.overrideWidth=T),w!==void 0&&(b.iconColor=w),x!==void 0&&(b.iconColorHovered=x)}if(d&&(b.position=d),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 w=dt(F);w&&(b.onClick=w)}return b}case"Checkbox":{const{checked:r,indeterminate:n,size:s="auto",theme:c,view:a,buttonSize:h,disabled:u,position:l,left:d,top:f,right:g,bottom:C,onClick:v}=e,F=mt(r?Qi.checkedIcon:Qi.indeterminateIcon),p=new ml(t,F,r,n,{size:s,theme:c??i,view:a,buttonSize:h,disabled:u});if(l&&(p.position=l),d!==void 0&&(p.left=d),f!==void 0&&(p.top=f),g!==void 0&&(p.right=g),C!==void 0&&(p.bottom=C),!u){const y=dt(v);y&&(p.onClick=y)}return p}case"Rect":{const{color:r,borderColor:n,borderWidth:s,position:c,left:a,top:h,right:u,bottom:l}=e,d=new Fn(t,r);return n&&(d.borderColor=n),s&&(d.borderWidth=s),c&&(d.position=c),a!==void 0&&(d.left=a),h!==void 0&&(d.top=h),u!==void 0&&(d.right=u),l!==void 0&&(d.bottom=l),d}case"Badge":{const{text:r,view:n,size:s,transparent:c,clear:a,leftIcon:h,rightIcon:u,customColor:l,customBackgroundColor:d,position:f,left:g,top:C,right:v,bottom:F,portalHoverEnabled:p,pilled:y}=e,b=wt(h)?mt(h):h,w=wt(u)?mt(u):u,x=new vn(t,r,{view:n,size:s,transparent:c,clear:a,leftIcon:b,rightIcon:w,pilled:y,customColor:l,customBackgroundColor:d,theme:i});return f&&(x.position=f),g!==void 0&&(x.left=g),C!==void 0&&(x.top=C),v!==void 0&&(x.right=v),F!==void 0&&(x.bottom=F),x}case"Skeleton":{const{width:r,height:n,roundness:s,lighter:c,customGradientColor:a,animated:h,shimmerDuration:u,style:l,portalHoverEnabled:d}=e,f=Ji(r),g=Ji(n),C={...l,...f!==void 0?{width:f}:null,...g!==void 0?{height:g}:null},v=new En(t,{roundness:s,lighter:c,customGradientColor:a,shimmerDuration:u,animated:h});return v.style=C,v}case"Link":{const{children:r,href:n,target:s,view:c,disabled:a,font:h,color:u,wordWrap:l,lineHeight:d,overflow:f,textOverflow:g,ellipsis:C,maxLines:v,position:F,left:p,top:y,right:b,bottom:w,onClick:x,portalHoverEnabled:T}=e,E=to(r),D=i.fontFamily||'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';let _;h?_=/["']|sans-serif|serif|monospace/i.test(h)?h:`${h} ${D}`:_=i.baseFontStyle?`${i.baseFontStyle} ${D}`:`13px ${D}`;const G=xr(i,h,d),O=new Tn(t,E,{font:_,...G,color:u,wordWrap:l,lineHeight:d,overflow:f,textOverflow:g,ellipsis:C,maxLines:v,href:n,target:s,view:c,disabled:a,theme:i});if(F&&(O.position=F),p!==void 0&&(O.left=p),y!==void 0&&(O.top=y),b!==void 0&&(O.right=b),w!==void 0&&(O.bottom=w),!a){const Z=dt(x);Z&&O.setOnClick(Z)}return O}default:throw new Error(`Unknown canvas component type: ${o}`)}}const Bl='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',_l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Rl=30,kl=50,Ml=3;async function qn(){return typeof document>"u"||!document.fonts?Promise.resolve():document.fonts.ready.then(()=>{})}function Kn(o={}){const{testFont:t=Bl,testText:e=_l,maxChecks:i=Rl,checkInterval:r=kl,stableThreshold:n=Ml}=o;return new Promise(s=>{if(typeof document>"u"){s();return}const a=document.createElement("canvas").getContext("2d");if(!a){s();return}let h=-1,u=0,l=0;const d=()=>{a.font=t;const{width:f}=a.measureText(e);f!==h?(h=f,u=0):u+=1,l+=1,u>=n||l>=i?s():setTimeout(d,r)};d()})}function Zn(o){return qn().then(()=>Kn(o))}function xo({dataEditorRef:o,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i}){const r=o.current;if(!r)return;const n=Math.min(30,t),s=e,c=[];for(let a=0-i;a<n;a+=1)for(let h=0;h<s;h+=1)c.push({cell:[h,a]});c.length>0&&r.updateCells(c)}function wo(o){let t=null;return()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,o()}))}}function zl(){const o=m.useRef(null),t=m.useCallback(()=>(o.current||(o.current=new Vr),o.current),[]);return{registry:t(),getRegistry:t}}function jn({dataEditorRef:o,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i}){m.useLayoutEffect(()=>{const r=wo(()=>{Ha(),xo({dataEditorRef:o,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i})});Zn().then(r)},[o,t,e,i])}function Jn({dataEditorRef:o,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i}){m.useEffect(()=>{const r=wo(()=>{xo({dataEditorRef:o,rowCount:t,columnCount:e,headerAndGroupHeaderRowsCount:i})});return cn(r)},[o,t,e,i])}P.GridCellKind.Text;const Qe=(o,t)=>({kind:P.GridCellKind.Text,data:o,displayData:o,allowOverlay:!0,readonly:!0,...t}),Jt=o=>{const{data:t,...e}=o??{};return{kind:P.GridCellKind.Text,data:"",displayData:"",allowOverlay:!0,readonly:!0,...e}};function Qn(o){const t=o;return!!(t!=null&&t.kind)}function Ol(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)}function Ao(o){return typeof o!="object"&&!Array.isArray(o)||o===null}function ts(o){return o==null||typeof o=="boolean"}const ai=o=>{if(!o||!m.isValidElement(o))return!1;const t=o.type;return!!(t!=null&&t.__canvasType)},Eo=o=>typeof o=="string",eo=o=>Eo(o)?!0:ai(o),Nl=o=>Eo(o)?!0:ai(o),wr=({jsxElement:o,canvasCellCache:t,cellInfo:e,options:i})=>{let r=null;if(Qn(o))return{...o,...i};if(Ao(o))return ts(o)?Jt(i):Qe(String(o),i);if(!ai(o)){const F="передан НЕ CanvasEl";return Qe(F,{...i,data:F})}const{colInd:n,rowInd:s,row:c,column:a}=e,{id:h}=a,u=i.getPortalEventTarget;let l=null;const d=`cell-${n}-${s}`,f=(F,p,y,b,w,x)=>{let T=(x==null?void 0:x.canvasRoot)instanceof yt?x.canvasRoot:l;{if(!o)return{};const _=Je({element:o,idPrefix:`cell-${n}-${s}-${h}`,theme:y});T?(T.setRootNode(_),T.setOriginId(d)):T=new yt(_,d),l=T}if(!T)return{};const E=b!==void 0&&w!==void 0?{x:b,y:w}:void 0;T.rootNode.style={width:p.width,height:p.height},r||(r=F.canvas.getBoundingClientRect());const D={x:r.left+p.x,y:r.top+p.y,width:p.width,height:p.height};return T.setPortalEventTarget((u==null?void 0:u())??null),T.setTooltipContext({column:e.column,row:e.row,ctxs:e.ctxs,refTable:i.refTable}),T.render(F,p,E,D,{frameTime:x==null?void 0:x.frameTime,requestAnimationFrame:x==null?void 0:x.requestAnimationFrame}),l=T,{canvasRoot:T}},{data:g,...C}=i,v=a.copyData?typeof a.copyData=="function"?a.copyData(c):a.copyData:g;return Dn(f,void 0,v,C)},To=(o,t,e)=>o?t>=o.x&&t<o.x+o.width&&e>=o.y&&e<o.y+o.height:!1,Wl=o=>{const t=o.findIndex(e=>!e.isServiceColumn);return t===-1?o.length:t},Gl=(o,t)=>{if(!o)return;const e=Math.max(o.x,t),i=Math.max(0,o.x+o.width-e);if(!(i<=0||o.height<=0))return{x:e,y:o.y,width:i,height:o.height}};function $l({cellsSelectionMode:o,selection:t,baseTheme:e,serviceColumnsCount:i,activeDataRange:r,outlineRange:n,checkboxSelectedRowIndexes:s,errorCellRanges:c,highlightRegionsExternal:a}){return m.useMemo(()=>{const h=[...a??[]],u=t.current,l=()=>{if(c!=null&&c.length)for(const v of c)h.push({color:e.errorOutlineColor,range:v,style:"solid-outline"})};if(!u||o==="disabled")return l(),h.length>0?h:void 0;const[,d]=u.cell,g=(s==null?void 0:s.has(d))??!1?e.selectionActiveCheckboxBg:e.selectionActiveBg,C=e.selectionServiceActiveBg;return r&&i>0&&h.push({color:C,range:{x:0,y:r.y,width:i,height:r.height},style:"no-outline"}),r&&o==="cell"&&r.width===1&&r.height===1&&h.push({color:g,range:r,style:"no-outline"}),n&&h.push({color:e.accentColor,range:n,style:"solid-outline"}),l(),h.length>0?h:void 0},[o,t,e.selectionActiveBg,e.selectionActiveCheckboxBg,e.selectionServiceActiveBg,e.errorOutlineColor,e.accentColor,i,r,n,s,c,a])}function Ul({baseRegions:o,selectedColumnIndexes:t,headerSelectedRowIndexes:e,activeRow:i,activeRange:r,selectionRangeStack:n,checkboxAvailableRowIndexes:s,totalRows:c,firstDataCol:a,columnsCount:h,theme:u}){return m.useMemo(()=>{const l=t.length>0,d=e.length>0,f=i!==void 0,g=((n==null?void 0:n.length)??0)>0;if(!l&&!d&&!f&&!g)return o;const C=h-a,v=[...o??[]],F=(p,y)=>{const[b,...w]=[...p].sort((D,_)=>D-_);if(b===void 0)return;let x=b,T=b;const E=(D,_)=>{v.push({color:u.accentColor,range:y(D,_),style:"solid-outline"})};for(const D of w)D===T+1||(E(x,T),x=D),T=D;E(x,T)};if(l){a>0&&v.push({color:u.selectionServiceActiveBg,range:{x:0,y:0,width:a,height:c},style:"no-outline"});for(const p of t)v.push({color:u.selectionActiveBg,range:{x:p,y:0,width:1,height:c},style:"no-outline"});F(t,(p,y)=>({x:p,y:0,width:y-p+1,height:c}))}if(d&&C>0){if(a>0)for(const p of e)v.push({color:u.selectionServiceActiveBg,range:{x:0,y:p,width:a,height:1},style:"no-outline"});for(const p of e)v.push({color:u.selectionActiveBg,range:{x:a,y:p,width:C,height:1},style:"no-outline"});F(e,(p,y)=>({x:a,y:p,width:C,height:y-p+1}))}if(i!==void 0&&C>0){const p=s!=null&&s.has(i)?u.selectionActiveCheckboxBg:u.selectionCheckboxBg,y=(w,x)=>{x>0&&v.push({color:p,range:{x:w,y:i,width:x,height:1},style:"no-outline"})};if(!(r&&i>=r.y&&i<r.y+r.height))y(a,C);else{const w=Math.max(r.x,a),x=r.x+r.width;y(a,w-a),y(x,h-x)}}if(g&&n&&a>0){const p=new Set;for(const y of n){const b=Math.max(y.x,a);if(!(y.x+y.width-b<=0||y.height<=0))for(let x=y.y;x<y.y+y.height;x+=1)p.add(x)}for(const y of p)v.push({color:u.selectionServiceActiveBg,range:{x:0,y,width:a,height:1},style:"no-outline"})}return v},[o,t,e,i,r,n,s,c,a,h,u.selectionActiveBg,u.selectionActiveCheckboxBg,u.selectionCheckboxBg,u.selectionServiceActiveBg,u.accentColor])}function es({theme:o,cellsSelectionMode:t,selection:e,serviceColumnsCount:i,activeDataRange:r,outlineRange:n,checkboxSelectedRowIndexes:s,errorCellRanges:c,highlightRegionsExternal:a,selectedColumnIndexes:h,headerSelectedRowIndexes:u,activeRow:l,checkboxVisibleRowIndexes:d,totalRows:f,columnsCount:g,isRowHoverEnabled:C,hoverRow:v,dataRowsCount:F}){var b,w;const p=$l({cellsSelectionMode:t,selection:e,baseTheme:o,serviceColumnsCount:i,activeDataRange:r,outlineRange:n,checkboxSelectedRowIndexes:s,errorCellRanges:c,highlightRegionsExternal:a}),y=Ul({baseRegions:p,selectedColumnIndexes:h,headerSelectedRowIndexes:u,activeRow:l,activeRange:(b=e.current)==null?void 0:b.range,selectionRangeStack:(w=e.current)==null?void 0:w.rangeStack,checkboxAvailableRowIndexes:d,totalRows:f,firstDataCol:i,columnsCount:g,theme:o});return m.useMemo(()=>!C||v===void 0||v>F-1||i===0?y:[{color:o.bgServiceRowHovered,range:{x:0,y:v,width:i,height:1},style:"no-outline"},...y??[]],[y,i,C,v,F,o.bgServiceRowHovered])}const We={columns:P.CompactSelection.empty(),rows:P.CompactSelection.empty(),current:void 0};function is({cellsSelectionMode:o,gridSelection:t,onGridSelectionChange:e,onSelectionEmit:i}){const[r,n]=m.useState(We),s=t!==void 0,c=t??r,a=m.useCallback(l=>{s?e==null||e(l):n(l),i==null||i(l)},[s,e,i]),h=m.useCallback(()=>{s?e==null||e(We):n(We),i==null||i(We)},[s,e,i]),u=m.useMemo(()=>o==="range-cell"?"rect":o==="multi-range-cell"?"multi-rect":o==="disabled"?"none":"cell",[o]);return{selection:c,handleGridSelectionChange:a,handleSelectionCleared:h,rangeSelect:u}}const Kt=new Set,Ar=({start:o,length:t})=>{const e=new Set;for(let i=0;i<t;i+=1)e.add(o+i);return e};function os({columns:o,selection:t,cellsSelectionMode:e,checkboxSelectedRowIndexes:i}){return m.useMemo(()=>{const r=t.current,n=Wl(o);if(!(e!=="disabled"&&r!==void 0)||!r)return{hasAnyActiveSelection:!1,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:Kt,activeColumns:Kt,activeDataRange:void 0,isSingleCellCustomHighlight:!1,outlineRange:void 0,isServiceColumn:d=>{var f;return!!((f=o[d])!=null&&f.isServiceColumn)},isActiveRow:d=>!1,isCheckboxSelectedRow:d=>(i==null?void 0:i.has(d))??!1,isActiveDataCell:(d,f)=>!1,isActiveHeaderColumn:d=>!1};const c=Gl(r.range,n),a=c!==void 0,h=e==="cell"&&c!==void 0&&c.width===1&&c.height===1;if(!a)return{hasAnyActiveSelection:!1,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:Kt,activeColumns:Kt,activeDataRange:void 0,isSingleCellCustomHighlight:!1,outlineRange:void 0,isServiceColumn:d=>{var f;return!!((f=o[d])!=null&&f.isServiceColumn)},isActiveRow:d=>!1,isCheckboxSelectedRow:d=>(i==null?void 0:i.has(d))??!1,isActiveDataCell:(d,f)=>!1,isActiveHeaderColumn:d=>!1};const u=c!=null&&c.height&&c.height>0?Ar({start:c.y,length:c.height}):Kt,l=c!=null&&c.width&&c.width>0?Ar({start:c.x,length:c.width}):Kt;return{hasAnyActiveSelection:a,firstDataColumnIndex:n,leadingServiceColumnsCount:n,activeRows:u,activeColumns:l,activeDataRange:c,isSingleCellCustomHighlight:h,outlineRange:h?c:void 0,isServiceColumn:d=>{var f;return!!((f=o[d])!=null&&f.isServiceColumn)},isActiveRow:d=>u.has(d),isCheckboxSelectedRow:d=>(i==null?void 0:i.has(d))??!1,isActiveDataCell:(d,f)=>To(c,d,f),isActiveHeaderColumn:d=>o[d]?l.has(d):!1}},[o,e,i,t])}function Xl({highlightActiveRow:o,onHighlightActiveRowChange:t,isHighlightActiveRowControlled:e}){const[i,r]=m.useState(void 0),n=e??t!==void 0,s=n?o:i,c=m.useCallback(a=>{n||r(a),t==null||t(a)},[n,t]);return{activeRow:s,commitActiveRow:c}}function Vl({columns:o}){const[t,e]=m.useState(()=>P.CompactSelection.empty()),i=m.useMemo(()=>t.toArray().filter(h=>{var u;return!((u=o[h])!=null&&u.isServiceColumn)}),[t,o]),r=m.useMemo(()=>new Set(i),[i]),n=m.useRef(void 0),[s,c]=m.useState(!1),a=m.useCallback(()=>{e(P.CompactSelection.empty())},[]);return{selectedColumns:t,setSelectedColumns:e,selectedColumnIndexes:i,selectedColumnSet:r,lastSelectedColumnRef:n,isNativeColumnSelection:s,setIsNativeColumnSelection:c,clearColumnSelection:a}}function Yl(){const[o,t]=m.useState(()=>P.CompactSelection.empty()),e=m.useMemo(()=>o.toArray(),[o]),i=m.useRef(o);i.current=o;const r=m.useRef(!1),n=m.useRef(P.CompactSelection.empty()),s=m.useRef(!1);m.useEffect(()=>{const a=u=>{r.current=u.ctrlKey||u.metaKey,n.current=i.current,s.current=!0},h=()=>{s.current=!1};return window.addEventListener("pointerdown",a,!0),window.addEventListener("pointerup",h,!0),()=>{window.removeEventListener("pointerdown",a,!0),window.removeEventListener("pointerup",h,!0)}},[]);const c=m.useCallback(()=>{t(P.CompactSelection.empty())},[]);return{selectedRows:o,setSelectedRows:t,headerSelectedRowIndexes:e,selectedRowsRef:i,ctrlGestureRef:r,ctrlBaseRowsRef:n,pointerGestureRef:s,clearRowSelection:c}}function rs({columns:o,selection:t,cellsSelectionMode:e,highlightActiveType:i,enableColumnSelection:r,enableRowSelection:n,enableSelectAll:s,leadingServiceColumnsCount:c,dataRowCount:a,handleGridSelectionChange:h,handleSelectionCleared:u,onSelectionEmit:l,highlightActiveRow:d,onHighlightActiveRowChange:f,isHighlightActiveRowControlled:g}){const{selectedColumns:C,setSelectedColumns:v,selectedColumnIndexes:F,selectedColumnSet:p,lastSelectedColumnRef:y,isNativeColumnSelection:b,setIsNativeColumnSelection:w}=Vl({columns:o}),{setSelectedRows:x,headerSelectedRowIndexes:T,ctrlGestureRef:E,ctrlBaseRowsRef:D,pointerGestureRef:_}=Yl(),{activeRow:G,commitActiveRow:O}=Xl({highlightActiveRow:d,onHighlightActiveRowChange:f,isHighlightActiveRowControlled:g}),Z=m.useMemo(()=>o.findIndex(M=>M.isServiceColumn&&M.id==="row-markers"),[o]),Dt=m.useCallback(M=>{const{current:N}=M;if(!N)return M;const U=c,{range:K}=N;if(K.x>=U)return M;const $=K.x+K.width-U;return $<=0?{current:void 0,rows:P.CompactSelection.empty(),columns:P.CompactSelection.empty()}:{...M,current:{...N,cell:[Math.max(N.cell[0],U),N.cell[1]],range:{...K,x:U,width:$}}}},[c]),ne=m.useCallback(M=>{const N=M.current;if(n&&Z>=0&&N&&N.cell[0]===Z){const K=c,$=N.range.y,J=$+Math.max(N.range.height,1);if(E.current){const Q=J-$<=1;let et=D.current;if(et.length===0&&t.current&&t.current.cell[0]===Z){const bt=t.current.range;et=P.CompactSelection.empty().add([bt.y,bt.y+Math.max(bt.height,1)]),D.current=et}let rt;Q?rt=et.hasIndex($)?et.remove($):et.add($):rt=et.add([$,J]),v(P.CompactSelection.empty()),x(rt),O(void 0),w(!1),h({...M,current:{...N,range:{x:K,y:N.range.y,width:0,height:N.range.height}}}),l==null||l({current:void 0,rows:rt,columns:P.CompactSelection.empty()});return}const V=Math.max(o.length-K,0);v(P.CompactSelection.empty()),x(P.CompactSelection.empty()),O(void 0),w(!1),h({...M,current:{...N,range:{x:K,y:N.range.y,width:V,height:N.range.height}}});return}const U=Dt(M);(U.current!==void 0||U.rows.length>0)&&(v(P.CompactSelection.empty()),x(P.CompactSelection.empty())),w(!1),i==="row"?_.current&&U.current&&O(U.current.cell[1]):O(void 0),h(U)},[o,t,h,Dt,Z,n,c,i,l,O,E,D,_,v,x,w]),li=m.useCallback(()=>{v(P.CompactSelection.empty()),x(P.CompactSelection.empty()),O(void 0),w(!1),u()},[u,O,v,x,w]),Ot=m.useRef([]),Pt=m.useMemo(()=>{var K;const M=new Set(F);if(b&&t.current){const{x:$,width:J}=t.current.range;for(let V=$;V<$+J;V+=1)(K=o[V])!=null&&K.isServiceColumn||M.add(V)}const N=Array.from(M).sort(($,J)=>$-J).map($=>{var J;return(J=o[$])==null?void 0:J.id}).filter($=>!!$),U=Ot.current;return U.length===N.length&&U.every(($,J)=>$===N[J])?U:(Ot.current=N,N)},[F,b,t,o]),ui=(e==="range-cell"||e==="multi-range-cell")&&!b&&!(t.current!==void 0&&t.current.cell[0]<c),me=m.useCallback((M,N)=>{if(s&&Z>=0&&M===Z&&e!=="disabled"){const Q=c,et=Math.max(o.length-Q,0);if(et===0||a===0)return;v(P.CompactSelection.empty()),x(P.CompactSelection.empty()),O(void 0),w(!0),h({current:{cell:[Q,0],range:{x:Q,y:0,width:et,height:a},rangeStack:[]},rows:P.CompactSelection.empty(),columns:P.CompactSelection.empty()});return}if(!r)return;const U=o[M];if(!U||U.isServiceColumn)return;const K=N.shiftKey;if(N.ctrlKey||N.metaKey){let Q=C;if(Q.length===0&&b&&t.current){const rt=t.current.range;Q=Q.add([rt.x,rt.x+rt.width])}const et=Q.hasIndex(M)?Q.remove(M):Q.add(M);y.current=M,v(et),x(P.CompactSelection.empty()),O(void 0),w(!1),h({current:void 0,rows:P.CompactSelection.empty(),columns:P.CompactSelection.empty()}),l==null||l({current:void 0,rows:P.CompactSelection.empty(),columns:et});return}let J,V;K&&y.current!==void 0?(J=Math.min(y.current,M),V=Math.max(y.current,M)):(J=M,V=M,y.current=M),v(P.CompactSelection.empty()),x(P.CompactSelection.empty()),O(void 0),w(!0),h({current:{cell:[J,0],range:{x:J,y:0,width:V-J+1,height:a},rangeStack:[]},rows:P.CompactSelection.empty(),columns:P.CompactSelection.empty()})},[r,s,Z,e,c,o,t,b,C,a,h,l,O,y,v,x,w]),Nt=m.useCallback(M=>{const N=new Set(M),U=o.map((Q,et)=>!Q.isServiceColumn&&N.has(Q.id)?et:-1).filter(Q=>Q>=0);if(x(P.CompactSelection.empty()),O(void 0),U.length===0){v(P.CompactSelection.empty()),w(!1),h({current:void 0,rows:P.CompactSelection.empty(),columns:P.CompactSelection.empty()});return}const K=U[0],$=U[U.length-1];if(K===void 0||$===void 0)return;const J=$-K===U.length-1;if(y.current=$,J){v(P.CompactSelection.empty()),w(!0),h({current:{cell:[K,0],range:{x:K,y:0,width:$-K+1,height:a},rangeStack:[]},rows:P.CompactSelection.empty(),columns:P.CompactSelection.empty()});return}let V=P.CompactSelection.empty();U.forEach(Q=>{V=V.add(Q)}),v(V),w(!1),h({current:void 0,rows:P.CompactSelection.empty(),columns:P.CompactSelection.empty()})},[o,a,h,v,x,w,O,y]);return{selectedColumnIndexes:F,selectedColumnKeysAll:Pt,selectColumnsByKeys:Nt,selectedColumnSet:p,headerSelectedRowIndexes:T,activeRow:G,numberingColumnIndex:Z,drawFocusRing:ui,selectColumnFromHeader:me,handleGridSelectionWithColumnReset:ne,handleSelectionClearedWithColumns:li}}function ql(o,t,e,i){const r=performance.now();function n(s){const c=s-r,a=Math.min(c/i,1),h=t+(e-t)*a;o(Math.round(h)),a<1&&requestAnimationFrame(n)}requestAnimationFrame(n)}const Kl=o=>{const t=typeof o=="number",[e,i]=m.useState(()=>t?o:56);return m.useEffect(()=>{t&&ql(i,e,o,300)},[o]),t?e:o};function Zl({columns:o,rows:t,freezeColumns:e,selectedRange:i}){const[r,n]=m.useState(null),s=m.useRef(r);s.current=r;const c=m.useRef(null),a=m.useRef(0),h=m.useMemo(()=>o.some(C=>!C.isServiceColumn&&C.isErrorCell),[o]),u=m.useRef({cols:0,rows:0,freeze:0});u.current={cols:o.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:F,freeze:p}=u.current,y=Math.max(C.width,1),b=Math.max(C.height,1),w=s.current;if(w){const _=w.x+w.width,G=w.y+w.height,O=w.x>0&&C.x-w.x<y/2,Z=w.y>0&&C.y-w.y<b/2,Dt=_<v&&_-(C.x+C.width)<y/2,ne=G<F&&G-(C.y+C.height)<b/2;if(!O&&!Z&&!Dt&&!ne)return}const x=p>0?0:Math.max(0,C.x-y),T=Math.max(0,C.y-b),E=Math.min(v,C.x+C.width+y),D=Math.min(F,C.y+C.height+b);n({x,y:T,width:E-x,height:D-T})}))},[]);m.useEffect(()=>()=>{a.current&&cancelAnimationFrame(a.current)},[]),m.useEffect(()=>{h&&l()},[h,l]);const d=m.useCallback(C=>{c.current=C,l()},[l]),f=m.useMemo(()=>{const C=[];if(!h)return C;const v=r??{x:0,y:0,width:Math.min(o.length,60),height:Math.min(t.length,300)},F=Math.max(0,v.x),p=Math.min(o.length,v.x+v.width),y=Math.max(0,v.y),b=Math.min(t.length,v.y+v.height);for(let w=F;w<p;w+=1){const x=o[w],{isErrorCell:T}=x??{};if(!(!x||x.isServiceColumn||!T))for(let E=y;E<b;E+=1){const D=t[E];D!==void 0&&T(D)&&C.push({x:w,y:E,width:1,height:1})}}return C},[o,t,r,h]);return{errorCellRanges:m.useMemo(()=>!i||f.length===0?f:f.filter(C=>!To(i,C.x,C.y)),[f,i]),trackVisibleRegion:d}}function ns({cell:o,glideCell:t,rect:e,renderData:i,relativePoint:r,mouseArgs:n}){const s=(i==null?void 0:i.canvasRoot)instanceof yt?i.canvasRoot.getInteractionAtPoint(r.x,r.y):void 0;if(s)return{cell:o,glideCell:t,rect:e,renderData:i,relativePoint:r,interaction:s,...n?{mouseArgs:n}:{}}}function jl({dataEditor:o,getCellContent:t,clientX:e,clientY:i,nativeEvent:r}){const n=o==null?void 0:o.getMouseArgsForPosition(e,i,r);if(!n||n.kind!=="cell")return;const s=[n.location[0],n.location[1]],c=t(s);if(!Fo(c))return;const a=n.bounds,h=te({colIndex:s[0],rowIndex:s[1]},a),u=ee(h,c),l={x:n.localEventX,y:n.localEventY};return ns({cell:s,mouseArgs:n,glideCell:c,rect:a,renderData:u,relativePoint:l})}function Jl({eventTarget:o,dataEditorRef:t,getCellContent:e,interactionSessionStore:i,onCellContextMenuExternal:r}){m.useEffect(()=>{if(!o)return;const n=s=>{var g;if(!(s instanceof MouseEvent))return;const c=s;if(c.clientX===0&&c.clientY===0)return;const a=jl({dataEditor:t.current,getCellContent:e,clientX:c.clientX,clientY:c.clientY,nativeEvent:c});if(!a)return;const{cell:h,interaction:u,mouseArgs:l,relativePoint:d}=a,f=i.beginOrGet({cell:h,relativePoint:d,interaction:u,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||!r||r(h,{...l,preventDefault:()=>{c.cancelable&&c.preventDefault()}})}};return o.addEventListener("contextmenu",n,!0),()=>{o.removeEventListener("contextmenu",n,!0)}},[t,o,e,i,r])}const Ql=250;function tu(o){return m.useCallback((t,e)=>{const i=o.consumeEditorRequest(t,Ql);return!i||i.target!=="self"?e:{...e,activationBehaviorOverride:"single-click"}},[o])}const Ve=350;function Er(o){return Math.round(o)}function eu({cell:o,relativePoint:t,button:e}){return[o[0],o[1],e??"unknown",Er(t.x),Er(t.y)].join(":")}function ti(o,t){return o[0]===t[0]&&o[1]===t[1]}function ss(o,t){return Math.abs(o.x-t.x)<=1&&Math.abs(o.y-t.y)<=1}function iu(o,t){return!ti(o.cell,t.cell)||o.button!==void 0&&t.button!==void 0&&o.button!==t.button?!1:ss(o.relativePoint,t.relativePoint)}function ou(o,t){return Date.now()-o.startedAt>(t.maxAgeMs??Ve)||!ti(o.cell,t.cell)||o.button!==void 0&&t.button!==void 0&&o.button!==t.button?!1:ss(o.relativePoint,t.relativePoint)}function ru(){let o,t=1;const e=i=>{if(!(!o||!ou(o,i)))return o};return{beginOrGet:i=>{const r=e(i);return r||(o={id:t++,key:eu(i),cell:i.cell,relativePoint:i.relativePoint,interaction:i.interaction,decision:Un(i.interaction),consumedPhases:new Set,startedAt:i.startedAt??Date.now(),source:i.source,...i.button!==void 0?{button:i.button}:{}},o)},findMatching:e,getCurrent:()=>o,storeClickResult:(i,r)=>{i.clickResult=r},consumeClickResult:i=>{const r=o;if(!(r!=null&&r.clickResult))return;if(!iu(r,i)){delete r.clickResult;return}const n=r.clickResult;return delete r.clickResult,r.consumedPhases.add("renderer-click"),n},consumePhase:(i,r)=>i.consumedPhases.has(r)?!1:(i.consumedPhases.add(r),!0),armEditorRequest:(i,r)=>{var n;(n=i.editorRequest)!=null&&n.consumed||(i.editorRequest={target:r.target,armedAt:Date.now()})},consumeEditorRequest:(i,r=Ve)=>{const n=o;if(!n)return;const s=n.editorRequest;if(!(s!=null&&s.consumed)&&s){if(Date.now()-s.armedAt>r){o=void 0;return}if(ti(n.cell,i))return s.consumed=!0,n.consumedPhases.add("editor-activation"),s}},isMatchingRecent:(i,r,n=Ve)=>{const s=o;return!s||!s.consumedPhases.has(i)?!1:Date.now()-s.startedAt<=n&&ti(s.cell,r)},clearStale:(i=Ve)=>{o&&Date.now()-o.startedAt>i&&(o=void 0)},clear:()=>{o=void 0}}}function nu(){const o=m.useMemo(()=>ru(),[]),t=m.useCallback(i=>o.beginOrGet(i),[o]),e=m.useCallback(i=>o.consumeClickResult(i),[o]);return{interactionSessionStore:o,beginOrGetInteractionSession:t,consumeCanvasClickResult:e}}function su(o={}){const t=m.useMemo(()=>!0,[]);return m.useMemo(()=>{const e=[];return t&&e.push(So({beginOrGetInteractionSession:o.beginOrGetInteractionSession,consumeCanvasClickResult:o.consumeCanvasClickResult})),e.length>0?e:void 0},[t,o.beginOrGetInteractionSession,o.consumeCanvasClickResult])}const Hi={glideScroller:"dvn-scroller",glideTable:"gdg-table",glideUnderlay:"dvn-underlay"};function cs(o){const t=(o==null?void 0:o.querySelector(`.${Hi.glideTable}`))??null,e=(t==null?void 0:t.querySelector(`.${Hi.glideScroller}`))??null,i=(t==null?void 0:t.querySelector(`.${Hi.glideUnderlay}`))??null;return{container:t,scroller:e,underlay:i}}const Tr="[useGlideElements]";function cu(o,t){const[e,i]=m.useState(null),[r,n]=m.useState(null),[s,c]=m.useState(null),a=m.useRef(null);m.useEffect(()=>{const u=o==null?void 0:o.current;if(Qt.tableDebug(Tr,"useEffect fired",{hasWrapper:!!u,fullScreened:t}),!u)return;const l=()=>{const{container:f,scroller:g,underlay:C}=cs(u);return Qt.tableDebug(Tr,"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},d=requestAnimationFrame(()=>{if(l())return;const f=new MutationObserver(()=>{l()});f.observe(u,{childList:!0,subtree:!0}),a.current=f});return()=>{cancelAnimationFrame(d),a.current&&(a.current.disconnect(),a.current=null),i(null),n(null),c(null)}},[o,t]);const h=m.useCallback(u=>e?Ge.createPortal(u,e):null,[e]);return{glideContainer:e,glideScroller:r,glideUnderlay:s,isReady:!!e,renderInContainer:h}}function au({isRowHoverEnabled:o,dataEditorRef:t,columnsCount:e,rowsCount:i}){const r=m.useRef(null),n=m.useCallback((...u)=>{var g;const l=t.current;if(!l)return;const d=new Set;u.forEach(C=>{typeof C=="number"&&C>=0&&C<i&&d.add(C)});const f=[];d.forEach(C=>{for(let v=0;v<e;v+=1)f.push({cell:[v,C]})}),f.length>0&&((g=l.updateCells)==null||g.call(l,f))},[t,e,i]),s=m.useCallback(u=>{const l=r.current;(l==null?void 0:l.colInd)===(u==null?void 0:u.colInd)&&(l==null?void 0:l.rowInd)===(u==null?void 0:u.rowInd)||(r.current=u,n(l==null?void 0:l.rowInd,u==null?void 0:u.rowInd))},[n]),[c,a]=m.useState(void 0),h=m.useCallback(u=>{a(l=>l===u?l:u)},[]);return{hoveredCellRef:r,setHoveredCell:s,hoverRow:c,onHoverRowChange:o?h:void 0}}function lu(o){const t=document.createElement("div");t.style.cssText="position:fixed;left:0;top:0;width:0;height:0;pointer-events:none;visibility:hidden",o.appendChild(t);const e=t.getBoundingClientRect();return o.removeChild(t),{x:e.left,y:e.top}}function uu(o,t){m.useEffect(()=>{if(!t)return;const e=o.current;if(!e)return;const i=Qt.throttleWithLastCall(()=>{const{x:r,y:n}=lu(e);e.style.setProperty("--gdg-portal-offset-x",`${r}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)}},[o,t])}function hu(o,t){const{columnsLast:e,rows:i,ctxs:r,refTable:n,theme:s,portalEventTargetRef:c,externalOnItemHovered:a,onHoverRowChange:h}=o,u=m.useRef(null),l=m.useCallback(g=>{const C=u.current;u.current=null,jt({visible:!1,x:0,y:0,width:0,height:0,source:"cell",originId:C??void 0,nodeId:C??void 0},g,!0)},[]),d=m.useCallback(g=>{var p,y,b,w,x;a==null||a(g),h==null||h(g.kind==="cell"?((p=g.rawLocation)==null?void 0:p[1])??g.location[1]:void 0);const C=(c==null?void 0:c.current)??null,v=(y=g.location)==null?void 0:y[0],F=v!=null?e[v]:void 0;if((g.kind==="header"||g.kind==="group-header")&&g.hiddenIndicatorCol!=null){const T=g.hiddenIndicatorCol;u.current===Re.HEADER_TOOLTIP_HIDDEN_COLS_ID||l(C);const D=e.length,_=Math.min(T,D-1),G=(b=t.current)==null?void 0:b.getBounds(_,-1);if(!G)return;const O=T>=D?G.x+G.width:G.x,Z=g.hiddenIndicatorAboveLeaf??0;u.current=Re.HEADER_TOOLTIP_HIDDEN_COLS_ID,jt({visible:!0,x:O-2,y:G.y-Z,width:4,height:G.height+Z,source:"header",originId:Re.HEADER_TOOLTIP_HIDDEN_COLS_ID,nodeId:Re.HEADER_TOOLTIP_HIDDEN_COLS_ID,priority:1},C);return}if(g.kind==="header"){if(!(F!=null&&F.headerCellTooltip)){l(C);return}const T=`header-tooltip-${v}`;u.current===T||l(C);const D=(w=t.current)==null?void 0:w.getBounds(v,-1);if(!D)return;u.current=T,jt({visible:!0,x:D.x,y:D.y,width:D.width,height:D.height,source:"header",originId:T,nodeId:T,priority:0,tooltipContext:{column:F,ctxs:r,refTable:n,colInd:v,theme:s}},C);return}if(g.kind==="cell"){const T=g.location[1],E=i[T];if(!F||!E||!F.cellTooltip){l(C);return}const D=`col-tooltip-${v}-${T}`;u.current===D||l(C);const G=(x=t.current)==null?void 0:x.getBounds(v,T);if(!G)return;u.current=D,jt({visible:!0,x:G.x,y:G.y,width:G.width,height:G.height,source:"cell",originId:D,nodeId:D,priority:0,tooltipContext:{column:F,row:E,ctxs:r,refTable:n,colInd:v,rowInd:T,theme:s}},C);return}l(C)},[e,i,r,n,s,c,a,h,l,t]),f=m.useCallback(()=>{l((c==null?void 0:c.current)??null)},[l,c]);return{onItemHovered:d,hideTooltip:f}}function du({enabled:o,portalEventTargetRef:t,headerHeight:e,groupHeaderHeight:i,experimental:r}){const[n,s]=m.useState(0),c=m.useRef(null),a=m.useMemo(()=>{const d=e??Ye;let f=typeof d=="number"?d:Ye;return Array.isArray(i)?f+=i.reduce((g,C)=>g+C,0):typeof i=="number"&&(f+=i),f},[e,i]),h=m.useRef(a);h.current=a;const u=m.useCallback(d=>{var F;if((F=c.current)==null||F.call(c),c.current=null,!d)return;if(!o){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 p=g.scrollTop,y=Math.min(p,h.current);s(-1*y),C.style.overflowY="visible",C.style.transform=`translateY(-${y}px)`};g.addEventListener("scroll",v),c.current=()=>{g.removeEventListener("scroll",v),C.style.transform="",C.style.overflowY=""}},[o,t]),l=m.useMemo(()=>o?{...r,paddingBottom:n}:r,[o,n,r]);return{unstickyCallbackRef:u,mergedExperimental:l}}const Li=Hr.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));}"]),fu=Hr(P).withConfig({displayName:"styled__StyledGlideDataEditor"})([""]),Do={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"},gu={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"},Cu={...Do,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"},vu={...Do},mu={light:Do,dark:vu,highContrastLight:gu,betaCoreLight:Cu},pu=(o="light")=>mu[o],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:"#D4E7F2",dark:"#D4E7F2",highContrastLight:"#B9D6E7",betaCoreLight:"#D4E7F2"}},yu=o=>({tokens:pu(o),fonts:qe,fontMetrics:_r,bgEditableCell:gt.bgEditableCell[o],bgEditableCellHovered:gt.bgEditableCellHovered[o],selectionCheckboxBg:gt.selectionCheckboxBg[o],selectionActiveBg:gt.selectionActiveBg[o],selectionActiveCheckboxBg:gt.selectionActiveCheckboxBg[o],selectionServiceBg:gt.selectionServiceBg[o],selectionServiceActiveBg:gt.selectionServiceActiveBg[o],errorOutlineColor:gt.errorOutlineColor[o],bgRowHovered:gt.bgRowHovered[o],bgServiceRowHovered:gt.bgServiceRowHovered[o],bgSelectedRowHovered:gt.bgSelectedRowHovered[o]}),at={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"}},Fu=o=>({accentColor:at.accentColor[o],accentLight:at.accentLight[o],textDark:at.textDark[o],textHeader:at.textHeader[o],textHeaderSelected:at.textHeaderSelected[o],textGroupHeader:at.textGroupHeader[o],bgCell:at.bgCell[o],bgHeader:at.bgHeader[o],bgHeaderHasFocus:at.bgHeaderHasFocus[o],bgHeaderHovered:at.bgHeaderHovered[o],borderColor:at.borderColor[o],bgGroupHeader:at.bgGroupHeader[o],bgGroupHeaderHovered:at.bgGroupHeaderHovered[o],hiddenColumnsIndicatorColor:at.accentColor[o]}),Dr={small:"bodyXXS",medium:"bodyS",big:"bodyM"},bu=(o="big")=>{const t=qe[Dr[o]],e=_r[Dr[o]],i=`${e.fontSize}px`,r=e.lineHeightPx,n=Pr[o],{cellHorizontalPadding:s,cellVerticalPadding:c}=n;return{headerFontStyle:qe.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:r,cellHorizontalPadding:s,cellVerticalPadding:c,activeSizes:n}},Io=(o="big",t="light")=>({...Fu(t),...bu(o),...yu(t),rowSize:o}),Su=Io(),as=(o,t,e,i)=>{let r=o;for(let s=o;s>=0;s-=1){const c=e(s,t);if(c&&c[0]<=o&&c[1]>=o){r=c[0];break}}const n=i(r,t);return[r,n?n[0]:t]},Pi=(o,t)=>{if(o==null)return null;const e=typeof o=="number"?o:o(t);return e<=0?null:[t.colInd,t.colInd+e]},Ir=(o,t)=>o==null?null:o(t);function xu(...o){}const wu={},Bi=o=>Array.isArray(o)?o.filter(t=>typeof t=="string"):typeof o=="string"?[o]:[],Au=({columns:o,rows:t,bottomSummaryRows:e,rowHeight:i,width:r,rowSize:n="medium",ctxs:s=wu,freezeColumns:c,onColumnResize:a,renderGroupHeader:h,groupAlignMap:u,refTable:l,onColumnsReorder:d,portalEventTargetRef:f,onItemHovered:g,unstickyHeader:C,resizableColumn:v=!0,minColumnWidth:F=56,maxColumnWidth:p,maxColumnAutoWidth:y,containerRef:b,containerClassName:w,containerStyle:x,renderOverlayFeatures:T,hideGrid:E,contentStateNode:D,fullScreened:_,editorOverlayPortal:G,highlightActiveType:O="disabled",cellsSelectionMode:Z="range-cell",enableColumnSelection:Dt=!0,enableRowSelection:ne=!0,enableSelectAll:li=!0,enableLowDprHairline:Ot,gridSelection:Pt,onGridSelectionChange:ui,onSelectionEmit:me,onColumnSelectionChange:Nt,pendingColumnSelectionKeys:M,onColumnSelectionApplied:N,highlightActiveRow:U,onHighlightActiveRowChange:K,highlightActiveRowControlled:$,highlightRegions:J,checkboxSelectedRowIndexes:V,checkboxVisibleRowIndexes:Q,hoverEffects:et,onCellClicked:rt,onCellContextMenu:bt,onGroupHeaderClicked:Bt,onMouseMove:pe,onVisibleRegionChanged:ye,portalElementRef:Eu,...Wt})=>{var $o;const Ho=Qt.useActiveTheme(),W=m.useMemo(()=>Io(n,Ho),[n,Ho]),ls=m.useMemo(()=>{const S=typeof i=="number"?i:void 0;if(S)return S;const A=Lr[n],I=typeof i=="function"?i:void 0;return I?H=>{const B=t[H];if(!B)return S??A;const R=I(B,{rowSizeName:n,rowSizeValue:A},H);return typeof R=="number"&&!Number.isNaN(R)?R:A}:A},[t,i,n]),Gt=(e==null?void 0:e.length)??0,us=Kl(ls),[Fe,hs]=m.useState(new Map),be=m.useRef(null),ds=m.useCallback((S,A,I,H)=>{var L;const B=S;B.id&&((L=be.current)==null||L.call(be),a==null||a(B,A,I,H),hs(R=>(R.set(B.id,A),new Map(R))))},[a]),_t=m.useMemo(()=>Fe.size===0?o:o.map(S=>Fe.has(S.id)?{...S,width:Fe.get(S.id),grow:0}:S),[o,Fe]),[Lo,Tu]=m.useState(0),hi=m.useMemo(()=>new WeakMap,[]),It=m.useRef(null);m.useEffect(()=>{var S;(Pt==null?void 0:Pt.current)!==void 0&&((S=It.current)==null||S.focus())},[Pt]);const{interactionSessionStore:ut,beginOrGetInteractionSession:fs,consumeCanvasClickResult:gs}=nu(),Po=tu(ut),{selection:Rt,handleGridSelectionChange:Cs,handleSelectionCleared:vs,rangeSelect:ms}=is({cellsSelectionMode:Z,gridSelection:Pt,onGridSelectionChange:ui,onSelectionEmit:me}),lt=os({columns:_t,selection:Rt,cellsSelectionMode:Z,checkboxSelectedRowIndexes:V}),ps=m.useMemo(()=>K?S=>K(S,S!==void 0?t[S]:void 0):void 0,[K,t]),{selectedColumnIndexes:ys,selectedColumnKeysAll:Bo,selectColumnsByKeys:Se,selectedColumnSet:xe,headerSelectedRowIndexes:_o,activeRow:Fs,numberingColumnIndex:Ro,drawFocusRing:bs,selectColumnFromHeader:ko,handleGridSelectionWithColumnReset:Ss,handleSelectionClearedWithColumns:xs}=rs({columns:_t,selection:Rt,cellsSelectionMode:Z,highlightActiveType:O,enableColumnSelection:Dt,enableRowSelection:ne,enableSelectAll:li,leadingServiceColumnsCount:lt.leadingServiceColumnsCount,dataRowCount:t.length+Gt,handleGridSelectionChange:Cs,handleSelectionCleared:vs,onSelectionEmit:me,highlightActiveRow:U,onHighlightActiveRowChange:ps,isHighlightActiveRowControlled:$});m.useEffect(()=>{Nt==null||Nt(Bo)},[Bo,Nt]),m.useEffect(()=>{if(!M)return;Se(M);const S=setTimeout(()=>N==null?void 0:N(),0);return()=>clearTimeout(S)},[M,_t,Se,N]);const we=_o.length>0,Ae=m.useMemo(()=>{var I;const S=new Set,A=(I=Rt.current)==null?void 0:I.rangeStack;if(A){const H=lt.firstDataColumnIndex;for(const B of A){const L=Math.max(B.x,H);for(let R=L;R<B.x+B.width;R+=1)S.add(R)}}return S},[Rt,lt.firstDataColumnIndex]),Y=m.useMemo(()=>_t.map((S,A)=>{const I={...S.themeOverride??{}};let H=Object.keys(I).length>0;return S.isServiceColumn&&(I.bgCell=W.selectionServiceBg,H=!0),A===Ro&&(I.accentLight="transparent",I.accentColor="transparent",H=!0),(lt.isActiveHeaderColumn(A)||xe.has(A)||Ae.has(A)||we&&!S.isServiceColumn)&&(I.bgHeader=W.selectionServiceActiveBg,I.bgHeaderHasFocus=W.selectionServiceActiveBg,H=!0),H?{...S,themeOverride:I}:S}),[_t,lt,xe,Ae,we,Ro,W.selectionServiceBg,W.selectionServiceActiveBg]),Ee=!!(et!=null&&et.row),{hoveredCellRef:ws,setHoveredCell:Te,hoverRow:di,onHoverRowChange:As}=au({isRowHoverEnabled:Ee,dataEditorRef:It,columnsCount:Y.length,rowsCount:t.length}),{errorCellRanges:Es,trackVisibleRegion:Mo}=Zl({columns:_t,rows:t,freezeColumns:c,selectedRange:($o=Rt.current)==null?void 0:$o.range}),Ts=m.useCallback((S,A,I,H)=>{Mo(S),ye==null||ye(S,A,I,H)},[Mo,ye]),se=m.useCallback(([S,A],I)=>{var Be,Vo,_e,Yo;xu(Lo);const H=(I==null?void 0:I.applyCanvasEditorActivation)!==!1,B=nt=>H?Po([S,A],nt):nt,L=!!e&&A>t.length-1,R=t[A],k=Y[S];if(!k)return Jt();if(L){const nt=e[A-t.length],{renderSummaryCell:Lt,colSpan:st}=k;if(!Lt||!nt)return Jt();const bi={row:nt,column:k,colInd:S,rowInd:A,ctxs:s,theme:W,hovered:{cellHover:!1,rowHover:!1},active:{cellActive:!1,rowActive:!1}},js=Lt(bi),qo=Pi(st,bi),Js={data:"",...qo&&{span:qo}};return B(wr({jsxElement:js,canvasCellCache:hi,cellInfo:bi,options:{...Js,getPortalEventTarget:()=>(f==null?void 0:f.current)??null,refTable:l}}))}if(!R)return Jt();const ot=(nt,Lt,st)=>({row:t[st],column:nt,colInd:Lt,rowInd:st,ctxs:s,theme:W,hovered:{cellHover:!1,rowHover:!1},active:{cellActive:!1,rowActive:!1}}),[q,j]=as(S,A,(nt,Lt)=>{const st=Y[nt];return st!=null&&st.colSpan?Pi(st.colSpan,ot(st,nt,Lt)):null},(nt,Lt)=>{const st=Y[nt];return st!=null&&st.rowSpan?Ir(st.rowSpan,ot(st,nt,Lt)):null});if(q!==S||j!==A)return se([q,j],I);const X=ws.current,z={row:R,column:k,colInd:S,rowInd:A,ctxs:s,theme:W,hovered:{cellHover:(X==null?void 0:X.colInd)===S&&(X==null?void 0:X.rowInd)===A,rowHover:(X==null?void 0:X.rowInd)===A},active:{cellActive:lt.isActiveDataCell(S,A),rowActive:lt.isActiveRow(A)}},{renderCell:Xt,id:Ht,colSpan:vi,rowSpan:De,spanAlign:Ie,editable:He,contentAlign:qs,columnThemeOverride:Uo}=k,Ks=((Vo=(Be=R[Ht])==null?void 0:Be.toString)==null?void 0:Vo.call(Be))??"NOT FOUND",Le=Pi(vi,z),Pe=Ir(De,z),mi=(Le||Pe)&&Ie?typeof Ie=="function"?Ie(z):Ie:void 0,Xo=He?typeof He=="boolean"?He:He(R):!1,pi=typeof Uo=="function"?Uo(z):void 0,yi={data:((Yo=(_e=R[Ht])==null?void 0:_e.toString)==null?void 0:Yo.call(_e))??"NOT FOUND",...Xo?{readonly:!1,allowOverlay:!0}:{readonly:!0,...k.hasPreview===!0&&{allowOverlay:!0},...k.hasPreview==="none"&&{allowOverlay:!1}},themeOverride:{...pi,...Xo&&{bgCell:W.bgEditableCell}},contentAlign:qs,...Le&&{span:Le},...Pe&&{spanRows:Pe},...mi&&{spanAlign:mi}};if(!Xt){const nt=String(Ks);return Ao(nt)?B(Qe(nt,yi)):B(Jt(yi))}const Fi=pi?{...z,theme:{...W,...pi}}:z,Zs=Xt(Le||Pe?{...Fi,__mergedCell:{align:mi}}:Fi);return B(wr({jsxElement:Zs,canvasCellCache:hi,cellInfo:Fi,options:{...yi,getPortalEventTarget:()=>(f==null?void 0:f.current)??null,refTable:l}}))},[Lo,e,t,Y,s,W,lt,hi,f,Po]),Ds=m.useCallback((S,A)=>{var z;const I=se(S,{applyCanvasEditorActivation:!1});if(!Fo(I)){rt==null||rt(S,A);return}let H=!1;const B=A.preventDefault;A.preventDefault=()=>{H=!0,B()};const L=te({colIndex:S[0],rowIndex:S[1]},A.bounds),R=ee(L,I),k={x:A.localEventX,y:A.localEventY},ot=ns({cell:S,glideCell:I,rect:A.bounds,renderData:R,relativePoint:k}),q=ot?ut.beginOrGet({cell:S,relativePoint:k,interaction:ot.interaction,button:A.button,source:"click"}):ut.beginOrGet({cell:S,relativePoint:k,interaction:Xr(),button:A.button,source:"click"}),j=bo({cell:I,rect:A.bounds,relativePoint:k,renderData:R,rowData:t[S[1]],rowIndex:S[1]}),X=q?nl({decision:q.decision,propagationStopped:j.propagationStopped,suppressGridDefault:j.suppressGridDefault}):{suppressExternalCellClick:j.propagationStopped,suppressGridDefaultForClick:j.suppressGridDefault};if(q&&(ut.consumePhase(q,"cell-click"),ut.storeClickResult(q,j)),A.button===0&&((z=X.editorRequest)==null?void 0:z.target)==="self"&&ut.armEditorRequest(q,X.editorRequest),X.suppressGridDefaultForClick&&(A.preventDefault(),q!=null&&q.decision.editorRequest&&ut.clear()),X.suppressExternalCellClick||rt==null||rt(S,A),H||A.button===1){ut.clear();return}},[se,ut,rt,t]),Is=m.useCallback((S,A)=>{ut.isMatchingRecent("contextmenu-capture",S)||bt==null||bt(S,A)},[ut,bt]),Hs=su({beginOrGetInteractionSession:fs,consumeCanvasClickResult:gs}),$t=m.useRef(null),Ut=m.useRef(null),ce=m.useMemo(()=>new Map,[]),zo=m.useMemo(()=>new Map,[]),fi=m.useRef(null),kt=m.useRef(null),Ls=m.useMemo(()=>Qt.mergeRefs(kt,b),[b]),{drawHeader:Ps,onHeaderClicked:Bs}=m.useMemo(()=>({drawHeader:(I,H)=>{var De;const{ctx:B,rect:L,columnIndex:R}=I,k=Y[R];if(!k||!k.renderHeaderCell)return H();const ot={column:k,drawArgs:I,ctxs:s,theme:W};let q=k.renderHeaderCell(ot);if(!eo(q))return H();typeof q=="string"&&(q=St.jsx(Ce.Container,{style:{width:"100%"},alignItems:"center",children:St.jsx(Ce.Text,{children:q})}));const j=`header-${k.id}-${R}`,X=Je({element:q,idPrefix:j,theme:W});let z;ce.has(k.id)?(z=ce.get(k.id),z==null||z.setRootNode(X),z!=null&&z.rootNode&&(z.rootNode.style={width:L.width,height:L.height})):(z=new yt(X,j),z.rootNode.style={width:L.width,height:L.height},ce.set(k.id,z)),z==null||z.setPortalEventTarget((f==null?void 0:f.current)??null),z==null||z.setTooltipContext({column:k,ctxs:s,refTable:l,theme:W});const Xt=((De=$t.current)==null?void 0:De.id)===k.id?$t.current:void 0,Ht=B.canvas.getBoundingClientRect(),vi={x:Ht.left+L.x,y:Ht.top+L.y,width:L.width,height:L.height};return z==null?void 0:z.render(B,L,Xt,vi)},onHeaderClicked:(I,H)=>{const B=Y[I];if(B){if(B.renderHeaderCell){const L=ce.get(B.id);if(L){const R=L.getInteractionAtPoint(H.localEventX,H.localEventY);if(L.dispatchPointerEvent("click",H.localEventX,H.localEventY),R)return}}ko(I,H)}}}),[Y,s,W,ce,f,It,ko]),_s=m.useCallback((S,A)=>{const I=Y[S];if(!Dt||!I){Bt==null||Bt(S,A);return}const H=Bi(I.group),B=Math.max(0,H.indexOf(A.group)),L=H.slice(0,B+1).join("\0"),R=j=>{const X=Y[j];return X!==void 0&&Bi(X.group).slice(0,B+1).join("\0")===L};let k=S,ot=S;for(;k-1>=0&&R(k-1);)k-=1;for(;ot+1<Y.length&&R(ot+1);)ot+=1;const q=[];for(let j=k;j<=ot;j+=1){const X=Y[j];X&&!X.isServiceColumn&&q.push(X.id)}q.length>0&&Se(q),Bt==null||Bt(S,A)},[Dt,Y,Se,Bt]),Oo=m.useMemo(()=>{const S=new Map;Y.forEach((I,H)=>{if(I.isServiceColumn)return;const B=lt.isActiveHeaderColumn(H)||xe.has(H)||Ae.has(H)||we;Bi(I.group).forEach(L=>{if(L==="")return;const R=S.get(L);S.set(L,(R??!0)&&B)})});const A=new Set;return S.forEach((I,H)=>{I&&A.add(H)}),A},[Y,lt,xe,Ae,we]),Rs=m.useCallback(S=>{const A=u==null?void 0:u.get(S),I={name:S,...A&&{spanAlign:A}};return Oo.has(S)?{...I,overrideTheme:{bgGroupHeader:W.selectionServiceActiveBg,bgGroupHeaderHovered:W.bgHeaderHovered}}:I},[u,Oo,W.selectionServiceActiveBg,W.bgHeaderHovered]),{glideContainer:gi,isReady:ks,renderInContainer:Ms}=cu(kt,_),No=G==="inside";uu(kt,No),Jl({eventTarget:gi??kt.current,dataEditorRef:It,getCellContent:se,interactionSessionStore:ut,onCellContextMenuExternal:bt});const{unstickyCallbackRef:Wo,mergedExperimental:Ci}=du({enabled:C,portalEventTargetRef:f,headerHeight:Wt.headerHeight,groupHeaderHeight:Wt.groupHeaderHeight,experimental:Wt.experimental}),zs=m.useMemo(()=>Qt.mergeRefs(It,l,Wo),[l,Wo]),Os=m.useMemo(()=>Ot===void 0?Ci:{...Ci,enableLowDprHairline:Ot},[Ot,Ci]),Ns=m.useCallback(S=>{pe==null||pe(S),S.kind==="cell"?(()=>{const I=S.location[0],H=S.location[1],B=t[H],L=Y[I];if(!B||!L||L.isServiceColumn){Te(null);return}Te({colInd:I,rowInd:H})})():Te(null),S.kind==="group-header"?(()=>{if(typeof S.group!="string"){Ut.current=null;return}Ut.current={id:S.group,x:S.localEventX,y:S.localEventY}})():Ut.current=null,S.kind==="header"?(()=>{var L,R;const I=S.location[0],H=S.location[1],B=Y[I];if(!B||!(B!=null&&B.renderHeaderCell)){$t.current=null;return}$t.current={id:B.id,x:S.localEventX,y:S.localEventY},(R=(L=It.current)==null?void 0:L.updateCells)==null||R.call(L,[{cell:[I,H]}])})():$t.current=null,$t.current=null,Ut.current=null},[Y,pe,t,Te]),Go={dataEditorRef:It,rowCount:t.length,columnCount:Y.length,headerAndGroupHeaderRowsCount:1+(Wt.groupHeaderHeight??[]).length};Jn(Go),jn(Go);const Ws=m.useMemo(()=>d?(A,I)=>{var L,R;const H=(L=Y[A])==null?void 0:L.id,B=(R=Y[I])==null?void 0:R.id;typeof H!="string"||typeof B!="string"||d(H,B)}:void 0,[Y,d]),Gs=m.useMemo(()=>{if(h)return(S,A)=>{var Ht;const I=h(S);if(I==="default")return A();if("defaultWithCustomGroupName"in I)return A(I.defaultWithCustomGroupName);const{groupName:B,rect:L,ctx:R}=S;let k=I;if(!eo(k))return A();typeof k=="string"&&(k=St.jsx(Ce.Container,{style:{width:"100%"},alignItems:"center",children:St.jsx(Ce.Text,{children:k})}));const ot=B,q=Je({element:k,idPrefix:ot,theme:W}),j=new yt(q,ot);j.rootNode.style={width:L.width,height:L.height},j.setPortalEventTarget((f==null?void 0:f.current)??null),zo.set(ot,j);const X=((Ht=Ut.current)==null?void 0:Ht.id)===ot?Ut.current:void 0,z=R.canvas.getBoundingClientRect(),Xt={x:z.left+L.x,y:z.top+L.y,width:L.width,height:L.height};return j.render(R,L,X,Xt)}},[zo,h,W,f]),$s=m.useMemo(()=>{const S=!!(V!=null&&V.size),A=Ee?di:void 0;if(!Gt&&!S&&A===void 0)return;const I=W.bgRowHovered;return H=>H>t.length-1?{bgCell:W.bgHeader}:V!=null&&V.has(H)?{bgCell:H===A?W.bgSelectedRowHovered:W.selectionCheckboxBg}:H===A?{bgCell:I}:{}},[t.length,Gt,W.bgHeader,W.selectionCheckboxBg,W.bgRowHovered,W.bgSelectedRowHovered,V,Ee,di]),{onItemHovered:Us,hideTooltip:Xs}=hu({columnsLast:Y,rows:t,ctxs:s,refTable:l,theme:W,portalEventTargetRef:f,externalOnItemHovered:g,onHoverRowChange:As},It);be.current=Xs;const Vs=es({theme:W,cellsSelectionMode:Z,selection:Rt,serviceColumnsCount:lt.leadingServiceColumnsCount,activeDataRange:lt.activeDataRange,outlineRange:lt.outlineRange,checkboxSelectedRowIndexes:V,errorCellRanges:Es,highlightRegionsExternal:J,selectedColumnIndexes:ys,headerSelectedRowIndexes:_o,activeRow:Fs,checkboxVisibleRowIndexes:Q,totalRows:t.length+Gt,columnsCount:_t.length,isRowHoverEnabled:Ee,hoverRow:di,dataRowsCount:t.length}),Ys=m.useMemo(()=>{if(!(!x&&!D&&!E))return{...x,...D?{position:"relative"}:void 0,...E?{height:"100%",minHeight:0}:void 0}},[x,D,E]);return St.jsxs("div",{ref:Ls,className:w,style:Ys,children:[No?Ge.createPortal(St.jsx(Li,{ref:fi,onAnimationEndCapture:S=>S.stopPropagation(),id:"portal"}),(kt==null?void 0:kt.current)??document.body):Ge.createPortal(St.jsx(Li,{id:"portal",ref:fi}),document.body),Ge.createPortal(St.jsx(Li,{id:"portal2"}),document.body),!E&&St.jsx(fu,{ref:zs,className:"gdg-table",portalElementRef:fi,theme:W,getRowThemeOverride:$s,onHeaderClicked:Bs,onGroupHeaderClicked:_s,onMouseMove:Ns,drawHeader:Ps,drawGroupHeader:Gs,getGroupDetails:Rs,getCellContent:se,columns:Y,rows:t.length+Gt,freezeTrailingRows:Gt,freezeColumns:c,minColumnWidth:F,maxColumnAutoWidth:y,maxColumnWidth:p,columnSelect:"none",columnSelectionBlending:"exclusive",drawFocusRing:bs,gridSelection:Rt,onGridSelectionChange:Ss,onSelectionCleared:xs,width:r??"100%",onColumnMoved:Ws,onColumnResize:v?ds:void 0,customRenderers:Hs,rowHeight:us,highlightRegions:Vs,rangeSelect:ms,smoothScrollX:!0,smoothScrollY:!0,headerHeight:Ye,onCellClicked:Ds,onCellContextMenu:Is,onItemHovered:Us,onVisibleRegionChanged:Ts,...Wt,experimental:Os,keybindings:{...Wt.keybindings,copy:!1,paste:!1},onPaste:!1}),D,ks&&gi&&(T==null?void 0:T({containerElement:gi,renderInContainer:Ms}))]})};exports.BUTTON_PADDING_Y=oe;exports.CACHE_SEPARATOR=ao;exports.CANVAS_CELL_KIND=ci;exports.CANVAS_PORTAL_EVENT=Ze;exports.Canvas=Ce;exports.CanvasAbsoluteContainer=Cc;exports.CanvasBadge=vn;exports.CanvasButton=mn;exports.CanvasChevron=Nc;exports.CanvasContainer=Ct;exports.CanvasEmbedIconButton=Gi;exports.CanvasHoverController=oo;exports.CanvasIcon=pn;exports.CanvasIconButton=yn;exports.CanvasLeaf=Ft;exports.CanvasLink=Tn;exports.CanvasNode=Mt;exports.CanvasRect=Fn;exports.CanvasRegistry=Vr;exports.CanvasRoot=yc;exports.CanvasSkeleton=En;exports.CanvasText=yo;exports.CellCanvasRoot=yt;exports.DANGER_COLOR=co;exports.DANGER_TEXT_COLOR=_i;exports.DEFAULT_ACCENT_FG=ve;exports.DEFAULT_BORDER_WIDTH=Et;exports.DEFAULT_BUTTON_RADIUS=no;exports.DEFAULT_CURSOR=Hn;exports.DEFAULT_HEADER_HEIGHT=Ye;exports.DEFAULT_ICON_SIZE=qr;exports.DEFAULT_ICON_SPACING=so;exports.DEFAULT_ROW_HEIGHT=Lr;exports.DEFAULT_SECONDARY_HOVER=Kr;exports.DEFAULT_SIZE=ni;exports.DEFAULT_TEXT_PADDING=Fc;exports.DEFAULT_VIEW=si;exports.DISABLED_BG_COLOR=Zr;exports.DISABLED_BORDER_COLOR=jr;exports.DISABLED_TEXT_COLOR=Ri;exports.DrawBatcher=oi;exports.EMPTY_CELL_OBJ=ec;exports.FlexBox=At;exports.FlexElement=kr;exports.FlexTreeBuilder=Nr;exports.HEX_COLOR_CHAR_CODE=Qr;exports.HEX_COLOR_PREFIX=Jr;exports.ICON_SIZE_ADJUSTMENT=re;exports.IconSpriteManager=sn;exports.LEGACY_HOVER_CURSOR=Ln;exports.LIGHTEN_AMOUNT=lo;exports.LayoutReconciler=Wr;exports.MAX_ICON_SIZE=ro;exports.POINTER_CANDIDATE_KEYS=In;exports.PositionResolver=xt;exports.RELATIVE_COORD_TOLERANCE=ge;exports.RootBridge=Fl;exports.RootFlexBox=io;exports.SIZES=Pr;exports.SIZE_CONFIG=ct;exports.SizeAccumulator=ii;exports.TABLE_GLIDE_SIZES=ic;exports.THEME=Su;exports.TableGlide=Au;exports.VIEW_COLORS=ri;exports.buildButtonViewColors=Yr;exports.buildCanvasTree=Je;exports.buildCellId=te;exports.calculateButtonWidth=fo;exports.calculateContentWidth=go;exports.canvasCellRenderer=sl;exports.clearButtonCaches=bc;exports.clearIconCache=al;exports.createCanvasCell=Dn;exports.createCanvasCellRenderer=So;exports.createEmptyCellGlide=Jt;exports.createNormalCanvasInteraction=Xr;exports.createRafUpdate=wo;exports.createSvgDataUrl=Wi;exports.createTextCellGlide=Qe;exports.defaultBatcher=pc;exports.defaultIconManager=Tt;exports.dispatchCanvasPortalHover=jt;exports.drawButton=dn;exports.drawButtonWithView=fn;exports.drawEmbedIconButtonWithView=gn;exports.drawIcon=un;exports.drawIcon$1=ft;exports.drawIconButton=po;exports.drawIconButtonWithView=Cn;exports.drawIconDirect=Dc;exports.findBlockOrigin=as;exports.flexBoxLayout=lc;exports.fontStyles=qe;exports.getCachedTextWidth=ho;exports.getCellIndices=Ue;exports.getDpr=Xe;exports.getHoverState=Wn;exports.getIconCacheSize=ll;exports.getIconImageDirect=hn;exports.getIconSprite=an;exports.getIconSpriteStats=Ec;exports.getRelativePointerPosition=Pn;exports.getRowHeightBySize=$e;exports.getTheme=Io;exports.handleCanvasRootClick=Rn;exports.handleCanvasRootHover=Gn;exports.handleCellClick=Mn;exports.handleClickHandlers=kn;exports.hashString=nn;exports.isAbsoluteCoords=Bn;exports.isCanvasCell=Fo;exports.isCanvasContent=eo;exports.isCanvasEl=ai;exports.isCanvasString=Eo;exports.isGlideCellObj=Nl;exports.isGlideGridCellObj=Qn;exports.isHoveringBounds=zt;exports.isObject=Ol;exports.isPointInArea=mo;exports.isPortalHoverLocked=qa;exports.isPrimitive=Ao;exports.isReactIcon=wt;exports.isRelativeCoords=_n;exports.isValueEmpty=ts;exports.lightenColor=uo;exports.lightenColorCached=tn;exports.lockPortalHover=Ya;exports.normalizeCanvasInteraction=Ur;exports.normalizeDimensionValue=Ji;exports.normalizeHoverPoint=rn;exports.normalizeIcon=mt;exports.onAnyIconLoad=cn;exports.performCanvasClick=bo;exports.performCanvasPointerDownIntent=Xn;exports.preloadIconSprites=ln;exports.queryGlideElements=cs;exports.reactIconToSvg=Vn;exports.rectContainsCell=To;exports.registerIconDefinitions=Ac;exports.resetIconSpriteCache=Tc;exports.resolveButtonColors=Co;exports.resolveClickPoint=Oi;exports.resolveDangerColors=on;exports.resolvePaddingBox=Mr;exports.resolvePaddingBox$1=$r;exports.resolvePrimaryColors=zi;exports.resolveSecondaryColors=en;exports.resolveViewColors=vo;exports.retrieveRenderData=ee;exports.storeRenderData=On;exports.subscribeToCanvasPortalHover=il;exports.subscribeToPortalHoverLock=Ka;exports.toRelativePoint=Ni;exports.updateGridCells=xo;exports.updateHoverState=Nn;exports.updateHoverStateIfNeeded=$n;exports.useCanvasRegistry=zl;exports.useColoringLayers=es;exports.useFontLoadRedraw=jn;exports.useIconLoadRedraw=Jn;exports.useNativeGridSelection=is;exports.useSelectionGeometry=os;exports.useTableSelectionSystem=rs;exports.waitForCanvasFonts=Kn;exports.waitForDocumentFonts=qn;exports.waitForFonts=Zn;
|
|
@@ -5,7 +5,7 @@ import { s as S } from "./EXTERNAL_PACKAGE_MODULE_sdds_finai_high_contrast__ligh
|
|
|
5
5
|
import { jsxs as l, Fragment as d, jsx as o } from "react/jsx-runtime";
|
|
6
6
|
import { getCustomScrollbar as c } from "../mixins/index.mjs";
|
|
7
7
|
import "@salutejs/sdds-finai";
|
|
8
|
-
import { s as A } from "./utils-
|
|
8
|
+
import { s as A } from "./utils-u1KJ37g3.mjs";
|
|
9
9
|
import { useEffect as C } from "react";
|
|
10
10
|
import O, { css as h, createGlobalStyle as i } from "styled-components";
|
|
11
11
|
import { outlineInfo as R, dataInfoGradient as $, outlineWarning as W, dataWarningGradient as F, outlineNegative as j, dataNegativeGradient as H, outlinePositive as M, dataPositiveGradient as z, textPrimary as V, shadowDownHardS as X } from "@salutejs/sdds-themes/tokens/sdds_finai";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const T=require("@salutejs/plasma-typo"),c=require("@salutejs/sdds-themes"),l=require("./vendor-BSEdLAmZ.cjs"),m=require("./EXTERNAL_PACKAGE_MODULE_sdds_finai_high_contrast__light_theme-75fNjCa0.cjs"),e=require("react/jsx-runtime"),_=require("../mixins/index.cjs");require("@salutejs/sdds-finai");const w=require("./utils-
|
|
1
|
+
"use strict";const T=require("@salutejs/plasma-typo"),c=require("@salutejs/sdds-themes"),l=require("./vendor-BSEdLAmZ.cjs"),m=require("./EXTERNAL_PACKAGE_MODULE_sdds_finai_high_contrast__light_theme-75fNjCa0.cjs"),e=require("react/jsx-runtime"),_=require("../mixins/index.cjs");require("@salutejs/sdds-finai");const w=require("./utils-ChDQGRjv.cjs"),p=require("react"),a=require("styled-components"),i=require("@salutejs/sdds-themes/tokens/sdds_finai"),s="dais-ui__",h="notification-wrapper",R="notification-text",S="notification-title",n={wrapper:`${s}notification`,positive:`${s}notification--positive`,negative:`${s}notification--negative`,warning:`${s}notification--warning`,info:`${s}notification--info`,hasBackground:`${s}notification--has-background`,hasTitleColor:`${s}notification--has-title-color`,hasBorderColor:`${s}notification--has-border-color`},E={positive:{background:i.dataPositiveGradient,borderColor:i.outlinePositive},negative:{background:i.dataNegativeGradient,borderColor:i.outlineNegative},warning:{background:i.dataWarningGradient,borderColor:i.outlineWarning},info:{background:i.dataInfoGradient,borderColor:i.outlineInfo}},y=()=>Object.entries(E).map(([t,o])=>{const r=n[t];return a.css([".",".",":not(.","){.","{overflow:hidden;}.notification-buttons-wrapper,.",",.","{z-index:1;}.","::after{content:'';position:absolute;z-index:0;height:600px;width:600px;top:0;right:0;transform:translate(50%,-80%);background:",";pointer-events:none;}}.",".",":not(.","){.","{color:",";}}.",".","{.","{border:1px solid ",";box-shadow:",";}}"],n.wrapper,r,n.hasBackground,h,R,S,h,o.background,n.wrapper,r,n.hasTitleColor,S,i.textPrimary,n.wrapper,r,h,o.borderColor,i.shadowDownHardS)}).flat(),f="tooltip--fullWidth",C=a.createGlobalStyle(T.standard),L=a.createGlobalStyle(T.compatible),A=a.createGlobalStyle(c.sdds_finai__light),x=a.createGlobalStyle(["*{","}"],()=>_.getCustomScrollbar({theme:"light"})),g=a.createGlobalStyle(["*{","}"],()=>_.getCustomScrollbar({theme:"dark"})),G=a.createGlobalStyle(["*{","}"],()=>y()),b=a.css([".popover-wrapper:has(> .","){width:100%;}"],f),d=a.createGlobalStyle(["",""],b),v=a.createGlobalStyle(c.sdds_finai__dark),N=a.createGlobalStyle(m.sdds_finai_high_contrast__light_2),O=a.createGlobalStyle(l.sdds_finai_high_contrast__dark_2),q=a.createGlobalStyle(l.sdds_finai_beta_core__light_2),F=a.createGlobalStyle(l.sdds_finai_beta_core__dark_2),W=()=>(p.useEffect(()=>(document.documentElement.setAttribute("data-theme","dark"),()=>{document.documentElement.removeAttribute("data-theme")}),[]),e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsx(L,{}),e.jsx(v,{}),e.jsx(g,{}),e.jsx(d,{})]}));function u(t,o){return t.join(`
|
|
2
2
|
`).replace(/:root/g,o)}const k={light:c.sdds_finai__light,dark:c.sdds_finai__dark,highContrastLight:m.sdds_finai_high_contrast__light_2,highContrastDark:l.sdds_finai_high_contrast__dark_2,betaCoreLight:l.sdds_finai_beta_core__light_2,betaCoreDark:l.sdds_finai_beta_core__dark_2},$={light:A,dark:v,highContrastLight:N,highContrastDark:O,betaCoreLight:q,betaCoreDark:F},B=({theme:t="light"})=>{p.useEffect(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const o=$[t],r=t==="light"||t==="highContrastLight"||t==="betaCoreLight";return e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsx(L,{}),e.jsx(o,{}),r?e.jsx(x,{}):e.jsx(g,{}),e.jsx(d,{}),e.jsx(G,{})]})},M=a.createGlobalStyle(["",""],({$theme:t,$scopeSelector:o})=>o?u(k[t],o):""),H=({theme:t="light",scopeSelector:o})=>{const r=t==="light"||t==="highContrastLight"||t==="betaCoreLight";return e.jsxs(e.Fragment,{children:[e.jsx(M,{$theme:t,$scopeSelector:o}),r?e.jsx(x,{}):e.jsx(g,{}),e.jsx(d,{}),e.jsx(G,{})]})},D=({isLightBase:t,theme:o})=>a.css([""," "," "," ",""],u(k[o],"&"),_.getCustomScrollbar({theme:t?"light":"dark"}),b,y()),I=a.div.withConfig({displayName:"DefaultGlobalStyle__StyledTestRootIsolatedThemeProviderLayout"})(["",""],({isLightBase:t,activeTheme:o})=>D({isLightBase:t,theme:o})),U=({theme:t="light",className:o,children:r,...j})=>{const P=t==="light"||t==="highContrastLight"||t==="betaCoreLight";return e.jsx(I,{className:w.mCls("TestRootIsolatedThemeProviderLayout",o),...j,isLightBase:P,activeTheme:t,children:r})};exports.DarkGlobalStyle=W;exports.GlobalPopoverStyles=d;exports.GlobalStyle=B;exports.StyledTestRootIsolatedThemeProviderLayout=I;exports.TOOLTIP_FULL_WIDTH_CLASS=f;exports.TestGlobalIsolatedStyleWithReplace=H;exports.TestRootIsolatedThemeProviderLayout=U;exports.cls=n;exports.scopeTheme=u;exports.styledTestRootIsolatedThemeProviderLayoutMixin=D;exports.testGlobalPopoverStylesMixin=b;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";const x=require("react/jsx-runtime"),s=require("react"),T=require("../constants/index.cjs"),h=require("styled-components"),V=require("react-dom/client"),W=require("../shared/utils/debug/index.cjs"),S="xl",v=T.breakPoints,E=s.createContext({breakpoint:S,breakpointConfig:v}),b=e=>t=>`
|
|
2
|
+
@media ${e} {
|
|
3
|
+
${t}
|
|
4
|
+
}
|
|
5
|
+
`,j=e=>({xs:{min:0,max:e.xs-1},s:{min:e.xs+1,max:e.s},m:{min:e.s+1,max:e.m},l:{min:e.m+1,max:e.l},xl:{min:e.l+1,max:e.xl},xxl:{min:e.xl+1,max:1e5}}),A=e=>{const t=j(e);return{up:n=>b(`(min-width: ${t[n].max+1}px)`),down:n=>b(`(max-width: ${t[n].min-1}px)`),only:n=>b(`(min-width: ${t[n].min}px) and (max-width: ${t[n].max}px)`),not:n=>b(`(max-width: ${t[n].min-1}px), (min-width: ${t[n].max+1}px)`),between:(n,r)=>b(`(min-width: ${t[n].min}px) and (max-width: ${t[r].max}px)`),exact:(n,r)=>b(`(min-width: ${n}px) and (max-width: ${r}px)`)}},_=A(v),I=({breakpointConfig:e=v,children:t})=>x.jsx(h.ThemeProvider,{theme:{media:A(e)},children:t}),U=({children:e,breakpointConfig:t=v})=>{const[n,r]=s.useState(S);s.useEffect(()=>{const c=Object.entries(t).map(([i,a])=>({key:i,mql:window.matchMedia(`(max-width: ${a}px)`)})),u=()=>{var a;const i=((a=c.find(({mql:l})=>l.matches))==null?void 0:a.key)||S;r(i)};return u(),c.forEach(({mql:i})=>{i.addEventListener("change",u)}),()=>{c.forEach(({mql:i})=>{i.removeEventListener("change",u)})}},[]);const o=s.useMemo(()=>({breakpoint:n,breakpointConfig:t}),[n,t]);return x.jsx(E.Provider,{value:o,children:x.jsx(I,{breakpointConfig:t,children:e})})},M=()=>{const{breakpoint:e,breakpointConfig:t}=s.useContext(E),n=s.useMemo(()=>({up:r=>t[e]>t[r],down:r=>t[e]<t[r],only:r=>t[e]===t[r],not:r=>t[e]!==t[r],between:(r,o)=>t[e]>t[r]&&t[e]<t[o]}),[e,t]);return{breakpoint:e,...n}};function N(e,t,n,r={}){const o={bubbles:!0,cancelable:!0,composed:!0,...r,detail:n},c=new CustomEvent(t,o);return e.dispatchEvent(c)}const H=null,R=s.createContext(H),q=({children:e,clickStreamInstance:t})=>x.jsx(R.Provider,{value:t,children:e});var k=(e=>(e.START="Start",e.END="End",e.SUCCESS="Success",e.FAILED="Failed",e))(k||{}),D=(e=>(e.BUISINESS="business",e))(D||{});const z=()=>{const e=s.useContext(R);if(!e)throw new Error("Ошибка. Приложение необходимо обернуть в ClickStreamProvider");return e},K=(e,t)=>e.join("/").concat(t?`_${t}`:""),Q=e=>Object.entries(e).reduce((t,n)=>{if(n[0]&&n[1]){const r={key:n[0],value:n[1]};t.push(r)}return t},[]),X=e=>Array.isArray(e)?e.join(";"):typeof e=="boolean"?`${e}`:e??"null";function Y(e,t){if(!t)return e;const n=JSON.stringify(t),r=btoa(n);return e.set("X-Digital-Trace-Context",r),e}function G(e){function t(){const i=s.useRef(e),a=s.useCallback(()=>i.current,[]),l=s.useRef(new Set),d=s.useCallback(m=>{i.current={...i.current,...m},l.current.forEach(g=>g())},[]),f=s.useCallback(m=>(l.current.add(m),()=>l.current.delete(m)),[]);return{get:a,set:d,subscribe:f}}const n=s.createContext(null);function r({children:i}){return x.jsx(n.Provider,{value:t(),children:i})}function o(i){const a=s.useContext(n);if(!a)throw new Error("Store not found");const[l,d]=s.useState(a.get());return s.useEffect(()=>a.subscribe(()=>d(a.get())),[]),[i(l),a.set]}function c(){const i=s.useContext(n);if(!i)throw new Error("Store not found");return i.set}function u(i){const a=s.useContext(n);if(!a)throw new Error("Store not found");const[l,d]=s.useState(a.get());return s.useEffect(()=>a.subscribe(()=>d(a.get())),[]),i(l)}return{Provider:r,useStore:o,useSelector:u,useDispatch:c}}const J=typeof requestAnimationFrame=="function",Z=typeof cancelAnimationFrame=="function",ee=e=>J?requestAnimationFrame(e):setTimeout(e,0),te=e=>{Z?cancelAnimationFrame(e):clearTimeout(e)},L=e=>{let t=null;return new ResizeObserver((n,r)=>{t!==null&&te(t),t=ee(()=>{t=null,e(n,r)})})},ne=(e,t=200)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}},B=(e,t,n="")=>{const r=[],o=new Map;return e.forEach((c,u)=>{const i=`${n}-${u}`,a=c.value||i,l={...c,value:a};if(t&&o.set(a.toString(),t),c.items){const[d,f]=B(c.items,t,i);f.forEach((m,g)=>o.set(g,m)),l.items=d}r.push(l)}),[r,o]},re=e=>s.useCallback((t,n)=>{const r=e.get(t.value);r==null||r(t,n)},[e]),oe=null,P=s.createContext(oe),se=({children:e,busInstance:t})=>x.jsx(P.Provider,{value:t,children:e}),ie=()=>{const e=s.useContext(P);if(!e)throw new Error("Ошибка. Приложение необходимо обернуть в EventBusProvider");return e},ce=()=>{const e=new Uint8Array(16);crypto.getRandomValues(e);const t=Array.from(e).map(o=>o.toString(16).padStart(2,"0")).join(""),n=new Uint8Array(8);crypto.getRandomValues(n);const r=Array.from(n).map(o=>o.toString(16).padStart(2,"0")).join("");return{traceId:t,requestQueryParam:"rq",headers:{"x-b3-traceid":t,"x-b3-spanid":r}}},w=()=>{const e=document.documentElement.getAttribute("data-theme");return e==="dark"?"dark":e==="highContrastLight"?"highContrastLight":e==="betaCoreLight"?"betaCoreLight":"light"},ae=e=>e?h.css(["&&{","}"],e):void 0,C=new Map;function ue(e){const t=`${e}_<space>`;if(C.has(t)){const o=C.get(t);return typeof o=="number"&&o||0}const n=document.createElement("span");n.style.cssText=`
|
|
6
|
+
font: ${e};
|
|
7
|
+
visibility: hidden;
|
|
8
|
+
white-space: pre-wrap;
|
|
9
|
+
position: absolute;
|
|
10
|
+
`,n.textContent=" ",document.body.appendChild(n);const r=n.offsetWidth;return document.body.removeChild(n),C.set(t,r),r}function le(e,t){const n=document.createElement("span");n.style.cssText=`
|
|
11
|
+
font: ${t};
|
|
12
|
+
visibility: hidden;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
position: absolute;
|
|
15
|
+
padding: 0;
|
|
16
|
+
margin: 0;
|
|
17
|
+
`,n.textContent=e,document.body.appendChild(n);const r=n.offsetWidth;return document.body.removeChild(n),r}function $(e,t){if(e===" ")return ue(t);if(e===" ")return $(" ",t)*4;const n=`${t}_${e}`;if(C.has(n)){const o=C.get(n);return typeof o=="number"&&o||0}const r=le(e,t);return C.set(n,r),r}function de(e,t,n=0){if(!e)return 0;const r=Array.from(e).reduce((u,i)=>u+$(i,t),0),o=e.length,c=Math.max(o-1,0)*n;return r+c}function me(e,t,n=0){const r=document.createElement("span");r.style.cssText=`
|
|
18
|
+
font: ${t};
|
|
19
|
+
visibility: hidden;
|
|
20
|
+
position: absolute;
|
|
21
|
+
white-space: pre;
|
|
22
|
+
padding: 0;
|
|
23
|
+
margin: 0;
|
|
24
|
+
letter-spacing: ${n}px;
|
|
25
|
+
`,r.textContent=e,document.body.appendChild(r);const o=r.offsetWidth;return document.body.removeChild(r),o}function fe(e,t,n=0){return e?me(e,t,n):0}const he=e=>{const t=e.substring(e.indexOf("(")+1,e.indexOf(","));return getComputedStyle(document.body).getPropertyValue(t)},pe=(e,t)=>{const n=t.split(".");let r=e;for(const o of n)if(typeof r=="object"&&r!==null&&o in r)r=r[o];else return;return r},ge=e=>T.viewColors[e],be=()=>{const[e,t]=s.useState(()=>w()??"light");return s.useEffect(()=>{t(w());const n=new MutationObserver(()=>t(w()));return n.observe(document.documentElement,{childList:!1,attributes:!0,attributeFilter:["data-theme"],subtree:!1}),()=>{var r;return(r=n==null?void 0:n.disconnect)==null?void 0:r.call(n)}},[]),e},Ce=(e,t)=>{const[n,r]=s.useState(!1),o=s.useRef();return[s.useCallback(function(...u){r(!0),clearTimeout(o.current),o.current=setTimeout(()=>{e.apply(this,u),r(!1)},t)},[t,e]),{debouncing:n}]},xe=(e,t=500,n)=>{const[r,o]=s.useState(n??e);return s.useEffect(()=>{const c=setTimeout(()=>{o(e)},t);return()=>{clearTimeout(c)}},[e]),r},p=new Map,we=e=>!e||p.get(e)==="loaded"?Promise.resolve():new Promise(t=>{const n=new Image;n.onload=()=>{p.set(e,"loaded"),t()},n.onerror=()=>{p.set(e,"error"),t()},n.src=e}),ve=(e,t=0)=>{const[n,r]=s.useState(()=>e?p.get(e)??"loading":"idle"),[o,c]=s.useState(0),u=s.useRef(e);u.current=e;const i=s.useCallback(()=>{e&&p.delete(e),c(a=>a+1)},[e]);return s.useEffect(()=>{if(!e){r("idle");return}const a=p.get(e);if(a){r(a);return}let l=!0,d;r("loading");const f=g=>{p.set(e,g);const y=()=>{l&&u.current===e&&r(g)};t>0?d=setTimeout(y,t):y()},m=new Image;return m.onload=()=>f("loaded"),m.onerror=()=>f("error"),m.src=e,()=>{l=!1,d&&clearTimeout(d)}},[e,o,t]),{status:n,isLoading:n==="loading",isLoaded:n==="loaded",isError:n==="error",reload:i}},Se=typeof window<"u"&&"structuredClone"in window&&typeof window.structuredClone=="function"||typeof globalThis<"u"&&"structuredClone"in globalThis&&typeof globalThis.structuredClone=="function";function O(...e){return e.reduce((t,n)=>(!n||typeof n!="string"||(t=`${t} ${n}`),t),"")}const ye=O;function Te(...e){const t=e.filter(Boolean);return t.length<=1?t[0]||null:function(r){for(const o of t)typeof o=="function"?o(r):o&&(o.current=r)}}const Ee=(e,t,n)=>t>n?n:t<e?e:t,Ae=(e,{identifierPrefix:t})=>({...e,createRoot:(n,r)=>V.createRoot(n,{...r,identifierPrefix:t})}),F=e=>e!=null&&e.lines&&e.lines>1?{display:"-webkit-box",WebkitLineClamp:e.lines,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal"}:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},Ie=e=>h.css(F(e)),Re=h.css(["width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;"]),ke=(e,t=200)=>{let n;return(...r)=>{n||(n=!0,e(...r),setTimeout(()=>{n=!1},t))}},De=(e,t=200)=>{let n=null,r=null,o=!1;const c=(...u)=>{n=u,o||(e(...u),o=!0,r=setTimeout(()=>{o=!1,n!==u&&c(...n),r=null},t))};return c.cancel=()=>{r&&(clearTimeout(r),o=!1,r=null)},c},Le="0.3s",Be=`all ${Le} ease`,Pe=h.keyframes(["from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}"]),$e=h.keyframes(["from{transform:scale(1);opacity:1;}to{transform:scale(0.85);opacity:0;}"]);h.css(["animation:"," "," "," forwards;"],({$isOpen:e})=>e?Pe:$e,({$duration:e="2.35s"})=>e,({$timing:e="ease"})=>e);const Oe=h.keyframes(["from{opacity:0;transform:translateY(-10px);}to{opacity:1;transform:translateY(0);}"]),Fe=(e,t="vertical",n=!0)=>{const[r,o]=s.useState({vertical:!1,horizontal:!1});switch(s.useEffect(()=>{const c=e.current;if(!c)return;const u=()=>{if(!c)return;const a=c.scrollHeight>c.clientHeight,l=c.scrollWidth>c.clientWidth;o(d=>d.vertical!==a||d.horizontal!==l?{vertical:a,horizontal:l}:d)};u();let i;return n&&typeof ResizeObserver<"u"&&(i=L(u),i.observe(c)),()=>{i==null||i.disconnect()}},[e,n]),t){case"vertical":return r.vertical;case"horizontal":return r.horizontal;case"both":return r;default:return r.vertical}},Ve=W.createDebugLogger("TABLE");exports.BreakpointProvider=U;exports.ClickStreamProvider=q;exports.DEFAULT_TRANSITION=Be;exports.EClickStreamErrorType=D;exports.EClickStreamStatusProcess=k;exports.EventBusProvider=se;exports.MediaProvider=I;exports.bubble=N;exports.clamp=Ee;exports.createClickStreamEventValue=K;exports.createSafeResizeObserver=L;exports.createStore=G;exports.debounce=ne;exports.fadeIn=Oe;exports.generateB3Headers=ce;exports.getActiveTheme=w;exports.getCssProp=ae;exports.getMFReactDOMClient=Ae;exports.getTextWidth=fe;exports.getTextWidthByCache=de;exports.getTokenValue=he;exports.getValue=pe;exports.getViewColor=ge;exports.injectDigitalTraceContextHeader=Y;exports.isStructuredCloneSupported=Se;exports.mCls=ye;exports.media=_;exports.mergeClasses=O;exports.mergeRefs=Te;exports.preloadImage=we;exports.processDropdownItems=B;exports.tableDebug=Ve;exports.throttle=ke;exports.throttleWithLastCall=De;exports.transformClickStreamProperties=Q;exports.transformClickStreamPropertyValuesToString=X;exports.truncateText=F;exports.truncateTextCss=Ie;exports.useActiveTheme=be;exports.useBreakpoint=M;exports.useClickStream=z;exports.useDebouncedFn=Ce;exports.useDebouncedValue=xe;exports.useDropdownItemClickHandler=re;exports.useEventBus=ie;exports.useHasScroll=Fe;exports.useImageLoader=ve;exports.visuallyHiddenCss=Re;
|