@sankhyalabs/ezui 7.1.9 → 7.1.11
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/dist/cjs/ApplicationUtils-5cc05979.js.gz +0 -0
- package/dist/cjs/CSSVarsUtils-f20973d1.js.gz +0 -0
- package/dist/cjs/CheckMode-ecb90b87.js.gz +0 -0
- package/dist/cjs/DialogType-2114c337.js.gz +0 -0
- package/dist/cjs/EzScrollDirection-b2c99895.js.gz +0 -0
- package/dist/cjs/FocusResolver-885f2173.js.gz +0 -0
- package/dist/cjs/FormLayout-18853e70.js.gz +0 -0
- package/dist/cjs/RichToolbarHelper-ea12328f.js.gz +0 -0
- package/dist/cjs/_commonjsHelpers-537d719a.js.gz +0 -0
- package/dist/cjs/app-globals-2fbe4b17.js.gz +0 -0
- package/dist/cjs/constants-72b7e05e.js.gz +0 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-alert-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-alert.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-application.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-avatar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-badge.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-breadcrumb.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-calendar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-card-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-chart.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-check.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-chip.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-classic-combo-box.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-classic-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-classic-text-area.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-collapsible-box.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-combo-box-list_4.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box-list_4.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-date-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-date-time-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-dialog.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-double-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-dropdown.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-empty-card.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-file-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-filter-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-form-view.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-form.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-grid-view.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-grid.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-guide-navigator.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-icon.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-link-builder_6.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-list-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-loading-bar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-modal-container.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-modal.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-number-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-pagination.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popover-core.cjs.entry.js +18 -2
- package/dist/cjs/ez-popover-core.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +2 -0
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popover.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-popup.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-progress-bar.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-radio-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-scroller_2.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-search-plus.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-search-result-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-search.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-skeleton.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-sortable-list.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-spinner.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-split-button.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-split-item.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-split-panel.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tabselector.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tag-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tag.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-text-area.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-text-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tile-medium.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tile.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-time-input.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-toast.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-tree.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-underface.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-upload.cjs.entry.js.gz +0 -0
- package/dist/cjs/ez-view-stack.cjs.entry.js.gz +0 -0
- package/dist/cjs/ezListHelper-0d3970b4.js.gz +0 -0
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/ezui.cjs.js.gz +0 -0
- package/dist/cjs/filter-column.cjs.entry.js +7 -2
- package/dist/cjs/filter-column.cjs.entry.js.gz +0 -0
- package/dist/cjs/{floating-ui.dom.esm-f4d87617.js → floating-ui.dom.esm-f1e4e440.js} +93 -0
- package/dist/cjs/floating-ui.dom.esm-f1e4e440.js.gz +0 -0
- package/dist/cjs/index-1be40f19.js.gz +0 -0
- package/dist/cjs/index-a7b0c73d.js.gz +0 -0
- package/dist/cjs/index.cjs.js.gz +0 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js.gz +0 -0
- package/dist/cjs/{purify-ca9603eb.js → purify-5548aebb.js} +724 -262
- package/dist/cjs/purify-5548aebb.js.gz +0 -0
- package/dist/cjs/search-column-316e2c59.js.gz +0 -0
- package/dist/cjs/searchFormatters-b7e1ed1e.js.gz +0 -0
- package/dist/collection/components/ez-actions-button/ez-actions-button.css.gz +0 -0
- package/dist/collection/components/ez-actions-button/ez-actions-button.js.gz +0 -0
- package/dist/collection/components/ez-alert/ez-alert.css.gz +0 -0
- package/dist/collection/components/ez-alert/ez-alert.js.gz +0 -0
- package/dist/collection/components/ez-alert-list/ez-alert-list.css.gz +0 -0
- package/dist/collection/components/ez-alert-list/ez-alert-list.js.gz +0 -0
- package/dist/collection/components/ez-application/ez-application.css.gz +0 -0
- package/dist/collection/components/ez-application/ez-application.js.gz +0 -0
- package/dist/collection/components/ez-avatar/ez-avatar.css.gz +0 -0
- package/dist/collection/components/ez-avatar/ez-avatar.js.gz +0 -0
- package/dist/collection/components/ez-badge/enum/sizes.js.gz +0 -0
- package/dist/collection/components/ez-badge/ez-badge.css.gz +0 -0
- package/dist/collection/components/ez-badge/ez-badge.js.gz +0 -0
- package/dist/collection/components/ez-badge/interfaces/IPosition.js.gz +0 -0
- package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.css.gz +0 -0
- package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.js.gz +0 -0
- package/dist/collection/components/ez-breadcrumb/subcomponents/breadcrumb-item.js.gz +0 -0
- package/dist/collection/components/ez-button/ez-button.css.gz +0 -0
- package/dist/collection/components/ez-button/ez-button.js.gz +0 -0
- package/dist/collection/components/ez-calendar/ez-calendar.css.gz +0 -0
- package/dist/collection/components/ez-calendar/ez-calendar.js.gz +0 -0
- package/dist/collection/components/ez-card-item/ez-card-item.css.gz +0 -0
- package/dist/collection/components/ez-card-item/ez-card-item.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/BarChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/ColumnChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/DonutChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/LineChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/PieChart.js.gz +0 -0
- package/dist/collection/components/ez-chart/components/index.js.gz +0 -0
- package/dist/collection/components/ez-chart/ez-chart.css.gz +0 -0
- package/dist/collection/components/ez-chart/ez-chart.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartAxis.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartContext.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartOptions.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartSerie.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartStrategies.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartType.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/ChartTypeValue.js.gz +0 -0
- package/dist/collection/components/ez-chart/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-chart/test/mock-chart.js.gz +0 -0
- package/dist/collection/components/ez-chart/types/BaseHighChartsRender.js.gz +0 -0
- package/dist/collection/components/ez-check/CheckMode.js.gz +0 -0
- package/dist/collection/components/ez-check/ez-check.css.gz +0 -0
- package/dist/collection/components/ez-check/ez-check.js.gz +0 -0
- package/dist/collection/components/ez-chip/ez-chip.css.gz +0 -0
- package/dist/collection/components/ez-chip/ez-chip.js.gz +0 -0
- package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.css.gz +0 -0
- package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.js.gz +0 -0
- package/dist/collection/components/ez-classic-combo-box/interfaces/IOption.js.gz +0 -0
- package/dist/collection/components/ez-classic-input/ez-classic-input.css.gz +0 -0
- package/dist/collection/components/ez-classic-input/ez-classic-input.js.gz +0 -0
- package/dist/collection/components/ez-classic-input/interfaces/optionsSetFocus.js.gz +0 -0
- package/dist/collection/components/ez-classic-input/utils/maskFormatter.js.gz +0 -0
- package/dist/collection/components/ez-classic-text-area/ez-classic-text-area.css.gz +0 -0
- package/dist/collection/components/ez-classic-text-area/ez-classic-text-area.js.gz +0 -0
- package/dist/collection/components/ez-classic-text-area/interfaces/optionsSetFocus.js.gz +0 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css.gz +0 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js.gz +0 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.css.gz +0 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box-list/ez-combo-box-list.js.gz +0 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.css.gz +0 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js.gz +0 -0
- package/dist/collection/components/ez-date-input/ez-date-input.css.gz +0 -0
- package/dist/collection/components/ez-date-input/ez-date-input.js.gz +0 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css.gz +0 -0
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js.gz +0 -0
- package/dist/collection/components/ez-dialog/DialogType.js.gz +0 -0
- package/dist/collection/components/ez-dialog/ez-dialog.css.gz +0 -0
- package/dist/collection/components/ez-dialog/ez-dialog.js.gz +0 -0
- package/dist/collection/components/ez-double-list/doubleListHelper.js.gz +0 -0
- package/dist/collection/components/ez-double-list/ez-double-list.css.gz +0 -0
- package/dist/collection/components/ez-double-list/ez-double-list.js.gz +0 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.css.gz +0 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.js.gz +0 -0
- package/dist/collection/components/ez-dropdown/structure/DropdownItem.js.gz +0 -0
- package/dist/collection/components/ez-dropdown/structure/SubmenuControl.js.gz +0 -0
- package/dist/collection/components/ez-empty-card/ez-empty-card.css.gz +0 -0
- package/dist/collection/components/ez-empty-card/ez-empty-card.js.gz +0 -0
- package/dist/collection/components/ez-file-item/ez-file-item.css.gz +0 -0
- package/dist/collection/components/ez-file-item/ez-file-item.js.gz +0 -0
- package/dist/collection/components/ez-filter-input/ez-filter-input.css.gz +0 -0
- package/dist/collection/components/ez-filter-input/ez-filter-input.js.gz +0 -0
- package/dist/collection/components/ez-form/ez-form.css.gz +0 -0
- package/dist/collection/components/ez-form/ez-form.js.gz +0 -0
- package/dist/collection/components/ez-form/store/form.slice.js.gz +0 -0
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js.gz +0 -0
- package/dist/collection/components/ez-form-view/ez-form-view.css.gz +0 -0
- package/dist/collection/components/ez-form-view/ez-form-view.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/RichText.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInputPlus.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-form-view/interfaces/IFormViewField.js.gz +0 -0
- package/dist/collection/components/ez-form-view/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-form-view/structure/index.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/EzGridController.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRendererStatus.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/selectionHeader.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellEditorConstants.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/test/constants/EzGridCustomCellRenderConstants.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellRender.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellEditor.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellRender.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/SearchPlus.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js.gz +0 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/utils/buildLocaleText.js.gz +0 -0
- package/dist/collection/components/ez-grid/ez-grid.css.gz +0 -0
- package/dist/collection/components/ez-grid/ez-grid.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/IColumnFilter.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/ICustomFormatter.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/IGridMode.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/ISelection.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/ISelectionToastConfig.js.gz +0 -0
- package/dist/collection/components/ez-grid/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.css +10 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.css.gz +0 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +6 -1
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js.gz +0 -0
- package/dist/collection/components/ez-grid/subcomponents/selection-counter.js.gz +0 -0
- package/dist/collection/components/ez-grid/subcomponents/utils/selectionCounterUtils.js.gz +0 -0
- package/dist/collection/components/ez-grid/test/resources/gridDataUnit.js.gz +0 -0
- package/dist/collection/components/ez-grid/utils/ColumnFilterManager.js.gz +0 -0
- package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js.gz +0 -0
- package/dist/collection/components/ez-grid/utils/index.js.gz +0 -0
- package/dist/collection/components/ez-grid-view/ez-grid-view.css.gz +0 -0
- package/dist/collection/components/ez-grid-view/ez-grid-view.js.gz +0 -0
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.css.gz +0 -0
- package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js.gz +0 -0
- package/dist/collection/components/ez-guide-navigator/interfaces/IGuideItem.js.gz +0 -0
- package/dist/collection/components/ez-guide-navigator/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-icon/ez-icon.css.gz +0 -0
- package/dist/collection/components/ez-icon/ez-icon.js.gz +0 -0
- package/dist/collection/components/ez-list/ez-list.css.gz +0 -0
- package/dist/collection/components/ez-list/ez-list.js.gz +0 -0
- package/dist/collection/components/ez-list/ezListHelper.js.gz +0 -0
- package/dist/collection/components/ez-list-item/ez-list-item.css.gz +0 -0
- package/dist/collection/components/ez-list-item/ez-list-item.js.gz +0 -0
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.css.gz +0 -0
- package/dist/collection/components/ez-loading-bar/ez-loading-bar.js.gz +0 -0
- package/dist/collection/components/ez-modal/ez-modal.css.gz +0 -0
- package/dist/collection/components/ez-modal/ez-modal.js.gz +0 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.css.gz +0 -0
- package/dist/collection/components/ez-modal-container/ez-modal-container.js.gz +0 -0
- package/dist/collection/components/ez-modal-container/index.js.gz +0 -0
- package/dist/collection/components/ez-modal-container/modal-action.js.gz +0 -0
- package/dist/collection/components/ez-modal-container/modal-button-status.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +2 -1
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionOption.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/interfaces/IStaticOptionsFetchConfig.js.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.css.gz +0 -0
- package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.js.gz +0 -0
- package/dist/collection/components/ez-number-input/ez-number-input.css.gz +0 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js.gz +0 -0
- package/dist/collection/components/ez-pagination/ez-pagination.css.gz +0 -0
- package/dist/collection/components/ez-pagination/ez-pagination.js.gz +0 -0
- package/dist/collection/components/ez-popover/ez-popover.css.gz +0 -0
- package/dist/collection/components/ez-popover/ez-popover.js.gz +0 -0
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.css.gz +0 -0
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +20 -0
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.js.gz +0 -0
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css.gz +0 -0
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +36 -2
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js.gz +0 -0
- package/dist/collection/components/ez-popup/ez-popup.css.gz +0 -0
- package/dist/collection/components/ez-popup/ez-popup.js.gz +0 -0
- package/dist/collection/components/ez-popup/interfaces/EzButtonProps.js.gz +0 -0
- package/dist/collection/components/ez-progress-bar/ez-progress-bar.css.gz +0 -0
- package/dist/collection/components/ez-progress-bar/ez-progress-bar.js.gz +0 -0
- package/dist/collection/components/ez-radio-button/ez-radio-button.css.gz +0 -0
- package/dist/collection/components/ez-radio-button/ez-radio-button.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-link-builder/ez-link-builder.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-text.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/RichToolbarHelper.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-arrows/ez-rich-toolbar-arrows.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-configs/ez-rich-toolbar-configs.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-item/ez-rich-toolbar-item.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar-letters/ez-rich-toolbar-letters.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-rich-toolbar/ez-rich-toolbar.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.css.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/ez-simple-image-uploader.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/test/resource/imageBase64.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/fileToBase64.js.gz +0 -0
- package/dist/collection/components/ez-rich-text/ez-simple-image-uploader/utils/formatBytes.js.gz +0 -0
- package/dist/collection/components/ez-scroller/EzScrollDirection.js.gz +0 -0
- package/dist/collection/components/ez-scroller/ez-scroller.css.gz +0 -0
- package/dist/collection/components/ez-scroller/ez-scroller.js.gz +0 -0
- package/dist/collection/components/ez-search/ez-search.css.gz +0 -0
- package/dist/collection/components/ez-search/ez-search.js.gz +0 -0
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.css.gz +0 -0
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.js.gz +0 -0
- package/dist/collection/components/ez-search/utils/searchFormatters.js.gz +0 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.css.gz +0 -0
- package/dist/collection/components/ez-search-plus/ez-search-plus.js.gz +0 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.css.gz +0 -0
- package/dist/collection/components/ez-search-plus/subcomponent/ez-search-result-list/ez-search-result-list.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css.gz +0 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/interfaces/ModeMenuEnum.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/interfaces/SizeMenuEnum.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/interfaces/TypeMenuEnum.js.gz +0 -0
- package/dist/collection/components/ez-sidebar-navigator/interfaces/index.js.gz +0 -0
- package/dist/collection/components/ez-skeleton/ez-skeleton.constants.js.gz +0 -0
- package/dist/collection/components/ez-skeleton/ez-skeleton.css.gz +0 -0
- package/dist/collection/components/ez-skeleton/ez-skeleton.js.gz +0 -0
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.css.gz +0 -0
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.js.gz +0 -0
- package/dist/collection/components/ez-spinner/ez-spinner.css.gz +0 -0
- package/dist/collection/components/ez-spinner/ez-spinner.js.gz +0 -0
- package/dist/collection/components/ez-split-button/ez-split-button.css.gz +0 -0
- package/dist/collection/components/ez-split-button/ez-split-button.js.gz +0 -0
- package/dist/collection/components/ez-split-button/test/dropdownItems.js.gz +0 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.css.gz +0 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.js.gz +0 -0
- package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js.gz +0 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css.gz +0 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js.gz +0 -0
- package/dist/collection/components/ez-tabselector/ez-tabselector.css.gz +0 -0
- package/dist/collection/components/ez-tabselector/ez-tabselector.js.gz +0 -0
- package/dist/collection/components/ez-tag/ez-tag.css.gz +0 -0
- package/dist/collection/components/ez-tag/ez-tag.js.gz +0 -0
- package/dist/collection/components/ez-tag-input/ez-tag-input.css.gz +0 -0
- package/dist/collection/components/ez-tag-input/ez-tag-input.js.gz +0 -0
- package/dist/collection/components/ez-tag-input/interfaces/optionsSetFocus.js.gz +0 -0
- package/dist/collection/components/ez-text-area/ez-text-area.css.gz +0 -0
- package/dist/collection/components/ez-text-area/ez-text-area.js.gz +0 -0
- package/dist/collection/components/ez-text-edit/ez-text-edit.css.gz +0 -0
- package/dist/collection/components/ez-text-edit/ez-text-edit.js.gz +0 -0
- package/dist/collection/components/ez-text-input/ez-text-input.css.gz +0 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js.gz +0 -0
- package/dist/collection/components/ez-tile/ez-tile.css.gz +0 -0
- package/dist/collection/components/ez-tile/ez-tile.js.gz +0 -0
- package/dist/collection/components/ez-tile-medium/ez-tile-medium.css.gz +0 -0
- package/dist/collection/components/ez-tile-medium/ez-tile-medium.js.gz +0 -0
- package/dist/collection/components/ez-time-input/ez-time-input.css.gz +0 -0
- package/dist/collection/components/ez-time-input/ez-time-input.js.gz +0 -0
- package/dist/collection/components/ez-toast/ez-toast.css.gz +0 -0
- package/dist/collection/components/ez-toast/ez-toast.js.gz +0 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.css.gz +0 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.js.gz +0 -0
- package/dist/collection/components/ez-tree/ez-tree.css.gz +0 -0
- package/dist/collection/components/ez-tree/ez-tree.js.gz +0 -0
- package/dist/collection/components/ez-tree/interfaces/ITree.js.gz +0 -0
- package/dist/collection/components/ez-tree/interfaces/ITreeItem.js.gz +0 -0
- package/dist/collection/components/ez-tree/interfaces/ITreeItemBadge.js.gz +0 -0
- package/dist/collection/components/ez-tree/subcomponents/DefaultIconResolver.js.gz +0 -0
- package/dist/collection/components/ez-tree/subcomponents/DefaultTooltipResolver.js.gz +0 -0
- package/dist/collection/components/ez-tree/subcomponents/TreeItem.js.gz +0 -0
- package/dist/collection/components/ez-tree/subcomponents/index.js.gz +0 -0
- package/dist/collection/components/ez-tree/types/Node.js.gz +0 -0
- package/dist/collection/components/ez-tree/types/Tree.js.gz +0 -0
- package/dist/collection/components/ez-tree/types/UpdateItemConfig.js.gz +0 -0
- package/dist/collection/components/ez-underface/ez-underface.css.gz +0 -0
- package/dist/collection/components/ez-underface/ez-underface.js.gz +0 -0
- package/dist/collection/components/ez-upload/RemoteFile.js.gz +0 -0
- package/dist/collection/components/ez-upload/ez-upload.css.gz +0 -0
- package/dist/collection/components/ez-upload/ez-upload.js.gz +0 -0
- package/dist/collection/components/ez-view-stack/ez-view-stack.css.gz +0 -0
- package/dist/collection/components/ez-view-stack/ez-view-stack.js.gz +0 -0
- package/dist/collection/global/app-init.js.gz +0 -0
- package/dist/collection/index.js.gz +0 -0
- package/dist/collection/servidor.js.gz +0 -0
- package/dist/collection/setupTests.js.gz +0 -0
- package/dist/collection/sw.js.gz +0 -0
- package/dist/collection/utils/ApplicationUtils.js.gz +0 -0
- package/dist/collection/utils/AssetsUtils.js.gz +0 -0
- package/dist/collection/utils/CSSVarsUtils.js.gz +0 -0
- package/dist/collection/utils/FocusResolver.js.gz +0 -0
- package/dist/collection/utils/ag-grid-license.js.gz +0 -0
- package/dist/collection/utils/constants.js.gz +0 -0
- package/dist/collection/utils/customEditor/interfaces/ICustomEditor.js.gz +0 -0
- package/dist/collection/utils/customEditor/interfaces/ICustomEditorInfo.js.gz +0 -0
- package/dist/collection/utils/customRender/interfaces/ICustomRender.js.gz +0 -0
- package/dist/collection/utils/customRender/interfaces/ICustomRenderInfo.js.gz +0 -0
- package/dist/collection/utils/form/DataBinder.js.gz +0 -0
- package/dist/collection/utils/form/FormMetadata.js.gz +0 -0
- package/dist/collection/utils/form/index.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/FormLayout.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/IDefaultConfig.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/IFormCardConfig.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/IFormConfig.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/IFormSheetMetadata.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/ISummaryField.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/ITabConfig.js.gz +0 -0
- package/dist/collection/utils/form/interfaces/index.js.gz +0 -0
- package/dist/collection/utils/form/test/DataBinder.test.js.gz +0 -0
- package/dist/collection/utils/form/test/resources/metadataTest.js.gz +0 -0
- package/dist/collection/utils/i18n/elanguages.js.gz +0 -0
- package/dist/collection/utils/i18n/index.js.gz +0 -0
- package/dist/collection/utils/i18n/locales/en-us.js.gz +0 -0
- package/dist/collection/utils/i18n/locales/es-es.js.gz +0 -0
- package/dist/collection/utils/i18n/locales/pt-br.js.gz +0 -0
- package/dist/collection/utils/i18n/translations.js.gz +0 -0
- package/dist/collection/utils/index.js.gz +0 -0
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js.gz +0 -0
- package/dist/collection/utils/interfaces/IAction.js.gz +0 -0
- package/dist/collection/utils/interfaces/IFieldConfig.js.gz +0 -0
- package/dist/collection/utils/mock/ez-upload-mock.js.gz +0 -0
- package/dist/collection/utils/search/types.js.gz +0 -0
- package/dist/collection/utils/searchColumn/search-column.js.gz +0 -0
- package/dist/collection/utils/utils.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IInvalidField.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IRecordValidator.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IValidationResult.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/IValidationSource.js.gz +0 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js.gz +0 -0
- package/dist/custom-elements/index.js +845 -268
- package/dist/custom-elements/index.js.gz +0 -0
- package/dist/esm/ApplicationUtils-1569f757.js.gz +0 -0
- package/dist/esm/CSSVarsUtils-acba92d7.js.gz +0 -0
- package/dist/esm/CheckMode-bdb2ec19.js.gz +0 -0
- package/dist/esm/DialogType-54a62731.js.gz +0 -0
- package/dist/esm/EzScrollDirection-2df26c93.js.gz +0 -0
- package/dist/esm/FocusResolver-1ccbf850.js.gz +0 -0
- package/dist/esm/FormLayout-071d324c.js.gz +0 -0
- package/dist/esm/RichToolbarHelper-f3a149c4.js.gz +0 -0
- package/dist/esm/_commonjsHelpers-9943807e.js.gz +0 -0
- package/dist/esm/app-globals-c0ac93c0.js.gz +0 -0
- package/dist/esm/constants-3fabe81e.js.gz +0 -0
- package/dist/esm/ez-actions-button.entry.js.gz +0 -0
- package/dist/esm/ez-alert-list.entry.js.gz +0 -0
- package/dist/esm/ez-alert.entry.js.gz +0 -0
- package/dist/esm/ez-application.entry.js.gz +0 -0
- package/dist/esm/ez-avatar.entry.js.gz +0 -0
- package/dist/esm/ez-badge.entry.js.gz +0 -0
- package/dist/esm/ez-breadcrumb.entry.js.gz +0 -0
- package/dist/esm/ez-button.entry.js.gz +0 -0
- package/dist/esm/ez-calendar.entry.js.gz +0 -0
- package/dist/esm/ez-card-item.entry.js.gz +0 -0
- package/dist/esm/ez-chart.entry.js.gz +0 -0
- package/dist/esm/ez-check.entry.js.gz +0 -0
- package/dist/esm/ez-chip.entry.js.gz +0 -0
- package/dist/esm/ez-classic-combo-box.entry.js.gz +0 -0
- package/dist/esm/ez-classic-input.entry.js.gz +0 -0
- package/dist/esm/ez-classic-text-area.entry.js.gz +0 -0
- package/dist/esm/ez-collapsible-box.entry.js.gz +0 -0
- package/dist/esm/ez-combo-box-list_4.entry.js +1 -1
- package/dist/esm/ez-combo-box-list_4.entry.js.gz +0 -0
- package/dist/esm/ez-combo-box.entry.js.gz +0 -0
- package/dist/esm/ez-date-input.entry.js.gz +0 -0
- package/dist/esm/ez-date-time-input.entry.js.gz +0 -0
- package/dist/esm/ez-dialog.entry.js.gz +0 -0
- package/dist/esm/ez-double-list.entry.js.gz +0 -0
- package/dist/esm/ez-dropdown.entry.js.gz +0 -0
- package/dist/esm/ez-empty-card.entry.js.gz +0 -0
- package/dist/esm/ez-file-item.entry.js.gz +0 -0
- package/dist/esm/ez-filter-input.entry.js.gz +0 -0
- package/dist/esm/ez-form-view.entry.js.gz +0 -0
- package/dist/esm/ez-form.entry.js.gz +0 -0
- package/dist/esm/ez-grid-view.entry.js.gz +0 -0
- package/dist/esm/ez-grid.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js.gz +0 -0
- package/dist/esm/ez-guide-navigator.entry.js.gz +0 -0
- package/dist/esm/ez-icon.entry.js.gz +0 -0
- package/dist/esm/ez-link-builder_6.entry.js.gz +0 -0
- package/dist/esm/ez-list-item.entry.js.gz +0 -0
- package/dist/esm/ez-list.entry.js.gz +0 -0
- package/dist/esm/ez-loading-bar.entry.js.gz +0 -0
- package/dist/esm/ez-modal-container.entry.js.gz +0 -0
- package/dist/esm/ez-modal.entry.js.gz +0 -0
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js.gz +0 -0
- package/dist/esm/ez-number-input.entry.js.gz +0 -0
- package/dist/esm/ez-pagination.entry.js.gz +0 -0
- package/dist/esm/ez-popover-core.entry.js +18 -2
- package/dist/esm/ez-popover-core.entry.js.gz +0 -0
- package/dist/esm/ez-popover-plus_3.entry.js +2 -0
- package/dist/esm/ez-popover-plus_3.entry.js.gz +0 -0
- package/dist/esm/ez-popover.entry.js.gz +0 -0
- package/dist/esm/ez-popup.entry.js.gz +0 -0
- package/dist/esm/ez-progress-bar.entry.js.gz +0 -0
- package/dist/esm/ez-radio-button.entry.js.gz +0 -0
- package/dist/esm/ez-rich-toolbar-item.entry.js.gz +0 -0
- package/dist/esm/ez-scroller_2.entry.js.gz +0 -0
- package/dist/esm/ez-search-plus.entry.js.gz +0 -0
- package/dist/esm/ez-search-result-list.entry.js.gz +0 -0
- package/dist/esm/ez-search.entry.js.gz +0 -0
- package/dist/esm/ez-sidebar-navigator.entry.js.gz +0 -0
- package/dist/esm/ez-skeleton.entry.js.gz +0 -0
- package/dist/esm/ez-sortable-list.entry.js.gz +0 -0
- package/dist/esm/ez-spinner.entry.js.gz +0 -0
- package/dist/esm/ez-split-button.entry.js.gz +0 -0
- package/dist/esm/ez-split-item.entry.js.gz +0 -0
- package/dist/esm/ez-split-panel.entry.js.gz +0 -0
- package/dist/esm/ez-tabselector.entry.js.gz +0 -0
- package/dist/esm/ez-tag-input.entry.js.gz +0 -0
- package/dist/esm/ez-tag.entry.js.gz +0 -0
- package/dist/esm/ez-text-area.entry.js.gz +0 -0
- package/dist/esm/ez-text-input.entry.js.gz +0 -0
- package/dist/esm/ez-tile-medium.entry.js.gz +0 -0
- package/dist/esm/ez-tile.entry.js.gz +0 -0
- package/dist/esm/ez-time-input.entry.js.gz +0 -0
- package/dist/esm/ez-toast.entry.js.gz +0 -0
- package/dist/esm/ez-tooltip.entry.js +1 -1
- package/dist/esm/ez-tooltip.entry.js.gz +0 -0
- package/dist/esm/ez-tree.entry.js.gz +0 -0
- package/dist/esm/ez-underface.entry.js.gz +0 -0
- package/dist/esm/ez-upload.entry.js.gz +0 -0
- package/dist/esm/ez-view-stack.entry.js.gz +0 -0
- package/dist/esm/ezListHelper-00fb9b8d.js.gz +0 -0
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/ezui.js.gz +0 -0
- package/dist/esm/filter-column.entry.js +7 -2
- package/dist/esm/filter-column.entry.js.gz +0 -0
- package/dist/esm/{floating-ui.dom.esm-ad30f2f0.js → floating-ui.dom.esm-c94d4011.js} +93 -1
- package/dist/esm/floating-ui.dom.esm-c94d4011.js.gz +0 -0
- package/dist/esm/index-41363fa6.js.gz +0 -0
- package/dist/esm/index-baa5e267.js.gz +0 -0
- package/dist/esm/index.js.gz +0 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loader.js.gz +0 -0
- package/dist/esm/polyfills/core-js.js.gz +0 -0
- package/dist/esm/polyfills/css-shim.js.gz +0 -0
- package/dist/esm/polyfills/dom.js.gz +0 -0
- package/dist/esm/polyfills/es5-html-element.js.gz +0 -0
- package/dist/esm/polyfills/index.js.gz +0 -0
- package/dist/esm/polyfills/system.js.gz +0 -0
- package/dist/esm/{purify-a818ad63.js → purify-2a793dce.js} +724 -262
- package/dist/esm/purify-2a793dce.js.gz +0 -0
- package/dist/esm/search-column-c20d2b01.js.gz +0 -0
- package/dist/esm/searchFormatters-8229207e.js.gz +0 -0
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/ezui.esm.js.gz +0 -0
- package/dist/ezui/index.esm.js.gz +0 -0
- package/dist/ezui/p-02d448bb.entry.js.gz +0 -0
- package/dist/ezui/p-04126429.js.gz +0 -0
- package/dist/ezui/p-05c32903.entry.js.gz +0 -0
- package/dist/ezui/p-0a1be08d.entry.js +1 -0
- package/dist/ezui/p-0a1be08d.entry.js.gz +0 -0
- package/dist/ezui/p-0f7971cf.entry.js.gz +0 -0
- package/dist/ezui/p-110cfb7d.entry.js.gz +0 -0
- package/dist/ezui/p-112455b1.js.gz +0 -0
- package/dist/ezui/p-18384b91.entry.js.gz +0 -0
- package/dist/ezui/p-1e7a8633.entry.js.gz +0 -0
- package/dist/ezui/p-1f50fa05.entry.js.gz +0 -0
- package/dist/ezui/p-20c024f7.entry.js.gz +0 -0
- package/dist/ezui/p-23a36bb6.js.gz +0 -0
- package/dist/ezui/p-24460bb2.js +1 -0
- package/dist/ezui/p-24460bb2.js.gz +0 -0
- package/dist/ezui/p-288631d1.entry.js.gz +0 -0
- package/dist/ezui/p-30ffb9ed.js.gz +0 -0
- package/dist/ezui/p-34a476a9.entry.js.gz +0 -0
- package/dist/ezui/p-39761eca.entry.js.gz +0 -0
- package/dist/ezui/p-3afa1c6e.entry.js.gz +0 -0
- package/dist/ezui/p-3ce867cf.entry.js.gz +0 -0
- package/dist/ezui/p-3e767a74.js.gz +0 -0
- package/dist/ezui/p-40a60148.js.gz +0 -0
- package/dist/ezui/p-411c0222.entry.js.gz +0 -0
- package/dist/ezui/p-4314f87a.entry.js.gz +0 -0
- package/dist/ezui/p-48effc69.entry.js.gz +0 -0
- package/dist/ezui/p-4d30b703.entry.js.gz +0 -0
- package/dist/ezui/p-4fe123b6.entry.js.gz +0 -0
- package/dist/ezui/p-5554704c.js.gz +0 -0
- package/dist/ezui/{p-7f37ee99.entry.js → p-5d7de125.entry.js} +1 -1
- package/dist/ezui/p-5d7de125.entry.js.gz +0 -0
- package/dist/ezui/p-5ed81457.entry.js.gz +0 -0
- package/dist/ezui/p-6020f3d5.entry.js.gz +0 -0
- package/dist/ezui/p-6c51ccd1.entry.js.gz +0 -0
- package/dist/ezui/p-6ca0815e.entry.js.gz +0 -0
- package/dist/ezui/p-6cb82d33.entry.js.gz +0 -0
- package/dist/ezui/p-6d596a5a.entry.js.gz +0 -0
- package/dist/ezui/p-6de4cae1.entry.js.gz +0 -0
- package/dist/ezui/p-6f77a359.entry.js.gz +0 -0
- package/dist/ezui/p-721fd999.entry.js.gz +0 -0
- package/dist/ezui/p-7995dcb4.entry.js.gz +0 -0
- package/dist/ezui/p-7f792043.entry.js.gz +0 -0
- package/dist/ezui/p-7fe97ef5.entry.js.gz +0 -0
- package/dist/ezui/p-80dfc50b.js.gz +0 -0
- package/dist/ezui/{p-351fb12f.entry.js → p-82b0afe7.entry.js} +1 -1
- package/dist/ezui/p-82b0afe7.entry.js.gz +0 -0
- package/dist/ezui/p-859e3134.entry.js.gz +0 -0
- package/dist/ezui/p-8bf077ea.entry.js +1 -0
- package/dist/ezui/p-8bf077ea.entry.js.gz +0 -0
- package/dist/ezui/p-8df1ca33.entry.js.gz +0 -0
- package/dist/ezui/p-91c9d50e.entry.js.gz +0 -0
- package/dist/ezui/p-93e1c917.entry.js.gz +0 -0
- package/dist/ezui/p-948f0fb2.entry.js.gz +0 -0
- package/dist/ezui/p-94deb71e.entry.js.gz +0 -0
- package/dist/ezui/p-98bb8b16.js.gz +0 -0
- package/dist/ezui/p-9ab2add9.entry.js.gz +0 -0
- package/dist/ezui/p-9b215871.entry.js.gz +0 -0
- package/dist/ezui/p-9b3f3c02.entry.js.gz +0 -0
- package/dist/ezui/p-9f5fa3f9.entry.js.gz +0 -0
- package/dist/ezui/p-a0bf1fc7.entry.js.gz +0 -0
- package/dist/ezui/p-a278f26e.entry.js.gz +0 -0
- package/dist/ezui/p-a3075f52.entry.js.gz +0 -0
- package/dist/ezui/p-a3ada561.entry.js.gz +0 -0
- package/dist/ezui/p-a4083a7a.entry.js.gz +0 -0
- package/dist/ezui/p-a61fdd20.js.gz +0 -0
- package/dist/ezui/p-a63b20a0.entry.js.gz +0 -0
- package/dist/ezui/p-a80b1287.entry.js.gz +0 -0
- package/dist/ezui/p-a80e6b24.entry.js +1 -0
- package/dist/ezui/p-a80e6b24.entry.js.gz +0 -0
- package/dist/ezui/p-ab574d59.js.gz +0 -0
- package/dist/ezui/p-b1e45320.js.gz +0 -0
- package/dist/ezui/p-b3d8034b.entry.js.gz +0 -0
- package/dist/ezui/p-b853763b.js.gz +0 -0
- package/dist/ezui/p-b989a33e.entry.js.gz +0 -0
- package/dist/ezui/p-baec56c9.js.gz +0 -0
- package/dist/ezui/{p-183db57c.entry.js → p-bc139838.entry.js} +1 -1
- package/dist/ezui/p-bc139838.entry.js.gz +0 -0
- package/dist/ezui/p-bc2f844e.entry.js.gz +0 -0
- package/dist/ezui/p-bc8e5c3d.js +3 -0
- package/dist/ezui/p-bc8e5c3d.js.gz +0 -0
- package/dist/ezui/p-cde41310.entry.js.gz +0 -0
- package/dist/ezui/p-ce0b36d7.entry.js.gz +0 -0
- package/dist/ezui/p-d2645bdf.entry.js.gz +0 -0
- package/dist/ezui/p-d5eb2fad.entry.js.gz +0 -0
- package/dist/ezui/p-d6742c1e.entry.js.gz +0 -0
- package/dist/ezui/p-d6bb930d.entry.js.gz +0 -0
- package/dist/ezui/p-d6f50207.entry.js.gz +0 -0
- package/dist/ezui/p-d8cc640d.entry.js.gz +0 -0
- package/dist/ezui/p-dc628ed3.js.gz +0 -0
- package/dist/ezui/p-de862af4.entry.js.gz +0 -0
- package/dist/ezui/p-dee18824.entry.js.gz +0 -0
- package/dist/ezui/p-e5de42e7.entry.js.gz +0 -0
- package/dist/ezui/p-e75c7a23.entry.js.gz +0 -0
- package/dist/ezui/p-e7a7c594.entry.js.gz +0 -0
- package/dist/ezui/p-e8c57463.entry.js.gz +0 -0
- package/dist/ezui/p-ec7db713.js.gz +0 -0
- package/dist/ezui/p-ecd6409d.entry.js.gz +0 -0
- package/dist/ezui/p-f00c9dc2.entry.js.gz +0 -0
- package/dist/ezui/p-f34ec732.entry.js.gz +0 -0
- package/dist/ezui/p-fa6732f2.entry.js.gz +0 -0
- package/dist/ezui/{p-c9ef8551.entry.js → p-fd96baa6.entry.js} +1 -1
- package/dist/ezui/p-fd96baa6.entry.js.gz +0 -0
- package/dist/index.cjs.js.gz +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +7 -0
- package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +9 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
- package/dist/cjs/floating-ui.dom.esm-f4d87617.js.gz +0 -0
- package/dist/cjs/purify-ca9603eb.js.gz +0 -0
- package/dist/esm/floating-ui.dom.esm-ad30f2f0.js.gz +0 -0
- package/dist/esm/purify-a818ad63.js.gz +0 -0
- package/dist/ezui/p-183db57c.entry.js.gz +0 -0
- package/dist/ezui/p-197eb577.js +0 -3
- package/dist/ezui/p-197eb577.js.gz +0 -0
- package/dist/ezui/p-2528e988.entry.js +0 -1
- package/dist/ezui/p-2528e988.entry.js.gz +0 -0
- package/dist/ezui/p-2a806303.js +0 -1
- package/dist/ezui/p-2a806303.js.gz +0 -0
- package/dist/ezui/p-2b49aa22.entry.js +0 -1
- package/dist/ezui/p-2b49aa22.entry.js.gz +0 -0
- package/dist/ezui/p-351fb12f.entry.js.gz +0 -0
- package/dist/ezui/p-7f37ee99.entry.js.gz +0 -0
- package/dist/ezui/p-c9ef8551.entry.js.gz +0 -0
- package/dist/ezui/p-ef8bd3e8.entry.js +0 -1
- package/dist/ezui/p-ef8bd3e8.entry.js.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers-9943807e.js';
|
|
2
2
|
|
|
3
3
|
var purify = createCommonjsModule(function (module, exports) {
|
|
4
|
-
/*! @license DOMPurify 3.4.
|
|
4
|
+
/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */
|
|
5
5
|
|
|
6
6
|
(function (global, factory) {
|
|
7
7
|
module.exports = factory() ;
|
|
@@ -333,8 +333,14 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
333
333
|
);
|
|
334
334
|
const DOCTYPE_NAME = seal(/^html$/i);
|
|
335
335
|
const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
336
|
+
// Markup-significant character probes used by _sanitizeElements.
|
|
337
|
+
// Shared module-level instances are safe despite the sticky /g flags:
|
|
338
|
+
// unapply() resets lastIndex for RegExp receivers before every call.
|
|
339
|
+
const ELEMENT_MARKUP_PROBE = seal(/<[/\w!]/g);
|
|
340
|
+
const COMMENT_MARKUP_PROBE = seal(/<[/\w]/g);
|
|
341
|
+
const FALLBACK_TAG_CLOSE = seal(/<\/no(script|embed|frames)/i);
|
|
342
|
+
const SELF_CLOSING_TAG = seal(/\/>/i);
|
|
336
343
|
|
|
337
|
-
/* eslint-disable @typescript-eslint/indent */
|
|
338
344
|
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
|
339
345
|
const NODE_TYPE = {
|
|
340
346
|
element: 1,
|
|
@@ -345,7 +351,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
345
351
|
// Deprecated
|
|
346
352
|
entityNode: 6,
|
|
347
353
|
// Deprecated
|
|
348
|
-
|
|
354
|
+
processingInstruction: 7,
|
|
349
355
|
comment: 8,
|
|
350
356
|
document: 9,
|
|
351
357
|
documentType: 10,
|
|
@@ -405,10 +411,25 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
405
411
|
uponSanitizeShadowNode: []
|
|
406
412
|
};
|
|
407
413
|
};
|
|
414
|
+
/**
|
|
415
|
+
* Resolve a set-valued configuration option: a fresh set built from
|
|
416
|
+
* cfg[key] when it is an own array property (seeded with a clone of
|
|
417
|
+
* options.base when given, case-normalized via options.transform),
|
|
418
|
+
* the fallback set otherwise.
|
|
419
|
+
*
|
|
420
|
+
* @param cfg the cloned, prototype-free configuration object
|
|
421
|
+
* @param key the configuration property to read
|
|
422
|
+
* @param fallback the set to use when the option is absent or not an array
|
|
423
|
+
* @param options transform and optional base set to merge into
|
|
424
|
+
* @returns the resolved set
|
|
425
|
+
*/
|
|
426
|
+
const _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {
|
|
427
|
+
return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;
|
|
428
|
+
};
|
|
408
429
|
function createDOMPurify() {
|
|
409
430
|
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
|
410
431
|
const DOMPurify = root => createDOMPurify(root);
|
|
411
|
-
DOMPurify.version = '3.4.
|
|
432
|
+
DOMPurify.version = '3.4.11';
|
|
412
433
|
DOMPurify.removed = [];
|
|
413
434
|
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
414
435
|
// Not running in a browser, provide a factory function
|
|
@@ -449,23 +470,54 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
449
470
|
}
|
|
450
471
|
let trustedTypesPolicy;
|
|
451
472
|
let emptyHTML = '';
|
|
473
|
+
// The instance's own internal Trusted Types policy. Unlike a caller-supplied
|
|
474
|
+
// `TRUSTED_TYPES_POLICY`, this is created at most once — Trusted Types throws
|
|
475
|
+
// on duplicate policy names — and is the only policy allowed to persist
|
|
476
|
+
// across configurations and survive `clearConfig()`.
|
|
477
|
+
let defaultTrustedTypesPolicy;
|
|
478
|
+
let defaultTrustedTypesPolicyResolved = false;
|
|
452
479
|
// Tracks whether we are already inside a call to the configured Trusted Types
|
|
453
|
-
// policy
|
|
480
|
+
// policy (`createHTML` or `createScriptURL`). If a supplied policy callback
|
|
454
481
|
// itself calls `DOMPurify.sanitize` (the cause of #1422), `sanitize` would
|
|
455
482
|
// re-enter the policy and recurse until the stack overflows. We detect that
|
|
456
|
-
// re-entry and throw a clear, actionable error instead.
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
483
|
+
// re-entry and throw a clear, actionable error instead. The guard is shared
|
|
484
|
+
// across both callbacks, because either one re-entering `sanitize` triggers
|
|
485
|
+
// the same unbounded recursion.
|
|
486
|
+
let IN_TRUSTED_TYPES_POLICY = 0;
|
|
487
|
+
const _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {
|
|
488
|
+
if (IN_TRUSTED_TYPES_POLICY > 0) {
|
|
489
|
+
throw typeErrorCreate('A configured TRUSTED_TYPES_POLICY callback (createHTML or ' + 'createScriptURL) must not call DOMPurify.sanitize, as that causes ' + 'infinite recursion. Do not pass a policy whose callbacks wrap ' + 'DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted ' + 'Types" section of the README.');
|
|
461
490
|
}
|
|
462
|
-
|
|
491
|
+
};
|
|
492
|
+
const _createTrustedHTML = function _createTrustedHTML(html) {
|
|
493
|
+
_assertNotInTrustedTypesPolicy();
|
|
494
|
+
IN_TRUSTED_TYPES_POLICY++;
|
|
463
495
|
try {
|
|
464
496
|
return trustedTypesPolicy.createHTML(html);
|
|
465
497
|
} finally {
|
|
466
|
-
|
|
498
|
+
IN_TRUSTED_TYPES_POLICY--;
|
|
467
499
|
}
|
|
468
500
|
};
|
|
501
|
+
const _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {
|
|
502
|
+
_assertNotInTrustedTypesPolicy();
|
|
503
|
+
IN_TRUSTED_TYPES_POLICY++;
|
|
504
|
+
try {
|
|
505
|
+
return trustedTypesPolicy.createScriptURL(scriptUrl);
|
|
506
|
+
} finally {
|
|
507
|
+
IN_TRUSTED_TYPES_POLICY--;
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
// Lazily resolve (and cache) the instance's internal default policy.
|
|
511
|
+
// Resolution is attempted at most once: a successful `createPolicy` cannot be
|
|
512
|
+
// repeated (Trusted Types throws on duplicate names), and a failed or
|
|
513
|
+
// unsupported attempt must not be retried on every parse.
|
|
514
|
+
const _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {
|
|
515
|
+
if (!defaultTrustedTypesPolicyResolved) {
|
|
516
|
+
defaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
|
|
517
|
+
defaultTrustedTypesPolicyResolved = true;
|
|
518
|
+
}
|
|
519
|
+
return defaultTrustedTypesPolicy;
|
|
520
|
+
};
|
|
469
521
|
const _document = document,
|
|
470
522
|
implementation = _document.implementation,
|
|
471
523
|
createNodeIterator = _document.createNodeIterator,
|
|
@@ -562,6 +614,13 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
562
614
|
let WHOLE_DOCUMENT = false;
|
|
563
615
|
/* Track whether config is already set on this instance of DOMPurify. */
|
|
564
616
|
let SET_CONFIG = false;
|
|
617
|
+
/* Pristine allowlist bindings captured at setConfig() time. On the
|
|
618
|
+
* persistent-config path sanitize() restores the sets from these before
|
|
619
|
+
* the per-walk hook clone-guard, so a hook's in-call widening cannot
|
|
620
|
+
* carry across calls. Null until setConfig() is called; reset by
|
|
621
|
+
* clearConfig(). */
|
|
622
|
+
let SET_CONFIG_ALLOWED_TAGS = null;
|
|
623
|
+
let SET_CONFIG_ALLOWED_ATTR = null;
|
|
565
624
|
/* Decide if all elements (e.g. style, script) must be children of
|
|
566
625
|
* document.body. By default, browsers might move them to document.head */
|
|
567
626
|
let FORCE_BODY = false;
|
|
@@ -604,7 +663,17 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
604
663
|
let USE_PROFILES = {};
|
|
605
664
|
/* Tags to ignore content of when KEEP_CONTENT is true */
|
|
606
665
|
let FORBID_CONTENTS = null;
|
|
607
|
-
const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script',
|
|
666
|
+
const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script',
|
|
667
|
+
// <selectedcontent> mirrors the selected <option>'s subtree, cloned by
|
|
668
|
+
// the UA (customizable <select>) — including any on* handlers — and the
|
|
669
|
+
// engine re-mirrors synchronously whenever a removal changes which
|
|
670
|
+
// option/selectedcontent is current, even inside DOMPurify's inert
|
|
671
|
+
// DOMParser document. Hoisting its children on removal re-inserts a fresh
|
|
672
|
+
// mirror target ahead of the walk, which the engine refills, looping
|
|
673
|
+
// forever (DoS) and amplifying output. Dropping its content on removal
|
|
674
|
+
// (rather than hoisting) breaks that cascade; the content is a duplicate
|
|
675
|
+
// of the option, which is sanitized on its own. See campaign-3 F1/F6.
|
|
676
|
+
'selectedcontent', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);
|
|
608
677
|
/* Tags that are safe for data: URIs */
|
|
609
678
|
let DATA_URI_TAGS = null;
|
|
610
679
|
const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);
|
|
@@ -620,8 +689,10 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
620
689
|
/* Allowed XHTML+XML namespaces */
|
|
621
690
|
let ALLOWED_NAMESPACES = null;
|
|
622
691
|
const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
|
|
623
|
-
|
|
624
|
-
let
|
|
692
|
+
const DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze(['mi', 'mo', 'mn', 'ms', 'mtext']);
|
|
693
|
+
let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);
|
|
694
|
+
const DEFAULT_HTML_INTEGRATION_POINTS = freeze(['annotation-xml']);
|
|
695
|
+
let HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);
|
|
625
696
|
// Certain elements are allowed in both SVG and HTML
|
|
626
697
|
// namespace. We need to specify them explicitly
|
|
627
698
|
// so that they don't get erroneously deleted from
|
|
@@ -663,14 +734,32 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
663
734
|
// HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.
|
|
664
735
|
transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;
|
|
665
736
|
/* Set configuration parameters */
|
|
666
|
-
ALLOWED_TAGS =
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
737
|
+
ALLOWED_TAGS = _resolveSetOption(cfg, 'ALLOWED_TAGS', DEFAULT_ALLOWED_TAGS, {
|
|
738
|
+
transform: transformCaseFunc
|
|
739
|
+
});
|
|
740
|
+
ALLOWED_ATTR = _resolveSetOption(cfg, 'ALLOWED_ATTR', DEFAULT_ALLOWED_ATTR, {
|
|
741
|
+
transform: transformCaseFunc
|
|
742
|
+
});
|
|
743
|
+
ALLOWED_NAMESPACES = _resolveSetOption(cfg, 'ALLOWED_NAMESPACES', DEFAULT_ALLOWED_NAMESPACES, {
|
|
744
|
+
transform: stringToString
|
|
745
|
+
});
|
|
746
|
+
URI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, 'ADD_URI_SAFE_ATTR', DEFAULT_URI_SAFE_ATTRIBUTES, {
|
|
747
|
+
transform: transformCaseFunc,
|
|
748
|
+
base: DEFAULT_URI_SAFE_ATTRIBUTES
|
|
749
|
+
});
|
|
750
|
+
DATA_URI_TAGS = _resolveSetOption(cfg, 'ADD_DATA_URI_TAGS', DEFAULT_DATA_URI_TAGS, {
|
|
751
|
+
transform: transformCaseFunc,
|
|
752
|
+
base: DEFAULT_DATA_URI_TAGS
|
|
753
|
+
});
|
|
754
|
+
FORBID_CONTENTS = _resolveSetOption(cfg, 'FORBID_CONTENTS', DEFAULT_FORBID_CONTENTS, {
|
|
755
|
+
transform: transformCaseFunc
|
|
756
|
+
});
|
|
757
|
+
FORBID_TAGS = _resolveSetOption(cfg, 'FORBID_TAGS', clone({}), {
|
|
758
|
+
transform: transformCaseFunc
|
|
759
|
+
});
|
|
760
|
+
FORBID_ATTR = _resolveSetOption(cfg, 'FORBID_ATTR', clone({}), {
|
|
761
|
+
transform: transformCaseFunc
|
|
762
|
+
});
|
|
674
763
|
USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === 'object' ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
|
|
675
764
|
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true
|
|
676
765
|
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true
|
|
@@ -689,8 +778,8 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
689
778
|
IN_PLACE = cfg.IN_PLACE || false; // Default false
|
|
690
779
|
IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI; // Default regexp
|
|
691
780
|
NAMESPACE = typeof cfg.NAMESPACE === 'string' ? cfg.NAMESPACE : HTML_NAMESPACE; // Default HTML namespace
|
|
692
|
-
MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'MATHML_TEXT_INTEGRATION_POINTS') && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === 'object' ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({},
|
|
693
|
-
HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'HTML_INTEGRATION_POINTS') && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === 'object' ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({},
|
|
781
|
+
MATHML_TEXT_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'MATHML_TEXT_INTEGRATION_POINTS') && cfg.MATHML_TEXT_INTEGRATION_POINTS && typeof cfg.MATHML_TEXT_INTEGRATION_POINTS === 'object' ? clone(cfg.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS); // Default built-in map
|
|
782
|
+
HTML_INTEGRATION_POINTS = objectHasOwnProperty(cfg, 'HTML_INTEGRATION_POINTS') && cfg.HTML_INTEGRATION_POINTS && typeof cfg.HTML_INTEGRATION_POINTS === 'object' ? clone(cfg.HTML_INTEGRATION_POINTS) : addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS); // Default built-in map
|
|
694
783
|
const customElementHandling = objectHasOwnProperty(cfg, 'CUSTOM_ELEMENT_HANDLING') && cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING === 'object' ? clone(cfg.CUSTOM_ELEMENT_HANDLING) : create(null);
|
|
695
784
|
CUSTOM_ELEMENT_HANDLING = create(null);
|
|
696
785
|
if (objectHasOwnProperty(customElementHandling, 'tagNameCheck') && isRegexOrFunction(customElementHandling.tagNameCheck)) {
|
|
@@ -702,6 +791,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
702
791
|
if (objectHasOwnProperty(customElementHandling, 'allowCustomizedBuiltInElements') && typeof customElementHandling.allowCustomizedBuiltInElements === 'boolean') {
|
|
703
792
|
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements; // Default undefined
|
|
704
793
|
}
|
|
794
|
+
seal(CUSTOM_ELEMENT_HANDLING);
|
|
705
795
|
if (SAFE_FOR_TEMPLATES) {
|
|
706
796
|
ALLOW_DATA_ATTR = false;
|
|
707
797
|
}
|
|
@@ -785,6 +875,13 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
785
875
|
addToSet(ALLOWED_TAGS, ['tbody']);
|
|
786
876
|
delete FORBID_TAGS.tbody;
|
|
787
877
|
}
|
|
878
|
+
// Re-derive the active Trusted Types policy from this configuration on
|
|
879
|
+
// every parse. The active policy must never be sticky closure state that
|
|
880
|
+
// outlives the config that set it: a caller-supplied policy left in place
|
|
881
|
+
// after `clearConfig()` — or after a later call that supplied none, or
|
|
882
|
+
// `TRUSTED_TYPES_POLICY: null` — could sign a subsequent "default"
|
|
883
|
+
// `RETURN_TRUSTED_TYPE` result with a foreign, possibly unsafe policy.
|
|
884
|
+
// See GHSA-vxr8-fq34-vvx9.
|
|
788
885
|
if (cfg.TRUSTED_TYPES_POLICY) {
|
|
789
886
|
if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {
|
|
790
887
|
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
@@ -792,7 +889,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
792
889
|
if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {
|
|
793
890
|
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
794
891
|
}
|
|
795
|
-
//
|
|
892
|
+
// A caller-supplied policy applies to this configuration only.
|
|
796
893
|
const previousTrustedTypesPolicy = trustedTypesPolicy;
|
|
797
894
|
trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
|
|
798
895
|
// Sign local variables required by `sanitize`. If the supplied policy's
|
|
@@ -805,35 +902,34 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
805
902
|
trustedTypesPolicy = previousTrustedTypesPolicy;
|
|
806
903
|
throw error;
|
|
807
904
|
}
|
|
905
|
+
} else if (cfg.TRUSTED_TYPES_POLICY === null) {
|
|
906
|
+
// Explicit opt-out for this call: perform no Trusted Types signing and
|
|
907
|
+
// create nothing (so a strict `trusted-types` CSP that disallows a
|
|
908
|
+
// `dompurify` policy can still call `sanitize` from inside its own
|
|
909
|
+
// policy — see #1422). Resetting to `undefined` rather than a sticky
|
|
910
|
+
// `null` also drops any previously retained caller policy, so it cannot
|
|
911
|
+
// resurface on a later call, while still allowing the next config-less
|
|
912
|
+
// call to restore the internal default policy. See GHSA-vxr8-fq34-vvx9.
|
|
913
|
+
trustedTypesPolicy = undefined;
|
|
914
|
+
emptyHTML = '';
|
|
808
915
|
} else {
|
|
809
|
-
//
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
//
|
|
814
|
-
//
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
916
|
+
// No policy supplied: keep the currently active policy if one is set — a
|
|
917
|
+
// previously supplied policy is intentionally sticky across config-less
|
|
918
|
+
// calls — otherwise fall back to the instance's own internal policy,
|
|
919
|
+
// created at most once. (A policy supplied for a *single* call still
|
|
920
|
+
// lingers by design; what must not linger is a policy whose configuration
|
|
921
|
+
// has been torn down via `clearConfig()`, which restores the default.)
|
|
922
|
+
if (trustedTypesPolicy === undefined) {
|
|
923
|
+
trustedTypesPolicy = _getDefaultTrustedTypesPolicy();
|
|
924
|
+
}
|
|
925
|
+
// Sign internal variables only when a policy is active. A falsy policy
|
|
926
|
+
// (Trusted Types unsupported, creation failed, or an explicit opt-out)
|
|
927
|
+
// leaves `emptyHTML` as a plain string, so we never call `.createHTML` on
|
|
928
|
+
// a non-policy and throw. See #1422.
|
|
818
929
|
if (trustedTypesPolicy && typeof emptyHTML === 'string') {
|
|
819
930
|
emptyHTML = _createTrustedHTML('');
|
|
820
931
|
}
|
|
821
932
|
}
|
|
822
|
-
/*
|
|
823
|
-
* Mirror the clone-before-mutate pattern already applied above for
|
|
824
|
-
* cfg.ADD_TAGS / cfg.ADD_ATTR: if any uponSanitize* hook is
|
|
825
|
-
* registered AND the set still points at the default constant,
|
|
826
|
-
* clone it. The hook then mutates the clone (in-call widening
|
|
827
|
-
* still works exactly as documented) and the next default-cfg
|
|
828
|
-
* call rebinds to the untouched original via the reassignment at
|
|
829
|
-
* the top of this function.
|
|
830
|
-
*/
|
|
831
|
-
if ((hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) && ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
832
|
-
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
833
|
-
}
|
|
834
|
-
if (hooks.uponSanitizeAttribute.length > 0 && ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
|
835
|
-
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
836
|
-
}
|
|
837
933
|
// Prevent further manipulation of configuration.
|
|
838
934
|
// Not available in IE8, Safari 5, etc.
|
|
839
935
|
if (freeze) {
|
|
@@ -846,6 +942,77 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
846
942
|
* correctly. */
|
|
847
943
|
const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
|
|
848
944
|
const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
|
|
945
|
+
/**
|
|
946
|
+
* Namespace rules for an element in the SVG namespace.
|
|
947
|
+
*
|
|
948
|
+
* @param tagName the element's lowercase tag name
|
|
949
|
+
* @param parent the (possibly simulated) parent node
|
|
950
|
+
* @param parentTagName the parent's lowercase tag name
|
|
951
|
+
* @returns true if a spec-compliant parser could produce this element
|
|
952
|
+
*/
|
|
953
|
+
const _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {
|
|
954
|
+
// The only way to switch from HTML namespace to SVG
|
|
955
|
+
// is via <svg>. If it happens via any other tag, then
|
|
956
|
+
// it should be killed.
|
|
957
|
+
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
958
|
+
return tagName === 'svg';
|
|
959
|
+
}
|
|
960
|
+
// The only way to switch from MathML to SVG is via <svg>
|
|
961
|
+
// if the parent is either <annotation-xml> or a MathML
|
|
962
|
+
// text integration point.
|
|
963
|
+
if (parent.namespaceURI === MATHML_NAMESPACE) {
|
|
964
|
+
return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
|
|
965
|
+
}
|
|
966
|
+
// We only allow elements that are defined in SVG
|
|
967
|
+
// spec. All others are disallowed in SVG namespace.
|
|
968
|
+
return Boolean(ALL_SVG_TAGS[tagName]);
|
|
969
|
+
};
|
|
970
|
+
/**
|
|
971
|
+
* Namespace rules for an element in the MathML namespace.
|
|
972
|
+
*
|
|
973
|
+
* @param tagName the element's lowercase tag name
|
|
974
|
+
* @param parent the (possibly simulated) parent node
|
|
975
|
+
* @param parentTagName the parent's lowercase tag name
|
|
976
|
+
* @returns true if a spec-compliant parser could produce this element
|
|
977
|
+
*/
|
|
978
|
+
const _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {
|
|
979
|
+
// The only way to switch from HTML namespace to MathML
|
|
980
|
+
// is via <math>. If it happens via any other tag, then
|
|
981
|
+
// it should be killed.
|
|
982
|
+
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
983
|
+
return tagName === 'math';
|
|
984
|
+
}
|
|
985
|
+
// The only way to switch from SVG to MathML is via
|
|
986
|
+
// <math> and HTML integration points
|
|
987
|
+
if (parent.namespaceURI === SVG_NAMESPACE) {
|
|
988
|
+
return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
|
|
989
|
+
}
|
|
990
|
+
// We only allow elements that are defined in MathML
|
|
991
|
+
// spec. All others are disallowed in MathML namespace.
|
|
992
|
+
return Boolean(ALL_MATHML_TAGS[tagName]);
|
|
993
|
+
};
|
|
994
|
+
/**
|
|
995
|
+
* Namespace rules for an element in the HTML namespace.
|
|
996
|
+
*
|
|
997
|
+
* @param tagName the element's lowercase tag name
|
|
998
|
+
* @param parent the (possibly simulated) parent node
|
|
999
|
+
* @param parentTagName the parent's lowercase tag name
|
|
1000
|
+
* @returns true if a spec-compliant parser could produce this element
|
|
1001
|
+
*/
|
|
1002
|
+
const _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {
|
|
1003
|
+
// The only way to switch from SVG to HTML is via
|
|
1004
|
+
// HTML integration points, and from MathML to HTML
|
|
1005
|
+
// is via MathML text integration points
|
|
1006
|
+
if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
|
|
1007
|
+
return false;
|
|
1008
|
+
}
|
|
1009
|
+
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
|
|
1010
|
+
return false;
|
|
1011
|
+
}
|
|
1012
|
+
// We disallow tags that are specific for MathML
|
|
1013
|
+
// or SVG and should never appear in HTML namespace
|
|
1014
|
+
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
|
|
1015
|
+
};
|
|
849
1016
|
/**
|
|
850
1017
|
* @param element a DOM element whose namespace is being checked
|
|
851
1018
|
* @returns Return false if the element has a
|
|
@@ -868,51 +1035,13 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
868
1035
|
return false;
|
|
869
1036
|
}
|
|
870
1037
|
if (element.namespaceURI === SVG_NAMESPACE) {
|
|
871
|
-
|
|
872
|
-
// is via <svg>. If it happens via any other tag, then
|
|
873
|
-
// it should be killed.
|
|
874
|
-
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
875
|
-
return tagName === 'svg';
|
|
876
|
-
}
|
|
877
|
-
// The only way to switch from MathML to SVG is via`
|
|
878
|
-
// svg if parent is either <annotation-xml> or MathML
|
|
879
|
-
// text integration points.
|
|
880
|
-
if (parent.namespaceURI === MATHML_NAMESPACE) {
|
|
881
|
-
return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
|
|
882
|
-
}
|
|
883
|
-
// We only allow elements that are defined in SVG
|
|
884
|
-
// spec. All others are disallowed in SVG namespace.
|
|
885
|
-
return Boolean(ALL_SVG_TAGS[tagName]);
|
|
1038
|
+
return _checkSvgNamespace(tagName, parent, parentTagName);
|
|
886
1039
|
}
|
|
887
1040
|
if (element.namespaceURI === MATHML_NAMESPACE) {
|
|
888
|
-
|
|
889
|
-
// is via <math>. If it happens via any other tag, then
|
|
890
|
-
// it should be killed.
|
|
891
|
-
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
892
|
-
return tagName === 'math';
|
|
893
|
-
}
|
|
894
|
-
// The only way to switch from SVG to MathML is via
|
|
895
|
-
// <math> and HTML integration points
|
|
896
|
-
if (parent.namespaceURI === SVG_NAMESPACE) {
|
|
897
|
-
return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];
|
|
898
|
-
}
|
|
899
|
-
// We only allow elements that are defined in MathML
|
|
900
|
-
// spec. All others are disallowed in MathML namespace.
|
|
901
|
-
return Boolean(ALL_MATHML_TAGS[tagName]);
|
|
1041
|
+
return _checkMathMlNamespace(tagName, parent, parentTagName);
|
|
902
1042
|
}
|
|
903
1043
|
if (element.namespaceURI === HTML_NAMESPACE) {
|
|
904
|
-
|
|
905
|
-
// HTML integration points, and from MathML to HTML
|
|
906
|
-
// is via MathML text integration points
|
|
907
|
-
if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
|
|
908
|
-
return false;
|
|
909
|
-
}
|
|
910
|
-
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
|
|
911
|
-
return false;
|
|
912
|
-
}
|
|
913
|
-
// We disallow tags that are specific for MathML
|
|
914
|
-
// or SVG and should never appear in HTML namespace
|
|
915
|
-
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
|
|
1044
|
+
return _checkHtmlNamespace(tagName, parent, parentTagName);
|
|
916
1045
|
}
|
|
917
1046
|
// For XHTML and XML documents that support custom namespaces
|
|
918
1047
|
if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {
|
|
@@ -937,7 +1066,74 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
937
1066
|
// eslint-disable-next-line unicorn/prefer-dom-node-remove
|
|
938
1067
|
getParentNode(node).removeChild(node);
|
|
939
1068
|
} catch (_) {
|
|
1069
|
+
/* The normal detach failed — this is reached for a parentless node
|
|
1070
|
+
(getParentNode() is null, so .removeChild throws). Element.prototype
|
|
1071
|
+
.remove() is itself a spec no-op on a parentless node, so a recorded
|
|
1072
|
+
"removal" would otherwise hand the caller back an intact,
|
|
1073
|
+
payload-bearing node (e.g. a detached IN_PLACE root the mXSS canary or
|
|
1074
|
+
the style-with-element-child rule decided to kill). Fail closed by
|
|
1075
|
+
throwing — exactly as a clobbered root does at the IN_PLACE entry —
|
|
1076
|
+
rather than trying to "neutralize" the node via its own methods.
|
|
1077
|
+
Neutralizing would mean calling getAttributeNames()/removeAttribute()
|
|
1078
|
+
on the node, both of which a <form> root can clobber via a named child
|
|
1079
|
+
(and _isClobbered does not even probe getAttributeNames), so the
|
|
1080
|
+
neutralize step could itself be silently defeated, leaving the payload
|
|
1081
|
+
intact. A throw touches only the cached, clobber-safe remove() and
|
|
1082
|
+
getParentNode(). Generalizes GHSA-r47g-fvhr-h676 (clobbered-form root)
|
|
1083
|
+
to every root-kill reason. REPORT-3.
|
|
1084
|
+
This lives inside the catch, so it never fires for a normally-removed
|
|
1085
|
+
in-tree node: those have a parent, removeChild() succeeds, and the
|
|
1086
|
+
catch is not entered. Only a kept (parentless) root reaches here. */
|
|
940
1087
|
remove(node);
|
|
1088
|
+
if (!getParentNode(node)) {
|
|
1089
|
+
throw typeErrorCreate('a node selected for removal could not be detached from its tree ' + 'and cannot be safely returned; refusing to sanitize in place');
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
};
|
|
1093
|
+
/**
|
|
1094
|
+
* _neutralizeRoot
|
|
1095
|
+
*
|
|
1096
|
+
* Fail-closed teardown of an in-place root after the sanitize walk aborts
|
|
1097
|
+
* (campaign-3 F2). An internal throw mid-walk — e.g. a page-registered
|
|
1098
|
+
* custom element's reaction detaches a node so `_forceRemove`'s deliberate
|
|
1099
|
+
* parentless guard throws, or any other re-entrant engine mutation — would
|
|
1100
|
+
* otherwise leave the caller's *live* tree half-sanitized, with everything
|
|
1101
|
+
* after the abort point still carrying its handlers. There is no safe way
|
|
1102
|
+
* to resume the walk (the tree mutated under us), so we strip the root bare:
|
|
1103
|
+
* remove every child and every attribute, then let the caller's catch see
|
|
1104
|
+
* the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`
|
|
1105
|
+
* getters; the root was already clobber-pre-flighted at the IN_PLACE entry).
|
|
1106
|
+
*
|
|
1107
|
+
* @param root the in-place root to empty
|
|
1108
|
+
*/
|
|
1109
|
+
const _neutralizeRoot = function _neutralizeRoot(root) {
|
|
1110
|
+
const childNodes = getChildNodes(root);
|
|
1111
|
+
if (childNodes) {
|
|
1112
|
+
const snapshot = [];
|
|
1113
|
+
arrayForEach(childNodes, child => {
|
|
1114
|
+
arrayPush(snapshot, child);
|
|
1115
|
+
});
|
|
1116
|
+
arrayForEach(snapshot, child => {
|
|
1117
|
+
try {
|
|
1118
|
+
remove(child);
|
|
1119
|
+
} catch (_) {
|
|
1120
|
+
/* Best-effort teardown; a still-attached child is handled below */
|
|
1121
|
+
}
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
const attributes = getAttributes(root);
|
|
1125
|
+
if (attributes) {
|
|
1126
|
+
for (let i = attributes.length - 1; i >= 0; --i) {
|
|
1127
|
+
const attribute = attributes[i];
|
|
1128
|
+
const name = attribute && attribute.name;
|
|
1129
|
+
if (typeof name === 'string') {
|
|
1130
|
+
try {
|
|
1131
|
+
root.removeAttribute(name);
|
|
1132
|
+
} catch (_) {
|
|
1133
|
+
/* Clobbered removeAttribute — ignore (fail-closed best effort) */
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
941
1137
|
}
|
|
942
1138
|
};
|
|
943
1139
|
/**
|
|
@@ -972,6 +1168,72 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
972
1168
|
}
|
|
973
1169
|
}
|
|
974
1170
|
};
|
|
1171
|
+
/**
|
|
1172
|
+
* _stripDisallowedAttributes
|
|
1173
|
+
*
|
|
1174
|
+
* Removes every attribute the active configuration does not allow from a
|
|
1175
|
+
* single element, using the same allowlist as the main attribute pass (so
|
|
1176
|
+
* `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to
|
|
1177
|
+
* neutralise nodes that are being discarded from an in-place tree.
|
|
1178
|
+
*
|
|
1179
|
+
* @param element the element to strip
|
|
1180
|
+
*/
|
|
1181
|
+
const _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {
|
|
1182
|
+
const attributes = getAttributes(element);
|
|
1183
|
+
if (!attributes) {
|
|
1184
|
+
return;
|
|
1185
|
+
}
|
|
1186
|
+
for (let i = attributes.length - 1; i >= 0; --i) {
|
|
1187
|
+
const attribute = attributes[i];
|
|
1188
|
+
const name = attribute && attribute.name;
|
|
1189
|
+
if (typeof name !== 'string' || ALLOWED_ATTR[transformCaseFunc(name)]) {
|
|
1190
|
+
continue;
|
|
1191
|
+
}
|
|
1192
|
+
try {
|
|
1193
|
+
element.removeAttribute(name);
|
|
1194
|
+
} catch (_) {
|
|
1195
|
+
/* Clobbered removeAttribute on a doomed node — ignore */
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
};
|
|
1199
|
+
/**
|
|
1200
|
+
* _neutralizeSubtree
|
|
1201
|
+
*
|
|
1202
|
+
* Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT
|
|
1203
|
+
* move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,
|
|
1204
|
+
* namespace, comment, processing-instruction and KEEP_CONTENT:false removals
|
|
1205
|
+
* all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path
|
|
1206
|
+
* those dropped nodes are detached from the caller's LIVE tree but a
|
|
1207
|
+
* handler-bearing original among them (an `<img onerror>`/`<video>` that was
|
|
1208
|
+
* loading) keeps its queued resource event, which fires in page scope after
|
|
1209
|
+
* sanitize returns. This walks a removed subtree and strips every attribute
|
|
1210
|
+
* the active configuration does not allow — so `on*` handlers are cancelled
|
|
1211
|
+
* through the SAME allowlist that governs kept nodes, not a separate `/^on/`
|
|
1212
|
+
* blocklist. Run synchronously before sanitize returns, i.e. before any
|
|
1213
|
+
* queued event can fire. Hook-free by design: these nodes leave the output,
|
|
1214
|
+
* so firing attribute hooks for them would be surprising. Clobber-safe reads;
|
|
1215
|
+
* a doomed clobbered node may shadow `removeAttribute` (its own attributes are
|
|
1216
|
+
* irrelevant — it is discarded — while its non-clobbered descendants, e.g.
|
|
1217
|
+
* the `<img>`, are reached and scrubbed).
|
|
1218
|
+
*
|
|
1219
|
+
* @param root the root of a removed subtree to neutralise
|
|
1220
|
+
*/
|
|
1221
|
+
const _neutralizeSubtree = function _neutralizeSubtree(root) {
|
|
1222
|
+
const stack = [root];
|
|
1223
|
+
while (stack.length > 0) {
|
|
1224
|
+
const node = stack.pop();
|
|
1225
|
+
const nodeType = getNodeType ? getNodeType(node) : node.nodeType;
|
|
1226
|
+
if (nodeType === NODE_TYPE.element) {
|
|
1227
|
+
_stripDisallowedAttributes(node);
|
|
1228
|
+
}
|
|
1229
|
+
const childNodes = getChildNodes(node);
|
|
1230
|
+
if (childNodes) {
|
|
1231
|
+
for (let i = childNodes.length - 1; i >= 0; --i) {
|
|
1232
|
+
stack.push(childNodes[i]);
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
};
|
|
975
1237
|
/**
|
|
976
1238
|
* _initDocument
|
|
977
1239
|
*
|
|
@@ -1033,6 +1295,20 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1033
1295
|
// eslint-disable-next-line no-bitwise
|
|
1034
1296
|
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
|
|
1035
1297
|
};
|
|
1298
|
+
/**
|
|
1299
|
+
* Replace template expression syntax (mustache, ERB, template
|
|
1300
|
+
* literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub
|
|
1301
|
+
* sites. Order matters: mustache, then ERB, then template literal.
|
|
1302
|
+
*
|
|
1303
|
+
* @param value the string to scrub
|
|
1304
|
+
* @returns the scrubbed string
|
|
1305
|
+
*/
|
|
1306
|
+
const _stripTemplateExpressions = function _stripTemplateExpressions(value) {
|
|
1307
|
+
value = stringReplace(value, MUSTACHE_EXPR$1, ' ');
|
|
1308
|
+
value = stringReplace(value, ERB_EXPR$1, ' ');
|
|
1309
|
+
value = stringReplace(value, TMPLIT_EXPR$1, ' ');
|
|
1310
|
+
return value;
|
|
1311
|
+
};
|
|
1036
1312
|
/**
|
|
1037
1313
|
* Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the
|
|
1038
1314
|
* character data of an element subtree. Used as the final safety net for
|
|
@@ -1053,29 +1329,27 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1053
1329
|
* @param node The root element whose character data should be scrubbed.
|
|
1054
1330
|
*/
|
|
1055
1331
|
const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {
|
|
1056
|
-
var _node$querySelectorAl
|
|
1332
|
+
var _node$querySelectorAl;
|
|
1057
1333
|
node.normalize();
|
|
1058
1334
|
const walker = createNodeIterator.call(node.ownerDocument || node, node,
|
|
1059
1335
|
// eslint-disable-next-line no-bitwise
|
|
1060
1336
|
NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);
|
|
1061
1337
|
let currentNode = walker.nextNode();
|
|
1062
1338
|
while (currentNode) {
|
|
1063
|
-
|
|
1064
|
-
arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], expr => {
|
|
1065
|
-
data = stringReplace(data, expr, ' ');
|
|
1066
|
-
});
|
|
1067
|
-
currentNode.data = data;
|
|
1339
|
+
currentNode.data = _stripTemplateExpressions(currentNode.data);
|
|
1068
1340
|
currentNode = walker.nextNode();
|
|
1069
1341
|
}
|
|
1070
1342
|
// NodeIterator does not descend into <template>.content per the DOM spec,
|
|
1071
1343
|
// so we must explicitly recurse into each template's content fragment,
|
|
1072
1344
|
// mirroring the approach used by _sanitizeShadowDOM.
|
|
1073
|
-
const templates = (_node$querySelectorAl =
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1345
|
+
const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, 'template');
|
|
1346
|
+
if (templates) {
|
|
1347
|
+
arrayForEach(templates, tmpl => {
|
|
1348
|
+
if (_isDocumentFragment(tmpl.content)) {
|
|
1349
|
+
_scrubTemplateExpressions2(tmpl.content);
|
|
1350
|
+
}
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1079
1353
|
};
|
|
1080
1354
|
/**
|
|
1081
1355
|
* _isClobbered
|
|
@@ -1171,10 +1445,104 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1171
1445
|
}
|
|
1172
1446
|
};
|
|
1173
1447
|
function _executeHooks(hooks, currentNode, data) {
|
|
1448
|
+
if (hooks.length === 0) {
|
|
1449
|
+
return;
|
|
1450
|
+
}
|
|
1174
1451
|
arrayForEach(hooks, hook => {
|
|
1175
1452
|
hook.call(DOMPurify, currentNode, data, CONFIG);
|
|
1176
1453
|
});
|
|
1177
1454
|
}
|
|
1455
|
+
/**
|
|
1456
|
+
* Structural-threat checks that condemn a node regardless of the
|
|
1457
|
+
* allowlists: mXSS via namespace confusion, risky CSS construction,
|
|
1458
|
+
* processing instructions, markup-bearing comments. Pure predicate;
|
|
1459
|
+
* the caller removes. Check order is load-bearing.
|
|
1460
|
+
*
|
|
1461
|
+
* @param currentNode the node to inspect
|
|
1462
|
+
* @param tagName the node's transformCaseFunc'd tag name
|
|
1463
|
+
* @return true if the node must be removed
|
|
1464
|
+
*/
|
|
1465
|
+
const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {
|
|
1466
|
+
/* Detect mXSS attempts abusing namespace confusion */
|
|
1467
|
+
if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) {
|
|
1468
|
+
return true;
|
|
1469
|
+
}
|
|
1470
|
+
/* Remove risky CSS construction leading to mXSS */
|
|
1471
|
+
if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === 'style' && _isNode(currentNode.firstElementChild)) {
|
|
1472
|
+
return true;
|
|
1473
|
+
}
|
|
1474
|
+
/* Remove any occurrence of processing instructions */
|
|
1475
|
+
if (currentNode.nodeType === NODE_TYPE.processingInstruction) {
|
|
1476
|
+
return true;
|
|
1477
|
+
}
|
|
1478
|
+
/* Remove any kind of possibly harmful comments */
|
|
1479
|
+
if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) {
|
|
1480
|
+
return true;
|
|
1481
|
+
}
|
|
1482
|
+
return false;
|
|
1483
|
+
};
|
|
1484
|
+
/**
|
|
1485
|
+
* Handle a node whose tag is forbidden or not allowlisted: keep
|
|
1486
|
+
* allowed custom elements (false return exits _sanitizeElements
|
|
1487
|
+
* early - namespace/fallback checks and the afterSanitizeElements
|
|
1488
|
+
* hook are intentionally skipped for kept custom elements), else
|
|
1489
|
+
* hoist content per KEEP_CONTENT and remove.
|
|
1490
|
+
*
|
|
1491
|
+
* @param currentNode the disallowed node
|
|
1492
|
+
* @param tagName the node's transformCaseFunc'd tag name
|
|
1493
|
+
* @return true if the node was removed, false if kept
|
|
1494
|
+
*/
|
|
1495
|
+
const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName) {
|
|
1496
|
+
/* Check if we have a custom element to handle */
|
|
1497
|
+
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
1498
|
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
1499
|
+
return false;
|
|
1500
|
+
}
|
|
1501
|
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
|
|
1502
|
+
return false;
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
/* Keep content except for bad-listed elements.
|
|
1506
|
+
Use the cached prototype getters exclusively — the previous code
|
|
1507
|
+
had `|| currentNode.parentNode` / `|| currentNode.childNodes`
|
|
1508
|
+
fallbacks, but the cached getters always return the canonical
|
|
1509
|
+
value (or null for a real parent-less node), so the fallback
|
|
1510
|
+
path was dead in safe cases and a clobbering surface in unsafe
|
|
1511
|
+
ones. Falsy cached results stay falsy; the `if (childNodes &&
|
|
1512
|
+
parentNode)` check already gates correctly. */
|
|
1513
|
+
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
|
1514
|
+
const parentNode = getParentNode(currentNode);
|
|
1515
|
+
const childNodes = getChildNodes(currentNode);
|
|
1516
|
+
if (childNodes && parentNode) {
|
|
1517
|
+
const childCount = childNodes.length;
|
|
1518
|
+
/* In-place: hoist the *original* children so the iterator visits
|
|
1519
|
+
and sanitises them through the same allowlist pass as every other
|
|
1520
|
+
node. The caller built the tree in the live document, so the
|
|
1521
|
+
originals carry already-queued resource events (`<img onerror>`,
|
|
1522
|
+
`<video>`/`<audio>` error, lazy/`onload`, …); cloning would leave
|
|
1523
|
+
those originals detached but still armed, firing in page scope
|
|
1524
|
+
while the returned tree looked clean. Moving is safe in-place: the
|
|
1525
|
+
root is pre-validated as an allowed tag and so is never the node
|
|
1526
|
+
being removed, which keeps `parentNode` inside the iterator root
|
|
1527
|
+
and the relocated child inside the serialised tree.
|
|
1528
|
+
Otherwise (string / DOM-copy paths): clone. The iterator is rooted
|
|
1529
|
+
at — and the result serialised from — `body`, so a restrictive
|
|
1530
|
+
ALLOWED_TAGS that removes `body` itself must leave its content in
|
|
1531
|
+
place, which only cloning does; and those paths parse into an
|
|
1532
|
+
inert document, so their discarded originals never had a queued
|
|
1533
|
+
event to neutralise.
|
|
1534
|
+
`childNodes` is live; a tail-to-head walk keeps `childNodes[i]`
|
|
1535
|
+
valid whether we move (drops the trailing entry) or clone (leaves
|
|
1536
|
+
the list intact). */
|
|
1537
|
+
for (let i = childCount - 1; i >= 0; --i) {
|
|
1538
|
+
const hoisted = IN_PLACE ? childNodes[i] : cloneNode(childNodes[i], true);
|
|
1539
|
+
parentNode.insertBefore(hoisted, getNextSibling(currentNode));
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
_forceRemove(currentNode);
|
|
1544
|
+
return true;
|
|
1545
|
+
};
|
|
1178
1546
|
/**
|
|
1179
1547
|
* _sanitizeElements
|
|
1180
1548
|
*
|
|
@@ -1185,7 +1553,6 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1185
1553
|
* @return true if node was killed, false if left alive
|
|
1186
1554
|
*/
|
|
1187
1555
|
const _sanitizeElements = function _sanitizeElements(currentNode) {
|
|
1188
|
-
let content = null;
|
|
1189
1556
|
/* Execute a hook if present */
|
|
1190
1557
|
_executeHooks(hooks.beforeSanitizeElements, currentNode, null);
|
|
1191
1558
|
/* Check if element is clobbered or can clobber */
|
|
@@ -1200,58 +1567,14 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1200
1567
|
tagName,
|
|
1201
1568
|
allowedTags: ALLOWED_TAGS
|
|
1202
1569
|
});
|
|
1203
|
-
/*
|
|
1204
|
-
if (
|
|
1205
|
-
_forceRemove(currentNode);
|
|
1206
|
-
return true;
|
|
1207
|
-
}
|
|
1208
|
-
/* Remove risky CSS construction leading to mXSS */
|
|
1209
|
-
if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && tagName === 'style' && _isNode(currentNode.firstElementChild)) {
|
|
1210
|
-
_forceRemove(currentNode);
|
|
1211
|
-
return true;
|
|
1212
|
-
}
|
|
1213
|
-
/* Remove any occurrence of processing instructions */
|
|
1214
|
-
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
|
1215
|
-
_forceRemove(currentNode);
|
|
1216
|
-
return true;
|
|
1217
|
-
}
|
|
1218
|
-
/* Remove any kind of possibly harmful comments */
|
|
1219
|
-
if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
|
|
1570
|
+
/* Remove mXSS vectors, processing instructions and risky comments */
|
|
1571
|
+
if (_isUnsafeNode(currentNode, tagName)) {
|
|
1220
1572
|
_forceRemove(currentNode);
|
|
1221
1573
|
return true;
|
|
1222
1574
|
}
|
|
1223
1575
|
/* Remove element if anything forbids its presence */
|
|
1224
1576
|
if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
|
|
1225
|
-
|
|
1226
|
-
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
1227
|
-
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
1228
|
-
return false;
|
|
1229
|
-
}
|
|
1230
|
-
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
|
|
1231
|
-
return false;
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
/* Keep content except for bad-listed elements.
|
|
1235
|
-
Use the cached prototype getters exclusively — the previous code
|
|
1236
|
-
had `|| currentNode.parentNode` / `|| currentNode.childNodes`
|
|
1237
|
-
fallbacks, but the cached getters always return the canonical
|
|
1238
|
-
value (or null for a real parent-less node), so the fallback
|
|
1239
|
-
path was dead in safe cases and a clobbering surface in unsafe
|
|
1240
|
-
ones. Falsy cached results stay falsy; the `if (childNodes &&
|
|
1241
|
-
parentNode)` check already gates correctly. */
|
|
1242
|
-
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
|
1243
|
-
const parentNode = getParentNode(currentNode);
|
|
1244
|
-
const childNodes = getChildNodes(currentNode);
|
|
1245
|
-
if (childNodes && parentNode) {
|
|
1246
|
-
const childCount = childNodes.length;
|
|
1247
|
-
for (let i = childCount - 1; i >= 0; --i) {
|
|
1248
|
-
const childClone = cloneNode(childNodes[i], true);
|
|
1249
|
-
parentNode.insertBefore(childClone, getNextSibling(currentNode));
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
_forceRemove(currentNode);
|
|
1254
|
-
return true;
|
|
1577
|
+
return _sanitizeDisallowedNode(currentNode, tagName);
|
|
1255
1578
|
}
|
|
1256
1579
|
/* Check whether element has a valid namespace.
|
|
1257
1580
|
Realm-safe check (GHSA-hpcv-96wg-7vj8): use the cached Node.prototype
|
|
@@ -1265,17 +1588,14 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1265
1588
|
return true;
|
|
1266
1589
|
}
|
|
1267
1590
|
/* Make sure that older browsers don't get fallback-tag mXSS */
|
|
1268
|
-
if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(
|
|
1591
|
+
if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {
|
|
1269
1592
|
_forceRemove(currentNode);
|
|
1270
1593
|
return true;
|
|
1271
1594
|
}
|
|
1272
1595
|
/* Sanitize element content to be template-safe */
|
|
1273
1596
|
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
|
|
1274
1597
|
/* Get the element's text content */
|
|
1275
|
-
content = currentNode.textContent;
|
|
1276
|
-
arrayForEach([MUSTACHE_EXPR$1, ERB_EXPR$1, TMPLIT_EXPR$1], expr => {
|
|
1277
|
-
content = stringReplace(content, expr, ' ');
|
|
1278
|
-
});
|
|
1598
|
+
const content = _stripTemplateExpressions(currentNode.textContent);
|
|
1279
1599
|
if (currentNode.textContent !== content) {
|
|
1280
1600
|
arrayPush(DOMPurify.removed, {
|
|
1281
1601
|
element: currentNode.cloneNode()
|
|
@@ -1310,7 +1630,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1310
1630
|
(https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
|
|
1311
1631
|
XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
|
|
1312
1632
|
We don't need to check the value; it's always URI safe. */
|
|
1313
|
-
if (ALLOW_DATA_ATTR &&
|
|
1633
|
+
if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ; else if (!nameIsPermitted) {
|
|
1314
1634
|
if (
|
|
1315
1635
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
1316
1636
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
@@ -1342,6 +1662,63 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1342
1662
|
const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
|
|
1343
1663
|
return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
|
|
1344
1664
|
};
|
|
1665
|
+
/**
|
|
1666
|
+
* Wrap an attribute value in the matching Trusted Types object when
|
|
1667
|
+
* the active policy requires it. Namespaced attributes pass through
|
|
1668
|
+
* unchanged (no TT support yet, see
|
|
1669
|
+
* https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).
|
|
1670
|
+
*
|
|
1671
|
+
* @param lcTag lowercase tag name of the containing element
|
|
1672
|
+
* @param lcName lowercase attribute name
|
|
1673
|
+
* @param namespaceURI the attribute's namespace, if any
|
|
1674
|
+
* @param value the attribute value to wrap
|
|
1675
|
+
* @return the value, wrapped when Trusted Types demand it
|
|
1676
|
+
*/
|
|
1677
|
+
const _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {
|
|
1678
|
+
if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function' && !namespaceURI) {
|
|
1679
|
+
switch (trustedTypes.getAttributeType(lcTag, lcName)) {
|
|
1680
|
+
case 'TrustedHTML':
|
|
1681
|
+
{
|
|
1682
|
+
return _createTrustedHTML(value);
|
|
1683
|
+
}
|
|
1684
|
+
case 'TrustedScriptURL':
|
|
1685
|
+
{
|
|
1686
|
+
return _createTrustedScriptURL(value);
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
return value;
|
|
1691
|
+
};
|
|
1692
|
+
/**
|
|
1693
|
+
* Write a modified attribute value back onto the element. On
|
|
1694
|
+
* success, re-probe for clobbering introduced by the new value and
|
|
1695
|
+
* remove the element when found; otherwise pop the removal entry
|
|
1696
|
+
* recorded by the earlier _removeAttribute (long-standing pairing
|
|
1697
|
+
* with the SANITIZE_NAMED_PROPS path - do not "fix" casually). On
|
|
1698
|
+
* failure, remove the attribute instead.
|
|
1699
|
+
*
|
|
1700
|
+
* @param currentNode the element carrying the attribute
|
|
1701
|
+
* @param name the attribute name as present on the element
|
|
1702
|
+
* @param namespaceURI the attribute's namespace, if any
|
|
1703
|
+
* @param value the new attribute value
|
|
1704
|
+
*/
|
|
1705
|
+
const _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {
|
|
1706
|
+
try {
|
|
1707
|
+
if (namespaceURI) {
|
|
1708
|
+
currentNode.setAttributeNS(namespaceURI, name, value);
|
|
1709
|
+
} else {
|
|
1710
|
+
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
|
|
1711
|
+
currentNode.setAttribute(name, value);
|
|
1712
|
+
}
|
|
1713
|
+
if (_isClobbered(currentNode)) {
|
|
1714
|
+
_forceRemove(currentNode);
|
|
1715
|
+
} else {
|
|
1716
|
+
arrayPop(DOMPurify.removed);
|
|
1717
|
+
}
|
|
1718
|
+
} catch (_) {
|
|
1719
|
+
_removeAttribute(name, currentNode);
|
|
1720
|
+
}
|
|
1721
|
+
};
|
|
1345
1722
|
/**
|
|
1346
1723
|
* _sanitizeAttributes
|
|
1347
1724
|
*
|
|
@@ -1368,6 +1745,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1368
1745
|
forceKeepAttr: undefined
|
|
1369
1746
|
};
|
|
1370
1747
|
let l = attributes.length;
|
|
1748
|
+
const lcTag = transformCaseFunc(currentNode.nodeName);
|
|
1371
1749
|
/* Go backwards over all attributes; safely remove bad ones */
|
|
1372
1750
|
while (l--) {
|
|
1373
1751
|
const attr = attributes[l];
|
|
@@ -1405,7 +1783,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1405
1783
|
_removeAttribute(name, currentNode);
|
|
1406
1784
|
continue;
|
|
1407
1785
|
}
|
|
1408
|
-
/* Did the hooks
|
|
1786
|
+
/* Did the hooks force-keep the attribute? */
|
|
1409
1787
|
if (hookEvent.forceKeepAttr) {
|
|
1410
1788
|
continue;
|
|
1411
1789
|
}
|
|
@@ -1415,56 +1793,24 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1415
1793
|
continue;
|
|
1416
1794
|
}
|
|
1417
1795
|
/* Work around a security issue in jQuery 3.0 */
|
|
1418
|
-
if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(
|
|
1796
|
+
if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {
|
|
1419
1797
|
_removeAttribute(name, currentNode);
|
|
1420
1798
|
continue;
|
|
1421
1799
|
}
|
|
1422
1800
|
/* Sanitize attribute content to be template-safe */
|
|
1423
1801
|
if (SAFE_FOR_TEMPLATES) {
|
|
1424
|
-
|
|
1425
|
-
value = stringReplace(value, expr, ' ');
|
|
1426
|
-
});
|
|
1802
|
+
value = _stripTemplateExpressions(value);
|
|
1427
1803
|
}
|
|
1428
1804
|
/* Is `value` valid for this attribute? */
|
|
1429
|
-
const lcTag = transformCaseFunc(currentNode.nodeName);
|
|
1430
1805
|
if (!_isValidAttribute(lcTag, lcName, value)) {
|
|
1431
1806
|
_removeAttribute(name, currentNode);
|
|
1432
1807
|
continue;
|
|
1433
1808
|
}
|
|
1434
1809
|
/* Handle attributes that require Trusted Types */
|
|
1435
|
-
|
|
1436
|
-
if (namespaceURI) ; else {
|
|
1437
|
-
switch (trustedTypes.getAttributeType(lcTag, lcName)) {
|
|
1438
|
-
case 'TrustedHTML':
|
|
1439
|
-
{
|
|
1440
|
-
value = _createTrustedHTML(value);
|
|
1441
|
-
break;
|
|
1442
|
-
}
|
|
1443
|
-
case 'TrustedScriptURL':
|
|
1444
|
-
{
|
|
1445
|
-
value = trustedTypesPolicy.createScriptURL(value);
|
|
1446
|
-
break;
|
|
1447
|
-
}
|
|
1448
|
-
}
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1810
|
+
value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);
|
|
1451
1811
|
/* Handle invalid data-* attribute set by try-catching it */
|
|
1452
1812
|
if (value !== initValue) {
|
|
1453
|
-
|
|
1454
|
-
if (namespaceURI) {
|
|
1455
|
-
currentNode.setAttributeNS(namespaceURI, name, value);
|
|
1456
|
-
} else {
|
|
1457
|
-
/* Fallback to setAttribute() for browser-unrecognized namespaces e.g. "x-schema". */
|
|
1458
|
-
currentNode.setAttribute(name, value);
|
|
1459
|
-
}
|
|
1460
|
-
if (_isClobbered(currentNode)) {
|
|
1461
|
-
_forceRemove(currentNode);
|
|
1462
|
-
} else {
|
|
1463
|
-
arrayPop(DOMPurify.removed);
|
|
1464
|
-
}
|
|
1465
|
-
} catch (_) {
|
|
1466
|
-
_removeAttribute(name, currentNode);
|
|
1467
|
-
}
|
|
1813
|
+
_setAttributeValue(currentNode, name, namespaceURI, value);
|
|
1468
1814
|
}
|
|
1469
1815
|
}
|
|
1470
1816
|
/* Execute a hook if present */
|
|
@@ -1506,9 +1852,9 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1506
1852
|
iterator also surfaces. */
|
|
1507
1853
|
const shadowNodeType = getNodeType ? getNodeType(shadowNode) : shadowNode.nodeType;
|
|
1508
1854
|
if (shadowNodeType === NODE_TYPE.element) {
|
|
1509
|
-
const innerSr = getShadowRoot
|
|
1855
|
+
const innerSr = getShadowRoot(shadowNode);
|
|
1510
1856
|
if (_isDocumentFragment(innerSr)) {
|
|
1511
|
-
|
|
1857
|
+
_sanitizeAttachedShadowRoots(innerSr);
|
|
1512
1858
|
_sanitizeShadowDOM2(innerSr);
|
|
1513
1859
|
}
|
|
1514
1860
|
}
|
|
@@ -1535,46 +1881,81 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1535
1881
|
*
|
|
1536
1882
|
* @param root the subtree root to walk for attached shadow roots
|
|
1537
1883
|
*/
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1884
|
+
const _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {
|
|
1885
|
+
/* Iterative (explicit stack) rather than per-child recursion. DOM APIs
|
|
1886
|
+
impose no depth cap, so an attacker-shaped tree (JSON/CRDT/editor data
|
|
1887
|
+
built straight into the DOM — the IN_PLACE surface) deeper than the JS
|
|
1888
|
+
call-stack budget would otherwise overflow native recursion here and
|
|
1889
|
+
throw at the IN_PLACE entry pre-pass, before a single node is
|
|
1890
|
+
sanitized, leaving the caller's live tree untouched (fail-open). See
|
|
1891
|
+
campaign-3 F4. A heap stack keeps depth off the call stack.
|
|
1892
|
+
Each work item is either a node to descend into, or a deferred
|
|
1893
|
+
`_sanitizeShadowDOM` for an already-walked shadow root. The deferred
|
|
1894
|
+
form preserves the original post-order discipline: a shadow root's
|
|
1895
|
+
nested shadow roots are discovered before the outer shadow is
|
|
1896
|
+
sanitized (which may remove hosts). Pushes are in reverse of the
|
|
1897
|
+
desired processing order (LIFO): template content, then children, then
|
|
1898
|
+
the shadow-sanitize, then the shadow walk — so the order matches the
|
|
1899
|
+
previous recursion exactly. */
|
|
1900
|
+
const stack = [{
|
|
1901
|
+
node: root,
|
|
1902
|
+
shadow: null
|
|
1903
|
+
}];
|
|
1904
|
+
while (stack.length > 0) {
|
|
1905
|
+
const item = stack.pop();
|
|
1906
|
+
/* Deferred shadow-DOM sanitisation: runs after its subtree was walked. */
|
|
1907
|
+
if (item.shadow) {
|
|
1908
|
+
_sanitizeShadowDOM2(item.shadow);
|
|
1909
|
+
continue;
|
|
1910
|
+
}
|
|
1911
|
+
const node = item.node;
|
|
1912
|
+
const nodeType = getNodeType ? getNodeType(node) : node.nodeType;
|
|
1913
|
+
const isElement = nodeType === NODE_TYPE.element;
|
|
1914
|
+
/* (pushed last → processed first) Children, snapshotted in reverse so
|
|
1915
|
+
the first child is processed first. Snapshotting matters because a
|
|
1916
|
+
hook may detach siblings mid-walk. */
|
|
1917
|
+
const childNodes = getChildNodes(node);
|
|
1918
|
+
if (childNodes) {
|
|
1919
|
+
for (let i = childNodes.length - 1; i >= 0; --i) {
|
|
1920
|
+
stack.push({
|
|
1921
|
+
node: childNodes[i],
|
|
1922
|
+
shadow: null
|
|
1923
|
+
});
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
/* (pushed before children → processed after them, matching the old
|
|
1927
|
+
"template content last" order) When the node is a <template>,
|
|
1928
|
+
descend into its content. */
|
|
1929
|
+
if (isElement) {
|
|
1930
|
+
const rootName = getNodeName ? getNodeName(node) : null;
|
|
1931
|
+
if (typeof rootName === 'string' && transformCaseFunc(rootName) === 'template') {
|
|
1932
|
+
const content = node.content;
|
|
1933
|
+
if (_isDocumentFragment(content)) {
|
|
1934
|
+
stack.push({
|
|
1935
|
+
node: content,
|
|
1936
|
+
shadow: null
|
|
1937
|
+
});
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
/* Shadow root (processed first): walk its subtree, then sanitise it.
|
|
1942
|
+
Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection
|
|
1943
|
+
rather than `instanceof DocumentFragment`, which is realm-bound and
|
|
1944
|
+
silently skipped foreign-realm shadow roots (e.g.
|
|
1945
|
+
iframe.contentDocument attachShadow). */
|
|
1946
|
+
if (isElement) {
|
|
1947
|
+
const sr = getShadowRoot(node);
|
|
1948
|
+
if (_isDocumentFragment(sr)) {
|
|
1949
|
+
/* Push the deferred sanitise first so it pops after the shadow
|
|
1950
|
+
walk we push next, i.e. nested shadow roots are discovered
|
|
1951
|
+
before this one is sanitised. */
|
|
1952
|
+
stack.push({
|
|
1953
|
+
node: null,
|
|
1954
|
+
shadow: sr
|
|
1955
|
+
}, {
|
|
1956
|
+
node: sr,
|
|
1957
|
+
shadow: null
|
|
1958
|
+
});
|
|
1578
1959
|
}
|
|
1579
1960
|
}
|
|
1580
1961
|
}
|
|
@@ -1605,16 +1986,41 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1605
1986
|
return dirty;
|
|
1606
1987
|
}
|
|
1607
1988
|
/* Assign config vars */
|
|
1608
|
-
if (
|
|
1989
|
+
if (SET_CONFIG) {
|
|
1990
|
+
/* Persistent setConfig() path: _parseConfig is skipped, so the sets are
|
|
1991
|
+
* not re-derived per call. Restore them from the pristine bindings
|
|
1992
|
+
* captured at setConfig() time so a previous call's hook clone (mutated
|
|
1993
|
+
* below) does not carry over. */
|
|
1994
|
+
ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;
|
|
1995
|
+
ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;
|
|
1996
|
+
} else {
|
|
1609
1997
|
_parseConfig(cfg);
|
|
1610
1998
|
}
|
|
1999
|
+
/* Clone the hook-mutable allowlists before the walk whenever an
|
|
2000
|
+
* uponSanitize* hook is registered. The hook event exposes ALLOWED_TAGS
|
|
2001
|
+
* and ALLOWED_ATTR by reference (as allowedTags / allowedAttributes), so
|
|
2002
|
+
* a hook that widens them would otherwise mutate the shared set
|
|
2003
|
+
* permanently: across later calls and across every element. Cloning per
|
|
2004
|
+
* walk keeps documented in-call widening working while scoping it to the
|
|
2005
|
+
* call. A single guard for both config paths - the per-call path rebinds
|
|
2006
|
+
* the sets in _parseConfig each call, the persistent path restores them
|
|
2007
|
+
* from the captured bindings just above - so the two cannot diverge. */
|
|
2008
|
+
if (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) {
|
|
2009
|
+
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
2010
|
+
}
|
|
2011
|
+
if (hooks.uponSanitizeAttribute.length > 0) {
|
|
2012
|
+
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
2013
|
+
}
|
|
1611
2014
|
/* Clean up removed elements */
|
|
1612
2015
|
DOMPurify.removed = [];
|
|
1613
|
-
/*
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
2016
|
+
/* Resolve IN_PLACE for this call without mutating persistent config.
|
|
2017
|
+
Writing the IN_PLACE closure variable here leaks under setConfig(),
|
|
2018
|
+
where _parseConfig is skipped on later calls: a single string call would
|
|
2019
|
+
disable in-place mode for every subsequent node call, returning a
|
|
2020
|
+
sanitized copy while leaving the caller's node — which in-place callers
|
|
2021
|
+
keep using and whose return value they ignore — unsanitized. REPORT-2. */
|
|
2022
|
+
const inPlace = IN_PLACE && typeof dirty !== 'string' && _isNode(dirty);
|
|
2023
|
+
if (inPlace) {
|
|
1618
2024
|
/* Do some early pre-sanitization to avoid unsafe root nodes.
|
|
1619
2025
|
Read nodeName through the cached prototype getter — a clobbering
|
|
1620
2026
|
child named "nodeName" on the form root would otherwise shadow
|
|
@@ -1641,8 +2047,16 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1641
2047
|
throw typeErrorCreate('root node is clobbered and cannot be sanitized in-place');
|
|
1642
2048
|
}
|
|
1643
2049
|
/* Sanitize attached shadow roots before the main iterator runs.
|
|
1644
|
-
The iterator does not descend into shadow trees.
|
|
1645
|
-
|
|
2050
|
+
The iterator does not descend into shadow trees. Same fail-closed
|
|
2051
|
+
barrier as the main walk (campaign-3 F2): a custom-element reaction
|
|
2052
|
+
inside a shadow root could abort this pre-pass before the walk runs,
|
|
2053
|
+
which would otherwise leave the entire live tree unsanitized. */
|
|
2054
|
+
try {
|
|
2055
|
+
_sanitizeAttachedShadowRoots(dirty);
|
|
2056
|
+
} catch (error) {
|
|
2057
|
+
_neutralizeRoot(dirty);
|
|
2058
|
+
throw error;
|
|
2059
|
+
}
|
|
1646
2060
|
} else if (_isNode(dirty)) {
|
|
1647
2061
|
/* If dirty is a DOM element, append to an empty document to avoid
|
|
1648
2062
|
elements being stripped by the parser */
|
|
@@ -1662,7 +2076,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1662
2076
|
descend into shadow trees. The walk routes every read through a
|
|
1663
2077
|
cached prototype getter so clobbering descendants on a form root
|
|
1664
2078
|
cannot hide a shadow host from this pass. */
|
|
1665
|
-
|
|
2079
|
+
_sanitizeAttachedShadowRoots(importedNode);
|
|
1666
2080
|
} else {
|
|
1667
2081
|
/* Exit directly if we have nothing to do */
|
|
1668
2082
|
if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&
|
|
@@ -1682,23 +2096,50 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1682
2096
|
_forceRemove(body.firstChild);
|
|
1683
2097
|
}
|
|
1684
2098
|
/* Get node iterator */
|
|
1685
|
-
const nodeIterator = _createNodeIterator(
|
|
1686
|
-
/* Now start iterating over the created document
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
2099
|
+
const nodeIterator = _createNodeIterator(inPlace ? dirty : body);
|
|
2100
|
+
/* Now start iterating over the created document.
|
|
2101
|
+
The walk runs inside an exception barrier (campaign-3 F2): a re-entrant
|
|
2102
|
+
engine/custom-element mutation can detach a node mid-walk so
|
|
2103
|
+
`_forceRemove`'s parentless guard throws, aborting the loop. Without the
|
|
2104
|
+
barrier the caller's in-place tree would be left half-sanitized with the
|
|
2105
|
+
unvisited tail still armed. On any throw we fail closed — strip the
|
|
2106
|
+
in-place root bare — then rethrow so the existing throw contract is
|
|
2107
|
+
preserved. (String/DOM-copy paths never return the partial body, so the
|
|
2108
|
+
propagating throw is already fail-closed there.) */
|
|
2109
|
+
try {
|
|
2110
|
+
while (currentNode = nodeIterator.nextNode()) {
|
|
2111
|
+
/* Sanitize tags and elements */
|
|
2112
|
+
_sanitizeElements(currentNode);
|
|
2113
|
+
/* Check attributes next */
|
|
2114
|
+
_sanitizeAttributes(currentNode);
|
|
2115
|
+
/* Shadow DOM detected, sanitize it.
|
|
2116
|
+
Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection
|
|
2117
|
+
instead of instanceof, so foreign-realm <template>.content is
|
|
2118
|
+
walked correctly. */
|
|
2119
|
+
if (_isDocumentFragment(currentNode.content)) {
|
|
2120
|
+
_sanitizeShadowDOM2(currentNode.content);
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
} catch (error) {
|
|
2124
|
+
if (inPlace) {
|
|
2125
|
+
_neutralizeRoot(dirty);
|
|
1698
2126
|
}
|
|
2127
|
+
throw error;
|
|
1699
2128
|
}
|
|
1700
2129
|
/* If we sanitized `dirty` in-place, return it. */
|
|
1701
|
-
if (
|
|
2130
|
+
if (inPlace) {
|
|
2131
|
+
/* Fail-closed completion of the audit-5 F1 fix: every node removed from
|
|
2132
|
+
the caller's live tree is detached but may still hold a queued
|
|
2133
|
+
resource-event handler that fires in page scope after we return. The
|
|
2134
|
+
move-hoist covers only disallowed-tag KEEP_CONTENT removals; strip the
|
|
2135
|
+
non-allow-listed attributes off every other removed subtree (clobber,
|
|
2136
|
+
mXSS, namespace, comments, KEEP_CONTENT:false, …) so those handlers are
|
|
2137
|
+
cancelled before any event can fire. Runs synchronously, pre-return. */
|
|
2138
|
+
arrayForEach(DOMPurify.removed, entry => {
|
|
2139
|
+
if (entry.element) {
|
|
2140
|
+
_neutralizeSubtree(entry.element);
|
|
2141
|
+
}
|
|
2142
|
+
});
|
|
1702
2143
|
if (SAFE_FOR_TEMPLATES) {
|
|
1703
2144
|
_scrubTemplateExpressions2(dirty);
|
|
1704
2145
|
}
|
|
@@ -1737,9 +2178,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1737
2178
|
}
|
|
1738
2179
|
/* Sanitize final string template-safe */
|
|
1739
2180
|
if (SAFE_FOR_TEMPLATES) {
|
|
1740
|
-
|
|
1741
|
-
serializedHTML = stringReplace(serializedHTML, expr, ' ');
|
|
1742
|
-
});
|
|
2181
|
+
serializedHTML = _stripTemplateExpressions(serializedHTML);
|
|
1743
2182
|
}
|
|
1744
2183
|
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;
|
|
1745
2184
|
};
|
|
@@ -1747,10 +2186,20 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1747
2186
|
let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1748
2187
|
_parseConfig(cfg);
|
|
1749
2188
|
SET_CONFIG = true;
|
|
2189
|
+
SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;
|
|
2190
|
+
SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;
|
|
1750
2191
|
};
|
|
1751
2192
|
DOMPurify.clearConfig = function () {
|
|
1752
2193
|
CONFIG = null;
|
|
1753
2194
|
SET_CONFIG = false;
|
|
2195
|
+
SET_CONFIG_ALLOWED_TAGS = null;
|
|
2196
|
+
SET_CONFIG_ALLOWED_ATTR = null;
|
|
2197
|
+
// Drop any caller-supplied Trusted Types policy so it cannot poison later
|
|
2198
|
+
// `RETURN_TRUSTED_TYPE` output. The internal default policy (cached, and
|
|
2199
|
+
// never recreated — Trusted Types throws on duplicate names) is restored by
|
|
2200
|
+
// the next `_parseConfig`. See GHSA-vxr8-fq34-vvx9.
|
|
2201
|
+
trustedTypesPolicy = defaultTrustedTypesPolicy;
|
|
2202
|
+
emptyHTML = '';
|
|
1754
2203
|
};
|
|
1755
2204
|
DOMPurify.isValidAttribute = function (tag, attr, value) {
|
|
1756
2205
|
/* Initialize shared config vars if necessary. */
|
|
@@ -1765,9 +2214,19 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1765
2214
|
if (typeof hookFunction !== 'function') {
|
|
1766
2215
|
return;
|
|
1767
2216
|
}
|
|
2217
|
+
/* Reject unknown entry points. Without this, a non-hook key (e.g.
|
|
2218
|
+
* '__proto__') indexes off the prototype chain rather than a real
|
|
2219
|
+
* hook array, and arrayPush then writes to Object.prototype. Guard
|
|
2220
|
+
* with an own-property check against the known hook names. */
|
|
2221
|
+
if (!objectHasOwnProperty(hooks, entryPoint)) {
|
|
2222
|
+
return;
|
|
2223
|
+
}
|
|
1768
2224
|
arrayPush(hooks[entryPoint], hookFunction);
|
|
1769
2225
|
};
|
|
1770
2226
|
DOMPurify.removeHook = function (entryPoint, hookFunction) {
|
|
2227
|
+
if (!objectHasOwnProperty(hooks, entryPoint)) {
|
|
2228
|
+
return undefined;
|
|
2229
|
+
}
|
|
1771
2230
|
if (hookFunction !== undefined) {
|
|
1772
2231
|
const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
|
|
1773
2232
|
return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];
|
|
@@ -1775,6 +2234,9 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1775
2234
|
return arrayPop(hooks[entryPoint]);
|
|
1776
2235
|
};
|
|
1777
2236
|
DOMPurify.removeHooks = function (entryPoint) {
|
|
2237
|
+
if (!objectHasOwnProperty(hooks, entryPoint)) {
|
|
2238
|
+
return;
|
|
2239
|
+
}
|
|
1778
2240
|
hooks[entryPoint] = [];
|
|
1779
2241
|
};
|
|
1780
2242
|
DOMPurify.removeAllHooks = function () {
|