@infineon/design-system 0.0.0-stage → 41.11.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/LICENSE +21 -0
- package/dist/cem.json +15580 -0
- package/dist/cjs/animation-DvEMST7j.js +42 -0
- package/dist/cjs/dom-utils-BdvOgC2b.js +19 -0
- package/dist/cjs/icons-oFc1Jyfp.js +1334 -0
- package/dist/cjs/ifx-accordion-item.cjs.entry.js +118 -0
- package/dist/cjs/ifx-accordion.cjs.entry.js +40 -0
- package/dist/cjs/ifx-action-list-item.cjs.entry.js +238 -0
- package/dist/cjs/ifx-action-list.cjs.entry.js +30 -0
- package/dist/cjs/ifx-ai-label.cjs.entry.js +23 -0
- package/dist/cjs/ifx-alert_2.cjs.entry.js +217 -0
- package/dist/cjs/ifx-basic-table.cjs.entry.js +218 -0
- package/dist/cjs/ifx-breadcrumb-item-label.cjs.entry.js +35 -0
- package/dist/cjs/ifx-breadcrumb-item.cjs.entry.js +116 -0
- package/dist/cjs/ifx-breadcrumb.cjs.entry.js +51 -0
- package/dist/cjs/ifx-button.cjs.entry.js +156 -0
- package/dist/cjs/ifx-card-headline.cjs.entry.js +33 -0
- package/dist/cjs/ifx-card-image.cjs.entry.js +37 -0
- package/dist/cjs/ifx-card-links.cjs.entry.js +18 -0
- package/dist/cjs/ifx-card-overline.cjs.entry.js +17 -0
- package/dist/cjs/ifx-card-text.cjs.entry.js +26 -0
- package/dist/cjs/ifx-card.cjs.entry.js +77 -0
- package/dist/cjs/ifx-checkbox-group.cjs.entry.js +77 -0
- package/dist/cjs/ifx-checkbox.cjs.entry.js +255 -0
- package/dist/cjs/ifx-chip-item_2.cjs.entry.js +392 -0
- package/dist/cjs/ifx-chip.cjs.entry.js +340 -0
- package/dist/cjs/ifx-content-switcher-item.cjs.entry.js +21 -0
- package/dist/cjs/ifx-content-switcher.cjs.entry.js +188 -0
- package/dist/cjs/ifx-counter.cjs.entry.js +74 -0
- package/dist/cjs/ifx-date-picker.cjs.entry.js +203 -0
- package/dist/cjs/ifx-download.cjs.entry.js +40 -0
- package/dist/cjs/ifx-dropdown-header.cjs.entry.js +17 -0
- package/dist/cjs/ifx-dropdown-item.cjs.entry.js +68 -0
- package/dist/cjs/ifx-dropdown-menu.cjs.entry.js +71 -0
- package/dist/cjs/ifx-dropdown-separator.cjs.entry.js +17 -0
- package/dist/cjs/ifx-dropdown-trigger-button.cjs.entry.js +29 -0
- package/dist/cjs/ifx-dropdown-trigger.cjs.entry.js +19 -0
- package/dist/cjs/ifx-dropdown.cjs.entry.js +257 -0
- package/dist/cjs/ifx-error-page.cjs.entry.js +54 -0
- package/dist/cjs/ifx-file-upload.cjs.entry.js +821 -0
- package/dist/cjs/ifx-filter-accordion.cjs.entry.js +67 -0
- package/dist/cjs/ifx-filter-bar.cjs.entry.js +119 -0
- package/dist/cjs/ifx-filter-search.cjs.entry.js +62 -0
- package/dist/cjs/ifx-filter-type-group.cjs.entry.js +168 -0
- package/dist/cjs/ifx-footer-column.cjs.entry.js +18 -0
- package/dist/cjs/ifx-footer.cjs.entry.js +35 -0
- package/dist/cjs/ifx-icon-button.cjs.entry.js +106 -0
- package/dist/cjs/ifx-icon.cjs.entry.js +134 -0
- package/dist/cjs/ifx-icons-preview.cjs.entry.js +15499 -0
- package/dist/cjs/ifx-indicator.cjs.entry.js +46 -0
- package/dist/cjs/ifx-link.cjs.entry.js +125 -0
- package/dist/cjs/ifx-list-entry.cjs.entry.js +44 -0
- package/dist/cjs/ifx-list.cjs.entry.js +143 -0
- package/dist/cjs/ifx-modal.cjs.entry.js +403 -0
- package/dist/cjs/ifx-multiselect-group.cjs.entry.js +42 -0
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js +1151 -0
- package/dist/cjs/ifx-navbar-item.cjs.entry.js +438 -0
- package/dist/cjs/ifx-navbar-profile.cjs.entry.js +173 -0
- package/dist/cjs/ifx-navbar.cjs.entry.js +705 -0
- package/dist/cjs/ifx-notification.cjs.entry.js +58 -0
- package/dist/cjs/ifx-overview-table.cjs.entry.js +59 -0
- package/dist/cjs/ifx-popover.cjs.entry.js +340 -0
- package/dist/cjs/ifx-progress-bar.cjs.entry.js +46 -0
- package/dist/cjs/ifx-radio-button-group.cjs.entry.js +77 -0
- package/dist/cjs/ifx-radio-button.cjs.entry.js +148 -0
- package/dist/cjs/ifx-search-bar.cjs.entry.js +123 -0
- package/dist/cjs/ifx-search-field.cjs.entry.js +562 -0
- package/dist/cjs/ifx-segment.cjs.entry.js +46 -0
- package/dist/cjs/ifx-segmented-control.cjs.entry.js +151 -0
- package/dist/cjs/ifx-select-group.cjs.entry.js +43 -0
- package/dist/cjs/ifx-select_2.cjs.entry.js +574 -0
- package/dist/cjs/ifx-set-filter.cjs.entry.js +83 -0
- package/dist/cjs/ifx-sidebar-item.cjs.entry.js +290 -0
- package/dist/cjs/ifx-sidebar-separator.cjs.entry.js +17 -0
- package/dist/cjs/ifx-sidebar-title.cjs.entry.js +24 -0
- package/dist/cjs/ifx-sidebar.cjs.entry.js +454 -0
- package/dist/cjs/ifx-slider.cjs.entry.js +364 -0
- package/dist/cjs/ifx-spinner.cjs.entry.js +53 -0
- package/dist/cjs/ifx-status.cjs.entry.js +36 -0
- package/dist/cjs/ifx-step.cjs.entry.js +104 -0
- package/dist/cjs/ifx-stepper.cjs.entry.js +168 -0
- package/dist/cjs/ifx-switch.cjs.entry.js +190 -0
- package/dist/cjs/ifx-tab.cjs.entry.js +42 -0
- package/dist/cjs/ifx-table.cjs.entry.js +1466 -0
- package/dist/cjs/ifx-tabs.cjs.entry.js +380 -0
- package/dist/cjs/ifx-templates-ui.cjs.entry.js +58 -0
- package/dist/cjs/ifx-text-field.cjs.entry.js +131 -0
- package/dist/cjs/ifx-textarea.cjs.entry.js +132 -0
- package/dist/cjs/ifx-toast-container.cjs.entry.js +114 -0
- package/dist/cjs/ifx-toast.cjs.entry.js +193 -0
- package/dist/cjs/ifx-tooltip.cjs.entry.js +228 -0
- package/dist/cjs/ifx-tree-view-item.cjs.entry.js +404 -0
- package/dist/cjs/ifx-tree-view.cjs.entry.js +70 -0
- package/dist/cjs/index-BiOrxEib.js +3361 -0
- package/dist/cjs/index-Bp6Dd2i1.js +94 -0
- package/dist/cjs/index.cjs.js +121 -0
- package/dist/cjs/infineon-design-system-stencil.cjs.js +45 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/main.esm-Y2lKtAqX.js +56050 -0
- package/dist/cjs/popper-Dmp8OTYh.js +1792 -0
- package/dist/cjs/toast-config-D0RjnbKw.js +21 -0
- package/dist/cjs/tracking-BPjaTlNR.js +144 -0
- package/dist/cjs/url-utils-CPE59br4.js +18 -0
- package/dist/collection/collection-manifest.json +105 -0
- package/dist/collection/components/accordion/accordion.css +10 -0
- package/dist/collection/components/accordion/accordion.js +76 -0
- package/dist/collection/components/accordion/accordionItem.css +128 -0
- package/dist/collection/components/accordion/accordionItem.js +250 -0
- package/dist/collection/components/action-list/action-list-item.css +71 -0
- package/dist/collection/components/action-list/action-list-item.js +409 -0
- package/dist/collection/components/action-list/action-list.css +8 -0
- package/dist/collection/components/action-list/action-list.js +56 -0
- package/dist/collection/components/ai-label/ai-label.css +55 -0
- package/dist/collection/components/ai-label/ai-label.js +68 -0
- package/dist/collection/components/alert/alert.css +142 -0
- package/dist/collection/components/alert/alert.js +167 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item-label.css +33 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item-label.js +121 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item.css +52 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item.js +146 -0
- package/dist/collection/components/breadcrumb/breadcrumb.css +14 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +54 -0
- package/dist/collection/components/button/button.css +247 -0
- package/dist/collection/components/button/button.js +383 -0
- package/dist/collection/components/card/card-headline/card-headline.css +36 -0
- package/dist/collection/components/card/card-headline/card-headline.js +41 -0
- package/dist/collection/components/card/card-image/card-image.css +24 -0
- package/dist/collection/components/card/card-image/card-image.js +136 -0
- package/dist/collection/components/card/card-links/card-links.css +18 -0
- package/dist/collection/components/card/card-links/card-links.js +20 -0
- package/dist/collection/components/card/card-overline/card-overline.css +25 -0
- package/dist/collection/components/card/card-overline/card-overline.js +18 -0
- package/dist/collection/components/card/card-text/card-text.css +30 -0
- package/dist/collection/components/card/card-text/card-text.js +33 -0
- package/dist/collection/components/card/card.css +187 -0
- package/dist/collection/components/card/card.js +221 -0
- package/dist/collection/components/checkbox/checkbox.css +154 -0
- package/dist/collection/components/checkbox/checkbox.js +546 -0
- package/dist/collection/components/checkbox-group/checkbox-group.css +70 -0
- package/dist/collection/components/checkbox-group/checkbox-group.js +278 -0
- package/dist/collection/components/chip/chip-item/chip-item.css +39 -0
- package/dist/collection/components/chip/chip-item/chip-item.js +199 -0
- package/dist/collection/components/chip/chip.css +180 -0
- package/dist/collection/components/chip/chip.js +581 -0
- package/dist/collection/components/chip/interfaces.js +1 -0
- package/dist/collection/components/content-switcher/content-switcher-item.css +38 -0
- package/dist/collection/components/content-switcher/content-switcher-item.js +65 -0
- package/dist/collection/components/content-switcher/content-switcher.css +32 -0
- package/dist/collection/components/content-switcher/content-switcher.js +223 -0
- package/dist/collection/components/counter/counter.css +69 -0
- package/dist/collection/components/counter/counter.js +131 -0
- package/dist/collection/components/date-picker/date-picker.css +206 -0
- package/dist/collection/components/date-picker/date-picker.js +522 -0
- package/dist/collection/components/download/download.css +0 -0
- package/dist/collection/components/download/download.js +65 -0
- package/dist/collection/components/dropdown/IOpenable.js +1 -0
- package/dist/collection/components/dropdown/dropdown-header/dropdown-header.css +18 -0
- package/dist/collection/components/dropdown/dropdown-header/dropdown-header.js +19 -0
- package/dist/collection/components/dropdown/dropdown-item/dropdown-item.css +58 -0
- package/dist/collection/components/dropdown/dropdown-item/dropdown-item.js +231 -0
- package/dist/collection/components/dropdown/dropdown-menu/dropdown-menu.css +32 -0
- package/dist/collection/components/dropdown/dropdown-menu/dropdown-menu.js +177 -0
- package/dist/collection/components/dropdown/dropdown-seperator/dropdown-separator.css +5 -0
- package/dist/collection/components/dropdown/dropdown-seperator/dropdown-separator.js +19 -0
- package/dist/collection/components/dropdown/dropdown-trigger/dropdown-trigger.css +4 -0
- package/dist/collection/components/dropdown/dropdown-trigger/dropdown-trigger.js +45 -0
- package/dist/collection/components/dropdown/dropdown-trigger-button/dropdown-trigger-button.css +14 -0
- package/dist/collection/components/dropdown/dropdown-trigger-button/dropdown-trigger-button.js +155 -0
- package/dist/collection/components/dropdown/dropdown.css +3 -0
- package/dist/collection/components/dropdown/dropdown.js +519 -0
- package/dist/collection/components/error-page/error-page.css +118 -0
- package/dist/collection/components/error-page/error-page.js +155 -0
- package/dist/collection/components/file-upload/file-upload.css +209 -0
- package/dist/collection/components/file-upload/file-upload.js +1796 -0
- package/dist/collection/components/footer/footer-column.css +28 -0
- package/dist/collection/components/footer/footer-column.js +20 -0
- package/dist/collection/components/footer/footer.css +137 -0
- package/dist/collection/components/footer/footer.js +67 -0
- package/dist/collection/components/icon/figma_code_connect_icons.js +34 -0
- package/dist/collection/components/icon/icon.css +10 -0
- package/dist/collection/components/icon/icon.js +183 -0
- package/dist/collection/components/icon-button/icon-button.css +131 -0
- package/dist/collection/components/icon-button/icon-button.js +321 -0
- package/dist/collection/components/icons-preview/icons-preview.css +93 -0
- package/dist/collection/components/icons-preview/icons-preview.js +78 -0
- package/dist/collection/components/indicator/indicator.css +45 -0
- package/dist/collection/components/indicator/indicator.js +137 -0
- package/dist/collection/components/link/link.css +107 -0
- package/dist/collection/components/link/link.js +298 -0
- package/dist/collection/components/modal/modal.css +196 -0
- package/dist/collection/components/modal/modal.js +560 -0
- package/dist/collection/components/navigation/navbar/navbar-item.css +278 -0
- package/dist/collection/components/navigation/navbar/navbar-item.js +812 -0
- package/dist/collection/components/navigation/navbar/navbar-profile.js +354 -0
- package/dist/collection/components/navigation/navbar/navbar.css +417 -0
- package/dist/collection/components/navigation/navbar/navbar.js +857 -0
- package/dist/collection/components/navigation/sidebar/sidebar-item.css +201 -0
- package/dist/collection/components/navigation/sidebar/sidebar-item.js +583 -0
- package/dist/collection/components/navigation/sidebar/sidebar-seperator/sidebar-separator.css +5 -0
- package/dist/collection/components/navigation/sidebar/sidebar-seperator/sidebar-separator.js +19 -0
- package/dist/collection/components/navigation/sidebar/sidebar-title.css +25 -0
- package/dist/collection/components/navigation/sidebar/sidebar-title.js +50 -0
- package/dist/collection/components/navigation/sidebar/sidebar.css +254 -0
- package/dist/collection/components/navigation/sidebar/sidebar.js +896 -0
- package/dist/collection/components/notification/notification.css +80 -0
- package/dist/collection/components/notification/notification.js +205 -0
- package/dist/collection/components/overview-table/overview-table.css +152 -0
- package/dist/collection/components/overview-table/overview-table.js +61 -0
- package/dist/collection/components/pagination/pagination.css +190 -0
- package/dist/collection/components/pagination/pagination.js +459 -0
- package/dist/collection/components/popover/popover.css +95 -0
- package/dist/collection/components/popover/popover.js +565 -0
- package/dist/collection/components/progress-bar/progress-bar.css +38 -0
- package/dist/collection/components/progress-bar/progress-bar.js +118 -0
- package/dist/collection/components/radio-button/radio-button.css +157 -0
- package/dist/collection/components/radio-button/radio-button.js +334 -0
- package/dist/collection/components/radio-button-group/radio-button-group.css +69 -0
- package/dist/collection/components/radio-button-group/radio-button-group.js +278 -0
- package/dist/collection/components/search-bar/search-bar.css +60 -0
- package/dist/collection/components/search-bar/search-bar.js +323 -0
- package/dist/collection/components/search-field/search-field.css +235 -0
- package/dist/collection/components/search-field/search-field.js +1156 -0
- package/dist/collection/components/segmented-control/segment/segment.css +46 -0
- package/dist/collection/components/segmented-control/segment/segment.js +145 -0
- package/dist/collection/components/segmented-control/segmented-control.css +47 -0
- package/dist/collection/components/segmented-control/segmented-control.js +319 -0
- package/dist/collection/components/select/multi-select/interfaces.js +1 -0
- package/dist/collection/components/select/multi-select/multiselect-group.css +18 -0
- package/dist/collection/components/select/multi-select/multiselect-group.js +92 -0
- package/dist/collection/components/select/multi-select/multiselect-option.css +113 -0
- package/dist/collection/components/select/multi-select/multiselect-option.js +530 -0
- package/dist/collection/components/select/multi-select/multiselect.css +337 -0
- package/dist/collection/components/select/multi-select/multiselect.js +1353 -0
- package/dist/collection/components/select/single-select/select-group.css +24 -0
- package/dist/collection/components/select/single-select/select-group.js +94 -0
- package/dist/collection/components/select/single-select/select-option.css +65 -0
- package/dist/collection/components/select/single-select/select-option.js +241 -0
- package/dist/collection/components/select/single-select/select.css +213 -0
- package/dist/collection/components/select/single-select/select.js +1030 -0
- package/dist/collection/components/slider/slider.css +157 -0
- package/dist/collection/components/slider/slider.js +703 -0
- package/dist/collection/components/spinner/spinner.css +66 -0
- package/dist/collection/components/spinner/spinner.js +151 -0
- package/dist/collection/components/status/status.css +196 -0
- package/dist/collection/components/status/status.js +102 -0
- package/dist/collection/components/stepper/interfaces.js +1 -0
- package/dist/collection/components/stepper/step/step.css +189 -0
- package/dist/collection/components/stepper/step/step.js +250 -0
- package/dist/collection/components/stepper/stepper.css +58 -0
- package/dist/collection/components/stepper/stepper.js +327 -0
- package/dist/collection/components/switch/switch.css +116 -0
- package/dist/collection/components/switch/switch.js +419 -0
- package/dist/collection/components/table-advanced-version/buttonCellRenderer.js +72 -0
- package/dist/collection/components/table-advanced-version/checkboxCellRenderer.js +67 -0
- package/dist/collection/components/table-advanced-version/checkboxHeaderRenderer.js +32 -0
- package/dist/collection/components/table-advanced-version/customLoadingOverlay.js +15 -0
- package/dist/collection/components/table-advanced-version/customNoRowsOverlay.js +17 -0
- package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.css +64 -0
- package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.js +195 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.css +70 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.js +124 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.css +30 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.js +216 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.css +14 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.js +231 -0
- package/dist/collection/components/table-advanced-version/filter-type-group/utils.js +12 -0
- package/dist/collection/components/table-advanced-version/iconButtonCellRenderer.js +69 -0
- package/dist/collection/components/table-advanced-version/interfaces.js +17 -0
- package/dist/collection/components/table-advanced-version/linkCellRenderer.js +50 -0
- package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.css +7 -0
- package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.js +134 -0
- package/dist/collection/components/table-advanced-version/list/list.css +8 -0
- package/dist/collection/components/table-advanced-version/list/list.js +255 -0
- package/dist/collection/components/table-advanced-version/set-filter/set-filter.css +1 -0
- package/dist/collection/components/table-advanced-version/set-filter/setFilter.js +207 -0
- package/dist/collection/components/table-advanced-version/statusCellRenderer.js +30 -0
- package/dist/collection/components/table-advanced-version/table.css +7362 -0
- package/dist/collection/components/table-advanced-version/table.js +1598 -0
- package/dist/collection/components/table-advanced-version/tooltipCellRenderer.js +59 -0
- package/dist/collection/components/table-basic-version/customLoadingOverlay.js +15 -0
- package/dist/collection/components/table-basic-version/customNoRowsOverlay.js +17 -0
- package/dist/collection/components/table-basic-version/interfaces.js +8 -0
- package/dist/collection/components/table-basic-version/table.css +7211 -0
- package/dist/collection/components/table-basic-version/table.js +318 -0
- package/dist/collection/components/tabs/tab.css +3 -0
- package/dist/collection/components/tabs/tab.js +240 -0
- package/dist/collection/components/tabs/tabs.css +341 -0
- package/dist/collection/components/tabs/tabs.js +606 -0
- package/dist/collection/components/templates/template/template.css +76 -0
- package/dist/collection/components/templates/template/template.js +272 -0
- package/dist/collection/components/templates/templates-ui/templates-ui.css +33 -0
- package/dist/collection/components/templates/templates-ui/templates-ui.js +75 -0
- package/dist/collection/components/text-field/text-field.css +193 -0
- package/dist/collection/components/text-field/text-field.js +514 -0
- package/dist/collection/components/textarea/textarea.css +97 -0
- package/dist/collection/components/textarea/textarea.js +485 -0
- package/dist/collection/components/toast/toast-config.js +17 -0
- package/dist/collection/components/toast/toast-container/toast-container.css +58 -0
- package/dist/collection/components/toast/toast-container/toast-container.js +280 -0
- package/dist/collection/components/toast/toast-controller.js +116 -0
- package/dist/collection/components/toast/toast.css +68 -0
- package/dist/collection/components/toast/toast.js +397 -0
- package/dist/collection/components/tooltip/tooltip.css +164 -0
- package/dist/collection/components/tooltip/tooltip.js +380 -0
- package/dist/collection/components/tree-view/tree-view-item.css +112 -0
- package/dist/collection/components/tree-view/tree-view-item.js +603 -0
- package/dist/collection/components/tree-view/tree-view.css +19 -0
- package/dist/collection/components/tree-view/tree-view.js +187 -0
- package/dist/collection/global/setup.js +5 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/shared/utils/animation.js +37 -0
- package/dist/collection/shared/utils/colorNames.js +1 -0
- package/dist/collection/shared/utils/dom-ready.js +15 -0
- package/dist/collection/shared/utils/dom-utils.js +15 -0
- package/dist/collection/shared/utils/focus-trap.js +120 -0
- package/dist/collection/shared/utils/framework-detection.js +74 -0
- package/dist/collection/shared/utils/tracking.js +60 -0
- package/dist/collection/shared/utils/url-utils.js +14 -0
- package/dist/collection/storybook/public/favicon.svg +5 -0
- package/dist/components/ifx-accordion-item.d.ts +11 -0
- package/dist/components/ifx-accordion-item.js +1 -0
- package/dist/components/ifx-accordion.d.ts +11 -0
- package/dist/components/ifx-accordion.js +1 -0
- package/dist/components/ifx-action-list-item.d.ts +11 -0
- package/dist/components/ifx-action-list-item.js +1 -0
- package/dist/components/ifx-action-list.d.ts +11 -0
- package/dist/components/ifx-action-list.js +1 -0
- package/dist/components/ifx-ai-label.d.ts +11 -0
- package/dist/components/ifx-ai-label.js +1 -0
- package/dist/components/ifx-alert.d.ts +11 -0
- package/dist/components/ifx-alert.js +1 -0
- package/dist/components/ifx-basic-table.d.ts +11 -0
- package/dist/components/ifx-basic-table.js +1 -0
- package/dist/components/ifx-breadcrumb-item-label.d.ts +11 -0
- package/dist/components/ifx-breadcrumb-item-label.js +1 -0
- package/dist/components/ifx-breadcrumb-item.d.ts +11 -0
- package/dist/components/ifx-breadcrumb-item.js +1 -0
- package/dist/components/ifx-breadcrumb.d.ts +11 -0
- package/dist/components/ifx-breadcrumb.js +1 -0
- package/dist/components/ifx-button.d.ts +11 -0
- package/dist/components/ifx-button.js +1 -0
- package/dist/components/ifx-card-headline.d.ts +11 -0
- package/dist/components/ifx-card-headline.js +1 -0
- package/dist/components/ifx-card-image.d.ts +11 -0
- package/dist/components/ifx-card-image.js +1 -0
- package/dist/components/ifx-card-links.d.ts +11 -0
- package/dist/components/ifx-card-links.js +1 -0
- package/dist/components/ifx-card-overline.d.ts +11 -0
- package/dist/components/ifx-card-overline.js +1 -0
- package/dist/components/ifx-card-text.d.ts +11 -0
- package/dist/components/ifx-card-text.js +1 -0
- package/dist/components/ifx-card.d.ts +11 -0
- package/dist/components/ifx-card.js +1 -0
- package/dist/components/ifx-checkbox-group.d.ts +11 -0
- package/dist/components/ifx-checkbox-group.js +1 -0
- package/dist/components/ifx-checkbox.d.ts +11 -0
- package/dist/components/ifx-checkbox.js +1 -0
- package/dist/components/ifx-chip-item.d.ts +11 -0
- package/dist/components/ifx-chip-item.js +1 -0
- package/dist/components/ifx-chip.d.ts +11 -0
- package/dist/components/ifx-chip.js +1 -0
- package/dist/components/ifx-content-switcher-item.d.ts +11 -0
- package/dist/components/ifx-content-switcher-item.js +1 -0
- package/dist/components/ifx-content-switcher.d.ts +11 -0
- package/dist/components/ifx-content-switcher.js +1 -0
- package/dist/components/ifx-counter.d.ts +11 -0
- package/dist/components/ifx-counter.js +1 -0
- package/dist/components/ifx-date-picker.d.ts +11 -0
- package/dist/components/ifx-date-picker.js +1 -0
- package/dist/components/ifx-download.d.ts +11 -0
- package/dist/components/ifx-download.js +1 -0
- package/dist/components/ifx-dropdown-header.d.ts +11 -0
- package/dist/components/ifx-dropdown-header.js +1 -0
- package/dist/components/ifx-dropdown-item.d.ts +11 -0
- package/dist/components/ifx-dropdown-item.js +1 -0
- package/dist/components/ifx-dropdown-menu.d.ts +11 -0
- package/dist/components/ifx-dropdown-menu.js +1 -0
- package/dist/components/ifx-dropdown-separator.d.ts +11 -0
- package/dist/components/ifx-dropdown-separator.js +1 -0
- package/dist/components/ifx-dropdown-trigger-button.d.ts +11 -0
- package/dist/components/ifx-dropdown-trigger-button.js +1 -0
- package/dist/components/ifx-dropdown-trigger.d.ts +11 -0
- package/dist/components/ifx-dropdown-trigger.js +1 -0
- package/dist/components/ifx-dropdown.d.ts +11 -0
- package/dist/components/ifx-dropdown.js +1 -0
- package/dist/components/ifx-error-page.d.ts +11 -0
- package/dist/components/ifx-error-page.js +1 -0
- package/dist/components/ifx-file-upload.d.ts +11 -0
- package/dist/components/ifx-file-upload.js +1 -0
- package/dist/components/ifx-filter-accordion.d.ts +11 -0
- package/dist/components/ifx-filter-accordion.js +1 -0
- package/dist/components/ifx-filter-bar.d.ts +11 -0
- package/dist/components/ifx-filter-bar.js +1 -0
- package/dist/components/ifx-filter-search.d.ts +11 -0
- package/dist/components/ifx-filter-search.js +1 -0
- package/dist/components/ifx-filter-type-group.d.ts +11 -0
- package/dist/components/ifx-filter-type-group.js +1 -0
- package/dist/components/ifx-footer-column.d.ts +11 -0
- package/dist/components/ifx-footer-column.js +1 -0
- package/dist/components/ifx-footer.d.ts +11 -0
- package/dist/components/ifx-footer.js +1 -0
- package/dist/components/ifx-icon-button.d.ts +11 -0
- package/dist/components/ifx-icon-button.js +1 -0
- package/dist/components/ifx-icon.d.ts +11 -0
- package/dist/components/ifx-icon.js +1 -0
- package/dist/components/ifx-icons-preview.d.ts +11 -0
- package/dist/components/ifx-icons-preview.js +1 -0
- package/dist/components/ifx-indicator.d.ts +11 -0
- package/dist/components/ifx-indicator.js +1 -0
- package/dist/components/ifx-link.d.ts +11 -0
- package/dist/components/ifx-link.js +1 -0
- package/dist/components/ifx-list-entry.d.ts +11 -0
- package/dist/components/ifx-list-entry.js +1 -0
- package/dist/components/ifx-list.d.ts +11 -0
- package/dist/components/ifx-list.js +1 -0
- package/dist/components/ifx-modal.d.ts +11 -0
- package/dist/components/ifx-modal.js +1 -0
- package/dist/components/ifx-multiselect-group.d.ts +11 -0
- package/dist/components/ifx-multiselect-group.js +1 -0
- package/dist/components/ifx-multiselect-option.d.ts +11 -0
- package/dist/components/ifx-multiselect-option.js +1 -0
- package/dist/components/ifx-multiselect.d.ts +11 -0
- package/dist/components/ifx-multiselect.js +1 -0
- package/dist/components/ifx-navbar-item.d.ts +11 -0
- package/dist/components/ifx-navbar-item.js +1 -0
- package/dist/components/ifx-navbar-profile.d.ts +11 -0
- package/dist/components/ifx-navbar-profile.js +1 -0
- package/dist/components/ifx-navbar.d.ts +11 -0
- package/dist/components/ifx-navbar.js +1 -0
- package/dist/components/ifx-notification.d.ts +11 -0
- package/dist/components/ifx-notification.js +1 -0
- package/dist/components/ifx-overview-table.d.ts +11 -0
- package/dist/components/ifx-overview-table.js +1 -0
- package/dist/components/ifx-pagination.d.ts +11 -0
- package/dist/components/ifx-pagination.js +1 -0
- package/dist/components/ifx-popover.d.ts +11 -0
- package/dist/components/ifx-popover.js +1 -0
- package/dist/components/ifx-progress-bar.d.ts +11 -0
- package/dist/components/ifx-progress-bar.js +1 -0
- package/dist/components/ifx-radio-button-group.d.ts +11 -0
- package/dist/components/ifx-radio-button-group.js +1 -0
- package/dist/components/ifx-radio-button.d.ts +11 -0
- package/dist/components/ifx-radio-button.js +1 -0
- package/dist/components/ifx-search-bar.d.ts +11 -0
- package/dist/components/ifx-search-bar.js +1 -0
- package/dist/components/ifx-search-field.d.ts +11 -0
- package/dist/components/ifx-search-field.js +1 -0
- package/dist/components/ifx-segment.d.ts +11 -0
- package/dist/components/ifx-segment.js +1 -0
- package/dist/components/ifx-segmented-control.d.ts +11 -0
- package/dist/components/ifx-segmented-control.js +1 -0
- package/dist/components/ifx-select-group.d.ts +11 -0
- package/dist/components/ifx-select-group.js +1 -0
- package/dist/components/ifx-select-option.d.ts +11 -0
- package/dist/components/ifx-select-option.js +1 -0
- package/dist/components/ifx-select.d.ts +11 -0
- package/dist/components/ifx-select.js +1 -0
- package/dist/components/ifx-set-filter.d.ts +11 -0
- package/dist/components/ifx-set-filter.js +1 -0
- package/dist/components/ifx-sidebar-item.d.ts +11 -0
- package/dist/components/ifx-sidebar-item.js +1 -0
- package/dist/components/ifx-sidebar-separator.d.ts +11 -0
- package/dist/components/ifx-sidebar-separator.js +1 -0
- package/dist/components/ifx-sidebar-title.d.ts +11 -0
- package/dist/components/ifx-sidebar-title.js +1 -0
- package/dist/components/ifx-sidebar.d.ts +11 -0
- package/dist/components/ifx-sidebar.js +1 -0
- package/dist/components/ifx-slider.d.ts +11 -0
- package/dist/components/ifx-slider.js +1 -0
- package/dist/components/ifx-spinner.d.ts +11 -0
- package/dist/components/ifx-spinner.js +1 -0
- package/dist/components/ifx-status.d.ts +11 -0
- package/dist/components/ifx-status.js +1 -0
- package/dist/components/ifx-step.d.ts +11 -0
- package/dist/components/ifx-step.js +1 -0
- package/dist/components/ifx-stepper.d.ts +11 -0
- package/dist/components/ifx-stepper.js +1 -0
- package/dist/components/ifx-switch.d.ts +11 -0
- package/dist/components/ifx-switch.js +1 -0
- package/dist/components/ifx-tab.d.ts +11 -0
- package/dist/components/ifx-tab.js +1 -0
- package/dist/components/ifx-table.d.ts +11 -0
- package/dist/components/ifx-table.js +1 -0
- package/dist/components/ifx-tabs.d.ts +11 -0
- package/dist/components/ifx-tabs.js +1 -0
- package/dist/components/ifx-template.d.ts +11 -0
- package/dist/components/ifx-template.js +1 -0
- package/dist/components/ifx-templates-ui.d.ts +11 -0
- package/dist/components/ifx-templates-ui.js +1 -0
- package/dist/components/ifx-text-field.d.ts +11 -0
- package/dist/components/ifx-text-field.js +1 -0
- package/dist/components/ifx-textarea.d.ts +11 -0
- package/dist/components/ifx-textarea.js +1 -0
- package/dist/components/ifx-toast-container.d.ts +11 -0
- package/dist/components/ifx-toast-container.js +1 -0
- package/dist/components/ifx-toast.d.ts +11 -0
- package/dist/components/ifx-toast.js +1 -0
- package/dist/components/ifx-tooltip.d.ts +11 -0
- package/dist/components/ifx-tooltip.js +1 -0
- package/dist/components/ifx-tree-view-item.d.ts +11 -0
- package/dist/components/ifx-tree-view-item.js +1 -0
- package/dist/components/ifx-tree-view.d.ts +11 -0
- package/dist/components/ifx-tree-view.js +1 -0
- package/dist/components/index.d.ts +221 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-6rWkhPoz.js +1 -0
- package/dist/components/p-94ZtGp9D.js +1 -0
- package/dist/components/p-B2BXeRbX.js +1 -0
- package/dist/components/p-B9Se0P8X.js +1 -0
- package/dist/components/p-BQusv3OP.js +1 -0
- package/dist/components/p-BT3Wl1wi.js +1 -0
- package/dist/components/p-BT_2CyMS.js +1 -0
- package/dist/components/p-BfP9ezJQ.js +1 -0
- package/dist/components/p-BfTCfPZ1.js +6 -0
- package/dist/components/p-BsM3UmwT.js +1 -0
- package/dist/components/p-BwNZsorZ.js +1 -0
- package/dist/components/p-ByHlxOiP.js +1 -0
- package/dist/components/p-By_rGGZ6.js +1 -0
- package/dist/components/p-C0ZpAymO.js +1 -0
- package/dist/components/p-C2NpYb5B.js +1 -0
- package/dist/components/p-CFIxSP2i.js +1 -0
- package/dist/components/p-CHllTWC_.js +1 -0
- package/dist/components/p-CKEkzlHL.js +1 -0
- package/dist/components/p-COoPXL_o.js +1 -0
- package/dist/components/p-CZkp3I3Z.js +1 -0
- package/dist/components/p-Cof8Iu4T.js +1 -0
- package/dist/components/p-D8rBTzjL.js +1 -0
- package/dist/components/p-DMAv4MDG.js +1 -0
- package/dist/components/p-DqacDHEO.js +1 -0
- package/dist/components/p-M9y7mTsF.js +1 -0
- package/dist/components/p-OJkXkXZS.js +1 -0
- package/dist/components/p-QgsB_-OM.js +1 -0
- package/dist/components/p-tjdx4F2u.js +1 -0
- package/dist/components/p-uQx-50k_.js +1 -0
- package/dist/docs.d.ts +480 -0
- package/dist/docs.json +21723 -0
- package/dist/esm/animation-BT3Wl1wi.js +39 -0
- package/dist/esm/dom-utils-CtINY9El.js +17 -0
- package/dist/esm/icons-ZeLzvI0y.js +1331 -0
- package/dist/esm/ifx-accordion-item.entry.js +116 -0
- package/dist/esm/ifx-accordion.entry.js +38 -0
- package/dist/esm/ifx-action-list-item.entry.js +236 -0
- package/dist/esm/ifx-action-list.entry.js +28 -0
- package/dist/esm/ifx-ai-label.entry.js +21 -0
- package/dist/esm/ifx-alert_2.entry.js +214 -0
- package/dist/esm/ifx-basic-table.entry.js +216 -0
- package/dist/esm/ifx-breadcrumb-item-label.entry.js +33 -0
- package/dist/esm/ifx-breadcrumb-item.entry.js +114 -0
- package/dist/esm/ifx-breadcrumb.entry.js +49 -0
- package/dist/esm/ifx-button.entry.js +154 -0
- package/dist/esm/ifx-card-headline.entry.js +31 -0
- package/dist/esm/ifx-card-image.entry.js +35 -0
- package/dist/esm/ifx-card-links.entry.js +16 -0
- package/dist/esm/ifx-card-overline.entry.js +15 -0
- package/dist/esm/ifx-card-text.entry.js +24 -0
- package/dist/esm/ifx-card.entry.js +75 -0
- package/dist/esm/ifx-checkbox-group.entry.js +75 -0
- package/dist/esm/ifx-checkbox.entry.js +253 -0
- package/dist/esm/ifx-chip-item_2.entry.js +389 -0
- package/dist/esm/ifx-chip.entry.js +338 -0
- package/dist/esm/ifx-content-switcher-item.entry.js +19 -0
- package/dist/esm/ifx-content-switcher.entry.js +186 -0
- package/dist/esm/ifx-counter.entry.js +72 -0
- package/dist/esm/ifx-date-picker.entry.js +201 -0
- package/dist/esm/ifx-download.entry.js +38 -0
- package/dist/esm/ifx-dropdown-header.entry.js +15 -0
- package/dist/esm/ifx-dropdown-item.entry.js +66 -0
- package/dist/esm/ifx-dropdown-menu.entry.js +69 -0
- package/dist/esm/ifx-dropdown-separator.entry.js +15 -0
- package/dist/esm/ifx-dropdown-trigger-button.entry.js +27 -0
- package/dist/esm/ifx-dropdown-trigger.entry.js +17 -0
- package/dist/esm/ifx-dropdown.entry.js +255 -0
- package/dist/esm/ifx-error-page.entry.js +52 -0
- package/dist/esm/ifx-file-upload.entry.js +819 -0
- package/dist/esm/ifx-filter-accordion.entry.js +65 -0
- package/dist/esm/ifx-filter-bar.entry.js +117 -0
- package/dist/esm/ifx-filter-search.entry.js +60 -0
- package/dist/esm/ifx-filter-type-group.entry.js +166 -0
- package/dist/esm/ifx-footer-column.entry.js +16 -0
- package/dist/esm/ifx-footer.entry.js +33 -0
- package/dist/esm/ifx-icon-button.entry.js +104 -0
- package/dist/esm/ifx-icon.entry.js +132 -0
- package/dist/esm/ifx-icons-preview.entry.js +15497 -0
- package/dist/esm/ifx-indicator.entry.js +44 -0
- package/dist/esm/ifx-link.entry.js +123 -0
- package/dist/esm/ifx-list-entry.entry.js +42 -0
- package/dist/esm/ifx-list.entry.js +141 -0
- package/dist/esm/ifx-modal.entry.js +401 -0
- package/dist/esm/ifx-multiselect-group.entry.js +40 -0
- package/dist/esm/ifx-multiselect_2.entry.js +1148 -0
- package/dist/esm/ifx-navbar-item.entry.js +436 -0
- package/dist/esm/ifx-navbar-profile.entry.js +171 -0
- package/dist/esm/ifx-navbar.entry.js +703 -0
- package/dist/esm/ifx-notification.entry.js +56 -0
- package/dist/esm/ifx-overview-table.entry.js +57 -0
- package/dist/esm/ifx-popover.entry.js +338 -0
- package/dist/esm/ifx-progress-bar.entry.js +44 -0
- package/dist/esm/ifx-radio-button-group.entry.js +75 -0
- package/dist/esm/ifx-radio-button.entry.js +146 -0
- package/dist/esm/ifx-search-bar.entry.js +121 -0
- package/dist/esm/ifx-search-field.entry.js +560 -0
- package/dist/esm/ifx-segment.entry.js +44 -0
- package/dist/esm/ifx-segmented-control.entry.js +149 -0
- package/dist/esm/ifx-select-group.entry.js +41 -0
- package/dist/esm/ifx-select_2.entry.js +571 -0
- package/dist/esm/ifx-set-filter.entry.js +81 -0
- package/dist/esm/ifx-sidebar-item.entry.js +288 -0
- package/dist/esm/ifx-sidebar-separator.entry.js +15 -0
- package/dist/esm/ifx-sidebar-title.entry.js +22 -0
- package/dist/esm/ifx-sidebar.entry.js +452 -0
- package/dist/esm/ifx-slider.entry.js +362 -0
- package/dist/esm/ifx-spinner.entry.js +51 -0
- package/dist/esm/ifx-status.entry.js +34 -0
- package/dist/esm/ifx-step.entry.js +102 -0
- package/dist/esm/ifx-stepper.entry.js +166 -0
- package/dist/esm/ifx-switch.entry.js +188 -0
- package/dist/esm/ifx-tab.entry.js +40 -0
- package/dist/esm/ifx-table.entry.js +1464 -0
- package/dist/esm/ifx-tabs.entry.js +378 -0
- package/dist/esm/ifx-templates-ui.entry.js +56 -0
- package/dist/esm/ifx-text-field.entry.js +129 -0
- package/dist/esm/ifx-textarea.entry.js +130 -0
- package/dist/esm/ifx-toast-container.entry.js +112 -0
- package/dist/esm/ifx-toast.entry.js +191 -0
- package/dist/esm/ifx-tooltip.entry.js +226 -0
- package/dist/esm/ifx-tree-view-item.entry.js +402 -0
- package/dist/esm/ifx-tree-view.entry.js +68 -0
- package/dist/esm/index-BfTCfPZ1.js +92 -0
- package/dist/esm/index-CY4s4b6R.js +3330 -0
- package/dist/esm/index.js +119 -0
- package/dist/esm/infineon-design-system-stencil.js +41 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/main.esm-ByHlxOiP.js +56045 -0
- package/dist/esm/popper-BfP9ezJQ.js +1790 -0
- package/dist/esm/toast-config-CvlFl4bk.js +19 -0
- package/dist/esm/tracking-DNHOWgWh.js +141 -0
- package/dist/esm/url-utils-QgsB_-OM.js +16 -0
- package/dist/hydrate/index.d.ts +287 -0
- package/dist/hydrate/index.js +115426 -0
- package/dist/hydrate/index.mjs +115416 -0
- package/dist/hydrate/package.json +12 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/infineon-design-system-stencil/index.esm.js +1 -0
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.css +1 -0
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -0
- package/dist/infineon-design-system-stencil/p-00e44b86.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-04b2ca48.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-056c97d1.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-068f8d94.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-080482d5.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-0824da97.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-0eb80b01.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-1bde9db6.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-1c5cdf00.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-1d282105.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-1dba3e82.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-1ee2ae36.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-200b5cf4.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-25b276e7.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-27d6189d.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-33cee615.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-387628c3.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-3d79452f.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-3d99137a.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-46025b1d.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-49abd04b.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-4b0cfd87.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-507c06f6.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-58d3465b.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-5ca1e5f9.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-5e787c60.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-622b768a.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-62c217d9.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-633f7103.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-6ad38b43.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-6bc72aa7.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-6d5608f3.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-6dbe3565.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-6feba4bd.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-7637f1a9.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-767d1120.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-7a632c59.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-7cd30e96.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-7cfaf0b0.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-7d1bce96.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-7e39ffb5.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-83ac00d0.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-83ed07c5.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-85699507.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-85cab510.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-86f8257b.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-8712ed7c.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-89ca7297.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-8a9c392b.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-8d6f90ce.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-8f7f4367.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-90055cc1.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-91f93a99.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-981a5d47.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-982379c6.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-98b1d319.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-9ed59a1b.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-BT3Wl1wi.js +1 -0
- package/dist/infineon-design-system-stencil/p-BfP9ezJQ.js +1 -0
- package/dist/infineon-design-system-stencil/p-BfTCfPZ1.js +6 -0
- package/dist/infineon-design-system-stencil/p-ByHlxOiP.js +1 -0
- package/dist/infineon-design-system-stencil/p-CY4s4b6R.js +3 -0
- package/dist/infineon-design-system-stencil/p-CtINY9El.js +1 -0
- package/dist/infineon-design-system-stencil/p-CvlFl4bk.js +1 -0
- package/dist/infineon-design-system-stencil/p-DNHOWgWh.js +1 -0
- package/dist/infineon-design-system-stencil/p-QgsB_-OM.js +1 -0
- package/dist/infineon-design-system-stencil/p-ZeLzvI0y.js +1 -0
- package/dist/infineon-design-system-stencil/p-a64b4893.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-a749b6af.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-adee38e7.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-b024ca63.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-b0db38b1.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-b52e98b3.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-b8027aac.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-bc74a63e.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-bdc53480.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-bfd5c624.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-c2955de7.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-c436d915.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-c8de164f.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-d3194d57.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-d7614c74.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-d96c1ee9.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-db3f7660.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-e3fc01c1.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-e616abd0.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-e97262eb.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-ea5f0a88.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-ec37b6a4.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-ec538561.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-ee84f6e7.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-f290a76e.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-f4e8f76a.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-f4f3916e.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-f5b65911.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-f740a48b.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-f9273ee7.entry.js +1 -0
- package/dist/infineon-design-system-stencil/p-fbdef7ac.entry.js +1 -0
- package/dist/loader/cdn.js +1 -0
- package/dist/loader/index.cjs.js +1 -0
- package/dist/loader/index.d.ts +24 -0
- package/dist/loader/index.es2017.js +1 -0
- package/dist/loader/index.js +2 -0
- package/dist/types/components/accordion/accordion.d.ts +8 -0
- package/dist/types/components/accordion/accordionItem.d.ts +31 -0
- package/dist/types/components/action-list/action-list-item.d.ts +59 -0
- package/dist/types/components/action-list/action-list.d.ts +9 -0
- package/dist/types/components/ai-label/ai-label.d.ts +7 -0
- package/dist/types/components/alert/alert.d.ts +22 -0
- package/dist/types/components/breadcrumb/breadcrumb-item-label.d.ts +14 -0
- package/dist/types/components/breadcrumb/breadcrumb-item.d.ts +25 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +6 -0
- package/dist/types/components/button/button.d.ts +41 -0
- package/dist/types/components/card/card-headline/card-headline.d.ts +7 -0
- package/dist/types/components/card/card-image/card-image.d.ts +17 -0
- package/dist/types/components/card/card-links/card-links.d.ts +4 -0
- package/dist/types/components/card/card-overline/card-overline.d.ts +3 -0
- package/dist/types/components/card/card-text/card-text.d.ts +6 -0
- package/dist/types/components/card/card.d.ts +28 -0
- package/dist/types/components/checkbox/checkbox.d.ts +88 -0
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +30 -0
- package/dist/types/components/chip/chip-item/chip-item.d.ts +23 -0
- package/dist/types/components/chip/chip.d.ts +54 -0
- package/dist/types/components/chip/interfaces.d.ts +13 -0
- package/dist/types/components/content-switcher/content-switcher-item.d.ts +7 -0
- package/dist/types/components/content-switcher/content-switcher.d.ts +74 -0
- package/dist/types/components/counter/counter.d.ts +19 -0
- package/dist/types/components/date-picker/date-picker.d.ts +83 -0
- package/dist/types/components/download/download.d.ts +5 -0
- package/dist/types/components/dropdown/IOpenable.d.ts +3 -0
- package/dist/types/components/dropdown/dropdown-header/dropdown-header.d.ts +3 -0
- package/dist/types/components/dropdown/dropdown-item/dropdown-item.d.ts +23 -0
- package/dist/types/components/dropdown/dropdown-menu/dropdown-menu.d.ts +23 -0
- package/dist/types/components/dropdown/dropdown-seperator/dropdown-separator.d.ts +3 -0
- package/dist/types/components/dropdown/dropdown-trigger/dropdown-trigger.d.ts +6 -0
- package/dist/types/components/dropdown/dropdown-trigger-button/dropdown-trigger-button.d.ts +16 -0
- package/dist/types/components/dropdown/dropdown.d.ts +55 -0
- package/dist/types/components/error-page/error-page.d.ts +15 -0
- package/dist/types/components/file-upload/file-upload.d.ts +205 -0
- package/dist/types/components/footer/footer-column.d.ts +4 -0
- package/dist/types/components/footer/footer.d.ts +11 -0
- package/dist/types/components/icon/figma_code_connect_icons.d.ts +1 -0
- package/dist/types/components/icon/icon.d.ts +31 -0
- package/dist/types/components/icon-button/icon-button.d.ts +57 -0
- package/dist/types/components/icons-preview/icons-preview.d.ts +18 -0
- package/dist/types/components/indicator/indicator.d.ts +17 -0
- package/dist/types/components/link/link.d.ts +48 -0
- package/dist/types/components/modal/modal.d.ts +97 -0
- package/dist/types/components/navigation/navbar/navbar-item.d.ts +73 -0
- package/dist/types/components/navigation/navbar/navbar-profile.d.ts +41 -0
- package/dist/types/components/navigation/navbar/navbar.d.ts +70 -0
- package/dist/types/components/navigation/sidebar/sidebar-item.d.ts +65 -0
- package/dist/types/components/navigation/sidebar/sidebar-seperator/sidebar-separator.d.ts +3 -0
- package/dist/types/components/navigation/sidebar/sidebar-title.d.ts +7 -0
- package/dist/types/components/navigation/sidebar/sidebar.d.ts +87 -0
- package/dist/types/components/notification/notification.d.ts +23 -0
- package/dist/types/components/overview-table/overview-table.d.ts +11 -0
- package/dist/types/components/pagination/pagination.d.ts +45 -0
- package/dist/types/components/popover/popover.d.ts +55 -0
- package/dist/types/components/progress-bar/progress-bar.d.ts +14 -0
- package/dist/types/components/radio-button/radio-button.d.ts +37 -0
- package/dist/types/components/radio-button-group/radio-button-group.d.ts +30 -0
- package/dist/types/components/search-bar/search-bar.d.ts +60 -0
- package/dist/types/components/search-field/search-field.d.ts +178 -0
- package/dist/types/components/segmented-control/segment/segment.d.ts +16 -0
- package/dist/types/components/segmented-control/segmented-control.d.ts +40 -0
- package/dist/types/components/select/multi-select/interfaces.d.ts +9 -0
- package/dist/types/components/select/multi-select/multiselect-group.d.ts +15 -0
- package/dist/types/components/select/multi-select/multiselect-option.d.ts +43 -0
- package/dist/types/components/select/multi-select/multiselect.d.ts +123 -0
- package/dist/types/components/select/single-select/select-group.d.ts +17 -0
- package/dist/types/components/select/single-select/select-option.d.ts +31 -0
- package/dist/types/components/select/single-select/select.d.ts +129 -0
- package/dist/types/components/slider/slider.d.ts +76 -0
- package/dist/types/components/spinner/spinner.d.ts +27 -0
- package/dist/types/components/status/status.d.ts +11 -0
- package/dist/types/components/stepper/interfaces.d.ts +7 -0
- package/dist/types/components/stepper/step/step.d.ts +24 -0
- package/dist/types/components/stepper/stepper.d.ts +35 -0
- package/dist/types/components/switch/switch.d.ts +112 -0
- package/dist/types/components/table-advanced-version/buttonCellRenderer.d.ts +15 -0
- package/dist/types/components/table-advanced-version/checkboxCellRenderer.d.ts +15 -0
- package/dist/types/components/table-advanced-version/checkboxHeaderRenderer.d.ts +14 -0
- package/dist/types/components/table-advanced-version/customLoadingOverlay.d.ts +9 -0
- package/dist/types/components/table-advanced-version/customNoRowsOverlay.d.ts +9 -0
- package/dist/types/components/table-advanced-version/filter-bar/filter-bar.d.ts +26 -0
- package/dist/types/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.d.ts +20 -0
- package/dist/types/components/table-advanced-version/filter-type-group/filter-search/filter-search.d.ts +22 -0
- package/dist/types/components/table-advanced-version/filter-type-group/filter-type-group.d.ts +29 -0
- package/dist/types/components/table-advanced-version/filter-type-group/utils.d.ts +5 -0
- package/dist/types/components/table-advanced-version/iconButtonCellRenderer.d.ts +15 -0
- package/dist/types/components/table-advanced-version/interfaces.d.ts +53 -0
- package/dist/types/components/table-advanced-version/linkCellRenderer.d.ts +12 -0
- package/dist/types/components/table-advanced-version/list/list-entry/list-entry.d.ts +11 -0
- package/dist/types/components/table-advanced-version/list/list.d.ts +38 -0
- package/dist/types/components/table-advanced-version/set-filter/setFilter.d.ts +20 -0
- package/dist/types/components/table-advanced-version/statusCellRenderer.d.ts +8 -0
- package/dist/types/components/table-advanced-version/table.d.ts +146 -0
- package/dist/types/components/table-advanced-version/tooltipCellRenderer.d.ts +12 -0
- package/dist/types/components/table-basic-version/customLoadingOverlay.d.ts +9 -0
- package/dist/types/components/table-basic-version/customNoRowsOverlay.d.ts +9 -0
- package/dist/types/components/table-basic-version/interfaces.d.ts +9 -0
- package/dist/types/components/table-basic-version/table.d.ts +34 -0
- package/dist/types/components/tabs/tab.d.ts +26 -0
- package/dist/types/components/tabs/tabs.d.ts +64 -0
- package/dist/types/components/templates/template/template.d.ts +37 -0
- package/dist/types/components/templates/templates-ui/templates-ui.d.ts +10 -0
- package/dist/types/components/text-field/text-field.d.ts +55 -0
- package/dist/types/components/textarea/textarea.d.ts +54 -0
- package/dist/types/components/toast/toast-config.d.ts +7 -0
- package/dist/types/components/toast/toast-container/toast-container.d.ts +43 -0
- package/dist/types/components/toast/toast-controller.d.ts +51 -0
- package/dist/types/components/toast/toast.d.ts +58 -0
- package/dist/types/components/tooltip/tooltip.d.ts +34 -0
- package/dist/types/components/tree-view/tree-view-item.d.ts +79 -0
- package/dist/types/components/tree-view/tree-view.d.ts +21 -0
- package/dist/types/components.d.ts +8540 -0
- package/dist/types/global/setup.d.ts +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/shared/utils/animation.d.ts +13 -0
- package/dist/types/shared/utils/colorNames.d.ts +1 -0
- package/dist/types/shared/utils/dom-ready.d.ts +1 -0
- package/dist/types/shared/utils/dom-utils.d.ts +1 -0
- package/dist/types/shared/utils/focus-trap.d.ts +33 -0
- package/dist/types/shared/utils/framework-detection.d.ts +1 -0
- package/dist/types/shared/utils/tracking.d.ts +10 -0
- package/dist/types/shared/utils/url-utils.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1879 -0
- package/package.json +193 -3
- package/readme.md +229 -0
- package/README.md +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(t){this.frameworkOverrides=t}getListeners(t,e,i){const s=e?this.allAsyncListeners:this.allSyncListeners;let o=s.get(t);return!o&&i&&(o=new Set,s.set(t,o)),o}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(t,e,i=!1){this.getListeners(t,i,!0).add(e)}removeEventListener(t,e,i=!1){const s=this.getListeners(t,i,!1);s&&(s.delete(e),0===s.size&&(i?this.allAsyncListeners:this.allSyncListeners).delete(t))}addGlobalListener(t,e=!1){this.getGlobalListeners(e).add(t)}removeGlobalListener(t,e=!1){this.getGlobalListeners(e).delete(t)}dispatchEvent(t){this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(t){this.firedEvents[t.type]||this.dispatchEvent(t)}dispatchToListeners(t,e){const i=t.type;if(e&&"event"in t){const e=t.event;e instanceof Event&&(t.eventPath=e.composedPath())}const{frameworkOverrides:s}=this,o=t=>{const i=s?()=>s.wrapIncoming(t):t;e?this.dispatchAsync(i):i()},n=this.getListeners(i,e,!1);if((n?.size??0)>0){const e=new Set(n);for(const i of e)n?.has(i)&&o((()=>i(t)))}const r=this.getGlobalListeners(e);if(r.size>0){const e=new Set(r);for(const s of e)o((()=>s(i,t)))}}getGlobalListeners(t){return t?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(t){if(this.asyncFunctionsQueue.push(t),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const t=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(const e of t)e()}};function e(t){return null==t||""===t?null:t}function i(t){return null!=t&&""!==t}function s(t){return!i(t)}function o(t){return null!=t&&"function"==typeof t.toString?t.toString():null}function n(t,e){return(t?JSON.stringify(t):null)===(e?JSON.stringify(e):null)}function r(t,e,i=!1){const s=null==t,o=null==e;if(t?.toNumber&&(t=t.toNumber()),e?.toNumber&&(e=e.toNumber()),s&&o)return 0;if(s)return-1;if(o)return 1;function n(t,e){return t>e?1:t<e?-1:0}if("string"!=typeof t)return n(t,e);if(!i)return n(t,e);try{return t.localeCompare(e)}catch(i){return n(t,e)}}var l=/[&<>"']/g,a={"&":"&","<":"<",">":">",'"':""","'":"'"};function h(t){return t?.toString().toString()??null}function c(t){return h(t)?.replace(l,(t=>a[t]))??null}function u(t){return t.eRootDiv.getRootNode()}function d(t){return u(t).activeElement}function g(t){const{gos:e,eRootDiv:s}=t;let o=null;const n=e.get("getDocument");return n&&i(n)?o=n():s&&(o=s.ownerDocument),o&&i(o)?o:document}function p(t){const e=d(t);return null===e||e===g(t).body}function f(t){return g(t).defaultView||window}function m(t){let e=null,i=null;try{e=g(t).fullscreenElement}catch(t){}finally{e||(e=u(t));i=e.querySelector("body")||(e instanceof ShadowRoot?e:e instanceof Document?e?.documentElement:e)}return i}function w(t,e,i){null==i||"string"==typeof i&&""==i?C(t,e):v(t,e,i)}function v(t,e,i){t.setAttribute(b(e),i.toString())}function C(t,e){t.removeAttribute(b(e))}function b(t){return`aria-${t}`}function y(t,e){e?t.setAttribute("role",e):t.removeAttribute("role")}function S(t,e){w(t,"label",e)}function x(t,e){w(t,"labelledby",e)}function R(t,e){w(t,"live",e)}function F(t,e){w(t,"hidden",e)}function k(t,e){v(t,"expanded",e)}function P(t,e){v(t,"rowindex",e)}function D(t,e){v(t,"colindex",e)}function M(t,e){w(t,"selected",e)}function T(t,e){w(t,"owns",e)}function E(t,e){return void 0===e?t("ariaIndeterminate","indeterminate"):!0===e?t("ariaChecked","checked"):t("ariaUnchecked","unchecked")}var A="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function I(t){return!!t&&(!!t.matches("input, select, button, textarea")&&(!!t.matches(A)&&Z(t)))}function H(t,e,i={}){const{skipAriaHidden:s}=i;t.classList.toggle("ag-hidden",!e),s||F(t,!e)}function O(t,e){const i="disabled",s=e?t=>t.setAttribute(i,""):t=>t.removeAttribute(i);s(t);const o=t.querySelectorAll("input")??[];for(const t of o)s(t)}function N(t,e,i){let s=0;for(;t;){if(t.classList.contains(e))return!0;if(t=t.parentElement,"number"==typeof i){if(++s>i)break}else if(t===i)break}return!1}function B(t){const{height:e,width:i,borderTopWidth:s,borderRightWidth:o,borderBottomWidth:n,borderLeftWidth:r,paddingTop:l,paddingRight:a,paddingBottom:h,paddingLeft:c,marginTop:u,marginRight:d,marginBottom:g,marginLeft:p,boxSizing:f}=window.getComputedStyle(t),m=Number.parseFloat;return{height:m(e||"0"),width:m(i||"0"),borderTopWidth:m(s||"0"),borderRightWidth:m(o||"0"),borderBottomWidth:m(n||"0"),borderLeftWidth:m(r||"0"),paddingTop:m(l||"0"),paddingRight:m(a||"0"),paddingBottom:m(h||"0"),paddingLeft:m(c||"0"),marginTop:m(u||"0"),marginRight:m(d||"0"),marginBottom:m(g||"0"),marginLeft:m(p||"0"),boxSizing:f}}function G(t){const e=B(t);return"border-box"===e.boxSizing?e.height-e.paddingTop-e.paddingBottom-e.borderTopWidth-e.borderBottomWidth:e.height}function V(t){const e=B(t);return"border-box"===e.boxSizing?e.width-e.paddingLeft-e.paddingRight-e.borderLeftWidth-e.borderRightWidth:e.width}function L(t){const{height:e,marginBottom:i,marginTop:s}=B(t);return Math.floor(e+i+s)}function z(t){const{width:e,marginLeft:i,marginRight:s}=B(t);return Math.floor(e+i+s)}function $(t){const e=t.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:s,borderRightWidth:o,borderBottomWidth:n}=B(t);return{top:e.top+(i||0),left:e.left+(s||0),right:e.right+(o||0),bottom:e.bottom+(n||0)}}function W(t,e){let i=t.scrollLeft;return e&&(i=Math.abs(i)),i}function U(t,e,i){i&&(e*=-1),t.scrollLeft=e}function j(t){for(;t?.firstChild;)t.firstChild.remove()}function K(t){t?.parentNode&&t.remove()}function q(t){return!!t.offsetParent}function Z(t){return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!q(t)||"visible"!==window.getComputedStyle(t).visibility)}function _(t){const e=document.createElement("div");return e.innerHTML=(t||"").trim(),e.firstChild}function Y(t,e,i){i&&i.nextSibling===e||(t.firstChild?i?i.nextSibling?t.insertBefore(e,i.nextSibling):t.appendChild(e):t.firstChild&&t.firstChild!==e&&t.insertAdjacentElement("afterbegin",e):t.appendChild(e))}function Q(t,e){for(let i=0;i<e.length;i++){const s=e[i],o=t.children[i];o!==s&&t.insertBefore(s,o)}}function J(t,e){if(e)for(const i of Object.keys(e)){const s=e[i];if(!i?.length||null==s)continue;const o=i.replace(/[A-Z]/g,(t=>`-${t.toLocaleLowerCase()}`)),n=s.toString(),r=n.replace(/\s*!important/g,"");t.style.setProperty(o,r,r.length!=n.length?"important":void 0)}}function X(t){return()=>{const e=t();return!e||tt(e)||et(e)}}function tt(t){return t.clientWidth<t.scrollWidth}function et(t){return t.clientHeight<t.scrollHeight}function it(t,e){"flex"===e?(t.style.removeProperty("width"),t.style.removeProperty("minWidth"),t.style.removeProperty("maxWidth"),t.style.flex="1 1 auto"):st(t,e)}function st(t,e){e=nt(e),t.style.width=e,t.style.maxWidth=e,t.style.minWidth=e}function ot(t,e){e=nt(e),t.style.height=e,t.style.maxHeight=e,t.style.minHeight=e}function nt(t){return"number"==typeof t?`${t}px`:t}function rt(t){return t instanceof Node||t instanceof HTMLElement}function lt(t,e,i){null==i||""===i?t.removeAttribute(e):t.setAttribute(e,i.toString())}function at(t,e,i){const s=f(t).ResizeObserver,o=s?new s(i):null;return o?.observe(e),()=>o?.disconnect()}function ht(t,e){const i=f(t);i.requestAnimationFrame?i.requestAnimationFrame(e):i.webkitRequestAnimationFrame?i.webkitRequestAnimationFrame(e):i.setTimeout(e,0)}var ct,ut="data-ref";function dt(){return ct??(ct=document.createTextNode(" ")),ct.cloneNode()}function gt(t){const{attrs:e,children:i,cls:s,ref:o,role:n,tag:r}=t,l=document.createElement(r);if(s&&(l.className=s),o&&l.setAttribute(ut,o),n&&l.setAttribute("role",n),e)for(const t of Object.keys(e))l.setAttribute(t,e[t]);if(i)if("string"==typeof i)l.textContent=i;else{let t=!0;for(const e of i)e&&("string"==typeof e?(l.appendChild(document.createTextNode(e)),t=!1):"function"==typeof e?l.appendChild(e()):(t&&(l.appendChild(dt()),t=!1),l.append(gt(e)),l.appendChild(dt())))}return l}var pt=["touchstart","touchend","touchmove","touchcancel","scroll"],ft=["wheel"],mt={},wt=(()=>{const t={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return e=>{if("boolean"==typeof mt[e])return mt[e];const i=document.createElement(t[e]||"div");return mt[e="on"+e]=e in i}})();function vt(t,e){return!(!e||!t)&&function(t){const e=t;return e.path?e.path:e.composedPath?e.composedPath():function(t){const e=[];let i=t.target;for(;i;)e.push(i),i=i.parentElement;return e}(e)}(e).indexOf(t)>=0}function Ct(t,e,i){if(0===i)return!1;const s=Math.abs(t.clientX-e.clientX),o=Math.abs(t.clientY-e.clientY);return Math.max(s,o)<=i}var bt=(t,e)=>{const i=t.identifier;for(let t=0,s=e.length;t<s;++t){const s=e[t];if(s.identifier===i)return s}return null};function yt(t,e){return t.gos.isElementInThisInstance(e.target)}var St=(t,...e)=>{for(const i of e){const[e,s,o,n]=i;e.addEventListener(s,o,n),t.push(i)}},xt=t=>{if(t){for(const[e,i,s,o]of t)e.removeEventListener(i,s,o);t.length=0}},Rt=t=>{t.cancelable&&t.preventDefault()};function Ft(t,e){return e}function kt(t){return t?.getLocaleTextFunc()??Ft}var Pt=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(t){this.beans=t,this.stubContext=t.context,this.eventSvc=t.eventSvc,this.gos=t.gos}destroy(){const{destroyFunctions:t}=this;for(let e=0;e<t.length;e++)t[e]();t.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,i,s){this.localEventService||(this.localEventService=new t),this.localEventService.addEventListener(e,i,s)}removeEventListener(t,e,i){this.localEventService?.removeEventListener(t,e,i)}dispatchLocalEvent(t){this.localEventService?.dispatchEvent(t)}addManagedElementListeners(t,e){return this._setupListeners(t,e)}addManagedEventListeners(t){return this._setupListeners(this.eventSvc,t)}addManagedListeners(t,e){return this._setupListeners(t,e)}_setupListeners(t,e){const i=[];for(const s of Object.keys(e)){const o=e[s];o&&i.push(this._setupListener(t,s,o))}return i}_setupListener(t,e,i){if(this.destroyed)return()=>null;let s;if(function(t){return void 0!==t.__addEventListener}(t))t.__addEventListener(e,i),s=()=>(t.__removeEventListener(e,i),null);else{const o=function(t){return"global"===t.eventServiceType}(t);t instanceof HTMLElement?function(t,e,i){const s=(t=>{const e=pt.includes(t),i=ft.includes(t);return!!e||!i&&void 0})(e);let o;null!=s&&(o={passive:s}),t.addEventListener(e,i,o)}(t,e,i):o?t.addListener(e,i):t.addEventListener(e,i),s=o?()=>(t.removeListener(e,i),null):()=>(t.removeEventListener(e,i),null)}return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter((t=>t!==s)),null)}setupPropertyListener(t,e){const{gos:i}=this;i.addPropertyEventListener(t,e);const s=()=>(i.removePropertyEventListener(t,e),null);return this.destroyFunctions.push(s),()=>(s(),this.destroyFunctions=this.destroyFunctions.filter((t=>t!==s)),null)}addManagedPropertyListener(t,e){return this.destroyed?()=>null:this.setupPropertyListener(t,e)}addManagedPropertyListeners(t,e){if(this.destroyed)return;const i=t.join("-")+this.propertyListenerId++,s=t=>{if(t.changeSet){if(t.changeSet&&t.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=t.changeSet.id}e({type:"propertyChanged",changeSet:t.changeSet,source:t.source})};for(const e of t)this.setupPropertyListener(e,s)}getLocaleTextFunc(){return kt(this.beans.localeSvc)}addDestroyFunc(t){this.isAlive()?this.destroyFunctions.push(t):t()}createOptionalManagedBean(t,e){return t?this.createManagedBean(t,e):void 0}createManagedBean(t,e){const i=this.createBean(t,e);return this.addDestroyFunc(this.destroyBean.bind(this,t,e)),i}createBean(t,e,i){return(e||this.stubContext).createBean(t,i)}destroyBean(t,e){return(e||this.stubContext).destroyBean(t)}destroyBeans(t,e){return(e||this.stubContext).destroyBeans(t)}},Dt=class extends Pt{},Mt={};function Tt(t,e){Mt[e]||(t(),Mt[e]=!0)}var Et={pending:!1,funcs:[]},At={pending:!1,funcs:[]};function It(t,e="setTimeout",i){const s="raf"===e?At:Et;if(s.funcs.push(t),s.pending)return;s.pending=!0;const o=()=>{const t=s.funcs.slice();s.funcs.length=0,s.pending=!1;for(const e of t)e()};"raf"===e?ht(i,o):window.setTimeout(o,0)}function Ht(t,e,i){let s;return function(...o){const n=this;window.clearTimeout(s),s=window.setTimeout((function(){t.isAlive()&&e.apply(n,o)}),i)}}function Ot(t,e){let i=0;return function(...s){const o=Date.now();o-i<e||(i=o,t.apply(this,s))}}var Nt=new Set(["__proto__","constructor","prototype"]);function Bt(t,e,s=!0,o=!1){i(e)&&function(t,e){if(null!=t)if(Array.isArray(t))for(let i=0;i<t.length;i++)e(i.toString(),t[i]);else for(const i of Object.keys(t).filter((t=>!Nt.has(t))))e(i,t[i])}(e,((e,i)=>{let n=t[e];n!==i&&(o&&null==n&&null!=i&&"object"==typeof i&&i.constructor===Object&&(n={},t[e]=n),Gt(i)&&Gt(n)&&!Array.isArray(n)?Bt(n,i,s,o):(s||void 0!==i)&&(t[e]=i))}))}function Gt(t){return"object"==typeof t&&null!==t}var Vt=class t{static applyGlobalGridOptions(e){if(!t.gridOptions)return{...e};let i={};return Bt(i,t.gridOptions,!0,!0),"deep"===t.mergeStrategy?Bt(i,e,!0,!0):i={...i,...e},t.gridOptions.context&&(i.context=t.gridOptions.context),e.context&&("deep"===t.mergeStrategy&&i.context&&Bt(e.context,i.context,!0,!0),i.context=e.context),i}static applyGlobalGridOption(e,i){if("deep"===t.mergeStrategy){const o=(s=e,Lt.gridOptions?.[s]);if(o&&"object"==typeof o&&"object"==typeof i)return t.applyGlobalGridOptions({[e]:i})[e]}var s;return i}};Vt.gridOptions=void 0,Vt.mergeStrategy="shallow";var Lt=Vt;function zt(t,e="shallow"){Lt.gridOptions=t,Lt.mergeStrategy=e}var $t={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:"\t",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1,enableFilterHandlers:!1},Wt="https://www.ag-grid.com";function Ut(t,e,...i){t.get("debug")&&console.log("AG Grid: "+e,...i)}function jt(t,...e){Tt((()=>console.warn("AG Grid: "+t,...e)),t+e?.join(""))}function Kt(t,...e){Tt((()=>console.error("AG Grid: "+t,...e)),t+e?.join(""))}var qt,Zt=new Set,_t={},Yt={},Qt=!1,Jt=!1;function Xt(t,e,i=!1){i||(Qt=!0),function(t){qt||(qt=t.version);const e=t=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${t} Please update all modules to the same version.`;t.version?function(t){const[e,i]=t.version.split(".")||[],[s,o]=qt.split(".")||[];return e===s&&i===o}(t)||Kt(e(`'${t.moduleName}' is version ${t.version} but the other modules are version ${qt}.`)):Kt(e(`'${t.moduleName}' is incompatible.`));const i=t.validate?.();i&&!i.isValid&&Kt(`${i.message}`)}(t);const s=t.rowModels??["all"];let o;Zt.add(t),void 0!==e?(Jt=!0,void 0===Yt[e]&&(Yt[e]={}),o=Yt[e]):o=_t;for(const e of s)void 0===o[e]&&(o[e]={}),o[e][t.moduleName]=t;if(t.dependsOn)for(const s of t.dependsOn)Xt(s,e,i)}function te(t,e,i){const s=i=>!!_t[i]?.[t]||!!Yt[e]?.[i]?.[t];return s(i)||s("all")}function ee(){return Jt}var ie=class{static register(t){Xt(t,void 0)}static registerModules(t){for(const e of t)Xt(e,void 0)}},se="34.3.1",oe="_version_",ne=null,re=`${Wt}/javascript-data-grid`;function le(t,e,i){return ne?.(t,e)??[ge(t,e,i)]}function ae(t,e,i,s,o){t(`${s?"warning":"error"} #${e}`,...le(e,i,o))}function he(t){let e=t;return t instanceof Error?e=t.toString():"object"==typeof t&&(e=function(t){if(!t)return String(t);const e={};for(const i of Object.keys(t))"object"!=typeof t[i]&&"function"!=typeof t[i]&&(e[i]=t[i]);return JSON.stringify(e)}(t)),e}function ce(t){return void 0===t?"undefined":null===t?"null":t}function ue(t,e){return`${t}?${e.toString()}`}function de(t,e){const i=new URLSearchParams;if(i.append(oe,se),e)for(const t of Object.keys(e))i.append(t,he(e[t]));const s=`${re}/errors/${t}`,o=ue(s,i);return o.length<=2e3?o:function(t,e){const i=Array.from(e.entries()).sort(((t,e)=>e[1].length-t[1].length));let s=ue(t,e);for(const[o,n]of i){if(o===oe)continue;const i=s.length-2e3;if(i<=0)break;const r="...",l=i+r.length,a=n.length-l>100?n.slice(0,n.length-l)+r:n.slice(0,100)+r;e.set(o,a),s=ue(t,e)}return s}(s,i)}var ge=(t,e,i)=>`${i?i+" \n":""}Visit ${de(t,e)}${i?"":" \n Alternatively register the ValidationModule to see the full message in the console."}`;function pe(...t){ae(jt,t[0],t[1],!0)}function fe(...t){ae(Kt,t[0],t[1],!1)}function me(t,e,i){ae(Kt,t,e,!1,i)}function we(...t){return function(t,e){const i=e[0];return`error #${i} `+le(i,e[1],void 0).join(" ")}(0,t)}function ve(t,e){return t.get("rowModelType")===e}function Ce(t){return ve(t,"clientSide")}function be(t){return ve(t,"serverSide")}function ye(t,e){return t.get("domLayout")===e}function Se(t){return void 0!==Ue(t)}function xe(t){return"function"==typeof t.get("getRowHeight")}function Re(t,e,i=!1,s){const{gos:o,environment:n}=t;if(null==s&&(s=n.getDefaultRowHeight()),xe(o)){if(i)return{height:s,estimated:!0};const t={node:e,data:e.data},n=o.getCallback("getRowHeight")(t);if(ke(n))return 0===n&&pe(23),{height:Math.max(1,n),estimated:!1}}if(e.detail&&o.get("masterDetail"))return function(t){if(t.get("detailRowAutoHeight"))return{height:1,estimated:!1};const e=t.get("detailRowHeight");return ke(e)?{height:e,estimated:!1}:{height:300,estimated:!1}}(o);const r=o.get("rowHeight");return{height:r&&ke(r)?r:s,estimated:!1}}function Fe(t){const{environment:e,gos:i}=t,o=i.get("rowHeight");if(!o||s(o))return e.getDefaultRowHeight();const n=e.refreshRowHeightVariable();return-1!==n?n:(pe(24),e.getDefaultRowHeight())}function ke(t){return!isNaN(t)&&"number"==typeof t&&isFinite(t)}function Pe(t,e,i){const s=e[t.getDomDataKey()];return s?s[i]:void 0}function De(t,e,i,o){const n=t.getDomDataKey();let r=e[n];s(r)&&(r={},e[n]=r),r[i]=o}function Me(t){return!t.get("ensureDomOrder")&&t.get("animateRows")}function Te(t){return!(t.get("paginateChildRows")||t.get("groupHideOpenParents")||ye(t,"print"))}function Ee(t){const e=t.get("autoGroupColumnDef");return!e?.comparator&&!t.get("treeData")}function Ae(t){const e=t.get("groupAggFiltering");return"function"==typeof e?t.getCallback("groupAggFiltering"):!0===e?()=>!0:void 0}function Ie(t){return t.get("grandTotalRow")}function He(t,e){return!e&&"groupRows"===t.get("groupDisplayType")}function Oe(t,e,i){return!!e.group&&!e.footer&&He(t,i)}function Ne(t){const e=t.getCallback("getRowId");return void 0===e?e:t=>{let i=e(t);return"string"!=typeof i&&(Tt((()=>pe(25,{id:i})),"getRowIdString"),i=String(i)),i}}function Be(t){return t?.checkboxes??!0}function Ge(t){return"multiRow"===t?.mode&&(t.headerCheckbox??!0)}function Ve(t){if("object"==typeof t)return t.checkboxLocation??"selectionColumn"}function Le(t){return t?.hideDisabledCheckboxes??!1}function ze(t){const e=t.get("cellSelection");return void 0!==e?!!e:t.get("enableRangeSelection")}function $e(t){const e=t.get("rowSelection")??"single";if("string"==typeof e){const e=t.get("suppressRowClickSelection"),i=t.get("suppressRowDeselection");return(!e||!i)&&(e?"enableDeselection":!i||"enableSelection")}return("singleRow"===e.mode||"multiRow"===e.mode)&&(e.enableClickSelection??!1)}function We(t){const e=t.get("rowSelection");return"string"==typeof e?t.get("isRowSelectable"):e?.isRowSelectable}function Ue(t){const e="beanName"in t&&"gos"===t.beanName?t.get("rowSelection"):t.rowSelection;if("string"==typeof e)switch(e){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(e?.mode){case"multiRow":case"singleRow":return e.mode;default:return}}function je(t){return"multiRow"===Ue(t)}function Ke(t){const e=t.get("rowSelection");if("string"==typeof e){const e=t.get("groupSelectsChildren"),i=t.get("groupSelectsFiltered");return e&&i?"filteredDescendants":e?"descendants":"self"}return"multiRow"===e?.mode?e.groupSelects:void 0}function qe(t,e=!0){const i=t.get("rowSelection");return"object"!=typeof i?e?"all":void 0:"multiRow"===i.mode?i.selectAll:"all"}function Ze(t){const e=Ke(t);return"descendants"===e||"filteredDescendants"===e}function _e(t){const e=t.get("rowSelection");return"object"==typeof e&&e.masterSelects||"self"}function Ye(t){return"legacy"===t.get("columnMenu")}function Qe(t,e){return t.addCommon(e)}function Je({gos:t},e){return 2===e.button||e.ctrlKey&&t.get("allowContextMenuWithControlKey")}var Xe={resizable:!0,sortable:!0},ti=0;function ei(){return ti++}function ii(t){return t instanceof si}var si=class extends Dt{constructor(e,i,s,o){super(),this.colDef=e,this.userProvidedColDef=i,this.colId=s,this.primary=o,this.isColumn=!0,this.instanceId=ei(),this.autoHeaderHeight=null,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new t,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=c(s)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:t,beans:{sortSvc:e,pinnedCols:i,colFlex:s}}=this;e?.initCol(this);const o=t.hide;this.visible=void 0!==o?!o:!t.initialHide,i?.initCol(this),s?.initCol(this)}setColDef(t,e,i){const s=t.spanRows!==this.colDef.spanRows;this.colDef=t,this.userProvidedColDef=e,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),s&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",i)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){const{gos:t,colDef:{field:e,tooltipField:s}}=this,o=t.get("suppressFieldDotNotation");this.fieldContainsDots=i(e)&&e.includes(".")&&!o,this.tooltipFieldContainsDots=i(s)&&s.includes(".")&&!o}initMinAndMaxWidths(){const t=this.colDef;this.minWidth=t.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=t.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}addPivotListener(){const t=this.beans.pivotColDefSvc,e=this.colDef.pivotValueColumn;t&&e&&this.addManagedListeners(e,{colDefChanged:e=>{const i=t.recreateColDef(this.colDef);this.setColDef(i,i,e.source)}})}resetActualWidth(t){const e=this.calculateColInitialWidth(this.colDef);this.setActualWidth(e,t,!0)}calculateColInitialWidth(t){let e;const i=t.width,s=t.initialWidth;return e=null!=i?i:null!=s?s:200,Math.max(Math.min(e,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(t){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,t)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(t,e){this.colEventSvc.addEventListener(t,e)}__removeEventListener(t,e){this.colEventSvc.removeEventListener(t,e)}addEventListener(t,e){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const i=this.frameworkEventListenerService?.wrap(t,e)??e;this.colEventSvc.addEventListener(t,i)}removeEventListener(t,e){const i=this.frameworkEventListenerService?.unwrap(t,e)??e;this.colEventSvc.removeEventListener(t,i)}createColumnFunctionCallbackParams(t){return Qe(this.gos,{node:t,data:t.data,column:this,colDef:this.colDef})}isSuppressNavigable(t){return this.beans.cellNavigation?.isSuppressNavigable(this,t)??!1}isCellEditable(t){return this.beans.editSvc?.isCellEditable({rowNode:t,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(t){return this.isColumnFunc(t,this.colDef.rowDrag)}isDndSource(t){return this.isColumnFunc(t,this.colDef.dndSource)}isCellCheckboxSelection(t){return this.beans.selectionSvc?.isCellCheckboxSelection(this,t)??!1}isSuppressPaste(t){return this.isColumnFunc(t,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(t){return this.colDef[t]??Xe[t]}isColumnFunc(t,e){return"boolean"==typeof e?e:"function"==typeof e&&e(this.createColumnFunctionCallbackParams(t))}createColumnEvent(t,e){return Qe(this.gos,{type:t,column:this,columns:[this],source:e})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return"asc"===this.sort}isSortDescending(){return"desc"===this.sort}isSortNone(){return s(this.sort)}isSorting(){return i(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(t,e){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.dispatchColEvent("leftChanged",e))}isFilterActive(){return this.filterActive}isHovered(){return pe(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(t,e){this.firstRightPinned!==t&&(this.firstRightPinned=t,this.dispatchColEvent("firstRightPinnedChanged",e))}setLastLeftPinned(t,e){this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.dispatchColEvent("lastLeftPinnedChanged",e))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return"left"===this.pinned||"right"===this.pinned}isPinnedLeft(){return"left"===this.pinned}isPinnedRight(){return"right"===this.pinned}getPinned(){return this.pinned}setVisible(t,e){const i=!0===t;this.visible!==i&&(this.visible=i,this.dispatchColEvent("visibleChanged",e)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let t=this.getOriginalParent();for(;t?.isPadding();)t=t.getOriginalParent();return t}getColumnGroupPaddingInfo(){let t=this.getParent();if(!t?.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const e=t.getPaddingLevel()+1;let i=!0;for(;t;){if(!t.isPadding()){i=!1;break}t=t.getParent()}return{numberOfParents:e,isSpanningTotal:i}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(t){const e=t!==this.autoHeaderHeight;return this.autoHeaderHeight=t,e}createBaseColDefParams(t){return Qe(this.gos,{node:t,data:t.data,colDef:this.colDef,column:this})}getColSpan(t){if(s(this.colDef.colSpan))return 1;const e=this.createBaseColDefParams(t),i=this.colDef.colSpan(e);return Math.max(i,1)}getRowSpan(t){if(s(this.colDef.rowSpan))return 1;const e=this.createBaseColDefParams(t),i=this.colDef.rowSpan(e);return Math.max(i,1)}setActualWidth(t,e,i=!1){t=Math.max(t,this.minWidth),t=Math.min(t,this.maxWidth),this.actualWidth!==t&&(this.actualWidth=t,null!=this.flex&&"flex"!==e&&"gridInitializing"!==e&&(this.flex=null),i||this.fireColumnWidthChangedEvent(e)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(t){this.dispatchColEvent("widthChanged",t)}isGreaterThanMax(t){return t>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return!0===this.colDef.enablePivot}isAllowValue(){return!0===this.colDef.enableValue}isAllowRowGroup(){return!0===this.colDef.enableRowGroup}dispatchColEvent(t,e,i){const s=this.createColumnEvent(t,e);i&&Bt(s,i),this.colEventSvc.dispatchEvent(s)}dispatchStateUpdatedEvent(t){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:t})}};function oi(t){return t instanceof ni}var ni=class extends Dt{constructor(t,e,i,s){super(),this.colGroupDef=t,this.groupId=e,this.padding=i,this.level=s,this.isColumn=!1,this.expandable=!1,this.instanceId=ei(),this.expandableListenerRemoveCallback=null,this.expanded=!!t?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(t,e){this.colGroupDef=t,this.level=e,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return!!this.children&&this.children.some((t=>t.isVisible()))}isPadding(){return this.padding}setExpanded(t){this.expanded=void 0!==t&&t,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(t){this.children=t}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const t=[];return this.addLeafColumns(t),t}forEachLeafColumn(t){if(this.children)for(const e of this.children)ii(e)?t(e):oi(e)&&e.forEachLeafColumn(t)}addLeafColumns(t){if(this.children)for(const e of this.children)ii(e)?t.push(e):oi(e)&&e.addLeafColumns(t)}getColumnGroupShow(){const t=this.colGroupDef;if(t)return t.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const t=this.onColumnVisibilityChanged.bind(this);for(const e of this.getLeafColumns())e.__addEventListener("visibleChanged",t);this.expandableListenerRemoveCallback=()=>{for(const e of this.getLeafColumns())e.__removeEventListener("visibleChanged",t);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let t=!1,e=!1,i=!1;const s=this.findChildrenRemovingPadding();for(let o=0,n=s.length;o<n;o++){const n=s[o];if(!n.isVisible())continue;const r=n.getColumnGroupShow();"open"===r?(t=!0,i=!0):"closed"===r?(e=!0,i=!0):(t=!0,e=!0)}const o=t&&e&&i;this.expandable!==o&&(this.expandable=o,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const t=[],e=i=>{for(const s of i)oi(s)&&s.isPadding()?e(s.children):t.push(s)};return e(this.children),t}onColumnVisibilityChanged(){this.setExpandable()}},ri={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function li(t,e,i){const s={},o=t.gos;return Object.assign(s,o.get("defaultColGroupDef")),Object.assign(s,e),o.validateColDef(s,i),s}var ai=class{constructor(){this.existingKeys={}}addExistingKeys(t){for(let e=0;e<t.length;e++)this.existingKeys[t[e]]=!0}getUniqueKey(t,e){t=o(t);let i=0;for(;;){let s=t??e;if(s?0!==i&&(s+="_"+i):s=i,!this.existingKeys[s]){const e=String(s);return t&&i>0&&pe(273,{providedId:t,usedId:e}),this.existingKeys[e]=!0,e}i++}}};function hi(t){if(t?.length)return t[t.length-1]}function ci(t,e,i){if(t===e)return!0;if(!t||!e)return null==t&&null==e;const s=t.length;if(s!==e.length)return!1;for(let o=0;o<s;o++)if(t[o]!==e[o]&&!i?.(t[o],e[o]))return!1;return!0}function ui(t,e){if(t)for(const i of t)e(i)}function di(t,e){const i=t.indexOf(e);i>=0&&t.splice(i,1)}function gi(t,e,i){for(let i=0;i<e.length;i++)di(t,e[i]);for(let s=e.length-1;s>=0;s--)t.splice(i,0,e[s])}var pi="ag-Grid-AutoColumn",fi="ag-Grid-SelectionColumn",mi="ag-Grid-RowNumbersColumn";function wi(t){const e=[],i=t=>{for(let s=0;s<t.length;s++){const o=t[s];ii(o)?e.push(o):oi(o)&&i(o.getChildren())}};return i(t),e}function vi(t){return t.reduce(((t,e)=>t+e.getActualWidth()),0)}function Ci(t,e,i){const s={};if(!e)return;Ei(null,e,(t=>{s[t.getInstanceId()]=t})),i&&Ei(null,i,(t=>{s[t.getInstanceId()]=null}));const o=Object.values(s).filter((t=>null!=t));t.context.destroyBeans(o)}function bi(t){return t.getId().startsWith(pi)}function yi(t){const e="string"==typeof t?t:"getColId"in t?t.getColId():t.colId;return e?.startsWith(fi)??!1}function Si(t){const e="string"==typeof t?t:"getColId"in t?t.getColId():t.colId;return e?.startsWith(mi)??!1}function xi(t){let e=[];return t instanceof Array?e=t:"string"==typeof t&&(e=t.split(",")),e}function Ri(t){return"optionsUpdated"===t?"gridOptionsChanged":t}function Fi(t,e){const i=t===e,s=t.getColDef()===e,o=t.getColId()==e;return i||s||o}var ki=(t,e)=>{oi(t)&&t.setupExpandable(),t.originalParent=e};function Pi(t,e,i,s,o,n,r,l){if(!e)return[];const{colGroupSvc:a}=t,h=new Array(e.length);for(let c=0;c<h.length;c++){const u=e[c];h[c]=a&&void 0!==u.children?a.createProvidedColumnGroup(s,u,i,o,n,r,l):Di(t,s,u,o,n,l)}return h}function Di(t,e,i,s,o,n){const r=function(t,e){if(e)for(let i=0;i<e.length;i++){const s=e[i].getUserProvidedColDef();if(s)if(null==t.colId){if(null!=t.field){if(s.field===t.field)return{idx:i,column:e[i]}}else if(s===t)return{idx:i,column:e[i]}}else if(e[i].getId()===t.colId)return{idx:i,column:e[i]}}}(i,s);r&&s?.splice(r.idx,1);let l=r?.column;if(l){const e=Ti(t,i,l.getColId());l.setColDef(e,i,n),function(t,e,i,s){Mi(t,e,i.hide,i.sort,i.sortIndex,i.pinned,i.flex,s);const o=e.getFlex();if(!(null!=o&&o>0))if(null!=i.width)e.setActualWidth(i.width,s);else{const t=e.getActualWidth();e.setActualWidth(t,s)}}(t,l,e,n)}else{const s=o.getUniqueKey(i.colId,i.field),n=Ti(t,i,s);l=new si(n,i,s,e),t.context.createBean(l)}return t.dataTypeSvc?.addColumnListeners(l),l}function Mi(t,e,i,s,o,n,r,l){const{sortSvc:a,pinnedCols:h,colFlex:c}=t;void 0!==i&&e.setVisible(!i,l),a&&(a.updateColSort(e,s,l),void 0!==o&&a.setColSortIndex(e,o)),void 0!==n&&h?.setColPinned(e,n),void 0!==r&&c?.setColFlex(e,r)}function Ti(t,e,i,s){const{gos:o,dataTypeSvc:n}=t,r={};Bt(r,o.get("defaultColDef"),!1,!0);const l=function(t,e,i,s){const o=t.dataTypeSvc?.updateColDefAndGetColumnType(e,i,s),n=i.type??o??e.type;return e.type=n,n?xi(n):void 0}(t,r,e,i);l&&function(t,e,i){if(!e.length)return;const s=Object.assign({},ri),o=t.gos.get("columnTypes")||{};for(const t of Object.keys(o)){const e=o[t];t in s?pe(34,{key:t}):(e.type&&pe(35),s[t]=e)}for(const t of e){const e=s[t.trim()];e?Bt(i,e,!1,!0):pe(36,{t})}}(t,l,r);const a=r.cellDataType;Bt(r,e,!1,!0),void 0!==a&&(r.cellDataType=a);const h=o.get("autoGroupColumnDef"),c=Ee(o);return e.rowGroup&&h&&c&&Bt(r,{sort:h.sort,initialSort:h.initialSort},!1,!0),n&&(n.postProcess(r),n.validateColDef(r)),o.validateColDef(r,i,s),r}function Ei(t,e,i){if(e)for(let s=0;s<e.length;s++){const o=e[s];oi(o)&&Ei(o,o.getChildren(),i),i(o,t)}}function Ai(t,e){const i=[],s=[],o=[];return t.forEach((t=>{const e=t.getColDef().lockPosition;"right"===e?o.push(t):"left"===e||!0===e?i.push(t):s.push(t)})),e.get("enableRtl")?[...o,...s,...i]:[...i,...s,...o]}function Ii(t,e){let i=!0;return Ei(null,e,(e=>{if(!oi(e))return;const s=e,o=s.getColGroupDef(),n=o?.marryChildren;if(!n)return;const r=[];for(const e of s.getLeafColumns()){const i=t.indexOf(e);r.push(i)}Math.max.apply(Math,r)-Math.min.apply(Math,r)>s.getLeafColumns().length-1&&(i=!1)})),i}function Hi(t,e){if(!t||0==t.length)return;const i=e(t[0]);for(let s=1;s<t.length;s++)if(i!==e(t[s]))return;return i}function Oi(t,e,i){if(!e.length)return;const s=1===e.length?e[0]:null,o=Hi(e,(t=>t.getPinned()));t.dispatchEvent({type:"columnPinned",pinned:null!=o?o:null,columns:e,column:s,source:i})}function Ni(t,e,i,s,o=null){e?.length&&t.dispatchEvent({type:"columnResized",columns:e,column:1===e.length?e[0]:null,flexColumns:o,finished:i,source:s})}function Bi(t,e,s){const{colModel:o,rowGroupColsSvc:n,pivotColsSvc:r,autoColSvc:l,selectionColSvc:a,colAnimation:h,visibleCols:c,pivotResultCols:u,environment:d,valueColsSvc:g,eventSvc:p,gos:f}=t,m=o.getColDefCols()??[],w=a?.getColumns();if(!m.length&&!w?.length)return!1;if(e?.state&&!e.state.forEach)return pe(32),!1;const v=(o,l,a,h,c)=>{if(!o)return;const u=((t,e)=>(s,o)=>{const n={value1:void 0,value2:void 0};let r=!1;return t&&(void 0!==t[s]&&(n.value1=t[s],r=!0),i(o)&&void 0!==t[o]&&(n.value2=t[o],r=!0)),!r&&e&&(void 0!==e[s]&&(n.value1=e[s]),i(o)&&void 0!==e[o]&&(n.value2=e[o])),n})(l,e.defaultState),p=u("flex").value1;if(Mi(t,o,u("hide").value1,u("sort").value1,u("sortIndex").value1,u("pinned").value1,p,s),null==p){const t=u("width").value1;if(null!=t){const e=o.getColDef().minWidth??d.getDefaultColumnMinWidth();null!=e&&t>=e&&o.setActualWidth(t,s)}}!c&&o.isPrimary()&&(g?.syncColumnWithState(o,s,u),n?.syncColumnWithState(o,s,u,a),r?.syncColumnWithState(o,s,u,h))},C=(i,h,u)=>{const d=Gi(t,s),g=h.slice(),m={},w={},C=[],b=[],y=[];let S=0;const x=n?.columns.slice()??[],R=r?.columns.slice()??[];for(const t of i){const e=t.colId;if(e.startsWith(pi)){C.push(t),y.push(t);continue}if(yi(e)){b.push(t),y.push(t);continue}const i=u(e);i?(v(i,t,m,w,!1),di(g,i)):(y.push(t),S+=1)}const F=t=>v(t,null,m,w,!1);g.forEach(F),n?.sortColumns(zi.bind(n,m,x)),r?.sortColumns(zi.bind(r,w,R)),o.refreshCols(!1,s);const k=(t,e,i=[])=>{for(const s of e){const e=t(s.colId);di(i,e),v(e,s,null,null,!0)}i.forEach(F)};return k((t=>l?.getColumn(t)??null),C,l?.getColumns()?.slice()),k((t=>a?.getColumn(t)??null),b,a?.getColumns()?.slice()),function(t,e,i){if(!t.applyOrder||!t.state)return;const s=[];for(const e of t.state)null!=e.colId&&s.push(e.colId);!function(t,e,i,s){if(null==t)return;let o=[];const n={};for(const i of e){if(n[i])continue;const e=t.map[i];e&&(o.push(e),n[i]=!0)}let r=0;for(const e of t.list){const t=e.getColId();null==n[t]&&(t.startsWith(pi)?o.splice(r++,0,e):o.push(e))}o=Ai(o,s),Ii(o,i.getColTree())?t.list=o:pe(39)}(e.cols,s,e,i)}(e,o,f),c.refresh(s),p.dispatchEvent({type:"columnEverythingChanged",source:s}),d(),{unmatchedAndAutoStates:y,unmatchedCount:S}};h?.start();let{unmatchedAndAutoStates:b,unmatchedCount:y}=C(e.state||[],m,(t=>o.getColDefCol(t)));return(b.length>0||i(e.defaultState))&&(y=C(b,u?.getPivotResultCols()?.list??[],(t=>u?.getPivotResultCol(t)??null)).unmatchedCount),h?.finish(),0===y}function Gi(t,e){const{rowGroupColsSvc:i,pivotColsSvc:s,valueColsSvc:o,colModel:n,sortSvc:r,eventSvc:l}=t,a={rowGroupColumns:i?.columns.slice()??[],pivotColumns:s?.columns.slice()??[],valueColumns:o?.columns.slice()??[]},h=Vi(t),c={};for(const t of h)c[t.colId]=t;return()=>{const o=(t,i,s,o)=>{if(ci(i.map(o),s.map(o)))return;const n=new Set(i);for(const t of s)n.delete(t)||n.add(t);const r=[...n];l.dispatchEvent({type:t,columns:r,column:1===r.length?r[0]:null,source:e})},u=t=>{const e=[];return n.forAllCols((i=>{const s=c[i.getColId()];s&&t(s,i)&&e.push(i)})),e},d=t=>t.getColId();o("columnRowGroupChanged",a.rowGroupColumns,i?.columns??[],d),o("columnPivotChanged",a.pivotColumns,s?.columns??[],d);const g=u(((t,e)=>{const i=null!=t.aggFunc,s=i!=e.isValueActive(),o=i&&t.aggFunc!=e.getAggFunc();return s||o}));g.length>0&&function(t,e,i,s){t.dispatchEvent({type:"columnValueChanged",columns:i,column:i&&1==i.length?i[0]:null,source:s})}(l,0,g,e),Ni(l,u(((t,e)=>t.width!=e.getActualWidth())),!0,e),Oi(l,u(((t,e)=>t.pinned!=e.getPinned())),e),function(t,e,i){if(!e.length)return;const s=1===e.length?e[0]:null,o=Hi(e,(t=>t.isVisible()));t.dispatchEvent({type:"columnVisible",visible:o,columns:e,column:s,source:i})}(l,u(((t,e)=>t.hide==e.isVisible())),e);const p=u(((t,e)=>t.sort!=e.getSort()||t.sortIndex!=e.getSortIndex()));p.length>0&&r?.dispatchSortChangedEvents(e,p);const f=Vi(t);!function(t,e,i,s,o){const n={};for(const t of e)n[t.colId]=t;const r={};for(const e of t)n[e.colId]&&(r[e.colId]=!0);const l=t.filter((t=>r[t.colId])),a=e.filter((t=>r[t.colId])),h=[];a.forEach(((t,e)=>{const i=l?.[e];if(i&&i.colId!==t.colId){const t=s.getCol(i.colId);t&&h.push(t)}})),h.length&&o.dispatchEvent({type:"columnMoved",columns:h,column:1===h.length?h[0]:null,finished:!0,source:i})}(h,f,e,n,l)}}function Vi(t){const{colModel:e,rowGroupColsSvc:i,pivotColsSvc:o}=t;if(s(e.getColDefCols())||!e.isAlive())return[];const n=i?.columns,r=o?.columns,l=[];e.forAllCols((t=>(t=>{const e=t.isRowGroupActive()&&n?n.indexOf(t):null,i=t.isPivotActive()&&r?r.indexOf(t):null,s=t.isValueActive()?t.getAggFunc():null,o=null!=t.getSort()?t.getSort():null,a=null!=t.getSortIndex()?t.getSortIndex():null;l.push({colId:t.getColId(),width:t.getActualWidth(),hide:!t.isVisible(),pinned:t.getPinned(),sort:o,sortIndex:a,aggFunc:s,rowGroup:t.isRowGroupActive(),rowGroupIndex:e,pivot:t.isPivotActive(),pivotIndex:i,flex:t.getFlex()??null})})(t)));const a=new Map(e.getCols().map(((t,e)=>[t.getColId(),e])));return l.sort(((t,e)=>(a.has(t.colId)?a.get(t.colId):-1)-(a.has(e.colId)?a.get(e.colId):-1))),l}function Li(t){const e=(t,e)=>null!=t?t:null!=e?e:null,i=t.getColDef(),s=e(i.sort,i.initialSort),o=e(i.sortIndex,i.initialSortIndex),n=e(i.hide,i.initialHide),r=e(i.pinned,i.initialPinned),l=e(i.width,i.initialWidth),a=e(i.flex,i.initialFlex);let h=e(i.rowGroupIndex,i.initialRowGroupIndex),c=e(i.rowGroup,i.initialRowGroup);null!=h||c||(h=null,c=null);let u=e(i.pivotIndex,i.initialPivotIndex),d=e(i.pivot,i.initialPivot);null!=u||d||(u=null,d=null);const g=e(i.aggFunc,i.initialAggFunc);return{colId:t.getColId(),sort:s,sortIndex:o,hide:n,pinned:r,width:l,flex:a,rowGroup:c,rowGroupIndex:h,pivot:d,pivotIndex:u,aggFunc:g}}var zi=(t,e,i,s)=>{const o=t[i.getId()],n=t[s.getId()],r=null!=o,l=null!=n;if(r&&l)return o-n;if(r)return-1;if(l)return 1;const a=e.indexOf(i),h=e.indexOf(s),c=a>=0;return c&&h>=0?a-h:c?-1:1},$i=class{constructor(){this.existingIds={}}getInstanceIdForKey(t){const e=this.existingIds[t];let i;return i="number"!=typeof e?0:e+1,this.existingIds[t]=i,i}};function Wi(t,e,i){return i&&t.addDestroyFunc((()=>e.destroyBean(i))),i??t}var Ui=null;function ji(t){return"function"==typeof t?.getGui}var Ki=class{constructor(t){this.cssClassStates={},this.getGui=t}toggleCss(t,e){if(t){if(t.indexOf(" ")>=0){const i=(t||"").split(" ");if(i.length>1){for(const t of i)this.toggleCss(t,e);return}}this.cssClassStates[t]!==e&&t.length&&(this.getGui()?.classList.toggle(t,e),this.cssClassStates[t]=e)}}},qi=0,Zi=class extends Pt{constructor(t,e){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=qi++,this.cssManager=new Ki((()=>this.eGui)),this.componentSelectors=new Map((e??[]).map((t=>[t.selector,t]))),t&&this.setTemplate(t)}preConstruct(){this.wireTemplate(this.getGui());const t="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(const e of this.css??[])this.beans.environment.addGlobalCSS(e,t)}wireTemplate(t,e){t&&this.gos&&(this.applyElementsToComponent(t),this.createChildComponentsFromTags(t,e))}getCompId(){return this.compId}getDataRefAttribute(t){return t.getAttribute?t.getAttribute(ut):null}applyElementsToComponent(t,e,i,s=null){if(void 0===e&&(e=this.getDataRefAttribute(t)),e){const o=this[e];if(o===Ui)this[e]=s??t;else{const t=i?.[e];if(!this.suppressDataRefValidation&&!t)throw new Error(`data-ref: ${e} on ${this.constructor.name} with ${o}`)}}}createChildComponentsFromTags(t,e){const i=[];for(const e of t.childNodes??[])i.push(e);for(const s of i){if(!(s instanceof HTMLElement))continue;const i=this.createComponentFromElement(s,(t=>{const e=t.getGui();if(e)for(const t of s.attributes??[])e.setAttribute(t.name,t.value)}),e);if(i){if(i.addItems&&s.children.length){this.createChildComponentsFromTags(s,e);const t=Array.prototype.slice.call(s.children);i.addItems(t)}this.swapComponentForNode(i,t,s)}else s.childNodes&&this.createChildComponentsFromTags(s,e)}}createComponentFromElement(t,e,i){const s=t.nodeName,o=this.getDataRefAttribute(t),n=0===s.indexOf("AG-"),r=n?this.componentSelectors.get(s):null;let l=null;if(r)l=new r.component(i&&o?i[o]:void 0),l.setParentComponent(this),this.createBean(l,null,e);else if(n)throw new Error(`selector: ${s}`);return this.applyElementsToComponent(t,o,i,l),l}swapComponentForNode(t,e,i){const s=t.getGui();e.replaceChild(s,i),e.insertBefore(document.createComment(i.nodeName),s),this.addDestroyFunc(this.destroyBean.bind(this,t))}activateTabIndex(t){const e=this.gos.get("tabIndex");t||(t=[]),t.length||t.push(this.getGui());for(const i of t)i.setAttribute("tabindex",e.toString())}setTemplate(t,e,i){let s;s="string"==typeof t||null==t?_(t):gt(t),this.setTemplateFromElement(s,e,i)}setTemplateFromElement(t,e,i,s=!1){if(this.eGui=t,this.suppressDataRefValidation=s,e)for(let t=0;t<e.length;t++){const i=e[t];this.componentSelectors.set(i.selector,i)}this.wireTemplate(t,i)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(t){this.parentComponent=t}getParentComponent(){return this.parentComponent}setGui(t){this.eGui=t}queryForHtmlElement(t){return this.eGui.querySelector(t)}getContainerAndElement(t,e){let i=e;return null==t?null:(i||(i=this.eGui),rt(t)?{element:t,parent:i}:{element:t.getGui(),parent:i})}prependChild(t,e){const{element:i,parent:s}=this.getContainerAndElement(t,e)||{};i&&s&&s.insertAdjacentElement("afterbegin",i)}appendChild(t,e){const{element:i,parent:s}=this.getContainerAndElement(t,e)||{};i&&s&&s.appendChild(i)}isDisplayed(){return this.displayed}setVisible(t,e={}){if(t!==this.visible){this.visible=t;const{skipAriaHidden:i}=e;!function(t,e,i={}){const{skipAriaHidden:s}=i;t.classList.toggle("ag-invisible",!e),s||F(t,!e)}(this.eGui,t,{skipAriaHidden:i})}}setDisplayed(t,e={}){if(t!==this.displayed){this.displayed=t;const{skipAriaHidden:i}=e;H(this.eGui,t,{skipAriaHidden:i}),this.dispatchLocalEvent({type:"displayChanged",visible:this.displayed})}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(t,e,i){this.eGui.addEventListener(t,e,i),this.addDestroyFunc((()=>this.eGui.removeEventListener(t,e)))}addCss(t){this.cssManager.toggleCss(t,!0)}removeCss(t){this.cssManager.toggleCss(t,!1)}toggleCss(t,e){this.cssManager.toggleCss(t,e)}registerCSS(t){this.css||(this.css=[]),this.css.push(t)}},_i=class extends Zi{};function Yi(t){return"object"==typeof t&&!!t.component}var Qi=class t{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t((t=>this.onDone(t)),(t=>this.onReject(t)))}static all(e){return e.length?new t((t=>{let i=e.length;const s=new Array(i);e.forEach(((e,o)=>{e.then((e=>{s[o]=e,i--,0===i&&t(s)}))}))})):t.resolve()}static resolve(e=null){return new t((t=>t(e)))}then(e){return new t((t=>{1===this.status?t(e(this.resolution)):this.waiters.push((i=>t(e(i))))}))}onDone(t){this.status=1,this.resolution=t;for(const e of this.waiters)e(t)}onReject(t){}};function Ji(t,e,i,s){const{name:o}=i;let n,r,l,a,h,c;if(e){const i=e,u=i[o+"Selector"],d=u?u(s):null,g=e=>{"string"==typeof e?n=e:null!=e&&!0!==e&&(t.isFrameworkComponent(e)?l=e:r=e)};d?(g(d.component),a=d.params,h=d.popup,c=d.popupPosition):g(i[o])}return{compName:n,jsComp:r,fwComp:l,paramsFromSelector:a,popupFromSelector:h,popupPositionFromSelector:c}}var Xi={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},ts={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},es={name:"headerComponent",optionalMethods:["refresh"]},is={name:"innerHeaderComponent"},ss={name:"innerHeaderGroupComponent"},os={name:"headerGroupComponent"},ns={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},rs={name:"loadingCellRenderer",cellRenderer:!0},ls={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},as={name:"loadingOverlayComponent",optionalMethods:["refresh"]},hs={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},cs={name:"tooltipComponent"},us={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},ds={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},gs={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},ps={name:"loadingCellRenderer",cellRenderer:!0},fs={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},ms={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function ws(t,e,i){return t.getCompDetails(e,ns,void 0,i)}function vs(t,e,i){return t.getCompDetails(e,rs,"agSkeletonCellRenderer",i,!0)}function Cs(t,e,i){return t.getCompDetails(e,ls,"agCellEditor",i,!0)}function bs(t,e){return Ji(t,e,us)}function ys(t,e,i){return t.mergeParams(e,us,i)}function Ss(t){const e=t;return null!=e?.getFrameworkComponentInstance?e.getFrameworkComponentInstance():t}var xs,Rs,Fs,ks,Ps,Ds,Ms,Ts="Backspace",Es="Tab",As="Enter",Is="Escape",Hs=" ",Os="ArrowLeft",Ns="ArrowUp",Bs="ArrowRight",Gs="ArrowDown",Vs="Delete",Ls="F2",zs="PageUp",$s="PageDown",Ws="Home",Us="End",js="KeyA",Ks="KeyC",qs="KeyD",Zs="KeyV",_s="KeyY",Ys="KeyZ",Qs=class extends Zi{isPopup(){return!0}setParentComponent(t){t.addCss("ag-has-popup"),super.setParentComponent(t)}destroy(){const t=this.parentComponent,e=t?.isAlive();e&&t.getGui().classList.remove("ag-has-popup"),super.destroy()}};function Js(){return void 0===xs&&(xs=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),xs}function Xs(){return void 0===Rs&&(Rs=/(firefox)/i.test(navigator.userAgent)),Rs}function to(){return void 0===Fs&&(Fs=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Fs}function eo(){return void 0===ks&&(ks=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),ks}function io(t){if(!t)return null;const e=t.tabIndex,i=t.getAttribute("tabIndex");return-1!==e||null!==i&&(""!==i||Xs())?e.toString():null}function so(){const t=document.body,e=document.createElement("div");e.style.width=e.style.height="100px",e.style.opacity="0",e.style.overflow="scroll",e.style.msOverflowStyle="scrollbar",e.style.position="absolute",t.appendChild(e);let i=e.offsetWidth-e.clientWidth;0===i&&0===e.clientWidth&&(i=null),e.parentNode&&e.remove(),null!=i&&(Ds=i,Ps=0===i)}function oo(){return null==Ps&&so(),Ps}var no=new RegExp("[T ]"),ro=new RegExp("^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}\\D?)?");function lo(t,e){return t.toString().padStart(e,"0")}function ao(t,e=!0,i="T"){if(!t)return null;let s=[t.getFullYear(),t.getMonth()+1,t.getDate()].map((t=>lo(t,2))).join("-");return e&&(s+=i+[t.getHours(),t.getMinutes(),t.getSeconds()].map((t=>lo(t,2))).join(":")),s}function ho(t,e=!0){return t?e?[String(t.getFullYear()),String(t.getMonth()+1),lo(t.getDate(),2),lo(t.getHours(),2),`:${lo(t.getMinutes(),2)}`,`:${lo(t.getSeconds(),2)}`]:[t.getFullYear(),t.getMonth()+1,lo(t.getDate(),2)].map(String):null}var co=t=>{if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"},uo=["January","February","March","April","May","June","July","August","September","October","November","December"],go=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function po(t,e){if(null==e)return ao(t,!1);const i=lo(t.getFullYear(),4),s={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${t.getFullYear()}`,MMMM:()=>uo[t.getMonth()],MMM:()=>uo[t.getMonth()].slice(0,3),MM:()=>lo(t.getMonth()+1,2),Mo:()=>`${t.getMonth()+1}${co(t.getMonth()+1)}`,M:()=>`${t.getMonth()+1}`,Do:()=>`${t.getDate()}${co(t.getDate())}`,DD:()=>lo(t.getDate(),2),D:()=>`${t.getDate()}`,dddd:()=>go[t.getDay()],ddd:()=>go[t.getDay()].slice(0,3),dd:()=>go[t.getDay()].slice(0,2),do:()=>`${t.getDay()}${co(t.getDay())}`,d:()=>`${t.getDay()}`},o=new RegExp(Object.keys(s).join("|"),"g");return e.replace(o,(t=>t in s?s[t]():t))}function fo(t,e=!1){return!!mo(t,e)}function mo(t,e=!1,i){if(!t)return null;if(!i&&!ro.test(t))return null;const[s,o]=t.split(no);if(!s)return null;const n=s.split("-").map((t=>Number.parseInt(t,10)));if(3!==n.filter((t=>!isNaN(t))).length)return null;const[r,l,a]=n,h=new Date(r,l-1,a);if(h.getFullYear()!==r||h.getMonth()!==l-1||h.getDate()!==a)return null;if(!o&&e)return null;if(!o||"00:00:00"===o)return h;const[c,u,d]=o.split(":").map((t=>Number.parseInt(t,10)));if(c>=0&&c<24)h.setHours(c);else if(e)return null;if(u>=0&&u<60)h.setMinutes(u);else if(e)return null;if(d>=0&&d<60)h.setSeconds(d);else if(e)return null;return h}function wo(t){const{inputValue:e,allSuggestions:i,hideIrrelevant:s,filterByPercentageOfBestMatch:o}=t;let n=(i??[]).map(((t,i)=>({value:t,relevance:vo(e,t),idx:i})));if(n.sort(((t,e)=>t.relevance-e.relevance)),s&&(n=n.filter((t=>t.relevance<Math.max(t.value.length,e.length)))),n.length>0&&o&&o>0){const t=n[0].relevance*o;n=n.filter((e=>t-e.relevance<0))}const r=[],l=[];for(const t of n)r.push(t.value),l.push(t.idx);return{values:r,indices:l}}function vo(t,e){t.length<e.length&&([t,e]=[e,t]);let i=[],s=[];const o=t.length,n=e.length;for(let t=0;t<=n;t++)i[t]=t;let r=0;for(let l=1;l<=o;l++){s[0]=l;for(let a=1;a<=n;a++){const n=t[l-1],h=e[a-1];n.toLocaleLowerCase()===h.toLocaleLowerCase()?(++r,n===h&&++r,l>1&&a>1&&t[l-2].toLocaleLowerCase()===e[a-2].toLocaleLowerCase()&&(++r,t[l-2]===e[a-2]&&++r),l<o/2-10&&++r,s[a]=i[a-1]):s[a]=1+Math.min(s[a-1],i[a],i[a-1])}[i,s]=[s,i]}return i[n]/(r+1)}function Co(t){return!(t.altKey||t.ctrlKey||t.metaKey)&&1===t.key?.length}var bo=!1,yo=0;function So(t){const e="keydown"===t.type;e&&(t.ctrlKey||t.metaKey||t.altKey)||bo!==e&&(bo=e)}function xo(t,e,i=!1){let s=A;e&&(s+=", "+e),i&&(s+=', [tabindex="-1"]');const o=Array.prototype.slice.apply(t.querySelectorAll("[tabindex], input, select, button, textarea, [href]")).filter((t=>Z(t))),n=Array.prototype.slice.apply(t.querySelectorAll(s));return n.length?(r=n,o.filter((t=>-1===r.indexOf(t)))):o;var r}function Ro(t,e=!1,i=!1,s=!1){const o=xo(t,s?".ag-tab-guard":null,i),n=e?hi(o):o[0];return!!n&&(n.focus({preventScroll:!0}),!0)}function Fo(t,e,i,s){const o=xo(e,i?':not([tabindex="-1"])':null),n=d(t);let r;r=i?o.findIndex((t=>t.contains(n))):o.indexOf(n);const l=r+(s?-1:1);return l<0||l>=o.length?null:o[l]}function ko(t,e=5){let i=0;for(;t&&null===io(t)&&++i<=e;)t=t.parentElement;return null===io(t)?null:t}var Po,Do,Mo,To,Eo=class extends Zi{constructor(t,e,i){super(e,i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=t||{},this.registerCSS(".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}")}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:t,label:e,labelWidth:i,labelAlignment:s,disabled:o}=this.config;null!=o&&this.setDisabled(o),null!=t&&this.setLabelSeparator(t),null!=e&&this.setLabel(e),null!=i&&this.setLabelWidth(i),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:t,eLabel:e}=this;j(e),"string"==typeof t?e.innerText=t+this.labelSeparator:t&&e.appendChild(t),""===t?(H(e,!1),y(e,"presentation")):(H(e,!0),y(e,null))}setLabelSeparator(t){return this.labelSeparator===t||(this.labelSeparator=t,null!=this.label&&this.refreshLabel()),this}getLabelId(){const t=this.eLabel;return t.id=t.id||`ag-${this.getCompId()}-label`,t.id}getLabel(){return this.label}setLabel(t){return this.label===t||(this.label=t,this.refreshLabel()),this}setLabelAlignment(t){const e=this.getGui().classList;return e.toggle("ag-label-align-left","left"===t),e.toggle("ag-label-align-right","right"===t),e.toggle("ag-label-align-top","top"===t),this}setLabelEllipsis(t){return this.eLabel.classList.toggle("ag-label-ellipsis",t),this}setLabelWidth(t){return null==this.label||it(this.eLabel,t),this}setDisabled(t){t=!!t;const e=this.getGui();return O(e,t),e.classList.toggle("ag-disabled",t),this.disabled=t,this}isDisabled(){return!!this.disabled}},Ao=class extends Eo{constructor(t,e,i,s){super(t,e,i),this.className=s}postConstruct(){super.postConstruct();const{width:t,value:e,onValueChange:i}=this.config;null!=t&&this.setWidth(t),null!=e&&this.setValue(e),null!=i&&this.onValueChange(i),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(t){return super.setLabel(t),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const t=this.getAriaElement(),e=this.getLabelId(),i=this.getLabel();null==i||""==i||null!==t.getAttribute("aria-label")?x(t,""):x(t,e??"")}setAriaLabel(t){return S(this.getAriaElement(),t),this.refreshAriaLabelledBy(),this}onValueChange(t){return this.addManagedListeners(this,{fieldValueChanged:()=>t(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(t){return st(this.getGui(),t),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(t,e){return this.value===t||(this.previousValue=this.value,this.value=t,e||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}},Io=class extends Ao{constructor(t,e,i="text",s="input"){super(t,t?.template??function(t){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:t,ref:"eInput",cls:"ag-input-field-input"}]}]}}(s),[],e),this.inputType=i,this.displayFieldTag=s,this.eLabel=Ui,this.eWrapper=Ui,this.eInput=Ui}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);const{eLabel:t,eWrapper:e,eInput:i,className:s}=this;t.classList.add(`${s}-label`),e.classList.add(`${s}-input-wrapper`),i.classList.add(`${s}-input`),this.addCss("ag-input-field"),i.id=i.id||`ag-${this.getCompId()}-input`;const{inputName:o,inputWidth:n}=this.config;null!=o&&this.setInputName(o),null!=n&&this.setInputWidth(n),this.addInputListeners(),this.activateTabIndex([i])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:t=>this.setValue(t.target.value)})}setInputType(t){"input"===this.displayFieldTag&&(this.inputType=t,lt(this.eInput,"type",t))}getInputElement(){return this.eInput}setInputWidth(t){return it(this.eWrapper,t),this}setInputName(t){return this.getInputElement().setAttribute("name",t),this}getFocusableElement(){return this.eInput}setMaxLength(t){return this.eInput.maxLength=t,this}setInputPlaceholder(t){return lt(this.eInput,"placeholder",t),this}setInputAriaLabel(t){return S(this.eInput,t),this.refreshAriaLabelledBy(),this}setDisabled(t){return O(this.eInput,t),super.setDisabled(t)}setAutoComplete(t){return lt(this.eInput,"autocomplete",!0===t?null:"string"==typeof t?t:"off"),this}},Ho=class extends Io{constructor(t,e="ag-checkbox",i="checkbox"){super(t,e,i),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:t,passive:e}=this.config;"boolean"==typeof t&&this.setReadOnly(t),"boolean"==typeof e&&this.setPassive(e)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return void 0===this.selected||!this.selected}setPassive(t){this.passive=t}isReadOnly(){return this.readOnly}setReadOnly(t){this.eWrapper.classList.toggle("ag-disabled",t),this.eInput.disabled=t,this.readOnly=t}setDisabled(t){return this.eWrapper.classList.toggle("ag-disabled",t),super.setDisabled(t)}toggle(){if(this.eInput.disabled)return;const t=this.isSelected(),e=this.getNextValue();this.passive?this.dispatchChange(e,t):this.setValue(e)}getValue(){return this.isSelected()}setValue(t,e){return this.refreshSelectedClass(t),this.setSelected(t,e),this}setName(t){return this.getInputElement().name=t,this}isSelected(){return this.selected}setSelected(t,e){if(this.isSelected()===t)return;this.previousValue=this.isSelected(),t=this.selected="boolean"==typeof t?t:void 0;const i=this.eInput;i.checked=t,i.indeterminate=void 0===t,e||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(t,e,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:t,previousValue:e,event:i});const s=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:s.id,name:s.name,selected:t,previousValue:e})}onCheckboxClick(t){if(this.passive||this.eInput.disabled)return;const e=this.isSelected(),i=this.selected=t.target.checked;this.refreshSelectedClass(i),this.dispatchChange(i,e,t)}refreshSelectedClass(t){const e=this.eWrapper.classList;e.toggle("ag-checked",!0===t),e.toggle("ag-indeterminate",null==t)}},Oo={selector:"AG-CHECKBOX",component:Ho},No=class extends Ho{constructor(t){super(t,"ag-radio-button","radio")}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(t){const e=this.eInput;t.selected&&t.name&&e.name&&e.name===t.name&&t.id&&e.id!==t.id&&this.setValue(!1,!0)}},Bo=class extends Io{constructor(t,e="ag-text-field",i="text"){super(t,e,i)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(t,e){const s=this.eInput;return s.value!==t&&(s.value=i(t)?t:""),super.setValue(t,e)}setStartValue(t){this.setValue(t,!0)}preventDisallowedCharacters(){const t=new RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListeners(this.eInput,{keydown:e=>{Co(e)&&e.key&&!t.test(e.key)&&e.preventDefault()},paste:e=>{const i=e.clipboardData?.getData("text");i?.split("").some((e=>!t.test(e)))&&e.preventDefault()}})}},Go={selector:"AG-INPUT-TEXT-FIELD",component:Bo},Vo={selector:"AG-INPUT-TEXT-AREA",component:class extends Io{constructor(t){super(t,"ag-text-area",null,"textarea")}setValue(t,e){const i=super.setValue(t,e);return this.eInput.value=t,i}setCols(t){return this.eInput.cols=t,this}setRows(t){return this.eInput.rows=t,this}}},Lo=class extends Bo{constructor(t){super(t,"ag-number-field","number")}postConstruct(){super.postConstruct();const t=this.eInput;this.addManagedListeners(t,{blur:()=>{const e=Number.parseFloat(t.value),i=isNaN(e)?"":this.normalizeValue(e.toString());this.value!==i&&this.setValue(i)},wheel:this.onWheel.bind(this)}),t.step="any";const{precision:e,min:i,max:s,step:o}=this.config;"number"==typeof e&&this.setPrecision(e),"number"==typeof i&&this.setMin(i),"number"==typeof s&&this.setMax(s),"number"==typeof o&&this.setStep(o)}onWheel(t){d(this.beans)===this.eInput&&t.preventDefault()}normalizeValue(t){return""===t?"":(null!=this.precision&&(t=this.adjustPrecision(t)),t)}adjustPrecision(t,e){const i=this.precision;if(null==i)return t;if(e){const e=Number.parseFloat(t).toFixed(i);return Number.parseFloat(e).toString()}const s=String(t).split(".");if(s.length>1){if(s[1].length<=i)return t;if(i>0)return`${s[0]}.${s[1].slice(0,i)}`}return s[0]}setMin(t){return this.min===t||(this.min=t,lt(this.eInput,"min",t)),this}setMax(t){return this.max===t||(this.max=t,lt(this.eInput,"max",t)),this}setPrecision(t){return this.precision=t,this}setStep(t){return this.step===t||(this.step=t,lt(this.eInput,"step",t)),this}setValue(t,e){return this.setValueOrInputValue((t=>super.setValue(t,e)),(()=>this),t)}setStartValue(t){return this.setValueOrInputValue((t=>super.setValue(t,!0)),(t=>{this.eInput.value=t}),t)}setValueOrInputValue(t,e,s){if(i(s)){let i=this.isScientificNotation(s);if(i&&this.eInput.validity.valid)return t(s);if(i||(i=(s=this.adjustPrecision(s))!=this.normalizeValue(s)),i)return e(s)}return t(s)}getValue(){const t=this.eInput;if(!t.validity.valid)return;const e=t.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):super.getValue()}isScientificNotation(t){return"string"==typeof t&&t.includes("e")}},zo={selector:"AG-INPUT-NUMBER-FIELD",component:Lo},$o={selector:"AG-INPUT-DATE-FIELD",component:class extends Bo{constructor(t){super(t,"ag-date-field","date")}postConstruct(){super.postConstruct();const t=Js();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||t||this.eInput.focus()}}),this.eInput.step="any"}onWheel(t){d(this.beans)===this.eInput&&t.preventDefault()}setMin(t){const e=t instanceof Date?ao(t??null,!!this.includeTime)??void 0:t;return this.min===e||(this.min=e,lt(this.eInput,"min",e)),this}setMax(t){const e=t instanceof Date?ao(t??null,!!this.includeTime)??void 0:t;return this.max===e||(this.max=e,lt(this.eInput,"max",e)),this}setStep(t){return this.step===t||(this.step=t,lt(this.eInput,"step",t)),this}setIncludeTime(t){return this.includeTime===t||(this.includeTime=t,super.setInputType(t?"datetime-local":"date"),t&&this.setStep(1)),this}getDate(){if(this.eInput.validity.valid)return mo(this.getValue())??void 0}setDate(t,e){this.setValue(ao(t??null,this.includeTime),e)}}},Wo=class extends Zi{constructor(t,e,i){super(((t,e)=>({tag:"div",cls:`ag-list-item ag-${t}-list-item`,attrs:{role:"option"},children:[{tag:"span",ref:"eText",children:e}]}))(t,e)),this.label=e,this.value=i,this.eText=Ui}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(t){const e=this.getGui();e.classList.toggle("ag-active-item",t),M(e,t),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:t})}getHeight(){return this.getGui().clientHeight}setIndex(t,e){const i=this.getGui();v(i,"posinset",t),v(i,"setsize",e)}createTooltip(){const t=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,{getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>tt(this.eText)},this));t&&(this.tooltipFeature=t)}addEventListeners(){const t=this.getParentComponent();t&&(this.addGuiEventListener("mouseover",(()=>{t.highlightItem(this)})),this.addGuiEventListener("mousedown",(e=>{e.preventDefault(),e.stopPropagation(),t.setValue(this.value)})))}},Uo=class extends Zi{constructor(t="default"){super({tag:"div",cls:`ag-list ag-${t}-list`}),this.cssIdentifier=t,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}")}postConstruct(){const t=this.getGui();this.addManagedElementListeners(t,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(t){const e=t.key;switch(e){case As:if(this.highlightedItem){const t=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(t)}else this.setValue(this.getValue());break;case Gs:case Ns:t.preventDefault(),this.navigate(e);break;case $s:case zs:case Ws:case Us:t.preventDefault(),this.navigateToPage(e)}}addOptions(t){for(const e of t)this.addOption(e);return this}addOption(t){const{value:e,text:i}=t,s=i??e;return this.options.push({value:e,text:s}),this.renderOption(e,s),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(const t of this.listItems)t.destroy();j(this.getGui()),this.listItems=[],this.refreshAriaRole()}setValue(t,e){if(this.value===t)return this.fireItemSelected(),this;if(null==t)return this.reset(e),this;const i=this.options.findIndex((e=>e.value===t));if(-1!==i){const t=this.options[i];this.value=t.value,this.displayValue=t.text,this.highlightItem(this.listItems[i]),e||this.fireChangeEvent()}return this}setValueByIndex(t){return this.setValue(this.options[t].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const t=this.options.findIndex((t=>t.value===this.value));-1!==t&&this.highlightItem(this.listItems[t])}highlightItem(t){const e=t.getGui();if(!Z(e))return;this.clearHighlighted(),t.setHighlighted(!0),this.highlightedItem=t;const i=this.getGui(),{scrollTop:s,clientHeight:o}=i,{offsetTop:n,offsetHeight:r}=e;(n+r>s+o||n<s)&&e.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(t){this.value=null,this.displayValue=null,this.clearHighlighted(),t||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(t,e){const i=new Wo(this.cssIdentifier,e,t);i.setParentComponent(this);const s=this.createManagedBean(i);this.listItems.push(s),this.getGui().appendChild(s.getGui())}navigate(t){const e=t===Gs;let i;const{listItems:s,highlightedItem:o}=this;if(o){let t=s.indexOf(o)+(e?1:-1);t=Math.min(Math.max(t,0),s.length-1),i=s[t]}else i=e?s[0]:hi(s);this.highlightItem(i)}navigateToPage(t){const{listItems:e,highlightedItem:i}=this;if(!i||0===e.length)return;const s=e.indexOf(i),o=this.options.length-1,n=e[0].getHeight(),r=Math.floor(this.getGui().clientHeight/n);let l=-1;t===Ws?l=0:t===Us?l=o:t===$s?l=Math.min(s+r,o):t===zs&&(l=Math.max(s-r,0)),-1!==l&&this.highlightItem(e[l])}refreshAriaRole(){y(this.getGui(),0===this.options.length?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();const t=this.listItems,e=t.length;t.forEach(((t,i)=>{t.setIndex(i+1,e)}))}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},jo={tag:"div",cls:"ag-picker-field",role:"presentation",children:[{tag:"div",ref:"eLabel"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-picker-field-wrapper ag-picker-collapsed",children:[{tag:"div",ref:"eDisplayField",cls:"ag-picker-field-display"},{tag:"div",ref:"eIcon",cls:"ag-picker-field-icon",attrs:{"aria-hidden":"true"}}]}]},Ko=class extends Ao{constructor(t){if(super(t,t?.template||jo,t?.agComponents||[],t?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=Ui,this.eWrapper=Ui,this.eDisplayField=Ui,this.eIcon=Ui,this.registerCSS(".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.ag-picker-has-focus),&:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:disabled{opacity:.5}}"),this.ariaRole=t?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!t)return;const{pickerGap:e,maxPickerHeight:i,variableWidth:s,minPickerWidth:o,maxPickerWidth:n}=t;null!=e&&(this.pickerGap=e),this.variableWidth=!!s,null!=i&&this.setPickerMaxHeight(i),null!=o&&this.setPickerMinWidth(o),null!=n&&this.setPickerMaxWidth(n)}postConstruct(){super.postConstruct(),this.setupAria();const t=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",t);const e=this.getAriaElement();this.addManagedElementListeners(e,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:i,inputWidth:s}=this.config;if(i){const t=this.beans.iconSvc.createIconNoSpan(i);t&&this.eIcon.appendChild(t)}null!=s&&this.setInputWidth(s)}setupAria(){const t=this.getAriaElement();t.setAttribute("tabindex",this.gos.get("tabIndex").toString()),k(t,!1),this.ariaRole&&y(t,this.ariaRole)}onLabelOrWrapperMouseDown(t){if(t){const e=this.getFocusableElement();if(e!==this.eWrapper&&t?.target===e)return;t.preventDefault(),this.getFocusableElement().focus()}this.skipClick?this.skipClick=!1:this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(t){switch(t.key){case Ns:case Gs:case As:case Hs:t.preventDefault(),this.onLabelOrWrapperMouseDown();break;case Is:this.isPickerDisplayed&&(t.preventDefault(),t.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const t=this.pickerComponent.getGui();t.addEventListener("focusin",this.onPickerFocusIn),t.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const t=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const e=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:i,pickerAriaLabelValue:s,modalPicker:o=!0},maxPickerHeight:n,minPickerWidth:r,maxPickerWidth:l,variableWidth:a,beans:h,eWrapper:c}=this,u={modal:o,eChild:t,closeOnEsc:!0,closedCallback:()=>{const t=p(h);this.beforeHidePicker(),t&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:e(i,s),anchorToElement:c};t.style.position="absolute";const d=h.popupSvc,g=d.addPopup(u);a?(r&&(t.style.minWidth=r),t.style.width=nt(z(c)),l&&(t.style.maxWidth=l)):it(t,l??z(c));const f=n??`${G(d.getPopupParent())}px`;return t.style.setProperty("max-height",f),this.alignPickerToComponent(),g.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:t,config:{pickerType:e},beans:{popupSvc:i,gos:s},eWrapper:o,pickerComponent:n}=this,r=s.get("enableRtl")?"right":"left";i.positionPopupByComponent({type:e,eventSource:o,ePopup:n.getGui(),position:"under",alignSide:r,keepWithinBounds:!0,nudgeY:t})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const t=this.pickerComponent.getGui();t.removeEventListener("focusin",this.onPickerFocusIn),t.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(t){if(!this.isAlive())return;k(this.getAriaElement(),t);const e=this.eWrapper.classList;e.toggle("ag-picker-expanded",t),e.toggle("ag-picker-collapsed",!t)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(t){this.pickerComponent?.getGui().contains(t.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(t){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",t)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(t){return it(this.eWrapper,t),this}getFocusableElement(){return this.eWrapper}setPickerGap(t){return this.pickerGap=t,this}setPickerMinWidth(t){return"number"==typeof t&&(t=`${t}px`),this.minPickerWidth=null==t?void 0:t,this}setPickerMaxWidth(t){return"number"==typeof t&&(t=`${t}px`),this.maxPickerWidth=null==t?void 0:t,this}setPickerMaxHeight(t){return"number"==typeof t&&(t=`${t}px`),this.maxPickerHeight=null==t?void 0:t,this}destroy(){this.hidePicker(),super.destroy()}},qo=class extends Ko{constructor(t){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...t}),this.registerCSS(".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}")}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:X((()=>this.eDisplayField)),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:t,value:e,placeholder:i}=this.config;null!=t&&this.addOptions(t),null!=e&&this.setValue(e,!0),i&&null==e&&(this.eDisplayField.textContent=i),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(t){this.eWrapper.contains(t.relatedTarget)||this.hidePicker()}createListComponent(){const t=this.createBean(new Uo("select"));this.listComponent=t,t.setParentComponent(this);const e=t.getAriaElement(),i=`ag-select-list-${t.getCompId()}`;var s,o;e.setAttribute("id",i),function(t,e){w(t,"controls",e)}(s=this.getAriaElement(),(o=e).id),x(o,s.id),t.addManagedElementListeners(t.getGui(),{mousedown:t=>{t?.preventDefault()}}),t.addManagedListeners(t,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(t){const{key:e}=t;switch(e===Es&&this.hidePicker(),e){case As:case Ns:case Gs:case zs:case $s:case Ws:case Us:t.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(t):super.onKeyDown(t);break;case Is:super.onKeyDown(t);break;case Hs:this.isPickerDisplayed?t.preventDefault():super.onKeyDown(t)}}showPicker(){const t=this.listComponent;t&&(super.showPicker(),t.refreshHighlighted())}addOptions(t){for(const e of t)this.addOption(e);return this}addOption(t){return this.listComponent.addOption(t),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}setValue(t,e,i){const{listComponent:s,config:{placeholder:o},eDisplayField:n,tooltipFeature:r}=this;if(this.value===t||!s)return this;if(i||s.setValue(t,!0),s.getValue()===this.getValue())return this;let l=s.getDisplayValue();return null==l&&o&&(l=o),n.textContent=l,r?.setTooltipAndRefresh(l??null),super.setValue(t,e)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},Zo={selector:"AG-SELECT",component:qo},_o="object"!=typeof window||!window?.document?.fonts?.forEach,Yo=(t,e,i,s,o,n)=>{if(_o)return;s&&(t=`@layer ${CSS.escape(s)} { ${t} }`);let r=Jo.map.get(e);if(r||(r=[],Jo.map.set(e,r)),r.some((e=>e.css===t)))return;const l=document.createElement("style");n&&l.setAttribute("nonce",n),l.dataset.agGlobalCss=i,l.textContent=t;const a={css:t,el:l,priority:o};let h;for(const t of r){if(t.priority>o)break;h=t}if(h){h.el.insertAdjacentElement("afterend",l);const t=r.indexOf(h);r.splice(t+1,0,a)}else e.insertBefore(l,e.querySelector(":not(title, meta)")),r.push(a)},Qo=(t,e,i,s)=>{Yo(':where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}&:where(button){color:inherit}}:where(.ag-root-wrapper,ag-external,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',t,"shared",e,0,i),s?.forEach(((s,o)=>s.forEach((s=>Yo(s,t,o,e,0,i)))))},Jo=(Po="object"==typeof window?window:{}).agStyleInjectionState??(Po.agStyleInjectionState={map:new WeakMap,grids:new Set}),Xo=t=>new sn(t),tn="$default",en=0,sn=class{constructor({feature:t,params:e,modeParams:i={},css:s,cssImports:o}){this.feature=t,this.css=s,this.cssImports=o,this.modeParams={[tn]:{...i[tn]??{},...e??{}},...i}}use(t,e,i){let s=this._inject;if(null==s){let{css:t}=this;if(t){const e=`ag-theme-${this.feature??"part"}-${++en}`;"function"==typeof t&&(t=t()),t=`:where(.${e}) {\n${t}\n}\n`;for(const e of this.cssImports??[])t=`@import url(${JSON.stringify(e)});\n${t}`;s={css:t,class:e}}else s=!1;this._inject=s}return s&&t&&Yo(s.css,t,s.class,e,1,i),!!s&&s.class}},on=t=>{return`--ag-${e=t,e.replace(/[A-Z]/g,(t=>`-${t}`)).toLowerCase()}`;var e},nn=t=>`var(${on(t)})`,rn=t=>({ref:"accentColor",mix:t}),ln=t=>({ref:"foregroundColor",mix:t}),an=t=>({ref:"foregroundColor",mix:t,onto:"backgroundColor"}),hn={ref:"backgroundColor"},cn={ref:"foregroundColor"},un={ref:"accentColor"},dn={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:ln(.15),chromeBackgroundColor:an(.02),browserColorScheme:"light"},gn={...dn,textColor:cn,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,focusShadow:{spread:3,color:rn(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:hn,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:un,toggleButtonOffBackgroundColor:an(.3),toggleButtonSwitchBackgroundColor:hn,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}}},pn=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],fn=(()=>{const t=new Map;return e=>{const i=e;return t.has(i)||t.set(i,(s=(s=e).toLowerCase(),pn.find((t=>s.endsWith(t.toLowerCase())))??"length")),t.get(i);var s}})(),mn=t=>"object"==typeof t&&t?.ref?nn(t.ref):"string"==typeof t?t:"number"==typeof t&&String(t),wn=t=>{if("string"==typeof t)return t;if(t&&"ref"in t){const e=nn(t.ref);return null==t.mix?e:`color-mix(in srgb, ${t.onto?nn(t.onto):"transparent"}, ${e} ${(t=>Math.max(0,Math.min(100,t)))(100*t.mix)}%)`}return!1},vn=t=>"string"==typeof t?t:"number"==typeof t?`${t}px`:t&&"calc"in t?`calc(${t.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,(t=>"-"===t[0]?t:" "+nn(t)+" "))})`:!(!t||!("ref"in t))&&nn(t.ref),Cn=(t,e)=>"string"==typeof t?t:!0===t?Cn({},e):!1===t?"columnBorder"===e?Cn({color:"transparent"},e):"none":t&&"ref"in t?nn(t.ref):bn(t.style??"solid")+" "+vn(t.width??{ref:"borderWidth"})+" "+wn(t.color??{ref:"borderColor"}),bn=mn,yn=t=>"string"==typeof t?t.includes(",")?t:Sn(t):t&&"googleFont"in t?yn(t.googleFont):t&&"ref"in t?nn(t.ref):!!Array.isArray(t)&&t.map((t=>("object"==typeof t&&"googleFont"in t&&(t=t.googleFont),Sn(t)))).join(", "),Sn=t=>/^[\w-]+$|\w\(/.test(t)?t:JSON.stringify(t),xn=t=>"string"==typeof t?t:t&&"url"in t?`url(${JSON.stringify(t.url)})`:t&&"svg"in t?xn({url:`data:image/svg+xml,${encodeURIComponent(t.svg)}`}):!(!t||!("ref"in t))&&nn(t.ref),Rn={color:wn,colorScheme:mn,length:vn,scale:mn,border:Cn,borderStyle:bn,shadow:t=>"string"==typeof t?t:!1===t?"none":t&&"ref"in t?nn(t.ref):[vn(t.offsetX??0),vn(t.offsetY??0),vn(t.radius??0),vn(t.spread??0),wn(t.color??{ref:"foregroundColor"})].join(" "),image:xn,fontFamily:yn,fontWeight:mn,duration:(t,e,i)=>"string"==typeof t?t:"number"==typeof t?(t>=10&&i.warn(104,{value:t,param:e}),`${t}s`):!(!t||!("ref"in t))&&nn(t.ref)},Fn=(t,e,i)=>{const s=fn(t);return Rn[s](e,t,i)},kn=class t{constructor(t,e=[]){this.themeLogger=t,this.parts=e}withPart(e){return"function"==typeof e&&(e=e()),e instanceof sn?new t(this.themeLogger,[...this.parts,e]):(this.themeLogger.preInitErr(259,"Invalid part",{part:e}),this)}withoutPart(t){return this.withPart(Xo({feature:t}))}withParams(t,e=tn){return this.withPart(Xo({modeParams:{[e]:t}}))}_startUse({styleContainer:t,cssLayer:e,nonce:i,loadThemeGoogleFonts:s,moduleCss:o}){if(_o)return;Tn(),Qo(t,e,i,o);const n=Dn(this);if(n.length>0)for(const t of n)s&&En(t,i);for(const s of this.parts)s.use(t,e,i)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=Pn(this.parts).map((t=>t.use(void 0,void 0,void 0))).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const e={[tn]:{...gn}};for(const t of Pn(this.parts))for(const i of Object.keys(t.modeParams)){const s=t.modeParams[i];if(s){const t=e[i]??(e[i]={}),o=new Set;for(const e of Object.keys(s)){const i=s[e];void 0!==i&&(t[e]=i,o.add(e))}if(i===tn)for(const t of Object.keys(e)){const i=e[t];if(t!==tn)for(const t of o)delete i[t]}}}this._paramsCache=t=e}return t}_getPerInstanceCss(t){const e="##SELECTOR##";let i=this._paramsCssCache;if(!i){let t="",s="";const o=this._getModeParams();for(const e of Object.keys(o)){const i=o[e];if(e!==tn){const i=`:where([data-ag-theme-mode="${"object"==typeof CSS?CSS.escape(e):e}"]) & {\n`;t+=i,s+=i}for(const e of Object.keys(i).sort()){const o=i[e],n=Fn(e,o,this.themeLogger);if(!1===n)this.themeLogger.error(107,{key:e,value:o});else{const i=on(e),o=i.replace("--ag-","--ag-inherited-");t+=`\t${i}: var(${o}, ${n});\n`,s+=`\t${o}: var(${i});\n`}}e!==tn&&(t+="}\n",s+="}\n")}let n=`${e} {\n${t}}\n`;n+=`:has(> ${e}):not(${e}) {\n${s}}\n`,this._paramsCssCache=i=n}return i.replaceAll(e,`:where(.${t})`)}},Pn=t=>{const e=new Map;for(const i of t)e.set(i.feature,i);const i=[];for(const s of t)s.feature&&e.get(s.feature)!==s||i.push(s);return i},Dn=t=>{const e=new Set,i=t=>{if(Array.isArray(t))t.forEach(i);else{const i=t?.googleFont;"string"==typeof i&&e.add(i)}};return Object.values(t._getModeParams()).flatMap((t=>Object.values(t))).forEach(i),Array.from(e).sort()},Mn=!1,Tn=()=>{if(!Mn){Mn=!0;for(const t of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))t.remove()}},En=async(t,e)=>{const i=`@import url('https://${An}/css2?family=${encodeURIComponent(t)}:wght@100;200;300;400;500;600;700;800;900&display=swap');\n`;Yo(i,document.head,`googleFont:${t}`,void 0,0,e)},An="fonts.googleapis.com",In=1,Hn=class{constructor(t){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=In++,t?.beanClasses&&(this.beanDestroyComparator=t.beanDestroyComparator,this.init(t))}init(t){this.id=t.id,this.beans.context=this,this.destroyCallback=t.destroyCallback;for(const e of Object.keys(t.providedBeanInstances))this.beans[e]=t.providedBeanInstances[e];for(const e of t.beanClasses){const t=new e;t.beanName?this.beans[t.beanName]=t:console.error(`Bean ${e.name} is missing beanName`),this.createdBeans.push(t)}for(const e of t.derivedBeans??[]){const{beanName:t,bean:i}=e(this);this.beans[t]=i,this.createdBeans.push(i)}t.beanInitComparator&&this.createdBeans.sort(t.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(t,e){return this.initBeans([t],e),t}initBeans(t,e){const i=this.beans;for(const e of t)e.preWireBeans?.(i),e.wireBeans?.(i);for(const e of t)e.preConstruct?.();e&&t.forEach(e);for(const e of t)e.postConstruct?.()}getBeans(){return this.beans}getBean(t){return this.beans[t]}getId(){return this.id}destroy(){if(this.destroyed)return;this.destroyed=!0;const t=this.getBeanInstances();this.beanDestroyComparator&&t.sort(this.beanDestroyComparator),this.destroyBeans(t),this.beans={},this.createdBeans=[],this.destroyCallback?.()}destroyBean(t){t?.destroy?.()}destroyBeans(t){if(t)for(let e=0;e<t.length;e++)this.destroyBean(t[e]);return[]}isDestroyed(){return this.destroyed}},On=0,Nn=class extends Pt{constructor(){super(...arguments),this.beanName="environment",this.paramsClass="ag-theme-params-"+ ++On,this.globalCSS=[]}wireBeans(t){this.eRootDiv=t.eRootDiv}postConstruct(){const{gos:t,eRootDiv:e}=this;t.setInstanceDomData(e),this.eStyleContainer=t.get("themeStyleContainer")??(e.getRootNode()===document?document.head:e),this.cssLayer=t.get("themeCssLayer"),this.styleNonce=t.get("styleNonce"),this.addManagedPropertyListener("theme",(()=>this.handleThemeChange())),this.handleThemeChange(),this.initVariables(),this.addDestroyFunc((()=>(()=>{if(Jo.grids.delete(this),0===Jo.grids.size){Jo.map=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}})())),this.mutationObserver=new MutationObserver((()=>{this.fireStylesChangedEvent("themeChanged")})),this.addDestroyFunc((()=>this.mutationObserver.disconnect()))}applyThemeClasses(t,e=[]){const{theme:i}=this;let s;s=i?`${this.paramsClass} ${i._getCssClass()}`:this.applyLegacyThemeClasses();for(const e of Array.from(t.classList))e.startsWith("ag-theme-")&&t.classList.remove(e);if(s){const i=t.className;t.className=`${i}${i?" ":""}${s}${e?.length?" "+e.join(" "):""}`}}applyLegacyThemeClasses(){let t="";this.mutationObserver.disconnect();let e=this.eRootDiv;for(;e;){let i=!1;for(const s of Array.from(e.classList))s.startsWith("ag-theme-")&&(i=!0,t=t?`${t} ${s}`:s);i&&this.mutationObserver.observe(e,{attributes:!0,attributeFilter:["class"]}),e=e.parentElement}return t}addGlobalCSS(t,e){this.theme?Yo(t,this.eStyleContainer,e,this.cssLayer,0,this.styleNonce):this.globalCSS.push([t,e])}handleThemeChange(){const{gos:t,theme:e}=this,i=t.get("theme");let s;if("legacy"===i)s=void 0;else{const t=i??this.getDefaultTheme();t instanceof kn?s=t:this.themeError(t)}s!==e&&this.handleNewTheme(s),this.postProcessThemeChange(s,i)}handleNewTheme(t){const{gos:e,eRootDiv:i,globalCSS:s}=this,o=this.getAdditionalCss();if(t){Jo.grids.add(this),Qo(this.eStyleContainer,this.cssLayer,this.styleNonce,o);for(const[t,e]of s)Yo(t,this.eStyleContainer,e,this.cssLayer,0,this.styleNonce);s.length=0}this.theme=t,t?._startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:o});let n=this.eParamsStyle;if(!n){n=this.eParamsStyle=gt({tag:"style"});const t=e.get("styleNonce");t&&n.setAttribute("nonce",t),i.appendChild(n)}_o||(n.textContent=t?._getPerInstanceCss(this.paramsClass)||""),this.applyThemeClasses(i),this.fireStylesChangedEvent("themeChanged")}},Bn=class extends Pt{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(t){if(t){this.dynamicBeans??(this.dynamicBeans={});for(const e of Object.keys(t))this.dynamicBeans[e]=t[e]}}createDynamicBean(t,e,...i){if(!this.dynamicBeans)throw new Error(this.getDynamicError(t,!0));const s=this.dynamicBeans[t];if(null!=s)return new s(...i);if(e)throw new Error(this.getDynamicError(t,!1))}},Gn=class extends Pt{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new t}addListener(t,e,i){this.globalSvc.addEventListener(t,e,i)}removeListener(t,e,i){this.globalSvc.removeEventListener(t,e,i)}addGlobalListener(t,e=!1){this.globalSvc.addGlobalListener(t,e)}removeGlobalListener(t,e=!1){this.globalSvc.removeGlobalListener(t,e)}dispatchEvent(t){this.globalSvc.dispatchEvent(this.gos.addCommon(t))}dispatchEventOnce(t){this.globalSvc.dispatchEventOnce(this.gos.addCommon(t))}},Vn=class extends Pt{constructor(t,e){super(),this.ctrl=t,e&&(this.beans=e)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(t,e){const i="title",s=this.ctrl.getGui();s&&(null==t||""==t&&!e?s.removeAttribute(i):s.setAttribute(i,t))}updateTooltipText(){const{getTooltipValue:t}=this.ctrl;t&&(this.tooltip=t())}createTooltipFeatureIfNeeded(){if(null==this.tooltipManager){const t=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,(()=>this.tooltip));t&&(this.tooltipManager=this.createBean(t,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(t){this.tooltip=t,this.refreshTooltip()}refreshTooltip(t){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(t?"":null,t),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},Ln=!1,zn=class extends Pt{constructor(t,e){super(),this.tooltipCtrl=t,this.getTooltipValue=e,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(t){this.popupSvc=t.popupSvc}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const t=this.tooltipCtrl.getGui();0===this.tooltipTrigger&&this.addManagedListeners(t,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),1===this.tooltipTrigger&&this.addManagedListeners(t,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(t,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(t,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(t){const e=this.gos.get(t);return Math.max(200,e)}getTooltipDelay(t){return"show"===t?this.tooltipCtrl.getTooltipShowDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipCtrl.getTooltipHideDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const t=this.gos.get("tooltipTrigger");return t&&"hover"!==t?1:0}onMouseEnter(t){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),eo()||(Ln?this.showTooltipTimeoutId=window.setTimeout((()=>{this.prepareToShowTooltip(t)}),100):this.prepareToShowTooltip(t))}onMouseMove(t){this.lastMouseEvent&&(this.lastMouseEvent=t),this.tooltipMouseTrack&&2===this.state&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(t){const e=t.relatedTarget,i=this.tooltipCtrl.getGui(),s=this.tooltipComp?.getGui();this.isInteractingWithTooltip||i.contains(e)||this.interactionEnabled&&s?.contains(e)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(t){if(0!=this.state||Ln)return;let e=0;t&&(e=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=t||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),e),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-Do<1e3}setToDoNothing(t){t||2!==this.state||this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const t=this.getTooltipValue(),e=this.tooltipCtrl;if(!i(t)||e.shouldDisplayTooltip&&!e.shouldDisplayTooltip())return void this.setToDoNothing();const s=this.gos.addCommon({location:e.getLocation?.()??"UNKNOWN",value:t,hideTooltipCallback:()=>this.hideTooltip(!0),...e.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;const o=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(s,o)}hideTooltip(t){!t&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Do=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),t&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(t,e){if(2!==this.state||this.tooltipInstanceCount!==t)return void this.destroyBean(e);const i=e.getGui();this.tooltipComp=e,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),o=this.popupSvc?.addPopup({eChild:i,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(o&&(this.tooltipPopupDestroyFunc=o.hideFunc),this.positionTooltip(),1===this.tooltipTrigger){const t=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:t}),this.setEventHandlers(t)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(g(this.beans),{keydown:t=>{i.contains(t?.target)||this.onKeyDown()}}),1===this.tooltipTrigger&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){const t=this.tooltipComp?.getGui(),e=d(this.beans);return!!t&&t.contains(e)}onTooltipFocusOut(t){const e=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,e.contains(t.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...t,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...t,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const t=this.tooltipPopupDestroyFunc,e=this.tooltipComp;window.setTimeout((()=>{t(),this.destroyBean(e)}),0===this.tooltipTrigger?1e3:0),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(const t of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])t&&t();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){Ln=!0,this.interactiveTooltipTimeoutId=window.setTimeout((()=>{this.unlockService(),this.setToDoNothing()}),100)}unlockService(){Ln=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}},$n=0,Wn=class extends Pt{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}getPopupParent(){return this.gos.get("popupParent")||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(t){const{ePopup:e,nudgeX:i,nudgeY:s,skipObserver:o}=t;this.positionPopup({ePopup:e,nudgeX:i,nudgeY:s,keepWithinBounds:!0,skipObserver:o,updatePosition:()=>this.calculatePointerAlign(t.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(t,t.type,t.ePopup,null,t.mouseEvent)})}calculatePointerAlign(t){const e=this.getParentRect();return{x:t.clientX-e.left,y:t.clientY-e.top}}positionPopupByComponent(t){const{ePopup:e,nudgeX:i,nudgeY:s,keepWithinBounds:o,eventSource:n,alignSide:r="left",position:l="over",type:a}=t,h=n.getBoundingClientRect(),c=this.getParentRect();this.setAlignedTo(n,e),this.positionPopup({ePopup:e,nudgeX:i,nudgeY:s,keepWithinBounds:o,updatePosition:()=>{let i,o=h.left-c.left;return"right"===r&&(o-=e.offsetWidth-h.width),"over"===l?(i=h.top-c.top,this.setAlignedStyles(e,"over")):(this.setAlignedStyles(e,"under"),i="under"===this.shouldRenderUnderOrAbove(e,h,c,t.nudgeY||0)?h.top-c.top+h.height:h.top-e.offsetHeight-2*(s||0)-c.top),{x:o,y:i}},postProcessCallback:()=>this.callPostProcessPopup(t,a,e,n,null)})}shouldRenderUnderOrAbove(t,e,i,s){const o=i.bottom-e.bottom,n=e.top-i.top,r=t.offsetHeight+s;return o>r?"under":n>r||n>o?"above":"under"}setAlignedStyles(t,e){const i=this.getPopupIndex(t);if(-1===i)return;const s=this.popupList[i],{alignedToElement:o}=s;if(!o)return;const n=["right","left","over","above","under"];for(const e of n)o.classList.remove(`ag-has-popup-positioned-${e}`),t.classList.remove(`ag-popup-positioned-${e}`);e&&(o.classList.add(`ag-has-popup-positioned-${e}`),t.classList.add(`ag-popup-positioned-${e}`))}setAlignedTo(t,e){const i=this.getPopupIndex(e);-1!==i&&(this.popupList[i].alignedToElement=t)}positionPopup(t){const{ePopup:e,keepWithinBounds:i,nudgeX:s,nudgeY:o,skipObserver:n,updatePosition:r}=t,l={width:0,height:0},a=(n=!1)=>{let{x:a,y:h}=r();n&&e.clientWidth===l.width&&e.clientHeight===l.height||(l.width=e.clientWidth,l.height=e.clientHeight,s&&(a+=s),o&&(h+=o),i&&(a=this.keepXYWithinBounds(e,a,1),h=this.keepXYWithinBounds(e,h,0)),e.style.left=`${a}px`,e.style.top=`${h}px`,t.postProcessCallback&&t.postProcessCallback())};if(a(),!n){const t=at(this.beans,e,(()=>a(!0)));setTimeout((()=>t()),200)}}getParentRect(){const t=g(this.beans);let e=this.getPopupParent();return e===t.body?e=t.documentElement:"static"===getComputedStyle(e).position&&(e=e.offsetParent),$(e)}keepXYWithinBounds(t,e,i){const s=0===i,o=s?"clientHeight":"clientWidth",n=s?"top":"left",r=s?"height":"width",l=s?"scrollTop":"scrollLeft",a=g(this.beans),h=a.documentElement,c=this.getPopupParent(),u=t.getBoundingClientRect(),d=c.getBoundingClientRect(),p=a.documentElement.getBoundingClientRect(),f=c===a.body,m=Math.ceil(u[r]);let w=f?(s?L:z)(h)+h[l]:c[o];f&&(w-=Math.abs(p[n]-d[n]));const v=w-m;return Math.min(Math.max(e,0),Math.max(v,0))}addPopup(t){const{eChild:e,ariaLabel:i,ariaOwns:s,alwaysOnTop:o,positionCallback:n,anchorToElement:r}=t,l=this.getPopupIndex(e);if(-1!==l)return{hideFunc:this.popupList[l].hideFunc};this.initialisePopupPosition(e);const a=this.createPopupWrapper(e,!!o,i,s),h=this.addEventListenersToPopup({...t,wrapperEl:a});return n&&n(),this.addPopupToPopupList(e,a,h,r),{hideFunc:h}}initialisePopupPosition(t){const e=this.getPopupParent().getBoundingClientRect();i(t.style.top)||(t.style.top=-1*e.top+"px"),i(t.style.left)||(t.style.left=-1*e.left+"px")}createPopupWrapper(t,e,i,s){const o=this.getPopupParent(),{environment:n,gos:r}=this.beans,l=gt({tag:"div"});return n.applyThemeClasses(l),l.classList.add("ag-popup"),t.classList.add(r.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),t.hasAttribute("role")||y(t,"dialog"),i?S(t,i):s&&(t.id||(t.id=`popup-component-${$n}`),T(s,t.id)),l.appendChild(t),o.appendChild(l),e?this.setAlwaysOnTop(t,!0):this.bringPopupToFront(t),l}addEventListenersToPopup(t){const e=this.beans,i=g(e),{wrapperEl:s,eChild:o,closedCallback:n,afterGuiAttached:r,closeOnEsc:l,modal:a,ariaOwns:h}=t;let c=!1;const u=t=>{s.contains(d(e))&&(t.key!==Is||this.isStopPropagation(t)||m({keyboardEvent:t}))},p=t=>m({mouseEvent:t}),f=t=>m({touchEvent:t}),m=(t={})=>{const{mouseEvent:e,touchEvent:r,keyboardEvent:l,forceHide:a}=t;(a||!this.isEventFromCurrentPopup({mouseEvent:e,touchEvent:r},o)&&!c)&&(c=!0,s.remove(),i.removeEventListener("keydown",u),i.removeEventListener("mousedown",p),i.removeEventListener("touchstart",f),i.removeEventListener("contextmenu",p),this.eventSvc.removeListener("dragStarted",p),n&&n(e||r||l),this.removePopupFromPopupList(o,h))};return r&&r({hidePopup:m}),window.setTimeout((()=>{l&&i.addEventListener("keydown",u),a&&(i.addEventListener("mousedown",p),this.eventSvc.addListener("dragStarted",p),i.addEventListener("touchstart",f),i.addEventListener("contextmenu",p))}),0),m}addPopupToPopupList(t,e,i,s){this.popupList.push({element:t,wrapper:e,hideFunc:i,instanceId:$n,isAnchored:!!s}),s&&this.setPopupPositionRelatedToElement(t,s),$n+=1}getPopupIndex(t){return this.popupList.findIndex((e=>e.element===t))}setPopupPositionRelatedToElement(t,e){const i=this.getPopupIndex(t);if(-1===i)return;const s=this.popupList[i];if(s.stopAnchoringPromise&&s.stopAnchoringPromise.then((t=>t&&t())),s.stopAnchoringPromise=void 0,s.isAnchored=!1,!e)return;const o=this.keepPopupPositionedRelativeTo({element:e,ePopup:t,hidePopup:s.hideFunc});return s.stopAnchoringPromise=o,s.isAnchored=!0,o}removePopupFromPopupList(t,e){this.setAlignedStyles(t,null),this.setPopupPositionRelatedToElement(t,null),e&&T(e,null),this.popupList=this.popupList.filter((e=>e.element!==t))}keepPopupPositionedRelativeTo(t){const e=this.getPopupParent(),i=e.getBoundingClientRect(),{element:s,ePopup:o}=t,n=s.getBoundingClientRect(),r=t=>Number.parseInt(t.substring(0,t.length-1),10),l=(t,e)=>{const s=i[t]-n[t],l=r(o.style[t]);return{initialDiff:s,lastDiff:s,initial:l,last:l,direction:e}},a=l("top",0),h=l("left",1),c=this.beans.frameworkOverrides;return new Qi((i=>{c.wrapIncoming((()=>{var n;(n=()=>{const i=e.getBoundingClientRect(),n=s.getBoundingClientRect();if(0==n.top&&0==n.left&&0==n.height&&0==n.width)return void t.hidePopup();const l=(t,e)=>{const s=r(o.style[e]);t.last!==s&&(t.initial=s,t.last=s);const l=i[e]-n[e];if(l!=t.lastDiff){const i=this.keepXYWithinBounds(o,t.initial+t.initialDiff-l,t.direction);o.style[e]=`${i}px`,t.last=i}t.lastDiff=l};l(a,"top"),l(h,"left")},new Qi((t=>{t(window.setInterval(n,200))}))).then((t=>{i((()=>{null!=t&&window.clearInterval(t)}))}))}),"popupPositioning")}))}isEventFromCurrentPopup(t,e){const{mouseEvent:i,touchEvent:s}=t,o=i||s;if(!o)return!1;const n=this.getPopupIndex(e);if(-1===n)return!1;for(let t=n;t<this.popupList.length;t++)if(vt(this.popupList[t].element,o))return!0;return this.isElementWithinCustomPopup(o.target)}isElementWithinCustomPopup(t){const e=g(this.beans);for(;t&&t!==e.body;){if(t.classList.contains("ag-custom-component-popup")||null===t.parentElement)return!0;t=t.parentElement}return!1}getWrapper(t){for(;!t.classList.contains("ag-popup")&&t.parentElement;)t=t.parentElement;return t.classList.contains("ag-popup")?t:null}setAlwaysOnTop(t,e){const i=this.getWrapper(t);i&&(i.classList.toggle("ag-always-on-top",!!e),e&&this.bringPopupToFront(i))}bringPopupToFront(t){const e=this.getPopupParent(),i=Array.prototype.slice.call(e.querySelectorAll(".ag-popup")),s=i.length,o=this.getWrapper(t);if(!o||s<=1||!e.contains(t))return;const n=[],r=[];for(const t of i)t!==o&&(t.classList.contains("ag-always-on-top")?r.push(t):n.push(t));const l=[],a=r.length,h=o.classList.contains("ag-always-on-top")||!a?[...n,...r,o]:[...n,o,...r];for(let t=0;t<=s;t++){const s=h[t];if(i[t]===h[t]||s===o)continue;const n=s.querySelectorAll("div");for(const t of n)0!==t.scrollTop&&l.push([t,t.scrollTop]);0===t?e.insertAdjacentElement("afterbegin",s):h[t-1].insertAdjacentElement("afterend",s)}for(;l.length;){const t=l.pop();t[0].scrollTop=t[1]}}},Un=(t,e)=>{if(null!=e&&t?.setPointerCapture)try{return t.setPointerCapture(e),t.hasPointerCapture(e)}catch{}return!1},jn=t=>{const{eElement:e,onLost:i}=t;e&&i&&(e.removeEventListener("lostpointercapture",i),t.onLost=null)},Kn=t=>{if(To){if(To.has(t))return!1}else To=new WeakSet;return To.add(t),!0},qn=class extends Pt{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!Mo?.has(u(this.beans))}hasPointerCapture(){const t=this.drag?.pointerCapture;return!(!t||!this.beans.eRootDiv.hasPointerCapture?.(t.pointerId))}destroy(){this.drag&&this.cancelDrag();const t=this.dragSources;for(const e of t)Zn(e);t.length=0,super.destroy()}removeDragSource(t){const e=this.dragSources;for(let i=0,s=e.length;i<s;++i){const s=e[i];if(s.params===t){e.splice(i,1),Zn(s);break}}}addDragSource(t){if(!this.isAlive())return;const{eElement:e,includeTouch:i}=t,s=[];let o;if(i){const t=e.style;t&&(o=t.touchAction,t.touchAction="none")}this.dragSources.push({handlers:s,params:t,oldTouchAction:o}),St(s,[e,"pointerdown",e=>this.onPointerDown(t,e),{passive:!1}],[e,"mousedown",e=>this.onMouseDown(t,e)]);const n=this.gos.get("suppressTouch");i&&!n&&St(s,[e,"touchstart",e=>this.onTouchStart(t,e),{passive:!1}])}cancelDrag(t){const e=this.drag;t??(t=e?.eElement),t&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:t}),e?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(t){const e=t.type;return("mousemove"===e||"pointermove"===e)&&t.cancelable&&yt(this.beans,t)&&!I(Yn(t))}initDrag(t,...e){this.drag=t;const i=this.beans,s=t=>this.onScroll(t),o=u(i),n=g(i);St(t.handlers,[o,"contextmenu",Rt],[o,"keydown",t=>this.onKeyDown(t)],[n,"scroll",s,{capture:!0}],[n.defaultView||window,"scroll",s],...e)}destroyDrag(){this.dragging=!1;const t=this.drag;if(t){const e=t.rootEl;Mo?.get(e)===t&&Mo?.delete(e),this.drag=null,(t=>{if(!t)return;jn(t);const{eElement:e,pointerId:i}=t;if(e){try{e.releasePointerCapture(i)}catch{}t.eElement=null}})(t.pointerCapture),xt(t.handlers)}}onPointerDown(t,e){if(this.isPointer())return;const i=this.beans;if(To?.has(e))return;const s=e.pointerType;if("touch"===s){if(i.gos.get("suppressTouch")||!t.includeTouch)return;if(t.stopPropagationForTouch&&e.stopPropagation(),I(Yn(e)))return}if(!e.isPrimary)return;if("mouse"===s&&0!==e.button)return;this.destroyDrag();const o=u(i),n=t.eElement,r=e.pointerId,l=new _n(o,t,e,r);Mo??(Mo=new WeakMap),Mo.set(o,l),this.initDrag(l,[o,"pointerup",t=>{t.pointerId===r&&this.onMouseOrPointerUp(t)}],[o,"pointercancel",t=>{t.pointerId===r&&Kn(t)&&this.cancelDrag()}],[o,"pointermove",t=>{t.pointerId===r&&this.onMouseOrPointerMove(t)},{passive:!1}],[o,"touchmove",Rt,{passive:!1}],[n,"mousemove",Rt,{passive:!1}]),0===t.dragStartPixels?this.onMouseOrPointerMove(e):Kn(e)}onTouchStart(t,e){if(this.gos.get("suppressTouch")||!t.includeTouch)return;if(!Kn(e))return;if(I(Yn(e)))return;if(t.stopPropagationForTouch&&e.stopPropagation(),this.isPointer())return void Rt(e);this.destroyDrag();const i=this.beans,s=u(i),o=new _n(s,t,e.touches[0]),n=t=>this.onTouchUp(t),r=e.target??t.eElement;this.initDrag(o,[u(i),"touchmove",Rt,{passive:!1}],[r,"touchmove",t=>this.onTouchMove(t),{passive:!0}],[r,"touchend",n,{passive:!0}],[r,"touchcancel",n,{passive:!0}]),0===t.dragStartPixels&&this.onMove(o.start)}onMouseDown(t,e){if(0!==e.button)return;if(To?.has(e))return;if(this.isPointer())return;const i=this.beans;this.destroyDrag();const s=new _n(u(i),t,e),o=u(i);this.initDrag(s,[o,"mousemove",t=>this.onMouseOrPointerMove(t)],[o,"mouseup",t=>this.onMouseOrPointerUp(t)]),0===t.dragStartPixels?this.onMouseOrPointerMove(e):Kn(e)}onScroll(t){if(!Kn(t))return;const e=this.drag,i=e?.lastDrag;i&&this.dragging&&e.params?.onDragging(i)}onMouseOrPointerMove(t){Kn(t)&&(Js()&&g(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(t)&&Rt(t),this.onMove(t))}onTouchMove(t){const e=this.drag;if(!e||!Kn(t))return;const i=bt(e.start,t.touches);i&&(t.preventDefault(),this.onMove(i))}onMove(t){const e=this.drag;if(!e)return;e.lastDrag=t;const i=e.params;if(!this.dragging){const s=e.start;if(Ct(t,s,i.dragStartPixels??4))return;if(this.dragging=!0,i.capturePointer&&(e.pointerCapture=((t,e)=>{if("undefined"==typeof PointerEvent||!(e instanceof PointerEvent))return null;const i=e.pointerId;if(!Un(t,i))return null;const s={eElement:t,pointerId:i,onLost(t){((t,e)=>{jn(t);const{eElement:i,pointerId:s}=t;i&&e.pointerId===s&&Un(i,s)})(s,t)}};return t.addEventListener("lostpointercapture",s.onLost),s})(this.beans.eRootDiv,t)),this.eventSvc.dispatchEvent({type:"dragStarted",target:i.eElement}),i.onDragStart(s),this.drag!==e)return;if(i.onDragging(s),this.drag!==e)return}i.onDragging(t)}onTouchUp(t){const e=this.drag;e&&Kn(t)&&this.onUp(bt(e.start,t.changedTouches))}onMouseOrPointerUp(t){Kn(t)&&this.onUp(t)}onUp(t){const e=this.drag;e&&(t||(t=e.lastDrag),t&&this.dragging&&(this.dragging=!1,e.params.onDragStop(t),this.eventSvc.dispatchEvent({type:"dragStopped",target:e.params.eElement})),this.destroyDrag())}onKeyDown(t){t.key===Is&&this.cancelDrag()}},Zn=t=>{xt(t.handlers);const e=t.oldTouchAction;if(null!=e){const i=t.params.eElement.style;i&&(i.touchAction=e)}},_n=class{constructor(t,e,i,s=null){this.rootEl=t,this.params=e,this.start=i,this.pointerId=s,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=e.eElement}},Yn=t=>{const e=t.target;return e instanceof Element?e:null},Qn=class extends Pt{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageParent=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.lastDropTarget=null}addDragSource(t,e=!1){const i={capturePointer:!0,dragSource:t,eElement:t.eElement,dragStartPixels:t.dragStartPixels,onDragStart:e=>this.onDragStart(t,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:e};this.dragSourceAndParamsList.push(i),this.beans.dragSvc.addDragSource(i)}setDragImageCompIcon(t,e=!1){const i=this.dragImageComp;i&&(e||this.dragImageLastIcon!==t)&&(this.dragImageLastIcon=t,i.setIcon(t,e))}removeDragSource(t){const{dragSourceAndParamsList:e,beans:i}=this,s=e.find((e=>e.dragSource===t));s&&(i.dragSvc?.removeDragSource(s),di(e,s))}destroy(){const{dragSourceAndParamsList:t,dropTargets:e,beans:i}=this,s=i.dragSvc;for(const e of t)s?.removeDragSource(e);t.length=0,e.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){const t=this.lastMouseEvent;t&&this.onDragging(t,!0)}onDragStart(t,e){this.lastMouseEvent=e,this.dragSource=t,this.dragItem=t.getDragItem();const i=t.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=e.clientX-i.left,this.dragInitialSourcePointerOffsetY=e.clientY-i.top,t.onDragStarted?.(),this.createAndUpdateDragImageComp(t)}onDragStop(t){const{dragSource:e,lastDropTarget:i}=this;if(e?.onDragStopped?.(),i){const e=this.dropTargetEvent(i,t,!1);i.onDragStop?.(e)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:t,lastDropTarget:e,lastMouseEvent:i}=this;if(t?.onDragCancelled?.(),e&&i){const t=this.dropTargetEvent(e,i,!1);e.onDragCancel?.(t)}this.clearDragAndDropProperties()}onDragging(t,e=!1){this.positionDragImageComp(t);const i=this.findCurrentDropTarget(t),{lastDropTarget:s,dragSource:o,dragItem:n}=this;let r=!1;if(i!==s){if(r=!0,s){const i=this.dropTargetEvent(s,t,e);s.onDragLeave?.(i)}if(null===s||i?null===s&&i&&this.handleEnter(o,n):this.handleExit(o,n),i){const s=this.dropTargetEvent(i,t,e);i.onDragEnter?.(s)}this.lastDropTarget=i}else if(i){const s=this.dropTargetEvent(i,t,e);i.onDragging?.(s),s?.changed&&(r=!0)}this.lastMouseEvent=t,r&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageParent=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(t){const e=t.getSecondaryContainers?t.getSecondaryContainers():null,i=[[t.getContainer()]];return e?i.concat(e):i}isMouseOnDropTarget(t,e){const i=this.getAllContainersFromDropTarget(e);let s=!1;const o=(t,e)=>{for(const i of e){const{width:e,height:s,left:o,right:n,top:r,bottom:l}=i.getBoundingClientRect();if(0===e||0===s)return!1;if(!(t.clientX>=o&&t.clientX<n&&t.clientY>=r&&t.clientY<l))return!1}return!0};for(const e of i)if(o(t,e)){s=!0;break}const{eElement:n,type:r}=this.dragSource;return!(e.targetContainsSource&&!e.getContainer().contains(n))&&s&&e.isInterestedIn(r,n)}findCurrentDropTarget(t){const e=this.dropTargets.filter((e=>this.isMouseOnDropTarget(t,e))),i=e.length;if(0===i)return null;if(1===i)return e[0];const s=u(this.beans).elementsFromPoint(t.clientX,t.clientY);for(const t of s)for(const i of e)if(-1!==this.getAllContainersFromDropTarget(i).flatMap((t=>t)).indexOf(t))return i;return null}addDropTarget(t){this.dropTargets.push(t)}removeDropTarget(t){this.dropTargets=this.dropTargets.filter((e=>e.getContainer()!==t.getContainer()))}hasExternalDropZones(){return this.dropTargets.some((t=>t.external))}findExternalZone(t){return this.dropTargets.find((e=>e.external&&e.getContainer()===t))||null}dropTargetEvent(t,e,i){const{dragSource:s,dragItem:o,lastDraggingEvent:n,lastMouseEvent:r,dragInitialSourcePointerOffsetX:l,dragInitialSourcePointerOffsetY:a}=this,h=t.getContainer(),c=h.getBoundingClientRect(),{clientX:u,clientY:d}=e,g=u-(r?.clientX||0),p=d-(r?.clientY||0),f=this.createEvent({event:e,x:u-c.left,y:d-c.top,vDirection:p>0?"down":p<0?"up":null,hDirection:g<0?"left":g>0?"right":null,initialSourcePointerOffsetX:l,initialSourcePointerOffsetY:a,dragSource:s,fromNudge:i,dragItem:o,dropZoneTarget:h,dropTarget:n?.dropTarget??null,changed:!!n?.changed});return this.lastDraggingEvent=f,f}positionDragImageComp(t){const e=this.dragImageComp?.getGui();e&&function(t,e,i){const s=t.getBoundingClientRect().height,o=function(t){const e=m(t);return e?.clientWidth??(window.innerWidth||-1)}(i)-2,n=function(t){const e=m(t);return e?.clientHeight??(window.innerHeight||-1)}(i)-2;if(!t.offsetParent)return;const r=$(t.offsetParent),{clientY:l,clientX:a}=e;let h=l-r.top-s/2,c=a-r.left-10;const u=g(i),d=u.defaultView||window,p=d.pageYOffset||u.documentElement.scrollTop,f=d.pageXOffset||u.documentElement.scrollLeft;o>0&&c+t.clientWidth>o+f&&(c=o+f-t.clientWidth),c<0&&(c=0),n>0&&h+t.clientHeight>n+p&&(h=n+p-t.clientHeight),h<0&&(h=0),t.style.left=`${c}px`,t.style.top=`${h}px`}(e,t,this.beans)}removeDragImageComp(t){this.dragImageComp===t&&(this.dragImageComp=null),t&&(t.getGui()?.remove(),this.destroyBean(t))}createAndUpdateDragImageComp(t){const e=this.createDragImageComp(t)??null;this.dragImageCompPromise=e,e?.then((t=>{if(e!==this.dragImageCompPromise||!this.lastMouseEvent||!this.isAlive())return void this.destroyBean(t);this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;const i=this.dragImageComp;i!==t&&(this.dragImageComp=t,this.removeDragImageComp(i)),t&&(this.appendDragImageComp(t),this.updateDragImageComp())}))}appendDragImageComp(t){const e=t.getGui(),i=e.style;i.position="absolute",i.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(i.pointerEvents="none"),this.gos.setInstanceDomData(e),this.beans.environment.applyThemeClasses(e),i.top="20px",i.left="20px";const s=m(this.beans);this.dragImageParent=s,s?s.appendChild(e):this.warnNoBody()}updateDragImageComp(){const{dragImageComp:t,dragSource:e,lastDropTarget:i,lastDraggingEvent:s,dragImageLastLabel:o}=this;if(!t)return;this.setDragImageCompIcon(i?.getIconName?.(s)??null);let n=e?.dragItemName;"function"==typeof n&&(n=n(s)),n||(n=""),o!==n&&(this.dragImageLastLabel=n,t.setLabel(n))}};function Jn(t,e){return t+"_"+e}function Xn(t){return t instanceof tr}var tr=class extends Dt{constructor(t,e,i,s){super(),this.providedColumnGroup=t,this.groupId=e,this.partId=i,this.pinned=s,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=c(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return Jn(this.groupId,this.partId)}isEmptyGroup(){return 0===this.displayedChildren.length}isMoving(){const t=this.getProvidedColumnGroup().getLeafColumns();return!(!t||0===t.length)&&t.every((t=>t.isMoving()))}checkLeft(){for(const t of this.displayedChildren)Xn(t)&&t.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=hi(this.displayedChildren).getLeft();this.setLeft(t)}else{const t=this.displayedChildren[0].getLeft();this.setLeft(t)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(t){this.oldLeft=this.left,this.left!==t&&(this.left=t,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let t=0;for(const e of this.displayedChildren??[])t+=e.getActualWidth();return t}isResizable(){if(!this.displayedChildren)return!1;let t=!1;for(const e of this.displayedChildren)e.isResizable()&&(t=!0);return t}getMinWidth(){let t=0;for(const e of this.displayedChildren)t+=e.getMinWidth();return t}addChild(t){this.children||(this.children=[]),this.children.push(t)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const t=[];return this.addLeafColumns(t),t}getDisplayedLeafColumns(){const t=[];return this.addDisplayedLeafColumns(t),t}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(t){this.providedColumnGroup.setExpanded(t)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(t){const e=t!==this.autoHeaderHeight;return this.autoHeaderHeight=t,e}addDisplayedLeafColumns(t){for(const e of this.displayedChildren??[])ii(e)?t.push(e):Xn(e)&&e.addDisplayedLeafColumns(t)}addLeafColumns(t){for(const e of this.children??[])ii(e)?t.push(e):Xn(e)&&e.addLeafColumns(t)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const t=this.getParent();return this.isPadding()&&t?.isPadding()?1+t.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let t=this;for(;t?.isPadding();)t=t.getParent();if(!t||!t.getProvidedColumnGroup().isExpandable())return this.displayedChildren=this.children,void this.dispatchLocalEvent({type:"displayedChildrenChanged"});for(const e of this.children??[])if(!Xn(e)||e.displayedChildren?.length)switch(e.getColumnGroupShow()){case"open":t.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(e);break;case"closed":t.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(e);break;default:this.displayedChildren.push(e)}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},er="row-group-",ir="t-",sr="b-",or=0,nr=class{constructor(t){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=or++,this.alreadyRendered=!1,this.hovered=!1,this.__selected=!1,this.beans=t}get allLeafChildren(){const t=this._leafs;return void 0===t?this.beans.groupStage?.loadLeafs?.(this)??null:t}set allLeafChildren(t){this._leafs=t}setData(t){this.setDataCommon(t,!1)}updateData(t){this.setDataCommon(t,!0)}setDataCommon(t,e){const{valueCache:i,eventSvc:s}=this.beans,o=this.data;this.data=t,i?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(t,o,e);if(this.__localEventService?.dispatchEvent(n),this.sibling){this.sibling.data=t;const i=this.sibling.createDataChangedEvent(t,o,e);this.sibling.__localEventService?.dispatchEvent(i)}s.dispatchEvent({type:"rowNodeDataChanged",node:this});const r=this.pinnedSibling;r&&(r.data=t,r.__localEventService?.dispatchEvent(r.createDataChangedEvent(t,o,e)),s.dispatchEvent({type:"rowNodeDataChanged",node:r}))}updateDataOnDetailNode(){const t=this.detailNode;t&&(t.data=this.data)}createDataChangedEvent(t,e,i){return{type:"dataChanged",node:this,oldData:e,newData:t,update:i}}getRowIndexString(){return null==this.rowIndex?(fe(13),null):"top"===this.rowPinned?ir+this.rowIndex:"bottom"===this.rowPinned?sr+this.rowIndex:this.rowIndex.toString()}setDataAndId(t,e){const{selectionSvc:i}=this.beans,s=i?.createDaemonNode?.(this),o=this.data;this.data=t,this.updateDataOnDetailNode(),this.setId(e),i&&(i.updateRowSelectable(this),i.syncInRowNode(this,s));const n=this.createDataChangedEvent(t,o,!1);this.__localEventService?.dispatchEvent(n)}setId(t){const e=Ne(this.beans.gos);if(e)if(this.data){const t=this.parent?.getRoute()??[];this.id=e({data:this.data,parentKeys:t.length>0?t:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(er)&&fe(14,{groupPrefix:er})}else this.id=void 0;else this.id=t}setRowTop(t){if(this.oldRowTop=this.rowTop,this.rowTop===t)return;this.rowTop=t,this.dispatchRowEvent("topChanged");const e=null!==t;this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(t){this.hovered=t}isHovered(){return this.hovered}setRowHeight(t,e=!1){this.rowHeight=t,this.rowHeightEstimated=e,this.dispatchRowEvent("heightChanged")}setExpanded(t,e,i){this.beans.expansionSvc?.setExpanded(this,t,e,i)}setDataValue(t,e,i){const{colModel:s,valueSvc:o,gos:n,editSvc:r}=this.beans,l="string"!=typeof t?t:s.getCol(t)??s.getColDefCol(t);if(!l)return!1;const a=o.getValueForDisplay(l,this,void 0,void 0,"api").value;if(n.get("readOnlyEdit")){const{beans:{eventSvc:t},data:s,rowIndex:o,rowPinned:n}=this;return t.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:o,rowPinned:n,column:l,colDef:l.colDef,data:s,node:this,oldValue:a,newValue:e,value:e,source:i}),!1}if(r&&!r.committing){const t=r.setDataValue({rowNode:this,column:l},e,i);if(null!=t)return t}const h=o.setValue(this,l,e,i);return this.dispatchCellChangedEvent(l,e,a),h&&this.pinnedSibling?.dispatchCellChangedEvent(l,e,a),h}updateHasChildren(){let t=this.group&&!this.footer||!!this.childrenAfterGroup?.length;const{rowChildrenSvc:e}=this.beans;e&&(t=e.getHasChildrenValue(this)),t!==this.__hasChildren&&(this.__hasChildren=!!t,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(t,e,i){const s={type:"cellChanged",node:this,column:t,newValue:e,oldValue:i};this.__localEventService?.dispatchEvent(s)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();const t=this.rowPinned&&this.pinnedSibling;return t?t.isSelected():this.__selected}depthFirstSearch(t){const e=this.childrenAfterGroup;if(e)for(let i=0,s=e.length;i<s;++i)e[i].depthFirstSearch(t);t(this)}dispatchRowEvent(t){this.__localEventService?.dispatchEvent({type:t,node:this})}setSelected(t,e=!1,i="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:t,clearSelection:e,source:i})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,i){(this.__localEventService??(this.__localEventService=new t)).addEventListener(e,i)}__removeEventListener(t,e){this.removeLocalListener(t,e)}addEventListener(e,i){this.beans.validation?.checkRowEvents(e);const s=this.__localEventService??(this.__localEventService=new t);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,s);const o=this.frameworkEventListenerService?.wrap(e,i)??i;s.addEventListener(e,o)}removeEventListener(t,e){const i=this.frameworkEventListenerService?.unwrap(t,e)??e;this.removeLocalListener(t,i)}removeLocalListener(t,e){const i=this.__localEventService;i&&(i.removeEventListener(t,e),i.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(pe(61),this.detail)return!0;const t=this.beans.gos.getCallback("isFullWidthRow");return!!t&&t({rowNode:this})}getRoute(){if(-1===this.level)return[];if(null==this.key)return;const t=[];let e=this;for(;null!=e?.key;)t.push(e.key),e=e.parent;return t.reverse()}setRowIndex(t){this.rowIndex!==t&&(this.rowIndex=t,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(t){this.allChildrenCount!==t&&(this.allChildrenCount=t,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(t){this.uiLevel!==t&&(this.uiLevel=t,this.dispatchRowEvent("uiLevelChanged"))}getFirstChild(){const t=this.childStore;return t?t.getFirstNode():this.childrenAfterSort?.[0]??null}};function rr(t,e,i){return Qe(e,{type:i,node:t,data:t.data,rowIndex:t.rowIndex,rowPinned:t.rowPinned})}var lr=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_leafs","childStore","oldRowTop","sticky","treeNodeFlags","treeParent"]),ar=t=>{for(;t?.length;){const e=t[0];if(e.data)return e;t=e.childrenAfterGroup}},hr={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},cr=new Set(Object.values(hr));function ur(t,e){const i=t.filterUi;if(!i)return null;if(i.created)return i.promise;if(e)return null;const s=i.create(i.refreshed),o=i;return o.created=!0,o.promise=s,s}function dr(t,e,i,s,o,n){t?.refresh?.({...e,model:i,state:s,source:o,additionalEventAttributes:n})}function gr(t,e,i){const s=t();s?.created&&s.promise.then((t=>{const o=e();dr(t,s.filterParams,o,i()??{model:o},"ui")}))}function pr(t,e,i,s,o,n,r){let l,a,h=!1;switch(t){case"apply":{const t=s();a=t?.model??null,r&&(a=r(a)),l={state:t?.state,model:a},h=!0;break}case"clear":l={model:null};break;case"reset":l={model:null},h=!0,a=null;break;case"cancel":l={model:i()}}o(l),h?n(a):gr(e,i,s)}function fr(t,e){return t[e]??null}function mr(t){return gt(t)}var wr=class extends _i{constructor(t){const{className:e="ag-filter-apply-panel"}=t??{};super(function(t){return{tag:"div",cls:t}}(e)),this.listeners=[],this.validationMessage=null,this.className=e}updateButtons(t,e){const i=this.buttons;if(this.buttons=t,i===t)return;const s=this.getGui();let o;j(s),this.destroyListeners();const n=document.createDocumentFragment(),r=this.className,l=({type:t,label:i})=>{const s=e=>{this.dispatchLocalEvent({type:t,event:e})};["apply","clear","reset","cancel"].includes(t)||pe(75);const l="apply"===t,a=mr({tag:"button",attrs:{type:l&&e?"submit":"button"},ref:`${t}FilterButton`,cls:`ag-button ag-standard-button ${r}-button${l?" "+r+"-apply-button":""}`,children:i});this.activateTabIndex([a]),l&&(o=a);const h=t=>{t.key===As&&(t.preventDefault(),s(t))},c=this.listeners;a.addEventListener("click",s),c.push((()=>a.removeEventListener("click",s))),a.addEventListener("keydown",h),c.push((()=>a.removeEventListener("keydown",h))),n.append(a)};for(const e of t)l(e);this.eApply=o;const a=this.validationTooltipFeature;o&&!a?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!o&&a&&(this.validationTooltipFeature=this.destroyBean(a)),s.append(n)}getApplyButton(){return this.eApply}updateValidity(t,e=null){const i=this.eApply;i&&(O(i,!1===t),this.validationMessage=e??null,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(const t of this.listeners)t();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},vr={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",filterSummaryInRangeValues:t=>`(${t[0]}, ${t[1]})`,filterSummaryTextQuote:t=>`"${t[0]}"`};function Cr(t,e,i){return function(t,e,i,s){const o=vr[i];return t.getLocaleTextFunc()(i,"function"==typeof o?o(s):o,s)}(t,0,e,i)}function br(t,e){const{debounceMs:i}=t;return yr(t)?(null!=i&&pe(71),0):i??e}function yr(t){return(t.buttons?.indexOf("apply")??-1)>=0}var Sr=class extends _i{constructor(t,e,i,s,o,n){super(),this.column=t,this.wrapper=e,this.eventParent=i,this.updateModel=s,this.isGlobalButtons=o,this.enableGlobalButtonCheck=n,this.hidePopup=null,this.applyActive=!1}postConstruct(){const{comp:t,params:e}=this.wrapper,i=e,s=i.useForm;this.setTemplate({tag:s?"form":"div",cls:"ag-filter-wrapper"}),s&&this.addManagedElementListeners(this.getGui(),{submit:t=>{t?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(t.getGui()),this.params=i,this.resetButtonsPanel(i),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:t,params:e})=>{t===this.column&&this.resetButtonsPanel(e,this.params)},filterStateChanged:({column:t,state:e})=>{t===this.column&&this.eButtons?.updateValidity(!1!==e.valid)},filterAction:({column:t,action:e,event:i})=>{t===this.column&&this.afterAction(e,i)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:t})=>{if(t!==this.isGlobalButtons){this.isGlobalButtons=t;const e=this.params;this.resetButtonsPanel(e,e,!0)}}}:void 0})}afterGuiAttached(t){t&&(this.hidePopup=t.hidePopup)}resetButtonsPanel(t,e,i){const{buttons:s,readOnly:o}=e??{},{buttons:r,readOnly:l,useForm:a}=t;if(!i&&o===l&&n(s,r))return;let h=this.eButtons;if(r&&r.length>0&&!t.readOnly&&!this.isGlobalButtons){const t=r.map((t=>({type:t,label:Cr(this,`${t}Filter`)})));if(this.applyActive=yr(this.params),!h){h=this.createBean(new wr),this.appendChild(h.getGui());const t=this.column,e=e=>({event:i})=>{this.updateModel(t,e,{fromButtons:!0}),this.afterAction(e,i)};h?.addManagedListeners(h,{apply:e("apply"),clear:e("clear"),reset:e("reset"),cancel:e("cancel")}),this.eButtons=h}h.updateButtons(t,a)}else this.applyActive=!1,h&&(K(h.getGui()),this.eButtons=this.destroyBean(h))}close(t){const e=this.hidePopup;if(!e)return;const i=t,s=i?.key;let o;s!==As&&s!==Hs||(o={keyboardEvent:i}),e(o),this.hidePopup=null}afterAction(t,e){const{params:i,applyActive:s}=this,o=i?.closeOnApply;switch(t){case"apply":e?.preventDefault(),o&&s&&this.close(e);break;case"reset":o&&s&&this.close();break;case"cancel":o&&this.close(e)}}handleKeyDown(t){!t.defaultPrevented&&t.key===As&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",t))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},xr={tag:"div",cls:"ag-filter"},Rr=class extends _i{constructor(t,e,i){super(xr),this.column=t,this.source=e,this.enableGlobalButtonCheck=i,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return null!=this.wrapper}getFilter(){return this.wrapper?.then((t=>t.comp))??null}afterInit(){return this.wrapper?.then((()=>{}))??Qi.resolve()}afterGuiAttached(t){this.afterGuiAttachedParams=t,this.wrapper?.then((e=>{this.comp?.afterGuiAttached(t),e?.comp?.afterGuiAttached?.(t)}))}afterGuiDetached(){this.wrapper?.then((t=>{t?.comp?.afterGuiDetached?.()}))}createFilter(t){const{column:e,source:s,beans:{colFilter:o}}=this,n=o.getFilterUiForDisplay(e)??null;this.wrapper=n,n?.then((n=>{if(!n)return;const{isHandler:r,comp:l}=n;let a;if(r){const t=!!this.enableGlobalButtonCheck,i=this.createBean(new Sr(e,n,o,o.updateModel.bind(o),t&&o.isGlobalButtons,t));this.comp=i,a=i.getGui()}else a=l.getGui(),i(a)||pe(69,{guiFromFilter:a});this.appendChild(a),t?this.eventSvc.dispatchEvent({type:"filterOpened",column:e,source:s,eGui:this.getGui()}):l.afterGuiAttached?.(this.afterGuiAttachedParams)}))}onFilterDestroyed(t){const{source:e,column:i}=t;"api"!==e&&"paramsUpdated"!==e||i.getId()!==this.column.getId()||!this.beans.colModel.getColDefCol(this.column)||(j(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},Fr={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},kr=["january","february","march","april","may","june","july","august","september","october","november","december"];function Pr(t,e){return null==t?-1:null==e?1:Number.parseFloat(t)-Number.parseFloat(e)}function Dr(t){return t instanceof Date&&!isNaN(t.getTime())}var Mr={number:()=>{},boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(t,e)=>e,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(t,e)=>!1===e,numberOfInputs:0}]}),date:()=>({isValidDate:Dr}),dateString:({dataTypeDefinition:t})=>({comparator:(e,i)=>{const s=t.dateParser(i);return null==i||s<e?-1:s>e?1:0},isValidDate:e=>"string"==typeof e&&Dr(t.dateParser(e))}),dateTime:t=>Mr.date(t),dateTimeString:t=>Mr.dateString(t),object:()=>{},text:()=>{}},Tr={number:()=>({comparator:Pr}),boolean:({t})=>({valueFormatter:e=>i(e.value)?t(String(e.value),e.value?"True":"False"):t("blanks","(Blanks)")}),date:({formatValue:t,t:e})=>({valueFormatter:s=>{const o=t(s);return i(o)?o:e("blanks","(Blanks)")},treeList:!0,treeListFormatter:(t,i)=>{if("NaN"===t)return e("invalidDate","Invalid Date");if(1===i&&null!=t){const i=kr[Number(t)-1];return e(i,Fr[i])}return t??e("blanks","(Blanks)")},treeListPathGetter:t=>ho(t,!1)}),dateString:({formatValue:t,dataTypeDefinition:e,t:s})=>({valueFormatter:e=>{const o=t(e);return i(o)?o:s("blanks","(Blanks)")},treeList:!0,treeListPathGetter:t=>ho(e.dateParser(t??void 0),!1),treeListFormatter:(t,e)=>{if(1===e&&null!=t){const e=kr[Number(t)-1];return s(e,Fr[e])}return t??s("blanks","(Blanks)")}}),dateTime:t=>{const e=Tr.date(t);return e.treeListPathGetter=ho,e},dateTimeString(t){const e=t.dataTypeDefinition.dateParser,i=Tr.dateString(t);return i.treeListPathGetter=t=>ho(e(t??void 0)),i},object:({formatValue:t,t:e})=>({valueFormatter:s=>{const o=t(s);return i(o)?o:e("blanks","(Blanks)")}}),text:()=>{}},Er={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},Ar={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"},Ir="ag-resizer-wrapper",Hr=(t,e)=>({tag:"div",ref:`${t}Resizer`,cls:`ag-resizer ag-resizer-${e}`}),Or={tag:"div",cls:Ir,children:[Hr("eTopLeft","topLeft"),Hr("eTop","top"),Hr("eTopRight","topRight"),Hr("eRight","right"),Hr("eBottomRight","bottomRight"),Hr("eBottom","bottom"),Hr("eBottomLeft","bottomLeft"),Hr("eLeft","left")]},Nr=class extends Dt{constructor(t,e){super(),this.element=t,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},e)}wireBeans(t){this.popupSvc=t.popupSvc,this.dragSvc=t.dragSvc}center(t){const{clientHeight:e,clientWidth:i}=this.offsetParent,s=i/2-this.getWidth()/2,o=e/2-this.getHeight()/2;this.offsetElement(s,o,t)}initialisePosition(t){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:i,minWidth:s,width:o,minHeight:n,height:r,x:l,y:a}=this.config;this.offsetParent||this.setOffsetParent();let h=0,c=0;const u=Z(this.element);if(u){const t=this.findBoundaryElement(),e=window.getComputedStyle(t);if(null!=e.minWidth){const i=t.offsetWidth-this.element.offsetWidth;c=Number.parseInt(e.minWidth,10)-i}if(null!=e.minHeight){const i=t.offsetHeight-this.element.offsetHeight;h=Number.parseInt(e.minHeight,10)-i}}if(this.minHeight=n||h,this.minWidth=s||c,o&&this.setWidth(o),r&&this.setHeight(r),o&&r||this.refreshSize(),e)this.center(t);else if(l||a)this.offsetElement(l,a,t);else if(u&&i){let e=this.boundaryEl,i=!0;if(e||(e=this.findBoundaryElement(),i=!1),e){const s=Number.parseFloat(e.style.top),o=Number.parseFloat(e.style.left);i?this.offsetElement(isNaN(o)?0:o,isNaN(s)?0:s,t):this.setPosition(o,s)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(t,e){if(!this.config.popup||t===this.movable)return;this.movable=t;const i=this.moveElementDragListener||{eElement:e,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};t?(this.dragSvc?.addDragSource(i),this.moveElementDragListener=i):(this.dragSvc?.removeDragSource(i),this.moveElementDragListener=void 0)}setResizable(t){if(this.clearResizeListeners(),t?this.addResizers():this.removeResizers(),"boolean"==typeof t){if(!1===t)return;t={topLeft:t,top:t,topRight:t,right:t,bottomRight:t,bottom:t,bottomLeft:t,left:t}}Object.keys(t).forEach((e=>{const i=!!t[e],s=this.getResizerElement(e),o={dragStartPixels:0,eElement:s,onDragStart:t=>this.onResizeStart(t,e),onDragging:this.onResize.bind(this),onDragStop:t=>this.onResizeEnd(t,e)};(i||!this.isAlive()&&!i)&&(i?(this.dragSvc?.addDragSource(o),this.resizeListeners.push(o),s.style.pointerEvents="all"):s.style.pointerEvents="none",this.resizable[e]=i)}))}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:t,width:e}=this.lastSize;-1!==e&&(this.element.style.width=`${e}px`),-1!==t&&(this.element.style.height=`${t}px`)}getHeight(){return this.element.offsetHeight}setHeight(t){const{popup:e}=this.config,i=this.element;let s=!1;if("string"==typeof t&&t.includes("%"))ot(i,t),t=L(i),s=!0;else if(t=Math.max(this.minHeight,t),this.positioned){const e=this.getAvailableHeight();e&&t>e&&(t=e)}this.getHeight()!==t&&(s?(i.style.maxHeight="unset",i.style.minHeight="unset"):e?ot(i,t):(i.style.height=`${t}px`,i.style.flex="0 0 auto",this.lastSize.height="number"==typeof t?t:Number.parseFloat(t)))}getAvailableHeight(){const{popup:t,forcePopupParentAsOffsetParent:e}=this.config;this.positioned||this.initialisePosition();const{clientHeight:i}=this.offsetParent;if(!i)return null;const s=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),n=t?this.position.y:s.top,r=t?0:o.top;let l=0;if(e){const t=this.element.parentElement;if(t){const{bottom:e}=t.getBoundingClientRect();l=e-s.bottom}}return i+r-n-l}getWidth(){return this.element.offsetWidth}setWidth(t){const e=this.element,{popup:i}=this.config;let s=!1;if("string"==typeof t&&t.includes("%"))st(e,t),t=z(e),s=!0;else if(this.positioned){t=Math.max(this.minWidth,t);const{clientWidth:e}=this.offsetParent,s=i?this.position.x:this.element.getBoundingClientRect().left;e&&t+s>e&&(t=e-s)}this.getWidth()!==t&&(s?(e.style.maxWidth="unset",e.style.minWidth="unset"):this.config.popup?st(e,t):(e.style.width=`${t}px`,e.style.flex=" unset",this.lastSize.width="number"==typeof t?t:Number.parseFloat(t)))}offsetElement(t=0,e=0,i){const{forcePopupParentAsOffsetParent:s}=this.config,o=s?this.boundaryEl:this.element;o&&(this.popupSvc?.positionPopup({ePopup:o,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:t,y:e}),postProcessCallback:i}),this.setPosition(Number.parseFloat(o.style.left),Number.parseFloat(o.style.top)))}constrainSizeToAvailableHeight(t){if(!this.config.forcePopupParentAsOffsetParent)return;t&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=at(this.beans,this.popupSvc?.getPopupParent(),(()=>{const t=this.getAvailableHeight();this.element.style.setProperty("max-height",`${t}px`)}))):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(t,e){this.position.x=t,this.position.y=e}updateDragStartPosition(t,e){this.dragStartPosition={x:t,y:e}}calculateMouseMovement(t){const{e,isLeft:i,isTop:s,anywhereWithin:o,topBuffer:n}=t,r=e.clientX-this.dragStartPosition.x,l=e.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(e,!!i,!!o,r)?0:r,movementY:this.shouldSkipY(e,!!s,n,l)?0:l}}shouldSkipX(t,e,i,s){const o=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:o.left;let a=l<=0&&n.left>=t.clientX||n.right<=t.clientX&&n.right<=r.right;return!!a||(a=e?s<0&&t.clientX>l+n.left||s>0&&t.clientX<l+n.left:i?s<0&&t.clientX>r.right||s>0&&t.clientX<l+n.left:s<0&&t.clientX>r.right||s>0&&t.clientX<r.right,a)}shouldSkipY(t,e,i=0,s){const o=this.element.getBoundingClientRect(),n=this.offsetParent.getBoundingClientRect(),r=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.y:o.top;let a=l<=0&&n.top>=t.clientY||n.bottom<=t.clientY&&n.bottom<=r.bottom;return!!a||(a=e?s<0&&t.clientY>l+n.top+i||s>0&&t.clientY<l+n.top:s<0&&t.clientY>r.bottom||s>0&&t.clientY<r.bottom,a)}createResizeMap(){const t=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:t("eTopLeft"),top:t("eTop"),topRight:t("eTopRight"),right:t("eRight"),bottomRight:t("eBottomRight"),bottom:t("eBottom"),bottomLeft:t("eBottomLeft"),left:t("eLeft")}}addResizers(){if(this.resizersAdded)return;const t=this.element;t&&(t.appendChild(mr(Or)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;const t=this.element.querySelector(`.${Ir}`);t?.remove(),this.resizersAdded=!1}getResizerElement(t){return this.resizerMap[t].element}onResizeStart(t,e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!e.match(/top/i),isRight:!!e.match(/right/i),isBottom:!!e.match(/bottom/i),isLeft:!!e.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[e].element.classList.add("ag-active");const{popup:i,forcePopupParentAsOffsetParent:s}=this.config;i||s||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(t.clientX,t.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter((t=>!t.classList.contains("ag-hidden"))):null}getMinSizeOfSiblings(){const t=this.getSiblings()||[];let e=0,i=0;for(let s=0;s<t.length;s++){const o=t[s],n=!!o.style.flex&&"0 0 auto"!==o.style.flex;if(o===this.element)continue;let r=this.minHeight||0,l=this.minWidth||0;if(n){const t=window.getComputedStyle(o);t.minHeight&&(r=Number.parseInt(t.minHeight,10)),t.minWidth&&(l=Number.parseInt(t.minWidth,10))}else r=o.offsetHeight,l=o.offsetWidth;e+=r,i+=l}return{height:e,width:i}}applySizeToSiblings(t){let e=null;const i=this.getSiblings();if(i){for(let s=0;s<i.length;s++){const o=i[s];o!==e&&(t?o.style.height=`${o.offsetHeight}px`:o.style.width=`${o.offsetWidth}px`,o.style.flex="0 0 auto",o===this.element&&(e=i[s+1]))}e&&(e.style.removeProperty("height"),e.style.removeProperty("min-height"),e.style.removeProperty("max-height"),e.style.flex="1 1 auto")}}isResizable(){return Object.values(this.resizable).some((t=>t))}onResize(t){if(!this.isResizing||!this.currentResizer)return;const{popup:e,forcePopupParentAsOffsetParent:i}=this.config,{isTop:s,isRight:o,isBottom:n,isLeft:r}=this.currentResizer,l=o||r,a=n||s,{movementX:h,movementY:c}=this.calculateMouseMovement({e:t,isLeft:r,isTop:s}),u=this.position.x,d=this.position.y;let g=0,p=0;if(l&&h){const t=r?-1:1,e=this.getWidth(),i=e+h*t;let s=!1;r&&(g=e-i,(u+g<=0||i<=this.minWidth)&&(s=!0,g=0)),s||this.setWidth(i)}if(a&&c){const t=s?-1:1,e=this.getHeight(),i=e+c*t;let o=!1;s?(p=e-i,(d+p<=0||i<=this.minHeight)&&(o=!0,p=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&e<i&&this.getMinSizeOfSiblings().height+i>this.element.parentElement.offsetHeight&&(o=!0),o||this.setHeight(i)}this.updateDragStartPosition(t.clientX,t.clientY),((e||i)&&g||p)&&this.offsetElement(u+g,d+p)}onResizeEnd(t,e){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[e].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const t=this.element;this.config.popup&&(this.config.width||this.setWidth(t.offsetWidth),this.config.height||this.setHeight(t.offsetHeight))}onMoveStart(t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(t.clientX,t.clientY)}onMove(t){if(!this.isMoving)return;const{x:e,y:i}=this.position;let s;this.config.calculateTopBuffer&&(s=this.config.calculateTopBuffer());const{movementX:o,movementY:n}=this.calculateMouseMovement({e:t,isTop:!0,anywhereWithin:!0,topBuffer:s});this.offsetElement(e+o,i+n),this.updateDragStartPosition(t.clientX,t.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.offsetParent=this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.popupSvc.getPopupParent():this.element.offsetParent}findBoundaryElement(){let t=this.element;for(;t;){if("static"!==window.getComputedStyle(t).position)return t;t=t.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const t=this.resizeListeners.pop();this.dragSvc?.removeDragSource(t)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},Br="__ag_Grid_Stop_Propagation";function Gr(t){t[Br]=!0}function Vr(t){return!0===t[Br]}var Lr=class extends Dt{constructor(t,e={}){super(),this.eFocusable=t,this.callbacks=e,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:t=>{if(t.defaultPrevented)return;const e=Fo(this.beans,this.eFocusable,!1,t.shiftKey);e&&(e.focus(),t.preventDefault())},...e}}postConstruct(){const{eFocusable:t,callbacks:{onFocusIn:e,onFocusOut:i}}=this;t.classList.add("ag-focus-managed"),this.addKeyDownListeners(t),e&&this.addManagedElementListeners(t,{focusin:e}),i&&this.addManagedElementListeners(t,{focusout:i})}addKeyDownListeners(t){this.addManagedElementListeners(t,{keydown:t=>{if(t.defaultPrevented||Vr(t))return;const{callbacks:e}=this;e.shouldStopEventPropagation(t)?Gr(t):t.key===Es?e.onTabKeyDown(t):e.handleKeyDown&&e.handleKeyDown(t)}})}},zr=class extends _i{constructor(t,e){super(),this.filterNameKey=t,this.cssIdentifier=e,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){const t={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(t,this.getAgComponents()),this.createManagedBean(new Lr(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new Nr(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(t){}init(t){const e=t;this.setParams(e),this.setModelIntoUi(e.state.model,!0).then((()=>this.updateUiVisibility()))}refresh(t){const e=t,i=this.params;this.params=e,"colDef"===e.source&&this.updateParams(e,i);const s=e.state,o=this.state;return this.state=s,s.model===o.model&&s.state===o.state||this.setModelIntoUi(s.model),!0}setParams(t){this.params=t,this.state=t.state,this.commonUpdateParams(t)}updateParams(t,e){this.commonUpdateParams(t,e)}commonUpdateParams(t,e){this.applyActive=yr(t),this.setupApplyDebounced()}doesFilterPass(t){pe(283);const{getHandler:e,model:i,column:s}=this.params;return e().doesFilterPass({...t,model:i,handlerParams:this.beans.colFilter.getHandlerParams(s)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return pe(284),null!=this.params.model}setupApplyDebounced(){const t=br(this.params,this.defaultDebounceMs),e=Ht(this,this.checkApplyDebounce.bind(this),t);this.applyDebounced=()=>{this.debouncePending=!0,e()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return pe(285),this.params.model}setModel(t){pe(286);const{beans:e,params:i}=this;return e.colFilter.setModelForColumnLegacy(i.column,t)}applyModel(t="api"){return this.doApplyModel()}canApply(t){return!0}doApplyModel(t){const{params:e,state:i}=this,s=!this.areModelsEqual(e.model,i.model);return s&&e.onAction("apply",t),s}onNewRowsLoaded(){}onUiChanged(t,e=!1){this.updateUiVisibility();const i=this.getModelFromUi(),s={model:i,state:this.getState(),valid:this.canApply(i)};this.state=s;const o=this.params;o.onStateChange(s),o.onUiChange(this.getUiChangeEventParams()),this.gos.get("enableFilterHandlers")||this.eventSvc.dispatchEvent({type:"filterModified",column:o.column,filterInstance:this}),t??(t=this.applyActive?void 0:"debounce"),"immediately"===t?this.doApplyModel({afterFloatingFilter:e,afterDataChange:!1}):"debounce"===t&&this.applyDebounced()}getState(){}getUiChangeEventParams(){}afterGuiAttached(t){this.lastContainerType=t?.container,this.refreshFilterResizer(t?.container)}refreshFilterResizer(t){const{positionableFeature:e,gos:i}=this;if(!e)return;const s="floatingFilter"===t||"columnFilter"===t;s?(e.restoreLastSize(),e.setResizable(i.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(e.removeSizeFromEl(),e.setResizable(!1)),e.constrainSizeToAvailableHeight(s)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(t){return Cr(this,t)}getPositionableElement(){return this.getGui()}areModelsEqual(t,e){return t===e||null==t&&null==e||null!=t&&null!=e&&this.areNonNullModelsEqual(t,e)}};function $r(t){return!!t.operator}var Wr={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},Ur=class extends Dt{constructor(t){super(),this.view=t}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const t=this.gos.get("domLayout"),e={autoHeight:"autoHeight"===t,normal:"normal"===t,print:"print"===t};this.view.updateLayoutClasses(e.autoHeight?Wr.AUTO_HEIGHT:e.print?Wr.PRINT:Wr.NORMAL,e)}},jr="Viewport",Kr="fakeVScrollComp",qr=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],Zr=class extends Dt{constructor(t){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=t,this.resetLastHScrollDebounced=Ht(this,(()=>this.lastScrollSource[1]=null),150),this.resetLastVScrollDebounced=Ht(this,(()=>this.lastScrollSource[0]=null),150)}wireBeans(t){this.ctrlsSvc=t.ctrlsSvc,this.animationFrameSvc=t.animationFrameSvc,this.visibleCols=t.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const t=this.invalidateVerticalScroll.bind(this),e=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:t,scrollGapChanged:e}),this.addManagedElementListeners(this.eBodyViewport,{scroll:t}),this.ctrlsSvc.whenReady(this,(t=>{this.centerRowsCtrl=t.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()}))}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,jr)});for(const t of qr){const e=this.ctrlsSvc.get(t);this.registerScrollPartner(e,this.onHScroll.bind(this,t))}}addVerticalScrollListeners(){const t=this.ctrlsSvc.get("fakeVScrollComp"),e=this.gos.get("debounceVerticalScrollbar"),i=e?Ht(this,this.onVScroll.bind(this,jr),100):this.onVScroll.bind(this,jr),s=e?Ht(this,this.onVScroll.bind(this,Kr),100):this.onVScroll.bind(this,Kr);this.addManagedElementListeners(this.eBodyViewport,{scroll:i}),this.registerScrollPartner(t,s)}registerScrollPartner(t,e){t.onScrollCallback(e)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(t){null==this.centerRowsCtrl||(void 0===t&&(t=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(t)))}setScrollLeftForAllContainersExceptCurrent(t){for(const e of[...qr,jr])this.lastScrollSource[1]!==e&&U(this.getViewportForSource(e),t,this.enableRtl)}getViewportForSource(t){return t===jr?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(t).eViewport}isControllingScroll(t,e){return null==this.lastScrollSource[e]?(0===e?this.lastScrollSource[0]=t:this.lastScrollSource[1]=t,!0):this.lastScrollSource[e]===t}onHScroll(t){if(!this.isControllingScroll(t,1))return;const e=this.centerRowsCtrl.eViewport,{scrollLeft:i}=e;if(this.shouldBlockScrollUpdate(1,i,!0))return;const s=W(this.getViewportForSource(t),this.enableRtl);this.doHorizontalScroll(s),this.resetLastHScrollDebounced()}onVScroll(t){if(!this.isControllingScroll(t,0))return;let e;if(e=t===jr?this.eBodyViewport.scrollTop:this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,e,!0))return;const{animationFrameSvc:i}=this;i?.setScrollTop(e),this.nextScrollTop=e,t===jr?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(e):this.eBodyViewport.scrollTop=e,i?.active?i.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(t){const e=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===t&&t===e||(this.scrollLeft=t,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(t),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(t){const e={type:"bodyScroll",direction:1===t?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(e),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout((()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...e,type:"bodyScrollEnd"})}),150)}shouldBlockScrollUpdate(t,e,i=!1){return!(i&&!eo())&&(0===t?this.shouldBlockVerticalScroll(e):this.shouldBlockHorizontalScroll(e))}shouldBlockVerticalScroll(t){const e=G(this.eBodyViewport),{scrollHeight:i}=this.eBodyViewport;return!!(t<0||t+e>i)}shouldBlockHorizontalScroll(t){const e=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:i}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(t>0)return!0}else if(t<0)return!0;return Math.abs(t)+e>i}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){const t=this.scrollLeft;let e=!1;for(const i of qr)if(this.getViewportForSource(i).scrollLeft!==t){e=!0;break}e&&this.onHScroll(jr)}scrollGridIfNeeded(t=!1){const e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,t&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),e}setHorizontalScrollPosition(t,e=!1){const i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!e&&this.shouldBlockScrollUpdate(1,t)&&(t=this.enableRtl?t>0?0:i:Math.min(Math.max(t,0),i)),U(this.centerRowsCtrl.eViewport,Math.abs(t),this.enableRtl),this.doHorizontalScroll(t)}setVerticalScrollPosition(t){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=t}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:t,lastScrollTop:e}=this;return{top:e,bottom:e+t}}this.isVerticalPositionInvalidated=!1;const{scrollTop:t,offsetHeight:e}=this.eBodyViewport;return this.lastScrollTop=t,this.lastOffsetHeight=e,{top:t,bottom:t+e}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),this.isHorizontalPositionInvalidated=!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(t){const e=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(e+t),this.centerRowsCtrl.eViewport.scrollLeft-e}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(t,e=null){const{rowModel:i}=this.beans,s=i.getRowCount();let o=-1;for(let e=0;e<s;e++){const s=i.getRow(e);if("function"==typeof t){if(s&&t(s)){o=e;break}}else if(t===s||t===s.data){o=e;break}}o>=0&&this.ensureIndexVisible(o,e)}ensureIndexVisible(t,e,i=0){if(ye(this.gos,"print"))return;const{rowModel:s}=this.beans,o=s.getRowCount();if("number"!=typeof t||t<0||t>=o)return void pe(88,{index:t});this.clearRetryListeners();const{frameworkOverrides:n,pageBounds:r,rowContainerHeight:l,rowRenderer:a}=this.beans;n.wrapIncoming((()=>{const o=this.ctrlsSvc.getGridBodyCtrl(),n=s.getRow(t);let h,c,u=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:t,stickyBottomHeight:i}=o,s=n.rowTop,d=n.rowHeight,g=r.getPixelOffset(),p=n.rowTop-g,f=p+n.rowHeight,m=this.getVScrollPosition(),w=l.divStretchOffset,v=m.top+w,C=m.bottom+w,b=C-v,y=l.getScrollPositionForPixel(p),S=l.getScrollPositionForPixel(f-b),x=Math.min((y+S)/2,p);let R=null;"top"===e?R=y-t:"bottom"===e?R=S+i:"middle"===e?R=x:v+t>p?R=y-t:C-i<f&&(R=S-y>b?y-t:S+i),null!==R&&(this.setVerticalScrollPosition(R),a.redraw({afterScroll:!0})),h=s!==n.rowTop||d!==n.rowHeight,c=t!==o.stickyTopHeight||i!==o.stickyBottomHeight,u++}while((h||c)&&u<10);if(this.animationFrameSvc?.flushAllFrames(),i<10&&(n?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){const o=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{const t=this.getVScrollPosition().top;o!==t&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),t>=s.getRowCount()||this.ensureIndexVisible(t,e,i+1)}})}}))}clearRetryListeners(){for(const t of this.clearRetryListenerFncs)t();this.clearRetryListenerFncs=[]}ensureColumnVisible(t,e="auto"){const{colModel:i,frameworkOverrides:s}=this.beans,o=i.getCol(t);if(!o)return;if(o.isPinned())return;if(!this.visibleCols.isColDisplayed(o))return;const n=this.getPositionedHorizontalScroll(o,e);s.wrapIncoming((()=>{null!==n&&this.centerRowsCtrl.setCenterViewportScrollLeft(n),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()}))}getPositionedHorizontalScroll(t,e){const{columnBeforeStart:i,columnAfterEnd:s}=this.isColumnOutsideViewport(t),o=this.centerRowsCtrl.getCenterWidth()<t.getActualWidth(),n=this.centerRowsCtrl.getCenterWidth(),r=this.enableRtl;let l=(r?i:s)||o,a=r?s:i;"auto"!==e&&(l="start"===e,a="end"===e);const h="middle"===e;if(l||a||h){const{colLeft:e,colMiddle:i,colRight:s}=this.getColumnBounds(t);return h?i-n/2:l?r?s:e:r?e-n:s-n}return null}isColumnOutsideViewport(t){const{start:e,end:i}=this.getViewportBounds(),{colLeft:s,colRight:o}=this.getColumnBounds(t),n=this.enableRtl;return{columnBeforeStart:n?e>o:i<o,columnAfterEnd:n?i<s:e>s}}getColumnBounds(t){const e=this.enableRtl,i=this.visibleCols.bodyWidth,s=t.getActualWidth(),o=t.getLeft(),n=e?-1:1,r=e?i-o:o;return{colLeft:r,colMiddle:r+s/2*n,colRight:r+s*n}}getViewportBounds(){const t=this.centerRowsCtrl.getCenterWidth(),e=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:e,end:t+e,width:t}}},_r=class extends Dt{constructor(t,e=!1){super(),this.callback=t,this.addSpacer=e}postConstruct(){const t=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",t),this.addManagedEventListeners({columnContainerWidthChanged:t,displayedColumnsChanged:t,leftPinnedWidthChanged:t}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:t,scrollVisibilityChanged:t,scrollbarWidthChanged:t}),this.setWidth()}setWidth(){const t=ye(this.gos,"print"),{visibleCols:e,scrollVisibleSvc:i}=this.beans,s=e.bodyWidth,o=e.getColsLeftWidth(),n=e.getDisplayedColumnsRightWidth();let r;t?r=s+o+n:(r=s,this.addSpacer&&0===(this.gos.get("enableRtl")?o:n)&&i.verticalScrollShowing&&(r+=i.getScrollbarWidth())),this.callback(r)}},Yr=class extends Dt{constructor(t){super(),this.centerContainerCtrl=t}wireBeans(t){this.scrollVisibleSvc=t.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(t=>{this.gridBodyCtrl=t.gridBodyCtrl,this.listenForResize()})),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],(()=>{this.checkViewportAndScrolls()}))}listenForResize(){const{beans:t,centerContainerCtrl:e,gridBodyCtrl:i}=this,s=()=>{ht(t,(()=>{this.onCenterViewportResized()}))};e.registerViewportResizeListener(s),i.registerBodyViewportResizeListener(s)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:t,colFlex:e}=this.beans;t?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const i=this.centerContainerCtrl.getCenterWidth();i!==this.centerWidth&&(this.centerWidth=i,e?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const t=G(this.gridBodyCtrl.eBodyViewport);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;const t={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(t)}onHorizontalViewportChanged(){const t=this.centerContainerCtrl.getCenterWidth(),e=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,e)}};function Qr(t,e,i,s){const o=e.getColDef().cellRendererParams?.suppressMouseEventHandling;return Jr(t,e,i,s,o)}function Jr(t,e,i,s,o){return!!o&&o(Qe(t,{column:e,node:i,event:s}))}function Xr(t,e,i){let s=e;for(;s;){const e=Pe(t,s,i);if(e)return e;s=s.parentElement}return null}var tl="cellCtrl";function el(t,e){return Xr(t,e,tl)}var il="renderedRow";function sl(t,e){return Xr(t,e,il)}function ol(t,e,i,s,o){const n=s?s.getColDef().suppressKeyboardEvent:void 0;if(!n)return!1;const r=Qe(t,{event:e,editing:o,column:s,node:i,data:i.data,colDef:s.getColDef()});return!(!n||!n(r))}var nl=class extends Dt{constructor(t){super(),this.element=t}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){const t="keydown",e=this.processKeyboardEvent.bind(this,t);this.addManagedElementListeners(this.element,{[t]:e})}addMouseListeners(){const t=["dblclick","contextmenu","mouseover","mouseout","click",wt("touchstart")?"touchstart":"mousedown"];for(const e of t){const t=this.processMouseEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}}processMouseEvent(t,e){if(!yt(this.beans,e)||Vr(e))return;const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(e.target);"contextmenu"===t?(i?.column&&i.dispatchCellContextMenuEvent(e),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(e,void 0,s,i)):(i&&i.onMouseEvent(t,e),s&&s.onMouseEvent(t,e))}getControlsForEventTarget(t){const{gos:e}=this;return{cellCtrl:el(e,t),rowCtrl:sl(e,t)}}processKeyboardEvent(t,e){const{cellCtrl:i,rowCtrl:s}=this.getControlsForEventTarget(e.target);e.defaultPrevented||(i?this.processCellKeyboardEvent(i,t,e):s?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,t,e))}processCellKeyboardEvent(t,e,i){const s=this.editSvc?.isEditing(t,{withOpenEditor:!0})??!1;ol(this.gos,i,t.rowNode,t.column,s)||"keydown"!==e||(!s&&this.beans.navigation?.handlePageScrollingKey(i)||t.onKeyDown(i),this.doGridOperations(i,s),Co(i)&&t.processCharacter(i)),"keydown"===e&&this.eventSvc.dispatchEvent(t.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(t,e,i){const{rowNode:s}=t,{focusSvc:o,navigation:n}=this.beans,r=o.getFocusedCell(),l=r?.column;if(!ol(this.gos,i,s,l,!1)&&"keydown"===e)switch(i.key){case Ws:case Us:case zs:case $s:n?.handlePageScrollingKey(i,!0);break;case Os:case Bs:if(!this.gos.get("embedFullWidthRows"))break;case Ns:case Gs:t.onKeyboardNavigate(i);break;case Es:t.onTabKeyDown(i)}"keydown"===e&&this.eventSvc.dispatchEvent(t.createRowEvent("cellKeyDown",i))}doGridOperations(t,e){if(!t.ctrlKey&&!t.metaKey)return;if(e)return;if(!yt(this.beans,t))return;const i=function(t){const{keyCode:e}=t;let i;switch(e){case 65:i=js;break;case 67:i=Ks;break;case 86:i=Zs;break;case 68:i=qs;break;case 90:i=Ys;break;case 89:i=_s;break;default:i=t.code}return i}(t),{clipboardSvc:s,undoRedo:o}=this.beans;return i===js?this.onCtrlAndA(t):i===Ks?this.onCtrlAndC(s,t):i===qs?this.onCtrlAndD(s,t):i===Zs?this.onCtrlAndV(s,t):"KeyX"===i?this.onCtrlAndX(s,t):i===_s?this.onCtrlAndY(o):i===Ys?this.onCtrlAndZ(o,t):void 0}onCtrlAndA(t){const{beans:{rowModel:e,rangeSvc:i,selectionSvc:s},gos:o}=this;i&&ze(o)&&!function(t){const e=t.get("rowSelection");return"string"!=typeof e&&"multiRow"===e?.mode&&(e.ctrlASelectsRows??!1)}(o)&&e.isRowsToRender()?function(t){const{pinnedRowModel:e,rowModel:i}=t,[s,o]=[e?.isEmpty("top")??!0,e?.isEmpty("bottom")??!0],n=s?null:"top";let r,l;o?(r=null,l=i.getRowCount()-1):(r="bottom",l=e?.getPinnedBottomRowCount()??-1);const{visibleCols:a,rangeSvc:h}=t,c=a.allCols;h&&c?.length&&h.setCellRange({rowStartIndex:0,rowStartPinned:n,rowEndIndex:l,rowEndPinned:r})}(this.beans):s&&s.selectAllRowNodes({source:"keyboardSelectAll",selectAll:qe(o)}),t.preventDefault()}onCtrlAndC(t,e){if(!t||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:i}=this.getControlsForEventTarget(e.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(e.preventDefault(),t.copyToClipboard())}onCtrlAndX(t,e){if(!t||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:i}=this.getControlsForEventTarget(e.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(e.preventDefault(),t.cutToClipboard(void 0,"ui"))}onCtrlAndV(t,e){const{cellCtrl:i}=this.getControlsForEventTarget(e.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||t&&!this.gos.get("suppressClipboardPaste")&&t.pasteFromClipboard()}onCtrlAndD(t,e){t&&!this.gos.get("suppressClipboardPaste")&&t.copyRangeDown(),e.preventDefault()}onCtrlAndZ(t,e){this.gos.get("undoRedoCellEditing")&&t&&(e.preventDefault(),e.shiftKey?t.redo("ui"):t.undo("ui"))}onCtrlAndY(t){t?.redo("ui")}},rl=class extends Dt{constructor(t,e){super(),this.eContainer=t,this.eViewport=e}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(t){const e=t.uiContainerHeight,i=null!=e?`${e}px`:"";this.eContainer.style.height=i,this.eViewport&&(this.eViewport.style.height=i)}},ll=t=>t.topRowCtrls,al=t=>t.getStickyTopRowCtrls(),hl=t=>t.getStickyBottomRowCtrls(),cl=t=>t.bottomRowCtrls,ul=t=>t.allRowCtrls,dl=t=>t.getCtrls("top"),gl=t=>t.getCtrls("center"),pl=t=>t.getCtrls("bottom"),fl={center:{type:"center",name:"center-cols",getRowCtrls:ul,getSpannedRowCtrls:gl},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:ul,getSpannedRowCtrls:gl},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:ul,getSpannedRowCtrls:gl},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:ul},topCenter:{type:"center",name:"floating-top",getRowCtrls:ll,getSpannedRowCtrls:dl},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:ll,getSpannedRowCtrls:dl},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:ll,getSpannedRowCtrls:dl},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:ll},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:al},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:al},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:al},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:al},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:hl},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:hl},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:hl},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:hl},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:cl,getSpannedRowCtrls:pl},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:cl,getSpannedRowCtrls:pl},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:cl,getSpannedRowCtrls:pl},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:cl}};function ml(t){return`ag-${Cl(t).name}-viewport`}function wl(t){const e=Cl(t);return e.container??`ag-${e.name}-container`}function vl(t){return`ag-${Cl(t).name}-spanned-cells-container`}function Cl(t){return fl[t]}var bl=["center","left","right","fullWidth"],yl=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],Sl=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],xl=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],Rl=["stickyTopCenter","stickyTopLeft","stickyTopRight"],Fl=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],kl=[...Rl,"stickyTopFullWidth",...Fl,"stickyBottomFullWidth"],Pl=["topCenter","topLeft","topRight","bottomCenter","bottomLeft","bottomRight","center","left","right",...Rl,...Fl],Dl=class extends Dt{constructor(t){super(),this.name=t,this.visible=!0,this.EMPTY_CTRLS=[],this.options=Cl(t)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],(()=>{this.viewportSizeFeature=this.createManagedBean(new Yr(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})}))}onStickyTopOffsetChanged(t){this.comp.setOffsetTop(`${t.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(t,e){t.indexOf(this.name)>=0&&e()}setComp(t,e,i,s){this.comp=t,this.eContainer=e,this.eSpannedContainer=i,this.eViewport=s,this.createManagedBean(new nl(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:o,rangeSvc:n}=this.beans,r=()=>this.onPinnedWidthChanged();this.forContainers(Sl,(()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(o?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:r})})),this.forContainers(xl,(()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(o?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:r})})),this.forContainers(bl,(()=>this.createManagedBean(new rl(this.eContainer,"center"===this.name?s:void 0)))),n&&this.forContainers(Pl,(()=>this.createManagedBean(n.createDragListenerFeature(this.eContainer)))),this.forContainers(yl,(()=>this.createManagedBean(new _r((t=>this.comp.setContainerWidth(`${t}px`)))))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(t){this.addManagedElementListeners(this.eViewport,{scroll:t})}addListeners(){const{spannedRowRenderer:t,gos:e}=this.beans,i=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i,displayedColumnsWidthChanged:i,displayedRowsChanged:t=>this.onDisplayedRowsChanged(t.afterScroll)}),i(),this.onDisplayedRowsChanged(),t&&this.options.getSpannedRowCtrls&&e.get("enableCellSpan")&&this.addManagedListeners(t,{spannedRowsUpdated:()=>{const e=this.options.getSpannedRowCtrls(t);e&&this.comp.setSpannedRowCtrls(e,!1)}})}listenOnDomOrder(){if(kl.indexOf(this.name)>=0)return void this.comp.setDomOrder(!0);const t=()=>{const t=this.gos.get("ensureDomOrder"),e=ye(this.gos,"print");this.comp.setDomOrder(t||e)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],(()=>this.onHorizontalViewportChanged()))}addPreventScrollWhileDragging(){const{dragSvc:t}=this.beans;if(!t)return;const e=e=>{t.dragging&&e.cancelable&&e.preventDefault()};this.eContainer.addEventListener("touchmove",e,{passive:!1}),this.addDestroyFunc((()=>this.eContainer.removeEventListener("touchmove",e)))}onHorizontalViewportChanged(t=!1){const e=this.getCenterWidth(),i=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,i,t)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return V(this.eViewport)}getCenterViewportScrollLeft(){return W(this.eViewport,this.enableRtl)}registerViewportResizeListener(t){const e=at(this.beans,this.eViewport,t);this.addDestroyFunc((()=>e()))}isViewportInTheDOMTree(){return q(this.eViewport)}getViewportScrollLeft(){return W(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||tt(this.eViewport)}setHorizontalScroll(t){this.comp.setHorizontalScroll(t)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(t){U(this.eViewport,t,this.enableRtl)}isContainerVisible(){return!(null!=this.options.pinnedType)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const t=this.isContainerVisible();this.visible!=t&&(this.visible=t,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(t=!1){const e=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||0===e.length)return void this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});const i=ye(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||i,o=e.filter((t=>{const e=t.isFullWidth();return this.options.fullWidth?!s&&e:s||!e}));this.comp.setRowCtrls({rowCtrls:o,useFlushSync:t})}},Ml="ag-force-vertical-scroll",Tl=class extends Dt{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(t){this.ctrlsSvc=t.ctrlsSvc,this.colModel=t.colModel,this.scrollVisibleSvc=t.scrollVisibleSvc,this.pinnedRowModel=t.pinnedRowModel,this.filterManager=t.filterManager,this.rowGroupColsSvc=t.rowGroupColsSvc}setComp(t,e,i,s,o,n,r){this.comp=t,this.eGridBody=e,this.eBodyViewport=i,this.eTop=s,this.eBottom=o,this.eStickyTop=n,this.eStickyBottom=r,this.eCenterColsViewport=i.querySelector(`.${ml("center")}`),this.eFullWidthContainer=i.querySelector(`.${wl("fullWidth")}`),this.eStickyTopFullWidthContainer=n.querySelector(`.${wl("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=r.querySelector(`.${wl("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",(t=>this.setCellTextSelection(t.currentValue))),this.createManagedBean(new Ur(this.comp)),this.scrollFeature=this.createManagedBean(new Zr(i)),this.beans.rowDragSvc?.setupRowDrag(i,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([s,i,o,n,r]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(s),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const t=this.setFloatingHeights.bind(this),e=this.setGridRootRole.bind(this),i=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:t,pinnedHeightChanged:t,pinnedRowsChanged:t,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:e,columnPivotChanged:e,rowResizeStarted:i,rowResizeEnded:i}),this.addManagedPropertyListener("treeData",e)}toggleRowResizeStyles(t){this.eBodyViewport.classList.toggle("ag-prevent-animation","rowResizeStarted"===t.type)}onGridColumnsChanged(){const t=this.beans.colModel.getCols();this.comp.setColumnCount(t.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:t}=this,e=t.verticalScrollShowing;this.setVerticalScrollPaddingVisible(e),this.setStickyWidth(e),this.setStickyBottomOffsetBottom();const i=`calc(100% + ${(e&&t.getScrollbarWidth()||0)+(oo()?16:0)}px)`;ht(this.beans,(()=>this.comp.setBodyViewportWidth(i))),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:t,colModel:e}=this;let i=this.gos.get("treeData");if(!i){const s=e.isPivotMode();i=(t?t.columns.length:0)>=(s?2:1)}this.comp.setGridRootRole(i?"treegrid":"grid")}addFocusListeners(t){for(const e of t)this.addManagedElementListeners(e,{focusin:t=>{const{target:i}=t,s=N(i,"ag-root",e);e.classList.toggle("ag-has-focus",!s)},focusout:t=>{const{target:i,relatedTarget:s}=t,o=e.contains(s),n=N(s,"ag-root",e);N(i,"ag-root",e)||o&&!n||e.classList.remove("ag-has-focus")}})}setColumnMovingCss(t){this.comp.setColumnMovingCss("ag-column-moving",t)}setCellTextSelection(t=!1){this.comp.setCellSelectableCss("ag-selectable",t)}updateScrollingClasses(){const{eGridBody:{classList:t},scrollVisibleSvc:e}=this;t.toggle("ag-body-vertical-content-no-gap",!e.verticalScrollGap),t.toggle("ag-body-horizontal-content-no-gap",!e.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:t=>{if(t.target instanceof HTMLImageElement)return t.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){const t=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:e}=this.beans,i=e.isLastRowIndexKnown()?e.getRowCount():-1;this.comp.setRowCount(-1===i?-1:t+i)}registerBodyViewportResizeListener(t){this.comp.registerBodyViewportResizeListener(t)}setVerticalScrollPaddingVisible(t){this.comp.setPinnedTopBottomOverflowY(t?"scroll":"hidden")}isVerticalScrollShowing(){const t=this.gos.get("alwaysShowVerticalScroll"),e=t?Ml:null,i=ye(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(e,t),t||i&&et(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:t,environment:e}=this.beans;let i=e.sizesMeasured;const s=()=>{const e=i&&Me(this.gos)&&!t.stretching;this.comp.setRowAnimationCssOnBodyViewport(e?"ag-row-animation":"ag-row-no-animation",e)};s(),this.addManagedEventListeners({heightScaleChanged:s}),this.addManagedPropertyListener("animateRows",s),this.addManagedEventListeners({gridStylesChanged:()=>{!i&&e.sizesMeasured&&(i=!0,s())}})}addBodyViewportListener(){const{eBodyViewport:t,eStickyTop:e,eStickyBottom:i,eTop:s,eBottom:o,beans:{popupSvc:n,touchSvc:r}}=this,l=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(t,{contextmenu:l}),r?.mockBodyContextMenu(this,l),this.addManagedElementListeners(t,{wheel:this.onBodyViewportWheel.bind(this,n)});const a=this.onStickyWheel.bind(this);for(const t of[e,i,s,o])this.addManagedElementListeners(t,{wheel:a});const h=this.onHorizontalWheel.bind(this);for(const t of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(t).eContainer,{wheel:h});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:t=>this.onFullWidthContainerWheel(t)})}onFullWidthContainerWheel(t){const{deltaX:e,deltaY:i,shiftKey:s}=t;(s||Math.abs(e)>Math.abs(i))&&yt(this.beans,t)&&this.scrollGridBodyToMatchEvent(t)}onStickyWheel(t){const{deltaY:e}=t;this.scrollVertically(e)>0&&t.preventDefault()}onHorizontalWheel(t){const{deltaX:e,deltaY:i,shiftKey:s}=t;(s||Math.abs(e)>Math.abs(i))&&this.scrollGridBodyToMatchEvent(t)}scrollGridBodyToMatchEvent(t){const{deltaX:e,deltaY:i}=t;t.preventDefault(),this.eCenterColsViewport.scrollBy({left:e||i})}onBodyViewportContextMenu(t,e,i){if(!t&&!i)return;this.gos.get("preventDefaultOnContextMenu")&&(t||i).preventDefault();const{target:s}=t||e;s!==this.eBodyViewport&&s!==this.ctrlsSvc.get("center").eViewport||this.beans.contextMenuSvc?.showContextMenu({mouseEvent:t,touchEvent:i,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(t,e){this.gos.get("suppressScrollWhenPopupsAreOpen")&&t?.hasAnchoredPopup()&&e.preventDefault()}scrollVertically(t){const e=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(e+t),this.eBodyViewport.scrollTop-e}setFloatingHeights(){const{pinnedRowModel:t,beans:{environment:e}}=this,i=t?.getPinnedTopTotalHeight(),s=t?.getPinnedBottomTotalHeight(),o=e.getPinnedRowBorderWidth()-e.getRowBorderWidth(),n=i?o+i:0,r=s?o+s:0;this.comp.setTopHeight(n),this.comp.setBottomHeight(r),this.comp.setTopInvisible(n<=0),this.comp.setBottomInvisible(r<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(t=0){this.comp.setStickyTopHeight(`${t}px`),this.stickyTopHeight=t}setStickyBottomHeight(t=0){this.comp.setStickyBottomHeight(`${t}px`),this.stickyBottomHeight=t}setStickyWidth(t){if(t){const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}else this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%")}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),e=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let i=0;t>0&&(i+=t),e>0&&(i+=e),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:t,scrollVisibleSvc:e,comp:i}=this,s=t?.getPinnedBottomTotalHeight()??0,o=e.horizontalScrollShowing&&e.getScrollbarWidth()||0;i.setStickyBottomBottom(`${s+o}px`)}};function El(t,e){const i=ye(t.gos,"normal");let s,o;null!=e.clientX||null!=e.clientY?(s=e.clientX,o=e.clientY):(s=e.x,o=e.y);const{pageFirstPixel:n}=t.pageBounds.getCurrentPagePixelRange();if(o+=n,i){const e=t.ctrlsSvc.getScrollFeature(),i=e.getVScrollPosition();s+=e.getHScrollPosition().left,o+=i.top}return{x:s,y:o}}var Al=class extends _i{constructor(t,e){super(),this.direction=e,this.eViewport=Ui,this.eContainer=Ui,this.hideTimeout=0,this.setTemplate(t)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",to()||eo())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=oo(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const t=this.getGui(),e=()=>this.toggleCss("ag-scrollbar-active",!0),i=()=>this.toggleCss("ag-scrollbar-active",!1);this.addManagedListeners(t,{mouseenter:e,mousedown:e,touchstart:e,mouseleave:i,touchend:i})}onScrollVisibilityChanged(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),ht(this.beans,(()=>this.setScrollVisible()))}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:t=>{t.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.toggleCss("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout((()=>{this.toggleCss("ag-scrollbar-scrolling",!1),this.hideTimeout=0}),400)}})}attemptSettingScrollPosition(t){const e=this.eViewport;!function(t,e,i,s=100){const o=Date.now();let n=null,r=!1;const l=()=>{null!=n&&(window.clearInterval(n),n=null)};t.addDestroyFunc(l);const a=()=>{const t=Date.now()-o>s;(e()||t)&&(i(),r=!0,l())};a(),r||(n=window.setInterval(a,10))}(this,(()=>Z(e)),(()=>this.setScrollPosition(t)),100)}onScrollCallback(t){this.addManagedElementListeners(this.eViewport,{scroll:t})}},Il={tag:"div",cls:"ag-body-horizontal-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eLeftSpacer",cls:"ag-horizontal-left-spacer"},{tag:"div",ref:"eViewport",cls:"ag-body-horizontal-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-horizontal-scroll-container"}]},{tag:"div",ref:"eRightSpacer",cls:"ag-horizontal-right-spacer"}]},Hl={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:class extends Al{constructor(){super(Il,"horizontal"),this.eLeftSpacer=Ui,this.eRightSpacer=Ui,this.setScrollVisibleDebounce=0}wireBeans(t){this.visibleCols=t.visibleCols,this.scrollVisibleSvc=t.scrollVisibleSvc}postConstruct(){super.postConstruct();const t=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t,displayedColumnsWidthChanged:t,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",t),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new _r((t=>this.eContainer.style.width=`${t}px`))),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const t=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${t}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const t=this.scrollVisibleSvc.verticalScrollShowing;let e=this.visibleCols.getDisplayedColumnsRightWidth();const i=!this.enableRtl&&t,s=this.scrollVisibleSvc.getScrollbarWidth();i&&(e+=s),st(this.eRightSpacer,e),this.eRightSpacer.classList.toggle("ag-scroller-corner",e<=s);let o=this.visibleCols.getColsLeftWidth();this.enableRtl&&t&&(o+=s),st(this.eLeftSpacer,o),this.eLeftSpacer.classList.toggle("ag-scroller-corner",o<=s)}setScrollVisible(){const t=this.scrollVisibleSvc.horizontalScrollShowing,e=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),s=t&&this.scrollVisibleSvc.getScrollbarWidth()||0,o=i?0:0===s&&e?16:s,n=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",e),ot(this.getGui(),o),ot(this.eViewport,o),ot(this.eContainer,o),o||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(t,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),t?this.setScrollVisibleDebounce=window.setTimeout(n,100):n()}getScrollPosition(){return W(this.eViewport,this.enableRtl)}setScrollPosition(t){Z(this.eViewport)||this.attemptSettingScrollPosition(t),U(this.eViewport,t,this.enableRtl)}}},Ol={tag:"div",cls:"ag-body-vertical-scroll",attrs:{"aria-hidden":"true"},children:[{tag:"div",ref:"eViewport",cls:"ag-body-vertical-scroll-viewport",children:[{tag:"div",ref:"eContainer",cls:"ag-body-vertical-scroll-container"}]}]},Nl={selector:"AG-FAKE-VERTICAL-SCROLL",component:class extends Al{constructor(){super(Ol,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new rl(this.eContainer));const{ctrlsSvc:t}=this.beans;t.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,t)})}setScrollVisible(){const{scrollVisibleSvc:t}=this.beans,e=t.verticalScrollShowing,i=this.invisibleScrollbar,s=e&&t.getScrollbarWidth()||0,o=0===s&&i?16:s;this.toggleCss("ag-scrollbar-invisible",i),st(this.getGui(),o),st(this.eViewport,o),st(this.eContainer,o),this.setDisplayed(e,{skipAriaHidden:!0})}onRowContainerHeightChanged(t){const e=t.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),s=e.scrollTop;i!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(t,e){e||Z(this.eViewport)||this.attemptSettingScrollPosition(t),this.eViewport.scrollTop=t}}};function Bl(t,e,i,o){return s(t)?[]:function(t,e,i,o,n){if(s(t))return[];let r;if("function"==typeof t){const s=function(t,e,i,s){return Qe(e,{colDef:t,column:i,columnGroup:s})}(e,i,o,n);r=t(s)}else r=t;return"string"==typeof r?[r]:Array.isArray(r)?[...r]:[]}(t.headerClass,t,e,i,o)}function Gl(t,e,i){t.toggleCss("ag-column-first",i.isColAtEdge(e,"first")),t.toggleCss("ag-column-last",i.isColAtEdge(e,"last"))}function Vl(t){return t.gos.get("suppressHeaderFocus")||!!t.overlays?.isExclusive()}function Ll(t){return t.gos.get("suppressCellFocus")||!!t.overlays?.isExclusive()}function zl(t,e,i=!1){const s=t.ctrlsSvc.get("gridCtrl");return!(i||!s.focusNextInnerContainer(e))||((i||!e&&!s.isDetailGrid())&&s.forceFocusOutOfContainer(e),!1)}function $l(t){return t.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function Wl(t){const e=[],i=t.ctrlsSvc.getHeaderRowContainerCtrls();for(const s of i){if(!s)continue;const i=s.getGroupRowCount()||0;for(let o=0;o<i;o++){const i=s.getGroupRowCtrlAtIndex(o),n=e[o];if(i){const s=Ul(t,i);(null==n||s>n)&&(e[o]=s)}}}return e}function Ul(t,e){let i=t.colModel.isPivotMode()?function(t){return t.gos.get("pivotGroupHeaderHeight")??Zl(t)}(t):Zl(t);const s=e.getHeaderCellCtrls();for(const t of s){const{column:e}=t,s=e.getAutoHeaderHeight();null!=s&&s>i&&e.isAutoHeaderHeight()&&(i=s)}return i}function jl(t){let e=t.colModel.isPivotMode()?function(t){return t.gos.get("pivotHeaderHeight")??Kl(t)}(t):Kl(t);return t.colModel.forAllCols((t=>{const i=t.getAutoHeaderHeight();null!=i&&i>e&&t.isAutoHeaderHeight()&&(e=i)})),e}function Kl(t){return t.gos.get("headerHeight")??t.environment.getDefaultHeaderHeight()}function ql(t){return t.gos.get("floatingFiltersHeight")??Kl(t)}function Zl(t){return t.gos.get("groupHeaderHeight")??Kl(t)}var _l=class extends Dt{setComp(t,e,i){this.comp=t,this.eGui=e;const{beans:s}=this,{headerNavigation:o,touchSvc:n,ctrlsSvc:r}=s;o&&this.createManagedBean(new Lr(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,s),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,s)}),this.onPivotModeChanged(s),this.setupHeaderHeight();const l=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:l}),n?.mockHeaderContextMenu(this,l),r.register("gridHeaderCtrl",this)}setupHeaderHeight(){const t=this.setHeaderHeight.bind(this);t(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t),this.addManagedEventListeners({headerRowsChanged:t,columnHeaderHeightChanged:t,columnGroupHeaderHeightChanged:()=>ht(this.beans,(()=>t())),gridStylesChanged:t,advancedFilterEnabledChanged:t})}setHeaderHeight(){const{beans:t}=this;let e=0;const i=Wl(t).reduce(((t,e)=>t+e),0),s=jl(t);t.filterManager?.hasFloatingFilters()&&(e+=ql(t)),e+=i,e+=s,this.headerHeight!==e&&(this.headerHeight=e,this.comp.setHeightAndMinHeight(`${e+1}px`),this.eventSvc.dispatchEvent({type:"headerHeightChanged"}))}onPivotModeChanged(t){const e=t.colModel.isPivotMode();this.comp.toggleCss("ag-pivot-on",e),this.comp.toggleCss("ag-pivot-off",!e)}onDisplayedColumnsChanged(t){const e=t.visibleCols.allCols.some((t=>t.isSpanHeaderHeight()));this.comp.toggleCss("ag-header-allow-overflow",e)}onTabKeyDown(t){const e=this.gos.get("enableRtl"),i=t.shiftKey,s=i!==e?"LEFT":"RIGHT",{beans:o}=this,{headerNavigation:n,focusSvc:r}=o;(n.navigateHorizontally(s,!0,t)||!i&&r.focusOverlay(!1)||zl(o,i,!0))&&t.preventDefault()}handleKeyDown(t){let e=null;const{headerNavigation:s}=this.beans;switch(t.key){case Os:e="LEFT";case Bs:i(e)||(e="RIGHT"),s.navigateHorizontally(e,!1,t)&&t.preventDefault();break;case Ns:e="UP";case Gs:i(e)||(e="DOWN"),s.navigateVertically(e,t)&&t.preventDefault();break;default:return}}onFocusOut(t){const{relatedTarget:e}=t,{eGui:i,beans:s}=this;!e&&i.contains(d(s))||i.contains(e)||(s.focusSvc.focusedHeader=null)}onHeaderContextMenu(t,e,i){const{menuSvc:s,ctrlsSvc:o}=this.beans;if(!t&&!i||!s?.isHeaderContextMenuEnabled())return;const{target:n}=t??e;n!==this.eGui&&n!==o.getHeaderRowContainerCtrl()?.eViewport||s.showHeaderContextMenu(void 0,t,i)}},Yl=class extends _i{constructor(t,e){super(t),this.ctrl=e}getCtrl(){return this.ctrl}},Ql={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},Jl=class extends Yl{constructor(t){super(Ql,t),this.eResize=Ui,this.eHeaderCompWrapper=Ui,this.headerCompVersion=0}postConstruct(){const t=this.getGui(),e=()=>{const t=this.ctrl.getSelectAllGui();t&&(this.eResize.insertAdjacentElement("afterend",t),this.addDestroyFunc((()=>t.remove())))};this.ctrl.setComp({setWidth:e=>t.style.width=e,toggleCss:(t,e)=>this.toggleCss(t,e),setUserStyles:e=>J(t,e),setAriaSort:e=>e?function(t,e){v(t,"sort",e)}(t,e):void C(t,"sort"),setUserCompDetails:t=>this.setUserCompDetails(t),getUserCompInstance:()=>this.headerComp,refreshSelectAllGui:e,removeSelectAllGui:()=>this.ctrl.getSelectAllGui()?.remove()},this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0),e()}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.headerCompGui?.remove(),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(t){this.headerCompVersion++;const e=this.headerCompVersion;t.newAgStackInstance().then((t=>this.afterCompCreated(e,t)))}afterCompCreated(t,e){t==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=e,this.headerCompGui=e.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())):this.destroyBean(e)}},Xl={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},ta=class extends Yl{constructor(t){super(Xl,t),this.eResize=Ui,this.eHeaderCompWrapper=Ui}postConstruct(){const t=this.getGui();this.ctrl.setComp({toggleCss:(t,e)=>this.toggleCss(t,e),setUserStyles:e=>J(t,e),setHeaderWrapperHidden:t=>{t?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:t=>{null!=t?this.eHeaderCompWrapper.style.setProperty("max-height",`${t}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",null!=t)},setResizableDisplayed:t=>H(this.eResize,t),setWidth:e=>t.style.width=e,setAriaExpanded:e=>{return i="aria-expanded",null!=(s=e)?t.setAttribute(i,s):t.removeAttribute(i);var i,s},setUserCompDetails:t=>this.setUserCompDetails(t),getUserCompInstance:()=>this.headerGroupComp},t,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(t){t.newAgStackInstance().then((t=>this.afterHeaderCompCreated(t)))}afterHeaderCompCreated(t){const e=()=>this.destroyBean(t);if(!this.isAlive())return void e();const i=this.getGui(),s=t.getGui();this.eHeaderCompWrapper.appendChild(s),this.addDestroyFunc(e),this.headerGroupComp=t,this.ctrl.setDragSource(i)}},ea={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},ia=class extends Yl{constructor(t){super(ea,t),this.eFloatingFilterBody=Ui,this.eButtonWrapper=Ui,this.eButtonShowMainFilter=Ui}postConstruct(){const t=this.getGui();this.ctrl.setComp({toggleCss:(t,e)=>this.toggleCss(t,e),setUserStyles:e=>J(t,e),addOrRemoveBodyCssClass:(t,e)=>this.eFloatingFilterBody.classList.toggle(t,e),setButtonWrapperDisplayed:t=>H(this.eButtonWrapper,t),setCompDetails:t=>this.setCompDetails(t),getFloatingFilterComp:()=>this.compPromise,setWidth:e=>t.style.width=e,setMenuIcon:t=>this.eButtonShowMainFilter.appendChild(t)},t,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(t){if(!t)return this.destroyFloatingFilterComp(),void(this.compPromise=null);this.compPromise=t.newAgStackInstance(),this.compPromise.then((t=>this.afterCompCreated(t)))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.floatingFilterComp.getGui().remove(),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(t){t&&(this.isAlive()?(this.destroyFloatingFilterComp(),this.floatingFilterComp=t,this.eFloatingFilterBody.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached()):this.destroyBean(t))}},sa=class extends _i{constructor(t){super({tag:"div",cls:t.headerRowClass,role:"row"}),this.ctrl=t,this.headerComps={}}postConstruct(){this.getGui().setAttribute("tabindex",String(this.gos.get("tabIndex"))),P(this.getGui(),this.ctrl.getAriaRowIndex()),this.ctrl.setComp({setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,e)=>this.setHeaderCtrls(t,e),setWidth:t=>this.getGui().style.width=t,setRowIndex:t=>P(this.getGui(),t)},void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(t,e){if(!this.isAlive())return;const i=this.headerComps;this.headerComps={};for(const e of t){const t=e.instanceId;let s=i[t];delete i[t],null==s&&(s=this.createHeaderComp(e),this.getGui().appendChild(s.getGui())),this.headerComps[t]=s}if(Object.values(i).forEach((t=>{t.getGui().remove(),this.destroyBean(t)})),e){const t=Object.values(this.headerComps);t.sort(((t,e)=>t.getCtrl().column.getLeft()-e.getCtrl().column.getLeft()));const e=t.map((t=>t.getGui()));Q(this.getGui(),e)}}createHeaderComp(t){let e;switch(this.ctrl.type){case"group":e=new ta(t);break;case"filter":e=new ia(t);break;default:e=new Jl(t)}return this.createBean(e),e.setParentComponent(this),e}},oa=class extends Dt{constructor(t,e,i,s){super(),this.columnOrGroup=t,this.eCell=e,this.colsSpanning=s,this.columnOrGroup=t,this.ariaEl=e.querySelector("[role=columnheader]")||e,this.beans=i}setColsSpanning(t){this.colsSpanning=t,this.onLeftChanged()}getColumnOrGroup(){const{beans:t,colsSpanning:e}=this;return t.gos.get("enableRtl")&&e?hi(e):this.columnOrGroup}postConstruct(){const t=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:t}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:t}),this.addManagedPropertyListener("domLayout",t)}setLeftFirstTime(){const{gos:t,colAnimation:e}=this.beans,s=t.get("suppressColumnMoveAnimation"),o=i(this.columnOrGroup.getOldLeft());e?.isActive()&&o&&!s?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const t=this.getColumnOrGroup(),e=this.modifyLeftForPrintLayout(t,t.getOldLeft()),i=this.modifyLeftForPrintLayout(t,t.getLeft());this.setLeft(e),this.actualLeft=i,this.beans.colAnimation.executeNextVMTurn((()=>{this.actualLeft===i&&this.setLeft(i)}))}onLeftChanged(){const t=this.getColumnOrGroup(),e=t.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(t,e),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(t,e){const{gos:i,visibleCols:s}=this.beans;if(!ye(i,"print"))return e;if("left"===t.getPinned())return e;const o=s.getColsLeftWidth();return"right"===t.getPinned()?o+s.bodyWidth+e:o+e}setLeft(t){if(i(t)&&(this.eCell.style.left=`${t}px`),Xn(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&v(this.ariaEl,"colspan",t.length)}}},na=0,ra="headerCtrl",la=class extends Dt{constructor(t,e){super(),this.column=t,this.rowCtrl=e,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=t.getUniqueId()+"-"+na++}postConstruct(){const t=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],t),this.addManagedEventListeners({overlayExclusiveChanged:t})}setComp(t,e,i,s,o){e.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(t,e,i,s,o),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(t){const{headerRowIndex:e,column:s}=this.beans.focusSvc.focusedHeader,o=s.getDefinition(),n=o?.suppressHeaderKeyboardEvent;return!!i(n)&&!!n(Qe(this.gos,{colDef:o,column:s,headerRowIndex:e,event:t}))}getWrapperHasFocus(){return d(this.beans)===this.eGui}setGui(t,e){this.eGui=t,this.addDomData(e),e.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),e.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){const t=this.column.getDefinition();if(!t)return;const{headerStyle:e}=t;let i;i="function"==typeof e?e(this.getHeaderClassParams()):e,i&&this.comp.setUserStyles(i)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(t){const{wrapperElement:e,checkMeasuringCallback:i,compBean:s}=t,{beans:o}=this,n=t=>{if(!this.isAlive()||!s.isAlive())return;const{paddingTop:i,paddingBottom:r,borderBottomWidth:l,borderTopWidth:a}=B(this.eGui),h=e.offsetHeight+(i+r+l+a);if(t<5){const i=g(o);if(!i?.contains(e)||0==h)return void It((()=>n(t+1)),"raf",o)}this.setColHeaderHeight(this.column,h)};let r,l=!1;const a=()=>{const t=this.column.isAutoHeaderHeight();t&&!l&&h(),!t&&l&&c()},h=()=>{l=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),n(0),r=at(this.beans,e,(()=>n(0)))},c=()=>{l=!1,r&&r(),this.comp.toggleCss("ag-header-cell-auto-height",!1),r=void 0};a(),s.addDestroyFunc((()=>c())),s.addManagedListeners(this.column,{widthChanged:()=>l&&n(0)}),s.addManagedEventListeners({sortChanged:()=>{l&&window.setTimeout((()=>n(0)))}}),i&&i(a)}onDisplayedColumnsChanged(){const{comp:t,column:e,beans:i,eGui:s}=this;t&&e&&s&&(Gl(t,e,i.visibleCols),D(s,i.visibleCols.getAriaColIndex(e)))}addResizeAndMoveKeyboardListeners(t){t.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const t=Vl(this.beans);this.eGui&<(this.eGui,"tabindex",t?null:"-1")}onGuiKeyDown(t){const e=d(this.beans),i=t.key===Os||t.key===Bs;if(this.isResizing&&(t.preventDefault(),t.stopImmediatePropagation()),e!==this.eGui||!t.shiftKey&&!t.altKey)return;if((this.isResizing||i)&&(t.preventDefault(),t.stopImmediatePropagation()),!i)return;const s=t.key===Os!==this.gos.get("enableRtl")?"left":"right";if(t.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const e=this.getViewportAdjustedResizeDiff(t);this.resizeHeader(e,t.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(s)}moveHeader(t){this.beans.colMoves?.moveHeader(t,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(t){const e=this.getResizeDiff(t),{pinnedCols:i}=this.beans;return i?i.getHeaderResizeDiff(e,this.column):e}getResizeDiff(t){const{gos:e,column:i}=this;let s=t.key===Os!==e.get("enableRtl");const o=i.getPinned(),n=e.get("enableRtl");return o&&n!==("right"===o)&&(s=!s),(s?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout((()=>{this.resizeFeature?.toggleColumnResizing(!1)}),150))}handleKeyDown(t){const e=this.getWrapperHasFocus();switch(t.key){case $s:case zs:case Ws:case Us:e&&t.preventDefault()}}addDomData(t){const e=ra,{eGui:i,gos:s}=this;De(s,i,e,this),t.addDestroyFunc((()=>De(s,i,e,null)))}focus(t){if(!this.isAlive())return!1;const{eGui:e}=this;return e?(e.focus(),this.lastFocusEvent=t||null):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(t,e,i){const s=t??e,{menuSvc:o,gos:n}=this.beans;n.get("preventDefaultOnContextMenu")&&s.preventDefault(),o?.isHeaderContextMenuEnabled(i)&&o.showHeaderContextMenu(i,t,e),this.dispatchColumnMouseEvent("columnHeaderContextMenu",i)}dispatchColumnMouseEvent(t,e){this.eventSvc.dispatchEvent({type:t,column:e})}setColHeaderHeight(t,e){if(!t.setAutoHeaderHeight(e))return;const{eventSvc:i}=this;i.dispatchEvent(t.isColumn?{type:"columnHeaderHeightChanged",column:t,columns:[t],source:"autosizeColumnHeaderHeight"}:{type:"columnGroupHeaderHeightChanged",columnGroup:t,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},aa=class extends la{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(t,e,i,s,o){this.comp=t;const{rowCtrl:n,column:r,beans:l}=this,{colResize:a,context:h,colHover:c,rangeSvc:u}=l,d=Wi(this,h,o);this.setGui(e,d),this.updateState(),this.setupWidth(d),this.setupMovingCss(d),this.setupMenuClass(d),this.setupSortableClass(d),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:s,checkMeasuringCallback:t=>this.setRefreshFunction("measuring",t),compBean:d}),this.addColumnHoverListener(d),this.setupFilterClass(d),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(d),this.setupSelectAll(d),this.setupUserComp(),this.refreshAria(),a?this.resizeFeature=d.createManagedBean(a.createResizeFeature(n.pinned,r,i,t,this)):H(i,!1),c?.createHoverFeature(d,[r],e),u?.createRangeHighlightFeature(d,r,t),d.createManagedBean(new oa(r,e,l)),d.createManagedBean(new Lr(e,{shouldStopEventPropagation:t=>this.shouldStopEventPropagation(t),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(d),d.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],(()=>this.refresh())),d.addManagedListeners(r,{colDefChanged:()=>this.refresh()}),d.addManagedListeners(r,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const g=()=>this.checkDisplayName();d.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),d.addDestroyFunc((()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()}))}resizeHeader(t,e){this.beans.colResize?.resizeHeader(this.column,t,e)}getHeaderClassParams(){const{column:t,beans:e}=this;return Qe(e.gos,{colDef:t.colDef,column:t,floatingFilter:!1})}setupUserComp(){const t=this.lookupUserCompDetails();t&&this.setCompDetails(t)}setCompDetails(t){this.userCompDetails=t,this.comp.setUserCompDetails(t)}lookupUserCompDetails(){const t=this.createParams(),e=this.column.getColDef();return function(t,e,i){return t.getCompDetails(e,es,"agColumnHeader",i)}(this.beans.userCompFactory,e,t)}createParams(){const{menuSvc:t,sortSvc:e,colFilter:i,gos:s}=this.beans;return Qe(s,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!t?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!i&&(!this.openFilterEnabled||Ye(this.gos)),showColumnMenu:(e,i)=>{t?.showColumnMenu({column:this.column,buttonElement:e,positionBy:"button",onClosedCallback:i})},showColumnMenuAfterMouseClick:(e,i)=>{t?.showColumnMenu({column:this.column,mouseEvent:e,positionBy:"mouse",onClosedCallback:i})},showFilter:e=>{t?.showFilterMenu({column:this.column,buttonElement:e,containerType:"columnFilter",positionBy:"button"})},progressSort:t=>{e?.progressSort(this.column,!!t,"uiColumnSorted")},setSort:(t,i)=>{e?.setSortForColumn(this.column,t,!!i,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(t,e)=>{s.assertModuleRegistered("Tooltip",3),this.setupTooltip(t,e)}})}setupSelectAll(t){const{selectionSvc:e}=this.beans;e&&(this.selectAllFeature=t.createOptionalManagedBean(e.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),t.addManagedPropertyListener("rowSelection",(()=>{const i=e.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=t.createManagedBean(i),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))})))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(t){super.handleKeyDown(t),t.key===Hs&&this.selectAllFeature?.onSpaceKeyDown(t),t.key===As&&this.onEnterKeyDown(t),t.key===Gs&&t.altKey&&this.showMenuOnKeyPress(t,!1)}onEnterKeyDown(t){t.ctrlKey||t.metaKey?this.showMenuOnKeyPress(t,!0):this.sortable&&this.beans.sortSvc?.progressSort(this.column,t.shiftKey,"uiColumnSorted")}showMenuOnKeyPress(t,e){const i=this.comp.getUserCompInstance();ha(i)&&i.onMenuKeyboardShortcut(e)&&t.preventDefault()}onFocusIn(t){this.eGui.contains(t.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),bo&&this.setActiveHeader(!0)}onFocusOut(t){this.eGui.contains(t.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(t,e){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,t,e)}setupStylesFromColDef(){this.setRefreshFunction("headerStyles",this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){const t=()=>{const t=Bl(this.column.getColDef(),this.gos,this.column,null),e=this.userHeaderClasses;this.userHeaderClasses=new Set(t);for(const i of t)e.has(i)?e.delete(i):this.comp.toggleCss(i,!0);for(const t of e)this.comp.toggleCss(t,!1)};this.setRefreshFunction("headerClasses",t),t()}setDragSource(t){this.dragSourceElement=t,this.removeDragSource(),t&&this.draggable&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(t,this.column,this.displayName)??null)}updateState(){const{menuSvc:t}=this.beans;this.menuEnabled=!!t?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!t?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(t,e){this.refreshFunctions[t]=e}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(const t of Object.values(this.refreshFunctions))t()}refreshHeaderComp(){const t=this.lookupUserCompDetails();t&&(null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==t.componentClass&&this.attemptHeaderCompRefresh(t.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(t))}attemptHeaderCompRefresh(t){const e=this.comp.getUserCompInstance();return!!e&&(!!e.refresh&&e.refresh(t))}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const t=this.column.getColDef();return!(this.gos.get("suppressMovableColumns")||t.suppressMovable||t.lockPosition)||!!t.enableRowGroup||!!t.enablePivot}setupWidth(t){const e=()=>{const t=this.column.getActualWidth();this.comp.setWidth(`${t}px`)};t.addManagedListeners(this.column,{widthChanged:e}),e()}setupMovingCss(t){const e=()=>{this.comp.toggleCss("ag-header-cell-moving",this.column.isMoving())};t.addManagedListeners(this.column,{movingChanged:e}),e()}setupMenuClass(t){const e=()=>{this.comp?.toggleCss("ag-column-menu-visible",this.column.isMenuVisible())};t.addManagedListeners(this.column,{menuVisibleChanged:e}),e()}setupSortableClass(t){const e=()=>{this.comp.toggleCss("ag-header-cell-sortable",!!this.sortable)};e(),this.setRefreshFunction("updateSortable",e),t.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(t){const e=()=>{const t=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",t),this.refreshAria()};t.addManagedListeners(this.column,{filterActiveChanged:e}),e()}setupWrapTextClass(){const t=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",t)};t(),this.setRefreshFunction("wrapText",t)}onHeaderHighlightChanged(){const t=this.column.getHighlighted(),e=1===t;this.comp.toggleCss("ag-header-highlight-before",0===t),this.comp.toggleCss("ag-header-highlight-after",e)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:t,column:e,comp:i,beans:s}=this,o=Wl(this.beans),n=0===o.reduce(((t,e)=>t+e),0);if(i.toggleCss("ag-header-parent-hidden",n),!e.isSpanHeaderHeight())return t.style.removeProperty("top"),t.style.removeProperty("height"),i.toggleCss("ag-header-span-height",!1),void i.toggleCss("ag-header-span-total",!1);const{numberOfParents:r,isSpanningTotal:l}=this.column.getColumnGroupPaddingInfo();i.toggleCss("ag-header-span-height",r>0);const a=jl(s);if(0===r)return i.toggleCss("ag-header-span-total",!1),t.style.setProperty("top","0px"),void t.style.setProperty("height",`${a}px`);i.toggleCss("ag-header-span-total",l);const h=(this.column.getFirstRealParent()?.getLevel()??-1)+1,c=o.length-h;let u=0;for(let t=0;t<c;t++)u+=o[o.length-1-t];t.style.setProperty("top",-u+"px"),t.style.setProperty("height",`${a+u}px`)}refreshAriaSort(){if(this.sortable){const t=this.getLocaleTextFunc(),e=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(function(t){let e;return e="asc"===t?"ascending":"desc"===t?"descending":"mixed"===t?"other":"none",e}(e)),this.setAriaDescriptionProperty("sort",t("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const t=this.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",t("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!Ye(this.gos)){const t=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",t("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const t=this.getLocaleTextFunc(),e=this.column.isFilterActive();this.setAriaDescriptionProperty("filter",e?t("ariaColumnFiltered","Column Filtered"):null)}setAriaDescriptionProperty(t,e){null!=e?this.ariaDescriptionProperties.set(t,e):this.ariaDescriptionProperties.delete(t)}announceAriaDescription(){if(!this.eGui.contains(d(this.beans)))return;const t=Array.from(this.ariaDescriptionProperties.keys()).sort(((t,e)=>"filter"===t?-1:e.charCodeAt(0)-t.charCodeAt(0))).map((t=>this.ariaDescriptionProperties.get(t))).join(". ");this.beans.ariaAnnounce?.announceValue(t,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(t){this.beans.colHover?.addHeaderColumnHoverListener(t,this.comp,this.column)}addActiveHeaderMouseListeners(t){const e=t=>this.handleMouseOverChange("mouseenter"===t.type);t.addManagedListeners(this.eGui,{mouseenter:e,mouseleave:e,click:()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},contextmenu:t=>this.handleContextMenuMouseEvent(t,void 0,this.column)})}handleMouseOverChange(t){this.setActiveHeader(t),this.eventSvc.dispatchEvent({type:t?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(t){this.comp.toggleCss("ag-header-active",t)}getAnchorElementForMenu(t){const e=this.comp.getUserCompInstance();return ha(e)?e.getAnchorElementForMenu(t):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function ha(t){return"function"==typeof t?.getAnchorElementForMenu&&"function"==typeof t.onMenuKeyboardShortcut}var ca=0,ua=class extends Dt{constructor(t,e,i){super(),this.rowIndex=t,this.pinned=e,this.type=i,this.instanceId=ca++,this.comp=null,this.allCtrls=[];let s="ag-header-row-column";"group"===i?s="ag-header-row-group":"filter"===i&&(s="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${s}`}setRowIndex(t){this.rowIndex=t,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=ye(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return!!this.comp&&this.allCtrls.every((t=>null!=t.eGui))}setComp(t,e,i=!0){this.comp=t,e=Wi(this,this.beans.context,e),i&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(e)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(t){const e=this.onRowHeightChanged.bind(this),i=this.onDisplayedColumnsChanged.bind(this);t.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:i,virtualColumnsChanged:t=>this.onVirtualColumnsChanged(t.afterScroll),columnGroupHeaderHeightChanged:e,columnHeaderHeightChanged:e,gridStylesChanged:e,advancedFilterEnabledChanged:e}),t.addManagedPropertyListener("domLayout",i),t.addManagedPropertyListener("ensureDomOrder",(t=>this.isEnsureDomOrder=t.currentValue)),t.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e)}onDisplayedColumnsChanged(){this.isPrintLayout=ye(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;const t=this.getWidthForRow();this.comp.setWidth(`${t}px`)}getWidthForRow(){const{visibleCols:t}=this.beans;return this.isPrintLayout?null!=this.pinned?0:t.getContainerWidth("right")+t.getContainerWidth("left")+t.getContainerWidth(null):t.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;const{topOffset:t,rowHeight:e}=this.getTopAndHeight();this.comp.setTop(t+"px"),this.comp.setHeight(e+"px")}getTopAndHeight(){let t=0;const e=Wl(this.beans);for(let i=0;i<e.length;i++){if(i===this.rowIndex&&"group"===this.type)return{topOffset:t,rowHeight:e[i]};t+=e[i]}const i=jl(this.beans);return"column"===this.type?{topOffset:t,rowHeight:i}:(t+=i,{topOffset:t,rowHeight:ql(this.beans)})}onVirtualColumnsChanged(t=!1){if(!this.comp)return;const e=this.getUpdatedHeaderCtrls();this.comp.setHeaderCtrls(e,this.isEnsureDomOrder||this.isPrintLayout,t)}getUpdatedHeaderCtrls(){const t=this.ctrlsById;this.ctrlsById=new Map;const e=this.getColumnsInViewport();for(const i of e)this.recycleAndCreateHeaderCtrls(i,this.ctrlsById,t);const i=t=>{const{focusSvc:e,visibleCols:i}=this.beans;return!!e.isHeaderWrapperFocused(t)&&i.isVisible(t.column)};if(t)for(const[e,s]of t)i(s)?this.ctrlsById.set(e,s):this.destroyBean(s);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(t,e,i){if(t.isEmptyGroup())return;const s=t.getUniqueId();let o;if(i&&(o=i.get(s),i.delete(s)),o&&o.column!=t&&(this.destroyBean(o),o=void 0),null==o)switch(this.type){case"filter":o=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,t,this));break;case"group":o=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,t,this));break;default:o=this.createBean(new aa(t,this))}e.set(s,o)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];const t=[];for(const e of["left",null,"right"])t.push(...this.getComponentsToRender(e));return t}getComponentsToRender(t=this.pinned){return"group"===this.type?this.beans.colViewport.getHeadersToRender(t,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(t)}focusHeader(t,e){const i=this.allCtrls.find((e=>e.column==t));return!!i&&i.focus(e)}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},da=class extends Dt{constructor(t){super(),this.pinned=t,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(t,e){this.comp=t,this.eViewport=e;const{pinnedCols:i,ctrlsSvc:s,colModel:o,colMoves:n}=this.beans;this.setupCenterWidth(),i?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(n,this.eViewport);const r=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:r,advancedFilterEnabledChanged:r}),s.register(`${"string"==typeof this.pinned?this.pinned:"center"}Header`,this),o.ready&&this.refresh()}getAllCtrls(){const t=[...this.groupsRowCtrls];return this.columnsRowCtrl&&t.push(this.columnsRowCtrl),this.filtersRowCtrl&&t.push(this.filtersRowCtrl),t}refresh(t=!1){const{focusSvc:e,filterManager:i,visibleCols:s}=this.beans;let o=0;const n=e.getFocusHeaderToUseAfterRefresh(),r=this.getAllCtrls();(()=>{const e=s.headerGroupRowCount;o=e,t||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));const i=this.groupsRowCtrls.length;if(i!==e)if(i>e){for(let t=e;t<i;t++)this.destroyBean(this.groupsRowCtrls[t]);this.groupsRowCtrls.length=e}else for(let t=i;t<e;t++){const e=this.createBean(new ua(t,this.pinned,"group"));this.groupsRowCtrls.push(e)}})(),(()=>{const e=o++;this.hidden?this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl):null!=this.columnsRowCtrl&&t?this.columnsRowCtrl.rowIndex!==e&&this.columnsRowCtrl.setRowIndex(e):(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new ua(e,this.pinned,"column")))})(),(()=>{this.includeFloatingFilter=!!i?.hasFloatingFilters()&&!this.hidden;const e=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter)return void e();t||e();const s=o++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==s&&this.filtersRowCtrl.setRowIndex(s):this.filtersRowCtrl=this.createBean(new ua(s,this.pinned,"filter"))})();const l=this.getAllCtrls();this.comp.setCtrls(l),this.restoreFocusOnHeader(e,n),r.length!==l.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(t){const e=e=>e?.getHeaderCellCtrls().find((e=>e.column===t));if(ii(t))return e(this.columnsRowCtrl);if(0!==this.groupsRowCtrls.length)for(let t=0;t<this.groupsRowCtrls.length;t++){const i=e(this.groupsRowCtrls[t]);if(i)return i}}getHtmlElementForColumnHeader(t){return this.getHeaderCtrlForColumn(t)?.eGui??null}getRowType(t){return this.getAllCtrls()[t]?.type}focusHeader(t,e,i){const s=this.getAllCtrls()[t];return!!s&&s.focusHeader(e,i)}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(t){return this.groupsRowCtrls[t]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(t){this.comp.setViewportScrollLeft(t)}onScrollCallback(t){this.addManagedElementListeners(this.eViewport,{scroll:t})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(t,e){const i=t?.createBodyDropTarget(this.pinned,e);i&&this.createManagedBean(i)}restoreFocusOnHeader(t,e){if(!e)return;const{column:i}=e;i.getPinned()==this.pinned&&t.focusHeaderPosition({headerPosition:e,scroll:!1})}setupCenterWidth(){null==this.pinned&&this.createManagedBean(new _r((t=>this.comp.setCenterWidth(`${t}px`)),!0))}};function ga(t,e,i){t.menuVisible!==e&&(t.menuVisible=e,t.dispatchColEvent("menuVisibleChanged",i))}function pa(t){const{enterpriseMenuFactory:e,filterMenuFactory:i,gos:s}=t;return e&&Ye(s)?e:i}var fa=class extends Qs{constructor(){super(...arguments),this.errorMessages=null}init(t){this.params=t,this.initialiseEditor(t),this.eEditor.onValueChange((()=>t.validate()))}destroy(){this.errorMessages=null}},ma=class extends _i{constructor(){super()}},wa={tag:"span",cls:"ag-overlay-loading-center"},va={tag:"span",cls:"ag-overlay-no-rows-center"};function Ca(t,e,i){let s=null;"smallDown"===t?pe(262):"smallLeft"===t?pe(263):"smallRight"===t&&pe(264);const o=i?.getColDef().icons;if(o&&(s=o[t]),e.gos&&!s){const i=e.gos.get("icons");i&&(s=i[t])}if(s){let e;if("function"==typeof s)e=s();else{if("string"!=typeof s)return void pe(38,{iconName:t});e=s}return"string"==typeof e?_(e):rt(e)?e:void pe(133,{iconName:t})}{const i=e.registry.getIcon(t);return i||e.validation?.validateIcon(t),mr({tag:"span",cls:`ag-icon ag-icon-${i??t}`,role:"presentation",attrs:{unselectable:"on"}})}}var ba={tag:"div",children:[{tag:"div",ref:"eGhost",cls:"ag-dnd-ghost ag-unselectable",children:[{tag:"span",ref:"eIcon",cls:"ag-dnd-ghost-icon ag-shake-left-to-right"},{tag:"div",ref:"eLabel",cls:"ag-dnd-ghost-label"}]}]},ya={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},Sa=class{constructor(t,e){this.beans=t,this.floating=e,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(t){const{all:e,visible:i,order:s}=this;e.has(t)||(e.add(t),i.add(t),s.push(t),this.sort())}delete(t){this.all.delete(t),this.visible.delete(t),this.queued.delete(t.id),di(this.order,t)}has(t){return this.visible.has(t)}forEach(t){this.order.forEach(t)}getByIndex(t){return this.order[t]}getById(t){for(const e of this.visible)if(e.id==t)return e}clear(){const{all:t,visible:e,order:i,queued:s}=this;t.clear(),s.clear(),e.clear(),i.length=0}sort(){const{sortSvc:t,rowNodeSorter:e,gos:i}=this.beans,s=t?.getSortOptions()??[],o=function(t){const e=t.findIndex(Fa);if(e>-1)return t.splice(e,1)?.[0]}(this.order);if(this.order.sort(((t,e)=>(t.pinnedSibling?.rowIndex??0)-(e.pinnedSibling?.rowIndex??0))),this.order=e?.doFullSort(this.order,s)??this.order,!o)return;const n=Ie(i);"bottom"===n||"pinnedBottom"===n?this.order.push(o):this.order.unshift(o)}hide(t){const{all:e,visible:i}=this;e.forEach((e=>t(e)?i.delete(e):i.add(e))),this.order=Array.from(i),this.sort()}queue(t){this.queued.add(t)}unqueue(t){this.queued.delete(t)}forEachQueued(t){this.queued.forEach(t)}};function xa(t){if(-1===t.level)return!0;const e=t.parent;return!!e?.childrenAfterSort?.some((e=>e==t))&&xa(e)}function Ra(t,e){const{gos:i,rowModel:s,filterManager:o}=t;return be(i)?!s.getRowNode(e.id):o?.isAnyFilterPresent()?!xa(e):!!i.get("pivotMode")&&!e.group}function Fa(t){return!!t.pinnedSibling&&function(t){return!!t.footer&&-1===t.level}(t.pinnedSibling)}var ka=class extends Dt{postConstruct(){const{gos:t,beans:e}=this;this.top=new Sa(e,"top"),this.bottom=new Sa(e,"bottom");const i=t=>Ra(e,t.pinnedSibling),s=()=>{const i=t.get("isRowPinned");i&&t.get("enableRowPinning")&&e.rowModel.forEachNode((t=>this.pinRow(t,i(t))),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:t})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow(),this.forContainers((t=>t.hide(i)));const e=this.refreshRowPositions();t&&!e||this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(Ma),this.refreshRowPositions()},rowNodeDataChanged:({node:e})=>{const i=t.get("isRowPinnable");(i?.(e)??1)||this.pinRow(e,null)},firstDataRendered:s}),this.addManagedPropertyListener("pivotMode",(()=>{this.forContainers((t=>t.hide(i))),this.dispatchRowPinnedEvents()})),this.addManagedPropertyListener("grandTotalRow",(({currentValue:t})=>{this._grandTotalPinned="pinnedBottom"===t?"bottom":"pinnedTop"===t?"top":null})),this.addManagedPropertyListener("isRowPinned",s)}destroy(){this.reset(!1),super.destroy()}reset(t=!0){this.forContainers((t=>{const e=[];t.forEach((t=>e.push(t))),e.forEach((t=>this.pinRow(t,null))),t.clear()})),t&&this.dispatchRowPinnedEvents()}pinRow(t,e,i){if(t.footer&&t.level>-1)return;if(t.footer&&-1===t.level)return this._grandTotalPinned=e,void function({gos:t,rowModel:e}){Ce(t)&&e.refreshModel({step:"map"})}(this.beans);const s=t.rowPinned??t.pinnedSibling?.rowPinned;if(null!=s&&null!=e&&e!=s){const s=t.rowPinned?t.pinnedSibling:t;return this.pinRow(t.rowPinned?t:t.pinnedSibling,null,i),void this.pinRow(s,e,i)}const o=i&&function(t,e,i){const{rowSpanSvc:s}=t,o=(i&&s?.isCellSpanning(i,e))??!1;if(i&&o)return s?.getCellSpan(i,e)?.spannedNodes}(this.beans,t,i);if(o)o.forEach((t=>this.pinRow(t,e)));else if(null==e){const i=t.rowPinned?t:t.pinnedSibling,s=this.findPinnedRowNode(i);if(!s)return;s.delete(i);const o=i.pinnedSibling;Da(i),this.refreshRowPositions(e),this.dispatchRowPinnedEvents(o)}else{const i=Pa(this.beans,t,e),s=this.getContainer(e);s.add(i),Ra(this.beans,t)&&s.hide((t=>Ra(this.beans,t.pinnedSibling))),this.refreshRowPositions(e),this.dispatchRowPinnedEvents(t)}}isManual(){return!0}isEmpty(t){return 0===this.getContainer(t).size()}isRowsToRender(t){return!this.isEmpty(t)}ensureRowHeightsValid(){let t=!1,e=0;const i=i=>{if(i.rowHeightEstimated){const s=Re(this.beans,i);i.setRowTop(e),i.setRowHeight(s.height),e+=s.height,t=!0}};return this.bottom.forEach(i),e=0,this.top.forEach(i),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),t}getPinnedTopTotalHeight(){return Ta(this.top)}getPinnedBottomTotalHeight(){return Ta(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(t){return this.top.getByIndex(t)}getPinnedBottomRow(t){return this.bottom.getByIndex(t)}getPinnedRowById(t,e){return this.getContainer(e).getById(t)}forEachPinnedRow(t,e){this.getContainer(t).forEach(e)}getPinnedState(){const t=t=>{const e=[];return this.forEachPinnedRow(t,(t=>e.push(t.pinnedSibling.id))),e};return{top:t("top"),bottom:t("bottom")}}setPinnedState(t){this.forContainers(((e,i)=>{for(const s of t[i]){const t=this.beans.rowModel.getRowNode(s);t?this.pinRow(t,i):e.queue(s)}}))}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(t){this._grandTotalPinned=t}tryToEmptyQueues(){this.forContainers(((t,e)=>{const i=new Set;t.forEachQueued((t=>{const e=this.beans.rowModel.getRowNode(t);e&&i.add(e)}));for(const s of i)t.unqueue(s.id),this.pinRow(s,e)}))}pinGrandTotalRow(){const{gos:t,beans:e,_grandTotalPinned:i}=this,s=e.rowModel;if(!Ce(t))return;const o=s.rootNode?.sibling;if(!o)return;const n=o.pinnedSibling,r=n&&this.findPinnedRowNode(n);if(i){if(r&&r.floating!==i&&(r.delete(n),Da(n)),!r||r.floating!==i){const t=Pa(e,o,i);this.getContainer(i).add(t)}}else{if(!r)return;r.delete(n),Da(n)}}onGridStylesChanges(t){t.rowHeightChanged&&this.forContainers((t=>t.forEach((t=>t.setRowHeight(t.rowHeight,!0)))))}getContainer(t){return"top"===t?this.top:this.bottom}findPinnedRowNode(t){return this.top.has(t)?this.top:this.bottom.has(t)?this.bottom:void 0}refreshRowPositions(t){const e=t=>function(t,e){let i=0,s=!1;return e.forEach(((e,o)=>{if(s||(s=e.rowTop!==i),e.setRowTop(i),e.rowHeightEstimated||null==e.rowHeight){const i=Re(t,e).height;s||(s=e.rowHeight!==i),e.setRowHeight(i)}e.setRowIndex(o),i+=e.rowHeight})),s}(this.beans,t);if(t)return e(this.getContainer(t));let i=!1;return this.forContainers((t=>{const s=e(t);i||(i=s)})),i}forContainers(t){t(this.top,"top"),t(this.bottom,"bottom")}dispatchRowPinnedEvents(t){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),t?.dispatchRowEvent("rowPinned")}};function Pa(t,e,i){if(e.pinnedSibling)return e.pinnedSibling;const s=((t,e)=>{const i=new nr(e);for(const e of Object.keys(t))lr.has(e)||(i[e]=t[e]);return i.oldRowTop=null,i})(e,t);return s.setRowTop(null),s.setRowIndex(null),s.rowPinned=i,s.id=`${"top"===i?ir:sr}${i}-${e.id}`,s.pinnedSibling=e,e.pinnedSibling=s,s}function Da(t){if(!t.pinnedSibling)return;t.rowPinned=null,t.setRowTop(null),t.setRowIndex(null);const e=t.pinnedSibling;t.pinnedSibling=void 0,e&&(e.pinnedSibling=void 0,e.rowPinned=null)}function Ma(t){const e=new Set;t.forEach((t=>{t.group&&e.add(t)})),e.forEach((e=>t.delete(e)))}function Ta(t){const e=t.size();if(0===e)return 0;const i=t.getByIndex(e-1);return void 0===i?0:i.rowTop+i.rowHeight}var Ea=class extends Dt{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){const t=this.gos;this.setPinnedRowData(t.get("pinnedTopRowData"),"top"),this.setPinnedRowData(t.get("pinnedBottomRowData"),"bottom"),this.addManagedPropertyListener("pinnedTopRowData",(t=>this.setPinnedRowData(t.currentValue,"top"))),this.addManagedPropertyListener("pinnedBottomRowData",(t=>this.setPinnedRowData(t.currentValue,"bottom"))),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(t){return 0===this.getCache(t).order.length}isRowsToRender(t){return!this.isEmpty(t)}isManual(){return!1}pinRow(t,e){}onGridStylesChanges(t){if(t.rowHeightChanged){const t=t=>{t.setRowHeight(t.rowHeight,!0)};Oa(this.pinnedBottomRows,t),Oa(this.pinnedTopRows,t)}}ensureRowHeightsValid(){let t=!1,e=0;const i=i=>{if(i.rowHeightEstimated){const s=Re(this.beans,i);i.setRowTop(e),i.setRowHeight(s.height),e+=s.height,t=!0}};return Oa(this.pinnedBottomRows,i),e=0,Oa(this.pinnedTopRows,i),this.eventSvc.dispatchEvent({type:"pinnedHeightChanged"}),t}setPinnedRowData(t,e){this.updateNodesFromRowData(t,e),this.eventSvc.dispatchEvent({type:"pinnedRowDataChanged"})}updateNodesFromRowData(t,e){const i=this.getCache(e);if(void 0===t)return i.order.length=0,void(i.cache={});const s=Ne(this.gos),o="top"===e?ir:sr,n=new Set(i.order),r=[],l=new Set;let a=0,h=-1;for(const c of t){const t=s?.({data:c,level:0,rowPinned:e})??o+this.nextId++;if(l.has(t)){pe(96,{id:t,data:c});continue}h++,l.add(t),r.push(t);const u=Ia(i,t);if(void 0!==u)u.data!==c&&u.updateData(c),a+=this.setRowTopAndRowIndex(u,a,h),n.delete(t);else{const s=new nr(this.beans);s.id=t,s.data=c,s.rowPinned=e,a+=this.setRowTopAndRowIndex(s,a,h),i.cache[t]=s,i.order.push(t)}}for(const t of n)Ia(i,t)?.clearRowTopAndRowIndex(),delete i.cache[t];i.order=r}setRowTopAndRowIndex(t,e,i){return t.setRowTop(e),t.setRowHeight(Re(this.beans,t).height),t.setRowIndex(i),t.rowHeight}getPinnedTopTotalHeight(){return Aa(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return Aa(this.pinnedBottomRows)}getPinnedTopRowCount(){return Na(this.pinnedTopRows)}getPinnedBottomRowCount(){return Na(this.pinnedBottomRows)}getPinnedTopRow(t){return Ha(this.pinnedTopRows,t)}getPinnedBottomRow(t){return Ha(this.pinnedBottomRows,t)}getPinnedRowById(t,e){return Ia(this.getCache(e),t)}forEachPinnedRow(t,e){return Oa(this.getCache(t),e)}getCache(t){return"top"===t?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function Aa(t){const e=Na(t);if(0===e)return 0;const i=Ha(t,e-1);return void 0===i?0:i.rowTop+i.rowHeight}function Ia(t,e){return t.cache[e]}function Ha(t,e){return Ia(t,t.order[e])}function Oa(t,e){t.order.forEach(((i,s)=>{const o=Ia(t,i);o&&e(o,s)}))}function Na(t){return t.order.length}function Ba(t){return!(!t.rowPinned||!t.pinnedSibling)}function Ga(t,e,i,s){const o="top"===e;if(!i)return Ga(t,e,o?t.getPinnedTopRow(0):t.getPinnedBottomRow(0),s);if(!s){const s=o?t.getPinnedTopRowCount():t.getPinnedBottomRowCount();return Ga(t,e,i,o?t.getPinnedTopRow(s-1):t.getPinnedBottomRow(s-1))}let n=!1,r=!1;const l=[];return t.forEachPinnedRow(e,(t=>t!==i||n?n&&t===s?(r=!0,void l.push(t)):void(n&&!r&&l.push(t)):(n=!0,void l.push(t)))),l}var Va={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},La=class extends _i{constructor(){super(Va,[Oo]),this.eCheckbox=Ui}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const t=this.getLocaleTextFunc(),{rowNode:e,eCheckbox:i}=this,s=e.isSelected(),o=E(t,s),[n,r]=e.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],l=t(n,r);i.setValue(s,!0),i.setInputAriaLabel(`${l} (${o})`)}init(t){if(this.rowNode=t.rowNode,this.column=t.column,this.overrides=t.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:Gr,click:t=>{Gr(t),this.beans.selectionSvc?.handleSelectionEvent(t,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",(({currentValue:t,previousValue:e})=>{("object"==typeof t?Le(t):void 0)!==("object"==typeof e?Le(e):void 0)&&this.onSelectableChanged()})),We(this.gos)||"function"==typeof this.getIsVisible()){const t=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t}),this.addManagedListeners(this.rowNode,{dataChanged:t,cellChanged:t}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:t,rowNode:e,overrides:i,gos:s}=this,o=e.selectable,n=this.getIsVisible();let r;if("function"==typeof n){const s=i?.callbackParams;if(t){const i=t.createColumnFunctionCallbackParams(e);r=n({...s,...i})}else r=n({...s,node:e,data:e.data})}else r=n??!1;const l=o&&!r||!o&&r,a=o||r,h=s.get("rowSelection"),c=h&&"string"!=typeof h?!Le(h):!!t?.getColDef().showDisabledCheckboxes;this.setVisible(a&&(!l||c)),this.setDisplayed(a&&(!l||c)),a&&this.eCheckbox.setDisabled(l),i?.removeHidden&&this.setDisplayed(a)}getIsVisible(){const t=this.overrides;if(t)return t.isVisible;const e=this.gos.get("rowSelection");return e&&"string"!=typeof e?Be(e):this.column?.getColDef()?.checkboxSelection}},za=class{constructor(t,e){this.rowModel=t,this.pinnedRowModel=e,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(t){this.rootId=t.id,this.endId=null,this.cachedRange.length=0}setEndRange(t){this.endId=t.id,this.cachedRange.length=0}getRange(){if(0===this.cachedRange.length){const t=this.getRoot(),e=this.getEnd();if(null==t||null==e)return this.cachedRange;this.cachedRange=this.getNodesInRange(t,e)??[]}return this.cachedRange}isInRange(t){return null!==this.rootId&&this.getRange().some((e=>e.id===t.id))}getRoot(t){return this.rootId?this.getRowNode(this.rootId):t?(this.setRoot(t),t):void 0}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(t){let e;const{rowModel:i,pinnedRowModel:s}=this;return e??(e=i.getRowNode(t)),s?.isManual()&&(e??(e=s.getPinnedRowById(t,"top")),e??(e=s.getPinnedRowById(t,"bottom"))),e}truncate(t){const e=this.getRange();if(0===e.length)return{keep:[],discard:[]};const i=e[0].id===this.rootId,s=e.findIndex((e=>e.id===t.id));if(s>-1){const o=e.slice(0,s),n=e.slice(s+1);return this.setEndRange(t),i?{keep:o,discard:n}:{keep:n,discard:o}}return{keep:e,discard:[]}}extend(t,e=!1){const i=this.getRoot();if(null==i){const i=this.getRange().slice();return e&&t.depthFirstSearch((t=>!t.group&&i.push(t))),i.push(t),this.setRoot(t),{keep:i,discard:[]}}const s=this.getNodesInRange(i,t);if(!s)return this.setRoot(t),{keep:[t],discard:[]};if(s.find((t=>t.id===this.endId)))return this.setEndRange(t),{keep:this.getRange(),discard:[]};{const e=this.getRange().slice();return this.setEndRange(t),{keep:this.getRange(),discard:e}}}getNodesInRange(t,e){const{pinnedRowModel:i,rowModel:s}=this;if(!i?.isManual())return s.getNodesInRangeForSelection(t,e);if("top"===t.rowPinned&&!e.rowPinned)return Ga(i,"top",t,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),e)??[]);if("bottom"===t.rowPinned&&!e.rowPinned){const o=Ga(i,"bottom",void 0,t),n=s.getRowCount(),r=s.getRow(n-1);return(s.getNodesInRangeForSelection(e,r)??[]).concat(o)}if(!t.rowPinned&&!e.rowPinned)return s.getNodesInRangeForSelection(t,e);if("top"===t.rowPinned&&"top"===e.rowPinned)return Ga(i,"top",t,e);if("bottom"===t.rowPinned&&"top"===e.rowPinned){const o=Ga(i,"top",e,void 0),n=Ga(i,"bottom",void 0,t),r=s.getRow(0),l=s.getRow(s.getRowCount()-1);return o.concat(s.getNodesInRangeForSelection(r,l)??[]).concat(n)}if(!t.rowPinned&&"top"===e.rowPinned)return Ga(i,"top",e,void 0).concat(s.getNodesInRangeForSelection(s.getRow(0),t)??[]);if("top"===t.rowPinned&&"bottom"===e.rowPinned){const o=Ga(i,"top",t,void 0),n=Ga(i,"bottom",void 0,e),r=s.getRow(0),l=s.getRow(s.getRowCount()-1);return o.concat(s.getNodesInRangeForSelection(r,l)??[]).concat(n)}if("bottom"===t.rowPinned&&"bottom"===e.rowPinned)return Ga(i,"bottom",t,e);if(!t.rowPinned&&"bottom"===e.rowPinned){const o=Ga(i,"bottom",void 0,e),n=s.getRow(s.getRowCount());return(s.getNodesInRangeForSelection(t,n)??[]).concat(o)}return null}},$a=class extends Dt{constructor(t){super(),this.column=t,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(t){const e=this.cbSelectAll;e.isDisplayed()&&!e.getGui().contains(d(this.beans))&&(t.preventDefault(),e.setValue(!e.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(t){this.headerCellCtrl=t;const e=this.createManagedBean(new Ho);this.cbSelectAll=e,e.addCss("ag-header-select-all"),y(e.getGui(),"presentation"),this.showOrHideSelectAll();const i=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:i,paginationChanged:i,modelUpdated:i}),this.addManagedPropertyListener("rowSelection",(({currentValue:t,previousValue:e})=>{const i=t=>"string"!=typeof t&&t&&"singleRow"!==t.mode?t.selectAll:void 0;i(t)!==i(e)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()})),this.addManagedListeners(e,{fieldValueChanged:this.onCbSelectAll.bind(this)}),e.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(t){this.isAlive()&&this.showOrHideSelectAll("uiColumnMoved"===t.source)}showOrHideSelectAll(t=!1){const e=this.isCheckboxSelection();this.cbSelectAllVisible=e,this.cbSelectAll.setDisplayed(e),e&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(t)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const t=this.getSelectAllMode(),e=this.beans.selectionSvc,i=this.cbSelectAll,s=e.getSelectAllState(t);i.setValue(s);const o=e.hasNodesToSelect(t);i.setDisabled(!o),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(t=!1){const e=this.getLocaleTextFunc(),{headerCellCtrl:i,cbSelectAll:s,cbSelectAllVisible:o}=this,n=E(e,s.getValue()),r=e("ariaRowSelectAll","Press Space to toggle all rows selection");i.setAriaDescriptionProperty("selectAll",o?`${r} (${n})`:null),s.setInputAriaLabel(e("ariaHeaderSelection","Column with Header Selection")),t||i.announceAriaDescription()}checkSelectionType(t){return!!je(this.gos)||(pe(128,{feature:t}),!1)}checkRightRowModelType(t){const{gos:e,rowModel:i}=this.beans;return!(!Ce(e)&&!be(e)&&(pe(129,{feature:t,rowModel:i.getType()}),1))}onCbSelectAll(){if(this.processingEventFromCheckbox)return;if(!this.cbSelectAllVisible)return;const t=this.cbSelectAll.getValue(),e=this.getSelectAllMode();let i="uiSelectAll";"currentPage"===e?i="uiSelectAllCurrentPage":"filtered"===e&&(i="uiSelectAllFiltered");const s={source:i,selectAll:e},o=this.beans.selectionSvc;t?o.selectAllRowNodes(s):o.deselectAllRowNodes(s)}isCheckboxSelection(){const{column:t,gos:e,beans:i}=this,s="object"==typeof e.get("rowSelection")?"headerCheckbox":"headerCheckboxSelection";return Wa(i,t)&&this.checkRightRowModelType(s)&&this.checkSelectionType(s)}getSelectAllMode(){const t=qe(this.gos,!1);if(t)return t;const{headerCheckboxSelectionCurrentPageOnly:e,headerCheckboxSelectionFilteredOnly:i}=this.column.getColDef();return e?"currentPage":i?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function Wa({gos:t,selectionColSvc:e},i){const s=t.get("rowSelection"),o=i.getColDef(),{headerCheckboxSelection:n}=o;let r=!1;if("object"==typeof s){const t=yi(i),o=bi(i);("autoGroupColumn"===Ve(s)&&o||t&&e?.isSelectionColumnEnabled())&&(r=Ge(s))}else r="function"==typeof n?n(Qe(t,{column:i,colDef:o})):!!n;return r}var Ua,ja=class extends Dt{postConstruct(){const{gos:t,beans:e}=this;this.selectionCtx=new za(e.rowModel,e.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],(()=>{const e=We(t);e!==this.isRowSelectable&&(this.isRowSelectable=e,this.updateSelectable())})),this.isRowSelectable=We(t),this.addManagedEventListeners({cellValueChanged:t=>this.updateRowSelectable(t.node),rowNodeDataChanged:t=>this.updateRowSelectable(t.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new La}createSelectAllFeature(t){if(Wa(this.beans,t))return new $a(t)}isMultiSelect(){return je(this.gos)}onRowCtrlSelected(t,e,i){const s=!!t.rowNode.isSelected();t.forEachGui(i,(t=>{t.rowComp.toggleCss("ag-row-selected",s);const i=t.element;M(i,s),i.contains(d(this.beans))&&e(t)}))}announceAriaRowSelection(t){if(this.isRowSelectionBlocked(t))return;const e=t.isSelected(),i=this.beans.editSvc?.isEditing({rowNode:t});if(!t.selectable||i)return;const s=this.getLocaleTextFunc()(e?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${e?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(s,"rowSelection")}isRowSelectionBlocked(t){return!t.selectable||t.rowPinned&&!Ba(t)||!Se(this.gos)}updateRowSelectable(t,e){const i=t.rowPinned&&t.pinnedSibling?t.pinnedSibling.selectable:this.isRowSelectable?.(t)??!0;return this.setRowSelectable(t,i,e),i}setRowSelectable(t,e,i){if(t.selectable!==e){if(t.selectable=e,t.dispatchRowEvent("selectableChanged"),i)return;if(Ze(this.gos)){const e=this.calculateSelectedFromChildren(t);return void this.setNodesSelected({nodes:[t],newValue:e??!1,source:"selectableChanged"})}t.isSelected()&&!t.selectable&&this.setNodesSelected({nodes:[t],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(t){let e=!1,i=!1;if(!t.childrenAfterGroup?.length)return t.selectable?t.__selected:null;for(let s=0;s<t.childrenAfterGroup.length;s++){const o=t.childrenAfterGroup[s];let n=o.isSelected();if(!o.selectable){const t=this.calculateSelectedFromChildren(o);if(null===t)continue;n=t}switch(n){case!0:e=!0;break;case!1:i=!0;break;default:return}}return e&&i?void 0:!!e||!i&&(t.selectable?t.__selected:null)}selectRowNode(t,e,i,s="api"){if(!t.selectable&&e||t.__selected===e)return!1;t.__selected=e,t.dispatchRowEvent("rowSelected");const o=t.sibling;o&&o.footer&&o.__localEventService&&o.dispatchRowEvent("rowSelected");const n=t.pinnedSibling;return n?.rowPinned&&n.__localEventService&&n.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...rr(t,this.gos,"rowSelected"),event:i||null,source:s}),!0}isCellCheckboxSelection(t,e){const i=this.gos.get("rowSelection");if(i&&"string"!=typeof i){const s=yi(t)&&Be(i);return t.isColumnFunc(e,s)}return t.isColumnFunc(e,t.colDef.checkboxSelection)}inferNodeSelections(t,e,i,s){const{gos:o,selectionCtx:n}=this,r=t.isSelected(),l=Ze(o),a=function(t){const e=$e(t);return!0===e||"enableSelection"===e}(o),h=function(t){const e=$e(t);return!0===e||"enableDeselection"===e}(o),c=this.isMultiSelect(),u="rowClicked"===s;if(u&&!a&&!h)return null;if(e&&i&&c){const e=n.getRoot();if(e){if(e.isSelected()){const e=n.isInRange(t)?n.truncate(t):n.extend(t,l);return{deselect:e.discard,select:e.keep,reset:!1}}return{select:[],deselect:n.extend(t,l).keep,reset:!1}}return null}if(e&&c){const e=n.selectAll?this.beans.rowModel.getRow(0):void 0,i=n.getRoot(e),s=n.isInRange(t)?n.truncate(t):n.extend(t,l);return{select:s.keep,deselect:s.discard,reset:n.selectAll||!(!i||i.isSelected())}}if(i){if(u){const e=!r;return e&&!a||!e&&!h?null:(n.setRoot(t),{node:t,newValue:e,clearSelection:!1})}return n.setRoot(t),{node:t,newValue:!r,clearSelection:!c}}{n.setRoot(t);const e=function(t){const e=t.get("rowSelection");return"string"==typeof e?t.get("rowMultiSelectWithClick"):e?.enableSelectionWithoutKeys??!1}(o),i=u&&(!e||!a);if("filteredDescendants"===Ke(o)&&void 0===r&&Ce(o))return{node:t,newValue:!1,checkFilteredNodes:!0,clearSelection:!c||i};if(u){const s=r?!e:a;return s===r&&!i||s&&!a||!s&&!h?null:{node:t,newValue:s,clearSelection:!c||i,keepDescendants:t.group&&l}}return{node:t,newValue:!r,clearSelection:!c||i}}}},Ka=class extends Dt{constructor(t){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:e,eTopGuard:i,eBottomGuard:s,focusTrapActive:o,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:r,focusInnerElement:l,onFocusIn:a,onFocusOut:h,shouldStopEventPropagation:c,onTabKeyDown:u,handleKeyDown:d,isEmpty:g,eFocusableElement:p}=t;this.comp=e,this.eTopGuard=i,this.eBottomGuard=s,this.providedFocusInnerElement=l,this.eFocusableElement=p,this.focusTrapActive=!!o,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!r,this.providedFocusIn=a,this.providedFocusOut=h,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=d,this.providedIsEmpty=g}postConstruct(){this.createManagedBean(new Lr(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:t=>this.onTabKeyDown(t),handleKeyDown:t=>this.handleKeyDown(t),onFocusIn:t=>this.onFocusIn(t),onFocusOut:t=>this.onFocusOut(t)})),this.activateTabGuards();for(const t of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(t,{focus:this.onFocus.bind(this)})}handleKeyDown(t){this.providedHandleKeyDown&&this.providedHandleKeyDown(t)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return!!this.providedShouldStopEventPropagation&&this.providedShouldStopEventPropagation()}activateTabGuards(){if(this.forcingFocusOut)return;const t=this.gos.get("tabIndex");this.comp.setTabIndex(t.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(t){if(this.isFocusableContainer&&!this.eFocusableElement.contains(t.relatedTarget)&&!this.allowFocus)return void this.findNextElementOutsideAndFocus(t.target===this.eBottomGuard);if(this.skipTabGuardFocus)return void(this.skipTabGuardFocus=!1);if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():0===xo(this.eFocusableElement,".ag-tab-guard").length))return void this.findNextElementOutsideAndFocus(t.target===this.eBottomGuard);if(this.isFocusableContainer&&this.eFocusableElement.contains(t.relatedTarget))return;const e=t.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(e):this.focusInnerElement(e))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(t.target===this.eBottomGuard)}findNextElementOutsideAndFocus(t){const e=xo(g(this.beans).body,null,!0),i=e.indexOf(t?this.eTopGuard:this.eBottomGuard);if(-1===i)return;let s,o;t?(s=0,o=i):(s=i+1,o=e.length);const n=e.slice(s,o),r=this.gos.get("tabIndex");n.sort(((t,e)=>{const i=Number.parseInt(t.getAttribute("tabindex")||"0"),s=Number.parseInt(e.getAttribute("tabindex")||"0");return s===r?1:i===r?-1:0===i?1:0===s?-1:i-s})),n[t?n.length-1:0]?.focus()}onFocusIn(t){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(t),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(t){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(t),this.eFocusableElement.contains(t.relatedTarget)||this.activateTabGuards())}onTabKeyDown(t){if(this.providedOnTabKeyDown)return void this.providedOnTabKeyDown(t);if(this.focusTrapActive)return;if(t.defaultPrevented)return;const e=this.tabGuardsAreActive();e&&this.deactivateTabGuards();const i=this.getNextFocusableElement(t.shiftKey);e&&setTimeout((()=>this.activateTabGuards()),0),i&&(i.focus(),t.preventDefault())}focusInnerElement(t=!1){const e=xo(this.eFocusableElement);return this.tabGuardsAreActive()&&(e.splice(0,1),e.splice(e.length-1,1)),!!e.length&&(e[t?e.length-1:0].focus({preventScroll:!0}),!0)}getNextFocusableElement(t){return Fo(this.beans,this.eFocusableElement,!1,t)}forceFocusOutOfContainer(t=!1){if(this.forcingFocusOut)return;const e=t?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,e.focus(),window.setTimeout((()=>{this.forcingFocusOut=!1,this.activateTabGuards()}))}isTabGuard(t,e){return t===this.eTopGuard&&!e||t===this.eBottomGuard&&(e??!0)}setAllowFocus(t){this.allowFocus=t}},qa=class extends Dt{constructor(t){super(),this.comp=t}initialiseTabGuard(t){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:e,eBottomGuard:i,eFocusableElement:s}=this,o=[e,i],n={setTabIndex:t=>{for(const e of o)null!=t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}};this.addTabGuards(e,i);const{focusTrapActive:r=!1,onFocusIn:l,onFocusOut:a,focusInnerElement:h,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:d,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}=t;this.tabGuardCtrl=this.createManagedBean(new Ka({comp:n,focusTrapActive:r,eTopGuard:e,eBottomGuard:i,eFocusableElement:s,onFocusIn:l,onFocusOut:a,focusInnerElement:h,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:d,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(t){const e=g(this.beans).createElement("div");return e.classList.add("ag-tab-guard","top"===t?"ag-tab-guard-top":"ag-tab-guard-bottom"),y(e,"presentation"),e}addTabGuards(t,e){const i=this.eFocusableElement;i.insertAdjacentElement("afterbegin",t),i.insertAdjacentElement("beforeend",e)}removeAllChildrenExceptTabGuards(){const t=[this.eTopGuard,this.eBottomGuard];j(this.comp.getFocusableElement()),this.addTabGuards(...t)}forceFocusOutOfContainer(t=!1){this.tabGuardCtrl.forceFocusOutOfContainer(t)}appendChild(t,e,i){rt(e)||(e=e.getGui());const{eBottomGuard:s}=this;s?s.insertAdjacentElement("beforebegin",e):t(e,i)}destroy(){const{eTopGuard:t,eBottomGuard:e}=this;K(t),K(e),super.destroy()}},Za=class extends _i{initialiseTabGuard(t){this.tabGuardFeature=this.createManagedBean(new qa(this)),this.tabGuardFeature.initialiseTabGuard(t)}forceFocusOutOfContainer(t=!1){this.tabGuardFeature.forceFocusOutOfContainer(t)}appendChild(t,e){this.tabGuardFeature.appendChild(super.appendChild.bind(this),t,e)}},_a=class{constructor(t,e=!1){this.eElement=t,this.preventClick=e,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,i){let s=this.eventSvc;if(!s){if(null===s)return;this.eventSvc=s=new t;const e=this.onTouchStart.bind(this);this.startListener=e,this.eElement.addEventListener("touchstart",e,{passive:!0})}s.addEventListener(e,i)}removeEventListener(t,e){this.eventSvc?.removeEventListener(t,e)}onTouchStart(t){if(this.touchStart||!(t=>{if(Ua){if(Ua.has(t))return!1}else Ua=new WeakSet;return Ua.add(t),!0})(t))return;const e=t.touches[0];this.touchStart=e;const i=this.handlers;if(!i.length){const t=this.eElement,e=t.ownerDocument,s=this.onTouchMove.bind(this),o=this.onTouchEnd.bind(this),n=this.onTouchCancel.bind(this),r={passive:!0},l={passive:!1};St(i,[t,"touchmove",s,r],[e,"touchcancel",n,r],[e,"touchend",o,l],[e,"contextmenu",Rt,l])}this.clearLongPress(),this.longPressTimer=window.setTimeout((()=>{this.longPressTimer=0,this.touchStart!==e||this.moved||(this.moved=!0,this.eventSvc?.dispatchEvent({type:"longTap",touchStart:e,touchEvent:t}))}),550)}onTouchMove(t){const{moved:e,touchStart:i}=this;if(!e&&i){const e=bt(i,t.touches);e&&!Ct(e,i,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(t){const e=this.touchStart;e&&bt(e,t.changedTouches)&&(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:e}),this.checkDoubleTap(e)),this.preventClick&&Rt(t),this.cancel())}onTouchCancel(t){const e=this.touchStart;e&&bt(e,t.changedTouches)&&(this.lastTapTime=null,this.cancel())}checkDoubleTap(t){let e=Date.now();const i=this.lastTapTime;i&&e-i>500&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:t}),e=null),this.lastTapTime=e}cancel(){this.clearLongPress(),xt(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){const t=this.startListener;t&&(this.startListener=null,this.eElement.removeEventListener("touchstart",t)),this.cancel(),this.eElement=null,this.eventSvc=null}},Ya=class{constructor(t){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=t.scrollContainer,this.scrollHorizontally=t.scrollAxis.includes("x"),this.scrollVertically=t.scrollAxis.includes("y"),this.scrollByTick=null!=t.scrollByTick?t.scrollByTick:20,t.onScrollCallback&&(this.onScrollCallback=t.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=t.getVerticalPosition,this.setVerticalPosition=t.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=t.getHorizontalPosition,this.setHorizontalPosition=t.setHorizontalPosition),this.shouldSkipVerticalScroll=t.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=t.shouldSkipHorizontalScroll||(()=>!1)}get scrolling(){return null!==this.tickingInterval}check(t,e=!1){const i=e||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;const s=this.scrollContainer.getBoundingClientRect(),o=this.scrollByTick;this.tickLeft=t.clientX<s.left+o,this.tickRight=t.clientX>s.right-o,this.tickUp=t.clientY<s.top+o&&!i,this.tickDown=t.clientY>s.bottom-o&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const t=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const e=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(e-t),this.tickDown&&this.setVerticalPosition(e+t)}if(this.scrollHorizontally){const e=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(e-t),this.tickRight&&this.setHorizontalPosition(e+t)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}},Qa=class{constructor(t="javascript"){this.frameworkName=t,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${Wt}/${this.frameworkName}-data-grid`,re=this.baseDocLink}frameworkComponent(t){return null}isFrameworkComponent(t){return!1}getDocLink(t){return this.baseDocLink+(t?"/"+t:"")}};function Ja(t){return{beanName:"gridApi",bean:t.getBean("apiFunctionSvc").api}}var Xa=Object.fromEntries(["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"].map(((t,e)=>[t,e])));function th(t,e){return((t.beanName?Xa[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER)-((e.beanName?Xa[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER)}function eh(t,e){return"gridDestroySvc"===t?.beanName?-1:"gridDestroySvc"===e?.beanName?1:0}var ih={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},sh={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},oh={tag:"div",cls:"ag-header-viewport",role:"rowgroup",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"presentation"}]},nh=class extends _i{constructor(t){super(),this.eCenterContainer=Ui,this.headerRowComps={},this.rowCompsList=[],this.pinned=t}postConstruct(){this.selectAndSetTemplate();const t={setDisplayed:t=>this.setDisplayed(t),setCtrls:t=>this.setCtrls(t),setCenterWidth:t=>this.eCenterContainer.style.width=t,setViewportScrollLeft:t=>this.getGui().scrollLeft=t,setPinnedContainerWidth:t=>{const e=this.getGui();e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}};this.createManagedBean(new da(this.pinned)).setComp(t,this.getGui())}selectAndSetTemplate(){this.setTemplate("left"==this.pinned?ih:"right"==this.pinned?sh:oh),this.eRowContainer=this.eCenterContainer!==Ui?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(t){this.destroyBean(t),t.getGui().remove()}setCtrls(t){const e=this.headerRowComps;let i;this.headerRowComps={},this.rowCompsList=[];const s=t=>{const e=t.getGui();e.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(e),i&&Y(this.eRowContainer,e,i),i=e};for(const i of t){const t=i.instanceId,o=e[t];delete e[t];const n=o||this.createBean(new sa(i));this.headerRowComps[t]=n,this.rowCompsList.push(n),s(n)}for(const t of Object.values(e))this.destroyRowComp(t)}},rh={tag:"div",cls:"ag-header",role:"presentation"},lh={selector:"AG-HEADER-ROOT",component:class extends _i{constructor(){super(rh)}postConstruct(){const t={toggleCss:(t,e)=>this.toggleCss(t,e),setHeightAndMinHeight:t=>{this.getGui().style.height=t,this.getGui().style.minHeight=t}};this.createManagedBean(new _l).setComp(t,this.getGui(),this.getFocusableElement());const e=t=>{this.createManagedBean(t),this.appendChild(t)};e(new nh("left")),e(new nh(null)),e(new nh("right"))}}},ah=class extends _i{constructor(t,e,i,s,o){super(),this.cellCtrl=e,this.rendererVersion=0,this.editorVersion=0,this.beans=t,this.gos=t.gos,this.column=e.column,this.rowNode=e.rowNode,this.eRow=s;const n=mr({tag:"div",role:e.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":e.column.colIdSanitised}});let r;this.eCell=n,e.isCellSpanning()?(r=mr({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),r.appendChild(n),this.setTemplateFromElement(r)):this.setTemplateFromElement(n),this.cellCssManager=new Ki((()=>n)),this.forceWrapper=e.isForceWrapper(),this.refreshWrapper(!1),e.setComp({toggleCss:(t,e)=>this.cellCssManager.toggleCss(t,e),setUserStyles:t=>J(n,t),getFocusableElement:()=>n,setIncludeSelection:t=>this.includeSelection=t,setIncludeRowDrag:t=>this.includeRowDrag=t,setIncludeDndSource:t=>this.includeDndSource=t,setRenderDetails:(t,e,i)=>this.setRenderDetails(t,e,i),setEditDetails:(t,e,i)=>this.setEditDetails(t,e,i),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue(),refreshEditStyles:(t,e)=>this.refreshEditStyles(t,e)},n,r,this.eCellWrapper,i,o,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(t,e,i){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=null==this.firstRender;const s=this.refreshWrapper(!1);this.refreshEditStyles(!1),t?!i&&!s&&this.refreshCellRenderer(t)||(this.destroyRenderer(),this.createCellRendererInstance(t)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(e)),this.rowDraggingComp?.refreshVisibility()}setEditDetails(t,e,i){t?this.createCellEditorInstance(t,e,i):this.destroyEditor()}removeControls(){const t=this.beans.context;this.checkboxSelectionComp=t.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=t.destroyBean(this.dndSourceComp),this.rowDraggingComp=t.destroyBean(this.rowDraggingComp)}refreshWrapper(t){const e=this.includeRowDrag||this.includeDndSource||this.includeSelection,i=e||this.forceWrapper,s=i&&null==this.eCellWrapper;s&&(this.eCellWrapper=mr({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const o=!i&&null!=this.eCellWrapper;o&&(K(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssManager.toggleCss("ag-cell-value",!i);const n=!t&&i,r=n&&null==this.eCellValue;if(r){const t=this.cellCtrl.getCellValueClass();this.eCellValue=mr({tag:"span",cls:t,role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue)}const l=!n&&null!=this.eCellValue;l&&(K(this.eCellValue),this.eCellValue=void 0);const a=s||o||r||l;return a&&this.removeControls(),!t&&e&&this.addControls(),a}addControls(){const{cellCtrl:t,eCellWrapper:e,eCellValue:i,includeRowDrag:s,includeDndSource:o,includeSelection:n}=this,r=t=>{t&&e.insertBefore(t.getGui(),i)};s&&null==this.rowDraggingComp&&(this.rowDraggingComp=t.createRowDragComp(),r(this.rowDraggingComp)),o&&null==this.dndSourceComp&&(this.dndSourceComp=t.createDndSource(),r(this.dndSourceComp)),n&&null==this.checkboxSelectionComp&&(this.checkboxSelectionComp=t.createSelectionCheckbox(),r(this.checkboxSelectionComp))}createCellEditorInstance(t,e,i){const o=this.editorVersion,n=t.newAgStackInstance(),{params:r}=t;n.then((t=>this.afterCellEditorCreated(o,t,r,e,i))),s(this.cellEditor)&&r.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(t){const e=this.getParentOfValue();j(e);const i=h(t);null!=i&&(e.textContent=i)}destroyRenderer(){const{context:t}=this.beans;this.cellRenderer=t.destroyBean(this.cellRenderer),K(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:t}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains(d(this.beans))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=t.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=t.destroyBean(this.cellEditorPopupWrapper),K(this.cellEditorGui),this.cellCtrl.disableEditorTooltipFeature(),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(t){if(null==this.cellRenderer?.refresh)return!1;if(this.cellRendererClass!==t.componentClass)return!1;const e=this.cellRenderer.refresh(t.params);return!0===e||void 0===e}createCellRendererInstance(t){const e=this.rendererVersion,i=t=>()=>{if(this.rendererVersion!==e||!this.isAlive())return;const i=t.newAgStackInstance(),s=this.afterCellRendererCreated.bind(this,e,t.componentClass);i?.then(s)},{animationFrameSvc:s}=this.beans;let o;if(o=s?.active&&this.firstRender?(t,e=!1)=>{s.createTask(i(t),this.rowNode.rowIndex,"p2",t.componentFromFramework,e)}:t=>i(t)(),t.params?.deferRender&&!this.cellCtrl.rowNode.group){const{loadingComp:e,onReady:i}=this.cellCtrl.getDeferLoadingCellRenderer();e&&(o(e),i.then((()=>o(t,!0))))}else o(t)}afterCellRendererCreated(t,e,i){if(!this.isAlive()||t!==this.rendererVersion)return void this.beans.context.destroyBean(i);this.cellRenderer=i,this.cellRendererClass=e;const s=i.getGui();if(this.cellRendererGui=s,null!=s){const t=this.getParentOfValue();j(t),t.appendChild(s)}}afterCellEditorCreated(t,e,i,s,o){const n=t!==this.editorVersion,{context:r}=this.beans;if(n)return void r.destroyBean(e);const l=e.isCancelBeforeStart?.();if(l)return r.destroyBean(e),void this.cellCtrl.stopEditing(!0);if(!e.getGui)return pe(97,{colId:this.column.getId()}),void r.destroyBean(e);this.cellEditor=e,this.cellEditorGui=e.getGui();const a=s||e.isPopup?.();a?this.addPopupCellEditor(i,o):this.addInCellEditor(),this.refreshEditStyles(!0,a),e.afterGuiAttached?.(),this.cellCtrl.enableEditorTooltipFeature(e),this.cellCtrl.cellEditorAttached()}refreshEditStyles(t,e){const{cellCssManager:i}=this;i.toggleCss("ag-cell-inline-editing",t&&!e),i.toggleCss("ag-cell-popup-editing",t&&!!e),i.toggleCss("ag-cell-not-inline-editing",!t||!!e)}addInCellEditor(){const{eCell:t}=this;t.contains(d(this.beans))&&t.focus(),this.destroyRenderer(),this.refreshWrapper(!0),j(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(t,e){const{gos:i,context:s,popupSvc:o,editSvc:n}=this.beans;"fullRow"===i.get("editType")&&pe(98);const r=this.cellEditorPopupWrapper=s.createBean(n.createPopupEditorWrapper(t)),{cellEditor:l,cellEditorGui:a,eCell:h,rowNode:c,column:u,cellCtrl:d}=this,g=r.getGui();a&&g.appendChild(a);const p=i.get("stopEditingWhenCellsLoseFocus"),f=null!=e?e:l.getPopupPosition?.()??"over",m=i.get("enableRtl"),w=o.positionPopupByComponent.bind(o,{ePopup:g,column:u,rowNode:c,type:"popupCellEditor",eventSource:h,position:f,alignSide:m?"right":"left",keepWithinBounds:!0}),v=o.addPopup({modal:p,eChild:g,closeOnEsc:!0,closedCallback:()=>{d.onPopupEditorClosed()},anchorToElement:h,positionCallback:w,ariaOwns:h});v&&(this.hideEditorPopup=v.hideFunc)}detach(){this.getGui().remove()}destroy(){this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},hh=class extends _i{constructor(t,e,i){super(),this.cellComps=new Map,this.beans=e,this.rowCtrl=t;const s=mr({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(s,i),this.setTemplateFromElement(s);const o=s.style;this.domOrder=this.rowCtrl.getDomOrder(),t.setComp({setDomOrder:t=>this.domOrder=t,setCellCtrls:t=>this.setCellCtrls(t),showFullWidth:t=>this.showFullWidth(t),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,getFullWidthCellRendererParams:()=>this.fullWidthCellRendererParams,toggleCss:(t,e)=>this.toggleCss(t,e),setUserStyles:t=>J(s,t),setTop:t=>o.top=t,setTransform:t=>o.transform=t,setRowIndex:t=>s.setAttribute("row-index",t),setRowId:t=>s.setAttribute("row-id",t),setRowBusinessKey:t=>s.setAttribute("row-business-key",t),refreshFullWidth:t=>{const e=t();return this.fullWidthCellRendererParams=e,this.fullWidthCellRenderer?.refresh?.(e)??!1}},this.getGui(),i,void 0),this.addDestroyFunc((()=>{t.unsetComp(i)}))}setInitialStyle(t,e){const i=this.rowCtrl.getInitialTransform(e);if(i)t.style.setProperty("transform",i);else{const i=this.rowCtrl.getInitialRowTop(e);i&&t.style.setProperty("top",i)}}showFullWidth(t){t.newAgStackInstance().then((e=>{if(this.isAlive()){const i=e.getGui();this.getGui().appendChild(i),this.rowCtrl.setupDetailRowAutoHeight(i),this.setFullWidthRowComp(e,t.params)}else this.beans.context.destroyBean(e)}))}setCellCtrls(t){const e=new Map(this.cellComps);for(const i of t){const t=i.instanceId;this.cellComps.has(t)?e.delete(t):this.newCellComp(i)}this.destroyCells(e),this.ensureDomOrder(t)}ensureDomOrder(t){if(!this.domOrder)return;const e=[];for(const i of t){const t=this.cellComps.get(i.instanceId);t&&e.push(t.getGui())}Q(this.getGui(),e)}newCellComp(t){const e=this.beans.editSvc?.isEditing(t,{withOpenEditor:!0})??!1,i=new ah(this.beans,t,this.rowCtrl.printLayout,this.getGui(),e);this.cellComps.set(t.instanceId,i),this.getGui().appendChild(i.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(t,e){this.fullWidthCellRenderer=t,this.fullWidthCellRendererParams=e,this.addDestroyFunc((()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer),this.fullWidthCellRendererParams=void 0}))}destroyCells(t){for(const e of t.values()){if(!e)return;const t=e.cellCtrl.instanceId;if(this.cellComps.get(t)!==e)return;e.detach(),e.destroy(),this.cellComps.delete(t)}}},ch={selector:"AG-ROW-CONTAINER",component:class extends _i{constructor(t){super(),this.eViewport=Ui,this.eContainer=Ui,this.eSpannedContainer=Ui,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=t?.name,this.options=Cl(this.name)}postConstruct(){this.setTemplate(function(t,e,i){const s=!!i.gos.get("enableCellSpan")&&!!e.getSpannedRowCtrls,o={tag:"div",ref:"eContainer",cls:wl(t),role:"rowgroup"};if("center"===e.type||s){const e={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${vl(t)}`,role:"presentation"};return o.role="presentation",{tag:"div",ref:"eViewport",cls:`ag-viewport ${ml(t)}`,role:"rowgroup",children:[o,s?e:null]}}return o}(this.name,this.options,this.beans));const t={setHorizontalScroll:t=>this.eViewport.scrollLeft=t,setViewportHeight:t=>this.eViewport.style.height=t,setRowCtrls:({rowCtrls:t})=>this.setRowCtrls(t),setSpannedRowCtrls:t=>this.setRowCtrls(t,!0),setDomOrder:t=>{this.domOrder=t},setContainerWidth:t=>{this.eContainer.style.width=t,this.eSpannedContainer&&(this.eSpannedContainer.style.width=t)},setOffsetTop:t=>{const e=`translateY(${t})`;this.eContainer.style.transform=e,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=e)}};this.createManagedBean(new Dl(this.name)).setComp(t,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(t,e){const{beans:i,options:s}=this,o=e?this.eSpannedContainer:this.eContainer,n=e?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},r={};e?this.rowCompsWithSpan=r:this.rowCompsNoSpan=r,this.lastPlacedElement=null;const l=[];for(const e of t){const t=e.instanceId,o=n[t];let a;if(o)a=o,delete n[t];else{if(!e.rowNode.displayed)continue;a=new hh(e,i,s.type)}r[t]=a,l.push([a,!o])}this.removeOldRows(Object.values(n)),this.addRowNodes(l,o)}addRowNodes(t,e){const{domOrder:i}=this;for(const[s,o]of t){const t=s.getGui();i?this.ensureDomOrder(t,e):o&&e.appendChild(t)}}removeOldRows(t){for(const e of t)e.getGui().remove(),e.destroy()}ensureDomOrder(t,e){Y(e,t,this.lastPlacedElement),this.lastPlacedElement=t}}};function uh(t,e){return e.map((e=>{const i=`e${e[0].toUpperCase()+e.substring(1)}RowContainer`;return t[i]={name:e},{tag:"ag-row-container",ref:i,attrs:{name:e}}}))}var dh={selector:"AG-GRID-BODY",component:class extends _i{constructor(){super(...arguments),this.eGridRoot=Ui,this.eBodyViewport=Ui,this.eStickyTop=Ui,this.eStickyBottom=Ui,this.eTop=Ui,this.eBottom=Ui,this.eBody=Ui}postConstruct(){const{overlays:t,rangeSvc:e}=this.beans,i=t?.getOverlayWrapperSelector(),{paramsMap:s,elementParams:o}=function(t){const e={};return{paramsMap:e,elementParams:{tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:uh(e,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:uh(e,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:uh(e,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:uh(e,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:uh(e,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},t?{tag:"ag-overlay-wrapper"}:null]}}}(!!i);this.setTemplate(o,[...i?[i]:[],Hl,Nl,lh,ch],s);const n=(t,e)=>{const i=`${t}px`;e.style.minHeight=i,e.style.height=i},r={setRowAnimationCssOnBodyViewport:(t,e)=>this.setRowAnimationCssOnBodyViewport(t,e),setColumnCount:t=>{v(this.getGui(),"colcount",t)},setRowCount:t=>{v(this.getGui(),"rowcount",t)},setTopHeight:t=>n(t,this.eTop),setBottomHeight:t=>n(t,this.eBottom),setTopInvisible:t=>this.eTop.classList.toggle("ag-invisible",t),setBottomInvisible:t=>this.eBottom.classList.toggle("ag-invisible",t),setStickyTopHeight:t=>this.eStickyTop.style.height=t,setStickyTopTop:t=>this.eStickyTop.style.top=t,setStickyTopWidth:t=>this.eStickyTop.style.width=t,setStickyBottomHeight:t=>{this.eStickyBottom.style.height=t,this.eStickyBottom.classList.toggle("ag-invisible","0px"===t)},setStickyBottomBottom:t=>this.eStickyBottom.style.bottom=t,setStickyBottomWidth:t=>this.eStickyBottom.style.width=t,setColumnMovingCss:(t,e)=>this.toggleCss(t,e),updateLayoutClasses:(t,e)=>{const i=[this.eBodyViewport.classList,this.eBody.classList];for(const t of i)t.toggle(Wr.AUTO_HEIGHT,e.autoHeight),t.toggle(Wr.NORMAL,e.normal),t.toggle(Wr.PRINT,e.print);this.toggleCss(Wr.AUTO_HEIGHT,e.autoHeight),this.toggleCss(Wr.NORMAL,e.normal),this.toggleCss(Wr.PRINT,e.print)},setAlwaysVerticalScrollClass:(t,e)=>this.eBodyViewport.classList.toggle(Ml,e),registerBodyViewportResizeListener:t=>{const e=at(this.beans,this.eBodyViewport,t);this.addDestroyFunc((()=>e()))},setPinnedTopBottomOverflowY:t=>this.eTop.style.overflowY=this.eBottom.style.overflowY=t,setCellSelectableCss:(t,e)=>{for(const i of[this.eTop,this.eBodyViewport,this.eBottom])i.classList.toggle(t,e)},setBodyViewportWidth:t=>this.eBodyViewport.style.width=t,setGridRootRole:t=>y(this.eGridRoot,t)};this.ctrl=this.createManagedBean(new Tl),this.ctrl.setComp(r,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(e&&ze(this.gos)||je(this.gos))&&v(this.getGui(),"multiselectable",!0)}setRowAnimationCssOnBodyViewport(t,e){const i=this.eBodyViewport.classList;i.toggle("ag-row-animation",e),i.toggle("ag-row-no-animation",!e)}}},gh=class extends Dt{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(t,e,i){this.view=t,this.eGridHostDiv=e,this.eGui=i,this.eGui.setAttribute("grid-id",this.beans.context.getId());const{dragAndDrop:s,ctrlsSvc:o}=this.beans;s?.registerGridDropTarget((()=>this.eGui),this),this.createManagedBean(new Ur(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const n=at(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc((()=>n())),o.register("gridCtrl",this)}isDetailGrid(){const t=ko(this.getGui());return t?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const t=this.beans;return{paginationSelector:t.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:t.registry?.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:t.sideBar?.getSelector(),statusBarSelector:t.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:t.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(t){const{view:e}=this;e.setCursor(!1===t?null:1===t?"ew-resize":"ns-resize")}disableUserSelect(t){this.view.setUserSelect(t?"none":null)}focusNextInnerContainer(t){const e=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:s}=this.getNextFocusableIndex(e,t);if(s<0||s>=e.length)return!1;if(0===s){if(i>0){const{visibleCols:t,focusSvc:e}=this.beans,i=hi(t.allCols);if(e.focusGridView({column:i,backwards:!0}))return!0}return!1}return this.focusContainer(e[s],t)}focusInnerElement(t){const e=this.gos.getCallback("focusGridInnerElement");if(e?.({fromBottom:!!t}))return!0;const i=this.getFocusableContainers(),{focusSvc:s,visibleCols:o}=this.beans,n=o.allCols;if(t){if(i.length>1)return this.focusContainer(hi(i),t);const e=hi(n);if(s.focusGridView({column:e,backwards:t}))return!0}if(0===this.gos.get("headerHeight")||Vl(this.beans)){if(s.focusGridView({column:n[0],backwards:t}))return!0;for(let e=1;e<i.length;e++)if(Ro(i[e].getGui(),t))return!0;return!1}return s.focusFirstHeader()}forceFocusOutOfContainer(t=!1){this.view.forceFocusOutOfContainer(t)}addFocusableContainer(t){this.additionalFocusableContainers.add(t)}removeFocusableContainer(t){this.additionalFocusableContainers.delete(t)}allowFocusForNextCoreContainer(t){const e=this.view.getFocusableContainers(),{nextIndex:i,indexWithFocus:s}=this.getNextFocusableIndex(e,t);if(-1===s||i<0||i>=e.length)return;const o=e[i];o.setAllowFocus?.(!0),setTimeout((()=>{o.setAllowFocus?.(!1)}))}isFocusable(){const t=this.beans;return!Ll(t)||!Vl(t)||!!t.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(t,e){const i=d(this.beans),s=t.findIndex((t=>t.getGui().contains(i)));return{indexWithFocus:s,nextIndex:s+(e?-1:1)}}focusContainer(t,e){t.setAllowFocus?.(!0);const i=Ro(t.getGui(),e,!1,!0);return t.setAllowFocus?.(!1),i}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},ph=class extends Za{constructor(t){super(),this.gridBody=Ui,this.sideBar=Ui,this.pagination=Ui,this.rootWrapperBody=Ui,this.eGridDiv=t}postConstruct(){const t={destroyGridUi:()=>this.destroyBean(this),setRtlClass:t=>this.addCss(t),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:t=>{this.getGui().style.userSelect=null!=t?t:"",this.getGui().style.webkitUserSelect=null!=t?t:""},setCursor:t=>{this.getGui().style.cursor=null!=t?t:""}},e=this.createManagedBean(new gh),i=e.getOptionalSelectors(),s=this.createTemplate(i),o=[dh,...Object.values(i).filter((t=>!!t))];this.setTemplate(s,o),e.setComp(t,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:t=>e.focusInnerElement(t),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!e.isFocusable()})}insertGridIntoDom(){const t=this.getGui();this.eGridDiv.appendChild(t),this.addDestroyFunc((()=>{t.remove(),Ut(this.gos,"Grid removed from DOM")}))}updateLayoutClasses(t,e){const i=this.rootWrapperBody.classList,{AUTO_HEIGHT:s,NORMAL:o,PRINT:n}=Wr,{autoHeight:r,normal:l,print:a}=e;i.toggle(s,r),i.toggle(o,l),i.toggle(n,a),this.toggleCss(s,r),this.toggleCss(o,l),this.toggleCss(n,a)}createTemplate(t){return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},t.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null]},t.statusBarSelector?{tag:"ag-status-bar"}:null,t.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null,t.watermarkSelector?{tag:"ag-watermark"}:null]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(t=!1){t||!this.pagination?.isDisplayed()?super.forceFocusOutOfContainer(t):this.pagination.forceFocusOutOfContainer(t)}getFocusableContainers(){const t=[this.gridBody];for(const e of[this.sideBar,this.pagination])e&&t.push(e);return t.filter((t=>Z(t.getGui())))}},fh=(t,e)=>{for(const i of Object.keys(e))e[i]=t;return e},mh={dispatchEvent:"CommunityCore",...fh("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...fh("GridState",{getState:0,setState:0}),...fh("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...fh("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...fh("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...fh("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...fh("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...fh("ValueCache",{expireValueCache:0}),...fh("CellApi",{getCellValue:0}),...fh("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...fh("Sort",{onSortChanged:0}),...fh("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...fh("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...fh("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...fh("HighlightChanges",{flashCells:0}),...fh("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...fh("ColumnApi",{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...fh("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...fh("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...fh("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...fh("ColumnResize",{setColumnWidths:0}),...fh("ColumnHover",{isColumnHovered:0}),...fh("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...fh("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...fh("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...fh("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...fh("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...fh("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...fh("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...fh("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...fh("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0}),...fh("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...fh("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...fh("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...fh("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...fh("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...fh("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...fh("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...fh("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...fh("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...fh("ContextMenu",{showContextMenu:0}),...fh("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...fh("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...fh("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...fh("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...fh("SharedPivot",{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...fh("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...fh("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...fh("StatusBar",{getStatusPanel:0}),...fh("AiToolkit",{getStructuredSchema:0})},wh={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},vh=(t,e)=>t.eventSvc.dispatchEvent(e),Ch=class{};function bh(t,e){t.gos.updateGridOptions({options:e})}Reflect.defineProperty(Ch,"name",{value:"GridApi"});var yh={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},Sh={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},xh=class extends _i{constructor(t,e,i,s,o,n=!1){super(),this.cellValueFn=t,this.rowNode=e,this.column=i,this.customGui=s,this.dragStartPixels=o,this.alwaysVisible=n,this.dragSource=null}isCustomGui(){return null!=this.customGui}postConstruct(){const{beans:t,customGui:e}=this;e?this.setDragElement(e,this.dragStartPixels):(this.setTemplate(Sh),this.getGui().appendChild(Ca("rowDrag",t,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){const{beans:t,gos:e,rowNode:i}=this,s=this.refreshVisibility.bind(this);this.addManagedPropertyListener("suppressRowDrag",s),this.addManagedListeners(i,{dataChanged:s,cellChanged:s}),this.addManagedListeners(t.eventSvc,e.get("rowDragManaged")?{sortChanged:s,filterChanged:s,columnRowGroupChanged:s,newColumnsLoaded:s}:{newColumnsLoaded:s})}setDragElement(t,e){this.setTemplateFromElement(t,void 0,void 0,!0),this.addDragSource(e)}refreshVisibility(){if(this.alwaysVisible)return;const t={skipAriaHidden:!0};if(this.isNeverDisplayed())return void this.setDisplayed(!1,t);const e=this.column;let i="function"==typeof e?.getColDef().rowDrag,s=!e||this.isCustomGui()||e.isRowDrag(this.rowNode);s&&this.rowNode.footer&&this.gos.get("rowDragManaged")&&(s=!1,i=!0),this.setDisplayed(i||s,t),this.setVisible(s,t)}isNeverDisplayed(){const{gos:t,beans:e}=this;return!!t.get("suppressRowDrag")||!(!t.get("rowDragManaged")||!e.rowDragSvc.rowDragFeature?.shouldPreventRowMove()||e.dragAndDrop?.hasExternalDropZones())}getSelectedNodes(){const t=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[t];const e=this.beans.selectionSvc?.getSelectedNodes()??[];return-1!==e.indexOf(t)?e:[t]}getDragItem(){const{column:t,rowNode:e}=this;return{rowNode:e,rowNodes:this.getSelectedNodes(),columns:t?[t]:void 0,defaultTextValue:this.cellValueFn()}}getRowDragText(t){if(t){const e=t.getColDef();if(e.rowDragText)return e.rowDragText}return this.gos.get("rowDragText")}addDragSource(t=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;const e=this.getGui();this.gos.get("enableCellTextSelection")&&(this.removeMouseDownListener(),this.mouseDownListener=this.addManagedElementListeners(e,{mousedown:t=>{t?.preventDefault()}})[0]);const i=this.getLocaleTextFunc();this.dragSource={type:2,eElement:e,dragItemName:t=>{const e=t?.dragItem||this.getDragItem(),s=(t?.dropTarget?.rows.length??e.rowNodes?.length)||1,o=this.getRowDragText(this.column);return o?o(e,s):1===s?this.cellValueFn():`${s} ${i("rowDragRows","rows")}`},getDragItem:()=>this.getDragItem(),dragStartPixels:t,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop.removeDragSource(this.dragSource),this.dragSource=null)}removeMouseDownListener(){this.mouseDownListener&&(this.mouseDownListener(),this.mouseDownListener=void 0)}},Rh=class{constructor(){this.reordered=!1,this.removals=new Set,this.updates=new Set,this.adds=new Set}};function Fh(t,e){return t.column===e.column&&t.rowPinned===e.rowPinned&&t.rowIndex===e.rowIndex}function kh(t,e){switch(e.rowPinned){case"top":return t.pinnedRowModel?.getPinnedTopRow(e.rowIndex);case"bottom":return t.pinnedRowModel?.getPinnedBottomRow(e.rowIndex);default:return t.rowModel.getRow(e.rowIndex)}}function Ph(t,e){const i=t.spannedRowRenderer?.getCellByPosition(e);if(i)return i;const s=t.rowRenderer.getRowByPosition(e);return s?s.getCellCtrl(e.column):null}function Dh(t,e,i=!1){const{rowIndex:s,rowPinned:o}=e,{pageBounds:n,pinnedRowModel:r,rowModel:l}=t;return 0===s?"top"===o?null:"bottom"===o&&l.isRowsToRender()?{rowIndex:n.getLastRow(),rowPinned:null}:r?.isRowsToRender("top")?{rowIndex:r.getPinnedTopRowCount()-1,rowPinned:"top"}:null:i?Th(t,o?void 0:l.getRow(s),!0)??{rowIndex:s-1,rowPinned:o}:{rowIndex:s-1,rowPinned:o}}function Mh(t,e,i=!1){const{rowIndex:s,rowPinned:o}=e,{pageBounds:n,pinnedRowModel:r,rowModel:l}=t;return function(t,e){const{rowPinned:i,rowIndex:s}=e,{pinnedRowModel:o,pageBounds:n}=t;if("top"===i)return(o?.getPinnedTopRowCount()??0)-1<=s;if("bottom"===i)return(o?.getPinnedBottomRowCount()??0)-1<=s;return n.getLastRow()<=s}(t,e)?"bottom"===o?null:"top"===o&&l.isRowsToRender()?{rowIndex:n.getFirstRow(),rowPinned:null}:r?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null:i?Th(t,o?void 0:l.getRow(s))??{rowIndex:s+1,rowPinned:o}:{rowIndex:s+1,rowPinned:o}}function Th(t,e,i=!1){const{gos:s,rowRenderer:o}=t;if(!e?.sticky||!Te(s))return;const n=o.getStickyTopRowCtrls(),r=o.getStickyBottomRowCtrls(),l=!r.some((t=>t.rowNode.rowIndex===e.rowIndex)),a=l?n:r,h=(i?-1:1)*(l?-1:1);let c;for(let t=0;t<a.length;t++)if(a[t].rowNode.rowIndex===e.rowIndex){c=a[t+h];break}return c?{rowIndex:c.rowNode.rowIndex,rowPinned:null}:void 0}var Eh=class{constructor(t,e){this.active=!0,this.nodeIdsToColumns={},this.mapToItems={},this.keepingColumns=t,this.pathRoot={rowNode:e,children:null},this.mapToItems[e.id]=this.pathRoot}depthFirstSearchChangedPath(t,e){const{rowNode:i,children:s}=t;if(s)for(let t=0;t<s.length;++t)this.depthFirstSearchChangedPath(s[t],e);e(i)}depthFirstSearchEverything(t,e,i){const s=t.childrenAfterGroup;if(s)for(let t=0,o=s.length;t<o;++t){const o=s[t];o.childrenAfterGroup?this.depthFirstSearchEverything(o,e,i):i&&e(o)}e(t)}forEachChangedNodeDepthFirst(t,e=!1,i=!1){this.active&&!i?this.depthFirstSearchChangedPath(this.pathRoot,t):this.depthFirstSearchEverything(this.pathRoot.rowNode,t,e)}executeFromRootNode(t){t(this.pathRoot.rowNode)}createPathItems(t){let e=t,i=0;for(;!this.mapToItems[e.id];)this.mapToItems[e.id]={rowNode:e,children:null},i++,e=e.parent;return i}populateColumnsMap(t,e){if(!this.keepingColumns||!e)return;let i=t;for(;i;){this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={});for(const t of e)this.nodeIdsToColumns[i.id][t.getId()]=!0;i=i.parent}}linkPathItems(t,e){let i=t;for(let t=0;t<e;t++){const t=this.mapToItems[i.id],e=this.mapToItems[i.parent.id];e.children||(e.children=[]),e.children.push(t),i=i.parent}}addParentNode(t,e){if(!t||t.isRowPinned())return;const i=this.createPathItems(t);this.linkPathItems(t,i),this.populateColumnsMap(t,e)}canSkip(t){return this.active&&!this.mapToItems[t.id]}getValueColumnsForNode(t,e){if(!this.keepingColumns)return e;const i=this.nodeIdsToColumns[t.id];return e.filter((t=>i[t.getId()]))}getNotValueColumnsForNode(t,e){if(!this.keepingColumns)return null;const i=this.nodeIdsToColumns[t.id];return e.filter((t=>!i[t.getId()]))}},Ah=class{constructor(t,e){this.beans=t,this.groupThrottled=!1,this.scrollChanged=!1,this.scrollChanging=!1,this.oldVScroll=null,this.groupTimer=null,this.groupTarget=null,this.onGroupThrottle=()=>{this.groupTimer=null,this.groupThrottled=!0,this.beans.dragAndDrop?.nudge()};const i=()=>e.scrollFeature.getVScrollPosition().top;this.autoScroll=new Ya({scrollContainer:e.eBodyViewport,scrollAxis:"y",getVerticalPosition:i,setVerticalPosition:t=>e.scrollFeature.setVerticalScrollPosition(t),onScrollCallback:()=>{const t=i();if(this.oldVScroll!==t)return this.oldVScroll=t,void(this.scrollChanging=!0);const e=this.scrollChanging;this.scrollChanged=e,this.scrollChanging=!1,e&&(this.beans.dragAndDrop?.nudge(),this.scrollChanged=!1)}})}updateGroup(t,e){this.groupTarget&&this.groupTarget!==t&&this.clearGroup(),t&&(e&&this.groupThrottled&&!t.expanded&&t.childrenAfterSort?.length&&t.isExpandable()&&t.setExpanded(!0,void 0,!0),t.expanded&&t.childrenAfterSort?.length&&(this.groupThrottled=!0,this.groupTarget=t))}startGroup(t){this.groupTarget=t,null===this.groupTimer&&(this.groupTimer=window.setTimeout(this.onGroupThrottle,this.beans.gos.get("rowDragInsertDelay")))}clearGroup(){this.groupThrottled=!1,this.groupTarget=null;const t=this.groupTimer;null!==t&&(this.groupTimer=null,window.clearTimeout(t))}clear(){this.clearGroup(),this.autoScroll.ensureCleared(),this.oldVScroll=null,this.scrollChanged=!1,this.scrollChanging=!1}},Ih=class extends Dt{constructor(t){super(),this.eContainer=t,this.lastDraggingEvent=null,this.nudger=null}postConstruct(){const t=this.beans;t.ctrlsSvc.whenReady(this,(e=>{this.nudger=new Ah(t,e.gridBodyCtrl)}))}destroy(){super.destroy(),this.nudger?.clear(),this.nudger=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(t){return 2===t}getIconName(t){return!1===t?.dropTarget?.allowed||this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){const{rowGroupColsSvc:t,filterManager:e,sortSvc:i}=this.beans;if((t?.columns??[]).length)return!0;const s=e?.isAnyFilterPresent();if(s)return!0;const o=i?.isSortActive();return!!o}getRowNodes(t){if(!this.isFromThisGrid(t))return t.dragItem.rowNodes||[];const e=t.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const t=this.beans.selectionSvc?.getSelectedNodes();if(t&&t.indexOf(e)>=0)return t.slice().sort(Lh)}return[e]}onDragEnter(t){this.dragging(t,!0)}onDragging(t){this.dragging(t,!1)}dragging(t,e){const{lastDraggingEvent:i,beans:s}=this;if(e){const e=this.getRowNodes(t);t.dragItem.rowNodes=e,zh(e,!0)}this.lastDraggingEvent=t;const o=t.fromNudge,n=this.makeRowsDrop(i,t,o,!1);s.rowDropHighlightSvc?.fromDrag(t),e&&this.dispatchGridEvent("rowDragEnter",t),this.dispatchGridEvent("rowDragMove",t),n?.rowDragManaged&&n.moved&&n.allowed&&n.sameGrid&&!n.suppressMoveWhenRowDragging&&(!o&&!this.nudger?.autoScroll.scrolling||this.nudger?.scrollChanged)&&this.dropRows(n),this.nudger?.autoScroll.check(t.event)}isFromThisGrid(t){return t.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(t,e,i,s){const{beans:o,gos:n}=this,r=this.newRowsDrop(e,s),l=o.rowModel;if(e.dropTarget=r,e.changed=!1,!r)return null;let{sameGrid:a,rootNode:h,source:c,target:u,rows:d}=r;u??(u=l.getRow(l.getRowCount()-1)??null);const g=!!this.beans.groupStage?.treeData&&a;let p=null;if(u?.footer){const t=Hh(l,-1,u)??Hh(l,1,u);p=u.sibling??h,u=t??null}u?.detail&&(u=u.parent),r.moved&&(r.moved=c!==u);let f=.5;if(u&&(f=a&&r.moved&&(p||!g)?c.rowIndex>u.rowIndex?-.5:.5:(r.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!g&&a&&u&&r.moved&&Ce(n)){const t=$h(l,r);t&&(f=c.rowIndex>t.rowIndex?-.5:.5,u=t,r.moved&&(r.moved=c!==u))}const m=this.nudger;m?.updateGroup(u,i),g&&!p&&m&&(!u||f>=.5&&u.rowIndex===o.pageBounds.getLastRow()?p=h:r.moved&&this.targetShouldBeParent(u,f,d)&&(m.groupThrottled&&(p=u),i||p&&(!u||u.expanded||!u.childrenAfterSort?.length)||m.startGroup(u)),p??(p=u?.parent??h));let w=!1;if(p){if(p===u&&p!==h){const t=p.expanded?Hh(l,1,u):null;t?.parent===p?(u=t,f=-.5):w=!0}if(u&&!w){let t=u;for(;t&&t!==h&&t!==p;)u=t,t=t.parent}}r.target=u,r.newParent=p,r.moved&&(r.moved=c!==u);const v=f<0?"above":"below";return r.position=r.moved?w?"inside":v:"none",this.validateRowsDrop(r,g,v,s),e.changed||(e.changed=Vh(t?.dropTarget,r)),r}newRowsDrop(t,e){const{beans:i,gos:s}=this,o=i.rowModel.rootNode,n=!!Ce(s)&&s.get("rowDragManaged"),r=s.get("suppressMoveWhenRowDragging"),l=this.isFromThisGrid(t);let{rowNode:a,rowNodes:h}=t.dragItem;if(h||(h=a?[a]:[]),a||(a=h[0]),!a||!o)return null;const c=this.beans.dragAndDrop.isDropZoneWithinThisGrid(t);let u=!0;!n||h.length&&!this.shouldPreventRowMove()&&(!r&&l||c)||(u=!1);const d=El(i,t).y,g=this.getOverNode(d);return{api:i.gridApi,context:i.gridOptions.context,draggingEvent:t,rowDragManaged:n,suppressMoveWhenRowDragging:r,sameGrid:l,withinGrid:c,rootNode:o,moved:a!==g,y:d,overNode:g,overIndex:g?.rowIndex??-1,position:"none",source:a,target:g??null,newParent:null,rows:h,allowed:u,highlight:!e&&n&&r&&(c||!l)}}validateRowsDrop(t,e,i,s){const{rowDragManaged:o,suppressMoveWhenRowDragging:n}=t;e||(t.newParent=null),n&&!t.moved&&(t.allowed=!1);const r=(!o||t.allowed)&&this.gos.get("isRowValidDropPosition");if(r){e&&t.newParent&&Nh(t.rows,t.newParent)&&(t.newParent=null);const i=r(t);if(i){if("object"==typeof i){void 0!==i.rows&&(t.rows=i.rows??[]),e&&void 0!==i.newParent&&(t.newParent=i.newParent),void 0!==i.target&&(t.target=i.target),i.position&&(t.position=i.position),void 0!==i.allowed?t.allowed=i.allowed:o||(t.allowed=!0);const n=t.draggingEvent;i.changed&&n&&(n.changed=!0),s||void 0===i.highlight||(t.highlight=i.highlight)}}else t.allowed=!1}o&&(t.rows=this.filterRows(t)),e&&t.newParent&&Nh(t.rows,t.newParent)&&(t.newParent=null),!n||t.rows.length&&"none"!==t.position||(t.allowed=!1),t.allowed&&t.newParent||"inside"!==t.position||(t.position=i)}targetShouldBeParent(t,e,i){if(e<-.25)return!1;if(e<.25)return!0;let s,o=t.rowIndex+1;const n=this.beans.rowModel;do{s=n.getRow(o++)}while(s?.footer);const r=t.childrenAfterGroup;if(s&&s.parent===t&&r?.length){const t=new Set(i);for(const e of r)if(null!==e.rowIndex&&!t.has(e))return!0}return!1}addRowDropZone(t){if(!t.getContainer())return void pe(55);const e=this.beans.dragAndDrop;if(e.findExternalZone(t.getContainer()))return void pe(56);const i={isInterestedIn:t=>2===t,getIconName:()=>"move",external:!0,...t.fromGrid?t:{getContainer:t.getContainer,onDragEnter:t.onDragEnter&&(e=>t.onDragEnter(this.rowDragEvent("rowDragEnter",e))),onDragLeave:t.onDragLeave&&(e=>t.onDragLeave(this.rowDragEvent("rowDragLeave",e))),onDragging:t.onDragging&&(e=>t.onDragging(this.rowDragEvent("rowDragMove",e))),onDragStop:t.onDragStop&&(e=>t.onDragStop(this.rowDragEvent("rowDragEnd",e))),onDragCancel:t.onDragCancel&&(e=>t.onDragCancel(this.rowDragEvent("rowDragCancel",e)))}};e.addDropTarget(i),this.addDestroyFunc((()=>e.removeDropTarget(i)))}getRowDropZone(t){return{getContainer:this.getContainer.bind(this),onDragEnter:e=>{this.onDragEnter(e),t?.onDragEnter?.(this.rowDragEvent("rowDragEnter",e))},onDragLeave:e=>{this.onDragLeave(e),t?.onDragLeave?.(this.rowDragEvent("rowDragLeave",e))},onDragging:e=>{this.onDragging(e),t?.onDragging?.(this.rowDragEvent("rowDragMove",e))},onDragStop:e=>{this.onDragStop(e),t?.onDragStop?.(this.rowDragEvent("rowDragEnd",e))},onDragCancel:e=>{this.onDragCancel(e),t?.onDragCancel?.(this.rowDragEvent("rowDragCancel",e))},fromGrid:!0}}getOverNode(t){const{pageBounds:e,rowModel:i}=this.beans,s=t>e.getCurrentPagePixelRange().pageLastPixel?-1:i.getRowIndexAtPixel(t);return s>=0?i.getRow(s):void 0}rowDragEvent(t,e){const i=this.beans,{dragItem:s,dropTarget:o,event:n,vDirection:r}=e,l=o?.rootNode===i.rowModel.rootNode,a=l?o.y:El(i,e).y,h=l?o.overNode:this.getOverNode(a);return{api:i.gridApi,context:i.gridOptions.context,type:t,event:n,node:s.rowNode,nodes:s.rowNodes,overIndex:l?o.overIndex:h?.rowIndex??-1,overNode:h,y:a,vDirection:r,rowsDrop:o}}dispatchGridEvent(t,e){const i=this.rowDragEvent(t,e);this.eventSvc.dispatchEvent(i)}onDragLeave(t){this.dispatchGridEvent("rowDragLeave",t),this.stopDragging(t)}onDragStop(t){const e=this.makeRowsDrop(this.lastDraggingEvent,t,!1,!0);this.dispatchGridEvent("rowDragEnd",t),e?.allowed&&e.rowDragManaged&&(e.suppressMoveWhenRowDragging||!e.sameGrid||this.nudger?.autoScroll.scrolling)&&this.dropRows(e),this.stopDragging(t)}onDragCancel(t){this.dispatchGridEvent("rowDragCancel",t),this.stopDragging(t)}stopDragging(t){this.nudger?.clear(),this.beans.rowDropHighlightSvc?.fromDrag(null),zh(t.dragItem.rowNodes,!1)}dropRows(t){return t.sameGrid?this.csrmMoveRows(t):this.csrmAddRows(t)}csrmAddRows({position:t,target:e,rows:i}){const s=Ne(this.gos),o=this.beans.rowModel,n=i.filter((({data:t,rowPinned:e})=>!o.getRowNode(s?.({data:t,level:0,rowPinned:e})??t.id))).map((({data:t})=>t));if(0===n.length)return!1;const r=e?Bh(e)+("above"===t?0:1):void 0;return o.updateRowData({add:n,addIndex:r}),!0}filterRows({newParent:t,rows:e}){let i;for(let s=0,o=e.length;s<o;++s){let o=!0;const n=e[s];(!n||n.footer||null===n.rowTop&&n!==this.beans.rowModel.getRowNode(n.id)||t&&n.parent!==t&&Oh(n,t)||!Gh(n))&&(o=!1),o?i?.push(n):i??(i=e.slice(0,s))}return i??e}csrmMoveRows({position:t,target:e,rows:i,newParent:s,rootNode:o}){let n=!1;const r=new Set;for(const t of i){s&&t.parent!==s&&(t.treeParent=s,n=!0);const e=Gh(t);e&&r.add(e)}if(!n&&0===r.size)return!1;const l=this.beans.focusSvc,a=l.getFocusedCell(),h=a&&Ph(this.beans,a);if(r.size&&this.reorderLeafChildren(r,...this.getMoveRowsBounds(r,e,"above"===t))&&(n=!0),!n)return!1;const c=this.beans.rowModel,u=new Rh;return u.reordered=!0,c.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedPath:new Eh(!1,o),changedRowNodes:u}),h?h.focusCell():l.clearFocusedCell(),!0}getMoveRowsBounds(t,e,i){const s=this.beans.rowModel.rootNode?._leafs?.length??0;let o=e?Bh(e):-1;o<0||o>=s?o=s:i||++o;let n=o,r=Math.min(o,s-1);for(const e of t){const t=e.sourceRowIndex;t<n&&(n=t),t>r&&(r=t)}return[n,o,r]}reorderLeafChildren(t,e,i,s){let o=!1;const n=this.beans.rowModel.rootNode?._leafs;if(!t.size||!n)return!1;let r=e;for(let s=e;s<i;++s){const e=n[s];t.has(e)||(e.sourceRowIndex!==r&&(e.sourceRowIndex=r,n[r]=e,o=!0),++r)}let l=s;for(let e=s;e>=i;--e){const i=n[e];t.has(i)||(i.sourceRowIndex!==l&&(i.sourceRowIndex=l,n[l]=i,o=!0),--l)}for(const e of t)e.sourceRowIndex!==r&&(e.sourceRowIndex=r,n[r]=e,o=!0),++r;return o}},Hh=(t,e,i)=>{if(i){const s=t.getRowCount();let o=i.rowIndex+e;for(;o>=0&&o<s;){const i=t.getRow(o);if(!i||!i.footer&&!i.detail)return i;o+=e}}},Oh=(t,e)=>{let i=e;for(;i;){if(i===t)return!0;i=i.parent}return!1},Nh=(t,e)=>{for(let i=0,s=t.length;i<s;++i)if(t[i].parent!==e)return!1;return!0},Bh=t=>{const e=Gh(t);return void 0!==e?e.sourceRowIndex:-1},Gh=t=>t.data?t:ar(t.childrenAfterGroup),Vh=(t,e)=>!(t===e||t&&t.sameGrid===e.sameGrid&&t.allowed===e.allowed&&t.position===e.position&&t.target===e.target&&t.source===e.source&&t.newParent===e.newParent&&ci(t.rows,e.rows)),Lh=({rowIndex:t},{rowIndex:e})=>null!==t&&null!==e?t-e:0,zh=(t,e)=>{for(let i=0,s=t?.length||0;i<s;++i){const s=t[i];s.dragging!==e&&(s.dragging=e,s.dispatchRowEvent("draggingChanged"))}},$h=(t,e)=>{let i=null,s=e.target;if(s&&e.rows.indexOf(s)<0)return null;const o=e.source;if(!s||!o)return null;let n=s.rowIndex-o.rowIndex;const r=n<0?-1:1;n=e.suppressMoveWhenRowDragging?Math.abs(n):1;const l=new Set(e.rows);do{const e=Hh(t,r,s);if(!e)break;l.has(e)||(i=e,--n),s=e}while(n>0);return i},Wh={moduleName:"Drag",version:se,beans:[class extends qn{shouldPreventMouseEvent(t){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(t)}}]},Uh={moduleName:"DragAndDrop",version:se,dynamicBeans:{dndSourceComp:class extends _i{constructor(t,e,i){super(yh),this.rowNode=t,this.column=e,this.eCell=i}postConstruct(){this.getGui().appendChild(Ca("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",(t=>{t.stopPropagation()})),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(t){const{rowNode:e,column:i,eCell:s,gos:o}=this,n=i.getColDef().dndSourceOnRowDrag,r=t.dataTransfer;if(r.setDragImage(s,0,0),n)n(Qe(o,{rowNode:e,dragEvent:t}));else try{const t=JSON.stringify(e.data);r.setData("application/json",t),r.setData("text/plain",t)}catch(t){}}checkVisibility(){const t=this.column.isDndSource(this.rowNode);this.setDisplayed(t)}}},icons:{rowDrag:"grip"}},jh={moduleName:"SharedDragAndDrop",version:se,beans:[class extends Qn{createEvent(t){return Qe(this.gos,t)}createDragImageComp(t){const{gos:e,beans:i}=this,s=(o=i.userCompFactory,n=Qe(e,{dragSource:t}),o.getCompDetailsFromGridOptions(ts,"agDragAndDropImage",n,!0));var o,n;return s?.newAgStackInstance()}handleEnter(t,e){t?.onGridEnter?.(e)}handleExit(t,e){t?.onGridExit?.(e)}warnNoBody(){pe(54)}isDropZoneWithinThisGrid(t){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(t.dropZoneTarget)}registerGridDropTarget(t,e){const i={getContainer:t,isInterestedIn:t=>1===t||0===t,getIconName:()=>"notAllowed"};this.addDropTarget(i),e.addDestroyFunc((()=>this.removeDropTarget(i)))}}],dependsOn:[Wh],userComponents:{agDragAndDropImage:class extends _i{constructor(){super(),this.dragSource=null,this.eIcon=Ui,this.eLabel=Ui,this.eGhost=Ui,this.registerCSS(".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}")}postConstruct(){const t=t=>function(t,e){const i=Ca(t,e,null);if(i){const{className:t}=i;if("string"==typeof t&&t.includes("ag-icon")||"object"==typeof t&&t["ag-icon"])return i}const s=mr({tag:"span"});return s.appendChild(i),s}(t,this.beans);this.dropIconMap={pinned:t("columnMovePin"),hide:t("columnMoveHide"),move:t("columnMoveMove"),left:t("columnMoveLeft"),right:t("columnMoveRight"),group:t("columnMoveGroup"),aggregate:t("columnMoveValue"),pivot:t("columnMovePivot"),notAllowed:t("dropNotAllowed")}}init(t){this.dragSource=t.dragSource,this.setTemplate(ba),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(t,e){const{eGhost:i,eIcon:s,dragSource:o,dropIconMap:n,gos:r}=this;j(s);let l=null;t||(t=o?.getDefaultIconName?o.getDefaultIconName():"notAllowed"),l=n[t],i.classList.toggle("ag-dnd-ghost-not-allowed","notAllowed"===t),s.classList.toggle("ag-shake-left-to-right",e),l===n.hide&&r.get("suppressDragLeaveHidesColumns")||l&&s.appendChild(l)}setLabel(t){this.eLabel.textContent=t}}},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},Kh={moduleName:"RowDrag",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){const t=this.row,e=this.dragging;t&&null!==t?.rowIndex&&"none"!==this.position?this.set(t,this.position):this.clear(),this.dragging=e}destroy(){this.clear(),super.destroy()}clear(){const t=this.row;this.dragging=!1,t&&(this.uiLevel=0,this.position="none",this.row=null,t.dispatchRowEvent("rowHighlightChanged"))}set(t,e){const i=t!==this.row,s=t.uiLevel,o=e!==this.position,n=s!==this.uiLevel;this.dragging=!1,(i||o||n)&&(i&&this.clear(),this.uiLevel=s,this.position=e,this.row=t,t.dispatchRowEvent("rowHighlightChanged"))}fromDrag(t){const e=t?.dropTarget;if(e){const{highlight:t,target:i,position:s}=e;if(t&&i&&"none"!==s)return this.set(i,s),void(this.dragging=!0)}this.dragging&&this.clear()}},class extends Dt{constructor(){super(...arguments),this.beanName="rowDragSvc"}setupRowDrag(t,e){const i=e.createManagedBean(new Ih(t)),s=this.beans.dragAndDrop;s.addDropTarget(i),e.addDestroyFunc((()=>s.removeDropTarget(i))),this.rowDragFeature=i}createRowDragComp(t,e,i,s,o,n){return new xh(t,e,i,s,o,n)}createRowDragCompForRow(t,e){if(ze(this.gos))return;const i=this.getLocaleTextFunc();return this.createRowDragComp((()=>`1 ${i("rowDragRow","row")}`),t,void 0,e,void 0,!0)}createRowDragCompForCell(t,e,i,s,o,n){const r=this.gos;if(!r.get("rowDragManaged")||Ce(r)&&!r.get("pagination"))return this.createRowDragComp(i,t,e,s,o,n)}}],apiFunctions:{addRowDropZone:function(t,e){t.rowDragSvc?.rowDragFeature?.addRowDropZone(e)},removeRowDropZone:function(t,e){const i=t.dragAndDrop?.findExternalZone(e.getContainer());i&&t.dragAndDrop?.removeDropTarget(i)},getRowDropZoneParams:function(t,e){return t.rowDragSvc?.rowDragFeature?.getRowDropZone(e)},getRowDropPositionIndicator:function(t){const e=t.rowDropHighlightSvc;return e?{row:e.row,dropIndicatorPosition:e.position}:{row:null,dropIndicatorPosition:"none"}},setRowDropPositionIndicator:function(t,e){const i=t.rowDropHighlightSvc;if(!i)return;const s=e?.row;let o=e?.dropIndicatorPosition;"above"!==o&&"below"!==o&&"inside"!==o&&(o="none");const n=s?.rowIndex;null==n||"none"===o?i.clear():i.set(s,o)}},dependsOn:[jh]},qh={moduleName:"HorizontalResize",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(t){const e={dragStartPixels:t.dragStartPixels||0,eElement:t.eResizeBar,onDragStart:this.onDragStart.bind(this,t),onDragStop:this.onDragStop.bind(this,t),onDragging:this.onDragging.bind(this,t),onDragCancel:this.onDragStop.bind(this,t),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:i}=this.beans;return i.addDragSource(e),()=>i.removeDragSource(e)}onDragStart(t,e){this.dragStartX=e.clientX,this.setResizeIcons();const i=e instanceof MouseEvent&&!0===e.shiftKey;t.onResizeStart(i)}setResizeIcons(){const t=this.beans.ctrlsSvc.get("gridCtrl");t.setResizeCursor(1),t.disableUserSelect(!0)}onDragStop(t){t.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const t=this.beans.ctrlsSvc.get("gridCtrl");t.setResizeCursor(!1),t.disableUserSelect(!1)}onDragging(t,e){this.resizeAmount=e.clientX-this.dragStartX,t.onResizing(this.resizeAmount)}}],dependsOn:[Wh]},Zh=class extends Dt{constructor(t){super(),this.pinned=t,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(t){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const e=t.dragItem.columns;if(e)for(const t of e)t.isPrimary()&&(t.isAnyFunctionActive()||(t.isAllowValue()?this.columnsToAggregate.push(t):t.isAllowRowGroup()?this.columnsToGroup.push(t):t.isAllowPivot()&&this.columnsToPivot.push(t)))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?"pinned":"move":null}onDragLeave(t){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(t){}onDragStop(t){const{valueColsSvc:e,rowGroupColsSvc:i,pivotColsSvc:s}=this.beans;this.columnsToAggregate.length>0&&e?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&i?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&s?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function _h(t){const{isFromHeader:e,fromLeft:i,xPosition:s,fromEnter:o,fakeEvent:n,pinned:r,gos:l,colModel:a,colMoves:h,visibleCols:c}=t;let{allMovingColumns:u}=t;e&&(u=function(t){const e=[...t];for(const i of t){let t=null,s=i.getParent();for(;null!=s&&1===s.getDisplayedLeafColumns().length;)t=s,s=s.getParent();if(null!=t){const i=t.getColGroupDef()?.marryChildren?t.getProvidedColumnGroup().getLeafColumns():t.getLeafColumns();for(const t of i)e.includes(t)||e.push(t)}}return e}(u));const d=u.slice();var g,p;g=a.getCols(),!(p=d)||p.length<=1||p.filter((t=>g.indexOf(t)<0)).length>0||p.sort(((t,e)=>g.indexOf(t)-g.indexOf(e)));const f=function(t){const{movingCols:e,draggingRight:i,xPosition:s,pinned:o,gos:n,colModel:r,visibleCols:l}=t;if(n.get("suppressMovableColumns")||e.some((t=>t.getColDef().suppressMovable)))return[];const a=function(t,e){switch(e){case"left":return t.leftCols;case"right":return t.rightCols;default:return t.centerCols}}(l,o),h=r.getCols(),c=a.filter((t=>e.includes(t))),u=a.filter((t=>!e.includes(t))),d=h.filter((t=>!e.includes(t)));let g,p=0,f=s;if(i){let t=0;for(const e of c)t+=e.getActualWidth();f-=t}if(f>0){for(let t=0;t<u.length&&(f-=u[t].getActualWidth(),!(f<0));t++)p++;i&&p++}p>0?g=d.indexOf(u[p-1])+1:(g=d.indexOf(u[0]),-1===g&&(g=0));const m=[g],w=(t,e)=>t-e;if(i){let t=g+1;const e=h.length-1;for(;t<=e;)m.push(t),t++;m.sort(w)}else{let t=g;const e=h.length-1;let i=h[t];for(;t<=e&&a.indexOf(i)<0;)t++,m.push(t),i=h[t];t=g-1;const s=0;for(;t>=s;)m.push(t),t--;m.sort(w).reverse()}return m}({movingCols:d,draggingRight:i,xPosition:s,pinned:r,gos:l,colModel:a,visibleCols:c}),m=function(t,e){const i=e.getCols(),s=t.map((t=>i.indexOf(t))).sort(((t,e)=>t-e)),o=s[0];return hi(s)-o!=s.length-1?null:o}(d,a);if(0===f.length)return;const w=f[0];if(null!==m&&(e||!o)&&!n){if(!i&&w>=m)return;if(i&&w<=m)return}const v=function(t,e,i,s){const o=s.allCols;let n=null,r=null;for(let s=0;s<t.length;s++){const l=t[s],a=i.getProposedColumnOrder(e,l);if(!i.doesOrderPassRules(a))continue;const h=a.filter((t=>o.includes(t)));if(null===r)r=h;else if(!ci(h,r))break;const c=Qh(a);(null===n||c<n.fragCount)&&(n={move:l,fragCount:c})}return n}(f,d,h,c);if(!v)return;const C=v.move;return C>a.getCols().length-d.length?void 0:{columns:d,toIndex:C}}function Yh(t){const{columns:e,toIndex:i}=_h(t)||{},{finished:s,colMoves:o}=t;return e&&null!=i?(o.moveColumns(e,i,"uiColumnMoved",s),s?null:{columns:e,toIndex:i}):null}function Qh(t){function e(t){const e=[];let i=t.getOriginalParent();for(;null!=i;)e.push(i),i=i.getOriginalParent();return e}let i=0;for(let s=0;s<t.length-1;s++){let o=e(t[s]),n=e(t[s+1]);[o,n]=o.length>n.length?[o,n]:[n,o];for(const t of o)-1===n.indexOf(t)&&i++}return i}function Jh(t){const{pinned:e,fromKeyboard:i,gos:s,ctrlsSvc:o,useHeaderRow:n,skipScrollPadding:r}=t;let l=o.getHeaderRowContainerCtrl(e)?.eViewport,{x:a}=t;return l?(i&&(a-=l.getBoundingClientRect().left),s.get("enableRtl")&&(n&&(l=l.querySelector(".ag-header-row")),a=l.clientWidth-a),null!=e||r||(a+=o.get("center").getCenterViewportScrollLeft()),a):0}function Xh(t,e){for(const i of t)i.moving=e,i.dispatchColEvent("movingChanged","uiColumnMoved")}var tc=class extends Dt{constructor(t){super(),this.pinned=t,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!i(t)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(t=>{this.gridBodyCon=t.gridBodyCtrl}))}getIconName(){const{pinned:t,lastDraggingEvent:e}=this,{dragItem:i}=e||{},s=i?.columns??[];for(const e of s){const s=e.getPinned();if(e.getColDef().lockPinned){if(s==t)return"move";continue}const o=i?.containerType;if(o===t||!t)return"move";if(t&&(!s||o!==t))return"pinned"}return"notAllowed"}onDragEnter(t){const e=t.dragItem,i=e.columns;if(0===t.dragSource.type)this.setColumnsVisible(i,!0,"uiColumnDragged");else{const t=e.visibleState,s=(i||[]).filter((e=>t[e.getId()]&&!e.isVisible()));this.setColumnsVisible(s,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(i,this.pinned),this.onDragging(t,!0,!0)}onDragging(t=this.lastDraggingEvent,e=!1,i=!1,o=!1){const{gos:n,ctrlsSvc:r}=this.beans,l=n.get("suppressMoveWhenColumnDragging");if(o&&!l)return void this.finishColumnMoving();if(this.lastDraggingEvent=t,!t||!o&&s(t.hDirection))return;const a=Jh({x:t.x,pinned:this.pinned,gos:n,ctrlsSvc:r});e||this.checkCenterForScrolling(a),l?this.handleColumnDragWhileSuppressingMovement(t,e,i,a,o):this.handleColumnDragWhileAllowingMovement(t,e,i,a,o)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(t,e,i){if(!t?.length)return;const s=t.filter((t=>!t.getColDef().lockVisible));s.length&&this.beans.colModel.setColsVisible(s,e,i)}finishColumnMoving(){this.clearHighlighted();const t=this.lastMovedInfo;if(!t)return;const{columns:e,toIndex:i}=t;this.beans.colMoves.moveColumns(e,i,"uiColumnMoved",!0)}updateDragItemContainerType(){const{lastDraggingEvent:t}=this;if(this.gos.get("suppressMoveWhenColumnDragging")||!t)return;const e=t.dragItem;e&&(e.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(t,e,i,s,o){const n=this.getAllMovingColumns(t,!0);if(o){const t=this.isAttemptingToPin(n);t&&this.attemptToPinColumns(n,void 0,!0);const{fromLeft:s,xPosition:o}=this.getNormalisedXPositionInfo(n,t)||{};if(null==s||null==o)return void this.finishColumnMoving();this.moveColumnsAfterHighlight({allMovingColumns:n,xPosition:o,fromEnter:e,fakeEvent:i,fromLeft:s})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(t))return;this.highlightHoveredColumn(n,s)}}handleColumnDragWhileAllowingMovement(t,e,i,s,o){const n=this.getAllMovingColumns(t),r="right"===this.normaliseDirection(t.hDirection),l=Yh({...this.getMoveColumnParams({allMovingColumns:n,isFromHeader:1===t.dragSource.type,xPosition:s,fromLeft:r,fromEnter:e,fakeEvent:i}),finished:o});l&&(this.lastMovedInfo=l)}getAllMovingColumns(t,e=!1){const i=t.dragSource.getDragItem();let s=null;return e?(s=i.columnsInSplit,s||(s=i.columns)):s=i.columns,s?s.filter((t=>!t.getColDef().lockPinned||t.getPinned()==this.pinned)):[]}getMoveColumnParams(t){const{allMovingColumns:e,isFromHeader:i,xPosition:s,fromLeft:o,fromEnter:n,fakeEvent:r}=t,{gos:l,colModel:a,colMoves:h,visibleCols:c}=this.beans;return{allMovingColumns:e,isFromHeader:i,fromLeft:o,xPosition:s,pinned:this.pinned,fromEnter:n,fakeEvent:r,gos:l,colModel:a,colMoves:h,visibleCols:c}}highlightHoveredColumn(t,e){const{gos:i,colModel:s}=this.beans,o=i.get("enableRtl"),n=s.getCols().filter((t=>t.isVisible()&&t.getPinned()===this.pinned));let r,l=null,a=null,h=null;for(const t of n){if(a=t.getActualWidth(),l=this.getNormalisedColumnLeft(t,0,o),null!=l&&l<=e&&l+a>=e){h=t;break}l=null,a=null}if(h)-1!==t.indexOf(h)&&(h=null);else{for(let t=n.length-1;t>=0;t--){const e=n[t],i=n[t].getParent();if(!i){h=e;break}const s=i?.getDisplayedLeafColumns();if(s.length){h=hi(s);break}}if(!h)return;l=this.getNormalisedColumnLeft(h,0,o),a=h.getActualWidth()}this.lastHighlightedColumn?.column!==h&&this.clearHighlighted(),null!=h&&null!=l&&null!=a&&(r=e-l<a/2!==o?0:1,ec(h,r),this.lastHighlightedColumn={column:h,position:r})}getNormalisedXPositionInfo(t,e){const{gos:i,visibleCols:s}=this.beans,o=i.get("enableRtl"),{firstMovingCol:n,column:r,position:l}=this.getColumnMoveAndTargetInfo(t,e,o);if(!n||!r||null==l)return;const a=s.allCols,h=a.indexOf(n),c=a.indexOf(r),u=0===l!==o,d=h<c||h===c&&!u;let g=0;if(u?d&&(g-=1):d||(g+=1),c+g===h)return;const p=a[c+g];return p?{fromLeft:d,xPosition:this.getNormalisedColumnLeft(p,20,o)}:void 0}getColumnMoveAndTargetInfo(t,e,i){const s=this.lastHighlightedColumn||{},{firstMovingCol:o,lastMovingCol:n}=function(t){const e=t.length;let i,s;for(let o=0;o<e;o++){if(!i){const e=t[o];null!=e.getLeft()&&(i=e)}if(!s){const i=t[e-1-o];null!=i.getLeft()&&(s=i)}if(i&&s)break}return{firstMovingCol:i,lastMovingCol:s}}(t);if(!o||!n||s.column||!e)return{firstMovingCol:o,...s};const r="left"===this.getPinDirection();return{firstMovingCol:o,position:r?1:0,column:r!==i?o:n}}normaliseDirection(t){if(this.gos.get("enableRtl"))switch(t){case"left":return"right";case"right":return"left"}return t}getNormalisedColumnLeft(t,e,i){const{gos:s,ctrlsSvc:o}=this.beans,n=t.getLeft();if(null==n)return null;const r=t.getActualWidth();return Jh({x:i?n+r-e:n+e,pinned:t.getPinned(),useHeaderRow:i,skipScrollPadding:!0,gos:s,ctrlsSvc:o})}isAttemptingToPin(t){return(this.needToMoveLeft||this.needToMoveRight)&&this.failedMoveAttempts>7||t.some((t=>t.getPinned()!==this.pinned))}moveColumnsAfterHighlight(t){const{allMovingColumns:e,xPosition:i,fromEnter:s,fakeEvent:o,fromLeft:n}=t,r=this.getMoveColumnParams({allMovingColumns:e,isFromHeader:!0,xPosition:i,fromLeft:n,fromEnter:s,fakeEvent:o}),{columns:l,toIndex:a}=_h(r)||{};l&&null!=a&&(this.lastMovedInfo={columns:l,toIndex:a}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:t}=this;t&&(ec(t.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(t){if(!this.isCenterContainer)return;const e=this.beans.ctrlsSvc.get("center"),i=e.getCenterViewportScrollLeft(),s=i+e.getCenterWidth();let o,n;this.gos.get("enableRtl")?(o=t<i+50,n=t>s-50):(n=t<i+50,o=t>s-50),this.needToMoveRight=o,this.needToMoveLeft=n,n||o?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let t;this.intervalCount++,t=10+5*this.intervalCount,t>100&&(t=100);let e=null;const i=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?e=i.scrollHorizontally(-t):this.needToMoveRight&&(e=i.scrollHorizontally(t)),0!==e)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:t,dragAndDrop:e,gos:i}=this.beans;if(this.failedMoveAttempts<=8||!t)return;if(e.setDragImageCompIcon("pinned"),!i.get("suppressMoveWhenColumnDragging")){const t=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(t,void 0,!0)}}}getPinDirection(){return this.needToMoveLeft||"left"===this.pinned?"left":this.needToMoveRight||"right"===this.pinned?"right":void 0}attemptToPinColumns(t,e,i=!1){const s=(t||[]).filter((t=>!t.getColDef().lockPinned));if(!s.length)return 0;i&&(e=this.getPinDirection());const{pinnedCols:o,dragAndDrop:n}=this.beans;return o?.setColsPinned(s,e,"uiColumnDragged"),i&&n.nudge(),s.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function ec(t,e){t.highlighted!==e&&(t.highlighted=e,t.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}var ic=class extends Dt{constructor(t,e){super(),this.pinned=t,this.eContainer=e}postConstruct(){const{ctrlsSvc:t,dragAndDrop:e}=this.beans,i=this.pinned;t.whenReady(this,(t=>{let e;const s=t.gridBodyCtrl.eBodyViewport;switch(i){case"left":e=[[s,t.left.eContainer],[t.bottomLeft.eContainer],[t.topLeft.eContainer]];break;case"right":e=[[s,t.right.eContainer],[t.bottomRight.eContainer],[t.topRight.eContainer]];break;default:e=[[s,t.center.eViewport],[t.bottomCenter.eViewport],[t.topCenter.eViewport]]}this.eSecondaryContainers=e})),this.moveColumnFeature=this.createManagedBean(new tc(i)),this.bodyDropPivotTarget=this.createManagedBean(new Zh(i)),e.addDropTarget(this),this.addDestroyFunc((()=>e.removeDropTarget(this)))}isInterestedIn(t){return 1===t||0===t&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(t){return this.beans.colModel.isPivotMode()&&0===t.dragSource.type}onDragEnter(t){this.currentDropListener=this.isDropColumnInPivotMode(t)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(t)}onDragLeave(t){this.currentDropListener.onDragLeave(t)}onDragging(t){this.currentDropListener.onDragging(t)}onDragStop(t){this.currentDropListener.onDragStop(t)}onDragCancel(){this.currentDropListener.onDragCancel()}},sc={moduleName:"ColumnMove",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(t,e,i){const s=this.beans.colModel.getCols();s&&this.moveColumns([s[t]],e,i)}moveColumns(t,e,i,s=!0){const{colModel:o,colAnimation:n,visibleCols:r,eventSvc:l}=this.beans,a=o.getCols();if(!a)return;if(e>a.length-t.length)return void pe(30,{toIndex:e});n?.start();const h=o.getColsForKeys(t);this.doesMovePassRules(h,e)&&(gi(o.getCols(),h,e),r.refresh(i),l.dispatchEvent({type:"columnMoved",columns:h,column:1===h.length?h[0]:null,toIndex:e,finished:s,source:i})),n?.finish()}doesMovePassRules(t,e){const i=this.getProposedColumnOrder(t,e);return this.doesOrderPassRules(i)}doesOrderPassRules(t){const{colModel:e,gos:i}=this.beans;return!!Ii(t,e.getColTree())&&!!(t=>{const e=i.get("enableRtl");let s=e?1:-1,o=!0;for(const i of t){const t=(n=i.getColDef().lockPosition)?"left"===n||!0===n?-1:1:0;e?t>s&&(o=!1):t<s&&(o=!1),s=t}var n;return o})(t)}getProposedColumnOrder(t,e){const i=this.beans.colModel.getCols().slice();return gi(i,t,e),i}createBodyDropTarget(t,e){return new ic(t,e)}moveHeader(t,e,i,s,o){const{ctrlsSvc:n,gos:r,colModel:l,visibleCols:a,focusSvc:h}=this.beans,c=e.getBoundingClientRect(),u=c.left,d=Xn(i),g=d?c.width:i.getActualWidth(),p="left"===t!==r.get("enableRtl"),f=Jh({x:p?u-20:u+g+20,pinned:s,fromKeyboard:!0,gos:r,ctrlsSvc:n}),m=h.focusedHeader;let w;if(Yh({allMovingColumns:d?i.getLeafColumns():[i],isFromHeader:!0,fromLeft:"right"===t,xPosition:f,pinned:s,fromEnter:!1,fakeEvent:!1,gos:r,colModel:l,colMoves:this,visibleCols:a,finished:!0}),d){const t=i.getDisplayedLeafColumns();w=p?t[0]:hi(t)}else w=i;if(n.getScrollFeature().ensureColumnVisible(w,"auto"),(!o.isAlive()||r.get("ensureDomOrder"))&&m){let t;if(d){const e=i.getGroupId(),s=i.getLeafColumns();if(!s.length)return;const o=s[0].getParent();if(!o)return;t=function(t,e){for(;t;){if(t.getGroupId()===e)return t;t=t.getParent()}}(o,e)}else t=i;t&&h.focusHeaderPosition({headerPosition:{...m,column:t}})}}setDragSourceForHeader(t,e,i){const{gos:s,colModel:o,dragAndDrop:n,visibleCols:r}=this.beans;let l=!s.get("suppressDragLeaveHidesColumns");const a=Xn(e),h=a?e.getProvidedColumnGroup().getLeafColumns():[e],c=a?()=>function(t,e){const i=t.getProvidedColumnGroup().getLeafColumns(),s={};for(const t of i)s[t.getId()]=t.isVisible();const o=[];for(const t of e)i.indexOf(t)>=0&&(o.push(t),di(i,t));for(const t of i)o.push(t);const n=[],r=t.getLeafColumns();for(const t of o)-1!==r.indexOf(t)&&n.push(t);return{columns:o,columnsInSplit:n,visibleState:s,containerType:n[0]?.pinned}}(e,r.allCols):()=>function(t){const e={};return e[t.getId()]=t.isVisible(),{columns:[t],visibleState:e,containerType:t.pinned}}(e),u={type:1,eElement:t,getDefaultIconName:()=>l?"hide":"notAllowed",getDragItem:c,dragItemName:i,onDragStarted:()=>{l=!s.get("suppressDragLeaveHidesColumns"),Xh(h,!0)},onDragStopped:()=>Xh(h,!1),onDragCancelled:()=>Xh(h,!1),onGridEnter:t=>{if(l){const{columns:e=[],visibleState:i}=t??{},s=a?t=>!i||i[t.getColId()]:()=>!0,n=e.filter((t=>!t.getColDef().lockVisible&&s(t)));o.setColsVisible(n,!0,"uiColumnMoved")}},onGridExit:t=>{if(l){const e=t?.columns?.filter((t=>!t.getColDef().lockVisible))||[];o.setColsVisible(e,!1,"uiColumnMoved")}}};return n.addDragSource(u,!0),u}},class extends Dt{constructor(){super(...arguments),this.beanName="colAnimation",this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(t=>this.gridBodyCtrl=t.gridBodyCtrl))}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(t){this.suppressAnimation=t}start(){if(this.active)return;const{gos:t}=this;t.get("suppressColumnMoveAnimation")||t.get("enableRtl")||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush((()=>this.activeNext=!1),(()=>this.active=!1))}executeNextVMTurn(t){this.activeNext?this.executeNextFuncs.push(t):t()}executeLaterVMTurn(t){this.active?this.executeLaterFuncs.push(t):t()}ensureAnimationCssClassPresent(){this.animationThreadCount++;const t=this.animationThreadCount,{gridBodyCtrl:e}=this;e.setColumnMovingCss(!0),this.executeLaterFuncs.push((()=>{this.animationThreadCount===t&&e.setColumnMovingCss(!1)}))}flush(t,e){const{executeNextFuncs:i,executeLaterFuncs:s}=this;if(0===i.length&&0===s.length)return t(),void e();const o=t=>{for(;t.length;){const e=t.pop();e&&e()}};this.beans.frameworkOverrides.wrapIncoming((()=>{window.setTimeout((()=>{t(),o(i)}),0),window.setTimeout((()=>{e(),o(s)}),200)}))}}],apiFunctions:{moveColumnByIndex:function(t,e,i){t.colMoves?.moveColumnByIndex(e,i,"api")},moveColumns:function(t,e,i){t.colMoves?.moveColumns(e,i,"api")}},dependsOn:[jh],css:[":where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}"]},oc={moduleName:"AutoWidth",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(t=>{this.centerRowContainerCtrl=t.center}))}getPreferredWidthForColumn(t,e){const i=this.getHeaderCellForColumn(t);if(!i)return-1;const s=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(t);return e||s.push(i),this.getPreferredWidthForElements(s)}getPreferredWidthForColumnGroup(t){const e=this.getHeaderCellForColumn(t);return e?this.getPreferredWidthForElements([e]):-1}getPreferredWidthForElements(t,e){const i=document.createElement("form");i.style.position="fixed";const s=this.centerRowContainerCtrl.eContainer;for(const e of t)this.cloneItemIntoDummy(e,i);s.appendChild(i);const o=i.offsetWidth;return i.remove(),o+(e??this.gos.get("autoSizePadding"))}getHeaderCellForColumn(t){let e=null;for(const i of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){const s=i.getHtmlElementForColumnHeader(t);null!=s&&(e=s)}return e}cloneItemIntoDummy(t,e){const i=t.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";const s=document.createElement("div"),o=s.classList;["ag-header-cell","ag-header-group-cell"].some((t=>i.classList.contains(t)))?(o.add("ag-header","ag-header-row"),s.style.position="static"):o.add("ag-row");let n=t.parentElement;for(;n;){if(["ag-header-row","ag-row"].some((t=>n.classList.contains(t)))){for(let t=0;t<n.classList.length;t++){const e=n.classList[t];"ag-row-position-absolute"!=e&&o.add(e)}break}n=n.parentElement}s.appendChild(i),e.appendChild(s)}}]},nc=class extends Dt{constructor(t,e,i,s){super(),this.comp=t,this.eResize=e,this.pinned=i,this.columnGroup=s}postConstruct(){if(!this.columnGroup.isResizable())return void this.comp.setResizableDisplayed(!1);const{horizontalResizeSvc:t,gos:e,colAutosize:i}=this.beans,s=t.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(s),!e.get("suppressAutoSize")&&i&&this.addDestroyFunc(i.addColumnGroupResize(this.eResize,this.columnGroup,(()=>this.resizeLeafColumnsToFit("uiColumnResized"))))}onResizeStart(t){const{columnsToResize:e,resizeStartWidth:i,resizeRatios:s,groupAfterColumns:o,groupAfterStartWidth:n,groupAfterRatios:r}=this.getInitialValues(t);this.resizeCols=e,this.resizeStartWidth=i,this.resizeRatios=s,this.resizeTakeFromCols=o,this.resizeTakeFromStartWidth=n,this.resizeTakeFromRatios=r,this.toggleColumnResizing(!0)}onResizing(t,e,i="uiColumnResized"){const s=this.normaliseDragChange(e);this.resizeColumnsFromLocalValues(this.resizeStartWidth+s,i,t)}getInitialValues(t){const e=t=>t.reduce(((t,e)=>t+e.getActualWidth()),0),i=(t,e)=>t.map((t=>t.getActualWidth()/e)),s=this.getColumnsToResize(),o=e(s),n={columnsToResize:s,resizeStartWidth:o,resizeRatios:i(s,o)};let r=null;if(t&&(r=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),r){const t=r.getDisplayedLeafColumns(),s=n.groupAfterColumns=t.filter((t=>t.isResizable())),o=n.groupAfterStartWidth=e(s);n.groupAfterRatios=i(s,o)}else n.groupAfterColumns=void 0,n.groupAfterStartWidth=void 0,n.groupAfterRatios=void 0;return n}resizeLeafColumnsToFit(t){const e=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),i=this.getInitialValues();e>i.resizeStartWidth&&this.resizeColumns(i,e,t,!0)}resizeColumnsFromLocalValues(t,e,i=!0){this.resizeCols&&this.resizeRatios&&this.resizeColumns({columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios},t,e,i)}resizeColumns(t,e,i,s=!0){const{columnsToResize:o,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:h}=t,c=[];c.push({columns:o,ratios:r,width:e}),l&&c.push({columns:l,ratios:h,width:a-(e-n)}),this.beans.colResize?.resizeColumnSets({resizeSets:c,finished:s,source:i}),s&&this.toggleColumnResizing(!1)}toggleColumnResizing(t){this.comp.toggleCss("ag-column-resizing",t)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter((t=>t.isResizable()))}normaliseDragChange(t){let e=t;return this.gos.get("enableRtl")?"left"!==this.pinned&&(e*=-1):"right"===this.pinned&&(e*=-1),e}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},rc=class extends Dt{constructor(t,e,i,s,o){super(),this.pinned=t,this.column=e,this.eResize=i,this.comp=s,this.ctrl=o}postConstruct(){const t=[];let e,i;const s=()=>{if(H(this.eResize,e),!e)return;const{horizontalResizeSvc:s,colAutosize:o}=this.beans,n=s.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});t.push(n),i&&o&&t.push(o.addColumnAutosizeListeners(this.eResize,this.column))},o=()=>{for(const e of t)e();t.length=0},n=()=>{const t=this.column.isResizable(),n=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(t!==e||n!==i)&&(e=t,i=n,o(),s())};n(),this.addDestroyFunc(o),this.ctrl.setRefreshFunction("resize",n)}onResizing(t,e){const{column:i,lastResizeAmount:s,resizeStartWidth:o,beans:n}=this,r=this.normaliseResizeAmount(e),l=[{key:i,newWidth:o+r}],{pinnedCols:a,ctrlsSvc:h,colResize:c}=n;this.column.getPinned()&&(a?.leftWidth??0)+(a?.rightWidth??0)+(r-s)>V(h.getGridBodyCtrl().eBodyViewport)-50||(this.lastResizeAmount=r,c?.setColumnWidths(l,this.resizeWithShiftKey,t,"uiColumnResized"),t&&this.toggleColumnResizing(!1))}onResizeStart(t){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=t,this.toggleColumnResizing(!0)}toggleColumnResizing(t){this.column.resizing=t,this.comp.toggleCss("ag-column-resizing",t)}normaliseResizeAmount(t){let e=t;const i="left"!==this.pinned,s="right"===this.pinned;return this.gos.get("enableRtl")?i&&(e*=-1):s&&(e*=-1),e}},lc={moduleName:"ColumnResize",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(t,e,i,s){const o=[],{colModel:n,gos:r,visibleCols:l}=this.beans;for(const i of t){const t=n.getColDefCol(i.key)||n.getCol(i.key);if(t&&(o.push({width:i.newWidth,ratios:[1],columns:[t]}),"shift"===r.get("colResizeDefault")&&(e=!e),e)){const e=l.getColAfter(t);if(!e)continue;const s=t.getActualWidth()-i.newWidth,n=e.getActualWidth()+s;o.push({width:n,ratios:[1],columns:[e]})}}0!==o.length&&this.resizeColumnSets({resizeSets:o,finished:i,source:s})}resizeColumnSets(t){const{resizeSets:e,finished:i,source:s}=t;if(e&&!e.every((t=>function(t){const{columns:e,width:i}=t;let s=0,o=0,n=!0;for(const t of e){s+=t.getMinWidth()||0;const e=t.getMaxWidth();e>0?o+=e:n=!1}return i>=s&&(!n||i<=o)}(t))))return void(i&&Ni(this.eventSvc,e&&e.length>0?e[0].columns:null,i,s));const o=[],n=[];for(const t of e){const{width:e,columns:i,ratios:r}=t,l={},a={};for(const t of i)n.push(t);let h=!0,c=0;for(;h;){if(c++,c>1e3){fe(31);break}h=!1;const t=[];let s=0,o=e;i.forEach(((e,i)=>{a[e.getId()]?o-=l[e.getId()]:(t.push(e),s+=r[i])}));const n=1/s;t.forEach(((i,s)=>{let c;s===t.length-1?c=o:(c=Math.round(r[s]*e*n),o-=c);const u=i.getMinWidth(),d=i.getMaxWidth();c<u?(c=u,a[i.getId()]=!0,h=!0):d>0&&c>d&&(c=d,a[i.getId()]=!0,h=!0),l[i.getId()]=c}))}for(const t of i){const e=l[t.getId()];t.getActualWidth()!==e&&(t.setActualWidth(e,s),o.push(t))}}const r=o.length>0;let l=[];if(r){const{colFlex:t,visibleCols:e,colViewport:i}=this.beans;l=t?.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0})??[],e.setLeftValues(s),e.updateBodyWidths(),i.checkViewportColumns()}const a=n.concat(l);(r||i)&&Ni(this.eventSvc,a,i,s,l)}resizeHeader(t,e,i){if(!t.isResizable())return;const s=t.getActualWidth(),o=t.getMinWidth(),n=t.getMaxWidth(),r=Math.min(Math.max(s+e,o),n);this.setColumnWidths([{key:t,newWidth:r}],i,!0,"uiColumnResized")}createResizeFeature(t,e,i,s,o){return new rc(t,e,i,s,o)}createGroupResizeFeature(t,e,i,s){return new nc(t,e,i,s)}}],apiFunctions:{setColumnWidths:function(t,e,i=!0,s="api"){t.colResize?.setColumnWidths(e,!1,i,s)}},dependsOn:[qh,oc]},ac=class extends Dt{constructor(t,e){super(),this.removeChildListenersFuncs=[],this.columnGroup=e,this.comp=t}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();const t=this.onWidthChanged.bind(this);for(const e of this.columnGroup.getLeafColumns())e.__addEventListener("widthChanged",t),e.__addEventListener("visibleChanged",t),this.removeChildListenersFuncs.push((()=>{e.__removeEventListener("widthChanged",t),e.__removeEventListener("visibleChanged",t)}))}removeListenersOnChildrenColumns(){for(const t of this.removeChildListenersFuncs)t();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const t=this.columnGroup.getActualWidth();this.comp.setWidth(`${t}px`),this.comp.toggleCss("ag-hidden",0===t)}};function hc(t,e){for(let i=0;i<e.length;i++){const s=t.indexOf(e[i]);s>=0&&(t[s]=t[t.length-1],t.pop())}}function cc(t,e,i){if(t)for(let s=0;s<t.length;s++){const o=t[s];Xn(o)&&cc(e?o.getDisplayedChildren():o.getChildren(),e,i),i(o)}}function uc(t){const e=[];return cc(t,!0,(t=>{ii(t)&&e.push(t)})),e}var dc={moduleName:"ColumnGroup",version:se,dynamicBeans:{headerGroupCellCtrl:class extends la{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(t,e,i,s,o){const{column:n,beans:r}=this,{context:l,colNames:a,colHover:h,rangeSvc:c,colResize:u}=r;this.comp=t,o=Wi(this,l,o),this.setGui(e,o),this.displayName=a.getDisplayNameForColumnGroup(n,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(o),this.setupExpandable(o),this.setupTooltip(),this.setupAutoHeight({wrapperElement:s,compBean:o}),this.setupUserComp(),this.addHeaderMouseListeners(o),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const d=this.rowCtrl.pinned,g=n.getProvidedColumnGroup().getLeafColumns();h?.createHoverFeature(o,g,e),c?.createRangeHighlightFeature(o,n,t),o.createManagedBean(new oa(n,e,r)),o.createManagedBean(new ac(t,n)),u?this.resizeFeature=o.createManagedBean(u.createGroupResizeFeature(t,i,d,n)):t.setResizableDisplayed(!1),o.createManagedBean(new Lr(e,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(o,g),o.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(o),o.addDestroyFunc((()=>this.clearComponent()))}getHeaderClassParams(){const{column:t,beans:e}=this,i=t.getDefinition();return Qe(e.gos,{colDef:i,columnGroup:t,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:t,comp:e}=this,i=t.get("groupHeaderHeight");null!=i?0===i?e.setHeaderWrapperHidden(!0):e.setHeaderWrapperMaxHeight(i):(e.setHeaderWrapperHidden(!1),e.setHeaderWrapperMaxHeight(null))}addHighlightListeners(t,e){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const i of e)t.addManagedListeners(i,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,i)})}onLeafColumnHighlightChanged(t){const e=this.column.getDisplayedLeafColumns(),i=e[0]===t,s=hi(e)===t;if(!i&&!s)return;const o=t.getHighlighted();let n=!1,r=!1;if(this.rowCtrl.getHeaderCellCtrls().find((t=>t.column.isMoving()))){const t=this.beans.gos.get("enableRtl"),e=1===o,l=0===o;i&&(t?r=e:n=l),s&&(t?n=l:r=e)}this.comp.toggleCss("ag-header-highlight-before",n),this.comp.toggleCss("ag-header-highlight-after",r)}resizeHeader(t,e){const{resizeFeature:i}=this;if(!i)return;const s=i.getInitialValues(e);i.resizeColumns(s,s.resizeStartWidth+t,"uiColumnResized",!0)}resizeLeafColumnsToFit(t){this.resizeFeature?.resizeLeafColumnsToFit(t)}setupUserComp(){const{colGroupSvc:t,userCompFactory:e,gos:i,enterpriseMenuFactory:s}=this.beans,o=this.column,n=o.getProvidedColumnGroup(),r=function(t,e){const i=e.columnGroup.getColGroupDef();return t.getCompDetails(i,os,"agColumnGroupHeader",e)}(e,Qe(i,{displayName:this.displayName,columnGroup:o,setExpanded:e=>{t.setColumnGroupOpened(n,e,"gridInitializing")},setTooltip:(t,e)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(t,e)},showColumnMenu:(t,e)=>s?.showMenuAfterButtonClick(n,t,"columnMenu",e),showColumnMenuAfterMouseClick:(t,e)=>s?.showMenuAfterMouseEvent(n,t,"columnMenu",e),eGridHeader:this.eGui}));r&&this.comp.setUserCompDetails(r)}addHeaderMouseListeners(t){const e=t=>this.handleMouseOverChange("mouseenter"===t.type);t.addManagedListeners(this.eGui,{mouseenter:e,mouseleave:e,click:()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),contextmenu:t=>this.handleContextMenuMouseEvent(t,void 0,this.column.getProvidedColumnGroup())})}handleMouseOverChange(t){this.eventSvc.dispatchEvent({type:t?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column.getProvidedColumnGroup()})}setupTooltip(t,e){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,t,e)}setupExpandable(t){const e=this.column.getProvidedColumnGroup();this.refreshExpanded();const i=this.refreshExpanded.bind(this);t.addManagedListeners(e,{expandedChanged:i,expandableChanged:i})}refreshExpanded(){const{column:t}=this;this.expandable=t.isExpandable();const e=t.isExpanded();this.comp.setAriaExpanded(this.expandable?e?"true":"false":void 0),this.refreshHeaderStyles()}addClasses(){const{column:t}=this,e=t.getColGroupDef(),i=Bl(e,this.gos,null,t);t.isPadding()?(i.push("ag-header-group-cell-no-group"),t.getLeafColumns().every((t=>t.isSpanHeaderHeight()))&&i.push("ag-header-span-height")):(i.push("ag-header-group-cell-with-group"),e?.wrapHeaderText&&i.push("ag-header-cell-wrap-text"));for(const t of i)this.comp.toggleCss(t,!0)}setupMovingCss(t){const{column:e}=this,i=e.getProvidedColumnGroup().getLeafColumns(),s=()=>this.comp.toggleCss("ag-header-cell-moving",e.isMoving());for(const e of i)t.addManagedListeners(e,{movingChanged:s});s()}onFocusIn(t){this.eGui.contains(t.relatedTarget)||this.focusThis()}handleKeyDown(t){super.handleKeyDown(t);const e=this.getWrapperHasFocus();if(this.expandable&&e&&t.key===As){const t=this.column,e=!t.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(t.getProvidedColumnGroup(),e,"uiColumnExpanded")}}setDragSource(t){this.isAlive()&&!this.isSuppressMoving()&&(this.removeDragSource(),t&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(t,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some((t=>t.getColDef().suppressMovable||t.getColDef().lockPosition))}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}}},beans:[class extends Dt{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const t=[];return Ei(null,this.beans.colModel.getColTree(),(e=>{oi(e)&&t.push({groupId:e.getGroupId(),open:e.isExpanded()})})),t}resetColumnGroupState(t){const e=this.beans.colModel.getColDefColTree();if(!e)return;const i=[];Ei(null,e,(t=>{if(oi(t)){const e=t.getColGroupDef(),s={groupId:t.getGroupId(),open:e?e.openByDefault:void 0};i.push(s)}})),this.setColumnGroupState(i,t)}setColumnGroupState(t,e){const{colModel:i,colAnimation:s,visibleCols:o,eventSvc:n}=this.beans;if(!i.getColTree().length)return;s?.start();const r=[];for(const e of t){const t=e.open,i=this.getProvidedColGroup(e.groupId);i&&i.isExpanded()!==t&&(i.setExpanded(t),r.push(i))}o.refresh(e,!0),r.length&&n.dispatchEvent({type:"columnGroupOpened",columnGroup:1===r.length?r[0]:void 0,columnGroups:r}),s?.finish()}setColumnGroupOpened(t,e,i){let s;s=oi(t)?t.getId():t||"",this.setColumnGroupState([{groupId:s,open:e}],i)}getProvidedColGroup(t){let e=null;return Ei(null,this.beans.colModel.getColTree(),(i=>{oi(i)&&i.getId()===t&&(e=i)})),e}getGroupAtDirection(t,e){const i=t.getProvidedColumnGroup().getLevel()+t.getPaddingLevel(),s=t.getDisplayedLeafColumns(),o="After"===e?hi(s):s[0],n=`getCol${e}`;for(;;){const e=this.beans.visibleCols[n](o);if(!e)return null;const s=this.getColGroupAtLevel(e,i);if(s!==t)return s}}getColGroupAtLevel(t,e){let i,s,o=t.getParent();for(;i=o.getProvidedColumnGroup().getLevel(),s=o.getPaddingLevel(),!(i+s<=e);)o=o.getParent();return o}updateOpenClosedVisibility(){cc(this.beans.visibleCols.getAllTrees(),!1,(t=>{Xn(t)&&t.calculateDisplayedColumns()}))}getColumnGroup(t,e){if(!t)return null;if(Xn(t))return t;const i=this.beans.visibleCols.getAllTrees(),s="number"==typeof e;let o=null;return cc(i,!1,(i=>{if(Xn(i)){const n=i;let r;r=s?t===n.getGroupId()&&e===n.getPartId():t===n.getGroupId(),r&&(o=n)}})),o}createColumnGroups(t){const{columns:e,idCreator:i,pinned:s,oldDisplayedGroups:o,isStandaloneStructure:n}=t,r=this.mapOldGroupsById(o),l=[];let a=e;for(;a.length;){const t=a;a=[];let e=0;const o=o=>{const h=e;e=o;const c=t[h],u=(Xn(c)?c.getProvidedColumnGroup():c).getOriginalParent();if(null==u){for(let e=h;e<o;e++)l.push(t[e]);return}const d=this.createColumnGroup(u,i,r,s,n);for(let e=h;e<o;e++)d.addChild(t[e]);a.push(d)};for(let i=1;i<t.length;i++){const s=t[i],n=(Xn(s)?s.getProvidedColumnGroup():s).getOriginalParent(),r=t[e];n!==(Xn(r)?r.getProvidedColumnGroup():r).getOriginalParent()&&o(i)}e<t.length&&o(t.length)}return n||this.setupParentsIntoCols(l,null),l}createProvidedColumnGroup(t,e,i,s,o,n,r){const l=o.getUniqueKey(e.groupId||null,null),a=li(this.beans,e,l),h=new ni(a,l,!1,i);this.createBean(h);const c=this.findExistingGroup(e,n);c&&n.splice(c.idx,1);const u=c?.group;u&&h.setExpanded(u.isExpanded());const d=Pi(this.beans,a.children,i+1,t,s,o,n,r);return h.setChildren(d),h}balanceColumnTree(t,e,i,s){const o=[];for(let n=0;n<t.length;n++){const r=t[n];if(oi(r)){const t=r,n=this.balanceColumnTree(t.getChildren(),e+1,i,s);t.setChildren(n),o.push(t)}else{let n,l;for(let t=e;t<i;t++){const e=s.getUniqueKey(null,null),i=li(this.beans,null,e),o=new ni(i,e,!0,t);this.createBean(o),l&&l.setChildren([o]),l=o,n||(n=l)}if(n&&l){if(o.push(n),t.some((t=>oi(t)))){l.setChildren([r]);continue}l.setChildren(t);break}o.push(r)}}return o}findDepth(t){let e=0,i=t;for(;i?.[0]&&oi(i[0]);)e++,i=i[0].getChildren();return e}findMaxDepth(t,e){let i=e;for(let s=0;s<t.length;s++){const o=t[s];if(oi(o)){const t=this.findMaxDepth(o.getChildren(),e+1);i<t&&(i=t)}}return i}balanceTreeForAutoCols(t,e){const i=[];for(const s of t){let t=s;for(let i=e-1;i>=0;i--){const e=new ni(null,`FAKE_PATH_${s.getId()}}_${i}`,!0,i);this.createBean(e),e.setChildren([t]),t.originalParent=e,t=e}0===e&&(s.originalParent=null),i.push(t)}return i}findExistingGroup(t,e){if(null!=t.groupId)for(let i=0;i<e.length;i++){const s=e[i];if(s.getColGroupDef()&&s.getId()===t.groupId)return{idx:i,group:s}}}createColumnGroup(t,e,s,o,n){const r=t.getGroupId(),l=e.getInstanceIdForKey(r);let a=s[Jn(r,l)];return a&&a.getProvidedColumnGroup()!==t&&(a=null),i(a)?a.reset():(a=new tr(t,r,l,o),n||this.createBean(a)),a}mapOldGroupsById(t){const e={},i=t=>{for(const s of t)if(Xn(s)){const t=s;e[s.getUniqueId()]=t,i(t.getChildren())}};return t&&i(t),e}setupParentsIntoCols(t,e){for(const i of t??[])if(i.parent!==e&&(this.beans.colViewport.colsWithinViewportHash=""),i.parent=e,Xn(i)){const t=i;this.setupParentsIntoCols(t.getChildren(),t)}}}],apiFunctions:{getAllDisplayedColumnGroups:function(t){return t.visibleCols.getAllTrees()},getCenterDisplayedColumnGroups:function(t){return t.visibleCols.treeCenter},getColumnGroup:function(t,e,i){return t.colGroupSvc?.getColumnGroup(e,i)??null},getColumnGroupState:function(t){return t.colGroupSvc?.getColumnGroupState()??[]},getDisplayNameForColumnGroup:function(t,e,i){return t.colNames.getDisplayNameForColumnGroup(e,i)||""},getLeftDisplayedColumnGroups:function(t){return t.visibleCols.treeLeft},getProvidedColumnGroup:function(t,e){return t.colGroupSvc?.getProvidedColGroup(e)??null},getRightDisplayedColumnGroups:function(t){return t.visibleCols.treeRight},resetColumnGroupState:function(t){t.colGroupSvc?.resetColumnGroupState("api")},setColumnGroupOpened:function(t,e,i){t.colGroupSvc?.setColumnGroupOpened(e,i,"api")},setColumnGroupState:function(t,e){t.colGroupSvc?.setColumnGroupState(e,"api")}}},gc={tag:"div",cls:"ag-skeleton-container"},pc={moduleName:"CheckboxCellRenderer",version:se,userComponents:{agCheckboxCellRenderer:class extends _i{constructor(){super(ya,[Oo]),this.eCheckbox=Ui,this.registerCSS(".ag-checkbox-cell{height:100%}")}init(t){this.refresh(t);const{eCheckbox:e,beans:i}=this,s=e.getInputElement();s.setAttribute("tabindex","-1"),R(s,"polite"),this.addManagedListeners(s,{click:t=>{if(Gr(t),e.isDisabled())return;const i=e.getValue();this.onCheckboxChanged(i)},dblclick:t=>{Gr(t)}}),this.addManagedElementListeners(t.eGridCell,{keydown:s=>{if(s.key===Hs&&!e.isDisabled()){t.eGridCell===d(i)&&e.toggle();const o=e.getValue();this.onCheckboxChanged(o),s.preventDefault()}}})}refresh(t){return this.params=t,this.updateCheckbox(t),!0}updateCheckbox(t){let e,i=!0;const{value:s,column:o,node:n}=t;if(n.group&&o)if("boolean"==typeof s)e=s;else{const t=o.getColId();t.startsWith(pi)?e=null==s||""===s?void 0:"true"===s:n.aggData&&void 0!==n.aggData[t]||n.sourceRowIndex>=0?e=s??void 0:i=!1}else e=s??void 0;const{eCheckbox:r}=this;if(!i)return void r.setDisplayed(!1);r.setValue(e);const l=t.disabled??!o?.isCellEditable(n);r.setDisabled(l);const a=this.getLocaleTextFunc(),h=E(a,e),c=l?h:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${h})`;r.setInputAriaLabel(c)}onCheckboxChanged(t){const{params:e}=this,{column:i,node:s,value:o}=e;this.beans?.editSvc?.setEditingCells([{column:i,colId:i.getColId(),rowIndex:s.rowIndex,rowPinned:s.rowPinned,state:"changed",oldValue:o,newValue:o}],{update:!0,forceRefreshOfEditCellsOnly:!0});const n=s.setDataValue(i,t,"renderer");this.beans.editSvc?.stopEditing({rowNode:s,column:i},{source:this.beans.editSvc?.isBatchEditing()?"ui":"api"}),n||this.updateCheckbox(e)}}}},fc={moduleName:"SkeletonCellRenderer",version:se,userComponents:{agSkeletonCellRenderer:class extends _i{constructor(){super(gc)}init(t){const e=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",e),this.addDestroyFunc((()=>x(t.eParentOfValue))),x(t.eParentOfValue,e),t.deferRender?this.setupLoading(t):t.node.failedLoad?this.setupFailed():this.setupLoading(t)}setupFailed(){const t=this.getLocaleTextFunc();this.getGui().textContent=t("loadingError","ERR");const e=t("ariaSkeletonCellLoadingFailed","Row failed to load");S(this.getGui(),e)}setupLoading(t){const e=mr({tag:"div",cls:"ag-skeleton-effect"}),i=t.node.rowIndex;if(null!=i){const t=75+25*(i%2==0?Math.sin(i):Math.cos(i));e.style.width=`${t}%`}this.getGui().appendChild(e);const s=this.getLocaleTextFunc(),o=t.deferRender?s("ariaDeferSkeletonCellLoading","Cell is loading"):s("ariaSkeletonCellLoading","Row data is loading");S(this.getGui(),o)}refresh(t){return!1}}}};function mc(t,e){if(!t)return;const i=t,s={};for(const t of Object.keys(i)){if(e&&e.indexOf(t)>=0||Nt.has(t))continue;const o=i[t];s[t]="object"==typeof o&&null!==o&&o.constructor===Object?mc(o):o}return s}function wc(t,e,i){if(!e||!t)return;if(!i)return t[e];const s=e.split(".");let o=t;for(let t=0;t<s.length;t++){if(null==o)return;o=o[s[t]]}return o}var vc=["dateTimeString","dateString","text","number","boolean","date"];function Cc(t,e){const i={...t,...e};return t.columnTypes&&e.columnTypes&&e.appendColumnTypes&&(i.columnTypes=[...xi(t.columnTypes),...xi(e.columnTypes)]),i}function bc(t,e,i){return e?e.baseDataType===t.baseDataType||(pe(46),!1):(pe(45,{parentCellDataType:i}),!1)}function yc(t,e){if(t.valueFormatter)return i=>{if(i.node?.group){const e=(i.colDef.pivotValueColumn??i.column).getAggFunc();if(e){if("first"===e||"last"===e)return t.valueFormatter(i);if("number"===t.baseDataType&&"count"!==e){if("number"==typeof i.value)return t.valueFormatter(i);if("object"==typeof i.value){if(!i.value)return;if("toNumber"in i.value)return t.valueFormatter({...i,value:i.value.toNumber()});if("value"in i.value)return t.valueFormatter({...i,value:i.value.value})}}return}}else if(e.get("groupHideOpenParents")&&i.column.isRowGroupActive()&&"string"==typeof i.value&&!t.dataTypeMatcher?.(i.value))return;return t.valueFormatter(i)}}function Sc(t,e){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some((([i,s])=>function(t,e,i,s){if(!e[i])return!1;const o=t[i];return null===o?(e[i]=!1,!1):void 0===s?!!o:o===s}(t,e,i,s)))}function xc(t,e){const i=Li(t);for(const t of e)delete i[t],"rowGroup"===t?delete i.rowGroupIndex:"pivot"===t&&delete i.pivotIndex;return i}var Rc={moduleName:"DataType",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number:()=>({cellEditor:"agNumberCellEditor"}),boolean:()=>({cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:t=>!!t.colDef.editable&&t.event.key===Hs}),date:({formatValue:t})=>({cellEditor:"agDateCellEditor",keyCreator:t}),dateString:({formatValue:t})=>({cellEditor:"agDateStringCellEditor",keyCreator:t}),dateTime(t){return this.date(t)},dateTimeString(t){return this.dateString(t)},object:({formatValue:t,colModel:e,colId:i})=>({cellEditorParams:{useFormatter:!0},comparator:(s,o)=>{const n=e.getColDefCol(i),r=n?.getColDef();if(!n||!r)return 0;const l=null==s?"":t({column:n,node:null,value:s}),a=null==o?"":t({column:n,node:null,value:o});return l===a?0:l>a?1:-1},keyCreator:t}),text:()=>({})}}wireBeans(t){this.colModel=t.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",(t=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(t)}))}processDataTypeDefinitions(){const t=this.getDefaultDataTypes(),e={},i={},s=t=>e=>{const{column:i,node:s,value:o}=e;let n=i.getColDef().valueFormatter;return n===t.groupSafeValueFormatter&&(n=t.valueFormatter),this.beans.valueSvc.formatValue(i,s,o,n)};for(const o of Object.keys(t)){const n=t[o],r={...n,groupSafeValueFormatter:yc(n,this.gos)};e[o]=r,i[o]=s(r)}const o=this.gos.get("dataTypeDefinitions")??{},n={};for(const r of Object.keys(o)){const l=o[r],a=this.processDataTypeDefinition(l,o,[r],t);a&&(e[r]=a,l.dataTypeMatcher&&(n[r]=l.dataTypeMatcher),i[r]=s(a))}const{valueParser:r,valueFormatter:l}=t.object,{valueParser:a,valueFormatter:h}=e.object;this.hasObjectValueParser=a!==r,this.hasObjectValueFormatter=h!==l,this.formatValueFuncs=i,this.dataTypeDefinitions=e,this.dataTypeMatchers=this.sortKeysInMatchers(n,t)}sortKeysInMatchers(t,e){const i={...t};for(const s of vc)delete i[s],i[s]=t[s]??e[s].dataTypeMatcher;return i}processDataTypeDefinition(t,e,i,s){let o;const n=t.extendsDataType;if(t.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),t.extendsDataType===t.baseDataType){let i=s[n];const r=e[n];if(i&&r&&(i=r),!bc(t,i,n))return;o=Cc(i,t)}else{if(i.includes(n))return void pe(44);const r=e[n];if(!bc(t,r,n))return;const l=this.processDataTypeDefinition(r,e,[...i,n],s);if(!l)return;o=Cc(l,t)}return{...o,groupSafeValueFormatter:yc(o,this.gos)}}updateColDefAndGetColumnType(t,e,i){let{cellDataType:s}=e;const{field:o}=e;if(void 0===s&&(s=t.cellDataType),null!=s&&!0!==s||(s=!!this.canInferCellDataType(t,e)&&this.inferCellDataType(o,i)),!s)return void(t.cellDataType=!1);const n=this.dataTypeDefinitions[s];if(n)return t.cellDataType=s,n.groupSafeValueFormatter&&(t.valueFormatter=n.groupSafeValueFormatter),n.valueParser&&(t.valueParser=n.valueParser),n.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(t,s,n,i),n.columnTypes;pe(47,{cellDataType:s})}addColumnListeners(t){if(!this.isPendingInference)return;const e=this.columnStateUpdatesPendingInference[t.getColId()];if(!e)return;const i=t=>{e.add(t.key)};t.__addEventListener("columnStateUpdated",i),this.columnStateUpdateListenerDestroyFuncs.push((()=>t.__removeEventListener("columnStateUpdated",i)))}canInferCellDataType(t,e){const{gos:i}=this;if(!Ce(i))return!1;const s={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(Sc(e,s))return!1;const o=null===e.type?t.type:e.type;if(o){const t=i.get("columnTypes")??{};if(xi(o).some((e=>{const i=t[e.trim()];return i&&Sc(i,s)})))return!1}return!Sc(t,s)}inferCellDataType(t,e){if(!t)return;let i;const s=this.getInitialData();if(s){const e=t.includes(".")&&!this.gos.get("suppressFieldDotNotation");i=wc(s,t,e)}else this.initWaitForRowData(e);return null!=i?Object.keys(this.dataTypeMatchers).find((t=>this.dataTypeMatchers[t](i)))??"object":void 0}getInitialData(){const t=this.gos.get("rowData");if(t?.length)return t[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?._leafs;if(t?.length)return t[0].data}return null}initWaitForRowData(t){if(this.columnStateUpdatesPendingInference[t]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const e=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:i,eventSvc:s}=this.beans;e&&i&&(i.shouldQueueResizeOperations=!0);const[o]=this.addManagedEventListeners({rowDataUpdateStarted:t=>{const{firstRowData:n}=t;n&&(o?.(),this.isPendingInference=!1,this.processColumnsPendingInference(n,e),this.columnStateUpdatesPendingInference={},e&&i?.processResizeOperations(),s.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(t,e){this.initialData=t;const i=[];this.destroyColumnStateUpdateListeners();const s={},o={};for(const t of Object.keys(this.columnStateUpdatesPendingInference)){const n=this.columnStateUpdatesPendingInference[t],r=this.colModel.getCol(t);if(!r)return;const l=r.getColDef();if(!this.resetColDefIntoCol(r,"cellDataTypeInferred"))return;const a=r.getColDef();if(e&&a.type&&a.type!==l.type){const e=xc(r,n);e.rowGroup&&null==e.rowGroupIndex&&(s[t]=e),e.pivot&&null==e.pivotIndex&&(o[t]=e),i.push(e)}}e&&i.push(...this.generateColumnStateForRowGroupAndPivotIndexes(s,o)),i.length&&Bi(this.beans,{state:i},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(t,e){const i={},{rowGroupColsSvc:s,pivotColsSvc:o}=this.beans;return s?.restoreColumnOrder(i,t),o?.restoreColumnOrder(i,e),Object.values(i)}resetColDefIntoCol(t,e){const i=t.getUserProvidedColDef();if(!i)return!1;const s=Ti(this.beans,i,t.getColId());return t.setColDef(s,i,e),!0}getDateStringTypeDefinition(t){const{dateString:e}=this.dataTypeDefinitions;return t?this.getDataTypeDefinition(t)??e:e}getDateParserFunction(t){return this.getDateStringTypeDefinition(t).dateParser}getDateFormatterFunction(t){return this.getDateStringTypeDefinition(t).dateFormatter}getDateIncludesTimeFlag(t){return"dateTime"===t||"dateTimeString"===t}getDataTypeDefinition(t){const e=t.getColDef();if(e.cellDataType)return this.dataTypeDefinitions[e.cellDataType]}getBaseDataType(t){return this.getDataTypeDefinition(t)?.baseDataType}checkType(t,e){if(null==e)return!0;const i=this.getDataTypeDefinition(t)?.dataTypeMatcher;return!i||i(e)}validateColDef(t){const e=t=>pe(48,{property:t});if("object"===t.cellDataType){const{object:i}=this.dataTypeDefinitions;t.valueFormatter!==i.groupSafeValueFormatter||this.hasObjectValueFormatter||e("Formatter"),t.editable&&t.valueParser===i.valueParser&&!this.hasObjectValueParser&&e("Parser")}}postProcess(t){const e=t.cellDataType;if(!e||"string"!=typeof e)return;const{dataTypeDefinitions:i,beans:s,formatValueFuncs:o}=this,n=i[e];n&&s.colFilter?.setColDefPropsForDataType(t,n,o[e])}getFormatValue(t){return this.formatValueFuncs[t]}isColPendingInference(t){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[t]}setColDefPropertiesForBaseDataType(t,e,i,s){const o=this.columnDefinitionPropsPerDataType[i.baseDataType]({colDef:t,cellDataType:e,colModel:this.colModel,dataTypeDefinition:i,colId:s,formatValue:this.formatValueFuncs[e]});Object.assign(t,o)}getDateObjectTypeDef(t){const e=this.getLocaleTextFunc(),i=this.getDateIncludesTimeFlag(t);return{baseDataType:t,valueParser:t=>mo(t.newValue&&String(t.newValue)),valueFormatter:t=>null==t.value?"":t.value instanceof Date&&!isNaN(t.value.getTime())?ao(t.value,i)??"":e("invalidDate","Invalid Date"),dataTypeMatcher:t=>t instanceof Date}}getDateStringTypeDef(t){const e=this.getDateIncludesTimeFlag(t);return{baseDataType:t,dateParser:t=>mo(t)??void 0,dateFormatter:t=>ao(t??null,e)??void 0,valueParser:t=>fo(String(t.newValue))?t.newValue:null,valueFormatter:t=>fo(String(t.value))?String(t.value):"",dataTypeMatcher:t=>"string"==typeof t&&fo(t)}}getDefaultDataTypes(){const t=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:t=>""===t.newValue?.trim?.()?null:Number(t.newValue),valueFormatter:e=>null==e.value?"":"number"!=typeof e.value||isNaN(e.value)?t("invalidNumber","Invalid Number"):String(e.value),dataTypeMatcher:t=>"number"==typeof t},text:{baseDataType:"text",valueParser:t=>""===t.newValue?null:o(t.newValue),dataTypeMatcher:t=>"string"==typeof t},boolean:{baseDataType:"boolean",valueParser:t=>null==t.newValue?t.newValue:""===t.newValue?.trim?.()?null:"true"===String(t.newValue).toLowerCase(),valueFormatter:t=>null==t.value?"":String(t.value),dataTypeMatcher:t=>"boolean"==typeof t},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:t=>"string"==typeof t&&function(t){return fo(t,!0)}(t)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:t=>o(t.value)??""}}}destroyColumnStateUpdateListeners(){for(const t of this.columnStateUpdateListenerDestroyFuncs)t();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}}],dependsOn:[pc]},Fc={moduleName:"ColumnFlex",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(t={}){const e=t.source??"flex";null!=t.viewportWidth&&(this.flexViewportWidth=t.viewportWidth);const i=this.flexViewportWidth,{visibleCols:s,colDelayRenderSvc:o}=this.beans,n=s.centerCols;let r=-1;if(t.resizingCols){const e=new Set(t.resizingCols);for(let t=n.length-1;t>=0;t--)if(e.has(n[t])){r=t;break}}let l=!1;const a=n.map(((t,e)=>{const i=t.getFlex(),s=null!=i&&i>0&&e>r;return l||(l=s),{col:t,isFlex:s,flex:Math.max(0,i??0),initialSize:t.getActualWidth(),min:t.getMinWidth(),max:t.getMaxWidth(),targetSize:0}}));if(l?(o?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(o),!i||!l)return[];let h=a.length,c=a.reduce(((t,e)=>t+e.flex),0),u=i;const d=(t,i)=>{t.frozenSize=i,t.col.setActualWidth(i,e),u-=i,c-=t.flex,h-=1},g=t=>null!=t.frozenSize;for(const t of a)t.isFlex||d(t,t.initialSize);for(;h>0;){const t=Math.round(c<1?u*c:u);let e,i=0,s=0;for(const o of a){if(g(o))continue;e=o,s+=t*(o.flex/c);const n=Math.round(s-i);o.targetSize=n,i+=n}e&&(e.targetSize+=t-i);let o=0;for(const t of a){if(g(t))continue;const e=t.targetSize,i=Math.min(Math.max(e,t.min),t.max);o+=i-e,t.violationType=i===e?void 0:i<e?"max":"min",t.targetSize=i}const n=0===o?"all":o>0?"min":"max";for(const t of a)g(t)||"all"!==n&&t.violationType!==n||d(t,t.targetSize)}t.skipSetLeft||s.setLeftValues(e),t.updateBodyWidths&&s.updateBodyWidths();const p=a.filter((t=>t.isFlex&&!t.violationType)).map((t=>t.col));if(t.fireResizedEvent){const t=a.filter((t=>t.initialSize!==t.frozenSize)).map((t=>t.col)),i=a.filter((t=>t.flex)).map((t=>t.col));Ni(this.eventSvc,t,!0,e,i)}return this.revealColumns(o),p}revealColumns(t){this.columnsHidden&&(t?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(t){const{flex:e,initialFlex:i}=t.colDef;void 0!==e?t.flex=e:void 0!==i&&(t.flex=i)}setColFlex(t,e){t.flex=e??null,t.dispatchStateUpdatedEvent("flex")}}]},kc={moduleName:"ColumnApi",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(t){this.rowGroupColsSvc=t.rowGroupColsSvc,this.pivotColsSvc=t.pivotColsSvc}getColumnDefs(t,e,i,s,o=!1){const n=t.slice();e?n.sort(((t,e)=>i.indexOf(t)-i.indexOf(e))):(i||o)&&n.sort(((t,e)=>s.indexOf(t)-s.indexOf(e)));const r=this.rowGroupColsSvc?.columns,l=this.pivotColsSvc?.columns;return this.buildColumnDefs(n,r,l)}buildColumnDefs(t,e=[],i=[]){const s=[],o={};for(const n of t){let t=!0,r=this.createDefFromColumn(n,e,i),l=n.getOriginalParent(),a=null;for(;l;){let e=null;if(l.isPadding()){l=l.getOriginalParent();continue}const i=o[l.getGroupId()];if(i){i.children.push(r),t=!1;break}if(e=this.createDefFromGroup(l),e&&(e.children=[r],o[e.groupId]=e,r=e,l=l.getOriginalParent()),null!=l&&a===l){t=!1;break}a=l}t&&s.push(r)}return s}createDefFromGroup(t){const e=mc(t.getColGroupDef(),["children"]);return e&&(e.groupId=t.getGroupId()),e}createDefFromColumn(t,e,i){const s=mc(t.getColDef());return s.colId=t.getColId(),s.width=t.getActualWidth(),s.rowGroup=t.isRowGroupActive(),s.rowGroupIndex=t.isRowGroupActive()?e.indexOf(t):null,s.pivot=t.isPivotActive(),s.pivotIndex=t.isPivotActive()?i.indexOf(t):null,s.aggFunc=t.isValueActive()?t.getAggFunc():null,s.hide=!t.isVisible()||void 0,s.pinned=t.isPinned()?t.getPinned():null,s.sort=t.getSort()?t.getSort():null,s.sortIndex=null!=t.getSortIndex()?t.getSortIndex():null,s}}],apiFunctions:{getColumnDef:function(t,e){const i=t.colModel.getColDefCol(e);return i?i.getColDef():null},getDisplayNameForColumn:function(t,e,i){return t.colNames.getDisplayNameForColumn(e,i)||""},getColumn:function(t,e){return t.colModel.getColDefCol(e)},getColumns:function(t){return t.colModel.getColDefCols()},applyColumnState:function(t,e){return Bi(t,e,"api")},getColumnState:function(t){return Vi(t)},resetColumnState:function(t){!function(t,e){const{colModel:i,autoColSvc:o,selectionColSvc:n,eventSvc:r,gos:l}=t,a=i.getColDefCols();if(!a?.length)return;const h=wi(i.getColDefColTree()),c=[];let u=1e3,d=1e3;const g=t=>{const e=Li(t);s(e.rowGroupIndex)&&e.rowGroup&&(e.rowGroupIndex=u++),s(e.pivotIndex)&&e.pivot&&(e.pivotIndex=d++),c.push(e)};o?.getColumns()?.forEach(g),n?.getColumns()?.forEach(g),h?.forEach(g),Bi(t,{state:c},e);const p=o?.getColumns()??[];Bi(t,{state:[...n?.getColumns()??[],...p,...a].map((t=>({colId:t.colId}))),applyOrder:!0},e),r.dispatchEvent(Qe(l,{type:"columnsReset",source:e}))}(t,"api")},isPinning:function(t){return t.visibleCols.isPinningLeft()||t.visibleCols.isPinningRight()},isPinningLeft:function(t){return t.visibleCols.isPinningLeft()},isPinningRight:function(t){return t.visibleCols.isPinningRight()},getDisplayedColAfter:function(t,e){return t.visibleCols.getColAfter(e)},getDisplayedColBefore:function(t,e){return t.visibleCols.getColBefore(e)},setColumnsVisible:function(t,e,i){t.colModel.setColsVisible(e,i,"api")},setColumnsPinned:function(t,e,i){t.pinnedCols?.setColsPinned(e,i,"api")},getAllGridColumns:function(t){return t.colModel.getCols()},getDisplayedLeftColumns:function(t){return t.visibleCols.leftCols},getDisplayedCenterColumns:function(t){return t.visibleCols.centerCols},getDisplayedRightColumns:function(t){return t.visibleCols.rightCols},getAllDisplayedColumns:function(t){return t.visibleCols.allCols},getAllDisplayedVirtualColumns:function(t){return t.colViewport.getViewportColumns()},getColumnDefs:function(t){return t.colModel.getColumnDefs(!0)}}},Pc={moduleName:"CellRendererFunction",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(t,e){return t.cellRenderer?class{refresh(){return!1}getGui(){return this.eGui}init(t){const i=e(t),s=typeof i;this.eGui="string"!==s&&"number"!==s&&"boolean"!==s?null!=i?i:mr({tag:"span"}):_("<span>"+i+"</span>")}}:null}}]},Dc={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:hn,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:un,rangeSelectionBackgroundColor:rn(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:rn(.5),rangeHeaderHighlightColor:{ref:"foregroundColor",mix:.08,onto:"headerBackgroundColor"},rowNumbersSelectedColor:rn(.5),rowHoverColor:rn(.08),columnHoverColor:rn(.05),selectedRowBackgroundColor:rn(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:hn,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:ln(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:ln(.1),iconButtonActiveColor:un,iconButtonActiveBackgroundColor:rn(.28),iconButtonActiveIndicatorColor:un,menuBorder:{color:ln(.2)},menuBackgroundColor:an(.03),menuTextColor:an(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:ln(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:un},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},dialogBorder:{color:ln(.2)},panelBackgroundColor:hn,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:ln(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:ln(.13)},selectCellBackgroundColor:ln(.07),selectCellBorder:{color:ln(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:hn,filterPanelApplyButtonBackgroundColor:un,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:cn,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:cn,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:ln(.15),statusBarLabelColor:cn,statusBarLabelFontWeight:500,statusBarValueColor:cn,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"}},Mc={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},Tc={...Mc,cellBatchEditTextColor:"#f3d0b3"},Ec=(()=>Xo({feature:"batchEditStyle",params:Mc,css:".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}"}))(),Ac={buttonTextColor:"inherit",buttonFontWeight:"normal",buttonBackgroundColor:"transparent",buttonBorder:!1,buttonBorderRadius:{ref:"borderRadius"},buttonHorizontalPadding:{calc:"spacing * 2"},buttonVerticalPadding:{ref:"spacing"},buttonHoverTextColor:{ref:"buttonTextColor"},buttonHoverBackgroundColor:{ref:"buttonBackgroundColor"},buttonHoverBorder:{ref:"buttonBorder"},buttonActiveTextColor:{ref:"buttonHoverTextColor"},buttonActiveBackgroundColor:{ref:"buttonHoverBackgroundColor"},buttonActiveBorder:{ref:"buttonHoverBorder"},buttonDisabledTextColor:{ref:"inputDisabledTextColor"},buttonDisabledBackgroundColor:{ref:"inputDisabledBackgroundColor"},buttonDisabledBorder:{ref:"inputDisabledBorder"}},Ic=(()=>Xo({feature:"buttonStyle",params:{...Ac,buttonBackgroundColor:hn,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:un}},css:":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}"}))(),Hc=(()=>Xo({feature:"columnDropStyle",css:".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}"}))(),Oc={warn:(...t)=>{pe(t[0],t[1])},error:(...t)=>{fe(t[0],t[1])},preInitErr:(...t)=>{me(t[0],t[2],t[1])}},Nc=(()=>Xo({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:hn,checkboxUncheckedBorderColor:an(.3),checkboxCheckedBackgroundColor:un,checkboxCheckedBorderColor:{ref:"checkboxCheckedBackgroundColor"},checkboxCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>'},checkboxCheckedShapeColor:hn,checkboxIndeterminateBackgroundColor:an(.3),checkboxIndeterminateBorderColor:{ref:"checkboxIndeterminateBackgroundColor"},checkboxIndeterminateShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>'},checkboxIndeterminateShapeColor:hn,radioCheckedShapeImage:{svg:'<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>'}},css:'.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}'}))(),Bc=()=>({...dn,...Tc,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:an(.05),rowHoverColor:rn(.15),selectedRowBackgroundColor:rn(.2),menuBackgroundColor:an(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:cn,findMatchColor:hn,findActiveMatchColor:hn,checkboxUncheckedBorderColor:an(.4),toggleButtonOffBackgroundColor:an(.4),rowBatchEditBackgroundColor:an(.1)}),Gc=(()=>Xo({feature:"colorScheme",params:dn,modeParams:{light:dn,dark:Bc(),"dark-blue":{...Bc(),backgroundColor:"#1f2836"}}}))(),Vc={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},Lc={"column-arrow":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>',"small-down":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>',"small-up":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>',"pinned-top":'<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>',"pinned-bottom":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>',"un-pin":'<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>'},zc=(t,e=1.5)=>{const i=Lc[t];if(i)return i;const s=Vc[t];if(!s)throw new Error(`Missing icon data for ${t}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${e}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+s+"</svg>"},$c=((t={})=>Xo({feature:"iconSet",css:()=>((t={})=>{let e="";for(const i of[...Object.keys(Vc),...Object.keys(Lc)]){const s=zc(i,t.strokeWidth);e+=`.ag-icon-${i}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(s)}'); }\n`}return e})(t)}))(),Wc={inputBackgroundColor:"transparent",inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:"textColor"},inputPlaceholderTextColor:{ref:"inputTextColor",mix:.5},inputPaddingStart:0,inputHeight:{calc:"max(iconSize, fontSize) + spacing * 2"},inputFocusBackgroundColor:{ref:"inputBackgroundColor"},inputFocusBorder:{ref:"inputBorder"},inputFocusShadow:"none",inputFocusTextColor:{ref:"inputTextColor"},inputDisabledBackgroundColor:{ref:"inputBackgroundColor"},inputDisabledBorder:{ref:"inputBorder"},inputDisabledTextColor:{ref:"inputTextColor"},inputInvalidBackgroundColor:{ref:"inputBackgroundColor"},inputInvalidBorder:{ref:"inputBorder"},inputInvalidTextColor:{ref:"inputTextColor"},inputIconColor:{ref:"inputTextColor"},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:"inputFocusBorder"},pickerButtonBackgroundColor:{ref:"backgroundColor"},pickerButtonFocusBackgroundColor:{ref:"backgroundColor"},pickerListBorder:!1,pickerListBackgroundColor:{ref:"backgroundColor"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},Uc=(()=>Xo({feature:"inputStyle",params:{...Wc,inputBackgroundColor:hn,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:un},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:an(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>':where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter,.ag-filter-add-select){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}'}))(),jc={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},Kc=(()=>Xo({feature:"tabStyle",params:{...jc,tabBarBorder:!0,tabBarBackgroundColor:ln(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:hn},css:'.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}'}))(),qc=(()=>{return(t=Oc,new kn(t)).withParams(Dc).withPart(Ic).withPart(Hc).withPart(Ec).withPart(Nc).withPart(Gc).withPart($c).withPart(Kc).withPart(Uc).withPart(Hc).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]});var t})(),Zc={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},_c={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},Yc={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},Qc={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},Jc={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},Xc={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},tu={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},eu={cssName:"--ag-pinned-row-border",changeKey:"pinnedRowBorderWidthChanged",defaultValue:1,border:!0},iu=15538;function su(t,e,i){const s=t.visibleCols.headerGroupRowCount;if(i>=s)return{column:e,headerRowIndex:i};let o=e.getParent();for(;o&&o.getProvidedColumnGroup().getLevel()>i;)o=o.getParent();const n=e.isSpanHeaderHeight();return!o||n&&o.isPadding()?{column:e,headerRowIndex:s}:{column:o,headerRowIndex:o.getProvidedColumnGroup().getLevel()}}var ou=new Set(["gridPreDestroyed","fillStart","pasteStart"]),nu=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","pinnedRowsChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterUiChanged","filterOpened","floatingFilterUiChanged","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged","rowResizeStarted","rowResizeEnded","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"].reduce(((t,e)=>{var i;return t[e]=!(i=e)||i.length<2?i:"on"+i[0].toUpperCase()+i.substring(1),t}),{}),ru=(t,e)=>({tag:"span",ref:`eSort${t}`,cls:`ag-sort-indicator-icon ag-sort-${e} ag-hidden`,attrs:{"aria-hidden":"true"}}),lu={tag:"span",cls:"ag-sort-indicator-container",children:[ru("Order","order"),ru("Asc","ascending-icon"),ru("Desc","descending-icon"),ru("Mixed","mixed-icon"),ru("None","none-icon")]},au=class extends _i{constructor(t){super(),this.eSortOrder=Ui,this.eSortAsc=Ui,this.eSortDesc=Ui,this.eSortMixed=Ui,this.eSortNone=Ui,t||this.setTemplate(lu)}attachCustomElements(t,e,i,s,o){this.eSortOrder=t,this.eSortAsc=e,this.eSortDesc=i,this.eSortMixed=s,this.eSortNone=o}setupSort(t,e=!1){if(this.column=t,this.suppressOrder=e,this.setupMultiSortIndicator(),!t.isSortable()&&!t.getColDef().showRowGroup)return;this.addInIcon("sortAscending",this.eSortAsc,t),this.addInIcon("sortDescending",this.eSortDesc,t),this.addInIcon("sortUnSort",this.eSortNone,t);const i=this.updateIcons.bind(this),s=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:s,columnRowGroupChanged:s}),this.onSortChanged()}addInIcon(t,e,i){if(null==e)return;const s=Ca(t,this.beans,i);s&&e.appendChild(s)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:t,eSortDesc:e,eSortNone:i,column:s,gos:o,beans:n}=this,r=n.sortSvc.getDisplaySortForColumn(s);t&&H(t,"asc"===r,{skipAriaHidden:!0}),e&&H(e,"desc"===r,{skipAriaHidden:!0}),i&&H(i,!(!s.getColDef().unSortIcon&&!o.get("unSortIcon"))&&null==r,{skipAriaHidden:!0})}setupMultiSortIndicator(){const{eSortMixed:t,column:e,gos:i}=this;this.addInIcon("sortUnSort",t,e);const s=e.getColDef().showRowGroup;Ee(i)&&s&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:t,beans:e,column:i}=this;t&&H(t,"mixed"===e.sortSvc.getDisplaySortForColumn(i),{skipAriaHidden:!0})}updateSortOrder(){const{eSortOrder:t,column:e,beans:{sortSvc:i}}=this;if(!t)return;const s=i.getColumnsWithSortingOrdered(),o=i.getDisplaySortIndexForColumn(e)??-1,n=s.some((t=>i.getDisplaySortIndexForColumn(t)??!1));H(t,o>=0&&n,{skipAriaHidden:!0}),o>=0?t.textContent=(o+1).toString():j(t)}},hu={selector:"AG-SORT-INDICATOR",component:au},cu=["asc","desc",null],uu={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function du(t){return`"${t}"`}var gu={aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:t,editable:e})=>e?"string"==typeof t?uu[t]??"CustomEditor":"CustomEditor":null,cellRenderer:({cellRenderer:t})=>"string"!=typeof t?null:uu[t],cellStyle:"CellStyle",columnChooserParams:"ColumnMenu",contextMenuItems:"ContextMenu",dndSource:"DragAndDrop",dndSourceOnRowDrag:"DragAndDrop",editable:({editable:t,cellEditor:e})=>t&&!e?"TextEditor":null,enableCellChangeFlash:"HighlightChanges",enablePivot:"SharedPivot",enableRowGroup:"SharedRowGrouping",enableValue:"SharedAggregation",filter:({filter:t})=>t&&"string"!=typeof t&&"boolean"!=typeof t?"CustomFilter":"string"==typeof t?uu[t]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:t=>{const e=["columnsMenuTab","generalMenuTab"];return t.menuTabs?.some((t=>e.includes(t)))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},pu={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0},fu=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],mu=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],wu=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],vu=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],Cu=["theme","rowSelection"],bu=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],yu=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows"],Su=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter","isRowPinnable","isRowPinned","isRowValidDropPosition"];function xu(t,e,i){return"number"==typeof e||null==e?null==e||e>=i?null:`${t}: value should be greater than or equal to ${i}`:`${t}: value should be a number`}var Ru={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"PinnedRow",localeText:"Locale",masterDetail:"SharedMasterDetail",pagination:"Pagination",pinnedBottomRowData:"PinnedRow",pinnedTopRowData:"PinnedRow",pivotMode:"SharedPivot",pivotPanelShow:"RowGroupingPanel",quickFilterText:"QuickFilter",rowClass:"RowStyle",rowClassRules:"RowStyle",rowData:"ClientSideRowModel",rowDragManaged:"RowDrag",rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},Fu=()=>{const t={autoSizePadding:{validate:({autoSizePadding:t})=>xu("autoSizePadding",t,0)},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate:({cacheBlockSize:t})=>xu("cacheBlockSize",t,1)},cacheOverflowSize:{validate:({cacheOverflowSize:t})=>xu("cacheOverflowSize",t,1)},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:t=>{const e=t.domLayout,i=["autoHeight","normal","print"];return e&&!i.includes(e)?`domLayout must be one of [${i.join()}], currently it's ${e}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate:({enableRowPinning:t,pinnedTopRowData:e,pinnedBottomRowData:i})=>t&&(e||i)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null},isRowPinnable:{supportedRowModels:["clientSide"],validate:({enableRowPinning:t,isRowPinnable:e,pinnedTopRowData:i,pinnedBottomRowData:s})=>e&&(i||s)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!t&&e?"`isRowPinnable` requires `enableRowPinning` to be set.":null},isRowPinned:{supportedRowModels:["clientSide"],validate:({enableRowPinning:t,isRowPinned:e,pinnedTopRowData:i,pinnedBottomRowData:s})=>e&&(i||s)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!t&&e?"`isRowPinned` requires `enableRowPinning` to be set.":null},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:t={}},e,i){for(const e of Object.keys(t))i.validation?.validateColDef(t[e]);return null}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return we(262);if(t.smallLeft)return we(263);if(t.smallRight)return we(264)}return null}},infiniteInitialRowCount:{validate:({infiniteInitialRowCount:t})=>xu("infiniteInitialRowCount",t,1)},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:t=>{if("boolean"==typeof t.ssrmExpandAllAffectsAllRows){if("serverSide"!==t.rowModelType)return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(t.ssrmExpandAllAffectsAllRows&&"function"!=typeof t.getRowId)return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate:({keepDetailRowsCount:t})=>xu("keepDetailRowsCount",t,1)},paginationPageSize:{validate:({paginationPageSize:t})=>xu("paginationPageSize",t,1)},paginationPageSizeSelector:{validate:t=>{const e=t.paginationPageSizeSelector;return"boolean"==typeof e||null==e||e.length?null:"'paginationPageSizeSelector' cannot be an empty array.\n If you want to hide the page size selector, set paginationPageSizeSelector to false."}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}}},quickFilterText:{supportedRowModels:["clientSide"]},rowBuffer:{validate:({rowBuffer:t})=>xu("rowBuffer",t,0)},rowClass:{validate:t=>"function"==typeof t.rowClass?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate:({rowSelection:t})=>t&&"string"==typeof t?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':t&&"object"!=typeof t?"Expected `RowSelectionOptions` object for the `rowSelection` property.":t&&"multiRow"!==t.mode&&"singleRow"!==t.mode?`Selection mode "${t.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null},rowStyle:{validate:t=>{const e=t.rowStyle;return e&&"function"==typeof e?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null}},serverSideDatasource:{supportedRowModels:["serverSide"]},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate:({serverSideInitialRowCount:t})=>xu("serverSideInitialRowCount",t,1)},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:t=>{const e=t.sortingOrder;if(Array.isArray(e)&&e.length>0){const t=e.filter((t=>!cu.includes(t)));if(t.length>0)return`sortingOrder must be an array with elements from [${cu.map(ce).join()}], currently it includes [${t.map(ce).join()}]`}else if(!Array.isArray(e)||e.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${e}`;return null}},tooltipHideDelay:{validate:t=>t.tooltipHideDelay&&t.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:t=>t.tooltipShowDelay&&t.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:t=>{const e=t.rowModelType??"clientSide";switch(e){case"clientSide":{const{treeDataChildrenField:e,treeDataParentIdField:i,getDataPath:s,getRowId:o}=t;if(!e&&!i&&!s)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(e){if(s)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(i)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(i){if(!o)return"getRowId callback not provided, tree data with parent id cannot be built.";if(s)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":return t.isServerSideGroup&&t.getServerSideGroupKey?null:`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${e} row model.`}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate:({viewportRowModelBufferSize:t})=>xu("viewportRowModelBufferSize",t,0)},viewportRowModelPageSize:{validate:({viewportRowModelPageSize:t})=>xu("viewportRowModelPageSize",t,1)},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate:({autoGroupColumnDef:t,showOpenedGroup:e})=>t?.field&&e?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":t?.valueGetter&&e?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null},renderingMode:{validate:t=>{const e=t.renderingMode,i=["default","legacy"];return e&&!i.includes(e)?`renderingMode must be one of [${i.join()}], currently it's ${e}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:t})=>{if(!t)return null;const e=t.type;return"fitCellContents"!==e&&"fitGridWidth"!==e&&"fitProvidedWidth"!==e?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${["fitCellContents","fitGridWidth","fitProvidedWidth"].map((t=>'"'+t+'"')).join(", ")}, currently it's ${e}`:"fitProvidedWidth"===e&&"number"!=typeof t.width?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${t.width}`:null}}},e={};for(const t of yu)e[t]={expectedType:"boolean"};for(const t of vu)e[t]={expectedType:"number"};return Bt(e,t),e},ku=0,Pu=0,Du="__ag_grid_instance";function Mu(t){const e={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:e},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:e},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:e},t?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var Tu=Mu(!0),Eu=Mu(!1),Au={tag:"div",cls:"ag-header-group-cell-label",role:"presentation",children:[{tag:"span",ref:"agLabel",cls:"ag-header-group-text",role:"presentation"},{tag:"span",ref:"agOpened",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"},{tag:"span",ref:"agClosed",cls:"ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"}]},Iu={moduleName:"ColumnHeaderComp",version:se,userComponents:{agColumnHeader:class extends _i{constructor(){super(...arguments),this.eFilter=Ui,this.eFilterButton=Ui,this.eSortIndicator=Ui,this.eMenu=Ui,this.eLabel=Ui,this.eText=Ui,this.eSortOrder=Ui,this.eSortAsc=Ui,this.eSortDesc=Ui,this.eSortMixed=Ui,this.eSortNone=Ui,this.isLoadingInnerComponent=!1}refresh(t){const e=this.params;if(this.params=t,this.workOutTemplate(t,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||t.enableSorting!=this.currentSort||null!=this.currentSuppressMenuHide&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||e.enableFilterButton!=t.enableFilterButton||e.enableFilterIcon!=t.enableFilterIcon)return!1;if(this.innerHeaderComponent){const e={...t};Bt(e,t.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(e)}else this.setDisplayName(t);return!0}workOutTemplate(t,e){const i=t.template;return i?i?.trim?i.trim():i:e?Tu:Eu}init(t){this.params=t;const{sortSvc:e,touchSvc:i,rowNumbersSvc:s,userCompFactory:o}=this.beans,n=e?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(t,!!n),this.setTemplate(this.currentTemplate,n?[n]:void 0),i?.setupForHeader(this),this.setMenu(),this.setupSort(),s?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(o,t),this.setDisplayName(t)}workOutInnerHeaderComponent(t,e){const i=function(t,e,i){return t.getCompDetails(e,is,void 0,i)}(t,e,e);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then((t=>{this.isLoadingInnerComponent=!1,t&&(this.isAlive()?(this.innerHeaderComponent=t,this.eText&&this.eText.appendChild(t.getGui())):this.destroyBean(t))})))}setDisplayName(t){const{displayName:e}=t,i=this.currentDisplayName;this.currentDisplayName=e,!this.eText||i===e||this.innerHeaderComponent||this.isLoadingInnerComponent||(this.eText.textContent=h(e))}addInIcon(t,e,i){const s=Ca(t,this.beans,i);s&&e.appendChild(s)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu)return K(this.eMenu),void(this.eMenu=void 0);const{gos:t,eMenu:e,params:i}=this,s=Ye(t);this.addInIcon(s?"menu":"menuAlt",e,i.column),e.classList.toggle("ag-header-menu-icon",!s);const o=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=o,this.addManagedElementListeners(e,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(o)}toggleMenuAlwaysShow(t){this.eMenu?.classList.toggle("ag-header-menu-always-show",t)}showColumnMenu(t){const{currentSuppressMenuHide:e,params:i}=this;e||this.toggleMenuAlwaysShow(!0),i.showColumnMenu(t,(()=>{e||this.toggleMenuAlwaysShow(!1)}))}onMenuKeyboardShortcut(t){const{params:e,gos:i,beans:s,eMenu:o,eFilterButton:n}=this,r=e.column,l=Ye(i);if(t&&!l){if(s.menuSvc?.isFilterMenuInHeaderEnabled(r))return e.showFilter(n??o??this.getGui()),!0}else if(e.enableMenu)return this.showColumnMenu(o??n??this.getGui()),!0;return!1}setupSort(){const{sortSvc:t}=this.beans;if(!t)return;const{enableSorting:e,column:i}=this.params;if(this.currentSort=e,!this.eSortIndicator){this.eSortIndicator=this.createBean(t.createSortIndicator(!0));const{eSortIndicator:e,eSortOrder:i,eSortAsc:s,eSortDesc:o,eSortMixed:n,eSortNone:r}=this;e.attachCustomElements(i,s,o,n,r)}this.eSortIndicator.setupSort(i),this.currentSort&&t.setupHeader(this,i,this.eLabel)}setupFilterIcon(){const{eFilter:t,params:e}=this;t&&this.configureFilter(e.enableFilterIcon,t,(()=>{const i=e.column.isFilterActive();H(t,i,{skipAriaHidden:!0})}),"filterActive")}setupFilterButton(){const{eFilterButton:t,params:e}=this;t&&(this.configureFilter(e.enableFilterButton,t,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(t,{click:()=>e.showFilter(t)}):this.eFilterButton=void 0)}configureFilter(t,e,i,s){if(!t)return K(e),!1;const o=this.params.column;return this.addInIcon(s,e,o),this.addManagedListeners(o,{filterChanged:i}),i(),!0}onFilterChangedButton(){const t=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",t)}getAnchorElementForMenu(t){const{eFilterButton:e,eMenu:i}=this;return t?e??i??this.getGui():i??e??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}}},icons:{menu:"menu",menuAlt:"menu-alt"}},Hu={moduleName:"ColumnGroupHeaderComp",version:se,userComponents:{agColumnGroupHeader:class extends _i{constructor(){super(Au),this.agOpened=Ui,this.agClosed=Ui,this.agLabel=Ui,this.isLoadingInnerComponent=!1}init(t){const{userCompFactory:e,touchSvc:i}=this.beans;this.params=t,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(e,t),this.setupLabel(t),this.addGroupExpandIcon(t),this.setupExpandIcons(),i?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&pe(89)}workOutInnerHeaderGroupComponent(t,e){const i=function(t,e,i){return t.getCompDetails(e,ss,void 0,i)}(t,e,e);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then((t=>{this.isLoadingInnerComponent=!1,t&&(this.isAlive()?(this.innerHeaderGroupComponent=t,this.agLabel.appendChild(t.getGui())):this.destroyBean(t))})))}setupExpandIcons(){const{agOpened:t,agClosed:e,params:{columnGroup:i},beans:s}=this;this.addInIcon("columnGroupOpened",t),this.addInIcon("columnGroupClosed",e);const o=t=>{if(Vr(t))return;const e=!i.isExpanded();s.colGroupSvc.setColumnGroupOpened(i.getProvidedColumnGroup(),e,"uiColumnExpanded")};this.addTouchAndClickListeners(s,e,o),this.addTouchAndClickListeners(s,t,o);const n=t=>{Gr(t)};this.addManagedElementListeners(e,{dblclick:n}),this.addManagedElementListeners(t,{dblclick:n}),this.addManagedElementListeners(this.getGui(),{dblclick:o}),this.updateIconVisibility();const r=i.getProvidedColumnGroup(),l=this.updateIconVisibility.bind(this);this.addManagedListeners(r,{expandedChanged:l,expandableChanged:l})}addTouchAndClickListeners(t,e,i){t.touchSvc?.setupForHeaderGroupElement(this,e,i),this.addManagedElementListeners(e,{click:i})}updateIconVisibility(){const{agOpened:t,agClosed:e,params:{columnGroup:i}}=this;if(i.isExpandable()){const s=i.isExpanded();H(t,s),H(e,!s)}else H(t,!1),H(e,!1)}addInIcon(t,e){const i=Ca(t,this.beans,null);i&&e.appendChild(i)}addGroupExpandIcon(t){if(!t.columnGroup.isExpandable()){const{agOpened:t,agClosed:e}=this;H(t,!1),H(e,!1)}}setupLabel(t){const{displayName:e,columnGroup:s}=t,o=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;i(e)&&!o&&(this.agLabel.textContent=h(e)),this.toggleCss("ag-sticky-label",!s.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}}},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},Ou={moduleName:"AnimationFrame",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(t){this.scrollGoingDown=t>=this.lastScrollTop,0===t&&(this.scrollGoingDown=!0),this.lastScrollTop=t}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){!1===this.active&&pe(92)}createTask(t,e,i,s,o=!1){this.verify();let n=i;s&&this.batchFrameworkComps&&(n="f1");const r={task:t,index:e,createOrder:++this.taskCount,deferred:o};this.addTaskToList(this[n],r),this.schedule()}addTaskToList(t,e){t.list.push(e),t.sorted=!1}sortTaskList(t){if(t.sorted)return;const e=this.scrollGoingDown?1:-1;t.list.sort(((t,i)=>t.deferred!==i.deferred?t.deferred?-1:1:t.index!==i.index?e*(i.index-t.index):i.createOrder-t.createOrder)),t.sorted=!0}addDestroyTask(t){this.verify(),this.destroyTasks.push(t),this.schedule()}executeFrame(t){const{p1:e,p2:i,f1:s,destroyTasks:o,beans:n}=this,{ctrlsSvc:r,frameworkOverrides:l}=n,a=e.list,h=i.list,c=s.list,u=Date.now();let d=0;const g=t<=0,p=r.getScrollFeature();for(;g||d<t;){if(!p.scrollGridIfNeeded()){let n;if(a.length)this.sortTaskList(e),n=a.pop().task;else if(h.length)this.sortTaskList(i),n=h.pop().task;else if(c.length)l.wrapOutgoing((()=>{for(;(g||d<t)&&!p.scrollGridIfNeeded()&&c.length;)this.sortTaskList(s),n=c.pop().task,n(),d=Date.now()-u})),n=()=>{};else{if(!o.length)break;n=o.pop()}n()}d=Date.now()-u}a.length||h.length||c.length||o.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){const t=this.executeFrame.bind(this,60);ht(this.beans,t)}isQueueEmpty(){return!this.ticking}}]},Nu={moduleName:"Touch",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="touchSvc"}mockBodyContextMenu(t,e){this.mockContextMenu(t,t.eBodyViewport,e)}mockHeaderContextMenu(t,e){this.mockContextMenu(t,t.eGui,e)}mockRowContextMenu(t){eo()&&this.mockContextMenu(t,t.element,((e,i,s)=>{const{rowCtrl:o,cellCtrl:n}=t.getControlsForEventTarget(s?.target??null);n?.column&&n.dispatchCellContextMenuEvent(s??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,s,o,n)}))}handleCellDoubleClick(t,e){return!!(()=>{if(!eo()||wt("dblclick"))return!1;const e=Date.now(),i=e-t.lastIPadMouseClickEvent<200;return t.lastIPadMouseClickEvent=e,i})()&&(t.onCellDoubleClicked(e),e.preventDefault(),!0)}setupForHeader(t){const{gos:e,sortSvc:s,menuSvc:o}=this.beans;if(e.get("suppressTouch"))return;const{params:n,eMenu:r,eFilterButton:l}=t,a=new _a(t.getGui(),!0);t.addDestroyFunc((()=>a.destroy()));const h=t.shouldSuppressMenuHide(),c=h&&i(r)&&n.enableMenu;let u=a;if(c&&(u=new _a(r,!0),t.addDestroyFunc((()=>u.destroy()))),n.enableMenu||o?.isHeaderContextMenuEnabled(n.column)){const e=c?"tap":"longTap",i=t=>n.showColumnMenuAfterMouseClick(t.touchStart);t.addManagedListeners(u,{[e]:i}),t.addManagedListeners(a,{longTap:i})}if(n.enableSorting&&t.addManagedListeners(a,{tap:t=>{const e=t.touchStart.target;h&&(r?.contains(e)||l?.contains(e))||s?.progressSort(n.column,!1,"uiColumnSorted")}}),n.enableFilterButton&&l){const e=new _a(l,!0);t.addManagedListeners(e,{tap:()=>n.showFilter(l)}),t.addDestroyFunc((()=>e.destroy()))}}setupForHeaderGroup(t){const e=t.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(e.columnGroup.getProvidedColumnGroup())){const i=new _a(e.eGridHeader,!0);t.addManagedListeners(i,{longTap:t=>e.showColumnMenuAfterMouseClick(t.touchStart)}),t.addDestroyFunc((()=>i.destroy()))}}setupForHeaderGroupElement(t,e,i){const s=new _a(e,!0);t.addManagedListeners(s,{tap:i}),t.addDestroyFunc((()=>s.destroy()))}mockContextMenu(t,e,i){if(!eo())return;const s=new _a(e);t.addManagedListeners(s,{longTap:t=>{yt(this.beans,t.touchEvent)&&i(void 0,t.touchStart,t.touchEvent)}}),t.addDestroyFunc((()=>s.destroy()))}}]},Bu=class{constructor(){this.cellValidations=new Map}getCellValidation(t){const{rowNode:e,column:i}=t||{};return this.cellValidations?.get(e)?.get(i)}hasCellValidation(t){return t?.rowNode&&t.column?!!this.getCellValidation(t):this.cellValidations.size>0}setCellValidation(t,e){const{rowNode:i,column:s}=t;this.cellValidations.has(i)||this.cellValidations.set(i,new Map),this.cellValidations.get(i).set(s,e)}clearCellValidation(t){const{rowNode:e,column:i}=t;this.cellValidations.get(e)?.delete(i)}setCellValidationMap(t){this.cellValidations=t}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},Gu=class{constructor(){this.rowValidations=new Map}getRowValidation(t){const{rowNode:e}=t||{};return this.rowValidations.get(e)}hasRowValidation(t){return t?.rowNode?!!this.getRowValidation(t):this.rowValidations.size>0}setRowValidation({rowNode:t},e){this.rowValidations.set(t,e)}clearRowValidation({rowNode:t}){this.rowValidations.delete(t)}setRowValidationMap(t){this.rowValidations=t}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function Vu(t,e={}){const{rowIndex:i,rowId:s,rowCtrl:o,rowPinned:n}=e;if(o)return o;const{rowModel:r,rowRenderer:l}=t;let{rowNode:a}=e;return a||(s?a=function(t,e,i){const{rowModel:s,pinnedRowModel:o}=t;let n;return n??(n=s?.getRowNode(e)),i?n??(n=o?.getPinnedRowById(e,i)):(n??(n=o?.getPinnedRowById(e,"top")),n??(n=o?.getPinnedRowById(e,"bottom"))),n}(t,s,n):null!=i&&(a=r.getRow(i))),l.getRowCtrls(a?[a]:[])?.[0]}function Lu(t,e={}){const{cellCtrl:i,colId:s,columnId:o,column:n}=e;if(i)return i;const r=t.colModel.getCol(s??o??$u(n)),l=e.rowCtrl??Vu(t,e),a=l?.getCellCtrl(r)??void 0;if(a)return a;const h=e.rowNode??l?.rowNode;return h?t.rowRenderer.getCellCtrls([h],[r])?.[0]:void 0}function zu(t){const{editSvc:e}=t;e?.isBatchEditing()?Xu(t):e?.stopEditing(void 0,{source:"api"})}function $u(t){if(t)return"string"==typeof t?t:t.getColId()}var Wu=Symbol("unedited");function Uu(t,e={}){const i=[],s=t.rowRenderer.getCellCtrls(e.rowNodes,e.columns);for(const t of s){const e=t.comp?.getCellEditor();e&&i.push({ctrl:t,editor:Ss(e)})}return i}function ju({pendingValue:t,sourceValue:e}){return t===Wu&&(t=e),t!==e}function Ku(t,e,i){const s=t.gos.get("enableGroupEdit"),{key:o,event:n,cellStartedEdit:r,silent:l}=i??{},a=Lu(t,e),h=a?.comp?.getCellEditor(),c=Zu(t,e,o,r&&!l),u=t.editModelSvc?.getEdit(e);let d=c.value;if(void 0===d&&(d=u?.sourceValue),t.editModelSvc?.setEdit(e,{editorValue:d,state:"editing"}),h)return void h.refresh?.(c);const g=e.column.getColDef(),p=Cs(t.userCompFactory,g,c),f=null!=p?.popupFromSelector?p.popupFromSelector:!!g.cellEditorPopup,m=null!=p?.popupPositionFromSelector?p.popupPositionFromSelector:g.cellEditorPopupPosition;if(Yu(p.params,n),a){a.editCompDetails=p,a.onEditorAttachedFuncs.push((()=>a.rangeFeature?.unsetComp())),a.comp?.setEditDetails(p,f,m,t.gos.get("reactiveCustomComponents")),a?.rowCtrl?.refreshRow({suppressFlash:!0});const i=t.editModelSvc?.getEdit(e,!0);l||i?.editorState?.cellStartedEditing||(t.editSvc?.dispatchCellEvent(e,n,"cellEditingStarted",s?{value:d}:{}),t.editModelSvc?.setEdit(e,{editorState:{cellStartedEditing:!0}}))}}function qu(t,e,i){const s={editorValueExists:!1};if(sd(t)){const t=e.getValidationErrors?.();if((t?.length??0)>0)return s}if(i?.isCancelling)return s;if(i?.isStopping){const t=e?.isCancelAfterEnd?.();if(t)return{...s,isCancelAfterEnd:t}}return{editorValue:e.getValue(),editorValueExists:!0}}function Zu(t,e,i,s){const{valueSvc:o,gos:n,editSvc:r}=t,l=t.gos.get("enableGroupEdit"),a=Lu(t,e),h=e.rowNode?.rowIndex??void 0,c=r?.isBatchEditing(),u=t.colModel.getCol(e.column.getId()),{rowNode:d,column:g}=e,p=a.comp?.getCellEditor(),f=r?.getCellDataValue(e,!1),m=void 0===f?p?qu(t,p)?.editorValue:void 0:f,w=m===Wu?o.getValueForDisplay(u,d)?.value:m;return Qe(n,{value:l?m:w,eventKey:i??null,column:g,colDef:g.getColDef(),rowIndex:h,node:d,data:d.data,cellStartedEdit:s??!1,onKeyDown:a?.onKeyDown.bind(a),stopEditing:i=>{r.stopEditing(e,{source:c?"ui":"api",suppressNavigateAfterEdit:i}),td(t,e)},eGridCell:a?.eGui,parseValue:t=>o.parseValue(u,d,t,a?.value),formatValue:a?.formatValue.bind(a),validate:()=>{r?.validateEdit()}})}function _u(t,e){const{editModelSvc:i}=t;i?.getEditMap().forEach(((t,s)=>{t.forEach(((t,o)=>{(e||"editing"!==t.state&&t.pendingValue!==Wu)&&(ju(t)||"editing"===t.state&&!e||i?.removeEdits({rowNode:s,column:o}))}))}))}function Yu(t,e){return e instanceof KeyboardEvent&&"agNumberCellEditor"===t.column.getColDef().cellEditor?t.suppressPreventDefault=["-","+",".","e"].includes(e?.key??"")||t.suppressPreventDefault:e?.preventDefault?.(),t}function Qu(t,e){for(const i of t.editModelSvc?.getEditPositions()??[]){const s=Lu(t,i);if(!s)continue;const o=s.comp?.getCellEditor();if(!o)continue;const{editorValue:n,editorValueExists:r,isCancelAfterEnd:l}=qu(t,o,e);l&&t.editModelSvc?.setEdit(i,{editorState:{isCancelAfterEnd:l}}),Ju(t,i,n,0,!r,e)}}function Ju(t,e,i,s,o,n){const{editModelSvc:r,valueSvc:l}=t;if(!r)return;const{rowNode:a,column:h}=e;if(!a||!h)return;let c=r.getEdit(e,!0);c?.sourceValue||(c=r.setEdit(e,{sourceValue:l.getValue(h,a,void 0,"api"),pendingValue:c?c.editorValue:Wu})),r.setEdit(e,{editorValue:o?c.sourceValue:i}),n?.persist&&function(t,e){const{editModelSvc:i}=t,s=i?.getEdit(e,!0);i?.setEdit(e,{pendingValue:s?.editorValue})}(t,e)}function Xu(t,e,i){e||(e=t.editModelSvc?.getEditPositions());for(const s of e??[])td(t,s,i)}function td(t,e,i){const s=t.gos.get("enableGroupEdit"),{editModelSvc:o}=t,n=Lu(t,e),r=o?.getEdit(e,!0);if(!n)return void(r&&o?.setEdit(e,{state:"changed"}));const{comp:l}=n;if(l&&!l.getCellEditor())return n?.refreshCell(),void(r&&(o?.setEdit(e,{state:"changed"}),id(t,e,s?ed(i,r):{valueChanged:!1,newValue:void 0,oldValue:r.sourceValue},i)));if(sd(t)){const t=l?.getCellEditor()?.getValidationErrors?.(),i=o?.getCellValidationModel();t?.length?i?.setCellValidation(e,{errorMessages:t}):i?.clearCellValidation(e)}o?.setEdit(e,{state:"changed"}),l?.setEditDetails(),l?.refreshEditStyles(!1,!1),n?.refreshCell({force:!0,suppressFlash:!0});const a=o?.getEdit(e);a&&"changed"===a.state&&id(t,e,s?ed(i,a):{valueChanged:ju(a)&&!i?.cancel,newValue:i?.cancel||a.editorState.isCancelAfterEnd?void 0:a?.editorValue??r?.pendingValue,oldValue:a?.sourceValue},i)}function ed(t,e){return t?.cancel?{valueChanged:!1,oldValue:e.sourceValue,newValue:void 0,value:e.sourceValue}:{valueChanged:!1,oldValue:e.sourceValue,newValue:e.pendingValue,value:e.sourceValue}}function id(t,e,i,{silent:s,event:o}={}){const{editSvc:n,editModelSvc:r}=t,l=r?.getEdit(e),{editorState:a}=l||{},{isCancelBeforeStart:h}=a||{};s||h||(n?.dispatchCellEvent(e,o,"cellEditingStopped",i),r?.setEdit(e,{editorState:{cellStoppedEditing:!0}}))}function sd(t){const{gos:e,colModel:i}=t,s=!!e.get("getFullRowEditValidationErrors"),o=i.getColumnDefs()?.filter((t=>t.editable)).some((({cellEditorParams:t})=>{const{minLength:e,maxLength:i,getValidationErrors:s,min:o,max:n}=t||{};return void 0!==e||void 0!==i||void 0!==s||void 0!==o||void 0!==n})),n=t.gridApi.getCellEditorInstances().some((t=>t.getValidationElement||t.getValidationErrors));return o||s||n}function od(t,e){if(!e&&!sd(t))return;const i=Uu(t),s=new Bu,{ariaAnnounce:o,localeSvc:n,editModelSvc:r,gos:l}=t,a="fullRow"===l.get("editType"),h=kt(n)("ariaValidationErrorPrefix","Cell Editor Validation");for(const t of i){const{ctrl:e,editor:i}=t,{rowNode:n,column:r}=e,l=i.getValidationErrors?.()??[],a=i.getValidationElement?.(!1)||!i.isPopup?.()&&e.eGui;if(a){const t=null!=l&&l.length>0,e=t?l.join(". "):"";w(a,"invalid",t),t&&o.announceValue(`${h} ${l}`,"editorValidation"),a instanceof HTMLInputElement?a.setCustomValidity(e):a.classList.toggle("invalid",t)}l?.length>0&&s.setCellValidation({rowNode:n,column:r},{errorMessages:l})}Qu(t,{persist:!1}),r?.setCellValidationModel(s);const c=new Set;for(const{ctrl:t}of i)c.add(t.rowCtrl);if(a){const e=nd(t);r?.setRowValidationModel(e)}for(const t of c.values()){t.rowEditStyleFeature?.applyRowStyles();for(const e of t.getAllCellCtrls())e.tooltipFeature?.refreshTooltip(!0),e.editorTooltipFeature?.refreshTooltip(!0),e.editStyleFeature?.applyCellStyles?.()}}var nd=t=>{const e=new Gu,i=t.gos.get("getFullRowEditValidationErrors"),s=t.editModelSvc?.getEditMap();if(!s)return e;for(const t of s.keys()){const o=s.get(t);if(!o)continue;const n=[],{rowIndex:r,rowPinned:l}=t;for(const t of o.keys()){const e=o.get(t);if(!e)continue;const{editorValue:i,pendingValue:s,sourceValue:a}=e,h=i??(s===Wu?void 0:s)??a;n.push({column:t,colId:t.getColId(),rowIndex:r,rowPinned:l,oldValue:a,newValue:h})}const a=i?.({editorsState:n})??[];a.length>0&&e.setRowValidation({rowNode:t},{errorMessages:a})}return e},rd=class extends Dt{constructor(t,e,i,s){super(),this.cellCtrl=t,this.rowNode=i,this.rowCtrl=s,this.beans=e}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(t){const e=t.key;switch(e){case As:this.onEnterKeyDown(t);break;case Ls:this.onF2KeyDown(t);break;case Is:this.onEscapeKeyDown(t);break;case Es:this.onTabKeyDown(t);break;case Ts:case Vs:this.onBackspaceOrDeleteKeyDown(e,t);break;case Gs:case Ns:case Bs:case Os:this.onNavigationKeyDown(t,e)}}onNavigationKeyDown(t,e){const{cellCtrl:i,beans:s}=this;if(!s.editSvc?.isEditing(i,{withOpenEditor:!0})){if(t.shiftKey&&i.isRangeSelectionEnabled())this.onShiftRangeSelect(t);else{const o=i.getFocusedCellPosition();s.navigation?.navigateToNextCell(t,e,o,!0)}t.preventDefault()}}onShiftRangeSelect(t){const{rangeSvc:e,navigation:i}=this.beans;if(!e)return;const s=e.extendLatestRangeInDirection(t);s&&(t.key===Os||t.key===Bs?i?.ensureColumnVisible(s.column):i?.ensureRowVisible(s.rowIndex))}onTabKeyDown(t){this.beans.navigation?.onTabKeyDown(this.cellCtrl,t)}onBackspaceOrDeleteKeyDown(t,e){const{cellCtrl:i,beans:s,rowNode:o}=this,{gos:n,rangeSvc:r,eventSvc:l,editSvc:a}=s;if(l.dispatchEvent({type:"keyShortcutChangedCellStart"}),function(t,e=!1){return t===Vs||!e&&t===Ts&&to()}(t,n.get("enableCellEditingOnBackspace"))&&!a?.isEditing(i,{withOpenEditor:!0})){if(r&&ze(n))r.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(i.isCellEditable()){const{column:t}=i,e=this.beans.valueSvc.getDeleteValue(t,o);o.setDataValue(t,e,"cellClear")}}else a?.isEditing(i,{withOpenEditor:!0})||s.editSvc?.startEditing(i,{startedEdit:!0,event:e});l.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(t){const{cellCtrl:e,beans:i}=this,{editSvc:s,navigation:o}=i,n=s?.isEditing(e,{withOpenEditor:!0}),r=e.rowNode,l=s?.isRowEditing(r,{withOpenEditor:!0}),a=e=>{const i=s?.startEditing(e,{startedEdit:!0,event:t,source:"edit"});i&&t.preventDefault()};if(n||l){if(this.isCtrlEnter(t))return void s?.applyBulkEdit(e,i?.rangeSvc?.getCellRanges()||[]);if(od(i),"block-stop"===s?.checkNavWithValidation(void 0,t))return;s?.isEditing(e,{withOpenEditor:!0})?s?.stopEditing(e,{event:t,source:"edit"}):l&&!e.isCellEditable()?s?.stopEditing({rowNode:r},{event:t,source:"edit"}):a(e)}else if(i.gos.get("enterNavigatesVertically")){const i=t.shiftKey?Ns:Gs;o?.navigateToNextCell(null,i,e.cellPosition,!1)}else{if(s?.hasValidationErrors())return;s?.hasValidationErrors(e)&&s.revertSingleCellEdit(e,!0),a(e)}}isCtrlEnter(t){return(t.ctrlKey||t.metaKey)&&t.key===As}onF2KeyDown(t){const{cellCtrl:e,beans:{editSvc:i}}=this,s=i?.isEditing();s&&(od(this.beans),"block-stop"===i?.checkNavWithValidation(void 0,t))||i?.startEditing(e,{startedEdit:!0,event:t})}onEscapeKeyDown(t){const{cellCtrl:e,beans:{editSvc:i}}=this;"block-stop"===i?.checkNavWithValidation(e,t)&&i.revertSingleCellEdit(e),i?.stopEditing(e,{event:t,cancel:!0})}processCharacter(t){const e=t.target!==this.eGui,{beans:{editSvc:i},cellCtrl:s}=this;if(!e&&!i?.isEditing(s,{withOpenEditor:!0}))if(t.key===Hs)this.onSpaceKeyDown(t);else if(i?.isCellEditable(s,"ui")){if(i?.hasValidationErrors()&&!i?.hasValidationErrors(s))return;i?.startEditing(s,{startedEdit:!0,event:t,source:"api"});const e=s.editCompDetails;!e?.params?.suppressPreventDefault&&t.preventDefault()}}onSpaceKeyDown(t){const{gos:e,editSvc:i}=this.beans,{rowNode:s}=this.cellCtrl;!i?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&Se(e)&&this.beans.selectionSvc?.handleSelectionEvent(t,s,"spaceKey"),t.preventDefault()}},ld=class extends Dt{constructor(t,e,i){super(),this.cellCtrl=t,this.column=i,this.beans=e}onMouseEvent(t,e){if(!Vr(e))switch(t){case"click":this.onCellClicked(e);break;case"mousedown":case"touchstart":this.onMouseDown(e);break;case"dblclick":this.onCellDoubleClicked(e);break;case"mouseout":this.onMouseOut(e);break;case"mouseover":this.onMouseOver(e)}}onCellClicked(t){if(this.beans.touchSvc?.handleCellDoubleClick(this,t))return;const{eventSvc:e,rangeSvc:i,editSvc:s,editModelSvc:o,frameworkOverrides:n,gos:r}=this.beans,l=t.ctrlKey||t.metaKey,{cellCtrl:a}=this,{column:h,cellPosition:c,rowNode:u}=a,d=Qr(r,h,u,t);i&&l&&!d&&i.getCellRangeCount(c)>1&&i.intersectLastRange(!0);const g=a.createEvent(t,"cellClicked");g.isEventHandlingSuppressed=d,e.dispatchEvent(g);const p=h.getColDef();if(p.onCellClicked&&window.setTimeout((()=>{n.wrapOutgoing((()=>{p.onCellClicked(g)}))}),0),!d&&"editing"!==o?.getState(a)){const e=s?.isEditing(),i=o?.getCellValidationModel().getCellValidationMap().size??0,n=o?.getRowValidationModel().getRowValidationMap().size??0;if(e&&(i>0||n>0))return;s?.shouldStartEditing(a,t)?s?.startEditing(a,{event:t}):s?.shouldStopEditing(a,t)&&("fullRow"===this.beans.gos.get("editType")?s?.stopEditing(a,{event:t,source:"edit"}):s?.stopEditing(void 0,{event:t,source:"edit"}))}}onCellDoubleClicked(t){const{column:e,beans:i,cellCtrl:s}=this,{eventSvc:o,frameworkOverrides:n,editSvc:r,editModelSvc:l,gos:a}=i,h=Qr(a,s.column,s.rowNode,t),c=e.getColDef(),u=s.createEvent(t,"cellDoubleClicked");if(u.isEventHandlingSuppressed=h,o.dispatchEvent(u),"function"==typeof c.onCellDoubleClicked&&window.setTimeout((()=>{n.wrapOutgoing((()=>{c.onCellDoubleClicked(u)}))}),0),!h&&r?.shouldStartEditing(s,t)&&"editing"!==l?.getState(s)){const e=r?.isEditing(),i=l?.getCellValidationModel().getCellValidationMap().size??0,o=l?.getRowValidationModel().getRowValidationMap().size??0;if(e&&(i>0||o>0))return;r?.startEditing(s,{event:t})}}onMouseDown(t){const{ctrlKey:e,metaKey:i,shiftKey:s}=t,o=t.target,{cellCtrl:n,beans:r}=this,{eventSvc:l,rangeSvc:a,rowNumbersSvc:h,focusSvc:c,gos:u,editSvc:d}=r,{column:g,rowNode:p,cellPosition:f}=n,m=Qr(u,g,p,t),w=()=>{const e=n.createEvent(t,"cellMouseDown");e.isEventHandlingSuppressed=m,l.dispatchEvent(e)};if(m)return void w();if(this.isRightClickInExistingRange(t))return;const v=a&&!a.isEmpty(),C=this.containsWidget(o),b=Si(g);if(h&&b&&!h.handleMouseDownOnCell(f,t))return a&&t.preventDefault(),void t.stopImmediatePropagation();if(!s||!v){const e=d?.isEditing(n),i=u.get("enableCellTextSelection")&&t.defaultPrevented,s=(Js()||i)&&!e&&!I(o)&&!C;n.focusCell(s,t)}if(s&&v&&!c.isCellFocused(f)){t.preventDefault();const e=c.getFocusedCell();if(e){const{column:i,rowIndex:s,rowPinned:o}=e;d?.isEditing(e)&&d?.stopEditing(e),c.setFocusedCell({column:i,rowIndex:s,rowPinned:o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:t})}}if(!C){if(a){b&&t.preventDefault();const o=Je(r,t)&&b;s?a.extendLatestRangeToCell(f):o||a.setRangeToCell(f,e||i)}w()}}isRightClickInExistingRange(t){const{rangeSvc:e}=this.beans;if(e){const i=e.isCellInAnyRange(this.cellCtrl.cellPosition),s=Je(this.beans,t);if(i&&s)return!0}return!1}containsWidget(t){return N(t,"ag-selection-checkbox",3)||N(t,"ag-drag-handle",3)}onMouseOut(t){if(this.mouseStayingInsideCell(t))return;const{eventSvc:e,colHover:i}=this.beans;e.dispatchEvent(this.cellCtrl.createEvent(t,"cellMouseOut")),i?.clearMouseOver()}onMouseOver(t){if(this.mouseStayingInsideCell(t))return;const{eventSvc:e,colHover:i}=this.beans;e.dispatchEvent(this.cellCtrl.createEvent(t,"cellMouseOver")),i?.setMouseOver([this.column])}mouseStayingInsideCell(t){if(!t.target||!t.relatedTarget)return!1;const e=this.cellCtrl.eGui,i=e.contains(t.target),s=e.contains(t.relatedTarget);return i&&s}},ad=class extends Dt{constructor(t,e){super(),this.cellCtrl=t,this.beans=e,this.column=t.column,this.rowNode=t.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;const t=this.cellCtrl.getCellSpan();if(t||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),t||this._legacyApplyRowSpan(),t){const e=this.refreshSpanHeight.bind(this,t);e(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:e,recalculateRowBounds:e,pinnedHeightChanged:e})}}refreshSpanHeight(t){const e=t.getCellHeight();null!=e&&(this.eContent.style.height=`${e}px`)}onNewColumnsLoaded(){const t=this.column.getRowSpan(this.rowNode);this.rowSpan!==t&&(this.rowSpan=t,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const t=this.getColSpanningList();ci(this.colsSpanning,t)||(this.colsSpanning=t,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){null!=this.column.getColDef().colSpan&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const t=this.getCellWidth();this.eContent.style.width=`${t}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce(((t,e)=>t+e.getActualWidth()),0):this.column.getActualWidth()}getColSpanningList(){const{column:t,rowNode:e}=this,i=t.getColSpan(e),o=[];if(1===i)o.push(t);else{let e=t;const n=t.getPinned();for(let t=0;e&&t<i&&(o.push(e),e=this.beans.visibleCols.getColAfter(e),e&&!s(e))&&n===e.getPinned();t++);}return o}onLeftChanged(){if(!this.eSetLeft)return;const t=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=t+"px"}getCellLeft(){let t;return t=this.beans.gos.get("enableRtl")&&this.colsSpanning?hi(this.colsSpanning):this.column,t.getLeft()}modifyLeftForPrintLayout(t){if(!this.cellCtrl.printLayout||"left"===this.column.getPinned())return t;const{visibleCols:e}=this.beans,i=e.getColsLeftWidth();return"right"===this.column.getPinned()?i+e.bodyWidth+(t||0):i+(t||0)}_legacyApplyRowSpan(t){if(1===this.rowSpan&&!t)return;const e=Fe(this.beans);this.eContent.style.height=e*this.rowSpan+"px",this.eContent.style.zIndex="1"}destroy(){super.destroy()}},hd=0,cd=class extends Dt{constructor(t,e,i,s){super(),this.column=t,this.rowNode=e,this.rowCtrl=s,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=i,this.gos=i.gos,this.editSvc=i.editSvc,this.hasEdit=!!i.editSvc;const{colId:o}=t;this.instanceId=o+"-"+hd++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:t}=this;this.positionFeature=new ad(this,t),this.customStyleFeature=t.cellStyles?.createCellCustomStyleFeature(this,t),this.editStyleFeature=t.editSvc?.createCellStyleFeature(this,t),this.mouseListener=new ld(this,t,this.column),this.keyboardListener=new rd(this,t,this.rowNode,this.rowCtrl),this.enableTooltipFeature();const{rangeSvc:e}=t;e&&ze(t.gos)&&(this.rangeFeature=e.createCellRangeFeature(t,this)),Si(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(t,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const t=this.beans.context;this.positionFeature=t.destroyBean(this.positionFeature),this.editorTooltipFeature=t.destroyBean(this.editorTooltipFeature),this.customStyleFeature=t.destroyBean(this.customStyleFeature),this.editStyleFeature=t.destroyBean(this.editStyleFeature),this.mouseListener=t.destroyBean(this.mouseListener),this.keyboardListener=t.destroyBean(this.keyboardListener),this.rangeFeature=t.destroyBean(this.rangeFeature),this.rowResizeFeature=t.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(t,e){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,t,e)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(t){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,t),od(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(t,e,i,s,o,n,r){if(this.comp=t,this.eGui=e,this.printLayout=o,r??(r=this),this.addDomData(r),this.addFeatures(),r.addDestroyFunc((()=>this.removeFeatures())),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(s,r),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(t),this.editStyleFeature?.setComp(t),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(t),this.rowResizeFeature?.refreshRowResizer(),n&&this.isCellEditable()||this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0})?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(const t of this.onCompAttachedFuncs)t();this.onCompAttachedFuncs=[]}}setupAutoHeight(t,e){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,t,e)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const t=this.column.getColDef();return null!=t.cellRenderer||null!=t.cellRendererSelector}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){const{beans:t,column:e}=this,{userCompFactory:i,ctrlsSvc:s,eventSvc:o}=t,n=e.getColDef(),r=this.createCellRendererParams();r.deferRender=!0;const l=vs(i,n,r);if(s.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let t;const e=new Qi((e=>{t=e})),[i]=this.addManagedListeners(o,{bodyScrollEnd:()=>{t(),i()}});return{loadingComp:l,onReady:e}}return{loadingComp:l,onReady:Qi.resolve()}}showValue(t,e){const{beans:i,column:s,rowNode:o,rangeFeature:n}=this,{userCompFactory:r}=i;let l,a=this.getValueToDisplay();const h=o.stub&&null==o.groupData?.[s.getId()],c=s.getColDef();if(h||this.isCellRenderer()){const t=this.createCellRendererParams();l=!h||Si(s)?ws(r,c,t):vs(r,c,t)}if(!l&&!h&&i.findSvc?.isMatch(o,s)){const t=this.createCellRendererParams();l=ws(r,{...s.getColDef(),cellRenderer:"agFindCellRenderer"},t)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(o,{checkSiblings:!0})){const t=this.editSvc.prepDetailsDuringBatch(this,{compDetails:l,valueToDisplay:a});t&&(t.compDetails?l=t.compDetails:t.valueToDisplay&&(a=t.valueToDisplay))}this.comp.setRenderDetails(l,a,t),this.customRowDragComp?.refreshVisibility(),!e&&n&&ht(i,(()=>n?.refreshHandle())),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){const t=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(t),!0),this.includeRowDrag=this.isIncludeControl(t.rowDrag),this.includeDndSource=this.isIncludeControl(t.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}getCellValueClass(){let t="";return"agCheckboxCellRenderer"===this.column.getColDef().cellRenderer&&(t=" ag-allow-overflow"),`ag-cell-value${t}`}isIncludeControl(t,e=!1){return(null==this.rowNode.rowPinned||e&&Ba(this.rowNode))&&!!t}isCheckboxSelection(t){const{rowSelection:e,groupDisplayType:i}=this.beans.gridOptions,s=Ve(e),o=yi(this.column);return("custom"!==i||"selectionColumn"===s||!o)&&(t.checkboxSelection||o&&"object"==typeof e&&Be(e))}refreshShouldDestroy(){const t=this.column.getColDef(),e=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(t),!0),i=this.includeRowDrag!=this.isIncludeControl(t.rowDrag),s=this.includeDndSource!=this.isIncludeControl(t.dndSource),o=this.isAutoHeight!=this.column.isAutoHeight();return e||i||s||o}onPopupEditorClosed(){const{editSvc:t}=this.beans;t?.isEditing(this,{withOpenEditor:!0})&&t?.stopEditing(this,{source:t?.isBatchEditing()?"ui":"api"})}stopEditing(t=!1){const{editSvc:e}=this.beans;return e?.stopEditing(this,{cancel:t,source:e?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){const{value:t,valueFormatted:e,column:i,rowNode:s,comp:o,eGui:n,beans:{valueSvc:r,gos:l,editSvc:a}}=this;return Qe(l,{value:t,valueFormatted:e,getValue:()=>r.getValueForDisplay(i,s).value,setValue:t=>a?.setDataValue({rowNode:s,column:i},t)||s.setDataValue(i,t),formatValue:this.formatValue.bind(this),data:s.data,node:s,pinned:i.getPinned(),colDef:i.getColDef(),column:i,refreshCell:this.refreshCell.bind(this),eGridCell:n,eParentOfValue:o.getParentOfValue(),registerRowDragger:(t,e,i,s)=>this.registerRowDragger(t,e,s),setTooltip:(t,e)=>{l.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(t,e),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(t){t.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(t){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(t),this.hasEdit&&this.editCompDetails){const{editSvc:t,comp:e}=this;!e?.getCellEditor()&&t.isEditing(this,{withOpenEditor:!0})&&t.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell({force:t,suppressFlash:e,newData:i}={}){const{editStyleFeature:s,customStyleFeature:o,rowCtrl:{rowEditStyleFeature:n},beans:{cellFlashSvc:r,filterManager:l},column:a,comp:h,suppressRefreshCell:c,tooltipFeature:u}=this;if(c)return;const{field:d,valueGetter:g,showRowGroup:p,enableCellChangeFlash:f}=a.getColDef(),m=t||null==d&&null==g&&null==p||i,w=!!h,v=this.updateAndFormatValue(w);if(w){if(m||v){this.showValue(!!i,!1);const t=l?.isSuppressFlashingCellsBecauseFiltering();!e&&!t&&f&&r?.flashCell(this),s?.applyCellStyles?.(),o?.applyUserStyles(),o?.applyClassesFromColDef(),n?.applyRowStyles()}u?.refreshTooltip(),o?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(t){return this.callValueFormatter(t)??t}callValueFormatter(t){return this.beans.valueSvc.formatValue(this.column,this.rowNode,t)}updateAndFormatValue(t){const e=this.value,i=this.valueFormatted,{value:s,valueFormatted:o}=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode,!0);return this.value=s,this.valueFormatted=o,!t||!this.valuesAreEqual(e,this.value)||this.valueFormatted!=i}valuesAreEqual(t,e){const i=this.column.getColDef();return i.equals?i.equals(t,e):t===e}addDomData(t){const e=this.eGui;De(this.beans.gos,e,tl,this),t.addDestroyFunc((()=>De(this.beans.gos,e,tl,null)))}createEvent(t,e){const{rowNode:i,column:s,value:o,beans:n}=this;return function(t,e,i,{rowNode:s,column:o},n){return Qe(t.gos,{type:i,node:s,data:s.data,value:n,column:o,colDef:o.getColDef(),rowPinned:s.rowPinned,event:e,rowIndex:s.rowIndex})}(n,t,e,{rowNode:i,column:s},o)}processCharacter(t){this.keyboardListener?.processCharacter(t)}onKeyDown(t){this.keyboardListener?.onKeyDown(t)}onMouseEvent(t,e){this.mouseListener?.onMouseEvent(t,e)}getColSpanningList(){return this.positionFeature?.getColSpanningList()??[]}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:t,column:e,beans:i}=this;Gl(t,e,i.visibleCols)}refreshAriaColIndex(){const t=this.beans.visibleCols.getAriaColIndex(this.column);D(this.eGui,t)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:t,rowPinned:e}=this.cellPosition;return{rowIndex:t,rowPinned:e}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return null!=this.rangeFeature}focusCell(t=!1,e){const i=this.editSvc?.allowedFocusTargetOnValidation(this);i&&i!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:t,sourceEvent:e})}restoreFocus(t=!1){const{beans:{editSvc:e,focusSvc:i},comp:s}=this;if(!s||e?.isEditing(this)||!this.isCellFocused()||!i.shouldTakeFocus())return;const o=()=>{if(!this.isAlive())return;const t=s.getFocusableElement();this.isCellFocused()&&t.focus({preventScroll:!0})};t?setTimeout(o,0):o()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(t){const e=this.eGui;e&&(Si(this.column)&&(t=!0),lt(e,"tabindex",t?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const t=this.column.isFirstRightPinned();this.comp.toggleCss("ag-cell-first-right-pinned",t)}onLastLeftPinnedChanged(){if(!this.comp)return;const t=this.column.isLastLeftPinned();this.comp.toggleCss("ag-cell-last-left-pinned",t)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const t=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=t),t}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(t){const{beans:e}=this;if(Ll(e))return;if(!this.comp)return void(t&&(this.focusEventWhileNotReady=t));const i=this.isCellFocused(),s=e.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss("ag-cell-focus",i),i&&t?.forceBrowserFocus){let e=this.comp.getFocusableElement();if(s){const t=xo(e,null,!0);t.length&&(e=t[0])}e.focus({preventScroll:!!t.preventScrollOnBrowserFocus})}i&&t&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:t,rowPinned:i}=this.rowNode;this.cellPosition={rowIndex:t,rowPinned:e(i),column:this.column}}applyStaticCssClasses(){const{comp:t}=this;t.toggleCss("ag-cell",!0),t.toggleCss("ag-cell-not-inline-editing",!0);const e=1==this.column.isAutoHeight();t.toggleCss("ag-cell-auto-height",e),t.toggleCss("ag-cell-normal-height",!e)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){const t=1==this.column.getColDef().wrapText;this.comp.toggleCss("ag-cell-wrap-text",t)}dispatchCellContextMenuEvent(t){const e=this.column.getColDef(),i=this.createEvent(t,"cellContextMenu"),{beans:s}=this;s.eventSvc.dispatchEvent(i),e.onCellContextMenu&&window.setTimeout((()=>{s.frameworkOverrides.wrapOutgoing((()=>{e.onCellContextMenu(i)}))}),0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(d(this.beans))??!1}createSelectionCheckbox(){const t=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(t)return this.beans.context.createBean(t),t.init({rowNode:this.rowNode,column:this.column}),t}createDndSource(){const t=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return t&&this.beans.context.createBean(t),t}registerRowDragger(t,e,i){if(this.customRowDragComp)return void this.customRowDragComp.setDragElement(t,e);const s=this.createRowDragComp(t,e,i);s&&(this.customRowDragComp=s,this.addDestroyFunc((()=>{this.beans.context.destroyBean(s),this.customRowDragComp=null})),s.refreshVisibility())}createRowDragComp(t,e,i){const s=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,(()=>this.value),t,e,i);if(s)return this.beans.context.createBean(s),s}cellEditorAttached(){for(const t of this.onEditorAttachedFuncs)t();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(t){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}};function ud(t,e,i,s,o,n){if(null==i&&null==e)return;const r={},l={},a=(t,e)=>{for(const i of t.split(" "))""!=i.trim()&&e(i)};if(i){const e=Object.keys(i);for(let o=0;o<e.length;o++){const n=e[o],h=i[n];let c;"string"==typeof h?c=!t||t.evaluate(h,s):"function"==typeof h&&(c=h(s)),a(n,(t=>{c?r[t]=!0:l[t]=!0}))}}if(e&&n)for(const t of Object.keys(e))a(t,(t=>{r[t]||(l[t]=!0)}));n&&Object.keys(l).forEach(n),Object.keys(r).forEach(o)}function dd(t){if(t.group)return t.level;const e=t.parent;return e?e.level+1:0}var gd=0,pd=class extends Dt{constructor(t,e,i,s,o){super(),this.rowNode=t,this.useAnimationFrameForCreate=s,this.printLayout=o,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=e,this.gos=e.gos,this.paginationPage=e.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=t.id+"-"+gd++,this.rowId=c(t.id),this.initRowBusinessKey(),this.rowFocused=e.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=dd(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=e.editSvc?.createRowStyleFeature(this,e),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if("function"!=typeof this.businessKeyForNodeFunc)return;const t=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=c(t)}updateGui(t,e){"left"===t?this.leftGui=e:"right"===t?this.rightGui=e:"fullWidth"===t?this.fullWidthGui=e:this.centerGui=e}setComp(t,e,i,s){const{context:o,focusSvc:n}=this.beans,r={rowComp:t,element:e,containerType:i,compBean:s=Wi(this,o,s)};this.allRowGuis.push(r),this.updateGui(i,r),this.initialiseRowComp(r);const l=this.rowNode,a="FullWidthLoading"===this.rowType||l.stub,h=!l.data&&"infinite"===this.beans.rowModel.getType();a||h||l.rowPinned||this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const c=this.fullWidthGui?.element;if(c){const t=this.beans.editSvc?.isEditing(this);!t&&n.isRowFocused(l.rowIndex,l.rowPinned)&&n.shouldTakeFocus()&&setTimeout((()=>c.focus({preventScroll:!0})),0)}}unsetComp(t){this.allRowGuis=this.allRowGuis.filter((e=>e.containerType!==t)),this.updateGui(t,void 0)}isCacheable(){return"FullWidthDetail"===this.rowType&&this.gos.get("keepDetailRows")}setCached(t){const e=t?"none":"";for(const t of this.allRowGuis)t.element.style.display=e}initialiseRowComp(t){const e=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(t),this.onRowHeightChanged(t),this.updateRowIndexes(t),this.setFocusedClasses(t),this.setStylesFromGridOptions(!1,t),Se(e)&&this.rowNode.selectable&&this.onRowSelected(t),this.updateColumnLists(!this.useAnimationFrameForCreate);const i=t.rowComp,s=this.getInitialRowClasses(t.containerType);for(const t of s)i.toggleCss(t,!0);this.executeSlideAndFadeAnimations(t),this.rowNode.group&&k(t.element,1==this.rowNode.expanded),this.setRowCompRowId(i),this.setRowCompRowBusinessKey(i),De(e,t.element,il,this),t.compBean.addDestroyFunc((()=>De(e,t.element,il,null))),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,t),this.rowNode.rowIndex,"p2",!1):this.addHoverFunctionality(t),this.isFullWidth()&&this.setupFullWidth(t),e.get("rowDragEntireRow")&&this.addRowDraggerToRow(t),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask((()=>{this.isAlive()&&t.rowComp.toggleCss("ag-after-created",!0)})),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(t){null!=this.businessKey&&t.setRowBusinessKey(this.businessKey)}setRowCompRowId(t){const e=c(this.rowNode.id);this.rowId=e,null!=e&&t.setRowId(e)}executeSlideAndFadeAnimations(t){const{containerType:e}=t;this.slideInAnimation[e]&&(It((()=>{this.onTopChanged()})),this.slideInAnimation[e]=!1),this.fadeInAnimation[e]&&(It((()=>{t.rowComp.toggleCss("ag-opacity-zero",!1)})),this.fadeInAnimation[e]=!1)}addRowDraggerToRow(t){const e=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,t.element);if(!e)return;const i=this.createBean(e,this.beans.context);this.rowDragComps.push(i),t.compBean.addDestroyFunc((()=>{this.rowDragComps=this.rowDragComps.filter((t=>t!==i)),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(i,this.beans.context)}))}setupFullWidth(t){const e=this.getPinnedForContainer(t.containerType),i=this.createFullWidthCompDetails(t.element,e);t.rowComp.showFullWidth(i)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map((t=>t?.rowComp?.getFullWidthCellRenderer())):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const t=this.gos.getCallback("processRowPostCreate");t&&this.areAllContainersReady()&&t({eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)})}areAllContainersReady(){const{leftGui:t,centerGui:e,rightGui:i,beans:{visibleCols:s}}=this,o=!!t||!s.isPinningLeft(),n=!!e,r=!!i||!s.isPinningRight();return o&&n&&r}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const t=this.beans.gos.getCallback("isFullWidthRow");return!!t&&t({rowNode:this.rowNode})}setRowType(){const t=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),e=this.isNodeFullWidthCell(),i=this.gos.get("masterDetail")&&this.rowNode.detail,s=this.beans.colModel.isPivotMode(),o=Oe(this.gos,this.rowNode,s);this.rowType=t?"FullWidthLoading":i?"FullWidthDetail":e?"FullWidth":o?"FullWidthGroup":"Normal"}updateColumnLists(t=!1,e=!1){if(this.isFullWidth())return;const{animationFrameSvc:i}=this.beans;!i?.active||t||this.printLayout?this.updateColumnListsImpl(e):this.updateColumnListsPending||(i.createTask((()=>{this.active&&this.updateColumnListsImpl(!0)}),this.rowNode.rowIndex,"p1",!1),this.updateColumnListsPending=!0)}getNewCellCtrl(t){const e=this.beans.rowSpanSvc?.isCellSpanning(t,this.rowNode);if(!e)return new cd(t,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(t){return!this.beans.rowSpanSvc?.isCellSpanning(t.column,this.rowNode)}createCellCtrls(t,e,i=null){const s={list:[],map:{}},o=(t,e,i)=>{null!=i?s.list.splice(i,0,e):s.list.push(e),s.map[t]=e},n=[];for(const i of e){const e=i.getInstanceId();let s=t.map[e];s&&!this.isCorrectCtrlForSpan(s)&&(s.destroy(),s=void 0),s||(s=this.getNewCellCtrl(i)),s&&o(e,s)}for(const e of t.list){const t=e.column.getInstanceId();null==s.map[t]&&(this.isCellEligibleToBeRemoved(e,i)?e.destroy():n.push([t,e]))}if(n.length)for(const[t,e]of n){const i=s.list.findIndex((t=>t.column.getLeft()>e.column.getLeft())),n=-1===i?void 0:Math.max(i-1,0);o(t,e,n)}const{focusSvc:r,visibleCols:l}=this.beans,a=r.getFocusedCell();if(a&&a.column.getPinned()==i){const t=a.column.getInstanceId();if(!s.map[t]&&l.allCols.includes(a.column)){const e=this.createFocusedCellCtrl();if(e){const i=s.list.findIndex((t=>t.column.getLeft()>e.column.getLeft())),n=-1===i?void 0:Math.max(i-1,0);o(t,e,n)}}}return s}createFocusedCellCtrl(){const{focusSvc:t,rowSpanSvc:e}=this.beans,i=t.getFocusedCell();if(!i)return;const s=e?.getCellSpan(i.column,this.rowNode);if(s){if(s.firstNode!==this.rowNode||!s.doesSpanContain(i))return}else if(!t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(i.column)}updateColumnListsImpl(t){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(t)}setCellCtrls(t){for(const e of this.allRowGuis){const i=this.getCellCtrlsForContainer(e.containerType);e.rowComp.setCellCtrls(i,t)}}getCellCtrlsForContainer(t){switch(t){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const t=this.beans.colViewport,e=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,e.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const i=t.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i);const s=e.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,s,"left");const o=e.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,o,"right")}}isCellEligibleToBeRemoved(t,e){const i=!0,{column:s}=t;if(s.getPinned()!=e)return i;if(!this.isCorrectCtrlForSpan(t))return i;const{visibleCols:o,editSvc:n}=this.beans,r=n?.isEditing(t),l=t.isCellFocused();return r||l?!(o.allCols.indexOf(s)>=0)&&i:i}getDomOrder(){return this.gos.get("ensureDomOrder")||ye(this.gos,"print")}listenOnDomOrder(t){t.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],(()=>{t.rowComp.setDomOrder(this.getDomOrder())}))}setAnimateFlags(t){if(this.rowNode.sticky||!t)return;const e=i(this.rowNode.oldRowTop),{visibleCols:s}=this.beans,o=s.isPinningLeft(),n=s.isPinningRight();if(e){const{slideInAnimation:t}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(t.fullWidth=!0);t.center=!0,t.left=o,t.right=n}else{const{fadeInAnimation:t}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows"))return void(t.fullWidth=!0);t.center=!0,t.left=o,t.right=n}}isFullWidth(){return"Normal"!==this.rowType}refreshFullWidth(){const t=(t,e)=>!t||t.rowComp.refreshFullWidth((()=>this.createFullWidthCompDetails(t.element,e).params)),e=t(this.fullWidthGui,null),i=t(this.centerGui,null),s=t(this.leftGui,"left"),o=t(this.rightGui,"right");return e&&i&&s&&o}addListeners(){const{beans:t,gos:e,rowNode:i}=this,{expansionSvc:s,eventSvc:o,context:n,rowSpanSvc:r}=t;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...s?.getRowExpandedListeners(this)??{}}),i.detail&&this.addManagedListeners(i.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(i,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(o,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),r&&this.addManagedListeners(r,{spannedCellsUpdated:({pinned:t})=>{t&&!i.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc((()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,n),this.tooltipFeature=this.destroyBean(this.tooltipFeature,n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,n)})),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",(()=>{if(e.get("rowDragEntireRow"))for(const t of this.allRowGuis)this.addRowDraggerToRow(t);else this.rowDragComps=this.destroyBeans(this.rowDragComps,n)})),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(const t of this.getAllCellCtrls())t.onRowIndexChanged()},cellChanged:t=>{for(const e of this.getAllCellCtrls())e.onCellChanged(t)}})}onRowPinned(){for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(t){this.refreshRow({suppressFlash:!t.update,newData:!t.update})}refreshRow(t){if(this.isFullWidth()!==!!this.isNodeFullWidthCell())this.beans.rowRenderer.redrawRow(this.rowNode);else if(this.isFullWidth())this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);else{for(const e of this.getAllCellCtrls())e.refreshCell(t);for(const t of this.allRowGuis)this.setRowCompRowId(t.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(t.rowComp);this.onRowSelected(),this.postProcessCss()}}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const t=this.beans.rowDropHighlightSvc,e=t?.row===this.rowNode?t.position:"none",i="above"===e,s="inside"===e,o="below"===e,n=this.gos.get("treeData")&&(o||i),r=this.rowNode.uiLevel.toString();for(const t of this.allRowGuis){const e=t.rowComp;e.toggleCss("ag-row-highlight-above",i),e.toggleCss("ag-row-highlight-inside",s),e.toggleCss("ag-row-highlight-below",o),e.toggleCss("ag-row-highlight-indent",n),n?t.element.style.setProperty("--ag-row-highlight-level",r):t.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){const t=this.rowNode.dragging;for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-dragging",t)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:e(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(t){const e=this.findFullWidthInfoForEvent(t);if(!e)return;const{rowGui:i,column:s}=e;if(i.element!==t.target)return;const o=this.rowNode,{focusSvc:n,navigation:r}=this.beans,l=n.getFocusedCell(),a={rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:l?.column??s};r?.navigateToNextCell(t,t.key,a,!0),t.preventDefault()}onTabKeyDown(t){if(t.defaultPrevented||Vr(t))return;const e=this.allRowGuis.find((e=>e.element.contains(t.target))),i=e?e.element:null,s=i===t.target,o=d(this.beans);let n=!1;i&&o&&(n=i.contains(o)&&o.classList.contains("ag-cell"));let r=null;s||n||(r=Fo(this.beans,i,!1,t.shiftKey)),(this.isFullWidth()&&s||!r)&&this.beans.navigation?.onTabKeyDown(this,t)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const t=this.allRowGuis.find((t=>Z(t.element)))?.element;return t?t.getBoundingClientRect().top:0}onSuppressCellFocusChanged(t){const e=this.isFullWidth()&&t?void 0:this.gos.get("tabIndex");for(const t of this.allRowGuis)lt(t.element,"tabindex",e)}onFullWidthRowFocused(t){const e=this.rowNode,i=!!t&&this.isFullWidth()&&t.rowIndex===e.rowIndex&&t.rowPinned==e.rowPinned;let s;if(this.fullWidthGui)s=this.fullWidthGui.element;else{const e=this.beans.colModel.getCol(t?.column),i=e?.pinned;s=i?"right"===i?this.rightGui?.element:this.leftGui?.element:this.centerGui?.element}s&&(s.classList.toggle("ag-full-width-focus",i),i&&t?.forceBrowserFocus&&s.focus({preventScroll:!0}))}recreateCell(t){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,t),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,t),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,t),t.destroy(),this.updateColumnLists()}removeCellCtrl(t,e){const i={list:[],map:{}};for(const s of t.list)s!==e&&(i.list.push(s),i.map[s.column.getInstanceId()]=s);return i}onMouseEvent(t,e){switch(t){case"dblclick":this.onRowDblClick(e);break;case"click":this.onRowClick(e);break;case"touchstart":case"mousedown":this.onRowMouseDown(e)}}createRowEvent(t,e){const{rowNode:i}=this;return Qe(this.gos,{type:t,node:i,data:i.data,rowIndex:i.rowIndex,rowPinned:i.rowPinned,event:e})}createRowEventWithSource(t,e){const i=this.createRowEvent(t,e);return i.source=this,i}onRowDblClick(t){if(Vr(t))return;const e=this.createRowEventWithSource("rowDoubleClicked",t);e.isEventHandlingSuppressed=this.isSuppressMouseEvent(t),this.beans.eventSvc.dispatchEvent(e)}findFullWidthInfoForEvent(t){if(!t)return;const e=this.findFullWidthRowGui(t.target),i=this.getColumnForFullWidth(e);return e&&i?{rowGui:e,column:i}:void 0}findFullWidthRowGui(t){return this.allRowGuis.find((e=>e.element.contains(t)))}getColumnForFullWidth(t){const{visibleCols:e}=this.beans;switch(t?.containerType){case"center":return e.centerCols[0];case"left":return e.leftCols[0];case"right":return e.rightCols[0];default:return e.allCols[0]}}onRowMouseDown(t){if(this.lastMouseDownOnDragger=N(t.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(t))return;const{rangeSvc:e,focusSvc:i}=this.beans;e?.removeAllCellRanges();const s=this.findFullWidthInfoForEvent(t);if(!s)return;const{rowGui:o,column:n}=s,r=o.element,l=t.target,a=this.rowNode;let h=t.defaultPrevented||Js();r&&r.contains(l)&&I(l)&&(h=!1),i.setFocusedCell({rowIndex:a.rowIndex,column:n,rowPinned:a.rowPinned,forceBrowserFocus:h})}isSuppressMouseEvent(t){const{gos:e,rowNode:i}=this;if(this.isFullWidth()){const s=this.findFullWidthRowGui(t.target);return function(t,e,i,s){const o=e?.suppressMouseEventHandling;return Jr(t,void 0,i,s,o)}(e,s?.rowComp.getFullWidthCellRendererParams(),i,t)}const s=el(e,t.target);return null!=s&&Qr(e,s.column,i,t)}onRowClick(t){if(Vr(t)||this.lastMouseDownOnDragger)return;const e=this.isSuppressMouseEvent(t),{eventSvc:i,selectionSvc:s}=this.beans,o=this.createRowEventWithSource("rowClicked",t);o.isEventHandlingSuppressed=e,i.dispatchEvent(o),e||s?.handleSelectionEvent(t,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(t){"FullWidthDetail"===this.rowType&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,t)}createFullWidthCompDetails(t,e){const{gos:i,rowNode:s}=this,o=Qe(i,{fullWidth:!0,data:s.data,node:s,value:s.key,valueFormatted:s.key,eGridCell:t,eParentOfValue:t,pinned:e,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(t,e,i,s)=>this.addFullWidthRowDragging(t,e,i,s),setTooltip:(t,e)=>{i.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(t,e)}}),n=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return function(t,e){return t.getCompDetailsFromGridOptions(ms,"agDetailCellRenderer",e,!0)}(n,o);case"FullWidthGroup":{const{value:t,valueFormatted:e}=this.beans.valueSvc.getValueForDisplay(void 0,this.rowNode,!0);return o.value=t,o.valueFormatted=e,function(t,e){return t.getCompDetailsFromGridOptions(fs,"agGroupRowRenderer",e,!0)}(n,o)}case"FullWidthLoading":return function(t,e){return t.getCompDetailsFromGridOptions(ps,"agLoadingCellRenderer",e,!0)}(n,o);default:return function(t,e){return t.getCompDetailsFromGridOptions(gs,void 0,e,!0)}(n,o)}}setupFullWidthRowTooltip(t,e){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,t,e))}addFullWidthRowDragging(t,e,i="",s){const{rowDragSvc:o,context:n}=this.beans;if(!o||!this.isFullWidth())return;const r=o.createRowDragComp((()=>i),this.rowNode,void 0,t,e,s);this.createBean(r,n),this.addDestroyFunc((()=>{this.destroyBean(r,n)}))}onUiLevelChanged(){const t=dd(this.rowNode);if(this.rowLevel!=t){const e="ag-row-level-"+t,i="ag-row-level-"+this.rowLevel;for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0),t.rowComp.toggleCss(i,!1)}this.rowLevel=t}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const t=this.isFirstRowOnPage(),e=this.isLastRowOnPage();if(this.firstRowOnPage!==t){this.firstRowOnPage=t;for(const e of this.allRowGuis)e.rowComp.toggleCss("ag-row-first",t)}if(this.lastRowOnPage!==e){this.lastRowOnPage=e;for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-row-last",e)}}getAllCellCtrls(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const t=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(t,this.rowNode),t.length)for(const e of t)for(const t of this.allRowGuis)t.rowComp.toggleCss(e,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,(t=>{for(const e of this.allRowGuis)e.rowComp.toggleCss(t,!0)}),(t=>{for(const e of this.allRowGuis)e.rowComp.toggleCss(t,!1)}))}setStylesFromGridOptions(t,e){t&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(e,(t=>t.rowComp.setUserStyles(this.rowStyles)))}getPinnedForContainer(t){return"left"===t||"right"===t?t:null}getInitialRowClasses(t){const e=this.getPinnedForContainer(t),i=this.isFullWidth(),{rowNode:s,beans:o}=this,n=[];n.push("ag-row"),n.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[t]&&n.push("ag-opacity-zero"),n.push(s.rowIndex%2==0?"ag-row-even":"ag-row-odd"),s.isRowPinned()&&(n.push("ag-row-pinned"),o.pinnedRowModel?.isManual()&&n.push("ag-row-pinned-manual")),!s.isRowPinned()&&s.pinnedSibling&&n.push("ag-row-pinned-source"),s.isSelected()&&n.push("ag-row-selected"),s.footer&&n.push("ag-row-footer"),n.push("ag-row-level-"+this.rowLevel),s.stub&&n.push("ag-row-loading"),i&&n.push("ag-full-width-row"),o.expansionSvc?.addExpandedCss(n,s),s.dragging&&n.push("ag-row-dragging");const{rowStyleSvc:r}=o;return r&&(r.processClassesFromGridOptions(n,s),r.preProcessRowClassRules(n,s)),n.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&n.push("ag-row-first"),this.isLastRowOnPage()&&n.push("ag-row-last"),i&&("left"===e&&n.push("ag-cell-last-left-pinned"),"right"===e&&n.push("ag-cell-first-right-pinned")),n}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(t){this.beans.selectionSvc?.onRowCtrlSelected(this,(t=>{t!==this.centerGui&&t!==this.fullWidthGui||this.announceDescription()}),t)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(t){if(!this.active)return;const{element:e,compBean:i}=t,{rowNode:s,beans:o,gos:n}=this;i.addManagedListeners(e,{pointerenter:t=>{"mouse"===t.pointerType&&s.dispatchRowEvent("mouseEnter")},pointerleave:t=>{"mouse"===t.pointerType&&s.dispatchRowEvent("mouseLeave")}}),i.addManagedListeners(s,{mouseEnter:()=>{o.dragSvc?.dragging||n.get("suppressRowHoverHighlight")||(e.classList.add("ag-row-hover"),s.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(e)}})}resetHoveredStatus(t){const e=t?[t]:this.allRowGuis.map((t=>t.element));for(const t of e)t.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(t){const e=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),i=this.applyPaginationOffset(e.top,!0)-100,s=this.applyPaginationOffset(e.bottom,!0)+100;return Math.min(Math.max(i,t),s)}forEachGui(t,e){if(t)e(t);else for(const t of this.allRowGuis)e(t)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(t){if(null==this.rowNode.rowHeight)return;const e=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),s=xe(this.gos)?Re(this.beans,this.rowNode).height:void 0,o=s?Math.min(i,s)-2+"px":void 0;this.forEachGui(t,(t=>{t.element.style.height=`${e}px`,o&&t.element.style.setProperty("--ag-line-height",o)}))}destroyFirstPass(t=!1){this.active=!1;const{rowNode:e}=this;if(!t&&Me(this.gos)&&!e.sticky)if(null!=e.rowTop){const t=this.roundRowTopToBounds(e.rowTop);this.setRowTop(t)}else for(const t of this.allRowGuis)t.rowComp.toggleCss("ag-opacity-zero",!0);this.fullWidthGui?.element.contains(d(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),e.setHovered(!1);const i=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(i),this.beans.eventSvc.dispatchEvent(i),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;const t=t=>{for(const e of t.list)e.destroy();return{list:[],map:{}}};this.centerCellCtrls=t(this.centerCellCtrls),this.leftCellCtrls=t(this.leftCellCtrls),this.rightCellCtrls=t(this.rightCellCtrls)}setFocusedClasses(t){this.forEachGui(t,(t=>{t.rowComp.toggleCss("ag-row-focus",this.rowFocused),t.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)}))}onCellFocusChanged(){const{focusSvc:t}=this.beans,e=t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses())}onPaginationChanged(){const t=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==t&&(this.paginationPage=t,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(t,e=!1){return this.rowNode.isRowPinned()||this.rowNode.sticky?t:t+this.beans.pageBounds.getPixelOffset()*(e?1:-1)}setRowTop(t){if(!this.printLayout&&i(t)){const e=this.applyPaginationOffset(t),i=this.rowNode.isRowPinned()||this.rowNode.sticky?e:this.beans.rowContainerHeight.getRealPixelPosition(e);this.setRowTopStyle(`${i}px`)}}getInitialRowTop(t){return this.suppressRowTransform?this.getInitialRowTopShared(t):void 0}getInitialTransform(t){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(t)})`}getInitialRowTopShared(t){if(this.printLayout)return"";const e=this.rowNode;let i;if(e.sticky)i=e.stickyRowTop;else{const s=this.slideInAnimation[t]?this.roundRowTopToBounds(e.oldRowTop):e.rowTop,o=this.applyPaginationOffset(s);i=e.isRowPinned()?o:this.beans.rowContainerHeight.getRealPixelPosition(o)}return i+"px"}setRowTopStyle(t){for(const e of this.allRowGuis)this.suppressRowTransform?e.rowComp.setTop(t):e.rowComp.setTransform(`translateY(${t})`)}getCellCtrl(t,e=!1){let i=null;for(const e of this.getAllCellCtrls())e.column==t&&(i=e);if(null!=i||e)return i;for(const e of this.getAllCellCtrls())e?.getColSpanningList().indexOf(t)>=0&&(i=e);return i}onRowIndexChanged(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(t){const e=this.rowNode.getRowIndexString();if(null===e)return;const i=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),s=this.rowNode.rowIndex%2==0,o=i+this.rowNode.rowIndex+1;this.forEachGui(t,(t=>{t.rowComp.setRowIndex(e),t.rowComp.toggleCss("ag-row-even",s),t.rowComp.toggleCss("ag-row-odd",!s),P(t.element,o)}))}};function fd(t){return t.ctrlsSvc.getScrollFeature().getVScrollPosition()}var md={moduleName:"KeyboardNavigation",version:se,beans:[class extends Dt{constructor(){super(),this.beanName="navigation",this.onPageDown=Ot(this.onPageDown,100),this.onPageUp=Ot(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(t=>{this.gridBodyCon=t.gridBodyCtrl}))}handlePageScrollingKey(t,e=!1){const i=t.key,s=t.altKey,o=t.ctrlKey||t.metaKey,n=!!this.beans.rangeSvc&&t.shiftKey,r=function(t,e){return el(t,e.target)?.getFocusedCellPosition()??null}(this.gos,t);let l=!1;switch(i){case Ws:case Us:o||s||(this.onHomeOrEndKey(i),l=!0);break;case Os:case Bs:case Ns:case Gs:if(!r)return!1;!o||s||n||(this.onCtrlUpDownLeftRight(i,r),l=!0);break;case $s:case zs:o||s||(l=this.handlePageUpDown(i,r,e))}return l&&t.preventDefault(),l}handlePageUpDown(t,e,i){return i&&(e=this.beans.focusSvc.getFocusedCell()),!!e&&(t===zs?this.onPageUp(e):this.onPageDown(e),!0)}navigateTo({scrollIndex:t,scrollType:e,scrollColumn:s,focusIndex:o,focusColumn:n,isAsync:r,rowPinned:l}){const{scrollFeature:a}=this.gridBodyCon;i(s)&&!s.isPinned()&&a.ensureColumnVisible(s),i(t)&&a.ensureIndexVisible(t,e),r||a.ensureIndexVisible(o);const{focusSvc:h,rangeSvc:c}=this.beans;h.setFocusedCell({rowIndex:o,column:n,rowPinned:l,forceBrowserFocus:!0}),c?.setRangeToCell({rowIndex:o,rowPinned:l,column:n})}onPageDown(t){const e=this.beans,i=fd(e),s=this.getViewportHeight(),{pageBounds:o,rowModel:n,rowAutoHeight:r}=e,l=o.getPixelOffset(),a=n.getRowIndexAtPixel(i.top+s+l);r?.active?this.navigateToNextPageWithAutoHeight(t,a):this.navigateToNextPage(t,a)}onPageUp(t){const e=this.beans,i=fd(e),{pageBounds:s,rowModel:o,rowAutoHeight:n}=e,r=s.getPixelOffset(),l=o.getRowIndexAtPixel(i.top+r);n?.active?this.navigateToNextPageWithAutoHeight(t,l,!0):this.navigateToNextPage(t,l,!0)}navigateToNextPage(t,e,i=!1){const{pageBounds:s,rowModel:o}=this.beans,n=this.getViewportHeight(),r=s.getFirstRow(),l=s.getLastRow(),a=s.getPixelOffset(),h=o.getRow(t.rowIndex),c=i?h?.rowHeight-n-a:n-a;let u,d=o.getRowIndexAtPixel(h?.rowTop+c+a);d===t.rowIndex&&(e=d=t.rowIndex+(i?-1:1)),i?(u="bottom",d<r&&(d=r),e<r&&(e=r)):(u="top",d>l&&(d=l),e>l&&(e=l)),this.isRowTallerThanView(o.getRow(d))&&(e=d,u="top"),this.navigateTo({scrollIndex:e,scrollType:u,scrollColumn:null,focusIndex:d,focusColumn:t.column})}navigateToNextPageWithAutoHeight(t,e,i=!1){this.navigateTo({scrollIndex:e,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:e,focusColumn:t.column}),setTimeout((()=>{const s=this.getNextFocusIndexForAutoHeight(t,i);this.navigateTo({scrollIndex:e,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:t.column,isAsync:!0})}),50)}getNextFocusIndexForAutoHeight(t,e=!1){const i=e?-1:1,s=this.getViewportHeight(),{pageBounds:o,rowModel:n}=this.beans,r=o.getLastRow();let l=0,a=t.rowIndex;for(;a>=0&&a<=r;){const t=n.getRow(a);if(t){const e=t.rowHeight??0;if(l+e>s)break;l+=e}a+=i}return Math.max(0,Math.min(a,r))}getViewportHeight(){const t=this.beans,e=fd(t),i=this.beans.scrollVisibleSvc.getScrollbarWidth();let s=e.bottom-e.top;return t.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(s-=i),s}isRowTallerThanView(t){if(!t)return!1;const e=t.rowHeight;return"number"==typeof e&&e>this.getViewportHeight()}onCtrlUpDownLeftRight(t,e){const i=this.beans.cellNavigation.getNextCellToFocus(t,e,!0),s=this.getNormalisedPosition(i),{rowIndex:o,rowPinned:n,column:r}=s??i;this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:r,focusIndex:o,focusColumn:r,rowPinned:n})}onHomeOrEndKey(t){const e=t===Ws,{visibleCols:i,pageBounds:s,rowModel:o}=this.beans,n=i.allCols,r=e?s.getFirstRow():s.getLastRow(),l=o.getRow(r);if(!l)return;const a=(e?n:[...n].reverse()).find((t=>!t.isSuppressNavigable(l)));a&&this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:a,focusIndex:r,focusColumn:a})}onTabKeyDown(t,e){const i=e.shiftKey,s=this.tabToNextCellCommon(t,i,e),o=this.beans,{ctrlsSvc:n,pageBounds:r,focusSvc:l,gos:a}=o;if(!1===s)if(i){const{rowIndex:i,rowPinned:s}=t.getRowPosition();(s?0===i:i===r.getFirstRow())&&(0===a.get("headerHeight")||Vl(o)?zl(o,!0,!0):(e.preventDefault(),l.focusPreviousFromFirstCell(e)))}else t instanceof cd&&t.focusCell(!0),(l.focusOverlay(!1)||zl(o,i))&&e.preventDefault();else s?e.preventDefault():null===s&&n.get("gridCtrl").allowFocusForNextCoreContainer(i)}tabToNextCell(t,e){const i=this.beans,{focusSvc:s,rowRenderer:o}=i,n=s.getFocusedCell();if(!n)return!1;let r=Ph(i,n);return!(!r&&(r=o.getRowByPosition(n),!r?.isFullWidth())||!this.tabToNextCellCommon(r,t,e,"api"))}tabToNextCellCommon(t,e,i,s="ui"){const{editSvc:o,focusSvc:n}=this.beans;let r;const l=t instanceof cd?t:t.getAllCellCtrls()?.[0];return r=o?.isEditing()?o?.moveToNextCell(l,e,i,s):this.moveToNextCellNotEditing(t,e,i),null===r?r:r||!!n.focusedHeader}moveToNextCellNotEditing(t,e,s){const o=this.beans.visibleCols.allCols;let n;if(t instanceof pd){if(n={...t.getRowPosition(),column:e?o[0]:hi(o)},this.gos.get("embedFullWidthRows")&&s){const e=t.findFullWidthInfoForEvent(s);e&&(n.column=e.column)}}else n=t.getFocusedCellPosition();const r=this.findNextCellToFocusOn(n,{backwards:e,startEditing:!1});if(!1===r)return null;if(r instanceof cd)r.focusCell(!0);else if(r)return this.tryToFocusFullWidthRow(r,e);return i(r)}findNextCellToFocusOn(t,{backwards:e,startEditing:s,skipToNextEditableCell:o}){let n=t;const r=this.beans,{cellNavigation:l,gos:a,focusSvc:h,rowRenderer:c,rangeSvc:u}=r;for(;;){t!==n&&(t=n),e||(n=this.getLastCellOfColSpan(n)),n=l.getNextTabbedCell(n,e);const d=a.getCallback("tabToNextCell");if(i(d)){const i=d({backwards:e,editing:s,previousCellPosition:t,nextCellPosition:n||null});if(!0===i)n=t;else{if(!1===i)return!1;n={rowIndex:i.rowIndex,column:i.column,rowPinned:i.rowPinned}}}if(!n)return null;if(n.rowIndex<0){const t=$l(r);return h.focusHeaderPosition({headerPosition:{headerRowIndex:t+n.rowIndex,column:n.column},fromCell:!0}),null}const g="fullRow"===a.get("editType");if(s&&(!g||o)&&!this.isCellEditable(n))continue;this.ensureCellVisible(n);const p=Ph(r,n);if(!p){const t=c.getRowByPosition(n);if(!t||!t.isFullWidth()||s)continue;return{...t.getRowPosition(),column:n?.column}}if(!l.isSuppressNavigable(p.column,p.rowNode))return p.setFocusedCellPosition(n),u?.setRangeToCell(n),p}}isCellEditable(t){const e=this.lookupRowNodeForCell(t);return!!e&&t.column.isCellEditable(e)}lookupRowNodeForCell({rowIndex:t,rowPinned:e}){const{pinnedRowModel:i,rowModel:s}=this.beans;return"top"===e?i?.getPinnedTopRow(t):"bottom"===e?i?.getPinnedBottomRow(t):s.getRow(t)}navigateToNextCell(t,e,o,n){let r=o,l=!1;const a=this.beans,{cellNavigation:h,focusSvc:c,gos:u}=a;for(;r&&(r===o||!this.isValidNavigateCell(r));)u.get("enableRtl")?e===Os&&(r=this.getLastCellOfColSpan(r)):e===Bs&&(r=this.getLastCellOfColSpan(r)),r=h.getNextCellToFocus(e,r),l=s(r);if(l&&t&&t.key===Ns&&(r={rowIndex:-1,rowPinned:null,column:o.column}),n){const s=u.getCallback("navigateToNextCell");if(i(s)){const n=s({key:e,previousCellPosition:o,nextCellPosition:r||null,event:t});r=i(n)?{rowPinned:n.rowPinned,rowIndex:n.rowIndex,column:n.column}:null}}if(!r)return;if(r.rowIndex<0){const e=$l(a);return void c.focusHeaderPosition({headerPosition:{headerRowIndex:e+r.rowIndex,column:o.column},event:t||void 0,fromCell:!0})}const d=this.getNormalisedPosition(r);d?this.focusPosition(d):this.tryToFocusFullWidthRow(r)}getNormalisedPosition(t){if(this.beans.spannedRowRenderer?.getCellByPosition(t))return t;this.ensureCellVisible(t);const e=Ph(this.beans,t);return e?(t=e.getFocusedCellPosition(),this.ensureCellVisible(t),t):null}tryToFocusFullWidthRow(t,e){const{visibleCols:s,rowRenderer:o,focusSvc:n,eventSvc:r}=this.beans,l=s.allCols,a=o.getRowByPosition(t);if(!a?.isFullWidth())return!1;const h=n.getFocusedCell(),c={rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:t.column||(e?hi(l):l[0])};this.focusPosition(c);const u=null==e?null!=h&&function(t,e){switch(t.rowPinned){case"top":if("top"!==e.rowPinned)return!0;break;case"bottom":if("bottom"!==e.rowPinned)return!1;break;default:if(i(e.rowPinned))return"top"!==e.rowPinned}return t.rowIndex<e.rowIndex}(c,h):e;return r.dispatchEvent({type:"fullWidthRowFocused",rowIndex:c.rowIndex,rowPinned:c.rowPinned,column:c.column,isFullWidthCell:!0,fromBelow:u}),!0}focusPosition(t){const{focusSvc:e,rangeSvc:i}=this.beans;e.setFocusedCell({rowIndex:t.rowIndex,column:t.column,rowPinned:t.rowPinned,forceBrowserFocus:!0}),i?.setRangeToCell(t)}isValidNavigateCell(t){return!!kh(this.beans,t)}getLastCellOfColSpan(t){const e=Ph(this.beans,t);if(!e)return t;const i=e.getColSpanningList();return 1===i.length?t:{rowIndex:t.rowIndex,column:hi(i),rowPinned:t.rowPinned}}ensureCellVisible(t){const e=Te(this.gos),i=this.beans.rowModel.getRow(t.rowIndex),o=e&&i?.sticky,{scrollFeature:n}=this.gridBodyCon;!o&&s(t.rowPinned)&&n.ensureIndexVisible(t.rowIndex),t.column.isPinned()||n.ensureColumnVisible(t.column)}ensureColumnVisible(t){const e=this.gridBodyCon.scrollFeature;t.isPinned()||e.ensureColumnVisible(t)}ensureRowVisible(t){this.gridBodyCon.scrollFeature.ensureIndexVisible(t)}},class extends Dt{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(t){this.rowSpanSvc=t.rowSpanSvc}getNextCellToFocus(t,e,i=!1){return i?this.getNextCellToFocusWithCtrlPressed(t,e):this.getNextCellToFocusWithoutCtrlPressed(t,e)}getNextCellToFocusWithCtrlPressed(t,e){const i=t===Ns,s=t===Gs,o=t===Os;let n,r;const{pageBounds:l,gos:a,visibleCols:h,pinnedRowModel:c}=this.beans,{rowPinned:u}=e;if(i||s)r=u&&c?i?0:"top"===u?c.getPinnedTopRowCount()-1:c.getPinnedBottomRowCount()-1:i?l.getFirstRow():l.getLastRow(),n=e.column;else{const t=a.get("enableRtl");r=e.rowIndex,n=(o!==t?h.allCols:[...h.allCols].reverse()).find((t=>this.isCellGoodToFocusOn({rowIndex:r,rowPinned:null,column:t})))}return n?{rowIndex:r,rowPinned:u,column:n}:null}getNextCellToFocusWithoutCtrlPressed(t,e){let i=e,s=!1;for(;!s;){switch(t){case Ns:i=this.getCellAbove(i);break;case Gs:i=this.getCellBelow(i);break;case Bs:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case Os:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,pe(8,{key:t})}s=!i||this.isCellGoodToFocusOn(i)}return i}isCellGoodToFocusOn(t){const e=t.column;let i;const{pinnedRowModel:s,rowModel:o}=this.beans;switch(t.rowPinned){case"top":i=s?.getPinnedTopRow(t.rowIndex);break;case"bottom":i=s?.getPinnedBottomRow(t.rowIndex);break;default:i=o.getRow(t.rowIndex)}return!!i&&!this.isSuppressNavigable(e,i)}getCellToLeft(t){if(!t)return null;const e=this.beans.visibleCols.getColBefore(t.column);return e?{rowIndex:t.rowIndex,column:e,rowPinned:t.rowPinned}:null}getCellToRight(t){if(!t)return null;const e=this.beans.visibleCols.getColAfter(t.column);return e?{rowIndex:t.rowIndex,column:e,rowPinned:t.rowPinned}:null}getCellBelow(t){if(!t)return null;const e=this.rowSpanSvc?.getCellEnd(t)??t,i=Mh(this.beans,e,!0);return i?{rowIndex:i.rowIndex,column:t.column,rowPinned:i.rowPinned}:null}getCellAbove(t){if(!t)return null;const e=this.rowSpanSvc?.getCellStart(t)??t,i=Dh(this.beans,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);return i?{rowIndex:i.rowIndex,column:t.column,rowPinned:i.rowPinned}:null}getNextTabbedCell(t,e){return e?this.getNextTabbedCellBackwards(t):this.getNextTabbedCellForwards(t)}getNextTabbedCellForwards(t){const{visibleCols:e,pagination:i}=this.beans,o=e.allCols;let n=t.rowIndex,r=t.rowPinned,l=e.getColAfter(t.column);if(!l){l=o[0];const e=Mh(this.beans,t,!0);if(s(e))return null;if(!e.rowPinned&&!(i?.isRowInPage(e.rowIndex)??1))return null;n=e?e.rowIndex:null,r=e?e.rowPinned:null}return{rowIndex:n,column:l,rowPinned:r}}getNextTabbedCellBackwards(t){const{beans:e}=this,{visibleCols:i,pagination:o}=e,n=i.allCols;let r=t.rowIndex,l=t.rowPinned,a=i.getColBefore(t.column);if(!a){a=hi(n);const i=Dh(e,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);if(s(i))return null;if(!i.rowPinned&&!(o?.isRowInPage(i.rowIndex)??1))return null;r=i?i.rowIndex:null,l=i?i.rowPinned:null}return{rowIndex:r,column:a,rowPinned:l}}isSuppressNavigable(t,e){const{suppressNavigable:i}=t.colDef;return"boolean"==typeof i?i:"function"==typeof i&&i(t.createColumnFunctionCallbackParams(e))}},class extends Dt{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const t=this.beans;t.ctrlsSvc.whenReady(this,(t=>{this.gridBodyCon=t.gridBodyCtrl}));const e=g(t);this.addManagedElementListeners(e,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(t,e){let i;const{colModel:s,colGroupSvc:o,ctrlsSvc:n}=this.beans;if("string"==typeof t?(i=s.getCol(t),i||(i=o?.getColumnGroup(t)??null)):i=t,!i)return null;const r=n.getHeaderRowContainerCtrl(),l=r?.getAllCtrls(),a="filter"===hi(l||[]).type,h=$l(this.beans)-1;let c=-1,u=i;for(;u;)c++,u=u.getParent();let d=c;return e&&a&&d===h-1&&d++,-1===d?null:{headerRowIndex:d,column:i}}navigateVertically(t,e){const{focusSvc:i,visibleCols:s}=this.beans,{focusedHeader:o}=i;if(!o)return!1;const{headerRowIndex:n}=o,r=o.column,l=$l(this.beans),a=this.getHeaderRowType(n),h=s.headerGroupRowCount;let{headerRowIndex:c,column:u,headerRowIndexWithoutSpan:d}="UP"===t?function(t,e,i){const s=i-1;if("filter"!==t){const t=e instanceof si&&e.isSpanHeaderHeight();let i=e.getParent();for(;i&&(i.getProvidedColumnGroup().getLevel()>s||t&&i.isPadding());)i=i.getParent();if(i)return t?{column:i,headerRowIndex:i.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:s}:{column:i,headerRowIndex:s,headerRowIndexWithoutSpan:s}}return{column:e,headerRowIndex:s,headerRowIndexWithoutSpan:s}}(a,r,n):function(t,e,i){const s=e+1,o={column:t,headerRowIndex:s,headerRowIndexWithoutSpan:s};if(t instanceof tr){if(s>=i)return{column:t.getDisplayedLeafColumns()[0],headerRowIndex:i,headerRowIndexWithoutSpan:s};let e=t.getDisplayedChildren()[0];if(e instanceof tr&&e.isPadding()){const t=e.getDisplayedLeafColumns()[0];t.isSpanHeaderHeight()&&(e=t)}o.column=e,e instanceof si&&e.isSpanHeaderHeight()&&(o.headerRowIndex=i,o.headerRowIndexWithoutSpan=s)}return o}(r,n,h),g=!1;return c<0&&(c=0,u=r,g=!0),c>=l?(c=-1,this.currentHeaderRowWithoutSpan=-1):void 0!==d&&(this.currentHeaderRowWithoutSpan=d),!(!g&&!u)&&i.focusHeaderPosition({headerPosition:{headerRowIndex:c,column:u},allowUserOverride:!0,event:e})}navigateHorizontally(t,e=!1,i){const{focusSvc:s,gos:o}=this.beans,n={...s.focusedHeader};let r,l;-1!==this.currentHeaderRowWithoutSpan?n.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=n.headerRowIndex,"LEFT"===t!==o.get("enableRtl")?(l="Before",r=this.findHeader(n,l)):(l="After",r=this.findHeader(n,l));const a=o.getCallback("tabToNextHeader");if(e&&a){const t=s.focusHeaderPositionFromUserFunc({userFunc:a,headerPosition:r,direction:l});if(t){const{headerRowIndex:t}=s.focusedHeader||{};null!=t&&t!=n.headerRowIndex&&(this.currentHeaderRowWithoutSpan=t)}return t}return r||!e?s.focusHeaderPosition({headerPosition:r,direction:l,fromTab:e,allowUserOverride:!0,event:i}):this.focusNextHeaderRow(n,l,i)}focusNextHeaderRow(t,e,i){const s=this.beans,o=t.headerRowIndex;let n,r=null;const l=$l(s),a=this.beans.visibleCols.allCols;if("Before"===e){if(o<=0)return!1;r=hi(a),n=o-1,this.currentHeaderRowWithoutSpan-=1}else r=a[0],n=o+1,this.currentHeaderRowWithoutSpan<l?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:h,headerRowIndex:c}=su(this.beans,r,n);return c>=l&&(c=-1),s.focusSvc.focusHeaderPosition({headerPosition:{column:h,headerRowIndex:c},direction:e,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(t,e="After"){if(t.getPinned())return;let i;if(Xn(t)){const s=t.getDisplayedLeafColumns();i="Before"===e?hi(s):s[0]}else i=t;this.gridBodyCon.scrollFeature.ensureColumnVisible(i)}findHeader(t,e){const{colGroupSvc:i,visibleCols:s}=this.beans;let o=t.column;if(o instanceof tr){const t=o.getDisplayedLeafColumns();o="Before"===e?t[0]:t[t.length-1]}const n="Before"===e?s.getColBefore(o):s.getColAfter(o);if(!n)return;if(t.headerRowIndex>=s.headerGroupRowCount)return{headerRowIndex:t.headerRowIndex,column:n};const r=i?.getColGroupAtLevel(n,t.headerRowIndex);return r?r.isPadding()&&n.isSpanHeaderHeight()?{headerRowIndex:s.headerGroupRowCount,column:n}:{headerRowIndex:t.headerRowIndex,column:r??n}:{headerRowIndex:n instanceof si&&n.isSpanHeaderHeight()?s.headerGroupRowCount:t.headerRowIndex,column:n}}getHeaderRowType(t){const e=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(e)return e.getRowType(t)}}],apiFunctions:{getFocusedCell:function(t){return t.focusSvc.getFocusedCell()},clearFocusedCell:function(t){return t.focusSvc.clearFocusedCell()},setFocusedCell:function(t,e,i,s){t.focusSvc.setFocusedCell({rowIndex:e,column:i,rowPinned:s,forceBrowserFocus:!0})},setFocusedHeader:function(t,e,i=!1){const s=t.headerNavigation?.getHeaderPositionForColumn(e,i);s&&t.focusSvc.focusHeaderPosition({headerPosition:s})},tabToNextCell:function(t,e){return t.navigation?.tabToNextCell(!1,e)??!1},tabToPreviousCell:function(t,e){return t.navigation?.tabToNextCell(!0,e)??!1}}},wd=class extends Dt{constructor(t,e){super(),this.isLeft=t,this.elements=e,this.getWidth=t?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[(this.isLeft?"left":"right")+"PinnedWidthChanged"]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){const t=this.getWidth(),e=t>0;for(const i of this.elements)i&&(H(i,e),st(i,t))}},vd={moduleName:"PinnedColumn",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(t=>{this.gridBodyCtrl=t.gridBodyCtrl}));const t=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t,displayedColumnsWidthChanged:t}),this.addManagedPropertyListener("domLayout",t)}checkContainerWidths(){const{gos:t,visibleCols:e,eventSvc:i}=this.beans,s=ye(t,"print"),o=s?0:e.getColsLeftWidth(),n=s?0:e.getDisplayedColumnsRightWidth();o!=this.leftWidth&&(this.leftWidth=o,i.dispatchEvent({type:"leftPinnedWidthChanged"})),n!=this.rightWidth&&(this.rightWidth=n,i.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const t=V(this.gridBodyCtrl.eBodyViewport);if(t<=50)return;const e=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:s,hasLockedPinned:o}=e;let n=s;(n.length||o)&&(i&&(n=i({columns:n,viewportWidth:t})),n?.length&&(n=n.filter((t=>!Si(t))),this.setColsPinned(n,null,"viewportSizeFeature")))}createPinnedWidthFeature(t,...e){return new wd(t,e)}setColsPinned(t,e,i){const{colModel:s,colAnimation:o,visibleCols:n,gos:r}=this.beans;if(!s.cols)return;if(!t?.length)return;if(ye(r,"print"))return void pe(37);let l;o?.start(),l=!0===e||"left"===e?"left":"right"===e?"right":null;const a=[];for(const e of t){if(!e)continue;const t=s.getCol(e);t&&t.getPinned()!==l&&(this.setColPinned(t,l),a.push(t))}a.length&&(n.refresh(i),Oi(this.eventSvc,a,i)),o?.finish()}initCol(t){const{pinned:e,initialPinned:i}=t.colDef;this.setColPinned(t,void 0!==e?e:i)}setColPinned(t,e){t.pinned=!0===e||"left"===e?"left":"right"===e?"right":null,t.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(t){const{scrollVisibleSvc:e}=this.beans;if(null==t.pinned)return;const i="left"===t.pinned,s="right"===t.pinned;t.hidden=!0;const o=()=>{const o=i?this.leftWidth:this.rightWidth;if(null==o)return;const n=0==o,r=t.hidden!==n,l=this.gos.get("enableRtl"),a=e.getScrollbarWidth();t.comp.setPinnedContainerWidth(`${e.verticalScrollShowing&&(l&&i||!l&&s)?o+a:o}px`),t.comp.setDisplayed(!n),r&&(t.hidden=n,t.refresh())};t.addManagedEventListeners({leftPinnedWidthChanged:o,rightPinnedWidthChanged:o,scrollVisibilityChanged:o,scrollbarWidthChanged:o})}getHeaderResizeDiff(t,e){if(e.getPinned()){const{leftWidth:e,rightWidth:i}=this,s=V(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(e+i+t>s){if(!(s>e+i))return 0;t=s-e-i}}return t}getPinnedColumnsOverflowingViewport(t){const e=(this.rightWidth??0)+(this.leftWidth??0);let i=!1;if(e<t)return{columns:[],hasLockedPinned:i};const{visibleCols:s}=this.beans,o=[...s.leftCols],n=[...s.rightCols];let r=0,l=0;const a=[];let h=e-0-t;for(;(l<o.length||r<n.length)&&h>0;){if(r<n.length){const t=n[r++];if(t.colDef.lockPinned){i=!0;continue}h-=t.getActualWidth(),a.push(t)}if(l<o.length&&h>0){const t=o[l++];if(t.colDef.lockPinned){i=!0;continue}h-=t.getActualWidth(),a.push(t)}}return{columns:a,hasLockedPinned:i}}}],css:[".ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}"]},Cd={moduleName:"Aria",version:se,beans:[class extends Dt{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=Ht(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const t=this.beans,e=g(t),i=this.descriptionContainer=e.createElement("div");i.classList.add("ag-aria-description-container"),R(i,"polite"),w(i,"relevant","additions text"),w(i,"atomic",!0),t.eGridDiv.appendChild(i)}announceValue(t,e){this.pendingAnnouncements.set(e,t),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const t=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout((()=>{this.handleAnnouncementUpdate(t)}),50)}handleAnnouncementUpdate(t){if(!this.isAlive()||!this.descriptionContainer)return;let e=t;null!=e&&""!=e.replace(/[ .]/g,"")?(this.lastAnnouncement===e&&(e=`${e}`),this.lastAnnouncement=e,this.descriptionContainer.textContent=e):this.lastAnnouncement=""}destroy(){super.destroy();const{descriptionContainer:t}=this;t&&(j(t),t.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}}]},bd="ag-delay-render",yd={moduleName:"ColumnDelayRender",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(t){this.alreadyRevealed||this.requesters.has(t)||(this.requesters.add(t),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,(t=>{t.gridBodyCtrl.eGridBody.classList.add(bd)})),this.hideRequested=!0))}revealColumns(t){if(this.alreadyRevealed||!this.isAlive())return;if(this.requesters.delete(t),this.requesters.size>0)return;const{renderStatus:e,ctrlsSvc:i}=this.beans;if(e){if(!e.areHeaderCellsRendered()&&this.timesRetried<5)return this.timesRetried++,void setTimeout((()=>this.revealColumns(t)));this.timesRetried=0}i.getGridBodyCtrl().eGridBody.classList.remove(bd),this.alreadyRevealed=!0}}],css:[":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}"]},Sd={tag:"div",cls:"ag-overlay",role:"presentation",children:[{tag:"div",cls:"ag-overlay-panel",role:"presentation",children:[{tag:"div",ref:"eOverlayWrapper",cls:"ag-overlay-wrapper",role:"presentation"}]}]},xd=class extends _i{constructor(){super(Sd),this.eOverlayWrapper=Ui,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}")}handleKeyDown(t){if(t.key!==Es||t.defaultPrevented||Vr(t))return;const e=this.beans;if(Fo(e,this.eOverlayWrapper,!1,t.shiftKey))return;let i=!1;i=t.shiftKey?e.focusSvc.focusGridView({column:hi(e.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):zl(e,!1),i&&t.preventDefault()}updateLayoutClasses(t,e){const i=this.eOverlayWrapper.classList,{AUTO_HEIGHT:s,NORMAL:o,PRINT:n}=Wr;i.toggle(s,e.autoHeight),i.toggle(o,e.normal),i.toggle(n,e.print)}postConstruct(){this.createManagedBean(new Ur(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(t){const e=this.eOverlayWrapper.classList;this.activeCssClass&&e.toggle(this.activeCssClass,!1),this.activeCssClass=t,e.toggle(t,!0)}showOverlay(t,e,i,s){if(this.setWrapperTypeClass(e),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=t,t){if(this.setDisplayed(!0,{skipAriaHidden:!0}),i&&this.isGridFocused()){const t=d(this.beans);t&&!p(this.beans)&&(this.elToFocusAfter=t)}t.then((e=>{if(this.activePromise===t){if(this.activePromise=null,e){if(this.activeOverlay!==e&&(this.eOverlayWrapper.appendChild(e.getGui()),this.activeOverlay=e,s)){const t=e;this.updateListenerDestroyFunc=this.addManagedPropertyListener(s,(({currentValue:e})=>{t.refresh?.(Qe(this.gos,{...e??{}}))}))}i&&this.isGridFocused()&&Ro(this.eOverlayWrapper)}}else this.activeOverlay!==e&&(this.destroyBean(e),e=null)}))}}updateOverlayWrapperPaddingTop(t){this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`)}destroyActiveOverlay(){this.activePromise=null;const t=this.activeOverlay;if(!t)return;let e=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,e&&!this.isGridFocused()&&(e=null);const i=this.updateListenerDestroyFunc;i&&(i(),this.updateListenerDestroyFunc=null),this.destroyBean(t),j(this.eOverlayWrapper),e?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const t=d(this.beans);return!!t&&this.beans.eGridDiv.contains(t)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},Rd={selector:"AG-OVERLAY-WRAPPER",component:xd},Fd={moduleName:"Overlay",version:se,userComponents:{agLoadingOverlay:class extends ma{init(){const t=e(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(t??wa),!t){const t=this.getLocaleTextFunc()("loadingOoo","Loading...");this.getGui().textContent=t,this.beans.ariaAnnounce.announceValue(t,"overlay")}}},agNoRowsOverlay:class extends ma{init(){const t=e(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(t??va),!t){const t=this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=t,this.beans.ariaAnnounce.announceValue(t,"overlay")}}}},apiFunctions:{showLoadingOverlay:function(t){t.overlays?.showLoadingOverlay()},showNoRowsOverlay:function(t){t.overlays?.showNoRowsOverlay()},hideOverlay:function(t){t.overlays?.hideOverlay()}},beans:[class extends Dt{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=Ce(this.gos),this.isServerSide=!this.isClientSide&&be(this.gos);const t=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:t,rowDataUpdated:t,gridSizeChanged:this.refreshWrapperPadding.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",t)}setOverlayWrapperComp(t){this.eWrapper=t,this.updateOverlayVisibility()}isVisible(){return 0!==this.state&&!!this.eWrapper}isExclusive(){return 1===this.state&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const t=this.gos,e=t.get("loading");(e||void 0===e&&!t.get("suppressLoadingOverlay"))&&this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const t=this.gos;t.get("loading")||t.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){this.showInitialOverlay=!1,this.gos.get("loading")?pe(99):this.doHideOverlay()}getOverlayWrapperSelector(){return Rd}getOverlayWrapperCompClass(){return xd}updateOverlayVisibility(){if(!this.eWrapper)return void(this.state=0);const{state:t,isClientSide:e,isServerSide:i,beans:{gos:s,colModel:o,rowModel:n}}=this;let r=this.gos.get("loading");void 0!==r&&(this.showInitialOverlay=!1),this.showInitialOverlay&&void 0===r&&!s.get("suppressLoadingOverlay")&&(r=!s.get("columnDefs")||!o.ready||!s.get("rowData")&&e),r?1!==t&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,e&&n.isEmpty()&&!s.get("suppressNoRowsOverlay")?2!==t&&this.doShowNoRowsOverlay():(1===t||!i&&0!==t)&&this.doHideOverlay())}doShowLoadingOverlay(){var t,e;this.eWrapper&&(this.state=1,this.showOverlay((t=this.beans.userCompFactory,e=Qe(this.gos,{}),t.getCompDetailsFromGridOptions(as,"agLoadingOverlay",e,!0)),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){var t,e;this.eWrapper&&(this.state=2,this.showOverlay((t=this.beans.userCompFactory,e=Qe(this.gos,{}),t.getCompDetailsFromGridOptions(hs,"agNoRowsOverlay",e,!0)),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(t,e,i){const s=t?.newAgStackInstance()??null;this.eWrapper?.showOverlay(s,e,this.isExclusive(),i),this.refreshWrapperPadding()}updateExclusive(){const t=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==t&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){const t=this.eWrapper;if(!t)return;let e=0;if(2===this.state){const t=this.beans.ctrlsSvc.get("gridHeaderCtrl");e=t?.headerHeight||0}this.wrapperPadding!==e&&(this.wrapperPadding=e,t.updateOverlayWrapperPaddingTop(e))}}]},kd=class{constructor(t){this.entriesMap={},this.entriesList=[],this.maxCount=t}addRow(t){if(this.entriesMap[t.rowNode.id]=t,this.entriesList.push(t),t.setCached(!0),this.entriesList.length>this.maxCount){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(t){if(null==t?.id)return null;const e=this.entriesMap[t.id];return e?(this.removeFromCache(e),e.setCached(!1),e.rowNode!=t?null:e):null}has(t){return null!=this.entriesMap[t.id]}removeRow(t){const e=t.id,i=this.entriesMap[e];delete this.entriesMap[e],di(this.entriesList,i)}removeFromCache(t){delete this.entriesMap[t.rowNode.id],di(this.entriesList,t)}getEntries(){return this.entriesList}};function Pd(t){if(!t)return;const e={top:{},bottom:{},normal:{}};for(const i of t){const t=i.id;switch(i.rowPinned){case"top":e.top[t]=i;break;case"bottom":e.bottom[t]=i;break;default:e.normal[t]=i}}return e}function Dd(t,e){const i=t.id;switch(t.rowPinned){case"top":return null!=e.top[i];case"bottom":return null!=e.bottom[i];default:return null!=e.normal[i]}}var Md={moduleName:"Sort",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(t,e,i){const s=this.getNextSortDirection(t);this.setSortForColumn(t,s,e,i)}progressSortFromEvent(t,e){const i="ctrl"===this.gos.get("multiSortKey");this.progressSort(t,i?e.ctrlKey||e.metaKey:e.shiftKey,"uiColumnSorted")}setSortForColumn(t,e,i,s){"asc"!==e&&"desc"!==e&&(e=null);const{gos:o,showRowGroupCols:n}=this.beans;let r=[t];if(Ee(o)&&t.getColDef().showRowGroup){const e=n?.getSourceColumnsForGroupColumn?.(t),i=e?.filter((t=>t.isSortable()));i&&(r=[t,...i])}for(const t of r)this.setColSort(t,e,s);const l=[];if(!i&&!o.get("alwaysMultiSort")||o.get("suppressMultiSort")){const t=this.clearSortBarTheseColumns(r,s);l.push(...t)}this.updateSortIndex(t),l.push(...r),this.dispatchSortChangedEvents(s,l)}updateSortIndex(t){const{gos:e,colModel:i,showRowGroupCols:s}=this.beans,o=Ee(e),n=s?.getShowRowGroupCol(t.getId()),r=o&&n||t,l=this.getColumnsWithSortingOrdered();i.forAllCols((t=>this.setColSortIndex(t,null)));const a=l.filter((t=>!(o&&t.getColDef().showRowGroup||t===r)));(r.getSort()?[...a,r]:a).forEach(((t,e)=>this.setColSortIndex(t,e)))}onSortChanged(t,e){this.dispatchSortChangedEvents(t,e)}isSortActive(){let t=!1;return this.beans.colModel.forAllCols((e=>{e.getSort()&&(t=!0)})),t}dispatchSortChangedEvents(t,e){const i={type:"sortChanged",source:t};e&&(i.columns=e),this.eventSvc.dispatchEvent(i)}clearSortBarTheseColumns(t,e){const i=[];return this.beans.colModel.forAllCols((s=>{t.includes(s)||(s.getSort()&&i.push(s),this.setColSort(s,void 0,e))})),i}getNextSortDirection(t){const e=t.getColDef().sortingOrder??this.gos.get("sortingOrder")??cu,i=e.indexOf(t.getSort());return i<0||i==e.length-1?e[0]:e[i+1]}getIndexedSortMap(){const{gos:t,colModel:e,showRowGroupCols:i,rowGroupColsSvc:s}=this.beans;let o=[];if(e.forAllCols((t=>{t.getSort()&&o.push(t)})),e.isPivotMode()){const e=Ee(t);o=o.filter((t=>{const s=!!t.getAggFunc(),o=!t.isPrimary(),n=e?i?.getShowRowGroupCol(t.getId()):t.getColDef().showRowGroup;return s||o||n}))}const n=s?.columns.filter((t=>!!t.getSort()))??[],r={};o.forEach(((t,e)=>r[t.getId()]=e)),o.sort(((t,e)=>{const i=t.getSortIndex(),s=e.getSortIndex();return null!=i&&null!=s?i-s:null==i&&null==s?r[t.getId()]>r[e.getId()]?1:-1:null==s?-1:1}));const l=Ee(t)&&!!n.length;l&&(o=[...new Set(o.map((t=>i?.getShowRowGroupCol(t.getId())??t)))]);const a=new Map;if(o.forEach(((t,e)=>a.set(t,e))),l)for(const t of n){const e=i.getShowRowGroupCol(t.getId());a.set(t,a.get(e))}return a}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort((([,t],[,e])=>t-e)).map((([t])=>t))}getSortModel(){return this.getColumnsWithSortingOrdered().filter((t=>t.getSort())).map((t=>({sort:t.getSort(),colId:t.getId()})))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter((t=>t.getSort())).map((t=>({sort:t.getSort(),column:t})))}canColumnDisplayMixedSort(t){const e=Ee(this.gos),i=!!t.getColDef().showRowGroup;return e&&i}getDisplaySortForColumn(t){const e=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t);if(!this.canColumnDisplayMixedSort(t)||!e?.length)return t.getSort();const i=null!=t.getColDef().field||t.getColDef().valueGetter?[t,...e]:e,s=i[0].getSort();return i.every((t=>t.getSort()==s))?s:"mixed"}getDisplaySortIndexForColumn(t){return this.getIndexedSortMap().get(t)}setupHeader(t,e,i){let s=0;t.addManagedListeners(e,{movingChanged:()=>{s=Date.now()}}),i&&t.addManagedElementListeners(i,{click:t=>{const i=e.isMoving(),o=Date.now();i||o-s<50||this.progressSortFromEvent(e,t)}});const o=()=>{const i=e.getSort();if(t.toggleCss("ag-header-cell-sorted-asc","asc"===i),t.toggleCss("ag-header-cell-sorted-desc","desc"===i),t.toggleCss("ag-header-cell-sorted-none",!i),e.getColDef().showRowGroup){const i=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e),s=i?.every((t=>e.getSort()==t.getSort()));t.toggleCss("ag-header-cell-sorted-mixed",!s)}};t.addManagedEventListeners({sortChanged:o,columnRowGroupChanged:o})}initCol(t){const{sort:e,initialSort:i,sortIndex:s,initialSortIndex:o}=t.colDef;void 0!==e?"asc"!==e&&"desc"!==e||(t.sort=e):"asc"!==i&&"desc"!==i||(t.sort=i),void 0!==s?null!==s&&(t.sortIndex=s):null!==o&&(t.sortIndex=o)}updateColSort(t,e,i){void 0!==e&&this.setColSort(t,"desc"===e||"asc"===e?e:void 0,i)}setColSort(t,e,i){t.sort!==e&&(t.sort=e,t.dispatchColEvent("sortChanged",i)),t.dispatchStateUpdatedEvent("sort")}setColSortIndex(t,e){t.sortIndex=e,t.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(t){return new au(t)}getSortIndicatorSelector(){return hu}},class extends Dt{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:t}=this;this.isAccentedSort=t.get("accentedSort"),this.primaryColumnsSortGroups=Ee(t),this.addManagedPropertyListener("accentedSort",(t=>this.isAccentedSort=t.currentValue)),this.addManagedPropertyListener("autoGroupColumnDef",(()=>this.primaryColumnsSortGroups=Ee(t)))}doFullSort(t,e){const i=t.map(((t,e)=>({currentPos:e,rowNode:t})));return i.sort(this.compareRowNodes.bind(this,e)),i.map((t=>t.rowNode))}compareRowNodes(t,e,i){const s=e.rowNode,o=i.rowNode;for(let e=0,i=t.length;e<i;e++){const i=t[e],n="desc"===i.sort,l=this.getValue(s,i.column),a=this.getValue(o,i.column);let h;const c=this.getComparator(i,s);if(h=c?c(l,a,s,o,n):r(l,a,this.isAccentedSort),!isNaN(h)&&0!==h)return"asc"===i.sort?h:-1*h}return e.currentPos-i.currentPos}getComparator(t,e){const i=t.column,s=i.getColDef().comparator;if(null!=s)return s;if(!i.getColDef().showRowGroup)return;const o=!e.group&&i.getColDef().field;if(!o)return;const n=this.beans.colModel.getColDefCol(o);return n?n.getColDef().comparator:void 0}getValue(t,e){const{valueSvc:i,colModel:s,showRowGroupCols:o,gos:n}=this.beans;if(!this.primaryColumnsSortGroups)return i.getValue(e,t,!1);if(t.rowGroupColumn===e){if(He(n,s.isPivotActive())){const s=t.data?t:ar(t.childrenAfterGroup);return s&&i.getValue(e,s,!1)}const r=o?.getShowRowGroupCol(e.getId());if(!r)return;return t.groupData?.[r.getId()]}return t.group&&e.getColDef().showRowGroup?void 0:i.getValue(e,t,!1)}}],apiFunctions:{onSortChanged:function(t){t.sortSvc?.onSortChanged("api")}},userComponents:{agSortIndicator:au},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},Td={moduleName:"ValueCache",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="valueCache",this.cacheVersion=0}postConstruct(){const t=this.gos;this.active=t.get("valueCache"),this.neverExpires=t.get("valueCacheNeverExpires")}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(t,e,i){if(this.active){const s=this.cacheVersion;t.__cacheVersion!==s&&(t.__cacheVersion=s,t.__cacheData={}),t.__cacheData[e]=i}}getValue(t,e){if(this.active&&t.__cacheVersion===this.cacheVersion)return t.__cacheData[e]}}],apiFunctions:{expireValueCache:function(t){t.valueCache?.expire()}}},Ed={moduleName:"Expression",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(t,e){if("string"==typeof t)return this.evaluateExpression(t,e);fe(15,{expression:t})}evaluateExpression(t,e){try{return this.createExpressionFunction(t)(e.value,e.context,e.oldValue,e.newValue,e.value,e.node,e.data,e.colDef,e.rowIndex,e.api,e.getValue,e.column,e.columnGroup)}catch(i){return fe(16,{expression:t,params:e,e:i}),null}}createExpressionFunction(t){const e=this.cache;if(e[t])return e[t];const i=this.createFunctionBody(t),s=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",i);return e[t]=s,s}createFunctionBody(t){return t.includes("return")?t:"return "+t+";"}}]},Ad={moduleName:"ChangeDetection",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:t,rowModel:e}=this.beans;Ce(t)&&(this.clientSideRowModel=e),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(t){const{gos:e,rowRenderer:i}=this.beans;if("paste"===t.source||e.get("suppressChangeDetection"))return;const s=t.node,o=[s],n=this.clientSideRowModel,r=n?.rootNode;if(r&&!s.isRowPinned()){const i=e.get("aggregateOnlyChangedColumns"),l=new Eh(i,r);l.addParentNode(s.parent,[t.column]),n.doAggregate(l),l.forEachChangedNodeDepthFirst((t=>{o.push(t),t.sibling&&o.push(t.sibling)}))}i.refreshCells({rowNodes:o})}}]},Id={moduleName:"CellApi",version:se,apiFunctions:{getCellValue:function(t,e){const{colKey:i,rowNode:o,useFormatter:n}=e,r=t.colModel.getColDefCol(i)??t.colModel.getCol(i);if(s(r))return null;const l=t.valueSvc.getValueForDisplay(r,o,n);return n?l.valueFormatted??h(l.value):l.value}}},Hd={moduleName:"CommunityCore",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:t,ctrlsSvc:e,context:i}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:t?.getState()??{}}),this.destroyCalled=!0,e.get("gridCtrl")?.destroyGridUi(),i.destroy(),super.destroy()}},class extends Dt{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Ch,this.fns={...wh,dispatchEvent:vh},this.preDestroyLink="";const{api:t}=this;for(const e of Object.keys(mh))t[e]=this.makeApi(e)[e]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(t,e){const{fns:i,beans:s}=this;i!==wh&&(i[t]=s?.validation?.validateApiFunction(t,e)??e)}makeApi(t){return{[t]:(...e)=>{const{beans:i,fns:{[t]:s}}=this;return s?s(i,...e):this.apiNotFound(t)}}}apiNotFound(t){const{beans:e,gos:i,preDestroyLink:s}=this;if(e){const e=mh[t];i.assertModuleRegistered(e,`api.${t}`)&&pe(27,{fnName:t,module:e})}else pe(26,{fnName:t,preDestroyLink:s})}destroy(){super.destroy(),this.fns=wh,this.beans=null}},class extends Bn{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){const t=this.gos.get("components");if(null!=t)for(const e of Object.keys(t))this.jsComps[e]=t[e]}registerModule(t){const{icons:e,userComponents:i,dynamicBeans:s,selectors:o}=t;if(i){const t=(t,e,i,s)=>{this.agGridDefaults[t]=e,(i||s)&&(this.agGridDefaultOverrides[t]={params:i,processParams:s})};for(const e of Object.keys(i)){let s=i[e];if("object"==typeof(n=s)&&n.getComp&&(s=s.getComp(this.beans)),"object"==typeof s){const{classImp:i,params:o,processParams:n}=s;t(e,i,o,n)}else t(e,s)}}var n;this.registerDynamicBeans(s);for(const t of o??[])this.selectors[t.selector]=t;if(e)for(const t of Object.keys(e))this.icons[t]=e[t]}getUserComponent(t,e){const i=(t,e,i,s)=>({componentFromFramework:e,component:t,params:i,processParams:s}),{frameworkOverrides:s}=this.beans,o=s.frameworkComponent(e,this.gos.get("components"));if(null!=o)return i(o,!0);const n=this.jsComps[e];if(n)return i(n,s.isFrameworkComponent(n));const r=this.agGridDefaults[e];if(r){const t=this.agGridDefaultOverrides[e];return i(r,!1,t?.params,t?.processParams)}return this.beans.validation?.missingUserComponent(t,e,this.agGridDefaults,this.jsComps),null}getSelector(t){return this.selectors[t]}getIcon(t){return this.icons[t]}getDynamicError(t,e){return e?we(279,{name:t}):this.beans.validation?.missingDynamicBean(t)??we(256)}},class extends Dt{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(t){this.agCompUtils=t.agCompUtils,this.registry=t.registry,this.frameworkCompWrapper=t.frameworkCompWrapper,this.gridOptions=t.gridOptions}getCompDetailsFromGridOptions(t,e,i,s=!1){return this.getCompDetails(this.gridOptions,t,e,i,s)}getCompDetails(t,e,i,s,o=!1){const{name:n,cellRenderer:r}=e;let l,a,{compName:h,jsComp:c,fwComp:u,paramsFromSelector:d,popupFromSelector:g,popupPositionFromSelector:p}=Ji(this.beans.frameworkOverrides,t,e,s);const f=t=>{const e=this.registry.getUserComponent(n,t);e&&(c=e.componentFromFramework?void 0:e.component,u=e.componentFromFramework?e.component:void 0,l=e.params,a=e.processParams)};var m;if(null!=h&&f(h),null==c&&null==u&&null!=i&&f(i),!c||!r||(m=c)&&m.prototype&&"getGui"in m.prototype||(c=this.agCompUtils?.adaptFunction(e,c)),!c&&!u){const{validation:t}=this.beans;return void(!o||h===i&&i?i&&!t&&fe(146,{comp:i}):h?t?.isProvidedUserComp(h)||fe(50,{compName:h}):i?t||fe(260,{...this.gos.getModuleErrorParams(),propName:n,compName:i}):fe(216,{name:n}))}const w=this.mergeParams(t,e,s,d,l,a),v=null==c,C=c??u;return{componentFromFramework:v,componentClass:C,params:w,type:e,popupFromSelector:g,popupPositionFromSelector:p,newAgStackInstance:()=>this.newAgStackInstance(C,v,w,e)}}newAgStackInstance(t,e,i,s){let o;o=e?this.frameworkCompWrapper.wrap(t,s.mandatoryMethods,s.optionalMethods,s):new t,this.createBean(o);const n=o.init?.(i);return null==n?Qi.resolve(o):n.then((()=>o))}mergeParams(t,e,i,s=null,o,n){const r={...i,...o},l=t,a=l?.[e.name+"Params"];return"function"==typeof a?Bt(r,a(i)):"object"==typeof a&&Bt(r,a),Bt(r,s),n?n(r):r}},class extends Dt{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=function(){if(void 0!==Ms)return Ms;if(!document.body)return-1;let t=1e6;const e=Xs()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){const s=2*t;if(i.style.height=s+"px",s>e||i.clientHeight!==s)break;t=s}return i.remove(),Ms=t,t}(),Ut(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const t=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,e=this.getUiBodyHeight();(t!==this.scrollY||e!==this.uiBodyHeight)&&(this.scrollY=t,this.uiBodyHeight=e,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;const t=this.scrollY/this.maxScrollY,e=t*this.pixelsToShave;Ut(this.gos,`RowContainerHeightService - Div Stretch Offset = ${e} (${this.pixelsToShave} * ${t})`),this.setDivStretchOffset(e)}setUiContainerHeight(t){t!==this.uiContainerHeight&&(this.uiContainerHeight=t,this.eventSvc.dispatchEvent({type:"rowContainerHeightChanged"}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(t){const e="number"==typeof t?Math.floor(t):null;this.divStretchOffset!==e&&(this.divStretchOffset=e,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(t){this.modelHeight=t,this.stretching=null!=t&&this.maxDivHeight>0&&t>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(t){return t-this.divStretchOffset}getUiBodyHeight(){const t=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return t.bottom-t.top}getScrollPositionForPixel(t){if(this.pixelsToShave<=0)return t;const e=this.modelHeight-this.getUiBodyHeight();return this.maxScrollY*(t/e)}},class extends Dt{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(t,e=!1){const{colFlex:i,colModel:s,colGroupSvc:o,colViewport:n,selectionColSvc:r}=this.beans;e||this.buildTrees(s,o),o?.updateOpenClosedVisibility(),this.leftCols=uc(this.treeLeft),this.centerCols=uc(this.treeCenter),this.rightCols=uc(this.treeRight),r?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(s),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(t),this.autoHeightCols=this.allCols.filter((t=>t.isAutoHeight())),i?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(s,this.leftCols,this.rightCols,t),n.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:t})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let t=0;for(const e of this.allCols){let i=e.getParent();for(;i;){if(!i.isPadding()){const e=i.getProvidedColumnGroup().getLevel()+1;e>t&&(t=e);break}i=i.getParent()}}return t}updateBodyWidths(){const t=vi(this.centerCols),e=vi(this.leftCols),i=vi(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==t,(this.bodyWidth!==t||this.leftWidth!==e||this.rightWidth!==i)&&(this.bodyWidth=t,this.leftWidth=e,this.rightWidth=i,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(t){this.setLeftValuesOfCols(t),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(t,e,i,s){let o,n;this.gos.get("enableRtl")?(o=e?e[0]:null,n=i?hi(i):null):(o=e?hi(e):null,n=i?i[0]:null);for(const e of t.getCols())e.setLastLeftPinned(e===o,s),e.setFirstRightPinned(e===n,s)}buildTrees(t,e){const i=t.getColsToShow(),s=i.filter((t=>"left"==t.getPinned())),o=i.filter((t=>"right"==t.getPinned())),n=i.filter((t=>"left"!=t.getPinned()&&"right"!=t.getPinned())),r=new $i,l=t=>e?e.createColumnGroups(t):t.columns;this.treeLeft=l({columns:s,idCreator:r,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=l({columns:o,idCreator:r,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=l({columns:n,idCreator:r,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(t){const e=t.getCols(),i=[],s=[],o=[];for(const t of e){const e=t.getPinned();e?!0===e||"left"===e?i.push(t):o.push(t):s.push(t)}this.ariaOrderColumns=i.concat(s).concat(o)}getAriaColIndex(t){let e;return e=Xn(t)?t.getLeafColumns()[0]:t,this.ariaOrderColumns.indexOf(e)+1}setLeftValuesOfGroups(){for(const t of[this.treeLeft,this.treeRight,this.treeCenter])for(const e of t)Xn(e)&&e.checkLeft()}setLeftValuesOfCols(t){const{colModel:e}=this.beans;if(!e.getColDefCols())return;const i=e.getCols().slice(0),s=this.gos.get("enableRtl");for(const e of[this.leftCols,this.rightCols,this.centerCols]){if(s){let i=vi(e);for(const s of e)i-=s.getActualWidth(),s.setLeft(i,t)}else{let i=0;for(const s of e)s.setLeft(i,t),i+=s.getActualWidth()}hc(i,e)}for(const e of i)e.setLeft(null,t)}joinCols(){this.allCols=this.gos.get("enableRtl")?this.rightCols.concat(this.centerCols).concat(this.leftCols):this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(t){return this.allCols.indexOf(t)>=0}getLeftColsForRow(t){const{leftCols:e,beans:{colModel:i}}=this;return i.colSpanActive?this.getColsForRow(t,e):e}getRightColsForRow(t){const{rightCols:e,beans:{colModel:i}}=this;return i.colSpanActive?this.getColsForRow(t,e):e}getColsForRow(t,e,i,s){const o=[];let n=null;for(let r=0;r<e.length;r++){const l=e[r],a=e.length-r,h=Math.min(l.getColSpan(t),a),c=[l];if(h>1){const t=h-1;for(let i=1;i<=t;i++)c.push(e[r+i]);r+=t}let u;if(i){u=!1;for(const t of c)i(t)&&(u=!0)}else u=!0;u&&(0===o.length&&n&&s&&s(l)&&o.push(n),o.push(l)),n=l}return o}getContainerWidth(t){switch(t){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}}getColBefore(t){const e=this.allCols,i=e.indexOf(t);return i>0?e[i-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const t=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};cc(this.treeCenter,!1,t),cc(this.treeLeft,!1,t),cc(this.treeRight,!1,t)}isVisible(t){return this.colsAndGroupsMap[t.getUniqueId()]===t}getFirstColumn(){const t=this.gos.get("enableRtl"),e=["leftCols","centerCols","rightCols"];t&&e.reverse();for(let i=0;i<e.length;i++){const s=this[e[i]];if(s.length)return t?hi(s):s[0]}return null}getColAfter(t){const e=this.allCols,i=e.indexOf(t);return i<e.length-1?e[i+1]:null}getColsLeftWidth(){return vi(this.leftCols)}getDisplayedColumnsRightWidth(){return vi(this.rightCols)}isColAtEdge(t,e){const i=this.allCols;if(!i.length)return!1;const s="first"===e;let o;if(Xn(t)){const e=t.getDisplayedLeafColumns();if(!e.length)return!1;o=s?e[0]:hi(e)}else o=t;return(s?i[0]:hi(i))===o}},class extends Gn{postConstruct(){const{globalListener:t,globalSyncListener:e}=this.beans;t&&this.addGlobalListener(t,!0),e&&this.addGlobalListener(e,!1)}},class extends Dt{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=Pu++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new t,this.globalEventHandlerFactory=t=>(e,i)=>{if(!this.isAlive())return;const s=ou.has(e);if(s&&!t||!s&&t)return;if(!function(t){return!!nu[t]}(e))return;const o=(t,e)=>{const i=this.gridOptions[nu[t]];"function"==typeof i&&this.beans.frameworkOverrides.wrapOutgoing((()=>i(e)))};if(this.gridReadyFired)o(e,i);else if("gridReady"===e){o(e,i),this.gridReadyFired=!0;for(const t of this.queueEvents)o(t.eventName,t.event);this.queueEvents=[]}else this.queueEvents.push({eventName:e,event:i})}}wireBeans(t){this.gridOptions=t.gridOptions,this.validation=t.validation,this.api=t.gridApi,this.gridId=t.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:t})=>{this.updateGridOptions({options:t,force:!0,source:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(t){return this.gridOptions[t]??$t[t]}getCallback(t){return this.mergeGridCommonParams(this.gridOptions[t])}exists(t){return i(this.gridOptions[t])}mergeGridCommonParams(t){return t?e=>t(this.addCommon(e)):t}updateGridOptions({options:t,force:e,source:i="api"}){const s={id:ku++,properties:[]},o=[],{gridOptions:n,validation:r}=this;for(const l of Object.keys(t)){const a=Lt.applyGlobalGridOption(l,t[l]);r?.warnOnInitialPropertyUpdate(i,l);const h=n[l];(e||"object"==typeof a&&"api"===i||h!==a)&&(n[l]=a,o.push({type:l,currentValue:a,previousValue:h,changeSet:s,source:i}))}this.validateGridOptions(this.gridOptions),s.properties=o.map((t=>t.type));for(const t of o)Ut(this,`Updated property ${t.type} from`,t.previousValue," to ",t.currentValue),this.propEventSvc.dispatchEvent(t)}addPropertyEventListener(t,e){this.propEventSvc.addEventListener(t,e)}removePropertyEventListener(t,e){this.propEventSvc.removeEventListener(t,e)}getDomDataKey(){return this.domDataKey}addCommon(t){return t.api=this.api,t.context=this.gridOptionsContext,t}validateOptions(t,e){for(const i of Object.keys(t)){const s=t[i];if(null==s||!1===s)continue;let o=e[i];"function"==typeof o&&(o=o(t,this.gridOptions,this.beans)),o&&this.assertModuleRegistered(o,i)}}validateGridOptions(t){this.validateOptions(t,Ru),this.validation?.processGridOptions(t)}validateColDef(t,e,i){!i&&this.beans.dataTypeSvc?.isColPendingInference(e)||(this.validateOptions(t,gu),this.validation?.validateColDef(t))}assertModuleRegistered(t,e){const i=Array.isArray(t)?t.some((t=>this.isModuleRegistered(t))):this.isModuleRegistered(t);return i||fe(200,{...this.getModuleErrorParams(),moduleName:t,reasonOrId:e}),i}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:ee(),rowModelType:this.get("rowModelType"),isUmd:!1}}isModuleRegistered(t){return te(t,this.gridId,this.get("rowModelType"))}setInstanceDomData(t){t[Du]=this.instanceId}isElementInThisInstance(t){let e=t;for(;e;){const t=e[Du];if(i(t))return t===this.instanceId;e=e.parentElement}return!1}},class extends Dt{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],(t=>this.refreshAll(Ri(t.source)))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",(t=>this.setPivotMode(this.gos.get("pivotMode"),Ri(t.source))))}createColsFromColDefs(t){const{beans:e}=this,{valueCache:i,colAutosize:s,rowGroupColsSvc:o,pivotColsSvc:n,valueColsSvc:r,visibleCols:l,eventSvc:a,groupHierarchyColSvc:h}=e,c=this.colDefs?Gi(e,t):void 0;i?.expire();const u=this.colDefCols?.list,d=this.colDefCols?.tree,g=function(t,e=null,i,s,o){const n=new ai,{existingCols:r,existingGroups:l,existingColKeys:a}=function(t){const e=[],i=[],s=[];return t&&Ei(null,t,(t=>{if(oi(t))i.push(t);else{const i=t;s.push(i.getId()),e.push(i)}})),{existingCols:e,existingGroups:i,existingColKeys:s}}(s);n.addExistingKeys(a);const h=Pi(t,e,0,i,r,n,l,o),{colGroupSvc:c}=t,u=c?.findMaxDepth(h,0)??0,d=c?c.balanceColumnTree(h,0,u,n):h;return Ei(null,d,ki),{columnTree:d,treeDepth:u}}(e,this.colDefs,!0,d,t);Ci(e,this.colDefCols?.tree,g.columnTree);const p=g.columnTree,f=g.treeDepth,m=wi(p),w={};for(const t of m)w[t.getId()]=t;this.colDefCols={tree:p,treeDepth:f,list:m,map:w},this.createColumnsForService([h],this.colDefCols,t),o?.extractCols(t,u),n?.extractCols(t,u),r?.extractCols(t,u),this.ready=!0,this.refreshCols(!0,t),l.refresh(t),a.dispatchEvent({type:"columnEverythingChanged",source:t}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),a.dispatchEvent({type:"newColumnsLoaded",source:t}),"gridInitializing"===t&&s?.applyAutosizeStrategy()}refreshCols(t,e){if(!this.colDefCols)return;const i=this.cols?.tree;this.saveColOrder();const{autoColSvc:s,selectionColSvc:o,rowNumbersSvc:n,quickFilter:r,pivotResultCols:l,showRowGroupCols:a,rowAutoHeight:h,visibleCols:c,colViewport:u,eventSvc:d}=this.beans,g=this.selectCols(l,this.colDefCols);this.createColumnsForService([s,o,n],g,e);const p=(f=this.gos,this.showingPivotResult?!f.get("enableStrictPivotColumnOrder"):f.get("maintainColumnOrder"));var f;t&&!p||this.restoreColOrder(g),this.positionLockedCols(g),a?.refresh(),r?.refreshCols(),this.setColSpanActive(),h?.setAutoHeightActive(g),c.clear(),u.clear(),!ci(i,this.cols.tree)&&d.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(t,e,i){for(const s of t)s&&(s.createColumns(e,(t=>{this.lastOrder=t(this.lastOrder),this.lastPivotOrder=t(this.lastPivotOrder)}),i),s.addColumns(e))}selectCols(t,e){const i=t?.getPivotResultCols()??null;this.showingPivotResult=null!=i;const{map:s,list:o,tree:n,treeDepth:r}=i??e;return this.cols={list:o.slice(),map:{...s},tree:n.slice(),treeDepth:r},i&&(i.list.some((t=>void 0!==this.cols?.map[t.getColId()]))||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const{valueColsSvc:t,selectionColSvc:e,gos:i}=this.beans,s=this.isPivotMode()&&!this.showingPivotResult,o=e?.isSelectionColumnEnabled(),n=i.get("rowNumbers"),r=t?.columns;return this.cols.list.filter((t=>{const e=bi(t);if(s){const i=r?.includes(t);return e||i||o&&yi(t)||n&&Si(t)}return e||t.isVisible()}))}refreshAll(t){this.ready&&(this.refreshCols(!1,t),this.beans.visibleCols.refresh(t))}setColsVisible(t,e=!1,i){Bi(this.beans,{state:t.map((t=>({colId:"string"==typeof t?t:t.getColId(),hide:!e})))},i)}restoreColOrder(t){const e=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!e)return;const i=e.filter((e=>null!=t.map[e.getId()]));if(0===i.length)return;if(i.length===t.list.length)return void(t.list=i);const s=t=>{const e=t.getOriginalParent();return!!e&&(e.getChildren().length>1||s(e))};if(!i.some((t=>s(t)))){const e=new Set(i);for(const s of t.list)e.has(s)||i.push(s);return void(t.list=i)}const o=new Map;for(let t=0;t<i.length;t++)o.set(i[t],t);const n=t.list.filter((t=>!o.has(t)));if(0===n.length)return void(t.list=i);const r=(t,e)=>{const i=e?e.getOriginalParent():t.getOriginalParent();if(!i)return null;let s=null,n=null;for(const r of i.getChildren())if(r!==e&&r!==t)if(r instanceof si){const t=o.get(r);if(null==t)continue;(null==s||s<t)&&(s=t,n=r)}else r.forEachLeafColumn((t=>{const e=o.get(t);null!=e&&(null==s||s<e)&&(s=e,n=t)}));return null==n?r(t,i):n},l=[],a=new Map;for(const t of n){const e=r(t,null);if(null==e){l.push(t);continue}const i=a.get(e);void 0===i?a.set(e,t):Array.isArray(i)?i.push(t):a.set(e,[i,t])}const h=new Array(t.list.length);let c=h.length-1;for(let t=l.length-1;t>=0;t--)h[c--]=l[t];for(let t=i.length-1;t>=0;t--){const e=i[t],s=a.get(e);if(s)if(Array.isArray(s))for(let t=s.length-1;t>=0;t--)h[c--]=s[t];else h[c--]=s;h[c--]=e}t.list=h}positionLockedCols(t){t.list=Ai(t.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(t){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],t)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some((t=>null!=t.getColDef().colSpan))}isPivotMode(){return this.pivotMode}setPivotMode(t,e){if(t===this.pivotMode)return;if(this.pivotMode=t,!this.ready)return;this.refreshCols(!1,e);const{visibleCols:i,eventSvc:s}=this.beans;i.refresh(e),s.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const t=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!t?.length}recreateColumnDefs(t){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(t);const e=Ri(t.source);this.createColsFromColDefs(e)}setColumnDefs(t,e){this.colDefs=t,this.createColsFromColDefs(e)}destroy(){Ci(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(t){const{pivotResultCols:e,autoColSvc:i,selectionColSvc:s,groupHierarchyColSvc:o}=this.beans;ui(this.colDefCols?.list,t),ui(i?.columns?.list,t),ui(s?.columns?.list,t),ui(o?.columns?.list,t),ui(e?.getPivotResultCols()?.list,t)}getColsForKeys(t){return t?t.map((t=>this.getCol(t))).filter((t=>null!=t)):[]}getColDefCol(t){return this.colDefCols?.list?this.getColFromCollection(t,this.colDefCols):null}getCol(t){return null==t?null:this.getColFromCollection(t,this.cols)}getColById(t){return this.cols?.map[t]??null}getColFromCollection(t,e){if(null==e)return null;const{map:i,list:s}=e;if("string"==typeof t&&i[t])return i[t];for(let e=0;e<s.length;e++)if(Fi(s[e],t))return s[e];const{autoColSvc:o,selectionColSvc:n,groupHierarchyColSvc:r}=this.beans;return o?.getColumn(t)??n?.getColumn(t)??r?.getColumn(t)??null}},class extends Dt{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:t,bottomRowBounds:e}=this;return t&&e?Math.max(e.rowTop+e.rowHeight-t.rowTop,0):0}getCurrentPagePixelRange(){const{topRowBounds:t,bottomRowBounds:e}=this;return{pageFirstPixel:t?.rowTop??0,pageLastPixel:e?e.rowTop+e.rowHeight:0}}calculateBounds(t,e){const{rowModel:i}=this.beans,s=i.getRowBounds(t);s&&(s.rowIndex=t),this.topRowBounds=s;const o=i.getRowBounds(e);o&&(o.rowIndex=e),this.bottomRowBounds=o,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const t=this.topRowBounds?.rowTop??0;this.pixelOffset!==t&&(this.pixelOffset=t,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},class extends Dt{constructor(){super(...arguments),this.beanName="pageBoundsListener"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(t){this.calculatePages(),this.eventSvc.dispatchEvent({type:"paginationChanged",animate:t?.animate??!1,newData:t?.newData??!1,newPage:t?.newPage??!1,newPageSize:t?.newPageSize??!1,keepRenderedRows:t?.keepRenderedRows??!1})}calculatePages(){const{pageBounds:t,pagination:e,rowModel:i}=this.beans;e?e.calculatePages():t.calculateBounds(0,i.getRowCount()-1)}},class extends Dt{constructor(){super(...arguments),this.beanName="rowRenderer",this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{const t=()=>{for(const t of this.getAllCellCtrls())t.onCellSelectionChanged()},e=()=>{for(const t of this.getAllCellCtrls())t.updateRangeBordersIfRangeCount()},i=()=>{this.eventSvc.addListener("cellSelectionChanged",t),this.eventSvc.addListener("columnMoved",e),this.eventSvc.addListener("columnPinned",e),this.eventSvc.addListener("columnVisible",e)},s=()=>{this.eventSvc.removeListener("cellSelectionChanged",t),this.eventSvc.removeListener("columnMoved",e),this.eventSvc.removeListener("columnPinned",e),this.eventSvc.removeListener("columnVisible",e)};this.addDestroyFunc((()=>s())),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],(()=>{ze(this.gos)?i():s()})),ze(this.gos)&&i()}}wireBeans(t){this.pageBounds=t.pageBounds,this.colModel=t.colModel,this.pinnedRowModel=t.pinnedRowModel,this.rowModel=t.rowModel,this.focusSvc=t.focusSvc,this.rowContainerHeight=t.rowContainerHeight,this.ctrlsSvc=t.ctrlsSvc,this.editSvc=t.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,(t=>{this.gridBodyCtrl=t.gridBodyCtrl,this.initialise()}))}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners(["domLayout","embedFullWidthRows"],(()=>this.onDomLayoutChanged())),this.addManagedPropertyListeners(["suppressMaxRenderedRowRestriction","rowBuffer"],(()=>this.redraw())),this.addManagedPropertyListener("suppressCellFocus",(t=>this.onSuppressCellFocusChanged(t.currentValue))),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],(()=>this.redrawRows())),this.addManagedPropertyListener("cellSelection",(({currentValue:t,previousValue:e})=>{(!e&&t||e&&!t)&&this.redrawRows()}));const{stickyRowSvc:t,gos:e,showRowGroupCols:i}=this.beans;if(i&&this.addManagedPropertyListener("showOpenedGroup",(()=>{const t=i.getShowRowGroupCols();t.length&&this.refreshCells({columns:t,force:!0})})),t)this.stickyRowFeature=t.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const t=this.gridBodyCtrl;t.setStickyTopHeight(0),t.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=ye(e,"print"),this.embedFullWidthRows=this.printLayout||e.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const t=this.getKeepDetailRowsCount();this.cachedRowCtrls=new kd(null!=t?t:3)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const t=Object.values(this.rowCtrlsByRowIndex),e=Object.values(this.zombieRowCtrls),i=this.cachedRowCtrls?.getEntries()??[];this.allRowCtrls=e.length>0||i.length>0?[...t,...e,...i]:t}isCellBeingRendered(t,e){const i=this.rowCtrlsByRowIndex[t];if(!e||!i)return!!i;if(i.isFullWidth())return!0;const s=this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:t,column:e,rowPinned:null});return!!s||!!i.getCellCtrl(e)||!i.isRowRendered()}updateCellFocus(t){for(const e of this.getAllCellCtrls())e.onCellFocused(t);for(const e of this.getFullWidthRowCtrls())e.onFullWidthRowFocused(t)}onCellFocusChanged(t){if(null!=t?.rowIndex&&!t.rowPinned){const e=this.beans.colModel.getCol(t.column)??void 0;this.isCellBeingRendered(t.rowIndex,e)||this.redraw()}this.updateCellFocus(t)}onSuppressCellFocusChanged(t){for(const e of this.getAllCellCtrls())e.onSuppressCellFocusChanged(t);for(const e of this.getFullWidthRowCtrls())e.onSuppressCellFocusChanged(t)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:t=>this.onCellFocusChanged(t),cellFocusCleared:()=>this.updateCellFocus(),flashCells:t=>{const{cellFlashSvc:e}=this.beans;if(e)for(const i of this.getAllCellCtrls())e.onFlashCells(i,t)},columnHoverChanged:()=>{for(const t of this.getAllCellCtrls())t.onColumnHover()},displayedColumnsChanged:()=>{for(const t of this.getAllCellCtrls())t.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(const t of this.getAllCellCtrls())t.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(const t of this.destroyFuncsForColumnListeners)t();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();const t=this.colModel.getCols();for(const e of t){const t=t=>{for(const i of this.getAllCellCtrls())i.column===e&&t(i)},i=()=>{t((t=>t.onLeftChanged()))},s=()=>{t((t=>t.onWidthChanged()))},o=()=>{t((t=>t.onFirstRightPinnedChanged()))},n=()=>{t((t=>t.onLastLeftPinnedChanged()))},r=()=>{t((t=>t.onColDefChanged()))};e.__addEventListener("leftChanged",i),e.__addEventListener("widthChanged",s),e.__addEventListener("firstRightPinnedChanged",o),e.__addEventListener("lastLeftPinnedChanged",n),e.__addEventListener("colDefChanged",r),this.destroyFuncsForColumnListeners.push((()=>{e.__removeEventListener("leftChanged",i),e.__removeEventListener("widthChanged",s),e.__removeEventListener("firstRightPinnedChanged",o),e.__removeEventListener("lastLeftPinnedChanged",n),e.__removeEventListener("colDefChanged",r)}))}}onDomLayoutChanged(){const t=ye(this.gos,"print"),e=t||this.gos.get("embedFullWidthRows"),i=e!==this.embedFullWidthRows||this.printLayout!==t;this.printLayout=t,this.embedFullWidthRows=e,i&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t)}onPageLoaded(t){this.redrawAfterModelUpdate({recycleRows:t.keepRenderedRows,animate:t.animate,newData:t.newData,newPage:t.newPage,onlyBody:!0})}getAllCellsNotSpanningForColumn(t){const e=[];for(const i of this.getAllRowCtrls()){const s=i.getCellCtrl(t,!0)?.eGui;s&&e.push(s)}return e}refreshFloatingRowComps(t=!0){this.refreshFloatingRows(this.topRowCtrls,"top",t),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",t)}refreshFloatingRows(t,e,i){const{pinnedRowModel:s,beans:o,printLayout:n}=this,r=Object.fromEntries(t.map((t=>[t.rowNode.id,t])));s?.forEachPinnedRow(e,((l,a)=>{const h=t[a];h&&void 0===s.getPinnedRowById(h.rowNode.id,e)&&(h.destroyFirstPass(),h.destroySecondPass()),l.id in r&&i?(t[a]=r[l.id],delete r[l.id]):t[a]=new pd(l,o,!1,!1,n)}));const l=("top"===e?s?.getPinnedTopRowCount():s?.getPinnedBottomRowCount())??0;t.length=l}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(t,e=!1){if(t.sticky)this.stickyRowFeature?.refreshStickyNode(t);else{if(this.cachedRowCtrls?.has(t))return void this.cachedRowCtrls.removeRow(t);{const e=e=>{const i=e[t.rowIndex];i&&i.rowNode===t&&(i.destroyFirstPass(),i.destroySecondPass(),e[t.rowIndex]=this.createRowCon(t,!1,!1))};switch(t.rowPinned){case"top":e(this.topRowCtrls);break;case"bottom":e(this.bottomRowCtrls);break;default:e(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}}e||this.dispatchDisplayedRowsChanged(!1)}redrawRows(t){const{editSvc:e}=this.beans;if(e?.isEditing()&&(e.isBatchEditing()?e.cleanupEditors():e.stopEditing(void 0,{source:"api"})),null!=t){for(const e of t??[])this.redrawRow(e,!0);this.dispatchDisplayedRowsChanged(!1)}else this.redrawAfterModelUpdate()}redrawAfterModelUpdate(t={}){this.getLockOnRefresh();const e=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(t);const i=!t.domLayoutChanged&&!!t.recycleRows,s=t.animate&&Me(this.gos),o=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:n,gos:r}=this;if(n){n.checkStickyRows();const t=n.extraTopHeight+n.extraBottomHeight;t&&this.updateContainerHeights(t)}this.recycleRows(o,s),this.gridBodyCtrl.updateRowCount(),t.onlyBody||this.refreshFloatingRowComps(r.get("enableRowPinning")?i:void 0),this.dispatchDisplayedRowsChanged(),null!=e&&this.restoreFocusedCell(e),this.releaseLockOnRefresh()}scrollToTopIfNewData(t){const e=t.newData||t.newPage,i=this.gos.get("suppressScrollOnNewData");e&&!i&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(t=0){const{rowContainerHeight:e}=this;if(this.printLayout)return void e.setModelHeight(null);let i=this.pageBounds.getCurrentPageHeight();0===i&&(i=1),e.setModelHeight(i+t)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(we(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(t){if(!t)return;const e=this.beans.focusSvc,i=this.findPositionToFocus(t);i?t.rowIndex===i.rowIndex&&t.rowPinned==i.rowPinned?e.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(Qe(this.gos,{...i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"})):e.setFocusedCell({...i,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0}):e.focusHeaderPosition({headerPosition:{headerRowIndex:$l(this.beans)-1,column:t.column}})}findPositionToFocus(t){const{pagination:e,pageBounds:i}=this.beans;let s=t;for(null==s.rowPinned&&e&&i&&!e.isRowInPage(s.rowIndex)&&(s={rowPinned:null,rowIndex:i.getFirstRow()});s;){if(null==s.rowPinned&&i)if(s.rowIndex<i.getFirstRow()){if(s=Dh(this.beans,{rowPinned:null,rowIndex:0}),!s)return null}else s.rowIndex>i.getLastRow()&&(s={rowPinned:null,rowIndex:i.getLastRow()});const e=this.getRowByPosition(s);if(e?.isAlive())return{...e.getRowPosition(),column:t.column};s=Dh(this.beans,s)}return null}getAllCellCtrls(){const t=[],e=this.getAllRowCtrls(),i=e.length;for(let s=0;s<i;s++){const i=e[s].getAllCellCtrls(),o=i.length;for(let e=0;e<o;e++)t.push(i[e])}return t}getAllRowCtrls(){const{spannedRowRenderer:t}=this.beans,e=this.getStickyTopRowCtrls(),i=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...e,...i,...t?.getCtrls("top")??[],...t?.getCtrls("bottom")??[],...t?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(t,e,i){const s=this.rowCtrlsByRowIndex[e];s&&s.addEventListener(t,i)}refreshCells({rowNodes:t,columns:e,force:i,suppressFlash:s}={}){const o={force:i,newData:!1,suppressFlash:s};for(const i of this.getCellCtrls(t,e))i.refreshOrDestroyCell(o);this.refreshFullWidth(t)}refreshRows(t={}){for(const e of this.getRowCtrls(t.rowNodes))e.refreshRow(t);this.refreshFullWidth(t.rowNodes)}refreshFullWidth(t){if(!t)return;let e=!1;for(const i of this.getRowCtrls(t))i.isFullWidth()&&(i.refreshFullWidth()||(e=!0,this.redrawRow(i.rowNode,!0)));e&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(t){const e=Pd(t),i=this.getAllRowCtrls();return t&&e?i.filter((t=>Dd(t.rowNode,e))):i}getCellCtrls(t,e){let s;i(e)&&(s={},e.forEach((t=>{const e=this.colModel.getCol(t);i(e)&&(s[e.getId()]=!0)})));const o=[];for(const e of this.getRowCtrls(t))for(const t of e.getAllCellCtrls()){const e=t.column.getId();s&&!s[e]||o.push(t)}return o}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(t=!1){const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e,t),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const t=[];for(const e of Object.keys(this.rowCtrlsByRowIndex))null==this.rowCtrlsByRowIndex[e].rowNode.id&&t.push(e);this.removeRowCtrls(t);const e={};for(const t of Object.values(this.rowCtrlsByRowIndex))e[t.rowNode.id]=t;return this.rowCtrlsByRowIndex={},e}removeRowCtrls(t,e=!1){for(const i of t){const t=this.rowCtrlsByRowIndex[i];t&&(t.destroyFirstPass(e),t.destroySecondPass()),delete this.rowCtrlsByRowIndex[i]}}onBodyScroll(t){"vertical"===t.direction&&this.redraw({afterScroll:!0})}redraw(t={}){const{focusSvc:e,animationFrameSvc:i}=this.beans,{afterScroll:s}=t;let o;const n=this.stickyRowFeature;n&&(o=e?.getFocusCellToUseAfterRefresh()||void 0);const r=this.firstRenderedRow,l=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let a=!1;if(n){a=n.checkStickyRows();const t=n.extraTopHeight+n.extraBottomHeight;t&&this.updateContainerHeights(t)}if((!s||a||this.firstRenderedRow!==r||this.lastRenderedRow!==l)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,s),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(s&&!a),null!=o)){const t=e?.getFocusCellToUseAfterRefresh();null!=o&&null==t&&(i?.flushAllFrames(),this.restoreFocusedCell(o))}}removeRowCompsNotToDraw(t,e){const i={};for(const e of t)i[e]=!0;const s=Object.keys(this.rowCtrlsByRowIndex).filter((t=>!i[t]));this.removeRowCtrls(s,e)}calculateIndexesToDraw(t){const e=[];for(let t=this.firstRenderedRow;t<=this.lastRenderedRow;t++)e.push(t);const i=this.beans.pagination,s=this.beans.focusSvc?.getFocusedCell()?.rowIndex;null!=s&&(s<this.firstRenderedRow||s>this.lastRenderedRow)&&(!i||i.isRowInPage(s))&&s<this.rowModel.getRowCount()&&e.push(s);const o=t=>{const i=t.rowNode.rowIndex;null!=i&&i!==s&&(i<this.firstRenderedRow||i>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(t)&&e.push(i)};for(const t of Object.values(this.rowCtrlsByRowIndex))o(t);if(t)for(const e of Object.values(t))o(e);e.sort(((t,e)=>t-e));const n=[];for(let t=0;t<e.length;t++){const i=e[t],s=this.rowModel.getRow(i);s&&!s.sticky&&n.push(i)}return n}recycleRows(t,e=!1,i=!1){const s=this.calculateIndexesToDraw(t);(this.printLayout||i)&&(e=!1),this.removeRowCompsNotToDraw(s,!e);for(const o of s)this.createOrUpdateRowCtrl(o,t,e,i);if(t){const{animationFrameSvc:s}=this.beans;s?.active&&i&&!this.printLayout?s.addDestroyTask((()=>{this.destroyRowCtrls(t,e),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()})):this.destroyRowCtrls(t,e)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(t=!1){this.eventSvc.dispatchEvent({type:"displayedRowsChanged",afterScroll:t})}onDisplayedColumnsChanged(){const{visibleCols:t}=this.beans,e=t.isPinningLeft(),i=t.isPinningRight();(this.pinningLeft!==e||i!==this.pinningRight)&&(this.pinningLeft=e,this.pinningRight=i,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const t=[];for(const e of this.getFullWidthRowCtrls())t.push(e.rowNode.rowIndex.toString());this.refreshFloatingRowComps(),this.removeRowCtrls(t),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(t){const e=Pd(t);return this.getAllRowCtrls().filter((t=>!!t.isFullWidth()&&!(null!=e&&!Dd(t.rowNode,e))))}createOrUpdateRowCtrl(t,e,s,o){let n,r=this.rowCtrlsByRowIndex[t];if(r||(n=this.rowModel.getRow(t),i(n)&&i(e)&&e[n.id]&&n.alreadyRendered&&(r=e[n.id],e[n.id]=null)),!r){if(n||(n=this.rowModel.getRow(t)),!i(n))return;r=this.createRowCon(n,s,o)}n&&(n.alreadyRendered=!0),this.rowCtrlsByRowIndex[t]=r}destroyRowCtrls(t,e){const i=[];if(t)for(const s of Object.values(t))if(s)if(this.cachedRowCtrls&&s.isCacheable())this.cachedRowCtrls.addRow(s);else if(s.destroyFirstPass(!e),e){const t=s.instanceId;this.zombieRowCtrls[t]=s,i.push((()=>{s.destroySecondPass(),delete this.zombieRowCtrls[t]}))}else s.destroySecondPass();e&&(i.push((()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())})),window.setTimeout((()=>{for(const t of i)t()}),400))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){return this.getRowBuffer()*Fe(this.beans)}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:t,pageBounds:e,rowModel:i}=this;let s,o;if(t.updateOffset(),i.isRowsToRender())if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),s=e.getFirstRow(),o=e.getLastRow();else{const n=this.getRowBufferInPixels(),r=this.ctrlsSvc.getScrollFeature(),l=this.gos.get("suppressRowVirtualisation");let a,h,c=!1;do{const i=e.getPixelOffset(),{pageFirstPixel:s,pageLastPixel:o}=e.getCurrentPagePixelRange(),u=t.divStretchOffset,d=r.getVScrollPosition(),g=d.top,p=d.bottom;l?(a=s+u,h=o+u):(a=Math.max(g+i-n,s)+u,h=Math.min(p+i+n,o)+u),this.firstVisibleVPixel=Math.max(g+i,s)+u,this.lastVisibleVPixel=Math.min(p+i,o)+u,c=this.ensureAllRowsInRangeHaveHeightsCalculated(a,h)}while(c);let u=i.getRowIndexAtPixel(a),d=i.getRowIndexAtPixel(h);const g=e.getFirstRow(),p=e.getLastRow();u<g&&(u=g),d>p&&(d=p),s=u,o=d}else s=0,o=-1;const n=ye(this.gos,"normal"),r=this.gos.get("suppressMaxRenderedRowRestriction"),l=Math.max(this.getRowBuffer(),500);n&&!r&&o-s>l&&(o=s+l),(s!==this.firstRenderedRow||o!==this.lastRenderedRow)&&(this.firstRenderedRow=s,this.lastRenderedRow=o,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:s,lastRow:o}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,ht(this.beans,(()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})})))}ensureAllRowsInRangeHaveHeightsCalculated(t,e){const i=this.pinnedRowModel?.ensureRowHeightsValid(),s=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:o,rowModel:n}=this,r=n.ensureRowHeightsValid(t,e,o.getFirstRow(),o.getLastRow());return(r||s)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),!!(s||r||i)&&(this.updateContainerHeights(),!0)}doNotUnVirtualiseRow(t){const e=!1,i=t.rowNode,s=this.focusSvc.isRowFocused(i.rowIndex,i.rowPinned),o=this.editSvc?.isEditing(t);return(s||o||i.detail)&&!!this.isRowPresent(i)||e}isRowPresent(t){return!!this.rowModel.isRowPresent(t)&&(this.beans.pagination?.isRowInPage(t.rowIndex)??!0)}createRowCon(t,e,i){const s=this.cachedRowCtrls?.getRow(t)??null;return s||new pd(t,this.beans,e,i&&!this.printLayout&&!!this.beans.animationFrameSvc?.active,this.printLayout)}getRenderedNodes(){const t=Object.values(this.rowCtrlsByRowIndex).map((t=>t.rowNode));return[...this.getStickyTopRowCtrls().map((t=>t.rowNode)),...t,...this.getStickyBottomRowCtrls().map((t=>t.rowNode))]}getRowByPosition(t){let e;const{rowIndex:i}=t;switch(t.rowPinned){case"top":e=this.topRowCtrls[i];break;case"bottom":e=this.bottomRowCtrls[i];break;default:e=this.rowCtrlsByRowIndex[i],e||(e=this.getStickyTopRowCtrls().find((t=>t.rowNode.rowIndex===i))||null,e||(e=this.getStickyBottomRowCtrls().find((t=>t.rowNode.rowIndex===i))||null))}return e}isRangeInRenderedViewport(t,e){return null!=t&&null!=e&&!(e<this.firstRenderedRow||t>this.lastRenderedRow)}},class extends Dt{constructor(){super(...arguments),this.beanName="valueSvc",this.hasEditSvc=!1,this.initialised=!1,this.isSsrm=!1}wireBeans(t){this.expressionSvc=t.expressionSvc,this.colModel=t.colModel,this.valueCache=t.valueCache,this.dataTypeSvc=t.dataTypeSvc,this.editSvc=t.editSvc,this.hasEditSvc=!!t.editSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=be(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const t=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addListener("cellValueChanged",t,!0),this.addDestroyFunc((()=>this.eventSvc.removeListener("cellValueChanged",t,!0))),this.addManagedPropertyListener("treeData",(t=>this.isTreeData=t.currentValue))}getValueForDisplay(t,e,i=!1,s=!1,o="ui"){const{showRowGroupColValueSvc:n}=this.beans,r=!t&&e.group,l=t?.colDef.showRowGroup;if(n&&(!this.isTreeData||e.footer)&&(r||l)){const o=n.getGroupValue(e,t);if(null==o)return{value:null,valueFormatted:null};if(!i)return{value:o.value,valueFormatted:null};const r=n.formatAndPrefixGroupColValue(o,t,s);return{value:o.value,valueFormatted:r}}if(!t)return{value:e.key,valueFormatted:null};const a=e.leafGroup&&this.colModel.isPivotMode(),h=e.group&&e.expanded&&!e.footer&&!a,c=this.gos.get("groupSuppressBlankHeader")||!e.sibling,u=this.getValue(t,e,h&&!c,o);return{value:u,valueFormatted:!i||s&&!1===t.colDef.useValueFormatterForExport?null:this.formatValue(t,e,u)}}getValue(t,e,i=!1,s="ui"){if(this.initialised||this.init(),!e)return;const o=t.getColDef(),n=o.field,r=t.getColId(),l=e.data;if(this.hasEditSvc&&"ui"===s){const i=this.editSvc;if(i.isEditing()){const s=i.getCellDataValue({rowNode:e,column:t},!0);if(void 0!==s)return s}}let a;const h=o.showRowGroup;if("string"==typeof h&&(this.beans.rowGroupColsSvc?.getColumnIndex(h)??-1)>e.level)return null;const c="string"!=typeof h||!e.group,u=e.groupData&&r in e.groupData,d=!i&&e.aggData&&void 0!==e.aggData[r],g=this.isSsrm&&i&&!!o.aggFunc,p=this.isSsrm&&e.footer&&e.field&&(!0===o.showRowGroup||o.showRowGroup===e.field);if(this.isTreeData&&d)a=e.aggData[r];else if(this.isTreeData&&o.valueGetter)a=this.executeValueGetter(o.valueGetter,l,t,e);else if(this.isTreeData&&n&&l)a=wc(l,n,t.isFieldContainsDots());else if(u)a=e.groupData[r];else if(d)a=e.aggData[r];else if(o.valueGetter&&!g){if(!c)return a;a=this.executeValueGetter(o.valueGetter,l,t,e)}else if(p)a=wc(l,e.field,t.isFieldContainsDots());else if(n&&l&&!g){if(!c)return a;a=wc(l,n,t.isFieldContainsDots())}if(this.cellExpressions&&"string"==typeof a&&0===a.indexOf("=")){const i=a.substring(1);a=this.executeValueGetter(i,l,t,e)}return a}parseValue(t,e,s,o){const n=t.getColDef(),r=n.valueParser;if(i(r)){const i=Qe(this.gos,{node:e,data:e?.data,oldValue:o,newValue:s,colDef:n,column:t});return"function"==typeof r?r(i):this.expressionSvc?.evaluate(r,i)}return s}getDeleteValue(t,e){return i(t.getColDef().valueParser)?this.parseValue(t,e,"",this.getValueForDisplay(t,e).value)??null:null}formatValue(t,e,i,s,o=!0){const{expressionSvc:n}=this.beans;let r,l=null;const a=t.getColDef();if(s?r=s:o&&(r=a.valueFormatter),r){const s=Qe(this.gos,{value:i,node:e,data:e?e.data:null,colDef:a,column:t});l="function"==typeof r?r(s):n?n.evaluate(r,s):null}else if(a.refData)return a.refData[i]||"";return null==l&&Array.isArray(i)&&(l=i.join(", ")),l}setValue(t,e,o,n){const r=this.colModel.getColDefCol(e);if(!t||!r)return!1;s(t.data)&&(t.data={});const{field:l,valueSetter:a}=r.getColDef();if(s(l)&&s(a))return pe(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(r,o))return pe(135),!1;const h=Qe(this.gos,{node:t,data:t.data,oldValue:this.getValue(r,t,void 0,n),newValue:o,colDef:r.getColDef(),column:r});let c;if(h.newValue=o,c=i(a)?"function"==typeof a?a(h):this.expressionSvc?.evaluate(a,h):this.setValueUsingField(t.data,l,o,r.isFieldContainsDots()),void 0===c&&(c=!0),!c)return!1;t.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const u=this.getValue(r,t);return this.dispatchCellValueChangedEvent(t,h,u,n),t.pinnedSibling&&this.dispatchCellValueChangedEvent(t.pinnedSibling,h,u,n),!0}dispatchCellValueChangedEvent(t,e,i,s){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:e.column,colDef:e.colDef,data:t.data,node:t,oldValue:e.oldValue,newValue:i,value:i,source:s})}callColumnCellValueChangedHandler(t){const e=t.colDef.onCellValueChanged;"function"==typeof e&&this.beans.frameworkOverrides.wrapOutgoing((()=>{e({node:t.node,data:t.data,oldValue:t.oldValue,newValue:t.newValue,colDef:t.colDef,column:t.column,api:t.api,context:t.context})}))}setValueUsingField(t,e,i,s){if(!e)return!1;let o=!1;if(s){const s=e.split(".");let n=t;for(;s.length>0&&n;){const t=s.shift();0===s.length?(o=n[t]===i,o||(n[t]=i)):n=n[t]}}else o=t[e]===i,o||(t[e]=i);return!o}executeValueGetterWithValueCache(t,e,i,s){const o=i.getColId(),n=this.valueCache.getValue(s,o);if(void 0!==n)return n;const r=this.executeValueGetterWithoutValueCache(t,e,i,s);return this.valueCache.setValue(s,o,r),r}executeValueGetterWithoutValueCache(t,e,i,s){const o=Qe(this.gos,{data:e,node:s,column:i,colDef:i.getColDef(),getValue:this.getValueCallback.bind(this,s)});let n;return n="function"==typeof t?t(o):this.expressionSvc?.evaluate(t,o),n}getValueCallback(t,e){const i=this.colModel.getColDefCol(e);return i?this.getValue(i,t):null}getKeyForNode(t,e){const i=this.getValue(t,e),s=t.getColDef().keyCreator;let o=i;return s&&(o=s(Qe(this.gos,{value:i,colDef:t.getColDef(),column:t,node:e,data:e.data}))),"string"==typeof o||null==o||(o=String(o),"[object Object]"===o&&pe(121)),o}},class extends Dt{constructor(){super(...arguments),this.beanName="focusSvc",this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(t){this.colModel=t.colModel,this.visibleCols=t.visibleCols,this.rowRenderer=t.rowRenderer,this.navigation=t.navigation,this.filterManager=t.filterManager,this.overlays=t.overlays}postConstruct(){const t=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:t,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:t,columnRowGroupChanged:t}),this.addDestroyFunc(function(t){const e=g(t);var i;return i=e,yo>0||(i.addEventListener("keydown",So),i.addEventListener("mousedown",So)),yo++,()=>{yo--,function(t){yo>0||(t.removeEventListener("keydown",So),t.removeEventListener("mousedown",So))}(e)}}(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,null!=this.focusFallbackTimeout&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,null!=this.focusFallbackTimeout&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const t=this.focusedCell.column,e=this.colModel.getCol(t.getId());t!==e&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{gos:t,focusedCell:e}=this;return t.get("suppressFocusAfterRefresh")||t.get("suppressCellFocus")||!e?null:this.doesRowOrCellHaveBrowserFocus()?e:null}getFocusHeaderToUseAfterRefresh(){return this.gos.get("suppressFocusAfterRefresh")||!this.focusedHeader?null:this.isDomDataPresentInHierarchy(d(this.beans),ra)?this.focusedHeader:null}doesRowOrCellHaveBrowserFocus(){const t=d(this.beans);return!!this.isDomDataPresentInHierarchy(t,tl)||this.isDomDataPresentInHierarchy(t,il)}isDomDataPresentInHierarchy(t,e){let i=t;for(;i;){if(Pe(this.gos,i,e))return!0;i=i.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(t){const{rowIndex:e,rowPinned:i,column:s}=t,o={rowIndex:e,rowPinned:i,column:s,isFullWidthCell:!1},n=this.rowRenderer.getRowByPosition({rowIndex:e,rowPinned:i});return n&&(o.isFullWidthCell=n.isFullWidth()),o}clearFocusedCell(){if(null==this.focusedCell)return;const t=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...t})}setFocusedCell(t){this.setFocusRecovered();const{column:i,rowIndex:s,rowPinned:o,forceBrowserFocus:n=!1,preventScrollOnBrowserFocus:r=!1,sourceEvent:l}=t,a=this.colModel.getCol(i);if(!a)return void(this.focusedCell=null);this.focusedCell={rowIndex:s,rowPinned:e(o),column:a};const h=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...h,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:n,preventScrollOnBrowserFocus:r,sourceEvent:l}),this.previousCellFocusParams=h}isCellFocused(t){return null!=this.focusedCell&&Fh(t,this.focusedCell)}isHeaderWrapperFocused(t){if(null==this.focusedHeader)return!1;const{column:e,rowCtrl:{rowIndex:i,pinned:s}}=t,{column:o,headerRowIndex:n}=this.focusedHeader;return e===o&&i===n&&s==o.getPinned()}focusHeaderPosition(t){if(this.setFocusRecovered(),Vl(this.beans))return!1;const{direction:e,fromTab:i,allowUserOverride:s,event:o,fromCell:n,rowWithoutSpanValue:r,scroll:l=!0}=t;let{headerPosition:a}=t;if(n&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(a);if(s){const t=this.focusedHeader,s=$l(this.beans);if(i){const i=this.gos.getCallback("tabToNextHeader");i&&(a=this.getHeaderPositionFromUserFunc({userFunc:i,direction:e,currentPosition:t,headerPosition:a,headerRowCount:s}))}else{const e=this.gos.getCallback("navigateToNextHeader");e&&o&&(a=e({key:o.key,previousHeaderPosition:t,nextHeaderPosition:a,headerRowCount:s,event:o}))}}return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:e,event:o,fromCell:n,rowWithoutSpanValue:r,scroll:l})}focusHeaderPositionFromUserFunc(t){if(Vl(this.beans))return!1;const{userFunc:e,headerPosition:i,direction:s,event:o}=t,n=this.focusedHeader,r=$l(this.beans),l=this.getHeaderPositionFromUserFunc({userFunc:e,direction:s,currentPosition:n,headerPosition:i,headerRowCount:r});return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:s,event:o})}getHeaderPositionFromUserFunc(t){const{userFunc:e,direction:i,currentPosition:s,headerPosition:o,headerRowCount:n}=t,r=e({backwards:"Before"===i,previousHeaderPosition:s,nextHeaderPosition:o,headerRowCount:n});return!0===r?s:!1===r?null:r}focusProvidedHeaderPosition(t){const{headerPosition:e,direction:i,fromCell:s,rowWithoutSpanValue:o,event:n,scroll:r=!0}=t,{column:l,headerRowIndex:a}=e,{filterManager:h,ctrlsSvc:c,headerNavigation:u}=this.beans;if(this.focusedHeader&&(d=t.headerPosition).headerRowIndex===(g=this.focusedHeader).headerRowIndex&&d.column===g.column)return!1;var d,g;if(-1===a)return h?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(e):this.focusGridView({column:l,event:n});r&&u?.scrollToColumn(l,i);const p=c.getHeaderRowContainerCtrl(l.getPinned()),f=p?.focusHeader(e.headerRowIndex,l,n)||!1;return u&&f&&(null!=o||s)&&(u.currentHeaderRowWithoutSpan=o??-1),f}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;const t=this.visibleCols.allCols[0];if(!t)return!1;const e=su(this.beans,t,0);return this.focusHeaderPosition({headerPosition:e,rowWithoutSpanValue:0})}focusLastHeader(t){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;const e=$l(this.beans)-1,i=hi(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:e,column:i},rowWithoutSpanValue:-1,event:t})}focusPreviousFromFirstCell(t){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(t)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(t,i){return null!=this.focusedCell&&this.focusedCell.rowIndex===t&&this.focusedCell.rowPinned===e(i)}focusOverlay(t){const e=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!e&&Ro(e,t)}focusGridView(t){const{backwards:i=!1,canFocusOverlay:s=!0,event:o}=t;if(this.overlays?.isExclusive())return s&&this.focusOverlay(i);if(Ll(this.beans))return i&&!Vl(this.beans)?this.focusLastHeader():!(!s||!this.focusOverlay(i))||!i&&zl(this.beans,i);const n=i?function(t){let e,i=null;const{pinnedRowModel:s,pageBounds:o}=t,n=s?.getPinnedBottomRowCount(),r=s?.getPinnedTopRowCount();return n?(i="bottom",e=n-1):t.rowModel.getRowCount()?e=o.getLastRow():r&&(i="top",e=r-1),void 0===e?null:{rowIndex:e,rowPinned:i}}(this.beans):function(t){let e,i=0;const{pinnedRowModel:s,rowModel:o,pageBounds:n}=t;return s?.getPinnedTopRowCount()?e="top":o.getRowCount()?(e=null,i=n.getFirstRow()):s?.getPinnedBottomRowCount()&&(e="bottom"),void 0===e?null:{rowIndex:i,rowPinned:e}}(this.beans);if(n){const s=t.column??this.focusedHeader?.column,{rowIndex:r,rowPinned:l}=n,a=kh(this.beans,n);if(!s||!a||null==r)return!1;if(s.isSuppressNavigable(a)){const t=this.gos.get("enableRtl");let e;return e=o&&o.key!==Es?o.key:t?Os:Bs,this.beans.navigation?.navigateToNextCell(null,e,{rowIndex:r,column:s,rowPinned:l||null},!0),!0}if(this.navigation?.ensureCellVisible({rowIndex:r,column:s,rowPinned:l}),i){const t=this.rowRenderer.getRowByPosition(n);if(t?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(n,i))return!0}return this.setFocusedCell({rowIndex:r,column:s,rowPinned:e(l),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:r,rowPinned:l,column:s}),!0}return!(!s||!this.focusOverlay(i))||!(!i||!this.focusLastHeader())}focusAdvancedFilter(t){return this.advFilterFocusColumn=t?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(t,e){const i=(e?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return t?this.focusHeaderPosition({headerPosition:{column:i,headerRowIndex:$l(this.beans)-1}}):this.focusGridView({column:i})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},class extends Nn{constructor(){super(...arguments),this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1}initVariables(){this.addManagedPropertyListener("rowHeight",(()=>this.refreshRowHeightVariable())),this.getSizeEl(Qc),this.getSizeEl(Jc),this.getSizeEl(Xc),this.getSizeEl(tu),this.getSizeEl(eu),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(eu)}getRowBorderWidth(){return this.getCSSVariablePixelValue(tu)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(Qc)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(Jc)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(Zc)}getCellPaddingLeft(){const t=this.getDefaultCellHorizontalPadding(),e=this.getCSSVariablePixelValue(_c);return t-1+this.getCSSVariablePixelValue(Yc)*e}getCellPadding(){const t=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+t}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(Xc)}refreshRowHeightVariable(){const{eRootDiv:t}=this,e=t.style.getPropertyValue("--ag-line-height").trim(),i=this.gos.get("rowHeight");if(null==i||isNaN(i)||!isFinite(i))return null!==e&&t.style.setProperty("--ag-line-height",null),-1;const s=`${i}px`;return e!=s?(t.style.setProperty("--ag-line-height",s),i):""!=e?Number.parseFloat(e):-1}getCSSVariablePixelValue(t){const e=this.lastKnownValues.get(t);if(null!=e)return e;const i=this.measureSizeEl(t);return"detached"===i||"no-styles"===i?(t.cacheDefault&&this.lastKnownValues.set(t,t.defaultValue),t.defaultValue):(this.lastKnownValues.set(t,i),i)}measureSizeEl(t){const e=this.getSizeEl(t);if(null==e.offsetParent)return"detached";const i=e.offsetWidth;return i===iu?"no-styles":(this.sizesMeasured=!0,i)}getMeasurementContainer(){let t=this.eMeasurementContainer;return t||(t=this.eMeasurementContainer=mr({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(t)),t}getSizeEl(t){let e=this.sizeEls.get(t);if(e)return e;const i=this.getMeasurementContainer();e=mr({tag:"div"});const{border:s,noWarn:o}=t;s?(e.className="ag-measurement-element-border",e.style.setProperty("--ag-internal-measurement-border",`var(${t.cssName}, solid 15538px)`)):e.style.width=`var(${t.cssName}, 15538px)`,i.appendChild(e),this.sizeEls.set(t,e);let n=this.measureSizeEl(t);"no-styles"!==n||o||pe(9,{variable:t});const r=at(this.beans,e,(()=>{const e=this.measureSizeEl(t);"detached"!==e&&"no-styles"!==e&&(this.lastKnownValues.set(t,e),e!==n&&(n=e,this.fireStylesChangedEvent(t.changeKey)))}));return this.addDestroyFunc((()=>r())),e}fireStylesChangedEvent(t){"rowBorderWidthChanged"===t&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[t]:!0})}refreshRowBorderWidthVariable(){const t=this.getCSSVariablePixelValue(tu);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${t}px`)}postProcessThemeChange(t,e){t&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&fe(e?106:239)}getAdditionalCss(){const t=new Map;return t.set("core",['.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-virtual-list-item{height:var(--ag-list-item-height);position:absolute;width:100%}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}']),function(t,e){for(const i of e.sort(((t,e)=>t.moduleName.localeCompare(e.moduleName)))){const e=i.css;e&&t.set(`module-${i.moduleName}`,e)}}(t,Array.from(new Set(Zt))),t}getDefaultTheme(){return qc}themeError(t){fe(240,{theme:t})}},class extends Dt{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(t){this.ctrlsSvc=t.ctrlsSvc,this.colAnimation=t.colAnimation}postConstruct(){this.horizontalScrollShowing=!0===this.gos.get("alwaysShowHorizontalScroll"),this.verticalScrollShowing=!0===this.gos.get("alwaysShowVerticalScroll"),this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:t}=this;t?.isActive()?t.executeLaterVMTurn((()=>{t.executeLaterVMTurn((()=>this.updateScrollVisibleImpl()))})):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const t=this.ctrlsSvc.get("center");if(!t||this.colAnimation?.isActive())return;const e={horizontalScrollShowing:t.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(e),this.updateScrollGap()}updateScrollGap(){const t=this.ctrlsSvc.get("center"),e=t.hasHorizontalScrollGap(),i=t.hasVerticalScrollGap();(this.horizontalScrollGap!==e||this.verticalScrollGap!==i)&&(this.horizontalScrollGap=e,this.verticalScrollGap=i,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(t){(this.horizontalScrollShowing!==t.horizontalScrollShowing||this.verticalScrollShowing!==t.verticalScrollShowing)&&(this.horizontalScrollShowing=t.horizontalScrollShowing,this.verticalScrollShowing=t.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(null==this.scrollbarWidth){const t=this.gos.get("scrollbarWidth"),e="number"==typeof t&&t>=0?t:(null==Ds&&so(),Ds);null!=e&&(this.scrollbarWidth=e,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},class extends Dt{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",(()=>{if(this.updateReady(),this.ready){for(const t of this.readyCallbacks)t(this.params);this.readyCallbacks.length=0}}),this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const t=Object.values(this.params);this.ready=23===t.length&&t.every((t=>t?.isAlive()??!1))}whenReady(t,e){this.ready?e(this.params):this.readyCallbacks.push(e),t.addDestroyFunc((()=>{const t=this.readyCallbacks.indexOf(e);t>=0&&this.readyCallbacks.splice(t,1)}))}register(t,e){this.params[t]=e,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:"ready"}),e.addDestroyFunc((()=>{this.updateReady()}))}get(t){return this.params[t]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){const{leftHeader:t,centerHeader:e,rightHeader:i}=this.params;return[t,i,e]}getHeaderRowContainerCtrl(t){const e=this.params;switch(t){case"left":return e.leftHeader;case"right":return e.rightHeader;default:return e.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},class extends Dt{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",(t=>this.setColumnDefs(t)))}start(){this.beans.ctrlsSvc.whenReady(this,(()=>{const t=this.gos.get("columnDefs");t?this.setColumnsAndData(t):this.waitingForColumns=!0,this.gridReady()}))}setColumnsAndData(t){const{colModel:e,rowModel:i}=this.beans;e.setColumnDefs(t??[],"gridInitializing"),i.start()}gridReady(){const{eventSvc:t,gos:e}=this;t.dispatchEvent({type:"gridReady"}),Ut(e,`initialised successfully, enterprise = ${e.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(t){const e=this.gos.get("columnDefs");if(e)return this.waitingForColumns?(this.waitingForColumns=!1,void this.setColumnsAndData(e)):void this.beans.colModel.setColumnDefs(e,Ri(t.source))}},class extends Dt{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(t,e,i=!1){if(!t)return null;const s=this.getHeaderName(t.getColDef(),t,null,null,e),{aggColNameSvc:o}=this.beans;return i&&o?o.getHeaderName(t,s):s}getDisplayNameForProvidedColumnGroup(t,e,i){const s=e?.getColGroupDef();return s?this.getHeaderName(s,null,t,e,i):null}getDisplayNameForColumnGroup(t,e){return this.getDisplayNameForProvidedColumnGroup(t,t.getProvidedColumnGroup(),e)}getHeaderName(t,e,i,s,o){const n=t.headerValueGetter;if(n){const r=Qe(this.gos,{colDef:t,column:e,columnGroup:i,providedColumnGroup:s,location:o});return"function"==typeof n?n(r):"string"==typeof n?this.beans.expressionSvc?.evaluate(n,r)??null:""}return null!=t.headerName?t.headerName:t.field?(r=t.field)&&null!=r?r.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map((t=>t.substring(0,1).toUpperCase()+(t.length>1?t.substring(1,t.length):""))).join(" "):null:"";var r}},class extends Dt{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(t){this.visibleCols=t.visibleCols,this.colModel=t.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(t,e,i=!1){const{visibleCols:s}=this;if(t!==this.scrollWidth||e!==this.scrollPosition||s.isBodyWidthDirty){if(this.scrollWidth=t,this.scrollPosition=e,s.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const i=s.bodyWidth;this.viewportLeft=i-e-t,this.viewportRight=i-e}else this.viewportLeft=e,this.viewportRight=t+e;this.colModel.ready&&this.checkViewportColumns(i)}}getColumnHeadersToRender(t){switch(t){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(t,e){let i;switch(t){case"left":i=this.rowsOfHeadersToRenderLeft[e];break;case"right":i=this.rowsOfHeadersToRenderRight[e];break;default:i=this.rowsOfHeadersToRenderCenter[e]}return i??[]}extractViewportColumns(){const t=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=t,this.headerColsWithinViewport=t):(this.colsWithinViewport=t.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=t.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||0===this.viewportRight}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(t){return!(!t.isAutoHeaderHeight()&&!function(t){for(;t;){if(t.isAutoHeaderHeight())return!0;t=t.getParent()}return!1}(t))||this.isColumnInRowViewport(t)}isColumnInRowViewport(t){if(t.isAutoHeight())return!0;const e=t.getLeft()||0,i=e+t.getActualWidth(),s=this.viewportLeft-200,o=this.viewportRight+200;return!(e<s&&i<s||e>o&&i>o)}getViewportColumns(){const{leftCols:t,rightCols:e}=this.visibleCols;return this.colsWithinViewport.concat(t).concat(e)}getColsWithinViewport(t){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const e=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:s}=this;return s.getColsForRow(t,s.centerCols,e,(t=>{const e=t.getLeft();return i(e)&&e>this.viewportLeft}))}checkViewportColumns(t=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:t})}calculateHeaderRows(){const{leftCols:t,rightCols:e}=this.visibleCols;this.columnsToRenderLeft=t,this.columnsToRenderRight=e,this.columnsToRenderCenter=this.colsWithinViewport;const i=t=>{const e=new Set,i={};for(const s of t){let t=s.getParent();const o=s.isSpanHeaderHeight();for(;t&&!e.has(t);){if(o&&t.isPadding()){t=t.getParent();continue}const s=t.getProvidedColumnGroup().getLevel();i[s]??(i[s]=[]),i[s].push(t),e.add(t),t=t.getParent()}}return i};this.rowsOfHeadersToRenderLeft=i(t),this.rowsOfHeadersToRenderRight=i(e),this.rowsOfHeadersToRenderCenter=i(this.headerColsWithinViewport)}extractViewport(){this.extractViewportColumns();const t=this.getViewportColumns().map((t=>`${t.getId()}-${t.getPinned()||"normal"}`)).join("#"),e=this.colsWithinViewportHash!==t;return e&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),e}},class extends Dt{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(t,e){return Ca(t,this.beans,e?.column)}}],icons:{selectOpen:"small-down",smallDown:"small-down",colorPicker:"color-picker",smallUp:"small-up",checkboxChecked:"small-up",checkboxIndeterminate:"checkbox-indeterminate",checkboxUnchecked:"checkbox-unchecked",radioButtonOn:"radio-button-on",radioButtonOff:"radio-button-off",smallLeft:"small-left",smallRight:"small-right"},apiFunctions:{getGridId:function(t){return t.context.getId()},destroy:function(t){t.gridDestroySvc.destroy()},isDestroyed:function(t){return t.gridDestroySvc.destroyCalled},getGridOption:function(t,e){return t.gos.get(e)},setGridOption:function(t,e,i){bh(t,{[e]:i})},updateGridOptions:bh,isModuleRegistered:function(t,e){const i=e.replace(/Module$/,"");return t.gos.isModuleRegistered(i)}},dependsOn:[Rc,sc,lc,Md,Iu,dc,Hu,Fd,Ad,Ou,md,vd,Cd,Nu,Pc,Fc,Ed,fc,yd]},Od={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},Nd=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],Bd={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:Nd,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...Nd,"QuickFilter","ExternalFilter","AdvancedFilter"],GroupCellRenderer:["RowGrouping","Pivot","TreeData","MasterDetail","ServerSideRowModel"],KeyboardNavigation:["AllCommunity"],LoadingCellRenderer:["ServerSideRowModel"],MenuCore:["ColumnMenu","ContextMenu"],MenuItem:["ColumnMenu","ContextMenu","MultiFilter","IntegratedCharts","ColumnsToolPanel"],Overlay:["AllCommunity"],PinnedColumn:["AllCommunity"],SharedAggregation:["RowGrouping","Pivot","TreeData","ServerSideRowModel"],SharedDragAndDrop:["AllCommunity"],SharedMasterDetail:["MasterDetail","ServerSideRowModel"],SharedMenu:[...Nd,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},Gd={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function Vd(t,e=!1){return!e||"IntegratedCharts"!==t&&"Sparklines"!==t?`${t}Module`:`${t}Module.with(AgChartsEnterpriseModule)`}function Ld({moduleName:t,rowModelType:e}){return`To use the ${t}Module you must set the gridOption "rowModelType='${e}'"`}var zd=({reasonOrId:t,moduleName:e,gridScoped:i,gridId:s,rowModelType:o,additionalText:n,isUmd:r})=>{const l=function(t,e){const i=[];for(const s of Array.isArray(t)?t:[t]){const t=Bd[s];if(t)for(const s of t){const t=Gd[s];t&&t!==e||i.push(s)}else i.push(s)}return i}(e,o),a="string"==typeof t?t:jd[t];if(r)return function(t,e){const i=e.filter((t=>"IntegratedCharts"===t||"Sparklines"===t));let s="";const o=globalThis?.agCharts;return!o&&i.length>0?s=`Unable to use ${t} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.\n`:e.some((t=>Od[t]))&&(s+=`Unable to use ${t} as that requires the ag-grid-enterprise script to be included.\n`),s}(a,l);const h=l.filter((t=>"IntegratedCharts"===t||"Sparklines"===t)),c=h.length>0?`${h.map((t=>Vd(t))).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`Unable to use ${a} as ${l.length>1?"one of "+l.map((t=>Vd(t))).join(", "):Vd(l[0])} is not registered${i?" for gridId: "+s:""}. ${c} Check if you have registered the module:\n\n${(t=>{const e=t.map((t=>`import { ${Vd(t)} } from '${Od[t]?"ag-grid-enterprise":"ag-grid-community"}';`));return t.some((t=>"IntegratedCharts"===t||"Sparklines"===t))&&e.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community'; \n${e.join(" \n")} \n\nModuleRegistry.registerModules([ ${t.map((t=>Vd(t,!0))).join(", ")} ]); \n\nFor more info see: ${re}/modules/`})(l)}`+(n?` \n\n${n}`:"")},$d=t=>`${t} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.\n\nimport { AgChartsEnterpriseModule } from 'ag-charts-enterprise';\nimport { ModuleRegistry } from 'ag-grid-community';\nimport { ${t} } from 'ag-grid-enterprise';\n \nModuleRegistry.registerModules([${t}.with(AgChartsEnterpriseModule)]);\n `,Wd={1:()=>"`rowData` must be an array",2:({nodeId:t})=>`Duplicate node id '${t}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>"Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.",4:({id:t})=>`Could not find row id=${t}, data item was not found for this id`,5:({data:t})=>["Could not find data item as object was not found.",t," Consider using getRowId to help the Grid find matching row data"],6:()=>"'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'",7:()=>"Pivoting is not supported with aligned grids as it may produce different columns in each grid.",8:({key:t})=>`Unknown key for navigation ${t}`,9:({variable:t})=>`No value for ${t?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${t?.defaultValue} will be used and updated when styles load.`,10:({eventType:t})=>`As of v33, the '${t}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>"No gridOptions provided to createGrid",12:({colKey:t})=>["column ",t," not found"],13:()=>"Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.",14:({groupPrefix:t})=>`Row IDs cannot start with ${t}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:t})=>["value should be either a string or a function",t],16:({expression:t,params:e,e:i})=>["Processing of the expression failed","Expression = ",t,"Params = ",e,"Exception = ",i],17:()=>"you need either field or valueSetter set on colDef for editing to work",18:()=>"alignedGrids contains an undefined option.",19:()=>"alignedGrids - No api found on the linked grid.",20:()=>'You may want to configure via a callback to avoid setup race conditions:\n "alignedGrids: () => [linkedGrid]"',21:()=>"pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.",22:({key:t})=>`${t} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>"row height must be a number if not using standard row model",25:({id:t})=>["The getRowId callback must return a string. The ID ",t," is being cast to a string."],26:({fnName:t,preDestroyLink:e})=>`Grid API function ${t}() cannot be called as the grid has been destroyed.\n Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${e}`,27:({fnName:t,module:e})=>`API function '${t}' not registered to module '${e}'`,28:()=>"setRowCount cannot be used while using row grouping.",29:()=>"tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?",30:({toIndex:t})=>["tried to insert columns in invalid location, toIndex = ",t,"remember that you should not count the moving columns when calculating the new index"],31:()=>"infinite loop in resizeColumnSets",32:()=>"applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.",33:()=>"stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.",34:({key:t})=>`the column type '${t}' is a default column type and cannot be overridden.`,35:()=>"Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.",36:({t})=>"colDef.type '"+t+"' does not correspond to defined gridOptions.columnTypes",37:()=>"Changing the column pinning status is not allowed with domLayout='print'",38:({iconName:t})=>`provided icon '${t}' needs to be a string or a function`,39:()=>"Applying column order broke a group where columns should be married together. Applying new order has been discarded.",40:({e:t,method:e})=>`${t}\n${(t=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${t}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`)(e)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:t})=>`As of v33, icon '${t}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:t})=>`The data type definition ${t} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:t})=>`Missing data type definition - "${t}"`,48:({property:t})=>`Cell data type is "object" but no Value ${t} has been provided. Please either provide an object data type definition with a Value ${t}, or set "colDef.value${t}"`,49:({methodName:t})=>`Framework component is missing the method ${t}()`,50:({compName:t})=>`Could not find component ${t}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:t})=>`setFilterModel() - no column found for colId: ${t}`,63:({colId:t})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${t}`,64:({colId:t})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${t}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:t})=>`getGui method from filter returned ${t}; it should be a DOM element.`,70:({newFilter:t})=>"Grid option quickFilterText only supports string inputs, received: "+typeof t,71:()=>"debounceMs is ignored when apply button is present",72:({keys:t})=>["ignoring FilterOptionDef as it doesn't contain one of ",t],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:t})=>['Unexpected type of filter "',t,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:t})=>`DateFilter ${t} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:t})=>`Invalid row index for ensureIndexVisible: ${t}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:t,pageSizeSet:e,pageSizesSet:i,pageSizeOptions:s})=>`'paginationPageSize=${t}'${e?"":" (default value)"}, but ${t} is not included in${i?"":" the default"} paginationPageSizeSelector=[${s?.join(", ")}].`,95:({paginationPageSizeOption:t,paginationPageSizeSelector:e})=>`Either set '${e}' to an array that includes ${t} or to 'false' to disable the page size selector.`,96:({id:t,data:e})=>["Duplicate ID",t,"found for pinned row with data",e,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:t})=>`cellEditor for column ${t} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:t,componentName:e,agGridDefaults:i,jsComps:s})=>{const o=[],n=wo({inputValue:e,allSuggestions:[...Object.keys(i??[]).filter((t=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(t))),...Object.keys(s??[]).filter((t=>!!s[t]))],hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return o.push(`Could not find '${e}' component. It was configured as "${t}: '${e}'" but it wasn't found in the list of registered components.\n`),n.length>0&&o.push(` Did you mean: [${n.slice(0,3)}]?\n`),o.push("If using a custom component check it has been registered correctly."),o},102:()=>"selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:t,param:e})=>`Numeric value ${t} passed to ${e} param will be interpreted as ${t} seconds. If this is intentional use "${t}s" to silence this warning.`,105:({e:t})=>["chart rendering failed",t],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${re}/theming-migration/`,107:({key:t,value:e})=>`Invalid value for theme param ${t} - ${e}`,108:({e:t})=>["chart update failed",t],109:({inputValue:t,allSuggestions:e})=>{const i=wo({inputValue:t,allSuggestions:e,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${t}' aggregate function. It was configured as "aggFunc: '${t}'" but it wasn't found in the list of registered aggregations.`,i.length>0?` Did you mean: [${i.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join("\n")},110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:t})=>`Could not find component with name of ${t}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:t})=>`Unable to update chart. No active chart found with ID: ${t}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:t})=>`unable to create chart as ${t?"there are no columns in the grid":"no range is selected"}.`,128:({feature:t})=>`${t} is only available if using 'multiRow' selection mode.`,129:({feature:t,rowModel:e})=>`${t} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${e}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:t})=>`icon '${t}' function should return back a string or a dom object`,134:({iconName:t})=>`Did not find icon '${t}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:t,currentChartType:e})=>`Unable to update chart as a '${t}' update type is not permitted on a ${e}.`,138:({chartType:t})=>`invalid chart type supplied: ${t}`,139:({customThemeName:t})=>`a custom chart theme with the name ${t} has been supplied but not added to the 'chartThemes' list`,140:({name:t})=>`no stock theme exists with the name '${t}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:t})=>`'${t}' is not a valid Chart Tool Panel name`,144:({type:t})=>`Invalid charts data panel group name supplied: '${t}'`,145:({group:t})=>`As of v32, only one charts customize panel group can be expanded at a time. '${t}' will not be expanded.`,146:({comp:t})=>`Unable to instantiate component '${t}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:t})=>`Invalid charts customize panel group name supplied: '${t}'`,148:({group:t})=>`invalid chartGroupsDef config '${t}'`,149:({group:t,chartType:e})=>`invalid chartGroupsDef config '${t}.${e}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:t})=>`invalid chartType '${t}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:t})=>`no 'seriesChartType' found for colId = '${t}', defaulting to 'line'.`,153:({chartDataType:t})=>`unexpected chartDataType value '${t}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:t})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${t}`,155:({option:t})=>`'${t}' is not a valid Chart Toolbar Option`,156:({panel:t})=>`Invalid panel in chartToolPanelsDef.panels: '${t}'`,157:({unrecognisedGroupIds:t})=>["unable to find group(s) for supplied groupIds:",t],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:t,dataType:e})=>`Unrecognized data type for excel export [${t}.dataType=${e}]`,163:({featureName:t})=>`Excel table export does not work with ${t}. The exported Excel file will not contain any Excel tables.\n Please turn off ${t} to enable Excel table exports.`,164:()=>"Unable to add data table to Excel sheet: A table already exists.",165:()=>"Unable to add data table to Excel sheet: Missing required parameters.",166:({unrecognisedGroupIds:t})=>["unable to find groups for these supplied groupIds:",t],167:({unrecognisedColIds:t})=>["unable to find columns for these supplied colIds:",t],168:()=>"detailCellRendererParams.template should be function or string",169:()=>'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',170:({providedStrategy:t})=>`invalid cellRendererParams.refreshStrategy = ${t} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>"could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions",172:()=>"could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData",173:({group:t})=>`invalid chartGroupsDef config '${t}'`,174:({group:t,chartType:e})=>`invalid chartGroupsDef config '${t}.${e}'`,175:({menuTabName:t,itemsToConsider:e})=>[`Trying to render an invalid menu item '${t}'. Check that your 'menuTabs' contains one of `,e],176:({key:t})=>`unknown menu item type ${t}`,177:()=>"valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.",178:({colId:t})=>`column ${t} is not visible`,179:()=>"totalValueGetter should be either a function or a string (expression)",180:()=>"agRichSelectCellEditor requires cellEditorParams.values to be set",181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',183:()=>"Group Column Filter only works on group columns. Please use a different filter.",184:({parentGroupData:t,childNodeData:e})=>["duplicate group keys for row data, keys should be unique",[t,e]],185:({data:t})=>["getDataPath() should not return an empty path",[t]],186:({rowId:t,rowData:e,duplicateRowsData:i})=>["duplicate group keys for row data, keys should be unique",t,e,...i??[]],187:({rowId:t,firstData:e,secondData:i})=>[`Duplicate node id ${t}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,"first instance",e,"second instance",i],188:t=>`getRowId callback must be provided for Server Side Row Model ${t?.feature||"selection"} to work correctly.`,189:({startRow:t})=>`invalid value ${t} for startRow, the value should be >= 0`,190:({rowGroupId:t,data:e})=>["null and undefined values are not allowed for server side row model keys",t?`column = ${t}`:"","data is ",e],194:({method:t})=>`calling gridApi.${t}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:t})=>`selecting just ${t?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:t})=>`Provided ids must be of string type. Invalid id provided: ${t}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:zd,201:({rowModelType:t})=>`Could not find row model for rowModelType = ${t}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>"Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.",204:()=>"Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.",205:({duplicateIdText:t})=>`Unable to display rows as duplicate row ids (${t}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>"getRowId callback must be implemented for transactions to work. Transaction was ignored.",207:()=>'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',208:()=>"Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.",209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${re}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:t})=>`unable to lookup Tool Panel as invalid key supplied: ${t}`,215:({key:t,defaultByKey:e})=>`the key ${t} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(e??{}).join(",")}`,216:({name:t})=>`Missing component for '${t}'`,217:({invalidColIds:t})=>["unable to find grid columns for the supplied colDef(s):",t],218:({property:t,defaultOffset:e})=>`${t} must be a number, the value you provided is not a valid number. Using the default of ${e}px.`,219:({property:t})=>`Property ${t} does not exist on the target object.`,220:({lineDash:t})=>`'${t}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:t})=>`unrecognised menu item ${t}`,229:({index:t})=>["invalid row index for ensureIndexVisible: ",t],230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:t})=>`Framework component is missing the method ${t}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:t})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${t}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>"Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule. \nPlease rebuild the selection state and reapply it.",248:()=>"SetFloatingFilter expects SetFilter as its parent",249:()=>"Must supply a Value Formatter in Set Filter params when using a Key Creator",250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:t})=>`AG Grid: Unable to create chart as an invalid chartType = '${t}' was supplied.`,252:()=>"cannot get grid to draw rows when it is in the middle of drawing rows. \nYour code probably called a grid API method while the grid was in the render stage. \nTo overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). \nTo see what part of your code that caused the refresh check this stacktrace.",253:({version:t})=>["Illegal version string: ",t],254:()=>"Cannot create chart: no chart themes available.",255:({point:t})=>`Lone surrogate U+${t?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>$d("IntegratedChartsModule"),258:()=>$d("SparklinesModule"),259:({part:t})=>`the argument to theme.withPart must be a Theming API part object, received: ${t}`,260:({propName:t,compName:e,gridScoped:i,gridId:s,rowModelType:o})=>zd({reasonOrId:`AG Grid '${t}' component: ${e}`,moduleName:uu[e],gridId:s,gridScoped:i,rowModelType:o}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',263:()=>'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',264:()=>'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',265:({colId:t})=>`Unable to infer chart data type for column '${t}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${re}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>"Transactions aren't supported with tree data when using treeDataChildrenField",269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:t,parentId:e})=>`Cycle detected for row with id='${t}' and parent id='${e}'. Resetting the parent for row with id='${t}' and showing it as a root-level node.`,271:({id:t,parentId:e})=>`Parent row not found for row with id='${t}' and parent id='${e}'. Showing row with id='${t}' as a root-level node.`,272:()=>"No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:\n \n import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';\n \n ModuleRegistry.registerModules([ AllCommunityModule ]);\n ",273:({providedId:t,usedId:e})=>`Provided column id '${t}' was already in use, ensure all column and group ids are unique. Using '${e}' instead.`,274:({prop:t})=>{let e=`Since v33, ${t} has been deprecated.`;switch(t){case"maxComponentCreationTimeMs":e+=" This property is no longer required and so will be removed in a future version.";break;case"setGridApi":e+=" This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api ";break;case"children":e+=" For multiple versions AgGridReact does not support children."}return e},275:Ld,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:t})=>`'enableFilterHandlers' is set to true, but column '${t}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:t})=>`Unable to create filter handler for column '${t}'`,279:()=>{},280:({colId:t})=>`'name' must be provided for custom filter components for column '${t}`,281:({colId:t})=>`Filter for column '${t}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:t})=>`Row Model '${t}' is not supported with Batch Editing`,290:({rowIndex:t,rowPinned:e})=>`Row with index '${t}' and pinned state '${e}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:t})=>`The Multi Filter for column '${t}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`};function Ud(t,e){const i=Wd[t];if(!i)return[`Missing error text for error id ${t}!`];const s=i(e),o=`\nSee ${de(t,e)}`;return Array.isArray(s)?s.concat(o):[s,o]}var jd={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},Kd=new WeakMap,qd=new WeakMap;function Zd(t,e,i){if(!e)return fe(11),{};let s;{const e=mr({tag:"div"});e.style.height="100%",t.appendChild(e),t=e,s=()=>t.remove()}return(new Yd).create(t,e,(e=>{const i=new ph(t);e.createBean(i)}),void 0,i,s)}var _d=1,Yd=class{create(t,e,i,s,o,n){const r=Lt.applyGlobalGridOptions(e),l=r.gridId??String(_d++),a=this.getRegisteredModules(o,l,r.rowModelType),h=this.createBeansList(r.rowModelType,a,l),c=this.createProvidedBeans(t,r,o);if(!h)return;const u={providedBeanInstances:c,beanClasses:h,id:l,beanInitComparator:th,beanDestroyComparator:eh,derivedBeans:[Ja],destroyCallback:()=>{qd.delete(g),Kd.delete(t),function(t){delete Yt[t]}(l),n?.()}},d=new Hn(u);this.registerModuleFeatures(d,a),i(d),d.getBean("syncSvc").start(),s?.(d);const g=d.getBean("gridApi");return Kd.set(t,g),qd.set(g,t),g}getRegisteredModules(t,e,i){return Xt(Hd,void 0,!0),t?.modules?.forEach((t=>Xt(t,e))),function(t,e){const i=Yt[t]??{};return[...Object.values(_t.all??{}),...Object.values(i.all??{}),...Object.values(_t[e]??{}),...Object.values(i[e]??{})]}(e,Qd(i))}registerModuleFeatures(t,e){const i=t.getBean("registry"),s=t.getBean("apiFunctionSvc");for(const t of e){i.registerModule(t);const e=t.apiFunctions;if(e){const t=Object.keys(e);for(const i of t)s?.addFunction(i,e[i])}}}createProvidedBeans(t,e,i){let o=i?i.frameworkOverrides:null;s(o)&&(o=new Qa);const n={gridOptions:e,eGridDiv:t,eRootDiv:t,globalListener:i?i.globalListener:null,globalSyncListener:i?i.globalSyncListener:null,frameworkOverrides:o};return i?.providedBeanInstances&&Object.assign(n,i.providedBeanInstances),n}createBeansList(t,e,i){const s={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},o=Qd(t),n=s[o];if(!n)return void me(201,{rowModelType:o},`Unknown rowModelType ${o}.`);if(!Qt)return void me(272,void 0,"No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:\n \n import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';\n \n ModuleRegistry.registerModules([ AllCommunityModule ]);\n ");if(!t){const t=Object.entries(s).filter((([t,e])=>te(e,i,t)));if(1==t.length){const[e,i]=t[0];if(e!==o){const t={moduleName:i,rowModelType:e};return void me(275,t,Ld(t))}}}if(!te(n,i,o))return void me(200,{reasonOrId:`rowModelType = '${o}'`,moduleName:n,gridScoped:ee(),gridId:i,rowModelType:o},`Missing module ${n}Module for rowModelType ${o}.`);const r=new Set;for(const t of e)for(const e of t.beans??[])r.add(e);return Array.from(r)}};function Qd(t){return t??"clientSide"}function Jd(t){const e=t.rowModel;return"clientSide"===e.getType()?e:void 0}function Xd(t){const e=t.rowModel;return"infinite"===e.getType()?e:void 0}function tg(t){return t.filter((t=>null!=t))}function eg(t){return"whenTruncated"===t.get("tooltipShowMode")}var ig=class extends Dt{getFileName(t){const e=this.getDefaultFileExtension();return t?.length||(t=this.getDefaultFileName()),t.includes(".")?t:`${t}.${e}`}getData(t){const e=this.createSerializingSession(t);return this.beans.gridSerializer.serialize(e,t)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},sg=class{constructor(t){const{colModel:e,rowGroupColsSvc:i,colNames:s,valueSvc:o,gos:n,processCellCallback:r,processHeaderCallback:l,processGroupHeaderCallback:a,processRowGroupCallback:h}=t;this.colModel=e,this.rowGroupColsSvc=i,this.colNames=s,this.valueSvc=o,this.gos=n,this.processCellCallback=r,this.processHeaderCallback=l,this.processGroupHeaderCallback=a,this.processRowGroupCallback=h}prepare(t){}extractHeaderValue(t){return this.getHeaderName(this.processHeaderCallback,t)??""}extractRowCellValue(t,e,i,s,o){const n=0===e&&Oe(this.gos,o,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||o.group)&&(t.isRowGroupDisplayed(o.rowGroupColumn?.getColId()??"")||n))return{value:this.processRowGroupCallback(Qe(this.gos,{column:t,node:o}))??""};if(this.processCellCallback)return{value:this.processCellCallback(Qe(this.gos,{accumulatedRowIndex:i,column:t,node:o,value:this.valueSvc.getValueForDisplay(t,o,void 0,void 0).value,type:s,parseValue:e=>this.valueSvc.parseValue(t,o,e,this.valueSvc.getValue(t,o,void 0)),formatValue:e=>this.valueSvc.formatValue(t,o,e)??e}))??""};const r=this.gos.get("treeData"),l=this.valueSvc;if((-1!==o.level||!o.footer)&&(n||!0===t.colDef.showRowGroup&&(o.group||r))){let e="",i=o;for(;i&&-1!==i.level;){const{value:s,valueFormatted:o}=l.getValueForDisplay(n?void 0:t,i,!0,!0);e=` -> ${o??s??""}${e}`,i=i.parent}return{value:e,valueFormatted:e}}const{value:a,valueFormatted:h}=l.getValueForDisplay(t,o,!0,!0);return{value:a??"",valueFormatted:h}}getHeaderName(t,e){return t?t(Qe(this.gos,{column:e})):this.colNames.getDisplayNameForColumn(e,"csv",!0)}},og={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},ng="clientSide",rg="serverSide",lg="infinite",ag={onGroupExpandedOrCollapsed:[ng],refreshClientSideRowModel:[ng],isRowDataEmpty:[ng],forEachLeafNode:[ng],forEachNodeAfterFilter:[ng],forEachNodeAfterFilterAndSort:[ng],resetRowHeights:[ng,rg],applyTransaction:[ng],applyTransactionAsync:[ng],flushAsyncTransactions:[ng],getBestCostNodeSelection:[ng],getServerSideSelectionState:[rg],setServerSideSelectionState:[rg],applyServerSideTransaction:[rg],applyServerSideTransactionAsync:[rg],applyServerSideRowData:[rg],retryServerSideLoads:[rg],flushServerSideAsyncTransactions:[rg],refreshServerSide:[rg],getServerSideGroupLevelState:[rg],refreshInfiniteCache:[lg],purgeInfiniteCache:[lg],getInfiniteRowCount:[lg],isLastRowIndexKnown:[lg,rg],expandAll:[ng,rg],collapseAll:[ng,rg],onRowHeightChanged:[ng,rg],setRowCount:[lg,rg],getCacheBlockState:[lg,rg]},hg={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}},cg={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},ug={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},dg={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",ensureColumnVisible:["ColumnsToolPanel","ColumnMenu"],groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore",rowPin:"PinnedRow",rowUnpin:"PinnedRow",rowPinBottom:"PinnedRow",rowPinTop:"PinnedRow"},gg=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),pg=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),fg={moduleName:"Validation",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="validation"}wireBeans(t){this.gridOptions=t.gridOptions,ne=Ud}warnOnInitialPropertyUpdate(t,e){"api"===t&&og[e]&&pe(22,{key:e})}processGridOptions(t){this.processOptions(t,{objectName:"gridOptions",allProperties:[...wu,...mu,...fu,...vu,...Su,...yu,...bu,...Cu,...Object.values(nu)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:{suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}},validations:Fu()})}validateApiFunction(t,e){return function(t,e,i){const s=hg[t];if(s){const{version:i,new:o,old:n,message:r}=s,l=n??t;return(...t)=>(jt(`Since ${i} api.${l} is deprecated. ${o?`Please use ${o} instead. `:""}${r??""}`),e.apply(e,t))}const o=ag[t];return o?(...s)=>{const n=i.rowModel.getType();if(o.includes(n))return e.apply(e,s);Kt(`api.${t} can only be called when gridOptions.rowModelType is ${o.join(" or ")}`)}:e}(t,e,this.beans)}missingUserComponent(t,e,i,s){const o=uu[e];o?this.gos.assertModuleRegistered(o,`AG Grid '${t}' component: ${e}`):pe(101,{propertyName:t,componentName:e,agGridDefaults:i,jsComps:s})}missingDynamicBean(t){const e=cg[t];return e?we(200,{...this.gos.getModuleErrorParams(),moduleName:e,reasonOrId:t}):void 0}checkRowEvents(t){pg.has(t)&&pe(10,{eventType:t})}validateIcon(t){if(gg.has(t)&&pe(43,{iconName:t}),ug[t])return;const e=dg[t];e?fe(200,{reasonOrId:`icon '${t}'`,moduleName:e,gridScoped:ee(),gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."}):pe(134,{iconName:t})}isProvidedUserComp(t){return!!uu[t]}validateColDef(t){this.processOptions(t,{objectName:"colDef",allProperties:Object.keys(pu),docsUrl:"column-properties/",deprecations:{checkboxSelection:{version:"32.2",message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:"32.2",message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:"32.2",message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:"32.2",message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}},validations:{autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(t,{paginationAutoPageSize:e})=>e?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},cellRendererParams:{validate:t=>null==t.rowGroup&&null==t.rowGroupIndex&&"agGroupCellRenderer"!==t.cellRenderer||!("checkbox"in t.cellRendererParams)?null:'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.'},flex:{validate:(t,e)=>e.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(t,{rowSelection:e})=>"multiple"===e?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:e})=>"multiple"===e?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(t,{rowSelection:e})=>"multiple"===e?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:t=>{const e=t.headerValueGetter;return"function"==typeof e||"string"==typeof e?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:t})=>{if(t){if(t.smallDown)return we(262);if(t.smallLeft)return we(263);if(t.smallRight)return we(264)}return null}},sortingOrder:{validate:t=>{const e=t.sortingOrder;if(Array.isArray(e)&&e.length>0){const t=e.filter((t=>!cu.includes(t)));if(t.length>0)return`sortingOrder must be an array with elements from [${cu.map(ce).join()}], currently it includes [${t.map(ce).join()}]`}else if(!Array.isArray(e)||e.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${e}`;return null}},type:{validate:t=>{const e=t.type;return e instanceof Array?e.some((t=>"string"!=typeof t))?"if colDef.type is supplied an array it should be of type 'string[]'":null:"string"==typeof e?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(t,{suppressRowTransform:e})=>e?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(t,{rowSelection:e,cellSelection:i,suppressRowTransform:s,enableCellSpan:o,rowDragEntireRow:n,enableCellTextSelection:r})=>"object"==typeof e&&"singleRow"===e?.mode&&e?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":i?"colDef.spanRows is not supported with cellSelection.":s?"colDef.spanRows is not supported with suppressRowTransform.":o?n?"colDef.spanRows is not supported with rowDragEntireRow.":r?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(t,{groupHierarchyConfig:e={}},i){const s=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),o=[];for(const n of t.groupHierarchy??[])"object"!=typeof n?s.has(n)||n in e||o.push(du(n)):i.validation?.validateColDef(n);return o.length>0?`The following parts of colDef.groupHierarchy are not recognised: ${o.join(", ")}.\nChoose one of ${[...s].map(du).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`:null}}}})}processOptions(t,e){const{validations:i,deprecations:s,allProperties:o,propertyExceptions:n,objectName:r,docsUrl:l}=e;o&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(t,[...n??[],...Object.keys(s)],o,r,l);const a=new Set;if(Object.keys(t).forEach((e=>{const o=s[e];if(o){const{message:t,version:i}=o;a.add(`As of v${i}, ${String(e)} is deprecated. ${t??""}`)}const n=t[e];if(null==n||!1===n)return;const r=i[e];if(!r)return;const{dependencies:l,validate:h,supportedRowModels:c,expectedType:u}=r;if(u){const t=typeof n;if(t!==u)return void a.add(`${String(e)} should be of type '${u}' but received '${t}' (${n}).`)}if(c){const t=this.gridOptions.rowModelType??"clientSide";if(!c.includes(t))return void a.add(`${String(e)} is not supported with the '${t}' row model. It is only valid with: ${c.join(", ")}.`)}if(l){const i=this.checkForRequiredDependencies(e,l,t);if(i)return void a.add(i)}if(h){const e=h(t,this.gridOptions,this.beans);if(e)return void a.add(e)}})),a.size>0)for(const t of a)jt(t)}checkForRequiredDependencies(t,e,i){const s=Object.entries(e).filter((([t,e])=>!e.required.includes(i[t])));return 0===s.length?null:s.map((([e,i])=>`'${String(t)}' requires '${e}' to be one of [${i.required.map((t=>null===t?"null":void 0===t?"undefined":t)).join(", ")}]. ${i.reason??""}`)).join("\n ")}checkProperties(t,e,i,s,o){const n=function(t,e,i){const s={},o=t.filter((t=>!e.some((e=>e===t))));if(o.length>0)for(const t of o)s[t]=wo({inputValue:t,allSuggestions:i}).values;return s}(Object.getOwnPropertyNames(t),["__ob__","__v_skip","__metadata__",...e,...i],i),r=Object.keys(n);for(const t of r){let e=`invalid ${s} property '${t}' did you mean any of these: ${n[t].slice(0,8).join(", ")}.`;i.includes("context")&&(e+=`\nIf you are trying to annotate ${s} with application data, use the '${s}.context' property instead.`),jt(e)}r.length>0&&o&&jt(`to see all the valid ${s} properties please check: ${this.beans.frameworkOverrides.getDocLink(o)}`)}}]};function mg(t){const e=t.sibling;e&&(e.childrenAfterFilter=t.childrenAfterFilter)}var wg={moduleName:"SharedMenu",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:t,filterMenuFactory:e}=this.beans;this.activeMenuFactory=t??e}showColumnMenu(t){this.showColumnMenuCommon(this.activeMenuFactory,t,"columnMenu")}showFilterMenu(t){this.showColumnMenuCommon(pa(this.beans),t,t.containerType,!0)}showHeaderContextMenu(t,e,i){this.activeMenuFactory?.showMenuAfterContextMenuEvent(t,e,i)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){pa(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(t){const{suppressHeaderMenuButton:e}=t.getColDef();return!e&&!!this.activeMenuFactory?.isMenuEnabled(t)&&(Ye(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(t){return!t.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(t)}isHeaderContextMenuEnabled(t){const e=t&&ii(t)?t.getColDef():t?.getColGroupDef();return!e?.suppressHeaderContextMenu&&"new"===this.gos.get("columnMenu")}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const t=!this.isSuppressMenuHide();return!(eo()&&t)}isHeaderFilterButtonEnabled(t){return this.isFilterMenuInHeaderEnabled(t)&&!Ye(this.gos)&&!this.isFloatingFilterButtonDisplayed(t)}isFilterMenuItemEnabled(t){return!(!this.beans.filterManager?.isFilterAllowed(t)||Ye(this.gos)||this.isFilterMenuInHeaderEnabled(t)||this.isFloatingFilterButtonDisplayed(t))}isFloatingFilterButtonEnabled(t){return!t.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(t){return!!t.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(t)}isSuppressMenuHide(){const t=this.gos,e=t.get("suppressMenuHide");return Ye(t)?!!t.exists("suppressMenuHide")&&e:e}showColumnMenuCommon(t,e,i,s){const{positionBy:o,onClosedCallback:n}=e,r=e.column;if("button"===o){const{buttonElement:o}=e;t?.showMenuAfterButtonClick(r,o,i,n,s)}else if("mouse"===o){const{mouseEvent:o}=e;t?.showMenuAfterMouseEvent(r,o,i,n,s)}else if(r){const e=this.beans,o=e.ctrlsSvc;o.getScrollFeature().ensureColumnVisible(r,"auto"),ht(e,(()=>{const e=o.getHeaderRowContainerCtrl(r.getPinned())?.getHeaderCtrlForColumn(r);e&&t?.showMenuAfterButtonClick(r,e.getAnchorElementForMenu(s),i,n,s)}))}}}],apiFunctions:{showColumnMenu:function(t,e){const i=t.colModel.getCol(e);i?t.menuSvc?.showColumnMenu({column:i,positionBy:"auto"}):fe(12,{colKey:e})},hidePopupMenu:function(t){t.menuSvc?.hidePopupMenu()}}},vg={moduleName:"Popup",version:se,beans:[class extends Wn{postConstruct(){this.beans.ctrlsSvc.whenReady(this,(t=>{this.gridCtrl=t.gridCtrl})),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getDefaultPopupParent(){return this.gridCtrl.getGui()}positionPopupForMenu(t){const{eventSource:e,ePopup:i,event:s}=t,o=e.getBoundingClientRect(),n=this.getParentRect();this.setAlignedTo(e,i);let r=!1;this.positionPopup({ePopup:i,keepWithinBounds:!0,updatePosition:()=>{const t=this.keepXYWithinBounds(i,o.top-n.top,0),e=i.clientWidth>0?i.clientWidth:200;r||(i.style.minWidth=`${e}px`,r=!0);const s=n.right-n.left-e;let l;return this.gos.get("enableRtl")?(l=h(),l<0&&(l=a(),this.setAlignedStyles(i,"left")),l>s&&(l=0,this.setAlignedStyles(i,"right"))):(l=a(),l>s&&(l=h(),this.setAlignedStyles(i,"right")),l<0&&(l=0,this.setAlignedStyles(i,"left"))),{x:l,y:t};function a(){return o.right-n.left-2}function h(){return o.left-n.left-e}},postProcessCallback:()=>this.callPostProcessPopup(t,"subMenu",i,e,s instanceof MouseEvent?s:void 0)})}callPostProcessPopup(t,e,i,s,o){const n=this.gos.getCallback("postProcessPopup");if(n){const{column:r,rowNode:l}=t;n({column:r,rowNode:l,ePopup:i,type:e,eventSource:s,mouseEvent:o})}}getActivePopups(){return this.popupList.map((t=>t.element))}handleThemeChange(t){if(t.themeChanged){const t=this.beans.environment;for(const e of this.popupList)t.applyThemeClasses(e.wrapper)}}hasAnchoredPopup(){return this.popupList.some((t=>t.isAnchored))}isStopPropagation(t){return Vr(t)}}]},Cg={filterHandler:()=>({doesFilterPass:()=>!0})},bg={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},yg=class{constructor(){this.customFilterOptions={}}init(t,e){this.filterOptions=t.filterOptions??e,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(t.defaultOption)}refresh(t,e){const i=t.filterOptions??e;this.filterOptions!==i&&(this.filterOptions=i,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(t.defaultOption)}mapCustomOptions(){const{filterOptions:t}=this;if(t)for(const e of t)"string"!=typeof e&&([["displayKey"],["displayName"],["predicate","test"]].every((t=>!!t.some((t=>null!=e[t]))||(pe(72,{keys:t}),!1)))?this.customFilterOptions[e.displayKey]=e:this.filterOptions=t.filter((t=>t===e))||[])}getDefaultItem(t){const{filterOptions:e}=this;if(t)return t;if(e.length>=1){const t=e[0];if("string"==typeof t)return t;if(t.displayKey)return t.displayKey;pe(73)}else pe(74)}getCustomOption(t){return this.customFilterOptions[t]}};function Sg(t,e,i){return null==i?t.splice(e):t.splice(e,i)}function xg(t){return null==t||"string"==typeof t&&0===t.trim().length}function Rg(t,e){const i=e.getCustomOption(t);if(i){const{numberOfInputs:t}=i;return null!=t?t:1}return t&&["empty","notBlank","blank"].indexOf(t)>=0?0:"inRange"===t?2:1}var Fg=class extends zr{constructor(t,e,i){super(t,"simple-filter"),this.mapValuesFromModel=e,this.defaultOptions=i,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(t){super.setParams(t);const e=new yg;this.optionsFactory=e,e.init(t,this.defaultOptions),this.commonUpdateSimpleParams(t),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(t,e){this.optionsFactory.refresh(t,this.defaultOptions),super.updateParams(t,e),this.commonUpdateSimpleParams(t)}commonUpdateSimpleParams(t){var e;this.setNumConditions(t),this.defaultJoinOperator="AND"===(e=t.defaultJoinOperator)||"OR"===e?e:"AND",this.filterPlaceholder=t.filterPlaceholder,this.createFilterListOptions();const i=this.getGui();this.isReadOnly()?i.setAttribute("tabindex","-1"):i.removeAttribute("tabindex")}onFloatingFilterChanged(t,e){this.setTypeFromFloatingFilter(t),this.setValueFromFloatingFilter(e),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(t){this.eTypes.forEach(((e,i)=>{e.setValue(0===i?t:this.optionsFactory.defaultOption,!0)}))}getModelFromUi(){const t=this.getUiCompleteConditions();return 0===t.length?null:this.maxNumConditions>1&&t.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:t}:t[0]}getConditionTypes(){return this.eTypes.map((t=>t.getValue()))}getConditionType(t){return this.eTypes[t].getValue()}getJoinOperator(){const{eJoinOrs:t,defaultJoinOperator:e}=this;return 0===t.length?e:!0===t[0].getValue()?"OR":"AND"}areNonNullModelsEqual(t,e){const i=!t.operator,s=!e.operator;if(!i&&s||i&&!s)return!1;let o;return o=i?this.areSimpleModelsEqual(t,e):t.operator===e.operator&&ci(t.conditions,e.conditions,((t,e)=>this.areSimpleModelsEqual(t,e))),o}setModelIntoUi(t,e){if(null==t)return this.resetUiToDefaults(e),Qi.resolve();if(t.operator){const e=t;let i=e.conditions;null==i&&(i=[],pe(77));const s=function(t,e){let i=t.length;return i>e&&(t.splice(e),pe(78),i=e),i}(i,this.maxNumConditions),o=this.getNumConditions();if(s<o)this.removeConditionsAndOperators(s);else if(s>o)for(let t=o;t<s;t++)this.createJoinOperatorPanel(),this.createOption();const n="OR"===e.operator;this.eJoinAnds.forEach((t=>t.setValue(!n,!0))),this.eJoinOrs.forEach((t=>t.setValue(n,!0))),i.forEach(((t,e)=>{this.eTypes[e].setValue(t.type,!0),this.setConditionIntoUi(t,e)}))}else{const e=t;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(e.type,!0),this.setConditionIntoUi(e,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams()),Qi.resolve()}setNumConditions(t){let e=t.maxNumConditions??2;e<1&&(pe(79),e=1),this.maxNumConditions=e;let i=t.numAlwaysVisibleConditions??1;i<1&&(pe(80),i=1),i>e&&(pe(81),i=e),this.numAlwaysVisibleConditions=i}createOption(){const t=this.getGui(),e=this.createManagedBean(new qo);this.eTypes.push(e),e.addCss("ag-filter-select"),t.appendChild(e.getGui());const i=this.createEValue();this.eConditionBodies.push(i),t.appendChild(i),this.putOptionsIntoDropdown(e),this.resetType(e);const s=this.getNumConditions()-1;this.forEachPositionInput(s,(t=>this.resetInput(t))),this.addChangedListeners(e,s)}createJoinOperatorPanel(){const t=mr({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(t);const e=this.createJoinOperator(this.eJoinAnds,t,"and"),i=this.createJoinOperator(this.eJoinOrs,t,"or");this.getGui().appendChild(t);const s=this.eJoinPanels.length-1,o=this.joinOperatorId++;this.resetJoinOperatorAnd(e,s,o),this.resetJoinOperatorOr(i,s,o),this.isReadOnly()||(e.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(t,e,i){const s=this.createManagedBean(new No);t.push(s);const o="ag-filter-condition-operator";return s.addCss(o),s.addCss(`${o}-${i}`),e.appendChild(s.getGui()),s}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map((t=>"string"==typeof t?this.createBoilerplateListOption(t):this.createCustomListOption(t)))}putOptionsIntoDropdown(t){const{filterListOptions:e}=this;for(const i of e)t.addOption(i);t.setDisabled(e.length<=1)}createBoilerplateListOption(t){return{value:t,text:this.translate(t)}}createCustomListOption(t){const{displayKey:e}=t,i=this.optionsFactory.getCustomOption(t.displayKey);return{value:e,text:i?this.getLocaleTextFunc()(i.displayKey,i.displayName):this.translate(e)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){const t=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,t)}updateNumConditions(){let t=-1,e=!0;for(let i=0;i<this.getNumConditions();i++)this.isConditionUiComplete(i)?t=i:e=!1;if(this.shouldAddNewConditionAtEnd(e))this.createJoinOperatorPanel(),this.createOption();else{const e=this.lastUiCompletePosition??this.getNumConditions()-2;if(t<e){this.removeConditionsAndOperators(e+1);const i=t+1,s=e-i;s>0&&this.removeConditionsAndOperators(i,s),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=t}updateConditionStatusesAndValues(t,e){this.eTypes.forEach(((e,i)=>{const s=this.isConditionDisabled(i,t);e.setDisabled(s||this.filterListOptions.length<=1),1===i&&(O(this.eJoinPanels[0],s),this.eJoinAnds[0].setDisabled(s),this.eJoinOrs[0].setDisabled(s))})),this.eConditionBodies.forEach(((t,e)=>{H(t,this.isConditionBodyVisible(e))}));const i="OR"===(e??this.getJoinOperator());for(const t of this.eJoinAnds)t.setValue(!i,!0);for(const t of this.eJoinOrs)t.setValue(i,!0);this.forEachInput(((e,i,s,o)=>{this.setElementDisplayed(e,i<o),this.setElementDisabled(e,this.isConditionDisabled(s,t))})),this.resetPlaceholder()}shouldAddNewConditionAtEnd(t){return t&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(t,e){if(t>=this.getNumConditions())return;const{eTypes:i,eConditionBodies:s,eJoinPanels:o,eJoinAnds:n,eJoinOrs:r}=this;this.removeComponents(i,t,e),this.removeElements(s,t,e),this.removeEValues(t,e);const l=Math.max(t-1,0);this.removeElements(o,l,e),this.removeComponents(n,l,e),this.removeComponents(r,l,e)}removeElements(t,e,i){const s=Sg(t,e,i);for(const t of s)K(t)}removeComponents(t,e,i){const s=Sg(t,e,i);for(const t of s)K(t.getGui()),this.destroyBean(t)}afterGuiAttached(t){if(super.afterGuiAttached(t),this.resetPlaceholder(),!t?.suppressFocus){let t;if(!this.isReadOnly()){const e=this.getInputs(0)[0];t=e instanceof Io&&this.isConditionBodyVisible(0)?e.getInputElement():this.eTypes[0]?.getFocusableElement()}(t??this.getGui()).focus({preventScroll:!0})}}afterGuiDetached(){super.afterGuiDetached();const t=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(t.column))return;t.onStateChange({model:t.model});let e=-1,i=-1,s=!1;const o=this.getJoinOperator();for(let t=this.getNumConditions()-1;t>=0;t--)if(this.isConditionUiComplete(t))-1===e&&(e=t,i=t);else{const o=t<e;(t>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(t-1)||o)&&(this.removeConditionsAndOperators(t,1),s=!0,o&&i--)}let n=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),n=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),n=!0),n&&this.updateConditionStatusesAndValues(i,o),s&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getModelAsString(t){return this.params.getHandler()?.getModelAsString?.(t)??""}getPlaceholderText(t,e){let i=this.translate(t);if("function"==typeof this.filterPlaceholder){const t=this.eTypes[e].getValue(),s=this.translate(t);i=this.filterPlaceholder({filterOptionKey:t,filterOption:s,placeholder:i})}else"string"==typeof this.filterPlaceholder&&(i=this.filterPlaceholder);return i}resetPlaceholder(){const t=this.getLocaleTextFunc();this.forEachInput(((e,i,s,o)=>{if(!(e instanceof Io))return;const n=0===i&&o>1?"inRangeStart":0===i?"filterOoo":"inRangeEnd",r=0===i&&o>1?t("ariaFilterFromValue","Filter from value"):0===i?t("ariaFilterValue","Filter Value"):t("ariaFilterToValue","Filter to Value");e.setInputPlaceholder(this.getPlaceholderText(n,s)),e.setInputAriaLabel(r)}))}setElementValue(t,e,i){t instanceof Io&&t.setValue(null!=e?String(e):null,!0)}setElementDisplayed(t,e){ji(t)&&H(t.getGui(),e)}setElementDisabled(t,e){ji(t)&&O(t.getGui(),e)}attachElementOnChange(t,e){t instanceof Io&&t.onValueChange(e)}forEachInput(t){this.getConditionTypes().forEach(((e,i)=>{this.forEachPositionTypeInput(i,e,t)}))}forEachPositionInput(t,e){const i=this.getConditionType(t);this.forEachPositionTypeInput(t,i,e)}forEachPositionTypeInput(t,e,i){const s=Rg(e,this.optionsFactory),o=this.getInputs(t);for(let e=0;e<o.length;e++){const n=o[e];null!=n&&i(n,e,t,s)}}isConditionDisabled(t,e){return!!this.isReadOnly()||0!==t&&t>e+1}isConditionBodyVisible(t){return Rg(this.getConditionType(t),this.optionsFactory)>0}isConditionUiComplete(t){return!(t>=this.getNumConditions())&&("empty"!==this.getConditionType(t)&&!this.getValues(t).some((t=>null==t)))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){const t=[];for(let e=0;e<this.getNumConditions();e++)this.isConditionUiComplete(e)&&t.push(this.createCondition(e));return t}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let t=this.getNumConditions();t<this.numAlwaysVisibleConditions;t++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(t){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach((t=>this.resetType(t))),this.eJoinAnds.forEach(((t,e)=>this.resetJoinOperatorAnd(t,e,this.joinOperatorId+e))),this.eJoinOrs.forEach(((t,e)=>this.resetJoinOperatorOr(t,e,this.joinOperatorId+e))),this.joinOperatorId++,this.forEachInput((t=>this.resetInput(t))),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams())}resetType(t){const e=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");t.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(e).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(t,e,i){this.resetJoinOperator(t,e,"AND"===this.defaultJoinOperator,this.translate("andCondition"),i)}resetJoinOperatorOr(t,e,i){this.resetJoinOperator(t,e,"OR"===this.defaultJoinOperator,this.translate("orCondition"),i)}resetJoinOperator(t,e,i,s,o){this.updateJoinOperatorDisabled(t.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${o}`).setLabel(s),e)}updateJoinOperatorsDisabled(){const t=(t,e)=>this.updateJoinOperatorDisabled(t,e);this.eJoinAnds.forEach(t),this.eJoinOrs.forEach(t)}updateJoinOperatorDisabled(t,e){t.setDisabled(this.isReadOnly()||e>0)}resetInput(t){this.setElementValue(t,null),this.setElementDisabled(t,this.isReadOnly())}setConditionIntoUi(t,e){const i=this.mapValuesFromModel(t,this.optionsFactory);this.forEachInput(((t,s,o)=>{o===e&&this.setElementValue(t,null!=i[s]?i[s]:null)}))}setValueFromFloatingFilter(t){this.forEachInput(((e,i,s)=>{this.setElementValue(e,0===i&&0===s?t:null,!0)}))}addChangedListeners(t,e){this.isReadOnly()||(t.onValueChange(this.listener),this.forEachPositionInput(e,(t=>{this.attachElementOnChange(t,this.listener)})))}hasInvalidInputs(){return!1}isReadOnly(){return!!this.params.readOnly}},kg=class{constructor(t,e,i,s,o,n){this.alive=!0,this.context=t,this.eParent=o;const r=function(t,e,i){return t.getCompDetails(e,Xi,"agDateInput",i,!0)}(e,i,s);r&&r.newAgStackInstance().then((e=>{if(!this.alive)return void t.destroyBean(e);if(this.dateComp=e,!e)return;o.appendChild(e.getGui()),e?.afterGuiAttached?.();const{tempValue:i,disabled:s}=this;i&&e.setDate(i),null!=s&&e.setDisabled?.(s),n?.(this)}))}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(t){const e=this.dateComp;e?e.setDate(t):this.tempValue=t}setDisabled(t){const e=this.dateComp;e?e.setDisabled?.(t):this.disabled=t}setDisplayed(t){H(this.eParent,t)}setInputPlaceholder(t){this.dateComp?.setInputPlaceholder?.(t)}setInputAriaLabel(t){this.dateComp?.setInputAriaLabel?.(t)}afterGuiAttached(t){this.dateComp?.afterGuiAttached?.(t)}updateParams(t){this.dateComp?.refresh?.(t)}},Pg=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function Dg(t,e){const{dateFrom:i,dateTo:s,type:o}=t||{};return[i&&mo(i,void 0,!0)||null,s&&mo(s,void 0,!0)||null].slice(0,Rg(o,e))}var Mg=1/0,Tg=class extends Dt{constructor(t,e){super(),this.mapValuesFromModel=t,this.defaultOptions=e}init(t){const e=t.filterParams,i=new yg;this.optionsFactory=i,i.init(e,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(i,e)),this.updateParams(t),this.validateModel(t)}refresh(t){if("colDef"===t.source){const e=t.filterParams,i=this.optionsFactory;i.refresh(e,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:i,filterParams:e}),this.updateParams(t)}this.validateModel(t)}updateParams(t){this.params=t}doesFilterPass(t){const e=t.model;if(null==e)return!0;const{operator:i}=e,s=[];i?s.push(...e.conditions??[]):s.push(e);const o=i&&"OR"===i?"some":"every",n=this.params.getValue(t.node);return s[o]((e=>this.individualConditionPasses(t,e,n)))}getModelAsString(t,e){return this.filterModelFormatter.getModelAsString(t,e)??""}validateModel(t){const{model:e,filterParams:{filterOptions:i,maxNumConditions:s}}=t;if(null==e)return;let o=$r(e)?e.conditions:[e];const n=i?.map((t=>"string"==typeof t?t:t.displayKey))??this.defaultOptions;if(o&&!o.every((t=>void 0!==n.find((e=>e===t.type)))))return this.params={...t,model:null},void t.onModelChange(null);let r=!1;const l=this.filterType;if((o&&!o.every((t=>t.filterType===l))||e.filterType!==l)&&(o=o.map((t=>({...t,filterType:l}))),r=!0),"number"==typeof s&&o&&o.length>s&&(o=o.slice(0,s),r=!0),r){const i=o.length>1?{...e,filterType:l,conditions:o}:{...o[0],filterType:l};this.params={...t,model:i},t.onModelChange(i)}}individualConditionPasses(t,e,i){const s=this.optionsFactory,o=this.mapValuesFromModel(e,s),n=function(t,e,i){if(null==t)return;const{predicate:s}=t;return null==s||e.some((t=>null==t))?void 0:s(e,i)}(s.getCustomOption(e.type),o,i);return null!=n?n:null==i?this.evaluateNullValue(e.type):this.evaluateNonNullValue(o,i,e,t)}},Eg=class extends Tg{evaluateNullValue(t){const{includeBlanksInEquals:e,includeBlanksInNotEqual:i,includeBlanksInGreaterThan:s,includeBlanksInLessThan:o,includeBlanksInRange:n}=this.params.filterParams;switch(t){case"equals":if(e)return!0;break;case"notEqual":if(i)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(s)return!0;break;case"lessThan":case"lessThanOrEqual":if(o)return!0;break;case"inRange":if(n)return!0;break;case"blank":return!0;case"notBlank":return!1}return!1}evaluateNonNullValue(t,e,i){const s=i.type;if(!this.isValid(e))return"notEqual"===s||"notBlank"===s;const o=this.comparator(),n=null!=t[0]?o(t[0],e):0;switch(s){case"equals":return 0===n;case"notEqual":return 0!==n;case"greaterThan":return n>0;case"greaterThanOrEqual":return n>=0;case"lessThan":return n<0;case"lessThanOrEqual":return n<=0;case"inRange":{const i=o(t[1],e);return this.params.filterParams.inRangeInclusive?n>=0&&i<=0:n>0&&i<0}case"blank":return xg(e);case"notBlank":return!xg(e);default:return pe(76,{filterModelType:s}),!0}}},Ag={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},Ig={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},Hg=class extends Dt{constructor(t,e,i){super(),this.optionsFactory=t,this.filterParams=e,this.valueFormatter=i}getModelAsString(t,e){const i=this.getLocaleTextFunc(),s="filterToolPanel"===e;if(!t)return s?Cr(this,"filterSummaryInactive"):null;if(null!=t.operator){const i=t;return(i.conditions??[]).map((t=>this.getModelAsString(t,e))).join(` ${Cr(this,"AND"===i.operator?"andCondition":"orCondition")} `)}if("blank"===t.type||"notBlank"===t.type)return s?Cr(this,"blank"===t.type?"filterSummaryBlank":"filterSummaryNotBlank"):i(t.type,t.type);{const e=t,o=this.optionsFactory.getCustomOption(e.type),{displayKey:n,displayName:r,numberOfInputs:l}=o||{};return n&&r&&0===l?i(n,r):this.conditionToString(e,s,"inRange"===e.type||2===l,n,r)}}updateParams(t){const{optionsFactory:e,filterParams:i}=t;this.optionsFactory=e,this.filterParams=i}conditionForToolPanel(t,e,i,s,o,n){let r;const l=this.getTypeKey(t);return l&&(r=Cr(this,l)),o&&n&&(r=this.getLocaleTextFunc()(o,n)),null!=r?e?`${r} ${Cr(this,"filterSummaryInRangeValues",[i(),s()])}`:`${r} ${i()}`:null}getTypeKey(t){const e=this.filterTypeKeys[t];return e?`filterSummary${e}`:null}formatValue(t){const e=this.valueFormatter;return e?e(t??null)??"":String(t)}},Og=class extends Hg{constructor(t,e){super(t,e,(t=>{const{dataTypeSvc:i,valueSvc:s}=this.beans,o=e.column,n=i?.getDateFormatterFunction(o),r=n?n(t??void 0):t;return s.formatValue(o,null,r)})),this.filterTypeKeys=Ag}conditionToString(t,e,i,s,o){const{type:n}=t,r=mo(t.dateFrom),l=mo(t.dateTo),a=this.filterParams.inRangeFloatingFilterDateFormat,h=e?this.formatValue.bind(this):t=>po(t,a),c=()=>null!==r?h(r):"null",u=()=>null!==l?h(l):"null";if(e){const t=this.conditionForToolPanel(n,i,c,u,s,o);if(null!=t)return t}return i?`${c()}-${u()}`:null!=r?h(r):`${n}`}};function Ng(t,e){return e<t?-1:e>t?1:0}var Bg=class extends _i{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(t){if(!t)return void(this.lastType=this.optionsFactory.defaultOption);let e;e=t.operator?t.conditions[0]:t,this.lastType=e.type}canWeEditAfterModelFromParentFilter(t){return t?!t.operator&&this.isTypeEditable(t.type):this.isTypeEditable(this.lastType)}init(t){this.params=t;const e=this.gos.get("enableFilterHandlers");this.reactive=e,this.setParams(t),e&&this.onModelUpdated(t.model)}setParams(t){const e=new yg;this.optionsFactory=e,e.init(t.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(e,t.filterParams)),this.setSimpleParams(t,!1)}setSimpleParams(t,e=!0){const i=this.optionsFactory.defaultOption;e||(this.lastType=i),this.readOnly=!!t.filterParams.readOnly;const s=this.isTypeEditable(i);this.setEditable(s)}refresh(t){this.params=t;const e=t,i=this.reactive;if(i&&"colDef"!==e.source||this.updateParams(t),i){const{source:t,model:i}=e;if("dataChanged"===t||"ui"===t)return;this.onModelUpdated(i)}}updateParams(t){const e=this.optionsFactory;e.refresh(t.filterParams,this.defaultOptions),this.setSimpleParams(t),this.filterModelFormatter.updateParams({optionsFactory:e,filterParams:t.filterParams})}onParentModelChanged(t,e){e?.afterFloatingFilter||e?.afterDataChange||this.onModelUpdated(t)}hasSingleInput(t){const e=this.optionsFactory.getCustomOption(t)?.numberOfInputs;return null==e||1==e}isTypeEditable(t){return!!t&&!this.readOnly&&this.hasSingleInput(t)&&["inRange","empty","blank","notBlank"].indexOf(t)<0}getAriaLabel(t){return`${this.beans.colNames.getDisplayNameForColumn(t.column,"header",!0)} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},Gg={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eReadOnlyText"},{tag:"div",ref:"eDateWrapper",cls:"ag-date-floating-filter-wrapper"}]},Vg={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},Lg=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function zg(t){const{allowedCharPattern:e}=t??{};return e??null}function $g(t){return null==t||isNaN(t)?null:t}function Wg(t,e){const{filter:i,filterTo:s,type:o}=t||{};return[$g(i),$g(s)].slice(0,Rg(o,e))}var Ug=class extends Hg{constructor(t,e){super(t,e,e.numberFormatter),this.filterTypeKeys=Ag}conditionToString(t,e,i,s,o){const{filter:n,filterTo:r,type:l}=t,a=this.formatValue.bind(this);if(e){const t=this.conditionForToolPanel(l,i,(()=>a(n)),(()=>a(r)),s,o);if(null!=t)return t}return i?`${a(n)}-${a(r)}`:null!=n?a(n):`${l}`}},jg=class extends Dt{constructor(t){super(),this.params=t,this.eInput=Ui,this.onValueChanged=()=>{}}setupGui(t){this.eInput=this.createManagedBean(new Bo(this.params?.config));const e=this.eInput.getGui();t.appendChild(e);const i=t=>this.onValueChanged(t);this.addManagedListeners(e,{input:i,keydown:i})}setEditable(t){this.eInput.setDisabled(!t)}getValue(){return this.eInput.getValue()}setValue(t,e){this.eInput.setValue(t,e)}setValueChangedListener(t){this.onValueChanged=t}setParams({ariaLabel:t,autoComplete:e}){const{eInput:i}=this;i.setInputAriaLabel(t),void 0!==e&&i.setAutoComplete(e)}};function Kg(t){const e=t?.trim();return""===e?t:e}function qg(t,e){const{filter:i,filterTo:s,type:o}=t||{};return[i||null,s||null].slice(0,Rg(o,e))}var Zg={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},_g=class extends Bg{constructor(){super(...arguments),this.eFloatingFilterInputContainer=Ui,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(Zg)}onModelUpdated(t){this.setLastTypeFromModel(t),this.setEditable(this.canWeEditAfterModelFromParentFilter(t)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(t))}setParams(t){this.setupFloatingFilterInputService(t),super.setParams(t),this.setTextInputParams(t)}setupFloatingFilterInputService(t){this.inputSvc=this.createFloatingFilterInputService(t),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(t){const e=t.browserAutoComplete??!1,{inputSvc:i,defaultDebounceMs:s,readOnly:o}=this;if(i.setParams({ariaLabel:this.getAriaLabel(t),autoComplete:e}),this.applyActive=yr(t.filterParams),!o){const e=br(t.filterParams,s),o=Ht(this,this.syncUpWithParentFilter.bind(this),e);i.setValueChangedListener(o)}}updateParams(t){super.updateParams(t),this.setTextInputParams(t)}recreateFloatingFilterInputService(t){const{inputSvc:e}=this,i=e.getValue();j(this.eFloatingFilterInputContainer),this.destroyBean(e),this.setupFloatingFilterInputService(t),e.setValue(i,!0)}syncUpWithParentFilter(t){const e=t.key===As,i=this.reactive;if(i&&this.params.onUiChange(),this.applyActive&&!e)return;const{inputSvc:s,params:o,lastType:n}=this;let r=s.getValue();if(o.filterParams.trimInput&&(r=Kg(r),s.setValue(r,!0)),i){const t=o,e=t.model,i=this.convertValue(r),s=null==i?null:{...e??{filterType:this.filterType,type:n??this.optionsFactory.defaultOption},filter:i};t.onModelChange(s,{afterFloatingFilter:!0})}else o.parentFilterInstance((t=>{t?.onFloatingFilterChanged(n||null,r||null)}))}convertValue(t){return t||null}setEditable(t){this.inputSvc.setEditable(t)}},Yg=class extends Dt{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(t){this.eNumberInput=this.createManagedBean(new Lo),this.eTextInput=this.createManagedBean(new Bo),this.eTextInput.setDisabled(!0);const e=this.eNumberInput.getGui(),i=this.eTextInput.getGui();t.appendChild(e),t.appendChild(i),this.setupListeners(e,(t=>this.onValueChanged(t))),this.setupListeners(i,(t=>this.onValueChanged(t)))}setEditable(t){this.numberInputActive=t,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(t){this.eNumberInput.setAutoComplete(t),this.eTextInput.setAutoComplete(t)}getValue(){return this.getActiveInputElement().getValue()}setValue(t,e){this.getActiveInputElement().setValue(t,e)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(t){this.onValueChanged=t}setupListeners(t,e){this.addManagedListeners(t,{input:e,keydown:e})}setParams(t){this.setAriaLabel(t.ariaLabel),void 0!==t.autoComplete&&this.setAutoComplete(t.autoComplete)}setAriaLabel(t){this.eNumberInput.setInputAriaLabel(t),this.eTextInput.setInputAriaLabel(t)}},Qg=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],Jg=class extends Hg{constructor(){super(...arguments),this.filterTypeKeys=Ig}conditionToString(t,e,i,s,o){const{filter:n,filterTo:r,type:l}=t;if(e){const t=t=>()=>Cr(this,"filterSummaryTextQuote",[t]),e=this.conditionForToolPanel(l,i,t(n),t(r),s,o);if(null!=e)return e}return i?`${n}-${r}`:null!=n?`${n}`:`${l}`}},Xg=({filterOption:t,value:e,filterText:i})=>{if(null==i)return!1;switch(t){case"contains":return e.includes(i);case"notContains":return!e.includes(i);case"equals":return e===i;case"notEqual":return e!=i;case"startsWith":return 0===e.indexOf(i);case"endsWith":{const t=e.lastIndexOf(i);return t>=0&&t===e.length-i.length}default:return!1}},tp=t=>t,ep=t=>null==t?null:t.toString().toLowerCase(),ip={moduleName:"ClientSideRowModelFilter",version:se,rowModels:["clientSide"],beans:[class extends Dt{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(t){this.filterManager=t.filterManager}execute(t){const{changedPath:e}=t;this.filter(e)}filter(t){const e=!!this.filterManager?.isChildFilterPresent();this.filterNodes(e,t)}filterNodes(t,e){const i=(e,i)=>{e.childrenAfterFilter=e.hasChildren()&&t&&!i?e.childrenAfterGroup.filter((t=>{const e=t.childrenAfterFilter&&t.childrenAfterFilter.length>0,i=t.data&&this.filterManager.doesRowPassFilter({rowNode:t});return e||i})):e.childrenAfterGroup,mg(e)};if(this.doingTreeDataFiltering()){const t=(e,s)=>{if(e.childrenAfterGroup)for(let o=0;o<e.childrenAfterGroup.length;o++){const n=e.childrenAfterGroup[o],r=s||this.filterManager.doesRowPassFilter({rowNode:n});n.childrenAfterGroup?t(e.childrenAfterGroup[o],r):i(n,r)}i(e,s)};e.executeFromRootNode((e=>t(e,!1)))}else e.forEachChangedNodeDepthFirst((t=>i(t,!1)),!0)}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}}]},sp={moduleName:"FilterCore",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(t){this.quickFilter=t.quickFilter,this.advancedFilter=t.advancedFilter,this.colFilter=t.colFilter}postConstruct(){const t=this.refreshFiltersForAggregations.bind(this),e=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:t,columnPivotChanged:t,columnPivotModeChanged:t,newColumnsLoaded:e,columnVisible:e,advancedFilterEnabledChanged:({enabled:t})=>this.onAdvFilterEnabledChanged(t),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],(()=>{this.onFilterChanged({source:"api"})})),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",(()=>{this.updateAggFiltering(),this.onFilterChanged()})),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:i}=this;this.alwaysPassFilter=i.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",(()=>{this.alwaysPassFilter=i.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})}))}isExternalFilterPresentCallback(){const t=this.gos.getCallback("isExternalFilterPresent");return"function"==typeof t&&t({})}doesExternalFilterPass(t){const e=this.gos.get("doesExternalFilterPass");return"function"==typeof e&&e(t)}setFilterState(t,e,i="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(t,e,i)}setFilterModel(t,e="api",i){this.isAdvFilterEnabled()?i||this.warnAdvFilters():this.colFilter?.setModel(t,e)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(t){t?this.colFilter?.disableFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){Ae(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(t={}){const{source:e,additionalEventAttributes:i,columns:s=[]}=t;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(t):Qi.resolve()).then((()=>{const t={source:e,type:"filterChanged",columns:s};i&&Bt(t,i),this.eventSvc.dispatchEvent(t),this.colFilter?.updateAfterFilterChanged()}))}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Ae(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(t,e){return this.doesRowPassFilter({rowNode:e,colIdToSkip:t})}doesRowPassAggregateFilters(t){const{rowNode:e}=t;return!(!this.alwaysPassFilter?.(e)&&(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(e)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(e,t.colIdToSkip,!0)))}doesRowPassFilter(t){const{rowNode:e}=t;return!(!this.alwaysPassFilter?.(e)&&(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(e)||this.externalFilterPresent&&!this.doesExternalFilterPass(e)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(e,t.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(e)))}isFilterAllowed(t){return!this.isAdvFilterEnabled()&&!!this.colFilter?.isFilterAllowed(t)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(t,e="api"){this.isAdvFilterEnabled()&&(this.beans.dataTypeSvc?.isPendingInference?this.advFilterModelUpdateQueue.push(t):(this.advancedFilter.setModel(t??null),this.onFilterChanged({source:e})))}toggleAdvFilterBuilder(t,e){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:e,force:t})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return!this.isAdvFilterEnabled()&&!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(t)??Promise.resolve(void 0)}warnAdvFilters(){pe(68)}setupAdvFilterHeaderComp(t){this.advancedFilter?.getCtrl().setupHeaderComp(t)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(const t of this.advFilterModelUpdateQueue)this.setAdvFilterModel(t);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(t,e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(t,e)??Promise.resolve()}}],apiFunctions:{isAnyFilterPresent:function(t){return!!t.filterManager?.isAnyFilterPresent()},onFilterChanged:function(t,e="api"){t.filterManager?.onFilterChanged({source:e})}},css:[".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}"],dependsOn:[ip]},op={moduleName:"FilterValue",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(t,e,i){if(!e)return;const s=t.getColDef(),{selectableFilter:o,valueSvc:n}=this.beans,r=i??o?.getFilterValueGetter(t.getColId())??s.filterValueGetter;return r?this.executeFilterValueGetter(r,e.data,t,e,s):n.getValue(t,e)}executeFilterValueGetter(t,e,i,s,o){const{expressionSvc:n,valueSvc:r}=this.beans,l=Qe(this.gos,{data:e,node:s,column:i,colDef:o,getValue:r.getValueCallback.bind(r,s)});return"function"==typeof t?t(l):n?.evaluate(t,l)}}]},np={moduleName:"ColumnFilter",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...hr},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)});const t=this.gos,e={...t.get("initialState")?.filter?.filterModel??{}};this.initialModel=e,this.model={...e},t.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(t,e="api",i){const{colModel:s,dataTypeSvc:o,filterManager:r}=this.beans;if(o?.isPendingInference)return void this.modelUpdates.push({model:t,source:e});const l=[],a=this.getModel(!0);if(t){const e=new Set(Object.keys(t));this.allColumnFilters.forEach(((i,s)=>{l.push(this.setModelOnFilterWrapper(i,t[s])),e.delete(s)})),e.forEach((e=>{const i=s.getColDefCol(e)||s.getCol(e);if(!i)return void pe(62,{colId:e});if(!i.isFilterAllowed())return void pe(63,{colId:e});const o=this.getOrCreateFilterWrapper(i,!0);o?l.push(this.setModelOnFilterWrapper(o,t[e],!0)):pe(64,{colId:e})}))}else this.model={},this.allColumnFilters.forEach((t=>{l.push(this.setModelOnFilterWrapper(t,null))}));Qi.all(l).then((()=>{const t=this.getModel(!0),s=[];this.allColumnFilters.forEach(((e,i)=>{n(a?a[i]:null,t?t[i]:null)||s.push(e.column)})),s.length>0?r?.onFilterChanged({columns:s,source:e}):i&&this.updateActive("filterChanged")}))}getModel(t){const e={},{allColumnFilters:s,initialModel:o,beans:{colModel:n}}=this;if(s.forEach(((t,s)=>{const o=this.getModelFromFilterWrapper(t);i(o)&&(e[s]=o)})),!t)for(const t of Object.keys(o)){const r=o[t];i(r)&&!s.has(t)&&n.getCol(t)?.isFilterAllowed()&&(e[t]=r)}return e}setState(t,e,i="api"){if(this.state.clear(),e)for(const t of Object.keys(e)){const i=e[t];this.state.set(t,{model:fr(this.model,t),state:i})}this.setModel(t,i,!0)}getState(){const t=this.state;if(!t.size)return;const e={};let i=!1;return t.forEach(((t,s)=>{const o=t.state;null!=o&&(i=!0,e[s]=o)})),i?e:void 0}getModelFromFilterWrapper(t){const e=t.column.getColId();if(t.isHandler)return fr(this.model,e);const i=t.filter;return i?"function"!=typeof i.getModel?(pe(66),null):i.getModel():fr(this.initialModel,e)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};const{allColumnFilters:t}=this;return!!t.size&&(t.forEach((t=>this.disposeFilterWrapper(t,"advancedFilterEnabled"))),!0)}updateActiveFilters(){const{colModel:t,gos:e}=this.beans,i=!!Ae(e),s=[],o=[],n=(e,n,r)=>{n&&((e=>{if(!e.isPrimary())return!0;const s=!t.isPivotActive();return!(!e.isValueActive()||!s)&&(!!t.isPivotMode()||i)})(e)?s.push(r):o.push(r))},r=[];return this.allColumnFilters.forEach((t=>{const e=t.column,i=e.getColId();if(t.isHandler)r.push(Qi.resolve().then((()=>{n(e,this.isHandlerActive(e),{colId:i,isHandler:!0,handler:t.handler,handlerParams:t.handlerParams})})));else{const s=ur(t);s&&r.push(s.then((t=>{n(e,(t=>!!t&&(t.isFilterActive?t.isFilterActive():(pe(67),!1)))(t),{colId:i,isHandler:!1,comp:t})})))}})),Qi.all(r).then((()=>{this.activeAggregateFilters=s,this.activeColumnFilters=o}))}updateFilterFlagInColumns(t,e){const i=[];return this.allColumnFilters.forEach((s=>{const o=s.column;if(s.isHandler)i.push(Qi.resolve().then((()=>{this.setColFilterActive(o,this.isHandlerActive(o),t,e)})));else{const n=ur(s);n&&i.push(n.then((i=>{this.setColFilterActive(o,i.isFilterActive(),t,e)})))}})),this.beans.groupFilter?.updateFilterFlags(t,e),Qi.all(i)}doFiltersPass(t,e,i){const{data:s,aggData:o}=t,n=i?this.activeAggregateFilters:this.activeColumnFilters,r=i?o:s,l=this.model;for(let i=0;i<n.length;i++){const s=n[i],{colId:o,isHandler:a}=s;if(o!==e)if(a){const{handler:e,handlerParams:i}=s;if(!e.doesFilterPass({node:t,data:r,model:fr(l,o),handlerParams:i}))return!1}else{const e=s.comp;if("function"!=typeof e.doesFilterPass){fe(91);continue}if(!e.doesFilterPass({node:t,data:r}))return!1}}return!0}getHandlerParams(t){const e=this.allColumnFilters.get(t.getColId());return e?.isHandler?e.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(t){const{rowRenderer:e,filterManager:i}=this.beans,s=()=>{this.isAlive()&&i?.onFilterChanged(t)};e.isRefreshInProgress()?setTimeout(s,0):s()}updateBeforeFilterChanged(t={}){const{column:e,additionalEventAttributes:i}=t,s=e?.getColId();return this.updateActiveFilters().then((()=>this.updateFilterFlagInColumns("filterChanged",i).then((()=>{this.allColumnFilters.forEach((t=>{const{column:e,isHandler:i}=t;s!==e.getColId()&&(i&&t.handler.onAnyFilterChanged?.(),ur(t,i)?.then((t=>{"function"==typeof t?.onAnyFilterChanged&&t.onAnyFilterChanged()})))})),this.processingFilterChange=!0}))))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!this.gos.get("allowShowChangeAfterFilter")&&this.processingFilterChange}onNewRowsLoaded(t){const e=[];this.allColumnFilters.forEach((t=>{const i=t.isHandler;i&&t.handler.onNewRowsLoaded?.();const s=ur(t,i);s&&e.push(s.then((t=>{t.onNewRowsLoaded?.()})))})),Qi.all(e).then((()=>this.updateActive(t,{afterDataChange:!0})))}updateActive(t,e){this.updateFilterFlagInColumns(t,e).then((()=>this.updateActiveFilters()))}createGetValue(t,e){const{filterValueSvc:i,colModel:s}=this.beans;return(o,n)=>{const r=n?s.getCol(n):t;return r?i.getValue(r,o,e):void 0}}isFilterActive(t){const e=this.cachedFilter(t);if(e?.isHandler)return this.isHandlerActive(t);const i=e?.filter;return i?i.isFilterActive():null!=fr(this.initialModel,t.getColId())}isHandlerActive(t){const e=i(fr(this.model,t.getColId()));if(e)return e;const s=this.beans.groupFilter;return!!s?.isGroupFilter(t)&&s.isFilterActive(t)}getOrCreateFilterUi(t){const e=this.getOrCreateFilterWrapper(t,!0);return e?ur(e):null}getFilterUiForDisplay(t){const e=this.getOrCreateFilterWrapper(t,!0);if(!e)return null;const i=ur(e);return i?i.then((t=>({comp:t,params:e.filterUi.filterParams,isHandler:e.isHandler}))):null}getHandler(t,e){const i=this.getOrCreateFilterWrapper(t,e);return i?.isHandler?i.handler:void 0}getOrCreateFilterWrapper(t,e){if(!t.isFilterAllowed())return;let i=this.cachedFilter(t);return!i&&e&&(i=this.createFilterWrapper(t),this.setColumnFilterWrapper(t,i)),i}cachedFilter(t){return this.allColumnFilters.get(t.getColId())}getDefaultFilter(t,e=!1){return this.getDefaultFilterFromDataType((()=>this.beans.dataTypeSvc?.getBaseDataType(t)),e)}getDefaultFilterFromDataType(t,e=!1){return(i=this.gos).isModuleRegistered("SetFilter")&&!i.get("suppressSetFilterByDefault")?e?"agSetColumnFloatingFilter":"agSetColumnFilter":function(t,e=!1){return(e?Ar:Er)[t??"text"]}(t(),e);var i}getDefaultFloatingFilter(t){return this.getDefaultFilter(t,!0)}createFilterComp(t,e,i,s,o,n){const r=()=>{const r=this.createFilterCompParams(t,o,n),l=s(r,o);return function(t,e,i,s){const o=e.filter;return Yi(o)&&(e={filter:o.component,filterParams:e.filterParams}),t.getCompDetails(e,us,s,i,!0)}(this.beans.userCompFactory,e,l,i)},l=r();return l?{compDetails:l,createFilterUi:t=>(t?r():l).newAgStackInstance()}:null}createFilterInstance(t,e,i,s){const o=this.beans.selectableFilter;o?.isSelectable(e)&&(e=o.getFilterDef(t,e));const{handler:n,handlerParams:r,handlerGenerator:l}=this.createHandler(t,e,i)??{},a=this.createFilterComp(t,e,i,s,!!n,"init");if(!a)return{compDetails:null,createFilterUi:null,handler:n,handlerGenerator:l,handlerParams:r};const{compDetails:h,createFilterUi:c}=a;return this.isGlobalButtons&&(h.params?.buttons?.length||pe(281,{colId:t.getColId()})),{compDetails:h,handler:n,handlerGenerator:l,handlerParams:r,createFilterUi:c}}createBaseFilterParams(t,e){const{filterManager:i,rowModel:s}=this.beans;return Qe(this.gos,{column:t,colDef:t.getColDef(),getValue:this.createGetValue(t),doesRowPassOtherFilter:e?()=>!0:e=>i?.doesRowPassOtherFilters(t.getColId(),e)??!0,rowModel:s})}createFilterCompParams(t,e,i,s){const o=this.filterChangedCallbackFactory(t),n=this.createBaseFilterParams(t,s);if(n.filterChangedCallback=o,n.filterModifiedCallback=s?()=>{}:e=>this.filterModified(t,e),e){const e=n,s=t.getColId(),r=fr(this.model,s);e.model=r,e.state=this.state.get(s)??{model:r},e.onModelChange=(e,i)=>{this.updateStoredModel(s,e),this.refreshHandlerAndUi(t,e,"ui",!1,i).then((()=>{o({...i,source:"columnFilter"})}))},e.onStateChange=e=>{this.updateState(t,e),this.updateOrRefreshFilterUi(t)},e.onAction=(e,i,s)=>{this.updateModel(t,e,i),this.dispatchLocalEvent({type:"filterAction",column:t,action:e,event:s})},e.getHandler=()=>this.getHandler(t,!0),e.onUiChange=e=>this.filterUiChanged(t,e),e.source=i}return n}createFilterUiForHandler(t,e){return e?{created:!1,create:e,filterParams:t.params,compDetails:t}:null}createFilterUiLegacy(t,e,i){const s=e(),o={created:!0,create:e,filterParams:t.params,compDetails:t,promise:s};return s.then(i),o}createFilterWrapper(t){const{compDetails:e,handler:i,handlerGenerator:s,handlerParams:o,createFilterUi:n}=this.createFilterInstance(t,t.getColDef(),this.getDefaultFilter(t),(t=>t)),r=t.getColId();if(i)return delete this.initialModel[r],i.init?.({...o,source:"init",model:fr(this.model,r)}),{column:t,isHandler:!0,handler:i,handlerGenerator:s,handlerParams:o,filterUi:this.createFilterUiForHandler(e,n)};if(n){const i={column:t,filterUi:null,isHandler:!1};return i.filterUi=this.createFilterUiLegacy(e,n,(t=>{i.filter=t??void 0})),i}return{column:t,filterUi:null,isHandler:!1}}createHandlerFunc(t,e,i){const{gos:s,frameworkOverrides:o,registry:n}=this.beans;let r;const l=s.get("enableFilterHandlers"),a=l?(t=>{const e=t.filter;if(Yi(e)){return e.handler||(r=e.doesFilterPass,r?()=>({doesFilterPass:r}):void 0)}return"string"==typeof e?e:void 0})(e):void 0,h=t=>()=>this.createBean(n.createDynamicBean(t,!0));let c,u;if("string"==typeof a){const t=s.get("filterHandlers")?.[a];null!=t?c=t:cr.has(a)&&(c=h(a),u=a)}else c=a;if(!c){let t;const{compName:s,jsComp:n,fwComp:r}=bs(o,e);s?t=s:null==n&&null==r&&!0===e.filter&&(t=i),u=this.handlerMap[t],u&&(c=h(u))}if(!c){if(!l)return;return Ce(s)&&pe(277,{colId:t.getColId()}),Cg}return{filterHandler:c,handlerNameOrCallback:r??u}}createHandler(t,e,i){const s=this.createHandlerFunc(t,e,i);if(!s)return;const o=ys(this.beans.userCompFactory,e,this.createFilterCompParams(t,!0,"init")),{handlerNameOrCallback:n,filterHandler:r}=s,{handler:l,handlerParams:a}=this.createHandlerFromFunc(t,r,o);return{handler:l,handlerParams:a,handlerGenerator:n??r}}createHandlerFromFunc(t,e,i){const s=t.getColDef();return{handler:e(Qe(this.gos,{column:t,colDef:s})),handlerParams:this.createHandlerParams(t,i)}}createHandlerParams(t,e){const i=t.getColDef(),s=t.getColId(),o=this.filterChangedCallbackFactory(t);return Qe(this.gos,{colDef:i,column:t,getValue:this.createGetValue(t),doesRowPassOtherFilter:t=>this.beans.filterManager?.doesRowPassOtherFilters(s,t)??!0,onModelChange:(e,i)=>{this.updateStoredModel(s,e),this.refreshHandlerAndUi(t,e,"handler",!1,i).then((()=>{o({...i,source:"columnFilter"})}))},filterParams:e})}onColumnsChanged(){const t=[],{colModel:e,filterManager:i,groupFilter:s}=this.beans;this.allColumnFilters.forEach(((i,s)=>{let o;o=i.column.isPrimary()?e.getColDefCol(s):e.getCol(s),o&&o===i.column||(t.push(i.column),this.disposeFilterWrapper(i,"columnChanged"),this.disposeColumnListener(s))}));const o=s&&t.every((t=>s.isGroupFilter(t)));t.length>0&&!o&&i?.onFilterChanged({columns:t,source:"api"})}isFilterAllowed(t){if(!t.isFilterAllowed())return!1;const e=this.beans.groupFilter;return!e?.isGroupFilter(t)||e.isFilterAllowed(t)}getFloatingFilterCompDetails(t,e){const{userCompFactory:i,frameworkOverrides:s,selectableFilter:o}=this.beans,n=t.getColDef(),r=o?.isSelectable(n)?o.getFilterDef(t,n):n,l=function(t,e,i){if(null==e)return null;let s=null;const{compName:o,jsComp:n,fwComp:r}=bs(t,e);return o?s={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[o]:null==n&&null==r&&!0===e.filter&&(s=i()),s}(s,r,(()=>this.getDefaultFloatingFilter(t)))??"agReadOnlyFloatingFilter",a=this.gos.get("enableFilterHandlers"),h=ys(i,r,this.createFilterCompParams(t,a,"init",!0)),c=Qe(this.gos,{column:t,filterParams:h,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(t),parentFilterInstance:e=>{const i=this.getOrCreateFilterUi(t);null!=i&&i.then((t=>{e(Ss(t))}))},showParentFilter:e});if(a){const e=c,i=t.getColId(),s=this.filterChangedCallbackFactory(t);e.onUiChange=e=>this.floatingFilterUiChanged(t,e),e.model=fr(this.model,i),e.onModelChange=(e,o)=>{this.updateStoredModel(i,e),this.refreshHandlerAndUi(t,e,"floating",!0,o).then((()=>{s({...o,source:"columnFilter"})}))},e.getHandler=()=>this.getHandler(t,!0),e.source="init"}return function(t,e,i,s){return t.getCompDetails(e,ds,s,i)}(i,n,c,l)}getCurrentFloatingFilterParentModel(t){return this.getModelFromFilterWrapper(this.cachedFilter(t)??{column:t})}destroyFilterUi(t,e,i,s){const o="paramsUpdated";if(t.isHandler){const n=e.getColId();delete this.initialModel[n],this.state.delete(n);const r=t.filterUi,l=this.createFilterUiForHandler(i,s);t.filterUi=l;const a=this.eventSvc;r?.created?r.promise.then((t=>{this.destroyBean(t),a.dispatchEvent({type:"filterDestroyed",source:o,column:e})})):a.dispatchEvent({type:"filterHandlerDestroyed",source:o,column:e})}else this.destroyFilter(e,o)}destroyFilter(t,e="api"){const i=t.getColId(),s=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialModel[i],s&&this.disposeFilterWrapper(s,e).then((e=>{e&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[t],source:"api"})}))}disposeColumnListener(t){const e=this.allColumnListeners.get(t);e&&(this.allColumnListeners.delete(t),e())}disposeFilterWrapper(t,e){let i=!1;const{column:s,isHandler:o,filterUi:n}=t,r=s.getColId();o&&(i=this.isHandlerActive(s),this.destroyBean(t.handler),delete this.model[r],this.state.delete(r));const l=()=>{this.setColFilterActive(s,!1,"filterDestroyed"),this.allColumnFilters.delete(r),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:e,column:s})};if(n){if(n.created)return n.promise.then((t=>(i=o?i:!!t?.isFilterActive(),this.destroyBean(t),l(),i)));l()}return Qi.resolve(i)}filterChangedCallbackFactory(t){return e=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:e,columns:[t],column:t,source:e?.source??"columnFilter"})}}filterParamsChanged(t,e="api"){const i=this.allColumnFilters.get(t);if(!i)return;const s=this.beans,o=i.column,n=o.getColDef(),r=o.isFilterAllowed(),l=this.getDefaultFilter(o),a=s.selectableFilter,h=a?.isSelectable(n)?a.getFilterDef(o,n):n,c=r?this.createHandlerFunc(o,h,this.getDefaultFilter(o)):void 0,u=!!c,d=i.isHandler;if(d!=u)return void this.destroyFilter(o,"paramsUpdated");const{compDetails:g,createFilterUi:p}=(r?this.createFilterComp(o,h,l,(t=>t),u,"colDef"):null)??{compDetails:null,createFilterUi:null},f=g?.params??ys(s.userCompFactory,h,this.createFilterCompParams(o,u,"colDef"));if(d){const s=c?.handlerNameOrCallback??c?.filterHandler,n=fr(this.model,t);if(i.handlerGenerator!=s){const r=i.handler,{handler:l,handlerParams:a}=this.createHandlerFromFunc(o,c.filterHandler,f);i.handler=l,i.handlerParams=a,i.handlerGenerator=s,delete this.model[t],l.init?.({...a,source:"init",model:null}),this.destroyBean(r),null!=n&&this.beans.filterManager?.onFilterChanged({columns:[o],source:e})}else{const t=this.createHandlerParams(o,g?.params);i.handlerParams=t,i.handler.refresh?.({...t,source:"colDef",model:n})}}!this.areFilterCompsDifferent(i.filterUi?.compDetails??null,g)&&i.filterUi&&g?(i.filterUi.filterParams=f,ur(i,d)?.then((t=>{!1===(!t?.refresh||t.refresh(f))?this.destroyFilterUi(i,o,g,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:o,params:f})}))):this.destroyFilterUi(i,o,g,p)}refreshHandlerAndUi(t,e,i,s,o){const n=this.cachedFilter(t);if(!n)return s&&this.getOrCreateFilterWrapper(t,!0),Qi.resolve();if(!n.isHandler)return Qi.resolve();const{filterUi:r,handler:l,handlerParams:a}=n;return function(t,e,i,s,o,n,l){return e.refresh?.({...i,model:s,source:n,additionalEventAttributes:l}),(()=>{if(r){const{created:t,filterParams:e}=r;if(t)return r.promise.then((t=>t?{filter:t,filterParams:e}:void 0));r.refreshed=!0}return Qi.resolve(void 0)})().then((t=>{if(t){const{filter:e,filterParams:i}=t;dr(e,i,s,o,n,l)}}))}(0,l,a,e,this.state.get(t.getColId())??{model:e},i,o)}setColumnFilterWrapper(t,e){const i=t.getColId();this.allColumnFilters.set(i,e),this.allColumnListeners.set(i,this.addManagedListeners(t,{colDefChanged:()=>this.filterParamsChanged(i)})[0])}areFilterCompsDifferent(t,e){if(!e||!t)return!0;const{componentClass:i}=t,{componentClass:s}=e;return!(i===s||i?.render&&s?.render&&i.render===s.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some((t=>t.getColDef().floatingFilter))}getFilterInstance(t){const e=this.beans.colModel.getColDefCol(t);if(!e)return Promise.resolve(void 0);const i=this.getOrCreateFilterUi(e);return i?new Promise((t=>{i.then((e=>{t(Ss(e))}))})):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach((({model:t,source:e})=>this.setModel(t,e))),this.modelUpdates=[],this.columnModelUpdates.forEach((({key:t,model:e,resolve:i})=>{this.setModelForColumn(t,e).then((()=>i()))})),this.columnModelUpdates=[]}getModelForColumn(t,e){if(e){const{state:e,model:i}=this,s=t.getColId(),o=e.get(s);return o?o.model??null:fr(i,s)}const i=this.cachedFilter(t);return i?this.getModelFromFilterWrapper(i):null}setModelForColumn(t,e){if(this.beans.dataTypeSvc?.isPendingInference){let i=()=>{};const s=new Promise((t=>{i=t}));return this.columnModelUpdates.push({key:t,model:e,resolve:i}),s}return new Promise((i=>{this.setModelForColumnLegacy(t,e).then((t=>i(t)))}))}getStateForColumn(t){return this.state.get(t)??{model:fr(this.model,t)}}setModelForColumnLegacy(t,e){const i=this.beans.colModel.getColDefCol(t),s=i?this.getOrCreateFilterWrapper(i,!0):null;return s?this.setModelOnFilterWrapper(s,e):Qi.resolve()}setColDefPropsForDataType(t,e,i){const s=t.filter,o=!0===s?this.getDefaultFilterFromDataType((()=>e.baseDataType)):s;if("string"!=typeof o)return;let n,r;const l=this.beans,{filterParams:a,filterValueGetter:h}=t;({filterParams:n,filterValueGetter:r}="agMultiColumnFilter"===o?l.multiFilter?.getParamsForDataType(a,h,e,i)??{}:function(t,e,i,s,o,n,r){let l=e,a=i;const h="agSetColumnFilter"===t;a||"object"!==s.baseDataType||h||(a=({column:t,node:e})=>o({column:t,node:e,value:n.valueSvc.getValue(t,e)}));const c=(0,(h?Tr:Mr)[s.baseDataType])({dataTypeDefinition:s,formatValue:o,t:r});return l="object"==typeof e?{...c,...e}:c,{filterParams:l,filterValueGetter:a}}(o,a,h,e,i,l,this.getLocaleTextFunc())),t.filterParams=n,r&&(t.filterValueGetter=r)}setColFilterActive(t,e,i,s){t.filterActive!==e&&(t.filterActive=e,t.dispatchColEvent("filterActiveChanged",i)),t.dispatchColEvent("filterChanged",i,s)}setModelOnFilterWrapper(t,e,i){return new Qi((s=>{if(t.isHandler){const o=t.column,n=o.getColId(),r=this.model[n];return this.updateStoredModel(n,e),i&&e===r?void s():void this.refreshHandlerAndUi(o,e,"api").then((()=>s()))}const o=ur(t);o?o.then((t=>{if("function"!=typeof t?.setModel)return pe(65),void s();(t.setModel(e)||Qi.resolve()).then((()=>s()))})):s()}))}updateStoredModel(t,e){i(e)?this.model[t]=e:delete this.model[t];const s=this.state.get(t);this.state.set(t,{model:e,state:s?.state})}filterModified(t,e){this.getOrCreateFilterUi(t)?.then((i=>{this.eventSvc.dispatchEvent({type:"filterModified",column:t,filterInstance:i,...e})}))}filterUiChanged(t,e){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:t,...e})}floatingFilterUiChanged(t,e){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:t,...e})}updateModel(t,e,i){const s=t.getColId(),o=this.cachedFilter(t),n=()=>o?.filterUi;pr(e,n,(()=>fr(this.model,s)),(()=>this.state.get(s)),(e=>this.updateState(t,e)),(t=>n()?.filterParams?.onModelChange(t,i)),o?.isHandler?o.handler.processModelToApply?.bind(o.handler):void 0)}updateAllModels(t,e){const i=[];this.allColumnFilters.forEach(((e,s)=>{const o=this.beans.colModel.getColDefCol(s);o&&pr(t,(()=>e.filterUi),(()=>fr(this.model,s)),(()=>this.state.get(s)),(t=>this.updateState(o,t)),(e=>{this.updateStoredModel(s,e),this.dispatchLocalEvent({type:"filterAction",column:o,action:t}),i.push(this.refreshHandlerAndUi(o,e,"ui"))}),e?.isHandler?e.handler.processModelToApply?.bind(e.handler):void 0)})),i.length&&Qi.all(i).then((()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:e,columns:[]})}))}updateOrRefreshFilterUi(t){const e=t.getColId();gr((()=>this.cachedFilter(t)?.filterUi),(()=>fr(this.model,e)),(()=>this.state.get(e)))}updateState(t,e){this.state.set(t.getColId(),e),this.dispatchLocalEvent({type:"filterStateChanged",column:t,state:e})}canApplyAll(){const{state:t,model:e,activeFilterComps:i}=this;for(const t of i)if("COLUMN_MENU"===t.source)return!1;let s=!1;for(const i of t.keys()){const o=t.get(i);if(!1===o.valid)return!1;(o.model??null)!==fr(e,i)&&(s=!0)}return s}hasUnappliedModel(t){const{model:e,state:i}=this;return(i.get(t)?.model??null)!==fr(e,t)}setGlobalButtons(t){this.isGlobalButtons=t,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:t})}shouldKeepStateOnDetach(t,e){if("newFiltersToolPanel"===e)return!0;const i=this.beans.filterPanelSvc;return!!i?.isActive&&!!i.getState(t.getColId())}destroy(){super.destroy(),this.allColumnFilters.forEach((t=>this.disposeFilterWrapper(t,"gridDestroyed"))),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}},class extends Dt{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(t){this.popupSvc=t.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(t,e,i,s){t&&!t.isColumn||this.showPopup(t,(s=>{this.popupSvc?.positionPopupUnderMouseEvent({column:t,type:i,mouseEvent:e,ePopup:s})}),i,e.target,Ye(this.gos),s)}showMenuAfterButtonClick(t,e,i,s){if(t&&!t.isColumn)return;let o=-1,n="left";const r=Ye(this.gos);!r&&this.gos.get("enableRtl")&&(o=1,n="right");const l=r?void 0:4*o,a=r?void 0:4;this.showPopup(t,(s=>{this.popupSvc?.positionPopupByComponent({type:i,eventSource:e,ePopup:s,nudgeX:l,nudgeY:a,alignSide:n,keepWithinBounds:!0,position:"under",column:t})}),i,e,r,s)}showPopup(t,e,i,s,o,n){const r=t?this.createBean(new Rr(t,"COLUMN_MENU")):void 0;if(this.activeMenu=r,!r?.hasFilter()||!t)return void fe(57);const l=mr({tag:"div",cls:"ag-menu"+(o?"":" ag-filter-menu"),role:"presentation"});let a;[this.tabListener]=this.addManagedElementListeners(l,{keydown:t=>this.trapFocusWithin(t,l)}),l.appendChild(r?.getGui());const h=Ye(this.gos)?void 0:s??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody,c=this.getLocaleTextFunc(),u=o&&"columnFilter"!==i?c("ariaLabelColumnMenu","Column Menu"):c("ariaLabelColumnFilter","Column Filter"),d=this.popupSvc?.addPopup({modal:!0,eChild:l,closeOnEsc:!0,closedCallback:e=>{ga(t,!1,"contextMenu");const o=e instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),o&&s&&Z(s)){const t=ko(s);t?.focus({preventScroll:!0})}r?.afterGuiDetached(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,t),n?.()},positionCallback:()=>e(l),anchorToElement:h,ariaLabel:u});d&&(this.hidePopup=a=d.hideFunc),r.afterInit().then((()=>{e(l),r.afterGuiAttached({container:i,hidePopup:a})})),ga(t,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,t)}trapFocusWithin(t,e){t.key!==Es||t.defaultPrevented||Fo(this.beans,e,!1,t.shiftKey)||(t.preventDefault(),Ro(e,t.shiftKey))}dispatchVisibleChangedEvent(t,e,i){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:t,switchingTab:!1,key:e,column:i??null,columnGroup:null})}isMenuEnabled(t){return t.isFilterAllowed()&&(t.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}}],dynamicBeans:{headerFilterCellCtrl:class extends la{constructor(){super(...arguments),this.iconCreated=!1}wireComp(t,e,i,s,o){this.comp=t;const n=Wi(this,this.beans.context,o);this.eButtonShowMainFilter=i,this.eFloatingFilterBody=s,this.setGui(e,n),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(n),this.setupLeft(n),this.setupHover(n),this.setupFocus(n),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(n),this.setupUi(),n.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(n);const r=()=>this.onColDefChanged(n);n.addManagedListeners(this.column,{colDefChanged:r}),n.addManagedEventListeners({filterSwitched:({column:t})=>{t===this.column&&r()}}),n.addDestroyFunc((()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()}))}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:t,beans:e}=this;return Qe(e.gos,{colDef:t.colDef,column:t,floatingFilter:!0})}setupActive(){const t=this.column.getColDef();this.active=!!t.filter&&!!t.floatingFilter}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const t=Ca("filter",this.beans,this.column);t&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(t))}setupFocus(t){t.createManagedBean(new Lr(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const t=this.getLocaleTextFunc();S(this.eButtonShowMainFilter,t("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(t){const{beans:e}=this;if(d(e)===this.eGui)return;const i=Fo(e,this.eGui,null,t.shiftKey);if(i)return e.headerNavigation?.scrollToColumn(this.column),t.preventDefault(),void i.focus();const s=this.findNextColumnWithFloatingFilter(t.shiftKey);s&&e.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:s},event:t})&&t.preventDefault()}findNextColumnWithFloatingFilter(t){const e=this.beans.visibleCols;let i=this.column;do{if(i=t?e.getColBefore(i):e.getColAfter(i),!i)break}while(!i.getColDef().filter||!i.getColDef().floatingFilter);return i}handleKeyDown(t){super.handleKeyDown(t);const e=this.getWrapperHasFocus();switch(t.key){case Ns:case Gs:case Os:case Bs:if(e)return;Gr(t);case As:e&&Ro(this.eGui)&&t.preventDefault();break;case Is:e||this.eGui.focus()}}onFocusIn(t){if(this.eGui.contains(t.relatedTarget))return;const e=!!t.relatedTarget&&!t.relatedTarget.classList.contains("ag-floating-filter"),i=!!t.relatedTarget&&N(t.relatedTarget,"ag-floating-filter");if(e&&i&&t.target===this.eGui){const t=this.lastFocusEvent;t&&t&&t.key===Es&&Ro(this.eGui,t.shiftKey)}this.focusThis()}setupHover(t){this.beans.colHover?.addHeaderFilterColumnHoverListener(t,this.comp,this.column,this.eGui)}setupLeft(t){const e=new oa(this.column,this.eGui,this.beans);t.createManagedBean(e)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!Ye(this.gos)}setupUserComp(){if(!this.active)return;const t=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,(()=>this.showParentFilter()));t&&this.setCompDetails(t)}setCompDetails(t){this.userCompDetails=t,this.comp.setCompDetails(t)}showParentFilter(){const t=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:t,containerType:"floatingFilter",positionBy:"button"})}setupSyncWithFilter(t){if(!this.active)return;const{beans:{colFilter:e},column:i,gos:s}=this,o=t=>{if(!("filterDestroyed"!==t?.source||this.isAlive()&&e?.isAlive()))return;const o=this.comp.getFloatingFilterComp();o&&o.then((o=>{if(o){if(s.get("enableFilterHandlers")){const e=t;let i="filter";return e?.afterFloatingFilter?i="ui":e?.afterDataChange?i="dataChanged":"api"===t?.source&&(i="api"),void this.updateFloatingFilterParams(this.userCompDetails,i)}const n=e?.getCurrentFloatingFilterParentModel(i),r=t?{...t,columns:t.columns??[],source:"api"===t.source?"api":"columnFilter"}:null;o.onParentModelChanged(n,r)}}))};[this.destroySyncListener]=t.addManagedListeners(i,{filterChanged:o}),e?.isFilterActive(i)&&o(null)}setupWidth(t){const e=()=>{const t=`${this.column.getActualWidth()}px`;this.comp.setWidth(t)};t.addManagedListeners(this.column,{widthChanged:e}),e()}setupFilterChangedListener(t){this.active&&([this.destroyFilterChangedListener]=t.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){const t=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(t),this.highlightFilterButtonWhenActive&&t&&this.eButtonShowMainFilter.classList.toggle("ag-filter-active",this.column.isFilterActive())}}onColDefChanged(t){const e=this.active;this.setupActive();const i=!e&&this.active;e&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const s=this.beans.colFilter,o=this.active?s?.getFloatingFilterCompDetails(this.column,(()=>this.showParentFilter())):null,n=this.comp.getFloatingFilterComp();n&&o?n.then((e=>{!e||s?.areFilterCompsDifferent(this.userCompDetails??null,o)?this.updateCompDetails(t,o,i):this.updateFloatingFilterParams(o,"colDef")})):this.updateCompDetails(t,o,i)}updateCompDetails(t,e,i){this.isAlive()&&(this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),i&&(this.setupSyncWithFilter(t),this.setupFilterChangedListener(t)))}updateFloatingFilterParams(t,e){if(!t)return;let i=t.params;this.comp.getFloatingFilterComp()?.then((t=>{"function"==typeof t?.refresh&&(this.gos.get("enableFilterHandlers")&&(i={...i,model:fr(this.beans.colFilter?.model??{},this.column.getColId()),source:e}),t.refresh(i))}))}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}}},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:function(t){const e=t.filterManager;return!!e?.isColumnFilterPresent()||!!e?.isAggregateFilterPresent()},getColumnFilterInstance:function(t,e){return t.filterManager?.getColumnFilterInstance(e)??Promise.resolve(void 0)},destroyFilter:function(t,e){const i=t.colModel.getColDefCol(e);if(i)return t.colFilter?.destroyFilter(i,"api")},setFilterModel:function(t,e){t.frameworkOverrides.wrapIncoming((()=>t.filterManager?.setFilterModel(e)))},getFilterModel:function(t){return t.filterManager?.getFilterModel()??{}},getColumnFilterModel:function(t,e,i){const{gos:s,colModel:o,colFilter:n}=t;i&&!s.get("enableFilterHandlers")&&(pe(288),i=!1);const r=o.getColDefCol(e);return r?n?.getModelForColumn(r,i)??null:null},setColumnFilterModel:function(t,e,i){return t.filterManager?.setColumnFilterModel(e,i)??Promise.resolve()},showColumnFilter:function(t,e){const i=t.colModel.getCol(e);i?t.menuSvc?.showFilterMenu({column:i,containerType:"columnFilter",positionBy:"auto"}):fe(12,{colKey:e})},hideColumnFilter:function(t){t.menuSvc?.hideFilterMenu()},getColumnFilterHandler:function(t,e){const i=t.colModel.getCol(e);if(i)return t.colFilter?.getHandler(i,!0);fe(12,{colKey:e})},doFilterAction:function(t,e){const{colModel:i,colFilter:s,gos:o}=t;if(!o.get("enableFilterHandlers"))return void pe(287);const{colId:n,action:r}=e;if(n){const t=i.getColById(n);t&&s?.updateModel(t,r)}else s?.updateAllModels(r)}},dependsOn:[sp,vg,op,wg]},rp={moduleName:"CustomFilter",version:se,userComponents:{agReadOnlyFloatingFilter:class extends _i{constructor(){super(bg,[Go]),this.eFloatingFilterText=Ui}init(t){this.params=t;const e=this.beans.colNames.getDisplayNameForColumn(t.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${e} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){const e=t,i=e.getHandler();if(i.getModelAsString){const t=i.getModelAsString(e.model);this.eFloatingFilterText.setValue(t)}}}onParentModelChanged(t){null!=t?this.params.parentFilterInstance((e=>{if(e.getModelAsString){const i=e.getModelAsString(t);this.eFloatingFilterText.setValue(i)}})):this.eFloatingFilterText.setValue("")}refresh(t){this.init(t)}}},dependsOn:[np]},lp={moduleName:"TextFilter",version:se,dependsOn:[np],userComponents:{agTextColumnFilter:{classImp:class extends Fg{constructor(){super("textFilter",qg,Qg),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(t){const e=this.getConditionType(t),i={filterType:this.filterType,type:e},s=this.getValues(t);return s.length>0&&(i.filter=s[0]),s.length>1&&(i.filterTo=s[1]),i}areSimpleModelsEqual(t,e){return t.filter===e.filter&&t.filterTo===e.filterTo&&t.type===e.type}getInputs(t){const{eValuesFrom:e,eValuesTo:i}=this;return t>=e.length?[null,null]:[e[t],i[t]]}getValues(t){const i=[];return this.forEachPositionInput(t,((t,s,o,n)=>{s<n&&i.push(e(t.getValue()))})),i}createEValue(){const t=mr({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:e,eValuesTo:i}=this;return this.createFromToElement(t,e,"from"),this.createFromToElement(t,i,"to"),t}createFromToElement(t,e,i){const s=this.createManagedBean(new Bo);s.addCss(`ag-filter-${i}`),s.addCss("ag-filter-filter"),e.push(s),t.appendChild(s.getGui())}removeEValues(t,e){const i=i=>this.removeComponents(i,t,e),{eValuesFrom:s,eValuesTo:o}=this;i(s),i(o)}},params:{useForm:!0}},agTextColumnFloatingFilter:class extends _g{constructor(){super(...arguments),this.FilterModelFormatterClass=Jg,this.filterType="text",this.defaultOptions=Qg}createFloatingFilterInputService(){return this.createManagedBean(new jg)}}},dynamicBeans:{agTextColumnFilterHandler:class extends Tg{constructor(){super(qg,Qg),this.filterType="text",this.FilterModelFormatterClass=Jg}updateParams(t){super.updateParams(t);const e=t.filterParams;this.matcher=e.textMatcher??Xg,this.formatter=e.textFormatter??(e.caseSensitive?tp:ep)}evaluateNullValue(t){return!!t&&["notEqual","notContains","blank"].indexOf(t)>=0}evaluateNonNullValue(t,e,i,s){const o=t.map((t=>this.formatter(t)))||[],n=this.formatter(e),{api:r,colDef:l,column:a,context:h,filterParams:{textFormatter:c}}=this.params;if("blank"===i.type)return xg(e);if("notBlank"===i.type)return!xg(e);const u={api:r,colDef:l,column:a,context:h,node:s.node,data:s.data,filterOption:i.type,value:n,textFormatter:c};return o.some((t=>this.matcher({...u,filterText:t})))}processModelToApply(t){if(t&&this.params.filterParams.trimInput){const e=t=>{const e={...t},{filter:i,filterTo:s}=t;return i&&(e.filter=Kg(i)??null),s&&(e.filterTo=Kg(s)??null),e};return $r(t)?{...t,conditions:t.conditions.map(e)}:e(t)}return t}}}},ap={moduleName:"NumberFilter",version:se,dependsOn:[np],userComponents:{agNumberColumnFilter:{classImp:class extends Fg{constructor(){super("numberFilter",Wg,Lg),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}setElementValue(t,e,i){const{numberFormatter:s}=this.params,o=!i&&s?s(e??null):e;super.setElementValue(t,o)}createEValue(){const t=zg(this.params),e=mr({tag:"div",cls:"ag-filter-body",role:"presentation"});return this.createFromToElement(e,this.eValuesFrom,"from",t),this.createFromToElement(e,this.eValuesTo,"to",t),e}createFromToElement(t,e,i,s){const o=this.createManagedBean(s?new Bo({allowedCharPattern:s}):new Lo);o.addCss(`ag-filter-${i}`),o.addCss("ag-filter-filter"),e.push(o),t.appendChild(o.getGui())}removeEValues(t,e){const i=i=>this.removeComponents(i,t,e);i(this.eValuesFrom),i(this.eValuesTo)}getValues(t){const e=[];return this.forEachPositionInput(t,((t,i,s,o)=>{i<o&&e.push($g(this.stringToFloat(t.getValue())))})),e}areSimpleModelsEqual(t,e){return t.filter===e.filter&&t.filterTo===e.filterTo&&t.type===e.type}stringToFloat(t){if("number"==typeof t)return t;let i=e(t);null!=i&&""===i.trim()&&(i=null);const s=this.params.numberParser;return s?s(i):null==i||"-"===i.trim()?null:Number.parseFloat(i)}createCondition(t){const e=this.getConditionType(t),i={filterType:this.filterType,type:e},s=this.getValues(t);return s.length>0&&(i.filter=s[0]),s.length>1&&(i.filterTo=s[1]),i}getInputs(t){const{eValuesFrom:e,eValuesTo:i}=this;return t>=e.length?[null,null]:[e[t],i[t]]}hasInvalidInputs(){let t=!1;return this.forEachInput((e=>{e.getInputElement().validity.valid||(t=!0)})),t}},params:{useForm:!0}},agNumberColumnFloatingFilter:class extends _g{constructor(){super(...arguments),this.FilterModelFormatterClass=Ug,this.filterType="number",this.defaultOptions=Lg}updateParams(t){zg(t.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(t),super.updateParams(t)}createFloatingFilterInputService(t){return this.allowedCharPattern=zg(t.filterParams),this.createManagedBean(this.allowedCharPattern?new jg({config:{allowedCharPattern:this.allowedCharPattern}}):new Yg)}convertValue(t){return t?Number(t):null}}},dynamicBeans:{agNumberColumnFilterHandler:class extends Eg{constructor(){super(Wg,Lg),this.filterType="number",this.FilterModelFormatterClass=Ug}comparator(){return(t,e)=>t===e?0:t<e?1:-1}isValid(t){return!isNaN(t)}}}},hp={moduleName:"DateFilter",version:se,dependsOn:[np],userComponents:{agDateColumnFilter:{classImp:class extends Fg{constructor(){super("dateFilter",Dg,Pg),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=1e3,this.maxValidYear=Mg,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(t){super.afterGuiAttached(t),this.dateConditionFromComps[0].afterGuiAttached(t)}commonUpdateSimpleParams(t){super.commonUpdateSimpleParams(t);const e=(e,i)=>{const s=t[e];if(null!=s){if(!isNaN(s))return null==s?i:Number(s);pe(82,{param:e})}return i},i=e("minValidYear",1e3),s=e("maxValidYear",Mg);this.minValidYear=i,this.maxValidYear=s,i>s&&pe(83);const{minValidDate:o,maxValidDate:n}=t,r=o instanceof Date?o:mo(o);this.minValidDate=r;const l=n instanceof Date?n:mo(n);this.maxValidDate=l,r&&l&&r>l&&pe(84)}createDateCompWrapper(t){const{beans:{userCompFactory:e,context:i,gos:s},params:o}=this,n=new kg(i,e,o.colDef,Qe(s,{onDateChanged:()=>this.onUiChanged(),filterParams:o,location:"filter"}),t);return this.addDestroyFunc((()=>n.destroy())),n}setElementValue(t,e){t.setDate(e)}setElementDisplayed(t,e){t.setDisplayed(e)}setElementDisabled(t,e){t.setDisabled(e)}createEValue(){const t=mr({tag:"div",cls:"ag-filter-body"});return this.createFromToElement(t,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(t,this.eConditionPanelsTo,this.dateConditionToComps,"to"),t}createFromToElement(t,e,i,s){const o=mr({tag:"div",cls:`ag-filter-${s} ag-filter-date-${s}`});e.push(o),t.appendChild(o),i.push(this.createDateCompWrapper(o))}removeEValues(t,e){this.removeDateComps(this.dateConditionFromComps,t,e),this.removeDateComps(this.dateConditionToComps,t,e),Sg(this.eConditionPanelsFrom,t,e),Sg(this.eConditionPanelsTo,t,e)}removeDateComps(t,e,i){const s=Sg(t,e,i);for(const t of s)t.destroy()}isValidDateValue(t){if(null===t)return!1;const{minValidDate:e,maxValidDate:i,minValidYear:s,maxValidYear:o}=this;if(e){if(t<e)return!1}else if(t.getUTCFullYear()<s)return!1;if(i){if(t>i)return!1}else if(t.getUTCFullYear()>o)return!1;return!0}isConditionUiComplete(t){if(!super.isConditionUiComplete(t))return!1;let e=!0;return this.forEachInput(((i,s,o,n)=>{o!==t||!e||s>=n||(e=e&&this.isValidDateValue(i.getDate()))})),e}areSimpleModelsEqual(t,e){return t.dateFrom===e.dateFrom&&t.dateTo===e.dateTo&&t.type===e.type}createCondition(t){const e=this.getConditionType(t),i={},s=this.getValues(t),o=this.params.useIsoSeparator?"T":" ";return s.length>0&&(i.dateFrom=ao(s[0],!0,o)),s.length>1&&(i.dateTo=ao(s[1],!0,o)),{dateFrom:null,dateTo:null,filterType:this.filterType,type:e,...i}}resetPlaceholder(){const t=this.getLocaleTextFunc(),e=this.translate("dateFormatOoo"),i=t("ariaFilterValue","Filter Value");this.forEachInput((t=>{t.setInputPlaceholder(e),t.setInputAriaLabel(i)}))}getInputs(t){const{dateConditionFromComps:e,dateConditionToComps:i}=this;return t>=e.length?[null,null]:[e[t],i[t]]}getValues(t){const e=[];return this.forEachPositionInput(t,((t,i,s,o)=>{i<o&&e.push(t.getDate())})),e}translate(t){return super.translate("lessThan"===t?"before":"greaterThan"===t?"after":t)}},params:{useForm:!0}},agDateInput:class extends _i{constructor(){super(Vg,[Go]),this.eDateInput=Ui,this.isApply=!1,this.applyOnFocusOut=!1}init(t){this.params=t,this.setParams(t);const e=this.eDateInput.getInputElement();this.addManagedListeners(e,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||e.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this)})}handleInput(t){if(!this.eDateInput.isDisabled())return this.isApply?(this.applyOnFocusOut=!t,void(t&&this.params.onDateChanged())):void(t||this.params.onDateChanged())}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}setParams(t){const e=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(t);this.usingSafariDatePicker=i&&Js();const{minValidYear:s,maxValidYear:o,minValidDate:n,maxValidDate:r,buttons:l,includeTime:a,colDef:h}=t.filterParams||{},c=this.beans.dataTypeSvc,u=a??c?.getDateIncludesTimeFlag?.(h.cellDataType)??!1;if(i?u?(e.type="datetime-local",e.step="1"):e.type="date":e.type="text",n&&s&&pe(85),r&&o&&pe(86),n&&r){const[t,e]=[n,r].map((t=>t instanceof Date?t:mo(t)));t&&e&&t.getTime()>e.getTime()&&pe(87)}n?e.min=n instanceof Date?po(n):n:s&&(e.min=`${s}-01-01`),r?e.max=r instanceof Date?po(r):r:o&&(e.max=`${o}-12-31`),this.isApply="floatingFilter"===t.location&&!!l?.includes("apply")}refresh(t){this.params=t,this.setParams(t)}getDate(){return mo(this.eDateInput.getValue())}setDate(t){const e=this.params.filterParams.colDef.cellDataType,i=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(e)??!1;this.eDateInput.setValue(ao(t,i))}setInputPlaceholder(t){this.eDateInput.setInputPlaceholder(t)}setInputAriaLabel(t){this.eDateInput.setAriaLabel(t)}setDisabled(t){this.eDateInput.setDisabled(t)}afterGuiAttached(t){t?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(t){return t?.filterParams?.browserDatePicker??!0}},agDateColumnFloatingFilter:class extends Bg{constructor(){super(Gg,[Go]),this.eReadOnlyText=Ui,this.eDateWrapper=Ui,this.FilterModelFormatterClass=Og,this.filterType="date",this.defaultOptions=Pg}setParams(t){super.setParams(t),this.createDateComponent();const e=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(e("ariaDateFilterInput","Date Filter Input"))}updateParams(t){super.updateParams(t),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(t.currentParentModel())}updateCompOnModelChange(t){const e=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(t);if(this.setEditable(e),e){const e=t?mo(t.dateFrom):null;this.dateComp.setDate(e),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(t)),this.dateComp.setDate(null)}setEditable(t){H(this.eDateWrapper,t),H(this.eReadOnlyText.getGui(),!t)}onModelUpdated(t){super.setLastTypeFromModel(t),this.updateCompOnModelChange(t)}onDateChanged(){const t=this.dateComp.getDate();if(this.reactive){const e=this.params;e.onUiChange();const i=e.model,s=ao(t),o=null==s?null:{...i??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:s};e.onModelChange(o,{afterFloatingFilter:!0})}else this.params.parentFilterInstance((e=>{e?.onFloatingFilterChanged(this.lastType||null,t)}))}getDateComponentParams(){const{filterParams:t}=this.params,e=br(t,this.defaultDebounceMs);return Qe(this.gos,{onDateChanged:Ht(this,this.onDateChanged.bind(this),e),filterParams:t,location:"floatingFilter"})}createDateComponent(){const{beans:{context:t,userCompFactory:e},eDateWrapper:i,params:s}=this;this.dateComp=new kg(t,e,s.column.getColDef(),this.getDateComponentParams(),i,(t=>{t.setInputAriaLabel(this.getAriaLabel(s))})),this.addDestroyFunc((()=>this.dateComp.destroy()))}}},dynamicBeans:{agDateColumnFilterHandler:class extends Eg{constructor(){super(Dg,Pg),this.filterType="date",this.FilterModelFormatterClass=Og}comparator(){return this.params.filterParams.comparator??Ng}isValid(t){const e=this.params.filterParams.isValidDate;return!e||e(t)}}}},cp={moduleName:"QuickFilter",version:se,apiFunctions:{isQuickFilterPresent:function(t){return!!t.quickFilter?.isFilterPresent()},getQuickFilter:function(t){return t.quickFilter?.getText()},resetQuickFilter:function(t){t.quickFilter?.resetCache()}},dependsOn:[{moduleName:"QuickFilterCore",version:se,rowModels:["clientSide"],beans:[class extends Dt{constructor(){super(...arguments),this.beanName="quickFilter",this.quickFilter=null,this.quickFilterParts=null}postConstruct(){const t=this.resetCache.bind(this),e=this.gos;this.addManagedEventListeners({columnPivotModeChanged:t,newColumnsLoaded:t,columnRowGroupChanged:t,columnVisible:()=>{e.get("includeHiddenColumnsInQuickFilter")||this.resetCache()}}),this.addManagedPropertyListener("quickFilterText",(t=>this.setFilter(t.currentValue))),this.addManagedPropertyListeners(["includeHiddenColumnsInQuickFilter","applyQuickFilterBeforePivotOrAgg"],(()=>this.onColumnConfigChanged())),this.quickFilter=this.parseFilter(e.get("quickFilterText")),this.parser=e.get("quickFilterParser"),this.matcher=e.get("quickFilterMatcher"),this.setFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],(()=>this.setParserAndMatcher()))}refreshCols(){const{autoColSvc:t,colModel:e,gos:i,pivotResultCols:s}=this.beans,o=e.isPivotMode(),n=t?.getColumns(),r=e.getColDefCols();let l=(o&&!i.get("applyQuickFilterBeforePivotOrAgg")?s?.getPivotResultCols()?.list:r)??[];n&&(l=l.concat(n)),this.colsToUse=i.get("includeHiddenColumnsInQuickFilter")?l:l.filter((t=>t.isVisible()||t.isRowGroupActive()))}isFilterPresent(){return null!==this.quickFilter}doesRowPass(t){const e=this.gos.get("cacheQuickFilter");return this.matcher?this.doesRowPassMatcher(e,t):this.quickFilterParts.every((i=>e?this.doesRowPassCache(t,i):this.doesRowPassNoCache(t,i)))}resetCache(){this.beans.rowModel.forEachNode((t=>t.quickFilterAggregateText=null))}getText(){return this.gos.get("quickFilterText")}setFilterParts(){const{quickFilter:t,parser:e}=this;this.quickFilterParts=t?e?e(t):t.split(" "):null}parseFilter(t){return i(t)?t.toUpperCase():null}setFilter(t){if(null!=t&&"string"!=typeof t)return void pe(70,{newFilter:t});const e=this.parseFilter(t);this.quickFilter!==e&&(this.quickFilter=e,this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}setParserAndMatcher(){const t=this.gos.get("quickFilterParser"),e=this.gos.get("quickFilterMatcher"),i=t!==this.parser||e!==this.matcher;this.parser=t,this.matcher=e,i&&(this.setFilterParts(),this.dispatchLocalEvent({type:"quickFilterChanged"}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:"quickFilterChanged"})}doesRowPassNoCache(t,e){return this.colsToUse.some((s=>{const o=this.getTextForColumn(s,t);return i(o)&&o.includes(e)}))}doesRowPassCache(t,e){return this.checkGenerateAggText(t),t.quickFilterAggregateText.includes(e)}doesRowPassMatcher(t,e){let i;t?(this.checkGenerateAggText(e),i=e.quickFilterAggregateText):i=this.getAggText(e);const{quickFilterParts:s,matcher:o}=this;return o(s,i)}checkGenerateAggText(t){t.quickFilterAggregateText||(t.quickFilterAggregateText=this.getAggText(t))}getTextForColumn(t,e){let s=this.beans.filterValueSvc.getValue(t,e);const o=t.getColDef();if(o.getQuickFilterText){const i=Qe(this.gos,{value:s,node:e,data:e.data,column:t,colDef:o});s=o.getQuickFilterText(i)}return i(s)?s.toString().toUpperCase():null}getAggText(t){const e=[];for(const s of this.colsToUse){const o=this.getTextForColumn(s,t);i(o)&&e.push(o)}return e.join("\n")}}],dependsOn:[sp,op]}]},up={moduleName:"ExternalFilter",version:se,dependsOn:[sp]},dp=(t,e,i)=>{const{editModelSvc:s}=t,o=s?.getCellValidationModel()?.getCellValidation(e)?.errorMessages,n=s?.getRowValidationModel().getRowValidation(e)?.errorMessages,r=o||n;return r?.length?r.join(i("tooltipValidationErrorSeparator",". ")):void 0},gp={moduleName:"Tooltip",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(t,e,i,s){t&&e.destroyBean(t);const o=this.gos,n=eg(o),{column:r,eGui:l}=e,a=r.getColDef();s||!n||a.headerComponent||(s=X((()=>l.querySelector(".ag-header-cell-text"))));const h="header",c=this.beans.colNames.getDisplayNameForColumn(r,"header",!0),u=i??c;let d=this.createTooltipFeature({getGui:()=>l,getLocation:()=>h,getTooltipValue:()=>i??a?.headerTooltipValueGetter?.(Qe(o,{location:h,colDef:a,column:r,value:u,valueFormatted:c}))??a?.headerTooltip,shouldDisplayTooltip:s,getAdditionalParams:()=>({column:r,colDef:r.getColDef()})});return d&&(d=e.createBean(d),e.setRefreshFunction("tooltip",(()=>d.refreshTooltip()))),d}setupHeaderGroupTooltip(t,e,i,s){t&&e.destroyBean(t);const o=this.gos,n=eg(o),{column:r,eGui:l}=e,a=r.getColGroupDef();s||!n||a?.headerGroupComponent||(s=X((()=>l.querySelector(".ag-header-group-text"))));const h="headerGroup",c=this.beans.colNames.getDisplayNameForColumnGroup(r,"header"),u=i??c,d=this.createTooltipFeature({getGui:()=>l,getLocation:()=>h,getTooltipValue:()=>i??a?.headerTooltipValueGetter?.(Qe(o,{location:h,colDef:a,column:r,value:u,valueFormatted:c}))??a?.headerTooltip,shouldDisplayTooltip:s,getAdditionalParams:()=>{const t={column:r};return a&&(t.colDef=a),t}});return d?e.createBean(d):d}enableCellTooltipFeature(t,e,s){const{beans:o}=this,{gos:n,editSvc:r}=o,{column:l,rowNode:a}=t;let h="cell";const c=eg(n);return s||(s=c&&!t.isCellRenderer()?()=>{const e=!!r?.isEditing(t);if(!e&&dp(o,t,this.getLocaleTextFunc()))return!0;if(!l.isTooltipEnabled())return!1;const i=X((()=>{const e=t.eGui;return 0===e.children.length?e:e.querySelector(".ag-cell-value")}));return!e&&i()}:()=>!r?.isEditing(t)),this.createTooltipFeature({getGui:()=>t.eGui,getLocation:()=>h,getTooltipValue:null!=e?()=>e:()=>{const e=!r?.isEditing(t)&&dp(o,t,this.getLocaleTextFunc());if(e)return h="cellEditor",e;h="cell";const s=l.getColDef(),c=a.data;if(s.tooltipField&&i(c))return wc(c,s.tooltipField,l.isTooltipFieldContainsDots());const u=s.tooltipValueGetter;return u?u(Qe(n,{location:"cell",colDef:l.getColDef(),column:l,rowIndex:t.cellPosition.rowIndex,node:a,data:a.data,value:t.value,valueFormatted:t.valueFormatted})):null},shouldDisplayTooltip:s,getAdditionalParams:()=>({column:l,colDef:l.getColDef(),rowIndex:t.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:t.valueFormatted})},o)}setupFullWidthRowTooltip(t,e,i,s){const o={getGui:()=>e.getFullWidthElement(),getTooltipValue:()=>i,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:s},n=this.beans,r=n.context;t&&e.destroyBean(t,r);const l=this.createTooltipFeature(o,n);if(l)return e.createBean(l,r)}setupCellEditorTooltip(t,e){const{beans:i}=this,{context:s}=i,o=e.getValidationElement?.(!0)||!e.isPopup?.()&&t.eGui;if(!o)return;const n=this.createTooltipFeature({getGui:()=>o,getTooltipValue:()=>dp(i,t,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{const{editModelSvc:t}=i,e=t?.getRowValidationModel()?.getRowValidationMap(),s=t?.getCellValidationModel()?.getCellValidationMap();return!!e&&e.size>0||!!s&&s.size>0}},i);return n?t.createBean(n,s):void 0}initCol(t){const{colDef:e}=t;t.tooltipEnabled=i(e.tooltipField)||i(e.tooltipValueGetter)||i(e.tooltipComponent)}createTooltipFeature(t,e){return this.beans.registry.createDynamicBean("tooltipFeature",!1,t,e)}}],dynamicBeans:{tooltipFeature:Vn,highlightTooltipFeature:class extends Vn{constructor(t,e,i){super(t,i),this.highlightTracker=e,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",(({currentValue:t})=>{this.setTooltipMode(t)})),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(t){1===this.tooltipMode&&(t.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(t="focus"){this.tooltipMode="focus"===t?1:0}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},tooltipStateManager:class extends zn{createTooltipComp(t,e){const i=function(t,e){return t.getCompDetails(e.colDef,cs,"agTooltipComponent",e,!0)}(this.beans.userCompFactory,t);i?.newAgStackInstance().then(e)}setEventHandlers(t){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:t})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}}},userComponents:{agTooltipComponent:class extends Qs{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(t){const{value:e}=t,i=this.getGui();i.textContent=h(e);const s=t.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();i.classList.add(`ag-${s}-tooltip`)}}},dependsOn:[vg],css:[".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}"]},pp=class{constructor(t){this.cellValueChanges=t}},fp=class extends pp{constructor(t,e,i,s){super(t),this.initialRange=e,this.finalRange=i,this.ranges=s}},mp=class{constructor(t){this.actionStack=[],this.maxStackSize=t||10,this.actionStack=new Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(t){t.cellValueChanges&&t.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(t))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},wp={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},vp=class extends fa{constructor(t){super(),this.cellEditorInput=t,this.eEditor=Ui}initialiseEditor(t){const{cellEditorInput:e}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[e.getTemplate()]},e.getAgComponents());const{eEditor:i}=this,{cellStartedEdit:s,eventKey:o,suppressPreventDefault:n}=t;let r;i.getInputElement().setAttribute("title",""),e.init(i,t);let l=!0;s?(this.focusAfterAttached=!0,o===Ts||o===Vs?r="":o&&1===o.length?n?l=!1:r=o:(r=e.getStartValue(),o!==Ls&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,r=e.getStartValue()),l&&null!=r&&i.setStartValue(r),this.addGuiEventListener("keydown",(t=>{const{key:e}=t;e!==zs&&e!==$s||t.preventDefault()}))}afterGuiAttached(){const t=this.getLocaleTextFunc(),e=this.eEditor;if(e.setInputAriaLabel(t("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;Js()||e.getFocusableElement().focus();const i=e.getInputElement();this.highlightAllOnFocus?i.select():this.cellEditorInput.setCaret?.()}focusIn(){const{eEditor:t}=this,e=t.getFocusableElement(),i=t.getInputElement();e.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},Cp={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},bp=class{constructor(t,e){this.getDataTypeService=t,this.getLocaleTextFunc=e}getTemplate(){return Cp}getAgComponents(){return[$o]}init(t,e){this.eEditor=t,this.params=e;const{min:i,max:s,step:o,colDef:n}=e;null!=i&&t.setMin(i),null!=s&&t.setMax(s),null!=o&&t.setStep(o),this.includeTime=e.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),null!=this.includeTime&&t.setIncludeTime(this.includeTime)}getValidationErrors(){const t=this.eEditor.getInputElement().valueAsDate,{params:e}=this,{min:i,max:s,getValidationErrors:o}=e;let n=[];const r=this.getLocaleTextFunc();if(t instanceof Date&&!isNaN(t.getTime())){if(i){const e=i instanceof Date?i:new Date(i);if(t<e){const t=e.toLocaleDateString();n.push(r("minDateValidation",`Date must be after ${t}`,[t]))}}if(s){const e=s instanceof Date?s:new Date(s);if(t>e){const t=e.toLocaleDateString();n.push(r("maxDateValidation",`Date must be before ${t}`,[t]))}}}return n.length||(n=null),o?o({value:t,cellEditorParams:e,internalErrors:n}):n}getValue(){const{eEditor:t,params:e}=this,s=t.getDate();return i(s)||i(e.value)?s??null:e.value}getStartValue(){const{value:t}=this.params;if(t instanceof Date)return ao(t,this.includeTime??!1)}},yp={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},Sp=class{constructor(t,e){this.getDataTypeService=t,this.getLocaleTextFunc=e}getTemplate(){return yp}getAgComponents(){return[$o]}init(t,e){this.eEditor=t,this.params=e;const{min:i,max:s,step:o,colDef:n}=e;null!=i&&t.setMin(i),null!=s&&t.setMax(s),null!=o&&t.setStep(o),this.includeTime=e.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(n.cellDataType),null!=this.includeTime&&t.setIncludeTime(this.includeTime)}getValidationErrors(){const{eEditor:t,params:e}=this,i=t.getInputElement().value,s=this.formatDate(this.parseDate(i??void 0)),{min:o,max:n,getValidationErrors:r}=e;let l=[];if(s){const t=new Date(s),e=this.getLocaleTextFunc();if(o){const i=new Date(o);if(t<i){const t=i.toLocaleDateString();l.push(e("minDateValidation",`Date must be after ${t}`,[t]))}}if(n){const i=new Date(n);if(t>i){const t=i.toLocaleDateString();l.push(e("maxDateValidation",`Date must be before ${t}`,[t]))}}}return l.length||(l=null),r?r({value:this.getValue(),cellEditorParams:e,internalErrors:l}):l}getValue(){const{params:t,eEditor:e}=this,s=this.formatDate(e.getDate());return i(s)||i(t.value)?t.parseValue(s??""):t.value}getStartValue(){return ao(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(t){const e=this.getDataTypeService();return e?e.getDateParserFunction(this.params.column)(t):mo(t)??void 0}formatDate(t){const e=this.getDataTypeService();return e?e.getDateFormatterFunction(this.params.column)(t):ao(t??null,this.includeTime??!1)??void 0}},xp={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},Rp={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},Fp=class{constructor(t){this.getLocaleTextFunc=t}getTemplate(){return Rp}getAgComponents(){return[zo]}init(t,e){this.eEditor=t,this.params=e;const{max:i,min:s,precision:o,step:n}=e;null!=i&&t.setMax(i),null!=s&&t.setMin(s),null!=o&&t.setPrecision(o),null!=n&&t.setStep(n);const r=t.getInputElement();e.preventStepping?t.addManagedElementListeners(r,{keydown:this.preventStepping}):e.showStepperButtons&&r.classList.add("ag-number-field-input-stepper")}getValidationErrors(){const{params:t}=this,{min:e,max:i,getValidationErrors:s}=t,o=this.eEditor.getInputElement().valueAsNumber,n=this.getLocaleTextFunc();let r=[];return"number"==typeof o&&(null!=e&&o<e&&r.push(n("minValueValidation",`Must be greater than or equal to ${e}.`,[String(e)])),null!=i&&o>i&&r.push(n("maxValueValidation",`Must be less than or equal to ${i}.`,[String(i)]))),r.length||(r=null),s?s({value:o,cellEditorParams:t,internalErrors:r}):r}preventStepping(t){t.key!==Ns&&t.key!==Gs||t.preventDefault()}getValue(){const{eEditor:t,params:e}=this,s=t.getValue();if(!i(s)&&!i(e.value))return e.value;let o=e.parseValue(s);if(null==o)return o;if("string"==typeof o){if(""===o)return null;o=Number(o)}return isNaN(o)?null:o}getStartValue(){return this.params.value}setCaret(){Js()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},kp={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},Pp={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},Dp=class{constructor(t){this.getLocaleTextFunc=t}getTemplate(){return Pp}getAgComponents(){return[Go]}init(t,e){this.eEditor=t,this.params=e;const i=e.maxLength;null!=i&&t.setMaxLength(i)}getValidationErrors(){const{params:t}=this,{maxLength:e,getValidationErrors:i}=t,s=this.getValue(),o=this.getLocaleTextFunc();let n=[];return null!=e&&"string"==typeof s&&s.length>e&&n.push(o("maxLengthValidation",`Must be ${e} characters or fewer.`,[String(e)])),n.length||(n=null),i?i({value:s,cellEditorParams:t,internalErrors:n}):n}getValue(){const{eEditor:t,params:e}=this,s=t.getValue();return i(s)||i(e.value)?e.parseValue(s):e.value}getStartValue(){const t=this.params;return t.useFormatter||t.column.getColDef().refData?t.formatValue(t.value):t.value}setCaret(){Js()&&this.eEditor.getInputElement().focus({preventScroll:!0});const t=this.eEditor,e=t.getValue(),s=i(e)&&e.length||0;s&&t.getInputElement().setSelectionRange(s,s)}},Mp=class extends vp{constructor(){super(new Dp((()=>this.getLocaleTextFunc())))}};function Tp(t,e,i="auto"){t.frameworkOverrides.wrapIncoming((()=>t.ctrlsSvc.getScrollFeature().ensureColumnVisible(e,i)),"ensureVisible")}function Ep(t,e,i){t.frameworkOverrides.wrapIncoming((()=>t.ctrlsSvc.getScrollFeature().ensureIndexVisible(e,i)),"ensureVisible")}var Ap={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},Ip=class extends Qs{constructor(t){super(Ap),this.params=t}postConstruct(){De(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){const t=this.getGui(),e=this.params;this.addManagedElementListeners(t,{keydown:t=>{ol(this.gos,t,e.node,e.column,!0)||e.onKeyDown(t)}})}};function Hp(t,{rowNode:e,column:i}){const s=i.getColDef().editable,o=t.editModelSvc;return i.isColumnFunc(e,s)||!!o&&o.hasEdits({rowNode:e,column:i},{withOpenEditor:!0})}var Op=(t,e=!1)=>{if(void 0!==t)return ju(t)||e&&"editing"===t.state};function Np(t,e,i=!1){return Op(t.editModelSvc?.getEdit(e),i)}var Bp=(t,e,i)=>{if(t)for(let s=0,o=t.length;s<o;++s){const o=t[s];if(o.data&&(Op(e?.getEdit({rowNode:o,column:i}))||Op(e?.getEdit({rowNode:o.pinnedSibling,column:i}))))return!0;if(Bp(o.childrenAfterGroup,e,i))return!0}};function Gp(t,e){const{column:i,rowNode:s}=e;return!(t.gos.get("groupTotalRow")&&!s?.footer)&&Bp(s?.childrenAfterGroup,t.editModelSvc,i)}function Vp(t,{rowNode:e,column:i}){if(e=e.pinnedSibling)return Op(t.editModelSvc?.getEdit({rowNode:e,column:i}))}var Lp=class extends Dt{constructor(t,e){super(),this.cellCtrl=t,this.beans=e,this.editSvc=e.editSvc,this.editModelSvc=e.editModelSvc}setComp(t){this.cellComp=t,this.applyCellStyles()}applyCellStyles(){const{cellCtrl:t,editSvc:e,beans:i}=this;if(e?.isBatchEditing()&&e.isEditing()){const e=Np(i,t)||Gp(i,t)||Vp(i,t);this.applyBatchingStyle(e)}else this.applyBatchingStyle(!1);const s=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",s)}applyBatchingStyle(t){this.cellComp.toggleCss("ag-cell-editing",t??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(t&&this.editSvc?.isBatchEditing())??!1)}},zp=class extends Dt{constructor(t,e){super(),this.rowCtrl=t,this.beans=e,this.gos=e.gos,this.editSvc=e.editSvc,this.editModelSvc=e.editModelSvc}applyRowStyles(){const{rowCtrl:t,editModelSvc:e,beans:i}=this;let s=t.rowNode,o=e?.getEditRow(s);const n=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:s});if(!o&&s.pinnedSibling&&(s=s.pinnedSibling,o=e?.getEditRow(s)),o){const t=Array.from(o.keys()).some((t=>{const e={rowNode:s,column:t};return Np(i,e,!0)||Gp(i,e)||Vp(i,e)}));this.applyStyle(n,t)}else this.applyStyle(n)}applyStyle(t=!1,e=!1){const i=this.editSvc?.isBatchEditing()??!1,s="fullRow"===this.gos.get("editType");this.rowCtrl?.forEachGui(void 0,(({rowComp:o})=>{o.toggleCss("ag-row-editing",s&&e),o.toggleCss("ag-row-batch-edit",s&&e&&i),o.toggleCss("ag-row-inline-editing",e),o.toggleCss("ag-row-not-inline-editing",!e),o.toggleCss("ag-row-editing-invalid",s&&e&&t)}))}},$p=new Set(["undo","redo","paste","bulk","rangeSvc"]),Wp=new Set(["ui","api"]),Up={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},jp=new Set(Object.keys(Up)),Kp=new Set(["paste","rangeSvc","renderer","cellClear","redo","undo"]),qp={cancel:!0,source:"api"},Zp={cancel:!1,source:"api"},_p={checkSiblings:!0},Yp={force:!0,suppressFlash:!0};function Qp(t){return{rowNodes:t?Array.from(t.keys()):void 0,columns:t?[...new Set(Array.from(t.values()).flatMap((t=>Array.from(t.keys()))))]:void 0}}function Jp(t,e){return e??t.get("editType")??"singleCell"}var Xp=class extends Dt{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(t){this.model.clearEditValue(t)}onCellFocusChanged(t){let e;const i=t.previousParams,{editSvc:s,beans:o}=this,n="cellFocused"===t.type?t.sourceEvent:null;i&&(e=Lu(o,i));const{gos:r,editModelSvc:l}=o,a="cellFocusCleared"===t.type;if(s.isEditing(void 0,{withOpenEditor:!0})){const{column:e,rowIndex:h,rowPinned:c}=t,u={column:e,rowNode:kh(o,{rowIndex:h,rowPinned:c})},d="block"===r.get("invalidEditValueMode");if(d)return;const g=!d,p=!!l?.getCellValidationModel().hasCellValidation(u);!i&&!a||s.stopEditing(void 0,{cancel:g&&p,source:a&&g?"api":void 0,event:n})||(s.isBatchEditing()?s.cleanupEditors():s.stopEditing(void 0,{source:"api"}))}e?.refreshCell({suppressFlash:!0,force:!0})}stop(t,e){const i=this.model.getEditPositions(),s={all:[],pass:[],fail:[]};for(const t of i){s.all.push(t);const e=this.model.getCellValidationModel().getCellValidation(t);(e?.errorMessages?.length??0)>0?s.fail.push(t):s.pass.push(t)}if(t)for(const e of i)td(this.beans,e,{cancel:t}),this.model.stop(e);else{const i=this.processValidationResults(s);if(i.destroy.length>0)for(const s of i.destroy)td(this.beans,s,{event:e,cancel:t}),this.model.stop(s);if(i.keep.length>0)for(const t of i.keep){const e=Lu(this.beans,t);this.editSvc?.cellEditingInvalidCommitBlocks()||e&&this.editSvc.revertSingleCellEdit(e)}}return!0}cleanupEditors({rowNode:t}={},e){Qu(this.beans,{persist:!1});const i=this.model.getEditPositions(),s=[];if(t)for(const e of i)e.rowNode!==t&&s.push(e);else for(const t of i)s.push(t);Xu(this.beans,s),_u(this.beans,e)}setFocusOutOnEditor(t){t.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(t){const e=t.comp,i=e?.getCellEditor();if(i?.focusIn)i.focusIn();else{const i="fullRow"===this.beans.gos.get("editType");t.focusCell(i),t.onEditorAttachedFuncs.push((()=>e?.getCellEditor()?.focusIn?.()))}}setupEditors(t){const{event:e,ignoreEventKey:i=!1,startedEdit:s,position:o,cells:n=this.model.getEditPositions()}=t,r=e instanceof KeyboardEvent&&!i&&e.key||void 0;!function(t,e,i,s,o,n){0===e.length&&i?.rowNode&&i?.column&&Ku(t,i,{key:s,event:o,cellStartedEdit:n});const{valueSvc:r,editSvc:l,editModelSvc:a}=t,{rowNode:h,column:c}=i??{};for(const u of e){const{rowNode:e,column:d}=u,g=Lu(t,u);if(!g){if(e&&d){const t=r.getValue(d,e,void 0,"api"),o=(i?.rowNode===e&&i?.column===d&&s||void 0)??l?.getCellDataValue(u,!1)??r.getValueForDisplay(d,e)?.value??t??Wu;a?.setEdit(u,{pendingValue:o,sourceValue:t,state:"editing"})}continue}const p=n&&h===g.rowNode&&g.column===c;Ku(t,{rowNode:h,column:g.column},{key:p?s:null,event:p?o:null,cellStartedEdit:p&&n})}}(this.beans,n,o,r,e,s)}dispatchCellEvent(t,e,i,s){const o=Lu(this.beans,t);o&&this.eventSvc.dispatchEvent({...o.createEvent(e??null,i),...s})}dispatchRowEvent(t,e,i){if(i)return;const s=Vu(this.beans,t);s&&this.eventSvc.dispatchEvent(s.createRowEvent(e))}shouldStop(t,e,i="ui"){const s=this.editSvc.isBatchEditing();return!(!s||"api"!==i)||(!s||"ui"!==i&&"edit"!==i)&&("api"===i||(e instanceof KeyboardEvent&&!s?e.key===As:null))}shouldCancel(t,e,i="ui"){const s=this.editSvc.isBatchEditing();return e instanceof KeyboardEvent&&!s&&e.key===Is||(!(!s||"api"!==i)||"api"===i)}setEditMap(t,e){e?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});const i=[];if(t.forEach(((t,e)=>{t.forEach(((t,s)=>{"editing"===t.state&&i.push({...t,rowNode:e,column:s})}))})),e?.update&&(t=new Map([...this.model.getEditMap(),...t])),this.model?.setEditMap(t),i.length>0){const t=i.at(-1);this.start({position:t,event:new KeyboardEvent("keydown",{key:t.pendingValue===Wu?void 0:t.pendingValue}),source:"api"});const e=Lu(this.beans,t);e&&this.setFocusInOnEditor(e)}}destroy(){this.cleanupEditors(),super.destroy()}},tf={moduleName:"EditCore",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new Bu,this.rowValidations=new Gu,this.suspendEdits=!1}suspend(t){this.suspendEdits=t}removeEdits({rowNode:t,column:e}){if(!this.hasEdits({rowNode:t})||!t)return;const i=this.getEditRow(t);e?i.delete(e):i.clear(),0===i.size&&this.edits.delete(t)}getEditRow(t,e={}){if(this.suspendEdits)return;if(0===this.edits.size)return;const i=t&&this.edits.get(t);if(i)return i;if(e.checkSiblings){const e=t.pinnedSibling;if(e)return this.getEditRow(e)}}getEditRowDataValue(t,{checkSiblings:e}={}){if(!t||0===this.edits.size)return;const i=this.getEditRow(t),s=t.pinnedSibling,o=e&&s&&this.getEditRow(s);if(!i&&!o)return;const n=Object.assign({},t.data),r=(t,e)=>t.forEach((({pendingValue:t},i)=>{t!==Wu&&(e[i.getColId()]=t)}));return i&&r(i,n),o&&r(o,n),n}getEdit(t,e){const i=this._getEdit(t);return e&&i?{...i}:i}_getEdit(t){if(!this.suspendEdits&&0!==this.edits.size)return t.rowNode&&t.column&&this.getEditRow(t.rowNode)?.get(t.column)}getEditMap(t=!0){if(this.suspendEdits||0===this.edits.size)return new Map;if(!t)return this.edits;const e=new Map;return this.edits.forEach(((t,i)=>{const s=new Map;t.forEach((({editorState:t,...e},i)=>s.set(i,{...e}))),e.set(i,s)})),e}setEditMap(t){this.edits.clear(),t.forEach(((t,e)=>{const i=new Map;t.forEach(((t,e)=>i.set(e,{...t}))),this.edits.set(e,i)}))}setEdit(t,e){(0===this.edits.size||!this.edits.has(t.rowNode))&&this.edits.set(t.rowNode,new Map);const i=this._getEdit(t),s=Object.assign({editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...i,...e});return this.getEditRow(t.rowNode).set(t.column,s),s}clearEditValue(t){const{rowNode:e,column:i}=t;if(e)if(i){const e=this._getEdit(t);e&&(e.editorValue=void 0,e.pendingValue=e.sourceValue,e.state="changed")}else this.getEditRow(e)?.forEach((t=>{t.editorValue=void 0,t.pendingValue=t.sourceValue,t.state="changed"}))}getState(t){if(!this.suspendEdits)return this.getEdit(t)?.state}getEditPositions(t){if(this.suspendEdits||0===(t??this.edits).size)return[];const e=[];return(t??this.edits).forEach(((t,i)=>{for(const s of t.keys()){const{editorState:o,...n}=t.get(s);e.push({rowNode:i,column:s,...n})}})),e}hasRowEdits(t,e){return!this.suspendEdits&&(0!==this.edits.size&&!!this.getEditRow(t,e))}hasEdits(t={},e={}){if(this.suspendEdits)return!1;if(0===this.edits.size)return!1;const{rowNode:i,column:s}=t,{withOpenEditor:o}=e;if(i){const n=this.getEditRow(i,e);return!!n&&(s?o?"editing"===this.getEdit(t)?.state:n.has(s)??!1:0!==n.size&&(!o||Array.from(n.values()).some((({state:t})=>"editing"===t))))}return o?this.getEditPositions().some((({state:t})=>"editing"===t)):this.edits.size>0}start(t){const e=this.getEditRow(t.rowNode)??new Map,{rowNode:i,column:s}=t;s&&!e.has(s)&&e.set(s,{editorValue:void 0,pendingValue:Wu,sourceValue:this.beans.valueSvc.getValue(s,i,!1,"api"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(i,e)}stop(t){this.hasEdits(t)&&(t?this.removeEdits(t):this.clear())}clear(){for(const t of this.edits.values())t.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(t){this.cellValidations=t}setRowValidationModel(t){this.rowValidations=t}destroy(){super.destroy(),this.clear()}},class extends Dt{constructor(){super(...arguments),this.beanName="editSvc",this.batch=!1,this.stopping=!1,this.committing=!1}postConstruct(){const{beans:t}=this;this.model=t.editModelSvc,this.valueSvc=t.valueSvc,this.rangeSvc=t.rangeSvc,this.addManagedPropertyListener("editType",(({currentValue:t})=>{this.stopEditing(void 0,qp),this.createStrategy(t)}));const e=(t=>()=>{const e=new Set(t.colModel.getCols()),i=t.editModelSvc.getEditMap(!0),s=new Set(i.keys());(({editModelSvc:t},e,i)=>{for(const s of e)t?.getEditRow(s)?.forEach(((e,o)=>!i.has(o)&&t.removeEdits({rowNode:s,column:o})))})(t,(({rowModel:t,pinnedRowModel:e,editModelSvc:i},s)=>{const o=new Set;t.forEachNode((t=>s.has(t)&&o.add(t))),e?.forEachPinnedRow("top",(t=>s.has(t)&&o.add(t))),e?.forEachPinnedRow("bottom",(t=>s.has(t)&&o.add(t)));for(const t of s)o.has(t)||i.removeEdits({rowNode:t});return o})(t,s),e)})(t),i=()=>{const e=this.model.getCellValidationModel().getCellValidationMap().size>0,i=this.model.getRowValidationModel().getRowValidationMap().size>0;return e||i?this.stopEditing(void 0,qp):this.isEditing()&&(this.isBatchEditing()?Xu(t,this.model.getEditPositions()):this.stopEditing(void 0,Zp)),!1};this.addManagedEventListeners({columnPinned:e,columnVisible:e,columnRowGroupChanged:e,rowExpansionStateChanged:e,pinnedRowsChanged:e,displayedRowsChanged:e,sortChanged:i,filterChanged:i,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}setBatchEditing(t){t?(this.batch=!0,this.stopEditing(void 0,qp)):(this.stopEditing(void 0,qp),this.batch=!1)}createStrategy(t){const{beans:e,gos:i,strategy:s}=this,o=Jp(i,t);if(s){if(s.beanName===o)return s;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(e.registry.createDynamicBean(o,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(t,e,i,s="ui"){const o=function(t,{column:e},i,s,o="ui"){if(i instanceof KeyboardEvent&&(i.key===Es||i.key===As||i.key===Ls||i.key===Ts&&s))return!0;if(i?.shiftKey&&0!=t.rangeSvc?.getCellRanges().length)return!1;const n=e?.getColDef(),r=function(t,e){return!0===t.get("suppressClickEdit")?0:!0===t.get("singleClickEdit")||e?.singleClickEdit?1:2}(t.gos,n),l=i?.type;return"click"===l&&1===i?.detail&&1===r||"dblclick"===l&&2===i?.detail&&2===r||"api"===o&&(s??!1)}(this.beans,t,e,i,s);return o&&(this.strategy??(this.strategy=this.createStrategy())),o}shouldStopEditing(t,e,i="ui"){return this.strategy?.shouldStop(t,e,i)??null}shouldCancelEditing(t,e,i="ui"){return this.strategy?.shouldCancel(t,e,i)??null}validateEdit(){return function(t){od(t,!0);const e=t.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!e)return null;const i=[];return e.forEach(((t,e)=>{t.forEach((({errorMessages:t},s)=>{i.push({column:s,rowIndex:e.rowIndex,rowPinned:e.rowPinned,messages:t??null})}))})),i}(this.beans)}isEditing(t,e){return this.model.hasEdits(t,e??_p)}isRowEditing(t,e){return(t&&this.model.hasRowEdits(t,e))??!1}startEditing(t,e){const{startedEdit:i=!0,event:s=null,source:o="ui",ignoreEventKey:n=!1,silent:r}=e;if(this.strategy??(this.strategy=this.createStrategy()),!this.isCellEditable(t,"api"))return;const l=Lu(this.beans,t);if(l&&!l.comp)return void l.onCompAttachedFuncs.push((()=>this.startEditing(t,e)));const a=this.shouldStartEditing(t,s,i,o);!1!==a||"api"===o?(this.batch||!this.shouldStopEditing(t,void 0,o)||e.continueEditing||this.stopEditing(void 0,{source:o}),a&&this.isBatchEditing()&&this.dispatchBatchEvent("batchEditingStarted",new Map),this.strategy.start({position:t,event:s,source:o,ignoreEventKey:n,startedEdit:i,silent:r})):this.isEditing(t)&&this.stopEditing()}stopEditing(t,e){const{event:i,cancel:s,source:o="ui",forceCancel:n,forceStop:r}=e||{},{beans:l,model:a}=this;if(jp.has(o)&&this.isBatchEditing())return this.bulkRefresh(t),!1;const h=this.committing?Up[o]:o;if(!(this.committing||this.isEditing(t)||this.isBatchEditing()&&a.hasEdits(t,_p))||!this.strategy||this.stopping)return!1;this.stopping=!0;const c=Lu(l,t);c&&(c.onEditorAttachedFuncs=[]);let u=a.getEditMap(!0),d=!1;const g=!s&&(!!this.shouldStopEditing(t,i,h)||this.committing&&!this.batch)||(r??!1),p=s&&!!this.shouldCancelEditing(t,i,h)||(n??!1);if(g||p){Qu(l,{persist:!0,isCancelling:p||s,isStopping:g});const t=a.getEditMap(),e=this.processEdits(t,s,o);this.strategy?.stop(s,i);for(const t of e)a.clearEditValue(t);this.bulkRefresh(void 0,u);for(const e of a.getEditPositions(t)){const t=Lu(l,e),i=ju(e);t?.refreshCell({force:!0,suppressFlash:!i})}u=t,d||(d=g)}else if(i instanceof KeyboardEvent&&this.batch&&this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})){const{key:e}=i,s=e===As,o=e===Is,n=e===Es;(s||n||o)&&(s||n?Qu(l,{persist:!0}):o&&this.revertSingleCellEdit(c),this.isBatchEditing()?this.strategy?.cleanupEditors():Xu(l,a.getEditPositions(),{event:i,cancel:o}),i.preventDefault(),this.bulkRefresh(t,u,{suppressFlash:!0}),u=a.getEditMap())}else Qu(l,{persist:!0}),u=a.getEditMap();return d&&t&&this.model.removeEdits(t),this.navigateAfterEdit(e,c?.cellPosition),_u(l),this.model.hasEdits()||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap()),this.bulkRefresh(),p&&this.beans.rowRenderer.refreshRows({rowNodes:Array.from(u.keys())}),this.isBatchEditing()&&(this.beans.rowRenderer.refreshRows({suppressFlash:!0,force:!0}),d&&g&&this.dispatchBatchEvent("batchEditingStopped",u)),this.stopping=!1,d}navigateAfterEdit(t,e){if(!t||!e)return;const{event:i,suppressNavigateAfterEdit:s}=t;if(!(i instanceof KeyboardEvent)||s)return;const{key:o,shiftKey:n}=i,r=this.gos.get("enterNavigatesVerticallyAfterEdit");if(o!==As||!r)return;const l=n?Ns:Gs;this.beans.navigation?.navigateToNextCell(null,l,e,!1)}processEdits(t,e=!1,i){const s=Array.from(t.keys()),o=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,n=[];for(const r of s){const s=t.get(r);for(const t of s.keys()){const l=s.get(t),a={rowNode:r,column:t},h=ju(l);e||!h||o||this.setNodeDataValue(r,t,l.pendingValue,void 0,i)||n.push(a)}}return n}setNodeDataValue(t,e,i,s,o="edit"){const{beans:n}=this,r=Lu(n,{rowNode:t,column:e}),l=Wp.has(o)?"edit":o;r&&(r.suppressRefreshCell=!0),this.commitNextEdit();const a=t.setDataValue(e,i,l);return r&&(r.suppressRefreshCell=!1),s&&r?.refreshCell(Yp),a}setEditMap(t,e){this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(t,e),this.bulkRefresh();let i=Yp;e?.forceRefreshOfEditCellsOnly&&(i={...Qp(t),...Yp}),this.beans.rowRenderer.refreshCells(i)}dispatchEditValuesChanged({rowNode:t,column:e},i={}){if(!t||!e||!i)return;const{pendingValue:s,sourceValue:o}=i,{rowIndex:n,rowPinned:r,data:l}=t;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:t,rowIndex:n,rowPinned:r,column:e,source:"api",data:l,newValue:s,oldValue:o,value:s,colDef:e.getColDef()})}bulkRefresh(t={},e,i={}){const{beans:s,gos:o}=this,{editModelSvc:n}=s;Ce(o)&&(t.rowNode&&t.column?this.refCell(t,this.model.getEdit(t),i):e&&n?.getEditMap(!1)?.forEach(((t,e)=>{for(const s of t.keys())this.refCell({rowNode:e,column:s},t.get(s),i)})))}refCell({rowNode:t,column:e},i,s={}){const{beans:o,gos:n}=this,r=new Set([t]),l=new Set,a=t.pinnedSibling;a&&r.add(a);const h=t.sibling;h&&l.add(h);let c=t.parent;for(;c;)c.sibling?.footer&&n.get("groupTotalRow")||!c.parent&&c.sibling&&n.get("grandTotalRow")?l.add(c.sibling):l.add(c),c=c.parent;for(const t of r)this.dispatchEditValuesChanged({rowNode:t,column:e},i);for(const t of r)Lu(o,{rowNode:t,column:e})?.refreshCell(s);for(const t of l)Lu(o,{rowNode:t,column:e})?.refreshCell(s)}stopAllEditing(t=!1,e="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:t,source:e})}isCellEditable(t,e="ui"){const{rowNode:i}=t,{gos:s,beans:o}=this;if(i.group)if(s.get("treeData")){if(!i.data&&!s.get("enableGroupEdit"))return!1}else if(!s.get("enableGroupEdit"))return!1;const n="fullRow"===Jp(s)?function(t,e,i="ui"){const s=Hp(t,e);return!0===s||"ui"===i?s:t.colModel.getCols().some((i=>Hp(t,{rowNode:e.rowNode,column:i})))}(o,t,e):Hp(o,t);return n&&(this.strategy??(this.strategy=this.createStrategy())),n}cellEditingInvalidCommitBlocks(){return"block"===this.gos.get("invalidEditValueMode")}checkNavWithValidation(t,e,i=!0){if(this.hasValidationErrors(t)){const s=Lu(this.beans,t);return this.cellEditingInvalidCommitBlocks()?(e?.preventDefault?.(),i&&(!s?.hasBrowserFocus()&&s?.focusCell(),s?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(s&&this.revertSingleCellEdit(s),"revert-continue")}return"continue"}revertSingleCellEdit(t,e=!1){const i=Lu(this.beans,t);i?.comp?.getCellEditor()&&(Xu(this.beans,[t],{silent:!0}),this.model.clearEditValue(t),Ku(this.beans,t,{silent:!0}),od(this.beans),i?.refreshCell(Yp),e&&(i?.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(t){od(this.beans);const e=Lu(this.beans,t);e&&(e.refreshCell(Yp),e.rowCtrl.rowEditStyleFeature?.applyRowStyles());let i=!1;return t?.rowNode?(i||(i=this.model.getRowValidationModel().hasRowValidation({rowNode:t.rowNode})),t.column&&(i||(i=this.model.getCellValidationModel().hasCellValidation({rowNode:t.rowNode,column:t.column})))):(i||(i=this.model.getCellValidationModel().getCellValidationMap().size>0),i||(i=this.model.getRowValidationModel().getRowValidationMap().size>0)),i}moveToNextCell(t,e,i,s="ui"){let o;const n=this.isEditing(),r=n&&"block-stop"===this.checkNavWithValidation(void 0,i);return t instanceof cd&&n&&(o=this.strategy?.moveToNextEditingCell(t,e,i,s,r)),null===o||(o=o||!!this.beans.focusSvc.focusedHeader,!1!==o||r||this.stopEditing()),o}getCellDataValue({rowNode:t,column:e},i=!0){if(!t||!e)return;let s=this.model.getEdit({rowNode:t,column:e});const o=t.pinnedSibling;if(o){const t=this.model.getEdit({rowNode:o,column:e});t&&(s=t)}const n=i?s?.editorValue??s?.pendingValue:s?.pendingValue;return n!==Wu&&s?n:s?.sourceValue??this.valueSvc.getValue(e,t,!1,"api")}addStopEditingWhenGridLosesFocus(t){!function(t,e,i){const{gos:s,popupSvc:o}=e;if(!s.get("stopEditingWhenCellsLoseFocus"))return;const n=t=>{const n=t.relatedTarget;if(null===io(n))return void zu(e);let r=i.some((t=>t.contains(n)))&&s.isElementInThisInstance(n);r||(r=!!o&&(o.getActivePopups().some((t=>t.contains(n)))||o.isElementWithinCustomPopup(n))),r||zu(e)};for(const e of i)t.addManagedElementListeners(e,{focusout:n})}(this,this.beans,t)}createPopupEditorWrapper(t){return new Ip(t)}commitNextEdit(){this.committing=!0}setDataValue(t,e,i){try{if((!this.isEditing()||this.committing)&&!Kp.has(i))return;const{beans:s}=this;this.strategy??(this.strategy=this.createStrategy());const o=this.isBatchEditing()?"ui":this.committing?i??"api":"api";if(!i||$p.has(i))return Ju(s,t,e,0,void 0,{persist:!0}),this.setNodeDataValue(t.rowNode,t.column,e,!0,i);const n=this.model.getEdit(t);if(n){if(n.pendingValue===e)return!1;if(n.sourceValue!==e)return Ju(s,t,e,0,void 0,{persist:!0}),this.stopEditing(t,{source:o,suppressNavigateAfterEdit:!0}),!0;if(n.sourceValue===e)return s.editModelSvc?.removeEdits(t),this.dispatchEditValuesChanged(t,{...n,pendingValue:e}),!0}return Ju(s,t,e,0,void 0,{persist:!0}),this.stopEditing(t,{source:o,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}handleColDefChanged(t){!function(t,e){const i=e.comp?.getCellEditor();if(!i?.refresh)return;const{eventKey:s,cellStartedEdit:o}=e.editCompDetails.params,{column:n}=e,r=Zu(t,e,s,o),l=n.getColDef(),a=Cs(t.userCompFactory,l,r);i.refresh(Yu(a.params,s))}(this.beans,t)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(t,e){if(!this.batch)return;if(!this.model.hasRowEdits(t.rowNode,_p))return;const{rowNode:i,column:s}=t,{compDetails:o,valueToDisplay:n}=e;if(o){const{params:t}=o;return t.data=this.model.getEditRowDataValue(i,_p),{compDetails:o}}const r=this.model.getEditRow(t.rowNode,_p);return void 0!==n&&r?.has(s)?{valueToDisplay:this.valueSvc.getValue(s,i)}:void 0}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(t,e,i,s){this.strategy?.dispatchCellEvent(t,e,i,s)}dispatchBatchEvent(t,e){this.eventSvc.dispatchEvent(this.createBatchEditEvent(t,e))}createBatchEditEvent(t,e){return Qe(this.gos,{type:t,..."batchEditingStopped"===t?{changes:this.toEventChangeList(e)}:{}})}toEventChangeList(t){return this.model.getEditPositions(t).map((t=>({rowIndex:t.rowNode.rowIndex,rowPinned:t.rowNode.rowPinned,columnId:t.column.getColId(),newValue:t.pendingValue,oldValue:t.sourceValue})))}applyBulkEdit({rowNode:t,column:e},i){if(!i||0===i.length)return;const{beans:s,rangeSvc:o,valueSvc:n}=this;Qu(s,{persist:!0});const r=this.model.getEditMap(!0),l=r.get(t)?.get(e)?.pendingValue;this.batch||this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),i.forEach((t=>{if(o?.forEachRowInRange(t,(e=>{const i=kh(s,e);if(void 0===i)return;const o=r.get(i)??new Map;for(const e of t.columns)if(e&&this.isCellEditable({rowNode:i,column:e},"api")){const t=n.getValue(e,i,!0,"api");let s=n.parseValue(e,i??null,l,t);Number.isNaN(s)&&(s=null),o.set(e,{editorValue:void 0,pendingValue:s,sourceValue:t,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}o.size>0&&r.set(i,o)})),this.setEditMap(r),this.batch)return this.cleanupEditors(),_u(s),void this.bulkRefresh();this.commitNextEdit(),this.stopEditing(void 0,{source:"bulk"}),this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(r)})})),this.bulkRefresh();const a=Lu(s,{rowNode:t,column:e});a&&a.focusCell(!0)}createCellStyleFeature(t,e){return new Lp(t,e)}createRowStyleFeature(t,e){return new zp(t,e)}setEditingCells(t,e){const{beans:i}=this,{colModel:s,valueSvc:o}=i,n=new Map;for(let{colId:r,column:l,colKey:a,rowIndex:h,rowPinned:c,newValue:u,state:d}of t){const t=r?s.getCol(r):a?s.getCol(a):l;if(!t)continue;const g=kh(i,{rowIndex:h,rowPinned:c});if(!g)continue;const p=o.getValue(t,g,!0,"api");if(!e?.forceRefreshOfEditCellsOnly&&!ju({pendingValue:u,sourceValue:p})&&"editing"!==d)continue;let f=n.get(g);f||(f=new Map,n.set(g,f)),void 0===u&&(u=Wu),f.set(t,{editorValue:void 0,pendingValue:u,sourceValue:p,state:d??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(n,e)}onCellFocused(t){const e=Lu(this.beans,t);if(!e||!this.isEditing(e,_p))return;const i=this.model.getEdit(e);if(!i||!ju(i))return;const s=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(s,"pendingChange")}allowedFocusTargetOnValidation(t){return Lu(this.beans,t)}}],apiFunctions:{getEditingCells:function(t){const e=t.editModelSvc?.getEditMap(),i=[];return e?.forEach(((t,e)=>{const{rowIndex:s,rowPinned:o}=e;t.forEach(((t,e)=>{const{editorValue:n,pendingValue:r,sourceValue:l,state:a}=t,h=ju(t);let c=n??r;c===Wu&&(c=void 0);const u={newValue:c,oldValue:l,state:a,column:e,colId:e.getColId(),colKey:e.getColId(),rowIndex:s,rowPinned:o};("editing"===a||"changed"===a&&h)&&i.push(u)}))})),i},getEditRowValues:function(t,e){return t.editModelSvc?.getEditRowDataValue(e,{checkSiblings:!0})},getCellEditorInstances:(t,e={})=>Uu(t,e).map((t=>t.editor)),startEditingCell:function(t,e){const{key:i,colKey:s,rowIndex:o,rowPinned:n}=e,{editSvc:r,colModel:l}=t,a=l.getCol(s);if(!a)return void pe(12,{colKey:s});const h=kh(t,{rowIndex:o,rowPinned:n||null});h?a.isCellEditable(h)&&(null==n&&Ep(t,o),Tp(t,s),r?.startEditing({rowNode:h,column:a},{event:i?new KeyboardEvent("keydown",{key:i}):void 0,source:"api"})):pe(290,{rowIndex:o,rowPinned:n})},stopEditing:function(t,e=!1){const{editSvc:i}=t;if(i?.isBatchEditing()){if(e)for(const e of t.editModelSvc?.getEditPositions()??[])"editing"===e.state&&i.revertSingleCellEdit(e);else Qu(t,{persist:!0});Xu(t,void 0,{cancel:e})}else i?.stopEditing(void 0,{cancel:e,source:"edit",forceStop:!e,forceCancel:e})},isEditing:function(t,e){const i=Lu(t,e);return t.editSvc?.isEditing(i)??!1},validateEdit:function(t){return t.editSvc?.validateEdit()||null}},dynamicBeans:{singleCell:class extends Xp{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(t,e,i="ui"){const s=super.shouldStop(t,e,i);if(null!==s)return s;const{rowNode:o,column:n}=t||{};return this.rowNode&&this.column||!o||!n?this.rowNode!==o||this.column!==n:null}midBatchInputsAllowed(t){return this.model.hasEdits(t)}start(t){const{position:e,startedEdit:i,event:s,ignoreEventKey:o}=t;this.rowNode===e.rowNode&&this.column===e.column||super.cleanupEditors(),this.rowNode=e.rowNode,this.column=e.column,this.model.start(e),this.setupEditors({cells:[e],position:e,startedEdit:i,event:s,ignoreEventKey:o})}dispatchRowEvent(t,e,i){}processValidationResults(t){return t.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:t.all}:{destroy:t.all,keep:[]}}stop(t,e){return super.stop(t,e),this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(t){const{colModel:e,editSvc:i}=this.beans,{rowIndex:s,column:o,rowPinned:n}=t,r=kh(this.beans,{rowIndex:s,rowPinned:n}),l=$u(o),a=e.getCol(l),h=t.previousParams;if(h){const t=$u(h.column);if(h?.rowIndex===s&&t===l&&h?.rowPinned===n)return}i?.isEditing({rowNode:r,column:a},{withOpenEditor:!0})&&"cellFocused"===t.type||super.onCellFocusChanged(t)}moveToNextEditingCell(t,e,i,s="ui",o=!1){const n=this.beans.focusSvc.getFocusedCell();n&&(t=Ph(this.beans,n)??t);const r=t.cellPosition;let l;const a="fullRow"===this.beans.gos.get("editType");a&&this.model.suspend(!0),o||(t.eGui.focus(),this.editSvc?.stopEditing(t,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:i}));try{l=this.beans.navigation?.findNextCellToFocusOn(r,{backwards:e,startEditing:!0})}finally{a&&this.model.suspend(!1)}if(!1===l)return null;if(null==l)return!1;const h=l.cellPosition,c=t.isCellEditable(),u=l.isCellEditable(),d=h&&r.rowIndex===h.rowIndex&&r.rowPinned===h.rowPinned;c&&!o&&this.setFocusOutOnEditor(t);const g=this.gos.get("suppressStartEditOnTab");if(d||o||(super.cleanupEditors(l,!0),g?l.focusCell(!0,i):this.editSvc.startEditing(l,{startedEdit:!0,event:i,source:s,ignoreEventKey:!0})),u&&!o){if(l.focusCell(!1,i),g)l.focusCell(!0,i);else if(!l.comp?.getCellEditor()){const t=this.editSvc?.isEditing(l,{withOpenEditor:!0});Ku(this.beans,l,{event:i,cellStartedEdit:!0,silent:t}),this.setFocusInOnEditor(l),this.cleanupEditors(l)}}else u&&o&&this.setFocusInOnEditor(l),l.focusCell(!0,i);return t.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},fullRow:class extends Xp{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(t,e,i="ui"){const{rowNode:s}=t||{};if(!Vu(this.beans,{rowNode:this.rowNode}))return!0;const o=super.shouldStop({rowNode:this.rowNode},e,i);return null!==o?o:!!this.rowNode&&s!==this.rowNode}midBatchInputsAllowed({rowNode:t}){return!!t&&this.model.hasEdits({rowNode:t})}clearEdits(t){this.model.clearEditValue(t)}start(t){const{position:e,silent:i,startedEdit:s,event:o,ignoreEventKey:n}=t,{rowNode:r}=e;this.rowNode!==r&&super.cleanupEditors(e);const l=this.beans.visibleCols.allCols,a=[],h=[];for(const t of l)t.isCellEditable(r)&&h.push(t);if(0!=h.length){this.dispatchRowEvent({rowNode:r},"rowEditingStarted",i),this.startedRows.push(r);for(const t of h){const e={rowNode:r,column:t};a.push(e),this.model.hasEdits(e)||this.model.start(e)}this.rowNode=r,this.setupEditors({cells:a,position:e,startedEdit:s,event:o,ignoreEventKey:n})}}processValidationResults(t){return t.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:t.all}:{destroy:t.all,keep:[]}}stop(t,e){const{rowNode:i}=this;if(i&&!this.model.hasRowEdits(i))return!1;const s=[];if(t||this.model.getEditMap().forEach(((t,e)=>{if(t&&0!==t.size)for(const i of t.values())if(ju(i)){s.push(e);break}})),od(this.beans),!t&&"block-stop"===this.editSvc?.checkNavWithValidation({rowNode:i}))return!1;super.stop(t,e);for(const t of s)this.dispatchRowEvent({rowNode:t},"rowValueChanged");return this.cleanupEditors({rowNode:i},!0),this.rowNode=void 0,!0}onCellFocusChanged(t){const{rowIndex:e}=t,i=t.previousParams;if(i?.rowIndex===e||t.sourceEvent instanceof KeyboardEvent)return;const s=Lu(this.beans,i);"block"===this.gos.get("invalidEditValueMode")&&s&&(this.model.getCellValidationModel().getCellValidation(s)||this.model.getRowValidationModel().getRowValidation(s))||super.onCellFocusChanged(t)}cleanupEditors(t={},e){super.cleanupEditors(t,e);for(const t of this.startedRows)this.dispatchRowEvent({rowNode:t},"rowEditingStopped");this.startedRows.length=0}moveToNextEditingCell(t,e,i,s="ui",o=!1){const n=t.cellPosition;let r;this.model.suspend(!0);try{r=this.beans.navigation?.findNextCellToFocusOn(n,{backwards:e,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(!1===r)return null;if(null==r)return!1;const l=r.cellPosition,a=t.isCellEditable(),h=r.isCellEditable(),c=l&&n.rowIndex===l.rowIndex&&n.rowPinned===l.rowPinned;a&&this.setFocusOutOnEditor(t),this.restoreEditors();const u=this.gos.get("suppressStartEditOnTab");return h&&!o?u?r.focusCell(!0,i):(r.comp?.getCellEditor()||Ku(this.beans,r,{event:i,cellStartedEdit:!0}),this.setFocusInOnEditor(r),r.focusCell(!1,i)):(h&&o&&this.setFocusInOnEditor(r),r.focusCell(!0,i)),c||o||(this.editSvc?.stopEditing({rowNode:t.rowNode},{event:i}),this.cleanupEditors(r,!0),u?r.focusCell(!0,i):this.editSvc.startEditing(r,{startedEdit:!0,event:i,source:s,ignoreEventKey:!0})),t.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach(((t,e)=>t.forEach((({state:t},i)=>{if("editing"!==t)return;const s=Lu(this.beans,{rowNode:e,column:i});s&&!s.comp?.getCellEditor()&&Ku(this.beans,s,{silent:!0})}))))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}}},dependsOn:[vg,gp],css:[".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) textarea{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}"]},ef={moduleName:"UndoRedoEdit",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=t=>{const e={column:t.column,rowIndex:t.rowIndex,rowPinned:t.rowPinned},i=null!==this.activeCellEdit&&Fh(this.activeCellEdit,e),s=null!==this.activeRowEdit&&(n=e,!(o=this.activeRowEdit)&&!n||!(o&&!n||!o&&n)&&o.rowIndex===n.rowIndex&&o.rowPinned==n.rowPinned);var o,n;if(!(i||s||this.isPasting||this.isRangeInAction))return;const{rowPinned:r,rowIndex:l,column:a,oldValue:h,value:c}=t,u={rowPinned:r,rowIndex:l,columnId:a.getColId(),newValue:c,oldValue:h};this.cellValueChanges.push(u)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){const{gos:t,ctrlsSvc:e}=this.beans;if(!t.get("undoRedoCellEditing"))return;const i=t.get("undoRedoCellEditingLimit");if(i<=0)return;this.undoStack=new mp(i),this.redoStack=new mp(i),this.addListeners();const s=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:t=>{t.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:s,newColumnsLoaded:s,columnGroupOpened:s,columnRowGroupChanged:s,columnMoved:s,columnPinned:s,columnVisible:s,rowDragEnd:s}),e.whenReady(this,(t=>{this.gridBodyCtrl=t.gridBodyCtrl}))}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(t){const{eventSvc:e,undoStack:i,redoStack:s}=this;e.dispatchEvent({type:"undoStarted",source:t});const o=this.undoRedo(i,s,"initialRange","oldValue","undo");e.dispatchEvent({type:"undoEnded",source:t,operationPerformed:o})}redo(t){const{eventSvc:e,undoStack:i,redoStack:s}=this;e.dispatchEvent({type:"redoStarted",source:t});const o=this.undoRedo(s,i,"finalRange","newValue","redo");e.dispatchEvent({type:"redoEnded",source:t,operationPerformed:o})}undoRedo(t,e,i,s,o){if(!t)return!1;const n=t.pop();return!!n?.cellValueChanges&&(this.processAction(n,(t=>t[s]),o),n instanceof fp?this.processRange(n.ranges||[n[i]]):this.processCell(n.cellValueChanges),e.push(n),!0)}processAction(t,e,i){for(const s of t.cellValueChanges){const{rowIndex:t,rowPinned:o,columnId:n}=s,r=kh(this.beans,{rowIndex:t,rowPinned:o});r.displayed&&r.setDataValue(n,e(s),i)}}processRange(t){let e;const i=this.beans.rangeSvc;i.removeAllCellRanges(!0),t.forEach(((s,o)=>{if(!s)return;const n=s.startRow,r=s.endRow;o===t.length-1&&(e={rowPinned:n.rowPinned,rowIndex:n.rowIndex,columnId:s.startColumn.getColId()},this.setLastFocusedCell(e)),i.addCellRange({rowStartIndex:n.rowIndex,rowStartPinned:n.rowPinned,rowEndIndex:r.rowIndex,rowEndPinned:r.rowPinned,columnStart:s.startColumn,columns:s.columns})}))}processCell(t){const e=t[0],{rowIndex:i,rowPinned:s}=e,o=kh(this.beans,{rowIndex:i,rowPinned:s});this.setLastFocusedCell({rowPinned:e.rowPinned,rowIndex:o.rowIndex,columnId:e.columnId})}setLastFocusedCell(t){const{rowIndex:e,columnId:i,rowPinned:s}=t,{colModel:o,focusSvc:n,rangeSvc:r}=this.beans,l=o.getCol(i);if(!l)return;const{scrollFeature:a}=this.gridBodyCtrl;a.ensureIndexVisible(e),a.ensureColumnVisible(l);const h={rowIndex:e,column:l,rowPinned:s};n.setFocusedCell({...h,forceBrowserFocus:!0}),r?.setRangeToCell(h)}addListeners(){this.addManagedEventListeners({rowEditingStarted:t=>{this.activeRowEdit={rowIndex:t.rowIndex,rowPinned:t.rowPinned}},rowEditingStopped:()=>{const t=new pp(this.cellValueChanges);this.pushActionsToUndoStack(t),this.activeRowEdit=null},cellEditingStarted:t=>{this.activeCellEdit={column:t.column,rowIndex:t.rowIndex,rowPinned:t.rowPinned}},cellEditingStopped:t=>{if(this.activeCellEdit=null,t.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){const t=new pp(this.cellValueChanges);this.pushActionsToUndoStack(t)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{const t=new pp(this.cellValueChanges);this.pushActionsToUndoStack(t),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:t=>{const e=new fp(this.cellValueChanges,t.initialRange,t.finalRange);this.pushActionsToUndoStack(e),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let t;const{rangeSvc:e,gos:i}=this.beans;t=e&&ze(i)?new fp(this.cellValueChanges,void 0,void 0,[...e.getCellRanges()]):new pp(this.cellValueChanges),this.pushActionsToUndoStack(t),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:t})=>this.stopBigChange("batchEditing",t),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:t})=>this.stopBigChange("bulkEditing",t)})}startBigChange(t){this.updateBigChange(t,!0)}updateBigChange(t,e){"bulkEditing"===t?this.bulkEditing=e:this.batchEditing=e}stopBigChange(t,e){if("bulkEditing"===t&&!this.bulkEditing||"batchEditing"===t&&!this.batchEditing)return;if(this.updateBigChange(t,!1),0===e?.length)return;const i=new pp(e??[]);this.pushActionsToUndoStack(i),this.cellValueChanges=[]}pushActionsToUndoStack(t){this.undoStack.push(t),this.cellValueChanges=[],this.redoStack.clear()}}],apiFunctions:{undoCellEditing:function(t){t.undoRedo?.undo("api")},redoCellEditing:function(t){t.undoRedo?.redo("api")},getCurrentUndoSize:function(t){return t.undoRedo?.getCurrentUndoStackSize()??0},getCurrentRedoSize:function(t){return t.undoRedo?.getCurrentRedoStackSize()??0}},dependsOn:[tf]},sf={moduleName:"TextEditor",version:se,userComponents:{agCellEditor:Mp,agTextCellEditor:Mp},dependsOn:[tf]},of={moduleName:"NumberEditor",version:se,userComponents:{agNumberCellEditor:{classImp:class extends vp{constructor(){super(new Fp((()=>this.getLocaleTextFunc())))}}}},dependsOn:[tf]},nf={moduleName:"DateEditor",version:se,userComponents:{agDateCellEditor:class extends vp{constructor(){super(new bp((()=>this.beans.dataTypeSvc),(()=>this.getLocaleTextFunc())))}},agDateStringCellEditor:class extends vp{constructor(){super(new Sp((()=>this.beans.dataTypeSvc),(()=>this.getLocaleTextFunc())))}}},dependsOn:[tf]},rf={moduleName:"CheckboxEditor",version:se,userComponents:{agCheckboxCellEditor:class extends fa{constructor(){super(wp,[Oo]),this.eEditor=Ui}initialiseEditor(t){const e=t.value??void 0,i=this.eEditor;i.setValue(e),i.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(e),this.addManagedListeners(i,{fieldValueChanged:t=>this.setAriaLabel(t.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(t){const e=this.getLocaleTextFunc(),i=E(e,t),s=e("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${s} (${i})`)}getValidationElement(t){return t?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){const{params:t}=this,{getValidationErrors:e}=t,i=this.getValue();return e?e({value:i,internalErrors:null,cellEditorParams:t}):null}}},dependsOn:[tf]},lf={moduleName:"SelectEditor",version:se,userComponents:{agSelectCellEditor:class extends fa{constructor(){super(kp,[Zo]),this.eEditor=Ui,this.startedByEnter=!1}wireBeans(t){this.valueSvc=t.valueSvc}initialiseEditor(t){this.focusAfterAttached=t.cellStartedEdit;const{eEditor:e,valueSvc:i,gos:o}=this,{values:n,value:r,eventKey:l}=t;if(s(n))return void pe(58);this.startedByEnter=null!=l&&l===As;let a=!1;n.forEach((s=>{const o={value:s},n=i.formatValue(t.column,null,s);o.text=null!=n?n:s,e.addOption(o),a=a||r===s})),a?e.setValue(t.value,!0):t.values.length&&e.setValue(t.values[0],!0);const{valueListGap:h,valueListMaxWidth:c,valueListMaxHeight:u}=t;null!=h&&e.setPickerGap(h),null!=u&&e.setPickerMaxHeight(u),null!=c&&e.setPickerMaxWidth(c),"fullRow"!==o.get("editType")&&this.addManagedListeners(this.eEditor,{selectedItem:()=>t.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout((()=>{this.isAlive()&&this.eEditor.showPicker()}))}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){const{params:t}=this,{values:e,getValidationErrors:i}=t,s=this.getValue();let o=[];if(e&&!e.includes(s)){const t=this.getLocaleTextFunc();o.push(t("invalidSelectionValidation","Invalid selection."))}else o=null;return i?i({value:s,internalErrors:o,cellEditorParams:t}):o}}},dependsOn:[tf]},af={moduleName:"LargeTextEditor",version:se,userComponents:{agLargeTextCellEditor:class extends fa{constructor(){super(xp,[Vo]),this.eEditor=Ui}initialiseEditor(t){const{eEditor:e}=this,{cellStartedEdit:i,eventKey:s,maxLength:o,cols:n,rows:r}=t;let l;this.focusAfterAttached=i,e.getInputElement().setAttribute("title",""),e.setMaxLength(o||200).setCols(n||60).setRows(r||10),i?(this.focusAfterAttached=!0,s===Ts||s===Vs?l="":s&&1===s.length?l=s:(l=this.getStartValue(t),s!==Ls&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,l=this.getStartValue(t)),null!=l&&e.setValue(l,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(t){const{value:e}=t;return e?.toString()??e}onKeyDown(t){const e=t.key;(e===Os||e===Ns||e===Bs||e===Gs||t.shiftKey&&e===As)&&t.stopPropagation()}afterGuiAttached(){const{eEditor:t,focusAfterAttached:e,highlightAllOnFocus:i}=this,s=this.getLocaleTextFunc();t.setInputAriaLabel(s("ariaInputEditor","Input Editor")),e&&(t.getFocusableElement().focus(),i&&t.getInputElement().select())}getValue(){const{eEditor:t,params:e}=this,{value:s}=e,o=t.getValue();return i(o)||i(s)?e.parseValue(o):s}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){const{params:t}=this,{maxLength:e,getValidationErrors:i}=t,s=this.getLocaleTextFunc(),o=this.getValue();let n=[];return"string"==typeof o&&null!=e&&o.length>e&&n.push(s("maxLengthValidation",`Must be ${e} characters or fewer.`,[String(e)])),n.length||(n=null),i?i({value:o,internalErrors:n,cellEditorParams:t}):n}}},dependsOn:[tf]},hf={moduleName:"CustomEditor",version:se,dependsOn:[tf]};function cf(t){return Ba(t)?t.pinnedSibling:t.footer?t.sibling:t}function uf(t,e){return(0!==t||0!==e)&&(t>0&&e>0?void 0:t>0)}function df(t){const e=!1===t.isSelected(),i=t.childrenAfterFilter?.some(df)??!1;return e||i}var gf={moduleName:"SharedRowSelection",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",(t=>{this.onSelectionOptionsChanged(t.currentValue,t.previousValue,Ri(t.source))})),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(t){const e=this.columns;null!=e&&(t.list=e.list.concat(t.list),t.tree=e.tree.concat(t.tree),function(t){t.map={};for(const e of t.list)t.map[e.getId()]=e}(t))}createColumns(t,e){const i=t.treeDepth,s=(this.columns?.treeDepth??-1)==i,o=this.generateSelectionCols();if(ci(o,this.columns?.list??[],((t,e)=>t.getColId()===e.getColId()))&&s)return;(()=>{Ci(this.beans,this.columns?.tree),this.columns=null})();const{colGroupSvc:n}=this.beans,r=n?.findDepth(t.tree)??0,l=n?.balanceTreeForAutoCols(o,r)??[];this.columns={list:o,tree:l,treeDepth:r,map:{}},e((t=>{if(!t)return null;const e=t.filter((t=>!yi(t)));return[...o,...e]}))}updateColumns(t){const e=Ri(t.source);for(const i of this.columns?.list??[]){const s=this.createSelectionColDef(t.currentValue);i.setColDef(s,null,e),Bi(this.beans,{state:[{...s,colId:i.getColId()}]},e)}}getColumn(t){return this.columns?.list.find((e=>Fi(e,t)))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:t,beans:e}=this,i=t.get("rowSelection");if("object"!=typeof i||!Se(t))return!1;const s=(e.autoColSvc?.getColumns()?.length??0)>0;if("autoGroupColumn"===i.checkboxLocation&&s)return!1;const o=!!Be(i),n=Ge(i);return o||n}createSelectionColDef(t){const{gos:e}=this,i=t??e.get("selectionColumnDef"),s=e.get("enableRtl"),{rowSpan:o,spanRows:n,...r}=i??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:s?"right":"left",comparator(t,e,i,s){const o=i.isSelected();return o===s.isSelected()?0:o?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...r,colId:fi,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const t=this.createSelectionColDef(),e=t.colId;this.gos.validateColDef(t,e,!0);const i=new si(t,null,e,!1);return this.createBean(i),[i]}onSelectionOptionsChanged(t,e,i){const s=(e&&"string"!=typeof e?Be(e):void 0)!==(t&&"string"!=typeof t?Be(t):void 0),o=(e&&"string"!=typeof e?Ge(e):void 0)!==(t&&"string"!=typeof t?Ge(t):void 0),n=Ve(t),r=Ve(e);(s||o||n!==r)&&this.beans.colModel.refreshAll(i)}destroy(){Ci(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(t,e,i){if(!this.columns?.list.length)return;const s=t.length+e.length+i.length;if(0===s)return;const o=this.columns.list[0];if(!o.isVisible())return;const n=this.beans.rowNumbersSvc?.getColumn(mi);(n?2:1)===s&&(()=>{let s;switch(o.pinned){case"left":case!0:s=t;break;case"right":s=i;break;default:s=e}s&&di(s,o)})()}}],apiFunctions:{setNodesSelected:function(t,e){if(!e.nodes.every((t=>t.rowPinned&&!Ba(t)?(pe(59),!1):void 0!==t.id||(pe(60),!1))))return;const{nodes:i,source:s,newValue:o}=e;t.selectionSvc?.setNodesSelected({nodes:i,source:s??"api",newValue:o})},selectAll:function(t,e,i="apiSelectAll"){t.selectionSvc?.selectAllRowNodes({source:i,selectAll:e})},deselectAll:function(t,e,i="apiSelectAll"){t.selectionSvc?.deselectAllRowNodes({source:i,selectAll:e})},selectAllFiltered:function(t,e="apiSelectAllFiltered"){t.selectionSvc?.selectAllRowNodes({source:e,selectAll:"filtered"})},deselectAllFiltered:function(t,e="apiSelectAllFiltered"){t.selectionSvc?.deselectAllRowNodes({source:e,selectAll:"filtered"})},selectAllOnCurrentPage:function(t,e="apiSelectAllCurrentPage"){t.selectionSvc?.selectAllRowNodes({source:e,selectAll:"currentPage"})},deselectAllOnCurrentPage:function(t,e="apiSelectAllCurrentPage"){t.selectionSvc?.deselectAllRowNodes({source:e,selectAll:"currentPage"})},getSelectedNodes:function(t){return t.selectionSvc?.getSelectedNodes()??[]},getSelectedRows:function(t){return t.selectionSvc?.getSelectedRows()??[]}}},pf={moduleName:"RowSelection",version:se,rowModels:["clientSide","infinite","viewport"],beans:[class extends ja{constructor(){super(...arguments),this.beanName="selectionSvc",this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();const{gos:t}=this;this.mode=Ue(t),this.groupSelectsDescendants=Ze(t),this.groupSelectsFiltered="filteredDescendants"===Ke(t),this.masterSelectsDetail="detail"===_e(t),this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],(()=>{const e=Ze(t),i=Ue(t),s="filteredDescendants"===Ke(t);this.masterSelectsDetail="detail"===_e(t),e===this.groupSelectsDescendants&&s===this.groupSelectsFiltered&&i===this.mode||(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=e,this.groupSelectsFiltered=s,this.mode=i)})),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(t,e,i){if(this.isRowSelectionBlocked(e))return 0;const s=this.inferNodeSelections(e,t.shiftKey,t.metaKey||t.ctrlKey,i);if(null==s)return 0;if(this.selectionCtx.selectAll=!1,"select"in s)return s.reset?this.resetNodes():this.selectRange(s.deselect,!1,i),this.selectRange(s.select,!0,i);{const e=s.checkFilteredNodes?df(s.node):s.newValue;return this.setNodesSelected({nodes:[s.node],newValue:e,clearSelection:s.clearSelection,keepDescendants:s.keepDescendants,event:t,source:i})}}setNodesSelected({newValue:t,clearSelection:e,suppressFinishActions:i,nodes:s,event:o,source:n,keepDescendants:r=!1}){if(0===s.length)return 0;const{gos:l}=this;if(!Se(l)&&t)return pe(132),0;if(s.length>1&&!this.isMultiSelect())return pe(130),0;let a=0;for(let e=0;e<s.length;e++){const i=cf(s[e]);!i.rowPinned||Ba(i)?void 0!==i.id?(this.groupSelectsFiltered&&i.group&&!l.get("treeData")||this.selectRowNode(i,t,o,n)&&(this.detailSelection.delete(i.id),a++),this.groupSelectsDescendants&&i.childrenAfterGroup?.length&&(a+=this.selectChildren(i,t,n))):pe(60):pe(59)}return i||(1===s.length&&"api"===n&&this.selectionCtx.setRoot(cf(s[0])),t&&(e||!this.isMultiSelect())&&(a+=this.clearOtherNodes(cf(s[0]),r,n)),a>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n))),a}selectRange(t,e,i){let s=0;return t.forEach((t=>{const o=cf(t);o.group&&this.groupSelectsDescendants||this.selectRowNode(o,e,void 0,i)&&s++})),s>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)),s}selectChildren(t,e,i){const s=this.groupSelectsFiltered?t.childrenAfterAggFilter:t.childrenAfterGroup;return s?this.setNodesSelected({newValue:e,clearSelection:!1,suppressFinishActions:!0,source:i,nodes:s}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){const t=[];return this.selectedNodes.forEach((e=>e.data&&t.push(e.data))),t}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(t){const e=new Map;this.selectedNodes.forEach(((i,s)=>{t(i)&&e.set(s,i)})),this.selectedNodes=e}updateGroupsFromChildrenSelections(t,e){if(!this.groupSelectsDescendants)return!1;const{gos:i,rowModel:s}=this.beans;if(!Ce(i))return!1;const o=s.rootNode;if(!o)return!1;e||((e=new Eh(!0,o)).active=!1);let n=!1;return e.forEachChangedNodeDepthFirst((e=>{if(e!==o){const i=this.calculateSelectedFromChildren(e);n=this.selectRowNode(e,null!==i&&i,void 0,t)||n}})),n}clearOtherNodes(t,e,i){const s=new Map;let o=0;return this.selectedNodes.forEach((n=>{const r=n.id==t.id;if(!(e&&function(t,e){let i=e.parent;for(;i;){if(i===t)return!0;i=i.parent}return!1}(t,n)||r)){const t=this.selectedNodes.get(n.id);o+=this.setNodesSelected({nodes:[t],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:i}),this.groupSelectsDescendants&&n.parent&&s.set(n.parent.id,n.parent)}})),s.forEach((t=>{const e=this.calculateSelectedFromChildren(t);this.selectRowNode(t,null!==e&&e,void 0,i)})),o}onRowSelected(t){const e=t.node;this.groupSelectsDescendants&&e.group||(e.isSelected()?this.selectedNodes.set(e.id,e):this.selectedNodes.delete(e.id))}syncInRowNode(t,e){this.syncInOldRowNode(t,e),this.syncInNewRowNode(t)}createDaemonNode(t){if(!t.id)return;const e=new nr(this.beans);return e.id=t.id,e.data=t.data,e.__selected=t.__selected,e.level=t.level,e}syncInOldRowNode(t,e){e&&t.id!==e.id&&this.selectedNodes.get(e.id)==t&&this.selectedNodes.set(e.id,e)}syncInNewRowNode(t){this.selectedNodes.has(t.id)?(t.__selected=!0,this.selectedNodes.set(t.id,t)):t.__selected=!1}reset(t){const e=this.getSelectionCount();this.resetNodes(),e&&this.dispatchSelectionChanged(t)}resetNodes(){this.selectedNodes.forEach((t=>{this.selectRowNode(t,!1)})),this.selectedNodes.clear()}getBestCostNodeSelection(){const{gos:t,rowModel:e}=this.beans;if(!Ce(t))return;const i=e.getTopLevelNodes();if(null===i)return;const s=[];return function t(e){for(let i=0,o=e.length;i<o;i++){const o=e[i];o.isSelected()?s.push(o):o.group&&o.childrenAfterGroup&&t(o.childrenAfterGroup)}}(i),s}isEmpty(){return 0===this.getSelectionCount()}deselectAllRowNodes({source:t,selectAll:e}){const i=Ce(this.gos);let s=!1;const o=e=>{const i=this.selectRowNode(cf(e),!1,void 0,t);s||(s=i)};if("currentPage"===e||"filtered"===e){if(!i)return void fe(102);this.getNodesToSelect(e).forEach(o)}else this.selectedNodes.forEach(o),this.reset(t);if(this.selectionCtx.selectAll=!1,i&&this.groupSelectsDescendants){const e=this.updateGroupsFromChildrenSelections(t);s||(s=e)}s&&this.dispatchSelectionChanged(t)}getSelectedCounts(t){let e=0,i=0;return this.getNodesToSelect(t).forEach((t=>{this.groupSelectsDescendants&&t.group||(t.isSelected()?e++:t.selectable&&i++)})),{selectedCount:e,notSelectedCount:i}}getSelectAllState(t){const{selectedCount:e,notSelectedCount:i}=this.getSelectedCounts(t);return uf(e,i)??null}hasNodesToSelect(t){return this.getNodesToSelect(t).filter((t=>t.selectable)).length>0}getNodesToSelect(t){if(!this.canSelectAll())return[];const e=[],i=t=>e.push(t);if("currentPage"===t)return this.forEachNodeOnPage((t=>{if(t.group)if(t.expanded||t.footer)this.groupSelectsDescendants||i(t);else{const e=t=>{i(t),t.childrenAfterFilter?.forEach(e)};e(t)}else i(t)})),e;const s=this.beans.rowModel;return"filtered"===t?(s.forEachNodeAfterFilter(i),e):(s.forEachNode(i),e)}forEachNodeOnPage(t){const{pageBounds:e,rowModel:i}=this.beans,s=e.getFirstRow(),o=e.getLastRow();for(let e=s;e<=o;e++){const s=i.getRow(e);s&&t(s)}}selectAllRowNodes(t){const{gos:e,selectionCtx:i}=this;if(!Se(e))return void pe(132);if(function(t){return"string"!=typeof t.get("rowSelection")}(e)&&!je(e))return void pe(130);if(!this.canSelectAll())return;const{source:s,selectAll:o}=t;let n=!1;if(this.getNodesToSelect(o).forEach((t=>{const e=this.selectRowNode(cf(t),!0,void 0,s);n||(n=e)})),i.selectAll=!0,Ce(e)&&this.groupSelectsDescendants){const t=this.updateGroupsFromChildrenSelections(s);n||(n=t)}n&&this.dispatchSelectionChanged(s)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(t,e,i){if(t||(t=[]),!Array.isArray(t))return void fe(103);const s=new Set(t),o=[];this.beans.rowModel.forEachNode((t=>{s.has(t.id)&&o.push(t)})),i&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:o,source:e})}canSelectAll(){return Ce(this.beans.gos)}updateSelectable(t){const{gos:e,rowModel:i}=this.beans;if(!Se(e))return;const s="selectableChanged",o=void 0!==t,n=Ce(e)&&this.groupSelectsDescendants,r=[],l=t=>{if(!o||t.group)if(n&&t.group){const e=t.childrenAfterGroup?.some((t=>t.selectable))??!1;this.setRowSelectable(t,e,!0)}else!this.updateRowSelectable(t,!0)&&t.isSelected()&&r.push(t)};if(n){if(void 0===t){const e=i.rootNode;t=e?new Eh(!1,e):void 0}t?.forEachChangedNodeDepthFirst(l,!o,!o)}else i.forEachNode(l);r.length&&this.setNodesSelected({nodes:r,newValue:!1,source:s}),!o&&n&&this.updateGroupsFromChildrenSelections?.(s)}updateSelectableAfterGrouping(t){if(this.updateSelectable(t),this.groupSelectsDescendants){const e=this.updateGroupsFromChildrenSelections?.("rowGroupChanged",t);e&&this.dispatchSelectionChanged("rowGroupChanged")}}refreshMasterNodeState(t,e){if(!this.masterSelectsDetail)return;const i=t.detailNode?.detailGridInfo?.api;if(!i)return;const s=function(t){let e=0,i=0;return t.forEachNode((t=>{t.isSelected()?e++:t.selectable&&i++})),uf(e,i)}(i);if(t.isSelected()!==s&&this.selectRowNode(t,s,e,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),!s){const e=this.detailSelection.get(t.id)??new Set;for(const t of i.getSelectedNodes())e.add(t.id);this.detailSelection.set(t.id,e)}}setDetailSelectionState(t,e,i){if(this.masterSelectsDetail)if(je(e))switch(t.isSelected()){case!0:i.selectAll();break;case!1:i.deselectAll();break;case void 0:{const e=this.detailSelection.get(t.id);if(e){const t=[];for(const s of e){const e=i.getRowNode(s);e&&t.push(e)}i.setNodesSelected({nodes:t,newValue:!0,source:"masterDetail"})}break}}else pe(269)}dispatchSelectionChanged(t){this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:this.getSelectedNodes(),serverSideState:null})}}],dependsOn:[gf]};function ff(t){t.rowModel?.onRowHeightChanged()}function mf(t){t.rowAutoHeight?.active?pe(3):t.rowModel?.resetRowHeights()}var wf={moduleName:"CsrmSsrmSharedApi",version:se,apiFunctions:{expandAll:function(t){t.expansionSvc?.expandAll(!0)},collapseAll:function(t){t.expansionSvc?.expandAll(!1)}}},vf={moduleName:"RowModelSharedApi",version:se,apiFunctions:{onRowHeightChanged:ff,resetRowHeights:mf}},Cf={moduleName:"SsrmInfiniteSharedApi",version:se,apiFunctions:{setRowCount:function(t,e,i){const s=function(t){const e=t.rowModel;return"serverSide"===e.getType()?e:void 0}(t);if(s)return 0===t.rowGroupColsSvc?.columns.length?e<0?void fe(238):void s.setRowCount(e,i):void fe(28);Xd(t)?.setRowCount(e,i)},getCacheBlockState:function(t){return be(t.gos)?t.rowModel.getBlockStates():t.rowNodeBlockLoader?.getBlockState()??{}},isLastRowIndexKnown:function(t){return t.rowModel.isLastRowIndexKnown()}}},bf={moduleName:"AlignedGrids",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let t=this.gos.get("alignedGrids")??[];const e="function"==typeof t;return"function"==typeof t&&(t=t()),t.map((t=>{if(!t)return fe(18),void(e||fe(20));if(this.isGridApi(t))return t;const i=t;return"current"in i?i.current?.api:(i.api||fe(19),i.api)})).filter((t=>!!t&&!t.isDestroyed()))}isGridApi(t){return!!t&&!!t.dispatchEvent}postConstruct(){const t=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:t,columnVisible:t,columnPinned:t,columnGroupOpened:t,columnResized:t,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:t})=>this.onColumnEvent(t),alignedGridScroll:({event:t})=>this.onScrollEvent(t)})}fireEvent(t){if(!this.consuming)for(const e of this.getAlignedGridApis())e.isDestroyed()||e.dispatchEvent(t)}onEvent(t){this.consuming=!0,t(),this.consuming=!1}fireColumnEvent(t){this.fireEvent({type:"alignedGridColumn",event:t})}fireScrollEvent(t){"horizontal"===t.direction&&this.fireEvent({type:"alignedGridScroll",event:t})}onScrollEvent(t){this.onEvent((()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(t.left,!0)}))}extractDataFromEvent(t,e){const i=[];return t.columns?t.columns.forEach((t=>{i.push(e(t))})):t.column&&i.push(e(t.column)),i}getMasterColumns(t){return this.extractDataFromEvent(t,(t=>t))}getColumnIds(t){return this.extractDataFromEvent(t,(t=>t.getColId()))}onColumnEvent(t){this.onEvent((()=>{switch(t.type){case"columnMoved":case"columnVisible":case"columnPinned":case"columnResized":this.processColumnEvent(t);break;case"columnGroupOpened":this.processGroupOpenedEvent(t);break;case"columnPivotChanged":pe(21)}}))}processGroupOpenedEvent(t){const{colGroupSvc:e}=this.beans;if(e)for(const i of t.columnGroups){let t=null;i&&(t=e.getProvidedColGroup(i.getGroupId())),i&&!t||e.setColumnGroupOpened(t,i.isExpanded(),"alignedGridChanged")}}processColumnEvent(t){const e=t.column;let i=null;const s=this.beans,{colResize:o,ctrlsSvc:n,colModel:r}=s;if(e&&(i=r.getColDefCol(e.getColId())),e&&!i)return;const l=this.getMasterColumns(t);switch(t.type){case"columnMoved":Bi(s,{state:t.api.getColumnState().map((t=>({colId:t.colId}))),applyOrder:!0},"alignedGridChanged");break;case"columnVisible":Bi(s,{state:t.api.getColumnState().map((t=>({colId:t.colId,hide:t.hide})))},"alignedGridChanged");break;case"columnPinned":Bi(s,{state:t.api.getColumnState().map((t=>({colId:t.colId,pinned:t.pinned})))},"alignedGridChanged");break;case"columnResized":{const e=t,i={};for(const t of l)i[t.getId()]={key:t.getColId(),newWidth:t.getActualWidth()};for(const t of e.flexColumns??[])i[t.getId()]&&delete i[t.getId()];o?.setColumnWidths(Object.values(i),!1,e.finished,"alignedGridChanged");break}}const a=n.getGridBodyCtrl().isVerticalScrollShowing();for(const t of this.getAlignedGridApis())t.setGridOption("alwaysShowVerticalScroll",a)}}],dependsOn:[kc]},yf=class extends Dt{constructor(t){super(),this.rootNode=t,this.nextId=0,this.allNodesMap={},xf(t)}getRowNode(t){return this.allNodesMap[t]}setNewRowData(t){const{selectionSvc:e,pinnedRowModel:i,groupStage:s}=this.beans;e?.reset("rowDataChanged"),i?.isManual()&&i.reset(),this.dispatchRowDataUpdateStarted(t),this.allNodesMap=Object.create(null),this.nextId=0;const o=xf(this.rootNode),n=new Array(t.length);o._leafs=n;let r=0;const l=s?.getNestedDataGetter(),a=l?new Set:null,h=(t,e)=>{const i=t.level+1;for(let s=0,o=e.length;s<o;++s){const o=e[s];if(!o)continue;const c=this.createRowNode(o,i);if(c.sourceRowIndex=r,n[r++]=c,a&&!a.has(o)){a.add(o),c.treeParent=t;const e=l(o);e&&h(c,e)}}};h(o,t),n.length=r}setImmutableRowData(t,e){const{rootNode:i,gos:s}=this;this.dispatchRowDataUpdateStarted(e);const o=Ne(s),n=t.changedRowNodes,{adds:r,updates:l}=n,a=new Set,h=[],c=this.beans.groupStage?.getNestedDataGetter();let u=!!s.get("suppressMaintainUnsortedOrder")&&void 0,d=-1,g=!1;const p=(t,e)=>{if(!u&&void 0!==u){const e=t.sourceRowIndex;u=e<=d,d=e}t.data!==e&&(t.updateData(e),r.has(t)||l.add(t),!t.selectable&&t.isSelected()&&h.push(t))},f=(t,e,i)=>{for(let s=0,n=e.length;s<n;++s){const n=e[s];if(!n)continue;let l=this.getRowNode(o({data:n,level:i}));if(l?(p(l,n),g||(g=!!c&&l.treeParent!==t)):(l=this.createRowNode(n,i),r.add(l)),!c||a.has(l)){a.add(l);continue}a.add(l),l.treeParent=t;const h=c(n);h&&f(l,h,i+1)}};f(i,e,0);const m=this.deleteUnusedNodes(a,n,h)||u||r.size>0;if(m){const t=i._leafs??(i._leafs=[]);void 0===u?Pf(t,a,n):kf(t,a)&&(n.reordered=!0)}(m||g||l.size)&&(t.rowDataUpdated=!0,this.deselect(h))}deleteUnusedNodes(t,{removals:e},i){const s=this.rootNode._leafs;for(let o=0,n=s.length;o<n;o++){const n=s[o];t.has(n)||(e.add(n),n.isSelected()&&i.push(n),this.deleteNode(n))}return e.size>0}updateRowData(t,e){if(this.dispatchRowDataUpdateStarted(t.add),this.beans.groupStage?.getNestedDataGetter())return pe(268),{remove:[],update:[],add:[]};const i=[],s=Ne(this.gos),o=this.executeRemove(s,t,e,i),n=this.executeUpdate(s,t,e,i),r=this.executeAdd(t,e);return this.deselect(i),{remove:o,update:n,add:r}}executeRemove(t,{remove:e},{adds:i,updates:s,removals:o},n){const r=this.rootNode._leafs,l=r?.length,a=e?.length;if(!a||!l)return[];let h,c=0,u=l,d=0;const g=new Array(a);for(let r=0;r<a;++r){const l=this.lookupNode(t,e[r]);if(!l)continue;const a=l.sourceRowIndex;a<u&&(u=a),a>d&&(d=a),l.isSelected()&&n.push(l),this.deleteNode(l),i.delete(l)?(h??(h=new Set),h.add(l)):(s.delete(l),o.add(l)),g[c++]=l}return g.length=c,c&&Ff(r,u,d,o,h),g}executeUpdate(t,{update:e},{adds:i,updates:s},o){const n=e?.length;if(!n)return[];const r=new Array(n);let l=0;for(let a=0;a<n;a++){const n=e[a],h=this.lookupNode(t,n);h&&(h.updateData(n),!h.selectable&&h.isSelected()&&o.push(h),r[l++]=h,i.has(h)||s.add(h))}return r.length=l,r}executeAdd(t,e){var i;const s=(i=this.rootNode)._leafs??(i._leafs=[]),o=s.length,n=t.add,r=n?.length;if(!r)return[];const l=o+r;let a=this.sanitizeAddIndex(s,t.addIndex);if(a<o){for(let t=o-1,e=l-1;t>=a;--t){const i=s[t];i.sourceRowIndex=e,s[e--]=i}e.reordered=!0}s.length=l;const h=new Array(r),c=e.adds;for(let t=0;t<r;t++){const e=this.createRowNode(n[t],0);c.add(e),e.sourceRowIndex=a,s[a]=e,h[t]=e,a++}return h}dispatchRowDataUpdateStarted(t){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:t?.length?t[0]:null})}deselect(t){const e="rowDataChanged",i=this.beans.selectionSvc;t.length&&i?.setNodesSelected({newValue:!1,nodes:t,suppressFinishActions:!0,source:e}),i?.updateGroupsFromChildrenSelections?.(e),t.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:i?.getSelectedNodes()??null,serverSideState:null})}createRowNode(t,e){const i=new nr(this.beans);i.parent=this.rootNode,i.level=e,i.group=!1,i.expanded=!1,i.setDataAndId(t,String(this.nextId++));const s=i.id,o=this.allNodesMap;return o[s]&&pe(2,{nodeId:s}),o[s]=i,i}deleteNode(t){t.clearRowTopAndRowIndex();const e=t.id,i=this.allNodesMap;i[e]===t&&delete i[e];const s=t.pinnedSibling;s&&this.beans.pinnedRowModel?.pinRow(s,null)}lookupNode(t,e){if(!t)return Rf(this.rootNode._leafs,e);const i=t({data:e,level:0});return this.allNodesMap[i]||(fe(4,{id:i}),null)}sanitizeAddIndex(t,e){const i=t.length;if("number"!=typeof e)return i;if(e<0||e>=i||Number.isNaN(e))return i;e=Math.ceil(e);const s=this.gos;return e>0&&s.get("treeData")&&s.get("getDataPath")&&(e=Sf(t,e)),e}},Sf=(t,e)=>{for(let i=0,s=t.length;i<s;i++){const s=t[i];if(s?.rowIndex==e-1)return i+1}return e},xf=t=>{t.group=!0,t.level=-1,t.id="ROOT_NODE_ID",0!==t._leafs?.length&&(t._leafs=[]);const e=[],i=[],s=[],o=[];t.childrenAfterGroup=e,t.childrenAfterSort=i,t.childrenAfterAggFilter=s,t.childrenAfterFilter=o;const n=t.sibling;return n&&(n.childrenAfterGroup=e,n.childrenAfterSort=i,n.childrenAfterAggFilter=s,n.childrenAfterFilter=o,n.childrenMapped=t.childrenMapped),t.updateHasChildren(),t},Rf=(t,e)=>{if(t)for(let i=0,s=t.length;i<s;i++){const s=t[i];if(s.data===e)return s}return fe(5,{data:e}),null},Ff=(t,e,i,s,o)=>{for(let n=e=Math.max(0,e),r=t.length;n<r;++n){const r=t[n];n<=i&&(s.has(r)||o?.has(r))||(r.sourceRowIndex=e,t[e++]=r)}t.length=e},kf=(t,e)=>{t.length=e.size;let i=0,s=!1,o=!1;for(const n of e){const e=n.sourceRowIndex;e===i?o||(o=s):(e>=0?o=!0:s=!0,n.sourceRowIndex=i,t[i]=n),++i}return o},Pf=(t,e,{removals:i,adds:s})=>{const o=t.length;t.length=e.size;let n=0;for(let e=0;e<o;++e){const s=t[e];i.has(s)||(n!==e&&(s.sourceRowIndex=n,t[n]=s),++n)}for(const e of s)e.sourceRowIndex<0&&(e.sourceRowIndex=n,t[n++]=e);t.length=n},Df=t=>{const e=t.childrenAfterSort,i=t.sibling;if(i&&(i.childrenAfterSort=e),e)for(let t=0,i=e.length-1;t<=i;t++){const s=e[t],o=0===t,n=t===i;s.firstChild!==o&&(s.firstChild=o,s.dispatchRowEvent("firstChildChanged")),s.lastChild!==n&&(s.lastChild=n,s.dispatchRowEvent("lastChildChanged")),s.childIndex!==t&&(s.childIndex=t,s.dispatchRowEvent("childIndexChanged"))}},Mf=(t,e,i,s)=>{let o=0,n=0;const r=i.length,l=s.length,a=new Array(r+l);let h=0;for(;o<r&&n<l;){const r=i[o],l=s[n];t.compareRowNodes(e,r,l)<0?(a[h++]=r.rowNode,++o):(a[h++]=l.rowNode,++n)}for(;o<r;)a[h++]=i[o++].rowNode;for(;n<l;)a[h++]=s[n++].rowNode;return a},Tf=(t,e)=>{const i=e.childrenAfterGroup;if(i)for(let e=0,s=i.length;e<s;++e){const s=i[e];s.data&&t.push(s),s.group&&Tf(t,s)}},Ef={moduleName:"ClientSideRowModel",version:se,rowModels:["clientSide"],beans:[class extends Dt{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.rowDataUpdatedPending=!1,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingModel=!1,this.rowNodesCountReady=!1,this.stages=[],this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=Ht(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){const t=new nr(this.beans);this.rootNode=t,this.nodeManager=this.createBean(new yf(t));const e=this.refreshModel.bind(this,{step:"group"}),i=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:e,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:e,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){const{beans:t,stagesRefreshProps:e}=this,i=[t.groupStage,t.filterStage,t.pivotStage,t.aggStage,t.sortStage,t.filterAggStage,t.flattenStage].filter((t=>!!t));this.stages=i;for(let t=i.length-1;t>=0;--t)for(const s of i[t].refreshProps)e.set(s,t);this.addManagedPropertyListeners([...e.keys()],(t=>{const e=t.changeSet?.properties;e&&this.onPropChange(e)})),this.addManagedPropertyListener("rowData",(()=>this.onPropChange(["rowData"]))),this.addManagedPropertyListener("rowHeight",(()=>this.resetRowHeights()))}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(t,e,i,s){let o,n=!1;do{o=!1;const r=this.getRowIndexAtPixel(t),l=this.getRowIndexAtPixel(e),a=Math.max(r,i),h=Math.min(l,s);for(let t=a;t<=h;t++){const e=this.getRow(t);if(e.rowHeightEstimated){const t=Re(this.beans,e);e.setRowHeight(t.height),o=!0,n=!0}}o&&this.setRowTopAndRowIndex()}while(o);return n}onPropChange(t){const{nodeManager:e,gos:i,beans:s}=this,o=s.groupStage;if(!e)return;const n=new Set(t),r=o?.onPropChange(n);let l;n.has("rowData")?l=i.get("rowData"):r&&(l=o?.extractData()),l&&!Array.isArray(l)&&(l=null,pe(1));const a={step:"nothing",changedProps:n};l&&(!r&&!this.isEmpty()&&l.length>0&&i.exists("getRowId")&&!i.get("resetRowDataOnUpdate")?(a.keepRenderedRows=!0,a.animate=!i.get("suppressAnimationFrame"),a.changedRowNodes=new Rh,e.setImmutableRowData(a,l)):(a.rowDataUpdated=!0,a.newData=!0,e.setNewRowData(l),this.rowNodesCountReady=!0));const h=a.rowDataUpdated?"group":this.getRefreshedStage(t);h&&(a.step=h,this.refreshModel(a))}getRefreshedStage(t){const{stages:e,stagesRefreshProps:i}=this,s=e.length;let o=s;for(let e=0,s=t.length;e<s&&o;++e)o=Math.min(o,i.get(t[e])??o);return o<s?e[o].step:null}setRowTopAndRowIndex(t){const{beans:e,rowsToDisplay:i}=this,s=e.environment.getDefaultRowHeight();let o=0;const n=ye(this.gos,"normal");for(let r=0,l=i.length;r<l;++r){const l=i[r],a=l.id;if(null!=a&&t?.add(a),null==l.rowHeight){const t=Re(e,l,n,s);l.setRowHeight(t.height,t.estimated)}l.setRowTop(o),l.setRowIndex(r),o+=l.rowHeight}}clearRowTopAndRowIndex(t,e){const i=t.active,s=t=>{null==t?.id||e.has(t.id)||t.clearRowTopAndRowIndex()},o=t=>{s(t),s(t.detailNode),s(t.sibling);const e=t.childrenAfterGroup;if(t.hasChildren()&&e&&(!i||-1==t.level||t.expanded))for(let t=0,i=e.length;t<i;++t)o(e[t])},n=this.rootNode;n&&o(n)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){const{rootNode:t,rowsToDisplay:e}=this;if(!t||!e.length)return 0;if(e[0]===t)return 1;const i=t.sibling?.displayed?1:0;return(t.childrenAfterSort?.length??0)+i}getTopLevelRowDisplayedIndex(t){const{beans:e,rootNode:i,rowsToDisplay:s}=this;if(!i||!s.length||s[0]===i)return t;const o=i.childrenAfterSort,n=t=>{let e=o[t];if(this.gos.get("groupHideOpenParents"))for(;e.expanded&&e.childrenAfterSort&&e.childrenAfterSort.length>0;)e=e.childrenAfterSort[0];return e.rowIndex},r=e.footerSvc;return r?r?.getTopDisplayIndex(s,t,o,n):n(t)}getTopLevelIndexFromDisplayedIndex(t){const{rootNode:e,rowsToDisplay:i}=this;if(!e||!i.length||i[0]===e)return t;let s=this.getRow(t);s.footer&&(s=s.sibling);let o=s.parent;for(;o&&o!==e;)s=o,o=s.parent;const n=e.childrenAfterSort?.indexOf(s)??-1;return n>=0?n:t}getRowBounds(t){const e=this.rowsToDisplay[t];return e?{rowTop:e.rowTop,rowHeight:e.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:Me(this.gos)})}onFilterChanged({afterDataChange:t,columns:e}){if(!t){const t=0===e.length||e.some((t=>t.isPrimary()));this.refreshModel({step:t?"filter":"filter_aggregates",keepRenderedRows:!0,animate:Me(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:Me(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(t){const e=new Eh(!1,this.rootNode);return e.active=t,e}isSuppressModelUpdateAfterUpdateTransaction(t){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:e,newData:i,rowDataUpdated:s}=t;return!(!e||i||!s||e.removals.size||e.adds.size)}refreshModel(t){const{nodeManager:e,beans:i,eventSvc:s,started:o,refreshingModel:n}=this;if(!e)return;const r=!!t.rowDataUpdated,l=t.changedPath??(t.changedPath=this.createChangePath(!t.newData&&r));if(o&&r&&s.dispatchEvent({type:"rowDataUpdated"}),!o||n||i.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(t))return void(this.rowDataUpdatedPending||(this.rowDataUpdatedPending=r));switch(this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,t.step="group"),this.refreshingModel=!0,i.masterDetailSvc?.refreshModel(t),r&&"group"!==t.step&&i.colFilter?.refreshModel(),t.step){case"group":this.doGrouping(t);case"filter":this.doFilter(l);case"pivot":this.doPivot(l);case"aggregate":this.doAggregate(l);case"filter_aggregates":this.doFilterAggregates(l);case"sort":this.doSort(t.changedRowNodes,l);case"map":this.doRowsToDisplay()}const a=new Set;this.setRowTopAndRowIndex(a),this.clearRowTopAndRowIndex(l,a),this.refreshingModel=!1,s.dispatchEvent({type:"modelUpdated",animate:t.animate,keepRenderedRows:t.keepRenderedRows,newData:t.newData,newPage:!1,keepUndoRedoStack:t.keepUndoRedoStack})}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(t,e){let i=!1,s=!1;const o=[],n=Ze(this.gos);return this.forEachNodeAfterFilterAndSort((r=>{if(!s)if(i&&(r===e||r===t)&&(s=!0,n&&r.group))Tf(o,r);else{if(!i){if(r!==e&&r!==t)return;i=!0,e===t&&(s=!0)}(!r.group||!n)&&o.push(r)}})),o}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(t){return this.rowsToDisplay[t]}isRowPresent(t){return this.rowsToDisplay.indexOf(t)>=0}getRowIndexAtPixel(t){const e=this.rowsToDisplay,i=e.length;if(this.isEmpty()||0===i)return-1;let s=0,o=i-1;if(t<=0)return 0;if(e[o].rowTop<=t)return o;let n=-1,r=-1;for(;;){const i=Math.floor((s+o)/2),l=e[i];if(this.isRowInPixel(l,t))return i;if(l.rowTop<t?s=i+1:l.rowTop>t&&(o=i-1),n===s&&r===o)return i;n=s,r=o}}isRowInPixel(t,e){const i=t.rowTop;return i<=e&&i+t.rowHeight>e}forEachLeafNode(t){const e=this.rootNode?._leafs;if(e)for(let i=0,s=e.length;i<s;++i)t(e[i],i)}forEachNode(t,e=!1){this.depthFirstSearchRowNodes(t,e)}forEachDisplayedNode(t){const e=this.rowsToDisplay;for(let i=0,s=e.length;i<s;++i)t(e[i],i)}forEachNodeAfterFilter(t,e=!1){this.depthFirstSearchRowNodes(t,e,(t=>t.childrenAfterAggFilter))}forEachNodeAfterFilterAndSort(t,e=!1){this.depthFirstSearchRowNodes(t,e,(t=>t.childrenAfterSort))}forEachPivotNode(t,e,i){const{colModel:s,rowGroupColsSvc:o}=this.beans;if(!s.isPivotMode())return;if(!o?.columns.length)return void t(this.rootNode,0);const n=i?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(t,e,(t=>t.leafGroup?null:t[n]))}depthFirstSearchRowNodes(t,e=!1,i=t=>t.childrenAfterGroup,s=this.rootNode,o=0){let n=o;if(!s)return n;const r=s===this.rootNode;if(r||t(s,n++),s.hasChildren()&&!s.footer){const o=i(s);if(o){const l=this.beans.footerSvc;n=l?.addTotalRows(n,s,t,e,r,"top")??n;for(const s of o)n=this.depthFirstSearchRowNodes(t,e,i,s,n);return l?.addTotalRows(n,s,t,e,r,"bottom")??n}}return n}doAggregate(t){const e=this.rootNode;e&&this.beans.aggStage?.execute({rowNode:e,changedPath:t})}doFilterAggregates(t){const e=this.rootNode,i=this.beans.filterAggStage;i?i.execute({rowNode:e,changedPath:t}):e.childrenAfterAggFilter=e.childrenAfterFilter}doSort(t,e){const i=this.beans.sortStage;i?i.execute({rowNode:this.rootNode,changedRowNodes:t,changedPath:e}):e.forEachChangedNodeDepthFirst((t=>{t.childrenAfterSort=t.childrenAfterAggFilter.slice(0),Df(t)}))}doGrouping(t){const e=this.rootNode,i=this.beans.groupStage,s=i?.execute({rowNode:e,changedRowNodes:t.changedRowNodes,changedPath:t.changedPath,afterColumnsChanged:!!t.afterColumnsChanged});if(void 0===s){const t=e._leafs;e.childrenAfterGroup=t,e.updateHasChildren();const i=e.sibling;i&&(i.childrenAfterGroup=t)}(s||t.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(t){const e=this.beans.filterStage;e?e.execute({rowNode:this.rootNode,changedPath:t}):t.forEachChangedNodeDepthFirst((t=>{t.childrenAfterFilter=t.childrenAfterGroup,mg(t)}),!0)}doPivot(t){this.beans.pivotStage?.execute({rowNode:this.rootNode,changedPath:t})}getRowNode(t){const e=this.nodeManager?.getRowNode(t);return"object"==typeof e?e:"string"==typeof t&&0===t.indexOf(er)?this.beans.groupStage?.getNode(t):void 0}batchUpdateRowData(t,e){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];const t=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout((()=>this.executeBatchUpdateRowData()),t)}this.asyncTransactions.push({rowDataTransaction:t,callback:e})}flushAsyncTransactions(){const t=this.asyncTransactionsTimer;t&&(clearTimeout(t),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){const{nodeManager:t,beans:e,eventSvc:i,asyncTransactions:s}=this;if(!t)return;e.valueCache?.onDataChanged();const o=[],n=[],r=new Rh;for(const{rowDataTransaction:e,callback:i}of s??[]){this.rowNodesCountReady=!0;const s=t.updateRowData(e,r);o.push(s),i&&n.push(i.bind(null,s))}this.commitTransactions(r),n.length>0&&setTimeout((()=>{for(let t=0,e=n.length;t<e;t++)n[t]()}),0),o.length>0&&i.dispatchEvent({type:"asyncTransactionsFlushed",results:o}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(t){const e=this.nodeManager;if(!e)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const i=new Rh,s=e.updateRowData(t,i);return this.commitTransactions(i),s}commitTransactions(t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:t,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{beans:t,rootNode:e}=this,i=t.flattenStage;if(i)return void(this.rowsToDisplay=i.execute({rowNode:e}));const s=this.rootNode.childrenAfterSort??[];for(const t of s)t.setUiLevel(0);this.rowsToDisplay=s}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const t=this.rootNode;if(!t)return;const e=this.resetRowHeightsForAllRowNodes();t.setRowHeight(t.rowHeight,!0);const i=t.sibling;i?.setRowHeight(i.rowHeight,!0),e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let t=!1;return this.forEachNode((e=>{e.setRowHeight(e.rowHeight,!0);const i=e.detailNode;i?.setRowHeight(i.rowHeight,!0);const s=e.sibling;s?.setRowHeight(s.rowHeight,!0),t=!0})),t}onGridStylesChanges(t){t.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},class extends Dt{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(t){const e=this.beans.sortSvc.getSortOptions(),i=e.length>0&&!!t.changedRowNodes&&this.gos.get("deltaSort");this.sort(e,i,t.changedRowNodes,t.changedPath)}sort(t,e,i,s){const{gos:o,colModel:n,rowGroupColsSvc:r,rowNodeSorter:l,rowRenderer:a,showRowGroupCols:h}=this.beans,c=o.get("groupMaintainOrder"),u=n.getCols().some((t=>t.isRowGroupActive())),d=r?.columns,g=n.isPivotMode(),p=o.getCallback("postSortRows");let f,m=!1;if(s?.forEachChangedNodeDepthFirst((o=>{const n=g&&o.leafGroup;let r=c&&u&&!o.leafGroup;r&&(f??(f=this.shouldSortContainsGroupCols(t)),r&&(r=!f));let a=null;if(r){let t=!1;if(d){const e=o.level+1;e<d.length&&(t=null===d[e].getSort())}t||(a=(t=>{const e=t.childrenAfterSort,i=t.childrenAfterAggFilter,s=e?.length,o=i?.length;if(!s||!o)return null;const n=new Array(o),r=new Set;for(let t=0;t<o;++t)r.add(i[t]);let l=0;for(let t=0;t<s;++t){const i=e[t];r.delete(i)&&(n[l++]=i)}if(0===r.size&&l===s)return e;for(const t of r)n[l++]=t;return n.length=l,n})(o))}else!t.length||n||(a=e&&i?((t,e,i,s,o)=>{const n=e.childrenAfterAggFilter,r=e.childrenAfterSort;if(!r)return t.doFullSort(n,o);const l=new Set,a=[],{updates:h,adds:c}=i;for(let t=0,e=n.length;t<e;++t){const e=n[t];h.has(e)||c.has(e)||s&&!s.canSkip(e)?a.push({currentPos:a.length,rowNode:e}):l.add(e)}const u=r.filter((t=>l.has(t))).map(((t,e)=>({currentPos:e,rowNode:t})));return a.sort(((e,i)=>t.compareRowNodes(o,e,i))),Mf(t,o,a,u)})(l,o,i,s,t):l.doFullSort(o.childrenAfterAggFilter,t));a||(a=o.childrenAfterAggFilter?.slice(0)??[]),m||(m=o.childrenAfterSort?.[0]!==a[0]),o.childrenAfterSort=a,Df(o),p&&p({nodes:o.childrenAfterSort})})),m&&o.get("groupHideOpenParents")){const t=h?.getShowRowGroupCols();t?.length&&a.refreshCells({columns:t,force:!0})}}shouldSortContainsGroupCols(t){const e=t.length;if(!e)return!1;if(Ee(this.gos)){for(let i=0;i<e;++i){const e=t[i].column;if(e.isPrimary()&&e.isRowGroupActive())return!0}return!1}for(let i=0;i<e;++i)if(t[i].column.getColDef().showRowGroup)return!0;return!1}}],dependsOn:[Md]},Af={moduleName:"ClientSideRowModelApi",version:se,apiFunctions:{onGroupExpandedOrCollapsed:function(t){t.expansionSvc?.onGroupExpandedOrCollapsed()},refreshClientSideRowModel:function(t,e){const i=Jd(t);i&&(e&&"everything"!==e||(e="group"),i.refreshModel({step:e,keepRenderedRows:!0,animate:!t.gos.get("suppressAnimationFrame")}))},isRowDataEmpty:function(t){return Jd(t)?.isEmpty()??!0},forEachLeafNode:function(t,e){Jd(t)?.forEachLeafNode(e)},forEachNodeAfterFilter:function(t,e){Jd(t)?.forEachNodeAfterFilter(e)},forEachNodeAfterFilterAndSort:function(t,e){Jd(t)?.forEachNodeAfterFilterAndSort(e)},applyTransaction:function(t,e){return t.frameworkOverrides.wrapIncoming((()=>Jd(t)?.updateRowData(e)))},applyTransactionAsync:function(t,e,i){t.frameworkOverrides.wrapIncoming((()=>Jd(t)?.batchUpdateRowData(e,i)))},flushAsyncTransactions:function(t){t.frameworkOverrides.wrapIncoming((()=>Jd(t)?.flushAsyncTransactions()))},getBestCostNodeSelection:function(t){return t.selectionSvc?.getBestCostNodeSelection()},resetRowHeights:mf,onRowHeightChanged:ff},dependsOn:[wf,vf]},If={moduleName:"SharedExport",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(t){this.visibleCols=t.visibleCols,this.colModel=t.colModel,this.rowModel=t.rowModel,this.pinnedRowModel=t.pinnedRowModel}serialize(t,e={}){const{allColumns:i,columnKeys:s,skipRowGroups:o,exportRowNumbers:n}=e,r=this.getColumnsToExport({allColumns:i,skipRowGroups:o,columnKeys:s,exportRowNumbers:n});return[this.prepareSession(r),this.prependContent(e),this.exportColumnGroups(e,r),this.exportHeaders(e,r),this.processPinnedTopRows(e,r),this.processRows(e,r),this.processPinnedBottomRows(e,r),this.appendContent(e)].reduce(((t,e)=>e(t)),t).parse()}processRow(t,e,i,s){const o=e.shouldRowBeSkipped||(()=>!1),n=null!=e.rowPositions||!!e.onlySelected,r=this.gos.get("groupHideOpenParents")&&!n,l=this.colModel.isPivotMode()?s.leafGroup:!s.group,a=!!s.footer,h=1===s.allChildrenCount&&1===s.childrenAfterGroup?.length&&function(t,e){const i=t.get("groupHideParentOfSingleChild");return!0===i||!("leafGroupsOnly"!==i||!e.leafGroup)||!!t.get("groupRemoveSingleChildren")||!(!t.get("groupRemoveLowestSingleChildren")||!e.leafGroup)}(this.gos,s);if(!l&&!a&&(e.skipRowGroups||h||r)||e.onlySelected&&!s.isSelected()||e.skipPinnedTop&&"top"===s.rowPinned||e.skipPinnedBottom&&"bottom"===s.rowPinned||s.stub)return;if(-1===s.level&&!l&&!a)return;if(o(Qe(this.gos,{node:s})))return;const c=t.onNewBodyRow(s);if(i.forEach(((t,e)=>{c.onColumn(t,e,s)})),e.getCustomContentBelowRow){const i=e.getCustomContentBelowRow(Qe(this.gos,{node:s}));i&&t.addCustomContent(i)}}appendContent(t){return e=>{const i=t.appendContent;return i&&e.addCustomContent(i),e}}prependContent(t){return e=>{const i=t.prependContent;return i&&e.addCustomContent(i),e}}prepareSession(t){return e=>(e.prepare(t),e)}exportColumnGroups(t,e){return i=>{if(!t.skipColumnGroupHeaders){const s=new $i,{colGroupSvc:o}=this.beans,n=o?o.createColumnGroups({columns:e,idCreator:s,pinned:null,isStandaloneStructure:!0}):e;this.recursivelyAddHeaderGroups(n,i,t.processGroupHeaderCallback)}return i}}exportHeaders(t,e){return i=>{if(!t.skipColumnHeaders){const t=i.onNewHeaderRow();e.forEach(((e,i)=>{t.onColumn(e,i,void 0)}))}return i}}processPinnedTopRows(t,e){return i=>{const s=this.processRow.bind(this,i,t,e);return t.rowPositions?t.rowPositions.filter((t=>"top"===t.rowPinned)).sort(((t,e)=>t.rowIndex-e.rowIndex)).map((t=>this.pinnedRowModel?.getPinnedTopRow(t.rowIndex))).forEach(s):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",s),i}}processRows(t,e){return i=>{const s=this.rowModel,o=Ce(this.gos),n=be(this.gos),r=!o&&t.onlySelected,l=this.processRow.bind(this,i,t,e),{exportedRows:a="filteredAndSorted"}=t;if(t.rowPositions)t.rowPositions.filter((t=>null==t.rowPinned)).sort(((t,e)=>t.rowIndex-e.rowIndex)).map((t=>s.getRow(t.rowIndex))).forEach(l);else if(this.colModel.isPivotMode())o?s.forEachPivotNode(l,!0,"filteredAndSorted"===a):n?s.forEachNodeAfterFilterAndSort(l,!0):s.forEachNode(l);else if(t.onlySelectedAllPages||r){const t=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(t),t.forEach(l)}else"all"===a?s.forEachNode(l):o||n?s.forEachNodeAfterFilterAndSort(l,!0):s.forEachNode(l);return i}}replicateSortedOrder(t){const{sortSvc:e,rowNodeSorter:i}=this.beans;if(!e||!i)return;const s=e.getSortOptions(),o=(t,e)=>null!=t.rowIndex&&null!=e.rowIndex?t.rowIndex-e.rowIndex:t.level===e.level?t.parent?.id===e.parent?.id?i.compareRowNodes(s,{rowNode:t,currentPos:t.rowIndex??-1},{rowNode:e,currentPos:e.rowIndex??-1}):o(t.parent,e.parent):t.level>e.level?o(t.parent,e):o(t,e.parent);t.sort(o)}processPinnedBottomRows(t,e){return i=>{const s=this.processRow.bind(this,i,t,e);return t.rowPositions?t.rowPositions.filter((t=>"bottom"===t.rowPinned)).sort(((t,e)=>t.rowIndex-e.rowIndex)).map((t=>this.pinnedRowModel?.getPinnedBottomRow(t.rowIndex))).forEach(s):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",s),i}}getColumnsToExport(t){const{allColumns:e=!1,skipRowGroups:i=!1,exportRowNumbers:s=!1,columnKeys:o}=t,{colModel:n,gos:r,visibleCols:l}=this,a=n.isPivotMode(),h=t=>!yi(t)&&(!Si(t)||s);if(o?.length)return n.getColsForKeys(o).filter(h);const c=r.get("treeData");let u=[];return u=e&&!a?n.getCols():l.allCols,u=u.filter((t=>h(t)&&(!(i&&!c)||!bi(t)))),u}recursivelyAddHeaderGroups(t,e,i){const s=[];for(const e of t){const t=e;if(t.getChildren)for(const e of t.getChildren()??[])s.push(e)}t.length>0&&Xn(t[0])&&this.doAddHeaderHeader(e,t,i),s&&s.length>0&&this.recursivelyAddHeaderGroups(s,e,i)}doAddHeaderHeader(t,e,i){const s=t.onNewHeaderGroupingRow();let o=0;for(const t of e){const e=t;let n;n=i?i(Qe(this.gos,{columnGroup:e})):this.beans.colNames.getDisplayNameForColumnGroup(e,"header");const r=(e.isExpandable()?e.getLeafColumns():[]).reduce(((t,e,i,s)=>{let o=hi(t);return"open"===e.getColumnGroupShow()?o&&null==o[1]||(o=[i],t.push(o)):o&&null==o[1]&&(o[1]=i-1),i===s.length-1&&o&&null==o[1]&&(o[1]=i),t}),[]);s.onColumn(e,n||"",o++,e.getLeafColumns().length-1,r)}}}]},Hf=class extends sg{constructor(t){super(t),this.config=t,this.isFirstLine=!0,this.result="";const{suppressQuotes:e,columnSeparator:i}=t;this.suppressQuotes=e,this.columnSeparator=i}addCustomContent(t){t&&("string"==typeof t?(/^\s*\n/.test(t)||this.beginNewLine(),t=t.replace(/\r?\n/g,"\r\n"),this.result+=t):t.forEach((t=>{this.beginNewLine(),t.forEach(((t,e)=>{0!==e&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t.data.value||""),t.mergeAcross&&this.appendEmptyCells(t.mergeAcross)}))})))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(t,e,i,s){0!=i&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e),this.appendEmptyCells(s)}appendEmptyCells(t){for(let e=1;e<=t;e++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(t,e){0!=e&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(t))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(t,e,i){0!=e&&(this.result+=this.columnSeparator);const s=this.extractRowCellValue(t,e,e,"csv",i);this.result+=this.putInQuotes(s.valueFormatted??s.value)}putInQuotes(t){if(this.suppressQuotes)return t;if(null==t)return'""';let e;return"string"==typeof t?e=t:"function"==typeof t.toString?e=t.toString():(pe(53),e=""),'"'+e.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1}},Of={moduleName:"CsvExport",version:se,beans:[class extends ig{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(t){this.colModel=t.colModel,this.colNames=t.colNames,this.rowGroupColsSvc=t.rowGroupColsSvc,this.valueSvc=t.valueSvc}getMergedParams(t){const e=this.gos.get("defaultCsvExportParams");return Object.assign({},e,t)}export(t){if(this.isExportSuppressed())return void pe(51);const e=this.getMergedParams(t),i=this.getData(e),s=new Blob(["\ufeff",i],{type:"text/plain"}),o="function"==typeof e.fileName?e.fileName(Qe(this.gos,{})):e.fileName;!function(t,e){const i=document.defaultView||window;if(!i)return void pe(52);const s=document.createElement("a"),o=i.URL.createObjectURL(e);s.setAttribute("href",o),s.setAttribute("download",t),s.style.display="none",document.body.appendChild(s),s.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),s.remove(),i.setTimeout((()=>{i.URL.revokeObjectURL(o)}),0)}(this.getFileName(o),s)}exportDataAsCsv(t){this.export(t)}getDataAsCsv(t,e=!1){const i=e?Object.assign({},t):this.getMergedParams(t);return this.getData(i)}getDefaultFileExtension(){return"csv"}createSerializingSession(t){const{colModel:e,colNames:i,rowGroupColsSvc:s,valueSvc:o,gos:n}=this,{processCellCallback:r,processHeaderCallback:l,processGroupHeaderCallback:a,processRowGroupCallback:h,suppressQuotes:c,columnSeparator:u}=t;return new Hf({colModel:e,colNames:i,valueSvc:o,gos:n,processCellCallback:r||void 0,processHeaderCallback:l||void 0,processGroupHeaderCallback:a||void 0,processRowGroupCallback:h||void 0,suppressQuotes:c||!1,columnSeparator:u||",",rowGroupColsSvc:s})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}}],apiFunctions:{getDataAsCsv:function(t,e){return t.csvCreator?.getDataAsCsv(e)},exportDataAsCsv:function(t,e){t.csvCreator?.exportDataAsCsv(e)}},dependsOn:[If]},Nf=class extends Dt{constructor(t,e,i){super(),this.id=t,this.parentCache=e,this.params=i,this.state="needsLoading",this.version=0,this.startRow=t*i.blockSize,this.endRow=this.startRow+i.blockSize}load(){this.state="loading",this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state="needsLoading"}pageLoadFailed(t){this.isRequestMostRecentAndLive(t)&&(this.state="failed"),this.dispatchLocalEvent({type:"loadComplete"})}pageLoaded(t,e,i){this.successCommon(t,{rowData:e,rowCount:i})}isRequestMostRecentAndLive(t){const e=t===this.version,i=this.isAlive();return e&&i}successCommon(t,e){this.dispatchLocalEvent({type:"loadComplete"}),this.isRequestMostRecentAndLive(t)&&(this.state="loaded",this.processServerResult(e))}postConstruct(){this.rowNodes=[];const{params:{blockSize:t,rowHeight:e},startRow:i,beans:s,rowNodes:o}=this;for(let n=0;n<t;n++){const t=i+n,r=new nr(s);r.setRowHeight(e),r.uiLevel=0,r.setRowIndex(t),r.setRowTop(e*t),o.push(r)}}getBlockStateJson(){const{id:t,startRow:e,endRow:i,state:s}=this;return{id:""+t,state:{blockNumber:t,startRow:e,endRow:i,pageStatus:s}}}setDataAndId(t,e,s){i(e)?t.setDataAndId(e,s.toString()):t.setDataAndId(void 0,void 0)}loadFromDatasource(){const t=this.createLoadParams();s(this.params.datasource.getRows)?pe(90):window.setTimeout((()=>{this.params.datasource.getRows(t)}),0)}createLoadParams(){const{startRow:t,endRow:e,version:i,params:{sortModel:s,filterModel:o},gos:n}=this;return{startRow:t,endRow:e,successCallback:this.pageLoaded.bind(this,i),failCallback:this.pageLoadFailed.bind(this,i),sortModel:s,filterModel:o,context:Qe(n,{}).context}}forEachNode(t,e,i){this.rowNodes.forEach(((s,o)=>{this.startRow+o<i&&t(s,e.value++)}))}getRow(t,e=!1){return e||(this.lastAccessed=this.params.lastAccessedSequence.value++),this.rowNodes[t-this.startRow]}processServerResult(t){const{rowNodes:e,beans:i}=this;e.forEach(((s,o)=>{const n=t.rowData?t.rowData[o]:void 0;!s.id&&s.alreadyRendered&&n&&(e[o]=new nr(i),e[o].setRowIndex(s.rowIndex),e[o].setRowTop(s.rowTop),e[o].setRowHeight(s.rowHeight),s.clearRowTopAndRowIndex()),this.setDataAndId(e[o],n,this.startRow+o)})),this.parentCache.pageLoaded(this,null!=t.rowCount&&t.rowCount>=0?t.rowCount:void 0)}destroy(){for(const t of this.rowNodes)t.clearRowTopAndRowIndex();super.destroy()}},Bf=class extends Dt{constructor(t){super(),this.params=t,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=t.initialRowCount}getRow(t,e=!1){const i=Math.floor(t/this.params.blockSize);let s=this.blocks[i];if(!s){if(e)return;s=this.createBlock(i)}return s.getRow(t)}createBlock(t){const e=this.params,i=this.createBean(new Nf(t,this,e));return this.blocks[i.id]=i,this.blockCount++,this.purgeBlocksIfNeeded(i),e.rowNodeBlockLoader.addBlock(i),i}refreshCache(){if(0==this.blockCount)this.purgeCache();else{for(const t of this.getBlocksInOrder())t.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}}destroy(){for(const t of this.getBlocksInOrder())this.destroyBlock(t);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(t,e){this.isAlive()&&(Ut(this.gos,`InfiniteCache - onPageLoaded: page = ${t.id}, lastRow = ${e}`),this.checkRowCount(t,e),this.onCacheUpdated())}purgeBlocksIfNeeded(t){const e=this.getBlocksInOrder().filter((e=>e!=t));e.sort(((t,e)=>e.lastAccessed-t.lastAccessed));const i=this.params.maxBlocksInCache>0,s=i?this.params.maxBlocksInCache-1:null;e.forEach(((t,e)=>{if("needsLoading"===t.state&&e>=1||i&&e>=s){if(this.isBlockCurrentlyDisplayed(t))return;if(this.isBlockFocused(t))return;this.removeBlockFromCache(t)}}))}isBlockFocused(t){const e=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!e)return!1;if(null!=e.rowPinned)return!1;const{startRow:i,endRow:s}=t;return e.rowIndex>=i&&e.rowIndex<s}isBlockCurrentlyDisplayed(t){const{startRow:e,endRow:i}=t;return this.beans.rowRenderer.isRangeInRenderedViewport(e,i-1)}removeBlockFromCache(t){t&&this.destroyBlock(t)}checkRowCount(t,e){if("number"==typeof e&&e>=0)this.rowCount=e,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){const{blockSize:e,overflowSize:i}=this.params,s=(t.id+1)*e+i;this.rowCount<s&&(this.rowCount=s)}}setRowCount(t,e){this.rowCount=t,i(e)&&(this.lastRowIndexKnown=e),this.lastRowIndexKnown||this.rowCount%this.params.blockSize==0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(t){const e={value:0};for(const i of this.getBlocksInOrder())i.forEachNode(t,e,this.rowCount)}getBlocksInOrder(){return Object.values(this.blocks).sort(((t,e)=>t.id-e.id))}destroyBlock(t){delete this.blocks[t.id],this.destroyBean(t),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(t)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:"storeUpdated"}))}destroyAllBlocksPastVirtualRowCount(){const t=[];for(const e of this.getBlocksInOrder())e.id*this.params.blockSize>=this.rowCount&&t.push(e);if(t.length>0)for(const e of t)this.destroyBlock(e)}purgeCache(){for(const t of this.getBlocksInOrder())this.removeBlockFromCache(t);this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(t,e){const i=[];let s=-1,o=!1;const n={value:0};let r=!1;for(const l of this.getBlocksInOrder())r||(o&&s+1!==l.id?r=!0:(s=l.id,l.forEachNode((s=>{const n=s===t||s===e;(o||n)&&i.push(s),n&&(o=!o)}),n,this.rowCount)));return r||o?[]:i}},Gf={moduleName:"InfiniteRowModel",version:se,apiFunctions:{refreshInfiniteCache:function(t){Xd(t)?.refreshCache()},purgeInfiniteCache:function(t){Xd(t)?.purgeCache()},getInfiniteRowCount:function(t){return Xd(t)?.getRowCount()}},dependsOn:[{moduleName:"InfiniteRowModelCore",version:se,rowModels:["infinite"],beans:[class extends Dt{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(t){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*t}}ensureRowHeightsValid(){return!1}postConstruct(){if("infinite"!==this.gos.get("rowModelType"))return;const t=this.beans,e=new nr(t);this.rootNode=e,e.level=-1,this.rowHeight=Fe(t),this.addEventListeners(),this.addDestroyFunc((()=>this.destroyCache()))}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",(()=>this.setDatasource(this.gos.get("datasource")))),this.addManagedPropertyListener("cacheBlockSize",(()=>this.resetCache())),this.addManagedPropertyListener("rowHeight",(()=>{this.rowHeight=Fe(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()}))}onColumnEverything(){let t;t=!this.cacheParams||!n(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]),t&&this.reset()}getType(){return"infinite"}setDatasource(t){this.destroyDatasource(),this.datasource=t,t&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getNodesInRangeForSelection(t,e){return this.infiniteCache?.getRowNodesInRange(t,e)??[]}reset(){this.datasource&&(null!=Ne(this.gos)||this.beans.selectionSvc?.reset("rowDataChanged"),this.resetCache())}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:"modelUpdated",newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();const t=this.beans,{filterManager:e,sortSvc:i,rowNodeBlockLoader:s,eventSvc:o,gos:n}=t;this.cacheParams={datasource:this.datasource,filterModel:e?.getFilterModel()??{},sortModel:i?.getSortModel()??[],rowNodeBlockLoader:s,initialRowCount:n.get("infiniteInitialRowCount"),maxBlocksInCache:n.get("maxBlocksInCache"),rowHeight:Fe(t),overflowSize:n.get("cacheOverflowSize"),blockSize:n.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new Bf(this.cacheParams)),o.dispatchEventOnce({type:"rowCountReady"}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode((t=>{t.setRowHeight(this.rowHeight),t.setRowTop(this.rowHeight*t.rowIndex)})),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(t){const e=this.infiniteCache;if(e&&!(t>=e.getRowCount()))return e.getRow(t)}getRowNode(t){let e;return this.forEachNode((i=>{i.id===t&&(e=i)})),e}forEachNode(t){this.infiniteCache?.forEachNodeDeep(t)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(t){return t}getRowIndexAtPixel(t){if(0!==this.rowHeight){const e=Math.floor(t/this.rowHeight),i=this.getRowCount()-1;return e>i?i:e}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(t){return!!this.getRowNode(t.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(t,e){this.infiniteCache?.setRowCount(t,e)}resetRowHeights(){}onRowHeightChanged(){}},class extends Dt{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=function(t){const e=t.get("maxConcurrentDatasourceRequests");return e>0?e:void 0}(this.gos);const t=this.gos.get("blockLoadDebounceMillis");t&&t>0&&(this.checkBlockToLoadDebounce=Ht(this,this.performCheckBlocksToLoad.bind(this),t))}addBlock(t){this.blocks.push(t),t.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(t){di(this.blocks,t)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)return void Ut(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");const t=null!=this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,e=this.blocks.filter((t=>"needsLoading"===t.state)).slice(0,t);this.activeBlockLoadsCount+=e.length;for(const t of e)t.load();this.printCacheStatus()}getBlockState(){const t={};return this.blocks.forEach((e=>{const{id:i,state:s}=e.getBlockStateJson();t[i]=s})),t}printCacheStatus(){Ut(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}}]},Cf]},Vf={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},Lf={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},zf={moduleName:"HighlightChanges",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="cellFlashSvc",this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(t,e,i=this.beans.gos.get("cellFlashDuration"),s=this.beans.gos.get("cellFadeDuration")){const o=this.animations[e];o.delete(t);const n=Date.now(),r=n+i;o.set(t,{phase:"flash",flashEndTime:r,fadeEndTime:n+i+s});const l=`ag-cell-${e}`,a=`${l}-animation`,{comp:h,eGui:{style:c}}=t;h.toggleCss(l,!0),h.toggleCss(a,!1),c.removeProperty("transition"),c.removeProperty("transition-delay"),this.nextAnimationTime&&r+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming((()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),i)})),this.nextAnimationTime=r)}advanceAnimations(){const t=Date.now();let e=null;for(const i of Object.keys(this.animations)){const s=this.animations[i],o=`ag-cell-${i}`,n=`${o}-animation`;for(const[i,r]of s){if(!i.isAlive()||!i.comp){s.delete(i);continue}const{phase:l,flashEndTime:a,fadeEndTime:h}=r,c="flash"===l?a:h;if(!(t+15>=c)){e=Math.min(c,e??1/0);continue}const{comp:u,eGui:{style:d}}=i;switch(l){case"flash":u.toggleCss(o,!1),u.toggleCss(n,!0),d.transition=`background-color ${h-a}ms`,d.transitionDelay=a-t+"ms",e=Math.min(h,e??1/0),r.phase="fade";break;case"fade":u.toggleCss(o,!1),u.toggleCss(n,!1),d.removeProperty("transition"),d.removeProperty("transition-delay"),s.delete(i)}}}null==e?(this.nextAnimationTime=null,this.nextAnimationCycle=null):e&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),e-t),this.nextAnimationTime=e)}onFlashCells(t,e){if(!t.comp)return;const i=function(t){const{rowIndex:e,rowPinned:i,column:s}=t;return`${e}.${null==i?"null":i}.${s.getId()}`}(t.cellPosition);e.cells[i]&&this.animateCell(t,"highlight")}flashCell(t,e){this.animateCell(t,"data-changed",e?.flashDuration,e?.fadeDuration)}destroy(){for(const t of Object.keys(this.animations))this.animations[t].clear()}}],userComponents:{agAnimateShowChangeCellRenderer:class extends _i{constructor(){super(Vf),this.eValue=Ui,this.eDelta=Ui,this.refreshCount=0}init(t){this.refresh(t,!0)}showDelta(t,e){const s=Math.abs(e),o=t.formatValue(s),n=i(o)?o:s,r=e>=0,l=this.eDelta;l.textContent=r?"↑"+n:"↓"+n,l.classList.toggle("ag-value-change-delta-up",r),l.classList.toggle("ag-value-change-delta-down",!r)}setTimerToRemoveDelta(){this.refreshCount++;const t=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming((()=>{window.setTimeout((()=>{t===this.refreshCount&&this.hideDeltaValue()}),2e3)}))}hideDeltaValue(){this.eValue.classList.remove("ag-value-change-value-highlight"),j(this.eDelta)}refresh(t,e=!1){const{value:s,valueFormatted:o}=t,{eValue:n,lastValue:r,beans:l}=this;if(s===r)return!1;if(i(o)?n.textContent=o:i(s)?n.textContent=s:j(n),l.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;const a=s&&"object"==typeof s&&"toNumber"in s?s.toNumber():s,h=r&&"object"==typeof r&&"toNumber"in r?r.toNumber():r;return a!==h&&("number"==typeof a&&"number"==typeof h&&this.showDelta(t,a-h),r&&n.classList.add("ag-value-change-value-highlight"),e||this.setTimerToRemoveDelta(),this.lastValue=s,!0)}},agAnimateSlideCellRenderer:class extends _i{constructor(){super(Lf),this.eCurrent=Ui,this.refreshCount=0,this.registerCSS(".ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}")}init(t){this.refresh(t,!0)}addSlideAnimation(){this.refreshCount++;const t=this.refreshCount;this.ePrevious?.remove();const{beans:e,eCurrent:i}=this,s=mr({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=s,s.textContent=i.textContent,this.getGui().insertBefore(s,i),e.frameworkOverrides.wrapIncoming((()=>{window.setTimeout((()=>{t===this.refreshCount&&this.ePrevious.classList.add("ag-value-slide-out-end")}),50),window.setTimeout((()=>{t===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)}),3e3)}))}refresh(t,e=!1){let o=t.value;if(s(o)&&(o=""),o===this.lastValue)return!1;if(this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;e||this.addSlideAnimation(),this.lastValue=o;const n=this.eCurrent;return i(t.valueFormatted)?n.textContent=t.valueFormatted:i(t.value)?n.textContent=o:j(n),!0}}},apiFunctions:{flashCells:function(t,e={}){const{cellFlashSvc:i}=t;i&&t.frameworkOverrides.wrapIncoming((()=>{for(const s of t.rowRenderer.getCellCtrls(e.rowNodes,e.columns))i.flashCell(s,e)}))}}};function $f(t){return(t={...t}).version||(t.version="32.1.0"),"32.1.0"===t.version&&(t=function(t){return t.cellSelection=function(t){if(t&&"object"==typeof t)return t.rangeSelection}(t),t}(t)),t.version=se,t}var Wf={moduleName:"GridState",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=Ht(this,(()=>this.dispatchQueuedStateUpdateEvents()),0),this.onRowGroupOpenedDebounced=Ht(this,(()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))}),0),this.onRowSelectedDebounced=Ht(this,(()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())}),0),this.staleStateKeys=new Set}postConstruct(){const{gos:t,ctrlsSvc:e,colDelayRenderSvc:i}=this.beans;this.isClientSideRowModel=Ce(t);const s=$f(t.get("initialState")??{}),o=s.partialColumnState;delete s.partialColumnState,this.cachedState=s;const n=this.suppressEventsAndDispatchInitEvent.bind(this);e.whenReady(this,(()=>n((()=>this.setupStateOnGridReady(s))))),(s.columnOrder||s.columnVisibility||s.columnSizing||s.columnPinning||s.columnGroup)&&i?.hideColumns("columnState");const[r,l,a]=this.addManagedEventListeners({newColumnsLoaded:({source:t})=>{"gridInitializing"===t&&(r(),n((()=>{this.setupStateOnColumnsInitialised(s,!!o),i?.revealColumns("columnState")})))},rowCountReady:()=>{l?.(),n((()=>this.setupStateOnRowCountReady(s)))},firstDataRendered:()=>{a?.(),n((()=>this.setupStateOnFirstDataRendered(s)))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(t,e){const i=$f(t);delete i.partialColumnState,this.cachedState=i,this.startSuppressEvents();const s="api",o=e?new Set(e):void 0;this.setGridReadyState(i,s,o),this.setColumnsInitialisedState(i,s,!!o,o),this.setRowCountState(i,s,o),setTimeout((()=>{this.isAlive()&&this.setFirstDataRenderedState(i,s,o),this.stopSuppressEvents(s)}))}setGridReadyState(t,e,i){"api"!==e||i?.has("sideBar")||this.beans.sideBar?.comp?.setState(t.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(t){this.setGridReadyState(t,"gridInitializing");const e=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:e,sideBarUpdated:e})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(t,e,i,s){this.setColumnState(t,e,i,s),this.setColumnGroupState(t,e,s),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(t,e){this.setColumnsInitialisedState(t,"gridInitializing",e);const i=t=>()=>this.updateColumnState([t]);this.addManagedEventListeners({columnValueChanged:i("aggregation"),columnMoved:i("columnOrder"),columnPinned:i("columnPinning"),columnResized:i("columnSizing"),columnVisible:i("columnVisibility"),columnPivotChanged:i("pivot"),columnPivotModeChanged:i("pivot"),columnRowGroupChanged:i("rowGroup"),sortChanged:i("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(t,e,i){const{filter:s,rowGroupExpansion:o,ssrmRowGroupExpansion:n,rowSelection:r,pagination:l}=t,a=(t,s)=>!i?.has(t)&&(s||"api"===e);a("filter",s)&&this.setFilterState(s),a("rowGroupExpansion",o)&&this.setRowGroupExpansionState(n,o,e),a("rowSelection",r)&&this.setRowSelectionState(r,e),a("pagination",l)&&this.setPaginationState(l,e);const h=this.updateCachedState.bind(this);h("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(h("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),h("rowGroupExpansion",void 0)):(h("rowGroupExpansion",this.getRowGroupExpansionState()),h("ssrmRowGroupExpansion",void 0)),h("rowSelection",this.getRowSelectionState()),h("pagination",this.getPaginationState())}setupStateOnRowCountReady(t){this.setRowCountState(t,"gridInitializing");const e=this.updateCachedState.bind(this),i=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(e("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),e("rowGroupExpansion",void 0)):(e("rowGroupExpansion",this.getRowGroupExpansionState()),e("ssrmRowGroupExpansion",void 0))},s=()=>e("filter",this.getFilterState()),{gos:o,colFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:s,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:i,columnRowGroupChanged:i,rowDataUpdated:()=>{(0!==o.get("groupDefaultExpanded")||o.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(i)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:t=>{(t.newPage||t.newPageSize)&&e("pagination",this.getPaginationState())}}),n&&this.addManagedListeners(n,{filterStateChanged:s})}setFirstDataRenderedState(t,e,i){const{scroll:s,cellSelection:o,focusedCell:n,columnOrder:r,rowPinning:l}=t,a=(t,s)=>!i?.has(t)&&(s||"api"===e);a("focusedCell",n)&&this.setFocusedCellState(n),a("cellSelection",o)&&this.setCellSelectionState(o),a("scroll",s)&&this.setScrollState(s),a("rowPinning",l)&&this.setRowPinningState(l),this.setColumnPivotState(!!r?.orderedColIds,e);const h=this.updateCachedState.bind(this);h("sideBar",this.getSideBarState()),h("focusedCell",this.getFocusedCellState());const c=this.getRangeSelectionState();h("rangeSelection",c),h("cellSelection",c),h("scroll",this.getScrollState())}setupStateOnFirstDataRendered(t){this.setFirstDataRenderedState(t,"gridInitializing");const e=this.updateCachedState.bind(this),i=()=>e("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:i,cellFocusCleared:i,cellSelectionChanged:t=>{if(t.finished){const t=this.getRangeSelectionState();e("rangeSelection",t),e("cellSelection",t)}},bodyScrollEnd:()=>e("scroll",this.getScrollState()),pinnedRowsChanged:()=>e("rowPinning",this.getRowPinningState())})}getColumnState(){const t=this.beans;return function(t,e=!1){const i=[],s=[],o=[],n=[],r=[],l=[],a=[],h=[],c=[];let u=0;for(let e=0;e<t.length;e++){const{colId:d,sort:g,sortIndex:p,rowGroup:f,rowGroupIndex:m,aggFunc:w,pivot:v,pivotIndex:C,pinned:b,hide:y,width:S,flex:x}=t[e];c.push(d),g&&(i[p??u++]={colId:d,sort:g}),f&&(s[m??0]=d),"string"==typeof w&&o.push({colId:d,aggFunc:w}),v&&(n[C??0]=d),b&&("right"===b?l:r).push(d),y&&a.push(d),(null!=x||S)&&h.push({colId:d,flex:x??void 0,width:S})}return{sort:i.length?{sortModel:tg(i)}:void 0,rowGroup:s.length?{groupColIds:tg(s)}:void 0,aggregation:o.length?{aggregationModel:o}:void 0,pivot:n.length||e?{pivotMode:e,pivotColIds:tg(n)}:void 0,columnPinning:r.length||l.length?{leftColIds:r,rightColIds:l}:void 0,columnVisibility:a.length?{hiddenColIds:a}:void 0,columnSizing:h.length?{columnSizingModel:h}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}(Vi(t),t.colModel.isPivotMode())}setColumnState(t,e,i,s){const{sort:o,rowGroup:n,aggregation:r,pivot:l,columnPinning:a,columnVisibility:h,columnSizing:c,columnOrder:u}=t;let d=!1;const g=(t,i)=>{const o=!(s?.has(t)||!i&&"api"!==e);return d||(d=o),o},p={},f=t=>{let e=p[t];return e||(e={colId:t},p[t]=e,e)},m={},w=g("sort",o);w&&o?.sortModel.forEach((({colId:t,sort:e},i)=>{const s=f(t);s.sort=e,s.sortIndex=i})),!w&&i||(m.sort=null,m.sortIndex=null);const v=g("rowGroup",n);v&&n?.groupColIds.forEach(((t,e)=>{const i=f(t);i.rowGroup=!0,i.rowGroupIndex=e})),!v&&i||(m.rowGroup=null,m.rowGroupIndex=null);const C=g("aggregation",r);C&&r?.aggregationModel.forEach((({colId:t,aggFunc:e})=>{f(t).aggFunc=e})),!C&&i||(m.aggFunc=null);const b=g("pivot",l);b&&(l?.pivotColIds.forEach(((t,e)=>{const i=f(t);i.pivot=!0,i.pivotIndex=e})),this.gos.updateGridOptions({options:{pivotMode:!!l?.pivotMode},source:e})),!b&&i||(m.pivot=null,m.pivotIndex=null);const y=g("columnPinning",a);if(y){for(const t of a?.leftColIds??[])f(t).pinned="left";for(const t of a?.rightColIds??[])f(t).pinned="right"}!y&&i||(m.pinned=null);const S=g("columnVisibility",h);if(S)for(const t of h?.hiddenColIds??[])f(t).hide=!0;!S&&i||(m.hide=null);const x=g("columnSizing",c);if(x)for(const{colId:t,flex:e,width:i}of c?.columnSizingModel??[]){const s=f(t);s.flex=e??null,s.width=i}!x&&i||(m.flex=null);const R=u?.orderedColIds,F=!!R?.length&&!s?.has("columnOrder"),k=F?R.map((t=>f(t))):Object.values(p);(k.length||d)&&(this.columnStates=k,Bi(this.beans,{state:k,applyOrder:F,defaultState:m},e))}setColumnPivotState(t,e){const i=this.columnStates;this.columnStates=void 0;const s=this.columnGroupStates;this.columnGroupStates=void 0;const o=this.beans,{pivotResultCols:n,colGroupSvc:r}=o;if(n?.isPivotResultColsPresent()){if(i){const s=[];for(const t of i)n.getPivotResultCol(t.colId)&&s.push(t);Bi(o,{state:s,applyOrder:t},e)}s&&r?.setColumnGroupState(s,e)}}getColumnGroupState(){const t=this.beans.colGroupSvc;if(t)return function(t){const e=[];for(const{groupId:i,open:s}of t)s&&e.push(i);return e.length?{openColumnGroupIds:e}:void 0}(t.getColumnGroupState())}setColumnGroupState(t,e,i){const s=this.beans.colGroupSvc;if(!s||i?.has("columnGroup")||"api"!==e&&!Object.prototype.hasOwnProperty.call(t,"columnGroup"))return;const o=new Set(t.columnGroup?.openColumnGroupIds),n=s.getColumnGroupState().map((({groupId:t})=>{const e=o.has(t);return e&&o.delete(t),{groupId:t,open:e}}));for(const t of o)n.push({groupId:t,open:!0});n.length&&(this.columnGroupStates=n),s.setColumnGroupState(n,e)}getFilterState(){const t=this.beans.filterManager;let e=t?.getFilterModel();e&&0===Object.keys(e).length&&(e=void 0);const i=t?.getFilterState(),s=t?.getAdvFilterModel()??void 0;return e||s||i?{filterModel:e,columnFilterState:i,advancedFilterModel:s}:void 0}setFilterState(t){const e=this.beans.filterManager,{filterModel:i,columnFilterState:s,advancedFilterModel:o}=t??{filterModel:null,columnFilterState:null,advancedFilterModel:null};void 0===i&&void 0===s||e?.setFilterState(i??null,s??null,"columnFilter"),void 0!==o&&e?.setAdvFilterModel(o??null,"advancedFilter")}getRangeSelectionState(){const t=this.beans.rangeSvc?.getCellRanges().map((t=>{const{id:e,type:i,startRow:s,endRow:o,columns:n,startColumn:r}=t;return{id:e,type:i,startRow:s,endRow:o,colIds:n.map((t=>t.getColId())),startColId:r.getColId()}}));return t?.length?{cellRanges:t}:void 0}setCellSelectionState(t){const{gos:e,rangeSvc:i,colModel:s,visibleCols:o}=this.beans;if(!ze(e)||!i)return;const n=[];for(const e of t?.cellRanges??[]){const t=[];for(const i of e.colIds){const e=s.getCol(i);e&&t.push(e)}if(!t.length)continue;let i=s.getCol(e.startColId);if(!i){const e=o.allCols,s=new Set(t);i=e.find((t=>s.has(t)))}n.push({...e,columns:t,startColumn:i})}i.setCellRanges(n)}getScrollState(){if(!this.isClientSideRowModel)return;const t=this.beans.ctrlsSvc.getScrollFeature(),{left:e}=t?.getHScrollPosition()??{left:0},{top:i}=t?.getVScrollPosition()??{top:0};return i||e?{top:i,left:e}:void 0}setScrollState(t){if(!this.isClientSideRowModel)return;const{top:e,left:i}=t??{top:0,left:0},{frameworkOverrides:s,rowRenderer:o,animationFrameSvc:n,ctrlsSvc:r}=this.beans;s.wrapIncoming((()=>{r.get("center").setCenterViewportScrollLeft(i),r.getScrollFeature()?.setVerticalScrollPosition(e),o.redraw({afterScroll:!0}),n?.flushAllFrames()}))}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const t=this.beans.focusSvc.getFocusedCell();if(t){const{column:e,rowIndex:i,rowPinned:s}=t;return{colId:e.getColId(),rowIndex:i,rowPinned:s}}}setFocusedCellState(t){if(!this.isClientSideRowModel)return;const{focusSvc:e,colModel:i}=this.beans;if(!t)return void e.clearFocusedCell();const{colId:s,rowIndex:o,rowPinned:n}=t;e.setFocusedCell({column:i.getCol(s),rowIndex:o,rowPinned:n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:t,gos:e}=this.beans;if(!t)return;const i=t.getCurrentPage(),s=e.get("paginationAutoPageSize")?void 0:t.getPageSize();return i||s?{page:i,pageSize:s}:void 0}setPaginationState(t,e){const{pagination:i,gos:s}=this.beans;if(!i)return;const{pageSize:o,page:n}=t??{page:0,pageSize:s.get("paginationPageSize")},r="gridInitializing"===e;o&&!s.get("paginationAutoPageSize")&&i.setPageSize(o,r?"initialState":"pageSizeSelector"),"number"==typeof n&&(r?i.setPage(n):i.goToPage(n))}getRowSelectionState(){const t=this.beans.selectionSvc;if(!t)return;const e=t.getSelectionState();return e&&(Array.isArray(e)||!1!==e.selectAll&&!1!==e.selectAllChildren||e?.toggledNodes?.length)?e:void 0}setRowSelectionState(t,e){this.beans.selectionSvc?.setSelectionState(t,e,"api"===e)}getRowGroupExpansionState(){const{expansionSvc:t}=this.beans;if(t)return t.getExpansionState()}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(t){const e=this.beans.pinnedRowModel;t?e?.setPinnedState(t):e?.reset()}setRowGroupExpansionState(t,e,i){const s=this.beans.expansionSvc;s&&s.setExpansionState(e??{expandedRowGroupIds:[],collapsedRowGroupIds:[]},i)}updateColumnState(t){const e=this.getColumnState();let i=!1;const s=this.cachedState;for(const t of Object.keys(e))n(e[t],s[t])||(i=!0);this.cachedState={...s,...e},i&&this.dispatchStateUpdateEvent(t)}updateCachedState(t,e){const i=this.cachedState[t];this.setCachedStateValue(t,e),n(e,i)||this.dispatchStateUpdateEvent([t])}setCachedStateValue(t,e){this.cachedState={...this.cachedState,[t]:e}}refreshStaleState(){const t=this.staleStateKeys;for(const e of t)"rowSelection"===e&&this.setCachedStateValue(e,this.getRowSelectionState());t.clear()}dispatchStateUpdateEvent(t){if(!this.suppressEvents){for(const e of t)this.queuedUpdateSources.add(e);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){const t=this.queuedUpdateSources,e=Array.from(t);t.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:e,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(t){setTimeout((()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([t]))}))}suppressEventsAndDispatchInitEvent(t){this.startSuppressEvents(),t(),this.stopSuppressEvents("gridInitializing")}}],apiFunctions:{getState:function(t){return t.stateSvc?.getState()??{}},setState:function(t,e,i){return t.stateSvc?.setState(e,i)}}},Uf="paginationPageSizeSelector",jf={tag:"span",cls:"ag-paging-page-size"},Kf={selector:"AG-PAGE-SIZE-SELECTOR",component:class extends _i{constructor(){super(jf),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const t=this.selectPageSizeComp.getValue();if(!t)return;const e=Number(t);isNaN(e)||e<1||e===this.pagination.getPageSize()||(this.pagination.setPageSize(e,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(t){this.pagination=t.pagination}postConstruct(){this.addManagedPropertyListener(Uf,(()=>{this.onPageSizeSelectorValuesChange()})),this.addManagedEventListeners({paginationChanged:t=>this.handlePaginationChanged(t)})}handlePaginationChanged(t){if(!this.selectPageSizeComp||!t?.newPageSize)return;const e=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(e)?this.selectPageSizeComp.setValue(e.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(t){this.selectPageSizeComp&&!t&&this.reset(),t&&this.reloadPageSizesSelector()}reset(){j(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&!1!==this.gos.get(Uf)}reloadPageSizesSelector(){const t=this.getPageSizeSelectorValues(),e=this.pagination.getPageSize(),i=!e||!t.includes(e);if(i){const i=this.gos.exists("paginationPageSize"),s=!0!==this.gos.get(Uf);pe(94,{pageSizeSet:i,pageSizesSet:s,pageSizeOptions:t,paginationPageSizeOption:e}),s||pe(95,{paginationPageSizeOption:e,paginationPageSizeSelector:Uf}),t.unshift("")}const s=String(i?"":e);this.selectPageSizeComp?(ci(this.pageSizeOptions,t)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(t)),this.pageSizeOptions=t),this.selectPageSizeComp.setValue(s,!0)):this.createPageSizeSelectorComp(t,s),this.hasEmptyOption=i}createPageSizeSelectOptions(t){return t.map((t=>({value:String(t)})))}createPageSizeSelectorComp(t,e){const i=this.getLocaleTextFunc(),s=i("pageSizeSelectorLabel","Page Size:"),o=i("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new qo).addOptions(this.createPageSizeSelectOptions(t)).setValue(e).setAriaLabel(o).setLabel(s).onValueChange((()=>this.handlePageSizeItemSelected())),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const t=this.gos.get(Uf);return Array.isArray(t)&&t?.length?[...t].sort(((t,e)=>t-e)):[20,50,100]}destroy(){this.toggleSelectDisplay(!1),super.destroy()}}},qf={selector:"AG-PAGINATION",component:class extends Za{constructor(){super(),this.btFirst=Ui,this.btPrevious=Ui,this.btNext=Ui,this.btLast=Ui,this.lbRecordCount=Ui,this.lbFirstRowOnPage=Ui,this.lbLastRowOnPage=Ui,this.lbCurrent=Ui,this.lbTotal=Ui,this.pageSizeComp=Ui,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:var(--ag-pagination-panel-height);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}")}wireBeans(t){this.rowModel=t.rowModel,this.pagination=t.pagination,this.ariaAnnounce=t.ariaAnnounce}postConstruct(){const t=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[Kf]);const{btFirst:e,btPrevious:i,btNext:s,btLast:o}=this;this.activateTabIndex([e,i,s,o]),e.insertAdjacentElement("afterbegin",Ca(t?"last":"first",this.beans)),i.insertAdjacentElement("afterbegin",Ca(t?"next":"previous",this.beans)),s.insertAdjacentElement("afterbegin",Ca(t?"previous":"next",this.beans)),o.insertAdjacentElement("afterbegin",Ca(t?"first":"last",this.beans)),this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this)),this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners(["paginationPageSizeSelector","paginationAutoPageSize","suppressPaginationPanel"],(()=>this.onPageSizeRelatedOptionsChange())),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:t=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(t):function(t,e){return t.ctrlsSvc.get("gridCtrl").focusInnerElement(e)}(this.beans,t),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(t){this.allowFocusInnerElement=t}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(const t of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){const{el:e,fn:i}=t;this.addManagedListeners(e,{click:i,keydown:t=>{t.key!==As&&t.key!==Hs||(t.preventDefault(),i())}})}t=this.beans,e=this.getGui(),this.addManagedElementListeners(e,{keydown:i=>{if(!i.defaultPrevented&&i.key===Es){const s=i.shiftKey;Fo(t,e,!1,s)||zl(t,s)&&i.preventDefault()}}}),this.areListenersSetup=!0}var t,e}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(t){const e=this.gos.getCallback("paginationNumberFormatter");return e?e({value:t}):function(t,e){if("number"!=typeof t)return"";const i=e(),s=i("thousandSeparator",","),o=i("decimalSeparator",".");return t.toString().replace(".",o).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${s}`)}(t,this.getLocaleTextFunc.bind(this))}getTemplate(){const t=this.getLocaleTextFunc(),e=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${e}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${e}-first-row`}},{tag:"span",attrs:{id:`${e}-to`},children:t("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${e}-last-row`}},{tag:"span",attrs:{id:`${e}-of`},children:t("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${e}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":t("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":t("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${e}-start-page`},children:t("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${e}-start-page-number`}},{tag:"span",attrs:{id:`${e}-of-page`},children:t("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${e}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":t("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":t("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const t=this.pagination.getCurrentPage(),e=this.rowModel.isLastRowIndexKnown(),i=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=0===t,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const s=this.isZeroPagesToDisplay();this.nextButtonDisabled=t===i-1||s,this.lastButtonDisabled=!e||s||t===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(t,e){!function(t,e){w(t,"disabled",e)}(t,e),t.classList.toggle("ag-disabled",e)}isZeroPagesToDisplay(){const t=this.rowModel.isLastRowIndexKnown(),e=this.pagination.getTotalPages();return t&&0===e}updateLabels(){const t=this.rowModel.isLastRowIndexKnown(),e=this.pagination.getTotalPages(),i=this.pagination.getMasterRowCount(),s=t?i:null,o=this.pagination.getCurrentPage(),n=this.pagination.getPageSize();let r,l;this.isZeroPagesToDisplay()?r=l=0:(r=n*o+1,l=r+n-1,t&&l>s&&(l=s));const a=!t&&i<r+n-1,h=this.formatNumber(r);let c;this.lbFirstRowOnPage.textContent=h;const u=this.getLocaleTextFunc();c=a?u("pageLastRowUnknown","?"):this.formatNumber(l),this.lbLastRowOnPage.textContent=c;const d=this.formatNumber(e>0?o+1:0);let g,p;if(this.lbCurrent.textContent=d,t)g=this.formatNumber(e),p=this.formatNumber(s);else{const t=u("more","more");g=t,p=t}this.lbTotal.textContent=g,this.lbRecordCount.textContent=p,this.announceAriaStatus(h,c,p,d,g)}announceAriaStatus(t,e,i,s,o){const n=this.getLocaleTextFunc(),r=n("page","Page"),l=n("to","to"),a=n("of","of"),h=`${t} ${l} ${e} ${a} ${i}`,c=`${r} ${s} ${a} ${o}`;h!==this.ariaRowStatus&&(this.ariaRowStatus=h,this.ariaAnnounce?.announceValue(h,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,this.ariaAnnounce?.announceValue(c,"paginationPage"))}}},Zf={moduleName:"Pagination",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const t=this.gos;this.active=t.get("pagination"),this.pageSizeFromGridOptions=t.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return qf}isPaginateChildRows(){const t=this.gos;return!!(t.get("groupHideParentOfSingleChild")||t.get("groupRemoveSingleChildren")||t.get("groupRemoveLowestSingleChildren"))||t.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(t){const e=this.currentPage;if(!this.active||e===t||"number"!=typeof e)return;const{editSvc:i}=this.beans;i?.isEditing()&&(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"})),this.currentPage=t,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(t){if(!this.active)return;let e=t;this.paginateChildRows||(e=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(t)??t),this.goToPage(Math.floor(e/this.pageSize))}isRowInPage(t){return!this.active||t>=this.topDisplayedRowIndex&&t<=this.bottomDisplayedRowIndex}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const t=this.beans.rowModel.getRowCount(),e=Math.floor(t/this.pageSize);this.goToPage(e)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(t){this.currentPage=t}get pageSize(){return i(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:i(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:i(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:i(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(void 0===this.pageSizeAutoCalculated)return;const t=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==t&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(t,e){const i=this.pageSize;switch(e){case"autoCalculated":this.pageSizeAutoCalculated=t;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=t,0!==this.currentPage&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=t;break;case"gridOptions":this.pageSizeFromGridOptions=t,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,0!==this.currentPage&&this.goToFirstPage()}i!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const t=this.totalPages;this.currentPage>=t&&(this.currentPage=t-1);const e=this.currentPage;(!isFinite(e)||isNaN(e)||e<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const t=this.beans.rowModel,e=t.getTopLevelRowCount();if(this.masterRowCount=e,e<=0)return void this.setZeroRows();const i=this.pageSize,s=e-1;this.totalPages=Math.floor(s/i)+1,this.adjustCurrentPageIfInvalid();const o=this.currentPage;let n=i*(o+1)-1;if(n>s&&(n=s),this.topDisplayedRowIndex=t.getTopLevelRowDisplayedIndex(i*o),n===s)this.bottomDisplayedRowIndex=t.getRowCount()-1;else{const e=t.getTopLevelRowDisplayedIndex(n+1);this.bottomDisplayedRowIndex=e-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const t=this.beans.rowModel.getRowCount();if(this.masterRowCount=t,0===t)return void this.setZeroRows();const{pageSize:e,currentPage:i}=this,s=t-1;this.totalPages=Math.floor(s/e)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=e*i,this.bottomDisplayedRowIndex=e*(i+1)-1,this.bottomDisplayedRowIndex>s&&(this.bottomDisplayedRowIndex=s)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(t){const{keepRenderedRows:e=!1,newPage:i=!1,newPageSize:s=!1}=t;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:i,newPageSize:s,keepRenderedRows:e})}},class extends Dt{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,(t=>{this.centerRowsCtrl=t.center;const e=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:e,scrollVisibilityChanged:e}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()}))}notActive(){return!this.gos.get("paginationAutoPageSize")||null==this.centerRowsCtrl}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const t=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(t>0){const e=this.beans,i=()=>{const i=Math.max(Fe(e),1),s=Math.floor(t/i);e.pagination.setPageSize(s,"autoCalculated")};this.isBodyRendered?Ht(this,i,50)():(i(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}}],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:function(t){return t.rowModel.isLastRowIndexKnown()},paginationGetPageSize:function(t){return t.pagination?.getPageSize()??100},paginationGetCurrentPage:function(t){return t.pagination?.getCurrentPage()??0},paginationGetTotalPages:function(t){return t.pagination?.getTotalPages()??1},paginationGetRowCount:function(t){return t.pagination?t.pagination.getMasterRowCount():t.rowModel.getRowCount()},paginationGoToNextPage:function(t){t.pagination?.goToNextPage()},paginationGoToPreviousPage:function(t){t.pagination?.goToPreviousPage()},paginationGoToFirstPage:function(t){t.pagination?.goToFirstPage()},paginationGoToLastPage:function(t){t.pagination?.goToLastPage()},paginationGoToPage:function(t,e){t.pagination?.goToPage(e)}},dependsOn:[vg]},_f={moduleName:"RowApi",version:se,apiFunctions:{redrawRows:function(t,e={}){const i=e?e.rowNodes:void 0;t.frameworkOverrides.wrapIncoming((()=>t.rowRenderer.redrawRows(i)))},setRowNodeExpanded:function t(e,i,s,o,n){i&&(o&&i.parent&&-1!==i.parent.level&&t(e,i.parent,s,o,n),i.setExpanded(s,void 0,n))},getRowNode:function(t,e){return t.rowModel.getRowNode(e)},addRenderedRowListener:function(t,e,i,s){t.rowRenderer.addRenderedRowListener(e,i,s)},getRenderedNodes:function(t){return t.rowRenderer.getRenderedNodes()},forEachNode:function(t,e,i){t.rowModel.forEachNode(e,i)},getFirstDisplayedRowIndex:function(t){return t.rowRenderer.firstRenderedRow},getLastDisplayedRowIndex:function(t){return t.rowRenderer.lastRenderedRow},getDisplayedRowAtIndex:function(t,e){return t.rowModel.getRow(e)},getDisplayedRowCount:function(t){return t.rowModel.getRowCount()}}},Yf={moduleName:"ScrollApi",version:se,apiFunctions:{getVerticalPixelRange:function(t){return t.ctrlsSvc.getScrollFeature().getVScrollPosition()},getHorizontalPixelRange:function(t){return t.ctrlsSvc.getScrollFeature().getHScrollPosition()},ensureColumnVisible:Tp,ensureIndexVisible:Ep,ensureNodeVisible:function(t,e,i=null){t.frameworkOverrides.wrapIncoming((()=>t.ctrlsSvc.getScrollFeature().ensureNodeVisible(e,i)),"ensureVisible")}}},Qf={moduleName:"RenderApi",version:se,apiFunctions:{setGridAriaProperty:function(t,e,i){if(!e)return;const s=t.ctrlsSvc.getGridBodyCtrl().eGridBody,o=`aria-${e}`;null===i?s.removeAttribute(o):s.setAttribute(o,i)},refreshCells:function(t,e={}){t.frameworkOverrides.wrapIncoming((()=>t.rowRenderer.refreshCells(e)))},refreshHeader:function(t){t.frameworkOverrides.wrapIncoming((()=>{for(const e of t.ctrlsSvc.getHeaderRowContainerCtrls())e.refresh()}))},isAnimationFrameQueueEmpty:function(t){return t.animationFrameSvc?.isQueueEmpty()??!0},flushAllAnimationFrames:function(t){t.animationFrameSvc?.flushAllFrames()},getSizesForCurrentTheme:function(t){return{rowHeight:Fe(t),headerHeight:Kl(t)}},getCellRendererInstances:function(t,e={}){const i=[];for(const s of t.rowRenderer.getCellCtrls(e.rowNodes,e.columns)){const t=s.getCellRenderer();null!=t&&i.push(Ss(t))}if(e.columns?.length)return i;const s=[],o=Pd(e.rowNodes);for(const e of t.rowRenderer.getAllRowCtrls()){if(o&&!Dd(e.rowNode,o))continue;if(!e.isFullWidth())continue;const t=e.getFullWidthCellRenderers();for(let e=0;e<t.length;e++){const i=t[e];null!=i&&s.push(Ss(i))}}return[...s,...i]}}};function Jf({colAutosize:t,visibleCols:e},i,s){Array.isArray(i)?t?.autoSizeCols({colKeys:i,skipHeader:s,source:"api"}):t?.autoSizeCols({...i,colKeys:i.colIds??e.allCols,source:"api"})}function Xf(t,e,i={}){const s=i.minWidth??t.getMinWidth();e<s&&(e=s);const o=i.maxWidth??t.getMaxWidth();return e>o&&(e=o),e}function tm({ctrlsSvc:t,scrollVisibleSvc:e}){const i=t.getGridBodyCtrl(),s=i.isVerticalScrollShowing()?e.getScrollbarWidth():0;return V(i.eGridBody)-s}var em={moduleName:"ColumnAutoSize",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){const{gos:t}=this,e=t.get("autoSizeStrategy");if(e){let i=!1;const s=e.type;if("fitGridWidth"===s||"fitProvidedWidth"===s)i=!0;else if("fitCellContents"===s){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(e)});const s=t.get("rowData");i=null!=s&&s.length>0&&Ce(t)}i&&this.beans.colDelayRenderSvc?.hideColumns(s)}}autoSizeCols(t){const{eventSvc:e,visibleCols:i}=this.beans;this.innerAutoSizeCols(t).then((s=>{const o=t=>Ni(e,Array.from(t),!0,"autosizeColumns");if(!t.scaleUpToFitGridWidth)return o(s);const n=tm(this.beans),r=t.colKeys.filter((t=>!(yi(t)||Si(t)||(t=>i.leftCols.some((e=>Fi(e,t))))(t)||(t=>i.rightCols.some((e=>Fi(e,t))))(t))));this.sizeColumnsToFit(n,t.source,!0,{defaultMaxWidth:t.defaultMaxWidth,defaultMinWidth:t.defaultMinWidth,columnLimits:t.columnLimits?.map((t=>({...t,key:t.colId}))),colKeys:r,onlyScaleUp:!0}),o(s)}))}innerAutoSizeCols(t){return new Promise(((e,i)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation((()=>this.innerAutoSizeCols(t).then(e,i)));const{colKeys:s,skipHeader:o,skipHeaderGroups:n,stopAtGroup:r,defaultMaxWidth:l,defaultMinWidth:a,columnLimits:h=[],source:c="api"}=t,{animationFrameSvc:u,renderStatus:d,colModel:g,autoWidthCalc:p,visibleCols:f}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&d&&(!d.areHeaderCellsRendered()||!d.areCellsRendered()))return this.timesDelayed++,void setTimeout((()=>{this.isAlive()&&this.innerAutoSizeCols(t).then(e,i)}));this.timesDelayed=0;const m=new Set;let w=-1;const v=Object.fromEntries(h.map((({colId:t,...e})=>[t,e]))),C=o??this.gos.get("skipHeaderOnAutoSize"),b=n??C;for(;0!==w;){w=0;const t=[];for(const e of s){if(!e||yi(y=e)||Si(y))continue;const i=g.getCol(e);if(!i||m.has(i))continue;const s=p.getPreferredWidthForColumn(i,C);if(s>0){const t=v[i.colId]??{};t.minWidth??(t.minWidth=a),t.maxWidth??(t.maxWidth=l);const e=Xf(i,s,t);i.setActualWidth(e,c),m.add(i),w++}t.push(i)}t.length&&f.refresh(c)}var y;b||this.autoSizeColumnGroupsByColumns(s,c,r),e(m)}))}autoSizeColumn(t,e,i){this.autoSizeCols({colKeys:[t],skipHeader:i,skipHeaderGroups:!0,source:e})}autoSizeColumnGroupsByColumns(t,e,i){const{colModel:s,ctrlsSvc:o}=this.beans,n=new Set,r=s.getColsForKeys(t);for(const t of r){let e=t.getParent();for(;e&&e!=i;)e.isPadding()||n.add(e),e=e.getParent()}let l;for(const t of n){for(const e of o.getHeaderRowContainerCtrls())if(l=e.getHeaderCtrlForColumn(t),l)break;l?.resizeLeafColumnsToFit(e)}}autoSizeAllColumns(t){this.shouldQueueResizeOperations?this.pushResizeOperation((()=>this.autoSizeAllColumns(t))):this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...t})}addColumnAutosizeListeners(t,e){const i=this.gos.get("skipHeaderOnAutoSize"),s=()=>{this.autoSizeColumn(e,"uiColumnResized",i)};t.addEventListener("dblclick",s);const o=new _a(t);return o.addEventListener("doubleTap",s),()=>{t.removeEventListener("dblclick",s),o.destroy()}}addColumnGroupResize(t,e,i){const s=this.gos.get("skipHeaderOnAutoSize"),o=()=>{const t=[],o=e.getDisplayedLeafColumns();for(const e of o)e.getColDef().suppressAutoSize||t.push(e.getColId());t.length>0&&this.autoSizeCols({colKeys:t,skipHeader:s,stopAtGroup:e,source:"uiColumnResized"}),i()};return t.addEventListener("dblclick",o),()=>t.removeEventListener("dblclick",o)}sizeColumnsToFitGridBody(t,e){if(!this.isAlive())return;const i=tm(this.beans);i>0?this.sizeColumnsToFit(i,"sizeColumnsToFit",!1,t):void 0===e?window.setTimeout((()=>{this.sizeColumnsToFitGridBody(t,100)}),0):100===e?window.setTimeout((()=>{this.sizeColumnsToFitGridBody(t,500)}),100):500===e?window.setTimeout((()=>{this.sizeColumnsToFitGridBody(t,-1)}),500):pe(29)}sizeColumnsToFit(t,e="sizeColumnsToFit",i,s){if(this.shouldQueueResizeOperations)return void this.pushResizeOperation((()=>this.sizeColumnsToFit(t,e,i,s)));const o={};for(const{key:t,...e}of s?.columnLimits??[])o["string"==typeof t?t:t.getColId()]=e;const n=this.beans.visibleCols.allCols;if(t<=0||!n.length)return;const r=vi(n);if(s?.onlyScaleUp&&r>t)return;if(t===r&&n.every((t=>{if(t.colDef.suppressSizeToFit)return!0;const e=o?.[t.getId()],i=e?.minWidth??s?.defaultMinWidth,n=e?.maxWidth??s?.defaultMaxWidth,r=t.getActualWidth();return(null==i||r>=i)&&(null==n||r<=n)})))return;const l=[],a=[];for(const t of n){const e=s?.colKeys?.some((e=>Fi(t,e)))??!0;t.getColDef().suppressSizeToFit||!e?a.push(t):l.push(t)}const h=l.slice(0);let c=!1;const u=t=>{di(l,t),a.push(t)};for(const t of l){t.resetActualWidth(e);const i=o?.[t.getId()],n=i?.minWidth??s?.defaultMinWidth,r=i?.maxWidth??s?.defaultMaxWidth,l=t.getActualWidth();"number"==typeof n&&l<n?t.setActualWidth(n,e,!0):"number"==typeof r&&l>r&&t.setActualWidth(r,e,!0)}for(;!c;){c=!0;const i=t-vi(a);if(i<=0)for(const t of l){const i=o?.[t.getId()]?.minWidth??s?.defaultMinWidth??t.minWidth;t.setActualWidth(i,e,!0)}else{const t=i/vi(l);let n=i;for(let i=l.length-1;i>=0;i--){const r=l[i],a=o?.[r.getId()],h=a?.minWidth??s?.defaultMinWidth,d=a?.maxWidth??s?.defaultMaxWidth,g=r.getMinWidth(),p=r.getMaxWidth(),f="number"==typeof h&&h>g?h:g,m="number"==typeof d&&d<p?d:p;let w=Math.round(r.getActualWidth()*t);w<f?(w=f,u(r),c=!1):w>m?(w=m,u(r),c=!1):0===i&&(w=n),r.setActualWidth(w,e,!0),n-=w}}}for(const t of h)t.fireColumnWidthChangedEvent(e);const d=this.beans.visibleCols;d.setLeftValues(e),d.updateBodyWidths(),i||Ni(this.eventSvc,h,!0,e)}applyAutosizeStrategy(){const{gos:t,colDelayRenderSvc:e}=this.beans,i=t.get("autoSizeStrategy");"fitGridWidth"!==i?.type&&"fitProvidedWidth"!==i?.type||setTimeout((()=>{if(!this.isAlive())return;const t=i.type;if("fitGridWidth"===t){const{columnLimits:t,defaultMinWidth:e,defaultMaxWidth:s}=i,o=t?.map((({colId:t,minWidth:e,maxWidth:i})=>({key:t,minWidth:e,maxWidth:i})));this.sizeColumnsToFitGridBody({defaultMinWidth:e,defaultMaxWidth:s,columnLimits:o})}else"fitProvidedWidth"===t&&this.sizeColumnsToFit(i.width,"sizeColumnsToFit");e?.revealColumns(t)}))}onFirstDataRendered({colIds:t,...e}){setTimeout((()=>{if(!this.isAlive())return;const i="autosizeColumns";t?this.autoSizeCols({...e,source:i,colKeys:t}):this.autoSizeAllColumns({...e,source:i}),this.beans.colDelayRenderSvc?.revealColumns(e.type)}))}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(const t of this.resizeOperationQueue)t();this.resizeOperationQueue=[]}pushResizeOperation(t){this.resizeOperationQueue.push(t)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}}],apiFunctions:{sizeColumnsToFit:function(t,e){"number"==typeof e?t.colAutosize?.sizeColumnsToFit(e,"api"):t.colAutosize?.sizeColumnsToFitGridBody(e)},autoSizeColumns:Jf,autoSizeAllColumns:function(t,e){e&&"object"==typeof e?Jf(t,e):t.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:e})}},dependsOn:[oc]},im={moduleName:"PinnedRow",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){const{gos:t}=this,e=()=>{const e=t.get("enableRowPinning"),i=Ie(t),s=!!e||"pinnedBottom"===i||"pinnedTop"===i,o=s?this.inner instanceof Ea:this.inner instanceof ka;this.inner&&o&&this.destroyBean(this.inner),!o&&this.inner||(this.inner=this.createManagedBean(s?new ka:new Ea))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],e),e()}reset(){return this.inner.reset()}isEmpty(t){return this.inner.isEmpty(t)}isManual(){return this.inner.isManual()}isRowsToRender(t){return this.inner.isRowsToRender(t)}pinRow(t,e,i){return this.inner.pinRow(t,e,i)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(t,e){return this.inner.getPinnedRowById(t,e)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(t){return this.inner.getPinnedTopRow(t)}getPinnedBottomRow(t){return this.inner.getPinnedBottomRow(t)}forEachPinnedRow(t,e){return this.inner.forEachPinnedRow(t,e)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(t){return this.inner.setPinnedState(t)}setGrandTotalPinned(t){return this.inner.setGrandTotalPinned(t)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}}],css:[".ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}"],apiFunctions:{getPinnedTopRowCount:function(t){return t.pinnedRowModel?.getPinnedTopRowCount()??0},getPinnedBottomRowCount:function(t){return t.pinnedRowModel?.getPinnedBottomRowCount()??0},getPinnedTopRow:function(t,e){return t.pinnedRowModel?.getPinnedTopRow(e)},getPinnedBottomRow:function(t,e){return t.pinnedRowModel?.getPinnedBottomRow(e)},forEachPinnedRow:function(t,e,i){return t.pinnedRowModel?.forEachPinnedRow(e,i)}},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},sm=class{constructor(t,e){this.col=t,this.firstNode=e,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(e)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(t){this.spannedNodes.add(t),this.lastNode=t}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(t){return t.column===this.col&&t.rowPinned==this.firstNode.rowPinned&&this.firstNode.rowIndex<=t.rowIndex&&t.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){const t=this.firstNode.__autoHeights?.[this.col.getColId()];if(null==t)return;let e=0;for(const t of this.spannedNodes)t!==this.lastNode&&(e+=t.rowHeight);return t-e}},om=class extends Dt{constructor(t){super(),this.column=t}buildCache(t){const{column:e,beans:{gos:i,pinnedRowModel:s,rowModel:o,valueSvc:n,pagination:r}}=this,{colDef:l}=e,a=this.getNodeMap(t),h=new Map,c=i.getCallback("isFullWidthRow"),u=l.equals,d=l.spanRows,g="function"==typeof d;let p,f=null,m=null;const w=(t,e)=>{f=t,m=null,p=e},v=t=>{const s=!(t.isExpandable()||t.group||t.detail||c&&c({rowNode:t}));if(null==t.rowIndex||!s)return void w(null,null);if(null==f||t.level!==f.level||t.footer||m&&t.rowIndex-1!==m?.getLastNode().rowIndex)return void w(t,n.getValue(e,t));const o=n.getValue(e,t);if(g){const s=Qe(i,{valueA:p,nodeA:f,valueB:o,nodeB:t,column:e,colDef:l});if(!d(s))return void w(t,o)}else if(u?!u(p,o):p!==o)return void w(t,o);if(!m){const t=a?.get(f);t?.firstNode===f?(t.reset(),m=t):m=new sm(e,f),h.set(f,m)}m.addSpannedNode(t),h.set(t,m)};switch(t){case"center":o.forEachDisplayedNode?.((t=>{(!r||r.isRowInPage(t.rowIndex))&&v(t)})),this.centerValueNodeMap=h;break;case"top":s?.forEachPinnedRow("top",v),this.topValueNodeMap=h;break;case"bottom":s?.forEachPinnedRow("bottom",v),this.bottomValueNodeMap=h}}isCellSpanning(t){return!!this.getCellSpan(t)}getCellSpan(t){return this.getNodeMap(t.rowPinned).get(t)}getNodeMap(t){switch(t){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},nm=class extends cd{constructor(t,e,i){super(t.col,t.firstNode,i,e),this.cellSpan=t,this.SPANNED_CELL_CSS_CLASS="ag-spanned-cell"}setComp(t,e,i,s,o,n,r){this.eWrapper=i,super.setComp(t,e,i,s,o,n,r),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){const{eGui:t,rowNode:e}=this;t&&null!=e.rowIndex&&P(t,e.rowIndex)}setAriaRowSpan(){v(this.eGui,"rowspan",this.cellSpan.spannedNodes.size)}setFocusedCellPosition(t){this.focusedCellPosition=t}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){const t=this.beans.focusSvc.getFocusedCell();return!!t&&this.cellSpan.doesSpanContain(t)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(t){const{beans:e}=this;if(Ll(e))return void(this.focusedCellPosition=void 0);const i=this.isCellFocused();i||(this.focusedCellPosition=void 0),t&&i&&(this.focusedCellPosition={rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:t.column}),super.onCellFocused(t)}getRootElement(){return this.eWrapper}},rm=class extends pd{onRowIndexChanged(){super.onRowIndexChanged();for(const t of this.getAllCellCtrls())t.refreshAriaRowIndex()}getInitialRowClasses(t){return["ag-spanned-row"]}getNewCellCtrl(t){const e=this.beans.rowSpanSvc?.getCellSpan(t,this.rowNode);if(e)return e.firstNode!==this.rowNode?void 0:new nm(e,this,this.beans)}isCorrectCtrlForSpan(t){const e=this.beans.rowSpanSvc?.getCellSpan(t.column,this.rowNode);return!!e&&(!(e.firstNode!==this.rowNode)&&t.getCellSpan()===e)}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},lm={moduleName:"CellSpan",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=Ht(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=Ht(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){const t=this.onRowDataUpdated.bind(this),e=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:e,pinnedRowsChanged:e,rowNodeDataChanged:t,cellValueChanged:t})}register(t){const{gos:e}=this.beans;if(!e.get("enableCellSpan"))return;if(this.spanningColumns.has(t))return;const i=this.createManagedBean(new om(t));this.spanningColumns.set(t,i),i.buildCache("top"),i.buildCache("bottom"),i.buildCache("center"),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(t){this.dispatchLocalEvent({type:"spannedCellsUpdated",pinned:t})}deregister(t){this.spanningColumns.delete(t)}onRowDataUpdated({node:t}){const{spannedRowRenderer:e}=this.beans;if(t.rowPinned){if(null!=this.pinnedTimeout)return;this.pinnedTimeout=window.setTimeout((()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),e?.createCtrls("top"),e?.createCtrls("bottom")}),0)}else null==this.modelTimeout&&(this.modelTimeout=window.setTimeout((()=>{this.modelTimeout=null,this.buildModelCaches(),e?.createCtrls("center")}),0))}buildModelCaches(){null!=this.modelTimeout&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach((t=>t.buildCache("center"))),this.debounceModelEvent()}buildPinnedCaches(){null!=this.pinnedTimeout&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach((t=>{t.buildCache("top"),t.buildCache("bottom")})),this.debouncePinnedEvent()}isCellSpanning(t,e){const i=this.spanningColumns.get(t);return!!i&&i.isCellSpanning(e)}getCellSpanByPosition(t){const{pinnedRowModel:e,rowModel:i}=this.beans,s=t.rowIndex,o=this.spanningColumns.get(t.column);if(!o)return;let n;switch(t.rowPinned){case"top":n=e?.getPinnedTopRow(s);break;case"bottom":n=e?.getPinnedBottomRow(s);break;default:n=i.getRow(s)}return n?o.getCellSpan(n):void 0}getCellStart(t){const e=this.getCellSpanByPosition(t);return e?{...t,rowIndex:e.firstNode.rowIndex}:t}getCellEnd(t){const e=this.getCellSpanByPosition(t);return e?{...t,rowIndex:e.getLastNode().rowIndex}:t}getCellSpan(t,e){const i=this.spanningColumns.get(t);if(i)return i.getCellSpan(e)}forEachSpannedColumn(t,e){for(const[i,s]of this.spanningColumns)s.isCellSpanning(t)&&e(i,s.getCellSpan(t))}destroy(){super.destroy(),this.spanningColumns.clear()}},class extends Dt{constructor(){super(...arguments),this.beanName="spannedRowRenderer",this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls("top"),this.createCtrls("bottom"),this.createCtrls("center")}createCtrls(t){const{rowSpanSvc:e}=this.beans,i=this.getCtrlsMap(t),s=i.size,o=this.getAllRelevantRowControls(t),n=new Map;let r=!1;for(const t of o)t.isAlive()&&e?.forEachSpannedColumn(t.rowNode,((t,e)=>{if(n.has(e.firstNode))return;const s=i.get(e.firstNode);if(s)return n.set(e.firstNode,s),void i.delete(e.firstNode);r=!0;const o=new rm(e.firstNode,this.beans,!1,!1,!1);n.set(e.firstNode,o)}));if(this.setCtrlsMap(t,n),r||n.size!==s){for(const t of i.values())t.destroyFirstPass(!0),t.destroySecondPass();this.dispatchLocalEvent({type:"spannedRowsUpdated",ctrlsKey:t})}}getAllRelevantRowControls(t){const{rowRenderer:e}=this.beans;switch(t){case"top":return e.topRowCtrls;case"bottom":return e.bottomRowCtrls;case"center":return e.allRowCtrls}}getCellByPosition(t){const{rowSpanSvc:e}=this.beans,i=e?.getCellSpanByPosition(t);if(!i)return;const s=this.getCtrlsMap(t.rowPinned).get(i.firstNode);return s?s.getAllCellCtrls().find((e=>e.column===t.column)):void 0}getCtrls(t){return[...this.getCtrlsMap(t).values()]}destroyRowCtrls(t){for(const e of this.getCtrlsMap(t).values())e.destroyFirstPass(!0),e.destroySecondPass();this.setCtrlsMap(t,new Map)}getCtrlsMap(t){switch(t){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(t,e){switch(t){case"top":this.topCtrls=e;break;case"bottom":this.bottomCtrls=e;break;default:this.centerCtrls=e}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}}]},am=class extends Dt{constructor(t,e){super(),this.cellCtrl=t,this.staticClasses=[],this.beans=e,this.column=t.column}setComp(t){this.cellComp=t,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){const{column:t,cellComp:e}=this,i=t.colDef,s=i.cellClassRules,o=this.getCellClassParams(t,i);ud(this.beans.expressionSvc,s===this.cellClassRules?void 0:this.cellClassRules,s,o,(t=>e.toggleCss(t,!0)),(t=>e.toggleCss(t,!1))),this.cellClassRules=s}applyUserStyles(){const t=this.column,e=t.colDef,i=e.cellStyle;if(!i)return;let s;s="function"==typeof i?i(this.getCellClassParams(t,e)):i,s&&this.cellComp.setUserStyles(s)}applyClassesFromColDef(){const{column:t,cellComp:e}=this,i=t.colDef,s=this.getCellClassParams(t,i);for(const t of this.staticClasses)e.toggleCss(t,!1);const o=this.beans.cellStyles.getStaticCellClasses(i,s);this.staticClasses=o;for(const t of o)e.toggleCss(t,!0)}getCellClassParams(t,e){const{value:i,rowNode:s}=this.cellCtrl;return Qe(this.beans.gos,{value:i,data:s.data,node:s,colDef:e,column:t,rowIndex:s.rowIndex})}},hm={moduleName:"CellStyle",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(t,e,i,s){ud(this.beans.expressionSvc,void 0,t.cellClassRules,e,i,s),this.processStaticCellClasses(t,e,i)}getStaticCellClasses(t,e){const{cellClass:i}=t;if(!i)return[];let s;return s="function"==typeof i?i(e):i,"string"==typeof s&&(s=[s]),s||[]}createCellCustomStyleFeature(t,e){return new am(t,e)}processStaticCellClasses(t,e,i){this.getStaticCellClasses(t,e).forEach((t=>{i(t)}))}}]},cm={moduleName:"RowStyle",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(t,e){const i=this.gos,s=e=>{if("string"==typeof e)t.push(e);else if(Array.isArray(e))for(const i of e)t.push(i)},o=i.get("rowClass");o&&s(o);const n=i.getCallback("getRowClass");n&&s(n({data:e.data,node:e,rowIndex:e.rowIndex}))}preProcessRowClassRules(t,e){this.processRowClassRules(e,(e=>{t.push(e)}),(()=>{}))}processRowClassRules(t,e,i){const{gos:s,expressionSvc:o}=this.beans,n=Qe(s,{data:t.data,node:t,rowIndex:t.rowIndex});ud(o,void 0,s.get("rowClassRules"),n,e,i)}processStylesFromGridOptions(t){const e=this.gos,i=e.get("rowStyle"),s=e.getCallback("getRowStyle");let o;if(s&&(o=s({data:t.data,node:t,rowIndex:t.rowIndex})),o||i)return Object.assign({},i,o)}}]},um=class extends Dt{constructor(t,e){super(),this.columns=t,this.element=e,this.destroyManagedListeners=[],this.enableFeature=t=>{const{beans:e,gos:i,element:s,columns:o}=this,n=e.colHover;if(t??i.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(s,{mouseover:n.setMouseOver.bind(n,o),mouseout:n.clearMouseOver.bind(n)});else{for(const t of this.destroyManagedListeners)t();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",(({currentValue:t})=>{this.enableFeature(t)})),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},dm={moduleName:"AllCommunity",version:se,dependsOn:[Ef,Of,Gf,fg,sf,of,nf,rf,lf,af,hf,ef,lp,ap,hp,rp,cp,up,Wf,bf,Zf,kc,_f,Yf,Qf,em,Kh,im,pf,Td,hm,{moduleName:"ColumnHover",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="colHover"}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",(({currentValue:t})=>{t||this.clearMouseOver()}))}setMouseOver(t){this.updateState(t)}clearMouseOver(){this.updateState(null)}isHovered(t){if(!this.gos.get("columnHoverHighlight"))return!1;const e=this.selectedColumns;return!!e&&e.indexOf(t)>=0}addHeaderColumnHoverListener(t,e,i){const s=()=>{const t=this.isHovered(i);e.toggleCss("ag-column-hover",t)};t.addManagedEventListeners({columnHoverChanged:s}),s()}onCellColumnHover(t,e){if(!e)return;const i=this.isHovered(t);e.toggleCss("ag-column-hover",i)}addHeaderFilterColumnHoverListener(t,e,i,s){this.createHoverFeature(t,[i],s);const o=()=>{const t=this.isHovered(i);e.toggleCss("ag-column-hover",t)};t.addManagedEventListeners({columnHoverChanged:o}),o()}createHoverFeature(t,e,i){t.createManagedBean(new um(e,i))}updateState(t){this.selectedColumns=t,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}}],apiFunctions:{isColumnHovered:function(t,e){return!!t.colHover?.isHovered(e)}}},cm,{moduleName:"EventApi",version:se,apiFunctions:{addEventListener:function(t,e,i){t.apiEventSvc?.addListener(e,i)},addGlobalListener:function(t,e){t.apiEventSvc?.addGlobalListener(e)},removeEventListener:function(t,e,i){t.apiEventSvc?.removeListener(e,i)},removeGlobalListener:function(t,e){t.apiEventSvc?.removeGlobalListener(e)}},beans:[class extends Dt{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(t,e){const i=this.wrapSvc?.wrap(t,e)??e,s=!ou.has(t),o=s?this.asyncListeners:this.syncListeners;o.has(t)||o.set(t,new Set),o.get(t).add(i),this.eventSvc.addListener(t,i,s)}removeListener(t,e){const i=this.wrapSvc?.unwrap(t,e)??e,s=this.asyncListeners.get(t),o=!!s?.delete(i);o||this.syncListeners.get(t)?.delete(i),this.eventSvc.removeListener(t,i,o)}addGlobalListener(t){const e=this.wrapSvc?.wrapGlobal(t)??t,i=(t,i)=>{ou.has(t)&&e(t,i)},s=(t,i)=>{ou.has(t)||e(t,i)};this.globalListenerPairs.set(t,{syncListener:i,asyncListener:s});const o=this.eventSvc;o.addGlobalListener(i,!1),o.addGlobalListener(s,!0)}removeGlobalListener(t){const{eventSvc:e,wrapSvc:i,globalListenerPairs:s}=this,o=i?.unwrapGlobal(t)??t;if(s.has(o)){const{syncListener:i,asyncListener:n}=s.get(o);e.removeGlobalListener(i,!1),e.removeGlobalListener(n,!0),s.delete(t)}else this.syncGlobalListeners.delete(o),e.removeGlobalListener(o,!1)}destroyEventListeners(t,e){t.forEach(((t,i)=>{t.forEach((t=>this.eventSvc.removeListener(i,t,e))),t.clear()})),t.clear()}destroyGlobalListeners(t,e){for(const i of t)this.eventSvc.removeGlobalListener(i,e);t.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:t,eventSvc:e}=this;t.forEach((({syncListener:t,asyncListener:i})=>{e.removeGlobalListener(t,!1),e.removeGlobalListener(i,!0)})),t.clear()}}]},Id,zf,gp,{moduleName:"Locale",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){const t=this.gos,e=t.getCallback("getLocaleText");return e?function(t){return(e,i,s)=>t({key:e,defaultValue:i,variableValues:s})}(e):(i=t.get("localeText"),(t,e,s)=>{let o=i?.[t];if(o&&s?.length){let t=0;for(;!(t>=s.length)&&-1!==o.indexOf("${variable}");)o=o.replace("${variable}",s[t++])}return o??e});var i}}]},{moduleName:"RowAutoHeight",version:se,beans:[class extends Dt{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=Ht(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){const{visibleCols:t,rowModel:e,rowSpanSvc:i,pinnedRowModel:s}=this.beans,o=t.autoHeightCols;let n=!1;const r=t=>{const e=t.__autoHeights;let s=Re(this.beans,t).height;for(const n of o){let o=e?.[n.getColId()];const r=i?.getCellSpan(n,t);if(r){if(r.getLastNode()!==t)continue;if(o=i?.getCellSpan(n,t)?.getLastNodeAutoHeight(),!o)return}if(null==o){if(this.colSpanSkipCell(n,t))continue;return}s=Math.max(o,s)}s!==t.rowHeight&&(t.setRowHeight(s),n=!0)};s?.forEachPinnedRow?.("top",r),s?.forEachPinnedRow?.("bottom",r),e.forEachDisplayedNode?.(r),n&&e.onRowHeightChanged?.()}setRowAutoHeight(t,e,i){if(t.__autoHeights??(t.__autoHeights={}),null==e)return void delete t.__autoHeights[i.getId()];const s=t.__autoHeights[i.getId()];t.__autoHeights[i.getId()]=e,s!==e&&this.requestCheckAutoHeight()}colSpanSkipCell(t,e){const{colModel:i,colViewport:s,visibleCols:o}=this.beans;if(!i.colSpanActive)return!1;let n=[];switch(t.getPinned()){case"left":n=o.getLeftColsForRow(e);break;case"right":n=o.getRightColsForRow(e);break;case null:n=s.getColsWithinViewport(e)}return!n.includes(t)}setupCellAutoHeight(t,e,i){if(!t.column.isAutoHeight()||!e)return!1;this.wasEverActive=!0;const s=e.parentElement,{rowNode:o,column:n}=t,r=this.beans,l=a=>{if(this.beans.editSvc?.isEditing(t))return;if(!t.isAlive()||!i.isAlive())return;const{paddingTop:h,paddingBottom:c,borderBottomWidth:u,borderTopWidth:d}=B(s),p=e.offsetHeight+(h+c+u+d);if(a<5){const t=g(r);if(!t?.contains(e)||0==p)return void window.setTimeout((()=>l(a+1)),0)}this.setRowAutoHeight(o,p,n)},a=()=>l(0);a();const h=at(r,e,a);return i.addDestroyFunc((()=>{h(),this.setRowAutoHeight(o,void 0,n)})),!0}setAutoHeightActive(t){this.active=t.list.some((t=>t.isVisible()&&t.isAutoHeight()))}areRowsMeasured(){if(!this.active)return!0;const t=this.beans.rowRenderer.getAllRowCtrls();let e=null;for(const{rowNode:i}of t)if(e&&!this.beans.colModel.colSpanActive||(e=this.beans.colViewport.getColsWithinViewport(i).filter((t=>t.isAutoHeight()))),0!==e.length){if(!i.__autoHeights)return!1;for(const t of e){const e=i.__autoHeights[t.getColId()];if(!e||i.rowHeight<e)return!1}}return!0}}]},Uh,Af,lm]};export{dm as A,ie as M,Zd as c,zt as p}
|